@reticlehq/init 2.14.0 → 3.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 (125) hide show
  1. package/dist/{detect.d.ts → detect/detect.d.ts} +1 -1
  2. package/dist/{detect.js → detect/detect.js} +6 -2
  3. package/dist/{dev-server-ports.js → detect/dev-server-ports.js} +8 -0
  4. package/dist/{existing-config.d.ts → detect/existing-config.d.ts} +2 -4
  5. package/dist/{existing-config.js → detect/existing-config.js} +2 -4
  6. package/dist/{lockfiles.d.ts → detect/lockfiles.d.ts} +1 -1
  7. package/dist/{lockfiles.js → detect/lockfiles.js} +1 -2
  8. package/dist/{workspace-apps.d.ts → detect/workspace-apps.d.ts} +3 -5
  9. package/dist/{workspace-apps.js → detect/workspace-apps.js} +2 -4
  10. package/dist/{workspace-redirect.d.ts → detect/workspace-redirect.d.ts} +3 -5
  11. package/dist/{workspace-redirect.js → detect/workspace-redirect.js} +8 -12
  12. package/dist/{closing-hint.d.ts → diagnose/closing-hint.d.ts} +3 -4
  13. package/dist/{closing-hint.js → diagnose/closing-hint.js} +14 -19
  14. package/dist/diagnose/containerised-dev-server.d.ts +32 -0
  15. package/dist/diagnose/containerised-dev-server.js +56 -0
  16. package/dist/{csp-check.d.ts → diagnose/csp-check.d.ts} +2 -2
  17. package/dist/{csp-check.js → diagnose/csp-check.js} +2 -2
  18. package/dist/{desktop-doctor.js → diagnose/desktop-doctor.js} +12 -6
  19. package/dist/{init-failure.d.ts → diagnose/init-failure.d.ts} +1 -2
  20. package/dist/{init-failure.js → diagnose/init-failure.js} +1 -2
  21. package/dist/diagnose/install-hint.d.ts +8 -0
  22. package/dist/{install-hint.js → diagnose/install-hint.js} +3 -4
  23. package/dist/{install-retries.d.ts → diagnose/install-retries.d.ts} +3 -4
  24. package/dist/{install-retries.js → diagnose/install-retries.js} +6 -8
  25. package/dist/host.d.ts +14 -1
  26. package/dist/host.js +3 -0
  27. package/dist/index.d.ts +32 -12
  28. package/dist/index.js +36 -12
  29. package/dist/node-io.d.ts +12 -1
  30. package/dist/node-io.js +53 -25
  31. package/dist/{astro-patch.d.ts → patch/astro-patch.d.ts} +1 -1
  32. package/dist/{astro-patch.js → patch/astro-patch.js} +1 -1
  33. package/dist/{cra.js → patch/cra.js} +1 -1
  34. package/dist/{electron-patch.js → patch/electron-patch.js} +1 -1
  35. package/dist/{next-patch.d.ts → patch/next-patch.d.ts} +2 -2
  36. package/dist/{next-patch.js → patch/next-patch.js} +2 -2
  37. package/dist/{nuxt-patch.js → patch/nuxt-patch.js} +1 -1
  38. package/dist/{snippets.d.ts → patch/snippets.d.ts} +11 -21
  39. package/dist/{snippets.js → patch/snippets.js} +20 -29
  40. package/dist/{tanstack-start.d.ts → patch/tanstack-start.d.ts} +2 -3
  41. package/dist/{tanstack-start.js → patch/tanstack-start.js} +3 -4
  42. package/dist/{vite-config.js → patch/vite-config.js} +15 -13
  43. package/dist/{connect-steps.d.ts → plan/connect-steps.d.ts} +3 -3
  44. package/dist/{connect-steps.js → plan/connect-steps.js} +4 -4
  45. package/dist/{framework-adapter.d.ts → plan/framework-adapter.d.ts} +11 -2
  46. package/dist/{framework-adapter.js → plan/framework-adapter.js} +12 -1
  47. package/dist/plan/notices.d.ts +23 -0
  48. package/dist/plan/notices.js +94 -0
  49. package/dist/{plan-electron-vite.d.ts → plan/plan-electron-vite.d.ts} +3 -4
  50. package/dist/{plan-electron-vite.js → plan/plan-electron-vite.js} +7 -8
  51. package/dist/{plan-framework.d.ts → plan/plan-framework.d.ts} +4 -13
  52. package/dist/{plan-framework.js → plan/plan-framework.js} +14 -34
  53. package/dist/{plan.d.ts → plan/plan-types.d.ts} +14 -17
  54. package/dist/plan/plan-types.js +24 -0
  55. package/dist/plan/plan.d.ts +20 -0
  56. package/dist/{plan.js → plan/plan.js} +27 -88
  57. package/dist/{agent-rules.d.ts → project/agent-rules.d.ts} +2 -2
  58. package/dist/{agent-rules.js → project/agent-rules.js} +17 -21
  59. package/dist/project/install-source-config.d.ts +14 -0
  60. package/dist/{install-source-config.js → project/install-source-config.js} +3 -7
  61. package/dist/project/remember-project.js +74 -0
  62. package/dist/register/detect-clients.d.ts +23 -0
  63. package/dist/register/detect-clients.js +28 -0
  64. package/dist/{mcp-clients.js → register/mcp-clients.js} +4 -8
  65. package/dist/{mcp-registered.d.ts → register/mcp-registered.d.ts} +1 -4
  66. package/dist/{mcp-registered.js → register/mcp-registered.js} +1 -4
  67. package/dist/{mcp.d.ts → register/mcp.d.ts} +5 -8
  68. package/dist/{mcp.js → register/mcp.js} +6 -9
  69. package/dist/register/slash-command.d.ts +27 -0
  70. package/dist/{slash-command.js → register/slash-command.js} +10 -10
  71. package/dist/register/windows-quote.d.ts +17 -0
  72. package/dist/register/windows-quote.js +49 -0
  73. package/dist/run-types.d.ts +131 -0
  74. package/dist/run-types.js +8 -0
  75. package/dist/run.d.ts +3 -120
  76. package/dist/run.js +111 -56
  77. package/package.json +5 -5
  78. package/dist/install-hint.d.ts +0 -9
  79. package/dist/install-source-config.d.ts +0 -18
  80. package/dist/remember-project.js +0 -40
  81. package/dist/slash-command.d.ts +0 -27
  82. package/dist/windows-quote.d.ts +0 -38
  83. package/dist/windows-quote.js +0 -70
  84. /package/dist/{capabilities.d.ts → detect/capabilities.d.ts} +0 -0
  85. /package/dist/{capabilities.js → detect/capabilities.js} +0 -0
  86. /package/dist/{app-choice.d.ts → detect/declared/app-choice.d.ts} +0 -0
  87. /package/dist/{app-choice.js → detect/declared/app-choice.js} +0 -0
  88. /package/dist/{init-opt-out.d.ts → detect/declared/init-opt-out.d.ts} +0 -0
  89. /package/dist/{init-opt-out.js → detect/declared/init-opt-out.js} +0 -0
  90. /package/dist/{dev-script.d.ts → detect/dev-script.d.ts} +0 -0
  91. /package/dist/{dev-script.js → detect/dev-script.js} +0 -0
  92. /package/dist/{dev-server-ports.d.ts → detect/dev-server-ports.d.ts} +0 -0
  93. /package/dist/{non-js-project.d.ts → detect/non-js-project.d.ts} +0 -0
  94. /package/dist/{non-js-project.js → detect/non-js-project.js} +0 -0
  95. /package/dist/{platform.d.ts → detect/platform.d.ts} +0 -0
  96. /package/dist/{platform.js → detect/platform.js} +0 -0
  97. /package/dist/{csp-doctor.d.ts → diagnose/csp-doctor.d.ts} +0 -0
  98. /package/dist/{csp-doctor.js → diagnose/csp-doctor.js} +0 -0
  99. /package/dist/{desktop-doctor.d.ts → diagnose/desktop-doctor.d.ts} +0 -0
  100. /package/dist/{astro-host.d.ts → patch/astro-host.d.ts} +0 -0
  101. /package/dist/{astro-host.js → patch/astro-host.js} +0 -0
  102. /package/dist/{brace-scan.d.ts → patch/brace-scan.d.ts} +0 -0
  103. /package/dist/{brace-scan.js → patch/brace-scan.js} +0 -0
  104. /package/dist/{cra.d.ts → patch/cra.d.ts} +0 -0
  105. /package/dist/{electron-patch.d.ts → patch/electron-patch.d.ts} +0 -0
  106. /package/dist/{electron-vite-patch.d.ts → patch/electron-vite-patch.d.ts} +0 -0
  107. /package/dist/{electron-vite-patch.js → patch/electron-vite-patch.js} +0 -0
  108. /package/dist/{format-generated.d.ts → patch/format-generated.d.ts} +0 -0
  109. /package/dist/{format-generated.js → patch/format-generated.js} +0 -0
  110. /package/dist/{nuxt-patch.d.ts → patch/nuxt-patch.d.ts} +0 -0
  111. /package/dist/{patch-kind.d.ts → patch/patch-kind.d.ts} +0 -0
  112. /package/dist/{patch-kind.js → patch/patch-kind.js} +0 -0
  113. /package/dist/{vite-config.d.ts → patch/vite-config.d.ts} +0 -0
  114. /package/dist/{vite-owning-config.d.ts → patch/vite-owning-config.d.ts} +0 -0
  115. /package/dist/{vite-owning-config.js → patch/vite-owning-config.js} +0 -0
  116. /package/dist/{preflight.d.ts → plan/preflight.d.ts} +0 -0
  117. /package/dist/{preflight.js → plan/preflight.js} +0 -0
  118. /package/dist/{project-id.d.ts → project/project-id.d.ts} +0 -0
  119. /package/dist/{project-id.js → project/project-id.js} +0 -0
  120. /package/dist/{refresh-rules.d.ts → project/refresh-rules.d.ts} +0 -0
  121. /package/dist/{refresh-rules.js → project/refresh-rules.js} +0 -0
  122. /package/dist/{remember-project.d.ts → project/remember-project.d.ts} +0 -0
  123. /package/dist/{codex-toml.d.ts → register/codex-toml.d.ts} +0 -0
  124. /package/dist/{codex-toml.js → register/codex-toml.js} +0 -0
  125. /package/dist/{mcp-clients.d.ts → register/mcp-clients.d.ts} +0 -0
@@ -1,38 +0,0 @@
1
- /**
2
- * Quote one argument for a Windows command line. Pure, and deliberately NOT platform-gated.
3
- *
4
- * The rule used to live inside a `process.platform === WINDOWS` branch in node-io.ts, which meant
5
- * the Windows path could not be exercised on a mac or in CI's Linux job — so it stayed wrong. A
6
- * pure function is most of the fix: it can be asserted anywhere, and it is.
7
- *
8
- * ## What was wrong
9
- *
10
- * ```ts
11
- * /[\s"]/.test(arg) ? `"${arg.replace(/"/g, '\\"')}"` : arg
12
- * ```
13
- *
14
- * Two independent holes, both reachable from an ordinary directory path:
15
- *
16
- * 1. **Backslashes were not escaped.** `C:\Users\ada\My Projects\` became
17
- * `"C:\Users\ada\My Projects\"`, whose trailing `\"` reads as an ESCAPED quote — the quoted
18
- * region never closes and the rest of the line is re-parsed by cmd.exe. CodeQL flagged this one
19
- * (`js/incomplete-sanitization`, high).
20
- * 2. **The predicate only looked for whitespace and quotes.** An argument like `foo&whoami` has
21
- * neither, so it was handed to cmd.exe completely unquoted. Correct backslash escaping does
22
- * nothing for that; it needs the metacharacters in the trigger.
23
- *
24
- * ## The rule implemented here
25
- *
26
- * `CommandLineToArgvW`: a run of backslashes is literal unless it precedes a `"`, in which case the
27
- * run is doubled and the quote escaped; a run at the very end sits before the closing quote we add,
28
- * so it is doubled too. Correctly-terminated quotes also neutralise cmd.exe's metacharacters, which
29
- * it does not interpret inside a quoted region.
30
- *
31
- * ## Known limit, stated rather than papered over
32
- *
33
- * `%VAR%` is expanded by cmd.exe even inside quotes, and no quoting prevents it — only avoiding
34
- * `shell: true` does, which Windows needs so `pnpm.cmd`/`npx.cmd` resolve (see `shellOpt`). That is
35
- * variable substitution, not command execution, and every caller here passes paths and package
36
- * names rather than user prose.
37
- */
38
- export declare function windowsShellArg(arg: string): string;
@@ -1,70 +0,0 @@
1
- /**
2
- * Quote one argument for a Windows command line. Pure, and deliberately NOT platform-gated.
3
- *
4
- * The rule used to live inside a `process.platform === WINDOWS` branch in node-io.ts, which meant
5
- * the Windows path could not be exercised on a mac or in CI's Linux job — so it stayed wrong. A
6
- * pure function is most of the fix: it can be asserted anywhere, and it is.
7
- *
8
- * ## What was wrong
9
- *
10
- * ```ts
11
- * /[\s"]/.test(arg) ? `"${arg.replace(/"/g, '\\"')}"` : arg
12
- * ```
13
- *
14
- * Two independent holes, both reachable from an ordinary directory path:
15
- *
16
- * 1. **Backslashes were not escaped.** `C:\Users\ada\My Projects\` became
17
- * `"C:\Users\ada\My Projects\"`, whose trailing `\"` reads as an ESCAPED quote — the quoted
18
- * region never closes and the rest of the line is re-parsed by cmd.exe. CodeQL flagged this one
19
- * (`js/incomplete-sanitization`, high).
20
- * 2. **The predicate only looked for whitespace and quotes.** An argument like `foo&whoami` has
21
- * neither, so it was handed to cmd.exe completely unquoted. Correct backslash escaping does
22
- * nothing for that; it needs the metacharacters in the trigger.
23
- *
24
- * ## The rule implemented here
25
- *
26
- * `CommandLineToArgvW`: a run of backslashes is literal unless it precedes a `"`, in which case the
27
- * run is doubled and the quote escaped; a run at the very end sits before the closing quote we add,
28
- * so it is doubled too. Correctly-terminated quotes also neutralise cmd.exe's metacharacters, which
29
- * it does not interpret inside a quoted region.
30
- *
31
- * ## Known limit, stated rather than papered over
32
- *
33
- * `%VAR%` is expanded by cmd.exe even inside quotes, and no quoting prevents it — only avoiding
34
- * `shell: true` does, which Windows needs so `pnpm.cmd`/`npx.cmd` resolve (see `shellOpt`). That is
35
- * variable substitution, not command execution, and every caller here passes paths and package
36
- * names rather than user prose.
37
- */
38
- /**
39
- * Characters that make cmd.exe do something other than pass the text along.
40
- *
41
- * Whitespace and `"` split or delimit; the rest are the shell's control operators. An argument
42
- * containing any of them must be quoted, not just one containing a space.
43
- */
44
- const NEEDS_QUOTING = /[\s"&|<>^()!%,;=]/;
45
- export function windowsShellArg(arg) {
46
- // An empty argument must still occupy a slot in argv. Unquoted it disappears entirely, silently
47
- // shifting every argument after it by one.
48
- if (0 === arg.length)
49
- return '""';
50
- if (!NEEDS_QUOTING.test(arg))
51
- return arg;
52
- let out = '"';
53
- let backslashes = 0;
54
- for (const ch of arg) {
55
- if ('\\' === ch) {
56
- backslashes += 1;
57
- continue;
58
- }
59
- if ('"' === ch) {
60
- // 2n+1 backslashes → n literal backslashes and an escaped quote.
61
- out += '\\'.repeat(2 * backslashes + 1) + '"';
62
- backslashes = 0;
63
- continue;
64
- }
65
- out += '\\'.repeat(backslashes) + ch;
66
- backslashes = 0;
67
- }
68
- // A trailing run sits immediately before the closing quote, so it must be doubled or it escapes it.
69
- return `${out}${'\\'.repeat(2 * backslashes)}"`;
70
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes