@storm-software/unbuild 0.25.2 → 0.25.3

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 (86) hide show
  1. package/README.md +1 -1
  2. package/bin/unbuild.cjs +3402 -0
  3. package/bin/unbuild.js +2709 -62860
  4. package/dist/build.cjs +14 -0
  5. package/dist/{build.d.mts → build.d.cts} +1 -1
  6. package/dist/build.js +14 -20
  7. package/dist/{chunk-WXJPXYHF.mjs → chunk-2RMUO4GG.js} +3 -5
  8. package/dist/chunk-36OA7HRF.cjs +598 -0
  9. package/dist/chunk-3GQAWCBQ.js +13 -0
  10. package/dist/{chunk-BUCFGCTW.js → chunk-4AWYDOEH.cjs} +5 -7
  11. package/dist/chunk-ADWBQYE6.cjs +27 -0
  12. package/dist/chunk-BE5U4XRE.js +63 -0
  13. package/dist/{chunk-SQOZCV36.js → chunk-D5YXD4XE.cjs} +2 -4
  14. package/dist/{chunk-4ENAOJ33.mjs → chunk-ESRR2FD2.js} +2 -4
  15. package/dist/chunk-HYDGJLPG.cjs +2495 -0
  16. package/dist/{chunk-4BAUMYRN.mjs → chunk-JKBKJSU6.js} +2 -4
  17. package/dist/{chunk-PVZYPNLZ.js → chunk-KUMAH6IZ.cjs} +6 -8
  18. package/dist/chunk-LUXNRUAP.cjs +63 -0
  19. package/dist/chunk-ORA4UQMU.cjs +1 -0
  20. package/dist/chunk-OULCUN6I.js +0 -0
  21. package/dist/{chunk-6UMHN4KS.mjs → chunk-RHYLM6VP.js} +3 -5
  22. package/dist/chunk-RWW6C7JH.js +598 -0
  23. package/dist/{chunk-P6LWSWAQ.js → chunk-SHHAZOHN.cjs} +2 -4
  24. package/dist/chunk-T2Q5LQOI.js +2494 -0
  25. package/dist/{chunk-ESGPHEWU.mjs → chunk-T6BV33KD.js} +6 -8
  26. package/dist/chunk-YDYGZTJK.cjs +18 -0
  27. package/dist/clean.cjs +10 -0
  28. package/dist/clean.js +10 -10
  29. package/dist/config.cjs +12 -0
  30. package/dist/{config.d.mts → config.d.cts} +1 -1
  31. package/dist/config.js +12 -12
  32. package/dist/index.cjs +28 -0
  33. package/dist/{index.d.mts → index.d.cts} +4 -4
  34. package/dist/index.js +28 -39
  35. package/dist/types.cjs +2 -0
  36. package/dist/types.js +1 -2
  37. package/package.json +38 -37
  38. package/bin/unbuild.mjs +0 -63530
  39. package/dist/build.mjs +0 -20
  40. package/dist/chunk-3TNHGERR.mjs +0 -49
  41. package/dist/chunk-44VTNVZA.js +0 -29
  42. package/dist/chunk-45FJ3WQ6.js +0 -7528
  43. package/dist/chunk-4HFICKAT.js +0 -451
  44. package/dist/chunk-4IU7LXNH.mjs +0 -4054
  45. package/dist/chunk-523YIUTF.js +0 -19937
  46. package/dist/chunk-7G3WYTPJ.js +0 -6
  47. package/dist/chunk-AMTVM7UD.js +0 -4054
  48. package/dist/chunk-DIRFSBOA.mjs +0 -84
  49. package/dist/chunk-EGCWTBMT.mjs +0 -1120
  50. package/dist/chunk-EKTZK3IJ.mjs +0 -765
  51. package/dist/chunk-FAXWFK7Q.mjs +0 -7528
  52. package/dist/chunk-G6BE6UP3.mjs +0 -2481
  53. package/dist/chunk-K5SQO3GD.mjs +0 -451
  54. package/dist/chunk-MCNTIU52.js +0 -3050
  55. package/dist/chunk-NMYL4VJJ.js +0 -84
  56. package/dist/chunk-NOVWJHZD.mjs +0 -6
  57. package/dist/chunk-Q4GMTWGF.mjs +0 -19937
  58. package/dist/chunk-RBSVNX4W.js +0 -49
  59. package/dist/chunk-RM7SW35Z.js +0 -1120
  60. package/dist/chunk-S532A3LO.js +0 -510
  61. package/dist/chunk-TEEYWCSY.mjs +0 -3050
  62. package/dist/chunk-VJI72AA6.mjs +0 -510
  63. package/dist/chunk-W7YS7HE5.js +0 -765
  64. package/dist/chunk-YIP6AERX.js +0 -2484
  65. package/dist/clean.mjs +0 -10
  66. package/dist/config.mjs +0 -12
  67. package/dist/dist-JWSUGJW5.js +0 -17571
  68. package/dist/dist-LXRVOZWD.mjs +0 -17570
  69. package/dist/esm-2JSYGY2W.js +0 -1716
  70. package/dist/esm-2LICJFKF.mjs +0 -1716
  71. package/dist/execa-2KYLC5PR.mjs +0 -2424
  72. package/dist/execa-QRX32ES4.js +0 -2424
  73. package/dist/index.mjs +0 -39
  74. package/dist/json5-JI6Y4EBT.mjs +0 -10
  75. package/dist/json5-ZRUT32KA.js +0 -10
  76. package/dist/jsonc-2MC7UMCL.js +0 -15
  77. package/dist/jsonc-PDDMSRDH.mjs +0 -15
  78. package/dist/multipart-parser-FQDS23TV.mjs +0 -187
  79. package/dist/multipart-parser-IX66WIWH.js +0 -187
  80. package/dist/toml-IHKP66UV.mjs +0 -10
  81. package/dist/toml-MDHAEB3G.js +0 -10
  82. package/dist/types.mjs +0 -2
  83. package/dist/yaml-GMY56OHD.mjs +0 -10
  84. package/dist/yaml-UTMAXQ2T.js +0 -10
  85. /package/dist/{clean.d.mts → clean.d.cts} +0 -0
  86. /package/dist/{types.d.mts → types.d.cts} +0 -0
@@ -1,10 +1,8 @@
1
1
  import {
2
- __name,
3
- init_esm_shims
4
- } from "./chunk-3TNHGERR.mjs";
2
+ __name
3
+ } from "./chunk-3GQAWCBQ.js";
5
4
 
6
5
  // src/plugins/on-error.ts
7
- init_esm_shims();
8
6
  var onErrorPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
9
7
  name: "storm:on-error",
10
8
  buildEnd(error) {
@@ -1,29 +1,27 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkMCNTIU52js = require('./chunk-MCNTIU52.js');
4
+ var _chunk36OA7HRFcjs = require('./chunk-36OA7HRF.cjs');
5
5
 
6
6
 
7
-
8
- var _chunkRBSVNX4Wjs = require('./chunk-RBSVNX4W.js');
7
+ var _chunkYDYGZTJKcjs = require('./chunk-YDYGZTJK.cjs');
9
8
 
10
9
  // src/clean.ts
11
- _chunkRBSVNX4Wjs.init_cjs_shims.call(void 0, );
12
10
  var _promises = require('fs/promises');
13
11
  async function clean(name = "Unbuild", directory, config) {
14
- _chunkMCNTIU52js.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
15
- const stopwatch = _chunkMCNTIU52js.getStopwatch.call(void 0, `${name} output clean`);
12
+ _chunk36OA7HRFcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
13
+ const stopwatch = _chunk36OA7HRFcjs.getStopwatch.call(void 0, `${name} output clean`);
16
14
  await cleanDirectories(name, directory, config);
17
15
  stopwatch();
18
16
  }
19
- _chunkRBSVNX4Wjs.__name.call(void 0, clean, "clean");
17
+ _chunkYDYGZTJKcjs.__name.call(void 0, clean, "clean");
20
18
  async function cleanDirectories(name = "Unbuild", directory, config) {
21
19
  await _promises.rm.call(void 0, directory, {
22
20
  recursive: true,
23
21
  force: true
24
22
  });
25
23
  }
26
- _chunkRBSVNX4Wjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
24
+ _chunkYDYGZTJKcjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
27
25
 
28
26
 
29
27
 
@@ -0,0 +1,63 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+ var _chunk36OA7HRFcjs = require('./chunk-36OA7HRF.cjs');
4
+
5
+
6
+ var _chunkYDYGZTJKcjs = require('./chunk-YDYGZTJK.cjs');
7
+
8
+ // src/plugins/tsc.ts
9
+ var _devkit = require('@nx/devkit');
10
+ var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
11
+ var _compilerhelperdependency = require('@nx/js/src/utils/compiler-helper-dependency');
12
+ var _rollupplugintypescript2 = require('rollup-plugin-typescript2'); var _rollupplugintypescript22 = _interopRequireDefault(_rollupplugintypescript2);
13
+
14
+ // src/utilities/helpers.ts
15
+
16
+
17
+ var _path = require('path');
18
+ var _url = require('url');
19
+ var _typescript = require('typescript'); var _typescript2 = _interopRequireDefault(_typescript);
20
+ async function loadConfig(configPath) {
21
+ if (!/\.(js|mjs)$/.test(_path.extname.call(void 0, configPath))) {
22
+ throw new Error("Unsupported config file format");
23
+ }
24
+ return Promise.resolve().then(() => _interopRequireWildcard(require(_url.pathToFileURL.call(void 0, configPath).toString()))).then((config) => config.default);
25
+ }
26
+ _chunkYDYGZTJKcjs.__name.call(void 0, loadConfig, "loadConfig");
27
+ async function createTsCompilerOptions(config, tsConfigPath, projectRoot, dependencies) {
28
+ const tsConfigFile = _typescript2.default.readConfigFile(_devkit.joinPathFragments.call(void 0, config.workspaceRoot, projectRoot, tsConfigPath), _typescript2.default.sys.readFile);
29
+ const tsConfig = _typescript2.default.parseJsonConfigFileContent(tsConfigFile.config, _typescript2.default.sys, _path.dirname.call(void 0, _devkit.joinPathFragments.call(void 0, config.workspaceRoot, projectRoot, tsConfigPath)));
30
+ const compilerOptions = {
31
+ rootDir: projectRoot,
32
+ declaration: true,
33
+ paths: _buildablelibsutils.computeCompilerOptionsPaths.call(void 0, tsConfig, _nullishCoalesce(dependencies, () => ( [])))
34
+ };
35
+ _chunk36OA7HRFcjs.writeTrace.call(void 0, compilerOptions, config);
36
+ return compilerOptions;
37
+ }
38
+ _chunkYDYGZTJKcjs.__name.call(void 0, createTsCompilerOptions, "createTsCompilerOptions");
39
+
40
+ // src/plugins/tsc.ts
41
+ var tscPlugin = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, async (options, resolvedOptions) => {
42
+ const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
43
+ const result = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, resolvedOptions.config.workspaceRoot, resolvedOptions.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
44
+ let dependencies = result.dependencies;
45
+ const tsLibDependency = _compilerhelperdependency.getHelperDependency.call(void 0, _compilerhelperdependency.HelperDependency.tsc, resolvedOptions.tsconfig, dependencies, projectGraph, true);
46
+ if (tsLibDependency) {
47
+ dependencies = dependencies.filter((deps) => deps.name !== tsLibDependency.name);
48
+ dependencies.push(tsLibDependency);
49
+ }
50
+ return _rollupplugintypescript22.default.call(void 0, {
51
+ check: options.emitTypes !== false,
52
+ tsconfig: resolvedOptions.tsconfig,
53
+ tsconfigOverride: {
54
+ compilerOptions: await createTsCompilerOptions(resolvedOptions.config, resolvedOptions.tsconfig, resolvedOptions.projectRoot, dependencies)
55
+ }
56
+ });
57
+ }, "tscPlugin");
58
+
59
+
60
+
61
+
62
+
63
+ exports.loadConfig = loadConfig; exports.createTsCompilerOptions = createTsCompilerOptions; exports.tscPlugin = tscPlugin;
@@ -0,0 +1 @@
1
+ "use strict";
File without changes
@@ -1,14 +1,12 @@
1
1
  import {
2
2
  getStopwatch,
3
3
  writeDebug
4
- } from "./chunk-TEEYWCSY.mjs";
4
+ } from "./chunk-RWW6C7JH.js";
5
5
  import {
6
- __name,
7
- init_esm_shims
8
- } from "./chunk-3TNHGERR.mjs";
6
+ __name
7
+ } from "./chunk-3GQAWCBQ.js";
9
8
 
10
9
  // src/clean.ts
11
- init_esm_shims();
12
10
  import { rm } from "node:fs/promises";
13
11
  async function clean(name = "Unbuild", directory, config) {
14
12
  writeDebug(` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);