@maka/maka-cli 5.85.0 → 5.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/typescript/package.json +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +25 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +8 -6
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +18 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/mark.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/tap.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/tap.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/engine-version.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js +20 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +10 -2
- package/bundle/typescript/src/commands/game/sideQuest/game.js +20 -7
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +86 -10
- package/bundle/typescript/src/commands/game/sideQuest/types/repro.d.ts +15 -6
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.d.ts +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/ar.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/data-work.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/data-work.js +61 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/data-work.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/ddp-lite.d.ts +53 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/ddp-lite.js +43 -3
- package/bundle/typescript/src/commands/game/sideQuest/utilities/ddp-lite.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/first-aid.js +7 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/first-aid.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/grid-view.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/grid-view.js +59 -4
- package/bundle/typescript/src/commands/game/sideQuest/utilities/grid-view.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.d.ts +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/shared-run.d.ts +55 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/shared-run.js +115 -11
- package/bundle/typescript/src/commands/game/sideQuest/utilities/shared-run.js.map +1 -1
- package/bundle/typescript/src/commands/update.js +6 -20
- package/bundle/typescript/src/commands/update.js.map +1 -1
- package/bundle/typescript/src/tools/self-update/binary-install.d.ts +113 -0
- package/bundle/typescript/src/tools/self-update/binary-install.js +178 -0
- package/bundle/typescript/src/tools/self-update/binary-install.js.map +1 -0
- package/bundle/typescript/src/tools/self-update/update-maka.d.ts +3 -1
- package/bundle/typescript/src/tools/self-update/update-maka.js +234 -4
- package/bundle/typescript/src/tools/self-update/update-maka.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/** Where a --binary install lands, permanently. Deliberately NOT
|
|
2
|
+
* relocate.ts's cliHome() (~/.meteor/.maka/runtime/cli/<version>/) --
|
|
3
|
+
* that is an ephemeral, version-keyed cache the packaged binary
|
|
4
|
+
* regenerates from itself purely for relocation. A --binary install is
|
|
5
|
+
* the opposite: one stable, un-versioned path that every future
|
|
6
|
+
* `maka update maka` overwrites in place, exactly like a real packaged
|
|
7
|
+
* binary already treats its own process.execPath. */
|
|
8
|
+
export declare function binaryInstallDir(): string;
|
|
9
|
+
export declare function binaryInstallPath(platform?: NodeJS.Platform): string;
|
|
10
|
+
export type InstallKind = 'global-npm' | 'local-npm' | 'linked' | 'not-found';
|
|
11
|
+
export interface IInstallCheck {
|
|
12
|
+
kind: InstallKind;
|
|
13
|
+
/** Empty for 'global-npm' (nothing to explain); otherwise the sentence
|
|
14
|
+
* --binary's refusal prints, naming what was actually found. */
|
|
15
|
+
reason: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Classifies the global npm install of @maka/maka-cli. Pure -- takes the
|
|
19
|
+
* gathered facts instead of gathering them (see gatherInstallFacts()),
|
|
20
|
+
* so the decision itself needs no filesystem or npm to test.
|
|
21
|
+
*
|
|
22
|
+
* REALPATH COMPARISON IS THE ONLY RELIABLE CHECK HERE. A Windows npm-link
|
|
23
|
+
* junction does NOT report as a symlink via fs.lstatSync().isSymbolicLink()
|
|
24
|
+
* -- verified directly against this machine's own global maka, a real
|
|
25
|
+
* example of exactly this shape: isSymbolicLink() false, realpathSync()
|
|
26
|
+
* resolving somewhere else entirely. Comparing realpathSync() against the
|
|
27
|
+
* raw path is what actually catches it, on every platform, so that is the
|
|
28
|
+
* only signal this function looks at.
|
|
29
|
+
*/
|
|
30
|
+
export declare function classifyGlobalInstall(facts: {
|
|
31
|
+
/** <npm root -g>/@maka/maka-cli, or undefined if npm reports no global
|
|
32
|
+
* install at all. */
|
|
33
|
+
globalPackagePath: string | undefined;
|
|
34
|
+
/** fs.realpathSync(globalPackagePath), or undefined if the path above
|
|
35
|
+
* is undefined or does not exist. */
|
|
36
|
+
globalPackageRealPath: string | undefined;
|
|
37
|
+
}): IInstallCheck;
|
|
38
|
+
/** Gathers the facts classifyGlobalInstall() needs. The one impure half of
|
|
39
|
+
* the classification -- kept separate so the decision above stays pure. */
|
|
40
|
+
export declare function gatherInstallFacts(globalNpmRoot: string): {
|
|
41
|
+
globalPackagePath: string | undefined;
|
|
42
|
+
globalPackageRealPath: string | undefined;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* The PATH a freshly opened shell will see once the disclosed PATH edit
|
|
46
|
+
* has actually taken effect -- NOT what the currently-running process
|
|
47
|
+
* inherits. A registry/profile edit never reaches an already-running
|
|
48
|
+
* process, so verifying against process.env.PATH as-is would silently
|
|
49
|
+
* check the OLD path (finding the npm shim pre-uninstall, or nothing
|
|
50
|
+
* post-uninstall) and pass for the wrong reason. Pure: given the pieces,
|
|
51
|
+
* constructs the string; the caller decides what to spawn with it.
|
|
52
|
+
*
|
|
53
|
+
* npmShimDir is removed from the old PATH (not just left alongside the
|
|
54
|
+
* new entry) so the constructed env matches the END STATE this flow
|
|
55
|
+
* commits to -- binary replaces, never coexists on PATH either.
|
|
56
|
+
*/
|
|
57
|
+
export declare function buildVerificationPath(input: {
|
|
58
|
+
currentPath: string;
|
|
59
|
+
newBinDir: string;
|
|
60
|
+
npmShimDir: string | undefined;
|
|
61
|
+
pathSeparator: string;
|
|
62
|
+
}): string;
|
|
63
|
+
export interface IPosixProfile {
|
|
64
|
+
shell: string;
|
|
65
|
+
profilePath: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Which shell profile a POSIX PATH edit should target, or undefined when
|
|
69
|
+
* that cannot be said honestly. NEVER GUESSES: an unrecognized or unset
|
|
70
|
+
* $SHELL means the caller prints the export line for the user to place
|
|
71
|
+
* themselves rather than writing to a file their shell may never read --
|
|
72
|
+
* an edit that "succeeds" against the wrong file is worse than an honest
|
|
73
|
+
* "you do this part," because it passes verification (which can only
|
|
74
|
+
* check the constructed env, not the user's real future shells) while
|
|
75
|
+
* silently doing nothing for them.
|
|
76
|
+
*/
|
|
77
|
+
export declare function detectPosixProfile(shellEnv: string | undefined, homeDir: string): IPosixProfile | undefined;
|
|
78
|
+
/** The line to add to PATH, in the target shell's own syntax. fish's
|
|
79
|
+
* `fish_add_path` is idiomatic there (fish does not use `export`); every
|
|
80
|
+
* other shell gets a plain POSIX export. */
|
|
81
|
+
export declare function pathExportLine(shell: string, binDir: string): string;
|
|
82
|
+
/** Resolves a bare command name against a PATH string by hand, the same
|
|
83
|
+
* way a shell would -- used to PROVE the constructed verification PATH
|
|
84
|
+
* actually finds our binary first, rather than trusting that spawning
|
|
85
|
+
* "maka" and getting SOME successful output means it found the right
|
|
86
|
+
* one. Extension order matches Windows' own PATHEXT precedence
|
|
87
|
+
* (.exe before .cmd/.bat); POSIX has no such notion, so the bare name
|
|
88
|
+
* is the only candidate there. */
|
|
89
|
+
export declare function resolveOnPath(name: string, pathValue: string, platform: NodeJS.Platform, pathSeparator: string): string | undefined;
|
|
90
|
+
/** Places a downloaded, verified binary at targetPath. Reuses
|
|
91
|
+
* self-update.ts's swapPlanFor()/executeSwapPlan() for the case they
|
|
92
|
+
* were built for -- overwriting an EXISTING file, where Windows' plan
|
|
93
|
+
* renames the current one aside to `.old` first. That rename-aside step
|
|
94
|
+
* assumes something is already there; a --binary install's FIRST run has
|
|
95
|
+
* nothing at targetPath yet, so this checks for that case and does a
|
|
96
|
+
* plain move instead of asking swapPlanFor to rename a file that does
|
|
97
|
+
* not exist. */
|
|
98
|
+
export declare function installStagedBinary(stagedPath: string, targetPath: string, platform: NodeJS.Platform): Promise<void>;
|
|
99
|
+
/** Compares two spawnSync-style results the way check-bundle-parity.mjs
|
|
100
|
+
* compares builds: same exit status, same combined stdout+stderr. No
|
|
101
|
+
* path-scrubbing normalization here -- both invocations run the exact
|
|
102
|
+
* same landed file, so unlike parity's tsc-vs-bundle-vs-binary
|
|
103
|
+
* comparison there is no cross-build path difference to normalize away
|
|
104
|
+
* in the first place. */
|
|
105
|
+
export declare function probesMatch(a: {
|
|
106
|
+
status: number | null;
|
|
107
|
+
stdout: string;
|
|
108
|
+
stderr: string;
|
|
109
|
+
}, b: {
|
|
110
|
+
status: number | null;
|
|
111
|
+
stdout: string;
|
|
112
|
+
stderr: string;
|
|
113
|
+
}): boolean;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
// `maka update maka --binary`: an npm install opting INTO the binary
|
|
2
|
+
// distribution self-update.ts already serves packaged executables from.
|
|
3
|
+
// This file is the new entry condition, not a second copy of that
|
|
4
|
+
// machinery -- fetchLatestRelease/assetNameFor/downloadAsset/sha256Hex/
|
|
5
|
+
// digestMatches/extractArchive/swapPlanFor/executeSwapPlan all come from
|
|
6
|
+
// self-update.ts unmodified; installBinaryOverNpmGlobal() below only
|
|
7
|
+
// decides WHERE they run and what happens around them.
|
|
8
|
+
//
|
|
9
|
+
// Everything decision-shaped here is a pure function on purpose, same
|
|
10
|
+
// discipline as self-update.ts: the install-kind classification, the PATH
|
|
11
|
+
// construction, and the POSIX profile guess are all testable without a
|
|
12
|
+
// filesystem, npm, or a real shell.
|
|
13
|
+
import fs from 'fs';
|
|
14
|
+
import os from 'os';
|
|
15
|
+
import path from 'path';
|
|
16
|
+
/** Where a --binary install lands, permanently. Deliberately NOT
|
|
17
|
+
* relocate.ts's cliHome() (~/.meteor/.maka/runtime/cli/<version>/) --
|
|
18
|
+
* that is an ephemeral, version-keyed cache the packaged binary
|
|
19
|
+
* regenerates from itself purely for relocation. A --binary install is
|
|
20
|
+
* the opposite: one stable, un-versioned path that every future
|
|
21
|
+
* `maka update maka` overwrites in place, exactly like a real packaged
|
|
22
|
+
* binary already treats its own process.execPath. */
|
|
23
|
+
export function binaryInstallDir() {
|
|
24
|
+
return path.join(os.homedir(), '.meteor', '.maka', 'bin');
|
|
25
|
+
}
|
|
26
|
+
export function binaryInstallPath(platform = process.platform) {
|
|
27
|
+
return path.join(binaryInstallDir(), platform === 'win32' ? 'maka.exe' : 'maka');
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Classifies the global npm install of @maka/maka-cli. Pure -- takes the
|
|
31
|
+
* gathered facts instead of gathering them (see gatherInstallFacts()),
|
|
32
|
+
* so the decision itself needs no filesystem or npm to test.
|
|
33
|
+
*
|
|
34
|
+
* REALPATH COMPARISON IS THE ONLY RELIABLE CHECK HERE. A Windows npm-link
|
|
35
|
+
* junction does NOT report as a symlink via fs.lstatSync().isSymbolicLink()
|
|
36
|
+
* -- verified directly against this machine's own global maka, a real
|
|
37
|
+
* example of exactly this shape: isSymbolicLink() false, realpathSync()
|
|
38
|
+
* resolving somewhere else entirely. Comparing realpathSync() against the
|
|
39
|
+
* raw path is what actually catches it, on every platform, so that is the
|
|
40
|
+
* only signal this function looks at.
|
|
41
|
+
*/
|
|
42
|
+
export function classifyGlobalInstall(facts) {
|
|
43
|
+
if (!facts.globalPackagePath) {
|
|
44
|
+
return {
|
|
45
|
+
kind: 'not-found',
|
|
46
|
+
reason: 'No global npm install of @maka/maka-cli was found (`npm root -g` has no @maka/maka-cli). --binary has nothing to replace.',
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
if (!facts.globalPackageRealPath) {
|
|
50
|
+
return {
|
|
51
|
+
kind: 'not-found',
|
|
52
|
+
reason: `${facts.globalPackagePath} does not exist on disk. --binary has nothing to replace.`,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const raw = path.normalize(facts.globalPackagePath);
|
|
56
|
+
const real = path.normalize(facts.globalPackageRealPath);
|
|
57
|
+
if (raw !== real) {
|
|
58
|
+
return {
|
|
59
|
+
kind: 'linked',
|
|
60
|
+
reason: `${facts.globalPackagePath} resolves to ${facts.globalPackageRealPath} -- that is a symlink or junction (npm link, or a manual dev link), not a release install. Replacing it with a downloaded binary would silently disconnect you from that working tree. Run this from a plain \`npm install -g @maka/maka-cli\` instead if you want the binary distribution.`,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
return { kind: 'global-npm', reason: '' };
|
|
64
|
+
}
|
|
65
|
+
/** Gathers the facts classifyGlobalInstall() needs. The one impure half of
|
|
66
|
+
* the classification -- kept separate so the decision above stays pure. */
|
|
67
|
+
export function gatherInstallFacts(globalNpmRoot) {
|
|
68
|
+
const candidate = path.join(globalNpmRoot, '@maka', 'maka-cli');
|
|
69
|
+
if (!fs.existsSync(candidate)) {
|
|
70
|
+
return { globalPackagePath: undefined, globalPackageRealPath: undefined };
|
|
71
|
+
}
|
|
72
|
+
let real;
|
|
73
|
+
try {
|
|
74
|
+
real = fs.realpathSync(candidate);
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
real = undefined;
|
|
78
|
+
}
|
|
79
|
+
return { globalPackagePath: candidate, globalPackageRealPath: real };
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The PATH a freshly opened shell will see once the disclosed PATH edit
|
|
83
|
+
* has actually taken effect -- NOT what the currently-running process
|
|
84
|
+
* inherits. A registry/profile edit never reaches an already-running
|
|
85
|
+
* process, so verifying against process.env.PATH as-is would silently
|
|
86
|
+
* check the OLD path (finding the npm shim pre-uninstall, or nothing
|
|
87
|
+
* post-uninstall) and pass for the wrong reason. Pure: given the pieces,
|
|
88
|
+
* constructs the string; the caller decides what to spawn with it.
|
|
89
|
+
*
|
|
90
|
+
* npmShimDir is removed from the old PATH (not just left alongside the
|
|
91
|
+
* new entry) so the constructed env matches the END STATE this flow
|
|
92
|
+
* commits to -- binary replaces, never coexists on PATH either.
|
|
93
|
+
*/
|
|
94
|
+
export function buildVerificationPath(input) {
|
|
95
|
+
const entries = input.currentPath
|
|
96
|
+
.split(input.pathSeparator)
|
|
97
|
+
.filter(Boolean)
|
|
98
|
+
.filter((entry) => !input.npmShimDir || path.normalize(entry) !== path.normalize(input.npmShimDir));
|
|
99
|
+
return [input.newBinDir, ...entries].join(input.pathSeparator);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Which shell profile a POSIX PATH edit should target, or undefined when
|
|
103
|
+
* that cannot be said honestly. NEVER GUESSES: an unrecognized or unset
|
|
104
|
+
* $SHELL means the caller prints the export line for the user to place
|
|
105
|
+
* themselves rather than writing to a file their shell may never read --
|
|
106
|
+
* an edit that "succeeds" against the wrong file is worse than an honest
|
|
107
|
+
* "you do this part," because it passes verification (which can only
|
|
108
|
+
* check the constructed env, not the user's real future shells) while
|
|
109
|
+
* silently doing nothing for them.
|
|
110
|
+
*/
|
|
111
|
+
export function detectPosixProfile(shellEnv, homeDir) {
|
|
112
|
+
if (!shellEnv)
|
|
113
|
+
return undefined;
|
|
114
|
+
const shell = path.basename(shellEnv);
|
|
115
|
+
if (shell === 'zsh')
|
|
116
|
+
return { shell, profilePath: path.join(homeDir, '.zshrc') };
|
|
117
|
+
if (shell === 'bash')
|
|
118
|
+
return { shell, profilePath: path.join(homeDir, '.bashrc') };
|
|
119
|
+
if (shell === 'fish')
|
|
120
|
+
return { shell, profilePath: path.join(homeDir, '.config', 'fish', 'config.fish') };
|
|
121
|
+
return undefined;
|
|
122
|
+
}
|
|
123
|
+
/** The line to add to PATH, in the target shell's own syntax. fish's
|
|
124
|
+
* `fish_add_path` is idiomatic there (fish does not use `export`); every
|
|
125
|
+
* other shell gets a plain POSIX export. */
|
|
126
|
+
export function pathExportLine(shell, binDir) {
|
|
127
|
+
if (shell === 'fish')
|
|
128
|
+
return `fish_add_path ${binDir}`;
|
|
129
|
+
return `export PATH="${binDir}:$PATH"`;
|
|
130
|
+
}
|
|
131
|
+
/** Resolves a bare command name against a PATH string by hand, the same
|
|
132
|
+
* way a shell would -- used to PROVE the constructed verification PATH
|
|
133
|
+
* actually finds our binary first, rather than trusting that spawning
|
|
134
|
+
* "maka" and getting SOME successful output means it found the right
|
|
135
|
+
* one. Extension order matches Windows' own PATHEXT precedence
|
|
136
|
+
* (.exe before .cmd/.bat); POSIX has no such notion, so the bare name
|
|
137
|
+
* is the only candidate there. */
|
|
138
|
+
export function resolveOnPath(name, pathValue, platform, pathSeparator) {
|
|
139
|
+
const extensions = platform === 'win32' ? ['.exe', '.cmd', '.bat', ''] : [''];
|
|
140
|
+
for (const dir of pathValue.split(pathSeparator).filter(Boolean)) {
|
|
141
|
+
for (const ext of extensions) {
|
|
142
|
+
const candidate = path.join(dir, name + ext);
|
|
143
|
+
if (fs.existsSync(candidate))
|
|
144
|
+
return candidate;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return undefined;
|
|
148
|
+
}
|
|
149
|
+
/** Places a downloaded, verified binary at targetPath. Reuses
|
|
150
|
+
* self-update.ts's swapPlanFor()/executeSwapPlan() for the case they
|
|
151
|
+
* were built for -- overwriting an EXISTING file, where Windows' plan
|
|
152
|
+
* renames the current one aside to `.old` first. That rename-aside step
|
|
153
|
+
* assumes something is already there; a --binary install's FIRST run has
|
|
154
|
+
* nothing at targetPath yet, so this checks for that case and does a
|
|
155
|
+
* plain move instead of asking swapPlanFor to rename a file that does
|
|
156
|
+
* not exist. */
|
|
157
|
+
export async function installStagedBinary(stagedPath, targetPath, platform) {
|
|
158
|
+
if (platform !== 'win32') {
|
|
159
|
+
fs.chmodSync(stagedPath, 0o755);
|
|
160
|
+
}
|
|
161
|
+
const { swapPlanFor, executeSwapPlan } = await import('./self-update.js');
|
|
162
|
+
if (fs.existsSync(targetPath)) {
|
|
163
|
+
executeSwapPlan(swapPlanFor(platform, targetPath, stagedPath));
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
fs.renameSync(stagedPath, targetPath);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/** Compares two spawnSync-style results the way check-bundle-parity.mjs
|
|
170
|
+
* compares builds: same exit status, same combined stdout+stderr. No
|
|
171
|
+
* path-scrubbing normalization here -- both invocations run the exact
|
|
172
|
+
* same landed file, so unlike parity's tsc-vs-bundle-vs-binary
|
|
173
|
+
* comparison there is no cross-build path difference to normalize away
|
|
174
|
+
* in the first place. */
|
|
175
|
+
export function probesMatch(a, b) {
|
|
176
|
+
return a.status === b.status && (a.stdout + a.stderr) === (b.stdout + b.stderr);
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=binary-install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-install.js","sourceRoot":"","sources":["../../../../../src/tools/self-update/binary-install.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,wEAAwE;AACxE,kEAAkE;AAClE,wEAAwE;AACxE,yEAAyE;AACzE,qEAAqE;AACrE,uDAAuD;AACvD,EAAE;AACF,sEAAsE;AACtE,0EAA0E;AAC1E,uEAAuE;AACvE,oCAAoC;AACpC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;;;;sDAMsD;AACtD,MAAM,UAAU,gBAAgB;IAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,WAA4B,OAAO,CAAC,QAAQ;IAC5E,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AACnF,CAAC;AAWD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAOrC;IACC,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC7B,OAAO;YACL,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE,2HAA2H;SACpI,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,qBAAqB,EAAE,CAAC;QACjC,OAAO;YACL,IAAI,EAAE,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IAAI,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -2,6 +2,7 @@ import fs from 'fs';
|
|
|
2
2
|
import os from 'os';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { Log } from '../log/log.class.js';
|
|
5
|
+
import { Actions } from '../actions/actions.class.js';
|
|
5
6
|
import { cliVersion } from '../version/cli-version.js';
|
|
6
7
|
/**
|
|
7
8
|
* THE WHOLE `maka update maka` FLOW, callable from anywhere that has a
|
|
@@ -17,23 +18,33 @@ import { cliVersion } from '../version/cli-version.js';
|
|
|
17
18
|
*
|
|
18
19
|
* Returns true when an update was installed, false when already latest.
|
|
19
20
|
*/
|
|
20
|
-
export async function updateMakaCli() {
|
|
21
|
+
export async function updateMakaCli(opts = {}) {
|
|
21
22
|
const current = cliVersion();
|
|
22
|
-
const { fetchLatestRelease, updateAvailable, tagToVersion, assetNameFor, downloadAsset, sha256Hex, digestMatches, extractArchive,
|
|
23
|
+
const { fetchLatestRelease, updateAvailable, tagToVersion, assetNameFor, downloadAsset, sha256Hex, digestMatches, extractArchive, } = await import('./self-update.js');
|
|
23
24
|
Log.header(`Checking the latest maka release...`);
|
|
24
25
|
const release = await fetchLatestRelease();
|
|
25
26
|
const latest = tagToVersion(release.tag_name);
|
|
27
|
+
const { isPackaged } = await import('../sdk-loader/sdk-loader.class.js');
|
|
28
|
+
// --binary is a SWITCH OF INSTALL SHAPE, not a version bump -- it must
|
|
29
|
+
// run even when already at the latest version. The version-gate below
|
|
30
|
+
// exists to skip pointless work when there is nothing NEWER to fetch;
|
|
31
|
+
// "nothing newer" says nothing about whether this npm install should
|
|
32
|
+
// become the binary one, so --binary is checked first and bypasses it
|
|
33
|
+
// entirely. Still needs `release` (fetched above either way) to have
|
|
34
|
+
// something to install.
|
|
35
|
+
if (!isPackaged() && opts.binary) {
|
|
36
|
+
return await installBinaryOverNpmGlobal(release, latest);
|
|
37
|
+
}
|
|
26
38
|
if (!updateAvailable(current, release.tag_name)) {
|
|
27
39
|
Log.success(`maka ${current} is already the latest.`);
|
|
28
40
|
return false;
|
|
29
41
|
}
|
|
30
42
|
Log.notice(`Update available: ${current} -> ${latest}`);
|
|
31
|
-
const { isPackaged } = await import('../sdk-loader/sdk-loader.class.js');
|
|
32
43
|
if (!isPackaged()) {
|
|
33
44
|
// npm owns this install's layout (bin shims, prefix); replacing the
|
|
34
45
|
// files underneath it would leave npm's book-keeping describing a
|
|
35
46
|
// binary it no longer manages. Let npm do its own job.
|
|
36
|
-
Log.notice('This maka is installed through npm -- updating via npm.');
|
|
47
|
+
Log.notice('This maka is installed through npm -- updating via npm. Pass --binary to switch to the standalone release binary instead.');
|
|
37
48
|
const { default: spawn } = await import('cross-spawn');
|
|
38
49
|
const out = spawn.sync('npm', ['i', '-g', '@maka/maka-cli@latest'], { stdio: 'inherit' });
|
|
39
50
|
if (out.status !== 0) {
|
|
@@ -92,6 +103,7 @@ export async function updateMakaCli() {
|
|
|
92
103
|
Log.error(`The extracted binary at ${stagedBinary} is missing or implausibly small. Not installing it.`);
|
|
93
104
|
process.exit(1);
|
|
94
105
|
}
|
|
106
|
+
const { swapPlanFor, executeSwapPlan } = await import('./self-update.js');
|
|
95
107
|
executeSwapPlan(swapPlanFor(process.platform, exePath, stagedBinary));
|
|
96
108
|
try {
|
|
97
109
|
fs.rmSync(stageDir, { recursive: true, force: true });
|
|
@@ -104,4 +116,222 @@ export async function updateMakaCli() {
|
|
|
104
116
|
}
|
|
105
117
|
return true;
|
|
106
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* `maka update maka --binary` from an npm install: download the release
|
|
121
|
+
* binary and make it the machine's `maka` instead of the npm package,
|
|
122
|
+
* NEVER leaving both on PATH at once (a support-ticket factory: which one
|
|
123
|
+
* a bare `maka` resolves to would depend on shell and PATH order).
|
|
124
|
+
*
|
|
125
|
+
* SEQUENCING IS THE SAFETY PROPERTY. Every step before the npm uninstall
|
|
126
|
+
* leaves the npm install fully intact and working -- a failure or a "no"
|
|
127
|
+
* at any point stops there with nothing broken. The uninstall is the
|
|
128
|
+
* LAST verified step, only reached once the new binary is staged, on
|
|
129
|
+
* PATH, and independently proven to behave correctly stand-alone AND
|
|
130
|
+
* under self-spawn. Reuses self-update.ts's fetch/verify/extract/swap
|
|
131
|
+
* machinery unmodified -- this function is a new entry condition into
|
|
132
|
+
* it, not a second copy.
|
|
133
|
+
*/
|
|
134
|
+
async function installBinaryOverNpmGlobal(release, latestVersion) {
|
|
135
|
+
const { assetNameFor, downloadAsset, sha256Hex, digestMatches, extractArchive, } = await import('./self-update.js');
|
|
136
|
+
const { binaryInstallDir, binaryInstallPath, gatherInstallFacts, classifyGlobalInstall, installStagedBinary, buildVerificationPath, detectPosixProfile, pathExportLine, resolveOnPath, probesMatch, } = await import('./binary-install.js');
|
|
137
|
+
const { default: spawn } = await import('cross-spawn');
|
|
138
|
+
const { spawnSync } = await import('child_process');
|
|
139
|
+
// STEP 1: classify. Refuses a local (project-pinned) or LINKED (npm
|
|
140
|
+
// link / dev junction -- verified against this project's own dev
|
|
141
|
+
// machine: a Windows junction does NOT report as a symlink via
|
|
142
|
+
// fs.lstatSync().isSymbolicLink(), only a realpath comparison catches
|
|
143
|
+
// it) install before touching anything.
|
|
144
|
+
let globalNpmRoot;
|
|
145
|
+
try {
|
|
146
|
+
globalNpmRoot = spawn.sync('npm', ['root', '-g'], { encoding: 'utf8' }).stdout.trim();
|
|
147
|
+
}
|
|
148
|
+
catch (e) {
|
|
149
|
+
Log.error(`Could not determine the global npm root: ${e.message}`);
|
|
150
|
+
process.exit(1);
|
|
151
|
+
}
|
|
152
|
+
const facts = gatherInstallFacts(globalNpmRoot);
|
|
153
|
+
const check = classifyGlobalInstall(facts);
|
|
154
|
+
if (check.kind !== 'global-npm') {
|
|
155
|
+
Log.error(check.reason);
|
|
156
|
+
process.exit(1);
|
|
157
|
+
}
|
|
158
|
+
const assetName = assetNameFor(process.platform, process.arch);
|
|
159
|
+
if (!assetName) {
|
|
160
|
+
Log.error(`No prebuilt maka binary exists for ${process.platform}/${process.arch}.`);
|
|
161
|
+
Log.notice('Built targets: linux x64/arm64, macOS x64/arm64, Windows x64.');
|
|
162
|
+
process.exit(1);
|
|
163
|
+
}
|
|
164
|
+
const asset = release.assets.find(a => a.name === assetName);
|
|
165
|
+
if (!asset) {
|
|
166
|
+
Log.error(`The ${release.tag_name} release has no ${assetName} yet. Try again in a few minutes.`);
|
|
167
|
+
process.exit(1);
|
|
168
|
+
}
|
|
169
|
+
// STEP 2: download, verify, stage. npm install untouched throughout.
|
|
170
|
+
const targetDir = binaryInstallDir();
|
|
171
|
+
const targetPath = binaryInstallPath();
|
|
172
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
173
|
+
const stageDir = path.join(targetDir, '.maka-install-stage');
|
|
174
|
+
fs.rmSync(stageDir, { recursive: true, force: true });
|
|
175
|
+
fs.mkdirSync(stageDir, { recursive: true });
|
|
176
|
+
const archivePath = path.join(os.tmpdir(), assetName);
|
|
177
|
+
Log.notice(`Downloading ${assetName} (${Math.round(asset.size / 1024 / 1024)}MB)...`);
|
|
178
|
+
await downloadAsset(asset, archivePath);
|
|
179
|
+
const verdict = digestMatches(asset.digest, sha256Hex(archivePath));
|
|
180
|
+
if (verdict === false) {
|
|
181
|
+
Log.error('Checksum mismatch: the downloaded file does not match the release digest. Not installing it.');
|
|
182
|
+
process.exit(1);
|
|
183
|
+
}
|
|
184
|
+
if (verdict === null) {
|
|
185
|
+
Log.warn('The release publishes no digest for this asset; installing UNVERIFIED (downloaded over TLS from github.com).');
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
Log.notice('Checksum verified.');
|
|
189
|
+
}
|
|
190
|
+
const stagedBinary = await extractArchive(archivePath, stageDir);
|
|
191
|
+
if (!fs.existsSync(stagedBinary) || fs.statSync(stagedBinary).size < 10 * 1024 * 1024) {
|
|
192
|
+
Log.error(`The extracted binary at ${stagedBinary} is missing or implausibly small. Not installing it.`);
|
|
193
|
+
process.exit(1);
|
|
194
|
+
}
|
|
195
|
+
// STEP 3: swap into ~/.meteor/.maka/bin/. Still nothing has touched the
|
|
196
|
+
// npm install -- this only adds a second, inert maka to the machine.
|
|
197
|
+
await installStagedBinary(stagedBinary, targetPath, process.platform);
|
|
198
|
+
fs.rmSync(stageDir, { recursive: true, force: true });
|
|
199
|
+
fs.rmSync(archivePath, { force: true });
|
|
200
|
+
Log.success(`Binary staged at ${targetPath}.`);
|
|
201
|
+
// STEP 4: the PATH edit -- disclosed and confirmed, never silent. This
|
|
202
|
+
// is the single most invasive step in the whole flow (a persistent,
|
|
203
|
+
// cross-application environment change), so it gets its own explicit
|
|
204
|
+
// yes/no with the exact mechanism named up front.
|
|
205
|
+
const npmShimDir = process.platform === 'win32'
|
|
206
|
+
? spawn.sync('npm', ['prefix', '-g'], { encoding: 'utf8' }).stdout.trim()
|
|
207
|
+
: path.join(spawn.sync('npm', ['prefix', '-g'], { encoding: 'utf8' }).stdout.trim(), 'bin');
|
|
208
|
+
let pathEditApplied = false;
|
|
209
|
+
let printedManualLine;
|
|
210
|
+
if (process.platform === 'win32') {
|
|
211
|
+
const proceed = await Actions.confirm(`Add ${targetDir} to your User PATH so \`maka\` resolves to the binary? (This edits the Windows registry User environment, not just this session.)`, true);
|
|
212
|
+
if (!proceed) {
|
|
213
|
+
Log.notice('Stopped before any PATH change -- your npm install of maka is untouched.');
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
// Known, accepted PowerShell footgun: GetEnvironmentVariable('Path',
|
|
217
|
+
// 'User') expands any REG_EXPAND_SZ entries (%VAR%-style) on read, so
|
|
218
|
+
// writing $cur back flattens them to their expanded values. They stay
|
|
219
|
+
// functional -- just lose their symbolic form. Seen and accepted, not
|
|
220
|
+
// missed; a %VAR% entry surviving verbatim isn't a property this edit
|
|
221
|
+
// needs to preserve.
|
|
222
|
+
const psCommand = `$cur = [Environment]::GetEnvironmentVariable('Path', 'User'); ` +
|
|
223
|
+
`$dir = ${JSON.stringify(targetDir)}; ` +
|
|
224
|
+
`if (($cur -split ';') -notcontains $dir) { [Environment]::SetEnvironmentVariable('Path', "$dir;$cur", 'User') }`;
|
|
225
|
+
const psResult = spawnSync('powershell.exe', ['-NoProfile', '-NonInteractive', '-Command', psCommand], { encoding: 'utf8' });
|
|
226
|
+
if (psResult.status !== 0) {
|
|
227
|
+
Log.error(`Could not update the User PATH: ${psResult.stderr || 'powershell exited ' + psResult.status}`);
|
|
228
|
+
Log.notice(`Your npm install of maka is untouched. Add this to your PATH manually and re-run: ${targetDir}`);
|
|
229
|
+
process.exit(1);
|
|
230
|
+
}
|
|
231
|
+
pathEditApplied = true;
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
const profile = detectPosixProfile(process.env.SHELL, os.homedir());
|
|
235
|
+
const exportLine = profile
|
|
236
|
+
? pathExportLine(profile.shell, targetDir)
|
|
237
|
+
: pathExportLine('bash', targetDir);
|
|
238
|
+
if (profile) {
|
|
239
|
+
const proceed = await Actions.confirm(`Add this line to ${profile.profilePath}? ${exportLine}`, true);
|
|
240
|
+
if (!proceed) {
|
|
241
|
+
Log.notice('Stopped before any PATH change -- your npm install of maka is untouched.');
|
|
242
|
+
return false;
|
|
243
|
+
}
|
|
244
|
+
fs.appendFileSync(profile.profilePath, `\n# added by \`maka update maka --binary\`\n${exportLine}\n`);
|
|
245
|
+
pathEditApplied = true;
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
// $SHELL is unset or not one this can confidently name a profile
|
|
249
|
+
// for -- printing the exact line beats guessing a file the user's
|
|
250
|
+
// real shell may never read. An edit that "succeeds" against the
|
|
251
|
+
// wrong file would still pass verification (which only checks the
|
|
252
|
+
// env this process constructs), while silently doing nothing for
|
|
253
|
+
// the user's actual future shells.
|
|
254
|
+
Log.warn('Could not confidently detect your shell profile -- add this line yourself:');
|
|
255
|
+
Log.notice(` ${exportLine}`);
|
|
256
|
+
printedManualLine = exportLine;
|
|
257
|
+
const proceed = await Actions.confirm('Continue once you\'ve added it (or will shortly)?', true);
|
|
258
|
+
if (!proceed) {
|
|
259
|
+
Log.notice('Stopped -- your npm install of maka is untouched.');
|
|
260
|
+
return false;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
// STEP 5: verify against the PATH a FRESH shell will actually see, not
|
|
265
|
+
// process.env.PATH as it stands right now -- a registry/profile edit
|
|
266
|
+
// never reaches an already-running process, so checking the live
|
|
267
|
+
// env would silently pass or fail for the wrong reason (finding the
|
|
268
|
+
// npm shim pre-uninstall, or nothing post-uninstall) rather than
|
|
269
|
+
// proving what matters: does the constructed end state work.
|
|
270
|
+
const pathSeparator = path.delimiter;
|
|
271
|
+
const currentPathValue = process.env[process.platform === 'win32' ? 'Path' : 'PATH'] || process.env.PATH || '';
|
|
272
|
+
const verificationPath = buildVerificationPath({
|
|
273
|
+
currentPath: currentPathValue,
|
|
274
|
+
newBinDir: targetDir,
|
|
275
|
+
npmShimDir,
|
|
276
|
+
pathSeparator,
|
|
277
|
+
});
|
|
278
|
+
const resolved = resolveOnPath('maka', verificationPath, process.platform, pathSeparator);
|
|
279
|
+
if (!resolved || path.normalize(resolved) !== path.normalize(targetPath)) {
|
|
280
|
+
Log.error(`After the PATH edit, \`maka\` would resolve to ${resolved ?? 'nothing'}, not the new binary (${targetPath}).`);
|
|
281
|
+
Log.notice('Your npm install of maka is untouched. Not uninstalling it.');
|
|
282
|
+
process.exit(1);
|
|
283
|
+
}
|
|
284
|
+
const versionCheck = spawnSync('maka', ['--version'], {
|
|
285
|
+
encoding: 'utf8',
|
|
286
|
+
env: { ...process.env, [process.platform === 'win32' ? 'Path' : 'PATH']: verificationPath },
|
|
287
|
+
shell: process.platform === 'win32',
|
|
288
|
+
});
|
|
289
|
+
if (versionCheck.status !== 0 || !versionCheck.stdout.includes(latestVersion)) {
|
|
290
|
+
Log.error(`Post-swap verification failed: \`maka --version\` under the constructed PATH did not report ${latestVersion}.`);
|
|
291
|
+
Log.notice('Your npm install of maka is untouched. Not uninstalling it.');
|
|
292
|
+
process.exit(1);
|
|
293
|
+
}
|
|
294
|
+
Log.success('PATH resolution verified: `maka` finds the new binary.');
|
|
295
|
+
// STEP 6: the self-spawn / PKG_EXECPATH trap. A pkg binary spawning
|
|
296
|
+
// itself must decline the packager's PKG_EXECPATH injection; verify the
|
|
297
|
+
// SPAWN against the specific file that just landed here, not a
|
|
298
|
+
// reference to CI having passed this once for a different copy.
|
|
299
|
+
// Compares check-bundle-parity.mjs's own technique: same exit status,
|
|
300
|
+
// same combined stdout+stderr between a direct invocation and one
|
|
301
|
+
// reached through --self-spawn-probe.
|
|
302
|
+
const probeArgs = ['--sidequest-ui', 'no-such-launch.json'];
|
|
303
|
+
const spawnEnv = { ...process.env, NO_COLOR: '1', FORCE_COLOR: '0' };
|
|
304
|
+
const direct = spawnSync(targetPath, probeArgs, { encoding: 'utf8', env: spawnEnv, timeout: 30_000 });
|
|
305
|
+
const viaSelfSpawn = spawnSync(targetPath, ['--self-spawn-probe', ...probeArgs], { encoding: 'utf8', env: spawnEnv, timeout: 30_000 });
|
|
306
|
+
if (!probesMatch({ status: direct.status, stdout: direct.stdout, stderr: direct.stderr }, { status: viaSelfSpawn.status, stdout: viaSelfSpawn.stdout, stderr: viaSelfSpawn.stderr })) {
|
|
307
|
+
Log.error('Self-spawn parity failed: the newly installed binary behaves differently when it spawns itself than when invoked directly.');
|
|
308
|
+
Log.notice('Your npm install of maka is untouched. Not uninstalling it.');
|
|
309
|
+
process.exit(1);
|
|
310
|
+
}
|
|
311
|
+
Log.success('Self-spawn parity verified.');
|
|
312
|
+
// STEP 7: only now -- everything above proved the binary works, is on
|
|
313
|
+
// PATH, and survives spawning itself. Last step, and the only
|
|
314
|
+
// destructive one.
|
|
315
|
+
Log.notice('Removing the npm install of maka...');
|
|
316
|
+
const uninstall = spawn.sync('npm', ['uninstall', '-g', '@maka/maka-cli'], { stdio: 'inherit' });
|
|
317
|
+
if (uninstall.status !== 0) {
|
|
318
|
+
Log.error(`npm uninstall exited ${uninstall.status} -- the binary is installed and verified, but the old npm package is still present. Remove it manually: npm uninstall -g @maka/maka-cli`);
|
|
319
|
+
process.exit(1);
|
|
320
|
+
}
|
|
321
|
+
// Same version on both sides reads as a typo ("5.85.0 -> 5.85.0") rather
|
|
322
|
+
// than what actually happened -- --binary runs even with nothing newer
|
|
323
|
+
// to fetch (see updateMakaCli()), so this is the expected shape for
|
|
324
|
+
// anyone switching shape without also chasing a version bump.
|
|
325
|
+
const startingVersion = cliVersion();
|
|
326
|
+
Log.success(startingVersion === latestVersion
|
|
327
|
+
? `maka switched to the binary distribution at ${latestVersion}, installed at ${targetPath}.`
|
|
328
|
+
: `maka switched to the binary distribution: ${startingVersion} -> ${latestVersion}, installed at ${targetPath}.`);
|
|
329
|
+
if (!pathEditApplied) {
|
|
330
|
+
Log.notice(`Reminder: add this to your PATH before your next shell: ${printedManualLine}`);
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
Log.notice('Open shells still see the old PATH -- close and reopen your terminal (or start a new shell) to pick up the change.');
|
|
334
|
+
}
|
|
335
|
+
return true;
|
|
336
|
+
}
|
|
107
337
|
//# sourceMappingURL=update-maka.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-maka.js","sourceRoot":"","sources":["../../../../../src/tools/self-update/update-maka.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,MAAM,OAAO,GAAG,UAAU,EAA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E,CAAC;QACrB,GAAG,CAAC,MAAM,CAAC,2DAA2D,iBAAiB,EAAE,CAAC,CAAC;IAC7F,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,MAAM,CAAC,oHAAoH,CAAC,CAAC;IACnI,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maka/maka-cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.87.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"summary": "A command line tool for scaffolding Meteor 2.x applications using either React.",
|
|
6
6
|
"description": "A command line tool for scaffolding Meteor 2.x applications using React.",
|