@storm-software/workspace-tools 1.26.1 → 1.28.0
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 +14 -0
- package/index.js +167 -111
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +113 -57
- package/src/executors/tsup/get-config.js +18427 -627
- package/src/executors/tsup/schema.json +1 -1
- package/src/executors/tsup-neutral/executor.js +113 -57
- package/src/executors/tsup-node/executor.js +113 -57
package/index.js
CHANGED
|
@@ -12458,12 +12458,12 @@ var require_install_packages_task = __commonJS({
|
|
|
12458
12458
|
var child_process_1 = require("child_process");
|
|
12459
12459
|
var path_1 = require("path");
|
|
12460
12460
|
var nx_1 = require_nx();
|
|
12461
|
-
var { detectPackageManager, getPackageManagerCommand, joinPathFragments:
|
|
12461
|
+
var { detectPackageManager, getPackageManagerCommand, joinPathFragments: joinPathFragments6 } = (0, nx_1.requireNx)();
|
|
12462
12462
|
function installPackagesTask(tree, alwaysRun = false, cwd = "", packageManager = detectPackageManager(cwd)) {
|
|
12463
|
-
if (!tree.listChanges().find((f) => f.path ===
|
|
12463
|
+
if (!tree.listChanges().find((f) => f.path === joinPathFragments6(cwd, "package.json")) && !alwaysRun) {
|
|
12464
12464
|
return;
|
|
12465
12465
|
}
|
|
12466
|
-
const packageJsonValue = tree.read(
|
|
12466
|
+
const packageJsonValue = tree.read(joinPathFragments6(cwd, "package.json"), "utf-8");
|
|
12467
12467
|
let storedPackageJsonValue = global["__packageJsonInstallCache__"];
|
|
12468
12468
|
if (storedPackageJsonValue != packageJsonValue || alwaysRun) {
|
|
12469
12469
|
global["__packageJsonInstallCache__"] = packageJsonValue;
|
|
@@ -41784,7 +41784,7 @@ var require_project_name_and_root_utils = __commonJS({
|
|
|
41784
41784
|
var nx_1 = require_nx();
|
|
41785
41785
|
var get_workspace_layout_1 = require_get_workspace_layout();
|
|
41786
41786
|
var names_1 = require_names();
|
|
41787
|
-
var { joinPathFragments:
|
|
41787
|
+
var { joinPathFragments: joinPathFragments6, normalizePath, logger, readJson: readJson2, stripIndents, workspaceRoot } = (0, nx_1.requireNx)();
|
|
41788
41788
|
var deprecationWarning = stripIndents`
|
|
41789
41789
|
In Nx 18, generating projects will no longer derive the name and root.
|
|
41790
41790
|
Please provide the exact project name and root in the future.`;
|
|
@@ -41860,14 +41860,14 @@ var require_project_name_and_root_utils = __commonJS({
|
|
|
41860
41860
|
if (directory === relativeCwd || directory.startsWith(`${relativeCwd}/`)) {
|
|
41861
41861
|
asProvidedProjectDirectory = directory;
|
|
41862
41862
|
} else {
|
|
41863
|
-
asProvidedProjectDirectory =
|
|
41863
|
+
asProvidedProjectDirectory = joinPathFragments6(relativeCwd, directory);
|
|
41864
41864
|
}
|
|
41865
41865
|
} else if (options.rootProject) {
|
|
41866
41866
|
asProvidedProjectDirectory = ".";
|
|
41867
41867
|
} else {
|
|
41868
41868
|
asProvidedProjectDirectory = relativeCwd;
|
|
41869
41869
|
if (!relativeCwd.endsWith(asProvidedProjectName) && !relativeCwd.endsWith(options.name)) {
|
|
41870
|
-
asProvidedProjectDirectory =
|
|
41870
|
+
asProvidedProjectDirectory = joinPathFragments6(relativeCwd, asProvidedProjectName);
|
|
41871
41871
|
}
|
|
41872
41872
|
}
|
|
41873
41873
|
if (asProvidedProjectName.startsWith("@")) {
|
|
@@ -41900,7 +41900,7 @@ var require_project_name_and_root_utils = __commonJS({
|
|
|
41900
41900
|
const derivedSimpleProjectName = name;
|
|
41901
41901
|
let derivedProjectDirectory = derivedProjectDirectoryWithoutLayout;
|
|
41902
41902
|
if (derivedProjectDirectoryWithoutLayout !== ".") {
|
|
41903
|
-
derivedProjectDirectory =
|
|
41903
|
+
derivedProjectDirectory = joinPathFragments6(layoutDirectory, derivedProjectDirectory);
|
|
41904
41904
|
}
|
|
41905
41905
|
let derivedImportPath;
|
|
41906
41906
|
if (options.projectType === "library") {
|
|
@@ -49563,7 +49563,7 @@ var require_dist2 = __commonJS({
|
|
|
49563
49563
|
loadTsConfig: () => loadTsConfig2
|
|
49564
49564
|
});
|
|
49565
49565
|
module2.exports = __toCommonJS2(src_exports);
|
|
49566
|
-
var
|
|
49566
|
+
var import_path5 = __toESM2(require("path"), 1);
|
|
49567
49567
|
var import_fs5 = __toESM2(require("fs"), 1);
|
|
49568
49568
|
var singleComment = Symbol("singleComment");
|
|
49569
49569
|
var multiComment = Symbol("multiComment");
|
|
@@ -49659,10 +49659,10 @@ var require_dist2 = __commonJS({
|
|
|
49659
49659
|
}
|
|
49660
49660
|
}
|
|
49661
49661
|
var req = false ? createRequire(import_meta.url) : require;
|
|
49662
|
-
var findUp = (name, startDir, stopDir =
|
|
49662
|
+
var findUp = (name, startDir, stopDir = import_path5.default.parse(startDir).root) => {
|
|
49663
49663
|
let dir = startDir;
|
|
49664
49664
|
while (dir !== stopDir) {
|
|
49665
|
-
const file =
|
|
49665
|
+
const file = import_path5.default.join(dir, name);
|
|
49666
49666
|
if (import_fs5.default.existsSync(file))
|
|
49667
49667
|
return file;
|
|
49668
49668
|
if (!file.endsWith(".json")) {
|
|
@@ -49670,17 +49670,17 @@ var require_dist2 = __commonJS({
|
|
|
49670
49670
|
if (import_fs5.default.existsSync(fileWithExt))
|
|
49671
49671
|
return fileWithExt;
|
|
49672
49672
|
}
|
|
49673
|
-
dir =
|
|
49673
|
+
dir = import_path5.default.dirname(dir);
|
|
49674
49674
|
}
|
|
49675
49675
|
return null;
|
|
49676
49676
|
};
|
|
49677
49677
|
var resolveTsConfigFromFile = (cwd, filename) => {
|
|
49678
|
-
if (
|
|
49678
|
+
if (import_path5.default.isAbsolute(filename))
|
|
49679
49679
|
return import_fs5.default.existsSync(filename) ? filename : null;
|
|
49680
49680
|
return findUp(filename, cwd);
|
|
49681
49681
|
};
|
|
49682
49682
|
var resolveTsConfigFromExtends = (cwd, name) => {
|
|
49683
|
-
if (
|
|
49683
|
+
if (import_path5.default.isAbsolute(name))
|
|
49684
49684
|
return import_fs5.default.existsSync(name) ? name : null;
|
|
49685
49685
|
if (name.startsWith("."))
|
|
49686
49686
|
return findUp(name, cwd);
|
|
@@ -49689,14 +49689,14 @@ var require_dist2 = __commonJS({
|
|
|
49689
49689
|
};
|
|
49690
49690
|
var loadTsConfigInternal = (dir = process.cwd(), name = "tsconfig.json", isExtends = false) => {
|
|
49691
49691
|
var _a, _b;
|
|
49692
|
-
dir =
|
|
49692
|
+
dir = import_path5.default.resolve(dir);
|
|
49693
49693
|
const id = isExtends ? resolveTsConfigFromExtends(dir, name) : resolveTsConfigFromFile(dir, name);
|
|
49694
49694
|
if (!id)
|
|
49695
49695
|
return null;
|
|
49696
49696
|
const data = jsoncParse(import_fs5.default.readFileSync(id, "utf-8"));
|
|
49697
|
-
const configDir =
|
|
49697
|
+
const configDir = import_path5.default.dirname(id);
|
|
49698
49698
|
if ((_a = data.compilerOptions) == null ? void 0 : _a.baseUrl) {
|
|
49699
|
-
data.compilerOptions.baseUrl =
|
|
49699
|
+
data.compilerOptions.baseUrl = import_path5.default.join(
|
|
49700
49700
|
configDir,
|
|
49701
49701
|
data.compilerOptions.baseUrl
|
|
49702
49702
|
);
|
|
@@ -49779,11 +49779,11 @@ var require_dist3 = __commonJS({
|
|
|
49779
49779
|
var import_esbuild = require("esbuild");
|
|
49780
49780
|
var import_load_tsconfig = require_dist2();
|
|
49781
49781
|
var import_fs5 = __toESM2(require("fs"), 1);
|
|
49782
|
-
var
|
|
49782
|
+
var import_path5 = __toESM2(require("path"), 1);
|
|
49783
49783
|
var getPkgType = () => {
|
|
49784
49784
|
try {
|
|
49785
49785
|
const pkg = JSON.parse(
|
|
49786
|
-
import_fs5.default.readFileSync(
|
|
49786
|
+
import_fs5.default.readFileSync(import_path5.default.resolve("package.json"), "utf-8")
|
|
49787
49787
|
);
|
|
49788
49788
|
return pkg.type;
|
|
49789
49789
|
} catch (error) {
|
|
@@ -49792,7 +49792,7 @@ var require_dist3 = __commonJS({
|
|
|
49792
49792
|
function guessFormat(inputFile) {
|
|
49793
49793
|
if (!usingDynamicImport)
|
|
49794
49794
|
return "cjs";
|
|
49795
|
-
const ext2 =
|
|
49795
|
+
const ext2 = import_path5.default.extname(inputFile);
|
|
49796
49796
|
const type = getPkgType();
|
|
49797
49797
|
if (ext2 === ".js") {
|
|
49798
49798
|
return type === "module" ? "esm" : "cjs";
|
|
@@ -75530,7 +75530,7 @@ var require_util6 = __commonJS({
|
|
|
75530
75530
|
var normalize2 = createSafeHandler((url) => {
|
|
75531
75531
|
});
|
|
75532
75532
|
exports.normalize = normalize2;
|
|
75533
|
-
function
|
|
75533
|
+
function join7(aRoot, aPath) {
|
|
75534
75534
|
const pathType = getURLType(aPath);
|
|
75535
75535
|
const rootType = getURLType(aRoot);
|
|
75536
75536
|
aRoot = ensureDirectory(aRoot);
|
|
@@ -75556,7 +75556,7 @@ var require_util6 = __commonJS({
|
|
|
75556
75556
|
const newPath = withBase(aPath, withBase(aRoot, base));
|
|
75557
75557
|
return computeRelativeURL(base, newPath);
|
|
75558
75558
|
}
|
|
75559
|
-
exports.join =
|
|
75559
|
+
exports.join = join7;
|
|
75560
75560
|
function relative(rootURL, targetURL) {
|
|
75561
75561
|
const result = relativeIfPossible(rootURL, targetURL);
|
|
75562
75562
|
return typeof result === "string" ? result : normalize2(targetURL);
|
|
@@ -75586,9 +75586,9 @@ var require_util6 = __commonJS({
|
|
|
75586
75586
|
}
|
|
75587
75587
|
let url = normalize2(sourceURL || "");
|
|
75588
75588
|
if (sourceRoot)
|
|
75589
|
-
url =
|
|
75589
|
+
url = join7(sourceRoot, url);
|
|
75590
75590
|
if (sourceMapURL)
|
|
75591
|
-
url =
|
|
75591
|
+
url = join7(trimFilename(sourceMapURL), url);
|
|
75592
75592
|
return url;
|
|
75593
75593
|
}
|
|
75594
75594
|
exports.computeSourceURL = computeSourceURL;
|
|
@@ -77354,7 +77354,7 @@ var require_source_map = __commonJS({
|
|
|
77354
77354
|
var require_native = __commonJS({
|
|
77355
77355
|
"node_modules/.pnpm/rollup@4.5.0/node_modules/rollup/dist/native.js"(exports, module2) {
|
|
77356
77356
|
var { existsSync: existsSync5 } = require("node:fs");
|
|
77357
|
-
var { join:
|
|
77357
|
+
var { join: join7 } = require("node:path");
|
|
77358
77358
|
var { platform, arch, report } = require("node:process");
|
|
77359
77359
|
var isMusl = () => !report.getReport().header.glibcVersionRuntime;
|
|
77360
77360
|
var bindingsByPlatformAndArch = {
|
|
@@ -77404,7 +77404,7 @@ If this is important to you, please consider supporting Rollup to make a native
|
|
|
77404
77404
|
return imported.base;
|
|
77405
77405
|
}
|
|
77406
77406
|
var localName = `./rollup.${packageBase}.node`;
|
|
77407
|
-
var { parse, parseAsync, xxhashBase64Url } = existsSync5(
|
|
77407
|
+
var { parse, parseAsync, xxhashBase64Url } = existsSync5(join7(__dirname, localName)) ? require(localName) : require(`@rollup/rollup-${packageBase}`);
|
|
77408
77408
|
module2.exports.parse = parse;
|
|
77409
77409
|
module2.exports.parseAsync = parseAsync;
|
|
77410
77410
|
module2.exports.xxhashBase64Url = xxhashBase64Url;
|
|
@@ -110927,7 +110927,7 @@ ${commentStart} ----------------------------------------------------------------
|
|
|
110927
110927
|
|
|
110928
110928
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
110929
110929
|
var import_esbuild_decorators = __toESM(require_src());
|
|
110930
|
-
var
|
|
110930
|
+
var import_devkit2 = __toESM(require_devkit());
|
|
110931
110931
|
var import_get_extra_dependencies = __toESM(require_get_extra_dependencies());
|
|
110932
110932
|
var import_js = __toESM(require_src2());
|
|
110933
110933
|
var import_normalize_options = __toESM(require_normalize_options());
|
|
@@ -117156,7 +117156,7 @@ glob.glob = glob;
|
|
|
117156
117156
|
|
|
117157
117157
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
117158
117158
|
var import_fileutils = require("nx/src/utils/fileutils");
|
|
117159
|
-
var
|
|
117159
|
+
var import_path3 = require("path");
|
|
117160
117160
|
var import_prettier = require("prettier");
|
|
117161
117161
|
var import_tsup2 = __toESM(require_dist6());
|
|
117162
117162
|
var ts = __toESM(require("typescript"));
|
|
@@ -117173,7 +117173,7 @@ function findFileName(filePath) {
|
|
|
117173
117173
|
}
|
|
117174
117174
|
|
|
117175
117175
|
// packages/workspace-tools/src/executors/tsup/get-config.ts
|
|
117176
|
-
var
|
|
117176
|
+
var import_devkit = __toESM(require_devkit());
|
|
117177
117177
|
var import_tsup = __toESM(require_dist6());
|
|
117178
117178
|
function modernConfig({
|
|
117179
117179
|
entry,
|
|
@@ -117198,7 +117198,7 @@ function modernConfig({
|
|
|
117198
117198
|
generatePackageJson,
|
|
117199
117199
|
dtsTsConfig
|
|
117200
117200
|
}) {
|
|
117201
|
-
let outputPath = (0,
|
|
117201
|
+
let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist", "modern");
|
|
117202
117202
|
return {
|
|
117203
117203
|
name: "modern",
|
|
117204
117204
|
entry,
|
|
@@ -117277,7 +117277,7 @@ function legacyConfig({
|
|
|
117277
117277
|
generatePackageJson,
|
|
117278
117278
|
dtsTsConfig
|
|
117279
117279
|
}) {
|
|
117280
|
-
let outputPath = (0,
|
|
117280
|
+
let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist", "legacy");
|
|
117281
117281
|
return {
|
|
117282
117282
|
name: "legacy",
|
|
117283
117283
|
entry,
|
|
@@ -117343,14 +117343,14 @@ function workerConfig({
|
|
|
117343
117343
|
apiReport = true,
|
|
117344
117344
|
docModel = true,
|
|
117345
117345
|
tsdocMetadata = true,
|
|
117346
|
-
shims =
|
|
117346
|
+
shims = true,
|
|
117347
117347
|
define: define2,
|
|
117348
117348
|
env: env2,
|
|
117349
117349
|
plugins,
|
|
117350
117350
|
generatePackageJson,
|
|
117351
117351
|
dtsTsConfig
|
|
117352
117352
|
}) {
|
|
117353
|
-
let outputPath = (0,
|
|
117353
|
+
let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist");
|
|
117354
117354
|
return {
|
|
117355
117355
|
name: "worker",
|
|
117356
117356
|
entry,
|
|
@@ -117385,13 +117385,13 @@ function workerConfig({
|
|
|
117385
117385
|
}
|
|
117386
117386
|
}
|
|
117387
117387
|
},
|
|
117388
|
-
|
|
117388
|
+
minify: debug ? false : "terser",
|
|
117389
117389
|
terserOptions: {
|
|
117390
117390
|
compress: true,
|
|
117391
117391
|
ecma: 2020,
|
|
117392
117392
|
keep_classnames: true,
|
|
117393
117393
|
keep_fnames: true
|
|
117394
|
-
}
|
|
117394
|
+
},
|
|
117395
117395
|
apiReport,
|
|
117396
117396
|
docModel,
|
|
117397
117397
|
tsdocMetadata,
|
|
@@ -117411,20 +117411,32 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
117411
117411
|
}) {
|
|
117412
117412
|
const entry = globSync(
|
|
117413
117413
|
[
|
|
117414
|
-
rest.entry ? rest.entry : (0,
|
|
117414
|
+
rest.entry ? rest.entry : (0, import_devkit.joinPathFragments)(
|
|
117415
|
+
sourceRoot.includes(workspaceRoot) ? sourceRoot : (0, import_devkit.joinPathFragments)(workspaceRoot, sourceRoot),
|
|
117416
|
+
"**/*.{ts,tsx}"
|
|
117417
|
+
),
|
|
117415
117418
|
...additionalEntryPoints ?? []
|
|
117416
117419
|
],
|
|
117417
117420
|
{
|
|
117418
117421
|
withFileTypes: true
|
|
117419
117422
|
}
|
|
117420
117423
|
).reduce((ret, filePath) => {
|
|
117421
|
-
let propertyKey = (0,
|
|
117424
|
+
let propertyKey = (0, import_devkit.joinPathFragments)(
|
|
117425
|
+
filePath.path,
|
|
117426
|
+
removeExtension(filePath.name)
|
|
117427
|
+
).replaceAll(workspaceRoot, "").replaceAll("\\", "/").replaceAll(sourceRoot, "").replaceAll(projectRoot, "");
|
|
117422
117428
|
if (propertyKey) {
|
|
117423
117429
|
while (propertyKey.startsWith("/")) {
|
|
117424
117430
|
propertyKey = propertyKey.substring(1);
|
|
117425
117431
|
}
|
|
117432
|
+
console.debug(
|
|
117433
|
+
`Trying to add entry point ${propertyKey} at "${(0, import_devkit.joinPathFragments)(
|
|
117434
|
+
filePath.path,
|
|
117435
|
+
filePath.name
|
|
117436
|
+
)}"`
|
|
117437
|
+
);
|
|
117426
117438
|
if (!(propertyKey in ret)) {
|
|
117427
|
-
ret[propertyKey] = (0,
|
|
117439
|
+
ret[propertyKey] = (0, import_devkit.joinPathFragments)(filePath.path, filePath.name);
|
|
117428
117440
|
}
|
|
117429
117441
|
}
|
|
117430
117442
|
return ret;
|
|
@@ -117519,8 +117531,8 @@ ${Object.keys(options).map(
|
|
|
117519
117531
|
if (!result.success) {
|
|
117520
117532
|
throw new Error("The Build process failed trying to copy assets");
|
|
117521
117533
|
}
|
|
117522
|
-
const workspacePackageJson = (0,
|
|
117523
|
-
(0,
|
|
117534
|
+
const workspacePackageJson = (0, import_devkit2.readJsonFile)(
|
|
117535
|
+
(0, import_path3.join)(workspaceRoot, "package.json")
|
|
117524
117536
|
);
|
|
117525
117537
|
options.external = options.external || [];
|
|
117526
117538
|
if (workspacePackageJson?.dependencies) {
|
|
@@ -117534,6 +117546,27 @@ ${Object.keys(options).map(
|
|
|
117534
117546
|
options.external
|
|
117535
117547
|
);
|
|
117536
117548
|
}
|
|
117549
|
+
const implicitDependencies = context.projectsConfigurations.projects[context.projectName].implicitDependencies;
|
|
117550
|
+
if (implicitDependencies && implicitDependencies.length > 0) {
|
|
117551
|
+
options.external = implicitDependencies.reduce(
|
|
117552
|
+
(ret, key) => {
|
|
117553
|
+
if (context.projectsConfigurations.projects[key].root) {
|
|
117554
|
+
const packageJson = (0, import_devkit2.readJsonFile)(
|
|
117555
|
+
(0, import_path3.join)(
|
|
117556
|
+
context.root,
|
|
117557
|
+
context.projectsConfigurations.projects[key].root,
|
|
117558
|
+
"package.json"
|
|
117559
|
+
)
|
|
117560
|
+
);
|
|
117561
|
+
if (packageJson.name && !options.external.includes(packageJson.name)) {
|
|
117562
|
+
ret.push(packageJson.name);
|
|
117563
|
+
}
|
|
117564
|
+
}
|
|
117565
|
+
return ret;
|
|
117566
|
+
},
|
|
117567
|
+
options.external
|
|
117568
|
+
);
|
|
117569
|
+
}
|
|
117537
117570
|
const externalDependencies = options.external.reduce((acc, name) => {
|
|
117538
117571
|
const externalNode = context.projectGraph.externalNodes[`npm:${name}`];
|
|
117539
117572
|
if (externalNode) {
|
|
@@ -117585,9 +117618,9 @@ ${externalDependencies.map((dep) => {
|
|
|
117585
117618
|
endOfLine: "lf"
|
|
117586
117619
|
};
|
|
117587
117620
|
if (options.generatePackageJson !== false) {
|
|
117588
|
-
const projectGraph = (0,
|
|
117589
|
-
const pathToPackageJson = (0,
|
|
117590
|
-
const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0,
|
|
117621
|
+
const projectGraph = (0, import_devkit2.readCachedProjectGraph)();
|
|
117622
|
+
const pathToPackageJson = (0, import_path3.join)(context.root, projectRoot, "package.json");
|
|
117623
|
+
const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit2.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
|
|
117591
117624
|
delete packageJson.dependencies;
|
|
117592
117625
|
externalDependencies.forEach((entry) => {
|
|
117593
117626
|
const packageConfig = entry.node.data;
|
|
@@ -117611,13 +117644,31 @@ ${externalDependencies.map((dep) => {
|
|
|
117611
117644
|
types: "./dist/modern/index.d.cts",
|
|
117612
117645
|
default: "./dist/modern/index.cjs"
|
|
117613
117646
|
},
|
|
117647
|
+
default: {
|
|
117648
|
+
types: "./dist/modern/**/*.d.ts",
|
|
117649
|
+
default: "./dist/modern/**/*.js"
|
|
117650
|
+
},
|
|
117651
|
+
"./*": {
|
|
117652
|
+
"import": {
|
|
117653
|
+
types: "./dist/modern/**/*.d.ts",
|
|
117654
|
+
default: "./dist/modern/**/*.js"
|
|
117655
|
+
},
|
|
117656
|
+
require: {
|
|
117657
|
+
types: "./dist/modern/**/*.d.cts",
|
|
117658
|
+
default: "./dist/modern/**/*.cjs"
|
|
117659
|
+
},
|
|
117660
|
+
"default": {
|
|
117661
|
+
types: "./dist/modern/**/*.d.ts",
|
|
117662
|
+
default: "./dist/modern/**/*.js"
|
|
117663
|
+
}
|
|
117664
|
+
},
|
|
117614
117665
|
...(options.additionalEntryPoints ?? []).map((entryPoint) => ({
|
|
117615
117666
|
[removeExtension(entryPoint).replace(sourceRoot, "")]: {
|
|
117616
|
-
types: (0,
|
|
117667
|
+
types: (0, import_path3.join)(
|
|
117617
117668
|
"./dist/modern",
|
|
117618
117669
|
`${removeExtension(entryPoint.replace(sourceRoot, ""))}.d.ts`
|
|
117619
117670
|
),
|
|
117620
|
-
default: (0,
|
|
117671
|
+
default: (0, import_path3.join)(
|
|
117621
117672
|
"./dist/modern",
|
|
117622
117673
|
`${removeExtension(entryPoint.replace(sourceRoot, ""))}.js`
|
|
117623
117674
|
)
|
|
@@ -117628,6 +117679,10 @@ ${externalDependencies.map((dep) => {
|
|
|
117628
117679
|
};
|
|
117629
117680
|
packageJson.funding ??= workspacePackageJson.funding;
|
|
117630
117681
|
packageJson.types ??= "dist/legacy/index.d.ts";
|
|
117682
|
+
packageJson.typings ??= "dist/legacy/index.d.ts";
|
|
117683
|
+
packageJson.typescript ??= {
|
|
117684
|
+
definition: "dist/legacy/index.d.ts"
|
|
117685
|
+
};
|
|
117631
117686
|
packageJson.main ??= "dist/legacy/index.cjs";
|
|
117632
117687
|
packageJson.module ??= "dist/legacy/index.js";
|
|
117633
117688
|
options.platform && options.platform !== "node" && (packageJson.browser ??= "dist/modern/index.global.js");
|
|
@@ -117636,15 +117691,15 @@ ${externalDependencies.map((dep) => {
|
|
|
117636
117691
|
if (distSrc.startsWith("/")) {
|
|
117637
117692
|
distSrc = distSrc.substring(1);
|
|
117638
117693
|
}
|
|
117639
|
-
packageJson.source ??= `${(0,
|
|
117694
|
+
packageJson.source ??= `${(0, import_path3.join)(distSrc, "index.ts").replaceAll(
|
|
117640
117695
|
"\\",
|
|
117641
117696
|
"/"
|
|
117642
117697
|
)}`;
|
|
117643
117698
|
}
|
|
117644
117699
|
packageJson.sideEffects ??= false;
|
|
117645
|
-
packageJson.files ??= ["dist"];
|
|
117700
|
+
packageJson.files ??= ["dist/**/*"];
|
|
117646
117701
|
if (options.includeSrc !== false && !packageJson.files.includes("src")) {
|
|
117647
|
-
packageJson.files.push("src");
|
|
117702
|
+
packageJson.files.push("src/**/*");
|
|
117648
117703
|
}
|
|
117649
117704
|
packageJson.publishConfig ??= {
|
|
117650
117705
|
access: "public"
|
|
@@ -117656,8 +117711,8 @@ ${externalDependencies.map((dep) => {
|
|
|
117656
117711
|
packageJson.license ??= workspacePackageJson.license;
|
|
117657
117712
|
packageJson.keywords ??= workspacePackageJson.keywords;
|
|
117658
117713
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
117659
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot : (0,
|
|
117660
|
-
const packageJsonPath = (0,
|
|
117714
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : (0, import_path3.join)("packages", context.projectName);
|
|
117715
|
+
const packageJsonPath = (0, import_path3.join)(
|
|
117661
117716
|
context.root,
|
|
117662
117717
|
options.outputPath,
|
|
117663
117718
|
"package.json"
|
|
@@ -117673,10 +117728,10 @@ ${externalDependencies.map((dep) => {
|
|
|
117673
117728
|
}
|
|
117674
117729
|
if (options.includeSrc !== false) {
|
|
117675
117730
|
const files = globSync([
|
|
117676
|
-
(0,
|
|
117677
|
-
(0,
|
|
117678
|
-
(0,
|
|
117679
|
-
(0,
|
|
117731
|
+
(0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.ts"),
|
|
117732
|
+
(0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.tsx"),
|
|
117733
|
+
(0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.js"),
|
|
117734
|
+
(0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.jsx")
|
|
117680
117735
|
]);
|
|
117681
117736
|
await Promise.allSettled(
|
|
117682
117737
|
files.map(
|
|
@@ -117778,15 +117833,15 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
|
|
|
117778
117833
|
declaration: true,
|
|
117779
117834
|
declarationMap: true,
|
|
117780
117835
|
emitDeclarationOnly: true,
|
|
117781
|
-
declarationDir: (0,
|
|
117836
|
+
declarationDir: (0, import_path3.join)(workspaceRoot, "tmp", ".tsup", "declaration")
|
|
117782
117837
|
}
|
|
117783
117838
|
},
|
|
117784
117839
|
ts.sys,
|
|
117785
|
-
(0,
|
|
117840
|
+
(0, import_path3.dirname)(options.tsConfig)
|
|
117786
117841
|
);
|
|
117787
117842
|
tsConfig.options.pathsBasePath = workspaceRoot;
|
|
117788
117843
|
if (tsConfig.options.incremental && !tsConfig.options.tsBuildInfoFile) {
|
|
117789
|
-
tsConfig.options.tsBuildInfoFile = (0,
|
|
117844
|
+
tsConfig.options.tsBuildInfoFile = (0, import_devkit2.joinPathFragments)(
|
|
117790
117845
|
outputPath,
|
|
117791
117846
|
"tsconfig.tsbuildinfo"
|
|
117792
117847
|
);
|
|
@@ -117821,7 +117876,7 @@ var applyDefaultOptions = (options) => {
|
|
|
117821
117876
|
options.additionalEntryPoints ??= [];
|
|
117822
117877
|
options.assets ??= [];
|
|
117823
117878
|
options.plugins ??= [];
|
|
117824
|
-
options.includeSrc ??=
|
|
117879
|
+
options.includeSrc ??= false;
|
|
117825
117880
|
options.clean ??= true;
|
|
117826
117881
|
options.bundle ??= true;
|
|
117827
117882
|
options.debug ??= false;
|
|
@@ -117831,6 +117886,7 @@ var applyDefaultOptions = (options) => {
|
|
|
117831
117886
|
options.tsdocMetadata ??= true;
|
|
117832
117887
|
options.define ??= {};
|
|
117833
117888
|
options.env ??= {};
|
|
117889
|
+
options.verbose ??= !!process.env.CI;
|
|
117834
117890
|
return options;
|
|
117835
117891
|
};
|
|
117836
117892
|
var executor_default = withRunExecutor(
|
|
@@ -117929,9 +117985,9 @@ var executor_default3 = withRunExecutor(
|
|
|
117929
117985
|
);
|
|
117930
117986
|
|
|
117931
117987
|
// packages/workspace-tools/src/generators/config-schema/generator.ts
|
|
117932
|
-
var
|
|
117988
|
+
var import_devkit3 = __toESM(require_devkit());
|
|
117933
117989
|
var import_fs4 = require("fs");
|
|
117934
|
-
var
|
|
117990
|
+
var import_path4 = require("path");
|
|
117935
117991
|
|
|
117936
117992
|
// node_modules/.pnpm/zod-to-json-schema@3.22.1_zod@3.22.4/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
|
|
117937
117993
|
function addErrorMessage(res, key, errorMessage, refs) {
|
|
@@ -118957,7 +119013,7 @@ async function configSchemaGeneratorFn(tree, options) {
|
|
|
118957
119013
|
const modules = await Promise.all(
|
|
118958
119014
|
Object.keys(projectConfigurations).map(async (key) => {
|
|
118959
119015
|
if (projectConfigurations[key]?.config) {
|
|
118960
|
-
const configPath = (0,
|
|
119016
|
+
const configPath = (0, import_path4.join)(
|
|
118961
119017
|
workspaceRoot,
|
|
118962
119018
|
projectConfigurations[key].config
|
|
118963
119019
|
);
|
|
@@ -118987,12 +119043,12 @@ async function configSchemaGeneratorFn(tree, options) {
|
|
|
118987
119043
|
const ModulesSchema = unionType([workspaceSchema, StormConfigSchema]).describe(
|
|
118988
119044
|
"The values set in the Storm config file. This file is expected to be named `storm.config.js` and be located in the root of the workspace"
|
|
118989
119045
|
);
|
|
118990
|
-
(0,
|
|
119046
|
+
(0, import_devkit3.writeJson)(
|
|
118991
119047
|
tree,
|
|
118992
|
-
options.outputFile ? (0,
|
|
119048
|
+
options.outputFile ? (0, import_path4.join)(workspaceRoot, options.outputFile) : (0, import_path4.join)(workspaceRoot, "storm.schema.json"),
|
|
118993
119049
|
zodToJsonSchema(ModulesSchema, "StormConfig")
|
|
118994
119050
|
);
|
|
118995
|
-
await (0,
|
|
119051
|
+
await (0, import_devkit3.formatFiles)(tree);
|
|
118996
119052
|
return null;
|
|
118997
119053
|
}
|
|
118998
119054
|
var generator_default = withRunGenerator(
|
|
@@ -119001,7 +119057,7 @@ var generator_default = withRunGenerator(
|
|
|
119001
119057
|
);
|
|
119002
119058
|
|
|
119003
119059
|
// packages/workspace-tools/src/generators/init/init.ts
|
|
119004
|
-
var
|
|
119060
|
+
var import_devkit4 = __toESM(require_devkit());
|
|
119005
119061
|
|
|
119006
119062
|
// packages/workspace-tools/src/utils/versions.ts
|
|
119007
119063
|
var tsupVersion = "^7.2.0";
|
|
@@ -119025,7 +119081,7 @@ var pnpmVersion = "8.10.2";
|
|
|
119025
119081
|
|
|
119026
119082
|
// packages/workspace-tools/src/generators/init/init.ts
|
|
119027
119083
|
async function stormInitGenerator(tree, schema) {
|
|
119028
|
-
const task = (0,
|
|
119084
|
+
const task = (0, import_devkit4.addDependenciesToPackageJson)(
|
|
119029
119085
|
tree,
|
|
119030
119086
|
{
|
|
119031
119087
|
"nx": nxVersion,
|
|
@@ -119038,16 +119094,16 @@ async function stormInitGenerator(tree, schema) {
|
|
|
119038
119094
|
{}
|
|
119039
119095
|
);
|
|
119040
119096
|
if (!schema.skipFormat) {
|
|
119041
|
-
await (0,
|
|
119097
|
+
await (0, import_devkit4.formatFiles)(tree);
|
|
119042
119098
|
}
|
|
119043
119099
|
return task;
|
|
119044
119100
|
}
|
|
119045
119101
|
|
|
119046
119102
|
// packages/workspace-tools/src/generators/node-library/generator.ts
|
|
119047
|
-
var
|
|
119103
|
+
var import_devkit6 = __toESM(require_devkit());
|
|
119048
119104
|
|
|
119049
119105
|
// packages/workspace-tools/src/base/typescript-library-generator.ts
|
|
119050
|
-
var
|
|
119106
|
+
var import_devkit5 = __toESM(require_devkit());
|
|
119051
119107
|
var import_project_name_and_root_utils = __toESM(require_project_name_and_root_utils());
|
|
119052
119108
|
var import_js2 = __toESM(require_src2());
|
|
119053
119109
|
var import_init = __toESM(require_init());
|
|
@@ -119062,7 +119118,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
119062
119118
|
})
|
|
119063
119119
|
);
|
|
119064
119120
|
tasks.push(
|
|
119065
|
-
(0,
|
|
119121
|
+
(0, import_devkit5.addDependenciesToPackageJson)(
|
|
119066
119122
|
tree,
|
|
119067
119123
|
{},
|
|
119068
119124
|
{
|
|
@@ -119078,16 +119134,16 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
119078
119134
|
const projectConfig = {
|
|
119079
119135
|
root: options.directory,
|
|
119080
119136
|
projectType: "library",
|
|
119081
|
-
sourceRoot: (0,
|
|
119137
|
+
sourceRoot: (0, import_devkit5.joinPathFragments)(options.directory, "src"),
|
|
119082
119138
|
targets: {
|
|
119083
119139
|
build: {
|
|
119084
119140
|
executor: schema.buildExecutor,
|
|
119085
119141
|
outputs: ["{options.outputPath}"],
|
|
119086
119142
|
options: {
|
|
119087
|
-
entry: (0,
|
|
119143
|
+
entry: (0, import_devkit5.joinPathFragments)(options.projectRoot, "src", "index.ts"),
|
|
119088
119144
|
outputPath: getOutputPath(options),
|
|
119089
|
-
tsConfig: (0,
|
|
119090
|
-
project: (0,
|
|
119145
|
+
tsConfig: (0, import_devkit5.joinPathFragments)(options.projectRoot, "tsconfig.json"),
|
|
119146
|
+
project: (0, import_devkit5.joinPathFragments)(options.projectRoot, "package.json"),
|
|
119091
119147
|
defaultConfiguration: "production",
|
|
119092
119148
|
assets: [
|
|
119093
119149
|
{
|
|
@@ -119119,23 +119175,23 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
119119
119175
|
};
|
|
119120
119176
|
schema.platform && (projectConfig.targets.build.options.platform = schema.platform);
|
|
119121
119177
|
createProjectTsConfigJson(tree, options);
|
|
119122
|
-
(0,
|
|
119178
|
+
(0, import_devkit5.addProjectConfiguration)(tree, options.name, projectConfig);
|
|
119123
119179
|
let repository = {
|
|
119124
119180
|
type: "github",
|
|
119125
119181
|
url: "https://github.com/storm-software/storm-stack.git"
|
|
119126
119182
|
};
|
|
119127
119183
|
let description = schema.description ?? "\u26A1 A Storm package used to create modern, scalable web applications.";
|
|
119128
119184
|
if (tree.exists("package.json")) {
|
|
119129
|
-
const packageJson = (0,
|
|
119185
|
+
const packageJson = (0, import_devkit5.readJson)(tree, "package.json");
|
|
119130
119186
|
packageJson?.repository && (repository = packageJson.repository);
|
|
119131
119187
|
packageJson?.description && (description = packageJson.description);
|
|
119132
119188
|
}
|
|
119133
|
-
const packageJsonPath = (0,
|
|
119189
|
+
const packageJsonPath = (0, import_devkit5.joinPathFragments)(
|
|
119134
119190
|
options.projectRoot,
|
|
119135
119191
|
"package.json"
|
|
119136
119192
|
);
|
|
119137
119193
|
if (tree.exists(packageJsonPath)) {
|
|
119138
|
-
(0,
|
|
119194
|
+
(0, import_devkit5.updateJson)(tree, packageJsonPath, (json) => {
|
|
119139
119195
|
json.name = options.importPath;
|
|
119140
119196
|
json.version = "0.0.1";
|
|
119141
119197
|
if (json.private && (options.publishable || options.rootProject)) {
|
|
@@ -119159,7 +119215,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
119159
119215
|
};
|
|
119160
119216
|
});
|
|
119161
119217
|
} else {
|
|
119162
|
-
(0,
|
|
119218
|
+
(0, import_devkit5.writeJson)(tree, packageJsonPath, {
|
|
119163
119219
|
name: options.importPath,
|
|
119164
119220
|
version: "0.0.1",
|
|
119165
119221
|
description,
|
|
@@ -119175,7 +119231,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
119175
119231
|
});
|
|
119176
119232
|
}
|
|
119177
119233
|
if (tree.exists("package.json")) {
|
|
119178
|
-
(0,
|
|
119234
|
+
(0, import_devkit5.updateJson)(tree, "package.json", (json) => ({
|
|
119179
119235
|
...json,
|
|
119180
119236
|
pnpm: {
|
|
119181
119237
|
...json?.pnpm,
|
|
@@ -119187,32 +119243,32 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
119187
119243
|
}));
|
|
119188
119244
|
}
|
|
119189
119245
|
(0, import_js2.addTsConfigPath)(tree, options.importPath, [
|
|
119190
|
-
(0,
|
|
119246
|
+
(0, import_devkit5.joinPathFragments)(
|
|
119191
119247
|
options.projectRoot,
|
|
119192
119248
|
"./src",
|
|
119193
119249
|
"index." + (options.js ? "js" : "ts")
|
|
119194
119250
|
)
|
|
119195
119251
|
]);
|
|
119196
|
-
(0, import_js2.addTsConfigPath)(tree, (0,
|
|
119197
|
-
(0,
|
|
119252
|
+
(0, import_js2.addTsConfigPath)(tree, (0, import_devkit5.joinPathFragments)(options.importPath, "/*"), [
|
|
119253
|
+
(0, import_devkit5.joinPathFragments)(options.projectRoot, "./src", "/*")
|
|
119198
119254
|
]);
|
|
119199
119255
|
if (tree.exists("package.json")) {
|
|
119200
|
-
const packageJson = (0,
|
|
119256
|
+
const packageJson = (0, import_devkit5.readJson)(tree, "package.json");
|
|
119201
119257
|
packageJson?.repository && (repository = packageJson.repository);
|
|
119202
119258
|
packageJson?.description && (description = packageJson.description);
|
|
119203
119259
|
}
|
|
119204
|
-
const tsconfigPath = (0,
|
|
119260
|
+
const tsconfigPath = (0, import_devkit5.joinPathFragments)(options.projectRoot, "tsconfig.json");
|
|
119205
119261
|
if (tree.exists(tsconfigPath)) {
|
|
119206
|
-
(0,
|
|
119262
|
+
(0, import_devkit5.updateJson)(tree, tsconfigPath, (json) => {
|
|
119207
119263
|
json.composite ??= true;
|
|
119208
119264
|
return json;
|
|
119209
119265
|
});
|
|
119210
119266
|
} else {
|
|
119211
|
-
(0,
|
|
119212
|
-
extends: `${(0,
|
|
119267
|
+
(0, import_devkit5.writeJson)(tree, tsconfigPath, {
|
|
119268
|
+
extends: `${(0, import_devkit5.offsetFromRoot)(options.projectRoot)}tsconfig.base.json`,
|
|
119213
119269
|
composite: true,
|
|
119214
119270
|
compilerOptions: {
|
|
119215
|
-
outDir: `${(0,
|
|
119271
|
+
outDir: `${(0, import_devkit5.offsetFromRoot)(options.projectRoot)}dist/out-tsc`
|
|
119216
119272
|
},
|
|
119217
119273
|
files: [],
|
|
119218
119274
|
include: ["src/**/*.ts", "src/**/*.js"],
|
|
@@ -119221,21 +119277,21 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
119221
119277
|
}
|
|
119222
119278
|
const lintCallback = await addLint(tree, options);
|
|
119223
119279
|
tasks.push(lintCallback);
|
|
119224
|
-
await (0,
|
|
119280
|
+
await (0, import_devkit5.formatFiles)(tree);
|
|
119225
119281
|
return null;
|
|
119226
119282
|
}
|
|
119227
119283
|
async function addLint(tree, options) {
|
|
119228
|
-
const { lintProjectGenerator } = (0,
|
|
119284
|
+
const { lintProjectGenerator } = (0, import_devkit5.ensurePackage)("@nx/eslint", nxVersion);
|
|
119229
119285
|
const { mapLintPattern } = (
|
|
119230
119286
|
// nx-ignore-next-line
|
|
119231
119287
|
require_lint_project()
|
|
119232
119288
|
);
|
|
119233
|
-
const projectConfiguration = (0,
|
|
119289
|
+
const projectConfiguration = (0, import_devkit5.readProjectConfiguration)(tree, options.name);
|
|
119234
119290
|
const task = lintProjectGenerator(tree, {
|
|
119235
119291
|
project: options.name,
|
|
119236
119292
|
linter: options.linter,
|
|
119237
119293
|
skipFormat: true,
|
|
119238
|
-
tsConfigPaths: [(0,
|
|
119294
|
+
tsConfigPaths: [(0, import_devkit5.joinPathFragments)(options.projectRoot, "tsconfig.json")],
|
|
119239
119295
|
unitTestRunner: options.unitTestRunner,
|
|
119240
119296
|
eslintFilePatterns: [
|
|
119241
119297
|
mapLintPattern(
|
|
@@ -119306,15 +119362,15 @@ function getOutputPath(options) {
|
|
|
119306
119362
|
} else {
|
|
119307
119363
|
parts.push(options.projectRoot);
|
|
119308
119364
|
}
|
|
119309
|
-
return (0,
|
|
119365
|
+
return (0, import_devkit5.joinPathFragments)(...parts);
|
|
119310
119366
|
}
|
|
119311
119367
|
function createProjectTsConfigJson(tree, options) {
|
|
119312
119368
|
const tsconfig = {
|
|
119313
119369
|
extends: options.rootProject ? void 0 : (0, import_js2.getRelativePathToRootTsConfig)(tree, options.projectRoot),
|
|
119314
119370
|
compilerOptions: {
|
|
119315
119371
|
...options.rootProject ? import_js2.tsConfigBaseOptions : {},
|
|
119316
|
-
outDir: (0,
|
|
119317
|
-
(0,
|
|
119372
|
+
outDir: (0, import_devkit5.joinPathFragments)(
|
|
119373
|
+
(0, import_devkit5.offsetFromRoot)(options.projectRoot),
|
|
119318
119374
|
"dist/out-tsc"
|
|
119319
119375
|
),
|
|
119320
119376
|
noEmit: true
|
|
@@ -119323,9 +119379,9 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
119323
119379
|
include: ["src/**/*.ts", "src/**/*.js", "bin/**/*"],
|
|
119324
119380
|
exclude: ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
|
|
119325
119381
|
};
|
|
119326
|
-
(0,
|
|
119382
|
+
(0, import_devkit5.writeJson)(
|
|
119327
119383
|
tree,
|
|
119328
|
-
(0,
|
|
119384
|
+
(0, import_devkit5.joinPathFragments)(options.projectRoot, "tsconfig.json"),
|
|
119329
119385
|
tsconfig
|
|
119330
119386
|
);
|
|
119331
119387
|
}
|
|
@@ -119341,7 +119397,7 @@ async function normalizeOptions2(tree, options) {
|
|
|
119341
119397
|
if (options.publishable === false && options.buildable === false) {
|
|
119342
119398
|
bundler = "none";
|
|
119343
119399
|
}
|
|
119344
|
-
const { Linter } = (0,
|
|
119400
|
+
const { Linter } = (0, import_devkit5.ensurePackage)("@nx/eslint", nxVersion);
|
|
119345
119401
|
const {
|
|
119346
119402
|
projectName,
|
|
119347
119403
|
names: projectNames,
|
|
@@ -119357,7 +119413,7 @@ async function normalizeOptions2(tree, options) {
|
|
|
119357
119413
|
callingGenerator: "@nx/js:library"
|
|
119358
119414
|
});
|
|
119359
119415
|
options.rootProject = projectRoot === ".";
|
|
119360
|
-
const normalized = (0,
|
|
119416
|
+
const normalized = (0, import_devkit5.names)(projectNames.projectFileName);
|
|
119361
119417
|
const fileName = normalized.fileName;
|
|
119362
119418
|
return {
|
|
119363
119419
|
js: false,
|
|
@@ -119385,7 +119441,7 @@ async function normalizeOptions2(tree, options) {
|
|
|
119385
119441
|
|
|
119386
119442
|
// packages/workspace-tools/src/generators/node-library/generator.ts
|
|
119387
119443
|
async function nodeLibraryGeneratorFn(tree, schema) {
|
|
119388
|
-
const filesDir = (0,
|
|
119444
|
+
const filesDir = (0, import_devkit6.joinPathFragments)(__dirname, "./files");
|
|
119389
119445
|
const tsLibraryGeneratorOptions = {
|
|
119390
119446
|
...schema,
|
|
119391
119447
|
platform: "node",
|
|
@@ -119395,10 +119451,10 @@ async function nodeLibraryGeneratorFn(tree, schema) {
|
|
|
119395
119451
|
buildExecutor: "@storm-software/workspace-tools:tsup-node"
|
|
119396
119452
|
};
|
|
119397
119453
|
const options = await normalizeOptions2(tree, tsLibraryGeneratorOptions);
|
|
119398
|
-
const { className, name, propertyName } = (0,
|
|
119454
|
+
const { className, name, propertyName } = (0, import_devkit6.names)(
|
|
119399
119455
|
options.projectNames.projectFileName
|
|
119400
119456
|
);
|
|
119401
|
-
(0,
|
|
119457
|
+
(0, import_devkit6.generateFiles)(tree, filesDir, options.projectRoot, {
|
|
119402
119458
|
...schema,
|
|
119403
119459
|
dot: ".",
|
|
119404
119460
|
className,
|
|
@@ -119410,12 +119466,12 @@ async function nodeLibraryGeneratorFn(tree, schema) {
|
|
|
119410
119466
|
cliCommand: "nx",
|
|
119411
119467
|
strict: void 0,
|
|
119412
119468
|
tmpl: "",
|
|
119413
|
-
offsetFromRoot: (0,
|
|
119469
|
+
offsetFromRoot: (0, import_devkit6.offsetFromRoot)(options.projectRoot),
|
|
119414
119470
|
buildable: options.bundler && options.bundler !== "none",
|
|
119415
119471
|
hasUnitTestRunner: options.unitTestRunner !== "none"
|
|
119416
119472
|
});
|
|
119417
119473
|
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions);
|
|
119418
|
-
await (0,
|
|
119474
|
+
await (0, import_devkit6.formatFiles)(tree);
|
|
119419
119475
|
return null;
|
|
119420
119476
|
}
|
|
119421
119477
|
var generator_default2 = withRunGenerator(
|
|
@@ -119424,13 +119480,13 @@ var generator_default2 = withRunGenerator(
|
|
|
119424
119480
|
);
|
|
119425
119481
|
|
|
119426
119482
|
// packages/workspace-tools/src/generators/preset/generator.ts
|
|
119427
|
-
var
|
|
119483
|
+
var import_devkit7 = __toESM(require_devkit());
|
|
119428
119484
|
var path2 = __toESM(require("path"));
|
|
119429
119485
|
async function presetGeneratorFn(tree, options) {
|
|
119430
119486
|
const projectRoot = `.`;
|
|
119431
119487
|
options.description ??= `\u26A1The ${options.namespace ? options.namespace : options.name} monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.`;
|
|
119432
119488
|
options.namespace ??= options.organization;
|
|
119433
|
-
(0,
|
|
119489
|
+
(0, import_devkit7.addProjectConfiguration)(tree, `@${options.namespace}/${options.name}`, {
|
|
119434
119490
|
root: projectRoot,
|
|
119435
119491
|
projectType: "application",
|
|
119436
119492
|
targets: {
|
|
@@ -119444,7 +119500,7 @@ async function presetGeneratorFn(tree, options) {
|
|
|
119444
119500
|
}
|
|
119445
119501
|
}
|
|
119446
119502
|
});
|
|
119447
|
-
(0,
|
|
119503
|
+
(0, import_devkit7.updateJson)(tree, "package.json", (json) => {
|
|
119448
119504
|
json.scripts = json.scripts || {};
|
|
119449
119505
|
json.version = "0.0.0";
|
|
119450
119506
|
json.triggerEmptyDevReleaseByIncrementingThisNumber = 0;
|
|
@@ -119568,12 +119624,12 @@ async function presetGeneratorFn(tree, options) {
|
|
|
119568
119624
|
};
|
|
119569
119625
|
return json;
|
|
119570
119626
|
});
|
|
119571
|
-
(0,
|
|
119627
|
+
(0, import_devkit7.generateFiles)(tree, path2.join(__dirname, "files"), projectRoot, {
|
|
119572
119628
|
...options,
|
|
119573
119629
|
pnpmVersion,
|
|
119574
119630
|
nodeVersion
|
|
119575
119631
|
});
|
|
119576
|
-
await (0,
|
|
119632
|
+
await (0, import_devkit7.formatFiles)(tree);
|
|
119577
119633
|
let dependencies = {
|
|
119578
119634
|
"@eslint/eslintrc": "^2.1.3",
|
|
119579
119635
|
"@nx/devkit": "^17.0.3",
|
|
@@ -119639,11 +119695,11 @@ async function presetGeneratorFn(tree, options) {
|
|
|
119639
119695
|
};
|
|
119640
119696
|
}
|
|
119641
119697
|
await Promise.resolve(
|
|
119642
|
-
(0,
|
|
119698
|
+
(0, import_devkit7.addDependenciesToPackageJson)(
|
|
119643
119699
|
tree,
|
|
119644
119700
|
dependencies,
|
|
119645
119701
|
{},
|
|
119646
|
-
(0,
|
|
119702
|
+
(0, import_devkit7.joinPathFragments)(projectRoot, "package.json")
|
|
119647
119703
|
)
|
|
119648
119704
|
);
|
|
119649
119705
|
return null;
|