@keystrokehq/cli 0.0.20 → 0.0.22
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/dist/{accept.handler-CiqqUxKN.mjs → accept.handler-C6KBLKmW.mjs} +1 -1
- package/dist/{admin-B0U2Aghv.mjs → admin-D2CQoZAN.mjs} +9 -9
- package/dist/{agent-bundle-package-DWV6B_5q-BsbCEeMw.mjs → agent-bundle-package-DWV6B_5q-B-qzc3zC.mjs} +1 -1
- package/dist/{agents-DBebUEwk.mjs → agents-Bn0g5o0o.mjs} +7 -7
- package/dist/{api-BjBpWWlm.mjs → api-O5tdGdzc.mjs} +30 -4
- package/dist/{api-keys-BHAgmC4E.mjs → api-keys-BixCnZJW.mjs} +5 -5
- package/dist/{auth-D-PZAjdd.mjs → auth-yCNMT8sJ.mjs} +14 -7
- package/dist/{auth.handler-CxTDSO6O.mjs → auth.handler-BedGpKh1.mjs} +7 -12
- package/dist/{build-agents-DseUtzd4-BNtZrqoY.mjs → build-agents-DseUtzd4-DFh2e5Cn.mjs} +5 -5
- package/dist/{build-metadata-BB_L45ZS-d5-QLDZ5.mjs → build-metadata-BB_L45ZS-BtGGjHIV.mjs} +7 -7
- package/dist/{build-progress-BVwDg6lC.mjs → build-progress-nYa14iBP.mjs} +1 -1
- package/dist/{build-tasks-C09SdfjC-DxKcmENc.mjs → build-tasks-C09SdfjC-B0F7BZZG.mjs} +3 -3
- package/dist/{build-workflows-BZ_m97Pr-DwcnRlyh.mjs → build-workflows-BZ_m97Pr-DKANy85L.mjs} +9 -8
- package/dist/{build.handler-CTX80S1K.mjs → build.handler-CyDc8jiZ.mjs} +5 -5
- package/dist/{chunk-DYxdGL9S.mjs → chunk-CH6r78ws.mjs} +1 -2
- package/dist/{clear-cache.handler-8RFmjHoo.mjs → clear-cache.handler-FmJPHdWG.mjs} +1 -1
- package/dist/{clear.handler-Bksm2HI4.mjs → clear.handler-Cvb9chs4.mjs} +27 -13
- package/dist/{commander-DQLrBSIW.mjs → commander-9Kro0Dl3.mjs} +4 -7
- package/dist/common-AK0q0Oz0.mjs +20 -0
- package/dist/{connect-DV_EztVs.mjs → connect-_l7Lkfxi.mjs} +26 -2
- package/dist/{connect.handler-DbuGt3Xb.mjs → connect.handler-tqk-DOv8.mjs} +39 -4
- package/dist/{context-BUzxM3QI.mjs → context-B2cQ-Nt3.mjs} +30 -4
- package/dist/{create.handler-CQCRk-Na.mjs → create.handler-v9B0Z9Yf.mjs} +1 -1
- package/dist/{credential-env-map-qLCR_QbO.mjs → credential-env-map-Dvp00a4M.mjs} +1 -1
- package/dist/credential-requirements-D0mavK8j-CFMf0Xwu.mjs +619 -0
- package/dist/{credentials-xPtLFTjW.mjs → credentials-DQW8xxof.mjs} +2 -2
- package/dist/{credentials-m18a1_hw.mjs → credentials-Dr5lD7Hm.mjs} +6 -6
- package/dist/{current-deployment-workflow-pyBoobIm.mjs → current-deployment-workflow-qMfOrRIu.mjs} +4 -4
- package/dist/{current.handler-BJGJgdGP.mjs → current.handler-Cm_-JLyZ.mjs} +1 -1
- package/dist/declared-credential-requirements-B6h4WRv4.mjs +103 -0
- package/dist/{delete.handler-DNoehdOH.mjs → delete.handler-DtP_zUaq.mjs} +1 -1
- package/dist/{deploy-BKjcO_sm.mjs → deploy-BURTx92e.mjs} +1 -1
- package/dist/{deploy-3tHCBGky.mjs → deploy-CB6pfCuB.mjs} +2 -2
- package/dist/{deploy-progress-CyolzjRB.mjs → deploy-progress-Dlp9aBDW.mjs} +1 -1
- package/dist/{deploy.handler-TnPNBYXZ.mjs → deploy.handler-Bg0dpSTj.mjs} +16 -16
- package/dist/{detect-env-access-CwkOYeYM-D8-hxij0.mjs → detect-env-access-CwkOYeYM-D4aTZv4R.mjs} +2 -2
- package/dist/{diff.handler-DO2WzdGB.mjs → diff.handler-CJPrszL1.mjs} +4 -4
- package/dist/{dist-BGrWr5fp.mjs → dist-Br4m3sFZ.mjs} +14 -12
- package/dist/{dist-CIInPRGh.mjs → dist-DuJjDZIf.mjs} +25 -2
- package/dist/{env.handler-C5GNyiJt.mjs → env.handler-6TrLd3fo.mjs} +7 -7
- package/dist/{error-boundary-GtRvP2oP.mjs → error-boundary-DVZipk-A.mjs} +1 -1
- package/dist/{file-metadata-B8c7Y5yg.mjs → file-metadata-DQVDjr7M.mjs} +1 -1
- package/dist/{import-module-y0glInUe-CfNsQNia.mjs → import-module-y0glInUe-DxX0-BRO.mjs} +274 -28
- package/dist/{init-D9RIT2CY.mjs → init-DBMtY3eO.mjs} +3 -3
- package/dist/{init.handler-0TJY1YNy.mjs → init.handler-BoYbE-6H.mjs} +3 -3
- package/dist/{inspect.handler-BrYFfN4H.mjs → inspect.handler-Juu2vGbB.mjs} +4 -4
- package/dist/{integration-catalog-BrJsBkfx.mjs → integration-catalog-cYlTmOSb.mjs} +1 -1
- package/dist/{integrations-vSyAQ6HA.mjs → integrations-Cdq7iSLj.mjs} +5 -5
- package/dist/{invites-BASM4PJr.mjs → invites-DHyHZOY_.mjs} +4 -4
- package/dist/{invites.list.handler-c-aw6g5o.mjs → invites.list.handler-C-QpsG2J.mjs} +1 -1
- package/dist/{invites.resend.handler-MnMEjP_Z.mjs → invites.resend.handler-KFKbSPzR.mjs} +1 -1
- package/dist/{invites.revoke.handler-CHX6Z8kj.mjs → invites.revoke.handler-Cuz7jrGC.mjs} +1 -1
- package/dist/keystroke.mjs +21 -21
- package/dist/{list-enrichment-DcplcioC.mjs → list-enrichment-CCRHYslm.mjs} +1 -1
- package/dist/{list.handler-DJNtXw7C.mjs → list.handler-6x3GVumu.mjs} +1 -1
- package/dist/{list2.handler-BdE1k2kl.mjs → list.handler-BWsl4iYw.mjs} +4 -4
- package/dist/{list.handler-BsgCd1oF.mjs → list.handler-CLGQDuo5.mjs} +5 -5
- package/dist/{list.handler-CynN-ezD.mjs → list.handler-Cc-V1TNz.mjs} +1 -1
- package/dist/{list.handler-DXwKdfIv.mjs → list.handler-DRe38pAj.mjs} +2 -2
- package/dist/{list.handler-CDtjm-6d.mjs → list.handler-Do2tVOnu.mjs} +1 -1
- package/dist/{list.handler-BBzB1_1l.mjs → list.handler-RtHhrTZ3.mjs} +1 -1
- package/dist/{listen-Ca9KdiB2.mjs → listen-DZdSevsB.mjs} +2 -2
- package/dist/{listen.handler-KWPN03S8.mjs → listen.handler-BccHe1jh.mjs} +2 -2
- package/dist/{logs-BEDf7hZ0.mjs → logs-Bh_PBnu6.mjs} +3 -3
- package/dist/{logs.handler-mk1lcZbU.mjs → logs.handler-DItDS1zw.mjs} +2 -2
- package/dist/{members.add.handler-CTvlxBZU.mjs → members.add.handler-D3nQ_Ln6.mjs} +1 -1
- package/dist/{members.invite.handler-wFO0r7Pi.mjs → members.invite.handler-rKhg5n_C.mjs} +1 -1
- package/dist/{members.list.handler-PPdqs4nI.mjs → members.list.handler-C9Yh469k.mjs} +1 -1
- package/dist/{members.remove.handler-a5WI6zE4.mjs → members.remove.handler-Dnrck-E6.mjs} +1 -1
- package/dist/{members.update.handler-3xblTzmz.mjs → members.update.handler-qo5r6arJ.mjs} +1 -1
- package/dist/{metadata-layout-Bv-B0nHj-DtMWZ7Cc.mjs → metadata-layout-Bv-B0nHj-CO8mjjSl.mjs} +1 -1
- package/dist/{normalize-path-CojS-CgQ-CRqBc6D6.mjs → normalize-path-CojS-CgQ-aOM0agxS.mjs} +1 -1
- package/dist/{org-CzLw3neZ.mjs → org-DnES84sS.mjs} +15 -15
- package/dist/{orgs.create.handler-CcPpDweZ.mjs → orgs.create.handler-DF4eEL-2.mjs} +1 -1
- package/dist/{orgs.get.handler-BACPg7vR.mjs → orgs.get.handler-BmJnseQa.mjs} +1 -1
- package/dist/{orgs.list.handler-DEF8OyvM.mjs → orgs.list.handler-DDVvSbsT.mjs} +1 -1
- package/dist/{paused.handler-D4j8_Za4.mjs → paused.handler-BLUchSMD.mjs} +1 -1
- package/dist/{projects-CJCKxG2u.mjs → projects-Cv14bBGy.mjs} +4 -4
- package/dist/{projects-s5ehKLil.mjs → projects-ZNcKwds2.mjs} +2 -2
- package/dist/{requirements.handler-Bk-sAE9C.mjs → requirements.handler-BKFocUof.mjs} +5 -5
- package/dist/{resolve-cli-credentials-DytxgMwn.mjs → resolve-cli-credentials-DaMDaamj.mjs} +1 -1
- package/dist/{resolve-project-CWP2fji3.mjs → resolve-project-Cj3MFnU0.mjs} +1 -1
- package/dist/{run-polling-DKclfet-.mjs → run-polling-3XOGl4hh.mjs} +3 -3
- package/dist/{run.handler-x0B-CjNF.mjs → run.handler-DZuUx0fi.mjs} +5 -5
- package/dist/{runs-DoMVOCNj.mjs → runs-BOo3j297.mjs} +2 -2
- package/dist/schemas-D2zfmyC-.mjs +671 -0
- package/dist/{skills-sync.handler-CYkCeuQn.mjs → skills-sync.handler-09mDbx5q.mjs} +1 -1
- package/dist/{skills.command-DeAgMGGw.mjs → skills.command-B-MhRN3J.mjs} +4 -4
- package/dist/{source-analysis-BBg2E_6G-BJTRqWrQ.mjs → source-analysis-BBg2E_6G-wPP9mjQx.mjs} +3 -3
- package/dist/{source-analysis-BMMPIHN9.mjs → source-analysis-z2RSZw6X.mjs} +1 -1
- package/dist/{src-BYQwp8Ig.mjs → src-DNhUmpSl.mjs} +1 -1
- package/dist/{switch.handler-CV4ZBXAu.mjs → switch.handler-BFGvj5c6.mjs} +2 -2
- package/dist/{sync-KCVM02IY.mjs → sync-CZ3iUPTA.mjs} +2 -2
- package/dist/{sync.handler-Cuw89341.mjs → sync.handler-B1L8I9lF.mjs} +7 -7
- package/dist/{task-BSCN9cU4.mjs → task-BWuIKWh4.mjs} +2 -392
- package/dist/{task-target-build-B0HF2_At.mjs → task-target-build-CTgl4L42.mjs} +5 -5
- package/dist/{task-target-deploy-ClbwKJ8K.mjs → task-target-deploy-DeUyfi9H.mjs} +1 -1
- package/dist/{task-target-deploy-dQYnMO8n-CeTmRcDw.mjs → task-target-deploy-dQYnMO8n-d2vdeqXH.mjs} +1 -1
- package/dist/task-target-deploy-runner.mjs +6 -6
- package/dist/{test-Rm3thni3.mjs → test-Byq4hG3C.mjs} +2 -2
- package/dist/{test.handler-CTd-heRS.mjs → test.handler-BsrMMj5O.mjs} +9 -9
- package/dist/{test.handler-DhhcsvHN.mjs → test.handler-CAsVgOpT.mjs} +1 -1
- package/dist/{tool.handler-C3LNyQbc.mjs → tool.handler-BHS5Z4J_.mjs} +63 -9
- package/dist/{trigger-artifacts-BcRScRSp-DqFgzl_B.mjs → trigger-artifacts-BcRScRSp-C-JBJ6y8.mjs} +4 -4
- package/dist/{trigger-manifest-DTni4NaZ.mjs → trigger-manifest-C07EM-b2.mjs} +6 -5
- package/dist/{upgrade-Cf7y38xR.mjs → upgrade-bZVjVXnu.mjs} +2 -2
- package/dist/{upload-CJWApEgz.mjs → upload-CE4H5R1h.mjs} +1 -1
- package/dist/{upload.handler-BHIWYPph.mjs → upload.handler-DXVx2u3A.mjs} +7 -7
- package/dist/{users.get.handler-spWaHG8h.mjs → users.get.handler-DqD2ELK2.mjs} +1 -1
- package/dist/{users.list.handler-DLuU7cd_.mjs → users.list.handler-DZSPvpGF.mjs} +1 -1
- package/dist/{users.set-role.handler-CojFmpcD.mjs → users.set-role.handler-73smNUVF.mjs} +1 -1
- package/dist/{utils-Ddltm1sR.mjs → utils-BaxDlCsW.mjs} +1 -1
- package/dist/{validate.handler-DIJBuX1P.mjs → validate.handler-CmfcMX0t.mjs} +4 -4
- package/dist/{workflow-build-IGYhEC8Y.mjs → workflow-build-Bi1Aacc5.mjs} +20 -20
- package/dist/workflow-build-manifest-1sC52TIG.mjs +259 -0
- package/dist/{workflow-bundler-BzHk73PM-Cs-4Ml-p.mjs → workflow-bundler-BzHk73PM-xQwAF08W.mjs} +2 -2
- package/dist/{workflows-MANdvLft.mjs → workflows-C_C13Zr0.mjs} +16 -14
- package/dist/{writer-byNNUjRm-w5O7-VT_.mjs → writer-byNNUjRm-B-on1n6c.mjs} +6 -6
- package/package.json +6 -6
- package/dist/schemas-U2OzP9gP.mjs +0 -281
- package/dist/src-BHTjsZ9V.mjs +0 -456
- /package/dist/{agent-manifest-CZ7BeUSG.mjs → agent-manifest-Pg0aURo7.mjs} +0 -0
- /package/dist/{browser-Cu4k-wT_.mjs → browser-Dvv5OQrt.mjs} +0 -0
- /package/dist/{clear.handler-mfNmIUYP.mjs → clear.handler-BdR56Cok.mjs} +0 -0
- /package/dist/{concurrency-gXn9Rw8x-BSBbRfVp.mjs → concurrency-gXn9Rw8x-CnBnF2cg.mjs} +0 -0
- /package/dist/{credential-schema-mismatch-BHI_B-U-.mjs → credential-schema-mismatch-kfGeiSB1.mjs} +0 -0
- /package/dist/{diff-utils-x5pi8SrL.mjs → diff-utils-CXKNQUXO.mjs} +0 -0
- /package/dist/{layout-DRf9qUf8.mjs → layout-B95Tku8F.mjs} +0 -0
- /package/dist/{logs.handler-CcA1UzJm.mjs → logs.handler-Bs1DVMaO.mjs} +0 -0
- /package/dist/{oxc-B3KI3rf_-Cnk0L10M.mjs → oxc-B3KI3rf_-B9omBIuN.mjs} +0 -0
- /package/dist/{read-credential-keys-77a91T8M-CzXPGxdU.mjs → read-credential-keys-77a91T8M-aLuQvlIq.mjs} +0 -0
- /package/dist/{register.handler-CSvlOMF6.mjs → register.handler-C_NqMLir.mjs} +0 -0
- /package/dist/{rolldown-runtime-twds-ZHy-BoF7MLzP.mjs → rolldown-runtime-twds-ZHy-RuJszab7.mjs} +0 -0
- /package/dist/{run-polling-CzyVv7Ba.mjs → run-polling-DKWPGLyF.mjs} +0 -0
- /package/dist/{schema-CvSZqa3t.mjs → schema-DFJiNWyd.mjs} +0 -0
- /package/dist/{schema-display-DxLA3j5H.mjs → schema-display-XrRCdFL0.mjs} +0 -0
- /package/dist/{skill-installer-CYFshTBy.mjs → skill-installer-Cm9hF6OB.mjs} +0 -0
- /package/dist/{skills.handler-Bma-MJX-.mjs → skills.handler-KEUkV5NH.mjs} +0 -0
- /package/dist/{spinner-progress-DV28G4tP.mjs → spinner-progress-BtEIJRX4.mjs} +0 -0
- /package/dist/{status.handler-BOV0eX3J.mjs → status.handler-CW-EFhy3.mjs} +0 -0
- /package/dist/{types-DamInJD6.mjs → types-D1cVpE7_.mjs} +0 -0
- /package/dist/{upgrade.handler-Bz_oQcAw.mjs → upgrade.handler-C7KvNL0x.mjs} +0 -0
package/dist/{current-deployment-workflow-pyBoobIm.mjs → current-deployment-workflow-qMfOrRIu.mjs}
RENAMED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { A as WorkflowResolutionError, a as ui, g as getHttpStatus, h as getApiErrorCode } from "./keystroke.mjs";
|
|
4
4
|
import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
|
|
5
|
-
import { a as readManifestsFromOutDir } from "./dist-
|
|
6
|
-
import { t as requireWorkflowsDir } from "./resolve-project-
|
|
7
|
-
import { t as createSpinnerProgress } from "./spinner-progress-
|
|
8
|
-
import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-
|
|
5
|
+
import { a as readManifestsFromOutDir } from "./dist-Br4m3sFZ.mjs";
|
|
6
|
+
import { t as requireWorkflowsDir } from "./resolve-project-Cj3MFnU0.mjs";
|
|
7
|
+
import { t as createSpinnerProgress } from "./spinner-progress-BtEIJRX4.mjs";
|
|
8
|
+
import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-Bi1Aacc5.mjs";
|
|
9
9
|
//#region src/commands/workflows/_shared/current-deployment-workflow.ts
|
|
10
10
|
/**
|
|
11
11
|
* Lightweight resolution: gets projectId from keystroke.config.ts and authoredWorkflowId
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { a as ui } from "./keystroke.mjs";
|
|
4
|
-
import { i as requireClient } from "./context-
|
|
4
|
+
import { i as requireClient } from "./context-B2cQ-Nt3.mjs";
|
|
5
5
|
//#region src/commands/org/current.handler.ts
|
|
6
6
|
async function handleOrgCurrent(_options, ctx) {
|
|
7
7
|
if (!ctx.organizationId) {
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import "zod";
|
|
4
|
+
import { createHash } from "node:crypto";
|
|
5
|
+
//#region ../../packages/workflow-build-contracts/src/schema-fingerprint.ts
|
|
6
|
+
/**
|
|
7
|
+
* schema-fingerprint.ts
|
|
8
|
+
*
|
|
9
|
+
* Computes a deterministic fingerprint (hash) of a credential set's schema.
|
|
10
|
+
* Used as a persistence-layer identity stamp: the workflow-builder stamps each
|
|
11
|
+
* credential requirement with its fingerprint at build time, the server stamps
|
|
12
|
+
* each vault row with the fingerprint at upload time, and the executor's
|
|
13
|
+
* credential resolver compares the two at read time so schema drift surfaces
|
|
14
|
+
* as a `CredentialSchemaMismatchError` rather than a silent decode into a
|
|
15
|
+
* stale shape.
|
|
16
|
+
*
|
|
17
|
+
* The fingerprint is deterministic: identical JSON schemas always produce the
|
|
18
|
+
* same hash regardless of property ordering, timestamps, or other
|
|
19
|
+
* non-structural differences.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* This is the *persistence* fingerprint. The construction-time registry in
|
|
23
|
+
* `credential-set/registry.ts` uses a different (Zod-structural) fingerprint
|
|
24
|
+
* purely for in-process identity collision detection; the two fingerprints
|
|
25
|
+
* serve different purposes and do not need to match.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Compute a deterministic fingerprint for a JSON schema object.
|
|
29
|
+
*
|
|
30
|
+
* The schema is the output of `schemaToJsonSchema(zodSchema)` — a plain JSON
|
|
31
|
+
* object describing the shape of the Zod schema.
|
|
32
|
+
*
|
|
33
|
+
* Properties are sorted recursively before hashing to ensure deterministic
|
|
34
|
+
* output regardless of insertion order.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const auth = schemaToJsonSchema(credentialSet.auth);
|
|
39
|
+
* const stored = credentialSet.stored ? schemaToJsonSchema(credentialSet.stored) : undefined;
|
|
40
|
+
* const fingerprint = computeSchemaFingerprint(auth, stored);
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @see CredentialSchemaMismatchError
|
|
44
|
+
*/
|
|
45
|
+
function computeSchemaFingerprint(authSchema, storedSchema) {
|
|
46
|
+
const normalized = sortDeep({
|
|
47
|
+
auth: authSchema,
|
|
48
|
+
...storedSchema ? { stored: storedSchema } : {}
|
|
49
|
+
});
|
|
50
|
+
const json = JSON.stringify(normalized);
|
|
51
|
+
return createHash("sha256").update(json).digest("hex").substring(0, 16);
|
|
52
|
+
}
|
|
53
|
+
function sortDeep(value) {
|
|
54
|
+
if (value === null || value === void 0) return value;
|
|
55
|
+
if (Array.isArray(value)) return value.map(sortDeep);
|
|
56
|
+
if (typeof value === "object") {
|
|
57
|
+
const sorted = {};
|
|
58
|
+
for (const key of Object.keys(value).sort()) sorted[key] = sortDeep(value[key]);
|
|
59
|
+
return sorted;
|
|
60
|
+
}
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region ../../packages/workflow-build-contracts/src/declared-credential-requirements.ts
|
|
65
|
+
function readSchemaKeys(schema, propertyKey) {
|
|
66
|
+
if (schema === null || typeof schema !== "object") return [];
|
|
67
|
+
const candidate = schema[propertyKey];
|
|
68
|
+
if (candidate === null || typeof candidate !== "object" || Array.isArray(candidate)) return [];
|
|
69
|
+
return Object.keys(candidate).sort();
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Returns sorted keys that are NOT listed in the JSON Schema `required` array.
|
|
73
|
+
*/
|
|
74
|
+
function readOptionalJsonSchemaKeys(schema) {
|
|
75
|
+
if (schema === null || typeof schema !== "object") return [];
|
|
76
|
+
const record = schema;
|
|
77
|
+
const properties = record.properties;
|
|
78
|
+
if (properties === null || typeof properties !== "object" || Array.isArray(properties)) return [];
|
|
79
|
+
const requiredSet = new Set(Array.isArray(record.required) ? record.required : []);
|
|
80
|
+
return Object.keys(properties).filter((key) => !requiredSet.has(key)).sort();
|
|
81
|
+
}
|
|
82
|
+
function manifestToDeclaredCredentialRequirement(credentialSet) {
|
|
83
|
+
const authKeys = readSchemaKeys(credentialSet.auth, "properties");
|
|
84
|
+
const optionalAuthKeys = readOptionalJsonSchemaKeys(credentialSet.auth);
|
|
85
|
+
const storedSchema = credentialSet.auth;
|
|
86
|
+
const storedKeys = readSchemaKeys(storedSchema, "properties");
|
|
87
|
+
const optionalStoredKeys = readOptionalJsonSchemaKeys(storedSchema);
|
|
88
|
+
const schemaFingerprint = credentialSet.auth ? computeSchemaFingerprint(credentialSet.auth) : void 0;
|
|
89
|
+
const onCredentialRevoked = credentialSet.onCredentialRevoked;
|
|
90
|
+
return {
|
|
91
|
+
credentialSetId: credentialSet.id,
|
|
92
|
+
credentialKeys: authKeys,
|
|
93
|
+
...optionalAuthKeys.length > 0 ? { optionalCredentialKeys: optionalAuthKeys } : {},
|
|
94
|
+
storedCredentialKeys: storedKeys,
|
|
95
|
+
...optionalStoredKeys.length > 0 ? { optionalStoredCredentialKeys: optionalStoredKeys } : {},
|
|
96
|
+
...schemaFingerprint ? { schemaFingerprint } : {},
|
|
97
|
+
...onCredentialRevoked ? { onCredentialRevoked } : {},
|
|
98
|
+
...credentialSet.proxy ? { proxy: credentialSet.proxy } : {},
|
|
99
|
+
...credentialSet.needsRawSecret === true ? { needsRawSecret: true } : {}
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
export { readOptionalJsonSchemaKeys as n, manifestToDeclaredCredentialRequirement as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { a as ui, j as throwReportedCliExit, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
-
import { i as requireClient } from "./context-
|
|
4
|
+
import { i as requireClient } from "./context-B2cQ-Nt3.mjs";
|
|
5
5
|
//#region src/commands/api-keys/delete.handler.ts
|
|
6
6
|
async function handleApiKeysDelete(options, ctx) {
|
|
7
7
|
const client = requireClient(ctx);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { a as createKyInstance, n as auth, r as bundles, s as getClientEnv, t as projects } from "./projects-
|
|
3
|
+
import { a as createKyInstance, n as auth, r as bundles, s as getClientEnv, t as projects } from "./projects-ZNcKwds2.mjs";
|
|
4
4
|
//#region ../../packages/workflow-sdk/src/deploy.ts
|
|
5
5
|
function createDeployClient(config = {}) {
|
|
6
6
|
const env = getClientEnv();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { t as createTypedCommand } from "./commander-
|
|
3
|
+
import { t as createTypedCommand } from "./commander-9Kro0Dl3.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/commands/deploy/deploy.command.ts
|
|
6
6
|
/**
|
|
@@ -64,7 +64,7 @@ function createDeployCommand() {
|
|
|
64
64
|
schema: DeployOptionsSchema,
|
|
65
65
|
optionsConfig: DEPLOY_OPTIONS_CONFIG,
|
|
66
66
|
contextMode: "auth",
|
|
67
|
-
loadHandler: async () => (await import("./deploy.handler-
|
|
67
|
+
loadHandler: async () => (await import("./deploy.handler-Bg0dpSTj.mjs")).handleDeploy
|
|
68
68
|
});
|
|
69
69
|
cmd.enablePositionalOptions();
|
|
70
70
|
cmd.passThroughOptions();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { a as ui } from "./keystroke.mjs";
|
|
4
|
-
import { t as createSpinnerProgress } from "./spinner-progress-
|
|
4
|
+
import { t as createSpinnerProgress } from "./spinner-progress-BtEIJRX4.mjs";
|
|
5
5
|
//#region src/lib/deploy-progress.ts
|
|
6
6
|
function renderItemFailure(event, kind, spinner) {
|
|
7
7
|
if (event.result === "failure") spinner.fail(`${kind} failed (${event.name})`, void 0, event.error);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { D as CliExitError, P as logger, a as ui, l as isLocalMode, n as style, t as ANSI } from "./keystroke.mjs";
|
|
4
|
-
import { i as projects } from "./dist-
|
|
4
|
+
import { i as projects } from "./dist-DuJjDZIf.mjs";
|
|
5
5
|
import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
|
|
6
|
-
import { r as requireAuthOptions, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-
|
|
7
|
-
import { i as readAgentManifestsFromOutDir, o as readWorkflowsFromDisk } from "./dist-
|
|
8
|
-
import { t as requireWorkflowsDir } from "./resolve-project-
|
|
9
|
-
import { n as renderBuildFailure, r as renderBuildHeader } from "./workflow-build-
|
|
10
|
-
import { t as createBuildProgress } from "./build-progress-
|
|
11
|
-
import { t as createDeployProgress } from "./deploy-progress-
|
|
12
|
-
import { t as withErrorBoundary } from "./error-boundary-
|
|
13
|
-
import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-
|
|
14
|
-
import { t as computeWorkflowDiff } from "./diff-utils-
|
|
6
|
+
import { r as requireAuthOptions, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-B2cQ-Nt3.mjs";
|
|
7
|
+
import { i as readAgentManifestsFromOutDir, o as readWorkflowsFromDisk } from "./dist-Br4m3sFZ.mjs";
|
|
8
|
+
import { t as requireWorkflowsDir } from "./resolve-project-Cj3MFnU0.mjs";
|
|
9
|
+
import { n as renderBuildFailure, r as renderBuildHeader } from "./workflow-build-Bi1Aacc5.mjs";
|
|
10
|
+
import { t as createBuildProgress } from "./build-progress-nYa14iBP.mjs";
|
|
11
|
+
import { t as createDeployProgress } from "./deploy-progress-Dlp9aBDW.mjs";
|
|
12
|
+
import { t as withErrorBoundary } from "./error-boundary-DVZipk-A.mjs";
|
|
13
|
+
import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-qMfOrRIu.mjs";
|
|
14
|
+
import { t as computeWorkflowDiff } from "./diff-utils-CXKNQUXO.mjs";
|
|
15
15
|
import path from "node:path";
|
|
16
16
|
import { access } from "node:fs/promises";
|
|
17
17
|
//#region src/commands/deploy/deploy-diff.ts
|
|
@@ -198,7 +198,7 @@ async function handleDeploy(options, ctx) {
|
|
|
198
198
|
let outDir;
|
|
199
199
|
let artifactFilter;
|
|
200
200
|
try {
|
|
201
|
-
const { runWorkflowBuild } = await import("./workflow-build-
|
|
201
|
+
const { runWorkflowBuild } = await import("./workflow-build-Bi1Aacc5.mjs").then((n) => n.o);
|
|
202
202
|
const buildOutcome = await runWorkflowBuild({
|
|
203
203
|
workflowsDir,
|
|
204
204
|
verbose: options.verbose,
|
|
@@ -233,7 +233,7 @@ async function handleDeploy(options, ctx) {
|
|
|
233
233
|
const progress = createDeployProgress();
|
|
234
234
|
let result;
|
|
235
235
|
try {
|
|
236
|
-
result = await (deployHandlerDependencies.deployFromDir ?? (await import("./dist-
|
|
236
|
+
result = await (deployHandlerDependencies.deployFromDir ?? (await import("./dist-Br4m3sFZ.mjs").then((n) => n.r)).deployFromDir)({
|
|
237
237
|
outDir,
|
|
238
238
|
workflowsDir,
|
|
239
239
|
client,
|
|
@@ -271,7 +271,7 @@ function emitNewWebhookCredentials(result) {
|
|
|
271
271
|
}
|
|
272
272
|
async function handleTaskTargetDeploy(options) {
|
|
273
273
|
renderBuildHeader(void 0);
|
|
274
|
-
const buildResult = await (deployHandlerDependencies.buildTaskTargets ?? (await import("./task-target-build-
|
|
274
|
+
const buildResult = await (deployHandlerDependencies.buildTaskTargets ?? (await import("./task-target-build-CTgl4L42.mjs")).buildTaskTargets)({
|
|
275
275
|
projectRoot: options.workflowsDir,
|
|
276
276
|
targetFiles: options.targetFiles,
|
|
277
277
|
disableSourcemaps: options.options.disableSourcemaps
|
|
@@ -289,7 +289,7 @@ async function handleTaskTargetDeploy(options) {
|
|
|
289
289
|
const progress = createDeployProgress();
|
|
290
290
|
let result;
|
|
291
291
|
try {
|
|
292
|
-
result = await (deployHandlerDependencies.deployTaskTargets ?? (await import("./task-target-deploy-
|
|
292
|
+
result = await (deployHandlerDependencies.deployTaskTargets ?? (await import("./task-target-deploy-DeUyfi9H.mjs")).deployTaskTargets)({
|
|
293
293
|
preparedTasks: buildResult.preparedTasks,
|
|
294
294
|
client,
|
|
295
295
|
organizationId: options.projectConfig.organizationId,
|
|
@@ -312,7 +312,7 @@ async function handleTaskTargetDeploy(options) {
|
|
|
312
312
|
}
|
|
313
313
|
async function createFullDeployClient(ctx) {
|
|
314
314
|
const authOptions = requireAuthOptions(ctx);
|
|
315
|
-
const { createClient } = await import("./src-
|
|
315
|
+
const { createClient } = await import("./src-DNhUmpSl.mjs");
|
|
316
316
|
return createClient({
|
|
317
317
|
...authOptions,
|
|
318
318
|
onRequest: (info) => logger.debug(`-> ${info.method} ${info.url}`, {
|
|
@@ -327,7 +327,7 @@ async function createFullDeployClient(ctx) {
|
|
|
327
327
|
}
|
|
328
328
|
async function createTaskDeployClient(ctx) {
|
|
329
329
|
const authOptions = requireAuthOptions(ctx);
|
|
330
|
-
return (deployHandlerDependencies.createDeployClient ?? (await import("./deploy-
|
|
330
|
+
return (deployHandlerDependencies.createDeployClient ?? (await import("./deploy-BURTx92e.mjs")).createDeployClient)(authOptions);
|
|
331
331
|
}
|
|
332
332
|
function renderSuccessSummary(result) {
|
|
333
333
|
const tasks = result.tasks || [];
|
package/dist/{detect-env-access-CwkOYeYM-D8-hxij0.mjs → detect-env-access-CwkOYeYM-D4aTZv4R.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { n as __exportAll } from "./chunk-
|
|
4
|
-
import { t as __exportAll$1 } from "./rolldown-runtime-twds-ZHy-
|
|
3
|
+
import { n as __exportAll } from "./chunk-CH6r78ws.mjs";
|
|
4
|
+
import { t as __exportAll$1 } from "./rolldown-runtime-twds-ZHy-RuJszab7.mjs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
//#region ../../packages/workflow-builder/dist/detect-env-access-CwkOYeYM.mjs
|
|
7
7
|
var detect_env_access_CwkOYeYM_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { D as CliExitError, a as ui, j as throwReportedCliExit, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
-
import { i as projects } from "./dist-
|
|
4
|
+
import { i as projects } from "./dist-DuJjDZIf.mjs";
|
|
5
5
|
import { i as writeJson } from "./output-BWcVRt-T.mjs";
|
|
6
|
-
import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-
|
|
7
|
-
import { n as resolveLocalWorkflowManifest, t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-
|
|
8
|
-
import { n as renderDiff, t as computeWorkflowDiff } from "./diff-utils-
|
|
6
|
+
import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-B2cQ-Nt3.mjs";
|
|
7
|
+
import { n as resolveLocalWorkflowManifest, t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-qMfOrRIu.mjs";
|
|
8
|
+
import { n as renderDiff, t as computeWorkflowDiff } from "./diff-utils-CXKNQUXO.mjs";
|
|
9
9
|
//#region src/commands/workflows/diff/diff.handler.ts
|
|
10
10
|
async function handleWorkflowsDiff(options, ctx) {
|
|
11
11
|
const resolved = await resolveLocalWorkflowManifest(options.workflow, options.path, { jsonMode: ctx.jsonMode });
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { n as __exportAll } from "./chunk-
|
|
3
|
+
import { n as __exportAll } from "./chunk-CH6r78ws.mjs";
|
|
4
4
|
import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { t as
|
|
13
|
-
import {
|
|
5
|
+
import { n as SHA256HashSchema } from "./common-AK0q0Oz0.mjs";
|
|
6
|
+
import { f as collectCredentialRequirementEntries, u as TriggerUploadDataSchema } from "./credential-requirements-D0mavK8j-CFMf0Xwu.mjs";
|
|
7
|
+
import { a as FlowGraphSchema, r as WorkflowBuildManifestSchema } from "./workflow-build-manifest-1sC52TIG.mjs";
|
|
8
|
+
import { t as AgentVersionManifestSchema } from "./agent-manifest-Pg0aURo7.mjs";
|
|
9
|
+
import { n as TaskBuildManifestSchema } from "./task-BWuIKWh4.mjs";
|
|
10
|
+
import { n as FileMetadataSchema } from "./file-metadata-DQVDjr7M.mjs";
|
|
11
|
+
import { t as computeProjectSnapshotHash } from "./task-target-deploy-dQYnMO8n-d2vdeqXH.mjs";
|
|
12
|
+
import { a as MANIFEST_FILE_NAME, d as getMetadataRoot, f as getTriggersDir, m as getWorkflowManifestPath, p as getWorkflowArtifactPaths, t as BUILD_DIR_NAME } from "./layout-B95Tku8F.mjs";
|
|
13
|
+
import { n as resolveProjectBuildOutputDir } from "./utils-BaxDlCsW.mjs";
|
|
14
|
+
import { t as TriggerBuildManifestSchema } from "./trigger-manifest-C07EM-b2.mjs";
|
|
15
|
+
import { t as batchUpload } from "./upload-CE4H5R1h.mjs";
|
|
14
16
|
import * as path$1 from "node:path";
|
|
15
17
|
import path from "node:path";
|
|
16
18
|
import * as fs from "node:fs/promises";
|
|
@@ -120,7 +122,7 @@ function collectSchemaFingerprintsFromAgentManifest(manifest) {
|
|
|
120
122
|
*/
|
|
121
123
|
async function collectCredentialFingerprintMapFromProjectDist(projectRoot) {
|
|
122
124
|
const map = /* @__PURE__ */ new Map();
|
|
123
|
-
for (const { manifest } of await readManifestsFromOutDir(projectRoot)) for (const entry of
|
|
125
|
+
for (const { manifest } of await readManifestsFromOutDir(projectRoot)) for (const entry of collectCredentialRequirementEntries(manifest.credentials)) if (entry.schemaFingerprint && !map.has(entry.credentialSetId)) map.set(entry.credentialSetId, entry.schemaFingerprint);
|
|
124
126
|
for (const { manifest } of await readAgentManifestsFromOutDir(projectRoot)) for (const [resolvedId, fp] of collectSchemaFingerprintsFromAgentManifest(manifest)) if (!map.has(resolvedId)) map.set(resolvedId, fp);
|
|
125
127
|
return map;
|
|
126
128
|
}
|
|
@@ -595,7 +597,7 @@ async function readTriggersFromBuildOutput(buildDir, options) {
|
|
|
595
597
|
const manifest = TriggerBuildManifestSchema.parse(JSON.parse(raw));
|
|
596
598
|
const pollExports = manifest.functions && Object.keys(manifest.functions).length > 0 ? Object.fromEntries(Object.entries(manifest.functions).map(([key, value]) => [key, value.export])) : void 0;
|
|
597
599
|
const pollBundlePath = manifest.functions ? Object.values(manifest.functions)[0]?.js : void 0;
|
|
598
|
-
const trigger =
|
|
600
|
+
const trigger = TriggerUploadDataSchema.parse({
|
|
599
601
|
id: manifest.id,
|
|
600
602
|
authoredTriggerId: manifest.authoredTriggerId,
|
|
601
603
|
type: manifest.type,
|
|
@@ -140,7 +140,30 @@ var KeychainVault = class {
|
|
|
140
140
|
return (await this.createEntry(this.service, account)).getPassword();
|
|
141
141
|
}
|
|
142
142
|
async set(account, secret) {
|
|
143
|
-
|
|
143
|
+
const entry = await this.createEntry(this.service, account);
|
|
144
|
+
try {
|
|
145
|
+
entry.setPassword(secret);
|
|
146
|
+
return;
|
|
147
|
+
} catch (error) {
|
|
148
|
+
try {
|
|
149
|
+
await this.verifyWritableKeychain(account);
|
|
150
|
+
entry.deleteCredential();
|
|
151
|
+
(await this.createEntry(this.service, account)).setPassword(secret);
|
|
152
|
+
} catch (replacementError) {
|
|
153
|
+
throw new AggregateError([error, replacementError], "Could not replace the existing keychain credential.");
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
async verifyWritableKeychain(account) {
|
|
158
|
+
const probeAccount = `${account}:replacement-probe:${process.pid}:${Date.now()}`;
|
|
159
|
+
const probeEntry = await this.createEntry(this.service, probeAccount);
|
|
160
|
+
try {
|
|
161
|
+
probeEntry.setPassword("probe");
|
|
162
|
+
} finally {
|
|
163
|
+
try {
|
|
164
|
+
probeEntry.deleteCredential();
|
|
165
|
+
} catch {}
|
|
166
|
+
}
|
|
144
167
|
}
|
|
145
168
|
async delete(account) {
|
|
146
169
|
return (await this.createEntry(this.service, account)).deleteCredential();
|
|
@@ -699,11 +722,11 @@ var Credentials = class {
|
|
|
699
722
|
secretStorage,
|
|
700
723
|
orgs: [input.org]
|
|
701
724
|
};
|
|
702
|
-
await this.metadata.write(newMeta);
|
|
703
725
|
await this.secrets.setApiKey({
|
|
704
726
|
orgId: input.org.organizationId,
|
|
705
727
|
serverUrl: input.serverUrl
|
|
706
728
|
}, input.apiKey, secretStorage.kind);
|
|
729
|
+
await this.metadata.write(newMeta);
|
|
707
730
|
if (existing) {
|
|
708
731
|
const previousOrg = existing.orgs.find((org) => org.organizationId === input.org.organizationId);
|
|
709
732
|
const serverUrlChanged = normalizeCredentialServerUrl(existing.serverUrl) !== normalizeCredentialServerUrl(input.serverUrl);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { D as CliExitError, _ as isAuthError, a as ui, j as throwReportedCliExit, m as REAUTH_HINT, n as style, t as ANSI, v as isNetworkError, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
-
import { i as projects } from "./dist-
|
|
4
|
+
import { i as projects } from "./dist-DuJjDZIf.mjs";
|
|
5
5
|
import { i as writeJson } from "./output-BWcVRt-T.mjs";
|
|
6
|
-
import { i as requireClient } from "./context-
|
|
7
|
-
import { n as CredentialConnectionIdSchema, r as CredentialScopeSchema, t as ConnectionStatusSchema } from "./schema-
|
|
8
|
-
import { a as readManifestsFromOutDir } from "./dist-
|
|
9
|
-
import { t as requireWorkflowsDir } from "./resolve-project-
|
|
10
|
-
import { t as getIntegrationCatalog } from "./integration-catalog-
|
|
11
|
-
import { t as groupCredentialRequirements } from "./credentials-
|
|
6
|
+
import { i as requireClient } from "./context-B2cQ-Nt3.mjs";
|
|
7
|
+
import { n as CredentialConnectionIdSchema, r as CredentialScopeSchema, t as ConnectionStatusSchema } from "./schema-DFJiNWyd.mjs";
|
|
8
|
+
import { a as readManifestsFromOutDir } from "./dist-Br4m3sFZ.mjs";
|
|
9
|
+
import { t as requireWorkflowsDir } from "./resolve-project-Cj3MFnU0.mjs";
|
|
10
|
+
import { t as getIntegrationCatalog } from "./integration-catalog-cYlTmOSb.mjs";
|
|
11
|
+
import { t as groupCredentialRequirements } from "./credentials-DQW8xxof.mjs";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
import Table from "cli-table3";
|
|
14
14
|
//#region ../../packages/shared-types/src/credentials/api/responses.ts
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { D as CliExitError, P as logger, a as ui, v as isNetworkError, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
4
|
import { r as isJsonMode } from "./output-BWcVRt-T.mjs";
|
|
5
|
-
import { n as renderCredentialSchemaMismatchText, r as writeCredentialSchemaMismatchJson, t as isCredentialSchemaMismatchErrorLike } from "./credential-schema-mismatch-
|
|
5
|
+
import { n as renderCredentialSchemaMismatchText, r as writeCredentialSchemaMismatchJson, t as isCredentialSchemaMismatchErrorLike } from "./credential-schema-mismatch-kfGeiSB1.mjs";
|
|
6
6
|
//#region src/lib/error-boundary.ts
|
|
7
7
|
async function withErrorBoundary(commandName, fn, options = {}) {
|
|
8
8
|
const jsonMode = options.json ?? isJsonMode({});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { a as SourceLocationSchema, r as CapturedVariableSchema } from "./source-analysis-z2RSZw6X.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
z.enum([
|
|
6
6
|
"pending",
|