@storm-software/esbuild 0.41.8 → 0.42.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/README.md +1 -1
- package/dist/assets.cjs +6 -6
- package/dist/assets.js +5 -5
- package/dist/build.cjs +13 -13
- package/dist/build.js +12 -12
- package/dist/{chunk-5SH5JYCH.cjs → chunk-2M2UOWI7.cjs} +13 -13
- package/dist/{chunk-FYOYVWLV.cjs → chunk-2PCZNBCY.cjs} +2 -2
- package/dist/{chunk-W3C5XSSN.cjs → chunk-32HQN6XY.cjs} +2 -2
- package/dist/{chunk-RP7QPKMS.js → chunk-5ZS3SZTA.js} +2 -2
- package/dist/{chunk-AHPJROFI.js → chunk-7TCJHISQ.js} +54 -17
- package/dist/{chunk-Z45RNPYZ.js → chunk-A42LXU6F.js} +2 -2
- package/dist/{chunk-MCAQJBXG.js → chunk-AJS6FK72.js} +3 -3
- package/dist/{chunk-F5UNQT4I.js → chunk-KTLTKHBV.js} +1 -1
- package/dist/{chunk-ERN6S5PZ.cjs → chunk-LJGF7W63.cjs} +75 -38
- package/dist/{chunk-NDLGLF4H.cjs → chunk-LOULAUL6.cjs} +6 -6
- package/dist/{chunk-5Q5D5KXU.cjs → chunk-LSA5WYIT.cjs} +92 -85
- package/dist/{chunk-NBS4OYN3.cjs → chunk-NUOMVE65.cjs} +5 -5
- package/dist/{chunk-LMTUTP6F.cjs → chunk-OPO2EA4V.cjs} +24 -24
- package/dist/{chunk-VKCYJZVE.js → chunk-ORKSXQRJ.js} +2 -2
- package/dist/{chunk-XPQNCRAX.js → chunk-OWOXTJBI.js} +2 -2
- package/dist/{chunk-GQHCGKUH.js → chunk-Q2QQZVU2.js} +8 -8
- package/dist/{chunk-J3NLC5XP.cjs → chunk-QPERAF7E.cjs} +16 -16
- package/dist/{chunk-MHBCYKCD.js → chunk-RWWCGHRU.js} +4 -4
- package/dist/{chunk-SRXJPQBE.cjs → chunk-SHS7OFKX.cjs} +7 -7
- package/dist/{chunk-KUO4BKRA.cjs → chunk-U7GA2PTN.cjs} +5 -5
- package/dist/{chunk-BPCPTEEN.js → chunk-UGQCY2UQ.js} +5 -5
- package/dist/{chunk-5JSRSHEO.cjs → chunk-VE4VV2RJ.cjs} +64 -64
- package/dist/{chunk-WOAQXYUT.js → chunk-XDA7WJ75.js} +1 -1
- package/dist/{chunk-UIZDGUH3.js → chunk-XTIORJDZ.js} +15 -15
- package/dist/{chunk-I4I4LVFE.js → chunk-Y6EKVIOV.js} +14 -7
- package/dist/chunk-ZZECF32S.cjs +6 -0
- package/dist/clean.cjs +5 -5
- package/dist/clean.js +4 -4
- package/dist/config.cjs +6 -6
- package/dist/config.js +5 -5
- package/dist/context.cjs +7 -7
- package/dist/context.js +6 -6
- package/dist/index.cjs +15 -15
- package/dist/index.js +13 -13
- package/dist/package-json.cjs +6 -6
- package/dist/package-json.js +5 -5
- package/dist/plugins/deps-check.cjs +5 -5
- package/dist/plugins/deps-check.js +4 -4
- package/dist/plugins/resolve-paths.cjs +11 -11
- package/dist/plugins/resolve-paths.js +2 -2
- package/dist/tsup.cjs +5 -5
- package/dist/tsup.js +4 -4
- package/dist/types.cjs +2 -2
- package/dist/types.js +2 -2
- package/dist/watch.cjs +7 -7
- package/dist/watch.js +3 -3
- package/package.json +5 -5
- package/dist/chunk-QC6ICIFT.cjs +0 -6
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/dist/assets.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
3
|
+
var _chunkSHS7OFKXcjs = require('./chunk-SHS7OFKX.cjs');
|
|
4
|
+
require('./chunk-LSA5WYIT.cjs');
|
|
5
|
+
require('./chunk-LJGF7W63.cjs');
|
|
6
|
+
require('./chunk-32HQN6XY.cjs');
|
|
7
|
+
require('./chunk-2PCZNBCY.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.copyBuildAssets =
|
|
10
|
+
exports.copyBuildAssets = _chunkSHS7OFKXcjs.copyBuildAssets;
|
package/dist/assets.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copyBuildAssets
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-AJS6FK72.js";
|
|
4
|
+
import "./chunk-Y6EKVIOV.js";
|
|
5
|
+
import "./chunk-7TCJHISQ.js";
|
|
6
|
+
import "./chunk-KTLTKHBV.js";
|
|
7
|
+
import "./chunk-ORKSXQRJ.js";
|
|
8
8
|
export {
|
|
9
9
|
copyBuildAssets
|
|
10
10
|
};
|
package/dist/build.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-
|
|
3
|
+
var _chunkOPO2EA4Vcjs = require('./chunk-OPO2EA4V.cjs');
|
|
4
|
+
require('./chunk-LOULAUL6.cjs');
|
|
5
|
+
require('./chunk-SHS7OFKX.cjs');
|
|
6
|
+
require('./chunk-U7GA2PTN.cjs');
|
|
7
|
+
require('./chunk-QPERAF7E.cjs');
|
|
8
|
+
require('./chunk-NUOMVE65.cjs');
|
|
9
|
+
require('./chunk-2M2UOWI7.cjs');
|
|
10
|
+
require('./chunk-LSA5WYIT.cjs');
|
|
11
|
+
require('./chunk-VE4VV2RJ.cjs');
|
|
12
|
+
require('./chunk-LJGF7W63.cjs');
|
|
13
|
+
require('./chunk-32HQN6XY.cjs');
|
|
14
|
+
require('./chunk-2PCZNBCY.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.build =
|
|
17
|
+
exports.build = _chunkOPO2EA4Vcjs.build;
|
package/dist/build.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-Q2QQZVU2.js";
|
|
4
|
+
import "./chunk-OWOXTJBI.js";
|
|
5
|
+
import "./chunk-AJS6FK72.js";
|
|
6
|
+
import "./chunk-A42LXU6F.js";
|
|
7
|
+
import "./chunk-UGQCY2UQ.js";
|
|
8
|
+
import "./chunk-5ZS3SZTA.js";
|
|
9
|
+
import "./chunk-RWWCGHRU.js";
|
|
10
|
+
import "./chunk-Y6EKVIOV.js";
|
|
11
|
+
import "./chunk-XTIORJDZ.js";
|
|
12
|
+
import "./chunk-7TCJHISQ.js";
|
|
13
|
+
import "./chunk-KTLTKHBV.js";
|
|
14
|
+
import "./chunk-ORKSXQRJ.js";
|
|
15
15
|
export {
|
|
16
16
|
build
|
|
17
17
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkLSA5WYITcjs = require('./chunk-LSA5WYIT.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkLJGF7W63cjs = require('./chunk-LJGF7W63.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk32HQN6XYcjs = require('./chunk-32HQN6XY.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk2PCZNBCYcjs = require('./chunk-2PCZNBCY.cjs');
|
|
15
15
|
|
|
16
16
|
// src/package-json.ts
|
|
17
|
-
|
|
17
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
18
18
|
var _devkit = require('@nx/devkit');
|
|
19
19
|
var _fs = require('fs');
|
|
20
20
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
21
21
|
async function generatePackageJson(context) {
|
|
22
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
23
|
-
|
|
24
|
-
const stopwatch =
|
|
25
|
-
const packageJsonPath =
|
|
22
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunk32HQN6XYcjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
23
|
+
_chunkLJGF7W63cjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
24
|
+
const stopwatch = _chunkLJGF7W63cjs.getStopwatch.call(void 0, "Write package.json file");
|
|
25
|
+
const packageJsonPath = _chunk32HQN6XYcjs.joinPaths.call(void 0,
|
|
26
26
|
context.options.projectRoot,
|
|
27
27
|
"project.json"
|
|
28
28
|
);
|
|
@@ -30,7 +30,7 @@ async function generatePackageJson(context) {
|
|
|
30
30
|
throw new Error("Cannot find package.json configuration");
|
|
31
31
|
}
|
|
32
32
|
const packageJsonFile = await _promises2.default.readFile(
|
|
33
|
-
|
|
33
|
+
_chunk32HQN6XYcjs.joinPaths.call(void 0,
|
|
34
34
|
context.workspaceConfig.workspaceRoot,
|
|
35
35
|
context.options.projectRoot,
|
|
36
36
|
"package.json"
|
|
@@ -41,13 +41,13 @@ async function generatePackageJson(context) {
|
|
|
41
41
|
if (!packageJson) {
|
|
42
42
|
throw new Error("Cannot find package.json configuration file");
|
|
43
43
|
}
|
|
44
|
-
packageJson = await
|
|
44
|
+
packageJson = await _chunkLSA5WYITcjs.addPackageDependencies.call(void 0,
|
|
45
45
|
context.workspaceConfig.workspaceRoot,
|
|
46
46
|
context.options.projectRoot,
|
|
47
47
|
context.projectName,
|
|
48
48
|
packageJson
|
|
49
49
|
);
|
|
50
|
-
packageJson = await
|
|
50
|
+
packageJson = await _chunkLSA5WYITcjs.addWorkspacePackageJsonFields.call(void 0,
|
|
51
51
|
context.workspaceConfig,
|
|
52
52
|
context.options.projectRoot,
|
|
53
53
|
context.sourceRoot,
|
|
@@ -136,7 +136,7 @@ async function generatePackageJson(context) {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
await _devkit.writeJsonFile.call(void 0,
|
|
139
|
-
|
|
139
|
+
_chunk32HQN6XYcjs.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
140
140
|
packageJson
|
|
141
141
|
);
|
|
142
142
|
stopwatch();
|
|
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
mod
|
|
34
34
|
));
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__23d29aaa007764500c48e48a9770b339/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var init_cjs_shims = __esm({
|
|
38
|
-
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
38
|
+
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__23d29aaa007764500c48e48a9770b339/node_modules/tsup/assets/cjs_shims.js"() {
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2PCZNBCYcjs = require('./chunk-2PCZNBCY.cjs');
|
|
4
4
|
|
|
5
5
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
6
|
-
|
|
6
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
7
7
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
8
8
|
function normalizeWindowsPath(input = "") {
|
|
9
9
|
if (!input) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
correctPaths,
|
|
3
3
|
joinPaths
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KTLTKHBV.js";
|
|
5
5
|
import {
|
|
6
6
|
init_esm_shims
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ORKSXQRJ.js";
|
|
8
8
|
|
|
9
9
|
// ../config-tools/src/logger/console.ts
|
|
10
10
|
init_esm_shims();
|
|
@@ -42,10 +42,10 @@ init_esm_shims();
|
|
|
42
42
|
|
|
43
43
|
// ../config/src/constants.ts
|
|
44
44
|
init_esm_shims();
|
|
45
|
-
var STORM_DEFAULT_DOCS = "https://
|
|
45
|
+
var STORM_DEFAULT_DOCS = "https://stormsoftware.com/docs";
|
|
46
46
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
47
47
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
48
|
-
var STORM_DEFAULT_LICENSING = "https://
|
|
48
|
+
var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
|
|
49
49
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
50
50
|
var STORM_DEFAULT_RELEASE_BANNER = "https://public.storm-cdn.com/brand-banner.png";
|
|
51
51
|
var STORM_DEFAULT_ACCOUNT_TWITTER = "StormSoftwareHQ";
|
|
@@ -223,10 +223,13 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
223
223
|
organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
224
224
|
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
225
225
|
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
226
|
-
homepage: z.string().trim().url().
|
|
227
|
-
docs: z.string().trim().url().
|
|
228
|
-
licensing: z.string().trim().url().
|
|
229
|
-
contact: z.string().trim().url().
|
|
226
|
+
homepage: z.string().trim().url().optional().describe("The homepage of the workspace"),
|
|
227
|
+
docs: z.string().trim().url().optional().describe("The documentation site for the workspace"),
|
|
228
|
+
licensing: z.string().trim().url().optional().describe("The licensing site for the workspace"),
|
|
229
|
+
contact: z.string().trim().url().optional().describe("The contact site for the workspace"),
|
|
230
|
+
support: z.string().trim().url().optional().describe(
|
|
231
|
+
"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
232
|
+
),
|
|
230
233
|
branch: z.string().trim().default("main").describe("The branch of the workspace"),
|
|
231
234
|
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
232
235
|
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
@@ -427,9 +430,10 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
427
430
|
negative: "#dc2626"
|
|
428
431
|
}
|
|
429
432
|
};
|
|
430
|
-
|
|
433
|
+
async function getPackageJsonConfig(root) {
|
|
431
434
|
let license = STORM_DEFAULT_LICENSE;
|
|
432
|
-
let homepage =
|
|
435
|
+
let homepage = void 0;
|
|
436
|
+
let support = void 0;
|
|
433
437
|
let name = void 0;
|
|
434
438
|
let namespace = void 0;
|
|
435
439
|
let repository = void 0;
|
|
@@ -460,6 +464,13 @@ var getDefaultConfig = async (root) => {
|
|
|
460
464
|
if (packageJson.homepage) {
|
|
461
465
|
homepage = packageJson.homepage;
|
|
462
466
|
}
|
|
467
|
+
if (packageJson.bugs) {
|
|
468
|
+
if (typeof packageJson.bugs === "string") {
|
|
469
|
+
support = packageJson.bugs;
|
|
470
|
+
} else if (packageJson.bugs.url) {
|
|
471
|
+
support = packageJson.bugs.url;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
463
474
|
}
|
|
464
475
|
}
|
|
465
476
|
return {
|
|
@@ -469,13 +480,38 @@ var getDefaultConfig = async (root) => {
|
|
|
469
480
|
repository,
|
|
470
481
|
license,
|
|
471
482
|
homepage,
|
|
472
|
-
|
|
473
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
474
|
-
error: {
|
|
475
|
-
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
476
|
-
}
|
|
483
|
+
support
|
|
477
484
|
};
|
|
478
|
-
}
|
|
485
|
+
}
|
|
486
|
+
function applyDefaultConfig(config) {
|
|
487
|
+
if (!config.support && config.contact) {
|
|
488
|
+
config.support = config.contact;
|
|
489
|
+
}
|
|
490
|
+
if (!config.contact && config.support) {
|
|
491
|
+
config.contact = config.support;
|
|
492
|
+
}
|
|
493
|
+
if (config.homepage) {
|
|
494
|
+
if (!config.docs) {
|
|
495
|
+
config.docs = `${config.homepage}/docs`;
|
|
496
|
+
}
|
|
497
|
+
if (!config.license) {
|
|
498
|
+
config.license = `${config.homepage}/license`;
|
|
499
|
+
}
|
|
500
|
+
if (!config.support) {
|
|
501
|
+
config.support = `${config.homepage}/support`;
|
|
502
|
+
}
|
|
503
|
+
if (!config.contact) {
|
|
504
|
+
config.contact = `${config.homepage}/contact`;
|
|
505
|
+
}
|
|
506
|
+
if (!config.error?.codesFile || !config?.error?.url) {
|
|
507
|
+
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
508
|
+
if (config.homepage) {
|
|
509
|
+
config.error.url ??= `${config.homepage}/errors`;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
return config;
|
|
514
|
+
}
|
|
479
515
|
|
|
480
516
|
// ../config-tools/src/logger/chalk.ts
|
|
481
517
|
init_esm_shims();
|
|
@@ -724,7 +760,8 @@ export {
|
|
|
724
760
|
stormWorkspaceConfigSchema,
|
|
725
761
|
COLOR_KEYS,
|
|
726
762
|
findWorkspaceRoot,
|
|
727
|
-
|
|
763
|
+
getPackageJsonConfig,
|
|
764
|
+
applyDefaultConfig,
|
|
728
765
|
getLogLevel,
|
|
729
766
|
getLogLevelLabel,
|
|
730
767
|
writeFatal,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copyAssets
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Y6EKVIOV.js";
|
|
4
4
|
import {
|
|
5
5
|
getStopwatch,
|
|
6
6
|
writeDebug
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7TCJHISQ.js";
|
|
8
8
|
import {
|
|
9
9
|
init_esm_shims
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ORKSXQRJ.js";
|
|
11
11
|
|
|
12
12
|
// src/assets.ts
|
|
13
13
|
init_esm_shims();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk32HQN6XYcjs = require('./chunk-32HQN6XY.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk2PCZNBCYcjs = require('./chunk-2PCZNBCY.cjs');
|
|
8
8
|
|
|
9
9
|
// ../config-tools/src/logger/console.ts
|
|
10
|
-
|
|
10
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
11
11
|
|
|
12
12
|
// ../config-tools/src/types.ts
|
|
13
|
-
|
|
13
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
14
14
|
var LogLevel = {
|
|
15
15
|
SILENT: 0,
|
|
16
16
|
FATAL: 10,
|
|
@@ -35,17 +35,17 @@ var LogLevelLabel = {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
38
|
-
|
|
38
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
39
39
|
|
|
40
40
|
// ../config/src/index.ts
|
|
41
|
-
|
|
41
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
42
42
|
|
|
43
43
|
// ../config/src/constants.ts
|
|
44
|
-
|
|
45
|
-
var STORM_DEFAULT_DOCS = "https://
|
|
44
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
45
|
+
var STORM_DEFAULT_DOCS = "https://stormsoftware.com/docs";
|
|
46
46
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
47
47
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
48
|
-
var STORM_DEFAULT_LICENSING = "https://
|
|
48
|
+
var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
|
|
49
49
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
50
50
|
var STORM_DEFAULT_RELEASE_BANNER = "https://public.storm-cdn.com/brand-banner.png";
|
|
51
51
|
var STORM_DEFAULT_ACCOUNT_TWITTER = "StormSoftwareHQ";
|
|
@@ -64,10 +64,10 @@ If this sounds interesting, and you would like to help us in creating the next g
|
|
|
64
64
|
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
65
65
|
|
|
66
66
|
// ../config/src/define-config.ts
|
|
67
|
-
|
|
67
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
68
68
|
|
|
69
69
|
// ../config/src/schema.ts
|
|
70
|
-
|
|
70
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
71
71
|
var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);
|
|
72
72
|
var DarkColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d1e22").describe("The dark background color of the workspace");
|
|
73
73
|
var LightColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
|
|
@@ -223,10 +223,13 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
223
223
|
organization: _zod2.default.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
224
224
|
repository: _zod2.default.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
225
225
|
license: _zod2.default.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
226
|
-
homepage: _zod2.default.string().trim().url().
|
|
227
|
-
docs: _zod2.default.string().trim().url().
|
|
228
|
-
licensing: _zod2.default.string().trim().url().
|
|
229
|
-
contact: _zod2.default.string().trim().url().
|
|
226
|
+
homepage: _zod2.default.string().trim().url().optional().describe("The homepage of the workspace"),
|
|
227
|
+
docs: _zod2.default.string().trim().url().optional().describe("The documentation site for the workspace"),
|
|
228
|
+
licensing: _zod2.default.string().trim().url().optional().describe("The licensing site for the workspace"),
|
|
229
|
+
contact: _zod2.default.string().trim().url().optional().describe("The contact site for the workspace"),
|
|
230
|
+
support: _zod2.default.string().trim().url().optional().describe(
|
|
231
|
+
"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
232
|
+
),
|
|
230
233
|
branch: _zod2.default.string().trim().default("main").describe("The branch of the workspace"),
|
|
231
234
|
preid: _zod2.default.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
232
235
|
owner: _zod2.default.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
@@ -275,7 +278,7 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
275
278
|
);
|
|
276
279
|
|
|
277
280
|
// ../config/src/types.ts
|
|
278
|
-
|
|
281
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
279
282
|
var COLOR_KEYS = [
|
|
280
283
|
"dark",
|
|
281
284
|
"light",
|
|
@@ -300,10 +303,10 @@ var _promises = require('fs/promises');
|
|
|
300
303
|
var _path = require('path');
|
|
301
304
|
|
|
302
305
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
303
|
-
|
|
306
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
304
307
|
|
|
305
308
|
// ../config-tools/src/utilities/find-up.ts
|
|
306
|
-
|
|
309
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
307
310
|
|
|
308
311
|
|
|
309
312
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
@@ -372,11 +375,11 @@ var rootDirectories = [
|
|
|
372
375
|
];
|
|
373
376
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
374
377
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
375
|
-
return
|
|
378
|
+
return _chunk32HQN6XYcjs.correctPaths.call(void 0,
|
|
376
379
|
_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH))
|
|
377
380
|
);
|
|
378
381
|
}
|
|
379
|
-
return
|
|
382
|
+
return _chunk32HQN6XYcjs.correctPaths.call(void 0,
|
|
380
383
|
findFolderUp(
|
|
381
384
|
_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())),
|
|
382
385
|
rootFiles,
|
|
@@ -427,16 +430,17 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
427
430
|
negative: "#dc2626"
|
|
428
431
|
}
|
|
429
432
|
};
|
|
430
|
-
|
|
433
|
+
async function getPackageJsonConfig(root) {
|
|
431
434
|
let license = STORM_DEFAULT_LICENSE;
|
|
432
|
-
let homepage =
|
|
435
|
+
let homepage = void 0;
|
|
436
|
+
let support = void 0;
|
|
433
437
|
let name = void 0;
|
|
434
438
|
let namespace = void 0;
|
|
435
439
|
let repository = void 0;
|
|
436
440
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
437
441
|
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
|
|
438
442
|
const file = await _promises.readFile.call(void 0,
|
|
439
|
-
|
|
443
|
+
_chunk32HQN6XYcjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
440
444
|
"utf8"
|
|
441
445
|
);
|
|
442
446
|
if (file) {
|
|
@@ -460,6 +464,13 @@ var getDefaultConfig = async (root) => {
|
|
|
460
464
|
if (packageJson.homepage) {
|
|
461
465
|
homepage = packageJson.homepage;
|
|
462
466
|
}
|
|
467
|
+
if (packageJson.bugs) {
|
|
468
|
+
if (typeof packageJson.bugs === "string") {
|
|
469
|
+
support = packageJson.bugs;
|
|
470
|
+
} else if (packageJson.bugs.url) {
|
|
471
|
+
support = packageJson.bugs.url;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
463
474
|
}
|
|
464
475
|
}
|
|
465
476
|
return {
|
|
@@ -469,16 +480,41 @@ var getDefaultConfig = async (root) => {
|
|
|
469
480
|
repository,
|
|
470
481
|
license,
|
|
471
482
|
homepage,
|
|
472
|
-
|
|
473
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
474
|
-
error: {
|
|
475
|
-
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
476
|
-
}
|
|
483
|
+
support
|
|
477
484
|
};
|
|
478
|
-
}
|
|
485
|
+
}
|
|
486
|
+
function applyDefaultConfig(config) {
|
|
487
|
+
if (!config.support && config.contact) {
|
|
488
|
+
config.support = config.contact;
|
|
489
|
+
}
|
|
490
|
+
if (!config.contact && config.support) {
|
|
491
|
+
config.contact = config.support;
|
|
492
|
+
}
|
|
493
|
+
if (config.homepage) {
|
|
494
|
+
if (!config.docs) {
|
|
495
|
+
config.docs = `${config.homepage}/docs`;
|
|
496
|
+
}
|
|
497
|
+
if (!config.license) {
|
|
498
|
+
config.license = `${config.homepage}/license`;
|
|
499
|
+
}
|
|
500
|
+
if (!config.support) {
|
|
501
|
+
config.support = `${config.homepage}/support`;
|
|
502
|
+
}
|
|
503
|
+
if (!config.contact) {
|
|
504
|
+
config.contact = `${config.homepage}/contact`;
|
|
505
|
+
}
|
|
506
|
+
if (!_optionalChain([config, 'access', _2 => _2.error, 'optionalAccess', _3 => _3.codesFile]) || !_optionalChain([config, 'optionalAccess', _4 => _4.error, 'optionalAccess', _5 => _5.url])) {
|
|
507
|
+
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
508
|
+
if (config.homepage) {
|
|
509
|
+
config.error.url ??= `${config.homepage}/errors`;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
return config;
|
|
514
|
+
}
|
|
479
515
|
|
|
480
516
|
// ../config-tools/src/logger/chalk.ts
|
|
481
|
-
|
|
517
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
482
518
|
var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
|
|
483
519
|
var chalkDefault = {
|
|
484
520
|
hex: (_) => (message) => message,
|
|
@@ -501,17 +537,17 @@ var chalkDefault = {
|
|
|
501
537
|
};
|
|
502
538
|
var getChalk = () => {
|
|
503
539
|
let _chalk = _chalk3.default;
|
|
504
|
-
if (!_optionalChain([_chalk, 'optionalAccess',
|
|
540
|
+
if (!_optionalChain([_chalk, 'optionalAccess', _6 => _6.hex]) || !_optionalChain([_chalk, 'optionalAccess', _7 => _7.bold, 'optionalAccess', _8 => _8.hex]) || !_optionalChain([_chalk, 'optionalAccess', _9 => _9.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _10 => _10.whiteBright])) {
|
|
505
541
|
_chalk = chalkDefault;
|
|
506
542
|
}
|
|
507
543
|
return _chalk;
|
|
508
544
|
};
|
|
509
545
|
|
|
510
546
|
// ../config-tools/src/logger/console-icons.ts
|
|
511
|
-
|
|
547
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
512
548
|
|
|
513
549
|
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
514
|
-
|
|
550
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
515
551
|
function isUnicodeSupported() {
|
|
516
552
|
if (process.platform !== "win32") {
|
|
517
553
|
return process.env.TERM !== "linux";
|
|
@@ -536,13 +572,13 @@ var CONSOLE_ICONS = {
|
|
|
536
572
|
};
|
|
537
573
|
|
|
538
574
|
// ../config-tools/src/logger/format-timestamp.ts
|
|
539
|
-
|
|
575
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
540
576
|
var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
|
|
541
577
|
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
542
578
|
};
|
|
543
579
|
|
|
544
580
|
// ../config-tools/src/logger/get-log-level.ts
|
|
545
|
-
|
|
581
|
+
_chunk2PCZNBCYcjs.init_cjs_shims.call(void 0, );
|
|
546
582
|
var getLogLevel = (label) => {
|
|
547
583
|
switch (label) {
|
|
548
584
|
case "all":
|
|
@@ -595,7 +631,7 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
595
631
|
|
|
596
632
|
// ../config-tools/src/logger/console.ts
|
|
597
633
|
var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
598
|
-
const colors = !_optionalChain([config, 'access',
|
|
634
|
+
const colors = !_optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12.dark]) && !_optionalChain([config, 'access', _13 => _13.colors, 'optionalAccess', _14 => _14["base"]]) && !_optionalChain([config, 'access', _15 => _15.colors, 'optionalAccess', _16 => _16["base"], 'optionalAccess', _17 => _17.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _18 => _18.colors, 'optionalAccess', _19 => _19.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _20 => _20.colors, 'optionalAccess', _21 => _21["base"], 'optionalAccess', _22 => _22.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _23 => _23.colors, 'optionalAccess', _24 => _24["base"]]) ? _optionalChain([config, 'access', _25 => _25.colors, 'optionalAccess', _26 => _26["base"]]) : DEFAULT_COLOR_CONFIG;
|
|
599
635
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
600
636
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
601
637
|
return (_) => {
|
|
@@ -710,7 +746,7 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map(
|
|
|
710
746
|
};
|
|
711
747
|
var _isFunction = (value) => {
|
|
712
748
|
try {
|
|
713
|
-
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess',
|
|
749
|
+
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _27 => _27.constructor]) && _optionalChain([value, 'optionalAccess', _28 => _28.call]) && _optionalChain([value, 'optionalAccess', _29 => _29.apply]));
|
|
714
750
|
} catch (e) {
|
|
715
751
|
return false;
|
|
716
752
|
}
|
|
@@ -735,4 +771,5 @@ var _isFunction = (value) => {
|
|
|
735
771
|
|
|
736
772
|
|
|
737
773
|
|
|
738
|
-
|
|
774
|
+
|
|
775
|
+
exports.LogLevel = LogLevel; exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.stormWorkspaceConfigSchema = stormWorkspaceConfigSchema; exports.COLOR_KEYS = COLOR_KEYS; exports.findWorkspaceRoot = findWorkspaceRoot; exports.getPackageJsonConfig = getPackageJsonConfig; exports.applyDefaultConfig = applyDefaultConfig; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage;
|