@storm-software/workspace-tools 1.245.7 → 1.246.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/CHANGELOG.md +26 -0
- package/README.md +1 -1
- package/dist/{chunk-7Q66XSCS.mjs → chunk-2AKLJNKO.mjs} +2 -2
- package/dist/{chunk-FZUZUTKX.js → chunk-2X5RIJLD.js} +41 -41
- package/dist/{chunk-6QSFQS3X.js → chunk-34JK7ZOU.js} +2 -2
- package/dist/{chunk-RSILHGEU.js → chunk-3EZ5RCSK.js} +21 -21
- package/dist/{chunk-CLBFXZQ5.mjs → chunk-3SPGOKCO.mjs} +1 -1
- package/dist/{chunk-HXU5ZXAJ.mjs → chunk-4F75KA7J.mjs} +1 -1
- package/dist/{chunk-GDE7VBWW.js → chunk-4O2MLA6O.js} +62 -62
- package/dist/{chunk-UI3SQYV3.mjs → chunk-4YODDZMS.mjs} +1 -1
- package/dist/{chunk-KLHTXAIU.js → chunk-66FRJGIN.js} +20 -20
- package/dist/{chunk-U6TLQT5H.js → chunk-6V5GP3U4.js} +3 -3
- package/dist/{chunk-EUCOXCI2.mjs → chunk-72JQWMSO.mjs} +3 -3
- package/dist/{chunk-5XF4CY7D.mjs → chunk-7QVGAOPQ.mjs} +1 -1
- package/dist/{chunk-GJ6DN3BR.mjs → chunk-AQLXZBXJ.mjs} +3 -3
- package/dist/{chunk-5DAZ2WTI.js → chunk-AWPP7DRY.js} +2 -2
- package/dist/{chunk-IBHLVELV.js → chunk-AY5HELLN.js} +25 -25
- package/dist/{chunk-ZOFW74B2.mjs → chunk-BLG6LLHW.mjs} +1 -1
- package/dist/{chunk-HONSACRT.js → chunk-BNYY2WQJ.js} +2 -2
- package/dist/{chunk-2HD75CLD.js → chunk-BYLPQCIB.js} +11 -11
- package/dist/{chunk-MMMTLP2W.js → chunk-CQAGLRNY.js} +5 -5
- package/dist/{chunk-2GRVQNW3.js → chunk-CUPARBOS.js} +3 -3
- package/dist/{chunk-RAVLTWJV.js → chunk-ECSCURQQ.js} +13 -13
- package/dist/{chunk-D2ECVPJF.js → chunk-EIL3PQQL.js} +2 -2
- package/dist/{chunk-XIOF32ZH.mjs → chunk-FBIVTCSJ.mjs} +1 -1
- package/dist/{chunk-RRWRVA7F.js → chunk-FDPZRNKZ.js} +15 -15
- package/dist/{chunk-SNFZL5BN.mjs → chunk-GQ6ZBQ6I.mjs} +3 -3
- package/dist/{chunk-RFO5NMSB.js → chunk-H5XURNDS.js} +2 -2
- package/dist/{chunk-Q45DDLNL.mjs → chunk-HK26KBWU.mjs} +2 -2
- package/dist/{chunk-TGDWEUKX.mjs → chunk-I6BCQJPP.mjs} +1 -1
- package/dist/{chunk-IUV3RLT4.mjs → chunk-IPMZQTRA.mjs} +1 -1
- package/dist/{chunk-YWKUJJ34.js → chunk-ITL2GPJB.js} +2 -2
- package/dist/chunk-JTAXCQX6.js +135 -0
- package/dist/{chunk-RLGZCVPW.mjs → chunk-KPKHTJWT.mjs} +3 -3
- package/dist/{chunk-PKBHUBDV.mjs → chunk-KV7YB4MU.mjs} +1 -1
- package/dist/{chunk-PCPEJBLO.js → chunk-LZNWOO4B.js} +7 -7
- package/dist/{chunk-YSYBVJGR.js → chunk-N3WLDHSN.js} +2 -2
- package/dist/chunk-NCFX2MWO.mjs +135 -0
- package/dist/{chunk-LYUV4LMB.mjs → chunk-O3ZLX7S5.mjs} +2 -2
- package/dist/{chunk-SBCLCF4E.mjs → chunk-O4ZT2WZN.mjs} +4 -4
- package/dist/{chunk-IF2GIONQ.js → chunk-P4ALYDGC.js} +5 -5
- package/dist/{chunk-C3YSVZWO.js → chunk-Q2DU6KGV.js} +7 -7
- package/dist/{chunk-T2NTGJ6O.mjs → chunk-Q47LFUGL.mjs} +3 -3
- package/dist/{chunk-6N67WSX5.mjs → chunk-R7VJ7ZHV.mjs} +1 -1
- package/dist/{chunk-GYGIXXAL.js → chunk-RWDBQOGV.js} +5 -5
- package/dist/{chunk-C2REXPET.mjs → chunk-SLCOHXD3.mjs} +1 -1
- package/dist/{chunk-KWIXQ4UN.mjs → chunk-TBQLIKD4.mjs} +3 -3
- package/dist/{chunk-T342MIBF.mjs → chunk-TJ6WVBYM.mjs} +5 -6
- package/dist/{chunk-6ZRK5I4N.js → chunk-U3TVR7B3.js} +7 -7
- package/dist/{chunk-UHNTJRTW.mjs → chunk-U4AQXXXF.mjs} +3 -3
- package/dist/{chunk-6627ZZQF.mjs → chunk-WBFXAE2V.mjs} +4 -4
- package/dist/{chunk-K62HB3IT.mjs → chunk-WCIY3TEF.mjs} +1 -1
- package/dist/{chunk-YFERQMWX.js → chunk-WPYYDD5F.js} +2 -2
- package/dist/{chunk-7PLUDZNP.mjs → chunk-X7XA6QPV.mjs} +2 -2
- package/dist/{chunk-CFRPLVEU.mjs → chunk-XI4BWTXX.mjs} +2 -2
- package/dist/{chunk-7GKIVRFH.js → chunk-ZAE2P6GK.js} +7 -8
- package/dist/{chunk-B6PUPX6O.js → chunk-ZQPK5G4U.js} +27 -27
- package/dist/{chunk-QSLN7UYG.js → chunk-ZVP6NBMF.js} +2 -2
- package/dist/{executor-D5C-erVR.d.mts → executor-9k0vy4BU.d.mts} +0 -1
- package/dist/{executor-Ct74DTAr.d.ts → executor-D04WPR2V.d.ts} +0 -1
- package/dist/executors.d.mts +1 -1
- package/dist/executors.d.ts +1 -1
- package/dist/executors.js +19 -19
- package/dist/executors.mjs +18 -18
- package/dist/generators.js +13 -13
- package/dist/generators.mjs +12 -12
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +29 -29
- package/dist/index.mjs +28 -28
- package/dist/src/base/base-executor.js +6 -6
- package/dist/src/base/base-executor.mjs +5 -5
- package/dist/src/base/base-generator.js +6 -6
- package/dist/src/base/base-generator.mjs +5 -5
- package/dist/src/base/index.js +8 -8
- package/dist/src/base/index.mjs +7 -7
- package/dist/src/executors/cargo-build/executor.js +7 -7
- package/dist/src/executors/cargo-build/executor.mjs +6 -6
- package/dist/src/executors/cargo-check/executor.js +7 -7
- package/dist/src/executors/cargo-check/executor.mjs +6 -6
- package/dist/src/executors/cargo-clippy/executor.js +7 -7
- package/dist/src/executors/cargo-clippy/executor.mjs +6 -6
- package/dist/src/executors/cargo-doc/executor.js +7 -7
- package/dist/src/executors/cargo-doc/executor.mjs +6 -6
- package/dist/src/executors/cargo-format/executor.js +7 -7
- package/dist/src/executors/cargo-format/executor.mjs +6 -6
- package/dist/src/executors/clean-package/executor.js +9 -9
- package/dist/src/executors/clean-package/executor.mjs +5 -5
- package/dist/src/executors/esbuild/executor.js +8 -8
- package/dist/src/executors/esbuild/executor.mjs +7 -7
- package/dist/src/executors/npm-publish/executor.js +4 -4
- package/dist/src/executors/npm-publish/executor.mjs +3 -3
- package/dist/src/executors/size-limit/executor.js +7 -7
- package/dist/src/executors/size-limit/executor.mjs +6 -6
- package/dist/src/executors/tsdown/executor.js +8 -8
- package/dist/src/executors/tsdown/executor.mjs +7 -7
- package/dist/src/executors/typia/executor.js +7 -7
- package/dist/src/executors/typia/executor.mjs +6 -6
- package/dist/src/executors/unbuild/executor.d.mts +1 -1
- package/dist/src/executors/unbuild/executor.d.ts +1 -1
- package/dist/src/executors/unbuild/executor.js +7 -7
- package/dist/src/executors/unbuild/executor.mjs +6 -6
- package/dist/src/executors/unbuild/schema.d.ts +0 -1
- package/dist/src/executors/unbuild/schema.json +1 -3
- package/dist/src/executors/unbuild/schema.md +0 -1
- package/dist/src/executors/unbuild/untyped.js +8 -0
- package/dist/src/executors/unbuild/untyped.mjs +8 -0
- package/dist/src/generators/browser-library/generator.js +8 -8
- package/dist/src/generators/browser-library/generator.mjs +7 -7
- package/dist/src/generators/config-schema/generator.js +7 -7
- package/dist/src/generators/config-schema/generator.mjs +6 -6
- package/dist/src/generators/neutral-library/generator.js +8 -8
- package/dist/src/generators/neutral-library/generator.mjs +7 -7
- package/dist/src/generators/node-library/generator.js +8 -8
- package/dist/src/generators/node-library/generator.mjs +7 -7
- package/dist/src/generators/preset/generator.js +7 -7
- package/dist/src/generators/preset/generator.mjs +6 -6
- package/dist/src/generators/release-version/generator.js +5 -5
- package/dist/src/generators/release-version/generator.mjs +4 -4
- package/dist/src/utils/apply-workspace-tokens.js +4 -4
- package/dist/src/utils/apply-workspace-tokens.mjs +3 -3
- package/dist/src/utils/get-project-configurations.js +4 -4
- package/dist/src/utils/get-project-configurations.mjs +3 -3
- package/dist/src/utils/index.js +6 -6
- package/dist/src/utils/index.mjs +5 -5
- package/dist/src/utils/pnpm-deps-update.js +3 -3
- package/dist/src/utils/pnpm-deps-update.mjs +2 -2
- package/docs/api/executors/unbuild/schema.md +0 -1
- package/package.json +36 -13
- package/dist/chunk-2AUNU6UA.mjs +0 -32
- package/dist/chunk-BUXJSVJG.js +0 -32
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
4
|
+
|
|
5
|
+
// ../config-tools/src/utilities/correct-paths.ts
|
|
6
|
+
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
7
|
+
function normalizeWindowsPath(input = "") {
|
|
8
|
+
if (!input) {
|
|
9
|
+
return input;
|
|
10
|
+
}
|
|
11
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
12
|
+
}
|
|
13
|
+
_chunk3GQAWCBQjs.__name.call(void 0, normalizeWindowsPath, "normalizeWindowsPath");
|
|
14
|
+
var _UNC_REGEX = /^[/\\]{2}/;
|
|
15
|
+
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
16
|
+
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
17
|
+
var correctPaths = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, function(path) {
|
|
18
|
+
if (!path || path.length === 0) {
|
|
19
|
+
return ".";
|
|
20
|
+
}
|
|
21
|
+
path = normalizeWindowsPath(path);
|
|
22
|
+
const isUNCPath = path.match(_UNC_REGEX);
|
|
23
|
+
const isPathAbsolute = isAbsolute(path);
|
|
24
|
+
const trailingSeparator = path[path.length - 1] === "/";
|
|
25
|
+
path = normalizeString(path, !isPathAbsolute);
|
|
26
|
+
if (path.length === 0) {
|
|
27
|
+
if (isPathAbsolute) {
|
|
28
|
+
return "/";
|
|
29
|
+
}
|
|
30
|
+
return trailingSeparator ? "./" : ".";
|
|
31
|
+
}
|
|
32
|
+
if (trailingSeparator) {
|
|
33
|
+
path += "/";
|
|
34
|
+
}
|
|
35
|
+
if (_DRIVE_LETTER_RE.test(path)) {
|
|
36
|
+
path += "/";
|
|
37
|
+
}
|
|
38
|
+
if (isUNCPath) {
|
|
39
|
+
if (!isPathAbsolute) {
|
|
40
|
+
return `//./${path}`;
|
|
41
|
+
}
|
|
42
|
+
return `//${path}`;
|
|
43
|
+
}
|
|
44
|
+
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
45
|
+
}, "correctPaths");
|
|
46
|
+
var joinPaths = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, function(...segments) {
|
|
47
|
+
let path = "";
|
|
48
|
+
for (const seg of segments) {
|
|
49
|
+
if (!seg) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (path.length > 0) {
|
|
53
|
+
const pathTrailing = path[path.length - 1] === "/";
|
|
54
|
+
const segLeading = seg[0] === "/";
|
|
55
|
+
const both = pathTrailing && segLeading;
|
|
56
|
+
if (both) {
|
|
57
|
+
path += seg.slice(1);
|
|
58
|
+
} else {
|
|
59
|
+
path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
60
|
+
}
|
|
61
|
+
} else {
|
|
62
|
+
path += seg;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return correctPaths(path);
|
|
66
|
+
}, "joinPaths");
|
|
67
|
+
function normalizeString(path, allowAboveRoot) {
|
|
68
|
+
let res = "";
|
|
69
|
+
let lastSegmentLength = 0;
|
|
70
|
+
let lastSlash = -1;
|
|
71
|
+
let dots = 0;
|
|
72
|
+
let char = null;
|
|
73
|
+
for (let index = 0; index <= path.length; ++index) {
|
|
74
|
+
if (index < path.length) {
|
|
75
|
+
char = path[index];
|
|
76
|
+
} else if (char === "/") {
|
|
77
|
+
break;
|
|
78
|
+
} else {
|
|
79
|
+
char = "/";
|
|
80
|
+
}
|
|
81
|
+
if (char === "/") {
|
|
82
|
+
if (lastSlash === index - 1 || dots === 1) {
|
|
83
|
+
} else if (dots === 2) {
|
|
84
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
85
|
+
if (res.length > 2) {
|
|
86
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
87
|
+
if (lastSlashIndex === -1) {
|
|
88
|
+
res = "";
|
|
89
|
+
lastSegmentLength = 0;
|
|
90
|
+
} else {
|
|
91
|
+
res = res.slice(0, lastSlashIndex);
|
|
92
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
93
|
+
}
|
|
94
|
+
lastSlash = index;
|
|
95
|
+
dots = 0;
|
|
96
|
+
continue;
|
|
97
|
+
} else if (res.length > 0) {
|
|
98
|
+
res = "";
|
|
99
|
+
lastSegmentLength = 0;
|
|
100
|
+
lastSlash = index;
|
|
101
|
+
dots = 0;
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (allowAboveRoot) {
|
|
106
|
+
res += res.length > 0 ? "/.." : "..";
|
|
107
|
+
lastSegmentLength = 2;
|
|
108
|
+
}
|
|
109
|
+
} else {
|
|
110
|
+
if (res.length > 0) {
|
|
111
|
+
res += `/${path.slice(lastSlash + 1, index)}`;
|
|
112
|
+
} else {
|
|
113
|
+
res = path.slice(lastSlash + 1, index);
|
|
114
|
+
}
|
|
115
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
116
|
+
}
|
|
117
|
+
lastSlash = index;
|
|
118
|
+
dots = 0;
|
|
119
|
+
} else if (char === "." && dots !== -1) {
|
|
120
|
+
++dots;
|
|
121
|
+
} else {
|
|
122
|
+
dots = -1;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return res;
|
|
126
|
+
}
|
|
127
|
+
_chunk3GQAWCBQjs.__name.call(void 0, normalizeString, "normalizeString");
|
|
128
|
+
var isAbsolute = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, function(p) {
|
|
129
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
130
|
+
}, "isAbsolute");
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
exports.correctPaths = correctPaths; exports.joinPaths = joinPaths;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeOptions,
|
|
3
3
|
typeScriptLibraryGeneratorFn
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SLCOHXD3.mjs";
|
|
5
5
|
import {
|
|
6
6
|
withRunGenerator
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GQ6ZBQ6I.mjs";
|
|
8
8
|
import {
|
|
9
9
|
joinPaths
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NCFX2MWO.mjs";
|
|
11
11
|
import {
|
|
12
12
|
__dirname,
|
|
13
13
|
__name
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkECSCURQQjs = require('./chunk-ECSCURQQ.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk66FRJGINjs = require('./chunk-66FRJGIN.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkJTAXCQX6js = require('./chunk-JTAXCQX6.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -15,14 +15,14 @@ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
|
15
15
|
// src/generators/neutral-library/generator.ts
|
|
16
16
|
var _devkit = require('@nx/devkit');
|
|
17
17
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
18
|
-
const filesDir =
|
|
18
|
+
const filesDir = _chunkJTAXCQX6js.joinPaths.call(void 0, __dirname, "src", "generators", "neutral-library", "files");
|
|
19
19
|
const tsLibraryGeneratorOptions = {
|
|
20
20
|
...schema,
|
|
21
21
|
platform: "neutral",
|
|
22
22
|
devDependencies: {},
|
|
23
23
|
buildExecutor: "@storm-software/workspace-tools:unbuild"
|
|
24
24
|
};
|
|
25
|
-
const options = await
|
|
25
|
+
const options = await _chunkECSCURQQjs.normalizeOptions.call(void 0, tree, tsLibraryGeneratorOptions);
|
|
26
26
|
const { className, name, propertyName } = _devkit.names.call(void 0, options.projectNames.projectFileName);
|
|
27
27
|
_devkit.generateFiles.call(void 0, tree, filesDir, options.projectRoot, {
|
|
28
28
|
...schema,
|
|
@@ -40,12 +40,12 @@ async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
|
40
40
|
buildable: options.bundler && options.bundler !== "none",
|
|
41
41
|
hasUnitTestRunner: options.unitTestRunner !== "none"
|
|
42
42
|
});
|
|
43
|
-
await
|
|
43
|
+
await _chunkECSCURQQjs.typeScriptLibraryGeneratorFn.call(void 0, tree, tsLibraryGeneratorOptions, config);
|
|
44
44
|
await _devkit.formatFiles.call(void 0, tree);
|
|
45
45
|
return null;
|
|
46
46
|
}
|
|
47
47
|
_chunk3GQAWCBQjs.__name.call(void 0, neutralLibraryGeneratorFn, "neutralLibraryGeneratorFn");
|
|
48
|
-
var generator_default =
|
|
48
|
+
var generator_default = _chunk66FRJGINjs.withRunGenerator.call(void 0, "TypeScript Library Creator (Neutral Platform)", neutralLibraryGeneratorFn, {
|
|
49
49
|
hooks: {
|
|
50
50
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
51
51
|
options.description ??= "A library used by Storm Software to support either browser or NodeJs applications";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkAY5HELLNjs = require('./chunk-AY5HELLN.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -15,7 +15,7 @@ async function cargoBuildExecutor(options, context) {
|
|
|
15
15
|
return await _chunkULBTYC2Bjs.cargoCommand.call(void 0, ...command);
|
|
16
16
|
}
|
|
17
17
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoBuildExecutor, "cargoBuildExecutor");
|
|
18
|
-
var executor_default =
|
|
18
|
+
var executor_default = _chunkAY5HELLNjs.withRunExecutor.call(void 0, "Cargo Build", cargoBuildExecutor, {
|
|
19
19
|
skipReadingConfig: false,
|
|
20
20
|
hooks: {
|
|
21
21
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name
|
|
3
|
+
} from "./chunk-XUV4U54K.mjs";
|
|
4
|
+
|
|
5
|
+
// ../config-tools/src/utilities/correct-paths.ts
|
|
6
|
+
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
7
|
+
function normalizeWindowsPath(input = "") {
|
|
8
|
+
if (!input) {
|
|
9
|
+
return input;
|
|
10
|
+
}
|
|
11
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
12
|
+
}
|
|
13
|
+
__name(normalizeWindowsPath, "normalizeWindowsPath");
|
|
14
|
+
var _UNC_REGEX = /^[/\\]{2}/;
|
|
15
|
+
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
16
|
+
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
17
|
+
var correctPaths = /* @__PURE__ */ __name(function(path) {
|
|
18
|
+
if (!path || path.length === 0) {
|
|
19
|
+
return ".";
|
|
20
|
+
}
|
|
21
|
+
path = normalizeWindowsPath(path);
|
|
22
|
+
const isUNCPath = path.match(_UNC_REGEX);
|
|
23
|
+
const isPathAbsolute = isAbsolute(path);
|
|
24
|
+
const trailingSeparator = path[path.length - 1] === "/";
|
|
25
|
+
path = normalizeString(path, !isPathAbsolute);
|
|
26
|
+
if (path.length === 0) {
|
|
27
|
+
if (isPathAbsolute) {
|
|
28
|
+
return "/";
|
|
29
|
+
}
|
|
30
|
+
return trailingSeparator ? "./" : ".";
|
|
31
|
+
}
|
|
32
|
+
if (trailingSeparator) {
|
|
33
|
+
path += "/";
|
|
34
|
+
}
|
|
35
|
+
if (_DRIVE_LETTER_RE.test(path)) {
|
|
36
|
+
path += "/";
|
|
37
|
+
}
|
|
38
|
+
if (isUNCPath) {
|
|
39
|
+
if (!isPathAbsolute) {
|
|
40
|
+
return `//./${path}`;
|
|
41
|
+
}
|
|
42
|
+
return `//${path}`;
|
|
43
|
+
}
|
|
44
|
+
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
45
|
+
}, "correctPaths");
|
|
46
|
+
var joinPaths = /* @__PURE__ */ __name(function(...segments) {
|
|
47
|
+
let path = "";
|
|
48
|
+
for (const seg of segments) {
|
|
49
|
+
if (!seg) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (path.length > 0) {
|
|
53
|
+
const pathTrailing = path[path.length - 1] === "/";
|
|
54
|
+
const segLeading = seg[0] === "/";
|
|
55
|
+
const both = pathTrailing && segLeading;
|
|
56
|
+
if (both) {
|
|
57
|
+
path += seg.slice(1);
|
|
58
|
+
} else {
|
|
59
|
+
path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
60
|
+
}
|
|
61
|
+
} else {
|
|
62
|
+
path += seg;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return correctPaths(path);
|
|
66
|
+
}, "joinPaths");
|
|
67
|
+
function normalizeString(path, allowAboveRoot) {
|
|
68
|
+
let res = "";
|
|
69
|
+
let lastSegmentLength = 0;
|
|
70
|
+
let lastSlash = -1;
|
|
71
|
+
let dots = 0;
|
|
72
|
+
let char = null;
|
|
73
|
+
for (let index = 0; index <= path.length; ++index) {
|
|
74
|
+
if (index < path.length) {
|
|
75
|
+
char = path[index];
|
|
76
|
+
} else if (char === "/") {
|
|
77
|
+
break;
|
|
78
|
+
} else {
|
|
79
|
+
char = "/";
|
|
80
|
+
}
|
|
81
|
+
if (char === "/") {
|
|
82
|
+
if (lastSlash === index - 1 || dots === 1) {
|
|
83
|
+
} else if (dots === 2) {
|
|
84
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
85
|
+
if (res.length > 2) {
|
|
86
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
87
|
+
if (lastSlashIndex === -1) {
|
|
88
|
+
res = "";
|
|
89
|
+
lastSegmentLength = 0;
|
|
90
|
+
} else {
|
|
91
|
+
res = res.slice(0, lastSlashIndex);
|
|
92
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
93
|
+
}
|
|
94
|
+
lastSlash = index;
|
|
95
|
+
dots = 0;
|
|
96
|
+
continue;
|
|
97
|
+
} else if (res.length > 0) {
|
|
98
|
+
res = "";
|
|
99
|
+
lastSegmentLength = 0;
|
|
100
|
+
lastSlash = index;
|
|
101
|
+
dots = 0;
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (allowAboveRoot) {
|
|
106
|
+
res += res.length > 0 ? "/.." : "..";
|
|
107
|
+
lastSegmentLength = 2;
|
|
108
|
+
}
|
|
109
|
+
} else {
|
|
110
|
+
if (res.length > 0) {
|
|
111
|
+
res += `/${path.slice(lastSlash + 1, index)}`;
|
|
112
|
+
} else {
|
|
113
|
+
res = path.slice(lastSlash + 1, index);
|
|
114
|
+
}
|
|
115
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
116
|
+
}
|
|
117
|
+
lastSlash = index;
|
|
118
|
+
dots = 0;
|
|
119
|
+
} else if (char === "." && dots !== -1) {
|
|
120
|
+
++dots;
|
|
121
|
+
} else {
|
|
122
|
+
dots = -1;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return res;
|
|
126
|
+
}
|
|
127
|
+
__name(normalizeString, "normalizeString");
|
|
128
|
+
var isAbsolute = /* @__PURE__ */ __name(function(p) {
|
|
129
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
130
|
+
}, "isAbsolute");
|
|
131
|
+
|
|
132
|
+
export {
|
|
133
|
+
correctPaths,
|
|
134
|
+
joinPaths
|
|
135
|
+
};
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
getEntryPoints,
|
|
9
9
|
getEnv,
|
|
10
10
|
getOutExtension
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-72JQWMSO.mjs";
|
|
12
12
|
import {
|
|
13
13
|
withRunExecutor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AQLXZBXJ.mjs";
|
|
15
15
|
import {
|
|
16
16
|
getConfig,
|
|
17
17
|
getStopwatch,
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
writeSuccess,
|
|
24
24
|
writeTrace,
|
|
25
25
|
writeWarning
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2AKLJNKO.mjs";
|
|
27
27
|
import {
|
|
28
28
|
joinPaths
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-NCFX2MWO.mjs";
|
|
30
30
|
import {
|
|
31
31
|
__dirname,
|
|
32
32
|
__name,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkAY5HELLNjs = require('./chunk-AY5HELLN.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkZQPK5G4Ujs = require('./chunk-ZQPK5G4U.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -13,11 +13,11 @@ var _fsextra = require('fs-extra');
|
|
|
13
13
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
14
14
|
async function typiaExecutorFn(options, _, config) {
|
|
15
15
|
if (options.clean !== false) {
|
|
16
|
-
|
|
16
|
+
_chunkZQPK5G4Ujs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
17
17
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
18
18
|
}
|
|
19
19
|
await Promise.all(options.entry.map((entry) => {
|
|
20
|
-
|
|
20
|
+
_chunkZQPK5G4Ujs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
21
21
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
22
22
|
input: entry,
|
|
23
23
|
output: options.outputPath,
|
|
@@ -29,7 +29,7 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
_chunk3GQAWCBQjs.__name.call(void 0, typiaExecutorFn, "typiaExecutorFn");
|
|
32
|
-
var executor_default =
|
|
32
|
+
var executor_default = _chunkAY5HELLNjs.withRunExecutor.call(void 0, "Typia runtime validation generator", typiaExecutorFn, {
|
|
33
33
|
skipReadingConfig: false,
|
|
34
34
|
hooks: {
|
|
35
35
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkECSCURQQjs = require('./chunk-ECSCURQQ.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk66FRJGINjs = require('./chunk-66FRJGIN.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkJTAXCQX6js = require('./chunk-JTAXCQX6.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -15,7 +15,7 @@ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
|
15
15
|
// src/generators/browser-library/generator.ts
|
|
16
16
|
var _devkit = require('@nx/devkit');
|
|
17
17
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
18
|
-
const filesDir =
|
|
18
|
+
const filesDir = _chunkJTAXCQX6js.joinPaths.call(void 0, __dirname, "src", "generators", "browser-library", "files");
|
|
19
19
|
const tsLibraryGeneratorOptions = {
|
|
20
20
|
buildExecutor: "@storm-software/workspace-tools:unbuild",
|
|
21
21
|
platform: "browser",
|
|
@@ -40,7 +40,7 @@ async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
|
40
40
|
description: schema.description,
|
|
41
41
|
directory: schema.directory
|
|
42
42
|
};
|
|
43
|
-
const options = await
|
|
43
|
+
const options = await _chunkECSCURQQjs.normalizeOptions.call(void 0, tree, tsLibraryGeneratorOptions);
|
|
44
44
|
const { className, name, propertyName } = _devkit.names.call(void 0, options.projectNames.projectFileName);
|
|
45
45
|
_devkit.generateFiles.call(void 0, tree, filesDir, options.projectRoot, {
|
|
46
46
|
...schema,
|
|
@@ -68,12 +68,12 @@ async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
|
-
await
|
|
71
|
+
await _chunkECSCURQQjs.typeScriptLibraryGeneratorFn.call(void 0, tree, tsLibraryGeneratorOptions, config);
|
|
72
72
|
await _devkit.formatFiles.call(void 0, tree);
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
75
75
|
_chunk3GQAWCBQjs.__name.call(void 0, browserLibraryGeneratorFn, "browserLibraryGeneratorFn");
|
|
76
|
-
var generator_default =
|
|
76
|
+
var generator_default = _chunk66FRJGINjs.withRunGenerator.call(void 0, "TypeScript Library Creator (Browser Platform)", browserLibraryGeneratorFn, {
|
|
77
77
|
hooks: {
|
|
78
78
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
79
79
|
options.description ??= "A library used by Storm Software to support browser applications";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeOptions,
|
|
3
3
|
typeScriptLibraryGeneratorFn
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SLCOHXD3.mjs";
|
|
5
5
|
import {
|
|
6
6
|
typesNodeVersion
|
|
7
7
|
} from "./chunk-EK75QNMS.mjs";
|
|
8
8
|
import {
|
|
9
9
|
withRunGenerator
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GQ6ZBQ6I.mjs";
|
|
11
11
|
import {
|
|
12
12
|
joinPaths
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NCFX2MWO.mjs";
|
|
14
14
|
import {
|
|
15
15
|
__dirname,
|
|
16
16
|
__name
|
|
@@ -1,9 +1,9 @@
|
|
|
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
|
|
3
|
+
var _chunkAY5HELLNjs = require('./chunk-AY5HELLN.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkZQPK5G4Ujs = require('./chunk-ZQPK5G4U.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -18,7 +18,7 @@ async function sizeLimitExecutorFn(options, context, config) {
|
|
|
18
18
|
if (!_optionalChain([context, 'optionalAccess', _ => _.projectName]) || !_optionalChain([context, 'access', _2 => _2.projectsConfigurations, 'optionalAccess', _3 => _3.projects]) || !context.projectsConfigurations.projects[context.projectName]) {
|
|
19
19
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
_chunkZQPK5G4Ujs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
22
22
|
_sizelimit2.default.call(void 0, [
|
|
23
23
|
_file2.default,
|
|
24
24
|
_esbuild2.default,
|
|
@@ -26,14 +26,14 @@ async function sizeLimitExecutorFn(options, context, config) {
|
|
|
26
26
|
], {
|
|
27
27
|
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _4 => _4.projectsConfigurations, 'access', _5 => _5.projects, 'access', _6 => _6[context.projectName], 'optionalAccess', _7 => _7.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context, 'access', _8 => _8.projectsConfigurations, 'access', _9 => _9.projects, 'access', _10 => _10[context.projectName], 'optionalAccess', _11 => _11.root]), () => ( "./")), "src")))
|
|
28
28
|
}).then((result) => {
|
|
29
|
-
|
|
29
|
+
_chunkZQPK5G4Ujs.writeInfo.call(void 0, `\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
30
30
|
});
|
|
31
31
|
return {
|
|
32
32
|
success: true
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
_chunk3GQAWCBQjs.__name.call(void 0, sizeLimitExecutorFn, "sizeLimitExecutorFn");
|
|
36
|
-
var executor_default =
|
|
36
|
+
var executor_default = _chunkAY5HELLNjs.withRunExecutor.call(void 0, "Size-Limit Performance Test Executor", sizeLimitExecutorFn, {
|
|
37
37
|
skipReadingConfig: false,
|
|
38
38
|
hooks: {
|
|
39
39
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withRunGenerator
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GQ6ZBQ6I.mjs";
|
|
4
4
|
import {
|
|
5
5
|
StormConfigSchema,
|
|
6
6
|
writeInfo,
|
|
7
7
|
writeSuccess,
|
|
8
8
|
writeTrace
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2AKLJNKO.mjs";
|
|
10
10
|
import {
|
|
11
11
|
findWorkspaceRoot
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BLG6LLHW.mjs";
|
|
13
13
|
import {
|
|
14
14
|
__name
|
|
15
15
|
} from "./chunk-XUV4U54K.mjs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withRunExecutor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AQLXZBXJ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
writeInfo
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2AKLJNKO.mjs";
|
|
7
7
|
import {
|
|
8
8
|
joinPaths
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NCFX2MWO.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__name
|
|
12
12
|
} from "./chunk-XUV4U54K.mjs";
|
|
@@ -26,7 +26,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
26
26
|
throw new Error("The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory.");
|
|
27
27
|
}
|
|
28
28
|
const jiti = createJiti(config.workspaceRoot, {
|
|
29
|
-
fsCache: config.skipCache ? false : joinPaths(config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
29
|
+
fsCache: config.skipCache ? false : joinPaths(config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
30
30
|
interopDefault: true
|
|
31
31
|
});
|
|
32
32
|
const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
|
|
@@ -39,7 +39,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
39
39
|
}, {
|
|
40
40
|
stubOptions: {
|
|
41
41
|
jiti: {
|
|
42
|
-
|
|
42
|
+
fsCache: config.skipCache ? false : joinPaths(config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti")
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
rollup: {
|
|
@@ -73,7 +73,6 @@ var executor_default = withRunExecutor("TypeScript Unbuild build", unbuildExecut
|
|
|
73
73
|
options.entry ??= [
|
|
74
74
|
"{sourceRoot}"
|
|
75
75
|
];
|
|
76
|
-
options.outputPath ??= "dist/{projectRoot}";
|
|
77
76
|
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
78
77
|
return options;
|
|
79
78
|
}, "applyDefaultOptions")
|