@octonodes/cli 0.1.0 → 0.1.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/README.md +4 -3
- package/dist/auth.js.map +1 -1
- package/dist/connect.d.ts +3 -0
- package/dist/connect.d.ts.map +1 -0
- package/dist/connect.js +84 -0
- package/dist/connect.js.map +1 -0
- package/dist/index.js +15 -4
- package/dist/index.js.map +1 -1
- package/dist/plugins/artifact.d.ts.map +1 -1
- package/dist/plugins/artifact.js +8 -7
- package/dist/plugins/artifact.js.map +1 -1
- package/dist/plugins/build.d.ts.map +1 -1
- package/dist/plugins/build.js +110 -21
- package/dist/plugins/build.js.map +1 -1
- package/dist/plugins/constants.d.ts +0 -1
- package/dist/plugins/constants.d.ts.map +1 -1
- package/dist/plugins/constants.js +7 -20
- package/dist/plugins/constants.js.map +1 -1
- package/dist/plugins/create.d.ts.map +1 -1
- package/dist/plugins/create.js +10 -14
- package/dist/plugins/create.js.map +1 -1
- package/dist/plugins/help.constants.d.ts +2 -0
- package/dist/plugins/help.constants.d.ts.map +1 -0
- package/dist/plugins/help.constants.js +25 -0
- package/dist/plugins/help.constants.js.map +1 -0
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +25 -3
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/library.d.ts +3 -0
- package/dist/plugins/library.d.ts.map +1 -0
- package/dist/plugins/library.js +136 -0
- package/dist/plugins/library.js.map +1 -0
- package/dist/plugins/publish.js.map +1 -1
- package/dist/plugins/types.d.ts.map +1 -1
- package/package.json +5 -3
- package/runtime/plugin-lifecycle.cjs +13923 -0
- package/runtime/plugin-lifecycle.d.cts +2 -0
|
@@ -2,5 +2,4 @@ export declare const BUILD_RECORD = "octonode-build.json";
|
|
|
2
2
|
export declare const DEFINITION_FILES: string[];
|
|
3
3
|
export declare const FORBIDDEN_PART: RegExp;
|
|
4
4
|
export declare const RESERVED_ASSETS: Set<string>;
|
|
5
|
-
export declare const PLUGIN_HELP = "Usage:\n octonodes plugin create <name>\n octonodes plugin build [plugins/example.plugin.ts]\n octonodes plugin validate <built-directory>\n octonodes plugin test <built-directory> [node-id] --input <json>\n octonodes plugin publish <built-directory> --registry <url> [--org <id>] [--team <id>]\n\nBuild discovers plugins/**/*.plugin.ts and writes dist/plugins/<id>.\nDefinitions execute locally during build. Only build trusted source.\nPublishing uses OCTONODE_MARKETPLACE_URL and OCTONODE_MARKETPLACE_TOKEN when set,\nor the saved octonodes login / OCTONODE_TOKEN. It never publishes to npm.\n";
|
|
6
5
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/plugins/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/plugins/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY,wBAAwB,CAAC;AAClD,eAAO,MAAM,gBAAgB,UAA6E,CAAC;AAC3G,eAAO,MAAM,cAAc,QAC+E,CAAC;AAC3G,eAAO,MAAM,eAAe,aAS1B,CAAC"}
|
|
@@ -1,31 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RESERVED_ASSETS = exports.FORBIDDEN_PART = exports.DEFINITION_FILES = exports.BUILD_RECORD = void 0;
|
|
4
|
+
// Generated from engine plugin authoring. Do not edit.
|
|
4
5
|
exports.BUILD_RECORD = "octonode-build.json";
|
|
5
|
-
exports.DEFINITION_FILES = [
|
|
6
|
-
|
|
7
|
-
"octonode.yaml",
|
|
8
|
-
"octonode.json",
|
|
9
|
-
"octonode.plugin.json",
|
|
10
|
-
];
|
|
11
|
-
exports.FORBIDDEN_PART = /^(?:\.env(?:\..*)?|\.git|node_modules)$|\.(?:pem|key)$/i;
|
|
6
|
+
exports.DEFINITION_FILES = ["octonode.yml", "octonode.yaml", "octonode.json", "octonode.plugin.json"];
|
|
7
|
+
exports.FORBIDDEN_PART = /^(?:\.env(?:\..*)?|\.git|\.npmrc|\.pypirc|\.netrc|\.git-credentials|node_modules)$|\.(?:pem|key|p12)$/i;
|
|
12
8
|
exports.RESERVED_ASSETS = new Set([
|
|
13
9
|
...exports.DEFINITION_FILES,
|
|
14
10
|
exports.BUILD_RECORD,
|
|
15
11
|
"package.json",
|
|
16
12
|
"dist",
|
|
17
13
|
"README.md",
|
|
14
|
+
"nodes",
|
|
15
|
+
"workflow-runtime",
|
|
16
|
+
"library",
|
|
18
17
|
]);
|
|
19
|
-
exports.PLUGIN_HELP = `Usage:
|
|
20
|
-
octonodes plugin create <name>
|
|
21
|
-
octonodes plugin build [plugins/example.plugin.ts]
|
|
22
|
-
octonodes plugin validate <built-directory>
|
|
23
|
-
octonodes plugin test <built-directory> [node-id] --input <json>
|
|
24
|
-
octonodes plugin publish <built-directory> --registry <url> [--org <id>] [--team <id>]
|
|
25
|
-
|
|
26
|
-
Build discovers plugins/**/*.plugin.ts and writes dist/plugins/<id>.
|
|
27
|
-
Definitions execute locally during build. Only build trusted source.
|
|
28
|
-
Publishing uses OCTONODE_MARKETPLACE_URL and OCTONODE_MARKETPLACE_TOKEN when set,
|
|
29
|
-
or the saved octonodes login / OCTONODE_TOKEN. It never publishes to npm.
|
|
30
|
-
`;
|
|
31
18
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/plugins/constants.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/plugins/constants.ts"],"names":[],"mappings":";;;AAAA,uDAAuD;AAC1C,QAAA,YAAY,GAAG,qBAAqB,CAAC;AACrC,QAAA,gBAAgB,GAAG,CAAC,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,sBAAsB,CAAC,CAAC;AAC9F,QAAA,cAAc,GACzB,wGAAwG,CAAC;AAC9F,QAAA,eAAe,GAAG,IAAI,GAAG,CAAC;IACrC,GAAG,QAAA,gBAAgB;IACnB,QAAA,YAAY;IACZ,cAAc;IACd,MAAM;IACN,WAAW;IACX,OAAO;IACP,kBAAkB;IAClB,SAAS;CACV,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/plugins/create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/plugins/create.ts"],"names":[],"mappings":"AAIA,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAiFlE"}
|
package/dist/plugins/create.js
CHANGED
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createPlugin = createPlugin;
|
|
4
4
|
const node_fs_1 = require("node:fs");
|
|
5
|
+
const compiler_1 = require("@octonodes/sdk/definitions/compiler");
|
|
5
6
|
const node_path_1 = require("node:path");
|
|
6
7
|
function createPlugin(name, version) {
|
|
7
8
|
if (!/^[a-z0-9][a-z0-9-]*$/.test(name))
|
|
8
9
|
throw new Error("Plugin name must be lowercase alphanumeric/dash");
|
|
9
10
|
const root = (0, node_path_1.resolve)(name);
|
|
10
11
|
(0, node_fs_1.mkdirSync)(root); // Never overwrite an existing project.
|
|
11
|
-
(0, node_fs_1.mkdirSync)((0, node_path_1.join)(root, "
|
|
12
|
+
(0, node_fs_1.mkdirSync)((0, node_path_1.join)(root, "src"));
|
|
12
13
|
(0, node_fs_1.mkdirSync)((0, node_path_1.join)(root, "tests"));
|
|
13
14
|
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, "package.json"), JSON.stringify({
|
|
14
15
|
name,
|
|
15
16
|
private: true,
|
|
16
17
|
engines: { node: ">=24" },
|
|
17
18
|
scripts: {
|
|
18
|
-
build: "
|
|
19
|
+
build: "octonodes plugin build",
|
|
19
20
|
test: "npm run build && node --test tests/*.test.cjs",
|
|
20
21
|
},
|
|
21
22
|
dependencies: { "@octonodes/sdk": version },
|
|
@@ -33,21 +34,15 @@ function createPlugin(name, version) {
|
|
|
33
34
|
skipLibCheck: true,
|
|
34
35
|
noEmit: true,
|
|
35
36
|
},
|
|
36
|
-
include: ["
|
|
37
|
+
include: ["octonode.plugin.ts", "octonode.nodes.ts", "src/**/*.ts"],
|
|
37
38
|
}, null, 2) + "\n");
|
|
38
39
|
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, ".gitignore"), "node_modules/\ndist/\n.env\n.env.*\n");
|
|
39
|
-
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, "
|
|
40
|
-
|
|
40
|
+
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, "src/echo.ts"), "export function echo(text: string): { text: string } { return { text }; }\n");
|
|
41
|
+
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, "octonode.plugin.ts"), `import { definePlugin, defineNode } from "@octonodes/sdk/plugin";
|
|
42
|
+
import { nodes } from "./octonode.nodes.js";
|
|
41
43
|
export default definePlugin({
|
|
42
44
|
id: ${JSON.stringify(name)}, name: ${JSON.stringify(name)}, version: "0.1.0", license: "MIT",
|
|
43
|
-
|
|
44
|
-
nodes: [defineNode({
|
|
45
|
-
id: "echo", label: "Echo text",
|
|
46
|
-
inputs: { type: "object", properties: { text: { type: "string" } }, required: ["text"] },
|
|
47
|
-
outputs: { type: "object", properties: { text: { type: "string" } }, required: ["text"] },
|
|
48
|
-
defaults: { text: "hello" },
|
|
49
|
-
run: ({ text }) => ({ text }),
|
|
50
|
-
})],
|
|
45
|
+
nodes: [defineNode(nodes.echo, { label: "Echo text", defaults: { text: "hello" } })],
|
|
51
46
|
});
|
|
52
47
|
`);
|
|
53
48
|
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, "tests/plugin.test.cjs"), `const { test } = require("node:test");
|
|
@@ -62,7 +57,8 @@ test("echo runs through the packaged plugin", () => {
|
|
|
62
57
|
assert.deepEqual(result.outputs, {text:"hello"});
|
|
63
58
|
});
|
|
64
59
|
`);
|
|
65
|
-
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, "README.md"), `# ${name}\n\nRun \`npm install\`, then \`npm test\`.
|
|
60
|
+
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, "README.md"), `# ${name}\n\nRun \`npm install\`, then \`npm test\`. Keep all definitions in \`octonode.plugin.ts\`; import handles from \`octonode.nodes.ts\` and implement functions in \`src/\`.\n\nAll metadata belongs in code; \`dist/plugins/<id>/octonode.yml\` is generated.\nSet \`scope: ["public"]\` to share publicly. Configure \`OCTONODE_MARKETPLACE_URL\`, run \`octonodes login\`, then \`octonodes plugin publish dist/plugins/${name}\`.\nConfig compilation reads definitions without executing application code. Keep secrets out of definitions and assets.\n`);
|
|
61
|
+
(0, compiler_1.generateNodeCatalog)(root);
|
|
66
62
|
return root;
|
|
67
63
|
}
|
|
68
64
|
//# sourceMappingURL=create.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/plugins/create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/plugins/create.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,kEAA0E;AAC1E,yCAA0C;AAE1C,sBAA6B,IAAY,EAAE,OAAe;IACxD,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IAC3G,MAAM,IAAI,GAAG,IAAA,mBAAO,EAAC,IAAI,CAAC,CAAC;IAC3B,IAAA,mBAAS,EAAC,IAAI,CAAC,CAAC,CAAC,uCAAuC;IACxD,IAAA,mBAAS,EAAC,IAAA,gBAAI,EAAC,IAA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,IAAI,CAAC,WAAW,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;;;CAG1D,CACE,CAAC;IACF,IAAA,uBAAa,EACX,IAAA,gBAAI,EAAC,IAAI,EAAE,uBAAuB,CAAC,EACnC;;;;;WAKO,IAAI,CAAC,SAAS,CAAC,gBAAgB,IAAI,EAAE,CAAC;;;;;;CAMhD,CACE,CAAC;IACF,IAAA,uBAAa,EACX,IAAA,gBAAI,EAAC,IAAI,EAAE,WAAW,CAAC,EACvB,KAAK,IAAI,4ZAA4Z,IAAI,6HAA6H,CACviB,CAAC;IACF,IAAA,8BAAmB,EAAC,IAAI,CAAC,CAAC;IAC1B,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const PLUGIN_HELP = "Usage:\n octonodes plugin create <name>\n octonodes plugin nodes [--check]\n octonodes plugin build [octonode.plugin.ts]\n octonodes plugin validate <built-directory>\n octonodes plugin test <built-directory> [node-id] --input <json>\n octonodes plugin publish <built-directory> --registry <url> [--org <id>] [--team <id>]\n octonodes plugin install <id|built-directory> [--version <version>] [--alias <alias>] [--migrate]\n octonodes plugin update <alias> [--version <version>] [--dry-run]\n octonodes plugin remove <alias>\n octonodes plugin list\n octonodes install --frozen --artifacts-only [--offline]\n octonodes plugin recover\n\nBuild reads octonode.plugin.ts and writes dist/plugins/<id>.\nNode inventories are generated in octonode.nodes.ts. Metadata is inspected without execution.\nPublishing uses OCTONODE_MARKETPLACE_URL and OCTONODE_MARKETPLACE_TOKEN when set,\nor the saved octonodes login / OCTONODE_TOKEN. It never publishes to npm.\nConsumer commands accept --cwd <project>. Restore artifacts before npm ci (or your native frozen install).\nCustom imports live in a private generated @octonodes/plugin package; upstream npm imports stay unchanged.\n";
|
|
2
|
+
//# sourceMappingURL=help.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.constants.d.ts","sourceRoot":"","sources":["../../src/plugins/help.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,iqCAoBvB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PLUGIN_HELP = void 0;
|
|
4
|
+
exports.PLUGIN_HELP = `Usage:
|
|
5
|
+
octonodes plugin create <name>
|
|
6
|
+
octonodes plugin nodes [--check]
|
|
7
|
+
octonodes plugin build [octonode.plugin.ts]
|
|
8
|
+
octonodes plugin validate <built-directory>
|
|
9
|
+
octonodes plugin test <built-directory> [node-id] --input <json>
|
|
10
|
+
octonodes plugin publish <built-directory> --registry <url> [--org <id>] [--team <id>]
|
|
11
|
+
octonodes plugin install <id|built-directory> [--version <version>] [--alias <alias>] [--migrate]
|
|
12
|
+
octonodes plugin update <alias> [--version <version>] [--dry-run]
|
|
13
|
+
octonodes plugin remove <alias>
|
|
14
|
+
octonodes plugin list
|
|
15
|
+
octonodes install --frozen --artifacts-only [--offline]
|
|
16
|
+
octonodes plugin recover
|
|
17
|
+
|
|
18
|
+
Build reads octonode.plugin.ts and writes dist/plugins/<id>.
|
|
19
|
+
Node inventories are generated in octonode.nodes.ts. Metadata is inspected without execution.
|
|
20
|
+
Publishing uses OCTONODE_MARKETPLACE_URL and OCTONODE_MARKETPLACE_TOKEN when set,
|
|
21
|
+
or the saved octonodes login / OCTONODE_TOKEN. It never publishes to npm.
|
|
22
|
+
Consumer commands accept --cwd <project>. Restore artifacts before npm ci (or your native frozen install).
|
|
23
|
+
Custom imports live in a private generated @octonodes/plugin package; upstream npm imports stay unchanged.
|
|
24
|
+
`;
|
|
25
|
+
//# sourceMappingURL=help.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.constants.js","sourceRoot":"","sources":["../../src/plugins/help.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;CAoB1B,CAAC"}
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkFlF"}
|
package/dist/plugins/index.js
CHANGED
|
@@ -10,8 +10,10 @@ const artifact_1 = require("./artifact");
|
|
|
10
10
|
const build_1 = require("./build");
|
|
11
11
|
const create_1 = require("./create");
|
|
12
12
|
const publish_1 = require("./publish");
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const compiler_1 = require("@octonodes/sdk/definitions/compiler");
|
|
14
|
+
const plugin_lifecycle_cjs_1 = require("../../runtime/plugin-lifecycle.cjs");
|
|
15
|
+
var help_constants_1 = require("./help.constants");
|
|
16
|
+
Object.defineProperty(exports, "PLUGIN_HELP", { enumerable: true, get: function () { return help_constants_1.PLUGIN_HELP; } });
|
|
15
17
|
async function pluginCommand(args, version) {
|
|
16
18
|
const command = args[0];
|
|
17
19
|
const { values, positionals } = (0, node_util_1.parseArgs)({
|
|
@@ -22,9 +24,29 @@ async function pluginCommand(args, version) {
|
|
|
22
24
|
registry: { type: "string" },
|
|
23
25
|
org: { type: "string" },
|
|
24
26
|
team: { type: "string" },
|
|
27
|
+
check: { type: "boolean" },
|
|
28
|
+
cwd: { type: "string" },
|
|
29
|
+
alias: { type: "string" },
|
|
30
|
+
scope: { type: "string" },
|
|
31
|
+
version: { type: "string" },
|
|
32
|
+
migrate: { type: "boolean" },
|
|
33
|
+
"dry-run": { type: "boolean" },
|
|
34
|
+
frozen: { type: "boolean" },
|
|
35
|
+
"artifacts-only": { type: "boolean" },
|
|
36
|
+
offline: { type: "boolean" },
|
|
25
37
|
},
|
|
26
38
|
});
|
|
27
39
|
const [target, nodeId] = positionals;
|
|
40
|
+
if (["install", "update", "remove", "restore", "recover", "list"].includes(command)) {
|
|
41
|
+
const token = process.env.OCTONODE_MARKETPLACE_TOKEN ?? (await (0, auth_1.accessToken)());
|
|
42
|
+
process.stdout.write(JSON.stringify(await (0, plugin_lifecycle_cjs_1.runPluginLifecycle)(command, target, { ...values, token }), null, 2) + "\n");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (command === "nodes") {
|
|
46
|
+
(0, compiler_1.generateNodeCatalog)(process.cwd(), undefined, values.check);
|
|
47
|
+
process.stdout.write(values.check ? "Node inventory is current\n" : "Node inventory generated\n");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
28
50
|
if (positionals.length > (command === "test" ? 2 : 1))
|
|
29
51
|
throw new Error("Too many plugin command arguments");
|
|
30
52
|
if (command === "build") {
|
|
@@ -47,7 +69,7 @@ async function pluginCommand(args, version) {
|
|
|
47
69
|
const selected = nodeId ?? (manifest.nodes.length === 1 ? manifest.nodes[0].id : undefined);
|
|
48
70
|
if (!manifest.nodes.some((node) => node.id === selected))
|
|
49
71
|
throw new Error(`Choose a node: ${manifest.nodes.map((node) => node.id).join(", ")}`);
|
|
50
|
-
const output = (0, node_child_process_1.execFileSync)(process.execPath, ["dist/index.js", selected], {
|
|
72
|
+
const output = (0, node_child_process_1.execFileSync)(process.execPath, ["--experimental-import-meta-resolve", "dist/index.js", selected], {
|
|
51
73
|
cwd: directory,
|
|
52
74
|
encoding: "utf8",
|
|
53
75
|
timeout: 30_000,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":";;;;AAAA,2DAAkD;AAClD,yCAAoC;AACpC,yCAAs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ot":"","sources":["../../src/plugins/library.ts"],"names":[],"mappings":"AAQA,2FAA2F;AAC3F,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA6HnG"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.buildPluginLibrary = buildPluginLibrary;
|
|
7
|
+
// Generated from engine plugin authoring. Do not edit.
|
|
8
|
+
const node_fs_1 = require("node:fs");
|
|
9
|
+
const node_path_1 = require("node:path");
|
|
10
|
+
const node_module_1 = require("node:module");
|
|
11
|
+
const esbuild_1 = require("esbuild");
|
|
12
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
13
|
+
const artifact_1 = require("./artifact");
|
|
14
|
+
/** A library is a normal ESM module, separate from the credential-injecting IPC runner. */
|
|
15
|
+
async function buildPluginLibrary(root, entry, output) {
|
|
16
|
+
const configPath = typescript_1.default.findConfigFile(root, typescript_1.default.sys.fileExists);
|
|
17
|
+
const config = configPath ? typescript_1.default.readConfigFile(configPath, typescript_1.default.sys.readFile) : { config: {} };
|
|
18
|
+
if (config.error)
|
|
19
|
+
throw new Error(typescript_1.default.flattenDiagnosticMessageText(config.error.messageText, "\n"));
|
|
20
|
+
const parsed = typescript_1.default.parseJsonConfigFileContent(config.config, typescript_1.default.sys, root);
|
|
21
|
+
const options = {
|
|
22
|
+
...parsed.options,
|
|
23
|
+
rootDir: root,
|
|
24
|
+
outDir: (0, node_path_1.join)(output, "types"),
|
|
25
|
+
declarationDir: (0, node_path_1.join)(output, "types"),
|
|
26
|
+
noEmit: false,
|
|
27
|
+
emitDeclarationOnly: true,
|
|
28
|
+
declaration: true,
|
|
29
|
+
declarationMap: false,
|
|
30
|
+
composite: false,
|
|
31
|
+
incremental: false,
|
|
32
|
+
noEmitOnError: true,
|
|
33
|
+
strict: true,
|
|
34
|
+
};
|
|
35
|
+
delete options.tsBuildInfoFile;
|
|
36
|
+
delete options.outFile;
|
|
37
|
+
const program = typescript_1.default.createProgram([(0, node_path_1.resolve)(root, entry)], options);
|
|
38
|
+
const diagnostics = typescript_1.default.getPreEmitDiagnostics(program);
|
|
39
|
+
if (diagnostics.some((diagnostic) => diagnostic.category === typescript_1.default.DiagnosticCategory.Error))
|
|
40
|
+
throw new Error(typescript_1.default.formatDiagnosticsWithColorAndContext(diagnostics, {
|
|
41
|
+
getCanonicalFileName: (file) => file,
|
|
42
|
+
getCurrentDirectory: () => root,
|
|
43
|
+
getNewLine: () => "\n",
|
|
44
|
+
}));
|
|
45
|
+
const emitted = program.emit(undefined, (path, content) => {
|
|
46
|
+
const local = (0, node_path_1.relative)(output, path).replaceAll("\\", "/");
|
|
47
|
+
(0, artifact_1.safePath)(local);
|
|
48
|
+
(0, node_fs_1.mkdirSync)((0, node_path_1.dirname)(path), { recursive: true });
|
|
49
|
+
(0, node_fs_1.writeFileSync)(path, content);
|
|
50
|
+
});
|
|
51
|
+
if (emitted.emitSkipped)
|
|
52
|
+
throw new Error("Cannot emit plugin library declarations");
|
|
53
|
+
const typeEntry = entry
|
|
54
|
+
.replace(/^\.\//, "")
|
|
55
|
+
.replace(/\.mts$/, ".mjs")
|
|
56
|
+
.replace(/\.cts$/, ".cjs")
|
|
57
|
+
.replace(/\.ts$/, ".js");
|
|
58
|
+
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(output, "index.d.ts"), `export * from ${JSON.stringify(`./types/${typeEntry}`)};\n`);
|
|
59
|
+
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(output, "package.json"), '{"type":"module"}\n');
|
|
60
|
+
const check = typescript_1.default.createProgram([(0, node_path_1.join)(output, "index.d.ts")], {
|
|
61
|
+
strict: true,
|
|
62
|
+
noEmit: true,
|
|
63
|
+
types: [],
|
|
64
|
+
target: typescript_1.default.ScriptTarget.ES2022,
|
|
65
|
+
module: typescript_1.default.ModuleKind.NodeNext,
|
|
66
|
+
moduleResolution: typescript_1.default.ModuleResolutionKind.NodeNext,
|
|
67
|
+
});
|
|
68
|
+
const reachable = new Set(check.getSourceFiles().map((file) => (0, node_path_1.resolve)(file.fileName)));
|
|
69
|
+
if (check
|
|
70
|
+
.getSourceFiles()
|
|
71
|
+
.some((file) => !check.isSourceFileDefaultLibrary(file) && !(0, node_path_1.resolve)(file.fileName).startsWith((0, node_path_1.resolve)(output) + "/")))
|
|
72
|
+
throw new Error("Library declarations reference files outside the packaged library");
|
|
73
|
+
for (const file of (0, artifact_1.pluginFiles)(output).filter((file) => /\.d\.[cm]?ts$/.test(file))) {
|
|
74
|
+
const path = (0, node_path_1.join)(output, file);
|
|
75
|
+
if (!reachable.has((0, node_path_1.resolve)(path))) {
|
|
76
|
+
(0, node_fs_1.rmSync)(path);
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
const info = typescript_1.default.preProcessFile((0, node_fs_1.readFileSync)(path, "utf8"), true, true);
|
|
80
|
+
if (info.typeReferenceDirectives.length || info.importedFiles.some((item) => !item.fileName.startsWith(".")))
|
|
81
|
+
throw new Error(`Library public types must be self-contained: ${file}`);
|
|
82
|
+
}
|
|
83
|
+
if (typescript_1.default.getPreEmitDiagnostics(check).some((diagnostic) => diagnostic.category === typescript_1.default.DiagnosticCategory.Error))
|
|
84
|
+
throw new Error("Library declarations are not self-contained; remove external public type dependencies");
|
|
85
|
+
const result = await (0, esbuild_1.build)({
|
|
86
|
+
absWorkingDir: root,
|
|
87
|
+
entryPoints: [entry],
|
|
88
|
+
outfile: (0, node_path_1.join)(output, "index.js"),
|
|
89
|
+
bundle: true,
|
|
90
|
+
platform: "node",
|
|
91
|
+
format: "esm",
|
|
92
|
+
target: "node24",
|
|
93
|
+
metafile: true,
|
|
94
|
+
logLevel: "silent",
|
|
95
|
+
legalComments: "eof",
|
|
96
|
+
banner: {
|
|
97
|
+
js: 'import { createRequire as __octonodeCreateRequire } from "node:module"; const require = __octonodeCreateRequire(import.meta.url);',
|
|
98
|
+
},
|
|
99
|
+
logOverride: { "unsupported-require-call": "warning", "unsupported-dynamic-import": "warning" },
|
|
100
|
+
});
|
|
101
|
+
if (result.warnings.length)
|
|
102
|
+
throw new Error(result.warnings.map((warning) => warning.text).join("\n"));
|
|
103
|
+
for (const input of Object.keys(result.metafile.inputs)) {
|
|
104
|
+
const local = (0, node_path_1.relative)(root, (0, node_path_1.resolve)(root, input)).replaceAll("\\", "/");
|
|
105
|
+
if (local.startsWith("../") && !local.includes("/node_modules/"))
|
|
106
|
+
throw new Error("Library import escapes the plugin package");
|
|
107
|
+
}
|
|
108
|
+
for (const output of Object.values(result.metafile.outputs)) {
|
|
109
|
+
if (output.imports.some((item) => item.external && !(0, node_module_1.isBuiltin)(item.path)))
|
|
110
|
+
throw new Error("Library has an unbundled dependency; native addons and computed imports are unsupported");
|
|
111
|
+
}
|
|
112
|
+
const packages = new Set([root]);
|
|
113
|
+
for (const input of Object.keys(result.metafile.inputs)) {
|
|
114
|
+
let directory = (0, node_path_1.dirname)((0, node_path_1.resolve)(root, input));
|
|
115
|
+
if (!directory.includes("node_modules"))
|
|
116
|
+
continue;
|
|
117
|
+
while (!(0, node_fs_1.existsSync)((0, node_path_1.join)(directory, "package.json")) && (0, node_path_1.dirname)(directory) !== directory)
|
|
118
|
+
directory = (0, node_path_1.dirname)(directory);
|
|
119
|
+
if ((0, node_fs_1.existsSync)((0, node_path_1.join)(directory, "package.json")))
|
|
120
|
+
packages.add(directory);
|
|
121
|
+
}
|
|
122
|
+
for (const directory of packages) {
|
|
123
|
+
const metadata = JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(directory, "package.json"), "utf8"));
|
|
124
|
+
const name = String(metadata.name ?? "plugin").replaceAll("/", "__");
|
|
125
|
+
(0, artifact_1.safePath)(name);
|
|
126
|
+
const destination = (0, node_path_1.join)(output, "licenses", name);
|
|
127
|
+
(0, node_fs_1.mkdirSync)(destination, { recursive: true });
|
|
128
|
+
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(destination, "package.json"), JSON.stringify({ name: metadata.name, version: metadata.version, license: metadata.license }, null, 2) + "\n");
|
|
129
|
+
for (const file of (0, node_fs_1.readdirSync)(directory).filter((file) => /^(?:licen[sc]e|notice|copying)(?:\..*)?$/i.test(file))) {
|
|
130
|
+
const path = (0, node_path_1.join)(directory, file);
|
|
131
|
+
if ((0, node_fs_1.lstatSync)(path).isFile())
|
|
132
|
+
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(destination, file), (0, node_fs_1.readFileSync)(path));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=library.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/plugins/library.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAuD;AACvD,qCAA6G;AAC7G,yCAA6D;AAC7D,6CAAwC;AACxC,qCAAgC;AAChC,4DAA4B;AAC5B,yCAAmD;AAEnD,2FAA2F;AACpF,KAAK,6BAA6B,IAAY,EAAE,KAAa,EAAE,MAAc;IAClF,MAAM,UAAU,GAAG,oBAAE,CAAC,cAAc,CAAC,IAAI,EAAE,oBAAE,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC9D,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,oBAAE,CAAC,cAAc,CAAC,UAAU,EAAE,oBAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAC5F,IAAI,MAAM,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,oBAAE,CAAC,4BAA4B,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,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file":"publish.js","sourceRoot":"","sources":["../../src/plugins/publish.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../src/plugins/publish.ts"],"names":[],"mappings":";;;AAAA,2DAAkD;AAClD,qCAA+E;AAC/E,qCAAiC;AACjC,yCAA0C;AAC1C,yCAAyC;AAElC,KAAK,wBACV,SAAiB,EACjB,QAAgB,EAChB,KAAa,EACb,KAAc,EACd,MAAe;IAEf,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC9B,IACE,GAAG,CAAC,QAAQ;QACZ,GAAG,CAAC,QAAQ;QACZ,GAAG,CAAC,MAAM;QACV,GAAG,CAAC,IAAI;QACR,CAAC,GAAG,CAAC,QAAQ,KAAK,QAAQ;YACxB,CAAC,CAAC,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAC5F,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAChF,CAAC;IACD,MAAM,IAAI,GAAG,IAAA,qBAAW,EAAC,IAAA,gBAAI,EAAC,IAAA,gBAAM,GAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAC/D,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,IAAA,sBAAW,EAAC,SAAS,CAAC,CAAC;QACxC,MAAM,QAAQ,GAAG,IAAA,gBAAI,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACtC,IAAA,mBAAS,EAAC,QAAQ,CAAC,CAAC;QACpB,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC;YAClC,IAAA,mBAAS,EAAC,IAAA,mBAAO,EAAC,IAAA,gBAAI,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC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W,CAAC,OAAO,CAAC,OAAO,CAAC;SACrC,CACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,EAAE;YACd,MAAM,IAAI,KAAK,CACb,+BAA+B,QAAQ,CAAC,MAAM,MAAM,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAC7F,CAAC;QACJ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC;YAAS,CAAC;QACT,IAAA,gBAAM,EAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACjD,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,cAAc,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,CAAC,CAAC;IACV,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,EAAE,CAAC,EAAE,KAAK,CAAC;QACT,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,GAAG,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,uBAAuB,CAAC;QAChC,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octonodes/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Octonode API and plugin development CLI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"octonodes": "dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
|
-
"dist"
|
|
15
|
+
"dist",
|
|
16
|
+
"runtime"
|
|
16
17
|
],
|
|
17
18
|
"main": "dist/index.js",
|
|
18
19
|
"types": "dist/index.d.ts",
|
|
@@ -20,9 +21,10 @@
|
|
|
20
21
|
"prepack": "tsc -b"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"@octonodes/sdk": "0.1.
|
|
24
|
+
"@octonodes/sdk": "0.1.7",
|
|
24
25
|
"@supabase/supabase-js": "2.107.0",
|
|
25
26
|
"esbuild": "0.28.1",
|
|
27
|
+
"tar": "7.5.22",
|
|
26
28
|
"yaml": "^2.4.5"
|
|
27
29
|
}
|
|
28
30
|
}
|