@cascade-flow/runner 0.2.7 → 0.2.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAMA,OAAO,EAA0C,KAAK,UAAU,EAAyB,KAAK,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAG1J;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,cAAc,CAAC,CA0BzB;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,aAAa,SAA4B,GACxC,OAAO,CAAC,qBAAqB,EAAE,CAAC,CA+ElC;AA4CD;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,IAAI,SAAwB,GAC3B,OAAO,CAAC,UAAU,EAAE,CAAC,CAkFvB"}
1
+ {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAMA,OAAO,EAA0C,KAAK,UAAU,EAAyB,KAAK,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAG1J;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,cAAc,CAAC,CA0BzB;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,aAAa,SAA4B,GACxC,OAAO,CAAC,qBAAqB,EAAE,CAAC,CA+ElC;AA4CD;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,IAAI,SAAwB,GAC3B,OAAO,CAAC,UAAU,EAAE,CAAC,CAmFvB"}
package/dist/index.js CHANGED
@@ -12878,10 +12878,34 @@ config(en_default());
12878
12878
  var workflowConfigSchema = exports_external.object({
12879
12879
  name: exports_external.string().min(1, "Workflow name cannot be empty")
12880
12880
  });
12881
+ var backoffConfigSchema = exports_external.discriminatedUnion("type", [
12882
+ exports_external.object({
12883
+ type: exports_external.literal("constant"),
12884
+ delayMs: exports_external.number().int().nonnegative()
12885
+ }),
12886
+ exports_external.object({
12887
+ type: exports_external.literal("exponential"),
12888
+ initialDelayMs: exports_external.number().int().nonnegative(),
12889
+ maxDelayMs: exports_external.number().int().positive(),
12890
+ multiplier: exports_external.number().positive().optional()
12891
+ }),
12892
+ exports_external.object({
12893
+ type: exports_external.literal("linear"),
12894
+ initialDelayMs: exports_external.number().int().nonnegative(),
12895
+ incrementMs: exports_external.number().int().nonnegative(),
12896
+ maxDelayMs: exports_external.number().int().positive()
12897
+ })
12898
+ ]);
12899
+ var retryPolicySchema = exports_external.object({
12900
+ maxAttempts: exports_external.number().int().min(1),
12901
+ backoff: backoffConfigSchema
12902
+ });
12903
+ var retryPoliciesSchema = exports_external.array(retryPolicySchema).max(10, "Cannot have more than 10 retry policies").refine((policies) => policies.reduce((sum, p) => sum + p.maxAttempts, 0) <= 100, "Total attempts across all policies cannot exceed 100");
12881
12904
  var stepConfigSchema = exports_external.object({
12882
12905
  name: exports_external.string().optional(),
12883
12906
  dependencies: exports_external.any().optional(),
12884
12907
  exportOutput: exports_external.boolean().optional(),
12908
+ retry: retryPoliciesSchema.optional(),
12885
12909
  maxRetries: exports_external.number().int().nonnegative().max(100, "maxRetries cannot exceed 100").optional(),
12886
12910
  retryDelayMs: exports_external.number().int().nonnegative().max(3600000, "retryDelayMs cannot exceed 1 hour").optional(),
12887
12911
  timeoutMs: exports_external.number().int().positive().max(3600000, "timeoutMs cannot exceed 1 hour").optional(),
@@ -13007,6 +13031,7 @@ async function discoverSteps(root = path.resolve("steps")) {
13007
13031
  dir,
13008
13032
  fn: mod.step.fn,
13009
13033
  exportOutput: mod.step.exportOutput,
13034
+ retry: mod.step.retry,
13010
13035
  maxRetries: mod.step.maxRetries,
13011
13036
  retryDelayMs: mod.step.retryDelayMs,
13012
13037
  timeoutMs: mod.step.timeoutMs,
@@ -13182,4 +13207,4 @@ export {
13182
13207
  calculateWorkflowHash
13183
13208
  };
13184
13209
 
13185
- //# debugId=1B7890ED6FF9B69B64756E2164756E21
13210
+ //# debugId=4438863A7AB7D73964756E2164756E21