@hypersoniclabs/helix-cli 0.1.24-helix3.451 → 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/index.js +3 -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,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC;IACx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AAM,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"}
|
package/dist/index.js
CHANGED
|
@@ -942,7 +942,7 @@ vehicleCommand
|
|
|
942
942
|
let report;
|
|
943
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)) {
|
|
944
944
|
const creds = (0, config_1.loadCredentials)();
|
|
945
|
-
const apiUrl = creds?.apiUrl ??
|
|
945
|
+
const apiUrl = creds?.apiUrl ?? config_1.DEFAULT_API_URL;
|
|
946
946
|
const res = await fetch(`${apiUrl.replace(/\/$/, '')}/api/v1/universal-items/${target}`, { headers: { accept: 'application/json' } });
|
|
947
947
|
if (!res.ok)
|
|
948
948
|
throw new Error(`item ${target}: HTTP ${res.status}`);
|
|
@@ -1214,7 +1214,8 @@ program
|
|
|
1214
1214
|
}
|
|
1215
1215
|
// Interactive: open the browser, let the website mint + hand back a token.
|
|
1216
1216
|
// An explicit --api-url derives its own site; otherwise use the env website default.
|
|
1217
|
-
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)));
|
|
1218
1219
|
console.log(`Opening your browser to sign in (${webUrl}) …`);
|
|
1219
1220
|
const { token } = await (0, browserLogin_1.browserLogin)({
|
|
1220
1221
|
webUrl,
|