@keystrokehq/cli 0.0.11 → 0.0.12
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-DWuxmMuY.mjs → accept.handler-BU6kg8ET.mjs} +1 -1
- package/dist/{admin-BK4bFTTd.mjs → admin-B4GNbCl5.mjs} +9 -9
- package/dist/{agent-manifest-sJFbH5H8.mjs → agent-manifest-CZdlCTFs.mjs} +5 -5
- package/dist/{agents-DYnw2VPX.mjs → agents-DDqXmmFV.mjs} +6 -6
- package/dist/api-DuKKdCpF.mjs +246 -0
- package/dist/{api-keys-Dizx3YqE.mjs → api-keys-BE_hLonn.mjs} +5 -5
- package/dist/{auth-BqsKd4IA.mjs → auth-DNK5MYm4.mjs} +5 -5
- package/dist/{auth.handler-BsoWeCFD.mjs → auth.handler-DrjDODhZ.mjs} +1 -1
- package/dist/{build-agents-DfbiMZ_e-CgnKa9A6.mjs → build-agents-DseUtzd4-DIDGsZWL.mjs} +12 -13
- package/dist/{build-metadata-zidV9Cai-Bq37kBOM.mjs → build-metadata-xqeWhaTS-WR8IooGe.mjs} +19 -35
- package/dist/{build-progress-DigAP-BN.mjs → build-progress-CITED2tv.mjs} +1 -1
- package/dist/{build-tasks-O1jYtlv1-Bkw0w1r3.mjs → build-tasks-GVuMLS0h-DnS9QWzf.mjs} +4 -4
- package/dist/{build-workflows-3fdvdHHf-BDTy9QgT.mjs → build-workflows-Dmzay1vP-DKVuBAjD.mjs} +17 -18
- package/dist/{build.handler-B2UDhh72.mjs → build.handler-DI146Cd3.mjs} +4 -4
- package/dist/{clear.handler-BR97yudD.mjs → clear.handler-B1c17nAi.mjs} +1 -1
- package/dist/{commander-DcftG6dX.mjs → commander-BwtBoukr.mjs} +2 -2
- package/dist/{common-B3bLe3Mk.mjs → common-BaGFkj3n.mjs} +2 -2
- package/dist/{connect-DQ4xIcyE.mjs → connect-IPcL37np.mjs} +12 -6
- package/dist/{connect.handler-CWSLgf87.mjs → connect.handler-ToY6qmMz.mjs} +74 -224
- package/dist/{context-1VgRbzr-.mjs → context-DQ4IA0yO.mjs} +1 -1
- package/dist/{create.handler-C2CkPWsy.mjs → create.handler-BAyG0PmG.mjs} +1 -1
- package/dist/credential-requirements-FtBk5JVB.mjs +250 -0
- package/dist/credentials-Bu1MBiCL.mjs +182 -0
- package/dist/{credentials-D8_AwH9o.mjs → credentials-CZiu-534.mjs} +12 -7
- package/dist/{current-deployment-workflow-B05z0EQa.mjs → current-deployment-workflow-B4IufKqe.mjs} +5 -5
- package/dist/{current.handler-CuAtMZmm.mjs → current.handler-DA4FGfUP.mjs} +1 -1
- package/dist/{declared-credential-requirements-BtlcsEVn.mjs → declared-credential-requirements-B6h4WRv4.mjs} +5 -34
- package/dist/{delete.handler-DDY3X1Zm.mjs → delete.handler-CJcyvnUF.mjs} +1 -1
- package/dist/{deploy-B8TYutOi.mjs → deploy-BvaFgVvf.mjs} +1 -1
- package/dist/{deploy-Cn6FFnOM.mjs → deploy-CqXOhecY.mjs} +2 -2
- package/dist/{deploy-progress-XAfautnA.mjs → deploy-progress-CLO-yidq.mjs} +1 -1
- package/dist/{deploy.handler-D1DcAe-h.mjs → deploy.handler-DQg_rXgs.mjs} +16 -16
- package/dist/{detect-env-access-CwkOYeYM-D4o8gRZs.mjs → detect-env-access-CwkOYeYM-EmkYvbfJ.mjs} +1 -1
- package/dist/{diff.handler-BU6IewNG.mjs → diff.handler-BXg47NIZ.mjs} +3 -3
- package/dist/{dist-DvO0q6Fo.mjs → dist-BMkNN03r.mjs} +16 -16
- package/dist/{env.handler-C6YAmHLi.mjs → env.handler-DFKzjIQT.mjs} +10 -7
- package/dist/{error-boundary-CpaVvFXk.mjs → error-boundary-B2ZKRkZI.mjs} +1 -1
- package/dist/{file-metadata-BvGM-B2v.mjs → file-metadata-Dwy9KKq_.mjs} +2 -2
- package/dist/{import-module-DDPnzlJ1-BIBSgOhK.mjs → import-module-DEI7R8Yh-Xz-KAPvB.mjs} +248 -246
- package/dist/{init-Da6_obl0.mjs → init-DhnABm3J.mjs} +2 -2
- package/dist/{init.handler-Cq2nk8DO.mjs → init.handler-QgehN8B4.mjs} +4 -4
- package/dist/{inspect.handler-D4YGryQB.mjs → inspect.handler-CerVdo23.mjs} +3 -3
- package/dist/{integration-catalog-DtNWaMvh.mjs → integration-catalog-BRrJIAVz.mjs} +5 -5
- package/dist/{integrations-CB_Ukq2g.mjs → integrations-7-U7nmkh.mjs} +7 -6
- package/dist/{invites-BOhuBtoq.mjs → invites-CmGmnUla.mjs} +4 -4
- package/dist/{invites.list.handler-C-Wv6E1g.mjs → invites.list.handler-CmkIf-uW.mjs} +1 -1
- package/dist/{invites.resend.handler-CI78XlQS.mjs → invites.resend.handler-FZl20yat.mjs} +1 -1
- package/dist/{invites.revoke.handler-DigAgNwB.mjs → invites.revoke.handler-D95mrfmB.mjs} +1 -1
- package/dist/keystroke.mjs +21 -21
- package/dist/{list-enrichment-Cxlq6BB9.mjs → list-enrichment-I4XQaMg0.mjs} +5 -1
- package/dist/{list.handler-OiLEylzS.mjs → list.handler-BrTW2viq.mjs} +1 -1
- package/dist/{list.handler-CsODcH6e.mjs → list.handler-Cp767f5l.mjs} +1 -1
- package/dist/{list.handler-BsyGhXns.mjs → list.handler-DRnHsEa0.mjs} +1 -1
- package/dist/{list.handler-B6IByHHB.mjs → list.handler-DXl8igi2.mjs} +13 -5
- package/dist/{list.handler-BpVNYShU.mjs → list.handler-DsYyTUhA.mjs} +1 -1
- package/dist/{list.handler--a1JEGSD.mjs → list.handler-H8aQSsFM.mjs} +3 -3
- package/dist/{list.handler-Dr9Ti-dt.mjs → list.handler-k8k7wVIV.mjs} +3 -3
- package/dist/{listen-DUPk6cZC.mjs → listen-DckJq0y0.mjs} +2 -2
- package/dist/{listen.handler-B5WimrfF.mjs → listen.handler-Bf5MXKPO.mjs} +2 -2
- package/dist/{logs-C5_4lh3p.mjs → logs-D_l5BIn2.mjs} +3 -3
- package/dist/{logs.handler-CBHPwDuC.mjs → logs.handler-kYO3Uv9t.mjs} +2 -2
- package/dist/{members.add.handler-LcQJYBsu.mjs → members.add.handler-C2cppd-9.mjs} +1 -1
- package/dist/{members.invite.handler-p279O2aC.mjs → members.invite.handler-DY6kS4LN.mjs} +1 -1
- package/dist/{members.list.handler-Cjukjuot.mjs → members.list.handler-CFBG3SBw.mjs} +1 -1
- package/dist/{members.remove.handler-CzxPiQFv.mjs → members.remove.handler-LQ61_qip.mjs} +1 -1
- package/dist/{members.update.handler-CX5q86e3.mjs → members.update.handler-CqISA1mf.mjs} +1 -1
- package/dist/{normalize-path-CojS-CgQ-D_WTiHKw.mjs → normalize-path-CojS-CgQ-D5D0AIHR.mjs} +1 -1
- package/dist/{org-CnlKW-Hl.mjs → org-KQ2nD0yN.mjs} +15 -15
- package/dist/{orgs.create.handler-DRILhxdn.mjs → orgs.create.handler-Mv5CTGcG.mjs} +1 -1
- package/dist/{orgs.get.handler-Cue6stoX.mjs → orgs.get.handler-DvvOhshX.mjs} +1 -1
- package/dist/{orgs.list.handler-fuDLNI5X.mjs → orgs.list.handler-wWAg6cKg.mjs} +1 -1
- package/dist/{paused.handler-CuOVH4DZ.mjs → paused.handler-CbMkPD9e.mjs} +1 -1
- package/dist/{project-config-D9eFU8Jk.mjs → project-config-CJGSh2RQ.mjs} +4 -7
- package/dist/{projects-DN7dX6nN.mjs → projects-CWLOF5x4.mjs} +656 -3
- package/dist/{projects-DdgHbUpR.mjs → projects-CYqeKQGT.mjs} +4 -4
- package/dist/{requirements.handler-CX13XiXT.mjs → requirements.handler-CnDTBcH5.mjs} +5 -5
- package/dist/{resolve-project-C6UAOfAG.mjs → resolve-project-bVPMcs-y.mjs} +1 -1
- package/dist/{run-polling-1CTIeDea.mjs → run-polling-49w3PYAv.mjs} +3 -3
- package/dist/{run.handler-BxLH75WW.mjs → run.handler-CX3YiJmj.mjs} +5 -5
- package/dist/{runs-lfE7r6i2.mjs → runs-HJejvQnQ.mjs} +2 -2
- package/dist/{schema-BgGlAs8a.mjs → schema-DFJiNWyd.mjs} +2 -1
- package/dist/schemas-DodkHgnS.mjs +280 -0
- package/dist/{skills-sync.handler-CntKndFm.mjs → skills-sync.handler-Cf74vKJA.mjs} +1 -1
- package/dist/{skills.command-X5zZwz2d.mjs → skills.command-KyAwBeST.mjs} +3 -3
- package/dist/{source-analysis-CHkWMC40.mjs → source-analysis-CJPymdaA.mjs} +1 -1
- package/dist/{source-analysis-DEEChuND-Csu0oOlw.mjs → source-analysis-DEEChuND-zifGW9QF.mjs} +3 -3
- package/dist/{src--fCtOxNX.mjs → src-D-dFmoAF.mjs} +1 -1
- package/dist/{switch.handler-RaeKZ3ZB.mjs → switch.handler-DfsKVtR6.mjs} +1 -1
- package/dist/{sync-C89mJp7Y.mjs → sync-Coh9YPjY.mjs} +2 -2
- package/dist/{sync.handler-BoAHHUQs.mjs → sync.handler-vvFIUut1.mjs} +6 -6
- package/dist/{schedule-BWAI6qLx.mjs → task-BBgEvdG1.mjs} +395 -25
- package/dist/{task-target-build-D5IrHqSl.mjs → task-target-build-atWwwnSF.mjs} +8 -8
- package/dist/task-target-deploy-CRsrQTOy.mjs +4 -0
- package/dist/{task-target-deploy-Bf5i3ox1-2K0hAwzk.mjs → task-target-deploy-CZBGNC0H-BwPSfaJQ.mjs} +2 -2
- package/dist/task-target-deploy-runner.mjs +5 -5
- package/dist/{test-gPQJRkqa.mjs → test-BzpSLhV8.mjs} +32 -144
- package/dist/{test.handler-B5GF5txS.mjs → test.handler-St9sBXyH.mjs} +1 -1
- package/dist/{trigger-artifacts-B3OCTX9K-ME6IVdUB.mjs → trigger-artifacts-RizI57RC-C-yCtEi-.mjs} +9 -9
- package/dist/{trigger-manifest-B3Gq1739.mjs → trigger-manifest-D5rnpPkA.mjs} +1 -1
- package/dist/{try-deploy.handler-dA_YGWRq.mjs → try-deploy.handler-32lU1tg4.mjs} +9 -9
- package/dist/{upgrade-xByIxaYu.mjs → upgrade-YavAf8AC.mjs} +2 -2
- package/dist/{upload.handler-BFDM6n_6.mjs → upload.handler-DemogvI1.mjs} +129 -18
- package/dist/{users.get.handler-CzaYM2bi.mjs → users.get.handler-B20PMSbl.mjs} +1 -1
- package/dist/{users.list.handler-CpOWwzBb.mjs → users.list.handler-BplFTjv3.mjs} +1 -1
- package/dist/{users.set-role.handler-BjiSNP2d.mjs → users.set-role.handler-wdmI6o3G.mjs} +1 -1
- package/dist/{utils-C_qCshBA.mjs → utils-DpEtybzI.mjs} +2 -2
- package/dist/{validate.handler-BtDSKAFY.mjs → validate.handler-BoRyygMl.mjs} +3 -3
- package/dist/{workflow-build-Z2_jkOsZ.mjs → workflow-build-CoJMwpPO.mjs} +32 -32
- package/dist/{workflow-manifest-BfL74mjp.mjs → workflow-build-manifest-OPFqFD6f.mjs} +26 -28
- package/dist/{workflow-bundler-BzHk73PM-tt09RbIA.mjs → workflow-bundler-BzHk73PM-UJQa7Ubk.mjs} +2 -2
- package/dist/{workflows-V09d2r2H.mjs → workflows-Cag9O9hx.mjs} +26 -27
- package/dist/{writer-CtvttJdP-DZJ0mZCm.mjs → writer-CtvttJdP-BfNsrheU.mjs} +5 -5
- package/package.json +10 -8
- package/dist/constants-BUgIAu2a.mjs +0 -8
- package/dist/credential-requirements-BCW8aQWS.mjs +0 -480
- package/dist/credentials-DAQfKqn0.mjs +0 -152025
- package/dist/get-intrinsic-BjqiGgLt.mjs +0 -658
- package/dist/hosted-action-dispatcher-registry-BWEtn13o.mjs +0 -126
- package/dist/schema-B-Wgo4rJ.mjs +0 -81
- package/dist/schemas-9FmGqrPT.mjs +0 -42
- package/dist/task-1qz1XNq7.mjs +0 -96
- package/dist/task-target-deploy-Bzfftyru.mjs +0 -4
- /package/dist/{agent-bundle-package-DWV6B_5q-B-qzc3zC.mjs → agent-bundle-package-DWV6B_5q-cB76j6UL.mjs} +0 -0
- /package/dist/{browser-CvuyMLhI.mjs → browser-B4K0VW8p.mjs} +0 -0
- /package/dist/{clear-cache.handler-D-wboLB6.mjs → clear-cache.handler-Dywqc7TG.mjs} +0 -0
- /package/dist/{clear.handler-BC6pz0x-.mjs → clear.handler-ui4e1CnJ.mjs} +0 -0
- /package/dist/{concurrency-gXn9Rw8x-CnBnF2cg.mjs → concurrency-gXn9Rw8x-CaI6Vtbu.mjs} +0 -0
- /package/dist/{credential-env-map-C23GV6LN.mjs → credential-env-map-D0zgoUl0.mjs} +0 -0
- /package/dist/{credential-schema-mismatch-DM9Y91jL.mjs → credential-schema-mismatch-8pqwvswO.mjs} +0 -0
- /package/dist/{diff-utils-AATn2n56.mjs → diff-utils-BoXI705D.mjs} +0 -0
- /package/dist/{layout-CXkZEsXI.mjs → layout-DRf9qUf8.mjs} +0 -0
- /package/dist/{logs.handler-ClIIOeQB.mjs → logs.handler-DxSKmDCq.mjs} +0 -0
- /package/dist/{metadata-layout-C6ed-9dl-C6Bylr_z.mjs → metadata-layout-C6ed-9dl-EF5pCtIH.mjs} +0 -0
- /package/dist/{options-CIVqkc8V.mjs → options-DFPs-tAB.mjs} +0 -0
- /package/dist/{oxc-B3KI3rf_-ghZc3xZ5.mjs → oxc-B3KI3rf_-CHDUXsus.mjs} +0 -0
- /package/dist/{read-credential-keys-77a91T8M-B0eiobOd.mjs → read-credential-keys-77a91T8M-CzXPGxdU.mjs} +0 -0
- /package/dist/{register.handler-CpP_KB2u.mjs → register.handler-D7ZZAnGP.mjs} +0 -0
- /package/dist/{rolldown-runtime-twds-ZHy-RuJszab7.mjs → rolldown-runtime-twds-ZHy-3DMm_Sby.mjs} +0 -0
- /package/dist/{run-polling-DDpkIvwy.mjs → run-polling-Cb4ssXIE.mjs} +0 -0
- /package/dist/{schema-display-DuWBmkwk.mjs → schema-display-CyCWSgfY.mjs} +0 -0
- /package/dist/{skills.handler-CofL4oKs.mjs → skills.handler-C_4VzVmc.mjs} +0 -0
- /package/dist/{spinner-progress-Bt8zXPOc.mjs → spinner-progress-CS1BEdNB.mjs} +0 -0
- /package/dist/{status.handler-6cuHa0R0.mjs → status.handler-Cm9aNUBn.mjs} +0 -0
- /package/dist/{sync-keystroke-agent-skills-D746f2W_.mjs → sync-keystroke-agent-skills-CX9fS5nQ.mjs} +0 -0
- /package/dist/{upgrade.handler-DhKeyCy5.mjs → upgrade.handler-C2eZ_tg3.mjs} +0 -0
- /package/dist/{upload-C1qFWMm0.mjs → upload-C0kaZu08.mjs} +0 -0
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import { n as __exportAll } from "./chunk-CH6r78ws.mjs";
|
|
4
|
+
import { a as descriptionString, c as optionalDescriptionString, d as trimmedNonEmptyStringUnbounded, i as createStructuralSchema, n as credentialSetProxyConfigSchema, o as idNoSpacesString, s as jsonSchemaObject, t as CredentialSetManifestSchema, u as trimmedNonEmptyString } from "./schemas-DodkHgnS.mjs";
|
|
3
5
|
import { z } from "zod";
|
|
6
|
+
const SHA256HashSchema = z.string().length(64, "Must be 64 characters").regex(/^[a-f0-9]{64}$/i, "Must be hexadecimal").transform((value) => value);
|
|
7
|
+
const JsonSchemaSchema = z.record(z.string(), z.unknown());
|
|
8
|
+
z.object({
|
|
9
|
+
constant: z.object({
|
|
10
|
+
attempts: z.number().int().min(1).max(10),
|
|
11
|
+
seconds: z.number().positive()
|
|
12
|
+
}).optional(),
|
|
13
|
+
exponential: z.object({
|
|
14
|
+
attempts: z.number().int().min(1).max(10),
|
|
15
|
+
base: z.number().min(1).optional(),
|
|
16
|
+
multiplier: z.number().positive().optional()
|
|
17
|
+
}).optional()
|
|
18
|
+
}).refine((data) => {
|
|
19
|
+
return data.constant !== void 0 !== (data.exponential !== void 0);
|
|
20
|
+
}, { error: "Retry config must specify exactly one of constant or exponential strategy" });
|
|
21
|
+
//#endregion
|
|
4
22
|
//#region ../../node_modules/.pnpm/cron-schedule@6.0.0/node_modules/cron-schedule/dist/utils.js
|
|
5
23
|
function extractDateElements(date) {
|
|
6
24
|
return {
|
|
@@ -391,28 +409,6 @@ function parseCronExpression(cronExpression) {
|
|
|
391
409
|
});
|
|
392
410
|
}
|
|
393
411
|
//#endregion
|
|
394
|
-
//#region ../../packages/core/src/shared/duration.ts
|
|
395
|
-
const MULTIPLIERS = {
|
|
396
|
-
s: 1e3,
|
|
397
|
-
m: 6e4,
|
|
398
|
-
h: 36e5,
|
|
399
|
-
d: 864e5,
|
|
400
|
-
w: 6048e5,
|
|
401
|
-
y: 31536e6
|
|
402
|
-
};
|
|
403
|
-
/**
|
|
404
|
-
* Convert a {@link Duration} value into milliseconds.
|
|
405
|
-
*
|
|
406
|
-
* Accepts the full Duration union: a positive integer (treated as ms)
|
|
407
|
-
* or a string like "5s", "2m", "1h", "1d", "1w", "1y".
|
|
408
|
-
*/
|
|
409
|
-
function parseDurationToMs(duration) {
|
|
410
|
-
if (typeof duration === "number") return duration;
|
|
411
|
-
const match = duration.match(/^(\d+)([smhdwy])$/);
|
|
412
|
-
if (!match?.[1] || !match[2]) throw new Error(`Invalid duration format: "${duration}". Expected a positive integer or a string like "5s", "2m", "1h", "1d", "1w", "1y".`);
|
|
413
|
-
return Number.parseInt(match[1], 10) * MULTIPLIERS[match[2]];
|
|
414
|
-
}
|
|
415
|
-
//#endregion
|
|
416
412
|
//#region ../../packages/core/src/shared/schedule.ts
|
|
417
413
|
/**
|
|
418
414
|
* shared/schedule.ts
|
|
@@ -441,12 +437,12 @@ const CronExpressionSchema = z.string().superRefine((val, ctx) => {
|
|
|
441
437
|
});
|
|
442
438
|
}
|
|
443
439
|
});
|
|
444
|
-
|
|
440
|
+
z.union([
|
|
445
441
|
z.number().refine((val) => val > 0, { message: "Duration in milliseconds must be positive" }).refine(Number.isFinite, { message: "Duration in milliseconds must be finite" }).refine(Number.isInteger, { message: "Duration in milliseconds must be an integer" }),
|
|
446
442
|
DurationStringSchema,
|
|
447
443
|
CronExpressionSchema
|
|
448
444
|
]);
|
|
449
|
-
|
|
445
|
+
z.enum([
|
|
450
446
|
"UTC",
|
|
451
447
|
"GMT",
|
|
452
448
|
"Etc/UTC",
|
|
@@ -502,4 +498,378 @@ const IANATimezoneSchema = z.enum([
|
|
|
502
498
|
"Asia/Doha"
|
|
503
499
|
]);
|
|
504
500
|
//#endregion
|
|
505
|
-
|
|
501
|
+
//#region ../../packages/core/src/artifacts/source-analysis.ts
|
|
502
|
+
const SourceLocationSchema = z.object({
|
|
503
|
+
filePath: z.string().min(1),
|
|
504
|
+
absoluteFilePath: z.string().min(1).optional(),
|
|
505
|
+
line: z.number().int().positive(),
|
|
506
|
+
column: z.number().int().positive(),
|
|
507
|
+
position: z.number().int().nonnegative().optional(),
|
|
508
|
+
endLine: z.number().int().positive(),
|
|
509
|
+
endColumn: z.number().int().positive(),
|
|
510
|
+
endPosition: z.number().int().nonnegative().optional(),
|
|
511
|
+
synthetic: z.boolean().optional()
|
|
512
|
+
});
|
|
513
|
+
z.string().min(1);
|
|
514
|
+
const ImportSourceSchema = z.object({
|
|
515
|
+
kind: z.enum([
|
|
516
|
+
"local",
|
|
517
|
+
"module-import",
|
|
518
|
+
"namespace-import",
|
|
519
|
+
"dynamic"
|
|
520
|
+
]),
|
|
521
|
+
moduleSpecifier: z.string().min(1).optional(),
|
|
522
|
+
importName: z.string().min(1).optional(),
|
|
523
|
+
localName: z.string().min(1).optional(),
|
|
524
|
+
resolvedPath: z.string().min(1).optional()
|
|
525
|
+
});
|
|
526
|
+
const CallKindSchema = z.enum([
|
|
527
|
+
"workflow-step",
|
|
528
|
+
"agent",
|
|
529
|
+
"tool",
|
|
530
|
+
"hook",
|
|
531
|
+
"child-workflow",
|
|
532
|
+
"function-call",
|
|
533
|
+
"method-call",
|
|
534
|
+
"dynamic-call",
|
|
535
|
+
"parallel-call",
|
|
536
|
+
"process-exit",
|
|
537
|
+
"iife",
|
|
538
|
+
"expression"
|
|
539
|
+
]);
|
|
540
|
+
const CapturedVariableSourceKindSchema = z.enum([
|
|
541
|
+
"local-const",
|
|
542
|
+
"relative-import",
|
|
543
|
+
"package-import"
|
|
544
|
+
]);
|
|
545
|
+
const CapturedVariableValueTypeSchema = z.enum([
|
|
546
|
+
"string",
|
|
547
|
+
"number",
|
|
548
|
+
"boolean",
|
|
549
|
+
"object",
|
|
550
|
+
"array",
|
|
551
|
+
"function",
|
|
552
|
+
"unknown"
|
|
553
|
+
]);
|
|
554
|
+
z.object({
|
|
555
|
+
name: z.string().min(1),
|
|
556
|
+
value: z.union([
|
|
557
|
+
z.string(),
|
|
558
|
+
z.number(),
|
|
559
|
+
z.boolean()
|
|
560
|
+
]).optional(),
|
|
561
|
+
sourceText: z.string().optional(),
|
|
562
|
+
valueType: CapturedVariableValueTypeSchema,
|
|
563
|
+
resolvable: z.boolean(),
|
|
564
|
+
source: CapturedVariableSourceKindSchema,
|
|
565
|
+
importPath: z.string().optional(),
|
|
566
|
+
declaration: z.object({
|
|
567
|
+
filePath: z.string().min(1),
|
|
568
|
+
line: z.number().int().positive()
|
|
569
|
+
})
|
|
570
|
+
});
|
|
571
|
+
const IntegrationScopeSchema = z.enum([
|
|
572
|
+
"organization",
|
|
573
|
+
"project",
|
|
574
|
+
"user_provided_credential"
|
|
575
|
+
]);
|
|
576
|
+
const IntegrationCredentialRefSchema = z.discriminatedUnion("type", [z.object({
|
|
577
|
+
type: z.literal("id"),
|
|
578
|
+
id: z.string().startsWith("cset_")
|
|
579
|
+
}), z.object({
|
|
580
|
+
type: z.literal("name"),
|
|
581
|
+
name: z.string().trim().min(1)
|
|
582
|
+
})]);
|
|
583
|
+
function hasProjectOrOrganizationScope(scope) {
|
|
584
|
+
return scope === "organization" || scope === "project";
|
|
585
|
+
}
|
|
586
|
+
const CredentialRefTokenKeyNameSchema = z.string().regex(/^[A-Za-z0-9_]+$/, "Credential key must contain only letters, digits, and underscores (required for ref-token proxying)");
|
|
587
|
+
/** Shared enum for top-level credential-set `onCredentialRevoked` policy. */
|
|
588
|
+
const OnCredentialRevokedSchema = z.enum(["fail", "retry-once"]);
|
|
589
|
+
/** A credential set after resolution in a built manifest. Contains definition id, scope, alias, and credential keys.*/
|
|
590
|
+
const ResolvedCredentialSetSchema = z.object({
|
|
591
|
+
resolvedId: z.string(),
|
|
592
|
+
scope: IntegrationScopeSchema.optional(),
|
|
593
|
+
alias: z.string().optional(),
|
|
594
|
+
credentialRef: IntegrationCredentialRefSchema.optional(),
|
|
595
|
+
/** Auth-shape keys expected post-resolve. */
|
|
596
|
+
credentialKeys: z.array(CredentialRefTokenKeyNameSchema),
|
|
597
|
+
/** Subset of `credentialKeys` that are optional in the auth shape. */
|
|
598
|
+
optionalCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
599
|
+
/** Auth-shaped vault keys required for vault reads and upload flows. */
|
|
600
|
+
storedCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
601
|
+
/** Subset of auth-shaped vault keys that may be absent from the vault without
|
|
602
|
+
* failing resolution. Derived from the credential set's `auth` schema. */
|
|
603
|
+
optionalStoredCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
604
|
+
proxy: credentialSetProxyConfigSchema.optional(),
|
|
605
|
+
/** When true, resolved values are passed raw (no ref-token proxy) for this set. */
|
|
606
|
+
needsRawSecret: z.boolean().optional(),
|
|
607
|
+
/** Policy when a step throws `CredentialRevokedError` against this credential set. */
|
|
608
|
+
onCredentialRevoked: OnCredentialRevokedSchema.optional(),
|
|
609
|
+
/** Persistence-layer schema fingerprint stamped at build time. The
|
|
610
|
+
* resolver's phase 2 compares this against the vault row's stored
|
|
611
|
+
* fingerprint and raises `CredentialSchemaMismatchError` on drift.
|
|
612
|
+
* Optional here so pre-fingerprint artifacts still parse; the
|
|
613
|
+
* workflow builder populates it for every authored credential set
|
|
614
|
+
* that has a resolvable fingerprint. */
|
|
615
|
+
schemaFingerprint: z.string().optional()
|
|
616
|
+
}).superRefine((value, ctx) => {
|
|
617
|
+
if (value.credentialRef && !hasProjectOrOrganizationScope(value.scope)) ctx.addIssue({
|
|
618
|
+
code: z.ZodIssueCode.custom,
|
|
619
|
+
path: ["credentialRef"],
|
|
620
|
+
message: "credentialRef requires scope to be \"project\" or \"organization\""
|
|
621
|
+
});
|
|
622
|
+
});
|
|
623
|
+
z.object({
|
|
624
|
+
credentialSetId: z.string(),
|
|
625
|
+
/** Auth-shape keys expected post-resolve. */
|
|
626
|
+
credentialKeys: z.array(CredentialRefTokenKeyNameSchema),
|
|
627
|
+
/** Optional subset of the auth-shape keys. */
|
|
628
|
+
optionalCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
629
|
+
/** Stored-shape keys required for vault reads. */
|
|
630
|
+
storedCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
631
|
+
/** Optional subset of the stored-shape keys. */
|
|
632
|
+
optionalStoredCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
633
|
+
schemaFingerprint: z.string().optional(),
|
|
634
|
+
/** Policy when a step throws `CredentialRevokedError` against this credential set. */
|
|
635
|
+
onCredentialRevoked: OnCredentialRevokedSchema.optional(),
|
|
636
|
+
proxy: credentialSetProxyConfigSchema.optional(),
|
|
637
|
+
needsRawSecret: z.boolean().optional(),
|
|
638
|
+
requiredOAuthScopes: z.array(z.string()).optional()
|
|
639
|
+
});
|
|
640
|
+
const CredentialRequirementEntrySchema = z.object({
|
|
641
|
+
credentialSetId: z.string(),
|
|
642
|
+
scope: IntegrationScopeSchema.optional(),
|
|
643
|
+
alias: z.string().optional(),
|
|
644
|
+
credentialRef: IntegrationCredentialRefSchema.optional(),
|
|
645
|
+
/** Auth-shape keys expected post-resolve. */
|
|
646
|
+
credentialKeys: z.array(CredentialRefTokenKeyNameSchema),
|
|
647
|
+
/** Optional subset of the auth-shape keys. */
|
|
648
|
+
optionalCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
649
|
+
/** Auth-shaped vault keys required for vault reads. */
|
|
650
|
+
storedCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
651
|
+
/** Optional subset of the stored-shape keys. */
|
|
652
|
+
optionalStoredCredentialKeys: z.array(CredentialRefTokenKeyNameSchema).optional(),
|
|
653
|
+
schemaFingerprint: z.string().optional(),
|
|
654
|
+
proxy: credentialSetProxyConfigSchema.optional(),
|
|
655
|
+
needsRawSecret: z.boolean().optional(),
|
|
656
|
+
/** Policy when a step throws `CredentialRevokedError` against this credential set. */
|
|
657
|
+
onCredentialRevoked: OnCredentialRevokedSchema.optional(),
|
|
658
|
+
requiredOAuthScopes: z.array(z.string()).optional()
|
|
659
|
+
}).superRefine((value, ctx) => {
|
|
660
|
+
if (value.credentialRef && !hasProjectOrOrganizationScope(value.scope)) ctx.addIssue({
|
|
661
|
+
code: z.ZodIssueCode.custom,
|
|
662
|
+
path: ["credentialRef"],
|
|
663
|
+
message: "credentialRef requires scope to be \"project\" or \"organization\""
|
|
664
|
+
});
|
|
665
|
+
});
|
|
666
|
+
z.object({
|
|
667
|
+
required: z.array(z.string()),
|
|
668
|
+
byStep: z.record(z.string(), z.array(CredentialRequirementEntrySchema))
|
|
669
|
+
});
|
|
670
|
+
const TriggerCallbackNameSchema = z.enum([
|
|
671
|
+
"filter",
|
|
672
|
+
"idempotencyKey",
|
|
673
|
+
"verify",
|
|
674
|
+
"callback"
|
|
675
|
+
]);
|
|
676
|
+
const TriggerCredentialRequirementEntrySchema = CredentialRequirementEntrySchema;
|
|
677
|
+
const TriggerCredentialRequirementsSchema = z.object({
|
|
678
|
+
required: z.array(z.string()),
|
|
679
|
+
byCallback: z.partialRecord(TriggerCallbackNameSchema, z.array(TriggerCredentialRequirementEntrySchema))
|
|
680
|
+
});
|
|
681
|
+
const ExecutionIdentityPolicySchema = z.object({ subjectMode: z.enum(["never", "requiredWhenUserProvidedCredential"]) });
|
|
682
|
+
z.object({
|
|
683
|
+
nodeId: z.string().min(1),
|
|
684
|
+
stepName: z.string().min(1),
|
|
685
|
+
label: z.string().min(1),
|
|
686
|
+
callKind: CallKindSchema,
|
|
687
|
+
stepId: z.string().min(1).optional(),
|
|
688
|
+
source: SourceLocationSchema.optional(),
|
|
689
|
+
astKind: z.string().min(1).optional(),
|
|
690
|
+
importSource: ImportSourceSchema.optional(),
|
|
691
|
+
outputBinding: z.string().min(1).optional(),
|
|
692
|
+
scopeOverride: IntegrationScopeSchema.optional(),
|
|
693
|
+
description: z.string().optional(),
|
|
694
|
+
sourceCode: z.string().optional(),
|
|
695
|
+
exportName: z.string().optional(),
|
|
696
|
+
inputSchema: JsonSchemaSchema.optional(),
|
|
697
|
+
outputSchema: JsonSchemaSchema.optional(),
|
|
698
|
+
credentialSets: z.array(ResolvedCredentialSetSchema).optional()
|
|
699
|
+
});
|
|
700
|
+
const TriggerTypeSchema = z.enum([
|
|
701
|
+
"webhook",
|
|
702
|
+
"cron",
|
|
703
|
+
"polling"
|
|
704
|
+
]);
|
|
705
|
+
/**
|
|
706
|
+
* Persisted on `deployment_triggers.trigger_source`. Mirrors the
|
|
707
|
+
* `webhookTrigger({ source: { type } })` discriminator so the server
|
|
708
|
+
* can index-filter app-source rows during provider-webhook fanout.
|
|
709
|
+
*/
|
|
710
|
+
const TriggerSourceSchema = z.enum(["custom", "app"]);
|
|
711
|
+
const WebhookMethodSchema = z.enum([
|
|
712
|
+
"GET",
|
|
713
|
+
"POST",
|
|
714
|
+
"PUT",
|
|
715
|
+
"PATCH"
|
|
716
|
+
]);
|
|
717
|
+
const TriggerCallbackBundleUploadSchema = z.object({
|
|
718
|
+
code: z.string(),
|
|
719
|
+
hash: z.string(),
|
|
720
|
+
size: z.number()
|
|
721
|
+
});
|
|
722
|
+
const TriggerCallbackExportsSchema = z.object({
|
|
723
|
+
verify: z.string().min(1).optional(),
|
|
724
|
+
filter: z.string().min(1).optional(),
|
|
725
|
+
idempotencyKey: z.string().min(1).optional(),
|
|
726
|
+
callback: z.string().min(1).optional()
|
|
727
|
+
});
|
|
728
|
+
const TransformCallbackExportsSchema = z.object({ transform: z.string().min(1).optional() });
|
|
729
|
+
z.object({
|
|
730
|
+
id: z.string(),
|
|
731
|
+
type: TriggerTypeSchema,
|
|
732
|
+
/**
|
|
733
|
+
* Source-of-truth discriminator for webhook triggers. `'custom'` means
|
|
734
|
+
* the trigger owns its own HTTP path; `'app'` means it is fanned out by
|
|
735
|
+
* a Keystroke-managed provider app. Undefined for non-webhook triggers.
|
|
736
|
+
*/
|
|
737
|
+
triggerSource: TriggerSourceSchema.optional(),
|
|
738
|
+
enabled: z.boolean(),
|
|
739
|
+
path: z.string().optional(),
|
|
740
|
+
method: WebhookMethodSchema.optional(),
|
|
741
|
+
schedule: z.string().optional(),
|
|
742
|
+
timezone: z.string().optional(),
|
|
743
|
+
config: z.record(z.string(), z.unknown()).optional(),
|
|
744
|
+
requiredCredentials: TriggerCredentialRequirementsSchema.optional(),
|
|
745
|
+
storagePath: z.string().min(1).optional(),
|
|
746
|
+
callbackBundle: TriggerCallbackBundleUploadSchema.optional(),
|
|
747
|
+
callbackExports: TriggerCallbackExportsSchema.optional(),
|
|
748
|
+
transformCallbackBundle: TriggerCallbackBundleUploadSchema.optional(),
|
|
749
|
+
transformCallbackExports: TransformCallbackExportsSchema.optional()
|
|
750
|
+
});
|
|
751
|
+
//#endregion
|
|
752
|
+
//#region ../../packages/core/src/trigger/schemas.ts
|
|
753
|
+
const credentialSetInstanceSchema = createStructuralSchema([
|
|
754
|
+
"id",
|
|
755
|
+
"auth",
|
|
756
|
+
"connections"
|
|
757
|
+
], "a CredentialSet instance");
|
|
758
|
+
const TriggerModeDefaultSchema = z.enum(["managed", "subscribable"]);
|
|
759
|
+
const TriggerCallbackPresenceSchema = z.object({
|
|
760
|
+
filter: z.boolean(),
|
|
761
|
+
idempotencyKey: z.boolean(),
|
|
762
|
+
poll: z.boolean().optional(),
|
|
763
|
+
transformAllowed: z.boolean(),
|
|
764
|
+
verify: z.boolean().optional()
|
|
765
|
+
});
|
|
766
|
+
const TriggerRuntimeDescriptorSchema = z.object({ callbacks: TriggerCallbackPresenceSchema });
|
|
767
|
+
const TriggerManifestSchema = z.object({
|
|
768
|
+
manifestVersion: z.literal(1),
|
|
769
|
+
type: z.literal("trigger"),
|
|
770
|
+
triggerType: TriggerTypeSchema,
|
|
771
|
+
name: trimmedNonEmptyString("Trigger name"),
|
|
772
|
+
description: descriptionString("Trigger description"),
|
|
773
|
+
enabled: z.boolean(),
|
|
774
|
+
modeDefault: TriggerModeDefaultSchema,
|
|
775
|
+
executionIdentityPolicy: ExecutionIdentityPolicySchema.optional(),
|
|
776
|
+
credentialSets: z.array(CredentialSetManifestSchema).optional(),
|
|
777
|
+
runtime: TriggerRuntimeDescriptorSchema
|
|
778
|
+
});
|
|
779
|
+
z.object({
|
|
780
|
+
credentialSets: z.array(credentialSetInstanceSchema).optional(),
|
|
781
|
+
description: descriptionString("Trigger description"),
|
|
782
|
+
enabled: z.boolean().default(true),
|
|
783
|
+
executionIdentityPolicy: ExecutionIdentityPolicySchema.optional(),
|
|
784
|
+
modeDefault: TriggerModeDefaultSchema.default("managed"),
|
|
785
|
+
name: trimmedNonEmptyString("Trigger name")
|
|
786
|
+
});
|
|
787
|
+
//#endregion
|
|
788
|
+
//#region ../../packages/core/src/task/schemas.ts
|
|
789
|
+
const agentInstanceSchema = createStructuralSchema([
|
|
790
|
+
"id",
|
|
791
|
+
"name",
|
|
792
|
+
"systemPrompt",
|
|
793
|
+
"model",
|
|
794
|
+
"input",
|
|
795
|
+
"output",
|
|
796
|
+
"workflowSafeReference"
|
|
797
|
+
], "an Agent instance");
|
|
798
|
+
const triggerInstanceSchema = createStructuralSchema([
|
|
799
|
+
"isTrigger",
|
|
800
|
+
"name",
|
|
801
|
+
"description",
|
|
802
|
+
"enabled"
|
|
803
|
+
], "a trigger instance (use cronTrigger(), pollingTrigger(), or webhookTrigger())");
|
|
804
|
+
const taskLifecycleSchema = z.object({
|
|
805
|
+
maxExecutions: z.number().int().positive().optional(),
|
|
806
|
+
expiresAt: z.union([z.date(), z.string().datetime()]).optional(),
|
|
807
|
+
expiresAfter: DurationSchema.optional()
|
|
808
|
+
}).strict();
|
|
809
|
+
z.object({
|
|
810
|
+
id: idNoSpacesString("Task ID"),
|
|
811
|
+
name: trimmedNonEmptyString("Task name"),
|
|
812
|
+
description: optionalDescriptionString("Task description"),
|
|
813
|
+
agent: agentInstanceSchema,
|
|
814
|
+
prompt: trimmedNonEmptyStringUnbounded("Task prompt"),
|
|
815
|
+
triggers: z.array(triggerInstanceSchema).min(1, { message: "At least one trigger is required" }),
|
|
816
|
+
lifecycle: taskLifecycleSchema.optional(),
|
|
817
|
+
tags: z.array(z.string()).optional()
|
|
818
|
+
}).strict();
|
|
819
|
+
const WorkflowSafeAgentReferenceSchema = z.object({
|
|
820
|
+
kind: z.literal("agent"),
|
|
821
|
+
authoredAgentId: z.string(),
|
|
822
|
+
displayName: z.string(),
|
|
823
|
+
runtimeKind: z.enum(["declarative", "runnable"]),
|
|
824
|
+
inputSchema: jsonSchemaObject.optional(),
|
|
825
|
+
outputSchema: jsonSchemaObject.optional(),
|
|
826
|
+
authoredExport: z.object({
|
|
827
|
+
exportName: z.string().optional(),
|
|
828
|
+
filePath: z.string().optional()
|
|
829
|
+
}).optional(),
|
|
830
|
+
metadata: jsonSchemaObject.optional()
|
|
831
|
+
}).strict();
|
|
832
|
+
const TaskBuildInfoStubSchema = z.object({
|
|
833
|
+
hash: SHA256HashSchema.optional(),
|
|
834
|
+
size: z.number().optional(),
|
|
835
|
+
metadata: jsonSchemaObject.optional()
|
|
836
|
+
}).strict();
|
|
837
|
+
/**
|
|
838
|
+
* Extended trigger manifest schema for tasks.
|
|
839
|
+
* Preserves runtime fields (schedule, timezone, path, method) that the base
|
|
840
|
+
* TriggerManifestSchema strips. Tasks need these for trigger evaluation at runtime.
|
|
841
|
+
*/
|
|
842
|
+
const TaskTriggerManifestSchema = TriggerManifestSchema.extend({
|
|
843
|
+
runtime: TriggerRuntimeDescriptorSchema.extend({
|
|
844
|
+
schedule: z.string().optional(),
|
|
845
|
+
timezone: z.string().optional(),
|
|
846
|
+
path: z.string().optional(),
|
|
847
|
+
method: z.string().optional(),
|
|
848
|
+
input: z.unknown().optional(),
|
|
849
|
+
payloadMode: z.string().optional()
|
|
850
|
+
}),
|
|
851
|
+
/** Static payload for cron triggers */
|
|
852
|
+
payload: z.unknown().optional()
|
|
853
|
+
});
|
|
854
|
+
const TaskBuildManifestSchema = z.object({
|
|
855
|
+
manifestVersion: z.literal(1),
|
|
856
|
+
type: z.literal("task"),
|
|
857
|
+
id: z.string().min(1),
|
|
858
|
+
name: z.string().min(1),
|
|
859
|
+
description: z.string().optional(),
|
|
860
|
+
agentRef: WorkflowSafeAgentReferenceSchema,
|
|
861
|
+
prompt: z.string().min(1),
|
|
862
|
+
triggers: z.array(TaskTriggerManifestSchema),
|
|
863
|
+
lifecycle: z.object({
|
|
864
|
+
maxExecutions: z.number().int().positive().optional(),
|
|
865
|
+
expiresAt: z.string().optional(),
|
|
866
|
+
expiresAfter: z.string().optional()
|
|
867
|
+
}).strict().optional(),
|
|
868
|
+
tags: z.array(z.string()).optional(),
|
|
869
|
+
buildInfo: TaskBuildInfoStubSchema
|
|
870
|
+
}).strict();
|
|
871
|
+
//#endregion
|
|
872
|
+
//#region ../../packages/core/src/task/index.ts
|
|
873
|
+
var task_exports = /* @__PURE__ */ __exportAll({ TaskBuildManifestSchema: () => TaskBuildManifestSchema });
|
|
874
|
+
//#endregion
|
|
875
|
+
export { TaskBuildManifestSchema as n, task_exports as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-
|
|
3
|
+
import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-CzXPGxdU.mjs";
|
|
4
4
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
@@ -109,7 +109,7 @@ async function buildTaskTargetFile(options) {
|
|
|
109
109
|
return builtTasks;
|
|
110
110
|
}
|
|
111
111
|
async function bundleTaskTargetModule(options) {
|
|
112
|
-
const [{ rolldown }, { createEnvAccessPlugin, formatEnvAccessError }] = await Promise.all([import("rolldown"), import("./detect-env-access-CwkOYeYM-
|
|
112
|
+
const [{ rolldown }, { createEnvAccessPlugin, formatEnvAccessError }] = await Promise.all([import("rolldown"), import("./detect-env-access-CwkOYeYM-EmkYvbfJ.mjs").then((n) => n.n).then((n) => n.n)]);
|
|
113
113
|
const entryId = "\0virtual:task-target-entry";
|
|
114
114
|
const trackedDependencies = /* @__PURE__ */ new Set();
|
|
115
115
|
const envViolations = [];
|
|
@@ -216,7 +216,7 @@ async function attachTaskTargetTriggers(options) {
|
|
|
216
216
|
options.artifact.triggers.push(...buildTaskTriggerArtifactsWithoutBundles(options.entry.taskMetadata.triggers, options.artifact.task.taskId, options.artifact.task.taskName));
|
|
217
217
|
return [];
|
|
218
218
|
}
|
|
219
|
-
const { buildTriggerArtifacts } = await import("./trigger-artifacts-
|
|
219
|
+
const { buildTriggerArtifacts } = await import("./trigger-artifacts-RizI57RC-C-yCtEi-.mjs").then((n) => n.n);
|
|
220
220
|
const triggerResult = await buildTriggerArtifacts(options.entry.taskMetadata.triggers, options.artifact.task.taskId, options.artifact.task.taskName, options.projectRoot, {
|
|
221
221
|
workflowExportName: options.entry.source.localExportName,
|
|
222
222
|
workflowFilePath: options.entry.runtimeBundlePath
|
|
@@ -289,17 +289,17 @@ function buildTaskTriggerCredentialRequirements(credentialSets, callbacks) {
|
|
|
289
289
|
};
|
|
290
290
|
const entries = credentialSets.map((credentialSet) => {
|
|
291
291
|
const optionalCredentialKeys = readOptionalJsonSchemaKeysFromSchemaObject(credentialSet.auth);
|
|
292
|
-
const
|
|
292
|
+
const dynamicResolutionCacheMs = "dynamicResolutionCacheMs" in credentialSet && typeof credentialSet.dynamicResolutionCacheMs === "number" ? credentialSet.dynamicResolutionCacheMs : void 0;
|
|
293
293
|
const topLevelRevoked = "onCredentialRevoked" in credentialSet ? credentialSet.onCredentialRevoked : void 0;
|
|
294
294
|
return {
|
|
295
|
-
credentialSetId: credentialSet.
|
|
295
|
+
credentialSetId: credentialSet.id,
|
|
296
296
|
credentialKeys: readCredentialKeysFromSchemaObject(credentialSet.auth),
|
|
297
297
|
...optionalCredentialKeys.length > 0 ? { optionalCredentialKeys } : {},
|
|
298
|
-
...typeof
|
|
298
|
+
...typeof dynamicResolutionCacheMs === "number" && dynamicResolutionCacheMs > 0 ? { dynamicResolutionCacheMs } : {},
|
|
299
299
|
...topLevelRevoked ? { onCredentialRevoked: topLevelRevoked } : {}
|
|
300
300
|
};
|
|
301
301
|
});
|
|
302
|
-
const requiredIds = credentialSets.map((credentialSet) => credentialSet.
|
|
302
|
+
const requiredIds = credentialSets.map((credentialSet) => credentialSet.id);
|
|
303
303
|
const byCallback = {};
|
|
304
304
|
if (callbacks?.poll) byCallback.callback = entries;
|
|
305
305
|
if (callbacks?.verify) byCallback.verify = entries;
|
|
@@ -319,7 +319,7 @@ function createPreparedTaskTarget(artifact, triggers) {
|
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
321
|
async function tryParseTaskBuildManifest(manifest) {
|
|
322
|
-
const { TaskBuildManifestSchema } = await import("./task-
|
|
322
|
+
const { TaskBuildManifestSchema } = await import("./task-BBgEvdG1.mjs").then((n) => n.t);
|
|
323
323
|
const result = TaskBuildManifestSchema.safeParse(manifest);
|
|
324
324
|
return result.success ? result.data : null;
|
|
325
325
|
}
|
package/dist/{task-target-deploy-Bf5i3ox1-2K0hAwzk.mjs → task-target-deploy-CZBGNC0H-BwPSfaJQ.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { n as SHA256HashSchema } from "./common-BaGFkj3n.mjs";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
//#region ../../packages/shared-types/src/deployments/api/snapshot-payload.ts
|
|
6
6
|
function sortObjectKeysDeep(value) {
|
|
@@ -100,7 +100,7 @@ function buildCanonicalProjectSnapshotPayload(params) {
|
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
//#endregion
|
|
103
|
-
//#region ../../packages/workflow-deploy/dist/task-target-deploy-
|
|
103
|
+
//#region ../../packages/workflow-deploy/dist/task-target-deploy-CZBGNC0H.mjs
|
|
104
104
|
function computeProjectSnapshotHash(params) {
|
|
105
105
|
const hex = createHash("sha256").update(JSON.stringify(buildCanonicalProjectSnapshotPayload({
|
|
106
106
|
workflows: params.workflows,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import "./default-urls-BS4twrsS.mjs";
|
|
4
4
|
import { l as resolveAuthOptions } from "./dist-BF6r1hfv.mjs";
|
|
5
|
-
import { n as findProjectRoot, t as assertWorkflowProjectRoot } from "./project-config-
|
|
5
|
+
import { n as findProjectRoot, t as assertWorkflowProjectRoot } from "./project-config-CJGSh2RQ.mjs";
|
|
6
6
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { spawnSync } from "node:child_process";
|
|
@@ -116,7 +116,7 @@ function restartStage(options, projectRoot, stage) {
|
|
|
116
116
|
}
|
|
117
117
|
async function runBuildPhase(options, projectRoot) {
|
|
118
118
|
const projectConfig = await assertWorkflowProjectRoot(projectRoot);
|
|
119
|
-
const { buildTaskTargetEntries } = await import("./task-target-build-
|
|
119
|
+
const { buildTaskTargetEntries } = await import("./task-target-build-atWwwnSF.mjs");
|
|
120
120
|
await writeBuildDescriptor(projectRoot, {
|
|
121
121
|
projectRoot,
|
|
122
122
|
projectConfig,
|
|
@@ -129,7 +129,7 @@ async function runBuildPhase(options, projectRoot) {
|
|
|
129
129
|
}
|
|
130
130
|
async function runPreparePhase(projectRoot) {
|
|
131
131
|
const buildDescriptor = await readBuildDescriptor(projectRoot);
|
|
132
|
-
const { prepareTaskTargetBuiltTasks } = await import("./task-target-build-
|
|
132
|
+
const { prepareTaskTargetBuiltTasks } = await import("./task-target-build-atWwwnSF.mjs");
|
|
133
133
|
const prepareResult = await prepareTaskTargetBuiltTasks({
|
|
134
134
|
builtTasks: buildDescriptor.builtTasks,
|
|
135
135
|
projectRoot
|
|
@@ -158,11 +158,11 @@ async function resolveDeployAuthOptions(options) {
|
|
|
158
158
|
}
|
|
159
159
|
async function runDeployPhase(options, projectRoot) {
|
|
160
160
|
const descriptor = await readDescriptor(projectRoot);
|
|
161
|
-
const { createDeployClient } = await import("./deploy-
|
|
161
|
+
const { createDeployClient } = await import("./deploy-BvaFgVvf.mjs");
|
|
162
162
|
const client = createDeployClient(await resolveDeployAuthOptions(options));
|
|
163
163
|
const auth = await client.public.auth.validate();
|
|
164
164
|
if (auth.organizationId !== descriptor.projectConfig.organizationId) throw new Error(`Project organization mismatch: config=${descriptor.projectConfig.organizationId} auth=${auth.organizationId}`);
|
|
165
|
-
const { deployTaskTargets } = await import("./task-target-deploy-
|
|
165
|
+
const { deployTaskTargets } = await import("./task-target-deploy-CRsrQTOy.mjs");
|
|
166
166
|
const result = await deployTaskTargets({
|
|
167
167
|
preparedTasks: descriptor.preparedTasks,
|
|
168
168
|
client,
|