@tiangong-lca/cli 0.1.6 → 0.1.8
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 +21 -22
- package/dist/src/cli.js +46 -48
- package/dist/src/cli.js.map +1 -1
- package/dist/src/lib/auth-identity-receipt.d.ts +1 -2
- package/dist/src/lib/auth-identity-receipt.js +3 -20
- package/dist/src/lib/auth-identity-receipt.js.map +1 -1
- package/dist/src/lib/credential-safety.d.ts +7 -0
- package/dist/src/lib/credential-safety.js +28 -0
- package/dist/src/lib/credential-safety.js.map +1 -0
- package/dist/src/lib/dataset-command.d.ts +2 -0
- package/dist/src/lib/dataset-command.js +20 -0
- package/dist/src/lib/dataset-command.js.map +1 -1
- package/dist/src/lib/dataset-save-draft-run.js +3 -1
- package/dist/src/lib/dataset-save-draft-run.js.map +1 -1
- package/dist/src/lib/env.d.ts +9 -2
- package/dist/src/lib/env.js +83 -24
- package/dist/src/lib/env.js.map +1 -1
- package/dist/src/lib/flow-publish-reviewed-data.js +1 -1
- package/dist/src/lib/flow-publish-reviewed-data.js.map +1 -1
- package/dist/src/lib/lifecyclemodel-resulting-process.js +5 -7
- package/dist/src/lib/lifecyclemodel-resulting-process.js.map +1 -1
- package/dist/src/lib/process-refresh-references.js +1 -1
- package/dist/src/lib/process-refresh-references.js.map +1 -1
- package/dist/src/lib/process-save-draft.d.ts +1 -0
- package/dist/src/lib/process-save-draft.js +8 -0
- package/dist/src/lib/process-save-draft.js.map +1 -1
- package/dist/src/lib/process-scope-statistics.js +1 -1
- package/dist/src/lib/process-scope-statistics.js.map +1 -1
- package/dist/src/lib/publish.d.ts +7 -0
- package/dist/src/lib/publish.js +111 -7
- package/dist/src/lib/publish.js.map +1 -1
- package/dist/src/lib/supabase-client.d.ts +4 -4
- package/dist/src/lib/supabase-client.js +16 -16
- package/dist/src/lib/supabase-client.js.map +1 -1
- package/dist/src/lib/supabase-data-api-contract.d.ts +18 -10
- package/dist/src/lib/supabase-data-api-contract.js +17 -9
- package/dist/src/lib/supabase-data-api-contract.js.map +1 -1
- package/dist/src/lib/supabase-json-ordered-write.js +3 -1
- package/dist/src/lib/supabase-json-ordered-write.js.map +1 -1
- package/dist/src/lib/supabase-session.d.ts +5 -14
- package/dist/src/lib/supabase-session.js +34 -113
- package/dist/src/lib/supabase-session.js.map +1 -1
- package/package.json +1 -2
- package/dist/src/lib/user-api-key.d.ts +0 -16
- package/dist/src/lib/user-api-key.js +0 -75
- package/dist/src/lib/user-api-key.js.map +0 -1
package/README.md
CHANGED
|
@@ -28,18 +28,17 @@ checkPaths:
|
|
|
28
28
|
- src/lib/oauth-pkce.ts
|
|
29
29
|
- src/lib/supabase-session.ts
|
|
30
30
|
- src/lib/lca-release.ts
|
|
31
|
-
- scripts/run-auth-identity-production-case.ts
|
|
32
31
|
- test/auth-identity*.test.ts
|
|
33
32
|
- test/public-auth-identity-receipt.test.ts
|
|
34
33
|
- test/lca-release*.test.ts
|
|
35
|
-
lastReviewedAt: 2026-
|
|
36
|
-
lastReviewedCommit:
|
|
37
|
-
lastReviewedNote: 'Reviewed for Issue #
|
|
34
|
+
lastReviewedAt: 2026-09-02
|
|
35
|
+
lastReviewedCommit: 3254d6167662121ca871090f6e57ff2a55578f28
|
|
36
|
+
lastReviewedNote: 'Reviewed for Issue #266: published CLI 0.1.8 ships zero-config official Production login and complete custom/headless boundaries through the existing verified release path.'
|
|
38
37
|
---
|
|
39
38
|
|
|
40
39
|
# TianGong LCA CLI
|
|
41
40
|
|
|
42
|
-
Package: `@tiangong-lca/cli` Executable: `tiangong-lca` Current package version: `0.1.
|
|
41
|
+
Package: `@tiangong-lca/cli` Executable: `tiangong-lca` Current package version: `0.1.8` Node: `24.19.0`
|
|
43
42
|
|
|
44
43
|
Repository development is single-track on pnpm `11.24.0` and TypeScript `7.0.2`. The published package remains a clean, package-manager-neutral consumer artifact: it contains runtime files only, not pnpm, TypeScript, Oxlint, tests, source-only tooling, or repository lockfiles.
|
|
45
44
|
|
|
@@ -105,7 +104,8 @@ One-off published run:
|
|
|
105
104
|
|
|
106
105
|
```bash
|
|
107
106
|
pnpm dlx @tiangong-lca/cli@latest --help
|
|
108
|
-
pnpm dlx @tiangong-lca/cli@latest
|
|
107
|
+
pnpm dlx @tiangong-lca/cli@latest auth login
|
|
108
|
+
pnpm dlx @tiangong-lca/cli@latest auth doctor-auth --json
|
|
109
109
|
pnpm dlx @tiangong-lca/cli@latest flow --help
|
|
110
110
|
```
|
|
111
111
|
|
|
@@ -114,7 +114,8 @@ Install the published CLI:
|
|
|
114
114
|
```bash
|
|
115
115
|
pnpm add --global @tiangong-lca/cli
|
|
116
116
|
tiangong-lca --help
|
|
117
|
-
tiangong-lca
|
|
117
|
+
tiangong-lca auth login
|
|
118
|
+
tiangong-lca auth doctor-auth --json
|
|
118
119
|
tiangong-lca flow --help
|
|
119
120
|
```
|
|
120
121
|
|
|
@@ -139,12 +140,17 @@ The packed ESM, CJS dynamic-import, and TypeScript consumers exercise every publ
|
|
|
139
140
|
|
|
140
141
|
## Env
|
|
141
142
|
|
|
142
|
-
|
|
143
|
+
Official Production requires **no environment setup**. Run `tiangong-lca auth login` from a trusted terminal and finish authorization in your browser. The CLI bundles the public Production project URL, publishable key, CLI OAuth client ID, registered loopback callback, and region as one profile in `src/lib/env.ts`. These are application configuration, not user credentials; no client secret is used. Skills and external consumers must reuse the CLI rather than copy this profile.
|
|
144
|
+
|
|
145
|
+
Before the first login, `auth status --json` and `auth doctor-auth --json` return `login-required` (exit 1), not a missing-client configuration error. `doctor --json` reports the public profile fields as `source: "default"`; this is configuration readiness, not proof of a logged-in user.
|
|
146
|
+
|
|
147
|
+
Only Dev, self-hosted, or a custom public client needs explicit configuration. Supply the complete matching tuple from that environment's administrator:
|
|
143
148
|
|
|
144
149
|
```bash
|
|
145
|
-
TIANGONG_LCA_API_BASE_URL=
|
|
146
|
-
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
|
|
147
|
-
TIANGONG_LCA_OAUTH_CLIENT_ID
|
|
150
|
+
TIANGONG_LCA_API_BASE_URL=https://<your-project>.supabase.co/functions/v1
|
|
151
|
+
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY=<that-project-publishable-key>
|
|
152
|
+
TIANGONG_LCA_OAUTH_CLIENT_ID=<that-project-registered-public-client-id>
|
|
153
|
+
TIANGONG_LCA_OAUTH_REDIRECT_URI=http://127.0.0.1:49191/oauth/callback
|
|
148
154
|
TIANGONG_LCA_REGION=us-east-1
|
|
149
155
|
```
|
|
150
156
|
|
|
@@ -152,9 +158,10 @@ Notes:
|
|
|
152
158
|
|
|
153
159
|
- `TIANGONG_LCA_API_BASE_URL` accepts the project root, `/functions/v1`, or `/rest/v1`.
|
|
154
160
|
- `TIANGONG_LCA_OAUTH_CLIENT_ID` is the environment-specific registered public CLI client; it is not a secret.
|
|
161
|
+
- Blank public fields and the exact official Production URL aliases use the bundled profile. Any non-Production URL, client, key, or callback disables profile completion; incomplete custom configuration fails before browser/network access. An explicit custom URL cannot be combined with the known Production key or client. Changing `--base-url` also requires a matching complete environment.
|
|
155
162
|
- Run `tiangong-lca auth login` once in a trusted terminal. All Edge Function and direct Supabase commands then reuse the OAuth access token and rotate the refresh token on demand.
|
|
156
|
-
- For approved headless execution, set `TIANGONG_LCA_AUTH_MODE=access-token
|
|
157
|
-
-
|
|
163
|
+
- For approved headless execution, explicitly set the destination `TIANGONG_LCA_API_BASE_URL`, its `TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY`, and `TIANGONG_LCA_AUTH_MODE=access-token`, then inject one short-lived `TIANGONG_LCA_ACCESS_TOKEN`. A token alone never selects Production. It is verified online, kept only in process memory, and never refreshed.
|
|
164
|
+
- Bundled configuration does not enable implicit remote publishing. Local-first publish executor selection still requires explicit configured remote runtime; existing `--commit`, remote-lookup, identity, and approval gates are unchanged.
|
|
158
165
|
|
|
159
166
|
Optional session control:
|
|
160
167
|
|
|
@@ -190,7 +197,7 @@ Use the identity receipt before a production-backed case or any later owner-draf
|
|
|
190
197
|
tiangong-lca auth identity-receipt --expected-project-ref <project-ref> --expected-user-id <user-id> --json
|
|
191
198
|
```
|
|
192
199
|
|
|
193
|
-
The command performs no dataset write. It resolves the selected OAuth
|
|
200
|
+
The command performs no dataset write. It resolves the selected OAuth or explicit headless session, checks the canonical Supabase project, and makes a bounded live `GET /auth/v1/user`. A refreshable cached token that receives `401` or `403` may be refreshed and retried exactly once; an explicit headless access token is never refreshed. All other transport or response failures are terminal. A valid production guard requires:
|
|
194
201
|
|
|
195
202
|
- `schema` exactly `tiangong-lca.auth-identity-receipt.v1`;
|
|
196
203
|
- `status: "passed"`, `operation: "current-user-read"`, and `remote_write_mode: "read-only"`;
|
|
@@ -199,14 +206,6 @@ The command performs no dataset write. It resolves the selected OAuth, explicit
|
|
|
199
206
|
|
|
200
207
|
Calling without expectations is allowed for discovery but produces `assertions.mode: "observed"`; it is not an authorization guard. The safe display email is masked and must not be used as the account key. The receipt deliberately excludes credentials, full email, session-file details, raw response metadata, and all credential/token/path-derived fingerprints.
|
|
201
208
|
|
|
202
|
-
For the explicitly authorized local production read case from a validated repository checkout, invoke the narrow TypeScript runner with a new private output directory:
|
|
203
|
-
|
|
204
|
-
```text
|
|
205
|
-
pnpm case:auth-identity:production -- --env-file <data-foundry-ignored-.env> --expected-project-ref <project-ref> --expected-user-id <user-id> --out-dir <new-private-case-directory>
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
The historical production-case runner remains a transition-only legacy fixture: it reads only `TIANGONG_LCA_API_BASE_URL`, `TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY`, and `TIANGONG_LCA_TEST_API_KEY`; the last is mapped to the child process's explicit legacy variable. It does not accept an alternate CLI path. The pnpm command first performs a clean TS7 build without the production env. Its plain-Node runner then single-reads source/config/lock and the freshly generated `dist/src/**/*.js`, hashes the source tree, runner, runtime, exact entrypoint, and pnpm lock, and copies those exact built buffers into a private snapshot before exposing the key. It forces reauthentication with session cache disabled, runs only the built snapshot from an exclusively created clean directory with an argv array and `shell:false`, cleans the snapshot before publishing success artifacts, and persists only the parsed receipt and case manifest. POSIX creates the case directory as `0700` and files as `0600`; Windows inherits ACLs from the caller-selected parent, so use a user-restricted parent because mode bits are not an ACL guarantee. The runner never stores raw child stdout/stderr and is intentionally not wired to CI secrets. New automation should use OAuth/headless mode instead. This receipt is locally hash-verifiable, not server-signed attestation.
|
|
209
|
-
|
|
210
209
|
## LCI/LCIA Data Release
|
|
211
210
|
|
|
212
211
|
The `release` command family is the authenticated transport used by the standalone release control plane. It does not introduce a TIDAS schema variant: result packages reuse the existing Process exchange structure for LCI and the existing Process LCIA result fields, with a LifecycleModel referencing the resulting Process.
|
package/dist/src/cli.js
CHANGED
|
@@ -243,7 +243,8 @@ Options:
|
|
|
243
243
|
--json Print compact JSON; default output is pretty JSON
|
|
244
244
|
-h, --help
|
|
245
245
|
|
|
246
|
-
|
|
246
|
+
Official Production requires no environment configuration. Run auth login directly.
|
|
247
|
+
For a custom environment, configure its complete public tuple (never mix projects):
|
|
247
248
|
TIANGONG_LCA_API_BASE_URL
|
|
248
249
|
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
|
|
249
250
|
TIANGONG_LCA_OAUTH_CLIENT_ID
|
|
@@ -287,7 +288,8 @@ Safety:
|
|
|
287
288
|
tokens, full email addresses, session paths, or credential-derived fingerprints. Production guards
|
|
288
289
|
must pass both expected assertions and require assertions.mode="intent-bound".
|
|
289
290
|
|
|
290
|
-
|
|
291
|
+
Official Production uses the bundled public profile and a prior "tiangong-lca auth login".
|
|
292
|
+
For a custom environment, configure:
|
|
291
293
|
TIANGONG_LCA_API_BASE_URL
|
|
292
294
|
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
|
|
293
295
|
TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
|
|
@@ -295,9 +297,6 @@ Required env:
|
|
|
295
297
|
Headless alternative:
|
|
296
298
|
TIANGONG_LCA_ACCESS_TOKEN (short-lived actor token; never cached or refreshed)
|
|
297
299
|
|
|
298
|
-
Legacy compatibility:
|
|
299
|
-
TIANGONG_LCA_AUTH_MODE=legacy-user-api-key plus TIANGONG_LCA_API_KEY
|
|
300
|
-
|
|
301
300
|
Optional session env:
|
|
302
301
|
TIANGONG_LCA_SESSION_FILE
|
|
303
302
|
TIANGONG_LCA_DISABLE_SESSION_CACHE
|
|
@@ -321,21 +320,20 @@ Options:
|
|
|
321
320
|
--input <file> JSON request file
|
|
322
321
|
--json Print compact JSON
|
|
323
322
|
--dry-run Print the planned HTTP request without sending it
|
|
324
|
-
--api-key <key> Override TIANGONG_LCA_API_KEY
|
|
325
323
|
--base-url <url> Override TIANGONG_LCA_API_BASE_URL
|
|
326
324
|
--region <name> Override TIANGONG_LCA_REGION
|
|
327
325
|
--timeout-ms <n> Request timeout in milliseconds
|
|
328
326
|
-h, --help
|
|
329
327
|
|
|
330
|
-
|
|
328
|
+
Official Production: run "tiangong-lca auth login" with no env setup.
|
|
329
|
+
Custom environment (complete matching tuple required):
|
|
331
330
|
TIANGONG_LCA_API_BASE_URL
|
|
332
|
-
TIANGONG_LCA_API_KEY
|
|
333
331
|
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
|
|
332
|
+
TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
|
|
334
333
|
TIANGONG_LCA_REGION (optional)
|
|
335
334
|
|
|
336
335
|
Runtime note:
|
|
337
|
-
The CLI
|
|
338
|
-
and sends the resolved access token to Edge Functions.
|
|
336
|
+
The CLI resolves the OAuth session and sends only its access token to Edge Functions.
|
|
339
337
|
`.trim();
|
|
340
338
|
}
|
|
341
339
|
function renderAdminHelp() {
|
|
@@ -346,19 +344,18 @@ Options:
|
|
|
346
344
|
--input <file> JSON request file
|
|
347
345
|
--json Print compact JSON
|
|
348
346
|
--dry-run Print the planned HTTP request without sending it
|
|
349
|
-
--api-key <key> Override TIANGONG_LCA_API_KEY
|
|
350
347
|
--base-url <url> Override TIANGONG_LCA_API_BASE_URL
|
|
351
348
|
--timeout-ms <n> Request timeout in milliseconds
|
|
352
349
|
-h, --help
|
|
353
350
|
|
|
354
|
-
|
|
351
|
+
Official Production: run "tiangong-lca auth login" with no env setup.
|
|
352
|
+
Custom environment (complete matching tuple required):
|
|
355
353
|
TIANGONG_LCA_API_BASE_URL
|
|
356
|
-
TIANGONG_LCA_API_KEY
|
|
357
354
|
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
|
|
355
|
+
TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
|
|
358
356
|
|
|
359
357
|
Runtime note:
|
|
360
|
-
The CLI
|
|
361
|
-
and sends the resolved access token to Edge Functions.
|
|
358
|
+
The CLI resolves the OAuth session and sends only its access token to Edge Functions.
|
|
362
359
|
`.trim();
|
|
363
360
|
}
|
|
364
361
|
function renderLcaReleaseHelp() {
|
|
@@ -391,19 +388,19 @@ Options:
|
|
|
391
388
|
--force Replace an existing output file
|
|
392
389
|
--dry-run Validate and print the masked planned request without network writes
|
|
393
390
|
--json Print the stable compact JSON report; otherwise print Summary and Next
|
|
394
|
-
--api-key <key> Override TIANGONG_LCA_API_KEY; environment use is preferred
|
|
395
391
|
--base-url <url> Override TIANGONG_LCA_API_BASE_URL
|
|
396
392
|
--timeout-ms <n> Request timeout in milliseconds (default 60000)
|
|
397
393
|
-h, --help
|
|
398
394
|
|
|
399
|
-
|
|
395
|
+
Official Production: run "tiangong-lca auth login" with no env setup.
|
|
396
|
+
Custom environment (complete matching tuple required):
|
|
400
397
|
TIANGONG_LCA_API_BASE_URL
|
|
401
|
-
TIANGONG_LCA_API_KEY
|
|
402
398
|
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
|
|
399
|
+
TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
|
|
403
400
|
|
|
404
401
|
Authorization and safety:
|
|
405
|
-
The
|
|
406
|
-
|
|
402
|
+
The OAuth session identifies the live account, and Database RPCs check that it has
|
|
403
|
+
data_product_manager. The service-role key never enters this CLI. Large bundle projections,
|
|
407
404
|
ZIPs, and chunks are written to files and verified against exact byte size and SHA-256.
|
|
408
405
|
|
|
409
406
|
Examples:
|
|
@@ -1057,7 +1054,7 @@ Options:
|
|
|
1057
1054
|
-h, --help
|
|
1058
1055
|
|
|
1059
1056
|
Environment:
|
|
1060
|
-
|
|
1057
|
+
Official Production profile (no env setup), or a complete custom URL/key/client; prior auth login
|
|
1061
1058
|
|
|
1062
1059
|
Outputs written under --out-dir:
|
|
1063
1060
|
- outputs/remote-verification-report.json
|
|
@@ -1273,7 +1270,7 @@ Options:
|
|
|
1273
1270
|
|
|
1274
1271
|
Environment:
|
|
1275
1272
|
none for local dry-run
|
|
1276
|
-
|
|
1273
|
+
Official Production profile (no env setup), or a complete custom URL/key/client; prior auth login
|
|
1277
1274
|
when --commit executes remote writes
|
|
1278
1275
|
|
|
1279
1276
|
Outputs written under --out-dir:
|
|
@@ -1387,9 +1384,10 @@ Options:
|
|
|
1387
1384
|
--json Print compact JSON
|
|
1388
1385
|
-h, --help
|
|
1389
1386
|
|
|
1390
|
-
|
|
1387
|
+
Official Production: run "tiangong-lca auth login" with no env setup.
|
|
1388
|
+
Custom environment (complete matching tuple required):
|
|
1391
1389
|
TIANGONG_LCA_API_BASE_URL
|
|
1392
|
-
|
|
1390
|
+
TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
|
|
1393
1391
|
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
|
|
1394
1392
|
|
|
1395
1393
|
Runtime note:
|
|
@@ -1415,9 +1413,10 @@ Options:
|
|
|
1415
1413
|
--json Print compact JSON
|
|
1416
1414
|
-h, --help
|
|
1417
1415
|
|
|
1418
|
-
|
|
1416
|
+
Official Production: run "tiangong-lca auth login" with no env setup.
|
|
1417
|
+
Custom environment (complete matching tuple required):
|
|
1419
1418
|
TIANGONG_LCA_API_BASE_URL
|
|
1420
|
-
|
|
1419
|
+
TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
|
|
1421
1420
|
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
|
|
1422
1421
|
|
|
1423
1422
|
Runtime note:
|
|
@@ -1456,9 +1455,10 @@ Options:
|
|
|
1456
1455
|
--json Print compact JSON
|
|
1457
1456
|
-h, --help
|
|
1458
1457
|
|
|
1459
|
-
|
|
1458
|
+
Official Production: run "tiangong-lca auth login" with no env setup.
|
|
1459
|
+
Custom environment (complete matching tuple required):
|
|
1460
1460
|
TIANGONG_LCA_API_BASE_URL
|
|
1461
|
-
|
|
1461
|
+
TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
|
|
1462
1462
|
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
|
|
1463
1463
|
|
|
1464
1464
|
Outputs written under --out-dir:
|
|
@@ -1503,9 +1503,10 @@ Options:
|
|
|
1503
1503
|
--json Print compact JSON
|
|
1504
1504
|
-h, --help
|
|
1505
1505
|
|
|
1506
|
-
|
|
1506
|
+
Official Production: run "tiangong-lca auth login" with no env setup.
|
|
1507
|
+
Custom environment (complete matching tuple required):
|
|
1507
1508
|
TIANGONG_LCA_API_BASE_URL
|
|
1508
|
-
|
|
1509
|
+
TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
|
|
1509
1510
|
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
|
|
1510
1511
|
|
|
1511
1512
|
Outputs written under --out-dir:
|
|
@@ -1535,7 +1536,7 @@ Options:
|
|
|
1535
1536
|
|
|
1536
1537
|
Environment:
|
|
1537
1538
|
none for local dry-run
|
|
1538
|
-
|
|
1539
|
+
Official Production profile (no env setup), or a complete custom URL/key/client; prior auth login
|
|
1539
1540
|
when --commit publishes prepared rows
|
|
1540
1541
|
|
|
1541
1542
|
Outputs written under --out-dir:
|
|
@@ -1769,8 +1770,10 @@ Options:
|
|
|
1769
1770
|
-h, --help
|
|
1770
1771
|
|
|
1771
1772
|
Remote lookup env (only when process_sources.allow_remote_lookup=true):
|
|
1773
|
+
Official Production uses its bundled profile and a prior "tiangong-lca auth login".
|
|
1774
|
+
A custom environment requires the complete matching tuple:
|
|
1772
1775
|
TIANGONG_LCA_API_BASE_URL
|
|
1773
|
-
|
|
1776
|
+
TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
|
|
1774
1777
|
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
|
|
1775
1778
|
`.trim();
|
|
1776
1779
|
}
|
|
@@ -1800,7 +1803,7 @@ Options:
|
|
|
1800
1803
|
|
|
1801
1804
|
Environment:
|
|
1802
1805
|
none for local dry-run
|
|
1803
|
-
|
|
1806
|
+
Official Production profile (no env setup), or a complete custom URL/key/client; prior auth login
|
|
1804
1807
|
when --commit executes remote writes
|
|
1805
1808
|
|
|
1806
1809
|
Local gate:
|
|
@@ -1964,9 +1967,10 @@ Options:
|
|
|
1964
1967
|
--json Print compact JSON
|
|
1965
1968
|
-h, --help
|
|
1966
1969
|
|
|
1967
|
-
|
|
1970
|
+
Official Production: run "tiangong-lca auth login" with no env setup.
|
|
1971
|
+
Custom environment (complete matching tuple required):
|
|
1968
1972
|
TIANGONG_LCA_API_BASE_URL
|
|
1969
|
-
|
|
1973
|
+
TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
|
|
1970
1974
|
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
|
|
1971
1975
|
|
|
1972
1976
|
Runtime note:
|
|
@@ -1991,9 +1995,10 @@ Options:
|
|
|
1991
1995
|
--json Print compact JSON
|
|
1992
1996
|
-h, --help
|
|
1993
1997
|
|
|
1994
|
-
|
|
1998
|
+
Official Production: run "tiangong-lca auth login" with no env setup.
|
|
1999
|
+
Custom environment (complete matching tuple required):
|
|
1995
2000
|
TIANGONG_LCA_API_BASE_URL
|
|
1996
|
-
|
|
2001
|
+
TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
|
|
1997
2002
|
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
|
|
1998
2003
|
|
|
1999
2004
|
Runtime note:
|
|
@@ -2143,7 +2148,7 @@ Options:
|
|
|
2143
2148
|
|
|
2144
2149
|
Environment:
|
|
2145
2150
|
none for local dry-run
|
|
2146
|
-
|
|
2151
|
+
Official Production profile (no env setup), or a complete custom URL/key/client; prior auth login
|
|
2147
2152
|
when --commit executes remote writes
|
|
2148
2153
|
|
|
2149
2154
|
Local gate:
|
|
@@ -2197,9 +2202,10 @@ Options:
|
|
|
2197
2202
|
--json Print compact JSON
|
|
2198
2203
|
-h, --help
|
|
2199
2204
|
|
|
2200
|
-
|
|
2205
|
+
Official Production: run "tiangong-lca auth login" with no env setup.
|
|
2206
|
+
Custom environment (complete matching tuple required):
|
|
2201
2207
|
TIANGONG_LCA_API_BASE_URL
|
|
2202
|
-
|
|
2208
|
+
TIANGONG_LCA_OAUTH_CLIENT_ID and a prior "tiangong-lca auth login"
|
|
2203
2209
|
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY
|
|
2204
2210
|
|
|
2205
2211
|
Guardrails:
|
|
@@ -2551,7 +2557,6 @@ function parseRemoteFlags(args) {
|
|
|
2551
2557
|
json: { type: 'boolean' },
|
|
2552
2558
|
'dry-run': { type: 'boolean' },
|
|
2553
2559
|
input: { type: 'string' },
|
|
2554
|
-
'api-key': { type: 'string' },
|
|
2555
2560
|
'base-url': { type: 'string' },
|
|
2556
2561
|
region: { type: 'string' },
|
|
2557
2562
|
'timeout-ms': { type: 'string' },
|
|
@@ -2577,7 +2582,6 @@ function parseRemoteFlags(args) {
|
|
|
2577
2582
|
json: Boolean(values.json),
|
|
2578
2583
|
dryRun: Boolean(values['dry-run']),
|
|
2579
2584
|
inputPath: typeof values.input === 'string' ? values.input : '',
|
|
2580
|
-
apiKey: typeof values['api-key'] === 'string' ? values['api-key'] : null,
|
|
2581
2585
|
apiBaseUrl: typeof values['base-url'] === 'string' ? values['base-url'] : null,
|
|
2582
2586
|
region: typeof values.region === 'string' ? values.region : null,
|
|
2583
2587
|
timeoutMs,
|
|
@@ -2601,7 +2605,6 @@ function parseLcaReleaseFlags(args) {
|
|
|
2601
2605
|
'package-id': { type: 'string' },
|
|
2602
2606
|
'artifact-id': { type: 'string' },
|
|
2603
2607
|
'artifact-path': { type: 'string' },
|
|
2604
|
-
'api-key': { type: 'string' },
|
|
2605
2608
|
'base-url': { type: 'string' },
|
|
2606
2609
|
'timeout-ms': { type: 'string' },
|
|
2607
2610
|
},
|
|
@@ -2633,7 +2636,6 @@ function parseLcaReleaseFlags(args) {
|
|
|
2633
2636
|
packageId: optionalString(values['package-id']),
|
|
2634
2637
|
artifactId: optionalString(values['artifact-id']),
|
|
2635
2638
|
artifactPath: optionalString(values['artifact-path']),
|
|
2636
|
-
apiKey: optionalString(values['api-key']),
|
|
2637
2639
|
apiBaseUrl: optionalString(values['base-url']),
|
|
2638
2640
|
timeoutMs,
|
|
2639
2641
|
};
|
|
@@ -5705,7 +5707,6 @@ function applyRemoteOverrides(env, overrides) {
|
|
|
5705
5707
|
return {
|
|
5706
5708
|
...env,
|
|
5707
5709
|
TIANGONG_LCA_API_BASE_URL: overrides.apiBaseUrl ?? runtimeEnv.apiBaseUrl ?? undefined,
|
|
5708
|
-
TIANGONG_LCA_API_KEY: overrides.apiKey ?? runtimeEnv.apiKey ?? undefined,
|
|
5709
5710
|
TIANGONG_LCA_REGION: overrides.region ?? runtimeEnv.region,
|
|
5710
5711
|
};
|
|
5711
5712
|
}
|
|
@@ -7934,9 +7935,6 @@ export async function executeCli(argv, deps) {
|
|
|
7934
7935
|
}
|
|
7935
7936
|
const action = requireLcaReleaseAction(subcommand);
|
|
7936
7937
|
const env = { ...deps.env };
|
|
7937
|
-
if (releaseFlags.apiKey !== null) {
|
|
7938
|
-
env.TIANGONG_LCA_API_KEY = releaseFlags.apiKey;
|
|
7939
|
-
}
|
|
7940
7938
|
if (releaseFlags.apiBaseUrl !== null) {
|
|
7941
7939
|
env.TIANGONG_LCA_API_BASE_URL = releaseFlags.apiBaseUrl;
|
|
7942
7940
|
}
|