@tiangong-lca/cli 0.0.12 → 0.0.13
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 +2 -2
- package/dist/src/cli.js +5 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/lib/process-save-draft-run.js +10 -0
- package/dist/src/lib/process-save-draft-run.js.map +1 -1
- package/dist/src/lib/process-save-draft.js +59 -3
- package/dist/src/lib/process-save-draft.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -283,7 +283,7 @@ tiangong-lca lifecyclemodel orchestrate plan --input ./lifecyclemodel-orchestrat
|
|
|
283
283
|
tiangong-lca qa process --rows-file ./process-list-report.json --out-dir ./process-qa
|
|
284
284
|
tiangong-lca qa process --run-root /abs/path/to/process-run --run-id <run_id> --out-dir ./process-qa
|
|
285
285
|
tiangong-lca process save-draft --input ./patched-processes.jsonl --out-dir /abs/path/to/process-save-draft --dry-run --json
|
|
286
|
-
tiangong-lca process save-draft --input ./patched-processes.jsonl --out-dir /abs/path/to/process-save-draft --commit --json
|
|
286
|
+
tiangong-lca process save-draft --input ./patched-processes.jsonl --out-dir /abs/path/to/process-save-draft --commit --target-user-id <user-id> --json
|
|
287
287
|
tiangong-lca flow publish-version --input-file ./ready-flows.jsonl --out-dir /abs/path/to/flow-publish --dry-run --json
|
|
288
288
|
tiangong-lca flow publish-reviewed-data --flow-rows-file ./reviewed-flows.jsonl --out-dir /abs/path/to/reviewed-publish --dry-run --json
|
|
289
289
|
tiangong-lca publish run --input ./publish-request.json --dry-run
|
|
@@ -298,7 +298,7 @@ For `process identity-preflight` and `flow identity-preflight`, canonical TIDAS
|
|
|
298
298
|
|
|
299
299
|
For `process build-plan` and `flow build-plan`, canonical payloads embedded in the plan are schema-checked during `materialize`. Plan-only materialization now creates deterministic canonical `processDataSet` / `flowDataSet` wrappers from the build plan and validates them with the TIDAS SDK before reporting `passed`.
|
|
300
300
|
|
|
301
|
-
For `process save-draft`, canonical process payloads are validated locally with `ProcessSchema` before any `--commit` write. Schema-invalid rows remain in `outputs/save-draft-rpc/failures.jsonl` instead of being persisted.
|
|
301
|
+
For `process save-draft`, canonical process payloads are validated locally with `ProcessSchema` before any `--commit` write. Schema-invalid rows remain in `outputs/save-draft-rpc/failures.jsonl` instead of being persisted. Batch import callers should pass `--target-user-id`; the CLI then verifies the current auth session and any visible draft owner before writing, while downstream readback verification still proves the final owner and payload.
|
|
302
302
|
|
|
303
303
|
For `flow publish-version`, canonical flow payloads are validated locally with `FlowSchema` before remote visibility planning or writes. The command always writes `flow-publish-version-gate-report.json`; blocked rows are written to the remote-failure JSONL without calling the remote service.
|
|
304
304
|
|
package/dist/src/cli.js
CHANGED
|
@@ -1658,6 +1658,8 @@ Options:
|
|
|
1658
1658
|
--out-dir <dir> Run root written relative to cwd when a relative path is passed
|
|
1659
1659
|
--commit Execute remote save-draft writes
|
|
1660
1660
|
--dry-run Keep the command local-only (default)
|
|
1661
|
+
--target-user-id <id>
|
|
1662
|
+
Require --commit to run as this user and update an owned draft
|
|
1661
1663
|
--json Print compact JSON
|
|
1662
1664
|
-h, --help
|
|
1663
1665
|
|
|
@@ -4358,6 +4360,7 @@ function parseProcessSaveDraftFlags(args) {
|
|
|
4358
4360
|
'out-dir': { type: 'string' },
|
|
4359
4361
|
commit: { type: 'boolean' },
|
|
4360
4362
|
'dry-run': { type: 'boolean' },
|
|
4363
|
+
'target-user-id': { type: 'string' },
|
|
4361
4364
|
},
|
|
4362
4365
|
}));
|
|
4363
4366
|
}
|
|
@@ -4379,6 +4382,7 @@ function parseProcessSaveDraftFlags(args) {
|
|
|
4379
4382
|
inputPath: typeof values.input === 'string' ? values.input : '',
|
|
4380
4383
|
outDir: typeof values['out-dir'] === 'string' ? values['out-dir'] : null,
|
|
4381
4384
|
commit: Boolean(values.commit),
|
|
4385
|
+
targetUserId: typeof values['target-user-id'] === 'string' ? values['target-user-id'] : null,
|
|
4382
4386
|
};
|
|
4383
4387
|
}
|
|
4384
4388
|
function parseProcessRequiredFieldsFlags(args) {
|
|
@@ -5622,6 +5626,7 @@ export async function executeCli(argv, deps) {
|
|
|
5622
5626
|
inputPath: processFlags.inputPath,
|
|
5623
5627
|
outDir: processFlags.outDir,
|
|
5624
5628
|
commit: processFlags.commit,
|
|
5629
|
+
targetUserId: processFlags.targetUserId,
|
|
5625
5630
|
env: deps.env,
|
|
5626
5631
|
fetchImpl: deps.fetchImpl,
|
|
5627
5632
|
});
|