@bitmagic/cli 0.1.46-dev.2 → 0.1.46-dev.4
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/README.md +46 -0
- package/dist/auth/session.js +1 -1
- package/dist/auth/session.js.map +1 -1
- package/dist/auth/subscribe-flow.d.ts +30 -6
- package/dist/auth/subscribe-flow.js +64 -29
- package/dist/auth/subscribe-flow.js.map +1 -1
- package/dist/bin.js +6 -2
- package/dist/bin.js.map +1 -1
- package/dist/cli.d.ts +43 -2
- package/dist/cli.js +78 -7
- package/dist/cli.js.map +1 -1
- package/dist/commands/dev.js +9 -0
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/forge.js +1 -1
- package/dist/commands/forge.js.map +1 -1
- package/dist/commands/generate.js +9 -1
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.js +6 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/login.js +15 -11
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/reset-account.d.ts +103 -0
- package/dist/commands/reset-account.js +227 -0
- package/dist/commands/reset-account.js.map +1 -0
- package/dist/commands/subscribe.d.ts +13 -1
- package/dist/commands/subscribe.js +21 -17
- package/dist/commands/subscribe.js.map +1 -1
- package/dist/commands/upgrade.d.ts +2 -1
- package/dist/commands/upgrade.js +12 -5
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/config/environments.d.ts +14 -0
- package/dist/config/environments.js +22 -0
- package/dist/config/environments.js.map +1 -1
- package/dist/errors.d.ts +10 -1
- package/dist/errors.js +11 -1
- package/dist/errors.js.map +1 -1
- package/dist/forge/run-pipeline.js +1 -1
- package/dist/forge/run-pipeline.js.map +1 -1
- package/dist/forge/stream.js +10 -5
- package/dist/forge/stream.js.map +1 -1
- package/dist/forge/upload-proxy.js +2 -0
- package/dist/forge/upload-proxy.js.map +1 -1
- package/dist/generate/stream.js +10 -5
- package/dist/generate/stream.js.map +1 -1
- package/dist/http/client.d.ts +6 -2
- package/dist/http/client.js +22 -12
- package/dist/http/client.js.map +1 -1
- package/dist/http/spark-refusal.d.ts +11 -0
- package/dist/http/spark-refusal.js +13 -0
- package/dist/http/spark-refusal.js.map +1 -1
- package/dist/publish/client.js +3 -1
- package/dist/publish/client.js.map +1 -1
- package/dist/scaffold/agents-md.d.ts +2 -1
- package/dist/scaffold/agents-md.js +7 -2
- package/dist/scaffold/agents-md.js.map +1 -1
- package/dist/scaffold/engine-download.js +5 -18
- package/dist/scaffold/engine-download.js.map +1 -1
- package/dist/scaffold/project-files.d.ts +3 -2
- package/dist/scaffold/project-files.js +46 -2
- package/dist/scaffold/project-files.js.map +1 -1
- package/dist/scaffold/project.d.ts +30 -0
- package/dist/scaffold/project.js +55 -29
- package/dist/scaffold/project.js.map +1 -1
- package/dist/scaffold/upgrade-project.js +19 -33
- package/dist/scaffold/upgrade-project.js.map +1 -1
- package/dist/telemetry/command-context.d.ts +73 -0
- package/dist/telemetry/command-context.js +114 -0
- package/dist/telemetry/command-context.js.map +1 -0
- package/dist/telemetry/report.d.ts +43 -0
- package/dist/telemetry/report.js +123 -0
- package/dist/telemetry/report.js.map +1 -0
- package/dist/telemetry/request-headers.d.ts +14 -0
- package/dist/telemetry/request-headers.js +48 -0
- package/dist/telemetry/request-headers.js.map +1 -0
- package/dist/update/check.d.ts +14 -0
- package/dist/update/check.js +17 -1
- package/dist/update/check.js.map +1 -1
- package/dist/update/notice.d.ts +40 -0
- package/dist/update/notice.js +53 -0
- package/dist/update/notice.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The command beacon: one `POST /api/cli/v1/events` per command, saying how it went.
|
|
3
|
+
*
|
|
4
|
+
* Why it exists: api-server can see the commands that call it — but `dev`,
|
|
5
|
+
* `build`, `check`, `verify` and `reload` are offline by design, and even a
|
|
6
|
+
* `publish` that fails on a stale verify never reaches the server. This is how
|
|
7
|
+
* every command becomes visible, and how the ones the server does see get an
|
|
8
|
+
* end-to-end outcome and duration to go with the server's own event. The
|
|
9
|
+
* server turns it into `cli_command` / `cli_command_started` (see
|
|
10
|
+
* `api-server/src/cli/cli-analytics.ts`); nothing goes to Google from here.
|
|
11
|
+
*
|
|
12
|
+
* Contract, in order of importance:
|
|
13
|
+
*
|
|
14
|
+
* 1. It never fails or delays a command. Every failure path — not logged in,
|
|
15
|
+
* no network, a slow server, a bad `--env` — returns silently. It is
|
|
16
|
+
* bounded to {@link REPORT_TIMEOUT_MS} per request so a finished command is
|
|
17
|
+
* never held open by a sulking network (the same reasoning as
|
|
18
|
+
* update/check.ts). It never prints.
|
|
19
|
+
* 2. It sends categories, never messages: the command name, ok/failed, the
|
|
20
|
+
* exit code, a `CliError.code`, and a duration. A message can name a path
|
|
21
|
+
* or a game; none of that belongs in an analytics event.
|
|
22
|
+
* 3. It is authenticated with the creator's own token, so the server can key
|
|
23
|
+
* the event to the account and look up their real Pro state. No token, no
|
|
24
|
+
* report — an anonymous beacon would be a spammable endpoint for nothing.
|
|
25
|
+
* 4. `DO_NOT_TRACK=1` (the cross-tool convention, consoledonottrack.com)
|
|
26
|
+
* turns it off. It does not touch the ordinary api-server calls a command
|
|
27
|
+
* makes — those are the command's work, and the server logs them anyway.
|
|
28
|
+
*/
|
|
29
|
+
import { resolveAuth0ClientId } from '../config/environments.js';
|
|
30
|
+
import { getAccessToken } from '../auth/session.js';
|
|
31
|
+
import { apiServerHeaders } from './request-headers.js';
|
|
32
|
+
import { currentCommand, isTelemetryDisabled } from './command-context.js';
|
|
33
|
+
// Re-exported because this is where the opt-out is enforced for a report that is already
|
|
34
|
+
// under way; `beginCommand` consults the same predicate to skip collecting anything at all.
|
|
35
|
+
export { isTelemetryDisabled };
|
|
36
|
+
/**
|
|
37
|
+
* Cap on each request the report makes (the token refresh, when one is due, and
|
|
38
|
+
* the POST itself). A pending fetch keeps Node alive, so an unbounded one would
|
|
39
|
+
* hold a finished command open for as long as the network sulks.
|
|
40
|
+
*/
|
|
41
|
+
export const REPORT_TIMEOUT_MS = 1500;
|
|
42
|
+
export const CLI_EVENTS_PATH = '/api/cli/v1/events';
|
|
43
|
+
/**
|
|
44
|
+
* The failure category for an error that is not a CliError — a genuine bug, not
|
|
45
|
+
* a refusal we wrote a message for. `crash:TypeError`, `crash:RangeError`: the
|
|
46
|
+
* error's class, which says what kind of bug without saying anything about the
|
|
47
|
+
* creator's machine. Anything odd in the name is folded to `_` so the value
|
|
48
|
+
* always fits the shape api-server accepts.
|
|
49
|
+
*/
|
|
50
|
+
export function crashCategory(error) {
|
|
51
|
+
const name = error instanceof Error && error.name ? error.name : 'unknown';
|
|
52
|
+
return `crash:${name.replace(/[^A-Za-z0-9_.-]/g, '_').slice(0, 40)}`;
|
|
53
|
+
}
|
|
54
|
+
/** The given fetch, with every call bounded by REPORT_TIMEOUT_MS. */
|
|
55
|
+
function boundedFetch(fetchImpl) {
|
|
56
|
+
return (input, init) => fetchImpl(input, { ...init, signal: AbortSignal.timeout(REPORT_TIMEOUT_MS) });
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The token to authenticate the report with, or null for "no report".
|
|
60
|
+
*
|
|
61
|
+
* The stored token first — refreshed if it has expired, exactly as any command
|
|
62
|
+
* would, so a report never wastes a request on a 401 — and failing that the
|
|
63
|
+
* snapshot taken when the command began, which is what `logout` leaves behind.
|
|
64
|
+
*/
|
|
65
|
+
async function resolveReportToken(environment, command, deps) {
|
|
66
|
+
try {
|
|
67
|
+
const clientId = resolveAuth0ClientId(environment, deps.env);
|
|
68
|
+
return await getAccessToken(environment, clientId, {
|
|
69
|
+
fetch: boundedFetch(deps.fetch),
|
|
70
|
+
sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
|
|
71
|
+
now: deps.now,
|
|
72
|
+
}, deps.baseDir);
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
const snapshot = command.tokenSnapshot;
|
|
76
|
+
const now = (deps.now ?? Date.now)();
|
|
77
|
+
return snapshot !== null && snapshot.expiresAt > now ? snapshot.accessToken : null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function defaultDeps() {
|
|
81
|
+
return { fetch: globalThis.fetch, env: process.env };
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Report the running command's `report` to api-server. Resolves when the report
|
|
85
|
+
* has been sent, refused, or given up on — always, and never by throwing.
|
|
86
|
+
*
|
|
87
|
+
* Callers `await` it (bounded, see above) rather than fire and forget: on the
|
|
88
|
+
* failure path cli.ts calls `process.exit` next, which would otherwise cut the
|
|
89
|
+
* request off mid-flight, and on the success path the pending fetch would keep
|
|
90
|
+
* the process alive for the same time either way.
|
|
91
|
+
*/
|
|
92
|
+
export async function reportCommandEvent(report, deps = defaultDeps()) {
|
|
93
|
+
try {
|
|
94
|
+
if (isTelemetryDisabled(deps.env))
|
|
95
|
+
return;
|
|
96
|
+
const command = currentCommand();
|
|
97
|
+
if (command === null)
|
|
98
|
+
return;
|
|
99
|
+
// Resolved once, at command start — see CommandContext.environment for why
|
|
100
|
+
// this must not resolve again. Null means it could not be resolved at all,
|
|
101
|
+
// so there is nowhere to send this.
|
|
102
|
+
const environment = command.environment;
|
|
103
|
+
if (environment === null)
|
|
104
|
+
return;
|
|
105
|
+
const token = await resolveReportToken(environment, command, deps);
|
|
106
|
+
if (token === null)
|
|
107
|
+
return;
|
|
108
|
+
await boundedFetch(deps.fetch)(`${environment.apiUrl}${CLI_EVENTS_PATH}`, {
|
|
109
|
+
method: 'POST',
|
|
110
|
+
headers: {
|
|
111
|
+
...apiServerHeaders(),
|
|
112
|
+
Authorization: `Bearer ${token}`,
|
|
113
|
+
'Content-Type': 'application/json',
|
|
114
|
+
},
|
|
115
|
+
body: JSON.stringify({ command: command.name, ...report }),
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
// Best-effort by design — see the module header. Whatever went wrong here,
|
|
120
|
+
// the command's own outcome has already been decided and printed.
|
|
121
|
+
}
|
|
122
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QACxC,IAAI,WAAW,KAAK,IAAI;YAAE,OAAO;QAEjC,MAAM,KAAK,GAAG,MAAM,kBAAkB,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QACnE,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO;QAE3B,MAAM,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,WAAW,CAAC,MAAM,GAAG,eAAe,EAAE,EAAE;YACxE,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,GAAG,gBAAgB,EAAE;gBACrB,aAAa,EAAE,UAAU,KAAK,EAAE;gBAChC,cAAc,EAAE,kBAAkB;aACnC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC;SAC3D,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,2EAA2E;QAC3E,kEAAkE;IACpE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const CLI_COMMAND_HEADER = "X-Bitmagic-Cli-Command";
|
|
2
|
+
export declare const CLI_DRIVER_HEADER = "X-Bitmagic-Cli-Driver";
|
|
3
|
+
/** `bitmagic-cli/0.1.46 (darwin-arm64; node/v22.12.0)` — the shape api-server's context reader parses. */
|
|
4
|
+
export declare function userAgent(): string;
|
|
5
|
+
/**
|
|
6
|
+
* Spread these into the `headers` of every fetch aimed at api-server. Callers
|
|
7
|
+
* add their own `Authorization`, `Accept` and `Content-Type` after — nothing
|
|
8
|
+
* here collides with those.
|
|
9
|
+
*
|
|
10
|
+
* The command headers are present only once cli.ts has begun a command; a
|
|
11
|
+
* module exercised directly (a test, a future library caller) still identifies
|
|
12
|
+
* the CLI, just not the command.
|
|
13
|
+
*/
|
|
14
|
+
export declare function apiServerHeaders(): Record<string, string>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The headers every api-server call carries, so the server's analytics know who
|
|
3
|
+
* asked and why.
|
|
4
|
+
*
|
|
5
|
+
* The CLI never sends analytics to Google itself — the GA4 Measurement Protocol
|
|
6
|
+
* needs an API secret, and a public npm package cannot keep one. api-server
|
|
7
|
+
* emits every event instead (`api-server/src/cli/cli-analytics.ts` reads these
|
|
8
|
+
* headers back as `cli_version`, `cli_platform`, `cli_node`, `cli_command` and
|
|
9
|
+
* `cli_driver`). That is what lets a `cli_asset_generated` event tell `generate
|
|
10
|
+
* image` from `cover`, which share a route, and a `publish` from a `forge`,
|
|
11
|
+
* which share the signed-URL route.
|
|
12
|
+
*
|
|
13
|
+
* Only for api-server. GCS signed URLs and the npm registry get nothing from
|
|
14
|
+
* here — a signed PUT can refuse headers it did not sign for, and neither has
|
|
15
|
+
* any use for them.
|
|
16
|
+
*/
|
|
17
|
+
import { currentCliVersion } from '../update/cli-version.js';
|
|
18
|
+
import { currentCommand } from './command-context.js';
|
|
19
|
+
export const CLI_COMMAND_HEADER = 'X-Bitmagic-Cli-Command';
|
|
20
|
+
export const CLI_DRIVER_HEADER = 'X-Bitmagic-Cli-Driver';
|
|
21
|
+
let cachedUserAgent = null;
|
|
22
|
+
/** `bitmagic-cli/0.1.46 (darwin-arm64; node/v22.12.0)` — the shape api-server's context reader parses. */
|
|
23
|
+
export function userAgent() {
|
|
24
|
+
if (cachedUserAgent === null) {
|
|
25
|
+
const version = currentCliVersion() || 'unknown';
|
|
26
|
+
cachedUserAgent = `bitmagic-cli/${version} (${process.platform}-${process.arch}; node/${process.version})`;
|
|
27
|
+
}
|
|
28
|
+
return cachedUserAgent;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Spread these into the `headers` of every fetch aimed at api-server. Callers
|
|
32
|
+
* add their own `Authorization`, `Accept` and `Content-Type` after — nothing
|
|
33
|
+
* here collides with those.
|
|
34
|
+
*
|
|
35
|
+
* The command headers are present only once cli.ts has begun a command; a
|
|
36
|
+
* module exercised directly (a test, a future library caller) still identifies
|
|
37
|
+
* the CLI, just not the command.
|
|
38
|
+
*/
|
|
39
|
+
export function apiServerHeaders() {
|
|
40
|
+
const headers = { 'User-Agent': userAgent() };
|
|
41
|
+
const command = currentCommand();
|
|
42
|
+
if (command) {
|
|
43
|
+
headers[CLI_COMMAND_HEADER] = command.name;
|
|
44
|
+
headers[CLI_DRIVER_HEADER] = command.driver;
|
|
45
|
+
}
|
|
46
|
+
return headers;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=request-headers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-headers.js","sourceRoot":"","sources":["../../src/telemetry/request-headers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,CAAC,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;AAC3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;AAEzD,IAAI,eAAe,GAAkB,IAAI,CAAC;AAE1C,0GAA0G;AAC1G,MAAM,UAAU,SAAS;IACvB,IAAI,eAAe,KAAK,IAAI,EAAE,CAAC;QAC7B,MAAM,OAAO,GAAG,iBAAiB,EAAE,IAAI,SAAS,CAAC;QACjD,eAAe,GAAG,gBAAgB,OAAO,KAAK,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,UAAU,OAAO,CAAC,OAAO,GAAG,CAAC;IAC7G,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB;IAC9B,MAAM,OAAO,GAA2B,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,CAAC;IACtE,MAAM,OAAO,GAAG,cAAc,EAAE,CAAC;IACjC,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;QAC3C,OAAO,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9C,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/update/check.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { EnvironmentName } from '../config/environments.js';
|
|
1
2
|
import { type UpdateCheckCache, type UpdateTag } from './notice.js';
|
|
2
3
|
export declare function updateCachePath(baseDir?: string): string;
|
|
3
4
|
/**
|
|
@@ -24,6 +25,19 @@ export declare function fetchTagVersion(tag: UpdateTag, fetchImpl?: typeof globa
|
|
|
24
25
|
* every command wait on npm to be told something it could just as well be told tomorrow.
|
|
25
26
|
*/
|
|
26
27
|
export declare function pendingUpdateNotice(currentVersion: string, baseDir?: string): string | null;
|
|
28
|
+
/**
|
|
29
|
+
* The single line bin.ts prints before a command runs — at most one install command, ever.
|
|
30
|
+
*
|
|
31
|
+
* The wrong-line notice wins over the newer-version one, and suppresses it. Both at once would
|
|
32
|
+
* print two different `npm i -g` commands in the same breath ("update to 0.1.45 on your line" next
|
|
33
|
+
* to "be on the other line"), which is the ambiguity this exists to end: a creator standing in a
|
|
34
|
+
* project should never have to choose which one they meant.
|
|
35
|
+
*
|
|
36
|
+
* `projectEnvironment` is the project's committed pin, or undefined outside a project and for one
|
|
37
|
+
* that has none. Undefined leaves the old behaviour exactly as it was: nothing here invents a line
|
|
38
|
+
* for a directory that never claimed one.
|
|
39
|
+
*/
|
|
40
|
+
export declare function startupNotice(currentVersion: string, projectEnvironment: EnvironmentName | undefined, baseDir?: string): string | null;
|
|
27
41
|
/**
|
|
28
42
|
* Refresh the cache if it is stale. Fire-and-forget: callers must not await this.
|
|
29
43
|
*
|
package/dist/update/check.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as fs from 'fs';
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
import { defaultBaseDir } from '../config/credentials.js';
|
|
4
|
-
import { cliUpdateNotice, isCacheStale, updateTagFor, } from './notice.js';
|
|
4
|
+
import { cliLineMismatchNotice, cliUpdateNotice, isCacheStale, updateTagFor, } from './notice.js';
|
|
5
5
|
/** Public registry metadata, one document per dist-tag. No auth, no scope needed. */
|
|
6
6
|
const NPM_PACKAGE_URL = 'https://registry.npmjs.org/@bitmagic/cli';
|
|
7
7
|
/**
|
|
@@ -90,6 +90,22 @@ export function pendingUpdateNotice(currentVersion, baseDir) {
|
|
|
90
90
|
return null;
|
|
91
91
|
return cliUpdateNotice(currentVersion, cache.latest);
|
|
92
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* The single line bin.ts prints before a command runs — at most one install command, ever.
|
|
95
|
+
*
|
|
96
|
+
* The wrong-line notice wins over the newer-version one, and suppresses it. Both at once would
|
|
97
|
+
* print two different `npm i -g` commands in the same breath ("update to 0.1.45 on your line" next
|
|
98
|
+
* to "be on the other line"), which is the ambiguity this exists to end: a creator standing in a
|
|
99
|
+
* project should never have to choose which one they meant.
|
|
100
|
+
*
|
|
101
|
+
* `projectEnvironment` is the project's committed pin, or undefined outside a project and for one
|
|
102
|
+
* that has none. Undefined leaves the old behaviour exactly as it was: nothing here invents a line
|
|
103
|
+
* for a directory that never claimed one.
|
|
104
|
+
*/
|
|
105
|
+
export function startupNotice(currentVersion, projectEnvironment, baseDir) {
|
|
106
|
+
const mismatch = projectEnvironment === undefined ? null : cliLineMismatchNotice(currentVersion, projectEnvironment);
|
|
107
|
+
return mismatch ?? pendingUpdateNotice(currentVersion, baseDir);
|
|
108
|
+
}
|
|
93
109
|
/**
|
|
94
110
|
* Refresh the cache if it is stale. Fire-and-forget: callers must not await this.
|
|
95
111
|
*
|
package/dist/update/check.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/update/check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IA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wC;IACxC,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC;AAC7D,CAAC"}
|
package/dist/update/notice.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { EnvironmentName } from '../config/environments.js';
|
|
1
2
|
/** Which published line a build came from: a prerelease was installed from `@bitmagic/cli@dev`. */
|
|
2
3
|
export type UpdateTag = 'latest' | 'dev';
|
|
3
4
|
/**
|
|
@@ -11,6 +12,32 @@ export type UpdateTag = 'latest' | 'dev';
|
|
|
11
12
|
export declare function updateTagFor(version: string): UpdateTag;
|
|
12
13
|
/** How to install the line a build is already on, so a nudge never moves someone between lines. */
|
|
13
14
|
export declare function installCommandFor(tag: UpdateTag): string;
|
|
15
|
+
/**
|
|
16
|
+
* What to call a line in a sentence.
|
|
17
|
+
*
|
|
18
|
+
* The dev line says "prerelease" out loud because the only place this is used asks someone to
|
|
19
|
+
* install it, and portal/src/cli-install.ts is right that putting an untested build on the machine
|
|
20
|
+
* of someone who never opted into testing is the worse failure. Being asked to cross lines is
|
|
21
|
+
* legitimate — the project's environment is what wants it — but nobody should cross without knowing
|
|
22
|
+
* which side they are landing on.
|
|
23
|
+
*/
|
|
24
|
+
export declare function describeUpdateTag(tag: UpdateTag): string;
|
|
25
|
+
/**
|
|
26
|
+
* Which line a PROJECT's CLI should come from — the one answer to "dev or prod?" for anyone
|
|
27
|
+
* standing in a project directory, and the reason nobody should ever be asked.
|
|
28
|
+
*
|
|
29
|
+
* The project decides because the project is where the mismatch bites: new `/api/cli/v1` endpoints
|
|
30
|
+
* reach the dev api-server before production, so a prerelease run against `prod` calls endpoints
|
|
31
|
+
* that are not there yet, and a release run against `dev` is behind the engine that environment
|
|
32
|
+
* serves. `local` sits with `dev` — a localhost api-server is built from the same `main` a
|
|
33
|
+
* prerelease is cut from, so it is ahead of the release by construction.
|
|
34
|
+
*
|
|
35
|
+
* Note this is NOT `updateTagFor` applied to something else: that reads a version string and
|
|
36
|
+
* answers "which line is this build ON", which is a fact about the install. This answers "which
|
|
37
|
+
* line SHOULD it be on here", which is a fact about the project. The two disagreeing is exactly
|
|
38
|
+
* what `cliLineMismatchNotice` reports.
|
|
39
|
+
*/
|
|
40
|
+
export declare function updateTagForEnvironment(environment: EnvironmentName): UpdateTag;
|
|
14
41
|
/**
|
|
15
42
|
* How stale a cached npm answer may be before it is refreshed.
|
|
16
43
|
*
|
|
@@ -46,3 +73,16 @@ export declare function isCacheStale(cache: UpdateCheckCache | null, now: number
|
|
|
46
73
|
* 0.1.46-dev.3 to "update" to the older 0.1.45 release.
|
|
47
74
|
*/
|
|
48
75
|
export declare function cliUpdateNotice(currentVersion: string, latestVersion: string | null | undefined): string | null;
|
|
76
|
+
/**
|
|
77
|
+
* The line to say when the CLI running inside a project came from the other one.
|
|
78
|
+
*
|
|
79
|
+
* This is the one place the two lines are deliberately crossed, and it needs no version comparison
|
|
80
|
+
* to do it: whatever the numbers say, a project pinned to `dev` wants the dev line and a project
|
|
81
|
+
* pinned to `prod` wants the release. Version-driven nudges structurally cannot report this — a
|
|
82
|
+
* prerelease sitting in a `prod` project is *ahead* of the release tag, so `cliUpdateNotice` is
|
|
83
|
+
* correctly silent about a CLI that is on the wrong line entirely.
|
|
84
|
+
*
|
|
85
|
+
* `projectEnvironment` must be a project's committed pin, never a resolved environment: a one-off
|
|
86
|
+
* `--env` is a statement about this command, not about which CLI belongs in this directory.
|
|
87
|
+
*/
|
|
88
|
+
export declare function cliLineMismatchNotice(currentVersion: string, projectEnvironment: EnvironmentName): string | null;
|
package/dist/update/notice.js
CHANGED
|
@@ -14,6 +14,36 @@ export function updateTagFor(version) {
|
|
|
14
14
|
export function installCommandFor(tag) {
|
|
15
15
|
return tag === 'dev' ? 'npm i -g @bitmagic/cli@dev' : 'npm i -g @bitmagic/cli';
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* What to call a line in a sentence.
|
|
19
|
+
*
|
|
20
|
+
* The dev line says "prerelease" out loud because the only place this is used asks someone to
|
|
21
|
+
* install it, and portal/src/cli-install.ts is right that putting an untested build on the machine
|
|
22
|
+
* of someone who never opted into testing is the worse failure. Being asked to cross lines is
|
|
23
|
+
* legitimate — the project's environment is what wants it — but nobody should cross without knowing
|
|
24
|
+
* which side they are landing on.
|
|
25
|
+
*/
|
|
26
|
+
export function describeUpdateTag(tag) {
|
|
27
|
+
return tag === 'dev' ? 'dev (prerelease)' : 'release';
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Which line a PROJECT's CLI should come from — the one answer to "dev or prod?" for anyone
|
|
31
|
+
* standing in a project directory, and the reason nobody should ever be asked.
|
|
32
|
+
*
|
|
33
|
+
* The project decides because the project is where the mismatch bites: new `/api/cli/v1` endpoints
|
|
34
|
+
* reach the dev api-server before production, so a prerelease run against `prod` calls endpoints
|
|
35
|
+
* that are not there yet, and a release run against `dev` is behind the engine that environment
|
|
36
|
+
* serves. `local` sits with `dev` — a localhost api-server is built from the same `main` a
|
|
37
|
+
* prerelease is cut from, so it is ahead of the release by construction.
|
|
38
|
+
*
|
|
39
|
+
* Note this is NOT `updateTagFor` applied to something else: that reads a version string and
|
|
40
|
+
* answers "which line is this build ON", which is a fact about the install. This answers "which
|
|
41
|
+
* line SHOULD it be on here", which is a fact about the project. The two disagreeing is exactly
|
|
42
|
+
* what `cliLineMismatchNotice` reports.
|
|
43
|
+
*/
|
|
44
|
+
export function updateTagForEnvironment(environment) {
|
|
45
|
+
return environment === 'prod' ? 'latest' : 'dev';
|
|
46
|
+
}
|
|
17
47
|
/**
|
|
18
48
|
* How stale a cached npm answer may be before it is refreshed.
|
|
19
49
|
*
|
|
@@ -52,4 +82,27 @@ export function cliUpdateNotice(currentVersion, latestVersion) {
|
|
|
52
82
|
const install = installCommandFor(updateTagFor(currentVersion));
|
|
53
83
|
return `A newer bitmagic CLI is available: ${latestVersion} (you have ${currentVersion}). Run \`${install}\` to update.`;
|
|
54
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* The line to say when the CLI running inside a project came from the other one.
|
|
87
|
+
*
|
|
88
|
+
* This is the one place the two lines are deliberately crossed, and it needs no version comparison
|
|
89
|
+
* to do it: whatever the numbers say, a project pinned to `dev` wants the dev line and a project
|
|
90
|
+
* pinned to `prod` wants the release. Version-driven nudges structurally cannot report this — a
|
|
91
|
+
* prerelease sitting in a `prod` project is *ahead* of the release tag, so `cliUpdateNotice` is
|
|
92
|
+
* correctly silent about a CLI that is on the wrong line entirely.
|
|
93
|
+
*
|
|
94
|
+
* `projectEnvironment` must be a project's committed pin, never a resolved environment: a one-off
|
|
95
|
+
* `--env` is a statement about this command, not about which CLI belongs in this directory.
|
|
96
|
+
*/
|
|
97
|
+
export function cliLineMismatchNotice(currentVersion, projectEnvironment) {
|
|
98
|
+
if (typeof currentVersion !== 'string' || currentVersion === '')
|
|
99
|
+
return null;
|
|
100
|
+
const wanted = updateTagForEnvironment(projectEnvironment);
|
|
101
|
+
const installed = updateTagFor(currentVersion);
|
|
102
|
+
if (installed === wanted)
|
|
103
|
+
return null;
|
|
104
|
+
return (`This project is on the ${projectEnvironment} environment, so its CLI comes from the ` +
|
|
105
|
+
`${describeUpdateTag(wanted)} line — but you are running a ${describeUpdateTag(installed)} ` +
|
|
106
|
+
`build (${currentVersion}). Run \`${installCommandFor(wanted)}\`.`);
|
|
107
|
+
}
|
|
55
108
|
//# sourceMappingURL=notice.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notice.js","sourceRoot":"","sources":["../../src/update/notice.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notice.js","sourceRoot":"","sources":["../../src/update/notice.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAKrE;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,OAAO,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,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IAAI,CAAC;IAC9E,8FAA8F;IAC9F,MAAM,OAAO,GAAG,iBAAiB,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC;IAChE,OAAO,sCAAsC,aAAa,cAAc,cAAc,YAAY,OAAO,eAAe,CAAC;AAC3H,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,qBAAqB,CACnC,cAAsB,EACtB,kBAAmC;IAEnC,IAAI,OAAO,cAAc,KAAK,QAAQ,IAAI,cAAc,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IAC7E,MAAM,MAAM,GAAG,uBAAuB,CAAC,kBAAkB,CAAC,CAAC;IAC3D,MAAM,SAAS,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC;IAC/C,IAAI,SAAS,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IACtC,OAAO,CACL,0BAA0B,kBAAkB,0CAA0C;QACtF,GAAG,iBAAiB,CAAC,MAAM,CAAC,iCAAiC,iBAAiB,CAAC,SAAS,CAAC,GAAG;QAC5F,UAAU,cAAc,YAAY,iBAAiB,CAAC,MAAM,CAAC,KAAK,CACnE,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitmagic/cli",
|
|
3
|
-
"version": "0.1.46-dev.
|
|
3
|
+
"version": "0.1.46-dev.4",
|
|
4
4
|
"description": "Build Bitmagic games from your own agent tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Bitmagic Oy",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"fflate": "^0.8.2",
|
|
24
24
|
"playwright-core": "^1.59.1",
|
|
25
25
|
"tar": "^7.4.3",
|
|
26
|
-
"@bitmagic/animation-forger": "0.1.1-dev.
|
|
27
|
-
"@bitmagic/asset-core": "0.2.1-dev.
|
|
28
|
-
"@bitmagic/world-forger": "0.1.6-dev.
|
|
26
|
+
"@bitmagic/animation-forger": "0.1.1-dev.2",
|
|
27
|
+
"@bitmagic/asset-core": "0.2.1-dev.2",
|
|
28
|
+
"@bitmagic/world-forger": "0.1.6-dev.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@eslint/js": "^9.38.0",
|