@storm-software/workspace-tools 1.277.34 → 1.278.4
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 +126 -0
- package/README.md +1 -2
- package/config/base.json +14 -117
- package/dist/{chunk-6RHHYXZE.mjs → chunk-2AZFAMT2.mjs} +1 -1
- package/dist/chunk-2CDSXWFA.js +311 -0
- package/dist/chunk-2LY7DGBH.mjs +336 -0
- package/dist/{chunk-UXALGSQC.js → chunk-452FQZ3B.js} +2 -2
- package/dist/{chunk-3VAHUUNQ.mjs → chunk-47VSL76K.mjs} +1 -1
- package/dist/{chunk-PGIUP33N.mjs → chunk-47X3OTR5.mjs} +4 -4
- package/dist/{chunk-3TYXXJKV.js → chunk-4DLKOUQA.js} +2 -2
- package/dist/{chunk-NFK6PGAC.mjs → chunk-5FBIPGPD.mjs} +1 -1
- package/dist/{chunk-XPFT4BMH.mjs → chunk-5KP5KWGU.mjs} +1 -1
- package/dist/{chunk-S2N53PIP.js → chunk-63DISBXN.js} +2 -2
- package/dist/{chunk-NQ525HTH.mjs → chunk-64LWOWPE.mjs} +4 -4
- package/dist/{chunk-XBRR6YS3.js → chunk-73IC2JQV.js} +2 -2
- package/dist/{chunk-GH5ABWPU.mjs → chunk-7DLHAWLG.mjs} +1 -1
- package/dist/{chunk-J2Z4WP3E.js → chunk-A77PFJ72.js} +2 -2
- package/dist/{chunk-65P2PGPR.js → chunk-AH253N44.js} +5 -5
- package/dist/{chunk-6WBXO6UH.js → chunk-ARTBWDR4.js} +2 -2
- package/dist/{chunk-JRQIA2WV.js → chunk-BZTR7YL6.js} +2 -2
- package/dist/{chunk-7IPJE3E3.mjs → chunk-CCMBHSV7.mjs} +4 -4
- package/dist/{chunk-7YUXBCFS.js → chunk-CHSTJ3AR.js} +13 -11
- package/dist/{chunk-Q7MIY2SX.mjs → chunk-D26STI4S.mjs} +1 -1
- package/dist/{chunk-RVJSZ7SI.js → chunk-DJLGYPRA.js} +4 -4
- package/dist/{chunk-OFNVRO2Q.js → chunk-DLJY6UOI.js} +7 -7
- package/dist/{chunk-TJ3JPU6C.js → chunk-ESFH6QVE.js} +2 -2
- package/dist/{chunk-3ZBMLG4D.mjs → chunk-FHBOYSRN.mjs} +17 -13
- package/dist/{chunk-3CPOV3N6.mjs → chunk-FVGLL54Y.mjs} +1 -1
- package/dist/{chunk-R7DNGWVO.js → chunk-G3YKHGPE.js} +2 -2
- package/dist/{chunk-QPCOSMXY.mjs → chunk-GNIDPNI3.mjs} +2 -2
- package/dist/{chunk-OQUI7H7Z.js → chunk-GWT4ZQ6Y.js} +2 -2
- package/dist/{chunk-4WHSR4FK.js → chunk-HNFKVXBV.js} +0 -1
- package/dist/chunk-IBTPJDV6.js +336 -0
- package/dist/{chunk-PPMPCT7K.mjs → chunk-JCEMECUD.mjs} +2 -2
- package/dist/{chunk-V53473BD.js → chunk-JX3KVFO5.js} +2 -2
- package/dist/{chunk-YDXXSCNG.mjs → chunk-K7FEZWBA.mjs} +1 -1
- package/dist/{chunk-VLOTOQYE.mjs → chunk-KLAMLNPM.mjs} +1 -1
- package/dist/{chunk-ZLVVUMYO.js → chunk-KRAHIMKO.js} +2 -2
- package/dist/{chunk-BDA4N25E.js → chunk-KX7XTUYW.js} +461 -43
- package/dist/{chunk-X6PHOMFB.mjs → chunk-KYGWN2MB.mjs} +1 -1
- package/dist/{chunk-V5564COA.mjs → chunk-LVIDSVDC.mjs} +4 -4
- package/dist/{chunk-LSF4BHCI.mjs → chunk-M5Z57CUO.mjs} +0 -1
- package/dist/{chunk-KZIA4CGL.js → chunk-MZEFNYBT.js} +24 -24
- package/dist/{chunk-K262HGVZ.mjs → chunk-N46RWKEK.mjs} +1 -1
- package/dist/{chunk-5VY5IBBQ.js → chunk-NSSJMQFD.js} +16 -12
- package/dist/{chunk-L4NCVOB5.mjs → chunk-OWKH2ZBQ.mjs} +1 -1
- package/dist/{chunk-VRPEYRWI.mjs → chunk-PIK7KYVE.mjs} +1 -1
- package/dist/{chunk-PG7GBHUM.mjs → chunk-PYS5P7QE.mjs} +430 -12
- package/dist/{chunk-6UFOMB3R.mjs → chunk-R3OLB3C6.mjs} +141 -145
- package/dist/{chunk-TZJGO4US.js → chunk-RANQ4TXU.js} +141 -145
- package/dist/{chunk-HWCERW6A.mjs → chunk-RMWG74QA.mjs} +1 -1
- package/dist/{chunk-EUWPFP5C.mjs → chunk-SVIG7SR3.mjs} +1 -1
- package/dist/{chunk-ZRTYYXDL.mjs → chunk-UGBVA3KE.mjs} +6 -4
- package/dist/{chunk-6XYAQUU3.js → chunk-UGJVZ6LI.js} +26 -26
- package/dist/{chunk-AQOT2IAM.js → chunk-UTAJHUJL.js} +34 -34
- package/dist/{chunk-A5CKB6IJ.js → chunk-UZ63ALZQ.js} +2 -2
- package/dist/{chunk-ZFA26D42.mjs → chunk-V2UGPEY2.mjs} +1 -1
- package/dist/chunk-V44DYGWX.mjs +311 -0
- package/dist/{chunk-3OVLNULV.js → chunk-VR3OLKAI.js} +2 -2
- package/dist/{chunk-AZ5HDBYX.mjs → chunk-VVCIYZJD.mjs} +7 -7
- package/dist/{chunk-55FODDLQ.mjs → chunk-WASXXREW.mjs} +4 -4
- package/dist/{chunk-ABUZEUF7.js → chunk-WRXLSZ6I.js} +2 -2
- package/dist/{chunk-QEU3B4T6.js → chunk-YBUD4GFC.js} +21 -21
- package/dist/{chunk-EC7YQEHT.js → chunk-YEUILWDR.js} +2 -2
- package/dist/{chunk-E566KBB3.js → chunk-ZVL2TRR6.js} +6 -6
- package/dist/{executor-oIXMAz-g.d.ts → executor-BZYJEb9V.d.ts} +1 -1
- package/dist/{executor-DPIWxm-x.d.mts → executor-Bez_tWxf.d.mts} +1 -1
- package/dist/{executor-B8wLnXnx.d.mts → executor-CUlX29YN.d.mts} +1 -1
- package/dist/{executor-CFBDS3tc.d.mts → executor-CwENKkEy.d.mts} +1 -1
- package/dist/{executor-L8Jmwybf.d.ts → executor-CysN0MTH.d.ts} +1 -1
- package/dist/{executor-CRnQhNlT.d.ts → executor-D3Tip-ad.d.ts} +1 -1
- package/dist/{executor-BSkPYkkP.d.mts → executor-DJb8r-Zb.d.mts} +1 -1
- package/dist/{executor-BpITPYcR.d.ts → executor-_WT0Qd2F.d.ts} +1 -1
- package/dist/executors.d.mts +5 -5
- package/dist/executors.d.ts +5 -5
- package/dist/executors.js +19 -19
- package/dist/executors.mjs +18 -18
- package/dist/{generator-rgiO0GJQ.d.ts → generator-Biz_Ai4B.d.ts} +1 -1
- package/dist/{generator-Cb58mGnB.d.mts → generator-CVPI52z3.d.mts} +2 -2
- package/dist/{generator-CJABg49g.d.mts → generator-CYCzda2K.d.mts} +2 -2
- package/dist/{generator-Cj8BzNWS.d.ts → generator-CmkSA-dv.d.ts} +2 -2
- package/dist/{generator-CAV7jT3f.d.mts → generator-D7tljo-K.d.mts} +1 -1
- package/dist/{generator-BIMz19YK.d.mts → generator-DKZjOzNw.d.mts} +2 -2
- package/dist/{generator-DTjXg4Lz.d.mts → generator-De9XOTip.d.mts} +2 -2
- package/dist/{generator-mIOdDYVo.d.ts → generator-Dk1ihwF-.d.ts} +2 -2
- package/dist/{generator-Sm7r9ETR.d.ts → generator-DpjPMueC.d.ts} +2 -2
- package/dist/{generator-C0oESGRU.d.ts → generator-Dyk2TjIp.d.ts} +1 -1
- package/dist/{generator-Oe3vHbZC.d.mts → generator-o2v2Q4At.d.mts} +1 -1
- package/dist/{generator-Cf30wgA4.d.ts → generator-ujd2pu2I.d.ts} +2 -2
- package/dist/generators.d.mts +8 -8
- package/dist/generators.d.ts +8 -8
- package/dist/generators.js +13 -13
- package/dist/generators.mjs +12 -12
- package/dist/index.d.mts +14 -13
- package/dist/index.d.ts +14 -13
- package/dist/index.js +40 -30
- package/dist/index.mjs +40 -30
- package/dist/src/base/base-executor.d.mts +2 -2
- package/dist/src/base/base-executor.d.ts +2 -2
- package/dist/src/base/base-executor.js +6 -6
- package/dist/src/base/base-executor.mjs +5 -5
- package/dist/src/base/base-generator.d.mts +2 -2
- package/dist/src/base/base-generator.d.ts +2 -2
- package/dist/src/base/base-generator.js +6 -6
- package/dist/src/base/base-generator.mjs +5 -5
- package/dist/src/base/index.d.mts +2 -2
- package/dist/src/base/index.d.ts +2 -2
- package/dist/src/base/index.js +7 -7
- package/dist/src/base/index.mjs +6 -6
- package/dist/src/executors/cargo-build/executor.js +7 -7
- package/dist/src/executors/cargo-build/executor.mjs +6 -6
- package/dist/src/executors/cargo-check/executor.js +7 -7
- package/dist/src/executors/cargo-check/executor.mjs +6 -6
- package/dist/src/executors/cargo-clippy/executor.js +7 -7
- package/dist/src/executors/cargo-clippy/executor.mjs +6 -6
- package/dist/src/executors/cargo-doc/executor.js +7 -7
- package/dist/src/executors/cargo-doc/executor.mjs +6 -6
- package/dist/src/executors/cargo-format/executor.js +7 -7
- package/dist/src/executors/cargo-format/executor.mjs +6 -6
- package/dist/src/executors/cargo-publish/executor.js +4 -6
- package/dist/src/executors/cargo-publish/executor.mjs +3 -5
- package/dist/src/executors/clean-package/executor.d.mts +1 -1
- package/dist/src/executors/clean-package/executor.d.ts +1 -1
- package/dist/src/executors/clean-package/executor.js +9 -8
- package/dist/src/executors/clean-package/executor.mjs +6 -5
- package/dist/src/executors/esbuild/executor.d.mts +2 -2
- package/dist/src/executors/esbuild/executor.d.ts +2 -2
- package/dist/src/executors/esbuild/executor.js +7 -7
- package/dist/src/executors/esbuild/executor.mjs +6 -6
- package/dist/src/executors/npm-publish/executor.js +5 -6
- package/dist/src/executors/npm-publish/executor.mjs +4 -5
- package/dist/src/executors/size-limit/executor.d.mts +2 -2
- package/dist/src/executors/size-limit/executor.d.ts +2 -2
- package/dist/src/executors/size-limit/executor.js +7 -7
- package/dist/src/executors/size-limit/executor.mjs +6 -6
- package/dist/src/executors/typia/executor.d.mts +2 -2
- package/dist/src/executors/typia/executor.d.ts +2 -2
- package/dist/src/executors/typia/executor.js +7 -7
- package/dist/src/executors/typia/executor.mjs +6 -6
- package/dist/src/executors/unbuild/executor.d.mts +2 -2
- package/dist/src/executors/unbuild/executor.d.ts +2 -2
- package/dist/src/executors/unbuild/executor.js +7 -7
- package/dist/src/executors/unbuild/executor.mjs +6 -6
- package/dist/src/generators/browser-library/generator.d.mts +3 -3
- package/dist/src/generators/browser-library/generator.d.ts +3 -3
- package/dist/src/generators/browser-library/generator.js +7 -7
- package/dist/src/generators/browser-library/generator.mjs +6 -6
- package/dist/src/generators/config-schema/generator.d.mts +3 -3
- package/dist/src/generators/config-schema/generator.d.ts +3 -3
- package/dist/src/generators/config-schema/generator.js +7 -7
- package/dist/src/generators/config-schema/generator.mjs +6 -6
- package/dist/src/generators/neutral-library/generator.d.mts +3 -3
- package/dist/src/generators/neutral-library/generator.d.ts +3 -3
- package/dist/src/generators/neutral-library/generator.js +7 -7
- package/dist/src/generators/neutral-library/generator.mjs +6 -6
- package/dist/src/generators/node-library/generator.d.mts +3 -3
- package/dist/src/generators/node-library/generator.d.ts +3 -3
- package/dist/src/generators/node-library/generator.js +7 -7
- package/dist/src/generators/node-library/generator.mjs +6 -6
- package/dist/src/generators/preset/generator.d.mts +3 -3
- package/dist/src/generators/preset/generator.d.ts +3 -3
- package/dist/src/generators/preset/generator.js +7 -7
- package/dist/src/generators/preset/generator.mjs +6 -6
- package/dist/src/generators/release-version/generator.d.mts +2 -2
- package/dist/src/generators/release-version/generator.d.ts +2 -2
- package/dist/src/generators/release-version/generator.js +6 -6
- package/dist/src/generators/release-version/generator.mjs +5 -5
- package/dist/src/plugins/rust/cargo-toml.js +3 -2
- package/dist/src/plugins/rust/cargo-toml.mjs +2 -1
- package/dist/src/plugins/rust/index.js +3 -2
- package/dist/src/plugins/rust/index.mjs +2 -1
- package/dist/src/plugins/typescript/index.js +3 -3
- package/dist/src/plugins/typescript/index.mjs +2 -2
- package/dist/src/plugins/typescript/project-config.js +3 -3
- package/dist/src/plugins/typescript/project-config.mjs +2 -2
- package/dist/src/plugins/typescript/tsup.js +22 -19
- package/dist/src/plugins/typescript/tsup.mjs +21 -18
- package/dist/src/plugins/typescript/untyped-schema.js +18 -15
- package/dist/src/plugins/typescript/untyped-schema.mjs +18 -15
- package/dist/src/types.d.mts +2 -2
- package/dist/src/types.d.ts +2 -2
- package/dist/src/utils/apply-workspace-tokens.d.mts +1 -1
- package/dist/src/utils/apply-workspace-tokens.d.ts +1 -1
- package/dist/src/utils/apply-workspace-tokens.js +3 -3
- package/dist/src/utils/apply-workspace-tokens.mjs +2 -2
- package/dist/src/utils/get-project-configurations.js +3 -3
- package/dist/src/utils/get-project-configurations.mjs +2 -2
- package/dist/src/utils/index.d.mts +4 -3
- package/dist/src/utils/index.d.ts +4 -3
- package/dist/src/utils/index.js +19 -9
- package/dist/src/utils/index.mjs +20 -10
- package/dist/src/utils/nx-json.d.mts +57 -0
- package/dist/src/utils/nx-json.d.ts +57 -0
- package/dist/src/utils/nx-json.js +11 -0
- package/dist/src/utils/nx-json.mjs +11 -0
- package/dist/src/utils/package-helpers.js +4 -5
- package/dist/src/utils/package-helpers.mjs +3 -4
- package/dist/src/utils/plugin-helpers.d.mts +7 -6
- package/dist/src/utils/plugin-helpers.d.ts +7 -6
- package/dist/src/utils/plugin-helpers.js +4 -2
- package/dist/src/utils/plugin-helpers.mjs +5 -3
- package/dist/src/utils/project-tags.d.mts +2 -2
- package/dist/src/utils/project-tags.d.ts +2 -2
- package/dist/{types-DvynnIqE.d.mts → types-DWiPwz5j.d.mts} +12 -6
- package/dist/{types-DvynnIqE.d.ts → types-DWiPwz5j.d.ts} +12 -6
- package/dist/{types-jXJWvL7s.d.mts → types-DXRPpxuL.d.mts} +1 -1
- package/dist/{types-SUxfrM7H.d.ts → types-ifEQCCcO.d.ts} +1 -1
- package/package.json +5 -5
- package/dist/chunk-BP22TRDI.js +0 -665
- package/dist/chunk-SW2AFRXA.mjs +0 -665
- /package/dist/{chunk-JGP4YWZY.js → chunk-DO2X7OZO.js} +0 -0
- /package/dist/{chunk-6YZ3OUJB.mjs → chunk-XCVH63OO.mjs} +0 -0
|
@@ -1,25 +1,314 @@
|
|
|
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
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } 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; }
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
|
|
8
7
|
|
|
8
|
+
var _chunk2CDSXWFAjs = require('./chunk-2CDSXWFA.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
var _chunkHNFKVXBVjs = require('./chunk-HNFKVXBV.js');
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
|
|
15
|
+
var _chunk53DNHF7Bjs = require('./chunk-53DNHF7B.js');
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
// ../config/src/schema.ts
|
|
18
|
+
var _zod = require('zod'); var z = _interopRequireWildcard(_zod);
|
|
16
19
|
|
|
20
|
+
// ../config/src/constants.ts
|
|
21
|
+
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
22
|
+
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
23
|
+
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
24
|
+
var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
|
|
25
|
+
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
26
|
+
var STORM_DEFAULT_SOCIAL_TWITTER = "StormSoftwareHQ";
|
|
27
|
+
var STORM_DEFAULT_SOCIAL_DISCORD = "https://discord.gg/MQ6YVzakM5";
|
|
28
|
+
var STORM_DEFAULT_SOCIAL_TELEGRAM = "https://t.me/storm_software";
|
|
29
|
+
var STORM_DEFAULT_SOCIAL_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
|
|
30
|
+
var STORM_DEFAULT_SOCIAL_MEDIUM = "https://medium.com/storm-software";
|
|
31
|
+
var STORM_DEFAULT_SOCIAL_GITHUB = "https://github.com/storm-software";
|
|
32
|
+
var STORM_DEFAULT_RELEASE_FOOTER = `
|
|
33
|
+
Storm Software is an open source software development organization with the mission is to make software development more accessible. Our ideal future is one where anyone can create software without years of prior development experience serving as a barrier to entry. We hope to achieve this via LLMs, Generative AI, and intuitive, high-level data modeling/programming languages.
|
|
17
34
|
|
|
18
|
-
|
|
35
|
+
Join us on [Discord](${STORM_DEFAULT_SOCIAL_DISCORD}) to chat with the team, receive release notifications, ask questions, and get involved.
|
|
19
36
|
|
|
37
|
+
If this sounds interesting, and you would like to help us in creating the next generation of development tools, please reach out on our [website](${STORM_DEFAULT_CONTACT}) or join our [Slack](${STORM_DEFAULT_SOCIAL_SLACK}) channel!
|
|
38
|
+
`;
|
|
39
|
+
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
20
40
|
|
|
41
|
+
// ../config/src/schema.ts
|
|
42
|
+
var ColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7);
|
|
43
|
+
var DarkColorSchema = ColorSchema.default("#151718").describe(
|
|
44
|
+
"The dark background color of the workspace"
|
|
45
|
+
);
|
|
46
|
+
var LightColorSchema = ColorSchema.default("#cbd5e1").describe(
|
|
47
|
+
"The light background color of the workspace"
|
|
48
|
+
);
|
|
49
|
+
var BrandColorSchema = ColorSchema.default("#1fb2a6").describe(
|
|
50
|
+
"The primary brand specific color of the workspace"
|
|
51
|
+
);
|
|
52
|
+
var AlternateColorSchema = ColorSchema.optional().describe(
|
|
53
|
+
"The alternate brand specific color of the workspace"
|
|
54
|
+
);
|
|
55
|
+
var AccentColorSchema = ColorSchema.optional().describe(
|
|
56
|
+
"The secondary brand specific color of the workspace"
|
|
57
|
+
);
|
|
58
|
+
var LinkColorSchema = ColorSchema.default("#3fa6ff").describe(
|
|
59
|
+
"The color used to display hyperlink text"
|
|
60
|
+
);
|
|
61
|
+
var HelpColorSchema = ColorSchema.default("#818cf8").describe(
|
|
62
|
+
"The second brand specific color of the workspace"
|
|
63
|
+
);
|
|
64
|
+
var SuccessColorSchema = ColorSchema.default("#45b27e").describe(
|
|
65
|
+
"The success color of the workspace"
|
|
66
|
+
);
|
|
67
|
+
var InfoColorSchema = ColorSchema.default("#38bdf8").describe(
|
|
68
|
+
"The informational color of the workspace"
|
|
69
|
+
);
|
|
70
|
+
var WarningColorSchema = ColorSchema.default("#f3d371").describe(
|
|
71
|
+
"The warning color of the workspace"
|
|
72
|
+
);
|
|
73
|
+
var DangerColorSchema = ColorSchema.default("#d8314a").describe(
|
|
74
|
+
"The danger color of the workspace"
|
|
75
|
+
);
|
|
76
|
+
var FatalColorSchema = ColorSchema.optional().describe(
|
|
77
|
+
"The fatal color of the workspace"
|
|
78
|
+
);
|
|
79
|
+
var PositiveColorSchema = ColorSchema.default("#4ade80").describe(
|
|
80
|
+
"The positive number color of the workspace"
|
|
81
|
+
);
|
|
82
|
+
var NegativeColorSchema = ColorSchema.default("#ef4444").describe(
|
|
83
|
+
"The negative number color of the workspace"
|
|
84
|
+
);
|
|
85
|
+
var GradientStopsSchema = z.array(ColorSchema).optional().describe(
|
|
86
|
+
"The color stops for the base gradient color pattern used in the workspace"
|
|
87
|
+
);
|
|
88
|
+
var DarkThemeColorConfigSchema = z.object({
|
|
89
|
+
foreground: LightColorSchema,
|
|
90
|
+
background: DarkColorSchema,
|
|
91
|
+
brand: BrandColorSchema,
|
|
92
|
+
alternate: AlternateColorSchema,
|
|
93
|
+
accent: AccentColorSchema,
|
|
94
|
+
link: LinkColorSchema,
|
|
95
|
+
help: HelpColorSchema,
|
|
96
|
+
success: SuccessColorSchema,
|
|
97
|
+
info: InfoColorSchema,
|
|
98
|
+
warning: WarningColorSchema,
|
|
99
|
+
danger: DangerColorSchema,
|
|
100
|
+
fatal: FatalColorSchema,
|
|
101
|
+
positive: PositiveColorSchema,
|
|
102
|
+
negative: NegativeColorSchema,
|
|
103
|
+
gradient: GradientStopsSchema
|
|
104
|
+
});
|
|
105
|
+
var LightThemeColorConfigSchema = z.object({
|
|
106
|
+
foreground: DarkColorSchema,
|
|
107
|
+
background: LightColorSchema,
|
|
108
|
+
brand: BrandColorSchema,
|
|
109
|
+
alternate: AlternateColorSchema,
|
|
110
|
+
accent: AccentColorSchema,
|
|
111
|
+
link: LinkColorSchema,
|
|
112
|
+
help: HelpColorSchema,
|
|
113
|
+
success: SuccessColorSchema,
|
|
114
|
+
info: InfoColorSchema,
|
|
115
|
+
warning: WarningColorSchema,
|
|
116
|
+
danger: DangerColorSchema,
|
|
117
|
+
fatal: FatalColorSchema,
|
|
118
|
+
positive: PositiveColorSchema,
|
|
119
|
+
negative: NegativeColorSchema,
|
|
120
|
+
gradient: GradientStopsSchema
|
|
121
|
+
});
|
|
122
|
+
var MultiThemeColorConfigSchema = z.object({
|
|
123
|
+
dark: DarkThemeColorConfigSchema,
|
|
124
|
+
light: LightThemeColorConfigSchema
|
|
125
|
+
});
|
|
126
|
+
var SingleThemeColorConfigSchema = z.object({
|
|
127
|
+
dark: DarkColorSchema,
|
|
128
|
+
light: LightColorSchema,
|
|
129
|
+
brand: BrandColorSchema,
|
|
130
|
+
alternate: AlternateColorSchema,
|
|
131
|
+
accent: AccentColorSchema,
|
|
132
|
+
link: LinkColorSchema,
|
|
133
|
+
help: HelpColorSchema,
|
|
134
|
+
success: SuccessColorSchema,
|
|
135
|
+
info: InfoColorSchema,
|
|
136
|
+
warning: WarningColorSchema,
|
|
137
|
+
danger: DangerColorSchema,
|
|
138
|
+
fatal: FatalColorSchema,
|
|
139
|
+
positive: PositiveColorSchema,
|
|
140
|
+
negative: NegativeColorSchema,
|
|
141
|
+
gradient: GradientStopsSchema
|
|
142
|
+
});
|
|
143
|
+
var RegistryUrlConfigSchema = z.url().optional().describe("A remote registry URL used to publish distributable packages");
|
|
144
|
+
var RegistryConfigSchema = z.object({
|
|
145
|
+
github: RegistryUrlConfigSchema,
|
|
146
|
+
npm: RegistryUrlConfigSchema,
|
|
147
|
+
cargo: RegistryUrlConfigSchema,
|
|
148
|
+
cyclone: RegistryUrlConfigSchema,
|
|
149
|
+
container: RegistryUrlConfigSchema
|
|
150
|
+
}).default({}).describe("A list of remote registry URLs used by Storm Software");
|
|
151
|
+
var ColorConfigSchema = SingleThemeColorConfigSchema.or(
|
|
152
|
+
MultiThemeColorConfigSchema
|
|
153
|
+
).describe("Colors used for various workspace elements");
|
|
154
|
+
var ColorConfigMapSchema = z.record(
|
|
155
|
+
z.union([z.literal("base"), z.string()]),
|
|
156
|
+
ColorConfigSchema
|
|
157
|
+
);
|
|
158
|
+
var ExtendsItemSchema = z.string().trim().describe(
|
|
159
|
+
"The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration."
|
|
160
|
+
);
|
|
161
|
+
var ExtendsSchema = ExtendsItemSchema.or(
|
|
162
|
+
z.array(ExtendsItemSchema)
|
|
163
|
+
).describe(
|
|
164
|
+
"The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration."
|
|
165
|
+
);
|
|
166
|
+
var WorkspaceBotConfigSchema = z.object({
|
|
167
|
+
name: z.string().trim().default("stormie-bot").describe(
|
|
168
|
+
"The workspace bot user's name (this is the bot that will be used to perform various tasks)"
|
|
169
|
+
),
|
|
170
|
+
email: z.email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
171
|
+
}).describe(
|
|
172
|
+
"The workspace's bot user's config used to automated various operations tasks"
|
|
173
|
+
);
|
|
174
|
+
var WorkspaceReleaseConfigSchema = z.object({
|
|
175
|
+
banner: z.string().trim().optional().describe(
|
|
176
|
+
"A URL to a banner image used to display the workspace's release"
|
|
177
|
+
),
|
|
178
|
+
header: z.string().trim().optional().describe(
|
|
179
|
+
"A header message appended to the start of the workspace's release notes"
|
|
180
|
+
),
|
|
181
|
+
footer: z.string().trim().optional().describe(
|
|
182
|
+
"A footer message appended to the end of the workspace's release notes"
|
|
183
|
+
)
|
|
184
|
+
}).describe("The workspace's release config used during the release process");
|
|
185
|
+
var WorkspaceSocialsConfigSchema = z.object({
|
|
186
|
+
twitter: z.string().trim().default(STORM_DEFAULT_SOCIAL_TWITTER).describe("A Twitter/X account associated with the organization/project"),
|
|
187
|
+
discord: z.string().trim().default(STORM_DEFAULT_SOCIAL_DISCORD).describe("A Discord account associated with the organization/project"),
|
|
188
|
+
telegram: z.string().trim().default(STORM_DEFAULT_SOCIAL_TELEGRAM).describe("A Telegram account associated with the organization/project"),
|
|
189
|
+
slack: z.string().trim().default(STORM_DEFAULT_SOCIAL_SLACK).describe("A Slack account associated with the organization/project"),
|
|
190
|
+
medium: z.string().trim().default(STORM_DEFAULT_SOCIAL_MEDIUM).describe("A Medium account associated with the organization/project"),
|
|
191
|
+
github: z.string().trim().default(STORM_DEFAULT_SOCIAL_GITHUB).describe("A GitHub account associated with the organization/project")
|
|
192
|
+
}).describe(
|
|
193
|
+
"The workspace's account config used to store various social media links"
|
|
194
|
+
);
|
|
195
|
+
var WorkspaceDirectoryConfigSchema = z.object({
|
|
196
|
+
cache: z.string().trim().optional().describe(
|
|
197
|
+
"The directory used to store the environment's cached file data"
|
|
198
|
+
),
|
|
199
|
+
data: z.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
200
|
+
config: z.string().trim().optional().describe(
|
|
201
|
+
"The directory used to store the environment's configuration files"
|
|
202
|
+
),
|
|
203
|
+
temp: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
204
|
+
log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
205
|
+
build: z.string().trim().default("dist").describe(
|
|
206
|
+
"The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
|
|
207
|
+
)
|
|
208
|
+
}).describe(
|
|
209
|
+
"Various directories used by the workspace to store data, cache, and configuration files"
|
|
210
|
+
);
|
|
211
|
+
var errorConfigSchema = z.object({
|
|
212
|
+
codesFile: z.string().trim().default(STORM_DEFAULT_ERROR_CODES_FILE).describe("The path to the workspace's error codes JSON file"),
|
|
213
|
+
url: z.url().optional().describe(
|
|
214
|
+
"A URL to a page that looks up the workspace's error messages given a specific error code"
|
|
215
|
+
)
|
|
216
|
+
}).describe("The workspace's error config used during the error process");
|
|
217
|
+
var organizationConfigSchema = z.object({
|
|
218
|
+
name: z.string().trim().describe("The name of the organization"),
|
|
219
|
+
description: z.string().trim().optional().describe("A description of the organization"),
|
|
220
|
+
logo: z.url().optional().describe("A URL to the organization's logo image"),
|
|
221
|
+
icon: z.url().optional().describe("A URL to the organization's icon image"),
|
|
222
|
+
url: z.url().optional().describe(
|
|
223
|
+
"A URL to a page that provides more information about the organization"
|
|
224
|
+
)
|
|
225
|
+
}).describe("The workspace's organization details");
|
|
226
|
+
var stormWorkspaceConfigSchema = z.object({
|
|
227
|
+
$schema: z.string().trim().default(
|
|
228
|
+
"https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
|
|
229
|
+
).describe(
|
|
230
|
+
"The URL or file path to the JSON schema file that describes the Storm configuration file"
|
|
231
|
+
),
|
|
232
|
+
extends: ExtendsSchema.optional(),
|
|
233
|
+
name: z.string().trim().toLowerCase().optional().describe(
|
|
234
|
+
"The name of the service/package/scope using this configuration"
|
|
235
|
+
),
|
|
236
|
+
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
237
|
+
organization: organizationConfigSchema.or(z.string().trim().describe("The organization of the workspace")).optional().describe(
|
|
238
|
+
"The organization of the workspace. This can be a string or an object containing the organization's details"
|
|
239
|
+
),
|
|
240
|
+
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
241
|
+
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
242
|
+
homepage: z.url().optional().describe("The homepage of the workspace"),
|
|
243
|
+
docs: z.url().optional().describe("The documentation site for the workspace"),
|
|
244
|
+
portal: z.url().optional().describe("The development portal site for the workspace"),
|
|
245
|
+
licensing: z.url().optional().describe("The licensing site for the workspace"),
|
|
246
|
+
contact: z.url().optional().describe("The contact site for the workspace"),
|
|
247
|
+
support: z.url().optional().describe(
|
|
248
|
+
"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
249
|
+
),
|
|
250
|
+
branch: z.string().trim().default("main").describe("The branch of the workspace"),
|
|
251
|
+
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
252
|
+
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
253
|
+
bot: WorkspaceBotConfigSchema,
|
|
254
|
+
release: WorkspaceReleaseConfigSchema,
|
|
255
|
+
socials: WorkspaceSocialsConfigSchema,
|
|
256
|
+
error: errorConfigSchema,
|
|
257
|
+
mode: z.string().trim().default("production").describe("The current runtime environment mode for the package"),
|
|
258
|
+
workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
|
|
259
|
+
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
260
|
+
directories: WorkspaceDirectoryConfigSchema,
|
|
261
|
+
packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
|
|
262
|
+
"The JavaScript/TypeScript package manager used by the repository"
|
|
263
|
+
),
|
|
264
|
+
timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
265
|
+
locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
266
|
+
logLevel: z.enum([
|
|
267
|
+
"silent",
|
|
268
|
+
"fatal",
|
|
269
|
+
"error",
|
|
270
|
+
"warn",
|
|
271
|
+
"success",
|
|
272
|
+
"info",
|
|
273
|
+
"debug",
|
|
274
|
+
"trace",
|
|
275
|
+
"all"
|
|
276
|
+
]).default("info").describe(
|
|
277
|
+
"The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
|
|
278
|
+
),
|
|
279
|
+
skipConfigLogging: z.boolean().optional().describe(
|
|
280
|
+
"Should the logging of the current Storm Workspace configuration be skipped?"
|
|
281
|
+
),
|
|
282
|
+
registry: RegistryConfigSchema,
|
|
283
|
+
configFile: z.string().trim().nullable().default(null).describe(
|
|
284
|
+
"The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
285
|
+
),
|
|
286
|
+
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
|
|
287
|
+
"Storm theme config values used for styling various package elements"
|
|
288
|
+
),
|
|
289
|
+
extensions: z.record(z.string(), z.any()).optional().default({}).describe("Configuration of each used extension")
|
|
290
|
+
}).describe(
|
|
291
|
+
"Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo."
|
|
292
|
+
);
|
|
21
293
|
|
|
22
|
-
|
|
294
|
+
// ../config/src/types.ts
|
|
295
|
+
var COLOR_KEYS = [
|
|
296
|
+
"dark",
|
|
297
|
+
"light",
|
|
298
|
+
"base",
|
|
299
|
+
"brand",
|
|
300
|
+
"alternate",
|
|
301
|
+
"accent",
|
|
302
|
+
"link",
|
|
303
|
+
"success",
|
|
304
|
+
"help",
|
|
305
|
+
"info",
|
|
306
|
+
"warning",
|
|
307
|
+
"danger",
|
|
308
|
+
"fatal",
|
|
309
|
+
"positive",
|
|
310
|
+
"negative"
|
|
311
|
+
];
|
|
23
312
|
|
|
24
313
|
// ../config-tools/src/create-storm-config.ts
|
|
25
314
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
@@ -27,14 +316,103 @@ var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
|
27
316
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
28
317
|
var _c12 = require('c12');
|
|
29
318
|
|
|
319
|
+
|
|
320
|
+
// ../config-tools/src/utilities/get-default-config.ts
|
|
321
|
+
var _fs = require('fs');
|
|
322
|
+
var _promises = require('fs/promises');
|
|
323
|
+
var _path = require('path');
|
|
324
|
+
async function getPackageJsonConfig(root) {
|
|
325
|
+
let license = STORM_DEFAULT_LICENSE;
|
|
326
|
+
let homepage = void 0;
|
|
327
|
+
let support = void 0;
|
|
328
|
+
let name = void 0;
|
|
329
|
+
let namespace = void 0;
|
|
330
|
+
let repository = void 0;
|
|
331
|
+
const workspaceRoot = _chunkHNFKVXBVjs.findWorkspaceRoot.call(void 0, root);
|
|
332
|
+
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
|
|
333
|
+
const file = await _promises.readFile.call(void 0,
|
|
334
|
+
_chunk53DNHF7Bjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
335
|
+
"utf8"
|
|
336
|
+
);
|
|
337
|
+
if (file) {
|
|
338
|
+
const packageJson = JSON.parse(file);
|
|
339
|
+
if (packageJson.name) {
|
|
340
|
+
name = packageJson.name;
|
|
341
|
+
}
|
|
342
|
+
if (packageJson.namespace) {
|
|
343
|
+
namespace = packageJson.namespace;
|
|
344
|
+
}
|
|
345
|
+
if (packageJson.repository) {
|
|
346
|
+
if (typeof packageJson.repository === "string") {
|
|
347
|
+
repository = packageJson.repository;
|
|
348
|
+
} else if (packageJson.repository.url) {
|
|
349
|
+
repository = packageJson.repository.url;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
if (packageJson.license) {
|
|
353
|
+
license = packageJson.license;
|
|
354
|
+
}
|
|
355
|
+
if (packageJson.homepage) {
|
|
356
|
+
homepage = packageJson.homepage;
|
|
357
|
+
}
|
|
358
|
+
if (packageJson.bugs) {
|
|
359
|
+
if (typeof packageJson.bugs === "string") {
|
|
360
|
+
support = packageJson.bugs;
|
|
361
|
+
} else if (packageJson.bugs.url) {
|
|
362
|
+
support = packageJson.bugs.url;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
return {
|
|
368
|
+
workspaceRoot,
|
|
369
|
+
name,
|
|
370
|
+
namespace,
|
|
371
|
+
repository,
|
|
372
|
+
license,
|
|
373
|
+
homepage,
|
|
374
|
+
support
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
function applyDefaultConfig(config) {
|
|
378
|
+
if (!config.support && config.contact) {
|
|
379
|
+
config.support = config.contact;
|
|
380
|
+
}
|
|
381
|
+
if (!config.contact && config.support) {
|
|
382
|
+
config.contact = config.support;
|
|
383
|
+
}
|
|
384
|
+
if (config.homepage) {
|
|
385
|
+
if (!config.docs) {
|
|
386
|
+
config.docs = `${config.homepage}/docs`;
|
|
387
|
+
}
|
|
388
|
+
if (!config.license) {
|
|
389
|
+
config.license = `${config.homepage}/license`;
|
|
390
|
+
}
|
|
391
|
+
if (!config.support) {
|
|
392
|
+
config.support = `${config.homepage}/support`;
|
|
393
|
+
}
|
|
394
|
+
if (!config.contact) {
|
|
395
|
+
config.contact = `${config.homepage}/contact`;
|
|
396
|
+
}
|
|
397
|
+
if (!_optionalChain([config, 'access', _ => _.error, 'optionalAccess', _2 => _2.codesFile]) || !_optionalChain([config, 'optionalAccess', _3 => _3.error, 'optionalAccess', _4 => _4.url])) {
|
|
398
|
+
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
399
|
+
if (config.homepage) {
|
|
400
|
+
config.error.url ??= `${config.homepage}/errors`;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
return config;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// ../config-tools/src/config-file/get-config-file.ts
|
|
30
408
|
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
31
|
-
const workspacePath = filePath ||
|
|
409
|
+
const workspacePath = filePath || _chunkHNFKVXBVjs.findWorkspaceRoot.call(void 0, filePath);
|
|
32
410
|
const configs = await Promise.all([
|
|
33
411
|
_c12.loadConfig.call(void 0, {
|
|
34
412
|
cwd: workspacePath,
|
|
35
413
|
packageJson: true,
|
|
36
414
|
name: fileName,
|
|
37
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
415
|
+
envName: _optionalChain([fileName, 'optionalAccess', _5 => _5.toUpperCase, 'call', _6 => _6()]),
|
|
38
416
|
jitiOptions: {
|
|
39
417
|
debug: false,
|
|
40
418
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
@@ -48,7 +426,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
48
426
|
cwd: workspacePath,
|
|
49
427
|
packageJson: true,
|
|
50
428
|
name: fileName,
|
|
51
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
429
|
+
envName: _optionalChain([fileName, 'optionalAccess', _7 => _7.toUpperCase, 'call', _8 => _8()]),
|
|
52
430
|
jitiOptions: {
|
|
53
431
|
debug: false,
|
|
54
432
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
@@ -63,12 +441,12 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
63
441
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
64
442
|
};
|
|
65
443
|
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
66
|
-
const workspacePath = filePath ? filePath :
|
|
444
|
+
const workspacePath = filePath ? filePath : _chunkHNFKVXBVjs.findWorkspaceRoot.call(void 0, filePath);
|
|
67
445
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
68
446
|
let config = result.config;
|
|
69
447
|
const configFile = result.configFile;
|
|
70
448
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
71
|
-
|
|
449
|
+
_chunk2CDSXWFAjs.writeTrace.call(void 0,
|
|
72
450
|
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
73
451
|
{
|
|
74
452
|
logLevel: "all"
|
|
@@ -82,9 +460,9 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
82
460
|
)
|
|
83
461
|
);
|
|
84
462
|
for (const result2 of results) {
|
|
85
|
-
if (_optionalChain([result2, 'optionalAccess',
|
|
463
|
+
if (_optionalChain([result2, 'optionalAccess', _9 => _9.config]) && _optionalChain([result2, 'optionalAccess', _10 => _10.configFile]) && Object.keys(result2.config).length > 0) {
|
|
86
464
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
87
|
-
|
|
465
|
+
_chunk2CDSXWFAjs.writeTrace.call(void 0,
|
|
88
466
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
89
467
|
{
|
|
90
468
|
logLevel: "all"
|
|
@@ -192,13 +570,13 @@ var getConfigEnv = () => {
|
|
|
192
570
|
},
|
|
193
571
|
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
194
572
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
195
|
-
) ?
|
|
573
|
+
) ? _chunk2CDSXWFAjs.getLogLevelLabel.call(void 0,
|
|
196
574
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
197
575
|
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
198
576
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
199
577
|
};
|
|
200
578
|
const themeNames = Object.keys(process.env).filter(
|
|
201
|
-
(envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
579
|
+
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every(
|
|
202
580
|
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
203
581
|
)
|
|
204
582
|
);
|
|
@@ -209,16 +587,16 @@ var getConfigEnv = () => {
|
|
|
209
587
|
},
|
|
210
588
|
{}
|
|
211
589
|
) : getThemeColorConfigEnv(prefix);
|
|
212
|
-
if (config.docs ===
|
|
213
|
-
if (config.homepage ===
|
|
214
|
-
config.docs = `${
|
|
590
|
+
if (config.docs === STORM_DEFAULT_DOCS) {
|
|
591
|
+
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
592
|
+
config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
215
593
|
} else {
|
|
216
594
|
config.docs = `${config.homepage}/docs`;
|
|
217
595
|
}
|
|
218
596
|
}
|
|
219
|
-
if (config.licensing ===
|
|
220
|
-
if (config.homepage ===
|
|
221
|
-
config.licensing = `${
|
|
597
|
+
if (config.licensing === STORM_DEFAULT_LICENSING) {
|
|
598
|
+
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
599
|
+
config.licensing = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
222
600
|
} else {
|
|
223
601
|
config.licensing = `${config.homepage}/docs`;
|
|
224
602
|
}
|
|
@@ -240,6 +618,19 @@ var getThemeColorConfigEnv = (prefix, theme) => {
|
|
|
240
618
|
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
|
|
241
619
|
};
|
|
242
620
|
var getSingleThemeColorConfigEnv = (prefix) => {
|
|
621
|
+
const gradient = [];
|
|
622
|
+
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
623
|
+
gradient.push(
|
|
624
|
+
process.env[`${prefix}GRADIENT_START`],
|
|
625
|
+
process.env[`${prefix}GRADIENT_END`]
|
|
626
|
+
);
|
|
627
|
+
} else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
|
|
628
|
+
let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
|
|
629
|
+
while (process.env[`${prefix}GRADIENT_${index}`]) {
|
|
630
|
+
gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
|
|
631
|
+
index++;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
243
634
|
return {
|
|
244
635
|
dark: process.env[`${prefix}DARK`],
|
|
245
636
|
light: process.env[`${prefix}LIGHT`],
|
|
@@ -254,7 +645,8 @@ var getSingleThemeColorConfigEnv = (prefix) => {
|
|
|
254
645
|
danger: process.env[`${prefix}DANGER`],
|
|
255
646
|
fatal: process.env[`${prefix}FATAL`],
|
|
256
647
|
positive: process.env[`${prefix}POSITIVE`],
|
|
257
|
-
negative: process.env[`${prefix}NEGATIVE`]
|
|
648
|
+
negative: process.env[`${prefix}NEGATIVE`],
|
|
649
|
+
gradient
|
|
258
650
|
};
|
|
259
651
|
};
|
|
260
652
|
var getMultiThemeColorConfigEnv = (prefix) => {
|
|
@@ -266,6 +658,19 @@ var getMultiThemeColorConfigEnv = (prefix) => {
|
|
|
266
658
|
};
|
|
267
659
|
};
|
|
268
660
|
var getBaseThemeColorConfigEnv = (prefix) => {
|
|
661
|
+
const gradient = [];
|
|
662
|
+
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
663
|
+
gradient.push(
|
|
664
|
+
process.env[`${prefix}GRADIENT_START`],
|
|
665
|
+
process.env[`${prefix}GRADIENT_END`]
|
|
666
|
+
);
|
|
667
|
+
} else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
|
|
668
|
+
let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
|
|
669
|
+
while (process.env[`${prefix}GRADIENT_${index}`]) {
|
|
670
|
+
gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
|
|
671
|
+
index++;
|
|
672
|
+
}
|
|
673
|
+
}
|
|
269
674
|
return {
|
|
270
675
|
foreground: process.env[`${prefix}FOREGROUND`],
|
|
271
676
|
background: process.env[`${prefix}BACKGROUND`],
|
|
@@ -280,7 +685,8 @@ var getBaseThemeColorConfigEnv = (prefix) => {
|
|
|
280
685
|
danger: process.env[`${prefix}DANGER`],
|
|
281
686
|
fatal: process.env[`${prefix}FATAL`],
|
|
282
687
|
positive: process.env[`${prefix}POSITIVE`],
|
|
283
|
-
negative: process.env[`${prefix}NEGATIVE`]
|
|
688
|
+
negative: process.env[`${prefix}NEGATIVE`],
|
|
689
|
+
gradient
|
|
284
690
|
};
|
|
285
691
|
};
|
|
286
692
|
|
|
@@ -288,16 +694,16 @@ var getBaseThemeColorConfigEnv = (prefix) => {
|
|
|
288
694
|
var setExtensionEnv = (extensionName, extension) => {
|
|
289
695
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
290
696
|
if (extension[key]) {
|
|
291
|
-
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess',
|
|
697
|
+
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _11 => _11.replace, 'call', _12 => _12(
|
|
292
698
|
/([A-Z])+/g,
|
|
293
|
-
(input) => input ? _optionalChain([input, 'access',
|
|
294
|
-
), 'access',
|
|
699
|
+
(input) => input ? _optionalChain([input, 'access', _13 => _13[0], 'optionalAccess', _14 => _14.toUpperCase, 'call', _15 => _15()]) + input.slice(1) : ""
|
|
700
|
+
), 'access', _16 => _16.split, 'call', _17 => _17(/(?=[A-Z])|[.\-\s_]/), 'access', _18 => _18.map, 'call', _19 => _19((x) => x.toLowerCase())]), () => ( []));
|
|
295
701
|
let extensionKey;
|
|
296
702
|
if (result.length === 0) {
|
|
297
703
|
return;
|
|
298
704
|
}
|
|
299
705
|
if (result.length === 1) {
|
|
300
|
-
extensionKey = _nullishCoalesce(_optionalChain([result, 'access',
|
|
706
|
+
extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _20 => _20[0], 'optionalAccess', _21 => _21.toUpperCase, 'call', _22 => _22()]), () => ( ""));
|
|
301
707
|
} else {
|
|
302
708
|
extensionKey = result.reduce((ret, part) => {
|
|
303
709
|
return `${ret}_${part.toLowerCase()}`;
|
|
@@ -411,11 +817,12 @@ var setConfigEnv = (config) => {
|
|
|
411
817
|
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
412
818
|
process.env.TZ = config.timezone;
|
|
413
819
|
process.env.DEFAULT_TIMEZONE = config.timezone;
|
|
820
|
+
process.env.TIMEZONE = config.timezone;
|
|
414
821
|
}
|
|
415
822
|
if (config.locale) {
|
|
416
823
|
process.env[`${prefix}LOCALE`] = config.locale;
|
|
417
|
-
process.env.LOCALE = config.locale;
|
|
418
824
|
process.env.DEFAULT_LOCALE = config.locale;
|
|
825
|
+
process.env.LOCALE = config.locale;
|
|
419
826
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
420
827
|
}
|
|
421
828
|
if (config.configFile) {
|
|
@@ -470,7 +877,7 @@ var setConfigEnv = (config) => {
|
|
|
470
877
|
process.env.NODE_ENV = config.mode;
|
|
471
878
|
process.env.ENVIRONMENT = config.mode;
|
|
472
879
|
}
|
|
473
|
-
if (_optionalChain([config, 'access',
|
|
880
|
+
if (_optionalChain([config, 'access', _23 => _23.colors, 'optionalAccess', _24 => _24.base, 'optionalAccess', _25 => _25.light]) || _optionalChain([config, 'access', _26 => _26.colors, 'optionalAccess', _27 => _27.base, 'optionalAccess', _28 => _28.dark])) {
|
|
474
881
|
for (const key of Object.keys(config.colors)) {
|
|
475
882
|
setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
476
883
|
}
|
|
@@ -514,9 +921,9 @@ var setConfigEnv = (config) => {
|
|
|
514
921
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
515
922
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
516
923
|
process.env.NX_VERBOSE_LOGGING = String(
|
|
517
|
-
|
|
924
|
+
_chunk2CDSXWFAjs.getLogLevel.call(void 0, config.logLevel) >= _chunk2CDSXWFAjs.LogLevel.DEBUG ? true : false
|
|
518
925
|
);
|
|
519
|
-
process.env.RUST_BACKTRACE =
|
|
926
|
+
process.env.RUST_BACKTRACE = _chunk2CDSXWFAjs.getLogLevel.call(void 0, config.logLevel) >= _chunk2CDSXWFAjs.LogLevel.DEBUG ? "full" : "none";
|
|
520
927
|
}
|
|
521
928
|
if (config.skipConfigLogging !== void 0) {
|
|
522
929
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
@@ -531,7 +938,7 @@ var setConfigEnv = (config) => {
|
|
|
531
938
|
}
|
|
532
939
|
};
|
|
533
940
|
var setThemeColorConfigEnv = (prefix, config) => {
|
|
534
|
-
return _optionalChain([config, 'optionalAccess',
|
|
941
|
+
return _optionalChain([config, 'optionalAccess', _29 => _29.light, 'optionalAccess', _30 => _30.brand]) || _optionalChain([config, 'optionalAccess', _31 => _31.dark, 'optionalAccess', _32 => _32.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
|
|
535
942
|
};
|
|
536
943
|
var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
537
944
|
if (config.dark) {
|
|
@@ -576,6 +983,11 @@ var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
|
576
983
|
if (config.negative) {
|
|
577
984
|
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
578
985
|
}
|
|
986
|
+
if (config.gradient) {
|
|
987
|
+
for (let i = 0; i < config.gradient.length; i++) {
|
|
988
|
+
process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
|
|
989
|
+
}
|
|
990
|
+
}
|
|
579
991
|
};
|
|
580
992
|
var setMultiThemeColorConfigEnv = (prefix, config) => {
|
|
581
993
|
return {
|
|
@@ -626,6 +1038,11 @@ var setBaseThemeColorConfigEnv = (prefix, config) => {
|
|
|
626
1038
|
if (config.negative) {
|
|
627
1039
|
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
628
1040
|
}
|
|
1041
|
+
if (config.gradient) {
|
|
1042
|
+
for (let i = 0; i < config.gradient.length; i++) {
|
|
1043
|
+
process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
629
1046
|
};
|
|
630
1047
|
|
|
631
1048
|
// ../config-tools/src/create-storm-config.ts
|
|
@@ -633,16 +1050,16 @@ var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
|
633
1050
|
var _static_cache = void 0;
|
|
634
1051
|
var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
635
1052
|
let result;
|
|
636
|
-
if (!_optionalChain([_static_cache, 'optionalAccess',
|
|
1053
|
+
if (!_optionalChain([_static_cache, 'optionalAccess', _33 => _33.data]) || !_optionalChain([_static_cache, 'optionalAccess', _34 => _34.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
637
1054
|
let _workspaceRoot = workspaceRoot;
|
|
638
1055
|
if (!_workspaceRoot) {
|
|
639
|
-
_workspaceRoot =
|
|
1056
|
+
_workspaceRoot = _chunkHNFKVXBVjs.findWorkspaceRoot.call(void 0, );
|
|
640
1057
|
}
|
|
641
1058
|
const configEnv = getConfigEnv();
|
|
642
1059
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
643
1060
|
if (!configFile) {
|
|
644
1061
|
if (!skipLogs) {
|
|
645
|
-
|
|
1062
|
+
_chunk2CDSXWFAjs.writeWarning.call(void 0,
|
|
646
1063
|
"No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n",
|
|
647
1064
|
{ logLevel: "all" }
|
|
648
1065
|
);
|
|
@@ -651,22 +1068,22 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
651
1068
|
return void 0;
|
|
652
1069
|
}
|
|
653
1070
|
}
|
|
654
|
-
const defaultConfig = await
|
|
1071
|
+
const defaultConfig = await getPackageJsonConfig(_workspaceRoot);
|
|
655
1072
|
const configInput = _defu2.default.call(void 0,
|
|
656
1073
|
configEnv,
|
|
657
1074
|
configFile,
|
|
658
1075
|
defaultConfig
|
|
659
1076
|
);
|
|
660
1077
|
try {
|
|
661
|
-
result =
|
|
662
|
-
await
|
|
1078
|
+
result = applyDefaultConfig(
|
|
1079
|
+
await stormWorkspaceConfigSchema.parseAsync(configInput)
|
|
663
1080
|
);
|
|
664
1081
|
result.workspaceRoot ??= _workspaceRoot;
|
|
665
1082
|
} catch (error) {
|
|
666
1083
|
throw new Error(
|
|
667
|
-
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess',
|
|
1084
|
+
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _35 => _35.message]) ? `: ${error.message}` : ""}
|
|
668
1085
|
|
|
669
|
-
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${
|
|
1086
|
+
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${_chunk2CDSXWFAjs.formatLogMessage.call(void 0,
|
|
670
1087
|
configInput
|
|
671
1088
|
)}`,
|
|
672
1089
|
{
|
|
@@ -711,9 +1128,9 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
|
711
1128
|
);
|
|
712
1129
|
setConfigEnv(config);
|
|
713
1130
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
714
|
-
|
|
1131
|
+
_chunk2CDSXWFAjs.writeTrace.call(void 0,
|
|
715
1132
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
716
|
-
${
|
|
1133
|
+
${_chunk2CDSXWFAjs.formatLogMessage.call(void 0, config)}`,
|
|
717
1134
|
config
|
|
718
1135
|
);
|
|
719
1136
|
}
|
|
@@ -727,7 +1144,7 @@ var getConfig = (workspaceRoot, skipLogs = false) => {
|
|
|
727
1144
|
var getWorkspaceConfig = (skipLogs = true, options = {}) => {
|
|
728
1145
|
let workspaceRoot = options.workspaceRoot;
|
|
729
1146
|
if (!workspaceRoot) {
|
|
730
|
-
workspaceRoot =
|
|
1147
|
+
workspaceRoot = _chunkHNFKVXBVjs.findWorkspaceRoot.call(void 0, options.cwd);
|
|
731
1148
|
}
|
|
732
1149
|
return getConfig(workspaceRoot, skipLogs);
|
|
733
1150
|
};
|
|
@@ -735,4 +1152,5 @@ var getWorkspaceConfig = (skipLogs = true, options = {}) => {
|
|
|
735
1152
|
|
|
736
1153
|
|
|
737
1154
|
|
|
738
|
-
|
|
1155
|
+
|
|
1156
|
+
exports.stormWorkspaceConfigSchema = stormWorkspaceConfigSchema; exports.getConfig = getConfig; exports.getWorkspaceConfig = getWorkspaceConfig;
|