@storm-software/workspace-tools 1.43.21 → 1.44.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 +7 -0
- package/executors.json +5 -0
- package/index.js +739 -47
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +12 -21
- package/src/executors/tsup-browser/executor.js +12 -21
- package/src/executors/tsup-neutral/executor.js +12 -21
- package/src/executors/tsup-node/executor.js +12 -21
- package/src/executors/typia/executor.js +34921 -0
- package/src/executors/typia/schema.d.ts +5 -0
- package/src/executors/typia/schema.json +32 -0
package/index.js
CHANGED
|
@@ -12198,12 +12198,12 @@ var require_install_packages_task = __commonJS({
|
|
|
12198
12198
|
var child_process_1 = require("child_process");
|
|
12199
12199
|
var path_1 = require("path");
|
|
12200
12200
|
var nx_1 = require_nx();
|
|
12201
|
-
var { detectPackageManager, getPackageManagerCommand, joinPathFragments:
|
|
12201
|
+
var { detectPackageManager, getPackageManagerCommand, joinPathFragments: joinPathFragments9 } = (0, nx_1.requireNx)();
|
|
12202
12202
|
function installPackagesTask(tree, alwaysRun = false, cwd = "", packageManager = detectPackageManager(cwd)) {
|
|
12203
|
-
if (!tree.listChanges().find((f) => f.path ===
|
|
12203
|
+
if (!tree.listChanges().find((f) => f.path === joinPathFragments9(cwd, "package.json")) && !alwaysRun) {
|
|
12204
12204
|
return;
|
|
12205
12205
|
}
|
|
12206
|
-
const packageJsonValue = tree.read(
|
|
12206
|
+
const packageJsonValue = tree.read(joinPathFragments9(cwd, "package.json"), "utf-8");
|
|
12207
12207
|
let storedPackageJsonValue = global["__packageJsonInstallCache__"];
|
|
12208
12208
|
if (storedPackageJsonValue != packageJsonValue || alwaysRun) {
|
|
12209
12209
|
global["__packageJsonInstallCache__"] = packageJsonValue;
|
|
@@ -30836,7 +30836,7 @@ var require_project_name_and_root_utils = __commonJS({
|
|
|
30836
30836
|
var nx_1 = require_nx();
|
|
30837
30837
|
var get_workspace_layout_1 = require_get_workspace_layout();
|
|
30838
30838
|
var names_1 = require_names();
|
|
30839
|
-
var { joinPathFragments:
|
|
30839
|
+
var { joinPathFragments: joinPathFragments9, normalizePath, logger, readJson: readJson2, stripIndents, workspaceRoot } = (0, nx_1.requireNx)();
|
|
30840
30840
|
var deprecationWarning = stripIndents`
|
|
30841
30841
|
In Nx 18, generating projects will no longer derive the name and root.
|
|
30842
30842
|
Please provide the exact project name and root in the future.`;
|
|
@@ -30912,14 +30912,14 @@ var require_project_name_and_root_utils = __commonJS({
|
|
|
30912
30912
|
if (directory === relativeCwd || directory.startsWith(`${relativeCwd}/`)) {
|
|
30913
30913
|
asProvidedProjectDirectory = directory;
|
|
30914
30914
|
} else {
|
|
30915
|
-
asProvidedProjectDirectory =
|
|
30915
|
+
asProvidedProjectDirectory = joinPathFragments9(relativeCwd, directory);
|
|
30916
30916
|
}
|
|
30917
30917
|
} else if (options.rootProject) {
|
|
30918
30918
|
asProvidedProjectDirectory = ".";
|
|
30919
30919
|
} else {
|
|
30920
30920
|
asProvidedProjectDirectory = relativeCwd;
|
|
30921
30921
|
if (!relativeCwd.endsWith(asProvidedProjectName) && !relativeCwd.endsWith(options.name)) {
|
|
30922
|
-
asProvidedProjectDirectory =
|
|
30922
|
+
asProvidedProjectDirectory = joinPathFragments9(relativeCwd, asProvidedProjectName);
|
|
30923
30923
|
}
|
|
30924
30924
|
}
|
|
30925
30925
|
if (asProvidedProjectName.startsWith("@")) {
|
|
@@ -30952,7 +30952,7 @@ var require_project_name_and_root_utils = __commonJS({
|
|
|
30952
30952
|
const derivedSimpleProjectName = name;
|
|
30953
30953
|
let derivedProjectDirectory = derivedProjectDirectoryWithoutLayout;
|
|
30954
30954
|
if (derivedProjectDirectoryWithoutLayout !== ".") {
|
|
30955
|
-
derivedProjectDirectory =
|
|
30955
|
+
derivedProjectDirectory = joinPathFragments9(layoutDirectory, derivedProjectDirectory);
|
|
30956
30956
|
}
|
|
30957
30957
|
let derivedImportPath;
|
|
30958
30958
|
if (options.projectType === "library") {
|
|
@@ -44822,9 +44822,9 @@ var require_brace_expansion2 = __commonJS({
|
|
|
44822
44822
|
}
|
|
44823
44823
|
});
|
|
44824
44824
|
|
|
44825
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
44825
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-EPAEWGCP.js
|
|
44826
44826
|
var require_chunk_EPAEWGCP = __commonJS({
|
|
44827
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
44827
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
|
|
44828
44828
|
"use strict";
|
|
44829
44829
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44830
44830
|
var version = "8.0.0";
|
|
@@ -46471,9 +46471,9 @@ var require_resolve_from2 = __commonJS({
|
|
|
46471
46471
|
}
|
|
46472
46472
|
});
|
|
46473
46473
|
|
|
46474
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
46474
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-GQ77QZBO.js
|
|
46475
46475
|
var require_chunk_GQ77QZBO = __commonJS({
|
|
46476
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
46476
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
|
|
46477
46477
|
"use strict";
|
|
46478
46478
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46479
46479
|
function _interopRequireDefault(obj) {
|
|
@@ -46751,9 +46751,9 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
46751
46751
|
}
|
|
46752
46752
|
});
|
|
46753
46753
|
|
|
46754
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
46754
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-UIX4URMV.js
|
|
46755
46755
|
var require_chunk_UIX4URMV = __commonJS({
|
|
46756
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
46756
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
|
|
46757
46757
|
"use strict";
|
|
46758
46758
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46759
46759
|
function _interopRequireWildcard(obj) {
|
|
@@ -47687,9 +47687,9 @@ var require_dist3 = __commonJS({
|
|
|
47687
47687
|
}
|
|
47688
47688
|
});
|
|
47689
47689
|
|
|
47690
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
47690
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-7G76EW2R.js
|
|
47691
47691
|
var require_chunk_7G76EW2R = __commonJS({
|
|
47692
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
47692
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
|
|
47693
47693
|
"use strict";
|
|
47694
47694
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47695
47695
|
function _interopRequireDefault(obj) {
|
|
@@ -101426,9 +101426,9 @@ var require_chokidar = __commonJS({
|
|
|
101426
101426
|
}
|
|
101427
101427
|
});
|
|
101428
101428
|
|
|
101429
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
101429
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/index.js
|
|
101430
101430
|
var require_dist6 = __commonJS({
|
|
101431
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
101431
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/index.js"(exports) {
|
|
101432
101432
|
"use strict";
|
|
101433
101433
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
101434
101434
|
function _interopRequireDefault(obj) {
|
|
@@ -103721,13 +103721,7 @@ var require_dist6 = __commonJS({
|
|
|
103721
103721
|
};
|
|
103722
103722
|
logger.info("tsc", "Emitting DTS files");
|
|
103723
103723
|
let transformDiagnostics = [];
|
|
103724
|
-
let emitResult = program.emit(
|
|
103725
|
-
void 0,
|
|
103726
|
-
writeFile2,
|
|
103727
|
-
void 0,
|
|
103728
|
-
true,
|
|
103729
|
-
options.getTransform ? { before: [options.getTransform(program, transformDiagnostics)] } : void 0
|
|
103730
|
-
);
|
|
103724
|
+
let emitResult = program.emit(void 0, writeFile2, void 0, true);
|
|
103731
103725
|
let diagnostics = _typescript2.default.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
|
|
103732
103726
|
let diagnosticMessages = [];
|
|
103733
103727
|
[...transformDiagnostics, ...diagnostics].forEach((diagnostic) => {
|
|
@@ -103768,10 +103762,7 @@ var require_dist6 = __commonJS({
|
|
|
103768
103762
|
const program = _typescript2.default.createProgram({
|
|
103769
103763
|
rootNames: compilerOptions.fileNames,
|
|
103770
103764
|
options: compilerOptions.options,
|
|
103771
|
-
host
|
|
103772
|
-
...host,
|
|
103773
|
-
jsDocParsingMode: _typescript2.default.JSDocParsingMode?.ParseAll !== void 0 ? _typescript2.default.JSDocParsingMode.ParseAll : 0
|
|
103774
|
-
}
|
|
103765
|
+
host
|
|
103775
103766
|
});
|
|
103776
103767
|
const fileMapping = emitDtsFiles(program, host, options);
|
|
103777
103768
|
if (!fileMapping || fileMapping.size === 0) {
|
|
@@ -126330,6 +126321,471 @@ var require_transform = __commonJS({
|
|
|
126330
126321
|
}
|
|
126331
126322
|
});
|
|
126332
126323
|
|
|
126324
|
+
// node_modules/.pnpm/typia@5.3.9_typescript@5.2.2/node_modules/typia/lib/transformers/ImportTransformer.js
|
|
126325
|
+
var require_ImportTransformer = __commonJS({
|
|
126326
|
+
"node_modules/.pnpm/typia@5.3.9_typescript@5.2.2/node_modules/typia/lib/transformers/ImportTransformer.js"(exports) {
|
|
126327
|
+
"use strict";
|
|
126328
|
+
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
126329
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
126330
|
+
};
|
|
126331
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
126332
|
+
exports.ImportTransformer = void 0;
|
|
126333
|
+
var path_1 = __importDefault2(require("path"));
|
|
126334
|
+
var typescript_1 = __importDefault2(require("typescript"));
|
|
126335
|
+
var ImportTransformer;
|
|
126336
|
+
(function(ImportTransformer2) {
|
|
126337
|
+
ImportTransformer2.transform = function(from) {
|
|
126338
|
+
return function(to) {
|
|
126339
|
+
return function(context) {
|
|
126340
|
+
return function(file) {
|
|
126341
|
+
return transform_file(from)(to)(context)(file);
|
|
126342
|
+
};
|
|
126343
|
+
};
|
|
126344
|
+
};
|
|
126345
|
+
};
|
|
126346
|
+
var transform_file = function(top) {
|
|
126347
|
+
return function(to) {
|
|
126348
|
+
return function(context) {
|
|
126349
|
+
return function(file) {
|
|
126350
|
+
if (file.isDeclarationFile)
|
|
126351
|
+
return file;
|
|
126352
|
+
var from = get_directory_path(path_1.default.resolve(file.getSourceFile().fileName));
|
|
126353
|
+
to = from.replace(top, to);
|
|
126354
|
+
return typescript_1.default.visitEachChild(file, function(node) {
|
|
126355
|
+
return transform_node(top)(from)(to)(node);
|
|
126356
|
+
}, context);
|
|
126357
|
+
};
|
|
126358
|
+
};
|
|
126359
|
+
};
|
|
126360
|
+
};
|
|
126361
|
+
var transform_node = function(top) {
|
|
126362
|
+
return function(from) {
|
|
126363
|
+
return function(to) {
|
|
126364
|
+
return function(node) {
|
|
126365
|
+
if (!typescript_1.default.isImportDeclaration(node) || !typescript_1.default.isStringLiteral(node.moduleSpecifier))
|
|
126366
|
+
return node;
|
|
126367
|
+
var text = node.moduleSpecifier.text;
|
|
126368
|
+
if (text[0] !== ".")
|
|
126369
|
+
return node;
|
|
126370
|
+
var location = path_1.default.resolve(from, text);
|
|
126371
|
+
if (location.indexOf(top) === 0)
|
|
126372
|
+
return node;
|
|
126373
|
+
var replaced = function() {
|
|
126374
|
+
var simple = path_1.default.relative(to, location).split(path_1.default.sep).join("/");
|
|
126375
|
+
return simple[0] === "." ? simple : "./".concat(simple);
|
|
126376
|
+
}();
|
|
126377
|
+
return typescript_1.default.factory.createImportDeclaration(void 0, node.importClause, typescript_1.default.factory.createStringLiteral(replaced), node.assertClause);
|
|
126378
|
+
};
|
|
126379
|
+
};
|
|
126380
|
+
};
|
|
126381
|
+
};
|
|
126382
|
+
})(ImportTransformer || (exports.ImportTransformer = ImportTransformer = {}));
|
|
126383
|
+
var get_directory_path = function(file) {
|
|
126384
|
+
var splitted = path_1.default.resolve(file).split(path_1.default.sep);
|
|
126385
|
+
splitted.pop();
|
|
126386
|
+
return path_1.default.resolve(splitted.join(path_1.default.sep));
|
|
126387
|
+
};
|
|
126388
|
+
}
|
|
126389
|
+
});
|
|
126390
|
+
|
|
126391
|
+
// node_modules/.pnpm/typia@5.3.9_typescript@5.2.2/node_modules/typia/lib/programmers/TypiaProgrammer.js
|
|
126392
|
+
var require_TypiaProgrammer = __commonJS({
|
|
126393
|
+
"node_modules/.pnpm/typia@5.3.9_typescript@5.2.2/node_modules/typia/lib/programmers/TypiaProgrammer.js"(exports) {
|
|
126394
|
+
"use strict";
|
|
126395
|
+
var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
126396
|
+
function adopt(value) {
|
|
126397
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
126398
|
+
resolve(value);
|
|
126399
|
+
});
|
|
126400
|
+
}
|
|
126401
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
126402
|
+
function fulfilled(value) {
|
|
126403
|
+
try {
|
|
126404
|
+
step(generator.next(value));
|
|
126405
|
+
} catch (e) {
|
|
126406
|
+
reject(e);
|
|
126407
|
+
}
|
|
126408
|
+
}
|
|
126409
|
+
function rejected(value) {
|
|
126410
|
+
try {
|
|
126411
|
+
step(generator["throw"](value));
|
|
126412
|
+
} catch (e) {
|
|
126413
|
+
reject(e);
|
|
126414
|
+
}
|
|
126415
|
+
}
|
|
126416
|
+
function step(result) {
|
|
126417
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
126418
|
+
}
|
|
126419
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
126420
|
+
});
|
|
126421
|
+
};
|
|
126422
|
+
var __generator2 = exports && exports.__generator || function(thisArg, body) {
|
|
126423
|
+
var _ = { label: 0, sent: function() {
|
|
126424
|
+
if (t[0] & 1)
|
|
126425
|
+
throw t[1];
|
|
126426
|
+
return t[1];
|
|
126427
|
+
}, trys: [], ops: [] }, f, y, t, g;
|
|
126428
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
126429
|
+
return this;
|
|
126430
|
+
}), g;
|
|
126431
|
+
function verb(n) {
|
|
126432
|
+
return function(v) {
|
|
126433
|
+
return step([n, v]);
|
|
126434
|
+
};
|
|
126435
|
+
}
|
|
126436
|
+
function step(op) {
|
|
126437
|
+
if (f)
|
|
126438
|
+
throw new TypeError("Generator is already executing.");
|
|
126439
|
+
while (g && (g = 0, op[0] && (_ = 0)), _)
|
|
126440
|
+
try {
|
|
126441
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
126442
|
+
return t;
|
|
126443
|
+
if (y = 0, t)
|
|
126444
|
+
op = [op[0] & 2, t.value];
|
|
126445
|
+
switch (op[0]) {
|
|
126446
|
+
case 0:
|
|
126447
|
+
case 1:
|
|
126448
|
+
t = op;
|
|
126449
|
+
break;
|
|
126450
|
+
case 4:
|
|
126451
|
+
_.label++;
|
|
126452
|
+
return { value: op[1], done: false };
|
|
126453
|
+
case 5:
|
|
126454
|
+
_.label++;
|
|
126455
|
+
y = op[1];
|
|
126456
|
+
op = [0];
|
|
126457
|
+
continue;
|
|
126458
|
+
case 7:
|
|
126459
|
+
op = _.ops.pop();
|
|
126460
|
+
_.trys.pop();
|
|
126461
|
+
continue;
|
|
126462
|
+
default:
|
|
126463
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
126464
|
+
_ = 0;
|
|
126465
|
+
continue;
|
|
126466
|
+
}
|
|
126467
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
126468
|
+
_.label = op[1];
|
|
126469
|
+
break;
|
|
126470
|
+
}
|
|
126471
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
126472
|
+
_.label = t[1];
|
|
126473
|
+
t = op;
|
|
126474
|
+
break;
|
|
126475
|
+
}
|
|
126476
|
+
if (t && _.label < t[2]) {
|
|
126477
|
+
_.label = t[2];
|
|
126478
|
+
_.ops.push(op);
|
|
126479
|
+
break;
|
|
126480
|
+
}
|
|
126481
|
+
if (t[2])
|
|
126482
|
+
_.ops.pop();
|
|
126483
|
+
_.trys.pop();
|
|
126484
|
+
continue;
|
|
126485
|
+
}
|
|
126486
|
+
op = body.call(thisArg, _);
|
|
126487
|
+
} catch (e) {
|
|
126488
|
+
op = [6, e];
|
|
126489
|
+
y = 0;
|
|
126490
|
+
} finally {
|
|
126491
|
+
f = t = 0;
|
|
126492
|
+
}
|
|
126493
|
+
if (op[0] & 5)
|
|
126494
|
+
throw op[1];
|
|
126495
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
126496
|
+
}
|
|
126497
|
+
};
|
|
126498
|
+
var __read2 = exports && exports.__read || function(o, n) {
|
|
126499
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
126500
|
+
if (!m)
|
|
126501
|
+
return o;
|
|
126502
|
+
var i = m.call(o), r, ar = [], e;
|
|
126503
|
+
try {
|
|
126504
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
126505
|
+
ar.push(r.value);
|
|
126506
|
+
} catch (error) {
|
|
126507
|
+
e = { error };
|
|
126508
|
+
} finally {
|
|
126509
|
+
try {
|
|
126510
|
+
if (r && !r.done && (m = i["return"]))
|
|
126511
|
+
m.call(i);
|
|
126512
|
+
} finally {
|
|
126513
|
+
if (e)
|
|
126514
|
+
throw e.error;
|
|
126515
|
+
}
|
|
126516
|
+
}
|
|
126517
|
+
return ar;
|
|
126518
|
+
};
|
|
126519
|
+
var __values2 = exports && exports.__values || function(o) {
|
|
126520
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
126521
|
+
if (m)
|
|
126522
|
+
return m.call(o);
|
|
126523
|
+
if (o && typeof o.length === "number")
|
|
126524
|
+
return {
|
|
126525
|
+
next: function() {
|
|
126526
|
+
if (o && i >= o.length)
|
|
126527
|
+
o = void 0;
|
|
126528
|
+
return { value: o && o[i++], done: !o };
|
|
126529
|
+
}
|
|
126530
|
+
};
|
|
126531
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
126532
|
+
};
|
|
126533
|
+
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
126534
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
126535
|
+
};
|
|
126536
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
126537
|
+
exports.TypiaProgrammer = void 0;
|
|
126538
|
+
var fs_1 = __importDefault2(require("fs"));
|
|
126539
|
+
var path_1 = __importDefault2(require("path"));
|
|
126540
|
+
var typescript_1 = __importDefault2(require("typescript"));
|
|
126541
|
+
var ImportTransformer_1 = require_ImportTransformer();
|
|
126542
|
+
var transform_1 = __importDefault2(require_transform());
|
|
126543
|
+
var TypiaProgrammer2;
|
|
126544
|
+
(function(TypiaProgrammer3) {
|
|
126545
|
+
var _this = this;
|
|
126546
|
+
TypiaProgrammer3.build = function(props) {
|
|
126547
|
+
return __awaiter2(_this, void 0, void 0, function() {
|
|
126548
|
+
var parent_1, compilerOptions, program, _a, _b, diagnostics, result, _loop_1, diagnostics_1, diagnostics_1_1, diag, printer, _c, _d, file, to, content, e_1_1;
|
|
126549
|
+
var e_2, _e, e_1, _f;
|
|
126550
|
+
var _this2 = this;
|
|
126551
|
+
var _g, _h;
|
|
126552
|
+
return __generator2(this, function(_j) {
|
|
126553
|
+
switch (_j.label) {
|
|
126554
|
+
case 0:
|
|
126555
|
+
props.input = path_1.default.resolve(props.input);
|
|
126556
|
+
props.output = path_1.default.resolve(props.output);
|
|
126557
|
+
return [4, is_directory(props.input)];
|
|
126558
|
+
case 1:
|
|
126559
|
+
if (!(_j.sent() === false))
|
|
126560
|
+
return [3, 2];
|
|
126561
|
+
throw new URIError("Error on TypiaGenerator.generate(): input path is not a directory.");
|
|
126562
|
+
case 2:
|
|
126563
|
+
if (!(fs_1.default.existsSync(props.output) === false))
|
|
126564
|
+
return [3, 4];
|
|
126565
|
+
return [4, fs_1.default.promises.mkdir(props.output, { recursive: true })];
|
|
126566
|
+
case 3:
|
|
126567
|
+
_j.sent();
|
|
126568
|
+
return [3, 8];
|
|
126569
|
+
case 4:
|
|
126570
|
+
return [4, is_directory(props.output)];
|
|
126571
|
+
case 5:
|
|
126572
|
+
if (!(_j.sent() === false))
|
|
126573
|
+
return [3, 8];
|
|
126574
|
+
parent_1 = path_1.default.join(props.output, "..");
|
|
126575
|
+
return [4, is_directory(parent_1)];
|
|
126576
|
+
case 6:
|
|
126577
|
+
if (_j.sent() === false)
|
|
126578
|
+
throw new URIError("Error on TypiaGenerator.generate(): output path is not a directory.");
|
|
126579
|
+
return [4, fs_1.default.promises.mkdir(props.output)];
|
|
126580
|
+
case 7:
|
|
126581
|
+
_j.sent();
|
|
126582
|
+
_j.label = 8;
|
|
126583
|
+
case 8:
|
|
126584
|
+
compilerOptions = typescript_1.default.parseJsonConfigFileContent(typescript_1.default.readConfigFile(props.project, typescript_1.default.sys.readFile).config, {
|
|
126585
|
+
fileExists: typescript_1.default.sys.fileExists,
|
|
126586
|
+
readFile: typescript_1.default.sys.readFile,
|
|
126587
|
+
readDirectory: typescript_1.default.sys.readDirectory,
|
|
126588
|
+
useCaseSensitiveFileNames: typescript_1.default.sys.useCaseSensitiveFileNames
|
|
126589
|
+
}, path_1.default.dirname(props.project)).options;
|
|
126590
|
+
_b = (_a = typescript_1.default).createProgram;
|
|
126591
|
+
return [4, function() {
|
|
126592
|
+
return __awaiter2(_this2, void 0, void 0, function() {
|
|
126593
|
+
var container;
|
|
126594
|
+
return __generator2(this, function(_a2) {
|
|
126595
|
+
switch (_a2.label) {
|
|
126596
|
+
case 0:
|
|
126597
|
+
container = [];
|
|
126598
|
+
return [4, gather(props)(container)(props.input)(props.output)];
|
|
126599
|
+
case 1:
|
|
126600
|
+
_a2.sent();
|
|
126601
|
+
return [2, container];
|
|
126602
|
+
}
|
|
126603
|
+
});
|
|
126604
|
+
});
|
|
126605
|
+
}()];
|
|
126606
|
+
case 9:
|
|
126607
|
+
program = _b.apply(_a, [_j.sent(), compilerOptions]);
|
|
126608
|
+
diagnostics = [];
|
|
126609
|
+
result = typescript_1.default.transform(program.getSourceFiles().filter(function(file2) {
|
|
126610
|
+
return !file2.isDeclarationFile && path_1.default.resolve(file2.fileName).indexOf(props.input) !== -1;
|
|
126611
|
+
}), [
|
|
126612
|
+
ImportTransformer_1.ImportTransformer.transform(props.input)(props.output),
|
|
126613
|
+
(0, transform_1.default)(program, (_h = ((_g = compilerOptions.plugins) !== null && _g !== void 0 ? _g : []).find(function(p) {
|
|
126614
|
+
return p.transform === "typia/lib/transform" || p.transform === "../src/transform.ts";
|
|
126615
|
+
})) !== null && _h !== void 0 ? _h : {}, {
|
|
126616
|
+
addDiagnostic: function(diag2) {
|
|
126617
|
+
return diagnostics.push(diag2);
|
|
126618
|
+
}
|
|
126619
|
+
})
|
|
126620
|
+
], program.getCompilerOptions());
|
|
126621
|
+
_loop_1 = function(diag2) {
|
|
126622
|
+
var file2 = diag2.file ? path_1.default.relative(diag2.file.fileName, process.cwd()) : "(unknown file)";
|
|
126623
|
+
var category = diag2.category === typescript_1.default.DiagnosticCategory.Warning ? "warning" : diag2.category === typescript_1.default.DiagnosticCategory.Error ? "error" : diag2.category === typescript_1.default.DiagnosticCategory.Suggestion ? "suggestion" : diag2.category === typescript_1.default.DiagnosticCategory.Message ? "message" : "unkown";
|
|
126624
|
+
var _k = __read2(diag2.file ? function() {
|
|
126625
|
+
var lines = diag2.file.text.substring(0, diag2.start).split("\n");
|
|
126626
|
+
if (lines.length === 0)
|
|
126627
|
+
return [0, 0];
|
|
126628
|
+
return [lines.length, lines.at(-1).length + 1];
|
|
126629
|
+
}() : [0, 0], 2), line = _k[0], pos = _k[1];
|
|
126630
|
+
console.error("".concat(file2, ":").concat(line, ":").concat(pos, " - ").concat(category, " TS").concat(diag2.code, ": ").concat(diag2.messageText));
|
|
126631
|
+
};
|
|
126632
|
+
try {
|
|
126633
|
+
for (diagnostics_1 = __values2(diagnostics), diagnostics_1_1 = diagnostics_1.next(); !diagnostics_1_1.done; diagnostics_1_1 = diagnostics_1.next()) {
|
|
126634
|
+
diag = diagnostics_1_1.value;
|
|
126635
|
+
_loop_1(diag);
|
|
126636
|
+
}
|
|
126637
|
+
} catch (e_2_1) {
|
|
126638
|
+
e_2 = { error: e_2_1 };
|
|
126639
|
+
} finally {
|
|
126640
|
+
try {
|
|
126641
|
+
if (diagnostics_1_1 && !diagnostics_1_1.done && (_e = diagnostics_1.return))
|
|
126642
|
+
_e.call(diagnostics_1);
|
|
126643
|
+
} finally {
|
|
126644
|
+
if (e_2)
|
|
126645
|
+
throw e_2.error;
|
|
126646
|
+
}
|
|
126647
|
+
}
|
|
126648
|
+
if (diagnostics.length)
|
|
126649
|
+
process.exit(-1);
|
|
126650
|
+
printer = typescript_1.default.createPrinter({
|
|
126651
|
+
newLine: typescript_1.default.NewLineKind.LineFeed
|
|
126652
|
+
});
|
|
126653
|
+
_j.label = 10;
|
|
126654
|
+
case 10:
|
|
126655
|
+
_j.trys.push([10, 15, 16, 17]);
|
|
126656
|
+
_c = __values2(result.transformed), _d = _c.next();
|
|
126657
|
+
_j.label = 11;
|
|
126658
|
+
case 11:
|
|
126659
|
+
if (!!_d.done)
|
|
126660
|
+
return [3, 14];
|
|
126661
|
+
file = _d.value;
|
|
126662
|
+
to = path_1.default.resolve(file.fileName).replace(props.input, props.output);
|
|
126663
|
+
content = printer.printFile(file);
|
|
126664
|
+
return [4, fs_1.default.promises.writeFile(to, emend(content), "utf8")];
|
|
126665
|
+
case 12:
|
|
126666
|
+
_j.sent();
|
|
126667
|
+
_j.label = 13;
|
|
126668
|
+
case 13:
|
|
126669
|
+
_d = _c.next();
|
|
126670
|
+
return [3, 11];
|
|
126671
|
+
case 14:
|
|
126672
|
+
return [3, 17];
|
|
126673
|
+
case 15:
|
|
126674
|
+
e_1_1 = _j.sent();
|
|
126675
|
+
e_1 = { error: e_1_1 };
|
|
126676
|
+
return [3, 17];
|
|
126677
|
+
case 16:
|
|
126678
|
+
try {
|
|
126679
|
+
if (_d && !_d.done && (_f = _c.return))
|
|
126680
|
+
_f.call(_c);
|
|
126681
|
+
} finally {
|
|
126682
|
+
if (e_1)
|
|
126683
|
+
throw e_1.error;
|
|
126684
|
+
}
|
|
126685
|
+
return [7];
|
|
126686
|
+
case 17:
|
|
126687
|
+
return [2];
|
|
126688
|
+
}
|
|
126689
|
+
});
|
|
126690
|
+
});
|
|
126691
|
+
};
|
|
126692
|
+
var emend = function(content) {
|
|
126693
|
+
if (content.indexOf("typia.") === -1 || content.indexOf("import typia") !== -1 || content.indexOf("import * as typia") !== -1)
|
|
126694
|
+
return content;
|
|
126695
|
+
return 'import typia from "typia";\n\n'.concat(content);
|
|
126696
|
+
};
|
|
126697
|
+
var is_directory = function(current) {
|
|
126698
|
+
return __awaiter2(_this, void 0, void 0, function() {
|
|
126699
|
+
var stat;
|
|
126700
|
+
return __generator2(this, function(_a) {
|
|
126701
|
+
switch (_a.label) {
|
|
126702
|
+
case 0:
|
|
126703
|
+
return [4, fs_1.default.promises.stat(current)];
|
|
126704
|
+
case 1:
|
|
126705
|
+
stat = _a.sent();
|
|
126706
|
+
return [2, stat.isDirectory()];
|
|
126707
|
+
}
|
|
126708
|
+
});
|
|
126709
|
+
});
|
|
126710
|
+
};
|
|
126711
|
+
var gather = function(props) {
|
|
126712
|
+
return function(container) {
|
|
126713
|
+
return function(from) {
|
|
126714
|
+
return function(to) {
|
|
126715
|
+
return __awaiter2(_this, void 0, void 0, function() {
|
|
126716
|
+
var _a, _b, file, next, stat, e_3_1;
|
|
126717
|
+
var e_3, _c;
|
|
126718
|
+
return __generator2(this, function(_d) {
|
|
126719
|
+
switch (_d.label) {
|
|
126720
|
+
case 0:
|
|
126721
|
+
if (!(from === props.output))
|
|
126722
|
+
return [3, 1];
|
|
126723
|
+
return [2];
|
|
126724
|
+
case 1:
|
|
126725
|
+
if (!(fs_1.default.existsSync(to) === false))
|
|
126726
|
+
return [3, 3];
|
|
126727
|
+
return [4, fs_1.default.promises.mkdir(to)];
|
|
126728
|
+
case 2:
|
|
126729
|
+
_d.sent();
|
|
126730
|
+
_d.label = 3;
|
|
126731
|
+
case 3:
|
|
126732
|
+
_d.trys.push([3, 11, 12, 13]);
|
|
126733
|
+
return [4, fs_1.default.promises.readdir(from)];
|
|
126734
|
+
case 4:
|
|
126735
|
+
_a = __values2.apply(void 0, [_d.sent()]), _b = _a.next();
|
|
126736
|
+
_d.label = 5;
|
|
126737
|
+
case 5:
|
|
126738
|
+
if (!!_b.done)
|
|
126739
|
+
return [3, 10];
|
|
126740
|
+
file = _b.value;
|
|
126741
|
+
next = path_1.default.join(from, file);
|
|
126742
|
+
return [4, fs_1.default.promises.stat(next)];
|
|
126743
|
+
case 6:
|
|
126744
|
+
stat = _d.sent();
|
|
126745
|
+
if (!stat.isDirectory())
|
|
126746
|
+
return [3, 8];
|
|
126747
|
+
return [4, gather(props)(container)(next)(path_1.default.join(to, file))];
|
|
126748
|
+
case 7:
|
|
126749
|
+
_d.sent();
|
|
126750
|
+
return [3, 9];
|
|
126751
|
+
case 8:
|
|
126752
|
+
if (is_supported_extension(file))
|
|
126753
|
+
container.push(next);
|
|
126754
|
+
_d.label = 9;
|
|
126755
|
+
case 9:
|
|
126756
|
+
_b = _a.next();
|
|
126757
|
+
return [3, 5];
|
|
126758
|
+
case 10:
|
|
126759
|
+
return [3, 13];
|
|
126760
|
+
case 11:
|
|
126761
|
+
e_3_1 = _d.sent();
|
|
126762
|
+
e_3 = { error: e_3_1 };
|
|
126763
|
+
return [3, 13];
|
|
126764
|
+
case 12:
|
|
126765
|
+
try {
|
|
126766
|
+
if (_b && !_b.done && (_c = _a.return))
|
|
126767
|
+
_c.call(_a);
|
|
126768
|
+
} finally {
|
|
126769
|
+
if (e_3)
|
|
126770
|
+
throw e_3.error;
|
|
126771
|
+
}
|
|
126772
|
+
return [7];
|
|
126773
|
+
case 13:
|
|
126774
|
+
return [2];
|
|
126775
|
+
}
|
|
126776
|
+
});
|
|
126777
|
+
});
|
|
126778
|
+
};
|
|
126779
|
+
};
|
|
126780
|
+
};
|
|
126781
|
+
};
|
|
126782
|
+
var is_supported_extension = function(filename) {
|
|
126783
|
+
return filename.endsWith(".ts") && !filename.endsWith(".d.ts") || filename.endsWith(".tsx") && !filename.endsWith(".d.tsx");
|
|
126784
|
+
};
|
|
126785
|
+
})(TypiaProgrammer2 || (exports.TypiaProgrammer = TypiaProgrammer2 = {}));
|
|
126786
|
+
}
|
|
126787
|
+
});
|
|
126788
|
+
|
|
126333
126789
|
// packages/workspace-tools/index.ts
|
|
126334
126790
|
var workspace_tools_exports = {};
|
|
126335
126791
|
__export(workspace_tools_exports, {
|
|
@@ -126374,6 +126830,7 @@ __export(workspace_tools_exports, {
|
|
|
126374
126830
|
swcHelpersVersion: () => swcHelpersVersion,
|
|
126375
126831
|
swcNodeVersion: () => swcNodeVersion,
|
|
126376
126832
|
tsLibVersion: () => tsLibVersion,
|
|
126833
|
+
tsupBrowserBuildExecutorFn: () => tsupBrowserBuildExecutorFn,
|
|
126377
126834
|
tsupExecutorFn: () => tsupExecutorFn,
|
|
126378
126835
|
tsupNeutralBuildExecutorFn: () => tsupNeutralBuildExecutorFn,
|
|
126379
126836
|
tsupNodeBuildExecutorFn: () => tsupNodeBuildExecutorFn,
|
|
@@ -126381,6 +126838,7 @@ __export(workspace_tools_exports, {
|
|
|
126381
126838
|
typeScriptLibraryGeneratorFn: () => typeScriptLibraryGeneratorFn,
|
|
126382
126839
|
typesNodeVersion: () => typesNodeVersion,
|
|
126383
126840
|
typescriptVersion: () => typescriptVersion,
|
|
126841
|
+
typiaExecutorFn: () => typiaExecutorFn,
|
|
126384
126842
|
verdaccioVersion: () => verdaccioVersion,
|
|
126385
126843
|
withRunExecutor: () => withRunExecutor,
|
|
126386
126844
|
withRunGenerator: () => withRunGenerator
|
|
@@ -138398,8 +138856,240 @@ var executor_default3 = withRunExecutor(
|
|
|
138398
138856
|
}
|
|
138399
138857
|
);
|
|
138400
138858
|
|
|
138401
|
-
// packages/workspace-tools/src/
|
|
138859
|
+
// packages/workspace-tools/src/executors/tsup-browser/get-config.ts
|
|
138402
138860
|
var import_devkit6 = __toESM(require_devkit());
|
|
138861
|
+
var modernBrowserConfig = ({
|
|
138862
|
+
entry,
|
|
138863
|
+
outDir,
|
|
138864
|
+
projectRoot,
|
|
138865
|
+
workspaceRoot,
|
|
138866
|
+
tsconfig = "tsconfig.json",
|
|
138867
|
+
splitting,
|
|
138868
|
+
treeshake,
|
|
138869
|
+
debug = false,
|
|
138870
|
+
shims = true,
|
|
138871
|
+
external,
|
|
138872
|
+
banner = {},
|
|
138873
|
+
platform = "browser",
|
|
138874
|
+
verbose = false,
|
|
138875
|
+
metafile = false,
|
|
138876
|
+
define: define2,
|
|
138877
|
+
env: env2,
|
|
138878
|
+
plugins,
|
|
138879
|
+
generatePackageJson,
|
|
138880
|
+
dtsTsConfig,
|
|
138881
|
+
minify = false,
|
|
138882
|
+
getTransform
|
|
138883
|
+
}) => {
|
|
138884
|
+
const outputPath = (0, import_devkit6.joinPathFragments)(outDir, "dist", "modern");
|
|
138885
|
+
const options = {
|
|
138886
|
+
name: "modern",
|
|
138887
|
+
entry,
|
|
138888
|
+
format: ["cjs", "esm", "iife"],
|
|
138889
|
+
target: ["chrome91", "firefox90", "edge91", "safari15", "ios15", "opera77", "esnext"],
|
|
138890
|
+
tsconfig,
|
|
138891
|
+
splitting,
|
|
138892
|
+
generatePackageJson,
|
|
138893
|
+
treeshake: treeshake ? {
|
|
138894
|
+
preset: "recommended"
|
|
138895
|
+
} : false,
|
|
138896
|
+
projectRoot,
|
|
138897
|
+
workspaceRoot,
|
|
138898
|
+
outDir: outputPath,
|
|
138899
|
+
silent: !verbose,
|
|
138900
|
+
metafile,
|
|
138901
|
+
shims,
|
|
138902
|
+
external,
|
|
138903
|
+
platform,
|
|
138904
|
+
banner,
|
|
138905
|
+
define: define2,
|
|
138906
|
+
env: env2,
|
|
138907
|
+
dts: false,
|
|
138908
|
+
minify,
|
|
138909
|
+
experimentalDts: {
|
|
138910
|
+
entry,
|
|
138911
|
+
compilerOptions: {
|
|
138912
|
+
...dtsTsConfig,
|
|
138913
|
+
options: {
|
|
138914
|
+
...dtsTsConfig.options,
|
|
138915
|
+
outDir: outputPath
|
|
138916
|
+
}
|
|
138917
|
+
}
|
|
138918
|
+
},
|
|
138919
|
+
apiReport: false,
|
|
138920
|
+
docModel: false,
|
|
138921
|
+
tsdocMetadata: false,
|
|
138922
|
+
sourcemap: debug,
|
|
138923
|
+
clean: false,
|
|
138924
|
+
tsconfigDecoratorMetadata: true,
|
|
138925
|
+
plugins,
|
|
138926
|
+
outExtension,
|
|
138927
|
+
getTransform
|
|
138928
|
+
};
|
|
138929
|
+
if (!debug || minify) {
|
|
138930
|
+
options.minify = "terser";
|
|
138931
|
+
options.terserOptions = {
|
|
138932
|
+
compress: true,
|
|
138933
|
+
ecma: 2020,
|
|
138934
|
+
keep_classnames: true,
|
|
138935
|
+
keep_fnames: true
|
|
138936
|
+
};
|
|
138937
|
+
}
|
|
138938
|
+
return options;
|
|
138939
|
+
};
|
|
138940
|
+
var legacyBrowserConfig = ({
|
|
138941
|
+
entry,
|
|
138942
|
+
outDir,
|
|
138943
|
+
projectRoot,
|
|
138944
|
+
workspaceRoot,
|
|
138945
|
+
tsconfig = "tsconfig.json",
|
|
138946
|
+
splitting,
|
|
138947
|
+
treeshake,
|
|
138948
|
+
debug = false,
|
|
138949
|
+
external,
|
|
138950
|
+
banner = {},
|
|
138951
|
+
platform = "browser",
|
|
138952
|
+
verbose = false,
|
|
138953
|
+
shims = true,
|
|
138954
|
+
apiReport = true,
|
|
138955
|
+
docModel = true,
|
|
138956
|
+
tsdocMetadata = true,
|
|
138957
|
+
metafile = false,
|
|
138958
|
+
define: define2,
|
|
138959
|
+
env: env2,
|
|
138960
|
+
plugins,
|
|
138961
|
+
generatePackageJson,
|
|
138962
|
+
dtsTsConfig,
|
|
138963
|
+
minify = false,
|
|
138964
|
+
getTransform
|
|
138965
|
+
}) => {
|
|
138966
|
+
const outputPath = (0, import_devkit6.joinPathFragments)(outDir, "dist", "legacy");
|
|
138967
|
+
const options = {
|
|
138968
|
+
name: "legacy",
|
|
138969
|
+
entry,
|
|
138970
|
+
format: ["cjs", "esm", "iife"],
|
|
138971
|
+
target: ["es2022"],
|
|
138972
|
+
tsconfig,
|
|
138973
|
+
splitting,
|
|
138974
|
+
generatePackageJson,
|
|
138975
|
+
treeshake: treeshake ? {
|
|
138976
|
+
preset: "recommended"
|
|
138977
|
+
} : false,
|
|
138978
|
+
projectRoot,
|
|
138979
|
+
workspaceRoot,
|
|
138980
|
+
outDir: outputPath,
|
|
138981
|
+
silent: !verbose,
|
|
138982
|
+
metafile,
|
|
138983
|
+
shims,
|
|
138984
|
+
external,
|
|
138985
|
+
platform,
|
|
138986
|
+
banner,
|
|
138987
|
+
define: define2,
|
|
138988
|
+
env: env2,
|
|
138989
|
+
dts: false,
|
|
138990
|
+
minify,
|
|
138991
|
+
experimentalDts: {
|
|
138992
|
+
entry,
|
|
138993
|
+
compilerOptions: {
|
|
138994
|
+
...dtsTsConfig,
|
|
138995
|
+
options: {
|
|
138996
|
+
...dtsTsConfig.options,
|
|
138997
|
+
outDir: outputPath
|
|
138998
|
+
}
|
|
138999
|
+
}
|
|
139000
|
+
},
|
|
139001
|
+
apiReport,
|
|
139002
|
+
docModel,
|
|
139003
|
+
tsdocMetadata,
|
|
139004
|
+
sourcemap: debug,
|
|
139005
|
+
clean: false,
|
|
139006
|
+
tsconfigDecoratorMetadata: true,
|
|
139007
|
+
plugins,
|
|
139008
|
+
outExtension,
|
|
139009
|
+
getTransform
|
|
139010
|
+
};
|
|
139011
|
+
if (!debug || minify) {
|
|
139012
|
+
options.minify = "terser";
|
|
139013
|
+
options.terserOptions = {
|
|
139014
|
+
compress: true,
|
|
139015
|
+
ecma: 2020,
|
|
139016
|
+
keep_classnames: true,
|
|
139017
|
+
keep_fnames: true
|
|
139018
|
+
};
|
|
139019
|
+
}
|
|
139020
|
+
return options;
|
|
139021
|
+
};
|
|
139022
|
+
|
|
139023
|
+
// packages/workspace-tools/src/executors/tsup-browser/executor.ts
|
|
139024
|
+
var tsupBrowserBuildExecutorFn = (options, context, config) => {
|
|
139025
|
+
return tsupExecutorFn(
|
|
139026
|
+
{
|
|
139027
|
+
...options,
|
|
139028
|
+
platform: "browser",
|
|
139029
|
+
banner: getFileBanner(
|
|
139030
|
+
context.projectName ? context.projectName.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map((s) => s ? s.toUpperCase()[0] + s.toLowerCase().slice(1) : "").join(" ") : "TypeScript (Browser Platforms)"
|
|
139031
|
+
),
|
|
139032
|
+
define: {
|
|
139033
|
+
...options.define
|
|
139034
|
+
},
|
|
139035
|
+
env: {
|
|
139036
|
+
...process.env
|
|
139037
|
+
},
|
|
139038
|
+
getConfig: {
|
|
139039
|
+
"dist/modern": modernBrowserConfig,
|
|
139040
|
+
"dist/legacy": legacyBrowserConfig
|
|
139041
|
+
}
|
|
139042
|
+
},
|
|
139043
|
+
context,
|
|
139044
|
+
config
|
|
139045
|
+
);
|
|
139046
|
+
};
|
|
139047
|
+
var applyDefaultOptions4 = (options) => {
|
|
139048
|
+
return {
|
|
139049
|
+
...applyDefaultOptions({ plugins: [], ...options, platform: "browser" })
|
|
139050
|
+
};
|
|
139051
|
+
};
|
|
139052
|
+
var executor_default4 = withRunExecutor(
|
|
139053
|
+
"TypeScript Build (Browser Platforms)",
|
|
139054
|
+
tsupBrowserBuildExecutorFn,
|
|
139055
|
+
{
|
|
139056
|
+
skipReadingConfig: false,
|
|
139057
|
+
hooks: {
|
|
139058
|
+
applyDefaultOptions: applyDefaultOptions4
|
|
139059
|
+
}
|
|
139060
|
+
}
|
|
139061
|
+
);
|
|
139062
|
+
|
|
139063
|
+
// packages/workspace-tools/src/executors/typia/executor.ts
|
|
139064
|
+
var import_TypiaProgrammer = __toESM(require_TypiaProgrammer());
|
|
139065
|
+
async function typiaExecutorFn(options, _, __) {
|
|
139066
|
+
await import_TypiaProgrammer.TypiaProgrammer.build({
|
|
139067
|
+
input: options.entry,
|
|
139068
|
+
output: options.outputPath,
|
|
139069
|
+
project: options.tsConfig
|
|
139070
|
+
});
|
|
139071
|
+
return {
|
|
139072
|
+
success: true
|
|
139073
|
+
};
|
|
139074
|
+
}
|
|
139075
|
+
var executor_default5 = withRunExecutor(
|
|
139076
|
+
"Typia runtime validation generator",
|
|
139077
|
+
typiaExecutorFn,
|
|
139078
|
+
{
|
|
139079
|
+
skipReadingConfig: false,
|
|
139080
|
+
hooks: {
|
|
139081
|
+
applyDefaultOptions: (options) => {
|
|
139082
|
+
options.entry ??= "{sourceRoot}/index.ts";
|
|
139083
|
+
options.outputPath ??= "{sourceRoot}/__generated__/typia";
|
|
139084
|
+
options.tsConfig ??= "tsconfig.json";
|
|
139085
|
+
return options;
|
|
139086
|
+
}
|
|
139087
|
+
}
|
|
139088
|
+
}
|
|
139089
|
+
);
|
|
139090
|
+
|
|
139091
|
+
// packages/workspace-tools/src/generators/config-schema/generator.ts
|
|
139092
|
+
var import_devkit7 = __toESM(require_devkit());
|
|
138403
139093
|
var import_fs2 = require("fs");
|
|
138404
139094
|
var import_path2 = require("path");
|
|
138405
139095
|
|
|
@@ -139451,12 +140141,12 @@ async function configSchemaGeneratorFn(tree, options) {
|
|
|
139451
140141
|
const ModulesSchema = unionType([workspaceSchema, StormConfigSchema]).describe(
|
|
139452
140142
|
"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"
|
|
139453
140143
|
);
|
|
139454
|
-
(0,
|
|
140144
|
+
(0, import_devkit7.writeJson)(
|
|
139455
140145
|
tree,
|
|
139456
140146
|
options.outputFile ? (0, import_path2.join)(workspaceRoot, options.outputFile) : (0, import_path2.join)(workspaceRoot, "storm.schema.json"),
|
|
139457
140147
|
zodToJsonSchema(ModulesSchema, "StormConfig")
|
|
139458
140148
|
);
|
|
139459
|
-
await (0,
|
|
140149
|
+
await (0, import_devkit7.formatFiles)(tree);
|
|
139460
140150
|
return null;
|
|
139461
140151
|
}
|
|
139462
140152
|
var generator_default = withRunGenerator(
|
|
@@ -139465,9 +140155,9 @@ var generator_default = withRunGenerator(
|
|
|
139465
140155
|
);
|
|
139466
140156
|
|
|
139467
140157
|
// packages/workspace-tools/src/generators/init/init.ts
|
|
139468
|
-
var
|
|
140158
|
+
var import_devkit8 = __toESM(require_devkit());
|
|
139469
140159
|
async function stormInitGenerator(tree, schema) {
|
|
139470
|
-
const task = (0,
|
|
140160
|
+
const task = (0, import_devkit8.addDependenciesToPackageJson)(
|
|
139471
140161
|
tree,
|
|
139472
140162
|
{
|
|
139473
140163
|
"nx": nxVersion,
|
|
@@ -139480,15 +140170,15 @@ async function stormInitGenerator(tree, schema) {
|
|
|
139480
140170
|
{}
|
|
139481
140171
|
);
|
|
139482
140172
|
if (!schema.skipFormat) {
|
|
139483
|
-
await (0,
|
|
140173
|
+
await (0, import_devkit8.formatFiles)(tree);
|
|
139484
140174
|
}
|
|
139485
140175
|
return task;
|
|
139486
140176
|
}
|
|
139487
140177
|
|
|
139488
140178
|
// packages/workspace-tools/src/generators/node-library/generator.ts
|
|
139489
|
-
var
|
|
140179
|
+
var import_devkit9 = __toESM(require_devkit());
|
|
139490
140180
|
async function nodeLibraryGeneratorFn(tree, schema) {
|
|
139491
|
-
const filesDir = (0,
|
|
140181
|
+
const filesDir = (0, import_devkit9.joinPathFragments)(__dirname, "./files");
|
|
139492
140182
|
const tsLibraryGeneratorOptions = {
|
|
139493
140183
|
...schema,
|
|
139494
140184
|
platform: "node",
|
|
@@ -139498,10 +140188,10 @@ async function nodeLibraryGeneratorFn(tree, schema) {
|
|
|
139498
140188
|
buildExecutor: "@storm-software/workspace-tools:tsup-node"
|
|
139499
140189
|
};
|
|
139500
140190
|
const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
|
|
139501
|
-
const { className, name, propertyName } = (0,
|
|
140191
|
+
const { className, name, propertyName } = (0, import_devkit9.names)(
|
|
139502
140192
|
options.projectNames.projectFileName
|
|
139503
140193
|
);
|
|
139504
|
-
(0,
|
|
140194
|
+
(0, import_devkit9.generateFiles)(tree, filesDir, options.projectRoot, {
|
|
139505
140195
|
...schema,
|
|
139506
140196
|
dot: ".",
|
|
139507
140197
|
className,
|
|
@@ -139513,12 +140203,12 @@ async function nodeLibraryGeneratorFn(tree, schema) {
|
|
|
139513
140203
|
cliCommand: "nx",
|
|
139514
140204
|
strict: void 0,
|
|
139515
140205
|
tmpl: "",
|
|
139516
|
-
offsetFromRoot: (0,
|
|
140206
|
+
offsetFromRoot: (0, import_devkit9.offsetFromRoot)(options.projectRoot),
|
|
139517
140207
|
buildable: options.bundler && options.bundler !== "none",
|
|
139518
140208
|
hasUnitTestRunner: options.unitTestRunner !== "none"
|
|
139519
140209
|
});
|
|
139520
140210
|
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions);
|
|
139521
|
-
await (0,
|
|
140211
|
+
await (0, import_devkit9.formatFiles)(tree);
|
|
139522
140212
|
return null;
|
|
139523
140213
|
}
|
|
139524
140214
|
var generator_default2 = withRunGenerator(
|
|
@@ -139528,12 +140218,12 @@ var generator_default2 = withRunGenerator(
|
|
|
139528
140218
|
|
|
139529
140219
|
// packages/workspace-tools/src/generators/preset/generator.ts
|
|
139530
140220
|
var path2 = __toESM(require("path"));
|
|
139531
|
-
var
|
|
140221
|
+
var import_devkit10 = __toESM(require_devkit());
|
|
139532
140222
|
async function presetGeneratorFn(tree, options) {
|
|
139533
140223
|
const projectRoot = ".";
|
|
139534
140224
|
options.description ??= `\u26A1The ${options.namespace ? options.namespace : options.name} monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.`;
|
|
139535
140225
|
options.namespace ??= options.organization;
|
|
139536
|
-
(0,
|
|
140226
|
+
(0, import_devkit10.addProjectConfiguration)(tree, `@${options.namespace}/${options.name}`, {
|
|
139537
140227
|
root: projectRoot,
|
|
139538
140228
|
projectType: "application",
|
|
139539
140229
|
targets: {
|
|
@@ -139547,7 +140237,7 @@ async function presetGeneratorFn(tree, options) {
|
|
|
139547
140237
|
}
|
|
139548
140238
|
}
|
|
139549
140239
|
});
|
|
139550
|
-
(0,
|
|
140240
|
+
(0, import_devkit10.updateJson)(tree, "package.json", (json) => {
|
|
139551
140241
|
json.scripts = json.scripts || {};
|
|
139552
140242
|
json.version = "0.0.0";
|
|
139553
140243
|
json.triggerEmptyDevReleaseByIncrementingThisNumber = 0;
|
|
@@ -139671,12 +140361,12 @@ async function presetGeneratorFn(tree, options) {
|
|
|
139671
140361
|
};
|
|
139672
140362
|
return json;
|
|
139673
140363
|
});
|
|
139674
|
-
(0,
|
|
140364
|
+
(0, import_devkit10.generateFiles)(tree, path2.join(__dirname, "files"), projectRoot, {
|
|
139675
140365
|
...options,
|
|
139676
140366
|
pnpmVersion,
|
|
139677
140367
|
nodeVersion
|
|
139678
140368
|
});
|
|
139679
|
-
await (0,
|
|
140369
|
+
await (0, import_devkit10.formatFiles)(tree);
|
|
139680
140370
|
let dependencies = {
|
|
139681
140371
|
"@nx/devkit": "^17.0.3",
|
|
139682
140372
|
"@nx/jest": "^17.0.3",
|
|
@@ -139737,11 +140427,11 @@ async function presetGeneratorFn(tree, options) {
|
|
|
139737
140427
|
};
|
|
139738
140428
|
}
|
|
139739
140429
|
await Promise.resolve(
|
|
139740
|
-
(0,
|
|
140430
|
+
(0, import_devkit10.addDependenciesToPackageJson)(
|
|
139741
140431
|
tree,
|
|
139742
140432
|
dependencies,
|
|
139743
140433
|
{},
|
|
139744
|
-
(0,
|
|
140434
|
+
(0, import_devkit10.joinPathFragments)(projectRoot, "package.json")
|
|
139745
140435
|
)
|
|
139746
140436
|
);
|
|
139747
140437
|
return null;
|
|
@@ -139914,6 +140604,7 @@ var WorkspaceStorage = class {
|
|
|
139914
140604
|
swcHelpersVersion,
|
|
139915
140605
|
swcNodeVersion,
|
|
139916
140606
|
tsLibVersion,
|
|
140607
|
+
tsupBrowserBuildExecutorFn,
|
|
139917
140608
|
tsupExecutorFn,
|
|
139918
140609
|
tsupNeutralBuildExecutorFn,
|
|
139919
140610
|
tsupNodeBuildExecutorFn,
|
|
@@ -139921,6 +140612,7 @@ var WorkspaceStorage = class {
|
|
|
139921
140612
|
typeScriptLibraryGeneratorFn,
|
|
139922
140613
|
typesNodeVersion,
|
|
139923
140614
|
typescriptVersion,
|
|
140615
|
+
typiaExecutorFn,
|
|
139924
140616
|
verdaccioVersion,
|
|
139925
140617
|
withRunExecutor,
|
|
139926
140618
|
withRunGenerator
|