@intentius/chant-lexicon-temporal 0.6.0 → 0.8.0
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/codegen/docs-cli.d.ts +3 -0
- package/dist/codegen/docs-cli.d.ts.map +1 -0
- package/dist/codegen/docs.d.ts +7 -0
- package/dist/codegen/docs.d.ts.map +1 -0
- package/dist/codegen/generate-cli.d.ts +3 -0
- package/dist/codegen/generate-cli.d.ts.map +1 -0
- package/dist/codegen/generate.d.ts +16 -0
- package/dist/codegen/generate.d.ts.map +1 -0
- package/dist/codegen/package-cli.d.ts +3 -0
- package/dist/codegen/package-cli.d.ts.map +1 -0
- package/dist/codegen/package.d.ts +10 -0
- package/dist/codegen/package.d.ts.map +1 -0
- package/dist/composites/apply-op.d.ts +73 -0
- package/dist/composites/apply-op.d.ts.map +1 -0
- package/dist/composites/cloud-stack.d.ts +54 -0
- package/dist/composites/cloud-stack.d.ts.map +1 -0
- package/dist/composites/dev-stack.d.ts +63 -0
- package/dist/composites/dev-stack.d.ts.map +1 -0
- package/dist/composites/pipeline-audit-op.d.ts +55 -0
- package/dist/composites/pipeline-audit-op.d.ts.map +1 -0
- package/dist/composites/reconcile-op.d.ts +62 -0
- package/dist/composites/reconcile-op.d.ts.map +1 -0
- package/dist/composites/watch-op.d.ts +56 -0
- package/dist/composites/watch-op.d.ts.map +1 -0
- package/dist/composites/workflow-audit-op.d.ts +61 -0
- package/dist/composites/workflow-audit-op.d.ts.map +1 -0
- package/dist/config.d.ts +197 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/coverage.d.ts +15 -0
- package/dist/coverage.d.ts.map +1 -0
- package/dist/describe-resources.d.ts +26 -0
- package/dist/describe-resources.d.ts.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/integrity.json +5 -5
- package/dist/lint/post-synth/index.d.ts +3 -0
- package/dist/lint/post-synth/index.d.ts.map +1 -0
- package/dist/lint/post-synth/tmp001-retention-too-short.d.ts +10 -0
- package/dist/lint/post-synth/tmp001-retention-too-short.d.ts.map +1 -0
- package/dist/lint/post-synth/tmp002-allowall-without-note.d.ts +11 -0
- package/dist/lint/post-synth/tmp002-allowall-without-note.d.ts.map +1 -0
- package/dist/lint/post-synth/tmp010-cron-syntax.d.ts +12 -0
- package/dist/lint/post-synth/tmp010-cron-syntax.d.ts.map +1 -0
- package/dist/lint/post-synth/tmp011-namespace-reference.d.ts +10 -0
- package/dist/lint/post-synth/tmp011-namespace-reference.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/op/activities/apply.d.ts +70 -0
- package/dist/op/activities/apply.d.ts.map +1 -0
- package/dist/op/activities/argo.d.ts +56 -0
- package/dist/op/activities/argo.d.ts.map +1 -0
- package/dist/op/activities/build.d.ts +11 -0
- package/dist/op/activities/build.d.ts.map +1 -0
- package/dist/op/activities/gitlab.d.ts +15 -0
- package/dist/op/activities/gitlab.d.ts.map +1 -0
- package/dist/op/activities/heartbeat.d.ts +27 -0
- package/dist/op/activities/heartbeat.d.ts.map +1 -0
- package/dist/op/activities/helm.d.ts +18 -0
- package/dist/op/activities/helm.d.ts.map +1 -0
- package/dist/op/activities/index.d.ts +29 -0
- package/dist/op/activities/index.d.ts.map +1 -0
- package/dist/op/activities/kubectl.d.ts +11 -0
- package/dist/op/activities/kubectl.d.ts.map +1 -0
- package/dist/op/activities/lifecycle.d.ts +42 -0
- package/dist/op/activities/lifecycle.d.ts.map +1 -0
- package/dist/op/activities/pipeline-audit.d.ts +84 -0
- package/dist/op/activities/pipeline-audit.d.ts.map +1 -0
- package/dist/op/activities/policy.d.ts +17 -0
- package/dist/op/activities/policy.d.ts.map +1 -0
- package/dist/op/activities/reconcile.d.ts +69 -0
- package/dist/op/activities/reconcile.d.ts.map +1 -0
- package/dist/op/activities/shell.d.ts +13 -0
- package/dist/op/activities/shell.d.ts.map +1 -0
- package/dist/op/activities/teardown.d.ts +10 -0
- package/dist/op/activities/teardown.d.ts.map +1 -0
- package/dist/op/activities/util.d.ts +8 -0
- package/dist/op/activities/util.d.ts.map +1 -0
- package/dist/op/activities/wait.d.ts +16 -0
- package/dist/op/activities/wait.d.ts.map +1 -0
- package/dist/op/activities/workflow-audit.d.ts +92 -0
- package/dist/op/activities/workflow-audit.d.ts.map +1 -0
- package/dist/op/serializer.d.ts +20 -0
- package/dist/op/serializer.d.ts.map +1 -0
- package/dist/plugin.d.ts +10 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/resources.d.ts +101 -0
- package/dist/resources.d.ts.map +1 -0
- package/dist/rules/{tmp001.ts → tmp001-retention-too-short.ts} +9 -11
- package/dist/rules/{tmp002.ts → tmp002-allowall-without-note.ts} +9 -11
- package/dist/rules/tmp011-namespace-reference.ts +2 -2
- package/dist/serializer.d.ts +15 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/validate-cli.d.ts +3 -0
- package/dist/validate-cli.d.ts.map +1 -0
- package/dist/validate.d.ts +18 -0
- package/dist/validate.d.ts.map +1 -0
- package/package.json +27 -6
- package/src/lint/post-synth/index.ts +13 -0
- package/src/lint/post-synth/post-synth.test.ts +124 -1
- package/src/lint/{rules/tmp001.ts → post-synth/tmp001-retention-too-short.ts} +9 -11
- package/src/lint/{rules/tmp002.ts → post-synth/tmp002-allowall-without-note.ts} +9 -11
- package/src/lint/post-synth/tmp011-namespace-reference.ts +2 -2
- package/src/op/serializer.ts +2 -2
- package/src/plugin.test.ts +5 -6
- package/src/plugin.ts +2 -12
- package/src/serializer.ts +6 -6
- package/src/lint/rules/index.ts +0 -2
- package/src/lint/rules/lint-rules.test.ts +0 -150
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Temporal worker profile — connection configuration for `chant run`.
|
|
3
|
+
*
|
|
4
|
+
* Add this to `chant.config.ts` to define how chant connects to Temporal:
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* import type { TemporalChantConfig } from "@intentius/chant-lexicon-temporal";
|
|
8
|
+
*
|
|
9
|
+
* export default {
|
|
10
|
+
* lexicons: ["temporal"],
|
|
11
|
+
* temporal: {
|
|
12
|
+
* profiles: {
|
|
13
|
+
* local: {
|
|
14
|
+
* address: "localhost:7233",
|
|
15
|
+
* namespace: "default",
|
|
16
|
+
* taskQueue: "my-deploy",
|
|
17
|
+
* autoStart: true,
|
|
18
|
+
* },
|
|
19
|
+
* cloud: {
|
|
20
|
+
* address: "myns.a2dd6.tmprl.cloud:7233",
|
|
21
|
+
* namespace: "myns.a2dd6",
|
|
22
|
+
* taskQueue: "my-deploy",
|
|
23
|
+
* tls: true,
|
|
24
|
+
* apiKey: { env: "TEMPORAL_API_KEY" },
|
|
25
|
+
* },
|
|
26
|
+
* },
|
|
27
|
+
* defaultProfile: "local",
|
|
28
|
+
* } satisfies TemporalChantConfig,
|
|
29
|
+
* };
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* ChantConfig uses `.passthrough()` in its Zod schema so the `temporal` key
|
|
33
|
+
* is accepted at runtime without core changes. Issue #8 (`chant run`) will
|
|
34
|
+
* read these profiles when starting workers.
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* Activity timeout and retry configuration for infrastructure activity groups.
|
|
38
|
+
*
|
|
39
|
+
* Pre-built profiles match the four activity groups typically seen in infra workflows:
|
|
40
|
+
* fast/idempotent operations, long-running infra (GKE, kubectl apply --wait),
|
|
41
|
+
* K8s wait loops, and human-gate activities.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* import { TEMPORAL_ACTIVITY_PROFILES } from "@intentius/chant-lexicon-temporal";
|
|
46
|
+
* import { proxyActivities } from "@temporalio/workflow";
|
|
47
|
+
*
|
|
48
|
+
* const { applyInfra } = proxyActivities<typeof infraActivities>(
|
|
49
|
+
* TEMPORAL_ACTIVITY_PROFILES.longInfra
|
|
50
|
+
* );
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export interface TemporalActivityProfile {
|
|
54
|
+
/** Maximum time allowed for a single activity execution attempt. */
|
|
55
|
+
startToCloseTimeout: string;
|
|
56
|
+
/**
|
|
57
|
+
* Time after the last heartbeat before Temporal marks the activity as timed out.
|
|
58
|
+
* Required for activities that call `activity.heartbeat()` to signal liveness.
|
|
59
|
+
*/
|
|
60
|
+
heartbeatTimeout?: string;
|
|
61
|
+
/** Retry policy for failed activity attempts. */
|
|
62
|
+
retry?: {
|
|
63
|
+
/** Initial wait before the first retry (e.g. "5s"). */
|
|
64
|
+
initialInterval?: string;
|
|
65
|
+
/** Multiplier applied to the interval on each retry (e.g. 2). */
|
|
66
|
+
backoffCoefficient?: number;
|
|
67
|
+
/** Maximum number of attempts including the first (0 = unlimited). */
|
|
68
|
+
maximumAttempts?: number;
|
|
69
|
+
/** Cap on retry intervals (e.g. "5m"). */
|
|
70
|
+
maximumInterval?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Error names (`Error.name`) that fail immediately without retry. Honored
|
|
73
|
+
* in both modes: the generated worker spreads this profile into
|
|
74
|
+
* `proxyActivities`, so Temporal's RetryPolicy uses it; the local executor
|
|
75
|
+
* reads it directly to short-circuit its retry loop.
|
|
76
|
+
*/
|
|
77
|
+
nonRetryableErrorTypes?: string[];
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Named activity profiles for common infrastructure workflow patterns.
|
|
82
|
+
*
|
|
83
|
+
* Import and spread into `proxyActivities()` so retry/timeout configuration
|
|
84
|
+
* lives in the lexicon rather than inline in workflow code.
|
|
85
|
+
*/
|
|
86
|
+
export declare const TEMPORAL_ACTIVITY_PROFILES: {
|
|
87
|
+
/**
|
|
88
|
+
* Fast, idempotent operations: `chant build`, `kubectl apply` without `--wait`,
|
|
89
|
+
* fetching nameservers, reading cluster status.
|
|
90
|
+
*/
|
|
91
|
+
readonly fastIdempotent: {
|
|
92
|
+
readonly startToCloseTimeout: "5m";
|
|
93
|
+
readonly retry: {
|
|
94
|
+
readonly maximumAttempts: 3;
|
|
95
|
+
readonly initialInterval: "5s";
|
|
96
|
+
readonly backoffCoefficient: 2;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Long-running infra: GKE cluster creation via Config Connector (~10-20 min),
|
|
101
|
+
* `kubectl apply --wait` for large resource sets, Helm installs.
|
|
102
|
+
* Must heartbeat; 60 s silence → Temporal marks the activity dead.
|
|
103
|
+
*/
|
|
104
|
+
readonly longInfra: {
|
|
105
|
+
readonly startToCloseTimeout: "20m";
|
|
106
|
+
readonly heartbeatTimeout: "60s";
|
|
107
|
+
readonly retry: {
|
|
108
|
+
readonly maximumAttempts: 3;
|
|
109
|
+
readonly initialInterval: "30s";
|
|
110
|
+
readonly backoffCoefficient: 2;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* K8s wait loops: polling for StatefulSet rollout, ExternalDNS A-records,
|
|
115
|
+
* DNS propagation. Medium timeout with heartbeating.
|
|
116
|
+
*/
|
|
117
|
+
readonly k8sWait: {
|
|
118
|
+
readonly startToCloseTimeout: "15m";
|
|
119
|
+
readonly heartbeatTimeout: "60s";
|
|
120
|
+
readonly retry: {
|
|
121
|
+
readonly maximumAttempts: 3;
|
|
122
|
+
readonly initialInterval: "10s";
|
|
123
|
+
readonly backoffCoefficient: 2;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Human-gate activities: waiting for an operator action (DNS delegation, approval).
|
|
128
|
+
* Very long timeout, single attempt — no retry on human-gate timeouts.
|
|
129
|
+
*/
|
|
130
|
+
readonly humanGate: {
|
|
131
|
+
readonly startToCloseTimeout: "48h";
|
|
132
|
+
readonly heartbeatTimeout: "90s";
|
|
133
|
+
readonly retry: {
|
|
134
|
+
readonly maximumAttempts: 1;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Argo CD sync waits: poll an Application until `health=Healthy && sync=Synced`
|
|
139
|
+
* (`waitForArgoSync`). Long timeout for slow first syncs, 60s heartbeat, cheap
|
|
140
|
+
* idempotent retries — re-polling is free. A terminal-unhealthy Application
|
|
141
|
+
* fails fast via `ArgoSyncFailedError` (non-retryable).
|
|
142
|
+
*/
|
|
143
|
+
readonly argoSync: {
|
|
144
|
+
readonly startToCloseTimeout: "30m";
|
|
145
|
+
readonly heartbeatTimeout: "60s";
|
|
146
|
+
readonly retry: {
|
|
147
|
+
readonly maximumAttempts: 5;
|
|
148
|
+
readonly initialInterval: "10s";
|
|
149
|
+
readonly backoffCoefficient: 2;
|
|
150
|
+
readonly maximumInterval: "1m";
|
|
151
|
+
readonly nonRetryableErrorTypes: ["ArgoSyncFailedError"];
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* Organizational policy gate (`policyGate`): build the project and evaluate
|
|
156
|
+
* `lint.policies`. Deterministic — a violation is the same on every attempt —
|
|
157
|
+
* so a single attempt, short timeout, no retry. Fails fast in both executors.
|
|
158
|
+
*/
|
|
159
|
+
readonly policyCheck: {
|
|
160
|
+
readonly startToCloseTimeout: "5m";
|
|
161
|
+
readonly retry: {
|
|
162
|
+
readonly maximumAttempts: 1;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
export interface TemporalWorkerProfile {
|
|
167
|
+
/** Temporal server gRPC address. e.g. "localhost:7233" or "myns.a2dd6.tmprl.cloud:7233" */
|
|
168
|
+
address: string;
|
|
169
|
+
/** Temporal namespace to connect to */
|
|
170
|
+
namespace: string;
|
|
171
|
+
/** Task queue the worker polls */
|
|
172
|
+
taskQueue: string;
|
|
173
|
+
/** TLS configuration. Pass `true` or `{}` for Temporal Cloud default TLS */
|
|
174
|
+
tls?: boolean | {
|
|
175
|
+
serverNameOverride?: string;
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* API key for Temporal Cloud authentication.
|
|
179
|
+
* String value: used as-is (Bearer token).
|
|
180
|
+
* Object form: reads from process.env at runtime.
|
|
181
|
+
*/
|
|
182
|
+
apiKey?: string | {
|
|
183
|
+
env: string;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Automatically start `temporal server start-dev` before the worker.
|
|
187
|
+
* Only applicable for local development profiles.
|
|
188
|
+
*/
|
|
189
|
+
autoStart?: boolean;
|
|
190
|
+
}
|
|
191
|
+
export interface TemporalChantConfig {
|
|
192
|
+
/** Named connection profiles */
|
|
193
|
+
profiles: Record<string, TemporalWorkerProfile>;
|
|
194
|
+
/** Profile used when --profile flag is omitted from `chant run` */
|
|
195
|
+
defaultProfile?: string;
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,uBAAuB;IACtC,oEAAoE;IACpE,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iDAAiD;IACjD,KAAK,CAAC,EAAE;QACN,uDAAuD;QACvD,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,iEAAiE;QACjE,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,sEAAsE;QACtE,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,0CAA0C;QAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB;;;;;WAKG;QACH,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;KACnC,CAAC;CACH;AAED;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B;IACrC;;;OAGG;;;;;;;;;IAMH;;;;OAIG;;;;;;;;;;IAOH;;;OAGG;;;;;;;;;;IAOH;;;OAGG;;;;;;;;IAOH;;;;;OAKG;;;;;;;;;;;;IAaH;;;;OAIG;;;;;;;CAKuD,CAAC;AAE7D,MAAM,WAAW,qBAAqB;IACpC,2FAA2F;IAC3F,OAAO,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,GAAG,CAAC,EAAE,OAAO,GAAG;QAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAClC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IAChD,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coverage analysis for the Temporal lexicon.
|
|
3
|
+
*
|
|
4
|
+
* All 4 resources are hand-written (no remote spec), so coverage is always
|
|
5
|
+
* 100% by definition. This module satisfies the lexicon completeness checklist
|
|
6
|
+
* and provides a consistent interface for the plugin's coverage() lifecycle method.
|
|
7
|
+
*/
|
|
8
|
+
export interface CoverageResult {
|
|
9
|
+
total: number;
|
|
10
|
+
covered: number;
|
|
11
|
+
missing: string[];
|
|
12
|
+
}
|
|
13
|
+
export declare function analyze(): CoverageResult;
|
|
14
|
+
export declare function printCoverageResult(result: CoverageResult, verbose?: boolean): void;
|
|
15
|
+
//# sourceMappingURL=coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coverage.d.ts","sourceRoot":"","sources":["../src/coverage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AASD,wBAAgB,OAAO,IAAI,cAAc,CAMxC;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAOnF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live introspection of a Temporal cluster — implements the
|
|
3
|
+
* LexiconPlugin.describeResources() contract for the temporal lexicon.
|
|
4
|
+
*
|
|
5
|
+
* Connects to the cluster identified by the chant config profile that
|
|
6
|
+
* matches the current environment (falls back to defaultProfile), then lists:
|
|
7
|
+
* - Namespaces via workflowService.listNamespaces
|
|
8
|
+
* - SearchAttributes via operatorService.listSearchAttributes (per namespace)
|
|
9
|
+
* - Schedules via scheduleClient.list (per namespace)
|
|
10
|
+
*
|
|
11
|
+
* Results are keyed by server-side identifier (e.g. "namespace/prod",
|
|
12
|
+
* "searchAttribute/prod/Project", "schedule/prod/daily-report"). Mapping back
|
|
13
|
+
* to chant entity names is a separate concern (would need entity props passed
|
|
14
|
+
* through the plugin contract).
|
|
15
|
+
*/
|
|
16
|
+
import type { ResourceMetadata } from "@intentius/chant/lexicon";
|
|
17
|
+
export declare function describeResources(options: {
|
|
18
|
+
environment: string;
|
|
19
|
+
buildOutput: string;
|
|
20
|
+
entityNames: string[];
|
|
21
|
+
entities: Map<string, {
|
|
22
|
+
entityType: string;
|
|
23
|
+
props: Record<string, unknown>;
|
|
24
|
+
}>;
|
|
25
|
+
}): Promise<Record<string, ResourceMetadata>>;
|
|
26
|
+
//# sourceMappingURL=describe-resources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describe-resources.d.ts","sourceRoot":"","sources":["../src/describe-resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAyKjE,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;CAC/E,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CA8F5C"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { temporalPlugin } from "./plugin.js";
|
|
2
|
+
export { temporalSerializer } from "./serializer.js";
|
|
3
|
+
export { TemporalServer, TemporalNamespace, SearchAttribute, TemporalSchedule, } from "./resources.js";
|
|
4
|
+
export type { TemporalServerProps, TemporalNamespaceProps, SearchAttributeProps, TemporalScheduleProps, } from "./resources.js";
|
|
5
|
+
export type { TemporalWorkerProfile, TemporalChantConfig, TemporalActivityProfile } from "./config.js";
|
|
6
|
+
export { TEMPORAL_ACTIVITY_PROFILES } from "./config.js";
|
|
7
|
+
export { TemporalDevStack } from "./composites/dev-stack.js";
|
|
8
|
+
export type { TemporalDevStackConfig, TemporalDevStackResources } from "./composites/dev-stack.js";
|
|
9
|
+
export { TemporalCloudStack } from "./composites/cloud-stack.js";
|
|
10
|
+
export type { TemporalCloudStackConfig, TemporalCloudStackResources } from "./composites/cloud-stack.js";
|
|
11
|
+
export { WatchOp } from "./composites/watch-op.js";
|
|
12
|
+
export type { WatchOpConfig, WatchOpResources } from "./composites/watch-op.js";
|
|
13
|
+
export { ReconcileOp } from "./composites/reconcile-op.js";
|
|
14
|
+
export type { ReconcileOpConfig, ReconcileOpResources } from "./composites/reconcile-op.js";
|
|
15
|
+
export { WorkflowAuditOp } from "./composites/workflow-audit-op.js";
|
|
16
|
+
export type { WorkflowAuditOpConfig, WorkflowAuditOpResources } from "./composites/workflow-audit-op.js";
|
|
17
|
+
export { PipelineAuditOp } from "./composites/pipeline-audit-op.js";
|
|
18
|
+
export type { PipelineAuditOpConfig, PipelineAuditOpResources } from "./composites/pipeline-audit-op.js";
|
|
19
|
+
export { ApplyOp } from "./composites/apply-op.js";
|
|
20
|
+
export type { ApplyOpConfig, ApplyOpResources } from "./composites/apply-op.js";
|
|
21
|
+
export { Op, phase, activity, gate, build, kubectlApply, helmInstall, waitForStack, gitlabPipeline, lifecycleSnapshot, shell, teardown, policyGate, } from "@intentius/chant/op";
|
|
22
|
+
export type { OpConfig, PhaseDefinition, StepDefinition, ActivityStep, GateStep } from "@intentius/chant/op";
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGlD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAGrB,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACpG,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACtG,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,YAAY,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AACtG,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,YAAY,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AACtG,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG7E,OAAO,EACL,EAAE,EACF,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,UAAU,GACX,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/integrity.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "e9c0c8af9e76e4da58ae09f016216e46b24533fa5d5b8ff099d6a269a2415992",
|
|
5
5
|
"meta.json": "c77a3c415993bed3865e07fa6db4fb7b9e87de0afa8d8675f64eadf50f914077",
|
|
6
6
|
"types/index.d.ts": "5216f5256321f084a7c8211ef66ab599f621c74751cc3485cfc2a62502b81e2f",
|
|
7
|
-
"rules/tmp001.ts": "
|
|
8
|
-
"rules/tmp002.ts": "
|
|
7
|
+
"rules/tmp001-retention-too-short.ts": "577d5c4b2b0c26d08c33490d0a1e38606ad6ed7910f78a3e909f50738044e0d9",
|
|
8
|
+
"rules/tmp002-allowall-without-note.ts": "f08458aa201aff8e56af59451c777baccc38e0e28f6a85bc8089650e9e6c36ce",
|
|
9
9
|
"rules/tmp010-cron-syntax.ts": "47db78e7595bcd24a9a735dfd738e11b2d3d9465e317ae836fb3da8ff74cee63",
|
|
10
|
-
"rules/tmp011-namespace-reference.ts": "
|
|
10
|
+
"rules/tmp011-namespace-reference.ts": "95530a6c12c2efb37611c017569da6411f5c58574119a7691871775a472f37f7",
|
|
11
11
|
"skills/chant-temporal.md": "ff929983b33bb420c49ab61851f3799c5610256cb972d6c584792bb98b0cfb22",
|
|
12
12
|
"skills/chant-temporal-ops.md": "7e83bc3e6e63af4ab14b8dc07aa00132d51991cf35b1bca29560d48934bff6dc"
|
|
13
13
|
},
|
|
14
|
-
"composite": "
|
|
14
|
+
"composite": "35f023d7ed87211bfc615359e7515ee65d476f18df3e9318d7cc7c1170f5312f"
|
|
15
15
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAMvE,eAAO,MAAM,eAAe,EAAE,cAAc,EAK3C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TMP001: TemporalNamespace retention too short
|
|
3
|
+
*
|
|
4
|
+
* Workflow history older than the retention period is permanently deleted.
|
|
5
|
+
* Retentions shorter than 3 days leave very little time for debugging
|
|
6
|
+
* failures or running ad-hoc queries against closed workflow executions.
|
|
7
|
+
*/
|
|
8
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
9
|
+
export declare const tmp001: PostSynthCheck;
|
|
10
|
+
//# sourceMappingURL=tmp001-retention-too-short.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tmp001-retention-too-short.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tmp001-retention-too-short.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAW9G,eAAO,MAAM,MAAM,EAAE,cA+BpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TMP002: TemporalSchedule AllowAll overlap without explanatory note
|
|
3
|
+
*
|
|
4
|
+
* AllowAll allows any number of concurrent schedule runs. This is safe for
|
|
5
|
+
* idempotent, read-only workflows, but can cause resource exhaustion or
|
|
6
|
+
* duplicate side-effects if not explicitly intended. Requiring a note forces
|
|
7
|
+
* the author to document the intent.
|
|
8
|
+
*/
|
|
9
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
10
|
+
export declare const tmp002: PostSynthCheck;
|
|
11
|
+
//# sourceMappingURL=tmp002-allowall-without-note.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tmp002-allowall-without-note.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tmp002-allowall-without-note.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAE9G,eAAO,MAAM,MAAM,EAAE,cA+BpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TMP010: TemporalSchedule cron expression syntax
|
|
3
|
+
*
|
|
4
|
+
* Validates that cron expressions in TemporalSchedule.spec.cronExpressions
|
|
5
|
+
* are valid 5- or 6-field cron syntax. Malformed crons are silently ignored
|
|
6
|
+
* by Temporal's scheduler, leading to schedules that never fire.
|
|
7
|
+
*
|
|
8
|
+
* This is a pre-submission guard — final validation is Temporal's own parser.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
export declare const tmp010: PostSynthCheck;
|
|
12
|
+
//# sourceMappingURL=tmp010-cron-syntax.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tmp010-cron-syntax.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tmp010-cron-syntax.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAW9G,eAAO,MAAM,MAAM,EAAE,cA0CpB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TMP011: SearchAttribute references an undeclared namespace
|
|
3
|
+
*
|
|
4
|
+
* If SearchAttribute.namespace is set to a value X, there must be a
|
|
5
|
+
* TemporalNamespace entity with name === X in the project. A missing
|
|
6
|
+
* namespace means the search attribute create command will fail at runtime.
|
|
7
|
+
*/
|
|
8
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
9
|
+
export declare const tmp011: PostSynthCheck;
|
|
10
|
+
//# sourceMappingURL=tmp011-namespace-reference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tmp011-namespace-reference.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/tmp011-namespace-reference.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAE9G,eAAO,MAAM,MAAM,EAAE,cAsCpB,CAAC"}
|
package/dist/manifest.json
CHANGED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/** The native apply mechanism for a target. */
|
|
2
|
+
export type ApplyTarget = "cloudformation" | "kubectl" | "arm";
|
|
3
|
+
/**
|
|
4
|
+
* How apply treats resources no longer declared.
|
|
5
|
+
* - `never` — additive only; never deletes.
|
|
6
|
+
* - `owned-only` — deletes only chant-owned orphans, via the target's native
|
|
7
|
+
* prune/complete mechanism scoped to the ownership marker.
|
|
8
|
+
* - `gated` — same delete scope as `owned-only`, but the workflow pauses for
|
|
9
|
+
* approval before the destructive apply (the gate lives in the composite).
|
|
10
|
+
*/
|
|
11
|
+
export type DeleteMode = "never" | "owned-only" | "gated";
|
|
12
|
+
export interface NativeApplyArgs {
|
|
13
|
+
/** Native mechanism to delegate to. */
|
|
14
|
+
target: ApplyTarget;
|
|
15
|
+
/** Environment — CFN stack name / ARM resource group. */
|
|
16
|
+
env: string;
|
|
17
|
+
/** Built manifest/template path (or directory for kubectl). Default: dist. */
|
|
18
|
+
output?: string;
|
|
19
|
+
/** Delete handling. Default: never. */
|
|
20
|
+
deleteMode?: DeleteMode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Build the native apply command. Pure — exported for testing.
|
|
24
|
+
*
|
|
25
|
+
* Authority stays with the platform: the CloudFormation stack, the Kubernetes
|
|
26
|
+
* API server, the ARM resource group. chant hosts no state file. Owned-only
|
|
27
|
+
* deletes ride the native delete path, scoped to the ownership marker so a
|
|
28
|
+
* foreign resource is never touched:
|
|
29
|
+
* - kubectl: `--prune --selector <managed-by>=chant` prunes only chant-owned
|
|
30
|
+
* objects absent from the apply set.
|
|
31
|
+
* - CloudFormation: the stack is the boundary; `deploy` deletes resources
|
|
32
|
+
* removed from the template within it.
|
|
33
|
+
* - ARM: `--mode Complete` removes resources not in the template from the RG.
|
|
34
|
+
*/
|
|
35
|
+
export declare function applyCommand(target: ApplyTarget, env: string, output: string, deleteMode: DeleteMode): string;
|
|
36
|
+
/**
|
|
37
|
+
* Apply declared source to the cloud via the target's native mechanism.
|
|
38
|
+
* Deletes (when enabled) are limited to chant-owned orphans by construction —
|
|
39
|
+
* the native prune/complete path is scoped to the ownership marker.
|
|
40
|
+
*/
|
|
41
|
+
export declare function nativeApply(args: NativeApplyArgs, signal?: AbortSignal): Promise<{
|
|
42
|
+
command: string;
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* The native rollback command for a target, or undefined when the target has
|
|
46
|
+
* no single-command rollback. Pure — exported for testing.
|
|
47
|
+
*
|
|
48
|
+
* Only CloudFormation has a native "return to last known good state" command.
|
|
49
|
+
* For kubectl/ARM the caller must supply a rollback command; otherwise the
|
|
50
|
+
* compensation degrades to a logged warning rather than silently doing nothing.
|
|
51
|
+
*/
|
|
52
|
+
export declare function rollbackCommand(target: ApplyTarget, env: string): string | undefined;
|
|
53
|
+
export interface CompensateApplyArgs {
|
|
54
|
+
/** Native mechanism that was applied. */
|
|
55
|
+
target: ApplyTarget;
|
|
56
|
+
/** Environment — CFN stack name / ARM resource group. */
|
|
57
|
+
env: string;
|
|
58
|
+
/** Explicit rollback command, used in preference to the native default. */
|
|
59
|
+
command?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Compensation step (saga rollback) for a partial apply failure. Runs the
|
|
63
|
+
* explicit `command` if given, else the target's native rollback. Where no
|
|
64
|
+
* automatic rollback exists, it warns rather than silently no-op'ing — partial
|
|
65
|
+
* state should never look reverted when it isn't.
|
|
66
|
+
*/
|
|
67
|
+
export declare function compensateApply(args: CompensateApplyArgs, signal?: AbortSignal): Promise<{
|
|
68
|
+
command?: string;
|
|
69
|
+
}>;
|
|
70
|
+
//# sourceMappingURL=apply.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/op/activities/apply.ts"],"names":[],"mappings":"AAMA,+CAA+C;AAC/C,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,SAAS,GAAG,KAAK,CAAC;AAE/D;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,MAAM,EAAE,WAAW,CAAC;IACpB,yDAAyD;IACzD,GAAG,EAAE,MAAM,CAAC;IACZ,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,WAAW,EACnB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,GACrB,MAAM,CAiBR;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAQ3G;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQpF;AAED,MAAM,WAAW,mBAAmB;IAClC,yCAAyC;IACzC,MAAM,EAAE,WAAW,CAAC;IACpB,yDAAyD;IACzD,GAAG,EAAE,MAAM,CAAC;IACZ,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,mBAAmB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAYpH"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* waitForArgoSync — block until an Argo CD Application reports
|
|
3
|
+
* `health=Healthy && sync=Synced`.
|
|
4
|
+
*
|
|
5
|
+
* This activity is intentionally **dependency-free**: it must not import the k8s
|
|
6
|
+
* lexicon or its generated Argo CRD types. Its signature is primitives-only
|
|
7
|
+
* (app name / namespace / server). It reads the Application's status either via
|
|
8
|
+
* `kubectl get application` (default) or the Argo CD REST API (when `server` is
|
|
9
|
+
* given), so Temporal can gate procedural steps on a declarative apply that Argo
|
|
10
|
+
* owns.
|
|
11
|
+
*/
|
|
12
|
+
export interface WaitForArgoSyncArgs {
|
|
13
|
+
/** Argo Application name. */
|
|
14
|
+
appName: string;
|
|
15
|
+
/** Namespace the Application object lives in (default "argocd"). */
|
|
16
|
+
namespace?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Argo CD API base URL (e.g. https://argocd.example.com). When set, status is
|
|
19
|
+
* read from the REST API instead of kubectl. Pass `authToken` with it.
|
|
20
|
+
*/
|
|
21
|
+
server?: string;
|
|
22
|
+
/** Bearer token for the Argo CD REST API (used with `server`). */
|
|
23
|
+
authToken?: string;
|
|
24
|
+
/** Skip TLS verification for the REST API (default false). */
|
|
25
|
+
insecure?: boolean;
|
|
26
|
+
/** kubectl context (used when `server` is not set). */
|
|
27
|
+
context?: string;
|
|
28
|
+
/** Poll interval in ms (default 15000). Heartbeats every poll. */
|
|
29
|
+
intervalMs?: number;
|
|
30
|
+
}
|
|
31
|
+
/** The two status fields the activity gates on. */
|
|
32
|
+
export interface ArgoAppStatus {
|
|
33
|
+
/** Application health: Healthy | Progressing | Degraded | Missing | Suspended | Unknown. */
|
|
34
|
+
health: string;
|
|
35
|
+
/** Sync status: Synced | OutOfSync | Unknown. */
|
|
36
|
+
sync: string;
|
|
37
|
+
}
|
|
38
|
+
/** Pluggable status reader — overridden in tests with a faked Argo API. */
|
|
39
|
+
export type ArgoStatusFetcher = (args: WaitForArgoSyncArgs, signal?: AbortSignal) => Promise<ArgoAppStatus>;
|
|
40
|
+
/** Error thrown when the Application reaches a terminal unhealthy state. */
|
|
41
|
+
export declare class ArgoSyncFailedError extends Error {
|
|
42
|
+
constructor(message: string);
|
|
43
|
+
}
|
|
44
|
+
/** Default fetcher: REST API when `server` is set, else kubectl. */
|
|
45
|
+
export declare const defaultArgoStatusFetcher: ArgoStatusFetcher;
|
|
46
|
+
/**
|
|
47
|
+
* Poll until the Application is Healthy and Synced. Throws
|
|
48
|
+
* `ArgoSyncFailedError` if it reaches a terminal unhealthy state (Degraded /
|
|
49
|
+
* Missing). Heartbeats every poll so the `argoSync` profile's 60s heartbeat
|
|
50
|
+
* timeout never trips.
|
|
51
|
+
*
|
|
52
|
+
* @param fetcher injectable status reader (defaults to kubectl/REST). Tests pass
|
|
53
|
+
* a fake to drive Healthy/Progressing/Degraded transitions.
|
|
54
|
+
*/
|
|
55
|
+
export declare function waitForArgoSync(args: WaitForArgoSyncArgs, signal?: AbortSignal, fetcher?: ArgoStatusFetcher): Promise<ArgoAppStatus>;
|
|
56
|
+
//# sourceMappingURL=argo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"argo.d.ts","sourceRoot":"","sources":["../../../src/op/activities/argo.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,mBAAmB;IAClC,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,mDAAmD;AACnD,MAAM,WAAW,aAAa;IAC5B,4FAA4F;IAC5F,MAAM,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,2EAA2E;AAC3E,MAAM,MAAM,iBAAiB,GAAG,CAC9B,IAAI,EAAE,mBAAmB,EACzB,MAAM,CAAC,EAAE,WAAW,KACjB,OAAO,CAAC,aAAa,CAAC,CAAC;AAK5B,4EAA4E;AAC5E,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B;AA4CD,oEAAoE;AACpE,eAAO,MAAM,wBAAwB,EAAE,iBACkC,CAAC;AAE1E;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,mBAAmB,EACzB,MAAM,CAAC,EAAE,WAAW,EACpB,OAAO,GAAE,iBAA4C,GACpD,OAAO,CAAC,aAAa,CAAC,CAuBxB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ChantBuildArgs {
|
|
2
|
+
path: string;
|
|
3
|
+
/** Optional extra env vars to pass to the build command. */
|
|
4
|
+
env?: Record<string, string>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Run `npm run build` in the given project directory.
|
|
8
|
+
* Uses fastIdempotent profile — 5m timeout, 3 retries.
|
|
9
|
+
*/
|
|
10
|
+
export declare function chantBuild(args: ChantBuildArgs, signal?: AbortSignal): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/op/activities/build.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ1F"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface GitlabPipelineArgs {
|
|
2
|
+
/** GitLab project name or path (e.g. "group/project"). */
|
|
3
|
+
name: string;
|
|
4
|
+
/** Git ref to run the pipeline on. Default: current branch. */
|
|
5
|
+
ref?: string;
|
|
6
|
+
/** Poll interval in ms. Default: 30000. */
|
|
7
|
+
intervalMs?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Trigger a GitLab CI pipeline and wait for it to complete successfully.
|
|
11
|
+
* Requires `glab` CLI authenticated in the environment.
|
|
12
|
+
* Uses longInfra profile — 20m timeout, heartbeat every poll.
|
|
13
|
+
*/
|
|
14
|
+
export declare function gitlabPipeline(args: GitlabPipelineArgs, signal?: AbortSignal): Promise<void>;
|
|
15
|
+
//# sourceMappingURL=gitlab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitlab.d.ts","sourceRoot":"","sources":["../../../src/op/activities/gitlab.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,kBAAkB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAsClG"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Activity heartbeat shim.
|
|
3
|
+
*
|
|
4
|
+
* Activities heartbeat so a Temporal worker knows they are still alive. Two
|
|
5
|
+
* things make a naive `Context.current().heartbeat()` call unsafe outside a
|
|
6
|
+
* worker:
|
|
7
|
+
*
|
|
8
|
+
* 1. `@temporalio/activity` may not be installed at all — chant's local
|
|
9
|
+
* executor runs these same activity implementations with no Temporal SDK
|
|
10
|
+
* present. A static `import` would make the entire activity library fail
|
|
11
|
+
* to load. So we resolve `Context` lazily via dynamic import and cache it.
|
|
12
|
+
* 2. Even when installed, `Context.current()` throws when called outside an
|
|
13
|
+
* activity execution context. We swallow that too.
|
|
14
|
+
*
|
|
15
|
+
* Net effect: identical activity code heartbeats under a Temporal worker and
|
|
16
|
+
* no-ops locally, and the activity library imports cleanly without the SDK.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Emit an activity heartbeat if running under a Temporal worker; otherwise no-op.
|
|
20
|
+
*
|
|
21
|
+
* The first call kicks off a one-time lazy load of `@temporalio/activity` and
|
|
22
|
+
* returns immediately; once resolved, subsequent calls heartbeat. Heartbeats
|
|
23
|
+
* are periodic (every ~15s, well inside the 60s heartbeat timeout), so the
|
|
24
|
+
* single missed first tick is harmless.
|
|
25
|
+
*/
|
|
26
|
+
export declare function safeHeartbeat(details?: unknown): void;
|
|
27
|
+
//# sourceMappingURL=heartbeat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heartbeat.d.ts","sourceRoot":"","sources":["../../../src/op/activities/heartbeat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAuBH;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAWrD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface HelmInstallArgs {
|
|
2
|
+
/** Helm release name. */
|
|
3
|
+
name: string;
|
|
4
|
+
/** Chart reference (local path or `repo/chart`). */
|
|
5
|
+
chart: string;
|
|
6
|
+
/** Path to a values file. */
|
|
7
|
+
values?: string;
|
|
8
|
+
/** Kubernetes namespace. */
|
|
9
|
+
namespace?: string;
|
|
10
|
+
/** Additional --set arguments. */
|
|
11
|
+
set?: Record<string, string>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Run `helm upgrade --install <name> <chart>`.
|
|
15
|
+
* Uses longInfra profile — 20m timeout, heartbeat every 15s.
|
|
16
|
+
*/
|
|
17
|
+
export declare function helmInstall(args: HelmInstallArgs, signal?: AbortSignal): Promise<void>;
|
|
18
|
+
//# sourceMappingURL=helm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helm.d.ts","sourceRoot":"","sources":["../../../src/op/activities/helm.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,eAAe;IAC9B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB5F"}
|