@octonodes/cli 0.2.2 → 0.2.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/README.md CHANGED
@@ -19,7 +19,7 @@ Define one plugin in `octonode.plugin.ts` using `@octonodes/sdk/plugin`.
19
19
  type-checks definitions, and creates `dist/plugins/<id>`. `octonodes plugin test <directory> <node-id> --input
20
20
  '{...}'` invokes a built node and reports failures with a nonzero exit code.
21
21
 
22
- The scaffold includes `plugin.octonode.json`. Set `scope: "public"` in that release
22
+ The scaffold includes `octonode.plugin.json`. Set `scope: "public"` in that release
23
23
  file for community discovery; use `"user"` for a private plugin, `"team"` with
24
24
  `teamId`, or `"organization"` with `orgId`. The release file overrides version,
25
25
  scope, and optional contributors from `octonode.plugin.ts` during builds.
@@ -36,7 +36,7 @@ function createPlugin(name, version) {
36
36
  },
37
37
  include: ["octonode.plugin.ts", "octonode.nodes.ts", "src/**/*.ts"],
38
38
  }, null, 2) + "\n");
39
- (0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, "plugin.octonode.json"), JSON.stringify({ apiVersion: "octonode.plugin/v1", id: name, version: "0.1.0", scope: "user" }, null, 2) + "\n");
39
+ (0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, "octonode.plugin.json"), JSON.stringify({ apiVersion: "octonode.plugin/v1", id: name, version: "0.1.0", scope: "user" }, null, 2) + "\n");
40
40
  (0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, ".gitignore"), "node_modules/\ndist/\n.env\n.env.*\n");
41
41
  (0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, "src/echo.ts"), "export function echo(text: string): { text: string } { return { text }; }\n");
42
42
  (0, node_fs_1.writeFileSync)((0, node_path_1.join)(root, "octonode.plugin.ts"), `import { definePlugin, defineNode } from "@octonodes/sdk/plugin";
@@ -58,7 +58,7 @@ test("echo runs through the packaged plugin", () => {
58
58
  assert.deepEqual(result.outputs, {text:"hello"});
59
59
  });
60
60
  `);
61
- (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\nVersion and publishing scope belong in \`plugin.octonode.json\`; node definitions stay in code; \`dist/plugins/<id>/octonode.yml\` is generated.\nSet \`"scope": "public"\` in the release file to share publicly. Run \`octonodes login\`, then \`octonodes plugin deploy .\`. For automatic publishing, connect the repository and release file at https://partner.octonodes.com/github-publishing and commit its downloaded workflow. Use \`octonodes plugin version patch\`, then merge the version bump.\nConfig compilation reads definitions without executing application code. Keep secrets out of definitions and assets.\n`);
61
+ (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\nVersion and publishing scope belong in \`octonode.plugin.json\`; node definitions stay in code; \`dist/plugins/<id>/octonode.yml\` is generated.\nSet \`"scope": "public"\` in the release file to share publicly. Run \`octonodes login\`, then \`octonodes plugin deploy .\`. For automatic publishing, select the repository at https://partner.octonodes.com/github-publishing; Octonode adds the workflow. Use \`octonodes plugin version patch\`, then merge the version bump.\nConfig compilation reads definitions without executing application code. Keep secrets out of definitions and assets.\n`);
62
62
  (0, compiler_1.generateNodeCatalog)(root);
63
63
  return root;
64
64
  }
@@ -1 +1 @@
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;QACpC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACrE,MAAM,IAAI,GAAG,IAAA,mBAAO,EAAC,IAAI,CAAC,CAAC;IAC3B,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AC,EAAE,sCAAsC,CAAC,CAAC;IAChF,IAAA,uBAAa,EACX,IAAA,gBAAI,EAAC,IAAI,EAAE,aAAa,CAAC,EACzB,6EAA6E,CAC9E,CAAC;IACF,IAAA,uBAAa,EACX,IAAA,gBAAI,EAAC,IAAI,EAAE,oBAAoB,CAAC,EAChC;;;QAGI,IAAI,CAAC,SAAS,CAAC,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,4vBAA4vB,CACtwB,CAAC;IACF,IAAA,8BAAmB,EAAC,IAAI,CAAC,CAAC;IAC1B,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,2 +1,4 @@
1
+ /** Publish every tracked plugin source, using the repository's already built artifacts for legacy packages. */
2
+ export declare function deployAllPlugins(registry?: string, cwd?: string): Promise<unknown[]>;
1
3
  export declare function deployPlugin(root: string, registry?: string, token?: string, github?: boolean): Promise<unknown>;
2
4
  //# sourceMappingURL=deploy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/plugins/deploy.ts"],"names":[],"mappings":"AAaA,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,QAAQ,SAA0B,EAClC,KAAK,CAAC,EAAE,MAAM,EACd,MAAM,UAAQ,oBA6Ff"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/plugins/deploy.ts"],"names":[],"mappings":"AAiFA,+GAA+G;AAC/G,wBAAsB,gBAAgB,CAAC,QAAQ,SAA0B,EAAE,GAAG,SAAgB,sBAkC7F;AAED,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,QAAQ,SAA0B,EAClC,KAAK,CAAC,EAAE,MAAM,EACd,MAAM,UAAQ,oBAwCf"}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deployAllPlugins = deployAllPlugins;
3
4
  exports.deployPlugin = deployPlugin;
4
5
  const node_fs_1 = require("node:fs");
5
6
  const node_crypto_1 = require("node:crypto");
@@ -9,11 +10,110 @@ const plugins_1 = require("@octonodes/sdk/plugins");
9
10
  const build_1 = require("./build");
10
11
  const release_1 = require("./release");
11
12
  const publish_1 = require("./publish");
13
+ async function githubPublishing(configPath, registry) {
14
+ const url = new URL(registry);
15
+ if (url.protocol !== "https:" || url.username || url.password || url.search || url.hash || url.pathname !== "/")
16
+ throw new Error("Registry must be an HTTPS origin");
17
+ if (process.env.GITHUB_ACTIONS !== "true" ||
18
+ !process.env.ACTIONS_ID_TOKEN_REQUEST_URL ||
19
+ !process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN)
20
+ throw new Error("GitHub deployment requires Actions permissions: id-token: write");
21
+ const endpoint = new URL("/github/plugins/publish", url);
22
+ endpoint.searchParams.set("config", plugins_1.PluginConfigPath.parse(configPath));
23
+ const identity = async () => {
24
+ const oidc = new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);
25
+ oidc.searchParams.set("audience", plugins_1.PLUGIN_PUBLISH_AUDIENCE);
26
+ const result = await fetch(oidc, {
27
+ headers: { authorization: `Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}` },
28
+ redirect: "error",
29
+ signal: AbortSignal.timeout(30_000),
30
+ });
31
+ if (!result.ok)
32
+ throw new Error(`GitHub identity request failed (${result.status})`);
33
+ const body = (await result.json());
34
+ if (!body.value)
35
+ throw new Error("GitHub did not return an identity token");
36
+ return body.value;
37
+ };
38
+ return { endpoint, identity };
39
+ }
40
+ async function githubStatus(endpoint, identity, id, version) {
41
+ const check = await fetch(endpoint, {
42
+ headers: { authorization: `Bearer ${await identity()}` },
43
+ redirect: "error",
44
+ signal: AbortSignal.timeout(30_000),
45
+ });
46
+ if (!check.ok)
47
+ throw new Error(`Plugin connection check failed (${check.status}): ${(await check.text()).slice(0, 1000)}`);
48
+ const result = (await check.json());
49
+ if (result.id !== id || result.version !== version)
50
+ throw new Error("Local plugin version does not match the committed GitHub manifest");
51
+ if (result.status !== "ready" && result.status !== "unchanged")
52
+ throw new Error("Unexpected plugin connection status");
53
+ return result.status;
54
+ }
55
+ async function uploadGithubBuild(directory, endpoint, identity) {
56
+ const { manifest, bundle } = (0, publish_1.packBuiltPlugin)(directory);
57
+ if (bundle.byteLength > plugins_1.PLUGIN_PUBLISH_MAX_BYTES - 1_048_576)
58
+ throw new Error("Plugin bundle exceeds the upload limit");
59
+ const sha256 = (0, node_crypto_1.createHash)("sha256").update(bundle).digest("hex");
60
+ const form = new FormData();
61
+ form.set("manifest", JSON.stringify(manifest));
62
+ form.set("bundle", new Blob([bundle]), "bundle.tar.gz");
63
+ const response = await fetch(endpoint, {
64
+ method: "POST",
65
+ body: form,
66
+ headers: { authorization: `Bearer ${await identity()}`, "x-octonode-sha256": sha256 },
67
+ redirect: "error",
68
+ signal: AbortSignal.timeout(120_000),
69
+ });
70
+ if (!response.ok)
71
+ throw new Error(`Plugin deployment failed (${response.status}): ${(await response.text()).slice(0, 1000)}`);
72
+ const result = (await response.json());
73
+ if (result.sha256 !== sha256)
74
+ throw new Error("Registry archive hash does not match the uploaded bundle");
75
+ return result;
76
+ }
77
+ /** Publish every tracked plugin source, using the repository's already built artifacts for legacy packages. */
78
+ async function deployAllPlugins(registry = plugins_1.PLUGIN_PUBLISH_AUDIENCE, cwd = process.cwd()) {
79
+ const root = (0, node_child_process_1.execFileSync)("git", ["rev-parse", "--show-toplevel"], { cwd, encoding: "utf8" }).trim();
80
+ const files = (0, node_child_process_1.execFileSync)("git", ["ls-files", "-z"], { cwd: root }).toString().split("\0");
81
+ const candidates = files.filter((path) => plugins_1.PluginConfigPath.safeParse(path).success).map((path) => ({
82
+ path,
83
+ release: (0, node_path_1.basename)(path) !== "octonode.plugin.json" ||
84
+ JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(root, path), "utf8")).apiVersion !== undefined,
85
+ }));
86
+ const releaseRoots = candidates
87
+ .filter(({ path, release }) => release && path.includes("/"))
88
+ .map(({ path }) => (0, node_path_1.dirname)(path) + "/");
89
+ const paths = candidates.filter(({ path, release }) => release || !releaseRoots.some((root) => path.startsWith(root)));
90
+ if (!paths.length)
91
+ throw new Error("No tracked Octonode plugin manifests were found");
92
+ const results = [];
93
+ for (const { path, release } of paths) {
94
+ const source = (0, node_path_1.join)(root, path);
95
+ if (release) {
96
+ results.push(await deployPlugin((0, node_path_1.dirname)(source), registry, undefined, true));
97
+ continue;
98
+ }
99
+ const manifest = plugins_1.PluginManifest.parse(JSON.parse((0, node_fs_1.readFileSync)(source, "utf8")));
100
+ const directory = [(0, node_path_1.join)(root, "dist/marketplace", manifest.id), (0, node_path_1.join)((0, node_path_1.dirname)(source), "dist/plugins", manifest.id)]
101
+ .find((candidate) => (0, node_fs_1.existsSync)(candidate));
102
+ if (!directory)
103
+ throw new Error(`Build plugin ${manifest.id} before publishing; no artifact was found`);
104
+ const { endpoint, identity } = await githubPublishing(path, registry);
105
+ const status = await githubStatus(endpoint, identity, manifest.id, manifest.version);
106
+ results.push(status === "unchanged"
107
+ ? { id: manifest.id, version: manifest.version, status }
108
+ : await uploadGithubBuild(directory, endpoint, identity));
109
+ }
110
+ return results;
111
+ }
12
112
  async function deployPlugin(root, registry = plugins_1.PLUGIN_PUBLISH_AUDIENCE, token, github = false) {
13
113
  root = (0, node_fs_1.realpathSync)((0, node_path_1.resolve)(root));
14
114
  const release = (0, release_1.readPluginRelease)(root);
15
115
  if (!release)
16
- throw new Error("Add plugin.octonode.json or plugin.octonode.yml before deploying");
116
+ throw new Error("Add octonode.plugin.json before deploying");
17
117
  const url = new URL(registry);
18
118
  if (url.protocol !== "https:" ||
19
119
  url.username ||
@@ -25,71 +125,21 @@ async function deployPlugin(root, registry = plugins_1.PLUGIN_PUBLISH_AUDIENCE,
25
125
  let identity;
26
126
  let endpoint;
27
127
  if (github) {
28
- if (process.env.GITHUB_ACTIONS !== "true" ||
29
- !process.env.ACTIONS_ID_TOKEN_REQUEST_URL ||
30
- !process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN)
31
- throw new Error("GitHub deployment requires Actions permissions: id-token: write");
32
128
  const repositoryPrefix = (0, node_child_process_1.execFileSync)("git", ["rev-parse", "--show-prefix"], {
33
129
  cwd: root,
34
130
  encoding: "utf8",
35
131
  }).trim();
36
132
  const configPath = plugins_1.PluginConfigPath.parse(repositoryPrefix + (0, node_path_1.basename)(release.path));
37
- endpoint = new URL("/github/plugins/publish", url);
38
- endpoint.searchParams.set("config", configPath);
39
- identity = async () => {
40
- const oidc = new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);
41
- oidc.searchParams.set("audience", plugins_1.PLUGIN_PUBLISH_AUDIENCE);
42
- const result = await fetch(oidc, {
43
- headers: { authorization: `Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}` },
44
- redirect: "error",
45
- signal: AbortSignal.timeout(30_000),
46
- });
47
- if (!result.ok)
48
- throw new Error(`GitHub identity request failed (${result.status})`);
49
- const body = (await result.json());
50
- if (!body.value)
51
- throw new Error("GitHub did not return an identity token");
52
- return body.value;
53
- };
54
- const check = await fetch(endpoint, {
55
- headers: { authorization: `Bearer ${await identity()}` },
56
- redirect: "error",
57
- signal: AbortSignal.timeout(30_000),
58
- });
59
- if (!check.ok)
60
- throw new Error(`Plugin connection check failed (${check.status}): ${(await check.text()).slice(0, 1000)}`);
61
- const result = (await check.json());
62
- if (result.id !== release.config.id || result.version !== release.config.version)
63
- throw new Error("Local release file does not match the committed GitHub release");
64
- if (result.status === "unchanged")
133
+ ({ endpoint, identity } = await githubPublishing(configPath, registry));
134
+ const status = await githubStatus(endpoint, identity, release.config.id, release.config.version);
135
+ if (status === "unchanged")
65
136
  return { id: release.config.id, version: release.config.version, status: "unchanged" };
66
- if (result.status !== "ready")
67
- throw new Error("Unexpected plugin connection status");
68
137
  }
69
138
  else if (!token)
70
139
  throw new Error('Run "octonodes login" before deploying');
71
140
  const [built] = await (0, build_1.buildPlugins)(undefined, root);
72
141
  if (!github)
73
142
  return (0, publish_1.publishPlugin)(built.directory, registry, token, release.config.orgId, release.config.teamId);
74
- const { manifest, bundle } = (0, publish_1.packBuiltPlugin)(built.directory);
75
- if (bundle.byteLength > plugins_1.PLUGIN_PUBLISH_MAX_BYTES - 1_048_576)
76
- throw new Error("Plugin bundle exceeds the upload limit");
77
- const sha256 = (0, node_crypto_1.createHash)("sha256").update(bundle).digest("hex");
78
- const form = new FormData();
79
- form.set("manifest", JSON.stringify(manifest));
80
- form.set("bundle", new Blob([bundle]), "bundle.tar.gz");
81
- const response = await fetch(endpoint, {
82
- method: "POST",
83
- body: form,
84
- headers: { authorization: `Bearer ${await identity()}`, "x-octonode-sha256": sha256 },
85
- redirect: "error",
86
- signal: AbortSignal.timeout(120_000),
87
- });
88
- if (!response.ok)
89
- throw new Error(`Plugin deployment failed (${response.status}): ${(await response.text()).slice(0, 1000)}`);
90
- const result = (await response.json());
91
- if (result.sha256 !== sha256)
92
- throw new Error("Registry archive hash does not match the uploaded bundle");
93
- return result;
143
+ return uploadGithubBuild(built.directory, endpoint, identity);
94
144
  }
95
145
  //# sourceMappingURL=deploy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/plugins/deploy.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,6CAAyC;AACzC,2DAAkD;AAClD,yCAA8C;AAC9C,oDAIgC;AAChC,mCAAuC;AACvC,uCAA8C;AAC9C,uCAA2D;AAEpD,KAAK,uBACV,IAAY,EACZ,QAAQ,GAAG,iCAAuB,EAClC,KA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AAE,MAAM;SACjB,CAAC,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,UAAU,GAAG,0BAAgB,CAAC,KAAK,CACvC,gBAAgB,GAAG,IAAA,oBAAQ,EAAC,OAAO,CAAC,IAAI,CAAC,CAC1C,CAAC;QACF,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,MAAM,gBAAgB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACjG,IAAI,MAAM,KAAK,WAAW;YACxB,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IAC3F,CAAC;SAAM,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC7E,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,IAAA,oBAAY,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACpD,IAAI,CAAC,MAAM;QACT,OAAO,IAAA,uBAAa,EAClB,KAAK,CAAC,SAAS,EACf,QAAQ,EACR,KAAM,EACN,OAAO,CAAC,MAAM,CAAC,KAAK,EACpB,OAAO,CAAC,MAAM,CAAC,MAAM,CACtB,CAAC;IACJ,OAAO,iBAAiB,CAAC,KAAK,CAAC,SAAS,EAAE,QAAS,EAAE,QAAS,CAAC,CAAC;AAClE,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const PLUGIN_HELP = "Usage:\n octonodes plugin deploy [source-directory] [--github]\n octonodes plugin version <patch|minor|major|version> [--cwd <directory>]\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\nDeploy reads plugin.octonode.json/.yml and builds, hashes and publishes to plugins.octonodes.com.\nGitHub publishing uses the connected repository and short-lived Actions identity, with no marketplace secret.\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";
1
+ export declare const PLUGIN_HELP = "Usage:\n octonodes plugin deploy [source-directory] [--github]\n octonodes plugin deploy-all --github\n octonodes plugin version <patch|minor|major|version> [--cwd <directory>]\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\nDeploy reads octonode.plugin.json and builds, hashes and publishes to plugins.octonodes.com.\nGitHub publishing uses the connected repository and short-lived Actions identity, with no marketplace secret.\nDeploy-all scans tracked release files and legacy manifests after the repository build.\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
2
  //# sourceMappingURL=help.constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"help.constants.d.ts","sourceRoot":"","sources":["../../src/plugins/help.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,w/CAwBvB,CAAC"}
1
+ {"version":3,"file":"help.constants.d.ts","sourceRoot":"","sources":["../../src/plugins/help.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,onDA0BvB,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PLUGIN_HELP = void 0;
4
4
  exports.PLUGIN_HELP = `Usage:
5
5
  octonodes plugin deploy [source-directory] [--github]
6
+ octonodes plugin deploy-all --github
6
7
  octonodes plugin version <patch|minor|major|version> [--cwd <directory>]
7
8
  octonodes plugin create <name>
8
9
  octonodes plugin nodes [--check]
@@ -17,8 +18,9 @@ exports.PLUGIN_HELP = `Usage:
17
18
  octonodes install --frozen --artifacts-only [--offline]
18
19
  octonodes plugin recover
19
20
 
20
- Deploy reads plugin.octonode.json/.yml and builds, hashes and publishes to plugins.octonodes.com.
21
+ Deploy reads octonode.plugin.json and builds, hashes and publishes to plugins.octonodes.com.
21
22
  GitHub publishing uses the connected repository and short-lived Actions identity, with no marketplace secret.
23
+ Deploy-all scans tracked release files and legacy manifests after the repository build.
22
24
  Build reads octonode.plugin.ts and writes dist/plugins/<id>.
23
25
  Node inventories are generated in octonode.nodes.ts. Metadata is inspected without execution.
24
26
  Publishing uses OCTONODE_MARKETPLACE_URL and OCTONODE_MARKETPLACE_TOKEN when set,
@@ -1 +1 @@
1
- {"version":3,"file":"help.constants.js","sourceRoot":"","sources":["../../src/plugins/help.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwB1B,CAAC"}
1
+ {"version":3,"file":"help.constants.js","sourceRoot":"","sources":["../../src/plugins/help.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAcA,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,CAiHlF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAcA,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,CAsHlF"}
@@ -64,6 +64,12 @@ async function pluginCommand(args, version) {
64
64
  process.stdout.write(JSON.stringify(await (0, deploy_1.deployPlugin)(target ?? ".", values.registry ?? process.env.OCTONODE_MARKETPLACE_URL ?? plugins_1.PLUGIN_PUBLISH_AUDIENCE, token, values.github), null, 2) + "\n");
65
65
  return;
66
66
  }
67
+ if (command === "deploy-all") {
68
+ if (!values.github || positionals.length)
69
+ throw new Error("Use plugin deploy-all --github in GitHub Actions");
70
+ process.stdout.write(JSON.stringify(await (0, deploy_1.deployAllPlugins)(values.registry ?? plugins_1.PLUGIN_PUBLISH_AUDIENCE), null, 2) + "\n");
71
+ return;
72
+ }
67
73
  if (command === "version") {
68
74
  if (!target)
69
75
  throw new Error("Choose patch, minor, major or an exact version");
@@ -71,7 +77,7 @@ async function pluginCommand(args, version) {
71
77
  ? { bump: target }
72
78
  : { version: target });
73
79
  if (!result)
74
- throw new Error("Add a plugin.octonode.json or .yml release file first");
80
+ throw new Error("Add an octonode.plugin.json release file first");
75
81
  process.stdout.write(result.config.version + "\n");
76
82
  return;
77
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":";;;;AAAA,qCAAwC;AACxC,uCAAgD;AAChD,oDAAiE;AACjE,2DAAkD;AAClD,yCAAoC;AACpC,yCAAsC;AACtC,kCAAsC;AACtC,yCAAyC;AACzC,mCAAuC;AACvC,qCAAwC;AACxC,uCAA0C;AAC1C,kEAA0E;AAC1E,6EAAwE;AAExE,mDAA+C;AAAtC,6GAAA,WAAW,OAAA;AAEb,KAAK,wBAAwB,IAAc,EAAE,OAAe;IACjE,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACxB,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,qBAAS,EAAC;QACxC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACnB,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE;YACP,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC3B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC5B,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACvB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC1B,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACvB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,OAAO,EAAE,EAA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I,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,iCAAuB,CAAC;QACpG,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;QACxF,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,0BAA0B,IAAI,CAAC,MAAM,IAAA,kBAAW,GAAE,CAAC,CAAC;QAC9E,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QAC3E,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,IAAI,CAAC,SAAS,CAAC,MAAM,IAAA,uBAAa,EAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CACzG,CAAC;QACF,OAAO;IACT,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,2BAA2B,OAAO,EAAE,CAAC,CAAC;AACxD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../src/plugins/release.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAUnD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM;;;;;;;;;;;;;cAgB7C;AAED,kFAAkF;AAClF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB;;;;;;;;;;;;;;cA0B7E"}
1
+ {"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../src/plugins/release.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAUnD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM;;;;;;;;;;;;;cAkB7C;AAED,kFAAkF;AAClF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB;;;;;;;;;;;;;;cA0B7E"}
@@ -12,7 +12,7 @@ function readPluginRelease(root) {
12
12
  if (!files.length)
13
13
  return undefined;
14
14
  if (files.length !== 1)
15
- throw new Error("Keep exactly one plugin.octonode release file");
15
+ throw new Error("Keep exactly one octonode.plugin.json release file");
16
16
  const path = (0, node_path_1.join)(root, files[0]);
17
17
  const stat = (0, node_fs_1.lstatSync)(path);
18
18
  if (!stat.isFile() || stat.isSymbolicLink() || stat.size > plugins_1.PLUGIN_CONFIG_MAX_BYTES)
@@ -25,7 +25,10 @@ function readPluginRelease(root) {
25
25
  });
26
26
  if (document.errors.length || document.warnings.length)
27
27
  throw new Error("Invalid plugin release JSON/YAML");
28
- return { path, document, config: plugins_1.PluginReleaseConfig.parse(document.toJS({ maxAliasCount: 0 })) };
28
+ const data = document.toJS({ maxAliasCount: 0 });
29
+ if (files[0] === "octonode.plugin.json" && data?.schemaVersion === "1")
30
+ return undefined;
31
+ return { path, document, config: plugins_1.PluginReleaseConfig.parse(data) };
29
32
  }
30
33
  /** Explicit release edits preserve YAML comments; builds never rewrite source. */
31
34
  function updatePluginRelease(root, release) {
@@ -1 +1 @@
1
- {"version":3,"file":"release.js","sourceRoot":"","sources":["../../src/plugins/release.ts"],"names":[],"mappings":";;;;AAAA,uDAAuD;AACvD,+BAA4C;AAE5C,qCAA6E;AAC7E,yCAAiC;AACjC,oDAKgC;AAEhC,2BAAkC,IAAY;IAC5C,MAAM,KAAK,GAAG,8BAAoB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,oBAAU,EAAC,IAAA,gBAAI,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAClF,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IACpC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACzF,MAAM,IAAI,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C,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS;QAChF,KAAK,EAAE,KAAK,KAAK,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS;KACtF,CAAC,CAAC;IACH,KAAK,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAU,EAAE,CAAC;QACnE,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,SAAS;YAAE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;;YACvD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9C,CAAC;IACD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClH,IAAA,uBAAa,EAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACpC,OAAO,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AACxC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octonodes/cli",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Octonode API and plugin development CLI.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,7 +21,7 @@
21
21
  "prepack": "tsc -b"
22
22
  },
23
23
  "dependencies": {
24
- "@octonodes/sdk": "0.2.2",
24
+ "@octonodes/sdk": "0.2.3",
25
25
  "@supabase/supabase-js": "2.107.0",
26
26
  "esbuild": "0.28.1",
27
27
  "tar": "7.5.22",
@@ -1034,7 +1034,12 @@ var require_constants = __commonJS({
1034
1034
  "missing_entitlement",
1035
1035
  "missing_permission"
1036
1036
  ];
1037
- exports2.PLUGIN_RELEASE_FILES = ["plugin.octonode.json", "plugin.octonode.yml", "plugin.octonode.yaml"];
1037
+ exports2.PLUGIN_RELEASE_FILES = [
1038
+ exports2.PLUGIN_MANIFEST_FILENAME,
1039
+ "plugin.octonode.json",
1040
+ "plugin.octonode.yml",
1041
+ "plugin.octonode.yaml"
1042
+ ];
1038
1043
  exports2.PLUGIN_PUBLISH_AUDIENCE = "https://plugins.octonodes.com";
1039
1044
  exports2.PLUGIN_CONFIG_MAX_BYTES = 65536;
1040
1045
  exports2.PLUGIN_PUBLISH_MAX_BYTES = 32 * 1024 * 1024;
@@ -11536,10 +11541,10 @@ var require_plugin_publishing = __commonJS({
11536
11541
  "packages/schema/dist/plugin-publishing.js"(exports2) {
11537
11542
  "use strict";
11538
11543
  Object.defineProperty(exports2, "__esModule", { value: true });
11539
- exports2.PluginPublisherConnections = exports2.PluginPublisherConnection = exports2.PluginPublisherPreview = exports2.PluginPublisherConsent = exports2.PluginPublisherInput = exports2.pluginReleaseScope = exports2.PluginReleaseConfig = exports2.PluginConfigPath = void 0;
11544
+ exports2.PluginPublisherConnections = exports2.PluginPublisherConnection = exports2.PluginPublisherPreview = exports2.PluginPublisherConsent = exports2.PluginPublisherAutomatic = exports2.PluginPublisherRepository = exports2.PluginPublisherInput = exports2.pluginReleaseScope = exports2.PluginReleaseConfig = exports2.PluginConfigPath = void 0;
11540
11545
  var zod_1 = require("zod");
11541
11546
  var plugin_version_1 = require_plugin_version();
11542
- exports2.PluginConfigPath = zod_1.z.string().max(512).refine((path) => /^(?:[a-zA-Z0-9_.-]+\/)*plugin\.octonode\.(json|ya?ml)$/.test(path) && !path.split("/").some((part) => [".", "..", ".git", "node_modules"].includes(part)), "Select a repository-relative plugin.octonode.json or .yml file");
11547
+ exports2.PluginConfigPath = zod_1.z.string().max(512).refine((path) => /^(?:[a-zA-Z0-9_.-]+\/)*(?:plugin\.octonode\.(?:json|ya?ml)|octonode\.plugin\.json)$/.test(path) && !path.split("/").some((part) => [".", "..", ".git", "node_modules"].includes(part)), "Select a repository-relative octonode.plugin.json file (older plugin.octonode release files also work)");
11543
11548
  exports2.PluginReleaseConfig = zod_1.z.object({
11544
11549
  apiVersion: zod_1.z.literal("octonode.plugin/v1"),
11545
11550
  id: zod_1.z.string().max(128).regex(/^[a-z0-9][a-z0-9-]*$/),
@@ -11558,6 +11563,12 @@ var require_plugin_publishing = __commonJS({
11558
11563
  var pluginReleaseScope = (config) => config.scope === "team" ? "group" : config.scope === "organization" ? "org" : config.scope;
11559
11564
  exports2.pluginReleaseScope = pluginReleaseScope;
11560
11565
  exports2.PluginPublisherInput = zod_1.z.object({ repositoryId: zod_1.z.number().int().positive(), configPath: exports2.PluginConfigPath }).strict();
11566
+ exports2.PluginPublisherRepository = exports2.PluginPublisherInput.pick({ repositoryId: true });
11567
+ exports2.PluginPublisherAutomatic = zod_1.z.object({
11568
+ ok: zod_1.z.boolean(),
11569
+ connected: zod_1.z.number(),
11570
+ workflow: zod_1.z.string()
11571
+ });
11561
11572
  exports2.PluginPublisherConsent = exports2.PluginPublisherInput.extend({ sha256: zod_1.z.string().regex(/^[a-f0-9]{64}$/) });
11562
11573
  exports2.PluginPublisherPreview = zod_1.z.object({
11563
11574
  config: exports2.PluginReleaseConfig,