@storm-software/esbuild 0.21.7 → 0.21.9
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 +1 -1
- package/dist/build.cjs +10 -10
- package/dist/build.js +9 -9
- package/dist/{chunk-KJJEF47Z.js → chunk-4Q76YH6E.js} +1 -1
- package/dist/{chunk-3MVHCPXF.js → chunk-57U4XU5O.js} +5 -5
- package/dist/{chunk-W5YHMJLR.js → chunk-5A3PLYYB.js} +1 -1
- package/dist/{chunk-RMB62XEL.cjs → chunk-5UODOOQA.cjs} +2 -2
- package/dist/{chunk-CD57N3DC.js → chunk-7N4NGXDE.js} +5 -5
- package/dist/{chunk-GQTYEGCT.cjs → chunk-AP5TC7E5.cjs} +2 -2
- package/dist/{chunk-JXPYSVZW.js → chunk-B2PY326H.js} +1 -1
- package/dist/{chunk-NWSAHFK5.cjs → chunk-CJ3YJPNC.cjs} +66 -66
- package/dist/{chunk-GD4U35FZ.cjs → chunk-CNHHELK6.cjs} +3 -3
- package/dist/{chunk-LVWQSCJM.cjs → chunk-GHWCUMOG.cjs} +11 -5
- package/dist/{chunk-ZKT6GJKV.cjs → chunk-MPZUORUA.cjs} +4 -4
- package/dist/{chunk-TBU55QYV.cjs → chunk-MSCC7MGM.cjs} +49 -49
- package/dist/chunk-P4V2LVOO.js +32 -0
- package/dist/{chunk-GZKDEX4I.cjs → chunk-UEYUN2J6.cjs} +3 -3
- package/dist/{chunk-KE7NROKH.js → chunk-V7HJ2CJT.js} +1 -1
- package/dist/{chunk-42FF63OO.cjs → chunk-W6IC5BU4.cjs} +11 -11
- package/dist/{chunk-7QV3QQUC.js → chunk-XCY6RUA6.js} +2 -2
- package/dist/{chunk-DAGDNKO5.js → chunk-XOY3T2ZQ.js} +1 -1
- package/dist/clean.cjs +4 -4
- package/dist/clean.d.cts +12 -12
- package/dist/clean.d.ts +12 -12
- package/dist/clean.js +3 -3
- package/dist/config.cjs +7 -7
- package/dist/config.js +6 -6
- package/dist/index.cjs +10 -10
- package/dist/index.js +9 -9
- package/dist/plugins/deps-check.cjs +4 -4
- package/dist/plugins/deps-check.js +3 -3
- package/dist/plugins/on-error.cjs +4 -4
- package/dist/plugins/on-error.js +3 -3
- package/dist/plugins/resolve-paths.cjs +3 -3
- package/dist/plugins/resolve-paths.js +2 -2
- package/dist/plugins/tsc.cjs +4 -4
- package/dist/plugins/tsc.js +3 -3
- package/package.json +4 -4
- package/dist/chunk-7MDMXJ5V.js +0 -26
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 -->
|
package/dist/build.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var _chunkMSCC7MGMcjs = require('./chunk-MSCC7MGM.cjs');
|
|
4
|
+
require('./chunk-UEYUN2J6.cjs');
|
|
5
|
+
require('./chunk-CJ3YJPNC.cjs');
|
|
6
6
|
require('./chunk-S6M44SSZ.cjs');
|
|
7
7
|
require('./chunk-WRBUO7H6.cjs');
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-AP5TC7E5.cjs');
|
|
9
|
+
require('./chunk-5UODOOQA.cjs');
|
|
10
|
+
require('./chunk-W6IC5BU4.cjs');
|
|
11
|
+
require('./chunk-CNHHELK6.cjs');
|
|
12
|
+
require('./chunk-MPZUORUA.cjs');
|
|
13
|
+
require('./chunk-GHWCUMOG.cjs');
|
|
14
14
|
require('./chunk-CGFDQ5AJ.cjs');
|
|
15
15
|
require('./chunk-EZGTDCYM.cjs');
|
|
16
16
|
require('./chunk-BGYQAVKQ.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
exports.build =
|
|
19
|
+
exports.build = _chunkMSCC7MGMcjs.build;
|
package/dist/build.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-57U4XU5O.js";
|
|
4
|
+
import "./chunk-V7HJ2CJT.js";
|
|
5
|
+
import "./chunk-7N4NGXDE.js";
|
|
6
6
|
import "./chunk-T5272PC2.js";
|
|
7
7
|
import "./chunk-LYDEMC26.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-5A3PLYYB.js";
|
|
9
|
+
import "./chunk-XOY3T2ZQ.js";
|
|
10
|
+
import "./chunk-XCY6RUA6.js";
|
|
11
|
+
import "./chunk-4Q76YH6E.js";
|
|
12
|
+
import "./chunk-B2PY326H.js";
|
|
13
|
+
import "./chunk-P4V2LVOO.js";
|
|
14
14
|
import "./chunk-YNQ45EAM.js";
|
|
15
15
|
import "./chunk-GWG4HOQ6.js";
|
|
16
16
|
import "./chunk-3GQAWCBQ.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clean
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-V7HJ2CJT.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_BUILD_OPTIONS,
|
|
6
6
|
DEFAULT_COMPILED_BANNER,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
getEntryPoints,
|
|
15
15
|
getEnv,
|
|
16
16
|
getOutputExtensionMap
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7N4NGXDE.js";
|
|
18
18
|
import {
|
|
19
19
|
depsCheckPlugin
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4Q76YH6E.js";
|
|
21
21
|
import {
|
|
22
22
|
getStopwatch,
|
|
23
23
|
isVerbose,
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
writeSuccess,
|
|
28
28
|
writeTrace,
|
|
29
29
|
writeWarning
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-B2PY326H.js";
|
|
31
31
|
import {
|
|
32
32
|
joinPaths
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-P4V2LVOO.js";
|
|
34
34
|
import {
|
|
35
35
|
__name
|
|
36
36
|
} from "./chunk-3GQAWCBQ.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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
|
|
3
|
+
var _chunkGHWCUMOGcjs = require('./chunk-GHWCUMOG.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -31,7 +31,7 @@ _chunkBGYQAVKQcjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
|
31
31
|
var resolvePathsPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
32
32
|
name: "storm:resolve-paths",
|
|
33
33
|
setup(build) {
|
|
34
|
-
const parentTsConfig = build.initialOptions.tsconfig ? _chunkBGYQAVKQcjs.__require.call(void 0,
|
|
34
|
+
const parentTsConfig = build.initialOptions.tsconfig ? _chunkBGYQAVKQcjs.__require.call(void 0, _chunkGHWCUMOGcjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build.initialOptions.tsconfig)) : _chunkBGYQAVKQcjs.__require.call(void 0, _chunkGHWCUMOGcjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
35
35
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
36
36
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
37
37
|
build.onResolve({
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
} from "./chunk-LYDEMC26.js";
|
|
7
7
|
import {
|
|
8
8
|
onErrorPlugin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5A3PLYYB.js";
|
|
10
10
|
import {
|
|
11
11
|
resolvePathsPlugin
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XOY3T2ZQ.js";
|
|
13
13
|
import {
|
|
14
14
|
tscPlugin
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XCY6RUA6.js";
|
|
16
16
|
import {
|
|
17
17
|
COLOR_KEYS,
|
|
18
18
|
LogLevel,
|
|
@@ -28,11 +28,11 @@ import {
|
|
|
28
28
|
writeDebug,
|
|
29
29
|
writeTrace,
|
|
30
30
|
writeWarning
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-B2PY326H.js";
|
|
32
32
|
import {
|
|
33
33
|
correctPaths,
|
|
34
34
|
joinPaths
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-P4V2LVOO.js";
|
|
36
36
|
import {
|
|
37
37
|
esmSplitCodeToCjsPlugin
|
|
38
38
|
} from "./chunk-YNQ45EAM.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkMPZUORUAcjs = require('./chunk-MPZUORUA.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -11,7 +11,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (optio
|
|
|
11
11
|
setup(build) {
|
|
12
12
|
build.onEnd((result) => {
|
|
13
13
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
14
|
-
|
|
14
|
+
_chunkMPZUORUAcjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
15
15
|
${result.errors.map((error) => error.text).join("\n")}
|
|
16
16
|
|
|
17
17
|
`, resolvedOptions.config);
|
|
@@ -6,13 +6,13 @@ var _chunkS6M44SSZcjs = require('./chunk-S6M44SSZ.cjs');
|
|
|
6
6
|
var _chunkWRBUO7H6cjs = require('./chunk-WRBUO7H6.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkAP5TC7E5cjs = require('./chunk-AP5TC7E5.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk5UODOOQAcjs = require('./chunk-5UODOOQA.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkW6IC5BU4cjs = require('./chunk-W6IC5BU4.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -28,11 +28,11 @@ var _chunk42FF63OOcjs = require('./chunk-42FF63OO.cjs');
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunkMPZUORUAcjs = require('./chunk-MPZUORUA.cjs');
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _chunkGHWCUMOGcjs = require('./chunk-GHWCUMOG.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
var _chunkCGFDQ5AJcjs = require('./chunk-CGFDQ5AJ.cjs');
|
|
@@ -97,8 +97,8 @@ var copyAssets = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (co
|
|
|
97
97
|
output: "src/"
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
|
|
101
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
100
|
+
_chunkMPZUORUAcjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
101
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkGHWCUMOGcjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
102
102
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
103
103
|
projectDir: projectRoot,
|
|
104
104
|
rootDir: config.workspaceRoot,
|
|
@@ -107,12 +107,12 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
107
107
|
});
|
|
108
108
|
await assetHandler.processAllAssetsOnce();
|
|
109
109
|
if (includeSrc === true) {
|
|
110
|
-
|
|
110
|
+
_chunkMPZUORUAcjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkGHWCUMOGcjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
111
111
|
const files = await _glob.glob.call(void 0, [
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
_chunkGHWCUMOGcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
113
|
+
_chunkGHWCUMOGcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
114
|
+
_chunkGHWCUMOGcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
115
|
+
_chunkGHWCUMOGcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
116
116
|
]);
|
|
117
117
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
118
118
|
|
|
@@ -134,7 +134,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
134
134
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
|
|
135
135
|
const projectNode = project.node;
|
|
136
136
|
if (projectNode.data.root) {
|
|
137
|
-
const projectPackageJsonPath =
|
|
137
|
+
const projectPackageJsonPath = _chunkGHWCUMOGcjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
|
|
138
138
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
139
139
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
140
140
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -145,7 +145,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
if (localPackages.length > 0) {
|
|
148
|
-
|
|
148
|
+
_chunkMPZUORUAcjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
149
149
|
packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
|
|
150
150
|
if (!ret[localPackage.name]) {
|
|
151
151
|
ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
|
|
@@ -167,13 +167,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
167
167
|
return ret;
|
|
168
168
|
}, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
|
|
169
169
|
} else {
|
|
170
|
-
|
|
170
|
+
_chunkMPZUORUAcjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
171
171
|
}
|
|
172
172
|
return packageJson;
|
|
173
173
|
}, "addPackageDependencies");
|
|
174
174
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
175
|
-
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot :
|
|
176
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
175
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkMPZUORUAcjs.findWorkspaceRoot.call(void 0, );
|
|
176
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkGHWCUMOGcjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
177
177
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
178
178
|
packageJson.type ??= "module";
|
|
179
179
|
packageJson.sideEffects ??= false;
|
|
@@ -182,7 +182,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.cal
|
|
|
182
182
|
if (distSrc.startsWith("/")) {
|
|
183
183
|
distSrc = distSrc.substring(1);
|
|
184
184
|
}
|
|
185
|
-
packageJson.source ??= `${
|
|
185
|
+
packageJson.source ??= `${_chunkGHWCUMOGcjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
186
186
|
}
|
|
187
187
|
packageJson.files ??= [
|
|
188
188
|
"dist/**/*"
|
|
@@ -213,7 +213,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.cal
|
|
|
213
213
|
];
|
|
214
214
|
}
|
|
215
215
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
216
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
216
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkGHWCUMOGcjs.joinPaths.call(void 0, "packages", projectName);
|
|
217
217
|
return packageJson;
|
|
218
218
|
}, "addWorkspacePackageJsonFields");
|
|
219
219
|
var addPackageJsonExport = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
|
|
@@ -241,7 +241,7 @@ var addPackageJsonExport = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
241
241
|
var _c12 = require('c12');
|
|
242
242
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
243
243
|
var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
244
|
-
const workspacePath = filePath ||
|
|
244
|
+
const workspacePath = filePath || _chunkMPZUORUAcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
245
245
|
const configs = await Promise.all([
|
|
246
246
|
_c12.loadConfig.call(void 0, {
|
|
247
247
|
cwd: workspacePath,
|
|
@@ -250,7 +250,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
250
250
|
envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
|
|
251
251
|
jitiOptions: {
|
|
252
252
|
debug: false,
|
|
253
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
253
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkGHWCUMOGcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
254
254
|
},
|
|
255
255
|
...options
|
|
256
256
|
}),
|
|
@@ -261,7 +261,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
261
261
|
envName: _optionalChain([fileName, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]),
|
|
262
262
|
jitiOptions: {
|
|
263
263
|
debug: false,
|
|
264
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
264
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkGHWCUMOGcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
265
265
|
},
|
|
266
266
|
configFile: fileName,
|
|
267
267
|
...options
|
|
@@ -270,12 +270,12 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
270
270
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
271
271
|
}, "getConfigFileByName");
|
|
272
272
|
var getConfigFile = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
273
|
-
const workspacePath = filePath ? filePath :
|
|
273
|
+
const workspacePath = filePath ? filePath : _chunkMPZUORUAcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
274
274
|
const result = await getConfigFileByName("storm", workspacePath);
|
|
275
275
|
let config = result.config;
|
|
276
276
|
const configFile = result.configFile;
|
|
277
277
|
if (config && configFile && Object.keys(config).length > 0) {
|
|
278
|
-
|
|
278
|
+
_chunkMPZUORUAcjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
279
279
|
logLevel: "all"
|
|
280
280
|
});
|
|
281
281
|
}
|
|
@@ -283,7 +283,7 @@ var getConfigFile = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
283
283
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
284
284
|
for (const result2 of results) {
|
|
285
285
|
if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
|
|
286
|
-
|
|
286
|
+
_chunkMPZUORUAcjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
287
287
|
logLevel: "all"
|
|
288
288
|
});
|
|
289
289
|
config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
|
|
@@ -330,15 +330,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, () => {
|
|
|
330
330
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
331
331
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
332
332
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
333
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
334
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
333
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkGHWCUMOGcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
334
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkGHWCUMOGcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
335
335
|
directories: {
|
|
336
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
337
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
338
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
339
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
340
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
341
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
336
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkGHWCUMOGcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
337
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkGHWCUMOGcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
338
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkGHWCUMOGcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
339
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkGHWCUMOGcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
340
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkGHWCUMOGcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
341
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkGHWCUMOGcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
342
342
|
},
|
|
343
343
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
344
344
|
env: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}ENV`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -361,23 +361,23 @@ var getConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, () => {
|
|
|
361
361
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
362
362
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
363
363
|
},
|
|
364
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ?
|
|
364
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunkMPZUORUAcjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
365
365
|
};
|
|
366
|
-
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
366
|
+
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkMPZUORUAcjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
367
367
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
368
368
|
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
369
369
|
return ret;
|
|
370
370
|
}, {}) : getThemeColorConfigEnv(prefix);
|
|
371
|
-
if (config.docs ===
|
|
372
|
-
if (config.homepage ===
|
|
373
|
-
config.docs = `${
|
|
371
|
+
if (config.docs === _chunkMPZUORUAcjs.STORM_DEFAULT_DOCS) {
|
|
372
|
+
if (config.homepage === _chunkMPZUORUAcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
373
|
+
config.docs = `${_chunkMPZUORUAcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
374
374
|
} else {
|
|
375
375
|
config.docs = `${config.homepage}/docs`;
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
|
-
if (config.licensing ===
|
|
379
|
-
if (config.homepage ===
|
|
380
|
-
config.licensing = `${
|
|
378
|
+
if (config.licensing === _chunkMPZUORUAcjs.STORM_DEFAULT_LICENSING) {
|
|
379
|
+
if (config.homepage === _chunkMPZUORUAcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
380
|
+
config.licensing = `${_chunkMPZUORUAcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
381
381
|
} else {
|
|
382
382
|
config.licensing = `${config.homepage}/docs`;
|
|
383
383
|
}
|
|
@@ -515,31 +515,31 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
|
|
|
515
515
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
516
516
|
}
|
|
517
517
|
if (config.configFile) {
|
|
518
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
518
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkGHWCUMOGcjs.correctPaths.call(void 0, config.configFile);
|
|
519
519
|
}
|
|
520
520
|
if (config.workspaceRoot) {
|
|
521
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
522
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
523
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
521
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkGHWCUMOGcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
522
|
+
process.env.NX_WORKSPACE_ROOT = _chunkGHWCUMOGcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
523
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkGHWCUMOGcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
524
524
|
}
|
|
525
525
|
if (config.directories) {
|
|
526
526
|
if (!config.skipCache && config.directories.cache) {
|
|
527
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
527
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkGHWCUMOGcjs.correctPaths.call(void 0, config.directories.cache);
|
|
528
528
|
}
|
|
529
529
|
if (config.directories.data) {
|
|
530
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
530
|
+
process.env[`${prefix}DATA_DIR`] = _chunkGHWCUMOGcjs.correctPaths.call(void 0, config.directories.data);
|
|
531
531
|
}
|
|
532
532
|
if (config.directories.config) {
|
|
533
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
533
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkGHWCUMOGcjs.correctPaths.call(void 0, config.directories.config);
|
|
534
534
|
}
|
|
535
535
|
if (config.directories.temp) {
|
|
536
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
536
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkGHWCUMOGcjs.correctPaths.call(void 0, config.directories.temp);
|
|
537
537
|
}
|
|
538
538
|
if (config.directories.log) {
|
|
539
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
539
|
+
process.env[`${prefix}LOG_DIR`] = _chunkGHWCUMOGcjs.correctPaths.call(void 0, config.directories.log);
|
|
540
540
|
}
|
|
541
541
|
if (config.directories.build) {
|
|
542
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
542
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkGHWCUMOGcjs.correctPaths.call(void 0, config.directories.build);
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
if (config.skipCache !== void 0) {
|
|
@@ -593,8 +593,8 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
|
|
|
593
593
|
if (config.logLevel) {
|
|
594
594
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
595
595
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
596
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
597
|
-
process.env.RUST_BACKTRACE =
|
|
596
|
+
process.env.NX_VERBOSE_LOGGING = String(_chunkMPZUORUAcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkMPZUORUAcjs.LogLevel.DEBUG ? true : false);
|
|
597
|
+
process.env.RUST_BACKTRACE = _chunkMPZUORUAcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkMPZUORUAcjs.LogLevel.DEBUG ? "full" : "none";
|
|
598
598
|
}
|
|
599
599
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
600
600
|
for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
|
|
@@ -707,17 +707,17 @@ var createStormConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, as
|
|
|
707
707
|
if (!_optionalChain([_static_cache, 'optionalAccess', _29 => _29.data]) || !_optionalChain([_static_cache, 'optionalAccess', _30 => _30.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
708
708
|
let _workspaceRoot = workspaceRoot;
|
|
709
709
|
if (!_workspaceRoot) {
|
|
710
|
-
_workspaceRoot =
|
|
710
|
+
_workspaceRoot = _chunkMPZUORUAcjs.findWorkspaceRoot.call(void 0, );
|
|
711
711
|
}
|
|
712
712
|
const configEnv = getConfigEnv();
|
|
713
|
-
const defaultConfig = await
|
|
713
|
+
const defaultConfig = await _chunkMPZUORUAcjs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
714
714
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
715
715
|
if (!configFile && !skipLogs) {
|
|
716
|
-
|
|
716
|
+
_chunkMPZUORUAcjs.writeWarning.call(void 0, "No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
|
|
717
717
|
logLevel: "all"
|
|
718
718
|
});
|
|
719
719
|
}
|
|
720
|
-
result = await
|
|
720
|
+
result = await _chunkMPZUORUAcjs.StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
721
721
|
result.workspaceRoot ??= _workspaceRoot;
|
|
722
722
|
} else {
|
|
723
723
|
result = _static_cache.data;
|
|
@@ -752,8 +752,8 @@ var loadStormConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, asyn
|
|
|
752
752
|
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
753
753
|
setConfigEnv(config);
|
|
754
754
|
if (!skipLogs) {
|
|
755
|
-
|
|
756
|
-
${
|
|
755
|
+
_chunkMPZUORUAcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
|
|
756
|
+
${_chunkMPZUORUAcjs.formatLogMessage.call(void 0, config)}`, config);
|
|
757
757
|
}
|
|
758
758
|
return config;
|
|
759
759
|
}, "loadStormConfig");
|
|
@@ -766,7 +766,7 @@ var getConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (workspace
|
|
|
766
766
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
767
767
|
|
|
768
768
|
var getEntryPoints = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
769
|
-
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot :
|
|
769
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkMPZUORUAcjs.findWorkspaceRoot.call(void 0, );
|
|
770
770
|
const entryPoints = [];
|
|
771
771
|
if (entry) {
|
|
772
772
|
if (Array.isArray(entry)) {
|
|
@@ -778,7 +778,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
780
|
if (emitOnAll) {
|
|
781
|
-
entryPoints.push(
|
|
781
|
+
entryPoints.push(_chunkGHWCUMOGcjs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
782
782
|
}
|
|
783
783
|
const results = [];
|
|
784
784
|
for (const entryPoint in entryPoints) {
|
|
@@ -787,9 +787,9 @@ var getEntryPoints = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
787
787
|
withFileTypes: true
|
|
788
788
|
});
|
|
789
789
|
results.push(...files.reduce((ret, filePath) => {
|
|
790
|
-
const result =
|
|
790
|
+
const result = _chunkGHWCUMOGcjs.correctPaths.call(void 0, _chunkGHWCUMOGcjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkGHWCUMOGcjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunkGHWCUMOGcjs.correctPaths.call(void 0, projectRoot), ""));
|
|
791
791
|
if (result) {
|
|
792
|
-
|
|
792
|
+
_chunkMPZUORUAcjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkGHWCUMOGcjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
793
793
|
if (!results.includes(result)) {
|
|
794
794
|
results.push(result);
|
|
795
795
|
}
|
|
@@ -852,12 +852,12 @@ var getOutputExtensionMap = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0
|
|
|
852
852
|
}, "getOutputExtensionMap");
|
|
853
853
|
var getDefaultBuildPlugins = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (options, resolvedOptions) => [
|
|
854
854
|
_chunkWRBUO7H6cjs.nodeProtocolPlugin.call(void 0, options, resolvedOptions),
|
|
855
|
-
|
|
855
|
+
_chunk5UODOOQAcjs.resolvePathsPlugin.call(void 0, options, resolvedOptions),
|
|
856
856
|
_chunkEZGTDCYMcjs.fixImportsPlugin.call(void 0, options, resolvedOptions),
|
|
857
857
|
_chunkS6M44SSZcjs.nativeNodeModulesPlugin.call(void 0, options, resolvedOptions),
|
|
858
858
|
_chunkCGFDQ5AJcjs.esmSplitCodeToCjsPlugin.call(void 0, options, resolvedOptions),
|
|
859
|
-
|
|
860
|
-
|
|
859
|
+
_chunkW6IC5BU4cjs.tscPlugin.call(void 0, options, resolvedOptions),
|
|
860
|
+
_chunkAP5TC7E5cjs.onErrorPlugin.call(void 0, options, resolvedOptions)
|
|
861
861
|
], "getDefaultBuildPlugins");
|
|
862
862
|
var DEFAULT_BUILD_OPTIONS = {
|
|
863
863
|
platform: "node",
|
|
@@ -1,7 +1,7 @@
|
|
|
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(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkMPZUORUAcjs = require('./chunk-MPZUORUA.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -86,8 +86,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (bun
|
|
|
86
86
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
87
87
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
88
88
|
});
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
_chunkMPZUORUAcjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
90
|
+
_chunkMPZUORUAcjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
91
91
|
if (filteredMissingDeps.length > 0) {
|
|
92
92
|
throw new Error(`Missing dependencies detected - please install them:
|
|
93
93
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -3,21 +3,27 @@
|
|
|
3
3
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
4
4
|
|
|
5
5
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
6
|
-
var
|
|
6
|
+
var _path = require('path');
|
|
7
|
+
var removeWindowsDriveLetter = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (osSpecificPath) => {
|
|
8
|
+
return osSpecificPath.replace(/^[A-Z]:/, "");
|
|
9
|
+
}, "removeWindowsDriveLetter");
|
|
7
10
|
var correctPaths = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (path) => {
|
|
8
11
|
if (!path) {
|
|
9
12
|
return "";
|
|
10
13
|
}
|
|
11
|
-
if (
|
|
12
|
-
path
|
|
14
|
+
if (path.includes("\\")) {
|
|
15
|
+
if (!path.toUpperCase().startsWith("C:")) {
|
|
16
|
+
path = `C:${path}`;
|
|
17
|
+
}
|
|
18
|
+
return path.replaceAll("/", "\\");
|
|
13
19
|
}
|
|
14
|
-
return path.
|
|
20
|
+
return removeWindowsDriveLetter(path).split("\\").join("/");
|
|
15
21
|
}, "correctPaths");
|
|
16
22
|
var joinPaths = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (...paths) => {
|
|
17
23
|
if (!paths || paths.length === 0) {
|
|
18
24
|
return "";
|
|
19
25
|
}
|
|
20
|
-
return correctPaths(
|
|
26
|
+
return correctPaths(_path.join.call(void 0, ...paths));
|
|
21
27
|
}, "joinPaths");
|
|
22
28
|
|
|
23
29
|
|