automategraph 1.5.0 → 1.5.3
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/CHANGELOG.md +20 -0
- package/UPGRADE-PROPOSAL.md +141 -0
- package/docs/diagrams/c19-resilience-scenario.md +61 -0
- package/docs/diagrams/c19-resilience-scenario.mmd +28 -0
- package/docs/diagrams/c19-resilience-scenario.svg +181 -0
- package/examples/README.md +206 -0
- package/examples/branching-edges.ts +192 -0
- package/examples/branching-graph.ts +333 -0
- package/examples/branching-router.ts +475 -0
- package/examples/json-graph.ts +231 -0
- package/examples/json-scripts.ts +152 -0
- package/examples/order-flow.functions.cjs +32 -0
- package/examples/order-flow.graph.json +27 -0
- package/examples/order-flow.scripted.graph.json +68 -0
- package/js/examples/branching-edges.js +133 -0
- package/js/examples/branching-edges.js.map +1 -0
- package/js/examples/branching-graph.js +232 -0
- package/js/examples/branching-graph.js.map +1 -0
- package/js/examples/branching-router.js +305 -0
- package/js/examples/branching-router.js.map +1 -0
- package/js/examples/json-graph.js +197 -0
- package/js/examples/json-graph.js.map +1 -0
- package/js/examples/json-scripts.js +131 -0
- package/js/examples/json-scripts.js.map +1 -0
- package/js/tests/async.test.js +592 -0
- package/js/tests/async.test.js.map +1 -0
- package/js/tests/complex.test.js +972 -0
- package/js/tests/complex.test.js.map +1 -0
- package/js/tests/conformance.test.js +365 -0
- package/js/tests/conformance.test.js.map +1 -0
- package/js/tests/edges.test.js +702 -0
- package/js/tests/edges.test.js.map +1 -0
- package/js/tests/graphjson.test.js +504 -0
- package/js/tests/graphjson.test.js.map +1 -0
- package/js/tests/harness.js +192 -0
- package/js/tests/harness.js.map +1 -0
- package/js/tests/helpers.js +136 -0
- package/js/tests/helpers.js.map +1 -0
- package/js/tests/lint.test.js +317 -0
- package/js/tests/lint.test.js.map +1 -0
- package/js/tests/registry.test.js +705 -0
- package/js/tests/registry.test.js.map +1 -0
- package/js/tests/report.js +422 -0
- package/js/tests/report.js.map +1 -0
- package/js/tests/runner.js +67 -0
- package/js/tests/runner.js.map +1 -0
- package/js/tests/scripts.test.js +552 -0
- package/js/tests/scripts.test.js.map +1 -0
- package/js/tests/unit.test.js +1239 -0
- package/js/tests/unit.test.js.map +1 -0
- package/js/tests/upgrade.test.js +618 -0
- package/js/tests/upgrade.test.js.map +1 -0
- package/package.json +2 -9
- package/report/index.html +3727 -0
- package/report/report.json +3053 -0
- package/tests/async.test.ts +668 -0
- package/tests/complex.test.ts +1123 -0
- package/tests/conformance.test.ts +442 -0
- package/tests/edges.test.ts +848 -0
- package/tests/fixtures/scripts/bad-registration.cjs +4 -0
- package/tests/fixtures/scripts/broken.cjs +2 -0
- package/tests/fixtures/scripts/cjs-default.js +4 -0
- package/tests/fixtures/scripts/collide-a.cjs +4 -0
- package/tests/fixtures/scripts/collide-b.cjs +4 -0
- package/tests/fixtures/scripts/empty.cjs +2 -0
- package/tests/fixtures/scripts/esm-functions.mjs +10 -0
- package/tests/fixtures/scripts/esm-syntax.js +3 -0
- package/tests/fixtures/scripts/global-channel.cjs +6 -0
- package/tests/fixtures/scripts/global-channel.mjs +7 -0
- package/tests/fixtures/scripts/mismatch.cjs +4 -0
- package/tests/fixtures/scripts/needs-sibling.cjs +7 -0
- package/tests/fixtures/scripts/order.cjs +14 -0
- package/tests/fixtures/scripts/sibling-helper.cjs +3 -0
- package/tests/fixtures/scripts/throwing-global.mjs +6 -0
- package/tests/graphjson.test.ts +737 -0
- package/tests/harness.ts +291 -0
- package/tests/helpers.ts +216 -0
- package/tests/lint.test.ts +381 -0
- package/tests/registry.test.ts +1134 -0
- package/tests/report.ts +452 -0
- package/tests/runner.ts +58 -0
- package/tests/scripts.test.ts +970 -0
- package/tests/unit.test.ts +1192 -0
- package/tests/upgrade.test.ts +725 -0
- package/tools/server.mjs +152 -0
- package/tsconfig.browser.json +19 -0
- package/tsconfig.json +18 -0
- package/tsconfig.publish.json +13 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* ESM fixture — named exports only. */
|
|
2
|
+
export const classifyOrder = () => "standard";
|
|
3
|
+
export const isPriority = value => value === "priority";
|
|
4
|
+
export const chargeCard = () => "charged";
|
|
5
|
+
export const shipOrder = () => "shipped";
|
|
6
|
+
export const manualReview = () => "queued";
|
|
7
|
+
export const rejectOrder = () => "rejected";
|
|
8
|
+
|
|
9
|
+
/* non-function export: ignored + reported */
|
|
10
|
+
export const version = "fixture-esm";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/* Strategy A, self-registration: the script calls the engine global
|
|
2
|
+
* that the loader installs for the duration of the load. */
|
|
3
|
+
globalThis.GraphEngine.registerEngineNamespace("billing", {
|
|
4
|
+
invoiceOrder: () => "invoiced",
|
|
5
|
+
isBillable: value => value === "priority"
|
|
6
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/* ESM + global registration in one script: the registered table and the
|
|
2
|
+
* exported functions both land in the namespace. */
|
|
3
|
+
globalThis.GraphEngine.registerEngineNamespace("telemetry", {
|
|
4
|
+
recordRun: () => "recorded"
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
export const traceId = () => "trace-1";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* CJS fixture — a plain { name: function } export table.
|
|
2
|
+
* `STATUS` is deliberately a non-function export: the loader ignores it
|
|
3
|
+
* and reports it under `ignoredExports`. */
|
|
4
|
+
const STATUS = "fixture-order";
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
classifyOrder: () => "priority",
|
|
8
|
+
isPriority: value => value === "priority",
|
|
9
|
+
chargeCard: context => `charged@${context.attempt}`,
|
|
10
|
+
shipOrder: () => "shipped",
|
|
11
|
+
manualReview: () => "queued for a human",
|
|
12
|
+
rejectOrder: () => "rejected",
|
|
13
|
+
STATUS
|
|
14
|
+
};
|