ingestron 0.16.1 → 0.16.2
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 +6 -0
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/build/cli/cli/index.js +33 -1
- package/package.json +20 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.16.2
|
|
4
|
+
|
|
5
|
+
- Pin core 0.12.6 so mixed local and native-target projects validate correctly.
|
|
6
|
+
- Add a JSON-stdin operation boundary for Studio hosts, with explicit write,
|
|
7
|
+
download and execution permissions and a bounded request size.
|
|
8
|
+
|
|
3
9
|
## 0.16.1
|
|
4
10
|
|
|
5
11
|
- Add `contract scaffold` for a minimal draft from a known field.
|
package/THIRD_PARTY_NOTICES.md
CHANGED
package/build/cli/cli/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import * as prompts from "@clack/prompts";
|
|
|
4
4
|
import { resolve, basename, dirname } from "node:path";
|
|
5
5
|
import { readFileSync, writeFileSync, mkdirSync, existsSync } from "node:fs";
|
|
6
6
|
import { parseDocument } from "yaml";
|
|
7
|
-
import { execute, executeAsync, } from "@ingestron/core";
|
|
7
|
+
import { execute, executeAsync, operationSchemas, } from "@ingestron/core";
|
|
8
8
|
import { fence } from "@ingestron/core/adapter";
|
|
9
9
|
import { Configuration } from "@ingestron/core/adapter";
|
|
10
10
|
import { check, Problem } from "@ingestron/core/adapter";
|
|
@@ -79,6 +79,38 @@ const run = async (name, args = {}, ctx = context()) => {
|
|
|
79
79
|
: await executeAsync(ctx, name, args);
|
|
80
80
|
print(result, args);
|
|
81
81
|
};
|
|
82
|
+
// Structured host boundary: request bytes are data, never shell arguments.
|
|
83
|
+
app
|
|
84
|
+
.command("operation <name>")
|
|
85
|
+
.description("Invoke a versioned core operation with a JSON request on stdin")
|
|
86
|
+
.option("--allow-write", "Permit this operation to write project files")
|
|
87
|
+
.option("--allow-network", "Permit this operation to download packages")
|
|
88
|
+
.option("--allow-execute", "Permit this operation to execute a local runtime")
|
|
89
|
+
.action(async (name, flags) => {
|
|
90
|
+
check(Object.hasOwn(operationSchemas, name), "OPERATION", "Unknown operation");
|
|
91
|
+
let bytes = 0;
|
|
92
|
+
const chunks = [];
|
|
93
|
+
for await (const chunk of process.stdin) {
|
|
94
|
+
const value = Buffer.from(chunk);
|
|
95
|
+
bytes += value.length;
|
|
96
|
+
check(bytes <= 1024 * 1024, "LIMIT", "Operation request exceeds 1 MiB");
|
|
97
|
+
chunks.push(value);
|
|
98
|
+
}
|
|
99
|
+
let request;
|
|
100
|
+
try {
|
|
101
|
+
request = JSON.parse(Buffer.concat(chunks).toString("utf8") || "{}");
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
throw new Problem("INPUT", "Expected a JSON operation request on stdin");
|
|
105
|
+
}
|
|
106
|
+
const result = await executeAsync({
|
|
107
|
+
...context(),
|
|
108
|
+
allowWrite: !!flags.allowWrite && !opts().dryRun,
|
|
109
|
+
allowNetwork: !!flags.allowNetwork && !opts().dryRun,
|
|
110
|
+
allowExecute: !!flags.allowExecute && !opts().dryRun,
|
|
111
|
+
}, name, request);
|
|
112
|
+
print(result, request);
|
|
113
|
+
});
|
|
82
114
|
function author(name, args, ctx = context()) {
|
|
83
115
|
const result = execute(ctx, name, args);
|
|
84
116
|
return print(!result.ok || opts().dryRun
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ingestron",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Build repeatable data pipelines from reviewed contracts and versioned standards.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,9 +22,25 @@
|
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=22.12.0"
|
|
24
24
|
},
|
|
25
|
+
"packageManager": "pnpm@10.15.0",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "node scripts/clean-build.mjs && tsc",
|
|
28
|
+
"test": "tsx --test --test-concurrency=1 test/unit/*.test.ts test/providers/*.test.ts test/integration/*.test.ts",
|
|
29
|
+
"format": "prettier --write .",
|
|
30
|
+
"format:check": "prettier --check .",
|
|
31
|
+
"secrets:check": "node scripts/secrets.mjs",
|
|
32
|
+
"validate": "pnpm format:check && pnpm build && pnpm test && pnpm examples:check && pnpm secrets:check && pnpm docs:check && pnpm release:check && pnpm package:check",
|
|
33
|
+
"prepack": "pnpm build",
|
|
34
|
+
"package:check": "tsx scripts/package-check.ts",
|
|
35
|
+
"release:check": "node scripts/release-check.mjs",
|
|
36
|
+
"prepublishOnly": "node scripts/release-check.mjs --publish",
|
|
37
|
+
"docs:check": "node scripts/docs-check.mjs",
|
|
38
|
+
"examples:check": "node examples/quickstart.mjs",
|
|
39
|
+
"licences:inventory": "node scripts/licence-inventory.mjs"
|
|
40
|
+
},
|
|
25
41
|
"dependencies": {
|
|
26
42
|
"@clack/prompts": "1.7.0",
|
|
27
|
-
"@ingestron/core": "0.12.
|
|
43
|
+
"@ingestron/core": "0.12.6",
|
|
28
44
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
29
45
|
"commander": "15.0.0",
|
|
30
46
|
"yaml": "2.9.0"
|
|
@@ -56,18 +72,5 @@
|
|
|
56
72
|
"cli",
|
|
57
73
|
"mcp",
|
|
58
74
|
"code-generation"
|
|
59
|
-
]
|
|
60
|
-
|
|
61
|
-
"build": "node scripts/clean-build.mjs && tsc",
|
|
62
|
-
"test": "tsx --test --test-concurrency=1 test/unit/*.test.ts test/providers/*.test.ts test/integration/*.test.ts",
|
|
63
|
-
"format": "prettier --write .",
|
|
64
|
-
"format:check": "prettier --check .",
|
|
65
|
-
"secrets:check": "node scripts/secrets.mjs",
|
|
66
|
-
"validate": "pnpm format:check && pnpm build && pnpm test && pnpm examples:check && pnpm secrets:check && pnpm docs:check && pnpm release:check && pnpm package:check",
|
|
67
|
-
"package:check": "tsx scripts/package-check.ts",
|
|
68
|
-
"release:check": "node scripts/release-check.mjs",
|
|
69
|
-
"docs:check": "node scripts/docs-check.mjs",
|
|
70
|
-
"examples:check": "node examples/quickstart.mjs",
|
|
71
|
-
"licences:inventory": "node scripts/licence-inventory.mjs"
|
|
72
|
-
}
|
|
73
|
-
}
|
|
75
|
+
]
|
|
76
|
+
}
|