@noodleseed/one 0.5.0 → 0.6.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 (279) hide show
  1. package/dist/cli.js +5 -0
  2. package/dist/cli.js.map +1 -1
  3. package/dist/commands/shared.d.ts +1 -1
  4. package/dist/commands/shared.d.ts.map +1 -1
  5. package/dist/commands/shared.js +2 -2
  6. package/dist/commands/shared.js.map +1 -1
  7. package/dist/react-widget-build.js +20 -1
  8. package/dist/react-widget-build.js.map +1 -1
  9. package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.d.ts.map +1 -1
  10. package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.js +1 -0
  11. package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.js.map +1 -1
  12. package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.d.ts.map +1 -1
  13. package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js +1 -0
  14. package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js.map +1 -1
  15. package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
  16. package/package.json +2 -20
  17. package/node_modules/@oxc-project/types/LICENSE +0 -22
  18. package/node_modules/@oxc-project/types/README.md +0 -3
  19. package/node_modules/@oxc-project/types/package.json +0 -26
  20. package/node_modules/@oxc-project/types/types.d.ts +0 -1912
  21. package/node_modules/@rolldown/binding-linux-x64-gnu/README.md +0 -3
  22. package/node_modules/@rolldown/binding-linux-x64-gnu/package.json +0 -40
  23. package/node_modules/@rolldown/binding-linux-x64-gnu/rolldown-binding.linux-x64-gnu.node +0 -0
  24. package/node_modules/@rolldown/pluginutils/LICENSE +0 -21
  25. package/node_modules/@rolldown/pluginutils/README.md +0 -145
  26. package/node_modules/@rolldown/pluginutils/dist/filter/index.d.mts +0 -194
  27. package/node_modules/@rolldown/pluginutils/dist/filter/index.mjs +0 -2
  28. package/node_modules/@rolldown/pluginutils/dist/filter-B_mD-HGz.mjs +0 -323
  29. package/node_modules/@rolldown/pluginutils/dist/index.d.mts +0 -2
  30. package/node_modules/@rolldown/pluginutils/dist/index.mjs +0 -2
  31. package/node_modules/@rolldown/pluginutils/package.json +0 -40
  32. package/node_modules/@vitejs/plugin-react/LICENSE +0 -21
  33. package/node_modules/@vitejs/plugin-react/README.md +0 -169
  34. package/node_modules/@vitejs/plugin-react/dist/index.d.ts +0 -48
  35. package/node_modules/@vitejs/plugin-react/dist/index.js +0 -200
  36. package/node_modules/@vitejs/plugin-react/dist/refresh-runtime.js +0 -663
  37. package/node_modules/@vitejs/plugin-react/package.json +0 -87
  38. package/node_modules/@vitejs/plugin-react/types/optionalTypes.d.ts +0 -12
  39. package/node_modules/@vitejs/plugin-react/types/preamble.d.ts +0 -1
  40. package/node_modules/detect-libc/LICENSE +0 -201
  41. package/node_modules/detect-libc/README.md +0 -163
  42. package/node_modules/detect-libc/index.d.ts +0 -14
  43. package/node_modules/detect-libc/lib/detect-libc.js +0 -313
  44. package/node_modules/detect-libc/lib/elf.js +0 -39
  45. package/node_modules/detect-libc/lib/filesystem.js +0 -51
  46. package/node_modules/detect-libc/lib/process.js +0 -24
  47. package/node_modules/detect-libc/package.json +0 -44
  48. package/node_modules/fdir/LICENSE +0 -7
  49. package/node_modules/fdir/README.md +0 -91
  50. package/node_modules/fdir/dist/index.cjs +0 -588
  51. package/node_modules/fdir/dist/index.d.cts +0 -155
  52. package/node_modules/fdir/dist/index.d.mts +0 -155
  53. package/node_modules/fdir/dist/index.mjs +0 -570
  54. package/node_modules/fdir/package.json +0 -103
  55. package/node_modules/lightningcss/LICENSE +0 -373
  56. package/node_modules/lightningcss/README.md +0 -105
  57. package/node_modules/lightningcss/node/ast.d.ts +0 -9892
  58. package/node_modules/lightningcss/node/ast.js.flow +0 -10539
  59. package/node_modules/lightningcss/node/browserslistToTargets.js +0 -48
  60. package/node_modules/lightningcss/node/composeVisitors.js +0 -450
  61. package/node_modules/lightningcss/node/flags.js +0 -28
  62. package/node_modules/lightningcss/node/index.d.ts +0 -494
  63. package/node_modules/lightningcss/node/index.js +0 -59
  64. package/node_modules/lightningcss/node/index.js.flow +0 -843
  65. package/node_modules/lightningcss/node/index.mjs +0 -4
  66. package/node_modules/lightningcss/node/targets.d.ts +0 -40
  67. package/node_modules/lightningcss/node/targets.js.flow +0 -39
  68. package/node_modules/lightningcss/package.json +0 -110
  69. package/node_modules/lightningcss-linux-x64-gnu/LICENSE +0 -373
  70. package/node_modules/lightningcss-linux-x64-gnu/README.md +0 -1
  71. package/node_modules/lightningcss-linux-x64-gnu/lightningcss.linux-x64-gnu.node +0 -0
  72. package/node_modules/lightningcss-linux-x64-gnu/package.json +0 -37
  73. package/node_modules/nanoid/.claude/settings.local.json +0 -14
  74. package/node_modules/nanoid/LICENSE +0 -20
  75. package/node_modules/nanoid/README.md +0 -39
  76. package/node_modules/nanoid/async/index.browser.cjs +0 -69
  77. package/node_modules/nanoid/async/index.browser.js +0 -34
  78. package/node_modules/nanoid/async/index.cjs +0 -71
  79. package/node_modules/nanoid/async/index.d.ts +0 -56
  80. package/node_modules/nanoid/async/index.js +0 -35
  81. package/node_modules/nanoid/async/index.native.js +0 -26
  82. package/node_modules/nanoid/async/package.json +0 -12
  83. package/node_modules/nanoid/bin/nanoid.cjs +0 -55
  84. package/node_modules/nanoid/index.browser.cjs +0 -72
  85. package/node_modules/nanoid/index.browser.js +0 -34
  86. package/node_modules/nanoid/index.cjs +0 -86
  87. package/node_modules/nanoid/index.d.cts +0 -91
  88. package/node_modules/nanoid/index.d.ts +0 -91
  89. package/node_modules/nanoid/index.js +0 -46
  90. package/node_modules/nanoid/nanoid.js +0 -1
  91. package/node_modules/nanoid/non-secure/index.cjs +0 -34
  92. package/node_modules/nanoid/non-secure/index.d.ts +0 -33
  93. package/node_modules/nanoid/non-secure/index.js +0 -21
  94. package/node_modules/nanoid/non-secure/package.json +0 -6
  95. package/node_modules/nanoid/package.json +0 -89
  96. package/node_modules/nanoid/url-alphabet/index.cjs +0 -7
  97. package/node_modules/nanoid/url-alphabet/index.js +0 -3
  98. package/node_modules/nanoid/url-alphabet/package.json +0 -6
  99. package/node_modules/picocolors/LICENSE +0 -15
  100. package/node_modules/picocolors/README.md +0 -21
  101. package/node_modules/picocolors/package.json +0 -25
  102. package/node_modules/picocolors/picocolors.browser.js +0 -4
  103. package/node_modules/picocolors/picocolors.d.ts +0 -5
  104. package/node_modules/picocolors/picocolors.js +0 -75
  105. package/node_modules/picocolors/types.d.ts +0 -51
  106. package/node_modules/picomatch/LICENSE +0 -21
  107. package/node_modules/picomatch/README.md +0 -749
  108. package/node_modules/picomatch/index.js +0 -17
  109. package/node_modules/picomatch/lib/constants.js +0 -184
  110. package/node_modules/picomatch/lib/parse.js +0 -1386
  111. package/node_modules/picomatch/lib/picomatch.js +0 -349
  112. package/node_modules/picomatch/lib/scan.js +0 -391
  113. package/node_modules/picomatch/lib/utils.js +0 -72
  114. package/node_modules/picomatch/package.json +0 -82
  115. package/node_modules/picomatch/posix.js +0 -3
  116. package/node_modules/postcss/LICENSE +0 -20
  117. package/node_modules/postcss/README.md +0 -28
  118. package/node_modules/postcss/lib/at-rule.d.ts +0 -139
  119. package/node_modules/postcss/lib/at-rule.js +0 -25
  120. package/node_modules/postcss/lib/comment.d.ts +0 -67
  121. package/node_modules/postcss/lib/comment.js +0 -13
  122. package/node_modules/postcss/lib/container.d.ts +0 -478
  123. package/node_modules/postcss/lib/container.js +0 -447
  124. package/node_modules/postcss/lib/css-syntax-error.d.ts +0 -247
  125. package/node_modules/postcss/lib/css-syntax-error.js +0 -133
  126. package/node_modules/postcss/lib/declaration.d.ts +0 -150
  127. package/node_modules/postcss/lib/declaration.js +0 -24
  128. package/node_modules/postcss/lib/document.d.ts +0 -68
  129. package/node_modules/postcss/lib/document.js +0 -33
  130. package/node_modules/postcss/lib/fromJSON.d.ts +0 -9
  131. package/node_modules/postcss/lib/fromJSON.js +0 -54
  132. package/node_modules/postcss/lib/input.d.ts +0 -226
  133. package/node_modules/postcss/lib/input.js +0 -273
  134. package/node_modules/postcss/lib/lazy-result.d.ts +0 -189
  135. package/node_modules/postcss/lib/lazy-result.js +0 -563
  136. package/node_modules/postcss/lib/list.d.ts +0 -60
  137. package/node_modules/postcss/lib/list.js +0 -58
  138. package/node_modules/postcss/lib/map-generator.js +0 -376
  139. package/node_modules/postcss/lib/no-work-result.d.ts +0 -45
  140. package/node_modules/postcss/lib/no-work-result.js +0 -137
  141. package/node_modules/postcss/lib/node.d.ts +0 -555
  142. package/node_modules/postcss/lib/node.js +0 -449
  143. package/node_modules/postcss/lib/parse.d.ts +0 -9
  144. package/node_modules/postcss/lib/parse.js +0 -42
  145. package/node_modules/postcss/lib/parser.js +0 -618
  146. package/node_modules/postcss/lib/postcss.d.mts +0 -66
  147. package/node_modules/postcss/lib/postcss.d.ts +0 -461
  148. package/node_modules/postcss/lib/postcss.js +0 -101
  149. package/node_modules/postcss/lib/postcss.mjs +0 -30
  150. package/node_modules/postcss/lib/previous-map.d.ts +0 -80
  151. package/node_modules/postcss/lib/previous-map.js +0 -161
  152. package/node_modules/postcss/lib/processor.d.ts +0 -114
  153. package/node_modules/postcss/lib/processor.js +0 -67
  154. package/node_modules/postcss/lib/result.d.ts +0 -204
  155. package/node_modules/postcss/lib/result.js +0 -42
  156. package/node_modules/postcss/lib/root.d.ts +0 -86
  157. package/node_modules/postcss/lib/root.js +0 -61
  158. package/node_modules/postcss/lib/rule.d.ts +0 -126
  159. package/node_modules/postcss/lib/rule.js +0 -27
  160. package/node_modules/postcss/lib/stringifier.d.ts +0 -45
  161. package/node_modules/postcss/lib/stringifier.js +0 -374
  162. package/node_modules/postcss/lib/stringify.d.ts +0 -9
  163. package/node_modules/postcss/lib/stringify.js +0 -11
  164. package/node_modules/postcss/lib/symbols.js +0 -5
  165. package/node_modules/postcss/lib/terminal-highlight.js +0 -70
  166. package/node_modules/postcss/lib/tokenize.js +0 -270
  167. package/node_modules/postcss/lib/warn-once.js +0 -13
  168. package/node_modules/postcss/lib/warning.d.ts +0 -146
  169. package/node_modules/postcss/lib/warning.js +0 -37
  170. package/node_modules/postcss/package.json +0 -88
  171. package/node_modules/rolldown/LICENSE +0 -25
  172. package/node_modules/rolldown/README.md +0 -11
  173. package/node_modules/rolldown/bin/cli.mjs +0 -2
  174. package/node_modules/rolldown/dist/cli.d.mts +0 -1
  175. package/node_modules/rolldown/dist/cli.mjs +0 -1202
  176. package/node_modules/rolldown/dist/config.d.mts +0 -14
  177. package/node_modules/rolldown/dist/config.mjs +0 -4
  178. package/node_modules/rolldown/dist/experimental-index.d.mts +0 -280
  179. package/node_modules/rolldown/dist/experimental-index.mjs +0 -330
  180. package/node_modules/rolldown/dist/experimental-runtime-types.d.ts +0 -107
  181. package/node_modules/rolldown/dist/filter-index.d.mts +0 -195
  182. package/node_modules/rolldown/dist/filter-index.mjs +0 -380
  183. package/node_modules/rolldown/dist/get-log-filter.d.mts +0 -3
  184. package/node_modules/rolldown/dist/get-log-filter.mjs +0 -68
  185. package/node_modules/rolldown/dist/index.d.mts +0 -4
  186. package/node_modules/rolldown/dist/index.mjs +0 -50
  187. package/node_modules/rolldown/dist/parallel-plugin-worker.d.mts +0 -1
  188. package/node_modules/rolldown/dist/parallel-plugin-worker.mjs +0 -28
  189. package/node_modules/rolldown/dist/parallel-plugin.d.mts +0 -13
  190. package/node_modules/rolldown/dist/parallel-plugin.mjs +0 -6
  191. package/node_modules/rolldown/dist/parse-ast-index.d.mts +0 -32
  192. package/node_modules/rolldown/dist/parse-ast-index.mjs +0 -60
  193. package/node_modules/rolldown/dist/plugins-index.d.mts +0 -33
  194. package/node_modules/rolldown/dist/plugins-index.mjs +0 -40
  195. package/node_modules/rolldown/dist/shared/binding-B1q9aYT-.d.mts +0 -1947
  196. package/node_modules/rolldown/dist/shared/binding-Dh6LYCIB.mjs +0 -589
  197. package/node_modules/rolldown/dist/shared/bindingify-input-options-CzVhGygm.mjs +0 -2240
  198. package/node_modules/rolldown/dist/shared/constructors-688OwP2q.mjs +0 -65
  199. package/node_modules/rolldown/dist/shared/constructors-awZ1VNvg.d.mts +0 -36
  200. package/node_modules/rolldown/dist/shared/define-config-Demdg3_4.mjs +0 -6
  201. package/node_modules/rolldown/dist/shared/define-config-sxBscJ3M.d.mts +0 -3901
  202. package/node_modules/rolldown/dist/shared/error-B68YLzl3.mjs +0 -85
  203. package/node_modules/rolldown/dist/shared/get-log-filter-BpNVNJ5-.d.mts +0 -35
  204. package/node_modules/rolldown/dist/shared/load-config-BvPPEM7l.mjs +0 -120
  205. package/node_modules/rolldown/dist/shared/logging-BSNejiLS.d.mts +0 -50
  206. package/node_modules/rolldown/dist/shared/logs-aMKUxRpj.mjs +0 -180
  207. package/node_modules/rolldown/dist/shared/misc-CoQm4NHO.mjs +0 -21
  208. package/node_modules/rolldown/dist/shared/normalize-string-or-regex-BpXHYeN4.mjs +0 -68
  209. package/node_modules/rolldown/dist/shared/parse-CTgsjpo8.mjs +0 -74
  210. package/node_modules/rolldown/dist/shared/prompt-B1Yc1NPt.mjs +0 -847
  211. package/node_modules/rolldown/dist/shared/resolve-tsconfig-BkhP9bkX.mjs +0 -124
  212. package/node_modules/rolldown/dist/shared/rolldown-Brph2NSU.mjs +0 -40
  213. package/node_modules/rolldown/dist/shared/rolldown-build-DR0wzp0V.mjs +0 -3264
  214. package/node_modules/rolldown/dist/shared/transform-CEmFsvJW.d.mts +0 -149
  215. package/node_modules/rolldown/dist/shared/watch-FrHSqg24.mjs +0 -374
  216. package/node_modules/rolldown/dist/utils-index.d.mts +0 -376
  217. package/node_modules/rolldown/dist/utils-index.mjs +0 -2414
  218. package/node_modules/rolldown/package.json +0 -153
  219. package/node_modules/source-map-js/LICENSE +0 -28
  220. package/node_modules/source-map-js/README.md +0 -765
  221. package/node_modules/source-map-js/lib/array-set.js +0 -121
  222. package/node_modules/source-map-js/lib/base64-vlq.js +0 -140
  223. package/node_modules/source-map-js/lib/base64.js +0 -67
  224. package/node_modules/source-map-js/lib/binary-search.js +0 -111
  225. package/node_modules/source-map-js/lib/mapping-list.js +0 -79
  226. package/node_modules/source-map-js/lib/quick-sort.js +0 -132
  227. package/node_modules/source-map-js/lib/source-map-consumer.d.ts +0 -1
  228. package/node_modules/source-map-js/lib/source-map-consumer.js +0 -1188
  229. package/node_modules/source-map-js/lib/source-map-generator.d.ts +0 -1
  230. package/node_modules/source-map-js/lib/source-map-generator.js +0 -444
  231. package/node_modules/source-map-js/lib/source-node.d.ts +0 -1
  232. package/node_modules/source-map-js/lib/source-node.js +0 -413
  233. package/node_modules/source-map-js/lib/util.js +0 -594
  234. package/node_modules/source-map-js/package.json +0 -71
  235. package/node_modules/source-map-js/source-map.d.ts +0 -104
  236. package/node_modules/source-map-js/source-map.js +0 -8
  237. package/node_modules/tinyglobby/LICENSE +0 -21
  238. package/node_modules/tinyglobby/README.md +0 -25
  239. package/node_modules/tinyglobby/dist/index.cjs +0 -335
  240. package/node_modules/tinyglobby/dist/index.d.cts +0 -148
  241. package/node_modules/tinyglobby/dist/index.d.mts +0 -148
  242. package/node_modules/tinyglobby/dist/index.mjs +0 -307
  243. package/node_modules/tinyglobby/package.json +0 -70
  244. package/node_modules/vite/LICENSE.md +0 -2287
  245. package/node_modules/vite/README.md +0 -20
  246. package/node_modules/vite/bin/openChrome.js +0 -68
  247. package/node_modules/vite/bin/vite.js +0 -79
  248. package/node_modules/vite/client.d.ts +0 -285
  249. package/node_modules/vite/dist/client/client.mjs +0 -1269
  250. package/node_modules/vite/dist/client/env.mjs +0 -18
  251. package/node_modules/vite/dist/node/chunks/build.js +0 -5371
  252. package/node_modules/vite/dist/node/chunks/dist.js +0 -6784
  253. package/node_modules/vite/dist/node/chunks/lib.js +0 -371
  254. package/node_modules/vite/dist/node/chunks/logger.js +0 -364
  255. package/node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts +0 -96
  256. package/node_modules/vite/dist/node/chunks/node.js +0 -35770
  257. package/node_modules/vite/dist/node/chunks/postcss-import.js +0 -467
  258. package/node_modules/vite/dist/node/cli.js +0 -836
  259. package/node_modules/vite/dist/node/index.d.ts +0 -4010
  260. package/node_modules/vite/dist/node/index.js +0 -3
  261. package/node_modules/vite/dist/node/internal.d.ts +0 -2
  262. package/node_modules/vite/dist/node/internal.js +0 -2
  263. package/node_modules/vite/dist/node/module-runner.d.ts +0 -314
  264. package/node_modules/vite/dist/node/module-runner.js +0 -1274
  265. package/node_modules/vite/misc/false.js +0 -1
  266. package/node_modules/vite/misc/true.js +0 -1
  267. package/node_modules/vite/package.json +0 -194
  268. package/node_modules/vite/types/customEvent.d.ts +0 -79
  269. package/node_modules/vite/types/hmrPayload.d.ts +0 -80
  270. package/node_modules/vite/types/hot.d.ts +0 -39
  271. package/node_modules/vite/types/import-meta.d.ts +0 -5
  272. package/node_modules/vite/types/importGlob.d.ts +0 -131
  273. package/node_modules/vite/types/importMeta.d.ts +0 -30
  274. package/node_modules/vite/types/internal/cssPreprocessorOptions.d.ts +0 -44
  275. package/node_modules/vite/types/internal/esbuildOptions.d.ts +0 -28
  276. package/node_modules/vite/types/internal/lightningcssOptions.d.ts +0 -18
  277. package/node_modules/vite/types/internal/rollupTypeCompat.d.ts +0 -24
  278. package/node_modules/vite/types/internal/terserOptions.d.ts +0 -11
  279. package/node_modules/vite/types/metadata.d.ts +0 -47
@@ -1,85 +0,0 @@
1
- import { t as require_binding } from "./binding-Dh6LYCIB.mjs";
2
- //#region src/types/sourcemap.ts
3
- function bindingifySourcemap(map) {
4
- if (map == null) return;
5
- return { inner: typeof map === "string" ? map : {
6
- file: map.file ?? void 0,
7
- mappings: map.mappings,
8
- sourceRoot: "sourceRoot" in map ? map.sourceRoot ?? void 0 : void 0,
9
- sources: map.sources?.map((s) => s ?? void 0),
10
- sourcesContent: map.sourcesContent?.map((s) => s ?? void 0),
11
- names: map.names,
12
- x_google_ignoreList: map.x_google_ignoreList,
13
- debugId: "debugId" in map ? map.debugId : void 0
14
- } };
15
- }
16
- require_binding();
17
- function unwrapBindingResult(container) {
18
- if (typeof container === "object" && container !== null && "isBindingErrors" in container && container.isBindingErrors) throw aggregateBindingErrorsIntoJsError(container.errors);
19
- return container;
20
- }
21
- function normalizeBindingResult(container) {
22
- if (typeof container === "object" && container !== null && "isBindingErrors" in container && container.isBindingErrors) return aggregateBindingErrorsIntoJsError(container.errors);
23
- return container;
24
- }
25
- function normalizeBindingError(e) {
26
- return e.type === "JsError" ? e.field0 : Object.assign(/* @__PURE__ */ new Error(), {
27
- code: e.field0.kind,
28
- kind: e.field0.kind,
29
- message: e.field0.message,
30
- id: e.field0.id,
31
- exporter: e.field0.exporter,
32
- loc: e.field0.loc,
33
- pos: e.field0.pos,
34
- stack: void 0
35
- });
36
- }
37
- function aggregateBindingErrorsIntoJsError(rawErrors) {
38
- const errors = rawErrors.map(normalizeBindingError);
39
- let summary = `Build failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
40
- for (let i = 0; i < errors.length; i++) {
41
- summary += "\n";
42
- if (i >= 5) {
43
- summary += "...";
44
- break;
45
- }
46
- summary += getErrorMessage(errors[i]);
47
- }
48
- const wrapper = new Error(summary);
49
- Object.defineProperty(wrapper, "errors", {
50
- configurable: true,
51
- enumerable: true,
52
- get: () => errors,
53
- set: (value) => Object.defineProperty(wrapper, "errors", {
54
- configurable: true,
55
- enumerable: true,
56
- value
57
- })
58
- });
59
- return wrapper;
60
- }
61
- function getErrorMessage(e) {
62
- if (Object.hasOwn(e, "kind")) return e.message;
63
- let s = "";
64
- if (e.plugin) s += `[plugin ${e.plugin}]`;
65
- const id = e.id ?? e.loc?.file;
66
- if (id) {
67
- s += " " + id;
68
- if (e.loc) s += `:${e.loc.line}:${e.loc.column}`;
69
- }
70
- if (s) s += "\n";
71
- const message = `${e.name ?? "Error"}: ${e.message}`;
72
- s += message;
73
- if (e.frame) s = joinNewLine(s, e.frame);
74
- if (e.stack) s = joinNewLine(s, e.stack.replace(message, ""));
75
- if (e.cause) {
76
- s = joinNewLine(s, "Caused by:");
77
- s = joinNewLine(s, getErrorMessage(e.cause).split("\n").map((line) => " " + line).join("\n"));
78
- }
79
- return s;
80
- }
81
- function joinNewLine(s1, s2) {
82
- return s1.replace(/\n+$/, "") + "\n" + s2.replace(/^\n+/, "");
83
- }
84
- //#endregion
85
- export { bindingifySourcemap as a, unwrapBindingResult as i, normalizeBindingError as n, normalizeBindingResult as r, aggregateBindingErrorsIntoJsError as t };
@@ -1,35 +0,0 @@
1
- import { a as RolldownLog } from "./logging-BSNejiLS.mjs";
2
-
3
- //#region src/get-log-filter.d.ts
4
- /**
5
- * @param filters A list of log filters to apply
6
- * @returns A function that tests whether a log should be output
7
- *
8
- * @category Config
9
- */
10
- type GetLogFilter = (filters: string[]) => (log: RolldownLog) => boolean;
11
- /**
12
- * A helper function to generate log filters using the same syntax as the CLI.
13
- *
14
- * @example
15
- * ```ts
16
- * import { defineConfig } from 'rolldown';
17
- * import { getLogFilter } from 'rolldown/getLogFilter';
18
- *
19
- * const logFilter = getLogFilter(['code:FOO', 'code:BAR']);
20
- *
21
- * export default defineConfig({
22
- * input: 'main.js',
23
- * onLog(level, log, handler) {
24
- * if (logFilter(log)) {
25
- * handler(level, log);
26
- * }
27
- * }
28
- * });
29
- * ```
30
- *
31
- * @category Config
32
- */
33
- declare const getLogFilter: GetLogFilter;
34
- //#endregion
35
- export { getLogFilter as n, GetLogFilter as t };
@@ -1,120 +0,0 @@
1
- import { t as rolldown } from "./rolldown-Brph2NSU.mjs";
2
- import fs from "node:fs";
3
- import path from "node:path";
4
- import { readdir } from "node:fs/promises";
5
- import { cwd } from "node:process";
6
- import { pathToFileURL } from "node:url";
7
- //#region src/utils/load-config.ts
8
- async function bundleTsConfig(configFile, isEsm) {
9
- const dirnameVarName = "injected_original_dirname";
10
- const filenameVarName = "injected_original_filename";
11
- const importMetaUrlVarName = "injected_original_import_meta_url";
12
- const bundle = await rolldown({
13
- input: configFile,
14
- platform: "node",
15
- resolve: { mainFields: ["main"] },
16
- transform: { define: {
17
- __dirname: dirnameVarName,
18
- __filename: filenameVarName,
19
- "import.meta.url": importMetaUrlVarName,
20
- "import.meta.dirname": dirnameVarName,
21
- "import.meta.filename": filenameVarName
22
- } },
23
- treeshake: false,
24
- external: [/^[\w@][^:]/],
25
- plugins: [{
26
- name: "inject-file-scope-variables",
27
- transform: {
28
- filter: { id: /\.[cm]?[jt]s$/ },
29
- async handler(code, id) {
30
- return {
31
- code: `const ${dirnameVarName} = ${JSON.stringify(path.dirname(id))};const ${filenameVarName} = ${JSON.stringify(id)};const ${importMetaUrlVarName} = ${JSON.stringify(pathToFileURL(id).href)};` + code,
32
- map: null
33
- };
34
- }
35
- }
36
- }]
37
- });
38
- const outputDir = path.dirname(configFile);
39
- const fileName = (await bundle.write({
40
- dir: outputDir,
41
- format: isEsm ? "esm" : "cjs",
42
- sourcemap: "inline",
43
- entryFileNames: `rolldown.config.[hash]${path.extname(configFile).replace("ts", "js")}`
44
- })).output.find((chunk) => chunk.type === "chunk" && chunk.isEntry).fileName;
45
- return path.join(outputDir, fileName);
46
- }
47
- const SUPPORTED_JS_CONFIG_FORMATS = [
48
- ".js",
49
- ".mjs",
50
- ".cjs"
51
- ];
52
- const SUPPORTED_TS_CONFIG_FORMATS = [
53
- ".ts",
54
- ".mts",
55
- ".cts"
56
- ];
57
- const SUPPORTED_CONFIG_FORMATS = [...SUPPORTED_JS_CONFIG_FORMATS, ...SUPPORTED_TS_CONFIG_FORMATS];
58
- const DEFAULT_CONFIG_BASE = "rolldown.config";
59
- async function findConfigFileNameInCwd() {
60
- const filesInWorkingDirectory = new Set(await readdir(cwd()));
61
- for (const extension of SUPPORTED_CONFIG_FORMATS) {
62
- const fileName = `${DEFAULT_CONFIG_BASE}${extension}`;
63
- if (filesInWorkingDirectory.has(fileName)) return fileName;
64
- }
65
- throw new Error("No `rolldown.config` configuration file found.");
66
- }
67
- async function loadTsConfig(configFile) {
68
- const file = await bundleTsConfig(configFile, isFilePathESM(configFile));
69
- try {
70
- return (await import(pathToFileURL(file).href)).default;
71
- } finally {
72
- fs.unlink(file, () => {});
73
- }
74
- }
75
- function isFilePathESM(filePath) {
76
- if (/\.m[jt]s$/.test(filePath)) return true;
77
- else if (/\.c[jt]s$/.test(filePath)) return false;
78
- else {
79
- const pkg = findNearestPackageData(path.dirname(filePath));
80
- if (pkg) return pkg.type === "module";
81
- return false;
82
- }
83
- }
84
- function findNearestPackageData(basedir) {
85
- while (basedir) {
86
- const pkgPath = path.join(basedir, "package.json");
87
- if (tryStatSync(pkgPath)?.isFile()) try {
88
- return JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
89
- } catch {}
90
- const nextBasedir = path.dirname(basedir);
91
- if (nextBasedir === basedir) break;
92
- basedir = nextBasedir;
93
- }
94
- return null;
95
- }
96
- function tryStatSync(file) {
97
- try {
98
- return fs.statSync(file, { throwIfNoEntry: false });
99
- } catch {}
100
- }
101
- /**
102
- * Load config from a file in a way that Rolldown does.
103
- *
104
- * @param configPath The path to the config file. If empty, it will look for `rolldown.config` with supported extensions in the current working directory.
105
- * @returns The loaded config export
106
- *
107
- * @category Config
108
- */
109
- async function loadConfig(configPath) {
110
- const ext = path.extname(configPath = configPath || await findConfigFileNameInCwd());
111
- try {
112
- if (SUPPORTED_JS_CONFIG_FORMATS.includes(ext) || process.env.NODE_OPTIONS?.includes("--import=tsx") && SUPPORTED_TS_CONFIG_FORMATS.includes(ext)) return (await import(pathToFileURL(configPath).href)).default;
113
- else if (SUPPORTED_TS_CONFIG_FORMATS.includes(ext)) return await loadTsConfig(path.resolve(configPath));
114
- else throw new Error(`Unsupported config format. Expected: \`${SUPPORTED_CONFIG_FORMATS.join(",")}\` but got \`${ext}\``);
115
- } catch (err) {
116
- throw new Error("Error happened while loading config.", { cause: err });
117
- }
118
- }
119
- //#endregion
120
- export { loadConfig as t };
@@ -1,50 +0,0 @@
1
- //#region src/log/logging.d.ts
2
- /** @inline */
3
- type LogLevel = "info" | "debug" | "warn";
4
- /** @inline */
5
- type LogLevelOption = LogLevel | "silent";
6
- /** @inline */
7
- type LogLevelWithError = LogLevel | "error";
8
- interface RolldownLog {
9
- binding?: string;
10
- cause?: unknown;
11
- /**
12
- * The log code for this log object.
13
- * @example 'PLUGIN_ERROR'
14
- */
15
- code?: string;
16
- exporter?: string;
17
- frame?: string;
18
- hook?: string;
19
- id?: string;
20
- ids?: string[];
21
- loc?: {
22
- column: number;
23
- file?: string;
24
- line: number;
25
- };
26
- /**
27
- * The message for this log object.
28
- * @example 'The "transform" hook used by the output plugin "rolldown-plugin-foo" is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.'
29
- */
30
- message: string;
31
- meta?: any;
32
- names?: string[];
33
- plugin?: string;
34
- pluginCode?: unknown;
35
- pos?: number;
36
- reexporter?: string;
37
- stack?: string;
38
- url?: string;
39
- }
40
- /** @inline */
41
- type RolldownLogWithString = RolldownLog | string;
42
- /** @category Plugin APIs */
43
- interface RolldownError extends RolldownLog {
44
- name?: string;
45
- stack?: string;
46
- watchFiles?: string[];
47
- }
48
- type LogOrStringHandler = (level: LogLevelWithError, log: RolldownLogWithString) => void;
49
- //#endregion
50
- export { RolldownLog as a, RolldownError as i, LogLevelOption as n, RolldownLogWithString as o, LogOrStringHandler as r, LogLevel as t };
@@ -1,180 +0,0 @@
1
- //#region src/utils/code-frame.ts
2
- function spaces(index) {
3
- let result = "";
4
- while (index--) result += " ";
5
- return result;
6
- }
7
- function tabsToSpaces(value) {
8
- return value.replace(/^\t+/, (match) => match.split(" ").join(" "));
9
- }
10
- const LINE_TRUNCATE_LENGTH = 120;
11
- const MIN_CHARACTERS_SHOWN_AFTER_LOCATION = 10;
12
- const ELLIPSIS = "...";
13
- function getCodeFrame(source, line, column) {
14
- let lines = source.split("\n");
15
- if (line > lines.length) return "";
16
- const maxLineLength = Math.max(tabsToSpaces(lines[line - 1].slice(0, column)).length + MIN_CHARACTERS_SHOWN_AFTER_LOCATION + 3, LINE_TRUNCATE_LENGTH);
17
- const frameStart = Math.max(0, line - 3);
18
- let frameEnd = Math.min(line + 2, lines.length);
19
- lines = lines.slice(frameStart, frameEnd);
20
- while (!/\S/.test(lines[lines.length - 1])) {
21
- lines.pop();
22
- frameEnd -= 1;
23
- }
24
- const digits = String(frameEnd).length;
25
- return lines.map((sourceLine, index) => {
26
- const isErrorLine = frameStart + index + 1 === line;
27
- let lineNumber = String(index + frameStart + 1);
28
- while (lineNumber.length < digits) lineNumber = ` ${lineNumber}`;
29
- let displayedLine = tabsToSpaces(sourceLine);
30
- if (displayedLine.length > maxLineLength) displayedLine = `${displayedLine.slice(0, maxLineLength - 3)}${ELLIPSIS}`;
31
- if (isErrorLine) {
32
- const indicator = spaces(digits + 2 + tabsToSpaces(sourceLine.slice(0, column)).length) + "^";
33
- return `${lineNumber}: ${displayedLine}\n${indicator}`;
34
- }
35
- return `${lineNumber}: ${displayedLine}`;
36
- }).join("\n");
37
- }
38
- //#endregion
39
- //#region src/log/locate-character/index.js
40
- /** @typedef {import('./types').Location} Location */
41
- /**
42
- * @param {import('./types').Range} range
43
- * @param {number} index
44
- */
45
- function rangeContains(range, index) {
46
- return range.start <= index && index < range.end;
47
- }
48
- /**
49
- * @param {string} source
50
- * @param {import('./types').Options} [options]
51
- */
52
- function getLocator(source, options = {}) {
53
- const { offsetLine = 0, offsetColumn = 0 } = options;
54
- let start = 0;
55
- const ranges = source.split("\n").map((line, i) => {
56
- const end = start + line.length + 1;
57
- /** @type {import('./types').Range} */
58
- const range = {
59
- start,
60
- end,
61
- line: i
62
- };
63
- start = end;
64
- return range;
65
- });
66
- let i = 0;
67
- /**
68
- * @param {string | number} search
69
- * @param {number} [index]
70
- * @returns {Location | undefined}
71
- */
72
- function locator(search, index) {
73
- if (typeof search === "string") search = source.indexOf(search, index ?? 0);
74
- if (search === -1) return void 0;
75
- let range = ranges[i];
76
- const d = search >= range.end ? 1 : -1;
77
- while (range) {
78
- if (rangeContains(range, search)) return {
79
- line: offsetLine + range.line,
80
- column: offsetColumn + search - range.start,
81
- character: search
82
- };
83
- i += d;
84
- range = ranges[i];
85
- }
86
- }
87
- return locator;
88
- }
89
- /**
90
- * @param {string} source
91
- * @param {string | number} search
92
- * @param {import('./types').Options} [options]
93
- * @returns {Location | undefined}
94
- */
95
- function locate(source, search, options) {
96
- return getLocator(source, options)(search, options && options.startIndex);
97
- }
98
- //#endregion
99
- //#region src/log/logs.ts
100
- const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLE_WATCHER_OPTION = "MULTIPLE_WATCHER_OPTION", PARSE_ERROR = "PARSE_ERROR";
101
- function logParseError(message, id, pos) {
102
- return {
103
- code: PARSE_ERROR,
104
- id,
105
- message,
106
- pos
107
- };
108
- }
109
- function logInvalidLogPosition(pluginName) {
110
- return {
111
- code: INVALID_LOG_POSITION,
112
- message: `Plugin "${pluginName}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`
113
- };
114
- }
115
- function logInputHookInOutputPlugin(pluginName, hookName) {
116
- return {
117
- code: INPUT_HOOK_IN_OUTPUT_PLUGIN,
118
- message: `The "${hookName}" hook used by the output plugin ${pluginName} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`
119
- };
120
- }
121
- function logCycleLoading(pluginName, moduleId) {
122
- return {
123
- code: CYCLE_LOADING,
124
- message: `Found the module "${moduleId}" cycle loading at ${pluginName} plugin, it maybe blocking fetching modules.`
125
- };
126
- }
127
- function logMultipleWatcherOption() {
128
- return {
129
- code: MULTIPLE_WATCHER_OPTION,
130
- message: `Found multiple watcher options at watch options, using first one to start watcher.`
131
- };
132
- }
133
- function logPluginError(error, plugin, { hook, id } = {}) {
134
- try {
135
- const code = error.code;
136
- if (!error.pluginCode && code != null && (typeof code !== "string" || !code.startsWith("PLUGIN_"))) error.pluginCode = code;
137
- error.code = PLUGIN_ERROR;
138
- error.plugin = plugin;
139
- if (hook) error.hook = hook;
140
- if (id) error.id = id;
141
- } catch (_) {} finally {
142
- return error;
143
- }
144
- }
145
- function error(base) {
146
- if (!(base instanceof Error)) {
147
- base = Object.assign(new Error(base.message), base);
148
- Object.defineProperty(base, "name", {
149
- value: "RolldownError",
150
- writable: true
151
- });
152
- }
153
- throw base;
154
- }
155
- function augmentCodeLocation(properties, pos, source, id) {
156
- if (typeof pos === "object") {
157
- const { line, column } = pos;
158
- properties.loc = {
159
- column,
160
- file: id,
161
- line
162
- };
163
- } else {
164
- properties.pos = pos;
165
- const location = locate(source, pos, { offsetLine: 1 });
166
- if (!location) return;
167
- const { line, column } = location;
168
- properties.loc = {
169
- column,
170
- file: id,
171
- line
172
- };
173
- }
174
- if (properties.frame === void 0) {
175
- const { line, column } = properties.loc;
176
- properties.frame = getCodeFrame(source, line, column);
177
- }
178
- }
179
- //#endregion
180
- export { logInvalidLogPosition as a, logPluginError as c, logInputHookInOutputPlugin as i, locate as l, error as n, logMultipleWatcherOption as o, logCycleLoading as r, logParseError as s, augmentCodeLocation as t, getCodeFrame as u };
@@ -1,21 +0,0 @@
1
- //#region src/utils/misc.ts
2
- function arraify(value) {
3
- return Array.isArray(value) ? value : [value];
4
- }
5
- function isPromiseLike(value) {
6
- return value && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
7
- }
8
- function unimplemented(info) {
9
- if (info) throw new Error(`unimplemented: ${info}`);
10
- throw new Error("unimplemented");
11
- }
12
- function unreachable(info) {
13
- if (info) throw new Error(`unreachable: ${info}`);
14
- throw new Error("unreachable");
15
- }
16
- function unsupported(info) {
17
- throw new Error(`UNSUPPORTED: ${info}`);
18
- }
19
- function noop(..._args) {}
20
- //#endregion
21
- export { unreachable as a, unimplemented as i, isPromiseLike as n, unsupported as o, noop as r, arraify as t };
@@ -1,68 +0,0 @@
1
- import { n as __toESM, t as require_binding } from "./binding-Dh6LYCIB.mjs";
2
- import { c as logPluginError, n as error } from "./logs-aMKUxRpj.mjs";
3
- //#region src/builtin-plugin/utils.ts
4
- var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
5
- var BuiltinPlugin = class {
6
- name;
7
- _options;
8
- /** Vite-specific option to control plugin ordering */
9
- enforce;
10
- constructor(name, _options) {
11
- this.name = name;
12
- this._options = _options;
13
- }
14
- };
15
- function makeBuiltinPluginCallable(plugin) {
16
- let callablePlugin = new import_binding.BindingCallableBuiltinPlugin(bindingifyBuiltInPlugin(plugin));
17
- const wrappedPlugin = plugin;
18
- for (const key in callablePlugin) {
19
- const wrappedHook = async function(...args) {
20
- try {
21
- return await callablePlugin[key](...args);
22
- } catch (e) {
23
- if (e instanceof Error && !e.stack?.includes("at ")) Error.captureStackTrace(e, wrappedPlugin[key]);
24
- return error(logPluginError(e, plugin.name, {
25
- hook: key,
26
- id: key === "transform" ? args[2] : void 0
27
- }));
28
- }
29
- };
30
- const order = callablePlugin.getOrder(key);
31
- if (order == void 0) wrappedPlugin[key] = wrappedHook;
32
- else wrappedPlugin[key] = {
33
- handler: wrappedHook,
34
- order
35
- };
36
- }
37
- return wrappedPlugin;
38
- }
39
- function bindingifyBuiltInPlugin(plugin) {
40
- return {
41
- __name: plugin.name,
42
- options: plugin._options
43
- };
44
- }
45
- function bindingifyManifestPlugin(plugin, pluginContextData) {
46
- const { isOutputOptionsForLegacyChunks, ...options } = plugin._options;
47
- return {
48
- __name: plugin.name,
49
- options: {
50
- ...options,
51
- isLegacy: isOutputOptionsForLegacyChunks ? (opts) => {
52
- return isOutputOptionsForLegacyChunks(pluginContextData.getOutputOptions(opts));
53
- } : void 0
54
- }
55
- };
56
- }
57
- //#endregion
58
- //#region src/utils/normalize-string-or-regex.ts
59
- function normalizedStringOrRegex(pattern) {
60
- if (!pattern) return;
61
- if (!isReadonlyArray(pattern)) return [pattern];
62
- return pattern;
63
- }
64
- function isReadonlyArray(input) {
65
- return Array.isArray(input);
66
- }
67
- //#endregion
68
- export { makeBuiltinPluginCallable as a, bindingifyManifestPlugin as i, BuiltinPlugin as n, bindingifyBuiltInPlugin as r, normalizedStringOrRegex as t };
@@ -1,74 +0,0 @@
1
- import { n as __toESM, t as require_binding } from "./binding-Dh6LYCIB.mjs";
2
- //#region ../../node_modules/.pnpm/oxc-parser@0.137.0/node_modules/oxc-parser/src-js/wrap.js
3
- var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
4
- function wrap(result) {
5
- let program, module, comments, errors;
6
- return {
7
- get program() {
8
- if (!program) program = jsonParseAst(result.program);
9
- return program;
10
- },
11
- get module() {
12
- if (!module) module = result.module;
13
- return module;
14
- },
15
- get comments() {
16
- if (!comments) comments = result.comments;
17
- return comments;
18
- },
19
- get errors() {
20
- if (!errors) errors = result.errors;
21
- return errors;
22
- }
23
- };
24
- }
25
- function jsonParseAst(programJson) {
26
- const { node: program, fixes } = JSON.parse(programJson);
27
- for (const fixPath of fixes) applyFix(program, fixPath);
28
- return program;
29
- }
30
- function applyFix(program, fixPath) {
31
- let node = program;
32
- for (const key of fixPath) node = node[key];
33
- if (node.bigint) node.value = BigInt(node.bigint);
34
- else try {
35
- node.value = RegExp(node.regex.pattern, node.regex.flags);
36
- } catch {}
37
- }
38
- //#endregion
39
- //#region src/utils/parse.ts
40
- /**
41
- * Parse JS/TS source asynchronously on a separate thread.
42
- *
43
- * Note that not all of the workload can happen on a separate thread.
44
- * Parsing on Rust side does happen in a separate thread, but deserialization of the AST to JS objects
45
- * has to happen on current thread. This synchronous deserialization work typically outweighs
46
- * the asynchronous parsing by a factor of between 3 and 20.
47
- *
48
- * i.e. the majority of the workload cannot be parallelized by using this method.
49
- *
50
- * Generally {@linkcode parseSync} is preferable to use as it does not have the overhead of spawning a thread.
51
- * If you need to parallelize parsing multiple files, it is recommended to use worker threads.
52
- *
53
- * @category Utilities
54
- */
55
- async function parse(filename, sourceText, options) {
56
- return wrap(await (0, import_binding.parse)(filename, sourceText, options));
57
- }
58
- /**
59
- * Parse JS/TS source synchronously on current thread.
60
- *
61
- * This is generally preferable over {@linkcode parse} (async) as it does not have the overhead
62
- * of spawning a thread, and the majority of the workload cannot be parallelized anyway
63
- * (see {@linkcode parse} documentation for details).
64
- *
65
- * If you need to parallelize parsing multiple files, it is recommended to use worker threads
66
- * with {@linkcode parseSync} rather than using {@linkcode parse}.
67
- *
68
- * @category Utilities
69
- */
70
- function parseSync(filename, sourceText, options) {
71
- return wrap((0, import_binding.parseSync)(filename, sourceText, options));
72
- }
73
- //#endregion
74
- export { parseSync as n, parse as t };