@osmo.inc/cli 0.1.18 → 0.1.20

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 (943) hide show
  1. package/DEPLOY.md +62 -16
  2. package/README.md +31 -15
  3. package/SETUP.md +19 -7
  4. package/THIRD_PARTY_NOTICES.md +5 -16
  5. package/bin/osmo.mjs +12 -0
  6. package/dist/osmo.js +2500 -8905
  7. package/package.json +13 -26
  8. package/release.json +49 -84
  9. package/third-party/inventory.json +0 -3601
  10. package/node_modules/@esbuild/darwin-arm64/README.md +0 -3
  11. package/node_modules/@esbuild/darwin-arm64/bin/esbuild +0 -0
  12. package/node_modules/@esbuild/darwin-arm64/package.json +0 -20
  13. package/node_modules/esbuild/LICENSE.md +0 -21
  14. package/node_modules/esbuild/README.md +0 -3
  15. package/node_modules/esbuild/bin/esbuild +0 -223
  16. package/node_modules/esbuild/install.js +0 -289
  17. package/node_modules/esbuild/lib/main.d.ts +0 -716
  18. package/node_modules/esbuild/lib/main.js +0 -2532
  19. package/node_modules/esbuild/package.json +0 -49
  20. package/node_modules/typescript/LICENSE.txt +0 -55
  21. package/node_modules/typescript/ThirdPartyNoticeText.txt +0 -193
  22. package/node_modules/typescript/lib/lib.d.ts +0 -22
  23. package/node_modules/typescript/lib/lib.decorators.d.ts +0 -384
  24. package/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -22
  25. package/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -41
  26. package/node_modules/typescript/lib/lib.dom.d.ts +0 -39429
  27. package/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -571
  28. package/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -147
  29. package/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -597
  30. package/node_modules/typescript/lib/lib.es2015.d.ts +0 -28
  31. package/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -77
  32. package/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -605
  33. package/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -81
  34. package/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -128
  35. package/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -144
  36. package/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -46
  37. package/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -326
  38. package/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -116
  39. package/node_modules/typescript/lib/lib.es2016.d.ts +0 -21
  40. package/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -23
  41. package/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -31
  42. package/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +0 -21
  43. package/node_modules/typescript/lib/lib.es2017.d.ts +0 -26
  44. package/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -31
  45. package/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -23
  46. package/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -44
  47. package/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -49
  48. package/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -135
  49. package/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -45
  50. package/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -53
  51. package/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -77
  52. package/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -53
  53. package/node_modules/typescript/lib/lib.es2018.d.ts +0 -24
  54. package/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -24
  55. package/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -83
  56. package/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -30
  57. package/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -37
  58. package/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -79
  59. package/node_modules/typescript/lib/lib.es2019.d.ts +0 -24
  60. package/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -24
  61. package/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -23
  62. package/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -33
  63. package/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -37
  64. package/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -24
  65. package/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -765
  66. package/node_modules/typescript/lib/lib.es2020.d.ts +0 -27
  67. package/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -42
  68. package/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -24
  69. package/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -474
  70. package/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -28
  71. package/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -47
  72. package/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -99
  73. package/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -44
  74. package/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -41
  75. package/node_modules/typescript/lib/lib.es2021.d.ts +0 -23
  76. package/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -24
  77. package/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -166
  78. package/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -48
  79. package/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -33
  80. package/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -78
  81. package/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -121
  82. package/node_modules/typescript/lib/lib.es2022.d.ts +0 -25
  83. package/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -75
  84. package/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -24
  85. package/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -145
  86. package/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -26
  87. package/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -39
  88. package/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -25
  89. package/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -924
  90. package/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -21
  91. package/node_modules/typescript/lib/lib.es2023.d.ts +0 -22
  92. package/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -24
  93. package/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -56
  94. package/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +0 -65
  95. package/node_modules/typescript/lib/lib.es2024.collection.d.ts +0 -29
  96. package/node_modules/typescript/lib/lib.es2024.d.ts +0 -26
  97. package/node_modules/typescript/lib/lib.es2024.full.d.ts +0 -24
  98. package/node_modules/typescript/lib/lib.es2024.object.d.ts +0 -29
  99. package/node_modules/typescript/lib/lib.es2024.promise.d.ts +0 -35
  100. package/node_modules/typescript/lib/lib.es2024.regexp.d.ts +0 -25
  101. package/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +0 -68
  102. package/node_modules/typescript/lib/lib.es2024.string.d.ts +0 -29
  103. package/node_modules/typescript/lib/lib.es5.d.ts +0 -4601
  104. package/node_modules/typescript/lib/lib.es6.d.ts +0 -23
  105. package/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -35
  106. package/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -96
  107. package/node_modules/typescript/lib/lib.esnext.d.ts +0 -29
  108. package/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -28
  109. package/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -193
  110. package/node_modules/typescript/lib/lib.esnext.error.d.ts +0 -24
  111. package/node_modules/typescript/lib/lib.esnext.float16.d.ts +0 -445
  112. package/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -24
  113. package/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -21
  114. package/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -148
  115. package/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -34
  116. package/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +0 -25
  117. package/node_modules/typescript/lib/lib.scripthost.d.ts +0 -322
  118. package/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -41
  119. package/node_modules/typescript/lib/lib.webworker.d.ts +0 -13150
  120. package/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -23
  121. package/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -340
  122. package/node_modules/typescript/lib/typescript.js +0 -382
  123. package/node_modules/typescript/package.json +0 -57
  124. package/runtime/apps/native/tools/compile.mjs +0 -217
  125. package/runtime/packages/scene/scripts/validate-strict.mjs +0 -246
  126. package/runtime/packages/scene/src/clip.d.mts +0 -14
  127. package/runtime/packages/scene/src/clip.mjs +0 -15
  128. package/runtime/packages/scene/src/color-value.d.mts +0 -5
  129. package/runtime/packages/scene/src/color-value.mjs +0 -19
  130. package/runtime/packages/scene/src/color.ts +0 -1
  131. package/runtime/packages/scene/src/effects.ts +0 -213
  132. package/runtime/packages/scene/src/elements.ts +0 -491
  133. package/runtime/packages/scene/src/evaluate.ts +0 -919
  134. package/runtime/packages/scene/src/index.ts +0 -69
  135. package/runtime/packages/scene/src/jsx-runtime.ts +0 -73
  136. package/runtime/packages/scene/src/knob-schema.ts +0 -115
  137. package/runtime/packages/scene/src/knobs.ts +0 -118
  138. package/runtime/packages/scene/src/mask.d.mts +0 -6
  139. package/runtime/packages/scene/src/mask.mjs +0 -17
  140. package/runtime/packages/scene/src/metadata.d.mts +0 -23
  141. package/runtime/packages/scene/src/metadata.mjs +0 -44
  142. package/runtime/packages/scene/src/motion-sampling.d.mts +0 -2
  143. package/runtime/packages/scene/src/motion-sampling.mjs +0 -50
  144. package/runtime/packages/scene/src/motion.ts +0 -121
  145. package/runtime/packages/scene/src/shader.ts +0 -57
  146. package/src/resource-examples/example-image/landscape.svg +0 -7
  147. package/src/resource-examples/example-image/resource.json +0 -8
  148. package/src/resource-examples/example-model/gem.glb +0 -0
  149. package/src/resource-examples/example-model/preview.svg +0 -1
  150. package/src/resource-examples/example-model/resource.json +0 -7
  151. package/src/resource-examples/example-scene/resource.json +0 -1
  152. package/src/resource-examples/example-scene/scene.tsx +0 -8
  153. package/src/resource-examples/example-shader/effect.wgsl +0 -7
  154. package/src/resource-examples/example-shader/preview.svg +0 -1
  155. package/src/resource-examples/example-shader/resource.json +0 -27
  156. package/src/resource-examples/example-shader/tint.wgsl +0 -7
  157. package/src/resource-examples/example-video/ambient.mp4 +0 -0
  158. package/src/resource-examples/example-video/resource.json +0 -9
  159. package/src/starter/scene.tsx +0 -20
  160. package/studio/index.html +0 -2
  161. package/studio/public/check-circle-filled.svg +0 -3
  162. package/studio/public/comment-cursor/active-outer.svg +0 -3
  163. package/studio/public/comment-cursor/default.svg +0 -6
  164. package/studio/public/osmo-studio-logo.svg +0 -12
  165. package/studio/public/pencil-simple.svg +0 -5
  166. package/studio/src/active-outer-TVYUEURE.svg +0 -3
  167. package/studio/src/app.css +0 -4
  168. package/studio/src/app.js +0 -714
  169. package/studio/src/default-6CTRH4V5.svg +0 -6
  170. package/studio/src/engine_bg.wasm +0 -0
  171. package/studio/src/inter-cyrillic-ext-wght-normal-IYF56FF6.woff2 +0 -0
  172. package/studio/src/inter-cyrillic-wght-normal-JEOLYBOO.woff2 +0 -0
  173. package/studio/src/inter-greek-ext-wght-normal-EOVOK2B5.woff2 +0 -0
  174. package/studio/src/inter-greek-wght-normal-IRE366VL.woff2 +0 -0
  175. package/studio/src/inter-latin-ext-wght-normal-HA22NDSG.woff2 +0 -0
  176. package/studio/src/inter-latin-wght-normal-NRMW37G5.woff2 +0 -0
  177. package/studio/src/inter-vietnamese-wght-normal-CE5GGD3W.woff2 +0 -0
  178. package/studio/src/osmo-studio-logo-D5R2V77B.svg +0 -12
  179. package/third-party/cargo/adler2@2.0.1/Cargo.toml +0 -91
  180. package/third-party/cargo/adler2@2.0.1/LICENSE-0BSD +0 -12
  181. package/third-party/cargo/adler2@2.0.1/LICENSE-APACHE +0 -201
  182. package/third-party/cargo/adler2@2.0.1/LICENSE-MIT +0 -23
  183. package/third-party/cargo/allocator-api2@0.2.21/Cargo.toml +0 -48
  184. package/third-party/cargo/allocator-api2@0.2.21/LICENSE-APACHE +0 -176
  185. package/third-party/cargo/allocator-api2@0.2.21/LICENSE-MIT +0 -23
  186. package/third-party/cargo/arrayref@0.3.9/Cargo.toml +0 -23
  187. package/third-party/cargo/arrayref@0.3.9/LICENSE +0 -26
  188. package/third-party/cargo/arrayvec@0.7.8/Cargo.toml +0 -112
  189. package/third-party/cargo/arrayvec@0.7.8/LICENSE-APACHE +0 -201
  190. package/third-party/cargo/arrayvec@0.7.8/LICENSE-MIT +0 -25
  191. package/third-party/cargo/ascii@1.1.0/Cargo.toml +0 -41
  192. package/third-party/cargo/ascii@1.1.0/LICENSE-APACHE +0 -201
  193. package/third-party/cargo/ascii@1.1.0/LICENSE-MIT +0 -22
  194. package/third-party/cargo/ash@0.38.0+1.3.281/Cargo.toml +0 -66
  195. package/third-party/cargo/ash@0.38.0+1.3.281/LICENSE-APACHE +0 -67
  196. package/third-party/cargo/ash@0.38.0+1.3.281/LICENSE-MIT +0 -25
  197. package/third-party/cargo/autocfg@1.5.1/Cargo.toml +0 -75
  198. package/third-party/cargo/autocfg@1.5.1/LICENSE-APACHE +0 -201
  199. package/third-party/cargo/autocfg@1.5.1/LICENSE-MIT +0 -25
  200. package/third-party/cargo/base64@0.13.1/Cargo.toml +0 -53
  201. package/third-party/cargo/base64@0.13.1/LICENSE-APACHE +0 -201
  202. package/third-party/cargo/base64@0.13.1/LICENSE-MIT +0 -21
  203. package/third-party/cargo/base64@0.22.1/Cargo.toml +0 -85
  204. package/third-party/cargo/base64@0.22.1/LICENSE-APACHE +0 -201
  205. package/third-party/cargo/base64@0.22.1/LICENSE-MIT +0 -21
  206. package/third-party/cargo/bit-set@0.10.0/Cargo.toml +0 -108
  207. package/third-party/cargo/bit-set@0.10.0/LICENSE-APACHE +0 -201
  208. package/third-party/cargo/bit-set@0.10.0/LICENSE-MIT +0 -25
  209. package/third-party/cargo/bit-vec@0.9.1/Cargo.toml +0 -94
  210. package/third-party/cargo/bit-vec@0.9.1/LICENSE-APACHE +0 -201
  211. package/third-party/cargo/bit-vec@0.9.1/LICENSE-MIT +0 -25
  212. package/third-party/cargo/bitflags@2.13.0/Cargo.toml +0 -120
  213. package/third-party/cargo/bitflags@2.13.0/LICENSE-APACHE +0 -201
  214. package/third-party/cargo/bitflags@2.13.0/LICENSE-MIT +0 -25
  215. package/third-party/cargo/block2@0.6.2/Cargo.toml +0 -115
  216. package/third-party/cargo/block2@0.6.2/MIT-terms.txt +0 -22
  217. package/third-party/cargo/block2@0.6.2/madsmtm-objc2-b4167b582b2f-LICENSE.md +0 -34
  218. package/third-party/cargo/bumpalo@3.20.3/Cargo.toml +0 -99
  219. package/third-party/cargo/bumpalo@3.20.3/LICENSE-APACHE +0 -201
  220. package/third-party/cargo/bumpalo@3.20.3/LICENSE-MIT +0 -25
  221. package/third-party/cargo/bytemuck@1.25.1/Cargo.toml +0 -153
  222. package/third-party/cargo/bytemuck@1.25.1/LICENSE-APACHE +0 -61
  223. package/third-party/cargo/bytemuck@1.25.1/LICENSE-MIT +0 -9
  224. package/third-party/cargo/bytemuck@1.25.1/LICENSE-ZLIB +0 -11
  225. package/third-party/cargo/bytemuck_derive@1.11.0/Cargo.toml +0 -60
  226. package/third-party/cargo/bytemuck_derive@1.11.0/LICENSE-APACHE +0 -61
  227. package/third-party/cargo/bytemuck_derive@1.11.0/LICENSE-MIT +0 -9
  228. package/third-party/cargo/bytemuck_derive@1.11.0/LICENSE-ZLIB +0 -11
  229. package/third-party/cargo/byteorder-lite@0.1.0/Cargo.toml +0 -57
  230. package/third-party/cargo/byteorder-lite@0.1.0/LICENSE-MIT +0 -21
  231. package/third-party/cargo/byteorder-lite@0.1.0/UNLICENSE +0 -24
  232. package/third-party/cargo/byteorder@1.5.0/COPYING +0 -3
  233. package/third-party/cargo/byteorder@1.5.0/Cargo.toml +0 -54
  234. package/third-party/cargo/byteorder@1.5.0/LICENSE-MIT +0 -21
  235. package/third-party/cargo/byteorder@1.5.0/UNLICENSE +0 -24
  236. package/third-party/cargo/cfg-if@1.0.4/Cargo.toml +0 -47
  237. package/third-party/cargo/cfg-if@1.0.4/LICENSE-APACHE +0 -201
  238. package/third-party/cargo/cfg-if@1.0.4/LICENSE-MIT +0 -25
  239. package/third-party/cargo/cfg_aliases@0.2.1/Cargo.toml +0 -43
  240. package/third-party/cargo/cfg_aliases@0.2.1/LICENSE +0 -9
  241. package/third-party/cargo/chunked_transfer@1.5.0/Cargo.toml +0 -27
  242. package/third-party/cargo/chunked_transfer@1.5.0/LICENSE-APACHE +0 -201
  243. package/third-party/cargo/chunked_transfer@1.5.0/LICENSE-MIT +0 -22
  244. package/third-party/cargo/codespan-reporting@0.13.1/Cargo.toml +0 -115
  245. package/third-party/cargo/codespan-reporting@0.13.1/LICENSE +0 -201
  246. package/third-party/cargo/color_quant@1.1.0/Cargo.toml +0 -20
  247. package/third-party/cargo/color_quant@1.1.0/LICENSE +0 -21
  248. package/third-party/cargo/console_error_panic_hook@0.1.7/Cargo.toml +0 -27
  249. package/third-party/cargo/console_error_panic_hook@0.1.7/LICENSE-APACHE +0 -201
  250. package/third-party/cargo/console_error_panic_hook@0.1.7/LICENSE-MIT +0 -25
  251. package/third-party/cargo/core_maths@0.1.1/Cargo.toml +0 -37
  252. package/third-party/cargo/core_maths@0.1.1/LICENSE +0 -21
  253. package/third-party/cargo/cosmic-text@0.19.0/Cargo.toml +0 -214
  254. package/third-party/cargo/cosmic-text@0.19.0/LICENSE-APACHE +0 -201
  255. package/third-party/cargo/cosmic-text@0.19.0/LICENSE-MIT +0 -21
  256. package/third-party/cargo/crc32fast@1.5.0/Cargo.toml +0 -68
  257. package/third-party/cargo/crc32fast@1.5.0/LICENSE-APACHE +0 -202
  258. package/third-party/cargo/crc32fast@1.5.0/LICENSE-MIT +0 -21
  259. package/third-party/cargo/data-url@0.3.2/Cargo.toml +0 -63
  260. package/third-party/cargo/data-url@0.3.2/LICENSE-APACHE +0 -201
  261. package/third-party/cargo/data-url@0.3.2/LICENSE-MIT +0 -25
  262. package/third-party/cargo/dispatch2@0.3.1/Cargo.toml +0 -122
  263. package/third-party/cargo/dispatch2@0.3.1/MIT-terms.txt +0 -22
  264. package/third-party/cargo/dispatch2@0.3.1/madsmtm-objc2-8852b424193c-LICENSE.md +0 -34
  265. package/third-party/cargo/dlib@0.5.3/Cargo.toml +0 -43
  266. package/third-party/cargo/dlib@0.5.3/LICENSE.txt +0 -19
  267. package/third-party/cargo/document-features@0.2.12/Cargo.toml +0 -51
  268. package/third-party/cargo/document-features@0.2.12/LICENSE-APACHE +0 -73
  269. package/third-party/cargo/document-features@0.2.12/LICENSE-MIT +0 -19
  270. package/third-party/cargo/equivalent@1.0.2/Cargo.toml +0 -37
  271. package/third-party/cargo/equivalent@1.0.2/LICENSE-APACHE +0 -201
  272. package/third-party/cargo/equivalent@1.0.2/LICENSE-MIT +0 -25
  273. package/third-party/cargo/errno@0.3.14/Cargo.toml +0 -67
  274. package/third-party/cargo/errno@0.3.14/LICENSE-APACHE +0 -201
  275. package/third-party/cargo/errno@0.3.14/LICENSE-MIT +0 -25
  276. package/third-party/cargo/etagere@0.3.0/Cargo.toml +0 -57
  277. package/third-party/cargo/etagere@0.3.0/LICENSE-APACHE +0 -13
  278. package/third-party/cargo/etagere@0.3.0/LICENSE-MIT +0 -20
  279. package/third-party/cargo/euclid@0.22.14/COPYRIGHT +0 -5
  280. package/third-party/cargo/euclid@0.22.14/Cargo.toml +0 -66
  281. package/third-party/cargo/euclid@0.22.14/LICENSE-APACHE +0 -201
  282. package/third-party/cargo/euclid@0.22.14/LICENSE-MIT +0 -25
  283. package/third-party/cargo/fastrand@2.5.0/Cargo.toml +0 -89
  284. package/third-party/cargo/fastrand@2.5.0/LICENSE-APACHE +0 -201
  285. package/third-party/cargo/fastrand@2.5.0/LICENSE-MIT +0 -23
  286. package/third-party/cargo/fdeflate@0.3.7/Cargo.toml +0 -55
  287. package/third-party/cargo/fdeflate@0.3.7/LICENSE-APACHE +0 -177
  288. package/third-party/cargo/fdeflate@0.3.7/LICENSE-MIT +0 -25
  289. package/third-party/cargo/flate2@1.1.9/Cargo.toml +0 -274
  290. package/third-party/cargo/flate2@1.1.9/LICENSE-APACHE +0 -201
  291. package/third-party/cargo/flate2@1.1.9/LICENSE-MIT +0 -25
  292. package/third-party/cargo/float-cmp@0.9.0/Cargo.toml +0 -39
  293. package/third-party/cargo/float-cmp@0.9.0/LICENSE +0 -19
  294. package/third-party/cargo/float_next_after@1.0.0/Cargo.toml +0 -43
  295. package/third-party/cargo/float_next_after@1.0.0/LICENSE +0 -23
  296. package/third-party/cargo/foldhash@0.2.0/Cargo.toml +0 -80
  297. package/third-party/cargo/foldhash@0.2.0/LICENSE +0 -19
  298. package/third-party/cargo/font-types@0.11.3/Cargo.toml +0 -55
  299. package/third-party/cargo/font-types@0.11.3/LICENSE-APACHE +0 -67
  300. package/third-party/cargo/font-types@0.11.3/LICENSE-MIT +0 -25
  301. package/third-party/cargo/fontdb@0.23.0/Cargo.toml +0 -83
  302. package/third-party/cargo/fontdb@0.23.0/LICENSE +0 -21
  303. package/third-party/cargo/futures-core@0.3.32/Cargo.toml +0 -66
  304. package/third-party/cargo/futures-core@0.3.32/LICENSE-APACHE +0 -202
  305. package/third-party/cargo/futures-core@0.3.32/LICENSE-MIT +0 -26
  306. package/third-party/cargo/futures-task@0.3.32/Cargo.toml +0 -58
  307. package/third-party/cargo/futures-task@0.3.32/LICENSE-APACHE +0 -202
  308. package/third-party/cargo/futures-task@0.3.32/LICENSE-MIT +0 -26
  309. package/third-party/cargo/futures-util@0.3.32/Cargo.toml +0 -181
  310. package/third-party/cargo/futures-util@0.3.32/LICENSE-APACHE +0 -202
  311. package/third-party/cargo/futures-util@0.3.32/LICENSE-MIT +0 -26
  312. package/third-party/cargo/getrandom@0.4.3/Cargo.toml +0 -165
  313. package/third-party/cargo/getrandom@0.4.3/LICENSE-APACHE +0 -201
  314. package/third-party/cargo/getrandom@0.4.3/LICENSE-MIT +0 -26
  315. package/third-party/cargo/gif@0.14.2/Cargo.toml +0 -84
  316. package/third-party/cargo/gif@0.14.2/LICENSE-APACHE +0 -201
  317. package/third-party/cargo/gif@0.14.2/LICENSE-MIT +0 -21
  318. package/third-party/cargo/glam@0.33.2/Cargo.toml +0 -354
  319. package/third-party/cargo/glam@0.33.2/LICENSE-APACHE +0 -201
  320. package/third-party/cargo/glam@0.33.2/LICENSE-MIT +0 -23
  321. package/third-party/cargo/glow@0.17.0/Cargo.toml +0 -122
  322. package/third-party/cargo/glow@0.17.0/LICENSE-APACHE +0 -201
  323. package/third-party/cargo/glow@0.17.0/LICENSE-MIT +0 -23
  324. package/third-party/cargo/glow@0.17.0/LICENSE-ZLIB +0 -15
  325. package/third-party/cargo/gltf-derive@1.4.1/Cargo.toml +0 -34
  326. package/third-party/cargo/gltf-derive@1.4.1/LICENSE-APACHE +0 -202
  327. package/third-party/cargo/gltf-derive@1.4.1/LICENSE-MIT +0 -26
  328. package/third-party/cargo/gltf-json@1.4.1/Cargo.toml +0 -50
  329. package/third-party/cargo/gltf-json@1.4.1/LICENSE-APACHE +0 -202
  330. package/third-party/cargo/gltf-json@1.4.1/LICENSE-MIT +0 -26
  331. package/third-party/cargo/gltf@1.4.1/Cargo.toml +0 -122
  332. package/third-party/cargo/gltf@1.4.1/LICENSE-APACHE +0 -202
  333. package/third-party/cargo/gltf@1.4.1/LICENSE-MIT +0 -26
  334. package/third-party/cargo/glyphon@0.12.0/Cargo.toml +0 -35
  335. package/third-party/cargo/glyphon@0.12.0/LICENSE-APACHE +0 -201
  336. package/third-party/cargo/glyphon@0.12.0/LICENSE-MIT +0 -23
  337. package/third-party/cargo/glyphon@0.12.0/LICENSE-ZLIB +0 -15
  338. package/third-party/cargo/gpu-allocator@0.28.0/Cargo.toml +0 -180
  339. package/third-party/cargo/gpu-allocator@0.28.0/LICENSE-APACHE +0 -201
  340. package/third-party/cargo/gpu-allocator@0.28.0/LICENSE-MIT +0 -7
  341. package/third-party/cargo/grid@1.0.1/Cargo.toml +0 -77
  342. package/third-party/cargo/grid@1.0.1/LICENSE +0 -21
  343. package/third-party/cargo/half@2.7.1/Cargo.toml +0 -137
  344. package/third-party/cargo/half@2.7.1/LICENSE-APACHE +0 -176
  345. package/third-party/cargo/half@2.7.1/LICENSE-MIT +0 -19
  346. package/third-party/cargo/harfrust@0.5.2/Cargo.toml +0 -115
  347. package/third-party/cargo/harfrust@0.5.2/harfbuzz-harfrust-efdae3142ab7-LICENSE +0 -22
  348. package/third-party/cargo/hashbrown@0.16.1/Cargo.toml +0 -180
  349. package/third-party/cargo/hashbrown@0.16.1/LICENSE-APACHE +0 -201
  350. package/third-party/cargo/hashbrown@0.16.1/LICENSE-MIT +0 -25
  351. package/third-party/cargo/hashbrown@0.17.1/Cargo.toml +0 -201
  352. package/third-party/cargo/hashbrown@0.17.1/LICENSE-APACHE +0 -201
  353. package/third-party/cargo/hashbrown@0.17.1/LICENSE-MIT +0 -25
  354. package/third-party/cargo/httpdate@1.0.3/Cargo.toml +0 -35
  355. package/third-party/cargo/httpdate@1.0.3/LICENSE-APACHE +0 -201
  356. package/third-party/cargo/httpdate@1.0.3/LICENSE-MIT +0 -19
  357. package/third-party/cargo/image-webp@0.2.4/Cargo.toml +0 -63
  358. package/third-party/cargo/image-webp@0.2.4/LICENSE-APACHE +0 -177
  359. package/third-party/cargo/image-webp@0.2.4/LICENSE-MIT +0 -25
  360. package/third-party/cargo/image@0.25.10/Cargo.toml +0 -248
  361. package/third-party/cargo/image@0.25.10/LICENSE-APACHE +0 -177
  362. package/third-party/cargo/image@0.25.10/LICENSE-MIT +0 -25
  363. package/third-party/cargo/imagesize@0.14.0/Cargo.toml +0 -104
  364. package/third-party/cargo/imagesize@0.14.0/LICENSE +0 -21
  365. package/third-party/cargo/indexmap@2.14.0/Cargo.toml +0 -167
  366. package/third-party/cargo/indexmap@2.14.0/LICENSE-APACHE +0 -201
  367. package/third-party/cargo/indexmap@2.14.0/LICENSE-MIT +0 -25
  368. package/third-party/cargo/inflections@1.1.1/Cargo.toml +0 -21
  369. package/third-party/cargo/inflections@1.1.1/LICENSE +0 -20
  370. package/third-party/cargo/itoa@1.0.18/Cargo.toml +0 -66
  371. package/third-party/cargo/itoa@1.0.18/LICENSE-APACHE +0 -176
  372. package/third-party/cargo/itoa@1.0.18/LICENSE-MIT +0 -23
  373. package/third-party/cargo/js-sys@0.3.103/Cargo.toml +0 -98
  374. package/third-party/cargo/js-sys@0.3.103/LICENSE-APACHE +0 -201
  375. package/third-party/cargo/js-sys@0.3.103/LICENSE-MIT +0 -25
  376. package/third-party/cargo/khronos-egl@6.0.0/Cargo.toml +0 -82
  377. package/third-party/cargo/khronos-egl@6.0.0/LICENSE-APACHE +0 -201
  378. package/third-party/cargo/khronos-egl@6.0.0/LICENSE-MIT +0 -23
  379. package/third-party/cargo/kurbo@0.13.1/Cargo.toml +0 -230
  380. package/third-party/cargo/kurbo@0.13.1/LICENSE-APACHE +0 -202
  381. package/third-party/cargo/kurbo@0.13.1/LICENSE-MIT +0 -25
  382. package/third-party/cargo/lazy_static@1.5.0/Cargo.toml +0 -46
  383. package/third-party/cargo/lazy_static@1.5.0/LICENSE-APACHE +0 -201
  384. package/third-party/cargo/lazy_static@1.5.0/LICENSE-MIT +0 -25
  385. package/third-party/cargo/libc@0.2.186/Cargo.toml +0 -229
  386. package/third-party/cargo/libc@0.2.186/LICENSE-APACHE +0 -176
  387. package/third-party/cargo/libc@0.2.186/LICENSE-MIT +0 -25
  388. package/third-party/cargo/libloading@0.8.9/Cargo.toml +0 -90
  389. package/third-party/cargo/libloading@0.8.9/LICENSE +0 -12
  390. package/third-party/cargo/libm@0.2.16/Cargo.toml +0 -61
  391. package/third-party/cargo/libm@0.2.16/LICENSE.txt +0 -258
  392. package/third-party/cargo/linebender_resource_handle@0.1.1/Cargo.toml +0 -107
  393. package/third-party/cargo/linebender_resource_handle@0.1.1/LICENSE-APACHE +0 -176
  394. package/third-party/cargo/linebender_resource_handle@0.1.1/LICENSE-MIT +0 -19
  395. package/third-party/cargo/litrs@1.0.0/Cargo.toml +0 -63
  396. package/third-party/cargo/litrs@1.0.0/LICENSE-APACHE +0 -176
  397. package/third-party/cargo/litrs@1.0.0/LICENSE-MIT +0 -25
  398. package/third-party/cargo/lock_api@0.4.14/Cargo.toml +0 -68
  399. package/third-party/cargo/lock_api@0.4.14/LICENSE-APACHE +0 -201
  400. package/third-party/cargo/lock_api@0.4.14/LICENSE-MIT +0 -25
  401. package/third-party/cargo/log@0.4.33/Cargo.toml +0 -152
  402. package/third-party/cargo/log@0.4.33/LICENSE-APACHE +0 -201
  403. package/third-party/cargo/log@0.4.33/LICENSE-MIT +0 -25
  404. package/third-party/cargo/lru@0.16.4/Cargo.toml +0 -47
  405. package/third-party/cargo/lru@0.16.4/LICENSE +0 -21
  406. package/third-party/cargo/lyon_geom@1.0.19/Cargo.toml +0 -69
  407. package/third-party/cargo/lyon_geom@1.0.19/nical-lyon-56219c95c658-LICENSE-APACHE +0 -13
  408. package/third-party/cargo/lyon_geom@1.0.19/nical-lyon-56219c95c658-LICENSE-MIT +0 -20
  409. package/third-party/cargo/lyon_path@1.0.19/Cargo.toml +0 -58
  410. package/third-party/cargo/lyon_path@1.0.19/nical-lyon-56219c95c658-LICENSE-APACHE +0 -13
  411. package/third-party/cargo/lyon_path@1.0.19/nical-lyon-56219c95c658-LICENSE-MIT +0 -20
  412. package/third-party/cargo/lyon_tessellation@1.0.20/Cargo.toml +0 -71
  413. package/third-party/cargo/lyon_tessellation@1.0.20/nical-lyon-7fa75ea8eea3-LICENSE-APACHE +0 -13
  414. package/third-party/cargo/lyon_tessellation@1.0.20/nical-lyon-7fa75ea8eea3-LICENSE-MIT +0 -20
  415. package/third-party/cargo/memchr@2.8.3/COPYING +0 -3
  416. package/third-party/cargo/memchr@2.8.3/Cargo.toml +0 -89
  417. package/third-party/cargo/memchr@2.8.3/LICENSE-MIT +0 -21
  418. package/third-party/cargo/memchr@2.8.3/UNLICENSE +0 -24
  419. package/third-party/cargo/memmap2@0.9.11/Cargo.toml +0 -59
  420. package/third-party/cargo/memmap2@0.9.11/LICENSE-APACHE +0 -201
  421. package/third-party/cargo/memmap2@0.9.11/LICENSE-MIT +0 -26
  422. package/third-party/cargo/miniz_oxide@0.8.9/Cargo.toml +0 -91
  423. package/third-party/cargo/miniz_oxide@0.8.9/LICENSE +0 -25
  424. package/third-party/cargo/miniz_oxide@0.8.9/LICENSE-APACHE.md +0 -177
  425. package/third-party/cargo/miniz_oxide@0.8.9/LICENSE-MIT.md +0 -24
  426. package/third-party/cargo/miniz_oxide@0.8.9/LICENSE-ZLIB.md +0 -14
  427. package/third-party/cargo/moxcms@0.8.1/Cargo.toml +0 -113
  428. package/third-party/cargo/moxcms@0.8.1/LICENSE-APACHE.md +0 -201
  429. package/third-party/cargo/moxcms@0.8.1/LICENSE.md +0 -26
  430. package/third-party/cargo/naga-types@30.0.0/Cargo.toml +0 -94
  431. package/third-party/cargo/naga-types@30.0.0/LICENSE.APACHE +0 -176
  432. package/third-party/cargo/naga-types@30.0.0/LICENSE.MIT +0 -21
  433. package/third-party/cargo/naga@30.0.0/Cargo.toml +0 -246
  434. package/third-party/cargo/naga@30.0.0/LICENSE.APACHE +0 -176
  435. package/third-party/cargo/naga@30.0.0/LICENSE.MIT +0 -21
  436. package/third-party/cargo/num-traits@0.2.19/Cargo.toml +0 -54
  437. package/third-party/cargo/num-traits@0.2.19/LICENSE-APACHE +0 -201
  438. package/third-party/cargo/num-traits@0.2.19/LICENSE-MIT +0 -25
  439. package/third-party/cargo/objc2-core-foundation@0.3.2/Cargo.toml +0 -221
  440. package/third-party/cargo/objc2-core-foundation@0.3.2/MIT-terms.txt +0 -22
  441. package/third-party/cargo/objc2-core-foundation@0.3.2/madsmtm-objc2-7b1abfd750a2-LICENSE.md +0 -34
  442. package/third-party/cargo/objc2-core-graphics@0.3.2/Cargo.toml +0 -331
  443. package/third-party/cargo/objc2-core-graphics@0.3.2/MIT-terms.txt +0 -22
  444. package/third-party/cargo/objc2-core-graphics@0.3.2/madsmtm-objc2-7b1abfd750a2-LICENSE.md +0 -34
  445. package/third-party/cargo/objc2-encode@4.1.0/Cargo.toml +0 -81
  446. package/third-party/cargo/objc2-encode@4.1.0/MIT-terms.txt +0 -22
  447. package/third-party/cargo/objc2-encode@4.1.0/madsmtm-objc2-8d214f547736-LICENSE.md +0 -34
  448. package/third-party/cargo/objc2-foundation@0.3.2/Cargo.toml +0 -529
  449. package/third-party/cargo/objc2-foundation@0.3.2/MIT-terms.txt +0 -22
  450. package/third-party/cargo/objc2-foundation@0.3.2/madsmtm-objc2-7b1abfd750a2-LICENSE.md +0 -34
  451. package/third-party/cargo/objc2-io-surface@0.3.2/Cargo.toml +0 -139
  452. package/third-party/cargo/objc2-io-surface@0.3.2/MIT-terms.txt +0 -22
  453. package/third-party/cargo/objc2-io-surface@0.3.2/madsmtm-objc2-7b1abfd750a2-LICENSE.md +0 -34
  454. package/third-party/cargo/objc2-metal@0.3.2/Cargo.toml +0 -601
  455. package/third-party/cargo/objc2-metal@0.3.2/MIT-terms.txt +0 -22
  456. package/third-party/cargo/objc2-metal@0.3.2/madsmtm-objc2-7b1abfd750a2-LICENSE.md +0 -34
  457. package/third-party/cargo/objc2-quartz-core@0.3.2/Cargo.toml +0 -302
  458. package/third-party/cargo/objc2-quartz-core@0.3.2/MIT-terms.txt +0 -22
  459. package/third-party/cargo/objc2-quartz-core@0.3.2/madsmtm-objc2-7b1abfd750a2-LICENSE.md +0 -34
  460. package/third-party/cargo/objc2@0.6.4/Cargo.toml +0 -232
  461. package/third-party/cargo/objc2@0.6.4/MIT-terms.txt +0 -22
  462. package/third-party/cargo/objc2@0.6.4/madsmtm-objc2-8852b424193c-LICENSE.md +0 -34
  463. package/third-party/cargo/once_cell@1.21.4/Cargo.toml +0 -119
  464. package/third-party/cargo/once_cell@1.21.4/LICENSE-APACHE +0 -201
  465. package/third-party/cargo/once_cell@1.21.4/LICENSE-MIT +0 -23
  466. package/third-party/cargo/ordered-float@5.3.0/Cargo.toml +0 -162
  467. package/third-party/cargo/ordered-float@5.3.0/LICENSE-MIT +0 -25
  468. package/third-party/cargo/parking_lot@0.12.5/Cargo.toml +0 -87
  469. package/third-party/cargo/parking_lot@0.12.5/LICENSE-APACHE +0 -201
  470. package/third-party/cargo/parking_lot@0.12.5/LICENSE-MIT +0 -25
  471. package/third-party/cargo/parking_lot_core@0.9.12/Cargo.toml +0 -72
  472. package/third-party/cargo/parking_lot_core@0.9.12/LICENSE-APACHE +0 -201
  473. package/third-party/cargo/parking_lot_core@0.9.12/LICENSE-MIT +0 -25
  474. package/third-party/cargo/pico-args@0.5.0/Cargo.toml +0 -32
  475. package/third-party/cargo/pico-args@0.5.0/LICENSE +0 -20
  476. package/third-party/cargo/pin-project-lite@0.2.17/Cargo.toml +0 -198
  477. package/third-party/cargo/pin-project-lite@0.2.17/LICENSE-APACHE +0 -177
  478. package/third-party/cargo/pin-project-lite@0.2.17/LICENSE-MIT +0 -23
  479. package/third-party/cargo/pkg-config@0.3.33/Cargo.toml +0 -43
  480. package/third-party/cargo/pkg-config@0.3.33/LICENSE-APACHE +0 -201
  481. package/third-party/cargo/pkg-config@0.3.33/LICENSE-MIT +0 -25
  482. package/third-party/cargo/png@0.18.1/Cargo.toml +0 -130
  483. package/third-party/cargo/png@0.18.1/LICENSE-APACHE +0 -201
  484. package/third-party/cargo/png@0.18.1/LICENSE-MIT +0 -25
  485. package/third-party/cargo/pollster@0.4.0/Cargo.toml +0 -53
  486. package/third-party/cargo/pollster@0.4.0/LICENSE-APACHE +0 -201
  487. package/third-party/cargo/pollster@0.4.0/LICENSE-MIT +0 -25
  488. package/third-party/cargo/polycool@0.4.0/Cargo.toml +0 -83
  489. package/third-party/cargo/polycool@0.4.0/LICENSE-APACHE +0 -202
  490. package/third-party/cargo/polycool@0.4.0/LICENSE-MIT +0 -25
  491. package/third-party/cargo/pp-rs@0.2.1/Cargo.toml +0 -23
  492. package/third-party/cargo/pp-rs@0.2.1/LICENSE +0 -29
  493. package/third-party/cargo/presser@0.3.1/Cargo.toml +0 -58
  494. package/third-party/cargo/presser@0.3.1/LICENSE-APACHE +0 -201
  495. package/third-party/cargo/presser@0.3.1/LICENSE-MIT +0 -25
  496. package/third-party/cargo/proc-macro2@1.0.106/Cargo.toml +0 -105
  497. package/third-party/cargo/proc-macro2@1.0.106/LICENSE-APACHE +0 -176
  498. package/third-party/cargo/proc-macro2@1.0.106/LICENSE-MIT +0 -23
  499. package/third-party/cargo/profiling@1.0.18/Cargo.toml +0 -96
  500. package/third-party/cargo/profiling@1.0.18/aclysma-profiling-8271551172eb-LICENSE-APACHE +0 -201
  501. package/third-party/cargo/profiling@1.0.18/aclysma-profiling-8271551172eb-LICENSE-MIT +0 -21
  502. package/third-party/cargo/pxfm@0.1.30/Cargo.toml +0 -53
  503. package/third-party/cargo/pxfm@0.1.30/LICENSE-APACHE.md +0 -201
  504. package/third-party/cargo/pxfm@0.1.30/LICENSE.md +0 -26
  505. package/third-party/cargo/quick-error@2.0.1/Cargo.toml +0 -24
  506. package/third-party/cargo/quick-error@2.0.1/LICENSE-APACHE +0 -202
  507. package/third-party/cargo/quick-error@2.0.1/LICENSE-MIT +0 -19
  508. package/third-party/cargo/quote@1.0.46/Cargo.toml +0 -70
  509. package/third-party/cargo/quote@1.0.46/LICENSE-APACHE +0 -176
  510. package/third-party/cargo/quote@1.0.46/LICENSE-MIT +0 -23
  511. package/third-party/cargo/rangemap@1.7.1/Cargo.toml +0 -91
  512. package/third-party/cargo/rangemap@1.7.1/LICENSE-APACHE +0 -191
  513. package/third-party/cargo/rangemap@1.7.1/LICENSE-MIT +0 -7
  514. package/third-party/cargo/raw-window-handle@0.6.2/Cargo.toml +0 -56
  515. package/third-party/cargo/raw-window-handle@0.6.2/LICENSE-APACHE.md +0 -177
  516. package/third-party/cargo/raw-window-handle@0.6.2/LICENSE-MIT.md +0 -21
  517. package/third-party/cargo/raw-window-handle@0.6.2/LICENSE-ZLIB.md +0 -11
  518. package/third-party/cargo/raw-window-metal@1.1.0/Cargo.toml +0 -111
  519. package/third-party/cargo/raw-window-metal@1.1.0/LICENSE-APACHE +0 -202
  520. package/third-party/cargo/raw-window-metal@1.1.0/LICENSE-MIT +0 -17
  521. package/third-party/cargo/read-fonts@0.37.0/Cargo.toml +0 -95
  522. package/third-party/cargo/read-fonts@0.37.0/LICENSE-APACHE +0 -67
  523. package/third-party/cargo/read-fonts@0.37.0/LICENSE-MIT +0 -25
  524. package/third-party/cargo/read-fonts@0.39.2/Cargo.toml +0 -96
  525. package/third-party/cargo/read-fonts@0.39.2/LICENSE-APACHE +0 -67
  526. package/third-party/cargo/read-fonts@0.39.2/LICENSE-MIT +0 -25
  527. package/third-party/cargo/renderdoc-sys@1.1.0/Cargo.toml +0 -39
  528. package/third-party/cargo/renderdoc-sys@1.1.0/LICENSE-APACHE +0 -201
  529. package/third-party/cargo/renderdoc-sys@1.1.0/LICENSE-MIT +0 -25
  530. package/third-party/cargo/resvg@0.47.0/Cargo.toml +0 -112
  531. package/third-party/cargo/resvg@0.47.0/LICENSE-APACHE +0 -176
  532. package/third-party/cargo/resvg@0.47.0/LICENSE-MIT +0 -25
  533. package/third-party/cargo/rgb@0.8.53/Cargo.toml +0 -110
  534. package/third-party/cargo/rgb@0.8.53/LICENSE +0 -21
  535. package/third-party/cargo/roxmltree@0.21.1/Cargo.toml +0 -75
  536. package/third-party/cargo/roxmltree@0.21.1/LICENSE-APACHE +0 -201
  537. package/third-party/cargo/roxmltree@0.21.1/LICENSE-MIT +0 -21
  538. package/third-party/cargo/rustc-hash@1.1.0/Cargo.toml +0 -25
  539. package/third-party/cargo/rustc-hash@1.1.0/LICENSE-APACHE +0 -201
  540. package/third-party/cargo/rustc-hash@1.1.0/LICENSE-MIT +0 -23
  541. package/third-party/cargo/rustc-hash@2.1.3/Cargo.toml +0 -50
  542. package/third-party/cargo/rustc-hash@2.1.3/LICENSE-APACHE +0 -176
  543. package/third-party/cargo/rustc-hash@2.1.3/LICENSE-MIT +0 -23
  544. package/third-party/cargo/rustix@1.1.4/COPYRIGHT +0 -29
  545. package/third-party/cargo/rustix@1.1.4/Cargo.toml +0 -292
  546. package/third-party/cargo/rustix@1.1.4/LICENSE-APACHE +0 -201
  547. package/third-party/cargo/rustix@1.1.4/LICENSE-Apache-2.0_WITH_LLVM-exception +0 -220
  548. package/third-party/cargo/rustix@1.1.4/LICENSE-MIT +0 -23
  549. package/third-party/cargo/rustversion@1.0.23/Cargo.toml +0 -69
  550. package/third-party/cargo/rustversion@1.0.23/LICENSE-APACHE +0 -176
  551. package/third-party/cargo/rustversion@1.0.23/LICENSE-MIT +0 -23
  552. package/third-party/cargo/rustybuzz@0.20.1/Cargo.toml +0 -110
  553. package/third-party/cargo/rustybuzz@0.20.1/LICENSE +0 -22
  554. package/third-party/cargo/scopeguard@1.2.0/Cargo.toml +0 -43
  555. package/third-party/cargo/scopeguard@1.2.0/LICENSE-APACHE +0 -201
  556. package/third-party/cargo/scopeguard@1.2.0/LICENSE-MIT +0 -25
  557. package/third-party/cargo/self_cell@1.2.2/Cargo.toml +0 -33
  558. package/third-party/cargo/self_cell@1.2.2/LICENSE-APACHE +0 -201
  559. package/third-party/cargo/self_cell@1.2.2/LICENSE-GPLv2 +0 -339
  560. package/third-party/cargo/self_cell@1.3.0/Cargo.toml +0 -33
  561. package/third-party/cargo/self_cell@1.3.0/LICENSE-APACHE +0 -201
  562. package/third-party/cargo/self_cell@1.3.0/LICENSE-GPLv2 +0 -339
  563. package/third-party/cargo/serde@1.0.228/Cargo.toml +0 -84
  564. package/third-party/cargo/serde@1.0.228/LICENSE-APACHE +0 -176
  565. package/third-party/cargo/serde@1.0.228/LICENSE-MIT +0 -23
  566. package/third-party/cargo/serde_core@1.0.228/Cargo.toml +0 -87
  567. package/third-party/cargo/serde_core@1.0.228/LICENSE-APACHE +0 -176
  568. package/third-party/cargo/serde_core@1.0.228/LICENSE-MIT +0 -23
  569. package/third-party/cargo/serde_derive@1.0.228/Cargo.toml +0 -87
  570. package/third-party/cargo/serde_derive@1.0.228/LICENSE-APACHE +0 -176
  571. package/third-party/cargo/serde_derive@1.0.228/LICENSE-MIT +0 -23
  572. package/third-party/cargo/serde_json@1.0.150/Cargo.toml +0 -162
  573. package/third-party/cargo/serde_json@1.0.150/LICENSE-APACHE +0 -176
  574. package/third-party/cargo/serde_json@1.0.150/LICENSE-MIT +0 -23
  575. package/third-party/cargo/simd-adler32@0.3.10/Cargo.toml +0 -68
  576. package/third-party/cargo/simd-adler32@0.3.10/LICENSE.md +0 -21
  577. package/third-party/cargo/simplecss@0.2.2/Cargo.toml +0 -146
  578. package/third-party/cargo/simplecss@0.2.2/LICENSE-APACHE +0 -201
  579. package/third-party/cargo/simplecss@0.2.2/LICENSE-MIT +0 -21
  580. package/third-party/cargo/siphasher@1.0.3/COPYING +0 -7
  581. package/third-party/cargo/siphasher@1.0.3/Cargo.toml +0 -64
  582. package/third-party/cargo/skrifa@0.40.0/Cargo.toml +0 -86
  583. package/third-party/cargo/skrifa@0.40.0/LICENSE-APACHE +0 -67
  584. package/third-party/cargo/skrifa@0.40.0/LICENSE-MIT +0 -25
  585. package/third-party/cargo/skrifa@0.42.1/Cargo.toml +0 -86
  586. package/third-party/cargo/skrifa@0.42.1/LICENSE-APACHE +0 -67
  587. package/third-party/cargo/skrifa@0.42.1/LICENSE-MIT +0 -25
  588. package/third-party/cargo/slab@0.4.12/Cargo.toml +0 -67
  589. package/third-party/cargo/slab@0.4.12/LICENSE +0 -25
  590. package/third-party/cargo/slotmap@1.1.1/Cargo.toml +0 -83
  591. package/third-party/cargo/slotmap@1.1.1/LICENSE +0 -19
  592. package/third-party/cargo/smallvec@1.15.2/Cargo.toml +0 -103
  593. package/third-party/cargo/smallvec@1.15.2/LICENSE-APACHE +0 -201
  594. package/third-party/cargo/smallvec@1.15.2/LICENSE-MIT +0 -25
  595. package/third-party/cargo/smol_str@0.3.6/Cargo.toml +0 -155
  596. package/third-party/cargo/smol_str@0.3.6/LICENSE-APACHE +0 -201
  597. package/third-party/cargo/smol_str@0.3.6/LICENSE-MIT +0 -23
  598. package/third-party/cargo/spirv@0.4.0+sdk-1.4.341.0/Cargo.toml +0 -56
  599. package/third-party/cargo/spirv@0.4.0+sdk-1.4.341.0/gfx-rs-rspirv-8afc3d0ac8e1-LICENSE +0 -202
  600. package/third-party/cargo/static_assertions@1.1.0/Cargo.toml +0 -39
  601. package/third-party/cargo/static_assertions@1.1.0/LICENSE-APACHE +0 -202
  602. package/third-party/cargo/static_assertions@1.1.0/LICENSE-MIT +0 -21
  603. package/third-party/cargo/strict-num@0.1.1/Cargo.toml +0 -35
  604. package/third-party/cargo/strict-num@0.1.1/LICENSE +0 -19
  605. package/third-party/cargo/svgtypes@0.16.1/Cargo.toml +0 -57
  606. package/third-party/cargo/svgtypes@0.16.1/LICENSE-APACHE +0 -201
  607. package/third-party/cargo/svgtypes@0.16.1/LICENSE-MIT +0 -20
  608. package/third-party/cargo/swash@0.2.9/Cargo.toml +0 -93
  609. package/third-party/cargo/swash@0.2.9/LICENSE-APACHE +0 -201
  610. package/third-party/cargo/swash@0.2.9/LICENSE-MIT +0 -25
  611. package/third-party/cargo/syn@2.0.118/Cargo.toml +0 -272
  612. package/third-party/cargo/syn@2.0.118/LICENSE-APACHE +0 -176
  613. package/third-party/cargo/syn@2.0.118/LICENSE-MIT +0 -23
  614. package/third-party/cargo/sys-locale@0.3.2/Cargo.toml +0 -73
  615. package/third-party/cargo/sys-locale@0.3.2/LICENSE-APACHE +0 -201
  616. package/third-party/cargo/sys-locale@0.3.2/LICENSE-MIT +0 -21
  617. package/third-party/cargo/taffy@0.12.1/Cargo.toml +0 -171
  618. package/third-party/cargo/taffy@0.12.1/DioxusLabs-taffy-1c9e37a0a1cf-LICENSE.md +0 -25
  619. package/third-party/cargo/tempfile@3.27.0/Cargo.toml +0 -105
  620. package/third-party/cargo/tempfile@3.27.0/LICENSE-APACHE +0 -201
  621. package/third-party/cargo/tempfile@3.27.0/LICENSE-MIT +0 -25
  622. package/third-party/cargo/termcolor@1.4.1/COPYING +0 -3
  623. package/third-party/cargo/termcolor@1.4.1/Cargo.toml +0 -40
  624. package/third-party/cargo/termcolor@1.4.1/LICENSE-MIT +0 -21
  625. package/third-party/cargo/termcolor@1.4.1/UNLICENSE +0 -24
  626. package/third-party/cargo/thiserror-impl@2.0.18/Cargo.toml +0 -52
  627. package/third-party/cargo/thiserror-impl@2.0.18/LICENSE-APACHE +0 -176
  628. package/third-party/cargo/thiserror-impl@2.0.18/LICENSE-MIT +0 -23
  629. package/third-party/cargo/thiserror@2.0.18/Cargo.toml +0 -119
  630. package/third-party/cargo/thiserror@2.0.18/LICENSE-APACHE +0 -176
  631. package/third-party/cargo/thiserror@2.0.18/LICENSE-MIT +0 -23
  632. package/third-party/cargo/tiny-skia-path@0.12.0/Cargo.toml +0 -58
  633. package/third-party/cargo/tiny-skia-path@0.12.0/LICENSE +0 -30
  634. package/third-party/cargo/tiny-skia@0.12.0/Cargo.toml +0 -116
  635. package/third-party/cargo/tiny-skia@0.12.0/LICENSE +0 -30
  636. package/third-party/cargo/tiny_http@0.12.0/Cargo.toml +0 -82
  637. package/third-party/cargo/tiny_http@0.12.0/LICENSE-APACHE +0 -201
  638. package/third-party/cargo/tiny_http@0.12.0/LICENSE-MIT +0 -25
  639. package/third-party/cargo/tinyvec@1.12.0/Cargo.toml +0 -184
  640. package/third-party/cargo/tinyvec@1.12.0/LICENSE-APACHE.md +0 -202
  641. package/third-party/cargo/tinyvec@1.12.0/LICENSE-MIT.md +0 -5
  642. package/third-party/cargo/tinyvec@1.12.0/LICENSE-ZLIB.md +0 -11
  643. package/third-party/cargo/tinyvec_macros@0.1.1/Cargo.toml +0 -19
  644. package/third-party/cargo/tinyvec_macros@0.1.1/LICENSE-APACHE.md +0 -202
  645. package/third-party/cargo/tinyvec_macros@0.1.1/LICENSE-MIT.md +0 -21
  646. package/third-party/cargo/tinyvec_macros@0.1.1/LICENSE-ZLIB.md +0 -20
  647. package/third-party/cargo/ttf-parser@0.25.1/Cargo.toml +0 -101
  648. package/third-party/cargo/ttf-parser@0.25.1/LICENSE-APACHE +0 -201
  649. package/third-party/cargo/ttf-parser@0.25.1/LICENSE-MIT +0 -20
  650. package/third-party/cargo/unicode-bidi-mirroring@0.4.0/Cargo.toml +0 -22
  651. package/third-party/cargo/unicode-bidi-mirroring@0.4.0/LICENSE-APACHE +0 -201
  652. package/third-party/cargo/unicode-bidi-mirroring@0.4.0/LICENSE-MIT +0 -21
  653. package/third-party/cargo/unicode-bidi@0.3.18/COPYRIGHT +0 -8
  654. package/third-party/cargo/unicode-bidi@0.3.18/Cargo.toml +0 -90
  655. package/third-party/cargo/unicode-bidi@0.3.18/LICENSE-APACHE +0 -201
  656. package/third-party/cargo/unicode-bidi@0.3.18/LICENSE-MIT +0 -25
  657. package/third-party/cargo/unicode-ccc@0.4.0/Cargo.toml +0 -22
  658. package/third-party/cargo/unicode-ccc@0.4.0/LICENSE-APACHE +0 -201
  659. package/third-party/cargo/unicode-ccc@0.4.0/LICENSE-MIT +0 -21
  660. package/third-party/cargo/unicode-ident@1.0.24/Cargo.toml +0 -84
  661. package/third-party/cargo/unicode-ident@1.0.24/LICENSE-APACHE +0 -176
  662. package/third-party/cargo/unicode-ident@1.0.24/LICENSE-MIT +0 -23
  663. package/third-party/cargo/unicode-ident@1.0.24/LICENSE-UNICODE +0 -39
  664. package/third-party/cargo/unicode-linebreak@0.1.5/Cargo.toml +0 -32
  665. package/third-party/cargo/unicode-linebreak@0.1.5/LICENSE +0 -201
  666. package/third-party/cargo/unicode-properties@0.1.4/COPYRIGHT +0 -7
  667. package/third-party/cargo/unicode-properties@0.1.4/Cargo.toml +0 -65
  668. package/third-party/cargo/unicode-properties@0.1.4/LICENSE-APACHE +0 -201
  669. package/third-party/cargo/unicode-properties@0.1.4/LICENSE-MIT +0 -25
  670. package/third-party/cargo/unicode-script@0.5.8/Cargo.toml +0 -63
  671. package/third-party/cargo/unicode-script@0.5.8/LICENSE-APACHE +0 -201
  672. package/third-party/cargo/unicode-script@0.5.8/LICENSE-MIT +0 -27
  673. package/third-party/cargo/unicode-segmentation@1.13.3/COPYRIGHT +0 -7
  674. package/third-party/cargo/unicode-segmentation@1.13.3/Cargo.toml +0 -91
  675. package/third-party/cargo/unicode-segmentation@1.13.3/LICENSE-APACHE +0 -201
  676. package/third-party/cargo/unicode-segmentation@1.13.3/LICENSE-MIT +0 -25
  677. package/third-party/cargo/unicode-vo@0.1.0/Cargo.toml +0 -22
  678. package/third-party/cargo/unicode-vo@0.1.0/LICENSE-APACHE +0 -201
  679. package/third-party/cargo/unicode-vo@0.1.0/LICENSE-MIT +0 -21
  680. package/third-party/cargo/unicode-width@0.2.2/COPYRIGHT +0 -7
  681. package/third-party/cargo/unicode-width@0.2.2/Cargo.toml +0 -77
  682. package/third-party/cargo/unicode-width@0.2.2/LICENSE-APACHE +0 -201
  683. package/third-party/cargo/unicode-width@0.2.2/LICENSE-MIT +0 -25
  684. package/third-party/cargo/unicode-xid@0.2.6/COPYRIGHT +0 -7
  685. package/third-party/cargo/unicode-xid@0.2.6/Cargo.toml +0 -65
  686. package/third-party/cargo/unicode-xid@0.2.6/LICENSE-APACHE +0 -201
  687. package/third-party/cargo/unicode-xid@0.2.6/LICENSE-MIT +0 -25
  688. package/third-party/cargo/urlencoding@2.1.3/Cargo.toml +0 -41
  689. package/third-party/cargo/urlencoding@2.1.3/LICENSE +0 -20
  690. package/third-party/cargo/usvg@0.47.0/Cargo.toml +0 -138
  691. package/third-party/cargo/usvg@0.47.0/LICENSE-APACHE +0 -176
  692. package/third-party/cargo/usvg@0.47.0/LICENSE-MIT +0 -25
  693. package/third-party/cargo/version_check@0.9.5/Cargo.toml +0 -38
  694. package/third-party/cargo/version_check@0.9.5/LICENSE-APACHE +0 -201
  695. package/third-party/cargo/version_check@0.9.5/LICENSE-MIT +0 -19
  696. package/third-party/cargo/wasm-bindgen-futures@0.4.76/Cargo.toml +0 -88
  697. package/third-party/cargo/wasm-bindgen-futures@0.4.76/LICENSE-APACHE +0 -201
  698. package/third-party/cargo/wasm-bindgen-futures@0.4.76/LICENSE-MIT +0 -25
  699. package/third-party/cargo/wasm-bindgen-macro-support@0.2.126/Cargo.toml +0 -83
  700. package/third-party/cargo/wasm-bindgen-macro-support@0.2.126/LICENSE-APACHE +0 -201
  701. package/third-party/cargo/wasm-bindgen-macro-support@0.2.126/LICENSE-MIT +0 -25
  702. package/third-party/cargo/wasm-bindgen-macro@0.2.126/Cargo.toml +0 -73
  703. package/third-party/cargo/wasm-bindgen-macro@0.2.126/LICENSE-APACHE +0 -201
  704. package/third-party/cargo/wasm-bindgen-macro@0.2.126/LICENSE-MIT +0 -25
  705. package/third-party/cargo/wasm-bindgen-shared@0.2.126/Cargo.toml +0 -66
  706. package/third-party/cargo/wasm-bindgen-shared@0.2.126/LICENSE-APACHE +0 -201
  707. package/third-party/cargo/wasm-bindgen-shared@0.2.126/LICENSE-MIT +0 -25
  708. package/third-party/cargo/wasm-bindgen@0.2.126/Cargo.toml +0 -122
  709. package/third-party/cargo/wasm-bindgen@0.2.126/LICENSE-APACHE +0 -201
  710. package/third-party/cargo/wasm-bindgen@0.2.126/LICENSE-MIT +0 -25
  711. package/third-party/cargo/wayland-sys@0.31.11/Cargo.toml +0 -81
  712. package/third-party/cargo/wayland-sys@0.31.11/LICENSE.txt +0 -19
  713. package/third-party/cargo/web-sys@0.3.103/Cargo.toml +0 -2823
  714. package/third-party/cargo/web-sys@0.3.103/LICENSE-APACHE +0 -201
  715. package/third-party/cargo/web-sys@0.3.103/LICENSE-MIT +0 -25
  716. package/third-party/cargo/weezl@0.1.12/Cargo.toml +0 -120
  717. package/third-party/cargo/weezl@0.1.12/LICENSE-APACHE +0 -201
  718. package/third-party/cargo/weezl@0.1.12/LICENSE-MIT +0 -22
  719. package/third-party/cargo/wgpu-core-deps-apple@30.0.0/Cargo.toml +0 -53
  720. package/third-party/cargo/wgpu-core-deps-apple@30.0.0/LICENSE.APACHE +0 -176
  721. package/third-party/cargo/wgpu-core-deps-apple@30.0.0/LICENSE.MIT +0 -21
  722. package/third-party/cargo/wgpu-core@30.0.0/Cargo.toml +0 -237
  723. package/third-party/cargo/wgpu-core@30.0.0/LICENSE.APACHE +0 -176
  724. package/third-party/cargo/wgpu-core@30.0.0/LICENSE.MIT +0 -21
  725. package/third-party/cargo/wgpu-hal@30.0.0/Cargo.toml +0 -541
  726. package/third-party/cargo/wgpu-hal@30.0.0/LICENSE.APACHE +0 -176
  727. package/third-party/cargo/wgpu-hal@30.0.0/LICENSE.MIT +0 -21
  728. package/third-party/cargo/wgpu-naga-bridge@30.0.0/Cargo.toml +0 -46
  729. package/third-party/cargo/wgpu-naga-bridge@30.0.0/LICENSE.APACHE +0 -176
  730. package/third-party/cargo/wgpu-naga-bridge@30.0.0/LICENSE.MIT +0 -21
  731. package/third-party/cargo/wgpu-types@30.0.0/Cargo.toml +0 -161
  732. package/third-party/cargo/wgpu-types@30.0.0/LICENSE.APACHE +0 -176
  733. package/third-party/cargo/wgpu-types@30.0.0/LICENSE.MIT +0 -21
  734. package/third-party/cargo/wgpu@30.0.0/Cargo.toml +0 -278
  735. package/third-party/cargo/wgpu@30.0.0/LICENSE.APACHE +0 -176
  736. package/third-party/cargo/wgpu@30.0.0/LICENSE.MIT +0 -21
  737. package/third-party/cargo/xmlwriter@0.1.0/Cargo.toml +0 -23
  738. package/third-party/cargo/xmlwriter@0.1.0/LICENSE +0 -21
  739. package/third-party/cargo/yazi@0.2.1/Cargo.toml +0 -45
  740. package/third-party/cargo/yazi@0.2.1/LICENSE-APACHE +0 -201
  741. package/third-party/cargo/yazi@0.2.1/LICENSE-MIT +0 -19
  742. package/third-party/cargo/zeno@0.3.3/Cargo.toml +0 -65
  743. package/third-party/cargo/zeno@0.3.3/LICENSE-APACHE +0 -201
  744. package/third-party/cargo/zeno@0.3.3/LICENSE-MIT +0 -25
  745. package/third-party/cargo/zerocopy-derive@0.8.54/Cargo.toml +0 -209
  746. package/third-party/cargo/zerocopy-derive@0.8.54/LICENSE-APACHE +0 -202
  747. package/third-party/cargo/zerocopy-derive@0.8.54/LICENSE-BSD +0 -24
  748. package/third-party/cargo/zerocopy-derive@0.8.54/LICENSE-MIT +0 -26
  749. package/third-party/cargo/zerocopy@0.8.54/Cargo.toml +0 -419
  750. package/third-party/cargo/zerocopy@0.8.54/LICENSE-APACHE +0 -202
  751. package/third-party/cargo/zerocopy@0.8.54/LICENSE-BSD +0 -24
  752. package/third-party/cargo/zerocopy@0.8.54/LICENSE-MIT +0 -26
  753. package/third-party/cargo/zmij@1.0.23/Cargo.toml +0 -90
  754. package/third-party/cargo/zmij@1.0.23/LICENSE-MIT +0 -23
  755. package/third-party/cargo/zune-core@0.5.1/Cargo.toml +0 -47
  756. package/third-party/cargo/zune-core@0.5.1/LICENSE-APACHE +0 -201
  757. package/third-party/cargo/zune-core@0.5.1/LICENSE-MIT +0 -21
  758. package/third-party/cargo/zune-core@0.5.1/LICENSE-ZLIB +0 -19
  759. package/third-party/cargo/zune-jpeg@0.5.15/Cargo.toml +0 -67
  760. package/third-party/cargo/zune-jpeg@0.5.15/LICENSE-APACHE +0 -201
  761. package/third-party/cargo/zune-jpeg@0.5.15/LICENSE-MIT +0 -21
  762. package/third-party/cargo/zune-jpeg@0.5.15/LICENSE-ZLIB +0 -19
  763. package/third-party/npm/@esbuild__darwin-arm64@0.27.4/esbuild-0.27.4-LICENSE.md +0 -21
  764. package/third-party/npm/@esbuild__darwin-arm64@0.27.4/go-LICENSE +0 -27
  765. package/third-party/npm/@esbuild__darwin-arm64@0.27.4/golang-x-sys-c0bba94af5f8-LICENSE +0 -27
  766. package/third-party/npm/@esbuild__darwin-arm64@0.27.4/package.json +0 -20
  767. package/third-party/npm/@floating-ui__core@1.7.5/LICENSE +0 -20
  768. package/third-party/npm/@floating-ui__core@1.7.5/package.json +0 -63
  769. package/third-party/npm/@floating-ui__dom@1.7.6/LICENSE +0 -20
  770. package/third-party/npm/@floating-ui__dom@1.7.6/package.json +0 -71
  771. package/third-party/npm/@floating-ui__react-dom@2.1.8/LICENSE +0 -20
  772. package/third-party/npm/@floating-ui__react-dom@2.1.8/package.json +0 -76
  773. package/third-party/npm/@floating-ui__utils@0.2.11/LICENSE +0 -20
  774. package/third-party/npm/@floating-ui__utils@0.2.11/package.json +0 -70
  775. package/third-party/npm/@radix-ui__primitive@1.1.7/LICENSE +0 -21
  776. package/third-party/npm/@radix-ui__primitive@1.1.7/package.json +0 -79
  777. package/third-party/npm/@radix-ui__react-arrow@1.1.15/LICENSE +0 -21
  778. package/third-party/npm/@radix-ui__react-arrow@1.1.15/package.json +0 -68
  779. package/third-party/npm/@radix-ui__react-collection@1.1.15/LICENSE +0 -21
  780. package/third-party/npm/@radix-ui__react-collection@1.1.15/package.json +0 -71
  781. package/third-party/npm/@radix-ui__react-compose-refs@1.1.5/LICENSE +0 -21
  782. package/third-party/npm/@radix-ui__react-compose-refs@1.1.5/package.json +0 -60
  783. package/third-party/npm/@radix-ui__react-context-menu@2.3.7/LICENSE +0 -21
  784. package/third-party/npm/@radix-ui__react-context-menu@2.3.7/package.json +0 -73
  785. package/third-party/npm/@radix-ui__react-context@1.2.2/LICENSE +0 -21
  786. package/third-party/npm/@radix-ui__react-context@1.2.2/package.json +0 -60
  787. package/third-party/npm/@radix-ui__react-direction@1.1.4/LICENSE +0 -21
  788. package/third-party/npm/@radix-ui__react-direction@1.1.4/package.json +0 -60
  789. package/third-party/npm/@radix-ui__react-dismissable-layer@1.1.19/LICENSE +0 -21
  790. package/third-party/npm/@radix-ui__react-dismissable-layer@1.1.19/package.json +0 -74
  791. package/third-party/npm/@radix-ui__react-focus-guards@1.1.6/LICENSE +0 -21
  792. package/third-party/npm/@radix-ui__react-focus-guards@1.1.6/package.json +0 -60
  793. package/third-party/npm/@radix-ui__react-focus-scope@1.1.16/LICENSE +0 -21
  794. package/third-party/npm/@radix-ui__react-focus-scope@1.1.16/package.json +0 -71
  795. package/third-party/npm/@radix-ui__react-id@1.1.4/LICENSE +0 -21
  796. package/third-party/npm/@radix-ui__react-id@1.1.4/package.json +0 -63
  797. package/third-party/npm/@radix-ui__react-menu@2.1.24/LICENSE +0 -21
  798. package/third-party/npm/@radix-ui__react-menu@2.1.24/package.json +0 -86
  799. package/third-party/npm/@radix-ui__react-popper@1.3.7/LICENSE +0 -21
  800. package/third-party/npm/@radix-ui__react-popper@1.3.7/package.json +0 -78
  801. package/third-party/npm/@radix-ui__react-portal@1.1.17/LICENSE +0 -21
  802. package/third-party/npm/@radix-ui__react-portal@1.1.17/package.json +0 -69
  803. package/third-party/npm/@radix-ui__react-presence@1.1.10/LICENSE +0 -21
  804. package/third-party/npm/@radix-ui__react-presence@1.1.10/package.json +0 -68
  805. package/third-party/npm/@radix-ui__react-primitive@2.1.10/LICENSE +0 -21
  806. package/third-party/npm/@radix-ui__react-primitive@2.1.10/package.json +0 -68
  807. package/third-party/npm/@radix-ui__react-roving-focus@1.1.19/LICENSE +0 -21
  808. package/third-party/npm/@radix-ui__react-roving-focus@1.1.19/package.json +0 -78
  809. package/third-party/npm/@radix-ui__react-slot@1.3.3/LICENSE +0 -21
  810. package/third-party/npm/@radix-ui__react-slot@1.3.3/package.json +0 -63
  811. package/third-party/npm/@radix-ui__react-use-callback-ref@1.1.4/LICENSE +0 -21
  812. package/third-party/npm/@radix-ui__react-use-callback-ref@1.1.4/package.json +0 -60
  813. package/third-party/npm/@radix-ui__react-use-controllable-state@1.2.6/LICENSE +0 -21
  814. package/third-party/npm/@radix-ui__react-use-controllable-state@1.2.6/package.json +0 -65
  815. package/third-party/npm/@radix-ui__react-use-effect-event@0.0.5/LICENSE +0 -21
  816. package/third-party/npm/@radix-ui__react-use-effect-event@0.0.5/package.json +0 -65
  817. package/third-party/npm/@radix-ui__react-use-is-hydrated@0.1.3/LICENSE +0 -21
  818. package/third-party/npm/@radix-ui__react-use-is-hydrated@0.1.3/package.json +0 -61
  819. package/third-party/npm/@radix-ui__react-use-layout-effect@1.1.4/LICENSE +0 -21
  820. package/third-party/npm/@radix-ui__react-use-layout-effect@1.1.4/package.json +0 -60
  821. package/third-party/npm/@radix-ui__react-use-size@1.1.4/LICENSE +0 -21
  822. package/third-party/npm/@radix-ui__react-use-size@1.1.4/package.json +0 -63
  823. package/third-party/npm/aria-hidden@1.2.6/LICENSE +0 -21
  824. package/third-party/npm/aria-hidden@1.2.6/package.json +0 -71
  825. package/third-party/npm/detect-node-es@1.1.0/LICENSE +0 -21
  826. package/third-party/npm/detect-node-es@1.1.0/package.json +0 -29
  827. package/third-party/npm/esbuild@0.27.4/LICENSE.md +0 -21
  828. package/third-party/npm/esbuild@0.27.4/package.json +0 -49
  829. package/third-party/npm/get-nonce@1.0.1/LICENSE +0 -21
  830. package/third-party/npm/get-nonce@1.0.1/package.json +0 -68
  831. package/third-party/npm/mediabunny@1.52.2/LICENSE +0 -373
  832. package/third-party/npm/mediabunny@1.52.2/package.json +0 -136
  833. package/third-party/npm/mediabunny@1.52.2/source/LICENSE +0 -373
  834. package/third-party/npm/mediabunny@1.52.2/source/package.json +0 -136
  835. package/third-party/npm/mediabunny@1.52.2/source/src/adts/adts-demuxer.ts +0 -400
  836. package/third-party/npm/mediabunny@1.52.2/source/src/adts/adts-muxer.ts +0 -124
  837. package/third-party/npm/mediabunny@1.52.2/source/src/adts/adts-reader.ts +0 -85
  838. package/third-party/npm/mediabunny@1.52.2/source/src/aes.ts +0 -307
  839. package/third-party/npm/mediabunny@1.52.2/source/src/codec-data.ts +0 -3178
  840. package/third-party/npm/mediabunny@1.52.2/source/src/codec.ts +0 -1154
  841. package/third-party/npm/mediabunny@1.52.2/source/src/conversion.ts +0 -2042
  842. package/third-party/npm/mediabunny@1.52.2/source/src/custom-coder.ts +0 -212
  843. package/third-party/npm/mediabunny@1.52.2/source/src/decode.ts +0 -263
  844. package/third-party/npm/mediabunny@1.52.2/source/src/demuxer.ts +0 -43
  845. package/third-party/npm/mediabunny@1.52.2/source/src/encode.ts +0 -1412
  846. package/third-party/npm/mediabunny@1.52.2/source/src/flac/flac-demuxer.ts +0 -813
  847. package/third-party/npm/mediabunny@1.52.2/source/src/flac/flac-misc.ts +0 -165
  848. package/third-party/npm/mediabunny@1.52.2/source/src/flac/flac-muxer.ts +0 -350
  849. package/third-party/npm/mediabunny@1.52.2/source/src/hls/hls-demuxer.ts +0 -995
  850. package/third-party/npm/mediabunny@1.52.2/source/src/hls/hls-misc.ts +0 -81
  851. package/third-party/npm/mediabunny@1.52.2/source/src/hls/hls-muxer.ts +0 -1529
  852. package/third-party/npm/mediabunny@1.52.2/source/src/hls/hls-segmented-input.ts +0 -772
  853. package/third-party/npm/mediabunny@1.52.2/source/src/id3.ts +0 -972
  854. package/third-party/npm/mediabunny@1.52.2/source/src/index.ts +0 -319
  855. package/third-party/npm/mediabunny@1.52.2/source/src/input-format.ts +0 -819
  856. package/third-party/npm/mediabunny@1.52.2/source/src/input-track.ts +0 -1141
  857. package/third-party/npm/mediabunny@1.52.2/source/src/input.ts +0 -571
  858. package/third-party/npm/mediabunny@1.52.2/source/src/isobmff/isobmff-boxes.ts +0 -1911
  859. package/third-party/npm/mediabunny@1.52.2/source/src/isobmff/isobmff-demuxer.ts +0 -3953
  860. package/third-party/npm/mediabunny@1.52.2/source/src/isobmff/isobmff-misc.ts +0 -90
  861. package/third-party/npm/mediabunny@1.52.2/source/src/isobmff/isobmff-muxer.ts +0 -1595
  862. package/third-party/npm/mediabunny@1.52.2/source/src/isobmff/isobmff-reader.ts +0 -91
  863. package/third-party/npm/mediabunny@1.52.2/source/src/logging.ts +0 -120
  864. package/third-party/npm/mediabunny@1.52.2/source/src/matroska/ebml.ts +0 -770
  865. package/third-party/npm/mediabunny@1.52.2/source/src/matroska/matroska-demuxer.ts +0 -2598
  866. package/third-party/npm/mediabunny@1.52.2/source/src/matroska/matroska-misc.ts +0 -29
  867. package/third-party/npm/mediabunny@1.52.2/source/src/matroska/matroska-muxer.ts +0 -1360
  868. package/third-party/npm/mediabunny@1.52.2/source/src/media-sink.ts +0 -2589
  869. package/third-party/npm/mediabunny@1.52.2/source/src/media-source.ts +0 -3041
  870. package/third-party/npm/mediabunny@1.52.2/source/src/metadata.ts +0 -335
  871. package/third-party/npm/mediabunny@1.52.2/source/src/misc.ts +0 -1336
  872. package/third-party/npm/mediabunny@1.52.2/source/src/mp3/mp3-demuxer.ts +0 -469
  873. package/third-party/npm/mediabunny@1.52.2/source/src/mp3/mp3-muxer.ts +0 -169
  874. package/third-party/npm/mediabunny@1.52.2/source/src/mp3/mp3-reader.ts +0 -61
  875. package/third-party/npm/mediabunny@1.52.2/source/src/mp3/mp3-writer.ts +0 -121
  876. package/third-party/npm/mediabunny@1.52.2/source/src/mpeg-ts/mpeg-ts-demuxer.ts +0 -2519
  877. package/third-party/npm/mediabunny@1.52.2/source/src/mpeg-ts/mpeg-ts-misc.ts +0 -32
  878. package/third-party/npm/mediabunny@1.52.2/source/src/mpeg-ts/mpeg-ts-muxer.ts +0 -842
  879. package/third-party/npm/mediabunny@1.52.2/source/src/muxer.ts +0 -80
  880. package/third-party/npm/mediabunny@1.52.2/source/src/node.ts +0 -11
  881. package/third-party/npm/mediabunny@1.52.2/source/src/ogg/ogg-demuxer.ts +0 -1087
  882. package/third-party/npm/mediabunny@1.52.2/source/src/ogg/ogg-misc.ts +0 -116
  883. package/third-party/npm/mediabunny@1.52.2/source/src/ogg/ogg-muxer.ts +0 -527
  884. package/third-party/npm/mediabunny@1.52.2/source/src/ogg/ogg-reader.ts +0 -93
  885. package/third-party/npm/mediabunny@1.52.2/source/src/output-format.ts +0 -1425
  886. package/third-party/npm/mediabunny@1.52.2/source/src/output.ts +0 -940
  887. package/third-party/npm/mediabunny@1.52.2/source/src/packet.ts +0 -287
  888. package/third-party/npm/mediabunny@1.52.2/source/src/pcm.ts +0 -112
  889. package/third-party/npm/mediabunny@1.52.2/source/src/reader.ts +0 -391
  890. package/third-party/npm/mediabunny@1.52.2/source/src/resample.ts +0 -287
  891. package/third-party/npm/mediabunny@1.52.2/source/src/sample.ts +0 -3231
  892. package/third-party/npm/mediabunny@1.52.2/source/src/segmented-input.ts +0 -575
  893. package/third-party/npm/mediabunny@1.52.2/source/src/source.ts +0 -2588
  894. package/third-party/npm/mediabunny@1.52.2/source/src/subtitles.ts +0 -131
  895. package/third-party/npm/mediabunny@1.52.2/source/src/target.ts +0 -871
  896. package/third-party/npm/mediabunny@1.52.2/source/src/tsconfig.json +0 -16
  897. package/third-party/npm/mediabunny@1.52.2/source/src/wave/riff-writer.ts +0 -36
  898. package/third-party/npm/mediabunny@1.52.2/source/src/wave/wave-demuxer.ts +0 -583
  899. package/third-party/npm/mediabunny@1.52.2/source/src/wave/wave-muxer.ts +0 -375
  900. package/third-party/npm/mediabunny@1.52.2/source/src/writer.ts +0 -128
  901. package/third-party/npm/react-dom@19.3.0/LICENSE +0 -21
  902. package/third-party/npm/react-dom@19.3.0/package.json +0 -117
  903. package/third-party/npm/react-remove-scroll-bar@2.3.8/package.json +0 -85
  904. package/third-party/npm/react-remove-scroll-bar@2.3.8/react-remove-scroll-bar-LICENSE +0 -21
  905. package/third-party/npm/react-remove-scroll@2.7.2/LICENSE +0 -21
  906. package/third-party/npm/react-remove-scroll@2.7.2/package.json +0 -98
  907. package/third-party/npm/react-style-singleton@2.2.3/LICENSE +0 -21
  908. package/third-party/npm/react-style-singleton@2.2.3/package.json +0 -90
  909. package/third-party/npm/react@19.3.0/LICENSE +0 -21
  910. package/third-party/npm/react@19.3.0/package.json +0 -51
  911. package/third-party/npm/scheduler@0.28.0/LICENSE +0 -21
  912. package/third-party/npm/scheduler@0.28.0/package.json +0 -27
  913. package/third-party/npm/tslib@2.8.1/LICENSE.txt +0 -12
  914. package/third-party/npm/tslib@2.8.1/package.json +0 -47
  915. package/third-party/npm/typescript@5.9.3/LICENSE.txt +0 -55
  916. package/third-party/npm/typescript@5.9.3/ThirdPartyNoticeText.txt +0 -193
  917. package/third-party/npm/typescript@5.9.3/package.json +0 -120
  918. package/third-party/npm/use-callback-ref@1.3.3/LICENSE +0 -21
  919. package/third-party/npm/use-callback-ref@1.3.3/package.json +0 -85
  920. package/third-party/npm/use-sidecar@1.1.3/LICENSE +0 -21
  921. package/third-party/npm/use-sidecar@1.1.3/package.json +0 -93
  922. package/third-party/packages/render-engine/assets/OFL.txt +0 -93
  923. package/third-party/packages/studio/public/fonts/OFL.txt +0 -93
  924. package/third-party/packages/studio/vendor/osmo-icons/LICENSE +0 -21
  925. package/third-party/packages/studio/vendor/shadcn/LICENSE +0 -21
  926. package/third-party/repository-notices.md +0 -41
  927. package/third-party/rust-standard-library/COPYRIGHT-library.html +0 -5556
  928. package/third-party/rust-standard-library/licenses/Apache-2.0.txt +0 -73
  929. package/third-party/rust-standard-library/licenses/BSD-2-Clause.txt +0 -9
  930. package/third-party/rust-standard-library/licenses/CC-BY-SA-4.0.txt +0 -427
  931. package/third-party/rust-standard-library/licenses/GCC-exception-3.1.txt +0 -30
  932. package/third-party/rust-standard-library/licenses/GPL-2.0-only.txt +0 -133
  933. package/third-party/rust-standard-library/licenses/GPL-3.0-or-later.txt +0 -202
  934. package/third-party/rust-standard-library/licenses/ISC.txt +0 -7
  935. package/third-party/rust-standard-library/licenses/LLVM-exception.txt +0 -15
  936. package/third-party/rust-standard-library/licenses/MIT.txt +0 -9
  937. package/third-party/rust-standard-library/licenses/NCSA.txt +0 -29
  938. package/third-party/rust-standard-library/licenses/OFL-1.1.txt +0 -43
  939. package/third-party/rust-standard-library/licenses/Unicode-3.0.txt +0 -39
  940. package/third-party/rust-standard-library/version.txt +0 -1
  941. package/vendor/osmo-lite +0 -0
  942. package/vendor/osmo-scene-0.1.0.tgz +0 -0
  943. package/vendor/platform.json +0 -1
@@ -1,2532 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // lib/npm/node.ts
31
- var node_exports = {};
32
- __export(node_exports, {
33
- analyzeMetafile: () => analyzeMetafile,
34
- analyzeMetafileSync: () => analyzeMetafileSync,
35
- build: () => build,
36
- buildSync: () => buildSync,
37
- context: () => context,
38
- default: () => node_default,
39
- formatMessages: () => formatMessages,
40
- formatMessagesSync: () => formatMessagesSync,
41
- initialize: () => initialize,
42
- stop: () => stop,
43
- transform: () => transform,
44
- transformSync: () => transformSync,
45
- version: () => version
46
- });
47
- module.exports = __toCommonJS(node_exports);
48
-
49
- // lib/shared/stdio_protocol.ts
50
- function encodePacket(packet) {
51
- let visit = (value) => {
52
- if (value === null) {
53
- bb.write8(0);
54
- } else if (typeof value === "boolean") {
55
- bb.write8(1);
56
- bb.write8(+value);
57
- } else if (typeof value === "number") {
58
- bb.write8(2);
59
- bb.write32(value | 0);
60
- } else if (typeof value === "string") {
61
- bb.write8(3);
62
- bb.write(encodeUTF8(value));
63
- } else if (value instanceof Uint8Array) {
64
- bb.write8(4);
65
- bb.write(value);
66
- } else if (value instanceof Array) {
67
- bb.write8(5);
68
- bb.write32(value.length);
69
- for (let item of value) {
70
- visit(item);
71
- }
72
- } else {
73
- let keys = Object.keys(value);
74
- bb.write8(6);
75
- bb.write32(keys.length);
76
- for (let key of keys) {
77
- bb.write(encodeUTF8(key));
78
- visit(value[key]);
79
- }
80
- }
81
- };
82
- let bb = new ByteBuffer();
83
- bb.write32(0);
84
- bb.write32(packet.id << 1 | +!packet.isRequest);
85
- visit(packet.value);
86
- writeUInt32LE(bb.buf, bb.len - 4, 0);
87
- return bb.buf.subarray(0, bb.len);
88
- }
89
- function decodePacket(bytes) {
90
- let visit = () => {
91
- switch (bb.read8()) {
92
- case 0:
93
- return null;
94
- case 1:
95
- return !!bb.read8();
96
- case 2:
97
- return bb.read32();
98
- case 3:
99
- return decodeUTF8(bb.read());
100
- case 4:
101
- return bb.read();
102
- case 5: {
103
- let count = bb.read32();
104
- let value2 = [];
105
- for (let i = 0; i < count; i++) {
106
- value2.push(visit());
107
- }
108
- return value2;
109
- }
110
- case 6: {
111
- let count = bb.read32();
112
- let value2 = {};
113
- for (let i = 0; i < count; i++) {
114
- value2[decodeUTF8(bb.read())] = visit();
115
- }
116
- return value2;
117
- }
118
- default:
119
- throw new Error("Invalid packet");
120
- }
121
- };
122
- let bb = new ByteBuffer(bytes);
123
- let id = bb.read32();
124
- let isRequest = (id & 1) === 0;
125
- id >>>= 1;
126
- let value = visit();
127
- if (bb.ptr !== bytes.length) {
128
- throw new Error("Invalid packet");
129
- }
130
- return { id, isRequest, value };
131
- }
132
- var ByteBuffer = class {
133
- constructor(buf = new Uint8Array(1024)) {
134
- this.buf = buf;
135
- this.len = 0;
136
- this.ptr = 0;
137
- }
138
- _write(delta) {
139
- if (this.len + delta > this.buf.length) {
140
- let clone = new Uint8Array((this.len + delta) * 2);
141
- clone.set(this.buf);
142
- this.buf = clone;
143
- }
144
- this.len += delta;
145
- return this.len - delta;
146
- }
147
- write8(value) {
148
- let offset = this._write(1);
149
- this.buf[offset] = value;
150
- }
151
- write32(value) {
152
- let offset = this._write(4);
153
- writeUInt32LE(this.buf, value, offset);
154
- }
155
- write(bytes) {
156
- let offset = this._write(4 + bytes.length);
157
- writeUInt32LE(this.buf, bytes.length, offset);
158
- this.buf.set(bytes, offset + 4);
159
- }
160
- _read(delta) {
161
- if (this.ptr + delta > this.buf.length) {
162
- throw new Error("Invalid packet");
163
- }
164
- this.ptr += delta;
165
- return this.ptr - delta;
166
- }
167
- read8() {
168
- return this.buf[this._read(1)];
169
- }
170
- read32() {
171
- return readUInt32LE(this.buf, this._read(4));
172
- }
173
- read() {
174
- let length = this.read32();
175
- let bytes = new Uint8Array(length);
176
- let ptr = this._read(bytes.length);
177
- bytes.set(this.buf.subarray(ptr, ptr + length));
178
- return bytes;
179
- }
180
- };
181
- var encodeUTF8;
182
- var decodeUTF8;
183
- var encodeInvariant;
184
- if (typeof TextEncoder !== "undefined" && typeof TextDecoder !== "undefined") {
185
- let encoder = new TextEncoder();
186
- let decoder = new TextDecoder();
187
- encodeUTF8 = (text) => encoder.encode(text);
188
- decodeUTF8 = (bytes) => decoder.decode(bytes);
189
- encodeInvariant = 'new TextEncoder().encode("")';
190
- } else if (typeof Buffer !== "undefined") {
191
- encodeUTF8 = (text) => Buffer.from(text);
192
- decodeUTF8 = (bytes) => {
193
- let { buffer, byteOffset, byteLength } = bytes;
194
- return Buffer.from(buffer, byteOffset, byteLength).toString();
195
- };
196
- encodeInvariant = 'Buffer.from("")';
197
- } else {
198
- throw new Error("No UTF-8 codec found");
199
- }
200
- if (!(encodeUTF8("") instanceof Uint8Array))
201
- throw new Error(`Invariant violation: "${encodeInvariant} instanceof Uint8Array" is incorrectly false
202
-
203
- This indicates that your JavaScript environment is broken. You cannot use
204
- esbuild in this environment because esbuild relies on this invariant. This
205
- is not a problem with esbuild. You need to fix your environment instead.
206
- `);
207
- function readUInt32LE(buffer, offset) {
208
- return (buffer[offset++] | buffer[offset++] << 8 | buffer[offset++] << 16 | buffer[offset++] << 24) >>> 0;
209
- }
210
- function writeUInt32LE(buffer, value, offset) {
211
- buffer[offset++] = value;
212
- buffer[offset++] = value >> 8;
213
- buffer[offset++] = value >> 16;
214
- buffer[offset++] = value >> 24;
215
- }
216
-
217
- // lib/shared/uint8array_json_parser.ts
218
- var fromCharCode = String.fromCharCode;
219
- function throwSyntaxError(bytes, index, message) {
220
- const c = bytes[index];
221
- let line = 1;
222
- let column = 0;
223
- for (let i = 0; i < index; i++) {
224
- if (bytes[i] === 10 /* Newline */) {
225
- line++;
226
- column = 0;
227
- } else {
228
- column++;
229
- }
230
- }
231
- throw new SyntaxError(
232
- message ? message : index === bytes.length ? "Unexpected end of input while parsing JSON" : c >= 32 && c <= 126 ? `Unexpected character ${fromCharCode(c)} in JSON at position ${index} (line ${line}, column ${column})` : `Unexpected byte 0x${c.toString(16)} in JSON at position ${index} (line ${line}, column ${column})`
233
- );
234
- }
235
- function JSON_parse(bytes) {
236
- if (!(bytes instanceof Uint8Array)) {
237
- throw new Error(`JSON input must be a Uint8Array`);
238
- }
239
- const propertyStack = [];
240
- const objectStack = [];
241
- const stateStack = [];
242
- const length = bytes.length;
243
- let property = null;
244
- let state = 0 /* TopLevel */;
245
- let object;
246
- let i = 0;
247
- while (i < length) {
248
- let c = bytes[i++];
249
- if (c <= 32 /* Space */) {
250
- continue;
251
- }
252
- let value;
253
- if (state === 2 /* Object */ && property === null && c !== 34 /* Quote */ && c !== 125 /* CloseBrace */) {
254
- throwSyntaxError(bytes, --i);
255
- }
256
- switch (c) {
257
- // True
258
- case 116 /* LowerT */: {
259
- if (bytes[i++] !== 114 /* LowerR */ || bytes[i++] !== 117 /* LowerU */ || bytes[i++] !== 101 /* LowerE */) {
260
- throwSyntaxError(bytes, --i);
261
- }
262
- value = true;
263
- break;
264
- }
265
- // False
266
- case 102 /* LowerF */: {
267
- if (bytes[i++] !== 97 /* LowerA */ || bytes[i++] !== 108 /* LowerL */ || bytes[i++] !== 115 /* LowerS */ || bytes[i++] !== 101 /* LowerE */) {
268
- throwSyntaxError(bytes, --i);
269
- }
270
- value = false;
271
- break;
272
- }
273
- // Null
274
- case 110 /* LowerN */: {
275
- if (bytes[i++] !== 117 /* LowerU */ || bytes[i++] !== 108 /* LowerL */ || bytes[i++] !== 108 /* LowerL */) {
276
- throwSyntaxError(bytes, --i);
277
- }
278
- value = null;
279
- break;
280
- }
281
- // Number begin
282
- case 45 /* Minus */:
283
- case 46 /* Dot */:
284
- case 48 /* Digit0 */:
285
- case 49 /* Digit1 */:
286
- case 50 /* Digit2 */:
287
- case 51 /* Digit3 */:
288
- case 52 /* Digit4 */:
289
- case 53 /* Digit5 */:
290
- case 54 /* Digit6 */:
291
- case 55 /* Digit7 */:
292
- case 56 /* Digit8 */:
293
- case 57 /* Digit9 */: {
294
- let index = i;
295
- value = fromCharCode(c);
296
- c = bytes[i];
297
- while (true) {
298
- switch (c) {
299
- case 43 /* Plus */:
300
- case 45 /* Minus */:
301
- case 46 /* Dot */:
302
- case 48 /* Digit0 */:
303
- case 49 /* Digit1 */:
304
- case 50 /* Digit2 */:
305
- case 51 /* Digit3 */:
306
- case 52 /* Digit4 */:
307
- case 53 /* Digit5 */:
308
- case 54 /* Digit6 */:
309
- case 55 /* Digit7 */:
310
- case 56 /* Digit8 */:
311
- case 57 /* Digit9 */:
312
- case 101 /* LowerE */:
313
- case 69 /* UpperE */: {
314
- value += fromCharCode(c);
315
- c = bytes[++i];
316
- continue;
317
- }
318
- }
319
- break;
320
- }
321
- value = +value;
322
- if (isNaN(value)) {
323
- throwSyntaxError(bytes, --index, "Invalid number");
324
- }
325
- break;
326
- }
327
- // String begin
328
- case 34 /* Quote */: {
329
- value = "";
330
- while (true) {
331
- if (i >= length) {
332
- throwSyntaxError(bytes, length);
333
- }
334
- c = bytes[i++];
335
- if (c === 34 /* Quote */) {
336
- break;
337
- } else if (c === 92 /* Backslash */) {
338
- switch (bytes[i++]) {
339
- // Normal escape sequence
340
- case 34 /* Quote */:
341
- value += '"';
342
- break;
343
- case 47 /* Slash */:
344
- value += "/";
345
- break;
346
- case 92 /* Backslash */:
347
- value += "\\";
348
- break;
349
- case 98 /* LowerB */:
350
- value += "\b";
351
- break;
352
- case 102 /* LowerF */:
353
- value += "\f";
354
- break;
355
- case 110 /* LowerN */:
356
- value += "\n";
357
- break;
358
- case 114 /* LowerR */:
359
- value += "\r";
360
- break;
361
- case 116 /* LowerT */:
362
- value += " ";
363
- break;
364
- // Unicode escape sequence
365
- case 117 /* LowerU */: {
366
- let code = 0;
367
- for (let j = 0; j < 4; j++) {
368
- c = bytes[i++];
369
- code <<= 4;
370
- if (c >= 48 /* Digit0 */ && c <= 57 /* Digit9 */) code |= c - 48 /* Digit0 */;
371
- else if (c >= 97 /* LowerA */ && c <= 102 /* LowerF */) code |= c + (10 - 97 /* LowerA */);
372
- else if (c >= 65 /* UpperA */ && c <= 70 /* UpperF */) code |= c + (10 - 65 /* UpperA */);
373
- else throwSyntaxError(bytes, --i);
374
- }
375
- value += fromCharCode(code);
376
- break;
377
- }
378
- // Invalid escape sequence
379
- default:
380
- throwSyntaxError(bytes, --i);
381
- break;
382
- }
383
- } else if (c <= 127) {
384
- value += fromCharCode(c);
385
- } else if ((c & 224) === 192) {
386
- value += fromCharCode((c & 31) << 6 | bytes[i++] & 63);
387
- } else if ((c & 240) === 224) {
388
- value += fromCharCode((c & 15) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63);
389
- } else if ((c & 248) == 240) {
390
- let codePoint = (c & 7) << 18 | (bytes[i++] & 63) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63;
391
- if (codePoint > 65535) {
392
- codePoint -= 65536;
393
- value += fromCharCode(codePoint >> 10 & 1023 | 55296);
394
- codePoint = 56320 | codePoint & 1023;
395
- }
396
- value += fromCharCode(codePoint);
397
- }
398
- }
399
- value[0];
400
- break;
401
- }
402
- // Array begin
403
- case 91 /* OpenBracket */: {
404
- value = [];
405
- propertyStack.push(property);
406
- objectStack.push(object);
407
- stateStack.push(state);
408
- property = null;
409
- object = value;
410
- state = 1 /* Array */;
411
- continue;
412
- }
413
- // Object begin
414
- case 123 /* OpenBrace */: {
415
- value = {};
416
- propertyStack.push(property);
417
- objectStack.push(object);
418
- stateStack.push(state);
419
- property = null;
420
- object = value;
421
- state = 2 /* Object */;
422
- continue;
423
- }
424
- // Array end
425
- case 93 /* CloseBracket */: {
426
- if (state !== 1 /* Array */) {
427
- throwSyntaxError(bytes, --i);
428
- }
429
- value = object;
430
- property = propertyStack.pop();
431
- object = objectStack.pop();
432
- state = stateStack.pop();
433
- break;
434
- }
435
- // Object end
436
- case 125 /* CloseBrace */: {
437
- if (state !== 2 /* Object */) {
438
- throwSyntaxError(bytes, --i);
439
- }
440
- value = object;
441
- property = propertyStack.pop();
442
- object = objectStack.pop();
443
- state = stateStack.pop();
444
- break;
445
- }
446
- default: {
447
- throwSyntaxError(bytes, --i);
448
- }
449
- }
450
- c = bytes[i];
451
- while (c <= 32 /* Space */) {
452
- c = bytes[++i];
453
- }
454
- switch (state) {
455
- case 0 /* TopLevel */: {
456
- if (i === length) {
457
- return value;
458
- }
459
- break;
460
- }
461
- case 1 /* Array */: {
462
- object.push(value);
463
- if (c === 44 /* Comma */) {
464
- i++;
465
- continue;
466
- }
467
- if (c === 93 /* CloseBracket */) {
468
- continue;
469
- }
470
- break;
471
- }
472
- case 2 /* Object */: {
473
- if (property === null) {
474
- property = value;
475
- if (c === 58 /* Colon */) {
476
- i++;
477
- continue;
478
- }
479
- } else {
480
- object[property] = value;
481
- property = null;
482
- if (c === 44 /* Comma */) {
483
- i++;
484
- continue;
485
- }
486
- if (c === 125 /* CloseBrace */) {
487
- continue;
488
- }
489
- }
490
- break;
491
- }
492
- }
493
- break;
494
- }
495
- throwSyntaxError(bytes, i);
496
- }
497
-
498
- // lib/shared/common.ts
499
- var quote = JSON.stringify;
500
- var buildLogLevelDefault = "warning";
501
- var transformLogLevelDefault = "silent";
502
- function validateAndJoinStringArray(values, what) {
503
- const toJoin = [];
504
- for (const value of values) {
505
- validateStringValue(value, what);
506
- if (value.indexOf(",") >= 0) throw new Error(`Invalid ${what}: ${value}`);
507
- toJoin.push(value);
508
- }
509
- return toJoin.join(",");
510
- }
511
- var canBeAnything = () => null;
512
- var mustBeBoolean = (value) => typeof value === "boolean" ? null : "a boolean";
513
- var mustBeString = (value) => typeof value === "string" ? null : "a string";
514
- var mustBeRegExp = (value) => value instanceof RegExp ? null : "a RegExp object";
515
- var mustBeInteger = (value) => typeof value === "number" && value === (value | 0) ? null : "an integer";
516
- var mustBeValidPortNumber = (value) => typeof value === "number" && value === (value | 0) && value >= 0 && value <= 65535 ? null : "a valid port number";
517
- var mustBeFunction = (value) => typeof value === "function" ? null : "a function";
518
- var mustBeArray = (value) => Array.isArray(value) ? null : "an array";
519
- var mustBeArrayOfStrings = (value) => Array.isArray(value) && value.every((x) => typeof x === "string") ? null : "an array of strings";
520
- var mustBeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? null : "an object";
521
- var mustBeEntryPoints = (value) => typeof value === "object" && value !== null ? null : "an array or an object";
522
- var mustBeWebAssemblyModule = (value) => value instanceof WebAssembly.Module ? null : "a WebAssembly.Module";
523
- var mustBeObjectOrNull = (value) => typeof value === "object" && !Array.isArray(value) ? null : "an object or null";
524
- var mustBeStringOrBoolean = (value) => typeof value === "string" || typeof value === "boolean" ? null : "a string or a boolean";
525
- var mustBeStringOrObject = (value) => typeof value === "string" || typeof value === "object" && value !== null && !Array.isArray(value) ? null : "a string or an object";
526
- var mustBeStringOrArrayOfStrings = (value) => typeof value === "string" || Array.isArray(value) && value.every((x) => typeof x === "string") ? null : "a string or an array of strings";
527
- var mustBeStringOrUint8Array = (value) => typeof value === "string" || value instanceof Uint8Array ? null : "a string or a Uint8Array";
528
- var mustBeStringOrURL = (value) => typeof value === "string" || value instanceof URL ? null : "a string or a URL";
529
- function getFlag(object, keys, key, mustBeFn) {
530
- let value = object[key];
531
- keys[key + ""] = true;
532
- if (value === void 0) return void 0;
533
- let mustBe = mustBeFn(value);
534
- if (mustBe !== null) throw new Error(`${quote(key)} must be ${mustBe}`);
535
- return value;
536
- }
537
- function checkForInvalidFlags(object, keys, where) {
538
- for (let key in object) {
539
- if (!(key in keys)) {
540
- throw new Error(`Invalid option ${where}: ${quote(key)}`);
541
- }
542
- }
543
- }
544
- function validateInitializeOptions(options) {
545
- let keys = /* @__PURE__ */ Object.create(null);
546
- let wasmURL = getFlag(options, keys, "wasmURL", mustBeStringOrURL);
547
- let wasmModule = getFlag(options, keys, "wasmModule", mustBeWebAssemblyModule);
548
- let worker = getFlag(options, keys, "worker", mustBeBoolean);
549
- checkForInvalidFlags(options, keys, "in initialize() call");
550
- return {
551
- wasmURL,
552
- wasmModule,
553
- worker
554
- };
555
- }
556
- function validateMangleCache(mangleCache) {
557
- let validated;
558
- if (mangleCache !== void 0) {
559
- validated = /* @__PURE__ */ Object.create(null);
560
- for (let key in mangleCache) {
561
- let value = mangleCache[key];
562
- if (typeof value === "string" || value === false) {
563
- validated[key] = value;
564
- } else {
565
- throw new Error(`Expected ${quote(key)} in mangle cache to map to either a string or false`);
566
- }
567
- }
568
- }
569
- return validated;
570
- }
571
- function pushLogFlags(flags, options, keys, isTTY2, logLevelDefault) {
572
- let color = getFlag(options, keys, "color", mustBeBoolean);
573
- let logLevel = getFlag(options, keys, "logLevel", mustBeString);
574
- let logLimit = getFlag(options, keys, "logLimit", mustBeInteger);
575
- if (color !== void 0) flags.push(`--color=${color}`);
576
- else if (isTTY2) flags.push(`--color=true`);
577
- flags.push(`--log-level=${logLevel || logLevelDefault}`);
578
- flags.push(`--log-limit=${logLimit || 0}`);
579
- }
580
- function validateStringValue(value, what, key) {
581
- if (typeof value !== "string") {
582
- throw new Error(`Expected value for ${what}${key !== void 0 ? " " + quote(key) : ""} to be a string, got ${typeof value} instead`);
583
- }
584
- return value;
585
- }
586
- function pushCommonFlags(flags, options, keys) {
587
- let legalComments = getFlag(options, keys, "legalComments", mustBeString);
588
- let sourceRoot = getFlag(options, keys, "sourceRoot", mustBeString);
589
- let sourcesContent = getFlag(options, keys, "sourcesContent", mustBeBoolean);
590
- let target = getFlag(options, keys, "target", mustBeStringOrArrayOfStrings);
591
- let format = getFlag(options, keys, "format", mustBeString);
592
- let globalName = getFlag(options, keys, "globalName", mustBeString);
593
- let mangleProps = getFlag(options, keys, "mangleProps", mustBeRegExp);
594
- let reserveProps = getFlag(options, keys, "reserveProps", mustBeRegExp);
595
- let mangleQuoted = getFlag(options, keys, "mangleQuoted", mustBeBoolean);
596
- let minify = getFlag(options, keys, "minify", mustBeBoolean);
597
- let minifySyntax = getFlag(options, keys, "minifySyntax", mustBeBoolean);
598
- let minifyWhitespace = getFlag(options, keys, "minifyWhitespace", mustBeBoolean);
599
- let minifyIdentifiers = getFlag(options, keys, "minifyIdentifiers", mustBeBoolean);
600
- let lineLimit = getFlag(options, keys, "lineLimit", mustBeInteger);
601
- let drop = getFlag(options, keys, "drop", mustBeArrayOfStrings);
602
- let dropLabels = getFlag(options, keys, "dropLabels", mustBeArrayOfStrings);
603
- let charset = getFlag(options, keys, "charset", mustBeString);
604
- let treeShaking = getFlag(options, keys, "treeShaking", mustBeBoolean);
605
- let ignoreAnnotations = getFlag(options, keys, "ignoreAnnotations", mustBeBoolean);
606
- let jsx = getFlag(options, keys, "jsx", mustBeString);
607
- let jsxFactory = getFlag(options, keys, "jsxFactory", mustBeString);
608
- let jsxFragment = getFlag(options, keys, "jsxFragment", mustBeString);
609
- let jsxImportSource = getFlag(options, keys, "jsxImportSource", mustBeString);
610
- let jsxDev = getFlag(options, keys, "jsxDev", mustBeBoolean);
611
- let jsxSideEffects = getFlag(options, keys, "jsxSideEffects", mustBeBoolean);
612
- let define = getFlag(options, keys, "define", mustBeObject);
613
- let logOverride = getFlag(options, keys, "logOverride", mustBeObject);
614
- let supported = getFlag(options, keys, "supported", mustBeObject);
615
- let pure = getFlag(options, keys, "pure", mustBeArrayOfStrings);
616
- let keepNames = getFlag(options, keys, "keepNames", mustBeBoolean);
617
- let platform = getFlag(options, keys, "platform", mustBeString);
618
- let tsconfigRaw = getFlag(options, keys, "tsconfigRaw", mustBeStringOrObject);
619
- let absPaths = getFlag(options, keys, "absPaths", mustBeArrayOfStrings);
620
- if (legalComments) flags.push(`--legal-comments=${legalComments}`);
621
- if (sourceRoot !== void 0) flags.push(`--source-root=${sourceRoot}`);
622
- if (sourcesContent !== void 0) flags.push(`--sources-content=${sourcesContent}`);
623
- if (target) flags.push(`--target=${validateAndJoinStringArray(Array.isArray(target) ? target : [target], "target")}`);
624
- if (format) flags.push(`--format=${format}`);
625
- if (globalName) flags.push(`--global-name=${globalName}`);
626
- if (platform) flags.push(`--platform=${platform}`);
627
- if (tsconfigRaw) flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`);
628
- if (minify) flags.push("--minify");
629
- if (minifySyntax) flags.push("--minify-syntax");
630
- if (minifyWhitespace) flags.push("--minify-whitespace");
631
- if (minifyIdentifiers) flags.push("--minify-identifiers");
632
- if (lineLimit) flags.push(`--line-limit=${lineLimit}`);
633
- if (charset) flags.push(`--charset=${charset}`);
634
- if (treeShaking !== void 0) flags.push(`--tree-shaking=${treeShaking}`);
635
- if (ignoreAnnotations) flags.push(`--ignore-annotations`);
636
- if (drop) for (let what of drop) flags.push(`--drop:${validateStringValue(what, "drop")}`);
637
- if (dropLabels) flags.push(`--drop-labels=${validateAndJoinStringArray(dropLabels, "drop label")}`);
638
- if (absPaths) flags.push(`--abs-paths=${validateAndJoinStringArray(absPaths, "abs paths")}`);
639
- if (mangleProps) flags.push(`--mangle-props=${jsRegExpToGoRegExp(mangleProps)}`);
640
- if (reserveProps) flags.push(`--reserve-props=${jsRegExpToGoRegExp(reserveProps)}`);
641
- if (mangleQuoted !== void 0) flags.push(`--mangle-quoted=${mangleQuoted}`);
642
- if (jsx) flags.push(`--jsx=${jsx}`);
643
- if (jsxFactory) flags.push(`--jsx-factory=${jsxFactory}`);
644
- if (jsxFragment) flags.push(`--jsx-fragment=${jsxFragment}`);
645
- if (jsxImportSource) flags.push(`--jsx-import-source=${jsxImportSource}`);
646
- if (jsxDev) flags.push(`--jsx-dev`);
647
- if (jsxSideEffects) flags.push(`--jsx-side-effects`);
648
- if (define) {
649
- for (let key in define) {
650
- if (key.indexOf("=") >= 0) throw new Error(`Invalid define: ${key}`);
651
- flags.push(`--define:${key}=${validateStringValue(define[key], "define", key)}`);
652
- }
653
- }
654
- if (logOverride) {
655
- for (let key in logOverride) {
656
- if (key.indexOf("=") >= 0) throw new Error(`Invalid log override: ${key}`);
657
- flags.push(`--log-override:${key}=${validateStringValue(logOverride[key], "log override", key)}`);
658
- }
659
- }
660
- if (supported) {
661
- for (let key in supported) {
662
- if (key.indexOf("=") >= 0) throw new Error(`Invalid supported: ${key}`);
663
- const value = supported[key];
664
- if (typeof value !== "boolean") throw new Error(`Expected value for supported ${quote(key)} to be a boolean, got ${typeof value} instead`);
665
- flags.push(`--supported:${key}=${value}`);
666
- }
667
- }
668
- if (pure) for (let fn of pure) flags.push(`--pure:${validateStringValue(fn, "pure")}`);
669
- if (keepNames) flags.push(`--keep-names`);
670
- }
671
- function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeDefault) {
672
- var _a2;
673
- let flags = [];
674
- let entries = [];
675
- let keys = /* @__PURE__ */ Object.create(null);
676
- let stdinContents = null;
677
- let stdinResolveDir = null;
678
- pushLogFlags(flags, options, keys, isTTY2, logLevelDefault);
679
- pushCommonFlags(flags, options, keys);
680
- let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean);
681
- let bundle = getFlag(options, keys, "bundle", mustBeBoolean);
682
- let splitting = getFlag(options, keys, "splitting", mustBeBoolean);
683
- let preserveSymlinks = getFlag(options, keys, "preserveSymlinks", mustBeBoolean);
684
- let metafile = getFlag(options, keys, "metafile", mustBeBoolean);
685
- let outfile = getFlag(options, keys, "outfile", mustBeString);
686
- let outdir = getFlag(options, keys, "outdir", mustBeString);
687
- let outbase = getFlag(options, keys, "outbase", mustBeString);
688
- let tsconfig = getFlag(options, keys, "tsconfig", mustBeString);
689
- let resolveExtensions = getFlag(options, keys, "resolveExtensions", mustBeArrayOfStrings);
690
- let nodePathsInput = getFlag(options, keys, "nodePaths", mustBeArrayOfStrings);
691
- let mainFields = getFlag(options, keys, "mainFields", mustBeArrayOfStrings);
692
- let conditions = getFlag(options, keys, "conditions", mustBeArrayOfStrings);
693
- let external = getFlag(options, keys, "external", mustBeArrayOfStrings);
694
- let packages = getFlag(options, keys, "packages", mustBeString);
695
- let alias = getFlag(options, keys, "alias", mustBeObject);
696
- let loader = getFlag(options, keys, "loader", mustBeObject);
697
- let outExtension = getFlag(options, keys, "outExtension", mustBeObject);
698
- let publicPath = getFlag(options, keys, "publicPath", mustBeString);
699
- let entryNames = getFlag(options, keys, "entryNames", mustBeString);
700
- let chunkNames = getFlag(options, keys, "chunkNames", mustBeString);
701
- let assetNames = getFlag(options, keys, "assetNames", mustBeString);
702
- let inject = getFlag(options, keys, "inject", mustBeArrayOfStrings);
703
- let banner = getFlag(options, keys, "banner", mustBeObject);
704
- let footer = getFlag(options, keys, "footer", mustBeObject);
705
- let entryPoints = getFlag(options, keys, "entryPoints", mustBeEntryPoints);
706
- let absWorkingDir = getFlag(options, keys, "absWorkingDir", mustBeString);
707
- let stdin = getFlag(options, keys, "stdin", mustBeObject);
708
- let write = (_a2 = getFlag(options, keys, "write", mustBeBoolean)) != null ? _a2 : writeDefault;
709
- let allowOverwrite = getFlag(options, keys, "allowOverwrite", mustBeBoolean);
710
- let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject);
711
- keys.plugins = true;
712
- checkForInvalidFlags(options, keys, `in ${callName}() call`);
713
- if (sourcemap) flags.push(`--sourcemap${sourcemap === true ? "" : `=${sourcemap}`}`);
714
- if (bundle) flags.push("--bundle");
715
- if (allowOverwrite) flags.push("--allow-overwrite");
716
- if (splitting) flags.push("--splitting");
717
- if (preserveSymlinks) flags.push("--preserve-symlinks");
718
- if (metafile) flags.push(`--metafile`);
719
- if (outfile) flags.push(`--outfile=${outfile}`);
720
- if (outdir) flags.push(`--outdir=${outdir}`);
721
- if (outbase) flags.push(`--outbase=${outbase}`);
722
- if (tsconfig) flags.push(`--tsconfig=${tsconfig}`);
723
- if (packages) flags.push(`--packages=${packages}`);
724
- if (resolveExtensions) flags.push(`--resolve-extensions=${validateAndJoinStringArray(resolveExtensions, "resolve extension")}`);
725
- if (publicPath) flags.push(`--public-path=${publicPath}`);
726
- if (entryNames) flags.push(`--entry-names=${entryNames}`);
727
- if (chunkNames) flags.push(`--chunk-names=${chunkNames}`);
728
- if (assetNames) flags.push(`--asset-names=${assetNames}`);
729
- if (mainFields) flags.push(`--main-fields=${validateAndJoinStringArray(mainFields, "main field")}`);
730
- if (conditions) flags.push(`--conditions=${validateAndJoinStringArray(conditions, "condition")}`);
731
- if (external) for (let name of external) flags.push(`--external:${validateStringValue(name, "external")}`);
732
- if (alias) {
733
- for (let old in alias) {
734
- if (old.indexOf("=") >= 0) throw new Error(`Invalid package name in alias: ${old}`);
735
- flags.push(`--alias:${old}=${validateStringValue(alias[old], "alias", old)}`);
736
- }
737
- }
738
- if (banner) {
739
- for (let type in banner) {
740
- if (type.indexOf("=") >= 0) throw new Error(`Invalid banner file type: ${type}`);
741
- flags.push(`--banner:${type}=${validateStringValue(banner[type], "banner", type)}`);
742
- }
743
- }
744
- if (footer) {
745
- for (let type in footer) {
746
- if (type.indexOf("=") >= 0) throw new Error(`Invalid footer file type: ${type}`);
747
- flags.push(`--footer:${type}=${validateStringValue(footer[type], "footer", type)}`);
748
- }
749
- }
750
- if (inject) for (let path3 of inject) flags.push(`--inject:${validateStringValue(path3, "inject")}`);
751
- if (loader) {
752
- for (let ext in loader) {
753
- if (ext.indexOf("=") >= 0) throw new Error(`Invalid loader extension: ${ext}`);
754
- flags.push(`--loader:${ext}=${validateStringValue(loader[ext], "loader", ext)}`);
755
- }
756
- }
757
- if (outExtension) {
758
- for (let ext in outExtension) {
759
- if (ext.indexOf("=") >= 0) throw new Error(`Invalid out extension: ${ext}`);
760
- flags.push(`--out-extension:${ext}=${validateStringValue(outExtension[ext], "out extension", ext)}`);
761
- }
762
- }
763
- if (entryPoints) {
764
- if (Array.isArray(entryPoints)) {
765
- for (let i = 0, n = entryPoints.length; i < n; i++) {
766
- let entryPoint = entryPoints[i];
767
- if (typeof entryPoint === "object" && entryPoint !== null) {
768
- let entryPointKeys = /* @__PURE__ */ Object.create(null);
769
- let input = getFlag(entryPoint, entryPointKeys, "in", mustBeString);
770
- let output = getFlag(entryPoint, entryPointKeys, "out", mustBeString);
771
- checkForInvalidFlags(entryPoint, entryPointKeys, "in entry point at index " + i);
772
- if (input === void 0) throw new Error('Missing property "in" for entry point at index ' + i);
773
- if (output === void 0) throw new Error('Missing property "out" for entry point at index ' + i);
774
- entries.push([output, input]);
775
- } else {
776
- entries.push(["", validateStringValue(entryPoint, "entry point at index " + i)]);
777
- }
778
- }
779
- } else {
780
- for (let key in entryPoints) {
781
- entries.push([key, validateStringValue(entryPoints[key], "entry point", key)]);
782
- }
783
- }
784
- }
785
- if (stdin) {
786
- let stdinKeys = /* @__PURE__ */ Object.create(null);
787
- let contents = getFlag(stdin, stdinKeys, "contents", mustBeStringOrUint8Array);
788
- let resolveDir = getFlag(stdin, stdinKeys, "resolveDir", mustBeString);
789
- let sourcefile = getFlag(stdin, stdinKeys, "sourcefile", mustBeString);
790
- let loader2 = getFlag(stdin, stdinKeys, "loader", mustBeString);
791
- checkForInvalidFlags(stdin, stdinKeys, 'in "stdin" object');
792
- if (sourcefile) flags.push(`--sourcefile=${sourcefile}`);
793
- if (loader2) flags.push(`--loader=${loader2}`);
794
- if (resolveDir) stdinResolveDir = resolveDir;
795
- if (typeof contents === "string") stdinContents = encodeUTF8(contents);
796
- else if (contents instanceof Uint8Array) stdinContents = contents;
797
- }
798
- let nodePaths = [];
799
- if (nodePathsInput) {
800
- for (let value of nodePathsInput) {
801
- value += "";
802
- nodePaths.push(value);
803
- }
804
- }
805
- return {
806
- entries,
807
- flags,
808
- write,
809
- stdinContents,
810
- stdinResolveDir,
811
- absWorkingDir,
812
- nodePaths,
813
- mangleCache: validateMangleCache(mangleCache)
814
- };
815
- }
816
- function flagsForTransformOptions(callName, options, isTTY2, logLevelDefault) {
817
- let flags = [];
818
- let keys = /* @__PURE__ */ Object.create(null);
819
- pushLogFlags(flags, options, keys, isTTY2, logLevelDefault);
820
- pushCommonFlags(flags, options, keys);
821
- let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean);
822
- let sourcefile = getFlag(options, keys, "sourcefile", mustBeString);
823
- let loader = getFlag(options, keys, "loader", mustBeString);
824
- let banner = getFlag(options, keys, "banner", mustBeString);
825
- let footer = getFlag(options, keys, "footer", mustBeString);
826
- let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject);
827
- checkForInvalidFlags(options, keys, `in ${callName}() call`);
828
- if (sourcemap) flags.push(`--sourcemap=${sourcemap === true ? "external" : sourcemap}`);
829
- if (sourcefile) flags.push(`--sourcefile=${sourcefile}`);
830
- if (loader) flags.push(`--loader=${loader}`);
831
- if (banner) flags.push(`--banner=${banner}`);
832
- if (footer) flags.push(`--footer=${footer}`);
833
- return {
834
- flags,
835
- mangleCache: validateMangleCache(mangleCache)
836
- };
837
- }
838
- function createChannel(streamIn) {
839
- const requestCallbacksByKey = {};
840
- const closeData = { didClose: false, reason: "" };
841
- let responseCallbacks = {};
842
- let nextRequestID = 0;
843
- let nextBuildKey = 0;
844
- let stdout = new Uint8Array(16 * 1024);
845
- let stdoutUsed = 0;
846
- let readFromStdout = (chunk) => {
847
- let limit = stdoutUsed + chunk.length;
848
- if (limit > stdout.length) {
849
- let swap = new Uint8Array(limit * 2);
850
- swap.set(stdout);
851
- stdout = swap;
852
- }
853
- stdout.set(chunk, stdoutUsed);
854
- stdoutUsed += chunk.length;
855
- let offset = 0;
856
- while (offset + 4 <= stdoutUsed) {
857
- let length = readUInt32LE(stdout, offset);
858
- if (offset + 4 + length > stdoutUsed) {
859
- break;
860
- }
861
- offset += 4;
862
- handleIncomingPacket(stdout.subarray(offset, offset + length));
863
- offset += length;
864
- }
865
- if (offset > 0) {
866
- stdout.copyWithin(0, offset, stdoutUsed);
867
- stdoutUsed -= offset;
868
- }
869
- };
870
- let afterClose = (error) => {
871
- closeData.didClose = true;
872
- if (error) closeData.reason = ": " + (error.message || error);
873
- const text = "The service was stopped" + closeData.reason;
874
- for (let id in responseCallbacks) {
875
- responseCallbacks[id](text, null);
876
- }
877
- responseCallbacks = {};
878
- };
879
- let sendRequest = (refs, value, callback) => {
880
- if (closeData.didClose) return callback("The service is no longer running" + closeData.reason, null);
881
- let id = nextRequestID++;
882
- responseCallbacks[id] = (error, response) => {
883
- try {
884
- callback(error, response);
885
- } finally {
886
- if (refs) refs.unref();
887
- }
888
- };
889
- if (refs) refs.ref();
890
- streamIn.writeToStdin(encodePacket({ id, isRequest: true, value }));
891
- };
892
- let sendResponse = (id, value) => {
893
- if (closeData.didClose) throw new Error("The service is no longer running" + closeData.reason);
894
- streamIn.writeToStdin(encodePacket({ id, isRequest: false, value }));
895
- };
896
- let handleRequest = async (id, request) => {
897
- try {
898
- if (request.command === "ping") {
899
- sendResponse(id, {});
900
- return;
901
- }
902
- if (typeof request.key === "number") {
903
- const requestCallbacks = requestCallbacksByKey[request.key];
904
- if (!requestCallbacks) {
905
- return;
906
- }
907
- const callback = requestCallbacks[request.command];
908
- if (callback) {
909
- await callback(id, request);
910
- return;
911
- }
912
- }
913
- throw new Error(`Invalid command: ` + request.command);
914
- } catch (e) {
915
- const errors = [extractErrorMessageV8(e, streamIn, null, void 0, "")];
916
- try {
917
- sendResponse(id, { errors });
918
- } catch {
919
- }
920
- }
921
- };
922
- let isFirstPacket = true;
923
- let handleIncomingPacket = (bytes) => {
924
- if (isFirstPacket) {
925
- isFirstPacket = false;
926
- let binaryVersion = String.fromCharCode(...bytes);
927
- if (binaryVersion !== "0.27.4") {
928
- throw new Error(`Cannot start service: Host version "${"0.27.4"}" does not match binary version ${quote(binaryVersion)}`);
929
- }
930
- return;
931
- }
932
- let packet = decodePacket(bytes);
933
- if (packet.isRequest) {
934
- handleRequest(packet.id, packet.value);
935
- } else {
936
- let callback = responseCallbacks[packet.id];
937
- delete responseCallbacks[packet.id];
938
- if (packet.value.error) callback(packet.value.error, {});
939
- else callback(null, packet.value);
940
- }
941
- };
942
- let buildOrContext = ({ callName, refs, options, isTTY: isTTY2, defaultWD: defaultWD2, callback }) => {
943
- let refCount = 0;
944
- const buildKey = nextBuildKey++;
945
- const requestCallbacks = {};
946
- const buildRefs = {
947
- ref() {
948
- if (++refCount === 1) {
949
- if (refs) refs.ref();
950
- }
951
- },
952
- unref() {
953
- if (--refCount === 0) {
954
- delete requestCallbacksByKey[buildKey];
955
- if (refs) refs.unref();
956
- }
957
- }
958
- };
959
- requestCallbacksByKey[buildKey] = requestCallbacks;
960
- buildRefs.ref();
961
- buildOrContextImpl(
962
- callName,
963
- buildKey,
964
- sendRequest,
965
- sendResponse,
966
- buildRefs,
967
- streamIn,
968
- requestCallbacks,
969
- options,
970
- isTTY2,
971
- defaultWD2,
972
- (err, res) => {
973
- try {
974
- callback(err, res);
975
- } finally {
976
- buildRefs.unref();
977
- }
978
- }
979
- );
980
- };
981
- let transform2 = ({ callName, refs, input, options, isTTY: isTTY2, fs: fs3, callback }) => {
982
- const details = createObjectStash();
983
- let start = (inputPath) => {
984
- try {
985
- if (typeof input !== "string" && !(input instanceof Uint8Array))
986
- throw new Error('The input to "transform" must be a string or a Uint8Array');
987
- let {
988
- flags,
989
- mangleCache
990
- } = flagsForTransformOptions(callName, options, isTTY2, transformLogLevelDefault);
991
- let request = {
992
- command: "transform",
993
- flags,
994
- inputFS: inputPath !== null,
995
- input: inputPath !== null ? encodeUTF8(inputPath) : typeof input === "string" ? encodeUTF8(input) : input
996
- };
997
- if (mangleCache) request.mangleCache = mangleCache;
998
- sendRequest(refs, request, (error, response) => {
999
- if (error) return callback(new Error(error), null);
1000
- let errors = replaceDetailsInMessages(response.errors, details);
1001
- let warnings = replaceDetailsInMessages(response.warnings, details);
1002
- let outstanding = 1;
1003
- let next = () => {
1004
- if (--outstanding === 0) {
1005
- let result = {
1006
- warnings,
1007
- code: response.code,
1008
- map: response.map,
1009
- mangleCache: void 0,
1010
- legalComments: void 0
1011
- };
1012
- if ("legalComments" in response) result.legalComments = response == null ? void 0 : response.legalComments;
1013
- if (response.mangleCache) result.mangleCache = response == null ? void 0 : response.mangleCache;
1014
- callback(null, result);
1015
- }
1016
- };
1017
- if (errors.length > 0) return callback(failureErrorWithLog("Transform failed", errors, warnings), null);
1018
- if (response.codeFS) {
1019
- outstanding++;
1020
- fs3.readFile(response.code, (err, contents) => {
1021
- if (err !== null) {
1022
- callback(err, null);
1023
- } else {
1024
- response.code = contents;
1025
- next();
1026
- }
1027
- });
1028
- }
1029
- if (response.mapFS) {
1030
- outstanding++;
1031
- fs3.readFile(response.map, (err, contents) => {
1032
- if (err !== null) {
1033
- callback(err, null);
1034
- } else {
1035
- response.map = contents;
1036
- next();
1037
- }
1038
- });
1039
- }
1040
- next();
1041
- });
1042
- } catch (e) {
1043
- let flags = [];
1044
- try {
1045
- pushLogFlags(flags, options, {}, isTTY2, transformLogLevelDefault);
1046
- } catch {
1047
- }
1048
- const error = extractErrorMessageV8(e, streamIn, details, void 0, "");
1049
- sendRequest(refs, { command: "error", flags, error }, () => {
1050
- error.detail = details.load(error.detail);
1051
- callback(failureErrorWithLog("Transform failed", [error], []), null);
1052
- });
1053
- }
1054
- };
1055
- if ((typeof input === "string" || input instanceof Uint8Array) && input.length > 1024 * 1024) {
1056
- let next = start;
1057
- start = () => fs3.writeFile(input, next);
1058
- }
1059
- start(null);
1060
- };
1061
- let formatMessages2 = ({ callName, refs, messages, options, callback }) => {
1062
- if (!options) throw new Error(`Missing second argument in ${callName}() call`);
1063
- let keys = {};
1064
- let kind = getFlag(options, keys, "kind", mustBeString);
1065
- let color = getFlag(options, keys, "color", mustBeBoolean);
1066
- let terminalWidth = getFlag(options, keys, "terminalWidth", mustBeInteger);
1067
- checkForInvalidFlags(options, keys, `in ${callName}() call`);
1068
- if (kind === void 0) throw new Error(`Missing "kind" in ${callName}() call`);
1069
- if (kind !== "error" && kind !== "warning") throw new Error(`Expected "kind" to be "error" or "warning" in ${callName}() call`);
1070
- let request = {
1071
- command: "format-msgs",
1072
- messages: sanitizeMessages(messages, "messages", null, "", terminalWidth),
1073
- isWarning: kind === "warning"
1074
- };
1075
- if (color !== void 0) request.color = color;
1076
- if (terminalWidth !== void 0) request.terminalWidth = terminalWidth;
1077
- sendRequest(refs, request, (error, response) => {
1078
- if (error) return callback(new Error(error), null);
1079
- callback(null, response.messages);
1080
- });
1081
- };
1082
- let analyzeMetafile2 = ({ callName, refs, metafile, options, callback }) => {
1083
- if (options === void 0) options = {};
1084
- let keys = {};
1085
- let color = getFlag(options, keys, "color", mustBeBoolean);
1086
- let verbose = getFlag(options, keys, "verbose", mustBeBoolean);
1087
- checkForInvalidFlags(options, keys, `in ${callName}() call`);
1088
- let request = {
1089
- command: "analyze-metafile",
1090
- metafile
1091
- };
1092
- if (color !== void 0) request.color = color;
1093
- if (verbose !== void 0) request.verbose = verbose;
1094
- sendRequest(refs, request, (error, response) => {
1095
- if (error) return callback(new Error(error), null);
1096
- callback(null, response.result);
1097
- });
1098
- };
1099
- return {
1100
- readFromStdout,
1101
- afterClose,
1102
- service: {
1103
- buildOrContext,
1104
- transform: transform2,
1105
- formatMessages: formatMessages2,
1106
- analyzeMetafile: analyzeMetafile2
1107
- }
1108
- };
1109
- }
1110
- function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, options, isTTY2, defaultWD2, callback) {
1111
- const details = createObjectStash();
1112
- const isContext = callName === "context";
1113
- const handleError = (e, pluginName) => {
1114
- const flags = [];
1115
- try {
1116
- pushLogFlags(flags, options, {}, isTTY2, buildLogLevelDefault);
1117
- } catch {
1118
- }
1119
- const message = extractErrorMessageV8(e, streamIn, details, void 0, pluginName);
1120
- sendRequest(refs, { command: "error", flags, error: message }, () => {
1121
- message.detail = details.load(message.detail);
1122
- callback(failureErrorWithLog(isContext ? "Context failed" : "Build failed", [message], []), null);
1123
- });
1124
- };
1125
- let plugins;
1126
- if (typeof options === "object") {
1127
- const value = options.plugins;
1128
- if (value !== void 0) {
1129
- if (!Array.isArray(value)) return handleError(new Error(`"plugins" must be an array`), "");
1130
- plugins = value;
1131
- }
1132
- }
1133
- if (plugins && plugins.length > 0) {
1134
- if (streamIn.isSync) return handleError(new Error("Cannot use plugins in synchronous API calls"), "");
1135
- handlePlugins(
1136
- buildKey,
1137
- sendRequest,
1138
- sendResponse,
1139
- refs,
1140
- streamIn,
1141
- requestCallbacks,
1142
- options,
1143
- plugins,
1144
- details
1145
- ).then(
1146
- (result) => {
1147
- if (!result.ok) return handleError(result.error, result.pluginName);
1148
- try {
1149
- buildOrContextContinue(result.requestPlugins, result.runOnEndCallbacks, result.scheduleOnDisposeCallbacks);
1150
- } catch (e) {
1151
- handleError(e, "");
1152
- }
1153
- },
1154
- (e) => handleError(e, "")
1155
- );
1156
- return;
1157
- }
1158
- try {
1159
- buildOrContextContinue(null, (result, done) => done([], []), () => {
1160
- });
1161
- } catch (e) {
1162
- handleError(e, "");
1163
- }
1164
- function buildOrContextContinue(requestPlugins, runOnEndCallbacks, scheduleOnDisposeCallbacks) {
1165
- const writeDefault = streamIn.hasFS;
1166
- const {
1167
- entries,
1168
- flags,
1169
- write,
1170
- stdinContents,
1171
- stdinResolveDir,
1172
- absWorkingDir,
1173
- nodePaths,
1174
- mangleCache
1175
- } = flagsForBuildOptions(callName, options, isTTY2, buildLogLevelDefault, writeDefault);
1176
- if (write && !streamIn.hasFS) throw new Error(`The "write" option is unavailable in this environment`);
1177
- const request = {
1178
- command: "build",
1179
- key: buildKey,
1180
- entries,
1181
- flags,
1182
- write,
1183
- stdinContents,
1184
- stdinResolveDir,
1185
- absWorkingDir: absWorkingDir || defaultWD2,
1186
- nodePaths,
1187
- context: isContext
1188
- };
1189
- if (requestPlugins) request.plugins = requestPlugins;
1190
- if (mangleCache) request.mangleCache = mangleCache;
1191
- const buildResponseToResult = (response, callback2) => {
1192
- const result = {
1193
- errors: replaceDetailsInMessages(response.errors, details),
1194
- warnings: replaceDetailsInMessages(response.warnings, details),
1195
- outputFiles: void 0,
1196
- metafile: void 0,
1197
- mangleCache: void 0
1198
- };
1199
- const originalErrors = result.errors.slice();
1200
- const originalWarnings = result.warnings.slice();
1201
- if (response.outputFiles) result.outputFiles = response.outputFiles.map(convertOutputFiles);
1202
- if (response.metafile) result.metafile = parseJSON(response.metafile);
1203
- if (response.mangleCache) result.mangleCache = response.mangleCache;
1204
- if (response.writeToStdout !== void 0) console.log(decodeUTF8(response.writeToStdout).replace(/\n$/, ""));
1205
- runOnEndCallbacks(result, (onEndErrors, onEndWarnings) => {
1206
- if (originalErrors.length > 0 || onEndErrors.length > 0) {
1207
- const error = failureErrorWithLog("Build failed", originalErrors.concat(onEndErrors), originalWarnings.concat(onEndWarnings));
1208
- return callback2(error, null, onEndErrors, onEndWarnings);
1209
- }
1210
- callback2(null, result, onEndErrors, onEndWarnings);
1211
- });
1212
- };
1213
- let latestResultPromise;
1214
- let provideLatestResult;
1215
- if (isContext)
1216
- requestCallbacks["on-end"] = (id, request2) => new Promise((resolve) => {
1217
- buildResponseToResult(request2, (err, result, onEndErrors, onEndWarnings) => {
1218
- const response = {
1219
- errors: onEndErrors,
1220
- warnings: onEndWarnings
1221
- };
1222
- if (provideLatestResult) provideLatestResult(err, result);
1223
- latestResultPromise = void 0;
1224
- provideLatestResult = void 0;
1225
- sendResponse(id, response);
1226
- resolve();
1227
- });
1228
- });
1229
- sendRequest(refs, request, (error, response) => {
1230
- if (error) return callback(new Error(error), null);
1231
- if (!isContext) {
1232
- return buildResponseToResult(response, (err, res) => {
1233
- scheduleOnDisposeCallbacks();
1234
- return callback(err, res);
1235
- });
1236
- }
1237
- if (response.errors.length > 0) {
1238
- return callback(failureErrorWithLog("Context failed", response.errors, response.warnings), null);
1239
- }
1240
- let didDispose = false;
1241
- const result = {
1242
- rebuild: () => {
1243
- if (!latestResultPromise) latestResultPromise = new Promise((resolve, reject) => {
1244
- let settlePromise;
1245
- provideLatestResult = (err, result2) => {
1246
- if (!settlePromise) settlePromise = () => err ? reject(err) : resolve(result2);
1247
- };
1248
- const triggerAnotherBuild = () => {
1249
- const request2 = {
1250
- command: "rebuild",
1251
- key: buildKey
1252
- };
1253
- sendRequest(refs, request2, (error2, response2) => {
1254
- if (error2) {
1255
- reject(new Error(error2));
1256
- } else if (settlePromise) {
1257
- settlePromise();
1258
- } else {
1259
- triggerAnotherBuild();
1260
- }
1261
- });
1262
- };
1263
- triggerAnotherBuild();
1264
- });
1265
- return latestResultPromise;
1266
- },
1267
- watch: (options2 = {}) => new Promise((resolve, reject) => {
1268
- if (!streamIn.hasFS) throw new Error(`Cannot use the "watch" API in this environment`);
1269
- const keys = {};
1270
- const delay = getFlag(options2, keys, "delay", mustBeInteger);
1271
- checkForInvalidFlags(options2, keys, `in watch() call`);
1272
- const request2 = {
1273
- command: "watch",
1274
- key: buildKey
1275
- };
1276
- if (delay) request2.delay = delay;
1277
- sendRequest(refs, request2, (error2) => {
1278
- if (error2) reject(new Error(error2));
1279
- else resolve(void 0);
1280
- });
1281
- }),
1282
- serve: (options2 = {}) => new Promise((resolve, reject) => {
1283
- if (!streamIn.hasFS) throw new Error(`Cannot use the "serve" API in this environment`);
1284
- const keys = {};
1285
- const port = getFlag(options2, keys, "port", mustBeValidPortNumber);
1286
- const host = getFlag(options2, keys, "host", mustBeString);
1287
- const servedir = getFlag(options2, keys, "servedir", mustBeString);
1288
- const keyfile = getFlag(options2, keys, "keyfile", mustBeString);
1289
- const certfile = getFlag(options2, keys, "certfile", mustBeString);
1290
- const fallback = getFlag(options2, keys, "fallback", mustBeString);
1291
- const cors = getFlag(options2, keys, "cors", mustBeObject);
1292
- const onRequest = getFlag(options2, keys, "onRequest", mustBeFunction);
1293
- checkForInvalidFlags(options2, keys, `in serve() call`);
1294
- const request2 = {
1295
- command: "serve",
1296
- key: buildKey,
1297
- onRequest: !!onRequest
1298
- };
1299
- if (port !== void 0) request2.port = port;
1300
- if (host !== void 0) request2.host = host;
1301
- if (servedir !== void 0) request2.servedir = servedir;
1302
- if (keyfile !== void 0) request2.keyfile = keyfile;
1303
- if (certfile !== void 0) request2.certfile = certfile;
1304
- if (fallback !== void 0) request2.fallback = fallback;
1305
- if (cors) {
1306
- const corsKeys = {};
1307
- const origin = getFlag(cors, corsKeys, "origin", mustBeStringOrArrayOfStrings);
1308
- checkForInvalidFlags(cors, corsKeys, `on "cors" object`);
1309
- if (Array.isArray(origin)) request2.corsOrigin = origin;
1310
- else if (origin !== void 0) request2.corsOrigin = [origin];
1311
- }
1312
- sendRequest(refs, request2, (error2, response2) => {
1313
- if (error2) return reject(new Error(error2));
1314
- if (onRequest) {
1315
- requestCallbacks["serve-request"] = (id, request3) => {
1316
- onRequest(request3.args);
1317
- sendResponse(id, {});
1318
- };
1319
- }
1320
- resolve(response2);
1321
- });
1322
- }),
1323
- cancel: () => new Promise((resolve) => {
1324
- if (didDispose) return resolve();
1325
- const request2 = {
1326
- command: "cancel",
1327
- key: buildKey
1328
- };
1329
- sendRequest(refs, request2, () => {
1330
- resolve();
1331
- });
1332
- }),
1333
- dispose: () => new Promise((resolve) => {
1334
- if (didDispose) return resolve();
1335
- didDispose = true;
1336
- const request2 = {
1337
- command: "dispose",
1338
- key: buildKey
1339
- };
1340
- sendRequest(refs, request2, () => {
1341
- resolve();
1342
- scheduleOnDisposeCallbacks();
1343
- refs.unref();
1344
- });
1345
- })
1346
- };
1347
- refs.ref();
1348
- callback(null, result);
1349
- });
1350
- }
1351
- }
1352
- var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, initialOptions, plugins, details) => {
1353
- let onStartCallbacks = [];
1354
- let onEndCallbacks = [];
1355
- let onResolveCallbacks = {};
1356
- let onLoadCallbacks = {};
1357
- let onDisposeCallbacks = [];
1358
- let nextCallbackID = 0;
1359
- let i = 0;
1360
- let requestPlugins = [];
1361
- let isSetupDone = false;
1362
- plugins = [...plugins];
1363
- for (let item of plugins) {
1364
- let keys = {};
1365
- if (typeof item !== "object") throw new Error(`Plugin at index ${i} must be an object`);
1366
- const name = getFlag(item, keys, "name", mustBeString);
1367
- if (typeof name !== "string" || name === "") throw new Error(`Plugin at index ${i} is missing a name`);
1368
- try {
1369
- let setup = getFlag(item, keys, "setup", mustBeFunction);
1370
- if (typeof setup !== "function") throw new Error(`Plugin is missing a setup function`);
1371
- checkForInvalidFlags(item, keys, `on plugin ${quote(name)}`);
1372
- let plugin = {
1373
- name,
1374
- onStart: false,
1375
- onEnd: false,
1376
- onResolve: [],
1377
- onLoad: []
1378
- };
1379
- i++;
1380
- let resolve = (path3, options = {}) => {
1381
- if (!isSetupDone) throw new Error('Cannot call "resolve" before plugin setup has completed');
1382
- if (typeof path3 !== "string") throw new Error(`The path to resolve must be a string`);
1383
- let keys2 = /* @__PURE__ */ Object.create(null);
1384
- let pluginName = getFlag(options, keys2, "pluginName", mustBeString);
1385
- let importer = getFlag(options, keys2, "importer", mustBeString);
1386
- let namespace = getFlag(options, keys2, "namespace", mustBeString);
1387
- let resolveDir = getFlag(options, keys2, "resolveDir", mustBeString);
1388
- let kind = getFlag(options, keys2, "kind", mustBeString);
1389
- let pluginData = getFlag(options, keys2, "pluginData", canBeAnything);
1390
- let importAttributes = getFlag(options, keys2, "with", mustBeObject);
1391
- checkForInvalidFlags(options, keys2, "in resolve() call");
1392
- return new Promise((resolve2, reject) => {
1393
- const request = {
1394
- command: "resolve",
1395
- path: path3,
1396
- key: buildKey,
1397
- pluginName: name
1398
- };
1399
- if (pluginName != null) request.pluginName = pluginName;
1400
- if (importer != null) request.importer = importer;
1401
- if (namespace != null) request.namespace = namespace;
1402
- if (resolveDir != null) request.resolveDir = resolveDir;
1403
- if (kind != null) request.kind = kind;
1404
- else throw new Error(`Must specify "kind" when calling "resolve"`);
1405
- if (pluginData != null) request.pluginData = details.store(pluginData);
1406
- if (importAttributes != null) request.with = sanitizeStringMap(importAttributes, "with");
1407
- sendRequest(refs, request, (error, response) => {
1408
- if (error !== null) reject(new Error(error));
1409
- else resolve2({
1410
- errors: replaceDetailsInMessages(response.errors, details),
1411
- warnings: replaceDetailsInMessages(response.warnings, details),
1412
- path: response.path,
1413
- external: response.external,
1414
- sideEffects: response.sideEffects,
1415
- namespace: response.namespace,
1416
- suffix: response.suffix,
1417
- pluginData: details.load(response.pluginData)
1418
- });
1419
- });
1420
- });
1421
- };
1422
- let promise = setup({
1423
- initialOptions,
1424
- resolve,
1425
- onStart(callback) {
1426
- let registeredText = `This error came from the "onStart" callback registered here:`;
1427
- let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart");
1428
- onStartCallbacks.push({ name, callback, note: registeredNote });
1429
- plugin.onStart = true;
1430
- },
1431
- onEnd(callback) {
1432
- let registeredText = `This error came from the "onEnd" callback registered here:`;
1433
- let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onEnd");
1434
- onEndCallbacks.push({ name, callback, note: registeredNote });
1435
- plugin.onEnd = true;
1436
- },
1437
- onResolve(options, callback) {
1438
- let registeredText = `This error came from the "onResolve" callback registered here:`;
1439
- let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onResolve");
1440
- let keys2 = {};
1441
- let filter = getFlag(options, keys2, "filter", mustBeRegExp);
1442
- let namespace = getFlag(options, keys2, "namespace", mustBeString);
1443
- checkForInvalidFlags(options, keys2, `in onResolve() call for plugin ${quote(name)}`);
1444
- if (filter == null) throw new Error(`onResolve() call is missing a filter`);
1445
- let id = nextCallbackID++;
1446
- onResolveCallbacks[id] = { name, callback, note: registeredNote };
1447
- plugin.onResolve.push({ id, filter: jsRegExpToGoRegExp(filter), namespace: namespace || "" });
1448
- },
1449
- onLoad(options, callback) {
1450
- let registeredText = `This error came from the "onLoad" callback registered here:`;
1451
- let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onLoad");
1452
- let keys2 = {};
1453
- let filter = getFlag(options, keys2, "filter", mustBeRegExp);
1454
- let namespace = getFlag(options, keys2, "namespace", mustBeString);
1455
- checkForInvalidFlags(options, keys2, `in onLoad() call for plugin ${quote(name)}`);
1456
- if (filter == null) throw new Error(`onLoad() call is missing a filter`);
1457
- let id = nextCallbackID++;
1458
- onLoadCallbacks[id] = { name, callback, note: registeredNote };
1459
- plugin.onLoad.push({ id, filter: jsRegExpToGoRegExp(filter), namespace: namespace || "" });
1460
- },
1461
- onDispose(callback) {
1462
- onDisposeCallbacks.push(callback);
1463
- },
1464
- esbuild: streamIn.esbuild
1465
- });
1466
- if (promise) await promise;
1467
- requestPlugins.push(plugin);
1468
- } catch (e) {
1469
- return { ok: false, error: e, pluginName: name };
1470
- }
1471
- }
1472
- requestCallbacks["on-start"] = async (id, request) => {
1473
- details.clear();
1474
- let response = { errors: [], warnings: [] };
1475
- await Promise.all(onStartCallbacks.map(async ({ name, callback, note }) => {
1476
- try {
1477
- let result = await callback();
1478
- if (result != null) {
1479
- if (typeof result !== "object") throw new Error(`Expected onStart() callback in plugin ${quote(name)} to return an object`);
1480
- let keys = {};
1481
- let errors = getFlag(result, keys, "errors", mustBeArray);
1482
- let warnings = getFlag(result, keys, "warnings", mustBeArray);
1483
- checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${quote(name)}`);
1484
- if (errors != null) response.errors.push(...sanitizeMessages(errors, "errors", details, name, void 0));
1485
- if (warnings != null) response.warnings.push(...sanitizeMessages(warnings, "warnings", details, name, void 0));
1486
- }
1487
- } catch (e) {
1488
- response.errors.push(extractErrorMessageV8(e, streamIn, details, note && note(), name));
1489
- }
1490
- }));
1491
- sendResponse(id, response);
1492
- };
1493
- requestCallbacks["on-resolve"] = async (id, request) => {
1494
- let response = {}, name = "", callback, note;
1495
- for (let id2 of request.ids) {
1496
- try {
1497
- ({ name, callback, note } = onResolveCallbacks[id2]);
1498
- let result = await callback({
1499
- path: request.path,
1500
- importer: request.importer,
1501
- namespace: request.namespace,
1502
- resolveDir: request.resolveDir,
1503
- kind: request.kind,
1504
- pluginData: details.load(request.pluginData),
1505
- with: request.with
1506
- });
1507
- if (result != null) {
1508
- if (typeof result !== "object") throw new Error(`Expected onResolve() callback in plugin ${quote(name)} to return an object`);
1509
- let keys = {};
1510
- let pluginName = getFlag(result, keys, "pluginName", mustBeString);
1511
- let path3 = getFlag(result, keys, "path", mustBeString);
1512
- let namespace = getFlag(result, keys, "namespace", mustBeString);
1513
- let suffix = getFlag(result, keys, "suffix", mustBeString);
1514
- let external = getFlag(result, keys, "external", mustBeBoolean);
1515
- let sideEffects = getFlag(result, keys, "sideEffects", mustBeBoolean);
1516
- let pluginData = getFlag(result, keys, "pluginData", canBeAnything);
1517
- let errors = getFlag(result, keys, "errors", mustBeArray);
1518
- let warnings = getFlag(result, keys, "warnings", mustBeArray);
1519
- let watchFiles = getFlag(result, keys, "watchFiles", mustBeArrayOfStrings);
1520
- let watchDirs = getFlag(result, keys, "watchDirs", mustBeArrayOfStrings);
1521
- checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${quote(name)}`);
1522
- response.id = id2;
1523
- if (pluginName != null) response.pluginName = pluginName;
1524
- if (path3 != null) response.path = path3;
1525
- if (namespace != null) response.namespace = namespace;
1526
- if (suffix != null) response.suffix = suffix;
1527
- if (external != null) response.external = external;
1528
- if (sideEffects != null) response.sideEffects = sideEffects;
1529
- if (pluginData != null) response.pluginData = details.store(pluginData);
1530
- if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0);
1531
- if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0);
1532
- if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles");
1533
- if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs");
1534
- break;
1535
- }
1536
- } catch (e) {
1537
- response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] };
1538
- break;
1539
- }
1540
- }
1541
- sendResponse(id, response);
1542
- };
1543
- requestCallbacks["on-load"] = async (id, request) => {
1544
- let response = {}, name = "", callback, note;
1545
- for (let id2 of request.ids) {
1546
- try {
1547
- ({ name, callback, note } = onLoadCallbacks[id2]);
1548
- let result = await callback({
1549
- path: request.path,
1550
- namespace: request.namespace,
1551
- suffix: request.suffix,
1552
- pluginData: details.load(request.pluginData),
1553
- with: request.with
1554
- });
1555
- if (result != null) {
1556
- if (typeof result !== "object") throw new Error(`Expected onLoad() callback in plugin ${quote(name)} to return an object`);
1557
- let keys = {};
1558
- let pluginName = getFlag(result, keys, "pluginName", mustBeString);
1559
- let contents = getFlag(result, keys, "contents", mustBeStringOrUint8Array);
1560
- let resolveDir = getFlag(result, keys, "resolveDir", mustBeString);
1561
- let pluginData = getFlag(result, keys, "pluginData", canBeAnything);
1562
- let loader = getFlag(result, keys, "loader", mustBeString);
1563
- let errors = getFlag(result, keys, "errors", mustBeArray);
1564
- let warnings = getFlag(result, keys, "warnings", mustBeArray);
1565
- let watchFiles = getFlag(result, keys, "watchFiles", mustBeArrayOfStrings);
1566
- let watchDirs = getFlag(result, keys, "watchDirs", mustBeArrayOfStrings);
1567
- checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${quote(name)}`);
1568
- response.id = id2;
1569
- if (pluginName != null) response.pluginName = pluginName;
1570
- if (contents instanceof Uint8Array) response.contents = contents;
1571
- else if (contents != null) response.contents = encodeUTF8(contents);
1572
- if (resolveDir != null) response.resolveDir = resolveDir;
1573
- if (pluginData != null) response.pluginData = details.store(pluginData);
1574
- if (loader != null) response.loader = loader;
1575
- if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0);
1576
- if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0);
1577
- if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles");
1578
- if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs");
1579
- break;
1580
- }
1581
- } catch (e) {
1582
- response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] };
1583
- break;
1584
- }
1585
- }
1586
- sendResponse(id, response);
1587
- };
1588
- let runOnEndCallbacks = (result, done) => done([], []);
1589
- if (onEndCallbacks.length > 0) {
1590
- runOnEndCallbacks = (result, done) => {
1591
- (async () => {
1592
- const onEndErrors = [];
1593
- const onEndWarnings = [];
1594
- for (const { name, callback, note } of onEndCallbacks) {
1595
- let newErrors;
1596
- let newWarnings;
1597
- try {
1598
- const value = await callback(result);
1599
- if (value != null) {
1600
- if (typeof value !== "object") throw new Error(`Expected onEnd() callback in plugin ${quote(name)} to return an object`);
1601
- let keys = {};
1602
- let errors = getFlag(value, keys, "errors", mustBeArray);
1603
- let warnings = getFlag(value, keys, "warnings", mustBeArray);
1604
- checkForInvalidFlags(value, keys, `from onEnd() callback in plugin ${quote(name)}`);
1605
- if (errors != null) newErrors = sanitizeMessages(errors, "errors", details, name, void 0);
1606
- if (warnings != null) newWarnings = sanitizeMessages(warnings, "warnings", details, name, void 0);
1607
- }
1608
- } catch (e) {
1609
- newErrors = [extractErrorMessageV8(e, streamIn, details, note && note(), name)];
1610
- }
1611
- if (newErrors) {
1612
- onEndErrors.push(...newErrors);
1613
- try {
1614
- result.errors.push(...newErrors);
1615
- } catch {
1616
- }
1617
- }
1618
- if (newWarnings) {
1619
- onEndWarnings.push(...newWarnings);
1620
- try {
1621
- result.warnings.push(...newWarnings);
1622
- } catch {
1623
- }
1624
- }
1625
- }
1626
- done(onEndErrors, onEndWarnings);
1627
- })();
1628
- };
1629
- }
1630
- let scheduleOnDisposeCallbacks = () => {
1631
- for (const cb of onDisposeCallbacks) {
1632
- setTimeout(() => cb(), 0);
1633
- }
1634
- };
1635
- isSetupDone = true;
1636
- return {
1637
- ok: true,
1638
- requestPlugins,
1639
- runOnEndCallbacks,
1640
- scheduleOnDisposeCallbacks
1641
- };
1642
- };
1643
- function createObjectStash() {
1644
- const map = /* @__PURE__ */ new Map();
1645
- let nextID = 0;
1646
- return {
1647
- clear() {
1648
- map.clear();
1649
- },
1650
- load(id) {
1651
- return map.get(id);
1652
- },
1653
- store(value) {
1654
- if (value === void 0) return -1;
1655
- const id = nextID++;
1656
- map.set(id, value);
1657
- return id;
1658
- }
1659
- };
1660
- }
1661
- function extractCallerV8(e, streamIn, ident) {
1662
- let note;
1663
- let tried = false;
1664
- return () => {
1665
- if (tried) return note;
1666
- tried = true;
1667
- try {
1668
- let lines = (e.stack + "").split("\n");
1669
- lines.splice(1, 1);
1670
- let location = parseStackLinesV8(streamIn, lines, ident);
1671
- if (location) {
1672
- note = { text: e.message, location };
1673
- return note;
1674
- }
1675
- } catch {
1676
- }
1677
- };
1678
- }
1679
- function extractErrorMessageV8(e, streamIn, stash, note, pluginName) {
1680
- let text = "Internal error";
1681
- let location = null;
1682
- try {
1683
- text = (e && e.message || e) + "";
1684
- } catch {
1685
- }
1686
- try {
1687
- location = parseStackLinesV8(streamIn, (e.stack + "").split("\n"), "");
1688
- } catch {
1689
- }
1690
- return { id: "", pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e) : -1 };
1691
- }
1692
- function parseStackLinesV8(streamIn, lines, ident) {
1693
- let at = " at ";
1694
- if (streamIn.readFileSync && !lines[0].startsWith(at) && lines[1].startsWith(at)) {
1695
- for (let i = 1; i < lines.length; i++) {
1696
- let line = lines[i];
1697
- if (!line.startsWith(at)) continue;
1698
- line = line.slice(at.length);
1699
- while (true) {
1700
- let match = /^(?:new |async )?\S+ \((.*)\)$/.exec(line);
1701
- if (match) {
1702
- line = match[1];
1703
- continue;
1704
- }
1705
- match = /^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(line);
1706
- if (match) {
1707
- line = match[1];
1708
- continue;
1709
- }
1710
- match = /^(\S+):(\d+):(\d+)$/.exec(line);
1711
- if (match) {
1712
- let contents;
1713
- try {
1714
- contents = streamIn.readFileSync(match[1], "utf8");
1715
- } catch {
1716
- break;
1717
- }
1718
- let lineText = contents.split(/\r\n|\r|\n|\u2028|\u2029/)[+match[2] - 1] || "";
1719
- let column = +match[3] - 1;
1720
- let length = lineText.slice(column, column + ident.length) === ident ? ident.length : 0;
1721
- return {
1722
- file: match[1],
1723
- namespace: "file",
1724
- line: +match[2],
1725
- column: encodeUTF8(lineText.slice(0, column)).length,
1726
- length: encodeUTF8(lineText.slice(column, column + length)).length,
1727
- lineText: lineText + "\n" + lines.slice(1).join("\n"),
1728
- suggestion: ""
1729
- };
1730
- }
1731
- break;
1732
- }
1733
- }
1734
- }
1735
- return null;
1736
- }
1737
- function failureErrorWithLog(text, errors, warnings) {
1738
- let limit = 5;
1739
- text += errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i) => {
1740
- if (i === limit) return "\n...";
1741
- if (!e.location) return `
1742
- error: ${e.text}`;
1743
- let { file, line, column } = e.location;
1744
- let pluginText = e.pluginName ? `[plugin: ${e.pluginName}] ` : "";
1745
- return `
1746
- ${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`;
1747
- }).join("");
1748
- let error = new Error(text);
1749
- for (const [key, value] of [["errors", errors], ["warnings", warnings]]) {
1750
- Object.defineProperty(error, key, {
1751
- configurable: true,
1752
- enumerable: true,
1753
- get: () => value,
1754
- set: (value2) => Object.defineProperty(error, key, {
1755
- configurable: true,
1756
- enumerable: true,
1757
- value: value2
1758
- })
1759
- });
1760
- }
1761
- return error;
1762
- }
1763
- function replaceDetailsInMessages(messages, stash) {
1764
- for (const message of messages) {
1765
- message.detail = stash.load(message.detail);
1766
- }
1767
- return messages;
1768
- }
1769
- function sanitizeLocation(location, where, terminalWidth) {
1770
- if (location == null) return null;
1771
- let keys = {};
1772
- let file = getFlag(location, keys, "file", mustBeString);
1773
- let namespace = getFlag(location, keys, "namespace", mustBeString);
1774
- let line = getFlag(location, keys, "line", mustBeInteger);
1775
- let column = getFlag(location, keys, "column", mustBeInteger);
1776
- let length = getFlag(location, keys, "length", mustBeInteger);
1777
- let lineText = getFlag(location, keys, "lineText", mustBeString);
1778
- let suggestion = getFlag(location, keys, "suggestion", mustBeString);
1779
- checkForInvalidFlags(location, keys, where);
1780
- if (lineText) {
1781
- const relevantASCII = lineText.slice(
1782
- 0,
1783
- (column && column > 0 ? column : 0) + (length && length > 0 ? length : 0) + (terminalWidth && terminalWidth > 0 ? terminalWidth : 80)
1784
- );
1785
- if (!/[\x7F-\uFFFF]/.test(relevantASCII) && !/\n/.test(lineText)) {
1786
- lineText = relevantASCII;
1787
- }
1788
- }
1789
- return {
1790
- file: file || "",
1791
- namespace: namespace || "",
1792
- line: line || 0,
1793
- column: column || 0,
1794
- length: length || 0,
1795
- lineText: lineText || "",
1796
- suggestion: suggestion || ""
1797
- };
1798
- }
1799
- function sanitizeMessages(messages, property, stash, fallbackPluginName, terminalWidth) {
1800
- let messagesClone = [];
1801
- let index = 0;
1802
- for (const message of messages) {
1803
- let keys = {};
1804
- let id = getFlag(message, keys, "id", mustBeString);
1805
- let pluginName = getFlag(message, keys, "pluginName", mustBeString);
1806
- let text = getFlag(message, keys, "text", mustBeString);
1807
- let location = getFlag(message, keys, "location", mustBeObjectOrNull);
1808
- let notes = getFlag(message, keys, "notes", mustBeArray);
1809
- let detail = getFlag(message, keys, "detail", canBeAnything);
1810
- let where = `in element ${index} of "${property}"`;
1811
- checkForInvalidFlags(message, keys, where);
1812
- let notesClone = [];
1813
- if (notes) {
1814
- for (const note of notes) {
1815
- let noteKeys = {};
1816
- let noteText = getFlag(note, noteKeys, "text", mustBeString);
1817
- let noteLocation = getFlag(note, noteKeys, "location", mustBeObjectOrNull);
1818
- checkForInvalidFlags(note, noteKeys, where);
1819
- notesClone.push({
1820
- text: noteText || "",
1821
- location: sanitizeLocation(noteLocation, where, terminalWidth)
1822
- });
1823
- }
1824
- }
1825
- messagesClone.push({
1826
- id: id || "",
1827
- pluginName: pluginName || fallbackPluginName,
1828
- text: text || "",
1829
- location: sanitizeLocation(location, where, terminalWidth),
1830
- notes: notesClone,
1831
- detail: stash ? stash.store(detail) : -1
1832
- });
1833
- index++;
1834
- }
1835
- return messagesClone;
1836
- }
1837
- function sanitizeStringArray(values, property) {
1838
- const result = [];
1839
- for (const value of values) {
1840
- if (typeof value !== "string") throw new Error(`${quote(property)} must be an array of strings`);
1841
- result.push(value);
1842
- }
1843
- return result;
1844
- }
1845
- function sanitizeStringMap(map, property) {
1846
- const result = /* @__PURE__ */ Object.create(null);
1847
- for (const key in map) {
1848
- const value = map[key];
1849
- if (typeof value !== "string") throw new Error(`key ${quote(key)} in object ${quote(property)} must be a string`);
1850
- result[key] = value;
1851
- }
1852
- return result;
1853
- }
1854
- function convertOutputFiles({ path: path3, contents, hash }) {
1855
- let text = null;
1856
- return {
1857
- path: path3,
1858
- contents,
1859
- hash,
1860
- get text() {
1861
- const binary = this.contents;
1862
- if (text === null || binary !== contents) {
1863
- contents = binary;
1864
- text = decodeUTF8(binary);
1865
- }
1866
- return text;
1867
- }
1868
- };
1869
- }
1870
- function jsRegExpToGoRegExp(regexp) {
1871
- let result = regexp.source;
1872
- if (regexp.flags) result = `(?${regexp.flags})${result}`;
1873
- return result;
1874
- }
1875
- function parseJSON(bytes) {
1876
- let text;
1877
- try {
1878
- text = decodeUTF8(bytes);
1879
- } catch {
1880
- return JSON_parse(bytes);
1881
- }
1882
- return JSON.parse(text);
1883
- }
1884
-
1885
- // lib/npm/node-platform.ts
1886
- var fs = require("fs");
1887
- var os = require("os");
1888
- var path = require("path");
1889
- var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
1890
- var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild";
1891
- var packageDarwin_arm64 = "@esbuild/darwin-arm64";
1892
- var packageDarwin_x64 = "@esbuild/darwin-x64";
1893
- var knownWindowsPackages = {
1894
- "win32 arm64 LE": "@esbuild/win32-arm64",
1895
- "win32 ia32 LE": "@esbuild/win32-ia32",
1896
- "win32 x64 LE": "@esbuild/win32-x64"
1897
- };
1898
- var knownUnixlikePackages = {
1899
- "aix ppc64 BE": "@esbuild/aix-ppc64",
1900
- "android arm64 LE": "@esbuild/android-arm64",
1901
- "darwin arm64 LE": "@esbuild/darwin-arm64",
1902
- "darwin x64 LE": "@esbuild/darwin-x64",
1903
- "freebsd arm64 LE": "@esbuild/freebsd-arm64",
1904
- "freebsd x64 LE": "@esbuild/freebsd-x64",
1905
- "linux arm LE": "@esbuild/linux-arm",
1906
- "linux arm64 LE": "@esbuild/linux-arm64",
1907
- "linux ia32 LE": "@esbuild/linux-ia32",
1908
- "linux mips64el LE": "@esbuild/linux-mips64el",
1909
- "linux ppc64 LE": "@esbuild/linux-ppc64",
1910
- "linux riscv64 LE": "@esbuild/linux-riscv64",
1911
- "linux s390x BE": "@esbuild/linux-s390x",
1912
- "linux x64 LE": "@esbuild/linux-x64",
1913
- "linux loong64 LE": "@esbuild/linux-loong64",
1914
- "netbsd arm64 LE": "@esbuild/netbsd-arm64",
1915
- "netbsd x64 LE": "@esbuild/netbsd-x64",
1916
- "openbsd arm64 LE": "@esbuild/openbsd-arm64",
1917
- "openbsd x64 LE": "@esbuild/openbsd-x64",
1918
- "sunos x64 LE": "@esbuild/sunos-x64"
1919
- };
1920
- var knownWebAssemblyFallbackPackages = {
1921
- "android arm LE": "@esbuild/android-arm",
1922
- "android x64 LE": "@esbuild/android-x64",
1923
- "openharmony arm64 LE": "@esbuild/openharmony-arm64"
1924
- };
1925
- function pkgAndSubpathForCurrentPlatform() {
1926
- let pkg;
1927
- let subpath;
1928
- let isWASM = false;
1929
- let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`;
1930
- if (platformKey in knownWindowsPackages) {
1931
- pkg = knownWindowsPackages[platformKey];
1932
- subpath = "esbuild.exe";
1933
- } else if (platformKey in knownUnixlikePackages) {
1934
- pkg = knownUnixlikePackages[platformKey];
1935
- subpath = "bin/esbuild";
1936
- } else if (platformKey in knownWebAssemblyFallbackPackages) {
1937
- pkg = knownWebAssemblyFallbackPackages[platformKey];
1938
- subpath = "bin/esbuild";
1939
- isWASM = true;
1940
- } else {
1941
- throw new Error(`Unsupported platform: ${platformKey}`);
1942
- }
1943
- return { pkg, subpath, isWASM };
1944
- }
1945
- function pkgForSomeOtherPlatform() {
1946
- const libMainJS = require.resolve("esbuild");
1947
- const nodeModulesDirectory = path.dirname(path.dirname(path.dirname(libMainJS)));
1948
- if (path.basename(nodeModulesDirectory) === "node_modules") {
1949
- for (const unixKey in knownUnixlikePackages) {
1950
- try {
1951
- const pkg = knownUnixlikePackages[unixKey];
1952
- if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg;
1953
- } catch {
1954
- }
1955
- }
1956
- for (const windowsKey in knownWindowsPackages) {
1957
- try {
1958
- const pkg = knownWindowsPackages[windowsKey];
1959
- if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg;
1960
- } catch {
1961
- }
1962
- }
1963
- }
1964
- return null;
1965
- }
1966
- function downloadedBinPath(pkg, subpath) {
1967
- const esbuildLibDir = path.dirname(require.resolve("esbuild"));
1968
- return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`);
1969
- }
1970
- function generateBinPath() {
1971
- if (isValidBinaryPath(ESBUILD_BINARY_PATH)) {
1972
- if (!fs.existsSync(ESBUILD_BINARY_PATH)) {
1973
- console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`);
1974
- } else {
1975
- return { binPath: ESBUILD_BINARY_PATH, isWASM: false };
1976
- }
1977
- }
1978
- const { pkg, subpath, isWASM } = pkgAndSubpathForCurrentPlatform();
1979
- let binPath;
1980
- try {
1981
- binPath = require.resolve(`${pkg}/${subpath}`);
1982
- } catch (e) {
1983
- binPath = downloadedBinPath(pkg, subpath);
1984
- if (!fs.existsSync(binPath)) {
1985
- try {
1986
- require.resolve(pkg);
1987
- } catch {
1988
- const otherPkg = pkgForSomeOtherPlatform();
1989
- if (otherPkg) {
1990
- let suggestions = `
1991
- Specifically the "${otherPkg}" package is present but this platform
1992
- needs the "${pkg}" package instead. People often get into this
1993
- situation by installing esbuild on Windows or macOS and copying "node_modules"
1994
- into a Docker image that runs Linux, or by copying "node_modules" between
1995
- Windows and WSL environments.
1996
-
1997
- If you are installing with npm, you can try not copying the "node_modules"
1998
- directory when you copy the files over, and running "npm ci" or "npm install"
1999
- on the destination platform after the copy. Or you could consider using yarn
2000
- instead of npm which has built-in support for installing a package on multiple
2001
- platforms simultaneously.
2002
-
2003
- If you are installing with yarn, you can try listing both this platform and the
2004
- other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
2005
- feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
2006
- Keep in mind that this means multiple copies of esbuild will be present.
2007
- `;
2008
- if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) {
2009
- suggestions = `
2010
- Specifically the "${otherPkg}" package is present but this platform
2011
- needs the "${pkg}" package instead. People often get into this
2012
- situation by installing esbuild with npm running inside of Rosetta 2 and then
2013
- trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta
2014
- 2 is Apple's on-the-fly x86_64-to-arm64 translation service).
2015
-
2016
- If you are installing with npm, you can try ensuring that both npm and node are
2017
- not running under Rosetta 2 and then reinstalling esbuild. This likely involves
2018
- changing how you installed npm and/or node. For example, installing node with
2019
- the universal installer here should work: https://nodejs.org/en/download/. Or
2020
- you could consider using yarn instead of npm which has built-in support for
2021
- installing a package on multiple platforms simultaneously.
2022
-
2023
- If you are installing with yarn, you can try listing both "arm64" and "x64"
2024
- in your ".yarnrc.yml" file using the "supportedArchitectures" feature:
2025
- https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
2026
- Keep in mind that this means multiple copies of esbuild will be present.
2027
- `;
2028
- }
2029
- throw new Error(`
2030
- You installed esbuild for another platform than the one you're currently using.
2031
- This won't work because esbuild is written with native code and needs to
2032
- install a platform-specific binary executable.
2033
- ${suggestions}
2034
- Another alternative is to use the "esbuild-wasm" package instead, which works
2035
- the same way on all platforms. But it comes with a heavy performance cost and
2036
- can sometimes be 10x slower than the "esbuild" package, so you may also not
2037
- want to do that.
2038
- `);
2039
- }
2040
- throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild.
2041
-
2042
- If you are installing esbuild with npm, make sure that you don't specify the
2043
- "--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature
2044
- of "package.json" is used by esbuild to install the correct binary executable
2045
- for your current platform.`);
2046
- }
2047
- throw e;
2048
- }
2049
- }
2050
- if (/\.zip\//.test(binPath)) {
2051
- let pnpapi;
2052
- try {
2053
- pnpapi = require("pnpapi");
2054
- } catch (e) {
2055
- }
2056
- if (pnpapi) {
2057
- const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
2058
- const binTargetPath = path.join(
2059
- root,
2060
- "node_modules",
2061
- ".cache",
2062
- "esbuild",
2063
- `pnpapi-${pkg.replace("/", "-")}-${"0.27.4"}-${path.basename(subpath)}`
2064
- );
2065
- if (!fs.existsSync(binTargetPath)) {
2066
- fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
2067
- fs.copyFileSync(binPath, binTargetPath);
2068
- fs.chmodSync(binTargetPath, 493);
2069
- }
2070
- return { binPath: binTargetPath, isWASM };
2071
- }
2072
- }
2073
- return { binPath, isWASM };
2074
- }
2075
-
2076
- // lib/npm/node.ts
2077
- var child_process = require("child_process");
2078
- var crypto = require("crypto");
2079
- var path2 = require("path");
2080
- var fs2 = require("fs");
2081
- var os2 = require("os");
2082
- var tty = require("tty");
2083
- var worker_threads;
2084
- if (process.env.ESBUILD_WORKER_THREADS !== "0") {
2085
- try {
2086
- worker_threads = require("worker_threads");
2087
- } catch {
2088
- }
2089
- let [major, minor] = process.versions.node.split(".");
2090
- if (
2091
- // <v12.17.0 does not work
2092
- +major < 12 || +major === 12 && +minor < 17 || +major === 13 && +minor < 13
2093
- ) {
2094
- worker_threads = void 0;
2095
- }
2096
- }
2097
- var _a;
2098
- var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.27.4";
2099
- var esbuildCommandAndArgs = () => {
2100
- if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
2101
- throw new Error(
2102
- `The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle.
2103
-
2104
- More information: The file containing the code for esbuild's JavaScript API (${__filename}) does not appear to be inside the esbuild package on the file system, which usually means that the esbuild package was bundled into another file. This is problematic because the API needs to run a binary executable inside the esbuild package which is located using a relative path from the API code to the executable. If the esbuild package is bundled, the relative path will be incorrect and the executable won't be found.`
2105
- );
2106
- }
2107
- if (false) {
2108
- return ["node", [path2.join(__dirname, "..", "bin", "esbuild")]];
2109
- } else {
2110
- const { binPath, isWASM } = generateBinPath();
2111
- if (isWASM) {
2112
- return ["node", [binPath]];
2113
- } else {
2114
- return [binPath, []];
2115
- }
2116
- }
2117
- };
2118
- var isTTY = () => tty.isatty(2);
2119
- var fsSync = {
2120
- readFile(tempFile, callback) {
2121
- try {
2122
- let contents = fs2.readFileSync(tempFile, "utf8");
2123
- try {
2124
- fs2.unlinkSync(tempFile);
2125
- } catch {
2126
- }
2127
- callback(null, contents);
2128
- } catch (err) {
2129
- callback(err, null);
2130
- }
2131
- },
2132
- writeFile(contents, callback) {
2133
- try {
2134
- let tempFile = randomFileName();
2135
- fs2.writeFileSync(tempFile, contents);
2136
- callback(tempFile);
2137
- } catch {
2138
- callback(null);
2139
- }
2140
- }
2141
- };
2142
- var fsAsync = {
2143
- readFile(tempFile, callback) {
2144
- try {
2145
- fs2.readFile(tempFile, "utf8", (err, contents) => {
2146
- try {
2147
- fs2.unlink(tempFile, () => callback(err, contents));
2148
- } catch {
2149
- callback(err, contents);
2150
- }
2151
- });
2152
- } catch (err) {
2153
- callback(err, null);
2154
- }
2155
- },
2156
- writeFile(contents, callback) {
2157
- try {
2158
- let tempFile = randomFileName();
2159
- fs2.writeFile(tempFile, contents, (err) => err !== null ? callback(null) : callback(tempFile));
2160
- } catch {
2161
- callback(null);
2162
- }
2163
- }
2164
- };
2165
- var version = "0.27.4";
2166
- var build = (options) => ensureServiceIsRunning().build(options);
2167
- var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions);
2168
- var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
2169
- var formatMessages = (messages, options) => ensureServiceIsRunning().formatMessages(messages, options);
2170
- var analyzeMetafile = (messages, options) => ensureServiceIsRunning().analyzeMetafile(messages, options);
2171
- var buildSync = (options) => {
2172
- if (worker_threads && !isInternalWorkerThread) {
2173
- if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads);
2174
- return workerThreadService.buildSync(options);
2175
- }
2176
- let result;
2177
- runServiceSync((service) => service.buildOrContext({
2178
- callName: "buildSync",
2179
- refs: null,
2180
- options,
2181
- isTTY: isTTY(),
2182
- defaultWD,
2183
- callback: (err, res) => {
2184
- if (err) throw err;
2185
- result = res;
2186
- }
2187
- }));
2188
- return result;
2189
- };
2190
- var transformSync = (input, options) => {
2191
- if (worker_threads && !isInternalWorkerThread) {
2192
- if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads);
2193
- return workerThreadService.transformSync(input, options);
2194
- }
2195
- let result;
2196
- runServiceSync((service) => service.transform({
2197
- callName: "transformSync",
2198
- refs: null,
2199
- input,
2200
- options: options || {},
2201
- isTTY: isTTY(),
2202
- fs: fsSync,
2203
- callback: (err, res) => {
2204
- if (err) throw err;
2205
- result = res;
2206
- }
2207
- }));
2208
- return result;
2209
- };
2210
- var formatMessagesSync = (messages, options) => {
2211
- if (worker_threads && !isInternalWorkerThread) {
2212
- if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads);
2213
- return workerThreadService.formatMessagesSync(messages, options);
2214
- }
2215
- let result;
2216
- runServiceSync((service) => service.formatMessages({
2217
- callName: "formatMessagesSync",
2218
- refs: null,
2219
- messages,
2220
- options,
2221
- callback: (err, res) => {
2222
- if (err) throw err;
2223
- result = res;
2224
- }
2225
- }));
2226
- return result;
2227
- };
2228
- var analyzeMetafileSync = (metafile, options) => {
2229
- if (worker_threads && !isInternalWorkerThread) {
2230
- if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads);
2231
- return workerThreadService.analyzeMetafileSync(metafile, options);
2232
- }
2233
- let result;
2234
- runServiceSync((service) => service.analyzeMetafile({
2235
- callName: "analyzeMetafileSync",
2236
- refs: null,
2237
- metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile),
2238
- options,
2239
- callback: (err, res) => {
2240
- if (err) throw err;
2241
- result = res;
2242
- }
2243
- }));
2244
- return result;
2245
- };
2246
- var stop = () => {
2247
- if (stopService) stopService();
2248
- if (workerThreadService) workerThreadService.stop();
2249
- return Promise.resolve();
2250
- };
2251
- var initializeWasCalled = false;
2252
- var initialize = (options) => {
2253
- options = validateInitializeOptions(options || {});
2254
- if (options.wasmURL) throw new Error(`The "wasmURL" option only works in the browser`);
2255
- if (options.wasmModule) throw new Error(`The "wasmModule" option only works in the browser`);
2256
- if (options.worker) throw new Error(`The "worker" option only works in the browser`);
2257
- if (initializeWasCalled) throw new Error('Cannot call "initialize" more than once');
2258
- ensureServiceIsRunning();
2259
- initializeWasCalled = true;
2260
- return Promise.resolve();
2261
- };
2262
- var defaultWD = process.cwd();
2263
- var longLivedService;
2264
- var stopService;
2265
- var ensureServiceIsRunning = () => {
2266
- if (longLivedService) return longLivedService;
2267
- let [command, args] = esbuildCommandAndArgs();
2268
- let child = child_process.spawn(command, args.concat(`--service=${"0.27.4"}`, "--ping"), {
2269
- windowsHide: true,
2270
- stdio: ["pipe", "pipe", "inherit"],
2271
- cwd: defaultWD
2272
- });
2273
- let { readFromStdout, afterClose, service } = createChannel({
2274
- writeToStdin(bytes) {
2275
- child.stdin.write(bytes, (err) => {
2276
- if (err) afterClose(err);
2277
- });
2278
- },
2279
- readFileSync: fs2.readFileSync,
2280
- isSync: false,
2281
- hasFS: true,
2282
- esbuild: node_exports
2283
- });
2284
- child.stdin.on("error", afterClose);
2285
- child.on("error", afterClose);
2286
- const stdin = child.stdin;
2287
- const stdout = child.stdout;
2288
- stdout.on("data", readFromStdout);
2289
- stdout.on("end", afterClose);
2290
- stopService = () => {
2291
- stdin.destroy();
2292
- stdout.destroy();
2293
- child.kill();
2294
- initializeWasCalled = false;
2295
- longLivedService = void 0;
2296
- stopService = void 0;
2297
- };
2298
- let refCount = 0;
2299
- child.unref();
2300
- if (stdin.unref) {
2301
- stdin.unref();
2302
- }
2303
- if (stdout.unref) {
2304
- stdout.unref();
2305
- }
2306
- const refs = {
2307
- ref() {
2308
- if (++refCount === 1) child.ref();
2309
- },
2310
- unref() {
2311
- if (--refCount === 0) child.unref();
2312
- }
2313
- };
2314
- longLivedService = {
2315
- build: (options) => new Promise((resolve, reject) => {
2316
- service.buildOrContext({
2317
- callName: "build",
2318
- refs,
2319
- options,
2320
- isTTY: isTTY(),
2321
- defaultWD,
2322
- callback: (err, res) => err ? reject(err) : resolve(res)
2323
- });
2324
- }),
2325
- context: (options) => new Promise((resolve, reject) => service.buildOrContext({
2326
- callName: "context",
2327
- refs,
2328
- options,
2329
- isTTY: isTTY(),
2330
- defaultWD,
2331
- callback: (err, res) => err ? reject(err) : resolve(res)
2332
- })),
2333
- transform: (input, options) => new Promise((resolve, reject) => service.transform({
2334
- callName: "transform",
2335
- refs,
2336
- input,
2337
- options: options || {},
2338
- isTTY: isTTY(),
2339
- fs: fsAsync,
2340
- callback: (err, res) => err ? reject(err) : resolve(res)
2341
- })),
2342
- formatMessages: (messages, options) => new Promise((resolve, reject) => service.formatMessages({
2343
- callName: "formatMessages",
2344
- refs,
2345
- messages,
2346
- options,
2347
- callback: (err, res) => err ? reject(err) : resolve(res)
2348
- })),
2349
- analyzeMetafile: (metafile, options) => new Promise((resolve, reject) => service.analyzeMetafile({
2350
- callName: "analyzeMetafile",
2351
- refs,
2352
- metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile),
2353
- options,
2354
- callback: (err, res) => err ? reject(err) : resolve(res)
2355
- }))
2356
- };
2357
- return longLivedService;
2358
- };
2359
- var runServiceSync = (callback) => {
2360
- let [command, args] = esbuildCommandAndArgs();
2361
- let stdin = new Uint8Array();
2362
- let { readFromStdout, afterClose, service } = createChannel({
2363
- writeToStdin(bytes) {
2364
- if (stdin.length !== 0) throw new Error("Must run at most one command");
2365
- stdin = bytes;
2366
- },
2367
- isSync: true,
2368
- hasFS: true,
2369
- esbuild: node_exports
2370
- });
2371
- callback(service);
2372
- let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.27.4"}`), {
2373
- cwd: defaultWD,
2374
- windowsHide: true,
2375
- input: stdin,
2376
- // We don't know how large the output could be. If it's too large, the
2377
- // command will fail with ENOBUFS. Reserve 16mb for now since that feels
2378
- // like it should be enough. Also allow overriding this with an environment
2379
- // variable.
2380
- maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024
2381
- });
2382
- readFromStdout(stdout);
2383
- afterClose(null);
2384
- };
2385
- var randomFileName = () => {
2386
- return path2.join(os2.tmpdir(), `esbuild-${crypto.randomBytes(32).toString("hex")}`);
2387
- };
2388
- var workerThreadService = null;
2389
- var startWorkerThreadService = (worker_threads2) => {
2390
- let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
2391
- let worker = new worker_threads2.Worker(__filename, {
2392
- workerData: { workerPort, defaultWD, esbuildVersion: "0.27.4" },
2393
- transferList: [workerPort],
2394
- // From node's documentation: https://nodejs.org/api/worker_threads.html
2395
- //
2396
- // Take care when launching worker threads from preload scripts (scripts loaded
2397
- // and run using the `-r` command line flag). Unless the `execArgv` option is
2398
- // explicitly set, new Worker threads automatically inherit the command line flags
2399
- // from the running process and will preload the same preload scripts as the main
2400
- // thread. If the preload script unconditionally launches a worker thread, every
2401
- // thread spawned will spawn another until the application crashes.
2402
- //
2403
- execArgv: []
2404
- });
2405
- let nextID = 0;
2406
- let fakeBuildError = (text) => {
2407
- let error = new Error(`Build failed with 1 error:
2408
- error: ${text}`);
2409
- let errors = [{ id: "", pluginName: "", text, location: null, notes: [], detail: void 0 }];
2410
- error.errors = errors;
2411
- error.warnings = [];
2412
- return error;
2413
- };
2414
- let validateBuildSyncOptions = (options) => {
2415
- if (!options) return;
2416
- let plugins = options.plugins;
2417
- if (plugins && plugins.length > 0) throw fakeBuildError(`Cannot use plugins in synchronous API calls`);
2418
- };
2419
- let applyProperties = (object, properties) => {
2420
- for (let key in properties) {
2421
- object[key] = properties[key];
2422
- }
2423
- };
2424
- let runCallSync = (command, args) => {
2425
- let id = nextID++;
2426
- let sharedBuffer = new SharedArrayBuffer(8);
2427
- let sharedBufferView = new Int32Array(sharedBuffer);
2428
- let msg = { sharedBuffer, id, command, args };
2429
- worker.postMessage(msg);
2430
- let status = Atomics.wait(sharedBufferView, 0, 0);
2431
- if (status !== "ok" && status !== "not-equal") throw new Error("Internal error: Atomics.wait() failed: " + status);
2432
- let { message: { id: id2, resolve, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort);
2433
- if (id !== id2) throw new Error(`Internal error: Expected id ${id} but got id ${id2}`);
2434
- if (reject) {
2435
- applyProperties(reject, properties);
2436
- throw reject;
2437
- }
2438
- return resolve;
2439
- };
2440
- worker.unref();
2441
- return {
2442
- buildSync(options) {
2443
- validateBuildSyncOptions(options);
2444
- return runCallSync("build", [options]);
2445
- },
2446
- transformSync(input, options) {
2447
- return runCallSync("transform", [input, options]);
2448
- },
2449
- formatMessagesSync(messages, options) {
2450
- return runCallSync("formatMessages", [messages, options]);
2451
- },
2452
- analyzeMetafileSync(metafile, options) {
2453
- return runCallSync("analyzeMetafile", [metafile, options]);
2454
- },
2455
- stop() {
2456
- worker.terminate();
2457
- workerThreadService = null;
2458
- }
2459
- };
2460
- };
2461
- var startSyncServiceWorker = () => {
2462
- let workerPort = worker_threads.workerData.workerPort;
2463
- let parentPort = worker_threads.parentPort;
2464
- let extractProperties = (object) => {
2465
- let properties = {};
2466
- if (object && typeof object === "object") {
2467
- for (let key in object) {
2468
- properties[key] = object[key];
2469
- }
2470
- }
2471
- return properties;
2472
- };
2473
- try {
2474
- let service = ensureServiceIsRunning();
2475
- defaultWD = worker_threads.workerData.defaultWD;
2476
- parentPort.on("message", (msg) => {
2477
- (async () => {
2478
- let { sharedBuffer, id, command, args } = msg;
2479
- let sharedBufferView = new Int32Array(sharedBuffer);
2480
- try {
2481
- switch (command) {
2482
- case "build":
2483
- workerPort.postMessage({ id, resolve: await service.build(args[0]) });
2484
- break;
2485
- case "transform":
2486
- workerPort.postMessage({ id, resolve: await service.transform(args[0], args[1]) });
2487
- break;
2488
- case "formatMessages":
2489
- workerPort.postMessage({ id, resolve: await service.formatMessages(args[0], args[1]) });
2490
- break;
2491
- case "analyzeMetafile":
2492
- workerPort.postMessage({ id, resolve: await service.analyzeMetafile(args[0], args[1]) });
2493
- break;
2494
- default:
2495
- throw new Error(`Invalid command: ${command}`);
2496
- }
2497
- } catch (reject) {
2498
- workerPort.postMessage({ id, reject, properties: extractProperties(reject) });
2499
- }
2500
- Atomics.add(sharedBufferView, 0, 1);
2501
- Atomics.notify(sharedBufferView, 0, Infinity);
2502
- })();
2503
- });
2504
- } catch (reject) {
2505
- parentPort.on("message", (msg) => {
2506
- let { sharedBuffer, id } = msg;
2507
- let sharedBufferView = new Int32Array(sharedBuffer);
2508
- workerPort.postMessage({ id, reject, properties: extractProperties(reject) });
2509
- Atomics.add(sharedBufferView, 0, 1);
2510
- Atomics.notify(sharedBufferView, 0, Infinity);
2511
- });
2512
- }
2513
- };
2514
- if (isInternalWorkerThread) {
2515
- startSyncServiceWorker();
2516
- }
2517
- var node_default = node_exports;
2518
- // Annotate the CommonJS export names for ESM import in node:
2519
- 0 && (module.exports = {
2520
- analyzeMetafile,
2521
- analyzeMetafileSync,
2522
- build,
2523
- buildSync,
2524
- context,
2525
- formatMessages,
2526
- formatMessagesSync,
2527
- initialize,
2528
- stop,
2529
- transform,
2530
- transformSync,
2531
- version
2532
- });