@intentius/chant 0.18.5 → 0.18.7
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/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/is-entry-point.d.ts +13 -0
- package/dist/cli/is-entry-point.d.ts.map +1 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/op/builders.d.ts +95 -0
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/index.d.ts +1 -1
- package/dist/op/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli/handlers/lifecycle.ts +15 -3
- package/src/cli/is-entry-point.test.ts +46 -0
- package/src/cli/is-entry-point.ts +22 -0
- package/src/cli/main.ts +5 -2
- package/src/op/builders.ts +149 -0
- package/src/op/index.ts +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lifecycle.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAoBlD;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAwE/E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoC3E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA+C3E;
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lifecycle.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAoBlD;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAwE/E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoC3E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA+C3E;AAuTD;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA6G3E;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiB1E;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM9E;AAkBD;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA+C/E"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True when the module identified by `importMetaUrl` is the process entry point
|
|
3
|
+
* (`process.argv[1]`) — i.e. run directly, not imported.
|
|
4
|
+
*
|
|
5
|
+
* A naive `import.meta.url === \`file://${process.argv[1]}\`` is a false negative
|
|
6
|
+
* whenever the invocation path crosses a symlink (pnpm, global bins, a symlinked
|
|
7
|
+
* checkout, the npm `.bin` shim, `/tmp`→`/private/tmp`): the loader canonicalises
|
|
8
|
+
* `import.meta.url` to the realpath while `argv[1]` keeps the symlink, so the CLI
|
|
9
|
+
* silently exits 0 having done nothing. Canonicalise both sides so the entry
|
|
10
|
+
* point is detected regardless of how the path was spelled.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isEntryPoint(argv1: string | undefined, importMetaUrl: string): boolean;
|
|
13
|
+
//# sourceMappingURL=is-entry-point.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-entry-point.d.ts","sourceRoot":"","sources":["../../src/cli/is-entry-point.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAOtF"}
|
package/dist/cli/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAMA,OAAO,EAAmC,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAiB9E;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CA2LpD"}
|
package/dist/op/builders.d.ts
CHANGED
|
@@ -209,6 +209,101 @@ export declare const spriteDestroy: (args: {
|
|
|
209
209
|
token?: string;
|
|
210
210
|
profile?: ActivityStep["profile"];
|
|
211
211
|
}) => ActivityStep;
|
|
212
|
+
/** Write a file into a sprite. Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
213
|
+
export declare const spriteWriteFile: (args: {
|
|
214
|
+
id: string;
|
|
215
|
+
path: string;
|
|
216
|
+
content: string;
|
|
217
|
+
mode?: string;
|
|
218
|
+
mkdir?: boolean;
|
|
219
|
+
workingDir?: string;
|
|
220
|
+
endpoint?: string;
|
|
221
|
+
token?: string;
|
|
222
|
+
profile?: ActivityStep["profile"];
|
|
223
|
+
}) => ActivityStep;
|
|
224
|
+
/** Read a file from a sprite (returns `{ content }`). Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
225
|
+
export declare const spriteReadFile: (args: {
|
|
226
|
+
id: string;
|
|
227
|
+
path: string;
|
|
228
|
+
workingDir?: string;
|
|
229
|
+
endpoint?: string;
|
|
230
|
+
token?: string;
|
|
231
|
+
profile?: ActivityStep["profile"];
|
|
232
|
+
}) => ActivityStep;
|
|
233
|
+
/** List a directory in a sprite (returns `[{ name, type, size? }]`). Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
234
|
+
export declare const spriteListDir: (args: {
|
|
235
|
+
id: string;
|
|
236
|
+
path: string;
|
|
237
|
+
workingDir?: string;
|
|
238
|
+
endpoint?: string;
|
|
239
|
+
token?: string;
|
|
240
|
+
profile?: ActivityStep["profile"];
|
|
241
|
+
}) => ActivityStep;
|
|
242
|
+
/** Remove a path in a sprite (idempotent). Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
243
|
+
export declare const spriteRemove: (args: {
|
|
244
|
+
id: string;
|
|
245
|
+
path: string;
|
|
246
|
+
recursive?: boolean;
|
|
247
|
+
asRoot?: boolean;
|
|
248
|
+
workingDir?: string;
|
|
249
|
+
endpoint?: string;
|
|
250
|
+
token?: string;
|
|
251
|
+
profile?: ActivityStep["profile"];
|
|
252
|
+
}) => ActivityStep;
|
|
253
|
+
/** Reconcile a sprite's outbound network policy (whole-object replace). Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
254
|
+
export declare const spriteApplyNetworkPolicy: (args: {
|
|
255
|
+
id: string;
|
|
256
|
+
rules: Array<{
|
|
257
|
+
domain: string;
|
|
258
|
+
action: "allow" | "deny";
|
|
259
|
+
}>;
|
|
260
|
+
endpoint?: string;
|
|
261
|
+
token?: string;
|
|
262
|
+
profile?: ActivityStep["profile"];
|
|
263
|
+
}) => ActivityStep;
|
|
264
|
+
/** Reconcile a sprite's background services (create-or-update, optionally start). Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
265
|
+
export declare const spriteApplyServices: (args: {
|
|
266
|
+
id: string;
|
|
267
|
+
services: Array<{
|
|
268
|
+
name: string;
|
|
269
|
+
cmd: string;
|
|
270
|
+
args?: string[];
|
|
271
|
+
env?: Record<string, string>;
|
|
272
|
+
dir?: string;
|
|
273
|
+
needs?: string[];
|
|
274
|
+
http_port?: number;
|
|
275
|
+
}>;
|
|
276
|
+
start?: boolean;
|
|
277
|
+
endpoint?: string;
|
|
278
|
+
token?: string;
|
|
279
|
+
profile?: ActivityStep["profile"];
|
|
280
|
+
}) => ActivityStep;
|
|
281
|
+
/** Create a keep-alive task holding the sprite active. Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
282
|
+
export declare const spriteTaskCreate: (args: {
|
|
283
|
+
id: string;
|
|
284
|
+
name: string;
|
|
285
|
+
expire?: number | string;
|
|
286
|
+
endpoint?: string;
|
|
287
|
+
token?: string;
|
|
288
|
+
profile?: ActivityStep["profile"];
|
|
289
|
+
}) => ActivityStep;
|
|
290
|
+
/** Refresh a keep-alive task's expiry. Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
291
|
+
export declare const spriteTaskRefresh: (args: {
|
|
292
|
+
id: string;
|
|
293
|
+
name: string;
|
|
294
|
+
expire?: number | string;
|
|
295
|
+
endpoint?: string;
|
|
296
|
+
token?: string;
|
|
297
|
+
profile?: ActivityStep["profile"];
|
|
298
|
+
}) => ActivityStep;
|
|
299
|
+
/** Release a keep-alive task (idempotent). Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
300
|
+
export declare const spriteTaskRelease: (args: {
|
|
301
|
+
id: string;
|
|
302
|
+
name: string;
|
|
303
|
+
endpoint?: string;
|
|
304
|
+
token?: string;
|
|
305
|
+
profile?: ActivityStep["profile"];
|
|
306
|
+
}) => ActivityStep;
|
|
212
307
|
/**
|
|
213
308
|
* Boot a local spritzer (Fly Sprites API emulator) in Docker — the typed twin of
|
|
214
309
|
* `flociGcpUp` for Sprites. Resolves to the `spritesUp` activity. Defaults to the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../src/op/builders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIjG;;;;;;;;;;;;;;GAcG;AAC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,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;CACnC,KAAG,YAGH,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,OAAM;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;CAC9B,KAAG,YAGR,CAAC;AAEF,+JAA+J;AAC/J,eAAO,MAAM,WAAW,GAAI,OAAM;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;CAC9B,KAAG,YAGR,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,YAKjE,CAAC"}
|
package/dist/op/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Op, phase, activity, gate, build, kubectlApply, helmInstall, waitForStack, gitlabPipeline, lifecycleSnapshot, shell, teardown, k3dUp, k3dDown, flociUp, flociDown, flociAzUp, flociAzDown, flociGcpUp, flociGcpDown, httpCheck, azGroupEnsure, azGroupDelete, azApply, azDelete, awsApply, awsDelete, gcpApply, gcpDelete, policyGate, spriteCreate, spriteExec, spriteCheckpoint, spriteRestore, listCheckpoints, spriteDestroy, spritesUp, spritesDown } from "./builders.js";
|
|
1
|
+
export { Op, phase, activity, gate, build, kubectlApply, helmInstall, waitForStack, gitlabPipeline, lifecycleSnapshot, shell, teardown, k3dUp, k3dDown, flociUp, flociDown, flociAzUp, flociAzDown, flociGcpUp, flociGcpDown, httpCheck, azGroupEnsure, azGroupDelete, azApply, azDelete, awsApply, awsDelete, gcpApply, gcpDelete, policyGate, spriteCreate, spriteExec, spriteCheckpoint, spriteRestore, listCheckpoints, spriteDestroy, spriteWriteFile, spriteReadFile, spriteListDir, spriteRemove, spriteApplyNetworkPolicy, spriteApplyServices, spriteTaskCreate, spriteTaskRefresh, spriteTaskRelease, spritesUp, spritesDown } from "./builders.js";
|
|
2
2
|
export { OpResource } from "./resource.js";
|
|
3
3
|
export { safeHeartbeat, sleep } from "./activity-runtime.js";
|
|
4
4
|
export { emulatorLifecycle } from "./emulator-lifecycle.js";
|
package/dist/op/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/op/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EACzE,cAAc,EAAE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EACtF,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAC3D,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EACrG,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EACzF,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE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gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EACtD,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC5F,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACpF,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAClH,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -192,7 +192,7 @@ export async function runLifecycleDiff(ctx: CommandContext): Promise<number> {
|
|
|
192
192
|
: Array.from(buildResult.manifest.lexicons);
|
|
193
193
|
|
|
194
194
|
if (args.live) {
|
|
195
|
-
return runLifecycleDiffLive({ environment, lexicons, plugins, buildResult });
|
|
195
|
+
return runLifecycleDiffLive({ environment, lexicons, plugins, buildResult, json: !!args.json });
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
return runLifecycleDiffDigest({ environment, lexicons, buildResult });
|
|
@@ -308,11 +308,16 @@ interface LiveDiffArgs {
|
|
|
308
308
|
lexicons: string[];
|
|
309
309
|
plugins: ObservationLexicon[];
|
|
310
310
|
buildResult: BuildResult;
|
|
311
|
+
/** Emit machine-readable JSON on stdout instead of the human report (#852). */
|
|
312
|
+
json: boolean;
|
|
311
313
|
}
|
|
312
314
|
|
|
313
315
|
async function runLifecycleDiffLive(args: LiveDiffArgs): Promise<number> {
|
|
314
316
|
let totalDrift = 0;
|
|
315
317
|
let totalLexiconsChecked = 0;
|
|
318
|
+
// Collected per-lexicon results, emitted as one JSON object when --json is set
|
|
319
|
+
// (parsed by programmatic consumers, e.g. behold's inspect diff — #852).
|
|
320
|
+
const byLexicon: Record<string, { resources?: LiveDiffResult; artifacts?: LiveArtifactDiffResult }> = {};
|
|
316
321
|
|
|
317
322
|
for (const lexiconName of args.lexicons) {
|
|
318
323
|
const plugin = args.plugins.find((p) => p.name === lexiconName);
|
|
@@ -374,7 +379,8 @@ async function runLifecycleDiffLive(args: LiveDiffArgs): Promise<number> {
|
|
|
374
379
|
const observedThen = prevSnapshot?.resources;
|
|
375
380
|
const diff = diffLive({ declared, observedNow, observedThen });
|
|
376
381
|
totalDrift += diff.driftedSinceSnapshot.length + diff.missing.length + diff.orphan.length + diff.disappeared.length;
|
|
377
|
-
|
|
382
|
+
if (args.json) (byLexicon[lexiconName] ??= {}).resources = diff;
|
|
383
|
+
else renderLiveDiff(lexiconName, args.environment, diff);
|
|
378
384
|
lexiconChecked = true;
|
|
379
385
|
}
|
|
380
386
|
|
|
@@ -392,7 +398,8 @@ async function runLifecycleDiffLive(args: LiveDiffArgs): Promise<number> {
|
|
|
392
398
|
const observedThen = prevSnapshot?.artifacts;
|
|
393
399
|
const adiff = diffLiveArtifacts({ observedNow, observedThen });
|
|
394
400
|
totalDrift += adiff.added.length + adiff.removed.length + adiff.changed.length;
|
|
395
|
-
|
|
401
|
+
if (args.json) (byLexicon[lexiconName] ??= {}).artifacts = adiff;
|
|
402
|
+
else renderLiveArtifactDiff(lexiconName, args.environment, adiff);
|
|
396
403
|
lexiconChecked = true;
|
|
397
404
|
}
|
|
398
405
|
|
|
@@ -406,6 +413,11 @@ async function runLifecycleDiffLive(args: LiveDiffArgs): Promise<number> {
|
|
|
406
413
|
return 1;
|
|
407
414
|
}
|
|
408
415
|
|
|
416
|
+
if (args.json) {
|
|
417
|
+
console.log(JSON.stringify({ environment: args.environment, lexicons: byLexicon }));
|
|
418
|
+
return 0;
|
|
419
|
+
}
|
|
420
|
+
|
|
409
421
|
if (totalDrift === 0) {
|
|
410
422
|
console.error(formatSuccess(`No drift detected across ${totalLexiconsChecked} lexicon(s)`));
|
|
411
423
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { describe, test, expect, beforeAll, afterAll } from "vitest";
|
|
2
|
+
import { isEntryPoint } from "./is-entry-point";
|
|
3
|
+
import { mkdtempSync, writeFileSync, symlinkSync, rmSync } from "node:fs";
|
|
4
|
+
import { tmpdir } from "node:os";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
import { pathToFileURL } from "node:url";
|
|
7
|
+
|
|
8
|
+
describe("isEntryPoint", () => {
|
|
9
|
+
let dir: string;
|
|
10
|
+
|
|
11
|
+
beforeAll(() => {
|
|
12
|
+
dir = mkdtempSync(join(tmpdir(), "chant-entry-"));
|
|
13
|
+
writeFileSync(join(dir, "cli.ts"), "");
|
|
14
|
+
writeFileSync(join(dir, "marker"), "");
|
|
15
|
+
symlinkSync(join(dir, "cli.ts"), join(dir, "cli-link.ts"));
|
|
16
|
+
});
|
|
17
|
+
afterAll(() => rmSync(dir, { recursive: true, force: true }));
|
|
18
|
+
|
|
19
|
+
test("true when argv1 and import.meta.url are the same real file", () => {
|
|
20
|
+
const file = join(dir, "cli.ts");
|
|
21
|
+
expect(isEntryPoint(file, pathToFileURL(file).href)).toBe(true);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
test("true when argv1 is a symlink to the file import.meta.url resolves to", () => {
|
|
25
|
+
// The regression: import.meta.url is the realpath (real cli.ts); argv1 is the
|
|
26
|
+
// symlink (cli-link.ts). A raw string compare would be false; this must be true.
|
|
27
|
+
const symlinkArg = join(dir, "cli-link.ts");
|
|
28
|
+
const realUrl = pathToFileURL(join(dir, "cli.ts")).href;
|
|
29
|
+
expect(symlinkArg).not.toBe(join(dir, "cli.ts"));
|
|
30
|
+
expect(isEntryPoint(symlinkArg, realUrl)).toBe(true);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test("false for a different file (imported, not the entry point)", () => {
|
|
34
|
+
const other = join(dir, "cli.ts");
|
|
35
|
+
const importedUrl = pathToFileURL(join(dir, "marker")).href;
|
|
36
|
+
expect(isEntryPoint(other, importedUrl)).toBe(false);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test("false when there is no argv1", () => {
|
|
40
|
+
expect(isEntryPoint(undefined, pathToFileURL(join(dir, "cli.ts")).href)).toBe(false);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
test("false (not a throw) when a path does not exist", () => {
|
|
44
|
+
expect(isEntryPoint(join(dir, "gone.ts"), pathToFileURL(join(dir, "cli.ts")).href)).toBe(false);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { realpathSync } from "node:fs";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* True when the module identified by `importMetaUrl` is the process entry point
|
|
6
|
+
* (`process.argv[1]`) — i.e. run directly, not imported.
|
|
7
|
+
*
|
|
8
|
+
* A naive `import.meta.url === \`file://${process.argv[1]}\`` is a false negative
|
|
9
|
+
* whenever the invocation path crosses a symlink (pnpm, global bins, a symlinked
|
|
10
|
+
* checkout, the npm `.bin` shim, `/tmp`→`/private/tmp`): the loader canonicalises
|
|
11
|
+
* `import.meta.url` to the realpath while `argv[1]` keeps the symlink, so the CLI
|
|
12
|
+
* silently exits 0 having done nothing. Canonicalise both sides so the entry
|
|
13
|
+
* point is detected regardless of how the path was spelled.
|
|
14
|
+
*/
|
|
15
|
+
export function isEntryPoint(argv1: string | undefined, importMetaUrl: string): boolean {
|
|
16
|
+
if (!argv1) return false;
|
|
17
|
+
try {
|
|
18
|
+
return realpathSync(argv1) === realpathSync(fileURLToPath(importMetaUrl));
|
|
19
|
+
} catch {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
}
|
package/src/cli/main.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env tsx
|
|
2
2
|
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
|
+
import { isEntryPoint } from "./is-entry-point";
|
|
4
5
|
import { formatSuccess, formatError } from "./format";
|
|
5
6
|
import { loadPlugins, resolveProjectLexicons } from "./plugins";
|
|
6
7
|
import { resolveCommand, type CommandDef, type ParsedArgs } from "./registry";
|
|
@@ -536,8 +537,10 @@ async function main(): Promise<void> {
|
|
|
536
537
|
process.exit(await match.def.handler(ctx));
|
|
537
538
|
}
|
|
538
539
|
|
|
539
|
-
// Only run main when executed directly, not when imported
|
|
540
|
-
|
|
540
|
+
// Only run main when executed directly, not when imported. Robust to symlinked
|
|
541
|
+
// invocation paths — see isEntryPoint (a raw string compare silently no-ops the
|
|
542
|
+
// whole CLI through the npm .bin shim / a symlinked checkout).
|
|
543
|
+
const isMain = isEntryPoint(process.argv[1], import.meta.url);
|
|
541
544
|
if (isMain) {
|
|
542
545
|
main().catch((err) => {
|
|
543
546
|
const verbose = process.argv.includes("--verbose") || process.argv.includes("-v");
|
package/src/op/builders.ts
CHANGED
|
@@ -388,6 +388,155 @@ export const spriteDestroy = (args: {
|
|
|
388
388
|
return activity("spriteDestroy", rest, profile ?? "fastIdempotent");
|
|
389
389
|
};
|
|
390
390
|
|
|
391
|
+
// ── Sprite filesystem steps (#848) — stage inputs / read results without exec ──
|
|
392
|
+
//
|
|
393
|
+
// Same builder/activity split as the lifecycle steps above: these author
|
|
394
|
+
// `activity("spriteWriteFile", ...)` steps; `loadActivities(["fly"])` binds them
|
|
395
|
+
// to the implementations in fly's `op/activities/sprite-fs.ts`. All default to
|
|
396
|
+
// `fastIdempotent` — write/remove converge on the same end state under retry.
|
|
397
|
+
|
|
398
|
+
/** Write a file into a sprite. Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
399
|
+
export const spriteWriteFile = (args: {
|
|
400
|
+
id: string;
|
|
401
|
+
path: string;
|
|
402
|
+
content: string;
|
|
403
|
+
mode?: string;
|
|
404
|
+
mkdir?: boolean;
|
|
405
|
+
workingDir?: string;
|
|
406
|
+
endpoint?: string;
|
|
407
|
+
token?: string;
|
|
408
|
+
profile?: ActivityStep["profile"];
|
|
409
|
+
}): ActivityStep => {
|
|
410
|
+
const { profile, ...rest } = args;
|
|
411
|
+
return activity("spriteWriteFile", rest, profile ?? "fastIdempotent");
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
/** Read a file from a sprite (returns `{ content }`). Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
415
|
+
export const spriteReadFile = (args: {
|
|
416
|
+
id: string;
|
|
417
|
+
path: string;
|
|
418
|
+
workingDir?: string;
|
|
419
|
+
endpoint?: string;
|
|
420
|
+
token?: string;
|
|
421
|
+
profile?: ActivityStep["profile"];
|
|
422
|
+
}): ActivityStep => {
|
|
423
|
+
const { profile, ...rest } = args;
|
|
424
|
+
return activity("spriteReadFile", rest, profile ?? "fastIdempotent");
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
/** List a directory in a sprite (returns `[{ name, type, size? }]`). Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
428
|
+
export const spriteListDir = (args: {
|
|
429
|
+
id: string;
|
|
430
|
+
path: string;
|
|
431
|
+
workingDir?: string;
|
|
432
|
+
endpoint?: string;
|
|
433
|
+
token?: string;
|
|
434
|
+
profile?: ActivityStep["profile"];
|
|
435
|
+
}): ActivityStep => {
|
|
436
|
+
const { profile, ...rest } = args;
|
|
437
|
+
return activity("spriteListDir", rest, profile ?? "fastIdempotent");
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
/** Remove a path in a sprite (idempotent). Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
441
|
+
export const spriteRemove = (args: {
|
|
442
|
+
id: string;
|
|
443
|
+
path: string;
|
|
444
|
+
recursive?: boolean;
|
|
445
|
+
asRoot?: boolean;
|
|
446
|
+
workingDir?: string;
|
|
447
|
+
endpoint?: string;
|
|
448
|
+
token?: string;
|
|
449
|
+
profile?: ActivityStep["profile"];
|
|
450
|
+
}): ActivityStep => {
|
|
451
|
+
const { profile, ...rest } = args;
|
|
452
|
+
return activity("spriteRemove", rest, profile ?? "fastIdempotent");
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
// ── Sprite config reconcile steps (#849) — desired-state on a live Sprite ──────
|
|
456
|
+
//
|
|
457
|
+
// Apply-activities, not a declarable resource: `spriteApplyNetworkPolicy`
|
|
458
|
+
// whole-object-replaces the outbound policy; `spriteApplyServices` create-or-
|
|
459
|
+
// updates each desired background service (optionally starting them in
|
|
460
|
+
// dependency order). Validation runs pure before any HTTP. `loadActivities(["fly"])`
|
|
461
|
+
// binds the impls in fly's `op/activities/sprite-config.ts`.
|
|
462
|
+
|
|
463
|
+
/** Reconcile a sprite's outbound network policy (whole-object replace). Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
464
|
+
export const spriteApplyNetworkPolicy = (args: {
|
|
465
|
+
id: string;
|
|
466
|
+
rules: Array<{ domain: string; action: "allow" | "deny" }>;
|
|
467
|
+
endpoint?: string;
|
|
468
|
+
token?: string;
|
|
469
|
+
profile?: ActivityStep["profile"];
|
|
470
|
+
}): ActivityStep => {
|
|
471
|
+
const { profile, ...rest } = args;
|
|
472
|
+
return activity("spriteApplyNetworkPolicy", rest, profile ?? "fastIdempotent");
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
/** Reconcile a sprite's background services (create-or-update, optionally start). Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
476
|
+
export const spriteApplyServices = (args: {
|
|
477
|
+
id: string;
|
|
478
|
+
services: Array<{
|
|
479
|
+
name: string;
|
|
480
|
+
cmd: string;
|
|
481
|
+
args?: string[];
|
|
482
|
+
env?: Record<string, string>;
|
|
483
|
+
dir?: string;
|
|
484
|
+
needs?: string[];
|
|
485
|
+
http_port?: number;
|
|
486
|
+
}>;
|
|
487
|
+
start?: boolean;
|
|
488
|
+
endpoint?: string;
|
|
489
|
+
token?: string;
|
|
490
|
+
profile?: ActivityStep["profile"];
|
|
491
|
+
}): ActivityStep => {
|
|
492
|
+
const { profile, ...rest } = args;
|
|
493
|
+
return activity("spriteApplyServices", rest, profile ?? "fastIdempotent");
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
// ── Sprite keep-alive Task steps (#847) — hold a Sprite active for a session ──
|
|
497
|
+
//
|
|
498
|
+
// A hold stops the Sprite pausing while a session runs; release frees it. A
|
|
499
|
+
// session that can outlast the 1-hour task cap refreshes in its own loop.
|
|
500
|
+
// `loadActivities(["fly"])` binds the impls in fly's `op/activities/sprite-tasks.ts`.
|
|
501
|
+
|
|
502
|
+
/** Create a keep-alive task holding the sprite active. Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
503
|
+
export const spriteTaskCreate = (args: {
|
|
504
|
+
id: string;
|
|
505
|
+
name: string;
|
|
506
|
+
expire?: number | string;
|
|
507
|
+
endpoint?: string;
|
|
508
|
+
token?: string;
|
|
509
|
+
profile?: ActivityStep["profile"];
|
|
510
|
+
}): ActivityStep => {
|
|
511
|
+
const { profile, ...rest } = args;
|
|
512
|
+
return activity("spriteTaskCreate", rest, profile ?? "fastIdempotent");
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
/** Refresh a keep-alive task's expiry. Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
516
|
+
export const spriteTaskRefresh = (args: {
|
|
517
|
+
id: string;
|
|
518
|
+
name: string;
|
|
519
|
+
expire?: number | string;
|
|
520
|
+
endpoint?: string;
|
|
521
|
+
token?: string;
|
|
522
|
+
profile?: ActivityStep["profile"];
|
|
523
|
+
}): ActivityStep => {
|
|
524
|
+
const { profile, ...rest } = args;
|
|
525
|
+
return activity("spriteTaskRefresh", rest, profile ?? "fastIdempotent");
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
/** Release a keep-alive task (idempotent). Defaults to the `fastIdempotent` profile (override via `profile`). */
|
|
529
|
+
export const spriteTaskRelease = (args: {
|
|
530
|
+
id: string;
|
|
531
|
+
name: string;
|
|
532
|
+
endpoint?: string;
|
|
533
|
+
token?: string;
|
|
534
|
+
profile?: ActivityStep["profile"];
|
|
535
|
+
}): ActivityStep => {
|
|
536
|
+
const { profile, ...rest } = args;
|
|
537
|
+
return activity("spriteTaskRelease", rest, profile ?? "fastIdempotent");
|
|
538
|
+
};
|
|
539
|
+
|
|
391
540
|
/**
|
|
392
541
|
* Boot a local spritzer (Fly Sprites API emulator) in Docker — the typed twin of
|
|
393
542
|
* `flociGcpUp` for Sprites. Resolves to the `spritesUp` activity. Defaults to the
|
package/src/op/index.ts
CHANGED
|
@@ -3,6 +3,9 @@ export { Op, phase, activity, gate, build, kubectlApply, helmInstall, waitForSta
|
|
|
3
3
|
flociAzUp, flociAzDown, flociGcpUp, flociGcpDown, httpCheck,
|
|
4
4
|
azGroupEnsure, azGroupDelete, azApply, azDelete, awsApply, awsDelete, gcpApply, gcpDelete, policyGate,
|
|
5
5
|
spriteCreate, spriteExec, spriteCheckpoint, spriteRestore, listCheckpoints, spriteDestroy,
|
|
6
|
+
spriteWriteFile, spriteReadFile, spriteListDir, spriteRemove,
|
|
7
|
+
spriteApplyNetworkPolicy, spriteApplyServices,
|
|
8
|
+
spriteTaskCreate, spriteTaskRefresh, spriteTaskRelease,
|
|
6
9
|
spritesUp, spritesDown } from "./builders";
|
|
7
10
|
export { OpResource } from "./resource";
|
|
8
11
|
export { safeHeartbeat, sleep } from "./activity-runtime";
|