@red-hat-developer-hub/cli-module-install-dynamic-plugins 0.2.0

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +126 -0
  3. package/bin/install-dynamic-plugins +32 -0
  4. package/dist/catalog-index.cjs.js +242 -0
  5. package/dist/catalog-index.cjs.js.map +1 -0
  6. package/dist/command.cjs.js +12 -0
  7. package/dist/command.cjs.js.map +1 -0
  8. package/dist/concurrency.cjs.js +86 -0
  9. package/dist/concurrency.cjs.js.map +1 -0
  10. package/dist/errors.cjs.js +11 -0
  11. package/dist/errors.cjs.js.map +1 -0
  12. package/dist/image-cache.cjs.js +116 -0
  13. package/dist/image-cache.cjs.js.map +1 -0
  14. package/dist/image-resolver.cjs.js +24 -0
  15. package/dist/image-resolver.cjs.js.map +1 -0
  16. package/dist/index.cjs.js +20 -0
  17. package/dist/index.cjs.js.map +1 -0
  18. package/dist/index.d.ts +12 -0
  19. package/dist/installer-npm.cjs.js +111 -0
  20. package/dist/installer-npm.cjs.js.map +1 -0
  21. package/dist/installer-oci.cjs.js +106 -0
  22. package/dist/installer-oci.cjs.js.map +1 -0
  23. package/dist/installer.cjs.js +426 -0
  24. package/dist/installer.cjs.js.map +1 -0
  25. package/dist/integrity.cjs.js +79 -0
  26. package/dist/integrity.cjs.js.map +1 -0
  27. package/dist/lock-file.cjs.js +100 -0
  28. package/dist/lock-file.cjs.js.map +1 -0
  29. package/dist/log.cjs.js +9 -0
  30. package/dist/log.cjs.js.map +1 -0
  31. package/dist/merger.cjs.js +333 -0
  32. package/dist/merger.cjs.js.map +1 -0
  33. package/dist/npm-key.cjs.js +44 -0
  34. package/dist/npm-key.cjs.js.map +1 -0
  35. package/dist/oci-key.cjs.js +102 -0
  36. package/dist/oci-key.cjs.js.map +1 -0
  37. package/dist/package.json.cjs.js +104 -0
  38. package/dist/package.json.cjs.js.map +1 -0
  39. package/dist/plugin-hash.cjs.js +85 -0
  40. package/dist/plugin-hash.cjs.js.map +1 -0
  41. package/dist/run.cjs.js +37 -0
  42. package/dist/run.cjs.js.map +1 -0
  43. package/dist/skopeo.cjs.js +87 -0
  44. package/dist/skopeo.cjs.js.map +1 -0
  45. package/dist/tar-extract.cjs.js +155 -0
  46. package/dist/tar-extract.cjs.js.map +1 -0
  47. package/dist/types.cjs.js +45 -0
  48. package/dist/types.cjs.js.map +1 -0
  49. package/dist/util.cjs.js +56 -0
  50. package/dist/util.cjs.js.map +1 -0
  51. package/dist/which.cjs.js +45 -0
  52. package/dist/which.cjs.js.map +1 -0
  53. package/package.json +68 -0
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ const PullPolicy = {
4
+ IF_NOT_PRESENT: "IfNotPresent",
5
+ ALWAYS: "Always"
6
+ };
7
+ const DOCKER_PROTO = "docker://";
8
+ const OCI_PROTO = "oci://";
9
+ const LATEST_TAG_MARKER = ":latest!";
10
+ const RHDH_REGISTRY = "registry.access.redhat.com/rhdh/";
11
+ const RHDH_FALLBACK = "quay.io/rhdh/";
12
+ const CONFIG_HASH_FILE = "dynamic-plugin-config.hash";
13
+ const IMAGE_HASH_FILE = "dynamic-plugin-image.hash";
14
+ const DPDY_FILENAME = "dynamic-plugins.default.yaml";
15
+ const LOCK_FILENAME = "install-dynamic-plugins.lock";
16
+ const GLOBAL_CONFIG_FILENAME = "app-config.dynamic-plugins.yaml";
17
+ const DEFAULT_MAX_ENTRY_SIZE = 4e7;
18
+ function parseMaxEntrySize(raw = process.env.MAX_ENTRY_SIZE) {
19
+ if (!raw) return DEFAULT_MAX_ENTRY_SIZE;
20
+ const n = Number.parseInt(raw, 10);
21
+ return Number.isFinite(n) && n >= 1 ? n : DEFAULT_MAX_ENTRY_SIZE;
22
+ }
23
+ const MAX_ENTRY_SIZE = parseMaxEntrySize();
24
+ const RECOGNIZED_ALGORITHMS = ["sha512", "sha384", "sha256"];
25
+ function effectivePullPolicy(plugin) {
26
+ if (plugin.pullPolicy) return plugin.pullPolicy;
27
+ return plugin.package.includes(LATEST_TAG_MARKER) ? PullPolicy.ALWAYS : PullPolicy.IF_NOT_PRESENT;
28
+ }
29
+
30
+ exports.CONFIG_HASH_FILE = CONFIG_HASH_FILE;
31
+ exports.DOCKER_PROTO = DOCKER_PROTO;
32
+ exports.DPDY_FILENAME = DPDY_FILENAME;
33
+ exports.GLOBAL_CONFIG_FILENAME = GLOBAL_CONFIG_FILENAME;
34
+ exports.IMAGE_HASH_FILE = IMAGE_HASH_FILE;
35
+ exports.LATEST_TAG_MARKER = LATEST_TAG_MARKER;
36
+ exports.LOCK_FILENAME = LOCK_FILENAME;
37
+ exports.MAX_ENTRY_SIZE = MAX_ENTRY_SIZE;
38
+ exports.OCI_PROTO = OCI_PROTO;
39
+ exports.PullPolicy = PullPolicy;
40
+ exports.RECOGNIZED_ALGORITHMS = RECOGNIZED_ALGORITHMS;
41
+ exports.RHDH_FALLBACK = RHDH_FALLBACK;
42
+ exports.RHDH_REGISTRY = RHDH_REGISTRY;
43
+ exports.effectivePullPolicy = effectivePullPolicy;
44
+ exports.parseMaxEntrySize = parseMaxEntrySize;
45
+ //# sourceMappingURL=types.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.cjs.js","sources":["../src/types.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const PullPolicy = {\n IF_NOT_PRESENT: 'IfNotPresent',\n ALWAYS: 'Always',\n} as const;\n\n// PullPolicy is intentionally both a const (runtime values) and a type\n// (string union) so callers can use `PullPolicy.ALWAYS` and `PullPolicy` as\n// a type. The no-redeclare rule doesn't recognise this enum-like pattern.\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type PullPolicy = (typeof PullPolicy)[keyof typeof PullPolicy];\n\n/**\n * External schema — the fields a user may declare in `dynamic-plugins.yaml`.\n * Keep this in sync with RHDH documentation.\n */\nexport type PluginSpec = {\n package: string;\n disabled?: boolean;\n pullPolicy?: PullPolicy;\n forceDownload?: boolean;\n integrity?: string;\n pluginConfig?: Record<string, unknown>;\n};\n\n/**\n * Internal plugin record. Extends the YAML schema with fields populated at\n * runtime (`version` from the package string, `plugin_hash` for change\n * detection, `last_modified_level` to track include-file precedence).\n *\n * The field name `last_modified_level` matches the Python implementation so\n * the install hashes computed by `plugin-hash.ts` stay byte-compatible\n * across the Python ↔ TS migration. Renaming it would force every existing\n * dynamic-plugins-root to be re-installed on the first TS run.\n */\nexport type Plugin = PluginSpec & {\n version?: string;\n plugin_hash?: string;\n last_modified_level?: number;\n};\n\nexport type PluginMap = Record<string, Plugin>;\n\nexport type DynamicPluginsConfig = {\n includes?: string[];\n plugins?: PluginSpec[];\n};\n\nexport const DOCKER_PROTO = 'docker://';\nexport const OCI_PROTO = 'oci://';\n/**\n * Tag suffix that, by convention, opts an OCI plugin into `pullPolicy: Always`\n * when no explicit policy is set — mirrors the Python script's behaviour and\n * keeps the two implementations swappable. Always parsed in combination with\n * the `!plugin-path` separator so a plugin tagged `:latest` (no plugin path)\n * does not accidentally trigger.\n */\nexport const LATEST_TAG_MARKER = ':latest!';\nexport const RHDH_REGISTRY = 'registry.access.redhat.com/rhdh/';\nexport const RHDH_FALLBACK = 'quay.io/rhdh/';\nexport const CONFIG_HASH_FILE = 'dynamic-plugin-config.hash';\nexport const IMAGE_HASH_FILE = 'dynamic-plugin-image.hash';\nexport const DPDY_FILENAME = 'dynamic-plugins.default.yaml';\nexport const LOCK_FILENAME = 'install-dynamic-plugins.lock';\nexport const GLOBAL_CONFIG_FILENAME = 'app-config.dynamic-plugins.yaml';\n\nconst DEFAULT_MAX_ENTRY_SIZE = 40_000_000;\n\n/**\n * Parse the MAX_ENTRY_SIZE env var, falling back to the default when unset,\n * non-numeric, or < 1. Exported for unit tests — the `MAX_ENTRY_SIZE` constant\n * below is the module-level value used by the extractors.\n */\nexport function parseMaxEntrySize(\n raw: string | undefined = process.env.MAX_ENTRY_SIZE,\n): number {\n if (!raw) return DEFAULT_MAX_ENTRY_SIZE;\n const n = Number.parseInt(raw, 10);\n return Number.isFinite(n) && n >= 1 ? n : DEFAULT_MAX_ENTRY_SIZE;\n}\n\nexport const MAX_ENTRY_SIZE = parseMaxEntrySize();\nexport const RECOGNIZED_ALGORITHMS = ['sha512', 'sha384', 'sha256'] as const;\nexport type Algorithm = (typeof RECOGNIZED_ALGORITHMS)[number];\n\n/**\n * Resolve the effective `pullPolicy` for an OCI plugin: an explicit policy\n * wins, otherwise the convention is `Always` for `:latest!` images and\n * `IfNotPresent` for everything else. Shared by the install pipeline and the\n * \"definitely no-op\" pre-pass so the `:latest!` semantics live in one place.\n */\nexport function effectivePullPolicy(plugin: {\n pullPolicy?: PullPolicy;\n package: string;\n}): PullPolicy {\n if (plugin.pullPolicy) return plugin.pullPolicy;\n return plugin.package.includes(LATEST_TAG_MARKER)\n ? PullPolicy.ALWAYS\n : PullPolicy.IF_NOT_PRESENT;\n}\n"],"names":[],"mappings":";;AAeO,MAAM,UAAA,GAAa;AAAA,EACxB,cAAA,EAAgB,cAAA;AAAA,EAChB,MAAA,EAAQ;AACV;AA4CO,MAAM,YAAA,GAAe;AACrB,MAAM,SAAA,GAAY;AAQlB,MAAM,iBAAA,GAAoB;AAC1B,MAAM,aAAA,GAAgB;AACtB,MAAM,aAAA,GAAgB;AACtB,MAAM,gBAAA,GAAmB;AACzB,MAAM,eAAA,GAAkB;AACxB,MAAM,aAAA,GAAgB;AACtB,MAAM,aAAA,GAAgB;AACtB,MAAM,sBAAA,GAAyB;AAEtC,MAAM,sBAAA,GAAyB,GAAA;AAOxB,SAAS,iBAAA,CACd,GAAA,GAA0B,OAAA,CAAQ,GAAA,CAAI,cAAA,EAC9B;AACR,EAAA,IAAI,CAAC,KAAK,OAAO,sBAAA;AACjB,EAAA,MAAM,CAAA,GAAI,MAAA,CAAO,QAAA,CAAS,GAAA,EAAK,EAAE,CAAA;AACjC,EAAA,OAAO,OAAO,QAAA,CAAS,CAAC,CAAA,IAAK,CAAA,IAAK,IAAI,CAAA,GAAI,sBAAA;AAC5C;AAEO,MAAM,iBAAiB,iBAAA;AACvB,MAAM,qBAAA,GAAwB,CAAC,QAAA,EAAU,QAAA,EAAU,QAAQ;AAS3D,SAAS,oBAAoB,MAAA,EAGrB;AACb,EAAA,IAAI,MAAA,CAAO,UAAA,EAAY,OAAO,MAAA,CAAO,UAAA;AACrC,EAAA,OAAO,OAAO,OAAA,CAAQ,QAAA,CAAS,iBAAiB,CAAA,GAC5C,UAAA,CAAW,SACX,UAAA,CAAW,cAAA;AACjB;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,56 @@
1
+ 'use strict';
2
+
3
+ var fs = require('node:fs/promises');
4
+ var path = require('node:path');
5
+
6
+ function _interopNamespaceCompat(e) {
7
+ if (e && typeof e === 'object' && 'default' in e) return e;
8
+ var n = Object.create(null);
9
+ if (e) {
10
+ Object.keys(e).forEach(function (k) {
11
+ if (k !== 'default') {
12
+ var d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: function () { return e[k]; }
16
+ });
17
+ }
18
+ });
19
+ }
20
+ n.default = e;
21
+ return Object.freeze(n);
22
+ }
23
+
24
+ var fs__namespace = /*#__PURE__*/_interopNamespaceCompat(fs);
25
+ var path__namespace = /*#__PURE__*/_interopNamespaceCompat(path);
26
+
27
+ async function fileExists(filePath) {
28
+ try {
29
+ await fs__namespace.access(filePath);
30
+ return true;
31
+ } catch {
32
+ return false;
33
+ }
34
+ }
35
+ function isInside(childAbs, parentAbs) {
36
+ const normalized = parentAbs.endsWith(path__namespace.sep) ? parentAbs : parentAbs + path__namespace.sep;
37
+ return childAbs === parentAbs || childAbs.startsWith(normalized);
38
+ }
39
+ function isPlainObject(value) {
40
+ return typeof value === "object" && value !== null && !Array.isArray(value);
41
+ }
42
+ function isAllowedEntryType(type) {
43
+ return type === "File" || type === "Directory" || type === "SymbolicLink" || type === "Link" || type === "OldFile" || type === "ContiguousFile";
44
+ }
45
+ function markAsFresh(installed, pluginPath) {
46
+ for (const [k, v] of installed) {
47
+ if (v === pluginPath) installed.delete(k);
48
+ }
49
+ }
50
+
51
+ exports.fileExists = fileExists;
52
+ exports.isAllowedEntryType = isAllowedEntryType;
53
+ exports.isInside = isInside;
54
+ exports.isPlainObject = isPlainObject;
55
+ exports.markAsFresh = markAsFresh;
56
+ //# sourceMappingURL=util.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.cjs.js","sources":["../src/util.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as fs from 'node:fs/promises';\nimport * as path from 'node:path';\nimport type * as tar from 'tar';\n\n/** Returns true when the file/directory exists; swallows all other errors. */\nexport async function fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n}\n\n/** True when `childAbs` resolves to `parentAbs` or a path under it. */\nexport function isInside(childAbs: string, parentAbs: string): boolean {\n const normalized = parentAbs.endsWith(path.sep)\n ? parentAbs\n : parentAbs + path.sep;\n return childAbs === parentAbs || childAbs.startsWith(normalized);\n}\n\n/** Plain JS object test — excludes arrays, null, class instances with custom prototype. */\nexport function isPlainObject(\n value: unknown,\n): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/**\n * Allowed `tar` entry types: regular file kinds + directory + links. Anything\n * else (character/block devices, FIFOs, unknown) is rejected by the tar filters.\n */\nexport function isAllowedEntryType(type: tar.ReadEntry['type']): boolean {\n return (\n type === 'File' ||\n type === 'Directory' ||\n type === 'SymbolicLink' ||\n type === 'Link' ||\n type === 'OldFile' ||\n type === 'ContiguousFile'\n );\n}\n\n/**\n * Drop any entries from `installed` whose value (on-disk directory) matches\n * `pluginPath`. Called after a successful install so stale hash entries for\n * the same directory are not mistakenly removed by the cleanup phase.\n */\nexport function markAsFresh(\n installed: Map<string, string>,\n pluginPath: string,\n): void {\n for (const [k, v] of installed) {\n if (v === pluginPath) installed.delete(k);\n }\n}\n"],"names":["fs","path"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,eAAsB,WAAW,QAAA,EAAoC;AACnE,EAAA,IAAI;AACF,IAAA,MAAMA,aAAA,CAAG,OAAO,QAAQ,CAAA;AACxB,IAAA,OAAO,IAAA;AAAA,EACT,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,KAAA;AAAA,EACT;AACF;AAGO,SAAS,QAAA,CAAS,UAAkB,SAAA,EAA4B;AACrE,EAAA,MAAM,UAAA,GAAa,UAAU,QAAA,CAASC,eAAA,CAAK,GAAG,CAAA,GAC1C,SAAA,GACA,YAAYA,eAAA,CAAK,GAAA;AACrB,EAAA,OAAO,QAAA,KAAa,SAAA,IAAa,QAAA,CAAS,UAAA,CAAW,UAAU,CAAA;AACjE;AAGO,SAAS,cACd,KAAA,EACkC;AAClC,EAAA,OAAO,OAAO,UAAU,QAAA,IAAY,KAAA,KAAU,QAAQ,CAAC,KAAA,CAAM,QAAQ,KAAK,CAAA;AAC5E;AAMO,SAAS,mBAAmB,IAAA,EAAsC;AACvE,EAAA,OACE,IAAA,KAAS,MAAA,IACT,IAAA,KAAS,WAAA,IACT,IAAA,KAAS,kBACT,IAAA,KAAS,MAAA,IACT,IAAA,KAAS,SAAA,IACT,IAAA,KAAS,gBAAA;AAEb;AAOO,SAAS,WAAA,CACd,WACA,UAAA,EACM;AACN,EAAA,KAAA,MAAW,CAAC,CAAA,EAAG,CAAC,CAAA,IAAK,SAAA,EAAW;AAC9B,IAAA,IAAI,CAAA,KAAM,UAAA,EAAY,SAAA,CAAU,MAAA,CAAO,CAAC,CAAA;AAAA,EAC1C;AACF;;;;;;;;"}
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ var node_fs = require('node:fs');
4
+ var path = require('node:path');
5
+
6
+ function _interopNamespaceCompat(e) {
7
+ if (e && typeof e === 'object' && 'default' in e) return e;
8
+ var n = Object.create(null);
9
+ if (e) {
10
+ Object.keys(e).forEach(function (k) {
11
+ if (k !== 'default') {
12
+ var d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: function () { return e[k]; }
16
+ });
17
+ }
18
+ });
19
+ }
20
+ n.default = e;
21
+ return Object.freeze(n);
22
+ }
23
+
24
+ var path__namespace = /*#__PURE__*/_interopNamespaceCompat(path);
25
+
26
+ function which(bin) {
27
+ const pathEnv = process.env.PATH ?? "";
28
+ const sep = process.platform === "win32" ? ";" : ":";
29
+ const exts = process.platform === "win32" ? (process.env.PATHEXT ?? ".EXE;.CMD;.BAT;.COM").split(";") : [""];
30
+ for (const dir of pathEnv.split(sep)) {
31
+ if (!dir) continue;
32
+ for (const ext of exts) {
33
+ const full = path__namespace.join(dir, bin + ext);
34
+ try {
35
+ node_fs.accessSync(full, node_fs.constants.X_OK);
36
+ return full;
37
+ } catch {
38
+ }
39
+ }
40
+ }
41
+ return null;
42
+ }
43
+
44
+ exports.which = which;
45
+ //# sourceMappingURL=which.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"which.cjs.js","sources":["../src/which.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { accessSync, constants } from 'node:fs';\nimport * as path from 'node:path';\n\n/**\n * Minimal `which(1)` — returns the absolute path of `bin` if found on PATH\n * and executable, otherwise `null`. Avoids a dependency on the `which` npm package.\n */\nexport function which(bin: string): string | null {\n const pathEnv = process.env.PATH ?? '';\n const sep = process.platform === 'win32' ? ';' : ':';\n const exts =\n process.platform === 'win32'\n ? (process.env.PATHEXT ?? '.EXE;.CMD;.BAT;.COM').split(';')\n : [''];\n for (const dir of pathEnv.split(sep)) {\n if (!dir) continue;\n for (const ext of exts) {\n const full = path.join(dir, bin + ext);\n try {\n accessSync(full, constants.X_OK);\n return full;\n } catch {\n /* next */\n }\n }\n }\n return null;\n}\n"],"names":["path","accessSync","constants"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,SAAS,MAAM,GAAA,EAA4B;AAChD,EAAA,MAAM,OAAA,GAAU,OAAA,CAAQ,GAAA,CAAI,IAAA,IAAQ,EAAA;AACpC,EAAA,MAAM,GAAA,GAAM,OAAA,CAAQ,QAAA,KAAa,OAAA,GAAU,GAAA,GAAM,GAAA;AACjD,EAAA,MAAM,IAAA,GACJ,OAAA,CAAQ,QAAA,KAAa,OAAA,GAAA,CAChB,OAAA,CAAQ,GAAA,CAAI,OAAA,IAAW,qBAAA,EAAuB,KAAA,CAAM,GAAG,CAAA,GACxD,CAAC,EAAE,CAAA;AACT,EAAA,KAAA,MAAW,GAAA,IAAO,OAAA,CAAQ,KAAA,CAAM,GAAG,CAAA,EAAG;AACpC,IAAA,IAAI,CAAC,GAAA,EAAK;AACV,IAAA,KAAA,MAAW,OAAO,IAAA,EAAM;AACtB,MAAA,MAAM,IAAA,GAAOA,eAAA,CAAK,IAAA,CAAK,GAAA,EAAK,MAAM,GAAG,CAAA;AACrC,MAAA,IAAI;AACF,QAAAC,kBAAA,CAAW,IAAA,EAAMC,kBAAU,IAAI,CAAA;AAC/B,QAAA,OAAO,IAAA;AAAA,MACT,CAAA,CAAA,MAAQ;AAAA,MAER;AAAA,IACF;AAAA,EACF;AACA,EAAA,OAAO,IAAA;AACT;;;;"}
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@red-hat-developer-hub/cli-module-install-dynamic-plugins",
3
+ "version": "0.2.0",
4
+ "description": "Backstage CLI module that installs RHDH dynamic plugins from a dynamic-plugins.yaml config (OCI, NPM, local).",
5
+ "license": "Apache-2.0",
6
+ "backstage": {
7
+ "role": "cli-module"
8
+ },
9
+ "homepage": "https://github.com/redhat-developer/rhdh-plugins/tree/main/workspaces/install-dynamic-plugins#readme",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/redhat-developer/rhdh-plugins",
13
+ "directory": "workspaces/install-dynamic-plugins/packages/install-dynamic-plugins"
14
+ },
15
+ "bugs": "https://github.com/redhat-developer/rhdh-plugins/issues",
16
+ "keywords": [
17
+ "rhdh",
18
+ "backstage",
19
+ "dynamic-plugins",
20
+ "cli",
21
+ "cli-module",
22
+ "init-container"
23
+ ],
24
+ "engines": {
25
+ "node": "22 || 24"
26
+ },
27
+ "main": "dist/index.cjs.js",
28
+ "types": "dist/index.d.ts",
29
+ "bin": "bin/install-dynamic-plugins",
30
+ "files": [
31
+ "bin",
32
+ "dist"
33
+ ],
34
+ "publishConfig": {
35
+ "access": "public",
36
+ "main": "dist/index.cjs.js",
37
+ "types": "dist/index.d.ts"
38
+ },
39
+ "scripts": {
40
+ "build": "backstage-cli package build",
41
+ "clean": "backstage-cli package clean",
42
+ "lint": "backstage-cli package lint",
43
+ "prepack": "backstage-cli package prepack",
44
+ "postpack": "backstage-cli package postpack",
45
+ "test": "backstage-cli package test",
46
+ "tsc": "tsc"
47
+ },
48
+ "dependencies": {
49
+ "@backstage/cli-node": "^0.3.2",
50
+ "cleye": "^2.6.0",
51
+ "tar": "^7.5.13",
52
+ "yaml": "^2.8.2"
53
+ },
54
+ "devDependencies": {
55
+ "@backstage/cli": "^0.36.0",
56
+ "@types/jest": "^30.0.0",
57
+ "@types/node": "^22.10.0",
58
+ "@types/tar": "^6.1.13",
59
+ "typescript": "~5.8.0"
60
+ },
61
+ "typesVersions": {
62
+ "*": {
63
+ "package.json": [
64
+ "package.json"
65
+ ]
66
+ }
67
+ }
68
+ }