@darkrymit/crunes-cli 0.5.10 → 0.7.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 (70) hide show
  1. package/README.md +5 -5
  2. package/dist/chunks/add-OWYVF3IE.js +22 -0
  3. package/dist/chunks/apply-OMEVXCHC.js +183 -0
  4. package/dist/chunks/args-32BVYW77.js +42 -0
  5. package/dist/chunks/benchmark-CLUBISCR.js +164 -0
  6. package/dist/chunks/browse-COH6IJEX.js +34 -0
  7. package/dist/chunks/check-BS6TZGRR.js +144 -0
  8. package/dist/chunks/chunk-2Q24YPGL.js +369 -0
  9. package/dist/chunks/chunk-3TM6B4E5.js +70 -0
  10. package/dist/chunks/chunk-67I2J474.js +153 -0
  11. package/dist/chunks/chunk-6XLT25GS.js +50 -0
  12. package/dist/chunks/chunk-BVY5LN7X.js +25091 -0
  13. package/dist/chunks/chunk-CGZL5SSH.js +926 -0
  14. package/dist/chunks/chunk-DMMC4X27.js +1836 -0
  15. package/dist/chunks/chunk-G3U4V32O.js +46 -0
  16. package/dist/chunks/chunk-GHQOK4L7.js +59 -0
  17. package/dist/chunks/chunk-H3BVJCIL.js +105 -0
  18. package/dist/chunks/chunk-HMU2J25D.js +63 -0
  19. package/dist/chunks/chunk-HOH7WZX4.js +95 -0
  20. package/dist/chunks/chunk-L72BG6DS.js +225 -0
  21. package/dist/chunks/chunk-NXSDVVTW.js +181 -0
  22. package/dist/chunks/chunk-QLDB3FO2.js +73059 -0
  23. package/dist/chunks/chunk-QMWGQXEZ.js +26 -0
  24. package/dist/chunks/chunk-TPK5AGRA.js +54 -0
  25. package/dist/chunks/chunk-UGN3FFEF.js +8379 -0
  26. package/dist/chunks/chunk-WCODTMDN.js +508 -0
  27. package/dist/chunks/chunk-XIXND2M4.js +296 -0
  28. package/dist/chunks/chunk-XXUNHQIB.js +129 -0
  29. package/dist/chunks/chunk-ZXIP4Z5V.js +281 -0
  30. package/dist/chunks/clear-Y5POLIMF.js +32 -0
  31. package/dist/chunks/completions-2MSEWWTG.js +232 -0
  32. package/dist/chunks/create-5FXQYCGM.js +165 -0
  33. package/dist/chunks/create-I6BNYZ5Q.js +247 -0
  34. package/dist/chunks/create-O3HMODSL.js +130 -0
  35. package/dist/chunks/delete-7CQFYIXS.js +40 -0
  36. package/dist/chunks/delete-UB5SXO5I.js +40 -0
  37. package/dist/chunks/disable-FCBW7WVG.js +47 -0
  38. package/dist/chunks/doctor-DS57HDLJ.js +53 -0
  39. package/dist/chunks/enable-IXRVUXJM.js +47 -0
  40. package/dist/chunks/esm-7MEWZCHY.js +5162 -0
  41. package/dist/chunks/globals-YCJ2DGWC.js +60 -0
  42. package/dist/chunks/init-WGKQVAZE.js +59 -0
  43. package/dist/chunks/install-BCTBOPBS.js +57 -0
  44. package/dist/chunks/intro-2UDWF6D4.js +1482 -0
  45. package/dist/chunks/kill-LWRXZVM5.js +37 -0
  46. package/dist/chunks/list-5DVVP7HX.js +50 -0
  47. package/dist/chunks/list-6WL5LGIZ.js +80 -0
  48. package/dist/chunks/list-NGOCMJXE.js +104 -0
  49. package/dist/chunks/list-TTKLNJKI.js +28 -0
  50. package/dist/chunks/list-WUAOSO3M.js +110 -0
  51. package/dist/chunks/list-YPI7YDKK.js +80 -0
  52. package/dist/chunks/list-ZBYPMUID.js +23 -0
  53. package/dist/chunks/manifest-7RVNKBOH.js +9 -0
  54. package/dist/chunks/output-RJ6JSNY7.js +12 -0
  55. package/dist/chunks/promise-DUSIQMA2.js +19400 -0
  56. package/dist/chunks/query-NY4SCO77.js +41 -0
  57. package/dist/chunks/registry-W5XFI5T6.js +16 -0
  58. package/dist/chunks/remove-WEAZFZCO.js +22 -0
  59. package/dist/chunks/run-I6TZX347.js +23 -0
  60. package/dist/chunks/run-MVIZQVJ6.js +36 -0
  61. package/dist/chunks/rune-TAX26NH2.js +76 -0
  62. package/dist/chunks/search-XENXL3GC.js +25 -0
  63. package/dist/chunks/uninstall-MX5PLGDI.js +49 -0
  64. package/dist/chunks/unset-KQOZYVTE.js +28 -0
  65. package/dist/chunks/update-7XDTVFZ3.js +39 -0
  66. package/dist/chunks/update-IEE54GPY.js +79 -0
  67. package/dist/chunks/utils-PO3ZK53L.js +50 -0
  68. package/dist/chunks/version-DIEA5FVV.js +145 -0
  69. package/dist/cli.js +3360 -125840
  70. package/package.json +23 -15
@@ -0,0 +1,60 @@
1
+ import {
2
+ globals_api_default
3
+ } from "./chunk-UGN3FFEF.js";
4
+ import {
5
+ formatMembers,
6
+ walk
7
+ } from "./chunk-XIXND2M4.js";
8
+ import {
9
+ init_require_shim
10
+ } from "./chunk-TPK5AGRA.js";
11
+
12
+ // src/docs/commands/globals.js
13
+ init_require_shim();
14
+ var ES2020_BUILTINS = [
15
+ "ArrayBuffer",
16
+ "Uint8Array",
17
+ "Int8Array",
18
+ "Uint16Array",
19
+ "Int16Array",
20
+ "Uint32Array",
21
+ "Int32Array",
22
+ "Float32Array",
23
+ "Float64Array",
24
+ "Promise",
25
+ "Map",
26
+ "Set",
27
+ "WeakMap",
28
+ "WeakSet",
29
+ "Symbol",
30
+ "BigInt",
31
+ "Date",
32
+ "RegExp",
33
+ "Error",
34
+ "JSON",
35
+ "Math"
36
+ ];
37
+ var [GLOBALS_NS] = walk(globals_api_default);
38
+ async function handler({ format = "text" } = {}) {
39
+ if (format === "json") {
40
+ const out = {
41
+ members: GLOBALS_NS?.members ?? [],
42
+ es2020Builtins: ES2020_BUILTINS
43
+ };
44
+ process.stdout.write(JSON.stringify(out, null, 2) + "\n");
45
+ return;
46
+ }
47
+ const lines = [];
48
+ lines.push("Injected Sandbox Globals");
49
+ lines.push(" Explicitly set on globalThis by the sandbox bootstrap.");
50
+ lines.push(" ES2020 builtins (ArrayBuffer, Promise, Map, ...) are listed at the bottom.");
51
+ lines.push("");
52
+ lines.push(formatMembers(GLOBALS_NS?.members ?? []));
53
+ lines.push("");
54
+ lines.push("ES2020 Builtins (available without injection):");
55
+ lines.push(" " + ES2020_BUILTINS.join(" "));
56
+ process.stdout.write(lines.join("\n") + "\n");
57
+ }
58
+ export {
59
+ handler
60
+ };
@@ -0,0 +1,59 @@
1
+ import {
2
+ fe,
3
+ ge,
4
+ le,
5
+ ye
6
+ } from "./chunk-CGZL5SSH.js";
7
+ import {
8
+ output
9
+ } from "./chunk-6XLT25GS.js";
10
+ import "./chunk-WCODTMDN.js";
11
+ import {
12
+ init_require_shim
13
+ } from "./chunk-TPK5AGRA.js";
14
+
15
+ // src/core/commands/init.js
16
+ init_require_shim();
17
+ import { mkdirSync, writeFileSync, existsSync } from "node:fs";
18
+ import { join } from "node:path";
19
+ var EMPTY_CONFIG = JSON.stringify({ runes: {} }, null, 2) + "\n";
20
+ var GITIGNORE_CONTENT = "# local overrides (machine-specific, never commit)\nconfig.local.json\nproject.local.json\n\n# run logs\nlogs/\n\n# local caches and databases (gitignored by default)\ncaches/\nsqlite/\n";
21
+ async function handler({
22
+ yes = false,
23
+ projectRoot = process.cwd()
24
+ } = {}) {
25
+ const configDir = join(projectRoot, ".crunes");
26
+ const configPath = join(configDir, "config.json");
27
+ const isNonInteractive = yes || !process.stdout.isTTY;
28
+ if (existsSync(configPath)) {
29
+ if (!yes) {
30
+ if (isNonInteractive) {
31
+ output.error("Config already exists. Use --yes to overwrite.");
32
+ process.exit(1);
33
+ }
34
+ ye("crunes init");
35
+ const overwrite = await le({
36
+ message: "Config already exists. Overwrite?",
37
+ initialValue: false
38
+ });
39
+ if (!overwrite || overwrite === /* @__PURE__ */ Symbol.for("clack:cancel")) {
40
+ ge("Cancelled.");
41
+ return;
42
+ }
43
+ }
44
+ }
45
+ mkdirSync(configDir, { recursive: true });
46
+ writeFileSync(configPath, EMPTY_CONFIG);
47
+ const gitignorePath = join(configDir, ".gitignore");
48
+ if (!existsSync(gitignorePath)) {
49
+ writeFileSync(gitignorePath, GITIGNORE_CONTENT);
50
+ }
51
+ if (!isNonInteractive) {
52
+ fe(`Created ${configPath}`);
53
+ } else {
54
+ output.success(`Created ${configPath}`);
55
+ }
56
+ }
57
+ export {
58
+ handler
59
+ };
@@ -0,0 +1,57 @@
1
+ import {
2
+ resolveFromMarketplace
3
+ } from "./chunk-L72BG6DS.js";
4
+ import {
5
+ installPlugin
6
+ } from "./chunk-2Q24YPGL.js";
7
+ import {
8
+ fe,
9
+ ge,
10
+ ye
11
+ } from "./chunk-CGZL5SSH.js";
12
+ import "./chunk-GHQOK4L7.js";
13
+ import "./chunk-HMU2J25D.js";
14
+ import "./chunk-G3U4V32O.js";
15
+ import {
16
+ init_require_shim
17
+ } from "./chunk-TPK5AGRA.js";
18
+
19
+ // src/plugin/commands/install.js
20
+ init_require_shim();
21
+ function parseInstallArg(arg) {
22
+ const idx = arg.indexOf("@");
23
+ if (idx === -1) return null;
24
+ return [arg.slice(0, idx), arg.slice(idx + 1)];
25
+ }
26
+ async function handler({ source, projectRoot, yes }) {
27
+ const parts = parseInstallArg(source);
28
+ if (!parts) {
29
+ ge("Use <marketplace>@<plugin> format (e.g. hello-world@hello-world)");
30
+ process.exit(1);
31
+ }
32
+ const [marketplaceName, pluginName] = parts;
33
+ ye("Installing plugin\u2026");
34
+ let resolvedSource, provenance;
35
+ try {
36
+ ;
37
+ ({ resolvedSource, ...provenance } = await resolveFromMarketplace(marketplaceName, pluginName));
38
+ } catch (err) {
39
+ ge(err.message);
40
+ process.exit(1);
41
+ }
42
+ let result;
43
+ try {
44
+ result = await installPlugin(resolvedSource, projectRoot, provenance, { yes });
45
+ } catch (err) {
46
+ ge(`Installation failed: ${err.message}`);
47
+ process.exit(1);
48
+ }
49
+ if (!result.installed) {
50
+ ge("Installation cancelled.");
51
+ process.exit(0);
52
+ }
53
+ fe(`Installed ${result.name}@${result.version}`);
54
+ }
55
+ export {
56
+ handler
57
+ };