@storm-software/workspace-tools 1.264.23 → 1.264.25
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/CHANGELOG.md +16 -0
- package/README.md +1 -1
- package/dist/{chunk-IWTY5YHA.js → chunk-26KLH7BI.js} +4 -4
- package/dist/{chunk-H7R5WWWN.mjs → chunk-32XQSY3C.mjs} +2 -2
- package/dist/{chunk-IVVMLTAZ.mjs → chunk-4LIIIWIV.mjs} +1 -1
- package/dist/{chunk-YEAEA7VH.js → chunk-5DQCVP4N.js} +5 -5
- package/dist/{chunk-VIYVUTPL.mjs → chunk-7P2LGXFI.mjs} +1 -1
- package/dist/{chunk-JGBWUIDB.js → chunk-7YVMI4XM.js} +2 -2
- package/dist/{chunk-SYVKCVS5.js → chunk-ACBRXFBB.js} +2 -2
- package/dist/{chunk-JIEME4DE.mjs → chunk-AVC6Y5IR.mjs} +1 -1
- package/dist/{chunk-2VGQHNUI.mjs → chunk-CD3W3HIC.mjs} +2 -2
- package/dist/{chunk-PKZ57ZT3.mjs → chunk-CIHS3V6E.mjs} +1 -1
- package/dist/{chunk-7D54ET5P.js → chunk-DNYOACHD.js} +11 -11
- package/dist/{chunk-3CMQVIZF.js → chunk-E4TBRQDJ.js} +2 -2
- package/dist/{chunk-OOKKGQYY.mjs → chunk-FCGFBNCJ.mjs} +1 -1
- package/dist/{chunk-LCEW4RCH.mjs → chunk-GGSDFI6U.mjs} +2 -2
- package/dist/{chunk-S672NL5L.js → chunk-IPBHTVKW.js} +2 -2
- package/dist/{chunk-2JMPJLUY.mjs → chunk-IQQERPIV.mjs} +1 -1
- package/dist/{chunk-HAR2JAKF.js → chunk-JCJHSN67.js} +5 -5
- package/dist/{chunk-WKHNKMGG.mjs → chunk-JWFYDYKI.mjs} +1 -1
- package/dist/{chunk-XL2QCC3O.mjs → chunk-KQMGKHXU.mjs} +2 -2
- package/dist/{chunk-GIHDKGOW.js → chunk-LRLMU4QV.js} +2 -2
- package/dist/{chunk-ACGR2DGA.mjs → chunk-MMPXE2KD.mjs} +1 -1
- package/dist/{chunk-WSYNUVFE.js → chunk-N4STCLGJ.js} +9 -9
- package/dist/{chunk-ZQM46HJL.mjs → chunk-NODM27UV.mjs} +18 -2
- package/dist/{chunk-2JSGLAYY.js → chunk-NQ4W3N7O.js} +15 -15
- package/dist/{chunk-W6XC45WY.js → chunk-P6PFHXHQ.js} +20 -20
- package/dist/{chunk-CO3WS2F5.mjs → chunk-P7UUSOFW.mjs} +1 -1
- package/dist/{chunk-6TELW6SY.mjs → chunk-PHVGSPP3.mjs} +1 -1
- package/dist/{chunk-Q2HDALQQ.js → chunk-QPJ4XTDX.js} +2 -2
- package/dist/{chunk-KZEIFYBW.mjs → chunk-RLMSLHWY.mjs} +88 -67
- package/dist/{chunk-5HKVKVGO.js → chunk-S6XMIUUO.js} +128 -107
- package/dist/{chunk-Z7QQFXLC.js → chunk-SKMT7WD5.js} +18 -2
- package/dist/{chunk-Y4DQH7H3.mjs → chunk-UMFP6PYU.mjs} +1 -1
- package/dist/{chunk-B7OV5XTN.js → chunk-USJX4BPD.js} +2 -2
- package/dist/{chunk-UBQVODWE.mjs → chunk-VTRSAQHO.mjs} +1 -1
- package/dist/{chunk-D2B7RMJY.js → chunk-Z2GBHTLH.js} +2 -2
- package/dist/{chunk-OE5D5OX2.js → chunk-ZGMV4YJL.js} +2 -2
- package/dist/{executor-Cfnvj_UD.d.ts → executor-21QQWs8J.d.ts} +1 -1
- package/dist/{executor-Z5RZ_Cc7.d.ts → executor-BD4gkr4O.d.ts} +1 -1
- package/dist/{executor-Bl_R7eWL.d.mts → executor-BYcX7bg8.d.mts} +1 -1
- package/dist/{executor-CkpY6Cn6.d.ts → executor-BvnlpAbd.d.ts} +1 -1
- package/dist/{executor-jhLTqjwT.d.ts → executor-CLYItx2J.d.ts} +1 -1
- package/dist/{executor-D7Jon7YZ.d.mts → executor-CsTGaThv.d.mts} +1 -1
- package/dist/{executor-CQREXH1r.d.mts → executor-DpaKJJUo.d.mts} +1 -1
- package/dist/{executor-FnV7Zyhi.d.mts → executor-FYb5cygt.d.mts} +1 -1
- package/dist/executors.d.mts +5 -5
- package/dist/executors.d.ts +5 -5
- package/dist/executors.js +13 -13
- package/dist/executors.mjs +16 -16
- package/dist/{generator-m71zZSnI.d.ts → generator-BMY6LGPc.d.ts} +1 -1
- package/dist/{generator-CDN_7s1G.d.mts → generator-BPz6wkk9.d.mts} +2 -2
- package/dist/{generator-BzokTeDK.d.ts → generator-BXJFXwbk.d.ts} +2 -2
- package/dist/{generator-Cp27CDI2.d.mts → generator-Bw4on8nq.d.mts} +2 -2
- package/dist/{generator-DYKOkcwS.d.mts → generator-D3Kl6o6G.d.mts} +2 -2
- package/dist/{generator-DewOeQFs.d.ts → generator-D4IATDWn.d.ts} +2 -2
- package/dist/{generator-D2sZ7Ie-.d.ts → generator-DPRJ4mde.d.ts} +2 -2
- package/dist/{generator-DpjwOis-.d.ts → generator-EapPsEII.d.ts} +2 -2
- package/dist/{generator-DWD1hj3X.d.ts → generator-UGJuBE-5.d.ts} +1 -1
- package/dist/{generator-hhjMvDQ2.d.mts → generator-UekCwik8.d.mts} +1 -1
- package/dist/{generator-ciGwzWek.d.mts → generator-_OZvHhIS.d.mts} +1 -1
- package/dist/{generator-BxNcUEBh.d.mts → generator-gUQuyamW.d.mts} +2 -2
- package/dist/generators.d.mts +8 -8
- package/dist/generators.d.ts +8 -8
- package/dist/generators.js +9 -9
- package/dist/generators.mjs +8 -8
- package/dist/index.d.mts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +20 -20
- package/dist/index.mjs +23 -23
- package/dist/src/base/base-executor.d.mts +2 -2
- package/dist/src/base/base-executor.d.ts +2 -2
- package/dist/src/base/base-executor.js +3 -3
- package/dist/src/base/base-executor.mjs +2 -2
- package/dist/src/base/base-generator.d.mts +2 -2
- package/dist/src/base/base-generator.d.ts +2 -2
- package/dist/src/base/base-generator.js +3 -3
- package/dist/src/base/base-generator.mjs +2 -2
- package/dist/src/base/index.d.mts +2 -2
- package/dist/src/base/index.d.ts +2 -2
- package/dist/src/base/index.js +4 -4
- package/dist/src/base/index.mjs +3 -3
- package/dist/src/executors/cargo-build/executor.js +4 -4
- package/dist/src/executors/cargo-build/executor.mjs +3 -3
- package/dist/src/executors/cargo-check/executor.js +4 -4
- package/dist/src/executors/cargo-check/executor.mjs +3 -3
- package/dist/src/executors/cargo-clippy/executor.js +4 -4
- package/dist/src/executors/cargo-clippy/executor.mjs +3 -3
- package/dist/src/executors/cargo-doc/executor.js +4 -4
- package/dist/src/executors/cargo-doc/executor.mjs +3 -3
- package/dist/src/executors/cargo-format/executor.js +4 -4
- package/dist/src/executors/cargo-format/executor.mjs +3 -3
- package/dist/src/executors/clean-package/executor.d.mts +1 -1
- package/dist/src/executors/clean-package/executor.d.ts +1 -1
- package/dist/src/executors/clean-package/executor.js +5 -5
- package/dist/src/executors/clean-package/executor.mjs +2 -2
- package/dist/src/executors/esbuild/executor.d.mts +2 -2
- package/dist/src/executors/esbuild/executor.d.ts +2 -2
- package/dist/src/executors/esbuild/executor.js +4 -4
- package/dist/src/executors/esbuild/executor.mjs +3 -3
- package/dist/src/executors/size-limit/executor.d.mts +2 -2
- package/dist/src/executors/size-limit/executor.d.ts +2 -2
- package/dist/src/executors/size-limit/executor.js +4 -4
- package/dist/src/executors/size-limit/executor.mjs +3 -3
- package/dist/src/executors/typia/executor.d.mts +2 -2
- package/dist/src/executors/typia/executor.d.ts +2 -2
- package/dist/src/executors/typia/executor.js +4 -4
- package/dist/src/executors/typia/executor.mjs +3 -3
- package/dist/src/executors/unbuild/executor.d.mts +2 -2
- package/dist/src/executors/unbuild/executor.d.ts +2 -2
- package/dist/src/executors/unbuild/executor.js +4 -4
- package/dist/src/executors/unbuild/executor.mjs +3 -3
- package/dist/src/generators/browser-library/generator.d.mts +3 -3
- package/dist/src/generators/browser-library/generator.d.ts +3 -3
- package/dist/src/generators/browser-library/generator.js +4 -4
- package/dist/src/generators/browser-library/generator.mjs +3 -3
- package/dist/src/generators/config-schema/generator.d.mts +3 -3
- package/dist/src/generators/config-schema/generator.d.ts +3 -3
- package/dist/src/generators/config-schema/generator.js +4 -4
- package/dist/src/generators/config-schema/generator.mjs +3 -3
- package/dist/src/generators/neutral-library/generator.d.mts +3 -3
- package/dist/src/generators/neutral-library/generator.d.ts +3 -3
- package/dist/src/generators/neutral-library/generator.js +4 -4
- package/dist/src/generators/neutral-library/generator.mjs +3 -3
- package/dist/src/generators/node-library/generator.d.mts +3 -3
- package/dist/src/generators/node-library/generator.d.ts +3 -3
- package/dist/src/generators/node-library/generator.js +4 -4
- package/dist/src/generators/node-library/generator.mjs +3 -3
- package/dist/src/generators/preset/generator.d.mts +3 -3
- package/dist/src/generators/preset/generator.d.ts +3 -3
- package/dist/src/generators/preset/generator.js +4 -4
- package/dist/src/generators/preset/generator.mjs +3 -3
- package/dist/src/generators/release-version/generator.d.mts +2 -2
- package/dist/src/generators/release-version/generator.d.ts +2 -2
- package/dist/src/generators/release-version/generator.js +3 -3
- package/dist/src/generators/release-version/generator.mjs +2 -2
- package/dist/src/types.d.mts +2 -2
- package/dist/src/types.d.ts +2 -2
- package/dist/src/utils/apply-workspace-tokens.d.mts +1 -1
- package/dist/src/utils/apply-workspace-tokens.d.ts +1 -1
- package/dist/src/utils/index.d.mts +2 -2
- package/dist/src/utils/index.d.ts +2 -2
- package/dist/src/utils/project-tags.d.mts +2 -2
- package/dist/src/utils/project-tags.d.ts +2 -2
- package/dist/{types-DK9-a60Q.d.mts → types-C3URiht7.d.mts} +20 -2
- package/dist/{types-DK9-a60Q.d.ts → types-C3URiht7.d.ts} +20 -2
- package/dist/{types-DvN-p7Ms.d.ts → types-CUnUfpKk.d.ts} +1 -1
- package/dist/{types-CbF567tH.d.mts → types-dNjhGseA.d.mts} +1 -1
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ var _chunkUALZJZUKjs = require('./chunk-UALZJZUK.js');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkSKMT7WD5js = require('./chunk-SKMT7WD5.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunk4JOIS7WWjs = require('./chunk-4JOIS7WW.js');
|
|
@@ -23,7 +23,7 @@ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
|
23
23
|
// src/base/base-executor.ts
|
|
24
24
|
var _defu = require('defu');
|
|
25
25
|
var withRunExecutor = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
26
|
-
const stopwatch =
|
|
26
|
+
const stopwatch = _chunkSKMT7WD5js.getStopwatch.call(void 0, name);
|
|
27
27
|
let options = _options;
|
|
28
28
|
let config = {};
|
|
29
29
|
try {
|
|
@@ -35,23 +35,23 @@ var withRunExecutor = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name
|
|
|
35
35
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot;
|
|
36
36
|
const projectName = context.projectName;
|
|
37
37
|
config.workspaceRoot = workspaceRoot;
|
|
38
|
-
|
|
38
|
+
_chunkSKMT7WD5js.writeInfo.call(void 0, `\u26A1 Running the ${name} executor for ${projectName} `, config);
|
|
39
39
|
if (!executorOptions.skipReadingConfig) {
|
|
40
|
-
|
|
40
|
+
_chunkSKMT7WD5js.writeTrace.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
41
41
|
- workspaceRoot: ${workspaceRoot}
|
|
42
42
|
- projectRoot: ${projectRoot}
|
|
43
43
|
- sourceRoot: ${sourceRoot}
|
|
44
44
|
- projectName: ${projectName}
|
|
45
45
|
`, config);
|
|
46
|
-
config = await
|
|
46
|
+
config = await _chunkSKMT7WD5js.getConfig.call(void 0, workspaceRoot);
|
|
47
47
|
}
|
|
48
48
|
if (_optionalChain([executorOptions, 'optionalAccess', _3 => _3.hooks, 'optionalAccess', _4 => _4.applyDefaultOptions])) {
|
|
49
|
-
|
|
49
|
+
_chunkSKMT7WD5js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
50
50
|
options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
|
|
51
|
-
|
|
51
|
+
_chunkSKMT7WD5js.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
52
52
|
}
|
|
53
|
-
|
|
54
|
-
${
|
|
53
|
+
_chunkSKMT7WD5js.writeTrace.call(void 0, `Executor schema options \u2699\uFE0F
|
|
54
|
+
${_chunkSKMT7WD5js.formatLogMessage.call(void 0, options)}
|
|
55
55
|
`, config);
|
|
56
56
|
const tokenized = await _chunkUALZJZUKjs.applyWorkspaceTokens.call(void 0, options, _defu.defu.call(void 0, {
|
|
57
57
|
workspaceRoot,
|
|
@@ -60,13 +60,13 @@ ${_chunkZ7QQFXLCjs.formatLogMessage.call(void 0, options)}
|
|
|
60
60
|
projectName,
|
|
61
61
|
config
|
|
62
62
|
}, config, context.projectsConfigurations.projects[context.projectName]), _chunkUALZJZUKjs.applyWorkspaceProjectTokens);
|
|
63
|
-
|
|
64
|
-
${
|
|
63
|
+
_chunkSKMT7WD5js.writeTrace.call(void 0, `Executor schema tokenized options \u2699\uFE0F
|
|
64
|
+
${_chunkSKMT7WD5js.formatLogMessage.call(void 0, tokenized)}
|
|
65
65
|
`, config);
|
|
66
66
|
if (_optionalChain([executorOptions, 'optionalAccess', _5 => _5.hooks, 'optionalAccess', _6 => _6.preProcess])) {
|
|
67
|
-
|
|
67
|
+
_chunkSKMT7WD5js.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
68
68
|
await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
|
|
69
|
-
|
|
69
|
+
_chunkSKMT7WD5js.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
70
70
|
}
|
|
71
71
|
const ret = executorFn(tokenized, context, config);
|
|
72
72
|
if (_isFunction(_optionalChain([ret, 'optionalAccess', _7 => _7.next]))) {
|
|
@@ -76,26 +76,26 @@ ${_chunkZ7QQFXLCjs.formatLogMessage.call(void 0, tokenized)}
|
|
|
76
76
|
}
|
|
77
77
|
const result = await Promise.resolve(ret);
|
|
78
78
|
if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess', _8 => _8.error, 'optionalAccess', _9 => _9.message]) && typeof _optionalChain([result, 'optionalAccess', _10 => _10.error, 'optionalAccess', _11 => _11.message]) === "string" && _optionalChain([result, 'optionalAccess', _12 => _12.error, 'optionalAccess', _13 => _13.name]) && typeof _optionalChain([result, 'optionalAccess', _14 => _14.error, 'optionalAccess', _15 => _15.name]) === "string")) {
|
|
79
|
-
|
|
80
|
-
${
|
|
79
|
+
_chunkSKMT7WD5js.writeTrace.call(void 0, `Failure determined by the ${name} executor
|
|
80
|
+
${_chunkSKMT7WD5js.formatLogMessage.call(void 0, result)}`, config);
|
|
81
81
|
console.error(result);
|
|
82
82
|
throw new Error(`The ${name} executor failed to run`, {
|
|
83
83
|
cause: _optionalChain([result, 'optionalAccess', _16 => _16.error])
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
if (_optionalChain([executorOptions, 'optionalAccess', _17 => _17.hooks, 'optionalAccess', _18 => _18.postProcess])) {
|
|
87
|
-
|
|
87
|
+
_chunkSKMT7WD5js.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
88
88
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
89
|
-
|
|
89
|
+
_chunkSKMT7WD5js.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
_chunkSKMT7WD5js.writeSuccess.call(void 0, `Completed running the ${name} task executor!
|
|
92
92
|
`, config);
|
|
93
93
|
return {
|
|
94
94
|
success: true
|
|
95
95
|
};
|
|
96
96
|
} catch (error) {
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
_chunkSKMT7WD5js.writeFatal.call(void 0, "A fatal error occurred while running the executor - the process was forced to terminate", config);
|
|
98
|
+
_chunkSKMT7WD5js.writeError.call(void 0, `An exception was thrown in the executor's process
|
|
99
99
|
- Details: ${error.message}
|
|
100
100
|
- Stacktrace: ${error.stack}`, config);
|
|
101
101
|
return {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkP6PFHXHQjs = require('./chunk-P6PFHXHQ.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -15,7 +15,7 @@ async function cargoFormatExecutor(options, context) {
|
|
|
15
15
|
return await _chunkULBTYC2Bjs.cargoCommand.call(void 0, ...command);
|
|
16
16
|
}
|
|
17
17
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoFormatExecutor, "cargoFormatExecutor");
|
|
18
|
-
var executor_default =
|
|
18
|
+
var executor_default = _chunkP6PFHXHQjs.withRunExecutor.call(void 0, "Cargo Format", cargoFormatExecutor, {
|
|
19
19
|
skipReadingConfig: false,
|
|
20
20
|
hooks: {
|
|
21
21
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withRunExecutor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7P2LGXFI.mjs";
|
|
4
4
|
import {
|
|
5
5
|
formatLogMessage,
|
|
6
6
|
getConfig,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
writeSuccess,
|
|
14
14
|
writeTrace,
|
|
15
15
|
writeWarning
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NODM27UV.mjs";
|
|
17
17
|
import {
|
|
18
18
|
findWorkspaceRoot
|
|
19
19
|
} from "./chunk-FR3YQN55.mjs";
|
|
@@ -238,58 +238,6 @@ var run = /* @__PURE__ */ __name((config, command, cwd = config.workspaceRoot ??
|
|
|
238
238
|
|
|
239
239
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
240
240
|
import { glob as glob2 } from "glob";
|
|
241
|
-
var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
242
|
-
const workspaceRoot = config.workspaceRoot || findWorkspaceRoot();
|
|
243
|
-
const entryPoints = [];
|
|
244
|
-
if (entry) {
|
|
245
|
-
if (typeof entry === "string") {
|
|
246
|
-
entryPoints.push(entry);
|
|
247
|
-
} else if (Array.isArray(entry)) {
|
|
248
|
-
entryPoints.push(...entry);
|
|
249
|
-
} else {
|
|
250
|
-
entryPoints.push(...Object.values(entry));
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
if (emitOnAll) {
|
|
254
|
-
entryPoints.push(joinPaths(workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
255
|
-
}
|
|
256
|
-
const results = await Promise.all(entryPoints.map(async (entryPoint) => {
|
|
257
|
-
const paths = [];
|
|
258
|
-
if (entryPoint.includes("*")) {
|
|
259
|
-
const files = await glob2(entryPoint, {
|
|
260
|
-
withFileTypes: true,
|
|
261
|
-
ignore: [
|
|
262
|
-
"**/node_modules/**"
|
|
263
|
-
]
|
|
264
|
-
});
|
|
265
|
-
paths.push(...files.reduce((ret, filePath) => {
|
|
266
|
-
const result = correctPaths(joinPaths(filePath.path, filePath.name).replaceAll(correctPaths(workspaceRoot), "").replaceAll(correctPaths(projectRoot), ""));
|
|
267
|
-
if (result) {
|
|
268
|
-
writeDebug(`Trying to add entry point ${result} at "${joinPaths(filePath.path, filePath.name)}"`, config);
|
|
269
|
-
if (!paths.includes(result)) {
|
|
270
|
-
paths.push(result);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
return ret;
|
|
274
|
-
}, []));
|
|
275
|
-
} else {
|
|
276
|
-
const result = correctPaths(entryPoint.replaceAll(correctPaths(workspaceRoot), "").replaceAll(correctPaths(projectRoot), ""));
|
|
277
|
-
writeDebug(`Trying to add entry point ${result}"`, config);
|
|
278
|
-
if (!paths.includes(result)) {
|
|
279
|
-
paths.push(result);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
return paths;
|
|
283
|
-
}));
|
|
284
|
-
return results.filter(Boolean).reduce((ret, result) => {
|
|
285
|
-
result.forEach((res) => {
|
|
286
|
-
if (res && !ret.includes(res)) {
|
|
287
|
-
ret.push(res);
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
return ret;
|
|
291
|
-
}, []);
|
|
292
|
-
}, "getEntryPoints");
|
|
293
241
|
|
|
294
242
|
// ../build-tools/src/utilities/get-env.ts
|
|
295
243
|
var getEnv = /* @__PURE__ */ __name((builder, options) => {
|
|
@@ -713,10 +661,10 @@ var tscPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
|
|
|
713
661
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
714
662
|
await run(resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
|
|
715
663
|
}
|
|
716
|
-
if (resolvedOptions.bundle && resolvedOptions.entryPoints && resolvedOptions.entryPoints.length > 0 && resolvedOptions.entryPoints[0] && resolvedOptions.entryPoints[0].endsWith(".ts")) {
|
|
664
|
+
if (resolvedOptions.bundle && resolvedOptions.entryPoints && resolvedOptions.entryPoints.length > 0 && resolvedOptions.entryPoints[0]?.in && resolvedOptions.entryPoints[0].in.endsWith(".ts")) {
|
|
717
665
|
const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
|
|
718
666
|
const typeOutDir = resolvedOptions.outdir;
|
|
719
|
-
const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
667
|
+
const entryPoint = resolvedOptions.entryPoints[0].in.replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
720
668
|
const bundlePath = joinPaths(resolvedOptions.outdir, entryPoint);
|
|
721
669
|
let dtsPath;
|
|
722
670
|
if (existsSync3(joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
@@ -907,6 +855,84 @@ var shebangRenderer = {
|
|
|
907
855
|
}
|
|
908
856
|
};
|
|
909
857
|
|
|
858
|
+
// ../esbuild/src/utilities/get-entry-points.ts
|
|
859
|
+
import { glob as glob3 } from "glob";
|
|
860
|
+
var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
861
|
+
const workspaceRoot = config.workspaceRoot || findWorkspaceRoot();
|
|
862
|
+
const entryPoints = [];
|
|
863
|
+
if (entry) {
|
|
864
|
+
if (typeof entry === "string") {
|
|
865
|
+
entryPoints.push({
|
|
866
|
+
in: entry,
|
|
867
|
+
out: entry
|
|
868
|
+
});
|
|
869
|
+
} else if (Array.isArray(entry)) {
|
|
870
|
+
entryPoints.push(...entry.map((entry2) => ({
|
|
871
|
+
in: entry2,
|
|
872
|
+
out: entry2
|
|
873
|
+
})));
|
|
874
|
+
} else {
|
|
875
|
+
entryPoints.push(...Object.entries(entry).map(([key, value]) => {
|
|
876
|
+
if (typeof value === "string") {
|
|
877
|
+
return {
|
|
878
|
+
in: key,
|
|
879
|
+
out: value
|
|
880
|
+
};
|
|
881
|
+
} else {
|
|
882
|
+
return {
|
|
883
|
+
in: key,
|
|
884
|
+
out: key
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
}));
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
if (emitOnAll) {
|
|
891
|
+
entryPoints.push({
|
|
892
|
+
in: joinPaths(workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"),
|
|
893
|
+
out: joinPaths(workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}")
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
const results = await Promise.all(entryPoints.map(async (entryPoint) => {
|
|
897
|
+
const paths = [];
|
|
898
|
+
if (entryPoint.in.includes("*")) {
|
|
899
|
+
const files = await glob3(entryPoint.in, {
|
|
900
|
+
withFileTypes: true,
|
|
901
|
+
ignore: [
|
|
902
|
+
"**/node_modules/**"
|
|
903
|
+
]
|
|
904
|
+
});
|
|
905
|
+
paths.push(...files.reduce((ret, filePath) => {
|
|
906
|
+
const result = correctPaths(joinPaths(filePath.path, filePath.name).replaceAll(correctPaths(workspaceRoot), "").replaceAll(correctPaths(projectRoot), ""));
|
|
907
|
+
if (result) {
|
|
908
|
+
writeDebug(`Trying to add entry point ${result} at "${joinPaths(filePath.path, filePath.name)}"`, config);
|
|
909
|
+
if (!paths.some((p) => p.in === result)) {
|
|
910
|
+
paths.push({
|
|
911
|
+
in: result,
|
|
912
|
+
out: entryPoint.out.replace(entryPoint.in, result)
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
return ret;
|
|
917
|
+
}, []));
|
|
918
|
+
} else {
|
|
919
|
+
writeDebug(`Trying to add entry point ${entryPoint}"`, config);
|
|
920
|
+
if (!paths.some((p) => p.in === entryPoint.in)) {
|
|
921
|
+
paths.push(entryPoint);
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
return paths;
|
|
925
|
+
}));
|
|
926
|
+
return results.filter(Boolean).reduce((ret, result) => {
|
|
927
|
+
result.forEach((res) => {
|
|
928
|
+
if (res && !ret.some((p) => p.in === res.in)) {
|
|
929
|
+
ret.push(res);
|
|
930
|
+
}
|
|
931
|
+
});
|
|
932
|
+
return ret;
|
|
933
|
+
}, []);
|
|
934
|
+
}, "getEntryPoints");
|
|
935
|
+
|
|
910
936
|
// ../esbuild/src/utilities/helpers.ts
|
|
911
937
|
function handleSync(fn) {
|
|
912
938
|
try {
|
|
@@ -1020,7 +1046,7 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
1020
1046
|
...userOptions,
|
|
1021
1047
|
tsconfig: joinPaths(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1022
1048
|
format: options.format || "cjs",
|
|
1023
|
-
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry ?? "./src/index.ts",
|
|
1049
|
+
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry ?? "./src/index.ts", false),
|
|
1024
1050
|
outdir: userOptions.outputPath || joinPaths("dist", projectRoot),
|
|
1025
1051
|
distDir: userOptions.distDir || "dist",
|
|
1026
1052
|
plugins: [],
|
|
@@ -1035,7 +1061,6 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
1035
1061
|
metafile: userOptions.metafile !== false,
|
|
1036
1062
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
1037
1063
|
clean: userOptions.clean !== false,
|
|
1038
|
-
emitOnAll: userOptions.emitOnAll === true,
|
|
1039
1064
|
assets: userOptions.assets ?? [],
|
|
1040
1065
|
injectShims: userOptions.injectShims !== true,
|
|
1041
1066
|
bundle: userOptions.bundle !== false,
|
|
@@ -1102,19 +1127,13 @@ async function generatePackageJson(context2) {
|
|
|
1102
1127
|
packageJson.exports ??= {};
|
|
1103
1128
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
1104
1129
|
packageJson.exports["."] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js`;
|
|
1105
|
-
|
|
1130
|
+
const entryPoints = [
|
|
1106
1131
|
{
|
|
1107
1132
|
in: "./src/index.ts",
|
|
1108
1133
|
out: "./src/index.ts"
|
|
1109
1134
|
}
|
|
1110
1135
|
];
|
|
1111
1136
|
if (context2.options.entryPoints) {
|
|
1112
|
-
if (Array.isArray(context2.options.entryPoints)) {
|
|
1113
|
-
entryPoints = context2.options.entryPoints.map((entryPoint) => typeof entryPoint === "string" ? {
|
|
1114
|
-
in: entryPoint,
|
|
1115
|
-
out: entryPoint
|
|
1116
|
-
} : entryPoint);
|
|
1117
|
-
}
|
|
1118
1137
|
for (const entryPoint of entryPoints) {
|
|
1119
1138
|
const split = entryPoint.out.split(".");
|
|
1120
1139
|
split.pop();
|
|
@@ -1183,7 +1202,6 @@ async function executeEsBuild(context2) {
|
|
|
1183
1202
|
delete options.clean;
|
|
1184
1203
|
delete options.debug;
|
|
1185
1204
|
delete options.generatePackageJson;
|
|
1186
|
-
delete options.emitOnAll;
|
|
1187
1205
|
delete options.distDir;
|
|
1188
1206
|
delete options.includeSrc;
|
|
1189
1207
|
delete options.verbose;
|
|
@@ -1196,7 +1214,10 @@ async function executeEsBuild(context2) {
|
|
|
1196
1214
|
delete options.injectShims;
|
|
1197
1215
|
delete options.external;
|
|
1198
1216
|
writeTrace(`Run esbuild (${context2.options.name}) with the following options:
|
|
1199
|
-
${formatLogMessage(
|
|
1217
|
+
${formatLogMessage({
|
|
1218
|
+
...options,
|
|
1219
|
+
define: "<Hidden>"
|
|
1220
|
+
})}`, context2.options.config);
|
|
1200
1221
|
const result = await esbuild2.build(options);
|
|
1201
1222
|
await esbuild2.stop();
|
|
1202
1223
|
if (result.metafile) {
|