@fluidgrids/cli 2026.1115.3 → 2026.1115.5
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.js +49 -14
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -1265,6 +1265,15 @@ function compareText(a, b) {
|
|
|
1265
1265
|
function isRecord5(value) {
|
|
1266
1266
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1267
1267
|
}
|
|
1268
|
+
function isConsistentListing(rows, totals) {
|
|
1269
|
+
if (totals.size > 1)
|
|
1270
|
+
return false;
|
|
1271
|
+
const [total] = [...totals];
|
|
1272
|
+
if (total !== undefined && rows.length !== total)
|
|
1273
|
+
return false;
|
|
1274
|
+
const seen = new Set(rows.map((row) => `${row.nodeType}\x00${row.nodeVersion}`));
|
|
1275
|
+
return seen.size === rows.length;
|
|
1276
|
+
}
|
|
1268
1277
|
function manifestFromConfig(row) {
|
|
1269
1278
|
const operations = row.operations;
|
|
1270
1279
|
const usable = Array.isArray(operations) || isRecord5(operations) && Array.isArray(operations["operations"]);
|
|
@@ -1415,16 +1424,27 @@ function createCodeFirstApi(ctx) {
|
|
|
1415
1424
|
return data.workflowInterface;
|
|
1416
1425
|
},
|
|
1417
1426
|
async nodeManifests() {
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1427
|
+
let rows = null;
|
|
1428
|
+
for (let attempt = 1;attempt <= REGISTRY_LISTING_ATTEMPTS && rows === null; attempt++) {
|
|
1429
|
+
const totals = new Set;
|
|
1430
|
+
const listed = await paginate(async (offset) => {
|
|
1431
|
+
const data = await request(CF_LIST_NODE_MANIFESTS, {
|
|
1432
|
+
status: "AVAILABLE",
|
|
1433
|
+
pagination: { limit: PAGE_SIZE, offset }
|
|
1434
|
+
});
|
|
1435
|
+
const pagination = data.nodeEndpointConfigs.pagination;
|
|
1436
|
+
if (typeof pagination?.total === "number")
|
|
1437
|
+
totals.add(pagination.total);
|
|
1438
|
+
return { rows: data.nodeEndpointConfigs.configs, hasMore: pagination?.hasMore ?? false };
|
|
1422
1439
|
});
|
|
1423
|
-
|
|
1424
|
-
rows
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1440
|
+
if (isConsistentListing(listed, totals))
|
|
1441
|
+
rows = listed;
|
|
1442
|
+
}
|
|
1443
|
+
if (rows === null) {
|
|
1444
|
+
throw new CliUserError8(`The node registry changed while it was being read, ${REGISTRY_LISTING_ATTEMPTS} times in a row.`, {
|
|
1445
|
+
hint: "Nodes are being published to the workspace registry right now; run the command again in a minute."
|
|
1446
|
+
});
|
|
1447
|
+
}
|
|
1428
1448
|
return rows.map(manifestFromConfig).filter((manifest) => manifest !== null).sort((a, b) => compareText(`${a.nodeType}\x00${String(a.nodeVersion)}`, `${b.nodeType}\x00${String(b.nodeVersion)}`));
|
|
1429
1449
|
},
|
|
1430
1450
|
async connections() {
|
|
@@ -1667,7 +1687,7 @@ function createCodeFirstApi(ctx) {
|
|
|
1667
1687
|
}
|
|
1668
1688
|
};
|
|
1669
1689
|
}
|
|
1670
|
-
var PARITY_START_FIELDS, PAGE_SIZE = 100, MAX_PAGES = 200;
|
|
1690
|
+
var PARITY_START_FIELDS, PAGE_SIZE = 100, MAX_PAGES = 200, REGISTRY_LISTING_ATTEMPTS = 4;
|
|
1671
1691
|
var init_api = __esm(() => {
|
|
1672
1692
|
init_redact();
|
|
1673
1693
|
init_flag_hint();
|
|
@@ -2685,6 +2705,16 @@ import { CliUserError as CliUserError14 } from "@burdenoff/cli-sdk/core";
|
|
|
2685
2705
|
import { registrySnapshotHash } from "@fluidgrids/workflows/codegen";
|
|
2686
2706
|
import { buildExportDocument, irHash as irHash3, serializeWorkflowDocument } from "@fluidgrids/workflows/ir";
|
|
2687
2707
|
import { exportWorkflowCode } from "@fluidgrids/workflows/roundtrip";
|
|
2708
|
+
function withoutSnapshot(content) {
|
|
2709
|
+
return content.replace(SNAPSHOT_LINE, "$1 Node registry snapshot");
|
|
2710
|
+
}
|
|
2711
|
+
function keepUnlessChanged(file, existing) {
|
|
2712
|
+
if (existing === null || existing === file.content)
|
|
2713
|
+
return file;
|
|
2714
|
+
if (!SNAPSHOT_LINE.test(existing) || !SNAPSHOT_LINE.test(file.content))
|
|
2715
|
+
return file;
|
|
2716
|
+
return withoutSnapshot(existing) === withoutSnapshot(file.content) ? { ...file, content: existing } : file;
|
|
2717
|
+
}
|
|
2688
2718
|
function isNodesFile(path) {
|
|
2689
2719
|
return path === `${GENERATED_DIR}/nodes.ts` || path === `${GENERATED_DIR}/nodes.py`;
|
|
2690
2720
|
}
|
|
@@ -2835,7 +2865,7 @@ async function runPull(env, keys, rawOptions) {
|
|
|
2835
2865
|
throw new CliUserError14(`${key} export: refusing ${path}, which is outside ${WORKFLOWS_DIR}/ and ${GENERATED_DIR}/.`);
|
|
2836
2866
|
}
|
|
2837
2867
|
}
|
|
2838
|
-
const codeFiles = options.server ? files : files.filter((file) => !isNodesFile(file.path));
|
|
2868
|
+
const codeFiles = (options.server ? files : files.filter((file) => !isNodesFile(file.path))).map((file) => keepUnlessChanged(file, readProjectFile(project.root, file.path)));
|
|
2839
2869
|
if (!options.server && files.some((file) => isNodesFile(file.path)) && format !== "json") {
|
|
2840
2870
|
clientsUsed = format;
|
|
2841
2871
|
}
|
|
@@ -2907,12 +2937,14 @@ async function runPull(env, keys, rawOptions) {
|
|
|
2907
2937
|
}
|
|
2908
2938
|
return result;
|
|
2909
2939
|
}
|
|
2940
|
+
var SNAPSHOT_LINE;
|
|
2910
2941
|
var init_pull = __esm(() => {
|
|
2911
2942
|
init_connections();
|
|
2912
2943
|
init_project();
|
|
2913
2944
|
init_remote();
|
|
2914
2945
|
init_codegen();
|
|
2915
2946
|
init_shared();
|
|
2947
|
+
SNAPSHOT_LINE = /^(\/\/|#) Node registry snapshot sha256:[0-9a-f]{64}\.$/m;
|
|
2916
2948
|
});
|
|
2917
2949
|
|
|
2918
2950
|
// src/code-first/imports.ts
|
|
@@ -3320,7 +3352,7 @@ async function lowerProject(project, options) {
|
|
|
3320
3352
|
result.warnings.push("The source map build did not reproduce the bundle; the push uploads no source map (stack traces show bundle locations).");
|
|
3321
3353
|
}
|
|
3322
3354
|
}
|
|
3323
|
-
result.sourceFiles =
|
|
3355
|
+
result.sourceFiles = lowered.sourceFiles;
|
|
3324
3356
|
if (deps)
|
|
3325
3357
|
result.vendored = deps;
|
|
3326
3358
|
result.issues.push(...lowered.issues);
|
|
@@ -4881,7 +4913,7 @@ import { existsSync as existsSync9, readFileSync as readFileSync7 } from "fs";
|
|
|
4881
4913
|
import { basename as basename2, dirname as dirname4, extname as extname2, relative, resolve as resolve4, sep } from "path";
|
|
4882
4914
|
import { CliUserError as CliUserError27 } from "@burdenoff/cli-sdk/core";
|
|
4883
4915
|
import { irHash as irHash5, parseWorkflowDocument as parseWorkflowDocument2 } from "@fluidgrids/workflows/ir";
|
|
4884
|
-
import { lower as lower2 } from "@fluidgrids/workflows/roundtrip";
|
|
4916
|
+
import { bundledProjectFiles, lower as lower2 } from "@fluidgrids/workflows/roundtrip";
|
|
4885
4917
|
import { UnresolvedConnectionsError as UnresolvedConnectionsError2 } from "@fluidgrids/workflows";
|
|
4886
4918
|
function nameOf(definition, fallback) {
|
|
4887
4919
|
const name = definition["name"];
|
|
@@ -4954,7 +4986,10 @@ async function prepareTypeScript(env, project, path, options) {
|
|
|
4954
4986
|
const workflow = chooseWorkflow(lowered.workflows, path, options.key);
|
|
4955
4987
|
const written = inputs.filter((file) => file.path === path || file.path.startsWith(`${ACTIVITIES_DIR}/`) || file.path === `${WORKFLOWS_DIR}/${workflow.key}.layout.json` || file.path === `${WORKFLOWS_DIR}/${workflow.key}.pinned.json`);
|
|
4956
4988
|
const reached = importClosure(new Map(inputs.filter((file) => file.path.endsWith(".ts")).map((f) => [f.path, f.content])), written.filter((file) => file.path.endsWith(".ts")).map((file) => file.path));
|
|
4957
|
-
const
|
|
4989
|
+
const selected = inputs.filter((file) => written.includes(file) || file.path.startsWith(`${GENERATED_DIR}/`) && reached.has(file.path));
|
|
4990
|
+
const files = [
|
|
4991
|
+
...bundledProjectFiles(new Map(selected.map((file) => [file.path, file.content])))
|
|
4992
|
+
].map(([path, content]) => ({ path, content }));
|
|
4958
4993
|
const definition = workflow.definition;
|
|
4959
4994
|
const key = options.key ?? workflow.key;
|
|
4960
4995
|
const name = options.name ?? nameOf(definition, key);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidgrids/cli",
|
|
3
|
-
"version": "2026.1115.
|
|
3
|
+
"version": "2026.1115.5",
|
|
4
4
|
"description": "CLI tool for FluidGrids — workflow automation management (thin shell over @burdenoff/cli-sdk)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@burdenoff/cli-sdk": "2026.1109.1",
|
|
58
|
-
"@fluidgrids/workflows": "2026.1115.
|
|
58
|
+
"@fluidgrids/workflows": "2026.1115.3",
|
|
59
59
|
"@napi-rs/keyring": "2.1.1",
|
|
60
60
|
"commander": "^14.0.3",
|
|
61
61
|
"esbuild": "0.28.2",
|