bun-workspaces 1.5.1 → 1.5.2

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 (255) hide show
  1. package/bin/cli.js +0 -0
  2. package/package.json +1 -5
  3. package/src/1108.mjs +30 -0
  4. package/src/{cli/commands/commandsConfig.mjs → 2392.mjs} +52 -11
  5. package/src/4427.mjs +9 -0
  6. package/src/5166.mjs +8 -0
  7. package/src/8126.mjs +4 -0
  8. package/src/8257.mjs +4 -0
  9. package/src/{config/util/configLocation.mjs → 8529.mjs} +11 -2
  10. package/src/ai/mcp/bwMcpServer.mjs +213 -9
  11. package/src/ai/mcp/core/index.mjs +3 -1
  12. package/src/ai/mcp/core/server.mjs +1 -3
  13. package/src/ai/mcp/core/transport.mjs +1 -2
  14. package/src/ai/mcp/core/types.mjs +0 -1
  15. package/src/ai/mcp/index.mjs +3 -1
  16. package/src/ai/mcp/resources.mjs +1 -2
  17. package/src/ai/mcp/tools.mjs +1 -5
  18. package/src/cli/commands/commandHandlerUtils.mjs +2 -6
  19. package/src/cli/commands/commands.mjs +1 -4
  20. package/src/cli/commands/handleSimpleCommands.mjs +4 -10
  21. package/src/cli/commands/index.mjs +11 -2
  22. package/src/cli/commands/mcp.mjs +1 -4
  23. package/src/cli/commands/runScript/handleRunScript.mjs +1 -9
  24. package/src/cli/commands/runScript/index.mjs +3 -1
  25. package/src/cli/commands/runScript/output/index.mjs +3 -1
  26. package/src/cli/commands/runScript/output/outputStyle.mjs +1 -3
  27. package/src/cli/commands/runScript/output/renderGroupedOutput.mjs +1 -6
  28. package/src/cli/commands/runScript/output/renderPlainOutput.mjs +1 -2
  29. package/src/cli/commands/runScript/output/sanitizeChunk.mjs +0 -1
  30. package/src/cli/createCli.mjs +2 -12
  31. package/src/cli/fatalErrorLogger.mjs +1 -2
  32. package/src/cli/globalOptions/globalOptions.mjs +2 -9
  33. package/src/cli/globalOptions/index.mjs +3 -2
  34. package/src/cli/index.d.ts +1025 -3
  35. package/src/cli/index.mjs +3 -1
  36. package/src/cli/middleware.mjs +1 -3
  37. package/src/config/index.mjs +3 -1
  38. package/src/config/public.d.ts +93 -10
  39. package/src/config/public.mjs +2 -6
  40. package/src/config/rootConfig/defineRootConfig.mjs +1 -2
  41. package/src/config/rootConfig/errors.mjs +1 -2
  42. package/src/config/rootConfig/index.mjs +2 -1
  43. package/src/config/rootConfig/loadRootConfig.mjs +1 -4
  44. package/src/config/rootConfig/rootConfig.mjs +1 -6
  45. package/src/config/rootConfig/rootConfigSchema.mjs +0 -1
  46. package/src/config/userEnvVars/index.mjs +3 -1
  47. package/src/config/userEnvVars/userEnvVars.mjs +3 -8
  48. package/src/config/util/ajvTypes.mjs +2 -1
  49. package/src/config/util/index.mjs +2 -1
  50. package/src/config/util/loadConfig.mjs +1 -6
  51. package/src/config/util/validateConfig.mjs +0 -1
  52. package/src/config/workspaceConfig/defineWorkspaceConfig.mjs +1 -2
  53. package/src/config/workspaceConfig/errors.mjs +1 -2
  54. package/src/config/workspaceConfig/index.mjs +2 -1
  55. package/src/config/workspaceConfig/loadWorkspaceConfig.mjs +2 -8
  56. package/src/config/workspaceConfig/workspaceConfig.mjs +1 -5
  57. package/src/config/workspaceConfig/workspaceConfigSchema.mjs +0 -1
  58. package/src/doctor/doctor.mjs +1 -5
  59. package/src/doctor/index.mjs +3 -1
  60. package/src/index.d.ts +458 -38
  61. package/src/index.mjs +4 -13
  62. package/src/internal/bun/bunLock.mjs +2 -4
  63. package/src/internal/bun/bunVersion.mjs +1 -3
  64. package/src/internal/bun/index.mjs +3 -1
  65. package/src/internal/bundledDeps/commander.mjs +3843 -0
  66. package/src/internal/bundledDeps/shellQuote.mjs +291 -0
  67. package/src/internal/core/error/error.mjs +0 -1
  68. package/src/internal/core/error/index.mjs +3 -1
  69. package/src/internal/core/index.mjs +3 -1
  70. package/src/internal/core/json/index.mjs +3 -1
  71. package/src/internal/core/json/json.mjs +3 -5
  72. package/src/internal/core/json/jsonc.mjs +0 -1
  73. package/src/internal/core/language/array/index.mjs +3 -1
  74. package/src/internal/core/language/array/optionalArray.mjs +0 -1
  75. package/src/internal/core/language/asyncIterable/asyncIterableQueue.mjs +0 -1
  76. package/src/internal/core/language/asyncIterable/index.mjs +3 -1
  77. package/src/internal/core/language/asyncIterable/mergeAsyncIterables.mjs +0 -1
  78. package/src/internal/core/language/events/typedEventTarget.mjs +0 -1
  79. package/src/internal/core/language/index.mjs +3 -1
  80. package/src/internal/core/language/regex/index.mjs +3 -1
  81. package/src/internal/core/language/regex/regex.mjs +0 -1
  82. package/src/internal/core/language/string/id.mjs +0 -1
  83. package/src/internal/core/language/string/index.mjs +3 -1
  84. package/src/internal/core/language/string/utf/eastAsianWidth.mjs +0 -1
  85. package/src/internal/core/language/string/utf/visibleLength.mjs +1 -2
  86. package/src/internal/core/language/types/index.mjs +3 -1
  87. package/src/internal/core/language/types/typeof.mjs +1 -3
  88. package/src/internal/core/language/types/types.mjs +3 -2
  89. package/src/internal/core/runtime/env.mjs +0 -1
  90. package/src/internal/core/runtime/index.mjs +3 -1
  91. package/src/internal/core/runtime/onExit.mjs +1 -2
  92. package/src/internal/core/runtime/os.mjs +1 -3
  93. package/src/internal/core/runtime/tempFile.mjs +1 -9
  94. package/src/internal/core/runtime/terminal.mjs +0 -1
  95. package/src/internal/generated/aiDocs/.gitkeep.mjs +1 -0
  96. package/src/internal/generated/aiDocs/docs.mjs +0 -1
  97. package/src/internal/logger/index.mjs +3 -1
  98. package/src/internal/logger/logger.mjs +4 -14
  99. package/src/internal/version.mjs +1 -2
  100. package/src/project/errors.mjs +1 -2
  101. package/src/project/implementations/fileSystemProject.mjs +3 -18
  102. package/src/project/implementations/memoryProject.mjs +1 -5
  103. package/src/project/implementations/projectBase.mjs +10 -19
  104. package/src/project/index.mjs +3 -1
  105. package/src/project/project.mjs +2 -1
  106. package/src/rslib-runtime.mjs +62 -0
  107. package/src/runScript/index.mjs +3 -1
  108. package/src/runScript/output/index.mjs +3 -1
  109. package/src/runScript/output/multiProcessOutput.mjs +1 -2
  110. package/src/runScript/output/outputStream.mjs +1 -1
  111. package/src/runScript/output/processOutput.mjs +1 -2
  112. package/src/runScript/parallel.mjs +4 -10
  113. package/src/runScript/recursion.mjs +1 -2
  114. package/src/runScript/runScript.mjs +1 -4
  115. package/src/runScript/runScripts.mjs +1 -6
  116. package/src/runScript/scriptCommand.mjs +1 -2
  117. package/src/runScript/scriptExecution.mjs +1 -3
  118. package/src/runScript/scriptRuntimeMetadata.mjs +38 -56
  119. package/src/runScript/scriptShellOption.mjs +5 -14
  120. package/src/runScript/subprocesses.mjs +1 -3
  121. package/src/workspaces/dependencyGraph/cycles.mjs +0 -1
  122. package/src/workspaces/dependencyGraph/index.mjs +3 -1
  123. package/src/workspaces/dependencyGraph/resolveDependencies.mjs +1 -2
  124. package/src/workspaces/dependencyGraph/validateDependencyRules.mjs +1 -3
  125. package/src/workspaces/errors.mjs +1 -2
  126. package/src/workspaces/findWorkspaces.mjs +1 -11
  127. package/src/workspaces/index.mjs +3 -1
  128. package/src/workspaces/packageJson.mjs +2 -7
  129. package/src/workspaces/workspace.mjs +2 -1
  130. package/src/workspaces/workspacePattern.mjs +4 -4
  131. package/src/ai/mcp/bwMcpServer.d.ts +0 -4
  132. package/src/ai/mcp/core/index.d.ts +0 -3
  133. package/src/ai/mcp/core/server.d.ts +0 -14
  134. package/src/ai/mcp/core/transport.d.ts +0 -12
  135. package/src/ai/mcp/core/types.d.ts +0 -104
  136. package/src/ai/mcp/index.d.ts +0 -2
  137. package/src/ai/mcp/resources.d.ts +0 -6
  138. package/src/ai/mcp/tools.d.ts +0 -6
  139. package/src/cli/commands/commandHandlerUtils.d.ts +0 -51
  140. package/src/cli/commands/commands.d.ts +0 -10
  141. package/src/cli/commands/commandsConfig.d.ts +0 -436
  142. package/src/cli/commands/handleSimpleCommands.d.ts +0 -21
  143. package/src/cli/commands/index.d.ts +0 -4
  144. package/src/cli/commands/mcp.d.ts +0 -3
  145. package/src/cli/commands/runScript/handleRunScript.d.ts +0 -3
  146. package/src/cli/commands/runScript/index.d.ts +0 -2
  147. package/src/cli/commands/runScript/output/index.d.ts +0 -1
  148. package/src/cli/commands/runScript/output/outputStyle.d.ts +0 -9
  149. package/src/cli/commands/runScript/output/renderGroupedOutput.d.ts +0 -75
  150. package/src/cli/commands/runScript/output/renderPlainOutput.d.ts +0 -24
  151. package/src/cli/commands/runScript/output/sanitizeChunk.d.ts +0 -4
  152. package/src/cli/createCli.d.ts +0 -26
  153. package/src/cli/fatalErrorLogger.d.ts +0 -1
  154. package/src/cli/globalOptions/globalOptions.d.ts +0 -43
  155. package/src/cli/globalOptions/globalOptionsConfig.d.ts +0 -52
  156. package/src/cli/globalOptions/globalOptionsConfig.mjs +0 -43
  157. package/src/cli/globalOptions/index.d.ts +0 -2
  158. package/src/cli/middleware.d.ts +0 -83
  159. package/src/config/index.d.ts +0 -3
  160. package/src/config/rootConfig/defineRootConfig.d.ts +0 -4
  161. package/src/config/rootConfig/errors.d.ts +0 -1
  162. package/src/config/rootConfig/index.d.ts +0 -5
  163. package/src/config/rootConfig/loadRootConfig.d.ts +0 -3
  164. package/src/config/rootConfig/rootConfig.d.ts +0 -25
  165. package/src/config/rootConfig/rootConfigLocation.d.ts +0 -2
  166. package/src/config/rootConfig/rootConfigLocation.mjs +0 -5
  167. package/src/config/rootConfig/rootConfigSchema.d.ts +0 -21
  168. package/src/config/userEnvVars/index.d.ts +0 -1
  169. package/src/config/userEnvVars/userEnvVars.d.ts +0 -13
  170. package/src/config/util/ajvTypes.d.ts +0 -10
  171. package/src/config/util/configLocation.d.ts +0 -18
  172. package/src/config/util/index.d.ts +0 -4
  173. package/src/config/util/loadConfig.d.ts +0 -18
  174. package/src/config/util/validateConfig.d.ts +0 -8
  175. package/src/config/workspaceConfig/defineWorkspaceConfig.d.ts +0 -7
  176. package/src/config/workspaceConfig/errors.d.ts +0 -1
  177. package/src/config/workspaceConfig/index.d.ts +0 -5
  178. package/src/config/workspaceConfig/loadWorkspaceConfig.d.ts +0 -3
  179. package/src/config/workspaceConfig/workspaceConfig.d.ts +0 -56
  180. package/src/config/workspaceConfig/workspaceConfigLocation.d.ts +0 -2
  181. package/src/config/workspaceConfig/workspaceConfigLocation.mjs +0 -5
  182. package/src/config/workspaceConfig/workspaceConfigSchema.d.ts +0 -56
  183. package/src/doctor/doctor.d.ts +0 -35
  184. package/src/doctor/index.d.ts +0 -1
  185. package/src/internal/bun/bunLock.d.ts +0 -20
  186. package/src/internal/bun/bunVersion.d.ts +0 -21
  187. package/src/internal/bun/index.d.ts +0 -2
  188. package/src/internal/core/error/error.d.ts +0 -13
  189. package/src/internal/core/error/index.d.ts +0 -1
  190. package/src/internal/core/index.d.ts +0 -4
  191. package/src/internal/core/json/index.d.ts +0 -2
  192. package/src/internal/core/json/json.d.ts +0 -49
  193. package/src/internal/core/json/jsonc.d.ts +0 -9
  194. package/src/internal/core/language/array/index.d.ts +0 -1
  195. package/src/internal/core/language/array/optionalArray.d.ts +0 -15
  196. package/src/internal/core/language/asyncIterable/asyncIterableQueue.d.ts +0 -16
  197. package/src/internal/core/language/asyncIterable/index.d.ts +0 -2
  198. package/src/internal/core/language/asyncIterable/mergeAsyncIterables.d.ts +0 -5
  199. package/src/internal/core/language/events/typedEventTarget.d.ts +0 -50
  200. package/src/internal/core/language/index.d.ts +0 -5
  201. package/src/internal/core/language/regex/index.d.ts +0 -1
  202. package/src/internal/core/language/regex/regex.d.ts +0 -3
  203. package/src/internal/core/language/string/id.d.ts +0 -1
  204. package/src/internal/core/language/string/index.d.ts +0 -1
  205. package/src/internal/core/language/string/utf/eastAsianWidth.d.ts +0 -16
  206. package/src/internal/core/language/string/utf/visibleLength.d.ts +0 -5
  207. package/src/internal/core/language/types/index.d.ts +0 -2
  208. package/src/internal/core/language/types/typeof.d.ts +0 -102
  209. package/src/internal/core/language/types/types.d.ts +0 -19
  210. package/src/internal/core/runtime/env.d.ts +0 -6
  211. package/src/internal/core/runtime/index.d.ts +0 -5
  212. package/src/internal/core/runtime/onExit.d.ts +0 -4
  213. package/src/internal/core/runtime/os.d.ts +0 -6
  214. package/src/internal/core/runtime/tempFile.d.ts +0 -20
  215. package/src/internal/core/runtime/terminal.d.ts +0 -1
  216. package/src/internal/docs/apiQuickstart.d.ts +0 -3
  217. package/src/internal/docs/apiQuickstart.mjs +0 -132
  218. package/src/internal/docs/cliQuickstart.d.ts +0 -2
  219. package/src/internal/docs/cliQuickstart.mjs +0 -86
  220. package/src/internal/docs/index.d.ts +0 -2
  221. package/src/internal/docs/index.mjs +0 -2
  222. package/src/internal/generated/aiDocs/docs.d.ts +0 -10
  223. package/src/internal/logger/index.d.ts +0 -1
  224. package/src/internal/logger/logger.d.ts +0 -45
  225. package/src/internal/version.d.ts +0 -1
  226. package/src/project/errors.d.ts +0 -5
  227. package/src/project/implementations/fileSystemProject.d.ts +0 -148
  228. package/src/project/implementations/memoryProject.d.ts +0 -41
  229. package/src/project/implementations/projectBase.d.ts +0 -37
  230. package/src/project/index.d.ts +0 -5
  231. package/src/project/project.d.ts +0 -79
  232. package/src/runScript/index.d.ts +0 -7
  233. package/src/runScript/output/index.d.ts +0 -3
  234. package/src/runScript/output/multiProcessOutput.d.ts +0 -14
  235. package/src/runScript/output/outputStream.d.ts +0 -1
  236. package/src/runScript/output/processOutput.d.ts +0 -33
  237. package/src/runScript/parallel.d.ts +0 -24
  238. package/src/runScript/recursion.d.ts +0 -4
  239. package/src/runScript/runScript.d.ts +0 -45
  240. package/src/runScript/runScripts.d.ts +0 -65
  241. package/src/runScript/scriptCommand.d.ts +0 -33
  242. package/src/runScript/scriptExecution.d.ts +0 -9
  243. package/src/runScript/scriptRuntimeMetadata.d.ts +0 -73
  244. package/src/runScript/scriptShellOption.d.ts +0 -8
  245. package/src/runScript/subprocesses.d.ts +0 -11
  246. package/src/workspaces/dependencyGraph/cycles.d.ts +0 -9
  247. package/src/workspaces/dependencyGraph/index.d.ts +0 -3
  248. package/src/workspaces/dependencyGraph/resolveDependencies.d.ts +0 -18
  249. package/src/workspaces/dependencyGraph/validateDependencyRules.d.ts +0 -7
  250. package/src/workspaces/errors.d.ts +0 -14
  251. package/src/workspaces/findWorkspaces.d.ts +0 -24
  252. package/src/workspaces/index.d.ts +0 -4
  253. package/src/workspaces/packageJson.d.ts +0 -31
  254. package/src/workspaces/workspace.d.ts +0 -21
  255. package/src/workspaces/workspacePattern.d.ts +0 -22
@@ -0,0 +1,291 @@
1
+ import { __webpack_require__ } from "../../rslib-runtime.mjs";
2
+
3
+ __webpack_require__.add({
4
+ "../../../node_modules/.bun/shell-quote@1.8.3/node_modules/shell-quote/index.js"(
5
+ __unused_rspack_module,
6
+ exports,
7
+ __webpack_require__,
8
+ ) {
9
+ exports.h = __webpack_require__(
10
+ "../../../node_modules/.bun/shell-quote@1.8.3/node_modules/shell-quote/quote.js",
11
+ );
12
+ exports.q = __webpack_require__(
13
+ "../../../node_modules/.bun/shell-quote@1.8.3/node_modules/shell-quote/parse.js",
14
+ );
15
+ },
16
+ "../../../node_modules/.bun/shell-quote@1.8.3/node_modules/shell-quote/parse.js"(
17
+ module,
18
+ ) {
19
+ // '<(' is process substitution operator and
20
+ // can be parsed the same as control operator
21
+ var CONTROL =
22
+ "(?:" +
23
+ [
24
+ "\\|\\|",
25
+ "\\&\\&",
26
+ ";;",
27
+ "\\|\\&",
28
+ "\\<\\(",
29
+ "\\<\\<\\<",
30
+ ">>",
31
+ ">\\&",
32
+ "<\\&",
33
+ "[&;()|<>]",
34
+ ].join("|") +
35
+ ")";
36
+ var controlRE = new RegExp("^" + CONTROL + "$");
37
+ var META = "|&;()<> \\t";
38
+ var SINGLE_QUOTE = '"((\\\\"|[^"])*?)"';
39
+ var DOUBLE_QUOTE = "'((\\\\'|[^'])*?)'";
40
+ var hash = /^#$/;
41
+
42
+ var SQ = "'";
43
+ var DQ = '"';
44
+ var DS = "$";
45
+
46
+ var TOKEN = "";
47
+ var mult = 0x100000000; // Math.pow(16, 8);
48
+ for (var i = 0; i < 4; i++) {
49
+ TOKEN += (mult * Math.random()).toString(16);
50
+ }
51
+ var startsWithToken = new RegExp("^" + TOKEN);
52
+
53
+ function matchAll(s, r) {
54
+ var origIndex = r.lastIndex;
55
+
56
+ var matches = [];
57
+ var matchObj;
58
+
59
+ while ((matchObj = r.exec(s))) {
60
+ matches.push(matchObj);
61
+ if (r.lastIndex === matchObj.index) {
62
+ r.lastIndex += 1;
63
+ }
64
+ }
65
+
66
+ r.lastIndex = origIndex;
67
+
68
+ return matches;
69
+ }
70
+
71
+ function getVar(env, pre, key) {
72
+ var r = typeof env === "function" ? env(key) : env[key];
73
+ if (typeof r === "undefined" && key != "") {
74
+ r = "";
75
+ } else if (typeof r === "undefined") {
76
+ r = "$";
77
+ }
78
+
79
+ if (typeof r === "object") {
80
+ return pre + TOKEN + JSON.stringify(r) + TOKEN;
81
+ }
82
+ return pre + r;
83
+ }
84
+
85
+ function parseInternal(string, env, opts) {
86
+ if (!opts) {
87
+ opts = {};
88
+ }
89
+ var BS = opts.escape || "\\";
90
+ var BAREWORD = "(\\" + BS + "['\"" + META + "]|[^\\s'\"" + META + "])+";
91
+
92
+ var chunker = new RegExp(
93
+ [
94
+ "(" + CONTROL + ")", // control chars
95
+ "(" + BAREWORD + "|" + SINGLE_QUOTE + "|" + DOUBLE_QUOTE + ")+",
96
+ ].join("|"),
97
+ "g",
98
+ );
99
+
100
+ var matches = matchAll(string, chunker);
101
+
102
+ if (matches.length === 0) {
103
+ return [];
104
+ }
105
+ if (!env) {
106
+ env = {};
107
+ }
108
+
109
+ var commented = false;
110
+
111
+ return matches
112
+ .map(function (match) {
113
+ var s = match[0];
114
+ if (!s || commented) {
115
+ return void undefined;
116
+ }
117
+ if (controlRE.test(s)) {
118
+ return { op: s };
119
+ }
120
+
121
+ // Hand-written scanner/parser for Bash quoting rules:
122
+ //
123
+ // 1. inside single quotes, all characters are printed literally.
124
+ // 2. inside double quotes, all characters are printed literally
125
+ // except variables prefixed by '$' and backslashes followed by
126
+ // either a double quote or another backslash.
127
+ // 3. outside of any quotes, backslashes are treated as escape
128
+ // characters and not printed (unless they are themselves escaped)
129
+ // 4. quote context can switch mid-token if there is no whitespace
130
+ // between the two quote contexts (e.g. all'one'"token" parses as
131
+ // "allonetoken")
132
+ var quote = false;
133
+ var esc = false;
134
+ var out = "";
135
+ var isGlob = false;
136
+ var i;
137
+
138
+ function parseEnvVar() {
139
+ i += 1;
140
+ var varend;
141
+ var varname;
142
+ var char = s.charAt(i);
143
+
144
+ if (char === "{") {
145
+ i += 1;
146
+ if (s.charAt(i) === "}") {
147
+ throw new Error("Bad substitution: " + s.slice(i - 2, i + 1));
148
+ }
149
+ varend = s.indexOf("}", i);
150
+ if (varend < 0) {
151
+ throw new Error("Bad substitution: " + s.slice(i));
152
+ }
153
+ varname = s.slice(i, varend);
154
+ i = varend;
155
+ } else if (/[*@#?$!_-]/.test(char)) {
156
+ varname = char;
157
+ i += 1;
158
+ } else {
159
+ var slicedFromI = s.slice(i);
160
+ varend = slicedFromI.match(/[^\w\d_]/);
161
+ if (!varend) {
162
+ varname = slicedFromI;
163
+ i = s.length;
164
+ } else {
165
+ varname = slicedFromI.slice(0, varend.index);
166
+ i += varend.index - 1;
167
+ }
168
+ }
169
+ return getVar(env, "", varname);
170
+ }
171
+
172
+ for (i = 0; i < s.length; i++) {
173
+ var c = s.charAt(i);
174
+ isGlob = isGlob || (!quote && (c === "*" || c === "?"));
175
+ if (esc) {
176
+ out += c;
177
+ esc = false;
178
+ } else if (quote) {
179
+ if (c === quote) {
180
+ quote = false;
181
+ } else if (quote == SQ) {
182
+ out += c;
183
+ } else {
184
+ // Double quote
185
+ if (c === BS) {
186
+ i += 1;
187
+ c = s.charAt(i);
188
+ if (c === DQ || c === BS || c === DS) {
189
+ out += c;
190
+ } else {
191
+ out += BS + c;
192
+ }
193
+ } else if (c === DS) {
194
+ out += parseEnvVar();
195
+ } else {
196
+ out += c;
197
+ }
198
+ }
199
+ } else if (c === DQ || c === SQ) {
200
+ quote = c;
201
+ } else if (controlRE.test(c)) {
202
+ return { op: s };
203
+ } else if (hash.test(c)) {
204
+ commented = true;
205
+ var commentObj = { comment: string.slice(match.index + i + 1) };
206
+ if (out.length) {
207
+ return [out, commentObj];
208
+ }
209
+ return [commentObj];
210
+ } else if (c === BS) {
211
+ esc = true;
212
+ } else if (c === DS) {
213
+ out += parseEnvVar();
214
+ } else {
215
+ out += c;
216
+ }
217
+ }
218
+
219
+ if (isGlob) {
220
+ return { op: "glob", pattern: out };
221
+ }
222
+
223
+ return out;
224
+ })
225
+ .reduce(function (prev, arg) {
226
+ // finalize parsed arguments
227
+ // TODO: replace this whole reduce with a concat
228
+ return typeof arg === "undefined" ? prev : prev.concat(arg);
229
+ }, []);
230
+ }
231
+
232
+ module.exports = function parse(s, env, opts) {
233
+ var mapped = parseInternal(s, env, opts);
234
+ if (typeof env !== "function") {
235
+ return mapped;
236
+ }
237
+ return mapped.reduce(function (acc, s) {
238
+ if (typeof s === "object") {
239
+ return acc.concat(s);
240
+ }
241
+ var xs = s.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
242
+ if (xs.length === 1) {
243
+ return acc.concat(xs[0]);
244
+ }
245
+ return acc.concat(
246
+ xs.filter(Boolean).map(function (x) {
247
+ if (startsWithToken.test(x)) {
248
+ return JSON.parse(x.split(TOKEN)[1]);
249
+ }
250
+ return x;
251
+ }),
252
+ );
253
+ }, []);
254
+ };
255
+ },
256
+ "../../../node_modules/.bun/shell-quote@1.8.3/node_modules/shell-quote/quote.js"(
257
+ module,
258
+ ) {
259
+ module.exports = function quote(xs) {
260
+ return xs
261
+ .map(function (s) {
262
+ if (s === "") {
263
+ return "''";
264
+ }
265
+ if (s && typeof s === "object") {
266
+ return s.op.replace(/(.)/g, "\\$1");
267
+ }
268
+ if (/["\s\\]/.test(s) && !/'/.test(s)) {
269
+ return "'" + s.replace(/(['])/g, "\\$1") + "'";
270
+ }
271
+ if (/["'\s]/.test(s)) {
272
+ return '"' + s.replace(/(["\\$`!])/g, "\\$1") + '"';
273
+ }
274
+ return String(s).replace(
275
+ /([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g,
276
+ "$1\\$2",
277
+ );
278
+ })
279
+ .join(" ");
280
+ };
281
+ },
282
+ });
283
+ // This module is bundled with the build and is re-exported for organization, to provide clearer debugging paths
284
+
285
+ const shell_quote = __webpack_require__(
286
+ "../../../node_modules/.bun/shell-quote@1.8.3/node_modules/shell-quote/index.js",
287
+ );
288
+ var q = shell_quote.q;
289
+ var h = shell_quote.h;
290
+
291
+ export { h as quote, q as parse };
@@ -1,4 +1,3 @@
1
- // CONCATENATED MODULE: ./src/internal/core/error/error.ts
2
1
  class BunWorkspacesError extends Error {
3
2
  name = "BunWorkspacesError";
4
3
  }
@@ -1 +1,3 @@
1
- export * from "./error.mjs"; // CONCATENATED MODULE: ./src/internal/core/error/index.ts
1
+ export * from "./error.mjs";
2
+
3
+ export {};
@@ -1,4 +1,6 @@
1
1
  export * from "./language/index.mjs";
2
2
  export * from "./error/index.mjs";
3
3
  export * from "./json/index.mjs";
4
- export * from "./runtime/index.mjs"; // CONCATENATED MODULE: ./src/internal/core/index.ts
4
+ export * from "./runtime/index.mjs";
5
+
6
+ export {};
@@ -1,2 +1,4 @@
1
1
  export * from "./json.mjs";
2
- export * from "./jsonc.mjs"; // CONCATENATED MODULE: ./src/internal/core/json/index.ts
2
+ export * from "./jsonc.mjs";
3
+
4
+ export {};
@@ -1,12 +1,10 @@
1
- import { isTypeof } from "../language/index.mjs"; // CONCATENATED MODULE: external "../language/index.mjs"
2
- // CONCATENATED MODULE: ./src/internal/core/json/json.ts
1
+ import { isTypeof } from "../language/index.mjs";
2
+ import { isJSONObject } from "../../../8257.mjs";
3
3
 
4
4
  const isJSONPrimitive = (value) =>
5
5
  isTypeof(value, "string", "number", "boolean") || value === null;
6
6
  const isJSONArray = (value) => Array.isArray(value) && value.every(isJSON);
7
- const isJSONObject = (value) =>
8
- typeof value === "object" && value !== null && value?.constructor === Object;
9
7
  const isJSON = (value) =>
10
8
  isJSONPrimitive(value) || isJSONArray(value) || isJSONObject(value);
11
9
 
12
- export { isJSON, isJSONArray, isJSONObject, isJSONPrimitive };
10
+ export { isJSON, isJSONArray, isJSONPrimitive };
@@ -1,4 +1,3 @@
1
- // CONCATENATED MODULE: ./src/internal/core/json/jsonc.ts
2
1
  // Code based on package strip-json-comments
3
2
  const stripWithoutWhitespace = () => "";
4
3
  // Replace all characters except ASCII spaces, tabs and line endings with regular spaces to ensure valid JSON output.
@@ -1 +1,3 @@
1
- export * from "./optionalArray.mjs"; // CONCATENATED MODULE: ./src/internal/core/language/array/index.ts
1
+ export * from "./optionalArray.mjs";
2
+
3
+ export {};
@@ -1,4 +1,3 @@
1
- // CONCATENATED MODULE: ./src/internal/core/language/array/optionalArray.ts
2
1
  /**
3
2
  * A value that may be its type T or an array of T.
4
3
  */ /** Resolve `OptionalArray<T>` to `T[]` */ const resolveOptionalArray = (
@@ -1,4 +1,3 @@
1
- // CONCATENATED MODULE: ./src/internal/core/language/asyncIterable/asyncIterableQueue.ts
2
1
  const createAsyncIterableQueue = () => {
3
2
  let resolveClose = () => {
4
3
  void 0;
@@ -1,2 +1,4 @@
1
1
  export * from "./asyncIterableQueue.mjs";
2
- export * from "./mergeAsyncIterables.mjs"; // CONCATENATED MODULE: ./src/internal/core/language/asyncIterable/index.ts
2
+ export * from "./mergeAsyncIterables.mjs";
3
+
4
+ export {};
@@ -1,4 +1,3 @@
1
- // CONCATENATED MODULE: ./src/internal/core/language/asyncIterable/mergeAsyncIterables.ts
2
1
  /** Run multiple async iterables in parallel and yield the results in the order they are completed. */ const mergeAsyncIterables =
3
2
  (iterables) => ({
4
3
  async *[Symbol.asyncIterator]() {
@@ -1,4 +1,3 @@
1
- // CONCATENATED MODULE: ./src/internal/core/language/events/typedEventTarget.ts
2
1
  const TypedEvent = Event;
3
2
  const createTypedEventFactory = (type) => (properties, options) => {
4
3
  const event = new TypedEvent(type, options);
@@ -2,4 +2,6 @@ export * from "./asyncIterable/index.mjs";
2
2
  export * from "./array/index.mjs";
3
3
  export * from "./types/index.mjs";
4
4
  export * from "./regex/index.mjs";
5
- export * from "./string/index.mjs"; // CONCATENATED MODULE: ./src/internal/core/language/index.ts
5
+ export * from "./string/index.mjs";
6
+
7
+ export {};
@@ -1 +1,3 @@
1
- export * from "./regex.mjs"; // CONCATENATED MODULE: ./src/internal/core/language/regex/index.ts
1
+ export * from "./regex.mjs";
2
+
3
+ export {};
@@ -1,4 +1,3 @@
1
- // CONCATENATED MODULE: ./src/internal/core/language/regex/regex.ts
2
1
  const createRawPattern = (pattern) =>
3
2
  pattern.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
4
3
  const createWildcardRegex = (pattern) =>
@@ -1,4 +1,3 @@
1
- // CONCATENATED MODULE: ./src/internal/core/language/string/id.ts
2
1
  const createShortId = (bytes = 12) => {
3
2
  const buf = new Uint8Array(bytes);
4
3
  crypto.getRandomValues(buf);
@@ -1 +1,3 @@
1
- export * from "./id.mjs"; // CONCATENATED MODULE: ./src/internal/core/language/string/index.ts
1
+ export * from "./id.mjs";
2
+
3
+ export {};
@@ -1,4 +1,3 @@
1
- // CONCATENATED MODULE: ./src/internal/core/language/string/utf/eastAsianWidth.ts
2
1
  /** A port of the package eastasianwidth */ const eaw = {
3
2
  /**
4
3
  * F: Full width
@@ -1,5 +1,4 @@
1
- import { eaw } from "./eastAsianWidth.mjs"; // CONCATENATED MODULE: external "./eastAsianWidth.mjs"
2
- // CONCATENATED MODULE: ./src/internal/core/language/string/utf/visibleLength.ts
1
+ import { eaw } from "./eastAsianWidth.mjs";
3
2
 
4
3
  const getVisibleSliceIndex = (str, maxVisible) => {
5
4
  let i = 0;
@@ -1 +1,3 @@
1
- export * from "./typeof.mjs"; // CONCATENATED MODULE: ./src/internal/core/language/types/index.ts
1
+ export * from "./typeof.mjs";
2
+
3
+ export {};
@@ -1,7 +1,5 @@
1
1
  import { defineErrors } from "../../error/index.mjs";
2
- import { resolveOptionalArray } from "../array/optionalArray.mjs"; // CONCATENATED MODULE: external "../../error/index.mjs"
3
- // CONCATENATED MODULE: external "../array/optionalArray.mjs"
4
- // CONCATENATED MODULE: ./src/internal/core/language/types/typeof.ts
2
+ import { resolveOptionalArray } from "../array/optionalArray.mjs";
5
3
 
6
4
  const InvalidJSTypeError = defineErrors("InvalidJSType").InvalidJSType;
7
5
  const InvalidJSNumberError = defineErrors("InvalidJSNumber").InvalidJSNumber;
@@ -1,2 +1,3 @@
1
- // CONCATENATED MODULE: ./src/internal/core/language/types/types.ts
2
- /** Does not change an object type, but remaps it for cleaner Intellisense only */
1
+ /** Does not change an object type, but remaps it for cleaner Intellisense only */ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2
+
3
+ export {};
@@ -1,4 +1,3 @@
1
- // CONCATENATED MODULE: ./src/internal/core/runtime/env.ts
2
1
  /* eslint-disable no-console */ const _process =
3
2
  typeof process === "undefined"
4
3
  ? {
@@ -2,4 +2,6 @@ export * from "./env.mjs";
2
2
  export * from "./os.mjs";
3
3
  export * from "./onExit.mjs";
4
4
  export * from "./tempFile.mjs";
5
- export * from "./terminal.mjs"; // CONCATENATED MODULE: ./src/internal/core/runtime/index.ts
5
+ export * from "./terminal.mjs";
6
+
7
+ export {};
@@ -1,5 +1,4 @@
1
- import { logger } from "../../logger/index.mjs"; // CONCATENATED MODULE: external "../../logger/index.mjs"
2
- // CONCATENATED MODULE: ./src/internal/core/runtime/onExit.ts
1
+ import { logger } from "../../logger/index.mjs";
3
2
 
4
3
  let handlers = [];
5
4
  let listenersRegistered = false;
@@ -1,7 +1,5 @@
1
1
  import os from "os";
2
- import path from "path"; // CONCATENATED MODULE: external "os"
3
- // CONCATENATED MODULE: external "path"
4
- // CONCATENATED MODULE: ./src/internal/core/runtime/os.ts
2
+ import path from "path";
5
3
 
6
4
  const IS_WINDOWS = process.platform === "win32";
7
5
  const IS_MACOS = process.platform === "darwin";
@@ -5,15 +5,7 @@ import { validateCurrentBunVersion } from "../../bun/bunVersion.mjs";
5
5
  import { logger } from "../../logger/index.mjs";
6
6
  import { BUN_WORKSPACES_VERSION } from "../../version.mjs";
7
7
  import { createShortId } from "../language/string/id.mjs";
8
- import { runOnExit } from "./onExit.mjs"; // CONCATENATED MODULE: external "fs"
9
- // CONCATENATED MODULE: external "os"
10
- // CONCATENATED MODULE: external "path"
11
- // CONCATENATED MODULE: external "../../bun/bunVersion.mjs"
12
- // CONCATENATED MODULE: external "../../logger/index.mjs"
13
- // CONCATENATED MODULE: external "../../version.mjs"
14
- // CONCATENATED MODULE: external "../language/string/id.mjs"
15
- // CONCATENATED MODULE: external "./onExit.mjs"
16
- // CONCATENATED MODULE: ./src/internal/core/runtime/tempFile.ts
8
+ import { runOnExit } from "./onExit.mjs";
17
9
 
18
10
  const getTempBasePackageDir = () => path.join(os.tmpdir(), "bun-workspaces");
19
11
  const getTempParentDir = () =>
@@ -1,4 +1,3 @@
1
- // CONCATENATED MODULE: ./src/internal/core/runtime/terminal.ts
2
1
  const IS_TTY = !!process.stdout?.isTTY;
3
2
 
4
3
  export { IS_TTY };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,3 @@
1
- // CONCATENATED MODULE: ./src/internal/generated/aiDocs/docs.ts
2
1
  // This file is generated by scripts/generateMcpDocs.ts. Do not edit manually.
3
2
  const DOC_OVERVIEW = `## Project Overview
4
3
 
@@ -1 +1,3 @@
1
- export * from "./logger.mjs"; // CONCATENATED MODULE: ./src/internal/logger/index.ts
1
+ export * from "./logger.mjs";
2
+
3
+ export {};
@@ -1,10 +1,7 @@
1
1
  import { defineErrors } from "../core/error/index.mjs";
2
- import { IS_TEST } from "../core/runtime/env.mjs"; // CONCATENATED MODULE: external "../core/error/index.mjs"
3
- // CONCATENATED MODULE: external "../core/runtime/env.mjs"
4
- // CONCATENATED MODULE: ./src/internal/logger/logger.ts
2
+ import { IS_TEST } from "../core/runtime/env.mjs";
3
+ import { LOG_LEVELS, getLogLevelNumber } from "../../8126.mjs";
5
4
 
6
- const LOG_LEVELS = ["debug", "info", "warn", "error"];
7
- const getLevelNumber = (level) => LOG_LEVELS.indexOf(level);
8
5
  const LOGGER_ERRORS = defineErrors("InvalidLogLevel");
9
6
  const validateLogLevel = (level) => {
10
7
  if (level === "silent") return;
@@ -106,7 +103,7 @@ class _Logger {
106
103
  _printLevel = IS_TEST ? "error" : "info";
107
104
  shouldPrint(level) {
108
105
  if (this.printLevel === "silent") return false;
109
- return getLevelNumber(level) >= getLevelNumber(this.printLevel);
106
+ return getLogLevelNumber(level) >= getLogLevelNumber(this.printLevel);
110
107
  }
111
108
  _printStdout = (...args) => process.stdout.write(...args);
112
109
  _printStderr = (...args) => process.stderr.write(...args);
@@ -123,11 +120,4 @@ const logger = createLogger("bun-workspaces");
123
120
  logger.printLevel = level;
124
121
  };
125
122
 
126
- export {
127
- LOGGER_ERRORS,
128
- LOG_LEVELS,
129
- createLogger,
130
- logger,
131
- setLogLevel,
132
- validateLogLevel,
133
- };
123
+ export { LOGGER_ERRORS, createLogger, logger, setLogLevel, validateLogLevel };
@@ -1,5 +1,4 @@
1
- import package_0 from "../../package.json"; // CONCATENATED MODULE: external "../../package.json"
2
- // CONCATENATED MODULE: ./src/internal/version.ts
1
+ import package_0 from "../../package.json";
3
2
 
4
3
  const BUN_WORKSPACES_VERSION = package_0.version;
5
4
 
@@ -1,5 +1,4 @@
1
- import { defineErrors } from "../internal/core/index.mjs"; // CONCATENATED MODULE: external "../internal/core/index.mjs"
2
- // CONCATENATED MODULE: ./src/project/errors.ts
1
+ import { defineErrors } from "../internal/core/index.mjs";
3
2
 
4
3
  const PROJECT_ERRORS = defineErrors(
5
4
  "ProjectWorkspaceNotFound",
@@ -1,8 +1,8 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
- import { parse, quote } from "shell-quote/";
4
3
  import { loadRootConfig } from "../../config/index.mjs";
5
4
  import { getUserEnvVar } from "../../config/userEnvVars/index.mjs";
5
+ import { parse, quote } from "../../internal/bundledDeps/shellQuote.mjs";
6
6
  import {
7
7
  DEFAULT_TEMP_DIR,
8
8
  IS_WINDOWS,
@@ -26,24 +26,9 @@ import { preventDependencyCycles } from "../../workspaces/dependencyGraph/index.
26
26
  import { PROJECT_ERRORS } from "../errors.mjs";
27
27
  import {
28
28
  ProjectBase,
29
- ROOT_WORKSPACE_SELECTOR,
30
29
  resolveRootWorkspaceSelector,
31
30
  resolveWorkspacePath,
32
- } from "./projectBase.mjs"; // CONCATENATED MODULE: external "fs"
33
- // CONCATENATED MODULE: external "path"
34
- // CONCATENATED MODULE: external "shell-quote/"
35
- // CONCATENATED MODULE: external "../../config/index.mjs"
36
- // CONCATENATED MODULE: external "../../config/userEnvVars/index.mjs"
37
- // CONCATENATED MODULE: external "../../internal/core/index.mjs"
38
- // CONCATENATED MODULE: external "../../internal/logger/index.mjs"
39
- // CONCATENATED MODULE: external "../../runScript/index.mjs"
40
- // CONCATENATED MODULE: external "../../runScript/recursion.mjs"
41
- // CONCATENATED MODULE: external "../../runScript/scriptShellOption.mjs"
42
- // CONCATENATED MODULE: external "../../workspaces/index.mjs"
43
- // CONCATENATED MODULE: external "../../workspaces/dependencyGraph/index.mjs"
44
- // CONCATENATED MODULE: external "../errors.mjs"
45
- // CONCATENATED MODULE: external "./projectBase.mjs"
46
- // CONCATENATED MODULE: ./src/project/implementations/fileSystemProject.ts
31
+ } from "./projectBase.mjs";
47
32
 
48
33
  const quoteArg = (arg, shell) =>
49
34
  IS_WINDOWS && shell === "system"
@@ -460,7 +445,7 @@ class _FileSystemProject extends ProjectBase {
460
445
  : this.createScriptCommand({
461
446
  workspaceNameOrAlias:
462
447
  workspace.name === this.rootWorkspace.name
463
- ? ROOT_WORKSPACE_SELECTOR
448
+ ? /* inlined export .ROOT_WORKSPACE_SELECTOR */ "@root"
464
449
  : workspace.name,
465
450
  scriptName: script,
466
451
  args,
@@ -4,11 +4,7 @@ import {
4
4
  WORKSPACE_ERRORS,
5
5
  validateWorkspaceAliases,
6
6
  } from "../../workspaces/index.mjs";
7
- import { ProjectBase } from "./projectBase.mjs"; // CONCATENATED MODULE: external "../../config/index.mjs"
8
- // CONCATENATED MODULE: external "../../internal/core/index.mjs"
9
- // CONCATENATED MODULE: external "../../workspaces/index.mjs"
10
- // CONCATENATED MODULE: external "./projectBase.mjs"
11
- // CONCATENATED MODULE: ./src/project/implementations/memoryProject.ts
7
+ import { ProjectBase } from "./projectBase.mjs";
12
8
 
13
9
  class _MemoryProject extends ProjectBase {
14
10
  rootDirectory;