@storm-software/config-tools 1.148.2 → 1.148.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/README.md +1 -1
- package/dist/config-file/get-config-file.cjs +66 -22
- package/dist/config-file/get-config-file.js +65 -21
- package/dist/config-file/index.cjs +1 -27
- package/dist/config-file/index.js +1 -27
- package/dist/create-storm-config.cjs +68 -26
- package/dist/create-storm-config.js +67 -25
- package/dist/env/get-env.cjs +152 -9
- package/dist/env/get-env.js +151 -8
- package/dist/env/index.cjs +2 -20
- package/dist/env/index.js +2 -20
- package/dist/env/set-env.cjs +259 -8
- package/dist/env/set-env.js +258 -7
- package/dist/get-config.cjs +9 -25
- package/dist/get-config.js +9 -25
- package/dist/index.cjs +7 -171
- package/dist/index.js +7 -171
- package/dist/logger/chalk.cjs +30 -4
- package/dist/logger/chalk.js +29 -3
- package/dist/logger/console-icons.cjs +15 -5
- package/dist/logger/console-icons.js +15 -5
- package/dist/logger/console.cjs +126 -38
- package/dist/logger/console.js +112 -24
- package/dist/logger/create-logger.cjs +31 -16
- package/dist/logger/create-logger.js +30 -15
- package/dist/logger/format-timestamp.cjs +5 -3
- package/dist/logger/format-timestamp.js +5 -3
- package/dist/logger/get-log-level.cjs +56 -6
- package/dist/logger/get-log-level.js +56 -6
- package/dist/logger/index.cjs +7 -62
- package/dist/logger/index.js +7 -62
- package/dist/logger/is-unicode-supported.cjs +16 -4
- package/dist/logger/is-unicode-supported.js +15 -3
- package/dist/types.cjs +24 -6
- package/dist/types.js +22 -4
- package/dist/utilities/apply-workspace-tokens.cjs +55 -9
- package/dist/utilities/apply-workspace-tokens.js +54 -8
- package/dist/utilities/correct-paths.cjs +242 -33
- package/dist/utilities/correct-paths.js +225 -16
- package/dist/utilities/file-path-utils.cjs +18 -5
- package/dist/utilities/file-path-utils.js +17 -4
- package/dist/utilities/find-up.cjs +22 -4
- package/dist/utilities/find-up.js +21 -3
- package/dist/utilities/find-workspace-root.cjs +64 -7
- package/dist/utilities/find-workspace-root.js +63 -6
- package/dist/utilities/get-default-config.cjs +79 -8
- package/dist/utilities/get-default-config.js +79 -8
- package/dist/utilities/index.cjs +7 -85
- package/dist/utilities/index.js +7 -85
- package/dist/utilities/process-handler.cjs +35 -17
- package/dist/utilities/process-handler.js +35 -17
- package/dist/utilities/run.cjs +34 -6
- package/dist/utilities/run.js +33 -5
- package/package.json +1 -1
- package/dist/chunk-2AVLCXLT.js +0 -0
- package/dist/chunk-2IKEUEGY.cjs +0 -94
- package/dist/chunk-2ZXJS2DW.js +0 -49
- package/dist/chunk-3557WSPY.js +0 -168
- package/dist/chunk-3NWKPYIG.cjs +0 -68
- package/dist/chunk-4DLP6LZY.cjs +0 -65
- package/dist/chunk-65SWKEHV.cjs +0 -1
- package/dist/chunk-6OM23J4N.js +0 -65
- package/dist/chunk-6T3V5XJK.js +0 -180
- package/dist/chunk-7CYF3NP3.cjs +0 -19
- package/dist/chunk-7NSHGJWY.cjs +0 -12
- package/dist/chunk-7PV6L7I7.cjs +0 -1
- package/dist/chunk-B7WWBK5Z.cjs +0 -93
- package/dist/chunk-BHZFTVXN.js +0 -42
- package/dist/chunk-C3W5DCMU.js +0 -19
- package/dist/chunk-DD3HX2NX.cjs +0 -1
- package/dist/chunk-GKI43HTL.cjs +0 -44
- package/dist/chunk-GZFXEQPB.js +0 -94
- package/dist/chunk-HESFC24Z.cjs +0 -245
- package/dist/chunk-HI33NNPB.js +0 -68
- package/dist/chunk-HSCCBYAV.js +0 -25
- package/dist/chunk-IRCFHYKZ.cjs +0 -28
- package/dist/chunk-IUT7Y2UY.js +0 -26
- package/dist/chunk-IWD6YQKX.cjs +0 -1
- package/dist/chunk-J2TOMCZU.cjs +0 -168
- package/dist/chunk-JHJGK3T7.js +0 -272
- package/dist/chunk-KNLWLA7O.cjs +0 -75
- package/dist/chunk-L6UNTUC4.js +0 -0
- package/dist/chunk-LOSUA6RB.js +0 -79
- package/dist/chunk-M7ASNATT.js +0 -142
- package/dist/chunk-MLUBD3PU.js +0 -245
- package/dist/chunk-NJVL3GF4.js +0 -0
- package/dist/chunk-OIEEXHKO.js +0 -75
- package/dist/chunk-POXTJ6GF.js +0 -28
- package/dist/chunk-PR7RQHRE.js +0 -12
- package/dist/chunk-QBS3OCHH.js +0 -22
- package/dist/chunk-QNYJXMP3.cjs +0 -79
- package/dist/chunk-RRKB32OH.js +0 -0
- package/dist/chunk-RVM5N5ZI.cjs +0 -22
- package/dist/chunk-SLGVSUEV.cjs +0 -36
- package/dist/chunk-SVQE7WVB.cjs +0 -180
- package/dist/chunk-SWX2MJHI.cjs +0 -28
- package/dist/chunk-TCTVN2ED.js +0 -44
- package/dist/chunk-U34AT42J.cjs +0 -49
- package/dist/chunk-ULZULP7Q.cjs +0 -142
- package/dist/chunk-XAJB3BSF.cjs +0 -25
- package/dist/chunk-XDBACKKN.cjs +0 -42
- package/dist/chunk-XQPQRRG3.js +0 -28
- package/dist/chunk-XY2LDOQ4.cjs +0 -26
- package/dist/chunk-XZ2SIQVM.js +0 -93
- package/dist/chunk-YBGTC6FM.cjs +0 -272
- package/dist/chunk-ZA4IO7YJ.js +0 -36
package/dist/chunk-6T3V5XJK.js
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
// ../config/src/constants.ts
|
|
2
|
-
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
3
|
-
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
4
|
-
var STORM_DEFAULT_LICENSING = "https://license.stormsoftware.com";
|
|
5
|
-
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
6
|
-
|
|
7
|
-
// ../config/src/schema.ts
|
|
8
|
-
import z from "zod";
|
|
9
|
-
var DarkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d1e22").describe("The dark background color of the workspace");
|
|
10
|
-
var LightColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
|
|
11
|
-
var BrandColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary brand specific color of the workspace");
|
|
12
|
-
var AlternateColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The alternate brand specific color of the workspace");
|
|
13
|
-
var AccentColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The secondary brand specific color of the workspace");
|
|
14
|
-
var LinkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The color used to display hyperlink text");
|
|
15
|
-
var HelpColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#8256D0").describe("The second brand specific color of the workspace");
|
|
16
|
-
var SuccessColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#12B66A").describe("The success color of the workspace");
|
|
17
|
-
var InfoColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0070E0").describe("The informational color of the workspace");
|
|
18
|
-
var WarningColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
|
|
19
|
-
var DangerColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#D8314A").describe("The danger color of the workspace");
|
|
20
|
-
var FatalColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The fatal color of the workspace");
|
|
21
|
-
var PositiveColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#4ade80").describe("The positive number color of the workspace");
|
|
22
|
-
var NegativeColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ef4444").describe("The negative number color of the workspace");
|
|
23
|
-
var DarkThemeColorConfigSchema = z.object({
|
|
24
|
-
foreground: LightColorSchema,
|
|
25
|
-
background: DarkColorSchema,
|
|
26
|
-
brand: BrandColorSchema,
|
|
27
|
-
alternate: AlternateColorSchema,
|
|
28
|
-
accent: AccentColorSchema,
|
|
29
|
-
link: LinkColorSchema,
|
|
30
|
-
help: HelpColorSchema,
|
|
31
|
-
success: SuccessColorSchema,
|
|
32
|
-
info: InfoColorSchema,
|
|
33
|
-
warning: WarningColorSchema,
|
|
34
|
-
danger: DangerColorSchema,
|
|
35
|
-
fatal: FatalColorSchema,
|
|
36
|
-
positive: PositiveColorSchema,
|
|
37
|
-
negative: NegativeColorSchema
|
|
38
|
-
});
|
|
39
|
-
var LightThemeColorConfigSchema = z.object({
|
|
40
|
-
foreground: DarkColorSchema,
|
|
41
|
-
background: LightColorSchema,
|
|
42
|
-
brand: BrandColorSchema,
|
|
43
|
-
alternate: AlternateColorSchema,
|
|
44
|
-
accent: AccentColorSchema,
|
|
45
|
-
link: LinkColorSchema,
|
|
46
|
-
help: HelpColorSchema,
|
|
47
|
-
success: SuccessColorSchema,
|
|
48
|
-
info: InfoColorSchema,
|
|
49
|
-
warning: WarningColorSchema,
|
|
50
|
-
danger: DangerColorSchema,
|
|
51
|
-
fatal: FatalColorSchema,
|
|
52
|
-
positive: PositiveColorSchema,
|
|
53
|
-
negative: NegativeColorSchema
|
|
54
|
-
});
|
|
55
|
-
var MultiThemeColorConfigSchema = z.object({
|
|
56
|
-
dark: DarkThemeColorConfigSchema,
|
|
57
|
-
light: LightThemeColorConfigSchema
|
|
58
|
-
});
|
|
59
|
-
var SingleThemeColorConfigSchema = z.object({
|
|
60
|
-
dark: DarkColorSchema,
|
|
61
|
-
light: LightColorSchema,
|
|
62
|
-
brand: BrandColorSchema,
|
|
63
|
-
alternate: AlternateColorSchema,
|
|
64
|
-
accent: AccentColorSchema,
|
|
65
|
-
link: LinkColorSchema,
|
|
66
|
-
help: HelpColorSchema,
|
|
67
|
-
success: SuccessColorSchema,
|
|
68
|
-
info: InfoColorSchema,
|
|
69
|
-
warning: WarningColorSchema,
|
|
70
|
-
danger: DangerColorSchema,
|
|
71
|
-
fatal: FatalColorSchema,
|
|
72
|
-
positive: PositiveColorSchema,
|
|
73
|
-
negative: NegativeColorSchema
|
|
74
|
-
});
|
|
75
|
-
var RegistryUrlConfigSchema = z.string().trim().toLowerCase().url().optional().describe("A remote registry URL used to publish distributable packages");
|
|
76
|
-
var RegistryConfigSchema = z.object({
|
|
77
|
-
github: RegistryUrlConfigSchema,
|
|
78
|
-
npm: RegistryUrlConfigSchema,
|
|
79
|
-
cargo: RegistryUrlConfigSchema,
|
|
80
|
-
cyclone: RegistryUrlConfigSchema,
|
|
81
|
-
container: RegistryUrlConfigSchema
|
|
82
|
-
}).default({}).describe("A list of remote registry URLs used by Storm Software");
|
|
83
|
-
var ColorConfigSchema = SingleThemeColorConfigSchema.or(MultiThemeColorConfigSchema).describe("Colors used for various workspace elements");
|
|
84
|
-
var ColorConfigMapSchema = z.union([
|
|
85
|
-
z.object({
|
|
86
|
-
"base": ColorConfigSchema
|
|
87
|
-
}),
|
|
88
|
-
z.record(z.string(), ColorConfigSchema)
|
|
89
|
-
]);
|
|
90
|
-
var ExtendsItemSchema = z.string().trim().describe("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.");
|
|
91
|
-
var ExtendsSchema = ExtendsItemSchema.or(z.array(ExtendsItemSchema)).describe("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.");
|
|
92
|
-
var WorkspaceBotConfigSchema = z.object({
|
|
93
|
-
name: z.string().trim().default("Stormie-Bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
|
|
94
|
-
email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
95
|
-
}).describe("The workspace's bot user's config used to automated various operations tasks");
|
|
96
|
-
var WorkspaceDirectoryConfigSchema = z.object({
|
|
97
|
-
cache: z.string().trim().optional().describe("The directory used to store the environment's cached file data"),
|
|
98
|
-
data: z.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
99
|
-
config: z.string().trim().optional().describe("The directory used to store the environment's configuration files"),
|
|
100
|
-
temp: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
101
|
-
log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
102
|
-
build: z.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
103
|
-
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
104
|
-
var StormConfigSchema = z.object({
|
|
105
|
-
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
106
|
-
extends: ExtendsSchema.optional(),
|
|
107
|
-
name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
108
|
-
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
109
|
-
organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
110
|
-
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
111
|
-
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
112
|
-
homepage: z.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
|
|
113
|
-
docs: z.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
|
|
114
|
-
licensing: z.string().trim().url().default(STORM_DEFAULT_LICENSING).describe("The base licensing site for the workspace"),
|
|
115
|
-
branch: z.string().trim().default("main").describe("The branch of the workspace"),
|
|
116
|
-
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
117
|
-
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
118
|
-
bot: WorkspaceBotConfigSchema,
|
|
119
|
-
env: z.enum([
|
|
120
|
-
"development",
|
|
121
|
-
"staging",
|
|
122
|
-
"production"
|
|
123
|
-
]).default("production").describe("The current runtime environment name for the package"),
|
|
124
|
-
workspaceRoot: z.string().trim().default("").describe("The root directory of the workspace"),
|
|
125
|
-
externalPackagePatterns: z.array(z.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
126
|
-
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
127
|
-
directories: WorkspaceDirectoryConfigSchema,
|
|
128
|
-
packageManager: z.enum([
|
|
129
|
-
"npm",
|
|
130
|
-
"yarn",
|
|
131
|
-
"pnpm",
|
|
132
|
-
"bun"
|
|
133
|
-
]).default("npm").describe("The JavaScript/TypeScript package manager used by the repository"),
|
|
134
|
-
timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
135
|
-
locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
136
|
-
logLevel: z.enum([
|
|
137
|
-
"silent",
|
|
138
|
-
"fatal",
|
|
139
|
-
"error",
|
|
140
|
-
"warn",
|
|
141
|
-
"success",
|
|
142
|
-
"info",
|
|
143
|
-
"debug",
|
|
144
|
-
"trace",
|
|
145
|
-
"all"
|
|
146
|
-
]).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`)."),
|
|
147
|
-
skipConfigLogging: z.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
148
|
-
registry: RegistryConfigSchema,
|
|
149
|
-
configFile: z.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."),
|
|
150
|
-
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
151
|
-
extensions: z.record(z.any()).optional().default({}).describe("Configuration of each used extension")
|
|
152
|
-
}).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.");
|
|
153
|
-
|
|
154
|
-
// ../config/src/types.ts
|
|
155
|
-
var COLOR_KEYS = [
|
|
156
|
-
"dark",
|
|
157
|
-
"light",
|
|
158
|
-
"base",
|
|
159
|
-
"brand",
|
|
160
|
-
"alternate",
|
|
161
|
-
"accent",
|
|
162
|
-
"link",
|
|
163
|
-
"success",
|
|
164
|
-
"help",
|
|
165
|
-
"info",
|
|
166
|
-
"warning",
|
|
167
|
-
"danger",
|
|
168
|
-
"fatal",
|
|
169
|
-
"positive",
|
|
170
|
-
"negative"
|
|
171
|
-
];
|
|
172
|
-
|
|
173
|
-
export {
|
|
174
|
-
STORM_DEFAULT_DOCS,
|
|
175
|
-
STORM_DEFAULT_HOMEPAGE,
|
|
176
|
-
STORM_DEFAULT_LICENSING,
|
|
177
|
-
STORM_DEFAULT_LICENSE,
|
|
178
|
-
StormConfigSchema,
|
|
179
|
-
COLOR_KEYS
|
|
180
|
-
};
|
package/dist/chunk-7CYF3NP3.cjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkB7WWBK5Zcjs = require('./chunk-B7WWBK5Z.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
7
|
-
|
|
8
|
-
// src/get-config.ts
|
|
9
|
-
var getConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (workspaceRoot, skipLogs = false) => {
|
|
10
|
-
return _chunkB7WWBK5Zcjs.loadStormConfig.call(void 0, workspaceRoot, skipLogs);
|
|
11
|
-
}, "getConfig");
|
|
12
|
-
var getWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (skipLogs = false) => {
|
|
13
|
-
return getConfig(void 0, skipLogs);
|
|
14
|
-
}, "getWorkspaceConfig");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
exports.getConfig = getConfig; exports.getWorkspaceConfig = getWorkspaceConfig;
|
package/dist/chunk-7NSHGJWY.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
4
|
-
|
|
5
|
-
// src/logger/format-timestamp.ts
|
|
6
|
-
var formatTimestamp = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (date = /* @__PURE__ */ new Date()) => {
|
|
7
|
-
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
8
|
-
}, "formatTimestamp");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.formatTimestamp = formatTimestamp;
|
package/dist/chunk-7PV6L7I7.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/dist/chunk-B7WWBK5Z.cjs
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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
|
-
var _chunkQNYJXMP3cjs = require('./chunk-QNYJXMP3.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _chunkULZULP7Qcjs = require('./chunk-ULZULP7Q.cjs');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var _chunk2IKEUEGYcjs = require('./chunk-2IKEUEGY.cjs');
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var _chunkKNLWLA7Ocjs = require('./chunk-KNLWLA7O.cjs');
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var _chunkYBGTC6FMcjs = require('./chunk-YBGTC6FM.cjs');
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var _chunkJ2TOMCZUcjs = require('./chunk-J2TOMCZU.cjs');
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var _chunkSVQE7WVBcjs = require('./chunk-SVQE7WVB.cjs');
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
28
|
-
|
|
29
|
-
// src/create-storm-config.ts
|
|
30
|
-
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
31
|
-
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
32
|
-
var _static_cache = void 0;
|
|
33
|
-
var createStormConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
34
|
-
let result;
|
|
35
|
-
if (!_optionalChain([_static_cache, 'optionalAccess', _ => _.data]) || !_optionalChain([_static_cache, 'optionalAccess', _2 => _2.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
36
|
-
let _workspaceRoot = workspaceRoot;
|
|
37
|
-
if (!_workspaceRoot) {
|
|
38
|
-
_workspaceRoot = _chunkKNLWLA7Ocjs.findWorkspaceRoot.call(void 0, );
|
|
39
|
-
}
|
|
40
|
-
const configEnv = _chunkJ2TOMCZUcjs.getConfigEnv.call(void 0, );
|
|
41
|
-
const defaultConfig = await _chunk2IKEUEGYcjs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
42
|
-
const configFile = await _chunkQNYJXMP3cjs.getConfigFile.call(void 0, _workspaceRoot);
|
|
43
|
-
if (!configFile && !skipLogs) {
|
|
44
|
-
_chunkULZULP7Qcjs.writeWarning.call(void 0, "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", {
|
|
45
|
-
logLevel: "all"
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
result = await _chunkSVQE7WVBcjs.StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
49
|
-
result.workspaceRoot ??= _workspaceRoot;
|
|
50
|
-
} else {
|
|
51
|
-
result = _static_cache.data;
|
|
52
|
-
}
|
|
53
|
-
if (schema && extensionName) {
|
|
54
|
-
result.extensions = {
|
|
55
|
-
...result.extensions,
|
|
56
|
-
[extensionName]: createConfigExtension(extensionName, schema)
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
_static_cache = {
|
|
60
|
-
timestamp: Date.now(),
|
|
61
|
-
data: result
|
|
62
|
-
};
|
|
63
|
-
return result;
|
|
64
|
-
}, "createStormConfig");
|
|
65
|
-
var createConfigExtension = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (extensionName, schema) => {
|
|
66
|
-
const extension_cache_key = {
|
|
67
|
-
extensionName
|
|
68
|
-
};
|
|
69
|
-
if (_extension_cache.has(extension_cache_key)) {
|
|
70
|
-
return _extension_cache.get(extension_cache_key);
|
|
71
|
-
}
|
|
72
|
-
let extension = _chunkJ2TOMCZUcjs.getExtensionEnv.call(void 0, extensionName);
|
|
73
|
-
if (schema) {
|
|
74
|
-
extension = schema.parse(extension);
|
|
75
|
-
}
|
|
76
|
-
_extension_cache.set(extension_cache_key, extension);
|
|
77
|
-
return extension;
|
|
78
|
-
}, "createConfigExtension");
|
|
79
|
-
var loadStormConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
|
|
80
|
-
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
81
|
-
_chunkYBGTC6FMcjs.setConfigEnv.call(void 0, config);
|
|
82
|
-
if (!skipLogs && !config.skipConfigLogging) {
|
|
83
|
-
_chunkULZULP7Qcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
|
|
84
|
-
${_chunkULZULP7Qcjs.formatLogMessage.call(void 0, config)}`, config);
|
|
85
|
-
}
|
|
86
|
-
return config;
|
|
87
|
-
}, "loadStormConfig");
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
exports.createStormConfig = createStormConfig; exports.createConfigExtension = createConfigExtension; exports.loadStormConfig = loadStormConfig;
|
package/dist/chunk-BHZFTVXN.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name
|
|
3
|
-
} from "./chunk-SHUYVCID.js";
|
|
4
|
-
|
|
5
|
-
// src/utilities/run.ts
|
|
6
|
-
import { exec, execSync } from "node:child_process";
|
|
7
|
-
var LARGE_BUFFER = 1024 * 1e6;
|
|
8
|
-
var run = /* @__PURE__ */ __name((config, command, cwd = config.workspaceRoot ?? process.cwd(), stdio = "inherit", env = process.env) => {
|
|
9
|
-
return execSync(command, {
|
|
10
|
-
cwd,
|
|
11
|
-
env: {
|
|
12
|
-
...process.env,
|
|
13
|
-
...env,
|
|
14
|
-
CLICOLOR: "true",
|
|
15
|
-
FORCE_COLOR: "true"
|
|
16
|
-
},
|
|
17
|
-
windowsHide: true,
|
|
18
|
-
stdio,
|
|
19
|
-
maxBuffer: LARGE_BUFFER,
|
|
20
|
-
killSignal: "SIGTERM"
|
|
21
|
-
});
|
|
22
|
-
}, "run");
|
|
23
|
-
var runAsync = /* @__PURE__ */ __name((config, command, cwd = config.workspaceRoot ?? process.cwd(), env = process.env) => {
|
|
24
|
-
return exec(command, {
|
|
25
|
-
cwd,
|
|
26
|
-
env: {
|
|
27
|
-
...process.env,
|
|
28
|
-
...env,
|
|
29
|
-
CLICOLOR: "true",
|
|
30
|
-
FORCE_COLOR: "true"
|
|
31
|
-
},
|
|
32
|
-
windowsHide: true,
|
|
33
|
-
maxBuffer: LARGE_BUFFER,
|
|
34
|
-
killSignal: "SIGTERM"
|
|
35
|
-
});
|
|
36
|
-
}, "runAsync");
|
|
37
|
-
|
|
38
|
-
export {
|
|
39
|
-
LARGE_BUFFER,
|
|
40
|
-
run,
|
|
41
|
-
runAsync
|
|
42
|
-
};
|
package/dist/chunk-C3W5DCMU.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
loadStormConfig
|
|
3
|
-
} from "./chunk-XZ2SIQVM.js";
|
|
4
|
-
import {
|
|
5
|
-
__name
|
|
6
|
-
} from "./chunk-SHUYVCID.js";
|
|
7
|
-
|
|
8
|
-
// src/get-config.ts
|
|
9
|
-
var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
|
|
10
|
-
return loadStormConfig(workspaceRoot, skipLogs);
|
|
11
|
-
}, "getConfig");
|
|
12
|
-
var getWorkspaceConfig = /* @__PURE__ */ __name((skipLogs = false) => {
|
|
13
|
-
return getConfig(void 0, skipLogs);
|
|
14
|
-
}, "getWorkspaceConfig");
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
getConfig,
|
|
18
|
-
getWorkspaceConfig
|
|
19
|
-
};
|
package/dist/chunk-DD3HX2NX.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/dist/chunk-GKI43HTL.cjs
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkULZULP7Qcjs = require('./chunk-ULZULP7Q.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _chunkKNLWLA7Ocjs = require('./chunk-KNLWLA7O.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
14
|
-
|
|
15
|
-
// src/logger/create-logger.ts
|
|
16
|
-
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
17
|
-
async function createLogger(config) {
|
|
18
|
-
const workspaceRoot = _chunkKNLWLA7Ocjs.findWorkspaceRoot.call(void 0, );
|
|
19
|
-
if (!workspaceRoot) {
|
|
20
|
-
throw new Error("Cannot find workspace root");
|
|
21
|
-
}
|
|
22
|
-
const writeFatal = _chunkULZULP7Qcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.FATAL, config, _chalk2.default);
|
|
23
|
-
const writeError = _chunkULZULP7Qcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.ERROR, config, _chalk2.default);
|
|
24
|
-
const writeWarning = _chunkULZULP7Qcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.WARN, config, _chalk2.default);
|
|
25
|
-
const writeInfo = _chunkULZULP7Qcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.INFO, config, _chalk2.default);
|
|
26
|
-
const writeSuccess = _chunkULZULP7Qcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.SUCCESS, config, _chalk2.default);
|
|
27
|
-
const writeDebug = _chunkULZULP7Qcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.DEBUG, config, _chalk2.default);
|
|
28
|
-
const writeTrace = _chunkULZULP7Qcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.DEBUG, config, _chalk2.default);
|
|
29
|
-
return {
|
|
30
|
-
fatal: writeFatal,
|
|
31
|
-
error: writeError,
|
|
32
|
-
warning: writeWarning,
|
|
33
|
-
info: writeInfo,
|
|
34
|
-
success: writeSuccess,
|
|
35
|
-
debug: writeDebug,
|
|
36
|
-
trace: writeTrace,
|
|
37
|
-
getStopwatch: _chunkULZULP7Qcjs.getStopwatch
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
_chunkUSNT2KNTcjs.__name.call(void 0, createLogger, "createLogger");
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
exports.createLogger = createLogger;
|
package/dist/chunk-GZFXEQPB.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
findWorkspaceRoot
|
|
3
|
-
} from "./chunk-OIEEXHKO.js";
|
|
4
|
-
import {
|
|
5
|
-
STORM_DEFAULT_HOMEPAGE,
|
|
6
|
-
STORM_DEFAULT_LICENSE
|
|
7
|
-
} from "./chunk-6T3V5XJK.js";
|
|
8
|
-
import {
|
|
9
|
-
joinPaths
|
|
10
|
-
} from "./chunk-MLUBD3PU.js";
|
|
11
|
-
import {
|
|
12
|
-
__name
|
|
13
|
-
} from "./chunk-SHUYVCID.js";
|
|
14
|
-
|
|
15
|
-
// src/utilities/get-default-config.ts
|
|
16
|
-
import { existsSync } from "node:fs";
|
|
17
|
-
import { readFile } from "node:fs/promises";
|
|
18
|
-
import { join } from "node:path";
|
|
19
|
-
var DEFAULT_COLOR_CONFIG = {
|
|
20
|
-
"light": {
|
|
21
|
-
"background": "#fafafa",
|
|
22
|
-
"foreground": "#1d1e22",
|
|
23
|
-
"brand": "#1fb2a6",
|
|
24
|
-
"alternate": "#db2777",
|
|
25
|
-
"help": "#5C4EE5",
|
|
26
|
-
"success": "#087f5b",
|
|
27
|
-
"info": "#0550ae",
|
|
28
|
-
"warning": "#e3b341",
|
|
29
|
-
"danger": "#D8314A",
|
|
30
|
-
"positive": "#22c55e",
|
|
31
|
-
"negative": "#dc2626"
|
|
32
|
-
},
|
|
33
|
-
"dark": {
|
|
34
|
-
"background": "#1d1e22",
|
|
35
|
-
"foreground": "#cbd5e1",
|
|
36
|
-
"brand": "#2dd4bf",
|
|
37
|
-
"alternate": "#db2777",
|
|
38
|
-
"help": "#818cf8",
|
|
39
|
-
"success": "#10b981",
|
|
40
|
-
"info": "#58a6ff",
|
|
41
|
-
"warning": "#f3d371",
|
|
42
|
-
"danger": "#D8314A",
|
|
43
|
-
"positive": "#22c55e",
|
|
44
|
-
"negative": "#dc2626"
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
48
|
-
let license = STORM_DEFAULT_LICENSE;
|
|
49
|
-
let homepage = STORM_DEFAULT_HOMEPAGE;
|
|
50
|
-
let name = void 0;
|
|
51
|
-
let namespace = void 0;
|
|
52
|
-
let repository = void 0;
|
|
53
|
-
const workspaceRoot = findWorkspaceRoot(root);
|
|
54
|
-
if (existsSync(join(workspaceRoot, "package.json"))) {
|
|
55
|
-
const file = await readFile(joinPaths(workspaceRoot, "package.json"), "utf8");
|
|
56
|
-
if (file) {
|
|
57
|
-
const packageJson = JSON.parse(file);
|
|
58
|
-
if (packageJson.name) {
|
|
59
|
-
name = packageJson.name;
|
|
60
|
-
}
|
|
61
|
-
if (packageJson.namespace) {
|
|
62
|
-
namespace = packageJson.namespace;
|
|
63
|
-
}
|
|
64
|
-
if (packageJson.repository) {
|
|
65
|
-
if (typeof packageJson.repository === "string") {
|
|
66
|
-
repository = packageJson.repository;
|
|
67
|
-
} else if (packageJson.repository.url) {
|
|
68
|
-
repository = packageJson.repository.url;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
if (packageJson.license) {
|
|
72
|
-
license = packageJson.license;
|
|
73
|
-
}
|
|
74
|
-
if (packageJson.homepage) {
|
|
75
|
-
homepage = packageJson.homepage;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return {
|
|
80
|
-
workspaceRoot,
|
|
81
|
-
name,
|
|
82
|
-
namespace,
|
|
83
|
-
repository,
|
|
84
|
-
license,
|
|
85
|
-
homepage,
|
|
86
|
-
docs: `${homepage || STORM_DEFAULT_HOMEPAGE}/docs`,
|
|
87
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`
|
|
88
|
-
};
|
|
89
|
-
}, "getDefaultConfig");
|
|
90
|
-
|
|
91
|
-
export {
|
|
92
|
-
DEFAULT_COLOR_CONFIG,
|
|
93
|
-
getDefaultConfig
|
|
94
|
-
};
|