@hypersoniclabs/helix-cli 0.1.24-helix3.450 → 0.1.24-helix3.452
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 +5 -5
- package/dist/config.d.ts +1 -1
- package/dist/config.js +30 -34
- package/dist/config.js.map +1 -1
- package/dist/earlyAccessNotice.d.ts +9 -0
- package/dist/earlyAccessNotice.js +63 -0
- package/dist/earlyAccessNotice.js.map +1 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/lib.js +1 -1
- package/dist/lib.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_abs.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_audio.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_engine.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_expression.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_jbeam.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_materials.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_stock_events.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/fmod_studio.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/fsb5.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/sim_audio.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_ac.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_beamng.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_fixtures.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/test_beamng_engine.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/test_sim_audio.cpython-312.pyc +0 -0
package/README.md
CHANGED
|
@@ -26,11 +26,11 @@ The token is stored in `~/.helix/credentials.json` (mode `600`). It's sent as
|
|
|
26
26
|
`Authorization: Bearer <token>` on publish calls. `helix login` validates it against
|
|
27
27
|
`GET /api/v1/users/me` before saving and reads the token's `exp` so the CLI knows when it lapses.
|
|
28
28
|
|
|
29
|
-
> **The backend & website default to
|
|
30
|
-
>
|
|
31
|
-
>
|
|
32
|
-
>
|
|
33
|
-
>
|
|
29
|
+
> **The backend & website default to production:** the published `@hypersoniclabs/*` CLI (built from `helix3`,
|
|
30
|
+
> see [docs/npm-publishing.md](docs/npm-publishing.md)) targets `https://api.helixgame.com` and
|
|
31
|
+
> `https://helixgame.com`. The former helix3 hosts (`helix-backend-api-helix3.up.railway.app`, `new.helixgame.com`)
|
|
32
|
+
> are the same environment, so a login saved under them keeps working without logging in again. The retired
|
|
33
|
+
> `@helix3/*` CLI resolves to production too; `@helixdev/*` targets staging.
|
|
34
34
|
> Override per run with `--api-url`/`HELIX_API_URL` and `--web-url`/`HELIX_WEB_URL` (e.g. a local/dev backend).
|
|
35
35
|
|
|
36
36
|
## Commands
|
package/dist/config.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type CliCredentials = {
|
|
|
5
5
|
username: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const CONFIG_DIR: string;
|
|
8
|
-
type HelixEnvName = 'staging' | '
|
|
8
|
+
type HelixEnvName = 'staging' | 'production';
|
|
9
9
|
export declare function resolveEnvironment(scope: string, override?: {
|
|
10
10
|
apiUrl?: string;
|
|
11
11
|
webUrl?: string;
|
package/dist/config.js
CHANGED
|
@@ -19,11 +19,10 @@ const browserLogin_1 = require("./browserLogin");
|
|
|
19
19
|
// inventing its own.
|
|
20
20
|
exports.CONFIG_DIR = (0, node_path_1.join)((0, node_os_1.homedir)(), '.helix');
|
|
21
21
|
const CREDENTIALS_FILE = (0, node_path_1.join)(exports.CONFIG_DIR, 'credentials.json');
|
|
22
|
-
// The npm scope this build was published under
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
// scope; file:-linked local dev reads @hypersoniclabs → production.
|
|
22
|
+
// The npm scope this build was published under: @helixdev is the staging lane, everything
|
|
23
|
+
// else (@hypersoniclabs, and the retired @helix3 scope) is production. Read from our own
|
|
24
|
+
// package.json `name` (dist/.. at runtime) — a lane tarball carries the rewritten scope;
|
|
25
|
+
// file:-linked local dev reads @hypersoniclabs → production.
|
|
27
26
|
function ownScope() {
|
|
28
27
|
try {
|
|
29
28
|
const name = JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(__dirname, '..', 'package.json'), 'utf8')).name;
|
|
@@ -34,32 +33,32 @@ function ownScope() {
|
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
const ENVIRONMENTS = {
|
|
37
|
-
production: {
|
|
36
|
+
production: {
|
|
37
|
+
apiUrl: 'https://api.helixgame.com',
|
|
38
|
+
webUrl: 'https://helixgame.com',
|
|
39
|
+
aliasApiUrls: ['https://helix-backend-api-helix3.up.railway.app'],
|
|
40
|
+
},
|
|
38
41
|
staging: { apiUrl: 'https://helix-backend-staging.up.railway.app', webUrl: 'https://next.helixgame.com' },
|
|
39
|
-
helix3: { apiUrl: 'https://helix-backend-api-helix3.up.railway.app', webUrl: 'https://new.helixgame.com' },
|
|
40
42
|
};
|
|
41
|
-
// TEMPORARY (HYPR-5040, 2026-08-07, Arash): the production-scoped build ALSO
|
|
42
|
-
// defaults to the helix3 lane. helixgame.com serves a pre-2026-07-14 auth surface
|
|
43
|
-
// (password-only /cli-login) that email-code/passwordless accounts cannot log into,
|
|
44
|
-
// and the team's active lane is helix3 - so `helix login` from the @hypersoniclabs
|
|
45
|
-
// package must land on new.helixgame.com to work at all. The production ENVIRONMENT
|
|
46
|
-
// entry above stays intact and reachable via HELIX_API_URL=https://api.helixgame.com.
|
|
47
|
-
// This mapping will be repointed to production (drop the '@hypersoniclabs' key and
|
|
48
|
-
// restore the pinned spec) after the production backend release.
|
|
49
43
|
const SCOPE_ENVS = {
|
|
50
44
|
'@helixdev': 'staging',
|
|
51
|
-
|
|
52
|
-
'@
|
|
45
|
+
// Retired scope: old @helix3 installs resolve to the same production environment.
|
|
46
|
+
'@helix3': 'production',
|
|
53
47
|
};
|
|
54
48
|
// The scope each environment's toolchain is published under — what update hints and
|
|
55
|
-
// install commands name.
|
|
56
|
-
// (docs/npm-publishing.md)
|
|
57
|
-
// an old @helix3 install keeps working.
|
|
49
|
+
// install commands name. @hypersoniclabs is the only production package since 2026-10-07
|
|
50
|
+
// (docs/npm-publishing.md).
|
|
58
51
|
const ENV_SCOPES = {
|
|
59
52
|
production: '@hypersoniclabs',
|
|
60
53
|
staging: '@helixdev',
|
|
61
|
-
helix3: '@hypersoniclabs',
|
|
62
54
|
};
|
|
55
|
+
const normalizeOrigin = (url) => url.trim().replace(/\/+$/, '').toLowerCase();
|
|
56
|
+
// The environment an API origin belongs to (canonical host or alias), or undefined for
|
|
57
|
+
// anything else (localhost, a custom backend).
|
|
58
|
+
function environmentOfApiUrl(url) {
|
|
59
|
+
const n = normalizeOrigin(url);
|
|
60
|
+
return Object.entries(ENVIRONMENTS).find(([, env]) => [env.apiUrl, ...(env.aliasApiUrls ?? [])].some((candidate) => normalizeOrigin(candidate) === n))?.[0];
|
|
61
|
+
}
|
|
63
62
|
// Pure resolver (testable without the ambient package.json / process.env): the npm scope
|
|
64
63
|
// picks the environment; HELIX_API_URL/HELIX_WEB_URL override. The site is its OWN value —
|
|
65
64
|
// only an API-only override derives it (api.-strip); otherwise the env default applies.
|
|
@@ -67,10 +66,7 @@ function resolveEnvironment(scope, override = {}) {
|
|
|
67
66
|
// A local file-linked build still carries the production package name. When
|
|
68
67
|
// its explicit API override exactly names a known lane, label and package
|
|
69
68
|
// suggestions must follow that lane rather than falsely saying production.
|
|
70
|
-
const
|
|
71
|
-
const overrideEnv = normalizedOverride
|
|
72
|
-
? Object.entries(ENVIRONMENTS).find(([, value]) => value.apiUrl.replace(/\/+$/, '').toLowerCase() === normalizedOverride)?.[0]
|
|
73
|
-
: undefined;
|
|
69
|
+
const overrideEnv = override.apiUrl ? environmentOfApiUrl(override.apiUrl) : undefined;
|
|
74
70
|
const env = overrideEnv ?? SCOPE_ENVS[scope] ?? 'production';
|
|
75
71
|
const resolvedScope = overrideEnv ? ENV_SCOPES[overrideEnv] : scope;
|
|
76
72
|
const preset = ENVIRONMENTS[env];
|
|
@@ -88,23 +84,23 @@ const RESOLVED = resolveEnvironment(ownScope(), {
|
|
|
88
84
|
/** The website that belongs to an API origin, when it is one of ours (visual QA renders on the site that serves the
|
|
89
85
|
* API the item lives on, not on this build's default site). */
|
|
90
86
|
function webUrlForApi(apiUrl) {
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
if (normalizeApiUrlForEnv(env.apiUrl) === n)
|
|
94
|
-
return env.webUrl;
|
|
95
|
-
return null;
|
|
87
|
+
const env = environmentOfApiUrl(apiUrl);
|
|
88
|
+
return env ? ENVIRONMENTS[env].webUrl : null;
|
|
96
89
|
}
|
|
97
|
-
const normalizeApiUrlForEnv = (url) => url.trim().replace(/\/+$/, '').toLowerCase();
|
|
98
90
|
exports.HELIX_SCOPE = RESOLVED.scope;
|
|
99
91
|
exports.HELIX_ENV = RESOLVED.env;
|
|
100
92
|
exports.DEFAULT_API_URL = RESOLVED.apiUrl;
|
|
101
93
|
exports.DEFAULT_WEB_URL = RESOLVED.webUrl;
|
|
102
94
|
// One credentials file (~/.helix/credentials.json) serves every installed lane, so a login minted
|
|
103
95
|
// against another environment silently redirects publishes there. Compare normalized: trailing
|
|
104
|
-
// slashes and case are not meaningful differences in an origin
|
|
105
|
-
|
|
96
|
+
// slashes and case are not meaningful differences in an origin, and a host and its alias (the
|
|
97
|
+
// Railway URL and api.helixgame.com) are the same environment — a login stored under either one
|
|
98
|
+
// is valid for both, so the cutover needs no re-login.
|
|
106
99
|
function apiUrlMatchesEnv(credsApiUrl, defaultApiUrl) {
|
|
107
|
-
|
|
100
|
+
if (normalizeOrigin(credsApiUrl) === normalizeOrigin(defaultApiUrl))
|
|
101
|
+
return true;
|
|
102
|
+
const credsEnv = environmentOfApiUrl(credsApiUrl);
|
|
103
|
+
return credsEnv !== undefined && credsEnv === environmentOfApiUrl(defaultApiUrl);
|
|
108
104
|
}
|
|
109
105
|
// The standard cross-environment warning, or null when the stored login targets this build's
|
|
110
106
|
// environment. `env` defaults to this build's resolved environment; tests inject it explicitly.
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;AA6EA,gDAgBC;AAUD,oCAGC;AAYD,4CAIC;AAID,0DAeC;AAED,0CAUC;AAED,0CAYC;AAED,4CAMC;AAqBD,0CAGC;AAKD,gCAGC;AA/MD,qCAA4E;AAC5E,qCAAkC;AAClC,yCAAiC;AACjC,iDAA8C;AAU9C,iGAAiG;AACjG,6FAA6F;AAC7F,qBAAqB;AACR,QAAA,UAAU,GAAG,IAAA,gBAAI,EAAC,IAAA,iBAAO,GAAE,EAAE,QAAQ,CAAC,CAAC;AACpD,MAAM,gBAAgB,GAAG,IAAA,gBAAI,EAAC,kBAAU,EAAE,kBAAkB,CAAC,CAAC;AAE9D,0FAA0F;AAC1F,yFAAyF;AACzF,yFAAyF;AACzF,6DAA6D;AAC7D,SAAS,QAAQ;IACf,IAAI,CAAC;QACH,MAAM,IAAI,GAAI,IAAI,CAAC,KAAK,CAAC,IAAA,sBAAY,EAAC,IAAA,gBAAI,EAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAAuB,CAAC,IAAI,CAAC;QACjH,OAAO,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,I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C;QAChE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAY,CAAC;QAC3C,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,CAAC,CAAC,CAAE,MAAkC,CAAC,CAAC,CAAC,IAAI,CAAC;IACpG,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,iGAAiG;AACjG,4FAA4F;AAC5F,SAAgB,eAAe,CAAC,KAAa;IAC3C,MAAM,GAAG,GAAG,gBAAgB,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC;IACzC,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3E,CAAC;AAED,kGAAkG;AAClG,kGAAkG;AAClG,mFAAmF;AACnF,SAAgB,UAAU,CAAC,KAAa;IACtC,MAAM,GAAG,GAAG,gBAAgB,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC;IACzC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The notice line for a command path such as ["vehicle", "validate"], or null when there is none. */
|
|
2
|
+
export declare function earlyAccessNoticeFor(commandPath: readonly string[]): string | null;
|
|
3
|
+
/** Print the notice for this command at most once per process. Never throws. */
|
|
4
|
+
export declare function printEarlyAccessNotice(commandPath: readonly string[], env?: NodeJS.ProcessEnv): void;
|
|
5
|
+
/** The names from the root command's direct child down to the executing command. */
|
|
6
|
+
export declare function commandPathOf(command: {
|
|
7
|
+
name(): string;
|
|
8
|
+
parent: unknown;
|
|
9
|
+
}): string[];
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.earlyAccessNoticeFor = earlyAccessNoticeFor;
|
|
4
|
+
exports.printEarlyAccessNotice = printEarlyAccessNotice;
|
|
5
|
+
exports.commandPathOf = commandPathOf;
|
|
6
|
+
// The "Early access" notice for creation commands whose kind is not yet stable.
|
|
7
|
+
//
|
|
8
|
+
// The kind -> stability map and the disclaimer wording live in @hypersoniclabs/helix-manifest
|
|
9
|
+
// (creation-stability) so the MCP, this CLI and the website agree. This file only decides which
|
|
10
|
+
// command is which kind and prints the line once per run.
|
|
11
|
+
//
|
|
12
|
+
// It goes to STDERR, always: `--json` output on stdout stays one parseable document. Set
|
|
13
|
+
// HELIX_NO_EARLY_ACCESS_NOTICE=1 to silence it (scripts, and wrappers that already tell the user).
|
|
14
|
+
const helix_manifest_1 = require("@hypersoniclabs/helix-manifest");
|
|
15
|
+
/** Command path -> creation kind. Longest prefix wins; a path with no match prints nothing. */
|
|
16
|
+
const COMMAND_KINDS = [
|
|
17
|
+
['vehicle addon', 'vehicle-addon'],
|
|
18
|
+
['vehicle', 'vehicle'],
|
|
19
|
+
['device', 'device'],
|
|
20
|
+
['pack', 'locomotion-pack'],
|
|
21
|
+
// Interactive item definitions are weapons and emotes today; neither kind is stable yet.
|
|
22
|
+
['item-def', 'Weapon and emote'],
|
|
23
|
+
];
|
|
24
|
+
/** The notice line for a command path such as ["vehicle", "validate"], or null when there is none. */
|
|
25
|
+
function earlyAccessNoticeFor(commandPath) {
|
|
26
|
+
const joined = commandPath.join(' ');
|
|
27
|
+
let best = null;
|
|
28
|
+
for (const entry of COMMAND_KINDS) {
|
|
29
|
+
const [prefix] = entry;
|
|
30
|
+
if ((joined === prefix || joined.startsWith(`${prefix} `)) && (!best || prefix.length > best[0].length))
|
|
31
|
+
best = entry;
|
|
32
|
+
}
|
|
33
|
+
if (!best)
|
|
34
|
+
return null;
|
|
35
|
+
return (0, helix_manifest_1.isEarlyAccessCreationKind)(best[1]) ? (0, helix_manifest_1.earlyAccessDisclaimer)(best[1]) : null;
|
|
36
|
+
}
|
|
37
|
+
let printed = false;
|
|
38
|
+
/** Print the notice for this command at most once per process. Never throws. */
|
|
39
|
+
function printEarlyAccessNotice(commandPath, env = process.env) {
|
|
40
|
+
if (printed || env.HELIX_NO_EARLY_ACCESS_NOTICE === '1')
|
|
41
|
+
return;
|
|
42
|
+
const notice = earlyAccessNoticeFor(commandPath);
|
|
43
|
+
if (!notice)
|
|
44
|
+
return;
|
|
45
|
+
printed = true;
|
|
46
|
+
try {
|
|
47
|
+
process.stderr.write(`${notice}\n`);
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
/* a closed stderr must never fail the command */
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/** The names from the root command's direct child down to the executing command. */
|
|
54
|
+
function commandPathOf(command) {
|
|
55
|
+
const names = [];
|
|
56
|
+
let current = command;
|
|
57
|
+
while (current && current.parent) {
|
|
58
|
+
names.unshift(current.name());
|
|
59
|
+
current = current.parent;
|
|
60
|
+
}
|
|
61
|
+
return names;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=earlyAccessNotice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"earlyAccessNotice.js","sourceRoot":"","sources":["../src/earlyAccessNotice.ts"],"names":[],"mappings":";;AAqBA,oDASC;AAKD,wDAUC;AAGD,sCAQC;AAxDD,gFAAgF;AAChF,EAAE;AACF,8FAA8F;AAC9F,gGAAgG;AAChG,0DAA0D;AAC1D,EAAE;AACF,yFAAyF;AACzF,mGAAmG;AACnG,mEAAkG;AAElG,+FAA+F;AAC/F,MAAM,aAAa,GAA2D;IAC5E,CAAC,eAAe,EAAE,eAAe,CAAC;IAClC,CAAC,SAAS,EAAE,SAAS,CAAC;IACtB,CAAC,QAAQ,EAAE,QAAQ,CAAC;IACpB,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAC3B,y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AoF;AACpF,SAAgB,aAAa,CAAC,OAA4C;IACxE,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,OAAO,GAA+C,OAAO,CAAC;IAClE,OAAO,OAAO,IAAK,OAA+B,CAAC,MAAM,EAAE,CAAC;QAC1D,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QAC9B,OAAO,GAAI,OAAkE,CAAC,MAAM,CAAC;IACvF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -74,6 +74,7 @@ const browserLogin_1 = require("./browserLogin");
|
|
|
74
74
|
const unreal_1 = require("./unreal");
|
|
75
75
|
const unrealPublish_1 = require("./unrealPublish");
|
|
76
76
|
const device_1 = require("./device");
|
|
77
|
+
const earlyAccessNotice_1 = require("./earlyAccessNotice");
|
|
77
78
|
const types_1 = require("./bridge/types");
|
|
78
79
|
const cliAuthority_1 = require("./continuum/cliAuthority");
|
|
79
80
|
const adminPackagePinCommand_1 = require("./continuum/adminPackagePinCommand");
|
|
@@ -85,6 +86,10 @@ program
|
|
|
85
86
|
.name('helix')
|
|
86
87
|
.description('HELIX creator CLI — scaffold, validate, and publish Instant Worlds')
|
|
87
88
|
.version((0, lib_1.cliVersion)());
|
|
89
|
+
// Early-access kinds (device, vehicle, add-on, ...) say so once per run, on stderr, before the work starts.
|
|
90
|
+
program.hook('preAction', (_thisCommand, actionCommand) => {
|
|
91
|
+
(0, earlyAccessNotice_1.printEarlyAccessNotice)((0, earlyAccessNotice_1.commandPathOf)(actionCommand));
|
|
92
|
+
});
|
|
88
93
|
function fail(message) {
|
|
89
94
|
// Synchronous: stderr is an ASYNC pipe on macOS, so console.error + process.exit cut a long refusal at ~512 bytes
|
|
90
95
|
// whenever the output was piped — exactly how an agent or CI reads it — losing the next command it names.
|
|
@@ -937,7 +942,7 @@ vehicleCommand
|
|
|
937
942
|
let report;
|
|
938
943
|
if (/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(target)) {
|
|
939
944
|
const creds = (0, config_1.loadCredentials)();
|
|
940
|
-
const apiUrl = creds?.apiUrl ??
|
|
945
|
+
const apiUrl = creds?.apiUrl ?? config_1.DEFAULT_API_URL;
|
|
941
946
|
const res = await fetch(`${apiUrl.replace(/\/$/, '')}/api/v1/universal-items/${target}`, { headers: { accept: 'application/json' } });
|
|
942
947
|
if (!res.ok)
|
|
943
948
|
throw new Error(`item ${target}: HTTP ${res.status}`);
|
|
@@ -1209,7 +1214,8 @@ program
|
|
|
1209
1214
|
}
|
|
1210
1215
|
// Interactive: open the browser, let the website mint + hand back a token.
|
|
1211
1216
|
// An explicit --api-url derives its own site; otherwise use the env website default.
|
|
1212
|
-
const webUrl = opts.webUrl ??
|
|
1217
|
+
const webUrl = opts.webUrl ??
|
|
1218
|
+
(opts.apiUrl === config_1.DEFAULT_API_URL ? config_1.DEFAULT_WEB_URL : ((0, config_1.webUrlForApi)(opts.apiUrl) ?? (0, browserLogin_1.deriveWebUrl)(opts.apiUrl)));
|
|
1213
1219
|
console.log(`Opening your browser to sign in (${webUrl}) …`);
|
|
1214
1220
|
const { token } = await (0, browserLogin_1.browserLogin)({
|
|
1215
1221
|
webUrl,
|