@storm-software/pulumi-tools 0.7.4 → 0.7.6
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 +12 -0
- package/README.md +497 -1
- package/dist/{chunk-G7PDZ2WM.js → chunk-32GFYKQ3.js} +2 -2
- package/dist/{chunk-H7HAPX23.js → chunk-6DP5HHF5.js} +2 -2
- package/dist/{chunk-IS6HXL7I.mjs → chunk-ARPHB535.mjs} +1 -1
- package/dist/{chunk-S4O5AGOW.mjs → chunk-B5MURCIC.mjs} +1 -1
- package/dist/{chunk-4TARI6WS.mjs → chunk-CXWKMDJU.mjs} +1 -1
- package/dist/{chunk-MEALEKRV.js → chunk-FN7UDXGG.js} +258 -285
- package/dist/{chunk-7TZS6RY7.js → chunk-I7VABIBI.js} +2 -2
- package/dist/{chunk-KXUJFKTM.js → chunk-IAZVTGHA.js} +2 -2
- package/dist/{chunk-CMJG73FE.mjs → chunk-JTC66DXK.mjs} +272 -299
- package/dist/{chunk-BZNPHGTW.js → chunk-N3H4DK4E.js} +2 -2
- package/dist/{chunk-ANOFMNL3.mjs → chunk-O6PGI6V3.mjs} +1 -1
- package/dist/{chunk-7Y64NEWY.mjs → chunk-P6YUXTRU.mjs} +1 -1
- package/dist/{chunk-7AYGEMWQ.mjs → chunk-PZVSIXQ3.mjs} +1 -1
- package/dist/{chunk-7RGDAFW2.mjs → chunk-QY3JQOCP.mjs} +1 -1
- package/dist/{chunk-H64Q27JP.js → chunk-XXWYXYXW.js} +3 -3
- package/dist/{chunk-G3CX72UJ.js → chunk-YXVSSAJ7.js} +5 -5
- package/dist/executors.d.mts +1 -1
- package/dist/executors.d.ts +1 -1
- package/dist/executors.js +7 -7
- package/dist/executors.mjs +7 -7
- package/dist/{generators-BTx7b7LA.d.ts → generators-CDh2w5jS.d.ts} +1 -1
- package/dist/{generators-UYHhe90f.d.mts → generators-tDFGjZKk.d.mts} +1 -1
- package/dist/generators.d.mts +2 -2
- package/dist/generators.d.ts +2 -2
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -9
- package/dist/index.mjs +8 -8
- package/dist/src/base/base-executor.d.mts +1 -1
- package/dist/src/base/base-executor.d.ts +1 -1
- package/dist/src/base/base-executor.js +3 -3
- package/dist/src/base/base-executor.mjs +2 -2
- package/dist/src/base/index.d.mts +1 -1
- package/dist/src/base/index.d.ts +1 -1
- package/dist/src/base/index.js +3 -3
- package/dist/src/base/index.mjs +2 -2
- package/dist/src/executors/config/executor.d.mts +1 -1
- package/dist/src/executors/config/executor.d.ts +1 -1
- package/dist/src/executors/config/executor.js +4 -4
- package/dist/src/executors/config/executor.mjs +3 -3
- package/dist/src/executors/import/executor.d.mts +1 -1
- package/dist/src/executors/import/executor.d.ts +1 -1
- package/dist/src/executors/import/executor.js +4 -4
- package/dist/src/executors/import/executor.mjs +3 -3
- package/dist/src/executors/preview/executor.d.mts +1 -1
- package/dist/src/executors/preview/executor.d.ts +1 -1
- package/dist/src/executors/preview/executor.js +4 -4
- package/dist/src/executors/preview/executor.mjs +3 -3
- package/dist/src/executors/refresh/executor.d.mts +1 -1
- package/dist/src/executors/refresh/executor.d.ts +1 -1
- package/dist/src/executors/refresh/executor.js +4 -4
- package/dist/src/executors/refresh/executor.mjs +3 -3
- package/dist/src/executors/up/executor.d.mts +1 -1
- package/dist/src/executors/up/executor.d.ts +1 -1
- package/dist/src/executors/up/executor.js +4 -4
- package/dist/src/executors/up/executor.mjs +3 -3
- package/dist/src/generators/init/generator.d.mts +2 -2
- package/dist/src/generators/init/generator.d.ts +2 -2
- package/dist/src/generators/init/generator.js +3 -3
- package/dist/src/generators/init/generator.mjs +2 -2
- package/dist/{types-BQ21E8Xn.d.mts → types-CMF_wowV.d.mts} +2 -2
- package/dist/{types-BQ21E8Xn.d.ts → types-CMF_wowV.d.ts} +2 -2
- package/package.json +1 -1
|
@@ -227,22 +227,131 @@ var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(
|
|
|
227
227
|
var _path = require('path'); var path6 = _interopRequireWildcard(_path);
|
|
228
228
|
|
|
229
229
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
230
|
-
var
|
|
231
|
-
|
|
232
|
-
if (!
|
|
233
|
-
return
|
|
230
|
+
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
231
|
+
function normalizeWindowsPath(input = "") {
|
|
232
|
+
if (!input) {
|
|
233
|
+
return input;
|
|
234
|
+
}
|
|
235
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
236
|
+
}
|
|
237
|
+
_chunk3GQAWCBQjs.__name.call(void 0, normalizeWindowsPath, "normalizeWindowsPath");
|
|
238
|
+
var _UNC_REGEX = /^[/\\]{2}/;
|
|
239
|
+
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
240
|
+
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
241
|
+
var correctPaths = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, function(path7) {
|
|
242
|
+
if (!path7 || path7.length === 0) {
|
|
243
|
+
return ".";
|
|
244
|
+
}
|
|
245
|
+
path7 = normalizeWindowsPath(path7);
|
|
246
|
+
const isUNCPath = path7.match(_UNC_REGEX);
|
|
247
|
+
const isPathAbsolute = isAbsolute(path7);
|
|
248
|
+
const trailingSeparator = path7[path7.length - 1] === "/";
|
|
249
|
+
path7 = normalizeString(path7, !isPathAbsolute);
|
|
250
|
+
if (path7.length === 0) {
|
|
251
|
+
if (isPathAbsolute) {
|
|
252
|
+
return "/";
|
|
253
|
+
}
|
|
254
|
+
return trailingSeparator ? "./" : ".";
|
|
255
|
+
}
|
|
256
|
+
if (trailingSeparator) {
|
|
257
|
+
path7 += "/";
|
|
234
258
|
}
|
|
235
|
-
if (
|
|
236
|
-
path7
|
|
259
|
+
if (_DRIVE_LETTER_RE.test(path7)) {
|
|
260
|
+
path7 += "/";
|
|
237
261
|
}
|
|
238
|
-
|
|
262
|
+
if (isUNCPath) {
|
|
263
|
+
if (!isPathAbsolute) {
|
|
264
|
+
return `//./${path7}`;
|
|
265
|
+
}
|
|
266
|
+
return `//${path7}`;
|
|
267
|
+
}
|
|
268
|
+
return isPathAbsolute && !isAbsolute(path7) ? `/${path7}` : path7;
|
|
239
269
|
}, "correctPaths");
|
|
240
|
-
var joinPaths = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (...
|
|
241
|
-
|
|
242
|
-
|
|
270
|
+
var joinPaths = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, function(...segments) {
|
|
271
|
+
let path7 = "";
|
|
272
|
+
for (const seg of segments) {
|
|
273
|
+
if (!seg) {
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
if (path7.length > 0) {
|
|
277
|
+
const pathTrailing = path7[path7.length - 1] === "/";
|
|
278
|
+
const segLeading = seg[0] === "/";
|
|
279
|
+
const both = pathTrailing && segLeading;
|
|
280
|
+
if (both) {
|
|
281
|
+
path7 += seg.slice(1);
|
|
282
|
+
} else {
|
|
283
|
+
path7 += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
284
|
+
}
|
|
285
|
+
} else {
|
|
286
|
+
path7 += seg;
|
|
287
|
+
}
|
|
243
288
|
}
|
|
244
|
-
return correctPaths(
|
|
289
|
+
return correctPaths(path7);
|
|
245
290
|
}, "joinPaths");
|
|
291
|
+
function normalizeString(path7, allowAboveRoot) {
|
|
292
|
+
let res = "";
|
|
293
|
+
let lastSegmentLength = 0;
|
|
294
|
+
let lastSlash = -1;
|
|
295
|
+
let dots = 0;
|
|
296
|
+
let char = null;
|
|
297
|
+
for (let index = 0; index <= path7.length; ++index) {
|
|
298
|
+
if (index < path7.length) {
|
|
299
|
+
char = path7[index];
|
|
300
|
+
} else if (char === "/") {
|
|
301
|
+
break;
|
|
302
|
+
} else {
|
|
303
|
+
char = "/";
|
|
304
|
+
}
|
|
305
|
+
if (char === "/") {
|
|
306
|
+
if (lastSlash === index - 1 || dots === 1) {
|
|
307
|
+
} else if (dots === 2) {
|
|
308
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
309
|
+
if (res.length > 2) {
|
|
310
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
311
|
+
if (lastSlashIndex === -1) {
|
|
312
|
+
res = "";
|
|
313
|
+
lastSegmentLength = 0;
|
|
314
|
+
} else {
|
|
315
|
+
res = res.slice(0, lastSlashIndex);
|
|
316
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
317
|
+
}
|
|
318
|
+
lastSlash = index;
|
|
319
|
+
dots = 0;
|
|
320
|
+
continue;
|
|
321
|
+
} else if (res.length > 0) {
|
|
322
|
+
res = "";
|
|
323
|
+
lastSegmentLength = 0;
|
|
324
|
+
lastSlash = index;
|
|
325
|
+
dots = 0;
|
|
326
|
+
continue;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
if (allowAboveRoot) {
|
|
330
|
+
res += res.length > 0 ? "/.." : "..";
|
|
331
|
+
lastSegmentLength = 2;
|
|
332
|
+
}
|
|
333
|
+
} else {
|
|
334
|
+
if (res.length > 0) {
|
|
335
|
+
res += `/${path7.slice(lastSlash + 1, index)}`;
|
|
336
|
+
} else {
|
|
337
|
+
res = path7.slice(lastSlash + 1, index);
|
|
338
|
+
}
|
|
339
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
340
|
+
}
|
|
341
|
+
lastSlash = index;
|
|
342
|
+
dots = 0;
|
|
343
|
+
} else if (char === "." && dots !== -1) {
|
|
344
|
+
++dots;
|
|
345
|
+
} else {
|
|
346
|
+
dots = -1;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
return res;
|
|
350
|
+
}
|
|
351
|
+
_chunk3GQAWCBQjs.__name.call(void 0, normalizeString, "normalizeString");
|
|
352
|
+
var isAbsolute = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, function(p) {
|
|
353
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
354
|
+
}, "isAbsolute");
|
|
246
355
|
|
|
247
356
|
// ../config-tools/src/utilities/find-up.ts
|
|
248
357
|
|
|
@@ -1348,7 +1457,7 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1348
1457
|
}, "withRunGenerator");
|
|
1349
1458
|
|
|
1350
1459
|
// ../workspace-tools/src/generators/init/init.ts
|
|
1351
|
-
|
|
1460
|
+
var _devkit = require('@nx/devkit');
|
|
1352
1461
|
async function initGenerator(tree, schema) {
|
|
1353
1462
|
const task = _devkit.addDependenciesToPackageJson.call(void 0, tree, {
|
|
1354
1463
|
nx: "^19.6.2",
|
|
@@ -1545,9 +1654,10 @@ var executor_default3 = withRunExecutor("Cargo Clippy", cargoClippyExecutor, {
|
|
|
1545
1654
|
});
|
|
1546
1655
|
|
|
1547
1656
|
// ../workspace-tools/src/executors/cargo-doc/executor.ts
|
|
1548
|
-
var _deepclone = require('deep-clone'); var _deepclone2 = _interopRequireDefault(_deepclone);
|
|
1549
1657
|
async function cargoDocExecutor(options, context2) {
|
|
1550
|
-
const opts =
|
|
1658
|
+
const opts = {
|
|
1659
|
+
...options
|
|
1660
|
+
};
|
|
1551
1661
|
opts["no-deps"] = opts.noDeps;
|
|
1552
1662
|
delete opts.noDeps;
|
|
1553
1663
|
const command = buildCargoCommand("doc", options, context2);
|
|
@@ -1602,7 +1712,6 @@ var _jtoml = require('@ltd/j-toml'); var _jtoml2 = _interopRequireDefault(_jtoml
|
|
|
1602
1712
|
var LARGE_BUFFER2 = 1024 * 1e6;
|
|
1603
1713
|
|
|
1604
1714
|
// ../esbuild/src/build.ts
|
|
1605
|
-
var _node = require('@humanfs/node');
|
|
1606
1715
|
|
|
1607
1716
|
|
|
1608
1717
|
// ../build-tools/src/config.ts
|
|
@@ -1700,7 +1809,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
1700
1809
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
1701
1810
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
1702
1811
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
1703
|
-
if (projectPackageJson.private !==
|
|
1812
|
+
if (projectPackageJson.private !== true) {
|
|
1704
1813
|
localPackages.push(projectPackageJson);
|
|
1705
1814
|
}
|
|
1706
1815
|
}
|
|
@@ -1889,6 +1998,8 @@ var _estoolkit = require('es-toolkit');
|
|
|
1889
1998
|
var _compat = require('es-toolkit/compat');
|
|
1890
1999
|
var _esbuild = require('esbuild'); var esbuild2 = _interopRequireWildcard(_esbuild); var esbuild = _interopRequireWildcard(_esbuild);
|
|
1891
2000
|
var _globby = require('globby');
|
|
2001
|
+
|
|
2002
|
+
|
|
1892
2003
|
var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
1893
2004
|
|
|
1894
2005
|
// ../esbuild/src/base/renderer-engine.ts
|
|
@@ -2034,13 +2145,13 @@ var RendererEngine = class {
|
|
|
2034
2145
|
|
|
2035
2146
|
// ../esbuild/src/clean.ts
|
|
2036
2147
|
|
|
2037
|
-
async function
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2148
|
+
async function cleanDirectories(name = "ESBuild", directory, config) {
|
|
2149
|
+
await _promises.rm.call(void 0, directory, {
|
|
2150
|
+
recursive: true,
|
|
2151
|
+
force: true
|
|
2152
|
+
});
|
|
2042
2153
|
}
|
|
2043
|
-
_chunk3GQAWCBQjs.__name.call(void 0,
|
|
2154
|
+
_chunk3GQAWCBQjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
|
|
2044
2155
|
|
|
2045
2156
|
// ../esbuild/src/plugins/esm-split-code-to-cjs.ts
|
|
2046
2157
|
|
|
@@ -2212,8 +2323,9 @@ var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (o
|
|
|
2212
2323
|
}), "resolvePathsPlugin");
|
|
2213
2324
|
|
|
2214
2325
|
// ../esbuild/src/plugins/tsc.ts
|
|
2215
|
-
|
|
2216
2326
|
var _apiextractor = require('@microsoft/api-extractor');
|
|
2327
|
+
|
|
2328
|
+
|
|
2217
2329
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
2218
2330
|
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0, joinPaths(options.projectRoot, "package.json"));
|
|
2219
2331
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
@@ -2286,18 +2398,18 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
|
|
|
2286
2398
|
const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
2287
2399
|
const bundlePath = joinPaths(resolvedOptions.outdir, entryPoint);
|
|
2288
2400
|
let dtsPath;
|
|
2289
|
-
if (
|
|
2401
|
+
if (_fs.existsSync.call(void 0, joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
2290
2402
|
dtsPath = joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
2291
|
-
} else if (
|
|
2403
|
+
} else if (_fs.existsSync.call(void 0, joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
2292
2404
|
dtsPath = joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
2293
2405
|
}
|
|
2294
2406
|
const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
2295
2407
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
2296
2408
|
bundleTypeDefinitions(dtsPath, bundlePath, _nullishCoalesce(resolvedOptions.external, () => ( [])), resolvedOptions);
|
|
2297
|
-
const dtsContents = await
|
|
2298
|
-
await
|
|
2409
|
+
const dtsContents = await _promises2.default.readFile(`${bundlePath}.d.ts`, "utf8");
|
|
2410
|
+
await _promises2.default.writeFile(`${bundlePath}.${ext}`, dtsContents);
|
|
2299
2411
|
} else {
|
|
2300
|
-
await
|
|
2412
|
+
await _promises2.default.writeFile(`${bundlePath}.${ext}`, `export * from './${entryPoint}'`);
|
|
2301
2413
|
}
|
|
2302
2414
|
}
|
|
2303
2415
|
});
|
|
@@ -2546,10 +2658,11 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
2546
2658
|
exitOnError: true
|
|
2547
2659
|
});
|
|
2548
2660
|
const projectJsonPath = joinPaths(workspaceRoot3.dir, projectRoot, "project.json");
|
|
2549
|
-
if (!
|
|
2661
|
+
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
2550
2662
|
throw new Error("Cannot find project.json configuration");
|
|
2551
2663
|
}
|
|
2552
|
-
const
|
|
2664
|
+
const projectJsonFile = await _promises2.default.readFile(projectJsonPath, "utf8");
|
|
2665
|
+
const projectJson = JSON.parse(projectJsonFile);
|
|
2553
2666
|
const projectName = projectJson.name;
|
|
2554
2667
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2555
2668
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _120 => _120.projects, 'optionalAccess', _121 => _121[projectName]])) {
|
|
@@ -2559,10 +2672,11 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
2559
2672
|
options.name ??= `${projectName}-${options.format}`;
|
|
2560
2673
|
options.target ??= DEFAULT_TARGET;
|
|
2561
2674
|
const packageJsonPath = joinPaths(workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
2562
|
-
if (!
|
|
2675
|
+
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2563
2676
|
throw new Error("Cannot find package.json configuration");
|
|
2564
2677
|
}
|
|
2565
|
-
const
|
|
2678
|
+
const packageJsonFile = await _promises2.default.readFile(packageJsonPath, "utf8");
|
|
2679
|
+
const packageJson = JSON.parse(packageJsonFile);
|
|
2566
2680
|
const outExtension = getOutputExtensionMap(options, packageJson.type);
|
|
2567
2681
|
const env = getEnv("esbuild", options);
|
|
2568
2682
|
const result = {
|
|
@@ -2641,14 +2755,15 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
2641
2755
|
return result;
|
|
2642
2756
|
}, "resolveOptions");
|
|
2643
2757
|
async function generatePackageJson(context2) {
|
|
2644
|
-
if (context2.options.generatePackageJson !== false &&
|
|
2758
|
+
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, joinPaths(context2.options.projectRoot, "package.json"))) {
|
|
2645
2759
|
writeDebug(" \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
2646
2760
|
const stopwatch = getStopwatch("Write package.json file");
|
|
2647
2761
|
const packageJsonPath = joinPaths(context2.options.projectRoot, "project.json");
|
|
2648
|
-
if (!
|
|
2762
|
+
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2649
2763
|
throw new Error("Cannot find package.json configuration");
|
|
2650
2764
|
}
|
|
2651
|
-
|
|
2765
|
+
const packageJsonFile = await _promises2.default.readFile(joinPaths(context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"), "utf8");
|
|
2766
|
+
let packageJson = JSON.parse(packageJsonFile);
|
|
2652
2767
|
if (!packageJson) {
|
|
2653
2768
|
throw new Error("Cannot find package.json configuration file");
|
|
2654
2769
|
}
|
|
@@ -2721,7 +2836,7 @@ async function executeEsBuild(context2) {
|
|
|
2721
2836
|
const result = await esbuild2.build(context2.options);
|
|
2722
2837
|
if (result.metafile) {
|
|
2723
2838
|
const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
|
|
2724
|
-
await
|
|
2839
|
+
await _promises2.default.writeFile(metafilePath, JSON.stringify(result.metafile));
|
|
2725
2840
|
}
|
|
2726
2841
|
stopwatch();
|
|
2727
2842
|
return context2;
|
|
@@ -2778,7 +2893,10 @@ async function dependencyCheck(options) {
|
|
|
2778
2893
|
_chunk3GQAWCBQjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
2779
2894
|
async function cleanOutputPath(context2) {
|
|
2780
2895
|
if (context2.options.clean !== false && context2.options.outdir) {
|
|
2781
|
-
|
|
2896
|
+
writeDebug(` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
|
|
2897
|
+
const stopwatch = getStopwatch(`${context2.options.name} output clean`);
|
|
2898
|
+
await cleanDirectories(context2.options.name, context2.options.outdir, context2.options.config);
|
|
2899
|
+
stopwatch();
|
|
2782
2900
|
}
|
|
2783
2901
|
return context2;
|
|
2784
2902
|
}
|
|
@@ -2918,17 +3036,18 @@ var executor_default7 = withRunExecutor("Size-Limit Performance Test Executor",
|
|
|
2918
3036
|
|
|
2919
3037
|
|
|
2920
3038
|
|
|
3039
|
+
|
|
2921
3040
|
var _tsdown = require('tsdown');
|
|
2922
3041
|
|
|
2923
3042
|
// ../tsdown/src/clean.ts
|
|
2924
3043
|
|
|
2925
|
-
async function
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
3044
|
+
async function cleanDirectories2(name = "TSDown", directory, config) {
|
|
3045
|
+
await _promises.rm.call(void 0, directory, {
|
|
3046
|
+
recursive: true,
|
|
3047
|
+
force: true
|
|
3048
|
+
});
|
|
2930
3049
|
}
|
|
2931
|
-
_chunk3GQAWCBQjs.__name.call(void 0,
|
|
3050
|
+
_chunk3GQAWCBQjs.__name.call(void 0, cleanDirectories2, "cleanDirectories");
|
|
2932
3051
|
|
|
2933
3052
|
// ../tsdown/src/config.ts
|
|
2934
3053
|
var DEFAULT_BUILD_OPTIONS2 = {
|
|
@@ -2966,10 +3085,11 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
2966
3085
|
exitOnError: true
|
|
2967
3086
|
});
|
|
2968
3087
|
const projectJsonPath = joinPaths(workspaceRoot3.dir, projectRoot, "project.json");
|
|
2969
|
-
if (!
|
|
3088
|
+
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
2970
3089
|
throw new Error("Cannot find project.json configuration");
|
|
2971
3090
|
}
|
|
2972
|
-
const
|
|
3091
|
+
const projectJsonFile = await _promises2.default.readFile(projectJsonPath, "utf8");
|
|
3092
|
+
const projectJson = JSON.parse(projectJsonFile);
|
|
2973
3093
|
const projectName = projectJson.name;
|
|
2974
3094
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2975
3095
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _153 => _153.projects, 'optionalAccess', _154 => _154[projectName]])) {
|
|
@@ -2979,7 +3099,7 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
2979
3099
|
options.name ??= `${projectName}-${options.format}`;
|
|
2980
3100
|
options.target ??= DEFAULT_TARGET;
|
|
2981
3101
|
const packageJsonPath = joinPaths(workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
2982
|
-
if (!
|
|
3102
|
+
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2983
3103
|
throw new Error("Cannot find package.json configuration");
|
|
2984
3104
|
}
|
|
2985
3105
|
const env = getEnv("tsdown", options);
|
|
@@ -3034,17 +3154,18 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
3034
3154
|
return result;
|
|
3035
3155
|
}, "resolveOptions");
|
|
3036
3156
|
async function generatePackageJson2(options) {
|
|
3037
|
-
if (options.generatePackageJson !== false &&
|
|
3157
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, joinPaths(options.projectRoot, "package.json"))) {
|
|
3038
3158
|
writeDebug(" \u270D\uFE0F Writing package.json file", options.config);
|
|
3039
3159
|
const stopwatch = getStopwatch("Write package.json file");
|
|
3040
3160
|
const packageJsonPath = joinPaths(options.projectRoot, "project.json");
|
|
3041
|
-
if (!
|
|
3161
|
+
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
3042
3162
|
throw new Error("Cannot find package.json configuration");
|
|
3043
3163
|
}
|
|
3044
|
-
|
|
3045
|
-
if (!
|
|
3164
|
+
const packageJsonFile = await _promises2.default.readFile(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
3165
|
+
if (!packageJsonFile) {
|
|
3046
3166
|
throw new Error("Cannot find package.json configuration file");
|
|
3047
3167
|
}
|
|
3168
|
+
let packageJson = JSON.parse(packageJsonFile);
|
|
3048
3169
|
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
3049
3170
|
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
3050
3171
|
packageJson.exports ??= {};
|
|
@@ -3112,7 +3233,10 @@ async function reportResults2(options) {
|
|
|
3112
3233
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults2, "reportResults");
|
|
3113
3234
|
async function cleanOutputPath2(options) {
|
|
3114
3235
|
if (options.clean !== false && options.outdir) {
|
|
3115
|
-
|
|
3236
|
+
writeDebug(` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`, options.config);
|
|
3237
|
+
const stopwatch = getStopwatch(`${options.name} output clean`);
|
|
3238
|
+
await cleanDirectories2(options.name, options.outdir, options.config);
|
|
3239
|
+
stopwatch();
|
|
3116
3240
|
}
|
|
3117
3241
|
return options;
|
|
3118
3242
|
}
|
|
@@ -3233,7 +3357,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
3233
3357
|
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.");
|
|
3234
3358
|
}
|
|
3235
3359
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
3236
|
-
fsCache: config.skipCache ? false : joinPaths(config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
3360
|
+
fsCache: config.skipCache ? false : joinPaths(config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
3237
3361
|
interopDefault: true
|
|
3238
3362
|
});
|
|
3239
3363
|
const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
|
|
@@ -3246,7 +3370,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
3246
3370
|
}, {
|
|
3247
3371
|
stubOptions: {
|
|
3248
3372
|
jiti: {
|
|
3249
|
-
|
|
3373
|
+
fsCache: config.skipCache ? false : joinPaths(config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti")
|
|
3250
3374
|
}
|
|
3251
3375
|
},
|
|
3252
3376
|
rollup: {
|
|
@@ -3280,7 +3404,6 @@ var executor_default10 = withRunExecutor("TypeScript Unbuild build", unbuildExec
|
|
|
3280
3404
|
options.entry ??= [
|
|
3281
3405
|
"{sourceRoot}"
|
|
3282
3406
|
];
|
|
3283
|
-
options.outputPath ??= "dist/{projectRoot}";
|
|
3284
3407
|
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
3285
3408
|
return options;
|
|
3286
3409
|
}, "applyDefaultOptions")
|
|
@@ -3360,48 +3483,48 @@ var nodeVersion = "20.11.0";
|
|
|
3360
3483
|
var pnpmVersion = "8.10.2";
|
|
3361
3484
|
|
|
3362
3485
|
// ../workspace-tools/src/base/typescript-library-generator.ts
|
|
3363
|
-
async function typeScriptLibraryGeneratorFn(tree,
|
|
3364
|
-
const
|
|
3365
|
-
...
|
|
3486
|
+
async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
3487
|
+
const normalized = await normalizeOptions(tree, {
|
|
3488
|
+
...options
|
|
3366
3489
|
});
|
|
3367
3490
|
const tasks = [];
|
|
3368
3491
|
tasks.push(await _init2.default.call(void 0, tree, {
|
|
3369
|
-
...
|
|
3370
|
-
tsConfigName:
|
|
3492
|
+
...normalized,
|
|
3493
|
+
tsConfigName: normalized.rootProject ? "tsconfig.json" : "tsconfig.base.json"
|
|
3371
3494
|
}));
|
|
3372
3495
|
tasks.push(_devkit.addDependenciesToPackageJson.call(void 0, tree, {}, {
|
|
3373
3496
|
"@storm-software/workspace-tools": "latest",
|
|
3374
3497
|
"@storm-software/testing-tools": "latest",
|
|
3375
|
-
..._nullishCoalesce(
|
|
3498
|
+
..._nullishCoalesce(options.devDependencies, () => ( {}))
|
|
3376
3499
|
}));
|
|
3377
|
-
if (
|
|
3500
|
+
if (normalized.publishable) {
|
|
3378
3501
|
tasks.push(await _generator2.default.call(void 0, tree, {
|
|
3379
|
-
...
|
|
3502
|
+
...normalized,
|
|
3380
3503
|
skipFormat: true
|
|
3381
3504
|
}));
|
|
3382
3505
|
}
|
|
3383
3506
|
const projectConfig = {
|
|
3384
|
-
root:
|
|
3507
|
+
root: normalized.directory,
|
|
3385
3508
|
projectType: "library",
|
|
3386
|
-
sourceRoot: joinPaths(_nullishCoalesce(
|
|
3509
|
+
sourceRoot: joinPaths(_nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
3387
3510
|
targets: {
|
|
3388
3511
|
build: {
|
|
3389
|
-
executor:
|
|
3512
|
+
executor: options.buildExecutor,
|
|
3390
3513
|
outputs: [
|
|
3391
3514
|
"{options.outputPath}"
|
|
3392
3515
|
],
|
|
3393
3516
|
options: {
|
|
3394
3517
|
entry: [
|
|
3395
|
-
joinPaths(
|
|
3518
|
+
joinPaths(normalized.projectRoot, "src", "index.ts")
|
|
3396
3519
|
],
|
|
3397
|
-
outputPath: getOutputPath(
|
|
3398
|
-
tsconfig: joinPaths(
|
|
3399
|
-
project: joinPaths(
|
|
3520
|
+
outputPath: getOutputPath(normalized),
|
|
3521
|
+
tsconfig: joinPaths(normalized.projectRoot, "tsconfig.json"),
|
|
3522
|
+
project: joinPaths(normalized.projectRoot, "package.json"),
|
|
3400
3523
|
defaultConfiguration: "production",
|
|
3401
3524
|
platform: "neutral",
|
|
3402
3525
|
assets: [
|
|
3403
3526
|
{
|
|
3404
|
-
input:
|
|
3527
|
+
input: normalized.projectRoot,
|
|
3405
3528
|
glob: "*.md",
|
|
3406
3529
|
output: "/"
|
|
3407
3530
|
},
|
|
@@ -3425,19 +3548,19 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
3425
3548
|
}
|
|
3426
3549
|
}
|
|
3427
3550
|
};
|
|
3428
|
-
if (
|
|
3429
|
-
projectConfig.targets.build.options.platform =
|
|
3551
|
+
if (options.platform) {
|
|
3552
|
+
projectConfig.targets.build.options.platform = options.platform === "worker" ? "node" : options.platform;
|
|
3430
3553
|
}
|
|
3431
|
-
addProjectTag(projectConfig, ProjectTagConstants.Platform.TAG_ID,
|
|
3554
|
+
addProjectTag(projectConfig, ProjectTagConstants.Platform.TAG_ID, options.platform === "node" ? ProjectTagConstants.Platform.NODE : options.platform === "worker" ? ProjectTagConstants.Platform.WORKER : options.platform === "browser" ? ProjectTagConstants.Platform.BROWSER : ProjectTagConstants.Platform.NEUTRAL, {
|
|
3432
3555
|
overwrite: false
|
|
3433
3556
|
});
|
|
3434
|
-
createProjectTsConfigJson(tree,
|
|
3435
|
-
_devkit.addProjectConfiguration.call(void 0, tree,
|
|
3557
|
+
createProjectTsConfigJson(tree, normalized);
|
|
3558
|
+
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
3436
3559
|
let repository = {
|
|
3437
3560
|
type: "github",
|
|
3438
3561
|
url: _optionalChain([config, 'optionalAccess', _171 => _171.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _172 => _172.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _173 => _173.namespace]) || _optionalChain([config, 'optionalAccess', _174 => _174.name]) || "repository"}.git`
|
|
3439
3562
|
};
|
|
3440
|
-
let description =
|
|
3563
|
+
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
3441
3564
|
if (tree.exists("package.json")) {
|
|
3442
3565
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
3443
3566
|
if (_optionalChain([packageJson, 'optionalAccess', _175 => _175.repository])) {
|
|
@@ -3447,18 +3570,18 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
3447
3570
|
description = packageJson.description;
|
|
3448
3571
|
}
|
|
3449
3572
|
}
|
|
3450
|
-
if (!
|
|
3451
|
-
|
|
3573
|
+
if (!normalized.importPath) {
|
|
3574
|
+
normalized.importPath = normalized.name;
|
|
3452
3575
|
}
|
|
3453
|
-
const packageJsonPath = joinPaths(
|
|
3576
|
+
const packageJsonPath = joinPaths(normalized.projectRoot, "package.json");
|
|
3454
3577
|
if (tree.exists(packageJsonPath)) {
|
|
3455
3578
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
3456
|
-
if (!
|
|
3457
|
-
|
|
3579
|
+
if (!normalized.importPath) {
|
|
3580
|
+
normalized.importPath = normalized.name;
|
|
3458
3581
|
}
|
|
3459
|
-
json.name =
|
|
3582
|
+
json.name = normalized.importPath;
|
|
3460
3583
|
json.version = "0.0.1";
|
|
3461
|
-
if (json.private && (
|
|
3584
|
+
if (json.private && (normalized.publishable || normalized.rootProject)) {
|
|
3462
3585
|
json.private = void 0;
|
|
3463
3586
|
}
|
|
3464
3587
|
return {
|
|
@@ -3467,7 +3590,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
3467
3590
|
description,
|
|
3468
3591
|
repository: {
|
|
3469
3592
|
...repository,
|
|
3470
|
-
directory:
|
|
3593
|
+
directory: normalized.projectRoot
|
|
3471
3594
|
},
|
|
3472
3595
|
type: "module",
|
|
3473
3596
|
dependencies: {
|
|
@@ -3480,37 +3603,37 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
3480
3603
|
});
|
|
3481
3604
|
} else {
|
|
3482
3605
|
_devkit.writeJson.call(void 0, tree, packageJsonPath, {
|
|
3483
|
-
name:
|
|
3606
|
+
name: normalized.importPath,
|
|
3484
3607
|
version: "0.0.1",
|
|
3485
3608
|
description,
|
|
3486
3609
|
repository: {
|
|
3487
3610
|
...repository,
|
|
3488
|
-
directory:
|
|
3611
|
+
directory: normalized.projectRoot
|
|
3489
3612
|
},
|
|
3490
|
-
private: !
|
|
3613
|
+
private: !normalized.publishable || normalized.rootProject,
|
|
3491
3614
|
type: "module",
|
|
3492
3615
|
publishConfig: {
|
|
3493
3616
|
access: "public"
|
|
3494
3617
|
}
|
|
3495
3618
|
});
|
|
3496
3619
|
}
|
|
3497
|
-
if (tree.exists("package.json") &&
|
|
3620
|
+
if (tree.exists("package.json") && normalized.importPath) {
|
|
3498
3621
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
3499
3622
|
...json,
|
|
3500
3623
|
pnpm: {
|
|
3501
3624
|
..._optionalChain([json, 'optionalAccess', _177 => _177.pnpm]),
|
|
3502
3625
|
overrides: {
|
|
3503
3626
|
..._optionalChain([json, 'optionalAccess', _178 => _178.pnpm, 'optionalAccess', _179 => _179.overrides]),
|
|
3504
|
-
[_nullishCoalesce(
|
|
3627
|
+
[_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
|
|
3505
3628
|
}
|
|
3506
3629
|
}
|
|
3507
3630
|
}));
|
|
3508
3631
|
}
|
|
3509
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
3510
|
-
joinPaths(
|
|
3632
|
+
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
3633
|
+
joinPaths(normalized.projectRoot, "./src", `index.${normalized.js ? "js" : "ts"}`)
|
|
3511
3634
|
]);
|
|
3512
|
-
_js.addTsConfigPath.call(void 0, tree, joinPaths(
|
|
3513
|
-
joinPaths(
|
|
3635
|
+
_js.addTsConfigPath.call(void 0, tree, joinPaths(normalized.importPath, "/*"), [
|
|
3636
|
+
joinPaths(normalized.projectRoot, "./src", "/*")
|
|
3514
3637
|
]);
|
|
3515
3638
|
if (tree.exists("package.json")) {
|
|
3516
3639
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -3521,7 +3644,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
3521
3644
|
description = packageJson.description;
|
|
3522
3645
|
}
|
|
3523
3646
|
}
|
|
3524
|
-
const tsconfigPath = joinPaths(
|
|
3647
|
+
const tsconfigPath = joinPaths(normalized.projectRoot, "tsconfig.json");
|
|
3525
3648
|
if (tree.exists(tsconfigPath)) {
|
|
3526
3649
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
3527
3650
|
json.composite ??= true;
|
|
@@ -3529,10 +3652,10 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
3529
3652
|
});
|
|
3530
3653
|
} else {
|
|
3531
3654
|
_devkit.writeJson.call(void 0, tree, tsconfigPath, {
|
|
3532
|
-
extends: `${_devkit.offsetFromRoot.call(void 0,
|
|
3655
|
+
extends: `${_devkit.offsetFromRoot.call(void 0, normalized.projectRoot)}tsconfig.base.json`,
|
|
3533
3656
|
composite: true,
|
|
3534
3657
|
compilerOptions: {
|
|
3535
|
-
outDir: `${_devkit.offsetFromRoot.call(void 0,
|
|
3658
|
+
outDir: `${_devkit.offsetFromRoot.call(void 0, normalized.projectRoot)}dist/out-tsc`
|
|
3536
3659
|
},
|
|
3537
3660
|
files: [],
|
|
3538
3661
|
include: [
|
|
@@ -3591,9 +3714,13 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
3591
3714
|
_devkit.writeJson.call(void 0, tree, joinPaths(options.projectRoot, "tsconfig.json"), tsconfig);
|
|
3592
3715
|
}
|
|
3593
3716
|
_chunk3GQAWCBQjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
3594
|
-
async function normalizeOptions(tree, options) {
|
|
3717
|
+
async function normalizeOptions(tree, options, config) {
|
|
3718
|
+
let importPath = options.importPath;
|
|
3719
|
+
if (!importPath && _optionalChain([config, 'optionalAccess', _191 => _191.namespace])) {
|
|
3720
|
+
importPath = `@${_optionalChain([config, 'optionalAccess', _192 => _192.namespace])}/${options.name}`;
|
|
3721
|
+
}
|
|
3595
3722
|
if (options.publishable) {
|
|
3596
|
-
if (!
|
|
3723
|
+
if (!importPath) {
|
|
3597
3724
|
throw new Error(`For publishable libs you have to provide a proper "--importPath" which needs to be a valid npm package name (e.g. my-awesome-lib or @myorg/my-lib)`);
|
|
3598
3725
|
}
|
|
3599
3726
|
}
|
|
@@ -3602,14 +3729,14 @@ async function normalizeOptions(tree, options) {
|
|
|
3602
3729
|
bundler = "none";
|
|
3603
3730
|
}
|
|
3604
3731
|
const { Linter } = _devkit.ensurePackage.call(void 0, "@nx/eslint", nxVersion);
|
|
3605
|
-
const
|
|
3732
|
+
const rootProject = false;
|
|
3733
|
+
const { projectName, names: projectNames, projectRoot, importPath: normalizedImportPath } = await _projectnameandrootutils.determineProjectNameAndRootOptions.call(void 0, tree, {
|
|
3606
3734
|
name: options.name,
|
|
3607
3735
|
projectType: "library",
|
|
3608
3736
|
directory: options.directory,
|
|
3609
|
-
importPath
|
|
3610
|
-
rootProject
|
|
3737
|
+
importPath,
|
|
3738
|
+
rootProject
|
|
3611
3739
|
});
|
|
3612
|
-
options.rootProject = projectRoot === ".";
|
|
3613
3740
|
const normalized = _devkit.names.call(void 0, projectNames.projectFileName);
|
|
3614
3741
|
const fileName = normalized.fileName;
|
|
3615
3742
|
return {
|
|
@@ -3635,14 +3762,15 @@ async function normalizeOptions(tree, options) {
|
|
|
3635
3762
|
projectNames,
|
|
3636
3763
|
projectRoot,
|
|
3637
3764
|
parsedTags: options.tags ? options.tags.split(",").map((s) => s.trim()) : [],
|
|
3638
|
-
importPath
|
|
3765
|
+
importPath: normalizedImportPath,
|
|
3766
|
+
rootProject
|
|
3639
3767
|
};
|
|
3640
3768
|
}
|
|
3641
3769
|
_chunk3GQAWCBQjs.__name.call(void 0, normalizeOptions, "normalizeOptions");
|
|
3642
3770
|
|
|
3643
3771
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
3644
3772
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
3645
|
-
const filesDir =
|
|
3773
|
+
const filesDir = joinPaths(__dirname, "src", "generators", "browser-library", "files");
|
|
3646
3774
|
const tsLibraryGeneratorOptions = {
|
|
3647
3775
|
buildExecutor: "@storm-software/workspace-tools:unbuild",
|
|
3648
3776
|
platform: "browser",
|
|
@@ -3720,7 +3848,7 @@ async function configSchemaGeneratorFn(tree, options, config) {
|
|
|
3720
3848
|
name: "StormWorkspaceConfiguration"
|
|
3721
3849
|
});
|
|
3722
3850
|
writeTrace(jsonSchema, config);
|
|
3723
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
3851
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _193 => _193.workspaceRoot]), () => ( findWorkspaceRoot())), _optionalChain([options, 'access', _194 => _194.outputFile, 'optionalAccess', _195 => _195.startsWith, 'call', _196 => _196("./")]) ? "" : "./");
|
|
3724
3852
|
writeTrace(`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
3725
3853
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
3726
3854
|
spaces: 2
|
|
@@ -3744,7 +3872,7 @@ var generator_default2 = withRunGenerator("Configuration Schema Creator", config
|
|
|
3744
3872
|
// ../workspace-tools/src/generators/neutral-library/generator.ts
|
|
3745
3873
|
|
|
3746
3874
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
3747
|
-
const filesDir =
|
|
3875
|
+
const filesDir = joinPaths(__dirname, "src", "generators", "neutral-library", "files");
|
|
3748
3876
|
const tsLibraryGeneratorOptions = {
|
|
3749
3877
|
...schema,
|
|
3750
3878
|
platform: "neutral",
|
|
@@ -3787,7 +3915,7 @@ var generator_default3 = withRunGenerator("TypeScript Library Creator (Neutral P
|
|
|
3787
3915
|
// ../workspace-tools/src/generators/node-library/generator.ts
|
|
3788
3916
|
|
|
3789
3917
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
3790
|
-
const filesDir =
|
|
3918
|
+
const filesDir = joinPaths(__dirname, "src", "generators", "node-library", "files");
|
|
3791
3919
|
const tsLibraryGeneratorOptions = {
|
|
3792
3920
|
platform: "node",
|
|
3793
3921
|
devDependencies: {
|
|
@@ -4417,37 +4545,17 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
4417
4545
|
enum: [
|
|
4418
4546
|
"neutral",
|
|
4419
4547
|
"node",
|
|
4548
|
+
"worker",
|
|
4420
4549
|
"browser"
|
|
4421
4550
|
]
|
|
4422
4551
|
},
|
|
4423
4552
|
$default: "neutral"
|
|
4424
4553
|
},
|
|
4425
|
-
|
|
4426
|
-
$schema: {
|
|
4427
|
-
title: "Dev Dependencies",
|
|
4428
|
-
type: "object",
|
|
4429
|
-
description: "The dev dependencies to install"
|
|
4430
|
-
}
|
|
4431
|
-
},
|
|
4432
|
-
dependencies: {
|
|
4433
|
-
$schema: {
|
|
4434
|
-
title: "Dependencies",
|
|
4435
|
-
type: "object",
|
|
4436
|
-
description: "The dependencies to install"
|
|
4437
|
-
}
|
|
4438
|
-
},
|
|
4439
|
-
peerDependencies: {
|
|
4440
|
-
$schema: {
|
|
4441
|
-
title: "Peer Dependencies",
|
|
4442
|
-
type: "object",
|
|
4443
|
-
description: "The peer dependencies to install"
|
|
4444
|
-
}
|
|
4445
|
-
},
|
|
4446
|
-
peerDependenciesMeta: {
|
|
4554
|
+
importPath: {
|
|
4447
4555
|
$schema: {
|
|
4448
|
-
title: "
|
|
4449
|
-
type: "
|
|
4450
|
-
description: "The
|
|
4556
|
+
title: "Import Path",
|
|
4557
|
+
type: "string",
|
|
4558
|
+
description: "The import path for the library"
|
|
4451
4559
|
}
|
|
4452
4560
|
},
|
|
4453
4561
|
tags: {
|
|
@@ -4457,41 +4565,6 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
4457
4565
|
description: "The tags for the library"
|
|
4458
4566
|
}
|
|
4459
4567
|
},
|
|
4460
|
-
tsconfigOptions: {
|
|
4461
|
-
$schema: {
|
|
4462
|
-
title: "TypeScript Config (tsconfig.json) Options",
|
|
4463
|
-
type: "object",
|
|
4464
|
-
description: "The TypeScript configuration options"
|
|
4465
|
-
}
|
|
4466
|
-
},
|
|
4467
|
-
skipFormat: {
|
|
4468
|
-
$schema: {
|
|
4469
|
-
title: "Skip Format",
|
|
4470
|
-
type: "boolean",
|
|
4471
|
-
description: "Skip formatting"
|
|
4472
|
-
}
|
|
4473
|
-
},
|
|
4474
|
-
skipTsConfig: {
|
|
4475
|
-
$schema: {
|
|
4476
|
-
title: "Skip TsConfig",
|
|
4477
|
-
type: "boolean",
|
|
4478
|
-
description: "Skip TypeScript configuration"
|
|
4479
|
-
}
|
|
4480
|
-
},
|
|
4481
|
-
skipPackageJson: {
|
|
4482
|
-
$schema: {
|
|
4483
|
-
title: "Skip Package Json",
|
|
4484
|
-
type: "boolean",
|
|
4485
|
-
description: "Skip package.json"
|
|
4486
|
-
}
|
|
4487
|
-
},
|
|
4488
|
-
includeBabelRc: {
|
|
4489
|
-
$schema: {
|
|
4490
|
-
title: "Include Babel Rc",
|
|
4491
|
-
type: "boolean",
|
|
4492
|
-
description: "Include Babel configuration"
|
|
4493
|
-
}
|
|
4494
|
-
},
|
|
4495
4568
|
unitTestRunner: {
|
|
4496
4569
|
$schema: {
|
|
4497
4570
|
title: "Unit Test Runner",
|
|
@@ -4504,13 +4577,6 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
4504
4577
|
description: "The unit test runner to use"
|
|
4505
4578
|
}
|
|
4506
4579
|
},
|
|
4507
|
-
linter: {
|
|
4508
|
-
$schema: {
|
|
4509
|
-
title: "Linter",
|
|
4510
|
-
type: "string",
|
|
4511
|
-
description: "The linter to use"
|
|
4512
|
-
}
|
|
4513
|
-
},
|
|
4514
4580
|
testEnvironment: {
|
|
4515
4581
|
$schema: {
|
|
4516
4582
|
title: "Test Environment",
|
|
@@ -4522,136 +4588,37 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
4522
4588
|
description: "The test environment to use"
|
|
4523
4589
|
}
|
|
4524
4590
|
},
|
|
4525
|
-
importPath: {
|
|
4526
|
-
$schema: {
|
|
4527
|
-
title: "Import Path",
|
|
4528
|
-
type: "string",
|
|
4529
|
-
description: "The import path for the library"
|
|
4530
|
-
}
|
|
4531
|
-
},
|
|
4532
|
-
js: {
|
|
4533
|
-
$schema: {
|
|
4534
|
-
title: "JavaScript",
|
|
4535
|
-
type: "boolean",
|
|
4536
|
-
description: "Use JavaScript instead of TypeScript"
|
|
4537
|
-
}
|
|
4538
|
-
},
|
|
4539
4591
|
pascalCaseFiles: {
|
|
4540
4592
|
$schema: {
|
|
4541
4593
|
title: "Pascal Case Files",
|
|
4542
4594
|
type: "boolean",
|
|
4543
4595
|
description: "Use PascalCase for file names"
|
|
4544
|
-
}
|
|
4596
|
+
},
|
|
4597
|
+
$default: false
|
|
4545
4598
|
},
|
|
4546
4599
|
strict: {
|
|
4547
4600
|
$schema: {
|
|
4548
4601
|
title: "Strict",
|
|
4549
4602
|
type: "boolean",
|
|
4550
4603
|
description: "Enable strict mode"
|
|
4551
|
-
}
|
|
4604
|
+
},
|
|
4605
|
+
$default: true
|
|
4552
4606
|
},
|
|
4553
4607
|
publishable: {
|
|
4554
4608
|
$schema: {
|
|
4555
4609
|
title: "Publishable",
|
|
4556
4610
|
type: "boolean",
|
|
4557
4611
|
description: "Make the library publishable"
|
|
4558
|
-
}
|
|
4612
|
+
},
|
|
4613
|
+
$default: false
|
|
4559
4614
|
},
|
|
4560
4615
|
buildable: {
|
|
4561
4616
|
$schema: {
|
|
4562
4617
|
title: "Buildable",
|
|
4563
4618
|
type: "boolean",
|
|
4564
4619
|
description: "Make the library buildable"
|
|
4565
|
-
}
|
|
4566
|
-
|
|
4567
|
-
setParserOptionsProject: {
|
|
4568
|
-
$schema: {
|
|
4569
|
-
title: "Set Parser Options Project",
|
|
4570
|
-
type: "boolean",
|
|
4571
|
-
description: "Set parser options project"
|
|
4572
|
-
}
|
|
4573
|
-
},
|
|
4574
|
-
config: {
|
|
4575
|
-
$schema: {
|
|
4576
|
-
title: "Config",
|
|
4577
|
-
type: "string",
|
|
4578
|
-
enum: [
|
|
4579
|
-
"workspace",
|
|
4580
|
-
"project",
|
|
4581
|
-
"npm-scripts"
|
|
4582
|
-
],
|
|
4583
|
-
description: "The configuration type"
|
|
4584
|
-
}
|
|
4585
|
-
},
|
|
4586
|
-
compiler: {
|
|
4587
|
-
$schema: {
|
|
4588
|
-
title: "Compiler",
|
|
4589
|
-
type: "string",
|
|
4590
|
-
description: "The compiler to use"
|
|
4591
|
-
}
|
|
4592
|
-
},
|
|
4593
|
-
bundler: {
|
|
4594
|
-
$schema: {
|
|
4595
|
-
title: "Bundler",
|
|
4596
|
-
type: "string",
|
|
4597
|
-
description: "The bundler to use"
|
|
4598
|
-
}
|
|
4599
|
-
},
|
|
4600
|
-
skipTypeCheck: {
|
|
4601
|
-
$schema: {
|
|
4602
|
-
title: "Skip Type Check",
|
|
4603
|
-
type: "boolean",
|
|
4604
|
-
description: "Skip type checking"
|
|
4605
|
-
}
|
|
4606
|
-
},
|
|
4607
|
-
minimal: {
|
|
4608
|
-
$schema: {
|
|
4609
|
-
title: "Minimal",
|
|
4610
|
-
type: "boolean",
|
|
4611
|
-
description: "Create a minimal library"
|
|
4612
|
-
}
|
|
4613
|
-
},
|
|
4614
|
-
rootProject: {
|
|
4615
|
-
$schema: {
|
|
4616
|
-
title: "Root Project",
|
|
4617
|
-
type: "boolean",
|
|
4618
|
-
description: "Create a root project"
|
|
4619
|
-
}
|
|
4620
|
-
},
|
|
4621
|
-
simpleName: {
|
|
4622
|
-
$schema: {
|
|
4623
|
-
title: "Simple Name",
|
|
4624
|
-
type: "boolean",
|
|
4625
|
-
description: "Use a simple name for the library"
|
|
4626
|
-
}
|
|
4627
|
-
},
|
|
4628
|
-
addPlugin: {
|
|
4629
|
-
$schema: {
|
|
4630
|
-
title: "Add Plugin",
|
|
4631
|
-
type: "boolean",
|
|
4632
|
-
description: "Add a plugin to the library"
|
|
4633
|
-
}
|
|
4634
|
-
},
|
|
4635
|
-
useProjectJson: {
|
|
4636
|
-
$schema: {
|
|
4637
|
-
title: "Use Project Json",
|
|
4638
|
-
type: "boolean",
|
|
4639
|
-
description: "Use project.json"
|
|
4640
|
-
}
|
|
4641
|
-
},
|
|
4642
|
-
skipWorkspacesWarning: {
|
|
4643
|
-
$schema: {
|
|
4644
|
-
title: "Skip Workspaces Warning",
|
|
4645
|
-
type: "boolean",
|
|
4646
|
-
description: "Skip workspaces warning"
|
|
4647
|
-
}
|
|
4648
|
-
},
|
|
4649
|
-
useTscExecutor: {
|
|
4650
|
-
$schema: {
|
|
4651
|
-
title: "Use Tsc Executor",
|
|
4652
|
-
type: "boolean",
|
|
4653
|
-
description: "Use TSC executor"
|
|
4654
|
-
}
|
|
4620
|
+
},
|
|
4621
|
+
$default: true
|
|
4655
4622
|
}
|
|
4656
4623
|
});
|
|
4657
4624
|
|
|
@@ -4664,21 +4631,27 @@ var _retrieveworkspacefiles = require('nx/src/project-graph/utils/retrieve-works
|
|
|
4664
4631
|
// ../workspace-tools/src/utils/lock-file.ts
|
|
4665
4632
|
|
|
4666
4633
|
|
|
4667
|
-
|
|
4634
|
+
|
|
4668
4635
|
var _npmparser = require('nx/src/plugins/js/lock-file/npm-parser');
|
|
4669
4636
|
var _pnpmparser = require('nx/src/plugins/js/lock-file/pnpm-parser');
|
|
4670
4637
|
var _yarnparser = require('nx/src/plugins/js/lock-file/yarn-parser');
|
|
4671
4638
|
var YARN_LOCK_FILE = "yarn.lock";
|
|
4672
4639
|
var NPM_LOCK_FILE = "package-lock.json";
|
|
4673
4640
|
var PNPM_LOCK_FILE = "pnpm-lock.yaml";
|
|
4674
|
-
var YARN_LOCK_PATH = _path.join.call(void 0,
|
|
4675
|
-
var NPM_LOCK_PATH = _path.join.call(void 0,
|
|
4676
|
-
var PNPM_LOCK_PATH = _path.join.call(void 0,
|
|
4641
|
+
var YARN_LOCK_PATH = _path.join.call(void 0, _devkit.workspaceRoot, YARN_LOCK_FILE);
|
|
4642
|
+
var NPM_LOCK_PATH = _path.join.call(void 0, _devkit.workspaceRoot, NPM_LOCK_FILE);
|
|
4643
|
+
var PNPM_LOCK_PATH = _path.join.call(void 0, _devkit.workspaceRoot, PNPM_LOCK_FILE);
|
|
4677
4644
|
|
|
4678
4645
|
// ../workspace-tools/src/utils/package-helpers.ts
|
|
4679
4646
|
|
|
4680
4647
|
|
|
4681
4648
|
|
|
4649
|
+
// ../workspace-tools/src/utils/plugin-helpers.ts
|
|
4650
|
+
|
|
4651
|
+
|
|
4652
|
+
|
|
4653
|
+
|
|
4654
|
+
|
|
4682
4655
|
// ../workspace-tools/src/utils/typia-transform.ts
|
|
4683
4656
|
var _transform = require('typia/lib/transform'); var _transform2 = _interopRequireDefault(_transform);
|
|
4684
4657
|
|