@storm-software/config-tools 1.119.0 → 1.130.2
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/chunk-4IYEDNYJ.mjs +426 -0
- package/dist/chunk-5QZ7AV2J.js +27 -0
- package/dist/chunk-64RYHF5D.mjs +51 -0
- package/dist/chunk-66ACWURQ.mjs +125 -0
- package/dist/chunk-6OYLNZFT.mjs +169 -0
- package/dist/chunk-6SJLAEJ3.js +70 -0
- package/dist/chunk-6WPG3DXV.js +32 -0
- package/dist/chunk-7KVSSDMX.mjs +545 -0
- package/dist/chunk-7XY63NME.js +44 -0
- package/dist/chunk-A7VLTBS6.mjs +271 -0
- package/dist/chunk-BS5OC5E6.js +426 -0
- package/dist/chunk-E3IN3SQD.mjs +6 -0
- package/dist/chunk-FW22KPOW.mjs +27 -0
- package/dist/chunk-GIZ23UUE.js +189 -0
- package/dist/chunk-GOQAHXJF.mjs +28 -0
- package/dist/chunk-H6XXDZ7A.js +28 -0
- package/dist/chunk-HCF3QA4H.js +102 -0
- package/dist/chunk-JDK3PXQR.js +545 -0
- package/dist/chunk-K6TQN2LZ.js +6 -0
- package/dist/chunk-LKZSRXS7.js +169 -0
- package/dist/chunk-MGI2M3SX.js +6 -0
- package/dist/chunk-N32EGEJB.js +90 -0
- package/dist/chunk-N4BRCEYB.js +27 -0
- package/dist/chunk-OXK45X3L.js +125 -0
- package/dist/chunk-PEHVR33I.js +67 -0
- package/dist/chunk-PQNCKJAR.js +271 -0
- package/dist/chunk-PVPSTJNJ.mjs +90 -0
- package/dist/chunk-QHVHX67K.js +6 -0
- package/dist/chunk-QUVGIEZZ.mjs +6 -0
- package/dist/chunk-RAWSXKTG.mjs +189 -0
- package/dist/chunk-SJO5XZQA.js +6 -0
- package/dist/chunk-TEKFJAJJ.mjs +70 -0
- package/dist/chunk-TTCXDK6S.mjs +27 -0
- package/dist/chunk-UCUOC6LA.mjs +70 -0
- package/dist/chunk-VQLOUFMG.mjs +32 -0
- package/dist/chunk-WRFJFYOU.mjs +51 -0
- package/dist/chunk-WXOSG64C.js +70 -0
- package/dist/chunk-WXYJGX4C.mjs +6 -0
- package/dist/chunk-X6VIYUJR.mjs +6 -0
- package/dist/chunk-XJEQHMOE.js +49 -0
- package/dist/chunk-XLMGW4ZW.mjs +67 -0
- package/dist/chunk-XXHENMLT.mjs +44 -0
- package/dist/chunk-Z2EXWNIQ.mjs +102 -0
- package/dist/chunk-ZVXEYJQO.js +51 -0
- package/dist/config-file/get-config-file.d.mts +20 -0
- package/dist/config-file/get-config-file.d.ts +20 -0
- package/dist/config-file/get-config-file.js +23 -0
- package/dist/config-file/get-config-file.mjs +23 -0
- package/dist/config-file/index.d.mts +4 -0
- package/dist/config-file/index.d.ts +4 -0
- package/dist/config-file/index.js +24 -0
- package/dist/config-file/index.mjs +24 -0
- package/dist/create-storm-config.d.mts +29 -0
- package/dist/create-storm-config.d.ts +29 -0
- package/dist/create-storm-config.js +30 -0
- package/dist/create-storm-config.mjs +30 -0
- package/dist/env/get-env.d.mts +19 -0
- package/dist/env/get-env.d.ts +19 -0
- package/dist/env/get-env.js +13 -0
- package/dist/env/get-env.mjs +13 -0
- package/dist/env/index.d.mts +5 -0
- package/dist/env/index.d.ts +5 -0
- package/dist/env/index.js +20 -0
- package/dist/env/index.mjs +20 -0
- package/{src/env/get-env.d.ts → dist/env/set-env.d.mts} +7 -4
- package/{src → dist}/env/set-env.d.ts +7 -3
- package/dist/env/set-env.js +12 -0
- package/dist/env/set-env.mjs +12 -0
- package/dist/index.d.mts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +132 -0
- package/dist/index.mjs +132 -0
- package/dist/logger/chalk.d.mts +25 -0
- package/{src/utilities → dist/logger}/chalk.d.ts +4 -2
- package/dist/logger/chalk.js +7 -0
- package/dist/logger/chalk.mjs +7 -0
- package/dist/logger/console.d.mts +82 -0
- package/{src/utilities/logger.d.ts → dist/logger/console.d.ts} +18 -14
- package/dist/logger/console.js +35 -0
- package/dist/logger/console.mjs +35 -0
- package/dist/logger/get-log-level.d.mts +27 -0
- package/{src/utilities → dist/logger}/get-log-level.d.ts +9 -4
- package/dist/logger/get-log-level.js +12 -0
- package/dist/logger/get-log-level.mjs +12 -0
- package/dist/logger/index.d.mts +6 -0
- package/dist/logger/index.d.ts +6 -0
- package/dist/logger/index.js +46 -0
- package/dist/logger/index.mjs +46 -0
- package/dist/types-DGWqy1xb.d.mts +1395 -0
- package/dist/types-DGWqy1xb.d.ts +1395 -0
- package/dist/types.d.mts +40 -0
- package/{src → dist}/types.d.ts +14 -7
- package/dist/types.js +9 -0
- package/dist/types.mjs +9 -0
- package/dist/utilities/apply-workspace-tokens.d.mts +9 -0
- package/dist/utilities/apply-workspace-tokens.d.ts +9 -0
- package/dist/utilities/apply-workspace-tokens.js +14 -0
- package/dist/utilities/apply-workspace-tokens.mjs +14 -0
- package/dist/utilities/correct-paths.d.mts +19 -0
- package/dist/utilities/correct-paths.d.ts +19 -0
- package/dist/utilities/correct-paths.js +9 -0
- package/dist/utilities/correct-paths.mjs +9 -0
- package/dist/utilities/file-path-utils.d.mts +4 -0
- package/dist/utilities/file-path-utils.d.ts +4 -0
- package/dist/utilities/file-path-utils.js +9 -0
- package/dist/utilities/file-path-utils.mjs +9 -0
- package/dist/utilities/find-up.d.mts +6 -0
- package/dist/utilities/find-up.d.ts +6 -0
- package/dist/utilities/find-up.js +7 -0
- package/dist/utilities/find-up.mjs +7 -0
- package/dist/utilities/find-workspace-root.d.mts +16 -0
- package/{src → dist}/utilities/find-workspace-root.d.ts +4 -2
- package/dist/utilities/find-workspace-root.js +11 -0
- package/dist/utilities/find-workspace-root.mjs +11 -0
- package/dist/utilities/get-default-config.d.mts +15 -0
- package/dist/utilities/get-default-config.d.ts +15 -0
- package/dist/utilities/get-default-config.js +13 -0
- package/dist/utilities/get-default-config.mjs +13 -0
- package/dist/utilities/index.d.mts +11 -0
- package/dist/utilities/index.d.ts +11 -0
- package/dist/utilities/index.js +58 -0
- package/dist/utilities/index.mjs +58 -0
- package/dist/utilities/process-handler.d.mts +8 -0
- package/dist/utilities/process-handler.d.ts +8 -0
- package/dist/utilities/process-handler.js +20 -0
- package/dist/utilities/process-handler.mjs +20 -0
- package/dist/utilities/run.d.mts +36 -0
- package/dist/utilities/run.d.ts +36 -0
- package/dist/utilities/run.js +11 -0
- package/dist/utilities/run.mjs +11 -0
- package/package.json +1 -24
- package/CHANGELOG.md +0 -3122
- package/declarations.d.ts +0 -304
- package/index.cjs +0 -67508
- package/index.js +0 -67463
- package/meta.cjs.json +0 -5352
- package/meta.esm.json +0 -5413
- package/src/config-file/get-config-file.d.ts +0 -16
- package/src/config-file/index.d.ts +0 -1
- package/src/create-storm-config.d.ts +0 -26
- package/src/env/index.d.ts +0 -2
- package/src/index.d.ts +0 -13
- package/src/utilities/apply-workspace-tokens.d.ts +0 -4
- package/src/utilities/correct-paths.d.ts +0 -1
- package/src/utilities/file-path-utils.d.ts +0 -2
- package/src/utilities/find-up.d.ts +0 -4
- package/src/utilities/get-default-config.d.ts +0 -15
- package/src/utilities/index.d.ts +0 -10
- package/src/utilities/process-handler.d.ts +0 -4
- package/src/utilities/run.d.ts +0 -18
- package/utilities/chalk.cjs +0 -1610
- package/utilities/chalk.js +0 -1605
- package/utilities/find-workspace-root.cjs +0 -118
- package/utilities/find-workspace-root.js +0 -91
- package/utilities/logger.cjs +0 -5914
- package/utilities/logger.js +0 -5897
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name,
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "./chunk-WRFJFYOU.mjs";
|
|
5
|
+
|
|
6
|
+
// src/utilities/file-path-utils.ts
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
import { sep } from "node:path";
|
|
9
|
+
var removeExtension = /* @__PURE__ */ __name((filePath) => {
|
|
10
|
+
const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
11
|
+
if (result.startsWith("./")) {
|
|
12
|
+
return result.substring(2);
|
|
13
|
+
}
|
|
14
|
+
if (result.startsWith(".") || result.startsWith("/")) {
|
|
15
|
+
return result.substring(1);
|
|
16
|
+
}
|
|
17
|
+
return result;
|
|
18
|
+
}, "removeExtension");
|
|
19
|
+
function findFileName(filePath) {
|
|
20
|
+
return filePath?.split(filePath?.includes(sep) ? sep : filePath?.includes("/") ? "/" : "\\")?.pop() ?? "";
|
|
21
|
+
}
|
|
22
|
+
__name(findFileName, "findFileName");
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
removeExtension,
|
|
26
|
+
findFileName
|
|
27
|
+
};
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
|
+
|
|
3
|
+
var _chunkXJEQHMOEjs = require('./chunk-XJEQHMOE.js');
|
|
4
|
+
|
|
5
|
+
// ../config/src/constants.ts
|
|
6
|
+
_chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
|
|
7
|
+
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
8
|
+
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
9
|
+
var STORM_DEFAULT_LICENSING = "https://license.stormsoftware.com";
|
|
10
|
+
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
11
|
+
|
|
12
|
+
// ../config/src/schema.ts
|
|
13
|
+
_chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
|
|
14
|
+
var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);
|
|
15
|
+
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");
|
|
16
|
+
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");
|
|
17
|
+
var BrandColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary brand specific color of the workspace");
|
|
18
|
+
var AlternateColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The alternate brand specific color of the workspace");
|
|
19
|
+
var AccentColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The secondary brand specific color of the workspace");
|
|
20
|
+
var LinkColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The color used to display hyperlink text");
|
|
21
|
+
var HelpColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#8256D0").describe("The second brand specific color of the workspace");
|
|
22
|
+
var SuccessColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#12B66A").describe("The success color of the workspace");
|
|
23
|
+
var InfoColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0070E0").describe("The informational color of the workspace");
|
|
24
|
+
var WarningColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
|
|
25
|
+
var DangerColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#D8314A").describe("The danger color of the workspace");
|
|
26
|
+
var FatalColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The fatal color of the workspace");
|
|
27
|
+
var PositiveColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#4ade80").describe("The positive number color of the workspace");
|
|
28
|
+
var NegativeColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ef4444").describe("The negative number color of the workspace");
|
|
29
|
+
var DarkThemeColorConfigSchema = _zod2.default.object({
|
|
30
|
+
foreground: LightColorSchema,
|
|
31
|
+
background: DarkColorSchema,
|
|
32
|
+
brand: BrandColorSchema,
|
|
33
|
+
alternate: AlternateColorSchema,
|
|
34
|
+
accent: AccentColorSchema,
|
|
35
|
+
link: LinkColorSchema,
|
|
36
|
+
help: HelpColorSchema,
|
|
37
|
+
success: SuccessColorSchema,
|
|
38
|
+
info: InfoColorSchema,
|
|
39
|
+
warning: WarningColorSchema,
|
|
40
|
+
danger: DangerColorSchema,
|
|
41
|
+
fatal: FatalColorSchema,
|
|
42
|
+
positive: PositiveColorSchema,
|
|
43
|
+
negative: NegativeColorSchema
|
|
44
|
+
});
|
|
45
|
+
var LightThemeColorConfigSchema = _zod2.default.object({
|
|
46
|
+
foreground: DarkColorSchema,
|
|
47
|
+
background: LightColorSchema,
|
|
48
|
+
brand: BrandColorSchema,
|
|
49
|
+
alternate: AlternateColorSchema,
|
|
50
|
+
accent: AccentColorSchema,
|
|
51
|
+
link: LinkColorSchema,
|
|
52
|
+
help: HelpColorSchema,
|
|
53
|
+
success: SuccessColorSchema,
|
|
54
|
+
info: InfoColorSchema,
|
|
55
|
+
warning: WarningColorSchema,
|
|
56
|
+
danger: DangerColorSchema,
|
|
57
|
+
fatal: FatalColorSchema,
|
|
58
|
+
positive: PositiveColorSchema,
|
|
59
|
+
negative: NegativeColorSchema
|
|
60
|
+
});
|
|
61
|
+
var MultiThemeColorConfigSchema = _zod2.default.object({
|
|
62
|
+
dark: DarkThemeColorConfigSchema,
|
|
63
|
+
light: LightThemeColorConfigSchema
|
|
64
|
+
});
|
|
65
|
+
var SingleThemeColorConfigSchema = _zod2.default.object({
|
|
66
|
+
dark: DarkColorSchema,
|
|
67
|
+
light: LightColorSchema,
|
|
68
|
+
brand: BrandColorSchema,
|
|
69
|
+
alternate: AlternateColorSchema,
|
|
70
|
+
accent: AccentColorSchema,
|
|
71
|
+
link: LinkColorSchema,
|
|
72
|
+
help: HelpColorSchema,
|
|
73
|
+
success: SuccessColorSchema,
|
|
74
|
+
info: InfoColorSchema,
|
|
75
|
+
warning: WarningColorSchema,
|
|
76
|
+
danger: DangerColorSchema,
|
|
77
|
+
fatal: FatalColorSchema,
|
|
78
|
+
positive: PositiveColorSchema,
|
|
79
|
+
negative: NegativeColorSchema
|
|
80
|
+
});
|
|
81
|
+
var RegistryUrlConfigSchema = _zod2.default.string().trim().toLowerCase().url().optional().describe("A remote registry URL used to publish distributable packages");
|
|
82
|
+
var RegistryConfigSchema = _zod2.default.object({
|
|
83
|
+
github: RegistryUrlConfigSchema,
|
|
84
|
+
npm: RegistryUrlConfigSchema,
|
|
85
|
+
cargo: RegistryUrlConfigSchema,
|
|
86
|
+
cyclone: RegistryUrlConfigSchema,
|
|
87
|
+
container: RegistryUrlConfigSchema
|
|
88
|
+
}).default({}).describe("A list of remote registry URLs used by Storm Software");
|
|
89
|
+
var ColorConfigSchema = SingleThemeColorConfigSchema.or(MultiThemeColorConfigSchema).describe("Colors used for various workspace elements");
|
|
90
|
+
var ColorConfigMapSchema = _zod2.default.union([
|
|
91
|
+
_zod2.default.object({
|
|
92
|
+
"base": ColorConfigSchema
|
|
93
|
+
}),
|
|
94
|
+
_zod2.default.record(_zod2.default.string(), ColorConfigSchema)
|
|
95
|
+
]);
|
|
96
|
+
var WorkspaceBotConfigSchema = _zod2.default.object({
|
|
97
|
+
name: _zod2.default.string().trim().default("Stormie-Bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
|
|
98
|
+
email: _zod2.default.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
99
|
+
}).describe("The workspace's bot user's config used to automated various operations tasks");
|
|
100
|
+
var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
101
|
+
cache: _zod2.default.string().trim().optional().describe("The directory used to store the environment's cached file data"),
|
|
102
|
+
data: _zod2.default.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
103
|
+
config: _zod2.default.string().trim().optional().describe("The directory used to store the environment's configuration files"),
|
|
104
|
+
temp: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
105
|
+
log: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
106
|
+
build: _zod2.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
107
|
+
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
108
|
+
var StormConfigSchema = _zod2.default.object({
|
|
109
|
+
$schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
110
|
+
extends: _zod2.default.string().trim().optional().describe("The path to a base JSON file to use as a configuration preset file"),
|
|
111
|
+
name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
112
|
+
namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
113
|
+
organization: _zod2.default.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
114
|
+
repository: _zod2.default.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
115
|
+
license: _zod2.default.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
116
|
+
homepage: _zod2.default.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
|
|
117
|
+
docs: _zod2.default.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
|
|
118
|
+
licensing: _zod2.default.string().trim().url().default(STORM_DEFAULT_LICENSING).describe("The base licensing site for the workspace"),
|
|
119
|
+
branch: _zod2.default.string().trim().default("main").describe("The branch of the workspace"),
|
|
120
|
+
preid: _zod2.default.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
121
|
+
owner: _zod2.default.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
122
|
+
bot: WorkspaceBotConfigSchema,
|
|
123
|
+
env: _zod2.default.enum([
|
|
124
|
+
"development",
|
|
125
|
+
"staging",
|
|
126
|
+
"production"
|
|
127
|
+
]).default("production").describe("The current runtime environment name for the package"),
|
|
128
|
+
workspaceRoot: _zod2.default.string().trim().default("").describe("The root directory of the workspace"),
|
|
129
|
+
externalPackagePatterns: _zod2.default.array(_zod2.default.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
130
|
+
skipCache: _zod2.default.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
131
|
+
directories: WorkspaceDirectoryConfigSchema,
|
|
132
|
+
packageManager: _zod2.default.enum([
|
|
133
|
+
"npm",
|
|
134
|
+
"yarn",
|
|
135
|
+
"pnpm",
|
|
136
|
+
"bun"
|
|
137
|
+
]).default("npm").describe("The JavaScript/TypeScript package manager used by the repository"),
|
|
138
|
+
timezone: _zod2.default.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
139
|
+
locale: _zod2.default.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
140
|
+
logLevel: _zod2.default.enum([
|
|
141
|
+
"silent",
|
|
142
|
+
"fatal",
|
|
143
|
+
"error",
|
|
144
|
+
"warn",
|
|
145
|
+
"info",
|
|
146
|
+
"debug",
|
|
147
|
+
"trace",
|
|
148
|
+
"all"
|
|
149
|
+
]).default("info").describe("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`)."),
|
|
150
|
+
registry: RegistryConfigSchema,
|
|
151
|
+
configFile: _zod2.default.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
|
|
152
|
+
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
153
|
+
extensions: _zod2.default.record(_zod2.default.any()).optional().default({}).describe("Configuration of each used extension")
|
|
154
|
+
}).describe("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.");
|
|
155
|
+
|
|
156
|
+
// ../config/src/types.ts
|
|
157
|
+
_chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
|
|
158
|
+
var COLOR_KEYS = [
|
|
159
|
+
"dark",
|
|
160
|
+
"light",
|
|
161
|
+
"base",
|
|
162
|
+
"brand",
|
|
163
|
+
"alternate",
|
|
164
|
+
"accent",
|
|
165
|
+
"link",
|
|
166
|
+
"success",
|
|
167
|
+
"help",
|
|
168
|
+
"info",
|
|
169
|
+
"warning",
|
|
170
|
+
"danger",
|
|
171
|
+
"fatal",
|
|
172
|
+
"positive",
|
|
173
|
+
"negative"
|
|
174
|
+
];
|
|
175
|
+
|
|
176
|
+
// ../config/src/index.ts
|
|
177
|
+
_chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
|
|
178
|
+
|
|
179
|
+
// ../config/src/define-config.ts
|
|
180
|
+
_chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.STORM_DEFAULT_LICENSE = STORM_DEFAULT_LICENSE; exports.StormConfigSchema = StormConfigSchema; exports.COLOR_KEYS = COLOR_KEYS;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name,
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "./chunk-WRFJFYOU.mjs";
|
|
5
|
+
|
|
6
|
+
// src/utilities/correct-paths.ts
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
import { joinPathFragments } from "@nx/devkit";
|
|
9
|
+
var correctPaths = /* @__PURE__ */ __name((path) => {
|
|
10
|
+
if (!path) {
|
|
11
|
+
return "";
|
|
12
|
+
}
|
|
13
|
+
if (!path.toUpperCase().startsWith("C:") && path.includes("\\")) {
|
|
14
|
+
path = `C:${path}`;
|
|
15
|
+
}
|
|
16
|
+
return path.replaceAll("\\", "/");
|
|
17
|
+
}, "correctPaths");
|
|
18
|
+
var joinPaths = /* @__PURE__ */ __name((...paths) => {
|
|
19
|
+
if (!paths || paths.length === 0) {
|
|
20
|
+
return "";
|
|
21
|
+
}
|
|
22
|
+
return correctPaths(joinPathFragments(...paths.map((path) => correctPaths(path))));
|
|
23
|
+
}, "joinPaths");
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
correctPaths,
|
|
27
|
+
joinPaths
|
|
28
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkXJEQHMOEjs = require('./chunk-XJEQHMOE.js');
|
|
5
|
+
|
|
6
|
+
// src/utilities/correct-paths.ts
|
|
7
|
+
_chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
|
|
8
|
+
var _devkit = require('@nx/devkit');
|
|
9
|
+
var correctPaths = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (path) => {
|
|
10
|
+
if (!path) {
|
|
11
|
+
return "";
|
|
12
|
+
}
|
|
13
|
+
if (!path.toUpperCase().startsWith("C:") && path.includes("\\")) {
|
|
14
|
+
path = `C:${path}`;
|
|
15
|
+
}
|
|
16
|
+
return path.replaceAll("\\", "/");
|
|
17
|
+
}, "correctPaths");
|
|
18
|
+
var joinPaths = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (...paths) => {
|
|
19
|
+
if (!paths || paths.length === 0) {
|
|
20
|
+
return "";
|
|
21
|
+
}
|
|
22
|
+
return correctPaths(_devkit.joinPathFragments.call(void 0, ...paths.map((path) => correctPaths(path))));
|
|
23
|
+
}, "joinPaths");
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
exports.correctPaths = correctPaths; exports.joinPaths = joinPaths;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkJDK3PXQRjs = require('./chunk-JDK3PXQR.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkLKZSRXS7js = require('./chunk-LKZSRXS7.js');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
var _chunkPQNCKJARjs = require('./chunk-PQNCKJAR.js');
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _chunkOXK45X3Ljs = require('./chunk-OXK45X3L.js');
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
var _chunkN32EGEJBjs = require('./chunk-N32EGEJB.js');
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
var _chunk6SJLAEJ3js = require('./chunk-6SJLAEJ3.js');
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
var _chunkGIZ23UUEjs = require('./chunk-GIZ23UUE.js');
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
var _chunkXJEQHMOEjs = require('./chunk-XJEQHMOE.js');
|
|
30
|
+
|
|
31
|
+
// src/create-storm-config.ts
|
|
32
|
+
_chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
|
|
33
|
+
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
34
|
+
var _static_cache = void 0;
|
|
35
|
+
var createConfig = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (workspaceRoot) => {
|
|
36
|
+
return createStormConfig(void 0, void 0, workspaceRoot);
|
|
37
|
+
}, "createConfig");
|
|
38
|
+
var createStormConfig = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (extensionName, schema, workspaceRoot) => {
|
|
39
|
+
let result;
|
|
40
|
+
if (!_optionalChain([_static_cache, 'optionalAccess', _ => _.data]) || !_optionalChain([_static_cache, 'optionalAccess', _2 => _2.timestamp]) || _static_cache.timestamp < Date.now() - 3e4) {
|
|
41
|
+
const config = _chunkLKZSRXS7js.getConfigEnv.call(void 0, );
|
|
42
|
+
const defaultConfig = _chunkN32EGEJBjs.getDefaultConfig.call(void 0, workspaceRoot);
|
|
43
|
+
result = _chunkGIZ23UUEjs.StormConfigSchema.parse(_chunkJDK3PXQRjs.defu.call(void 0, config, defaultConfig));
|
|
44
|
+
result.workspaceRoot ??= defaultConfig.workspaceRoot || _chunk6SJLAEJ3js.findWorkspaceRoot.call(void 0, workspaceRoot);
|
|
45
|
+
} else {
|
|
46
|
+
result = _static_cache.data;
|
|
47
|
+
}
|
|
48
|
+
if (schema && extensionName) {
|
|
49
|
+
result.extensions = {
|
|
50
|
+
...result.extensions,
|
|
51
|
+
[extensionName]: createConfigExtension(extensionName, schema)
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
_static_cache = {
|
|
55
|
+
timestamp: Date.now(),
|
|
56
|
+
data: result
|
|
57
|
+
};
|
|
58
|
+
return result;
|
|
59
|
+
}, "createStormConfig");
|
|
60
|
+
var createConfigExtension = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (extensionName, schema) => {
|
|
61
|
+
const extension_cache_key = {
|
|
62
|
+
extensionName
|
|
63
|
+
};
|
|
64
|
+
if (_extension_cache.has(extension_cache_key)) {
|
|
65
|
+
return _extension_cache.get(extension_cache_key);
|
|
66
|
+
}
|
|
67
|
+
let extension = _chunkLKZSRXS7js.getExtensionEnv.call(void 0, extensionName);
|
|
68
|
+
if (schema) {
|
|
69
|
+
extension = schema.parse(extension);
|
|
70
|
+
}
|
|
71
|
+
_extension_cache.set(extension_cache_key, extension);
|
|
72
|
+
return extension;
|
|
73
|
+
}, "createConfigExtension");
|
|
74
|
+
var loadStormConfig = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, async (workspaceRoot) => {
|
|
75
|
+
let config = {};
|
|
76
|
+
if (_optionalChain([_static_cache, 'optionalAccess', _3 => _3.data]) && _optionalChain([_static_cache, 'optionalAccess', _4 => _4.timestamp]) && _static_cache.timestamp >= Date.now() + 3e4) {
|
|
77
|
+
_chunkOXK45X3Ljs.writeTrace.call(void 0, `Configuration cache hit - ${_static_cache.timestamp}`, _static_cache.data);
|
|
78
|
+
return _static_cache.data;
|
|
79
|
+
}
|
|
80
|
+
let _workspaceRoot = workspaceRoot;
|
|
81
|
+
if (!_workspaceRoot) {
|
|
82
|
+
_workspaceRoot = _chunk6SJLAEJ3js.findWorkspaceRoot.call(void 0, );
|
|
83
|
+
}
|
|
84
|
+
const configFile = await _chunkJDK3PXQRjs.getConfigFile.call(void 0, _workspaceRoot);
|
|
85
|
+
if (!configFile) {
|
|
86
|
+
_chunkOXK45X3Ljs.writeWarning.call(void 0, "No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
|
|
87
|
+
logLevel: "all"
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
config = _chunkJDK3PXQRjs.defu.call(void 0, _chunkLKZSRXS7js.getConfigEnv.call(void 0, ), configFile, _chunkN32EGEJBjs.getDefaultConfig.call(void 0, _workspaceRoot));
|
|
91
|
+
_chunkPQNCKJARjs.setConfigEnv.call(void 0, config);
|
|
92
|
+
_chunkOXK45X3Ljs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
|
|
93
|
+
${_chunkOXK45X3Ljs.formatLogMessage.call(void 0, config)}`, config);
|
|
94
|
+
return config;
|
|
95
|
+
}, "loadStormConfig");
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
exports.createConfig = createConfig; exports.createStormConfig = createStormConfig; exports.createConfigExtension = createConfigExtension; exports.loadStormConfig = loadStormConfig;
|