@storm-software/workspace-tools 1.44.0 → 1.45.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/index.js +88 -86
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +467 -22499
- package/src/executors/tsup/schema.d.ts +0 -1
- package/src/executors/tsup/schema.json +0 -5
- package/src/executors/tsup-browser/executor.js +467 -22499
- package/src/executors/tsup-neutral/executor.js +467 -22499
- package/src/executors/tsup-node/executor.js +467 -22499
- package/src/executors/typia/executor.js +30171 -27964
- package/src/executors/typia/schema.d.ts +2 -1
- package/src/executors/typia/schema.json +12 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.45.0](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.44.0...workspace-tools-v1.45.0) (2024-01-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **workspace-tools:** Added the `clean` option to the typia executor ([56d8121](https://github.com/storm-software/storm-ops/commit/56d8121068cd63706e6fdd123259d5bb9b8860bc))
|
|
7
|
+
|
|
8
|
+
# [1.44.0](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.43.21...workspace-tools-v1.44.0) (2024-01-18)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **workspace-tools:** Added the `typia` executor ([feb49f7](https://github.com/storm-software/storm-ops/commit/feb49f71a2b54c14c4ea34ebbde529b89e6b4b42))
|
|
14
|
+
|
|
1
15
|
## [1.43.21](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.43.20...workspace-tools-v1.43.21) (2024-01-18)
|
|
2
16
|
|
|
3
17
|
|
package/index.js
CHANGED
|
@@ -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
|
}
|
|
@@ -104297,6 +104297,73 @@ var require_dist6 = __commonJS({
|
|
|
104297
104297
|
}
|
|
104298
104298
|
});
|
|
104299
104299
|
|
|
104300
|
+
// node_modules/.pnpm/typia@5.3.9_typescript@5.2.2/node_modules/typia/lib/transformers/ImportTransformer.js
|
|
104301
|
+
var require_ImportTransformer = __commonJS({
|
|
104302
|
+
"node_modules/.pnpm/typia@5.3.9_typescript@5.2.2/node_modules/typia/lib/transformers/ImportTransformer.js"(exports) {
|
|
104303
|
+
"use strict";
|
|
104304
|
+
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
104305
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
104306
|
+
};
|
|
104307
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
104308
|
+
exports.ImportTransformer = void 0;
|
|
104309
|
+
var path_1 = __importDefault2(require("path"));
|
|
104310
|
+
var typescript_1 = __importDefault2(require("typescript"));
|
|
104311
|
+
var ImportTransformer;
|
|
104312
|
+
(function(ImportTransformer2) {
|
|
104313
|
+
ImportTransformer2.transform = function(from) {
|
|
104314
|
+
return function(to) {
|
|
104315
|
+
return function(context) {
|
|
104316
|
+
return function(file) {
|
|
104317
|
+
return transform_file(from)(to)(context)(file);
|
|
104318
|
+
};
|
|
104319
|
+
};
|
|
104320
|
+
};
|
|
104321
|
+
};
|
|
104322
|
+
var transform_file = function(top) {
|
|
104323
|
+
return function(to) {
|
|
104324
|
+
return function(context) {
|
|
104325
|
+
return function(file) {
|
|
104326
|
+
if (file.isDeclarationFile)
|
|
104327
|
+
return file;
|
|
104328
|
+
var from = get_directory_path(path_1.default.resolve(file.getSourceFile().fileName));
|
|
104329
|
+
to = from.replace(top, to);
|
|
104330
|
+
return typescript_1.default.visitEachChild(file, function(node) {
|
|
104331
|
+
return transform_node(top)(from)(to)(node);
|
|
104332
|
+
}, context);
|
|
104333
|
+
};
|
|
104334
|
+
};
|
|
104335
|
+
};
|
|
104336
|
+
};
|
|
104337
|
+
var transform_node = function(top) {
|
|
104338
|
+
return function(from) {
|
|
104339
|
+
return function(to) {
|
|
104340
|
+
return function(node) {
|
|
104341
|
+
if (!typescript_1.default.isImportDeclaration(node) || !typescript_1.default.isStringLiteral(node.moduleSpecifier))
|
|
104342
|
+
return node;
|
|
104343
|
+
var text = node.moduleSpecifier.text;
|
|
104344
|
+
if (text[0] !== ".")
|
|
104345
|
+
return node;
|
|
104346
|
+
var location = path_1.default.resolve(from, text);
|
|
104347
|
+
if (location.indexOf(top) === 0)
|
|
104348
|
+
return node;
|
|
104349
|
+
var replaced = function() {
|
|
104350
|
+
var simple = path_1.default.relative(to, location).split(path_1.default.sep).join("/");
|
|
104351
|
+
return simple[0] === "." ? simple : "./".concat(simple);
|
|
104352
|
+
}();
|
|
104353
|
+
return typescript_1.default.factory.createImportDeclaration(void 0, node.importClause, typescript_1.default.factory.createStringLiteral(replaced), node.assertClause);
|
|
104354
|
+
};
|
|
104355
|
+
};
|
|
104356
|
+
};
|
|
104357
|
+
};
|
|
104358
|
+
})(ImportTransformer || (exports.ImportTransformer = ImportTransformer = {}));
|
|
104359
|
+
var get_directory_path = function(file) {
|
|
104360
|
+
var splitted = path_1.default.resolve(file).split(path_1.default.sep);
|
|
104361
|
+
splitted.pop();
|
|
104362
|
+
return path_1.default.resolve(splitted.join(path_1.default.sep));
|
|
104363
|
+
};
|
|
104364
|
+
}
|
|
104365
|
+
});
|
|
104366
|
+
|
|
104300
104367
|
// node_modules/.pnpm/typia@5.3.9_typescript@5.2.2/node_modules/typia/lib/utils/Singleton.js
|
|
104301
104368
|
var require_Singleton = __commonJS({
|
|
104302
104369
|
"node_modules/.pnpm/typia@5.3.9_typescript@5.2.2/node_modules/typia/lib/utils/Singleton.js"(exports) {
|
|
@@ -126321,73 +126388,6 @@ var require_transform = __commonJS({
|
|
|
126321
126388
|
}
|
|
126322
126389
|
});
|
|
126323
126390
|
|
|
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
126391
|
// node_modules/.pnpm/typia@5.3.9_typescript@5.2.2/node_modules/typia/lib/programmers/TypiaProgrammer.js
|
|
126392
126392
|
var require_TypiaProgrammer = __commonJS({
|
|
126393
126393
|
"node_modules/.pnpm/typia@5.3.9_typescript@5.2.2/node_modules/typia/lib/programmers/TypiaProgrammer.js"(exports) {
|
|
@@ -138108,10 +138108,6 @@ function getExternalDependencies(projectName, graph) {
|
|
|
138108
138108
|
);
|
|
138109
138109
|
}
|
|
138110
138110
|
|
|
138111
|
-
// packages/workspace-tools/src/utils/typia-transform.ts
|
|
138112
|
-
var import_transform = __toESM(require_transform());
|
|
138113
|
-
var getTypiaTransform = (program, diagnostics) => (0, import_transform.default)(program, {}, { addDiagnostic: (input) => diagnostics.push(input) });
|
|
138114
|
-
|
|
138115
138111
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
138116
138112
|
async function tsupExecutorFn(options, context, config) {
|
|
138117
138113
|
writeInfo(config, "\u{1F4E6} Running Storm build executor on the workspace");
|
|
@@ -138132,9 +138128,7 @@ ${Object.keys(options).map(
|
|
|
138132
138128
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
138133
138129
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
|
|
138134
138130
|
if (options.clean !== false) {
|
|
138135
|
-
|
|
138136
|
-
writeInfo(config, `\u{1F9F9} Cleaning output path: ${options.outputPath}`);
|
|
138137
|
-
}
|
|
138131
|
+
writeInfo(config, `\u{1F9F9} Cleaning output path: ${options.outputPath}`);
|
|
138138
138132
|
(0, import_fs_extra.removeSync)(options.outputPath);
|
|
138139
138133
|
}
|
|
138140
138134
|
const assets = Array.from(options.assets);
|
|
@@ -138485,8 +138479,7 @@ ${options.banner}
|
|
|
138485
138479
|
*/`
|
|
138486
138480
|
} : void 0,
|
|
138487
138481
|
outputPath: options.outputPath,
|
|
138488
|
-
entry
|
|
138489
|
-
getTransform: options.skipTypia ? void 0 : getTypiaTransform
|
|
138482
|
+
entry
|
|
138490
138483
|
};
|
|
138491
138484
|
if (options.getConfig) {
|
|
138492
138485
|
writeInfo(config, "\u26A1 Running the Build process");
|
|
@@ -138577,7 +138570,6 @@ var applyDefaultOptions = (options) => {
|
|
|
138577
138570
|
options.tsdocMetadata ??= true;
|
|
138578
138571
|
options.emitOnAll ??= false;
|
|
138579
138572
|
options.metafile ??= false;
|
|
138580
|
-
options.skipTypia ??= false;
|
|
138581
138573
|
options.define ??= {};
|
|
138582
138574
|
options.env ??= {};
|
|
138583
138575
|
options.getConfig ??= { dist: defaultConfig };
|
|
@@ -139061,10 +139053,15 @@ var executor_default4 = withRunExecutor(
|
|
|
139061
139053
|
);
|
|
139062
139054
|
|
|
139063
139055
|
// packages/workspace-tools/src/executors/typia/executor.ts
|
|
139056
|
+
var import_fs_extra2 = __toESM(require_lib4());
|
|
139064
139057
|
var import_TypiaProgrammer = __toESM(require_TypiaProgrammer());
|
|
139065
|
-
async function typiaExecutorFn(options, _,
|
|
139058
|
+
async function typiaExecutorFn(options, _, config) {
|
|
139059
|
+
if (options.clean !== false) {
|
|
139060
|
+
writeInfo(config, `\u{1F9F9} Cleaning output path: ${options.outputPath}`);
|
|
139061
|
+
(0, import_fs_extra2.removeSync)(options.outputPath);
|
|
139062
|
+
}
|
|
139066
139063
|
await import_TypiaProgrammer.TypiaProgrammer.build({
|
|
139067
|
-
input: options.
|
|
139064
|
+
input: options.entryPath,
|
|
139068
139065
|
output: options.outputPath,
|
|
139069
139066
|
project: options.tsConfig
|
|
139070
139067
|
});
|
|
@@ -139079,9 +139076,10 @@ var executor_default5 = withRunExecutor(
|
|
|
139079
139076
|
skipReadingConfig: false,
|
|
139080
139077
|
hooks: {
|
|
139081
139078
|
applyDefaultOptions: (options) => {
|
|
139082
|
-
options.
|
|
139079
|
+
options.entryPath ??= "{sourceRoot}";
|
|
139083
139080
|
options.outputPath ??= "{sourceRoot}/__generated__/typia";
|
|
139084
|
-
options.tsConfig ??= "tsconfig.json";
|
|
139081
|
+
options.tsConfig ??= "{projectRoot}/tsconfig.json";
|
|
139082
|
+
options.clean ??= true;
|
|
139085
139083
|
return options;
|
|
139086
139084
|
}
|
|
139087
139085
|
}
|
|
@@ -140494,6 +140492,10 @@ function findCacheDirectory({
|
|
|
140494
140492
|
);
|
|
140495
140493
|
}
|
|
140496
140494
|
|
|
140495
|
+
// packages/workspace-tools/src/utils/typia-transform.ts
|
|
140496
|
+
var import_transform = __toESM(require_transform());
|
|
140497
|
+
var getTypiaTransform = (program, diagnostics) => (0, import_transform.default)(program, {}, { addDiagnostic: (input) => diagnostics.push(input) });
|
|
140498
|
+
|
|
140497
140499
|
// packages/workspace-tools/src/utils/workspace-storage.ts
|
|
140498
140500
|
var import_node_fs4 = require("node:fs");
|
|
140499
140501
|
var import_node_path5 = require("node:path");
|