@storm-software/workspace-tools 1.19.1 → 1.19.3
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 +15 -0
- package/README.md +1 -1
- package/index.js +144 -148
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup-neutral/executor.js +1400 -1534
- package/src/generators/config-schema/generator.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [1.19.2](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.19.1...workspace-tools-v1.19.2) (2023-12-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **config-tools:** Resolved issue with updated `createStormConfig` schema ([cbc6941](https://github.com/storm-software/storm-ops/commit/cbc69413e1ebbf5521c638401a34c604f25c2854))
|
|
7
|
+
* **config-tools:** Updated the config schema's default values ([42fc718](https://github.com/storm-software/storm-ops/commit/42fc7183f2725e435d006897fb349c02f7454ff9))
|
|
8
|
+
|
|
9
|
+
## [1.19.1](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.19.0...workspace-tools-v1.19.1) (2023-12-02)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **workspace-tools:** Added new executors to `additionalEntryPoints` configuration ([f7289c7](https://github.com/storm-software/storm-ops/commit/f7289c7b21eba99e0a70147767b1f28fea242854))
|
|
15
|
+
|
|
1
16
|
# [1.19.0](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.18.0...workspace-tools-v1.19.0) (2023-12-02)
|
|
2
17
|
|
|
3
18
|
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
16
16
|
|
|
17
17
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.org" target="_blank">stormsoftware.org</a> to stay up to date with this developer</h3><br />
|
|
18
18
|
|
|
19
|
-
[](https://prettier.io/)
|
|
20
20
|
[](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://docusaurus.io/) 
|
|
21
21
|
|
|
22
22
|
<h3 align="center" bold="true">⚠️ <b>Attention</b> ⚠️ This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.</h3><br />
|
package/index.js
CHANGED
|
@@ -105367,136 +105367,6 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
|
|
|
105367
105367
|
}
|
|
105368
105368
|
};
|
|
105369
105369
|
|
|
105370
|
-
// node_modules/.pnpm/esbuild-plugin-pino@2.1.0_esbuild@0.19.5/node_modules/esbuild-plugin-pino/dist/index.mjs
|
|
105371
|
-
var import_module = require("module");
|
|
105372
|
-
var import_node_path = __toESM(require("node:path"), 1);
|
|
105373
|
-
var import_promises2 = require("node:fs/promises");
|
|
105374
|
-
var import_meta2 = {};
|
|
105375
|
-
var require$1 = true ? /* @__PURE__ */ (0, import_module.createRequire)(import_meta2.url) : require;
|
|
105376
|
-
function isStringArray(entryPoints) {
|
|
105377
|
-
if (Array.isArray(entryPoints) && entryPoints.some((entrypoint) => typeof entrypoint === "string"))
|
|
105378
|
-
return true;
|
|
105379
|
-
return false;
|
|
105380
|
-
}
|
|
105381
|
-
function transformToObject(entryPoints, outbase) {
|
|
105382
|
-
const separator = entryPoints[0].includes("\\") ? import_node_path.default.win32.sep : import_node_path.default.posix.sep;
|
|
105383
|
-
if (!outbase) {
|
|
105384
|
-
const hierarchy = entryPoints[0].split(separator);
|
|
105385
|
-
let i = 0;
|
|
105386
|
-
outbase = "";
|
|
105387
|
-
let nextOutbase = "";
|
|
105388
|
-
do {
|
|
105389
|
-
outbase = nextOutbase;
|
|
105390
|
-
i++;
|
|
105391
|
-
nextOutbase = hierarchy.slice(0, i).join(separator);
|
|
105392
|
-
} while (entryPoints.every(
|
|
105393
|
-
(entrypoint) => entrypoint.startsWith(`${nextOutbase}${separator}`)
|
|
105394
|
-
));
|
|
105395
|
-
}
|
|
105396
|
-
const newEntrypoints = {};
|
|
105397
|
-
for (const entrypoint of entryPoints) {
|
|
105398
|
-
const destination = (outbase ? entrypoint.replace(`${outbase}${separator}`, "") : entrypoint).replace(/.(js|ts)$/, "");
|
|
105399
|
-
newEntrypoints[destination] = entrypoint;
|
|
105400
|
-
}
|
|
105401
|
-
return newEntrypoints;
|
|
105402
|
-
}
|
|
105403
|
-
function transformToNewEntryPointsType(entryPoints) {
|
|
105404
|
-
const newEntrypointsType = [];
|
|
105405
|
-
for (const [key, value] of Object.entries(entryPoints)) {
|
|
105406
|
-
newEntrypointsType.push({ in: value, out: key });
|
|
105407
|
-
}
|
|
105408
|
-
return newEntrypointsType;
|
|
105409
|
-
}
|
|
105410
|
-
function esbuildPluginPino({
|
|
105411
|
-
transports = []
|
|
105412
|
-
}) {
|
|
105413
|
-
return {
|
|
105414
|
-
name: "pino",
|
|
105415
|
-
setup(currentBuild) {
|
|
105416
|
-
const pino = import_node_path.default.dirname(require$1.resolve("pino"));
|
|
105417
|
-
const threadStream = import_node_path.default.dirname(require$1.resolve("thread-stream"));
|
|
105418
|
-
const { entryPoints, outbase, outExtension: outExtension2 } = currentBuild.initialOptions;
|
|
105419
|
-
const customEntrypoints = {
|
|
105420
|
-
"thread-stream-worker": import_node_path.default.join(threadStream, "lib/worker.js"),
|
|
105421
|
-
"pino-worker": import_node_path.default.join(pino, "lib/worker.js"),
|
|
105422
|
-
"pino-pipeline-worker": import_node_path.default.join(pino, "lib/worker-pipeline.js"),
|
|
105423
|
-
"pino-file": import_node_path.default.join(pino, "file.js")
|
|
105424
|
-
};
|
|
105425
|
-
const transportsEntrypoints = Object.fromEntries(
|
|
105426
|
-
transports.map((transport) => [transport, require$1.resolve(transport)])
|
|
105427
|
-
);
|
|
105428
|
-
let newEntrypoints = [];
|
|
105429
|
-
if (isStringArray(entryPoints)) {
|
|
105430
|
-
newEntrypoints = transformToNewEntryPointsType({
|
|
105431
|
-
...transformToObject(entryPoints, outbase),
|
|
105432
|
-
...customEntrypoints,
|
|
105433
|
-
...transportsEntrypoints
|
|
105434
|
-
});
|
|
105435
|
-
} else if (Array.isArray(entryPoints)) {
|
|
105436
|
-
newEntrypoints = [
|
|
105437
|
-
...entryPoints,
|
|
105438
|
-
...transformToNewEntryPointsType({
|
|
105439
|
-
...customEntrypoints,
|
|
105440
|
-
...transportsEntrypoints
|
|
105441
|
-
})
|
|
105442
|
-
];
|
|
105443
|
-
} else {
|
|
105444
|
-
newEntrypoints = transformToNewEntryPointsType({
|
|
105445
|
-
...entryPoints,
|
|
105446
|
-
...customEntrypoints,
|
|
105447
|
-
...transportsEntrypoints
|
|
105448
|
-
});
|
|
105449
|
-
}
|
|
105450
|
-
currentBuild.initialOptions.entryPoints = newEntrypoints;
|
|
105451
|
-
let pinoBundlerRan = false;
|
|
105452
|
-
currentBuild.onEnd(() => {
|
|
105453
|
-
pinoBundlerRan = false;
|
|
105454
|
-
});
|
|
105455
|
-
currentBuild.onLoad({ filter: /pino\.js$/ }, async (args) => {
|
|
105456
|
-
if (pinoBundlerRan)
|
|
105457
|
-
return;
|
|
105458
|
-
pinoBundlerRan = true;
|
|
105459
|
-
const contents = await (0, import_promises2.readFile)(args.path, "utf8");
|
|
105460
|
-
let absoluteOutputPath = "";
|
|
105461
|
-
const { outdir = "dist" } = currentBuild.initialOptions;
|
|
105462
|
-
if (import_node_path.default.isAbsolute(outdir)) {
|
|
105463
|
-
absoluteOutputPath = outdir.replace(/\\/g, "\\\\");
|
|
105464
|
-
} else {
|
|
105465
|
-
const workingDir = currentBuild.initialOptions.absWorkingDir ? `"${currentBuild.initialOptions.absWorkingDir.replace(/\\/g, "\\\\")}"` : "process.cwd()";
|
|
105466
|
-
absoluteOutputPath = `\${${workingDir}}\${require('path').sep}${currentBuild.initialOptions.outdir || "dist"}`;
|
|
105467
|
-
}
|
|
105468
|
-
const functionDeclaration = `
|
|
105469
|
-
function pinoBundlerAbsolutePath(p) {
|
|
105470
|
-
try {
|
|
105471
|
-
return require('path').join(\`${absoluteOutputPath}\`.replace(/\\\\/g, '/'), p)
|
|
105472
|
-
} catch(e) {
|
|
105473
|
-
const f = new Function('p', 'return new URL(p, import.meta.url).pathname');
|
|
105474
|
-
return f(p)
|
|
105475
|
-
}
|
|
105476
|
-
}
|
|
105477
|
-
`;
|
|
105478
|
-
let extension = ".js";
|
|
105479
|
-
if (outExtension2 && outExtension2[".js"]) {
|
|
105480
|
-
extension = outExtension2[".js"];
|
|
105481
|
-
}
|
|
105482
|
-
const pinoOverrides = Object.keys({
|
|
105483
|
-
...customEntrypoints,
|
|
105484
|
-
...transportsEntrypoints
|
|
105485
|
-
}).map(
|
|
105486
|
-
(id) => `'${id === "pino-file" ? "pino/file" : id}': pinoBundlerAbsolutePath('./${id}${extension}')`
|
|
105487
|
-
).join(",");
|
|
105488
|
-
const globalThisDeclaration = `
|
|
105489
|
-
globalThis.__bundlerPathsOverrides = { ...(globalThis.__bundlerPathsOverrides || {}), ${pinoOverrides}}
|
|
105490
|
-
`;
|
|
105491
|
-
const code = functionDeclaration + globalThisDeclaration;
|
|
105492
|
-
return {
|
|
105493
|
-
contents: code + contents
|
|
105494
|
-
};
|
|
105495
|
-
});
|
|
105496
|
-
}
|
|
105497
|
-
};
|
|
105498
|
-
}
|
|
105499
|
-
|
|
105500
105370
|
// packages/workspace-tools/src/utils/get-file-banner.ts
|
|
105501
105371
|
var getFileBanner = (name, commentStart = "//") => {
|
|
105502
105372
|
let padding = "";
|
|
@@ -105580,7 +105450,7 @@ var environmentPlugin = (data) => ({
|
|
|
105580
105450
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
105581
105451
|
var import_fs3 = require("fs");
|
|
105582
105452
|
var import_fs_extra = __toESM(require_lib4());
|
|
105583
|
-
var
|
|
105453
|
+
var import_promises3 = require("fs/promises");
|
|
105584
105454
|
|
|
105585
105455
|
// node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/mjs/index.js
|
|
105586
105456
|
var import_brace_expansion = __toESM(require_brace_expansion2(), 1);
|
|
@@ -106251,11 +106121,11 @@ var qmarksTestNoExtDot = ([$0]) => {
|
|
|
106251
106121
|
return (f) => f.length === len && f !== "." && f !== "..";
|
|
106252
106122
|
};
|
|
106253
106123
|
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
106254
|
-
var
|
|
106124
|
+
var path = {
|
|
106255
106125
|
win32: { sep: "\\" },
|
|
106256
106126
|
posix: { sep: "/" }
|
|
106257
106127
|
};
|
|
106258
|
-
var sep = defaultPlatform === "win32" ?
|
|
106128
|
+
var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
|
|
106259
106129
|
minimatch.sep = sep;
|
|
106260
106130
|
var GLOBSTAR = Symbol("globstar **");
|
|
106261
106131
|
minimatch.GLOBSTAR = GLOBSTAR;
|
|
@@ -108146,7 +108016,7 @@ var import_path2 = require("path");
|
|
|
108146
108016
|
var import_url = require("url");
|
|
108147
108017
|
var actualFS = __toESM(require("fs"), 1);
|
|
108148
108018
|
var import_fs2 = require("fs");
|
|
108149
|
-
var
|
|
108019
|
+
var import_promises2 = require("fs/promises");
|
|
108150
108020
|
|
|
108151
108021
|
// node_modules/.pnpm/minipass@7.0.4/node_modules/minipass/dist/esm/index.js
|
|
108152
108022
|
var import_events = require("events");
|
|
@@ -109035,10 +108905,10 @@ var defaultFS = {
|
|
|
109035
108905
|
readlinkSync: import_fs2.readlinkSync,
|
|
109036
108906
|
realpathSync,
|
|
109037
108907
|
promises: {
|
|
109038
|
-
lstat:
|
|
109039
|
-
readdir:
|
|
109040
|
-
readlink:
|
|
109041
|
-
realpath:
|
|
108908
|
+
lstat: import_promises2.lstat,
|
|
108909
|
+
readdir: import_promises2.readdir,
|
|
108910
|
+
readlink: import_promises2.readlink,
|
|
108911
|
+
realpath: import_promises2.realpath
|
|
109042
108912
|
}
|
|
109043
108913
|
};
|
|
109044
108914
|
var fsFromOption = (fsOption) => !fsOption || fsOption === defaultFS || fsOption === actualFS ? defaultFS : {
|
|
@@ -111765,13 +111635,13 @@ var import_tsup2 = __toESM(require_dist6());
|
|
|
111765
111635
|
var ts = __toESM(require("typescript"));
|
|
111766
111636
|
|
|
111767
111637
|
// packages/workspace-tools/src/utils/file-path-utils.ts
|
|
111768
|
-
var
|
|
111638
|
+
var import_node_path = require("node:path");
|
|
111769
111639
|
var removeExtension = (filePath) => {
|
|
111770
111640
|
return filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
111771
111641
|
};
|
|
111772
111642
|
function findFileName(filePath) {
|
|
111773
111643
|
return filePath?.split(
|
|
111774
|
-
filePath?.includes(
|
|
111644
|
+
filePath?.includes(import_node_path.sep) ? import_node_path.sep : filePath?.includes("/") ? "/" : "\\"
|
|
111775
111645
|
)?.pop() ?? "";
|
|
111776
111646
|
}
|
|
111777
111647
|
|
|
@@ -112270,7 +112140,7 @@ ${externalDependencies.map((dep) => {
|
|
|
112270
112140
|
]);
|
|
112271
112141
|
await Promise.allSettled(
|
|
112272
112142
|
files.map(
|
|
112273
|
-
(file) => (0,
|
|
112143
|
+
(file) => (0, import_promises3.writeFile)(
|
|
112274
112144
|
file,
|
|
112275
112145
|
`${options.banner ? options.banner.startsWith("//") ? options.banner : `// ${options.banner}` : ""}
|
|
112276
112146
|
|
|
@@ -112386,10 +112256,6 @@ var executor_default = tsupExecutor;
|
|
|
112386
112256
|
// packages/workspace-tools/src/executors/tsup-neutral/executor.ts
|
|
112387
112257
|
var tsNeutralBuildExecutorFn = (options, context, config) => {
|
|
112388
112258
|
options.plugins ??= [];
|
|
112389
|
-
options.transports ??= ["pino-pretty"];
|
|
112390
|
-
if (options.transports && Array.isArray(options.transports) && options.transports.length > 0) {
|
|
112391
|
-
options.plugins.push(esbuildPluginPino({ transports: options.transports }));
|
|
112392
|
-
}
|
|
112393
112259
|
return executor_default(
|
|
112394
112260
|
{
|
|
112395
112261
|
...options,
|
|
@@ -112416,6 +112282,136 @@ var executor_default2 = withRunExecutor(
|
|
|
112416
112282
|
tsNeutralBuildExecutorFn
|
|
112417
112283
|
);
|
|
112418
112284
|
|
|
112285
|
+
// node_modules/.pnpm/esbuild-plugin-pino@2.1.0_esbuild@0.19.5/node_modules/esbuild-plugin-pino/dist/index.mjs
|
|
112286
|
+
var import_module = require("module");
|
|
112287
|
+
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
112288
|
+
var import_promises4 = require("node:fs/promises");
|
|
112289
|
+
var import_meta2 = {};
|
|
112290
|
+
var require$1 = true ? /* @__PURE__ */ (0, import_module.createRequire)(import_meta2.url) : require;
|
|
112291
|
+
function isStringArray(entryPoints) {
|
|
112292
|
+
if (Array.isArray(entryPoints) && entryPoints.some((entrypoint) => typeof entrypoint === "string"))
|
|
112293
|
+
return true;
|
|
112294
|
+
return false;
|
|
112295
|
+
}
|
|
112296
|
+
function transformToObject(entryPoints, outbase) {
|
|
112297
|
+
const separator = entryPoints[0].includes("\\") ? import_node_path2.default.win32.sep : import_node_path2.default.posix.sep;
|
|
112298
|
+
if (!outbase) {
|
|
112299
|
+
const hierarchy = entryPoints[0].split(separator);
|
|
112300
|
+
let i = 0;
|
|
112301
|
+
outbase = "";
|
|
112302
|
+
let nextOutbase = "";
|
|
112303
|
+
do {
|
|
112304
|
+
outbase = nextOutbase;
|
|
112305
|
+
i++;
|
|
112306
|
+
nextOutbase = hierarchy.slice(0, i).join(separator);
|
|
112307
|
+
} while (entryPoints.every(
|
|
112308
|
+
(entrypoint) => entrypoint.startsWith(`${nextOutbase}${separator}`)
|
|
112309
|
+
));
|
|
112310
|
+
}
|
|
112311
|
+
const newEntrypoints = {};
|
|
112312
|
+
for (const entrypoint of entryPoints) {
|
|
112313
|
+
const destination = (outbase ? entrypoint.replace(`${outbase}${separator}`, "") : entrypoint).replace(/.(js|ts)$/, "");
|
|
112314
|
+
newEntrypoints[destination] = entrypoint;
|
|
112315
|
+
}
|
|
112316
|
+
return newEntrypoints;
|
|
112317
|
+
}
|
|
112318
|
+
function transformToNewEntryPointsType(entryPoints) {
|
|
112319
|
+
const newEntrypointsType = [];
|
|
112320
|
+
for (const [key, value] of Object.entries(entryPoints)) {
|
|
112321
|
+
newEntrypointsType.push({ in: value, out: key });
|
|
112322
|
+
}
|
|
112323
|
+
return newEntrypointsType;
|
|
112324
|
+
}
|
|
112325
|
+
function esbuildPluginPino({
|
|
112326
|
+
transports = []
|
|
112327
|
+
}) {
|
|
112328
|
+
return {
|
|
112329
|
+
name: "pino",
|
|
112330
|
+
setup(currentBuild) {
|
|
112331
|
+
const pino = import_node_path2.default.dirname(require$1.resolve("pino"));
|
|
112332
|
+
const threadStream = import_node_path2.default.dirname(require$1.resolve("thread-stream"));
|
|
112333
|
+
const { entryPoints, outbase, outExtension: outExtension2 } = currentBuild.initialOptions;
|
|
112334
|
+
const customEntrypoints = {
|
|
112335
|
+
"thread-stream-worker": import_node_path2.default.join(threadStream, "lib/worker.js"),
|
|
112336
|
+
"pino-worker": import_node_path2.default.join(pino, "lib/worker.js"),
|
|
112337
|
+
"pino-pipeline-worker": import_node_path2.default.join(pino, "lib/worker-pipeline.js"),
|
|
112338
|
+
"pino-file": import_node_path2.default.join(pino, "file.js")
|
|
112339
|
+
};
|
|
112340
|
+
const transportsEntrypoints = Object.fromEntries(
|
|
112341
|
+
transports.map((transport) => [transport, require$1.resolve(transport)])
|
|
112342
|
+
);
|
|
112343
|
+
let newEntrypoints = [];
|
|
112344
|
+
if (isStringArray(entryPoints)) {
|
|
112345
|
+
newEntrypoints = transformToNewEntryPointsType({
|
|
112346
|
+
...transformToObject(entryPoints, outbase),
|
|
112347
|
+
...customEntrypoints,
|
|
112348
|
+
...transportsEntrypoints
|
|
112349
|
+
});
|
|
112350
|
+
} else if (Array.isArray(entryPoints)) {
|
|
112351
|
+
newEntrypoints = [
|
|
112352
|
+
...entryPoints,
|
|
112353
|
+
...transformToNewEntryPointsType({
|
|
112354
|
+
...customEntrypoints,
|
|
112355
|
+
...transportsEntrypoints
|
|
112356
|
+
})
|
|
112357
|
+
];
|
|
112358
|
+
} else {
|
|
112359
|
+
newEntrypoints = transformToNewEntryPointsType({
|
|
112360
|
+
...entryPoints,
|
|
112361
|
+
...customEntrypoints,
|
|
112362
|
+
...transportsEntrypoints
|
|
112363
|
+
});
|
|
112364
|
+
}
|
|
112365
|
+
currentBuild.initialOptions.entryPoints = newEntrypoints;
|
|
112366
|
+
let pinoBundlerRan = false;
|
|
112367
|
+
currentBuild.onEnd(() => {
|
|
112368
|
+
pinoBundlerRan = false;
|
|
112369
|
+
});
|
|
112370
|
+
currentBuild.onLoad({ filter: /pino\.js$/ }, async (args) => {
|
|
112371
|
+
if (pinoBundlerRan)
|
|
112372
|
+
return;
|
|
112373
|
+
pinoBundlerRan = true;
|
|
112374
|
+
const contents = await (0, import_promises4.readFile)(args.path, "utf8");
|
|
112375
|
+
let absoluteOutputPath = "";
|
|
112376
|
+
const { outdir = "dist" } = currentBuild.initialOptions;
|
|
112377
|
+
if (import_node_path2.default.isAbsolute(outdir)) {
|
|
112378
|
+
absoluteOutputPath = outdir.replace(/\\/g, "\\\\");
|
|
112379
|
+
} else {
|
|
112380
|
+
const workingDir = currentBuild.initialOptions.absWorkingDir ? `"${currentBuild.initialOptions.absWorkingDir.replace(/\\/g, "\\\\")}"` : "process.cwd()";
|
|
112381
|
+
absoluteOutputPath = `\${${workingDir}}\${require('path').sep}${currentBuild.initialOptions.outdir || "dist"}`;
|
|
112382
|
+
}
|
|
112383
|
+
const functionDeclaration = `
|
|
112384
|
+
function pinoBundlerAbsolutePath(p) {
|
|
112385
|
+
try {
|
|
112386
|
+
return require('path').join(\`${absoluteOutputPath}\`.replace(/\\\\/g, '/'), p)
|
|
112387
|
+
} catch(e) {
|
|
112388
|
+
const f = new Function('p', 'return new URL(p, import.meta.url).pathname');
|
|
112389
|
+
return f(p)
|
|
112390
|
+
}
|
|
112391
|
+
}
|
|
112392
|
+
`;
|
|
112393
|
+
let extension = ".js";
|
|
112394
|
+
if (outExtension2 && outExtension2[".js"]) {
|
|
112395
|
+
extension = outExtension2[".js"];
|
|
112396
|
+
}
|
|
112397
|
+
const pinoOverrides = Object.keys({
|
|
112398
|
+
...customEntrypoints,
|
|
112399
|
+
...transportsEntrypoints
|
|
112400
|
+
}).map(
|
|
112401
|
+
(id) => `'${id === "pino-file" ? "pino/file" : id}': pinoBundlerAbsolutePath('./${id}${extension}')`
|
|
112402
|
+
).join(",");
|
|
112403
|
+
const globalThisDeclaration = `
|
|
112404
|
+
globalThis.__bundlerPathsOverrides = { ...(globalThis.__bundlerPathsOverrides || {}), ${pinoOverrides}}
|
|
112405
|
+
`;
|
|
112406
|
+
const code = functionDeclaration + globalThisDeclaration;
|
|
112407
|
+
return {
|
|
112408
|
+
contents: code + contents
|
|
112409
|
+
};
|
|
112410
|
+
});
|
|
112411
|
+
}
|
|
112412
|
+
};
|
|
112413
|
+
}
|
|
112414
|
+
|
|
112419
112415
|
// packages/workspace-tools/src/executors/tsup-node/executor.ts
|
|
112420
112416
|
var tsNodeBuildExecutorFn = (options, context, config) => {
|
|
112421
112417
|
options.plugins ??= [];
|
|
@@ -116057,13 +116053,13 @@ var StormConfigSchema = objectType({
|
|
|
116057
116053
|
worker: stringType().trim().default("stormie-bot").describe(
|
|
116058
116054
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
116059
116055
|
),
|
|
116060
|
-
env: enumType(["development", "staging", "production"]).default("
|
|
116061
|
-
ci: booleanType().default(
|
|
116056
|
+
env: enumType(["development", "staging", "production"]).default("production").describe("The current runtime environment of the package"),
|
|
116057
|
+
ci: booleanType().default(true).describe(
|
|
116062
116058
|
"An indicator specifying if the current environment is a CI environment"
|
|
116063
116059
|
),
|
|
116064
116060
|
workspaceRoot: stringType().trim().describe("The root directory of the workspace"),
|
|
116065
116061
|
packageDirectory: stringType().trim().optional().describe("The root directory of the package"),
|
|
116066
|
-
buildDirectory: stringType().trim().
|
|
116062
|
+
buildDirectory: stringType().trim().default("dist").describe("The build directory for the workspace"),
|
|
116067
116063
|
runtimeDirectory: stringType().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
|
|
116068
116064
|
runtimeVersion: stringType().trim().regex(
|
|
116069
116065
|
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
|