@storm-software/workspace-tools 1.43.21 → 1.45.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/executors.json +5 -0
- package/index.js +751 -55
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +13 -24
- package/src/executors/tsup-browser/executor.js +13 -24
- package/src/executors/tsup-neutral/executor.js +13 -24
- package/src/executors/tsup-node/executor.js +13 -24
- package/src/executors/typia/executor.js +37128 -0
- package/src/executors/typia/schema.d.ts +6 -0
- package/src/executors/typia/schema.json +38 -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") {
|
|
@@ -33885,12 +33885,12 @@ var require_remove = __commonJS({
|
|
|
33885
33885
|
function remove(path3, callback) {
|
|
33886
33886
|
fs.rm(path3, { recursive: true, force: true }, callback);
|
|
33887
33887
|
}
|
|
33888
|
-
function
|
|
33888
|
+
function removeSync3(path3) {
|
|
33889
33889
|
fs.rmSync(path3, { recursive: true, force: true });
|
|
33890
33890
|
}
|
|
33891
33891
|
module2.exports = {
|
|
33892
33892
|
remove: u(remove),
|
|
33893
|
-
removeSync:
|
|
33893
|
+
removeSync: removeSync3
|
|
33894
33894
|
};
|
|
33895
33895
|
}
|
|
33896
33896
|
});
|
|
@@ -34498,7 +34498,7 @@ var require_move_sync = __commonJS({
|
|
|
34498
34498
|
var fs = require_graceful_fs();
|
|
34499
34499
|
var path3 = require("path");
|
|
34500
34500
|
var copySync = require_copy2().copySync;
|
|
34501
|
-
var
|
|
34501
|
+
var removeSync3 = require_remove().removeSync;
|
|
34502
34502
|
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
34503
34503
|
var stat = require_stat();
|
|
34504
34504
|
function moveSync(src, dest, opts) {
|
|
@@ -34519,7 +34519,7 @@ var require_move_sync = __commonJS({
|
|
|
34519
34519
|
if (isChangingCase)
|
|
34520
34520
|
return rename(src, dest, overwrite);
|
|
34521
34521
|
if (overwrite) {
|
|
34522
|
-
|
|
34522
|
+
removeSync3(dest);
|
|
34523
34523
|
return rename(src, dest, overwrite);
|
|
34524
34524
|
}
|
|
34525
34525
|
if (fs.existsSync(dest))
|
|
@@ -34542,7 +34542,7 @@ var require_move_sync = __commonJS({
|
|
|
34542
34542
|
preserveTimestamps: true
|
|
34543
34543
|
};
|
|
34544
34544
|
copySync(src, dest, opts);
|
|
34545
|
-
return
|
|
34545
|
+
return removeSync3(src);
|
|
34546
34546
|
}
|
|
34547
34547
|
module2.exports = moveSync;
|
|
34548
34548
|
}
|
|
@@ -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
|
|
@@ -137674,9 +138132,7 @@ ${Object.keys(options).map(
|
|
|
137674
138132
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
137675
138133
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
|
|
137676
138134
|
if (options.clean !== false) {
|
|
137677
|
-
|
|
137678
|
-
writeInfo(config, `\u{1F9F9} Cleaning output path: ${options.outputPath}`);
|
|
137679
|
-
}
|
|
138135
|
+
writeInfo(config, `\u{1F9F9} Cleaning output path: ${options.outputPath}`);
|
|
137680
138136
|
(0, import_fs_extra.removeSync)(options.outputPath);
|
|
137681
138137
|
}
|
|
137682
138138
|
const assets = Array.from(options.assets);
|
|
@@ -138398,8 +138854,246 @@ var executor_default3 = withRunExecutor(
|
|
|
138398
138854
|
}
|
|
138399
138855
|
);
|
|
138400
138856
|
|
|
138401
|
-
// packages/workspace-tools/src/
|
|
138857
|
+
// packages/workspace-tools/src/executors/tsup-browser/get-config.ts
|
|
138402
138858
|
var import_devkit6 = __toESM(require_devkit());
|
|
138859
|
+
var modernBrowserConfig = ({
|
|
138860
|
+
entry,
|
|
138861
|
+
outDir,
|
|
138862
|
+
projectRoot,
|
|
138863
|
+
workspaceRoot,
|
|
138864
|
+
tsconfig = "tsconfig.json",
|
|
138865
|
+
splitting,
|
|
138866
|
+
treeshake,
|
|
138867
|
+
debug = false,
|
|
138868
|
+
shims = true,
|
|
138869
|
+
external,
|
|
138870
|
+
banner = {},
|
|
138871
|
+
platform = "browser",
|
|
138872
|
+
verbose = false,
|
|
138873
|
+
metafile = false,
|
|
138874
|
+
define: define2,
|
|
138875
|
+
env: env2,
|
|
138876
|
+
plugins,
|
|
138877
|
+
generatePackageJson,
|
|
138878
|
+
dtsTsConfig,
|
|
138879
|
+
minify = false,
|
|
138880
|
+
getTransform
|
|
138881
|
+
}) => {
|
|
138882
|
+
const outputPath = (0, import_devkit6.joinPathFragments)(outDir, "dist", "modern");
|
|
138883
|
+
const options = {
|
|
138884
|
+
name: "modern",
|
|
138885
|
+
entry,
|
|
138886
|
+
format: ["cjs", "esm", "iife"],
|
|
138887
|
+
target: ["chrome91", "firefox90", "edge91", "safari15", "ios15", "opera77", "esnext"],
|
|
138888
|
+
tsconfig,
|
|
138889
|
+
splitting,
|
|
138890
|
+
generatePackageJson,
|
|
138891
|
+
treeshake: treeshake ? {
|
|
138892
|
+
preset: "recommended"
|
|
138893
|
+
} : false,
|
|
138894
|
+
projectRoot,
|
|
138895
|
+
workspaceRoot,
|
|
138896
|
+
outDir: outputPath,
|
|
138897
|
+
silent: !verbose,
|
|
138898
|
+
metafile,
|
|
138899
|
+
shims,
|
|
138900
|
+
external,
|
|
138901
|
+
platform,
|
|
138902
|
+
banner,
|
|
138903
|
+
define: define2,
|
|
138904
|
+
env: env2,
|
|
138905
|
+
dts: false,
|
|
138906
|
+
minify,
|
|
138907
|
+
experimentalDts: {
|
|
138908
|
+
entry,
|
|
138909
|
+
compilerOptions: {
|
|
138910
|
+
...dtsTsConfig,
|
|
138911
|
+
options: {
|
|
138912
|
+
...dtsTsConfig.options,
|
|
138913
|
+
outDir: outputPath
|
|
138914
|
+
}
|
|
138915
|
+
}
|
|
138916
|
+
},
|
|
138917
|
+
apiReport: false,
|
|
138918
|
+
docModel: false,
|
|
138919
|
+
tsdocMetadata: false,
|
|
138920
|
+
sourcemap: debug,
|
|
138921
|
+
clean: false,
|
|
138922
|
+
tsconfigDecoratorMetadata: true,
|
|
138923
|
+
plugins,
|
|
138924
|
+
outExtension,
|
|
138925
|
+
getTransform
|
|
138926
|
+
};
|
|
138927
|
+
if (!debug || minify) {
|
|
138928
|
+
options.minify = "terser";
|
|
138929
|
+
options.terserOptions = {
|
|
138930
|
+
compress: true,
|
|
138931
|
+
ecma: 2020,
|
|
138932
|
+
keep_classnames: true,
|
|
138933
|
+
keep_fnames: true
|
|
138934
|
+
};
|
|
138935
|
+
}
|
|
138936
|
+
return options;
|
|
138937
|
+
};
|
|
138938
|
+
var legacyBrowserConfig = ({
|
|
138939
|
+
entry,
|
|
138940
|
+
outDir,
|
|
138941
|
+
projectRoot,
|
|
138942
|
+
workspaceRoot,
|
|
138943
|
+
tsconfig = "tsconfig.json",
|
|
138944
|
+
splitting,
|
|
138945
|
+
treeshake,
|
|
138946
|
+
debug = false,
|
|
138947
|
+
external,
|
|
138948
|
+
banner = {},
|
|
138949
|
+
platform = "browser",
|
|
138950
|
+
verbose = false,
|
|
138951
|
+
shims = true,
|
|
138952
|
+
apiReport = true,
|
|
138953
|
+
docModel = true,
|
|
138954
|
+
tsdocMetadata = true,
|
|
138955
|
+
metafile = false,
|
|
138956
|
+
define: define2,
|
|
138957
|
+
env: env2,
|
|
138958
|
+
plugins,
|
|
138959
|
+
generatePackageJson,
|
|
138960
|
+
dtsTsConfig,
|
|
138961
|
+
minify = false,
|
|
138962
|
+
getTransform
|
|
138963
|
+
}) => {
|
|
138964
|
+
const outputPath = (0, import_devkit6.joinPathFragments)(outDir, "dist", "legacy");
|
|
138965
|
+
const options = {
|
|
138966
|
+
name: "legacy",
|
|
138967
|
+
entry,
|
|
138968
|
+
format: ["cjs", "esm", "iife"],
|
|
138969
|
+
target: ["es2022"],
|
|
138970
|
+
tsconfig,
|
|
138971
|
+
splitting,
|
|
138972
|
+
generatePackageJson,
|
|
138973
|
+
treeshake: treeshake ? {
|
|
138974
|
+
preset: "recommended"
|
|
138975
|
+
} : false,
|
|
138976
|
+
projectRoot,
|
|
138977
|
+
workspaceRoot,
|
|
138978
|
+
outDir: outputPath,
|
|
138979
|
+
silent: !verbose,
|
|
138980
|
+
metafile,
|
|
138981
|
+
shims,
|
|
138982
|
+
external,
|
|
138983
|
+
platform,
|
|
138984
|
+
banner,
|
|
138985
|
+
define: define2,
|
|
138986
|
+
env: env2,
|
|
138987
|
+
dts: false,
|
|
138988
|
+
minify,
|
|
138989
|
+
experimentalDts: {
|
|
138990
|
+
entry,
|
|
138991
|
+
compilerOptions: {
|
|
138992
|
+
...dtsTsConfig,
|
|
138993
|
+
options: {
|
|
138994
|
+
...dtsTsConfig.options,
|
|
138995
|
+
outDir: outputPath
|
|
138996
|
+
}
|
|
138997
|
+
}
|
|
138998
|
+
},
|
|
138999
|
+
apiReport,
|
|
139000
|
+
docModel,
|
|
139001
|
+
tsdocMetadata,
|
|
139002
|
+
sourcemap: debug,
|
|
139003
|
+
clean: false,
|
|
139004
|
+
tsconfigDecoratorMetadata: true,
|
|
139005
|
+
plugins,
|
|
139006
|
+
outExtension,
|
|
139007
|
+
getTransform
|
|
139008
|
+
};
|
|
139009
|
+
if (!debug || minify) {
|
|
139010
|
+
options.minify = "terser";
|
|
139011
|
+
options.terserOptions = {
|
|
139012
|
+
compress: true,
|
|
139013
|
+
ecma: 2020,
|
|
139014
|
+
keep_classnames: true,
|
|
139015
|
+
keep_fnames: true
|
|
139016
|
+
};
|
|
139017
|
+
}
|
|
139018
|
+
return options;
|
|
139019
|
+
};
|
|
139020
|
+
|
|
139021
|
+
// packages/workspace-tools/src/executors/tsup-browser/executor.ts
|
|
139022
|
+
var tsupBrowserBuildExecutorFn = (options, context, config) => {
|
|
139023
|
+
return tsupExecutorFn(
|
|
139024
|
+
{
|
|
139025
|
+
...options,
|
|
139026
|
+
platform: "browser",
|
|
139027
|
+
banner: getFileBanner(
|
|
139028
|
+
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)"
|
|
139029
|
+
),
|
|
139030
|
+
define: {
|
|
139031
|
+
...options.define
|
|
139032
|
+
},
|
|
139033
|
+
env: {
|
|
139034
|
+
...process.env
|
|
139035
|
+
},
|
|
139036
|
+
getConfig: {
|
|
139037
|
+
"dist/modern": modernBrowserConfig,
|
|
139038
|
+
"dist/legacy": legacyBrowserConfig
|
|
139039
|
+
}
|
|
139040
|
+
},
|
|
139041
|
+
context,
|
|
139042
|
+
config
|
|
139043
|
+
);
|
|
139044
|
+
};
|
|
139045
|
+
var applyDefaultOptions4 = (options) => {
|
|
139046
|
+
return {
|
|
139047
|
+
...applyDefaultOptions({ plugins: [], ...options, platform: "browser" })
|
|
139048
|
+
};
|
|
139049
|
+
};
|
|
139050
|
+
var executor_default4 = withRunExecutor(
|
|
139051
|
+
"TypeScript Build (Browser Platforms)",
|
|
139052
|
+
tsupBrowserBuildExecutorFn,
|
|
139053
|
+
{
|
|
139054
|
+
skipReadingConfig: false,
|
|
139055
|
+
hooks: {
|
|
139056
|
+
applyDefaultOptions: applyDefaultOptions4
|
|
139057
|
+
}
|
|
139058
|
+
}
|
|
139059
|
+
);
|
|
139060
|
+
|
|
139061
|
+
// packages/workspace-tools/src/executors/typia/executor.ts
|
|
139062
|
+
var import_fs_extra2 = __toESM(require_lib4());
|
|
139063
|
+
var import_TypiaProgrammer = __toESM(require_TypiaProgrammer());
|
|
139064
|
+
async function typiaExecutorFn(options, _, config) {
|
|
139065
|
+
if (options.clean !== false) {
|
|
139066
|
+
writeInfo(config, `\u{1F9F9} Cleaning output path: ${options.outputPath}`);
|
|
139067
|
+
(0, import_fs_extra2.removeSync)(options.outputPath);
|
|
139068
|
+
}
|
|
139069
|
+
await import_TypiaProgrammer.TypiaProgrammer.build({
|
|
139070
|
+
input: options.entryPath,
|
|
139071
|
+
output: options.outputPath,
|
|
139072
|
+
project: options.tsConfig
|
|
139073
|
+
});
|
|
139074
|
+
return {
|
|
139075
|
+
success: true
|
|
139076
|
+
};
|
|
139077
|
+
}
|
|
139078
|
+
var executor_default5 = withRunExecutor(
|
|
139079
|
+
"Typia runtime validation generator",
|
|
139080
|
+
typiaExecutorFn,
|
|
139081
|
+
{
|
|
139082
|
+
skipReadingConfig: false,
|
|
139083
|
+
hooks: {
|
|
139084
|
+
applyDefaultOptions: (options) => {
|
|
139085
|
+
options.entryPath ??= "{sourceRoot}";
|
|
139086
|
+
options.outputPath ??= "{sourceRoot}/__generated__/typia";
|
|
139087
|
+
options.tsConfig ??= "{projectRoot}/tsconfig.json";
|
|
139088
|
+
options.clean ??= true;
|
|
139089
|
+
return options;
|
|
139090
|
+
}
|
|
139091
|
+
}
|
|
139092
|
+
}
|
|
139093
|
+
);
|
|
139094
|
+
|
|
139095
|
+
// packages/workspace-tools/src/generators/config-schema/generator.ts
|
|
139096
|
+
var import_devkit7 = __toESM(require_devkit());
|
|
138403
139097
|
var import_fs2 = require("fs");
|
|
138404
139098
|
var import_path2 = require("path");
|
|
138405
139099
|
|
|
@@ -139451,12 +140145,12 @@ async function configSchemaGeneratorFn(tree, options) {
|
|
|
139451
140145
|
const ModulesSchema = unionType([workspaceSchema, StormConfigSchema]).describe(
|
|
139452
140146
|
"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
140147
|
);
|
|
139454
|
-
(0,
|
|
140148
|
+
(0, import_devkit7.writeJson)(
|
|
139455
140149
|
tree,
|
|
139456
140150
|
options.outputFile ? (0, import_path2.join)(workspaceRoot, options.outputFile) : (0, import_path2.join)(workspaceRoot, "storm.schema.json"),
|
|
139457
140151
|
zodToJsonSchema(ModulesSchema, "StormConfig")
|
|
139458
140152
|
);
|
|
139459
|
-
await (0,
|
|
140153
|
+
await (0, import_devkit7.formatFiles)(tree);
|
|
139460
140154
|
return null;
|
|
139461
140155
|
}
|
|
139462
140156
|
var generator_default = withRunGenerator(
|
|
@@ -139465,9 +140159,9 @@ var generator_default = withRunGenerator(
|
|
|
139465
140159
|
);
|
|
139466
140160
|
|
|
139467
140161
|
// packages/workspace-tools/src/generators/init/init.ts
|
|
139468
|
-
var
|
|
140162
|
+
var import_devkit8 = __toESM(require_devkit());
|
|
139469
140163
|
async function stormInitGenerator(tree, schema) {
|
|
139470
|
-
const task = (0,
|
|
140164
|
+
const task = (0, import_devkit8.addDependenciesToPackageJson)(
|
|
139471
140165
|
tree,
|
|
139472
140166
|
{
|
|
139473
140167
|
"nx": nxVersion,
|
|
@@ -139480,15 +140174,15 @@ async function stormInitGenerator(tree, schema) {
|
|
|
139480
140174
|
{}
|
|
139481
140175
|
);
|
|
139482
140176
|
if (!schema.skipFormat) {
|
|
139483
|
-
await (0,
|
|
140177
|
+
await (0, import_devkit8.formatFiles)(tree);
|
|
139484
140178
|
}
|
|
139485
140179
|
return task;
|
|
139486
140180
|
}
|
|
139487
140181
|
|
|
139488
140182
|
// packages/workspace-tools/src/generators/node-library/generator.ts
|
|
139489
|
-
var
|
|
140183
|
+
var import_devkit9 = __toESM(require_devkit());
|
|
139490
140184
|
async function nodeLibraryGeneratorFn(tree, schema) {
|
|
139491
|
-
const filesDir = (0,
|
|
140185
|
+
const filesDir = (0, import_devkit9.joinPathFragments)(__dirname, "./files");
|
|
139492
140186
|
const tsLibraryGeneratorOptions = {
|
|
139493
140187
|
...schema,
|
|
139494
140188
|
platform: "node",
|
|
@@ -139498,10 +140192,10 @@ async function nodeLibraryGeneratorFn(tree, schema) {
|
|
|
139498
140192
|
buildExecutor: "@storm-software/workspace-tools:tsup-node"
|
|
139499
140193
|
};
|
|
139500
140194
|
const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
|
|
139501
|
-
const { className, name, propertyName } = (0,
|
|
140195
|
+
const { className, name, propertyName } = (0, import_devkit9.names)(
|
|
139502
140196
|
options.projectNames.projectFileName
|
|
139503
140197
|
);
|
|
139504
|
-
(0,
|
|
140198
|
+
(0, import_devkit9.generateFiles)(tree, filesDir, options.projectRoot, {
|
|
139505
140199
|
...schema,
|
|
139506
140200
|
dot: ".",
|
|
139507
140201
|
className,
|
|
@@ -139513,12 +140207,12 @@ async function nodeLibraryGeneratorFn(tree, schema) {
|
|
|
139513
140207
|
cliCommand: "nx",
|
|
139514
140208
|
strict: void 0,
|
|
139515
140209
|
tmpl: "",
|
|
139516
|
-
offsetFromRoot: (0,
|
|
140210
|
+
offsetFromRoot: (0, import_devkit9.offsetFromRoot)(options.projectRoot),
|
|
139517
140211
|
buildable: options.bundler && options.bundler !== "none",
|
|
139518
140212
|
hasUnitTestRunner: options.unitTestRunner !== "none"
|
|
139519
140213
|
});
|
|
139520
140214
|
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions);
|
|
139521
|
-
await (0,
|
|
140215
|
+
await (0, import_devkit9.formatFiles)(tree);
|
|
139522
140216
|
return null;
|
|
139523
140217
|
}
|
|
139524
140218
|
var generator_default2 = withRunGenerator(
|
|
@@ -139528,12 +140222,12 @@ var generator_default2 = withRunGenerator(
|
|
|
139528
140222
|
|
|
139529
140223
|
// packages/workspace-tools/src/generators/preset/generator.ts
|
|
139530
140224
|
var path2 = __toESM(require("path"));
|
|
139531
|
-
var
|
|
140225
|
+
var import_devkit10 = __toESM(require_devkit());
|
|
139532
140226
|
async function presetGeneratorFn(tree, options) {
|
|
139533
140227
|
const projectRoot = ".";
|
|
139534
140228
|
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
140229
|
options.namespace ??= options.organization;
|
|
139536
|
-
(0,
|
|
140230
|
+
(0, import_devkit10.addProjectConfiguration)(tree, `@${options.namespace}/${options.name}`, {
|
|
139537
140231
|
root: projectRoot,
|
|
139538
140232
|
projectType: "application",
|
|
139539
140233
|
targets: {
|
|
@@ -139547,7 +140241,7 @@ async function presetGeneratorFn(tree, options) {
|
|
|
139547
140241
|
}
|
|
139548
140242
|
}
|
|
139549
140243
|
});
|
|
139550
|
-
(0,
|
|
140244
|
+
(0, import_devkit10.updateJson)(tree, "package.json", (json) => {
|
|
139551
140245
|
json.scripts = json.scripts || {};
|
|
139552
140246
|
json.version = "0.0.0";
|
|
139553
140247
|
json.triggerEmptyDevReleaseByIncrementingThisNumber = 0;
|
|
@@ -139671,12 +140365,12 @@ async function presetGeneratorFn(tree, options) {
|
|
|
139671
140365
|
};
|
|
139672
140366
|
return json;
|
|
139673
140367
|
});
|
|
139674
|
-
(0,
|
|
140368
|
+
(0, import_devkit10.generateFiles)(tree, path2.join(__dirname, "files"), projectRoot, {
|
|
139675
140369
|
...options,
|
|
139676
140370
|
pnpmVersion,
|
|
139677
140371
|
nodeVersion
|
|
139678
140372
|
});
|
|
139679
|
-
await (0,
|
|
140373
|
+
await (0, import_devkit10.formatFiles)(tree);
|
|
139680
140374
|
let dependencies = {
|
|
139681
140375
|
"@nx/devkit": "^17.0.3",
|
|
139682
140376
|
"@nx/jest": "^17.0.3",
|
|
@@ -139737,11 +140431,11 @@ async function presetGeneratorFn(tree, options) {
|
|
|
139737
140431
|
};
|
|
139738
140432
|
}
|
|
139739
140433
|
await Promise.resolve(
|
|
139740
|
-
(0,
|
|
140434
|
+
(0, import_devkit10.addDependenciesToPackageJson)(
|
|
139741
140435
|
tree,
|
|
139742
140436
|
dependencies,
|
|
139743
140437
|
{},
|
|
139744
|
-
(0,
|
|
140438
|
+
(0, import_devkit10.joinPathFragments)(projectRoot, "package.json")
|
|
139745
140439
|
)
|
|
139746
140440
|
);
|
|
139747
140441
|
return null;
|
|
@@ -139914,6 +140608,7 @@ var WorkspaceStorage = class {
|
|
|
139914
140608
|
swcHelpersVersion,
|
|
139915
140609
|
swcNodeVersion,
|
|
139916
140610
|
tsLibVersion,
|
|
140611
|
+
tsupBrowserBuildExecutorFn,
|
|
139917
140612
|
tsupExecutorFn,
|
|
139918
140613
|
tsupNeutralBuildExecutorFn,
|
|
139919
140614
|
tsupNodeBuildExecutorFn,
|
|
@@ -139921,6 +140616,7 @@ var WorkspaceStorage = class {
|
|
|
139921
140616
|
typeScriptLibraryGeneratorFn,
|
|
139922
140617
|
typesNodeVersion,
|
|
139923
140618
|
typescriptVersion,
|
|
140619
|
+
typiaExecutorFn,
|
|
139924
140620
|
verdaccioVersion,
|
|
139925
140621
|
withRunExecutor,
|
|
139926
140622
|
withRunGenerator
|