@storm-software/esbuild 0.52.20 → 0.53.1
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.
- package/README.md +2 -1
- package/bin/esbuild.cjs +1 -1
- package/dist/assets.cjs +3 -6
- package/dist/assets.js +2 -5
- package/dist/build.cjs +9 -12
- package/dist/build.js +8 -11
- package/dist/chunk-3RG5ZIWI.js +10 -0
- package/dist/{chunk-GRCBCRT3.cjs → chunk-BXCOVK3I.cjs} +4 -9
- package/dist/{chunk-JUYIXFPA.cjs → chunk-CRFWMPZN.cjs} +13 -20
- package/dist/{chunk-FE36AM5O.js → chunk-CZC4I6SL.js} +5 -12
- package/dist/{chunk-YEL4SZSU.js → chunk-D4DSKI5N.js} +9 -17
- package/dist/{chunk-MEWZGWK3.cjs → chunk-DJNFLJSO.cjs} +6 -13
- package/dist/chunk-GGNOJ77I.js +0 -0
- package/dist/{chunk-UNIT3DUA.js → chunk-MTZGYTJP.js} +3 -10
- package/dist/{chunk-U4FGDMUR.cjs → chunk-MYIRPP4C.cjs} +4 -11
- package/dist/chunk-OBGZSXTJ.cjs +10 -0
- package/dist/{chunk-OOJQKVMY.cjs → chunk-P3PATQE5.cjs} +19 -27
- package/dist/chunk-SFZRYJZ2.cjs +1 -0
- package/dist/{chunk-FFM36UWY.js → chunk-SJ6BFZTX.js} +8 -12
- package/dist/{chunk-ZSMWNUMF.js → chunk-TTW7MNRE.js} +1 -8
- package/dist/chunk-V7AFF6GW.cjs +25 -0
- package/dist/{chunk-DEU6FC3P.cjs → chunk-XAUXKCOD.cjs} +21 -25
- package/dist/{chunk-QPLYTZHZ.js → chunk-XKSMSRQZ.js} +2 -7
- package/dist/chunk-ZH5YCT67.js +25 -0
- package/dist/clean.cjs +3 -4
- package/dist/clean.js +2 -3
- package/dist/config.cjs +3 -6
- package/dist/config.js +2 -5
- package/dist/context.cjs +4 -7
- package/dist/context.js +3 -6
- package/dist/index.cjs +10 -18
- package/dist/index.js +9 -17
- package/dist/package-json.cjs +3 -6
- package/dist/package-json.js +2 -5
- package/dist/plugins/deps-check.cjs +6 -8
- package/dist/plugins/deps-check.js +6 -8
- package/dist/plugins/resolve-paths.cjs +12 -38
- package/dist/plugins/resolve-paths.js +4 -30
- package/dist/tsup.cjs +3 -5
- package/dist/tsup.js +2 -4
- package/dist/types.cjs +1 -2
- package/dist/types.js +1 -2
- package/dist/watch.cjs +5 -9
- package/dist/watch.js +4 -8
- package/package.json +8 -8
- package/assets/cjs_shims.js +0 -11
- package/assets/esm_shims.js +0 -9
- package/dist/chunk-2C3MWYHH.cjs +0 -47
- package/dist/chunk-7SWZ2ZGX.cjs +0 -135
- package/dist/chunk-AFLE3LVA.js +0 -1906
- package/dist/chunk-B3BJCWKI.cjs +0 -2687
- package/dist/chunk-BYH4XDRH.cjs +0 -6
- package/dist/chunk-ETBYMZ46.cjs +0 -6
- package/dist/chunk-GZSSIGNC.cjs +0 -153
- package/dist/chunk-HFWPMK44.cjs +0 -325
- package/dist/chunk-IVZEDCLS.js +0 -6
- package/dist/chunk-JBXDZTFM.js +0 -135
- package/dist/chunk-JZ25TPTY.cjs +0 -42
- package/dist/chunk-KT4NC6CJ.js +0 -325
- package/dist/chunk-OKPZK64Q.cjs +0 -1906
- package/dist/chunk-TWFEYLU4.cjs +0 -352
- package/dist/chunk-VGC3FXLU.cjs +0 -203
- package/dist/chunk-Z7VDLMOZ.js +0 -54
- package/dist/chunk-ZFVQ4LC4.js +0 -2718
- package/dist/rollup.cjs +0 -6906
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
|
@@ -40,6 +40,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
40
40
|
|
|
41
41
|
<!-- START doctoc -->
|
|
42
42
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
43
|
+
|
|
43
44
|
## Table of Contents
|
|
44
45
|
|
|
45
46
|
- [Storm ESBuild Package](#storm-esbuild-package)
|
package/bin/esbuild.cjs
CHANGED
|
@@ -10628,7 +10628,7 @@ async function generatePackageJson(context) {
|
|
|
10628
10628
|
// src/tsup.ts
|
|
10629
10629
|
var import_console5 = require("@storm-software/config-tools/logger/console");
|
|
10630
10630
|
var import_correct_paths3 = require("@storm-software/config-tools/utilities/correct-paths");
|
|
10631
|
-
var import_tsup = require("tsup");
|
|
10631
|
+
var import_tsup = require("@storm-software/tsup");
|
|
10632
10632
|
async function executeTsup(context) {
|
|
10633
10633
|
(0, import_console5.writeDebug)(
|
|
10634
10634
|
` \u{1F680} Running ${context.options.name} build`,
|
package/dist/assets.cjs
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-7SWZ2ZGX.cjs');
|
|
6
|
-
require('./chunk-HFWPMK44.cjs');
|
|
7
|
-
require('./chunk-2C3MWYHH.cjs');
|
|
3
|
+
var _chunkDJNFLJSOcjs = require('./chunk-DJNFLJSO.cjs');
|
|
4
|
+
require('./chunk-OBGZSXTJ.cjs');
|
|
8
5
|
|
|
9
6
|
|
|
10
|
-
exports.copyBuildAssets =
|
|
7
|
+
exports.copyBuildAssets = _chunkDJNFLJSOcjs.copyBuildAssets;
|
package/dist/assets.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copyBuildAssets
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-JBXDZTFM.js";
|
|
6
|
-
import "./chunk-KT4NC6CJ.js";
|
|
7
|
-
import "./chunk-Z7VDLMOZ.js";
|
|
3
|
+
} from "./chunk-MTZGYTJP.js";
|
|
4
|
+
import "./chunk-3RG5ZIWI.js";
|
|
8
5
|
export {
|
|
9
6
|
copyBuildAssets
|
|
10
7
|
};
|
package/dist/build.cjs
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-7SWZ2ZGX.cjs');
|
|
12
|
-
require('./chunk-HFWPMK44.cjs');
|
|
13
|
-
require('./chunk-2C3MWYHH.cjs');
|
|
3
|
+
var _chunkXAUXKCODcjs = require('./chunk-XAUXKCOD.cjs');
|
|
4
|
+
require('./chunk-DJNFLJSO.cjs');
|
|
5
|
+
require('./chunk-BXCOVK3I.cjs');
|
|
6
|
+
require('./chunk-P3PATQE5.cjs');
|
|
7
|
+
require('./chunk-MYIRPP4C.cjs');
|
|
8
|
+
require('./chunk-CRFWMPZN.cjs');
|
|
9
|
+
require('./chunk-V7AFF6GW.cjs');
|
|
10
|
+
require('./chunk-OBGZSXTJ.cjs');
|
|
14
11
|
|
|
15
12
|
|
|
16
|
-
exports.build =
|
|
13
|
+
exports.build = _chunkXAUXKCODcjs.build;
|
package/dist/build.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-JBXDZTFM.js";
|
|
12
|
-
import "./chunk-KT4NC6CJ.js";
|
|
13
|
-
import "./chunk-Z7VDLMOZ.js";
|
|
3
|
+
} from "./chunk-SJ6BFZTX.js";
|
|
4
|
+
import "./chunk-MTZGYTJP.js";
|
|
5
|
+
import "./chunk-XKSMSRQZ.js";
|
|
6
|
+
import "./chunk-D4DSKI5N.js";
|
|
7
|
+
import "./chunk-TTW7MNRE.js";
|
|
8
|
+
import "./chunk-CZC4I6SL.js";
|
|
9
|
+
import "./chunk-ZH5YCT67.js";
|
|
10
|
+
import "./chunk-3RG5ZIWI.js";
|
|
14
11
|
export {
|
|
15
12
|
build
|
|
16
13
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
__require
|
|
10
|
+
};
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true})
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/clean.ts
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var _chunkHFWPMK44cjs = require('./chunk-HFWPMK44.cjs');
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
var _chunk2C3MWYHHcjs = require('./chunk-2C3MWYHH.cjs');
|
|
8
|
-
|
|
9
|
-
// src/clean.ts
|
|
10
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
5
|
+
var _console = require('@storm-software/config-tools/logger/console');
|
|
11
6
|
var _promises = require('fs/promises');
|
|
12
7
|
async function clean(name = "ESBuild", directory, config) {
|
|
13
|
-
|
|
14
|
-
const stopwatch =
|
|
8
|
+
_console.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
9
|
+
const stopwatch = _console.getStopwatch.call(void 0, `${name} output clean`);
|
|
15
10
|
await cleanDirectories(directory);
|
|
16
11
|
stopwatch();
|
|
17
12
|
}
|
|
@@ -1,28 +1,21 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkOKPZK64Qcjs = require('./chunk-OKPZK64Q.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _chunk7SWZ2ZGXcjs = require('./chunk-7SWZ2ZGX.cjs');
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }// src/package-json.ts
|
|
2
|
+
var _devkit = require('@nx/devkit');
|
|
8
3
|
|
|
9
4
|
|
|
10
5
|
|
|
11
|
-
var
|
|
6
|
+
var _buildtools = require('@storm-software/build-tools');
|
|
12
7
|
|
|
13
8
|
|
|
14
|
-
var _chunk2C3MWYHHcjs = require('./chunk-2C3MWYHH.cjs');
|
|
15
9
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var _devkit = require('@nx/devkit');
|
|
10
|
+
var _console = require('@storm-software/config-tools/logger/console');
|
|
11
|
+
var _correctpaths = require('@storm-software/config-tools/utilities/correct-paths');
|
|
19
12
|
var _fs = require('fs');
|
|
20
13
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
21
14
|
async function generatePackageJson(context) {
|
|
22
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
23
|
-
|
|
24
|
-
const stopwatch =
|
|
25
|
-
const packageJsonPath =
|
|
15
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _correctpaths.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
16
|
+
_console.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
17
|
+
const stopwatch = _console.getStopwatch.call(void 0, "Write package.json file");
|
|
18
|
+
const packageJsonPath = _correctpaths.joinPaths.call(void 0,
|
|
26
19
|
context.options.projectRoot,
|
|
27
20
|
"project.json"
|
|
28
21
|
);
|
|
@@ -30,7 +23,7 @@ async function generatePackageJson(context) {
|
|
|
30
23
|
throw new Error("Cannot find package.json configuration");
|
|
31
24
|
}
|
|
32
25
|
const packageJsonFile = await _promises2.default.readFile(
|
|
33
|
-
|
|
26
|
+
_correctpaths.joinPaths.call(void 0,
|
|
34
27
|
context.workspaceConfig.workspaceRoot,
|
|
35
28
|
context.options.projectRoot,
|
|
36
29
|
"package.json"
|
|
@@ -41,13 +34,13 @@ async function generatePackageJson(context) {
|
|
|
41
34
|
if (!packageJson) {
|
|
42
35
|
throw new Error("Cannot find package.json configuration file");
|
|
43
36
|
}
|
|
44
|
-
packageJson = await
|
|
37
|
+
packageJson = await _buildtools.addPackageDependencies.call(void 0,
|
|
45
38
|
context.workspaceConfig.workspaceRoot,
|
|
46
39
|
context.options.projectRoot,
|
|
47
40
|
context.projectName,
|
|
48
41
|
packageJson
|
|
49
42
|
);
|
|
50
|
-
packageJson = await
|
|
43
|
+
packageJson = await _buildtools.addWorkspacePackageJsonFields.call(void 0,
|
|
51
44
|
context.workspaceConfig,
|
|
52
45
|
context.options.projectRoot,
|
|
53
46
|
context.sourceRoot,
|
|
@@ -136,7 +129,7 @@ async function generatePackageJson(context) {
|
|
|
136
129
|
}
|
|
137
130
|
}
|
|
138
131
|
await _devkit.writeJsonFile.call(void 0,
|
|
139
|
-
|
|
132
|
+
_correctpaths.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
140
133
|
packageJson
|
|
141
134
|
);
|
|
142
135
|
stopwatch();
|
|
@@ -1,21 +1,14 @@
|
|
|
1
|
+
// src/package-json.ts
|
|
2
|
+
import { writeJsonFile } from "@nx/devkit";
|
|
1
3
|
import {
|
|
2
4
|
addPackageDependencies,
|
|
3
5
|
addWorkspacePackageJsonFields
|
|
4
|
-
} from "
|
|
5
|
-
import {
|
|
6
|
-
joinPaths
|
|
7
|
-
} from "./chunk-JBXDZTFM.js";
|
|
6
|
+
} from "@storm-software/build-tools";
|
|
8
7
|
import {
|
|
9
8
|
getStopwatch,
|
|
10
9
|
writeDebug
|
|
11
|
-
} from "
|
|
12
|
-
import {
|
|
13
|
-
init_esm_shims
|
|
14
|
-
} from "./chunk-Z7VDLMOZ.js";
|
|
15
|
-
|
|
16
|
-
// src/package-json.ts
|
|
17
|
-
init_esm_shims();
|
|
18
|
-
import { writeJsonFile } from "@nx/devkit";
|
|
10
|
+
} from "@storm-software/config-tools/logger/console";
|
|
11
|
+
import { joinPaths } from "@storm-software/config-tools/utilities/correct-paths";
|
|
19
12
|
import { existsSync } from "node:fs";
|
|
20
13
|
import hf from "node:fs/promises";
|
|
21
14
|
async function generatePackageJson(context) {
|
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_BUILD_OPTIONS
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
getEnv,
|
|
6
|
-
getWorkspaceConfig
|
|
7
|
-
} from "./chunk-AFLE3LVA.js";
|
|
8
|
-
import {
|
|
9
|
-
joinPaths
|
|
10
|
-
} from "./chunk-JBXDZTFM.js";
|
|
11
|
-
import {
|
|
12
|
-
formatLogMessage,
|
|
13
|
-
getStopwatch,
|
|
14
|
-
writeDebug
|
|
15
|
-
} from "./chunk-KT4NC6CJ.js";
|
|
16
|
-
import {
|
|
17
|
-
init_esm_shims
|
|
18
|
-
} from "./chunk-Z7VDLMOZ.js";
|
|
3
|
+
} from "./chunk-TTW7MNRE.js";
|
|
19
4
|
|
|
20
5
|
// src/context.ts
|
|
21
|
-
init_esm_shims();
|
|
22
6
|
import {
|
|
23
7
|
createProjectGraphAsync,
|
|
24
8
|
readProjectsConfigurationFromProjectGraph
|
|
25
9
|
} from "@nx/devkit";
|
|
10
|
+
import { getEnv } from "@storm-software/build-tools";
|
|
11
|
+
import { getWorkspaceConfig } from "@storm-software/config-tools/get-config";
|
|
12
|
+
import {
|
|
13
|
+
formatLogMessage,
|
|
14
|
+
getStopwatch,
|
|
15
|
+
writeDebug
|
|
16
|
+
} from "@storm-software/config-tools/logger/console";
|
|
17
|
+
import { joinPaths } from "@storm-software/config-tools/utilities/correct-paths";
|
|
26
18
|
import defu from "defu";
|
|
27
19
|
import { existsSync } from "node:fs";
|
|
28
20
|
import hf from "node:fs/promises";
|
|
@@ -1,24 +1,17 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/assets.ts
|
|
2
|
+
var _buildtools = require('@storm-software/build-tools');
|
|
2
3
|
|
|
3
|
-
var _chunkOKPZK64Qcjs = require('./chunk-OKPZK64Q.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
var _chunkHFWPMK44cjs = require('./chunk-HFWPMK44.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _chunk2C3MWYHHcjs = require('./chunk-2C3MWYHH.cjs');
|
|
11
|
-
|
|
12
|
-
// src/assets.ts
|
|
13
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
6
|
+
var _console = require('@storm-software/config-tools/logger/console');
|
|
14
7
|
async function copyBuildAssets(context) {
|
|
15
8
|
if (!_optionalChain([context, 'access', _ => _.result, 'optionalAccess', _2 => _2.errors, 'access', _3 => _3.length]) && _optionalChain([context, 'access', _4 => _4.options, 'access', _5 => _5.assets, 'optionalAccess', _6 => _6.length])) {
|
|
16
|
-
|
|
9
|
+
_console.writeDebug.call(void 0,
|
|
17
10
|
` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
|
|
18
11
|
context.workspaceConfig
|
|
19
12
|
);
|
|
20
|
-
const stopwatch =
|
|
21
|
-
await
|
|
13
|
+
const stopwatch = _console.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
14
|
+
await _buildtools.copyAssets.call(void 0,
|
|
22
15
|
context.workspaceConfig,
|
|
23
16
|
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
24
17
|
context.outputPath,
|
|
File without changes
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
} from "./chunk-AFLE3LVA.js";
|
|
1
|
+
// src/assets.ts
|
|
2
|
+
import { copyAssets } from "@storm-software/build-tools";
|
|
4
3
|
import {
|
|
5
4
|
getStopwatch,
|
|
6
5
|
writeDebug
|
|
7
|
-
} from "
|
|
8
|
-
import {
|
|
9
|
-
init_esm_shims
|
|
10
|
-
} from "./chunk-Z7VDLMOZ.js";
|
|
11
|
-
|
|
12
|
-
// src/assets.ts
|
|
13
|
-
init_esm_shims();
|
|
6
|
+
} from "@storm-software/config-tools/logger/console";
|
|
14
7
|
async function copyBuildAssets(context) {
|
|
15
8
|
if (!context.result?.errors.length && context.options.assets?.length) {
|
|
16
9
|
writeDebug(
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true})
|
|
2
|
-
|
|
3
|
-
var _chunkOKPZK64Qcjs = require('./chunk-OKPZK64Q.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunk2C3MWYHHcjs = require('./chunk-2C3MWYHH.cjs');
|
|
7
|
-
|
|
8
|
-
// src/config.ts
|
|
9
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/config.ts
|
|
2
|
+
var _buildtools = require('@storm-software/build-tools');
|
|
10
3
|
var DEFAULT_BUILD_OPTIONS = {
|
|
11
4
|
platform: "node",
|
|
12
5
|
target: "node22",
|
|
@@ -44,8 +37,8 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
44
37
|
".woff2": "file"
|
|
45
38
|
},
|
|
46
39
|
banner: {
|
|
47
|
-
js:
|
|
48
|
-
css:
|
|
40
|
+
js: _buildtools.DEFAULT_COMPILED_BANNER,
|
|
41
|
+
css: _buildtools.DEFAULT_COMPILED_BANNER
|
|
49
42
|
}
|
|
50
43
|
};
|
|
51
44
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.__require = __require;
|
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _chunkOKPZK64Qcjs = require('./chunk-OKPZK64Q.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _chunk7SWZ2ZGXcjs = require('./chunk-7SWZ2ZGX.cjs');
|
|
11
|
-
|
|
3
|
+
var _chunkMYIRPP4Ccjs = require('./chunk-MYIRPP4C.cjs');
|
|
12
4
|
|
|
5
|
+
// src/context.ts
|
|
13
6
|
|
|
14
7
|
|
|
15
|
-
var _chunkHFWPMK44cjs = require('./chunk-HFWPMK44.cjs');
|
|
16
8
|
|
|
9
|
+
var _devkit = require('@nx/devkit');
|
|
10
|
+
var _buildtools = require('@storm-software/build-tools');
|
|
11
|
+
var _getconfig = require('@storm-software/config-tools/get-config');
|
|
17
12
|
|
|
18
|
-
var _chunk2C3MWYHHcjs = require('./chunk-2C3MWYHH.cjs');
|
|
19
13
|
|
|
20
|
-
// src/context.ts
|
|
21
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
22
14
|
|
|
23
15
|
|
|
24
|
-
|
|
25
|
-
var
|
|
16
|
+
var _console = require('@storm-software/config-tools/logger/console');
|
|
17
|
+
var _correctpaths = require('@storm-software/config-tools/utilities/correct-paths');
|
|
26
18
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
27
19
|
var _fs = require('fs');
|
|
28
20
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
@@ -33,15 +25,15 @@ async function resolveContext(userOptions) {
|
|
|
33
25
|
if (!workspaceRoot) {
|
|
34
26
|
throw new Error("Cannot find Nx workspace root");
|
|
35
27
|
}
|
|
36
|
-
const workspaceConfig = await
|
|
28
|
+
const workspaceConfig = await _getconfig.getWorkspaceConfig.call(void 0, true, {
|
|
37
29
|
workspaceRoot: workspaceRoot.dir
|
|
38
30
|
});
|
|
39
|
-
|
|
40
|
-
const stopwatch =
|
|
31
|
+
_console.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
32
|
+
const stopwatch = _console.getStopwatch.call(void 0, "Build options resolution");
|
|
41
33
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
42
34
|
exitOnError: true
|
|
43
35
|
});
|
|
44
|
-
const projectJsonPath =
|
|
36
|
+
const projectJsonPath = _correctpaths.joinPaths.call(void 0,
|
|
45
37
|
workspaceRoot.dir,
|
|
46
38
|
projectRoot,
|
|
47
39
|
"project.json"
|
|
@@ -58,9 +50,9 @@ async function resolveContext(userOptions) {
|
|
|
58
50
|
"The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project."
|
|
59
51
|
);
|
|
60
52
|
}
|
|
61
|
-
const options = _defu2.default.call(void 0, userOptions,
|
|
53
|
+
const options = _defu2.default.call(void 0, userOptions, _chunkMYIRPP4Ccjs.DEFAULT_BUILD_OPTIONS);
|
|
62
54
|
options.name ??= projectName;
|
|
63
|
-
const packageJsonPath =
|
|
55
|
+
const packageJsonPath = _correctpaths.joinPaths.call(void 0,
|
|
64
56
|
workspaceRoot.dir,
|
|
65
57
|
options.projectRoot,
|
|
66
58
|
"package.json"
|
|
@@ -68,11 +60,11 @@ async function resolveContext(userOptions) {
|
|
|
68
60
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
69
61
|
throw new Error("Cannot find package.json configuration");
|
|
70
62
|
}
|
|
71
|
-
const env =
|
|
63
|
+
const env = _buildtools.getEnv.call(void 0, "esbuild", options);
|
|
72
64
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
73
65
|
const resolvedOptions = {
|
|
74
66
|
...options,
|
|
75
|
-
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig :
|
|
67
|
+
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : _correctpaths.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "tsconfig.json"),
|
|
76
68
|
metafile: userOptions.mode === "development",
|
|
77
69
|
clean: false,
|
|
78
70
|
env,
|
|
@@ -97,8 +89,8 @@ async function resolveContext(userOptions) {
|
|
|
97
89
|
projectConfigurations,
|
|
98
90
|
projectName,
|
|
99
91
|
projectGraph,
|
|
100
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
101
|
-
outputPath: resolvedOptions.outputPath ||
|
|
92
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _correctpaths.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
93
|
+
outputPath: resolvedOptions.outputPath || _correctpaths.joinPaths.call(void 0,
|
|
102
94
|
workspaceConfig.workspaceRoot,
|
|
103
95
|
"dist",
|
|
104
96
|
resolvedOptions.projectRoot
|
|
@@ -107,10 +99,10 @@ async function resolveContext(userOptions) {
|
|
|
107
99
|
};
|
|
108
100
|
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
109
101
|
if (context.options.verbose) {
|
|
110
|
-
|
|
102
|
+
_console.writeDebug.call(void 0,
|
|
111
103
|
` \u2699\uFE0F Build options resolved:
|
|
112
104
|
|
|
113
|
-
${
|
|
105
|
+
${_console.formatLogMessage.call(void 0, context.options)}`,
|
|
114
106
|
workspaceConfig
|
|
115
107
|
);
|
|
116
108
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copyBuildAssets
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MTZGYTJP.js";
|
|
4
4
|
import {
|
|
5
5
|
cleanDirectories
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XKSMSRQZ.js";
|
|
7
7
|
import {
|
|
8
8
|
resolveContext
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-D4DSKI5N.js";
|
|
10
10
|
import {
|
|
11
11
|
generatePackageJson
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CZC4I6SL.js";
|
|
13
13
|
import {
|
|
14
14
|
executeTsup
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZH5YCT67.js";
|
|
16
|
+
|
|
17
|
+
// src/build.ts
|
|
16
18
|
import {
|
|
17
19
|
getStopwatch,
|
|
18
20
|
writeDebug,
|
|
@@ -20,13 +22,7 @@ import {
|
|
|
20
22
|
writeFatal,
|
|
21
23
|
writeSuccess,
|
|
22
24
|
writeWarning
|
|
23
|
-
} from "
|
|
24
|
-
import {
|
|
25
|
-
init_esm_shims
|
|
26
|
-
} from "./chunk-Z7VDLMOZ.js";
|
|
27
|
-
|
|
28
|
-
// src/build.ts
|
|
29
|
-
init_esm_shims();
|
|
25
|
+
} from "@storm-software/config-tools/logger/console";
|
|
30
26
|
async function reportResults(context) {
|
|
31
27
|
if (context.result?.errors.length === 0) {
|
|
32
28
|
if (context.result.warnings.length > 0) {
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DEFAULT_COMPILED_BANNER
|
|
3
|
-
} from "./chunk-AFLE3LVA.js";
|
|
4
|
-
import {
|
|
5
|
-
init_esm_shims
|
|
6
|
-
} from "./chunk-Z7VDLMOZ.js";
|
|
7
|
-
|
|
8
1
|
// src/config.ts
|
|
9
|
-
|
|
2
|
+
import { DEFAULT_COMPILED_BANNER } from "@storm-software/build-tools";
|
|
10
3
|
var DEFAULT_BUILD_OPTIONS = {
|
|
11
4
|
platform: "node",
|
|
12
5
|
target: "node22",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/tsup.ts
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _console = require('@storm-software/config-tools/logger/console');
|
|
6
|
+
var _correctpaths = require('@storm-software/config-tools/utilities/correct-paths');
|
|
7
|
+
var _tsup = require('@storm-software/tsup');
|
|
8
|
+
async function executeTsup(context) {
|
|
9
|
+
_console.writeDebug.call(void 0,
|
|
10
|
+
` \u{1F680} Running ${context.options.name} build`,
|
|
11
|
+
context.workspaceConfig
|
|
12
|
+
);
|
|
13
|
+
const stopwatch = _console.getStopwatch.call(void 0, `${context.options.name} build`);
|
|
14
|
+
await _tsup.build.call(void 0, {
|
|
15
|
+
...context.options,
|
|
16
|
+
outDir: context.options.distDir ? _correctpaths.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
17
|
+
workspaceConfig: context.workspaceConfig
|
|
18
|
+
});
|
|
19
|
+
stopwatch();
|
|
20
|
+
return context;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
exports.executeTsup = executeTsup;
|