@storm-software/unbuild 0.17.0 → 0.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +1 -1
  2. package/bin/unbuild.cjs +1404 -102
  3. package/dist/build.cjs +15 -0
  4. package/dist/build.d.cts +13 -0
  5. package/dist/build.d.ts +13 -0
  6. package/dist/build.js +15 -0
  7. package/dist/chunk-3GQAWCBQ.js +13 -0
  8. package/dist/chunk-3VV4SMHK.js +65 -0
  9. package/dist/chunk-425BMCFI.cjs +31 -0
  10. package/dist/chunk-5N2TOSNK.cjs +21 -0
  11. package/dist/chunk-5RCA5OSO.cjs +35 -0
  12. package/dist/chunk-6G4AZLTO.cjs +28 -0
  13. package/dist/chunk-BGYQAVKQ.cjs +13 -0
  14. package/dist/chunk-C2GKE7R5.js +35 -0
  15. package/dist/chunk-D7L56O4W.js +1039 -0
  16. package/dist/chunk-DWREBCC4.cjs +557 -0
  17. package/dist/chunk-EES2DAYR.cjs +65 -0
  18. package/dist/chunk-FYSN6ZVI.js +21 -0
  19. package/dist/chunk-GGNOJ77I.js +0 -0
  20. package/dist/chunk-KVVGB74V.js +31 -0
  21. package/dist/chunk-LGSLDHM4.cjs +31 -0
  22. package/dist/chunk-OP52W2X6.cjs +35 -0
  23. package/dist/chunk-P5CSSAMQ.js +557 -0
  24. package/dist/chunk-REG7YZIZ.js +31 -0
  25. package/dist/chunk-SFZRYJZ2.cjs +1 -0
  26. package/dist/chunk-V3TNL7N7.cjs +1039 -0
  27. package/dist/chunk-VN5I7Q45.js +28 -0
  28. package/dist/chunk-X42DGJLB.js +35 -0
  29. package/dist/clean-BlXMN74D.d.cts +1194 -0
  30. package/dist/clean-BlXMN74D.d.ts +1194 -0
  31. package/dist/clean.cjs +8 -0
  32. package/dist/clean.d.cts +2 -0
  33. package/dist/clean.d.ts +2 -0
  34. package/dist/clean.js +8 -0
  35. package/dist/config.cjs +13 -0
  36. package/dist/config.d.cts +8 -0
  37. package/dist/config.d.ts +8 -0
  38. package/dist/config.js +13 -0
  39. package/dist/index.cjs +27 -0
  40. package/dist/index.d.cts +23 -0
  41. package/dist/index.d.ts +23 -0
  42. package/dist/index.js +27 -0
  43. package/dist/types.cjs +1 -0
  44. package/dist/types.d.cts +30 -0
  45. package/dist/types.d.ts +30 -0
  46. package/dist/types.js +1 -0
  47. package/package.json +1 -1
@@ -0,0 +1,28 @@
1
+ import {
2
+ __name,
3
+ __require
4
+ } from "./chunk-3GQAWCBQ.js";
5
+
6
+ // src/plugins/swc.ts
7
+ var swcPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
8
+ const { transform } = __require("@swc/core");
9
+ return {
10
+ name: "storm:swc",
11
+ transform(code, filename) {
12
+ return transform(code, {
13
+ filename,
14
+ jsc: {
15
+ transform: {
16
+ react: {
17
+ runtime: "automatic"
18
+ }
19
+ }
20
+ }
21
+ });
22
+ }
23
+ };
24
+ }, "swcPlugin");
25
+
26
+ export {
27
+ swcPlugin
28
+ };
@@ -0,0 +1,35 @@
1
+ import {
2
+ __name
3
+ } from "./chunk-3GQAWCBQ.js";
4
+
5
+ // src/plugins/type-definitions.ts
6
+ import { relative } from "node:path";
7
+ var typeDefinitions = /* @__PURE__ */ __name((options, resolvedOptions) => ({
8
+ name: "storm:dts-bundle",
9
+ async generateBundle(_opts, bundle) {
10
+ for (const file of Object.values(bundle)) {
11
+ if (file.type === "asset" || !file.isEntry || file.facadeModuleId == null) {
12
+ continue;
13
+ }
14
+ const hasDefaultExport = file.exports.includes("default");
15
+ const entrySourceFileName = relative(options.projectRoot, file.facadeModuleId);
16
+ const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
17
+ const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
18
+ const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
19
+ const dtsFileSource = hasDefaultExport ? `
20
+ export * from ${relativeSourceDtsName};
21
+ export { default } from ${relativeSourceDtsName};
22
+ ` : `export * from ${relativeSourceDtsName};
23
+ `;
24
+ this.emitFile({
25
+ type: "asset",
26
+ fileName: dtsFileName,
27
+ source: dtsFileSource
28
+ });
29
+ }
30
+ }
31
+ }), "typeDefinitions");
32
+
33
+ export {
34
+ typeDefinitions
35
+ };