@storm-software/unbuild 0.34.0 → 0.34.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 +1 -1
- package/bin/unbuild.cjs +133 -30
- package/bin/unbuild.js +125 -22
- package/dist/build.cjs +8 -8
- package/dist/build.js +7 -7
- package/dist/{chunk-ERYQ4O3N.js → chunk-2E6P5U5P.js} +1 -1
- package/dist/{chunk-I7SGCUR4.cjs → chunk-3HGUCQU6.cjs} +3 -3
- package/dist/{chunk-LFUHP3V6.cjs → chunk-5FQVMM7I.cjs} +121 -18
- package/dist/{chunk-Y3FGYCTG.cjs → chunk-AGJ2KZ3K.cjs} +2 -2
- package/dist/{chunk-HBOCJ3VS.cjs → chunk-DL7OBOWN.cjs} +6 -6
- package/dist/{chunk-6N2XN6DP.js → chunk-HHWS7REN.js} +1 -1
- package/dist/{chunk-ZGZI67KX.js → chunk-J7JXWCQS.js} +4 -4
- package/dist/{chunk-FYU6QKHN.cjs → chunk-LJ5GM5M6.cjs} +92 -92
- package/dist/{chunk-ZYPPSI2Q.cjs → chunk-NGL4NRBA.cjs} +2 -2
- package/dist/{chunk-J4VTEQNQ.js → chunk-PLJQK2VX.js} +125 -22
- package/dist/{chunk-ELBNF3ZV.cjs → chunk-SEWO2Q7T.cjs} +3 -3
- package/dist/{chunk-JN2D2LK7.js → chunk-UELS4AUC.js} +1 -1
- package/dist/{chunk-SRY6IWKG.js → chunk-UYR662XD.js} +3 -3
- package/dist/{chunk-I3ATI525.js → chunk-WI52QJ54.js} +1 -1
- package/dist/clean.cjs +3 -3
- package/dist/clean.js +2 -2
- package/dist/config.cjs +6 -6
- package/dist/config.js +5 -5
- package/dist/index.cjs +8 -8
- package/dist/index.js +7 -7
- package/dist/plugins/analyze.cjs +3 -3
- package/dist/plugins/analyze.js +2 -2
- package/dist/plugins/on-error.cjs +3 -3
- package/dist/plugins/on-error.js +2 -2
- package/dist/plugins/tsc.cjs +3 -3
- package/dist/plugins/tsc.js +2 -2
- package/package.json +1 -1
|
@@ -27,28 +27,131 @@ var LogLevelLabel = {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
31
|
+
function normalizeWindowsPath(input = "") {
|
|
32
|
+
if (!input) {
|
|
33
|
+
return input;
|
|
34
|
+
}
|
|
35
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
36
|
+
}
|
|
37
|
+
__name(normalizeWindowsPath, "normalizeWindowsPath");
|
|
38
|
+
var _UNC_REGEX = /^[/\\]{2}/;
|
|
39
|
+
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
40
|
+
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
41
|
+
var correctPaths = /* @__PURE__ */ __name(function(path) {
|
|
42
|
+
if (!path || path.length === 0) {
|
|
43
|
+
return ".";
|
|
44
|
+
}
|
|
45
|
+
path = normalizeWindowsPath(path);
|
|
46
|
+
const isUNCPath = path.match(_UNC_REGEX);
|
|
47
|
+
const isPathAbsolute = isAbsolute(path);
|
|
48
|
+
const trailingSeparator = path[path.length - 1] === "/";
|
|
49
|
+
path = normalizeString(path, !isPathAbsolute);
|
|
50
|
+
if (path.length === 0) {
|
|
51
|
+
if (isPathAbsolute) {
|
|
52
|
+
return "/";
|
|
41
53
|
}
|
|
42
|
-
return
|
|
54
|
+
return trailingSeparator ? "./" : ".";
|
|
55
|
+
}
|
|
56
|
+
if (trailingSeparator) {
|
|
57
|
+
path += "/";
|
|
58
|
+
}
|
|
59
|
+
if (_DRIVE_LETTER_RE.test(path)) {
|
|
60
|
+
path += "/";
|
|
43
61
|
}
|
|
44
|
-
|
|
62
|
+
if (isUNCPath) {
|
|
63
|
+
if (!isPathAbsolute) {
|
|
64
|
+
return `//./${path}`;
|
|
65
|
+
}
|
|
66
|
+
return `//${path}`;
|
|
67
|
+
}
|
|
68
|
+
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
45
69
|
}, "correctPaths");
|
|
46
|
-
var joinPaths = /* @__PURE__ */ __name((...
|
|
47
|
-
|
|
48
|
-
|
|
70
|
+
var joinPaths = /* @__PURE__ */ __name(function(...segments) {
|
|
71
|
+
let path = "";
|
|
72
|
+
for (const seg of segments) {
|
|
73
|
+
if (!seg) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (path.length > 0) {
|
|
77
|
+
const pathTrailing = path[path.length - 1] === "/";
|
|
78
|
+
const segLeading = seg[0] === "/";
|
|
79
|
+
const both = pathTrailing && segLeading;
|
|
80
|
+
if (both) {
|
|
81
|
+
path += seg.slice(1);
|
|
82
|
+
} else {
|
|
83
|
+
path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
84
|
+
}
|
|
85
|
+
} else {
|
|
86
|
+
path += seg;
|
|
87
|
+
}
|
|
49
88
|
}
|
|
50
|
-
return correctPaths(
|
|
89
|
+
return correctPaths(path);
|
|
51
90
|
}, "joinPaths");
|
|
91
|
+
function normalizeString(path, allowAboveRoot) {
|
|
92
|
+
let res = "";
|
|
93
|
+
let lastSegmentLength = 0;
|
|
94
|
+
let lastSlash = -1;
|
|
95
|
+
let dots = 0;
|
|
96
|
+
let char = null;
|
|
97
|
+
for (let index = 0; index <= path.length; ++index) {
|
|
98
|
+
if (index < path.length) {
|
|
99
|
+
char = path[index];
|
|
100
|
+
} else if (char === "/") {
|
|
101
|
+
break;
|
|
102
|
+
} else {
|
|
103
|
+
char = "/";
|
|
104
|
+
}
|
|
105
|
+
if (char === "/") {
|
|
106
|
+
if (lastSlash === index - 1 || dots === 1) {
|
|
107
|
+
} else if (dots === 2) {
|
|
108
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
109
|
+
if (res.length > 2) {
|
|
110
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
111
|
+
if (lastSlashIndex === -1) {
|
|
112
|
+
res = "";
|
|
113
|
+
lastSegmentLength = 0;
|
|
114
|
+
} else {
|
|
115
|
+
res = res.slice(0, lastSlashIndex);
|
|
116
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
117
|
+
}
|
|
118
|
+
lastSlash = index;
|
|
119
|
+
dots = 0;
|
|
120
|
+
continue;
|
|
121
|
+
} else if (res.length > 0) {
|
|
122
|
+
res = "";
|
|
123
|
+
lastSegmentLength = 0;
|
|
124
|
+
lastSlash = index;
|
|
125
|
+
dots = 0;
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if (allowAboveRoot) {
|
|
130
|
+
res += res.length > 0 ? "/.." : "..";
|
|
131
|
+
lastSegmentLength = 2;
|
|
132
|
+
}
|
|
133
|
+
} else {
|
|
134
|
+
if (res.length > 0) {
|
|
135
|
+
res += `/${path.slice(lastSlash + 1, index)}`;
|
|
136
|
+
} else {
|
|
137
|
+
res = path.slice(lastSlash + 1, index);
|
|
138
|
+
}
|
|
139
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
140
|
+
}
|
|
141
|
+
lastSlash = index;
|
|
142
|
+
dots = 0;
|
|
143
|
+
} else if (char === "." && dots !== -1) {
|
|
144
|
+
++dots;
|
|
145
|
+
} else {
|
|
146
|
+
dots = -1;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return res;
|
|
150
|
+
}
|
|
151
|
+
__name(normalizeString, "normalizeString");
|
|
152
|
+
var isAbsolute = /* @__PURE__ */ __name(function(p) {
|
|
153
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
154
|
+
}, "isAbsolute");
|
|
52
155
|
|
|
53
156
|
// ../config-tools/src/logger/get-log-level.ts
|
|
54
157
|
var getLogLevel = /* @__PURE__ */ __name((label) => {
|
|
@@ -279,20 +382,20 @@ var COLOR_KEYS = [
|
|
|
279
382
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
280
383
|
import { existsSync as existsSync2 } from "node:fs";
|
|
281
384
|
import { readFile } from "node:fs/promises";
|
|
282
|
-
import { join as
|
|
385
|
+
import { join as join2 } from "node:path";
|
|
283
386
|
|
|
284
387
|
// ../config-tools/src/utilities/find-up.ts
|
|
285
388
|
import { existsSync } from "node:fs";
|
|
286
|
-
import { join
|
|
389
|
+
import { join } from "node:path";
|
|
287
390
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
288
391
|
var depth = 0;
|
|
289
392
|
function findFolderUp(startPath, endFileNames) {
|
|
290
393
|
const _startPath = startPath ?? process.cwd();
|
|
291
|
-
if (endFileNames.some((endFileName) => existsSync(
|
|
394
|
+
if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
|
|
292
395
|
return _startPath;
|
|
293
396
|
}
|
|
294
397
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
295
|
-
const parent =
|
|
398
|
+
const parent = join(_startPath, "..");
|
|
296
399
|
return findFolderUp(parent, endFileNames);
|
|
297
400
|
}
|
|
298
401
|
return void 0;
|
|
@@ -389,7 +492,7 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
389
492
|
let namespace = void 0;
|
|
390
493
|
let repository = void 0;
|
|
391
494
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
392
|
-
if (existsSync2(
|
|
495
|
+
if (existsSync2(join2(workspaceRoot, "package.json"))) {
|
|
393
496
|
const file = await readFile(joinPaths(workspaceRoot, "package.json"), "utf8");
|
|
394
497
|
if (file) {
|
|
395
498
|
const packageJson = JSON.parse(file);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk5FQVMM7Icjs = require('./chunk-5FQVMM7I.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -10,7 +10,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (optio
|
|
|
10
10
|
name: "storm:on-error",
|
|
11
11
|
buildEnd(error) {
|
|
12
12
|
if (error) {
|
|
13
|
-
|
|
13
|
+
_chunk5FQVMM7Icjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
14
14
|
${error ? error.message : "Unknown build error"}
|
|
15
15
|
|
|
16
16
|
`, resolvedOptions.config);
|
|
@@ -18,7 +18,7 @@ ${error ? error.message : "Unknown build error"}
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
renderError(error) {
|
|
21
|
-
|
|
21
|
+
_chunk5FQVMM7Icjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
22
22
|
${error ? error.message : "Unknown build error"}
|
|
23
23
|
|
|
24
24
|
`, resolvedOptions.config);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tscPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WI52QJ54.js";
|
|
4
4
|
import {
|
|
5
5
|
typeDefinitions
|
|
6
6
|
} from "./chunk-ESRR2FD2.js";
|
|
7
7
|
import {
|
|
8
8
|
analyzePlugin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UELS4AUC.js";
|
|
10
10
|
import {
|
|
11
11
|
onErrorPlugin
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HHWS7REN.js";
|
|
13
13
|
import {
|
|
14
14
|
__name
|
|
15
15
|
} from "./chunk-3GQAWCBQ.js";
|
package/dist/clean.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunk3HGUCQU6cjs = require('./chunk-3HGUCQU6.cjs');
|
|
5
|
+
require('./chunk-5FQVMM7I.cjs');
|
|
6
6
|
require('./chunk-BGYQAVKQ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.clean =
|
|
10
|
+
exports.clean = _chunk3HGUCQU6cjs.clean; exports.cleanDirectories = _chunk3HGUCQU6cjs.cleanDirectories;
|
package/dist/clean.js
CHANGED
package/dist/config.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunkDL7OBOWNcjs = require('./chunk-DL7OBOWN.cjs');
|
|
4
|
+
require('./chunk-NGL4NRBA.cjs');
|
|
5
5
|
require('./chunk-BDHZY5E7.cjs');
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-AGJ2KZ3K.cjs');
|
|
7
|
+
require('./chunk-SEWO2Q7T.cjs');
|
|
8
|
+
require('./chunk-5FQVMM7I.cjs');
|
|
9
9
|
require('./chunk-BGYQAVKQ.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.getDefaultBuildPlugins =
|
|
12
|
+
exports.getDefaultBuildPlugins = _chunkDL7OBOWNcjs.getDefaultBuildPlugins;
|
package/dist/config.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDefaultBuildPlugins
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-UYR662XD.js";
|
|
4
|
+
import "./chunk-WI52QJ54.js";
|
|
5
5
|
import "./chunk-ESRR2FD2.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-UELS4AUC.js";
|
|
7
|
+
import "./chunk-HHWS7REN.js";
|
|
8
|
+
import "./chunk-PLJQK2VX.js";
|
|
9
9
|
import "./chunk-3GQAWCBQ.js";
|
|
10
10
|
export {
|
|
11
11
|
getDefaultBuildPlugins
|
package/dist/index.cjs
CHANGED
|
@@ -5,23 +5,23 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkLJ5GM5M6cjs = require('./chunk-LJ5GM5M6.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk3HGUCQU6cjs = require('./chunk-3HGUCQU6.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkDL7OBOWNcjs = require('./chunk-DL7OBOWN.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkNGL4NRBAcjs = require('./chunk-NGL4NRBA.cjs');
|
|
20
20
|
require('./chunk-BDHZY5E7.cjs');
|
|
21
21
|
require('./chunk-ORA4UQMU.cjs');
|
|
22
|
-
require('./chunk-
|
|
23
|
-
require('./chunk-
|
|
24
|
-
require('./chunk-
|
|
22
|
+
require('./chunk-AGJ2KZ3K.cjs');
|
|
23
|
+
require('./chunk-SEWO2Q7T.cjs');
|
|
24
|
+
require('./chunk-5FQVMM7I.cjs');
|
|
25
25
|
require('./chunk-BGYQAVKQ.cjs');
|
|
26
26
|
|
|
27
27
|
|
|
@@ -35,4 +35,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
exports.build =
|
|
38
|
+
exports.build = _chunkLJ5GM5M6cjs.build; exports.clean = _chunk3HGUCQU6cjs.clean; exports.cleanDirectories = _chunk3HGUCQU6cjs.cleanDirectories; exports.cleanOutputPath = _chunkLJ5GM5M6cjs.cleanOutputPath; exports.copyBuildAssets = _chunkLJ5GM5M6cjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkNGL4NRBAcjs.createTsCompilerOptions; exports.executeUnbuild = _chunkLJ5GM5M6cjs.executeUnbuild; exports.generatePackageJson = _chunkLJ5GM5M6cjs.generatePackageJson; exports.getDefaultBuildPlugins = _chunkDL7OBOWNcjs.getDefaultBuildPlugins; exports.loadConfig = _chunkNGL4NRBAcjs.loadConfig; exports.resolveOptions = _chunkLJ5GM5M6cjs.resolveOptions;
|
package/dist/index.js
CHANGED
|
@@ -5,23 +5,23 @@ import {
|
|
|
5
5
|
executeUnbuild,
|
|
6
6
|
generatePackageJson,
|
|
7
7
|
resolveOptions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-J7JXWCQS.js";
|
|
9
9
|
import {
|
|
10
10
|
clean,
|
|
11
11
|
cleanDirectories
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2E6P5U5P.js";
|
|
13
13
|
import {
|
|
14
14
|
getDefaultBuildPlugins
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UYR662XD.js";
|
|
16
16
|
import {
|
|
17
17
|
createTsCompilerOptions,
|
|
18
18
|
loadConfig
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WI52QJ54.js";
|
|
20
20
|
import "./chunk-ESRR2FD2.js";
|
|
21
21
|
import "./chunk-OULCUN6I.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-UELS4AUC.js";
|
|
23
|
+
import "./chunk-HHWS7REN.js";
|
|
24
|
+
import "./chunk-PLJQK2VX.js";
|
|
25
25
|
import "./chunk-3GQAWCBQ.js";
|
|
26
26
|
export {
|
|
27
27
|
build,
|
package/dist/plugins/analyze.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkAGJ2KZ3Kcjs = require('../chunk-AGJ2KZ3K.cjs');
|
|
4
|
+
require('../chunk-5FQVMM7I.cjs');
|
|
5
5
|
require('../chunk-BGYQAVKQ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.analyzePlugin =
|
|
8
|
+
exports.analyzePlugin = _chunkAGJ2KZ3Kcjs.analyzePlugin;
|
package/dist/plugins/analyze.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkSEWO2Q7Tcjs = require('../chunk-SEWO2Q7T.cjs');
|
|
4
|
+
require('../chunk-5FQVMM7I.cjs');
|
|
5
5
|
require('../chunk-BGYQAVKQ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.onErrorPlugin =
|
|
8
|
+
exports.onErrorPlugin = _chunkSEWO2Q7Tcjs.onErrorPlugin;
|
package/dist/plugins/on-error.js
CHANGED
package/dist/plugins/tsc.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkNGL4NRBAcjs = require('../chunk-NGL4NRBA.cjs');
|
|
4
|
+
require('../chunk-5FQVMM7I.cjs');
|
|
5
5
|
require('../chunk-BGYQAVKQ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.tscPlugin =
|
|
8
|
+
exports.tscPlugin = _chunkNGL4NRBAcjs.tscPlugin;
|
package/dist/plugins/tsc.js
CHANGED