@storm-software/config 1.115.0 → 1.116.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/types.ts ADDED
@@ -0,0 +1,96 @@
1
+ import type z from "zod";
2
+ import type {
3
+ ColorConfigMapSchema,
4
+ ColorConfigSchema,
5
+ DarkThemeColorConfigSchema,
6
+ LightThemeColorConfigSchema,
7
+ MultiThemeColorConfigSchema,
8
+ SingleThemeColorConfigSchema,
9
+ stormWorkspaceConfigSchema
10
+ } from "./schema";
11
+
12
+ export type DarkThemeColorConfig = z.infer<typeof DarkThemeColorConfigSchema>;
13
+ export type DarkThemeColorConfigInput = z.input<
14
+ typeof DarkThemeColorConfigSchema
15
+ >;
16
+
17
+ export type LightThemeColorConfig = z.infer<typeof LightThemeColorConfigSchema>;
18
+ export type LightThemeColorConfigInput = z.input<
19
+ typeof LightThemeColorConfigSchema
20
+ >;
21
+
22
+ export type MultiThemeColorConfig = z.infer<typeof MultiThemeColorConfigSchema>;
23
+ export type MultiThemeColorConfigInput = z.input<
24
+ typeof MultiThemeColorConfigSchema
25
+ >;
26
+
27
+ export type SingleThemeColorConfig = z.infer<
28
+ typeof SingleThemeColorConfigSchema
29
+ >;
30
+ export type SingleThemeColorConfigInput = z.input<
31
+ typeof SingleThemeColorConfigSchema
32
+ >;
33
+
34
+ export type ColorConfig = z.infer<typeof ColorConfigSchema>;
35
+ export type ColorConfigInput = z.input<typeof ColorConfigSchema>;
36
+
37
+ export type ColorConfigMap = z.infer<typeof ColorConfigMapSchema>;
38
+ export type ColorConfigMapInput = z.input<typeof ColorConfigMapSchema>;
39
+
40
+ type TStormWorkspaceConfig = z.infer<typeof stormWorkspaceConfigSchema>;
41
+ export type StormWorkspaceConfigInput = z.input<
42
+ typeof stormWorkspaceConfigSchema
43
+ >;
44
+
45
+ /**
46
+ * The Storm workspace's configuration object
47
+ *
48
+ * @remarks
49
+ * This type is used to define the configuration object for the entire Storm workspace/monorepo. The value is extracted from the `storm-workspace.json` file in the workspace root and the currently configuration environment variables. The value can be obtained by calling `getWorkspaceConfig()` in `@storm-software/config-tools`.
50
+ *
51
+ * @deprecated
52
+ * This type is deprecated and will be removed in the next major version. Use `StormWorkspaceConfig` instead.
53
+ */
54
+ export type StormConfig<
55
+ TExtensionName extends
56
+ keyof TStormWorkspaceConfig["extensions"] = keyof TStormWorkspaceConfig["extensions"],
57
+ TExtensionConfig extends
58
+ TStormWorkspaceConfig["extensions"][TExtensionName] = TStormWorkspaceConfig["extensions"][TExtensionName]
59
+ > = TStormWorkspaceConfig & {
60
+ extensions:
61
+ | (TStormWorkspaceConfig["extensions"] & {
62
+ [extensionName in TExtensionName]: TExtensionConfig;
63
+ })
64
+ | NonNullable<Record<string, any>>;
65
+ };
66
+
67
+ /**
68
+ * The Storm workspace's configuration object
69
+ *
70
+ * @remarks
71
+ * This type is used to define the configuration object for the entire Storm workspace/monorepo. The value is extracted from the `storm-workspace.json` file in the workspace root and the currently configuration environment variables. The value can be obtained by calling `getWorkspaceConfig()` in `@storm-software/config-tools`.
72
+ */
73
+ export type StormWorkspaceConfig<
74
+ TExtensionName extends
75
+ keyof TStormWorkspaceConfig["extensions"] = keyof TStormWorkspaceConfig["extensions"],
76
+ TExtensionConfig extends
77
+ TStormWorkspaceConfig["extensions"][TExtensionName] = TStormWorkspaceConfig["extensions"][TExtensionName]
78
+ > = StormConfig<TExtensionName, TExtensionConfig>;
79
+
80
+ export const COLOR_KEYS = [
81
+ "dark",
82
+ "light",
83
+ "base",
84
+ "brand",
85
+ "alternate",
86
+ "accent",
87
+ "link",
88
+ "success",
89
+ "help",
90
+ "info",
91
+ "warning",
92
+ "danger",
93
+ "fatal",
94
+ "positive",
95
+ "negative"
96
+ ];
package/tsconfig.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../../dist/out-tsc",
5
+ "rootDir": "../..",
6
+ "target": "ESNext",
7
+ "module": "ESNext",
8
+ "lib": ["ESNext"],
9
+ "skipLibCheck": true,
10
+ "skipDefaultLibCheck": true,
11
+ "moduleResolution": "Bundler",
12
+ "moduleDetection": "force",
13
+ "types": ["node"]
14
+ },
15
+ "include": ["src/**/*.ts", "bin/**/*.ts", "tsup.config.ts"],
16
+ "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
17
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../../dist/out-tsc",
5
+ "module": "commonjs",
6
+ "types": ["jest", "node"]
7
+ },
8
+ "include": [
9
+ "jest.config.ts",
10
+ "src/**/*.test.ts",
11
+ "src/**/*.spec.ts",
12
+ "src/**/*.d.ts"
13
+ ]
14
+ }
package/tsup.config.ts ADDED
@@ -0,0 +1,18 @@
1
+ import { defineConfig } from "tsup";
2
+
3
+ export default defineConfig([
4
+ {
5
+ name: "config",
6
+ target: "esnext",
7
+ entryPoints: ["./src/*.ts"],
8
+ format: ["cjs", "esm"],
9
+ outDir: "dist",
10
+ platform: "neutral",
11
+ splitting: true,
12
+ clean: false,
13
+ dts: true,
14
+ sourcemap: false,
15
+ tsconfig: "./tsconfig.json",
16
+ shims: true,
17
+ },
18
+ ]);
@@ -1,14 +0,0 @@
1
- export declare const STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
2
- export declare const STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
3
- export declare const STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
4
- export declare const STORM_DEFAULT_LICENSING = "https://license.stormsoftware.com";
5
- export declare const STORM_DEFAULT_LICENSE = "Apache-2.0";
6
- export declare const STORM_DEFAULT_RELEASE_BANNER = "https://public.storm-cdn.com/brand-banner.png";
7
- export declare const STORM_DEFAULT_ACCOUNT_TWITTER = "StormSoftwareHQ";
8
- export declare const STORM_DEFAULT_ACCOUNT_DISCORD = "https://discord.gg/MQ6YVzakM5";
9
- export declare const STORM_DEFAULT_ACCOUNT_TELEGRAM = "https://t.me/storm_software";
10
- export declare const STORM_DEFAULT_ACCOUNT_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
11
- export declare const STORM_DEFAULT_ACCOUNT_MEDIUM = "https://medium.com/storm-software";
12
- export declare const STORM_DEFAULT_ACCOUNT_GITHUB = "https://github.com/storm-software";
13
- export declare const STORM_DEFAULT_RELEASE_FOOTER = "\nStorm 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.\n\nJoin us on [Discord](https://discord.gg/MQ6YVzakM5) to chat with the team, receive release notifications, ask questions, and get involved.\n\nIf this sounds interesting, and you would like to help us in creating the next generation of development tools, please reach out on our [website](https://stormsoftware.com/contact) or join our [Slack](https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA) channel!\n";
14
- export declare const STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
@@ -1,217 +0,0 @@
1
- import type { StormWorkspaceConfigInput } from "./types";
2
- /**
3
- * Type the config values for the current Storm workspace
4
- *
5
- * @param input - The config values for the current Storm workspace
6
- * @returns The config values for the current Storm workspace
7
- */
8
- export declare const defineConfig: (input: StormWorkspaceConfigInput) => {
9
- bot: {
10
- name?: string | undefined;
11
- email?: string | undefined;
12
- };
13
- release: {
14
- banner?: string | undefined;
15
- header?: string | undefined;
16
- footer?: string | undefined;
17
- };
18
- account: {
19
- github?: string | undefined;
20
- twitter?: string | undefined;
21
- discord?: string | undefined;
22
- telegram?: string | undefined;
23
- slack?: string | undefined;
24
- medium?: string | undefined;
25
- };
26
- error: {
27
- codesFile?: string | undefined;
28
- url?: string | undefined;
29
- };
30
- workspaceRoot: string;
31
- directories: {
32
- cache?: string | undefined;
33
- data?: string | undefined;
34
- config?: string | undefined;
35
- temp?: string | undefined;
36
- log?: string | undefined;
37
- build?: string | undefined;
38
- };
39
- colors: {
40
- dark: {
41
- foreground?: string | undefined;
42
- background?: string | undefined;
43
- brand?: string | undefined;
44
- alternate?: string | undefined;
45
- accent?: string | undefined;
46
- link?: string | undefined;
47
- help?: string | undefined;
48
- success?: string | undefined;
49
- info?: string | undefined;
50
- warning?: string | undefined;
51
- danger?: string | undefined;
52
- fatal?: string | undefined;
53
- positive?: string | undefined;
54
- negative?: string | undefined;
55
- };
56
- light: {
57
- foreground?: string | undefined;
58
- background?: string | undefined;
59
- brand?: string | undefined;
60
- alternate?: string | undefined;
61
- accent?: string | undefined;
62
- link?: string | undefined;
63
- help?: string | undefined;
64
- success?: string | undefined;
65
- info?: string | undefined;
66
- warning?: string | undefined;
67
- danger?: string | undefined;
68
- fatal?: string | undefined;
69
- positive?: string | undefined;
70
- negative?: string | undefined;
71
- };
72
- } | {
73
- brand?: string | undefined;
74
- alternate?: string | undefined;
75
- accent?: string | undefined;
76
- link?: string | undefined;
77
- help?: string | undefined;
78
- success?: string | undefined;
79
- info?: string | undefined;
80
- warning?: string | undefined;
81
- danger?: string | undefined;
82
- fatal?: string | undefined;
83
- positive?: string | undefined;
84
- negative?: string | undefined;
85
- dark?: string | undefined;
86
- light?: string | undefined;
87
- } | {
88
- base: {
89
- dark: {
90
- foreground?: string | undefined;
91
- background?: string | undefined;
92
- brand?: string | undefined;
93
- alternate?: string | undefined;
94
- accent?: string | undefined;
95
- link?: string | undefined;
96
- help?: string | undefined;
97
- success?: string | undefined;
98
- info?: string | undefined;
99
- warning?: string | undefined;
100
- danger?: string | undefined;
101
- fatal?: string | undefined;
102
- positive?: string | undefined;
103
- negative?: string | undefined;
104
- };
105
- light: {
106
- foreground?: string | undefined;
107
- background?: string | undefined;
108
- brand?: string | undefined;
109
- alternate?: string | undefined;
110
- accent?: string | undefined;
111
- link?: string | undefined;
112
- help?: string | undefined;
113
- success?: string | undefined;
114
- info?: string | undefined;
115
- warning?: string | undefined;
116
- danger?: string | undefined;
117
- fatal?: string | undefined;
118
- positive?: string | undefined;
119
- negative?: string | undefined;
120
- };
121
- } | {
122
- brand?: string | undefined;
123
- alternate?: string | undefined;
124
- accent?: string | undefined;
125
- link?: string | undefined;
126
- help?: string | undefined;
127
- success?: string | undefined;
128
- info?: string | undefined;
129
- warning?: string | undefined;
130
- danger?: string | undefined;
131
- fatal?: string | undefined;
132
- positive?: string | undefined;
133
- negative?: string | undefined;
134
- dark?: string | undefined;
135
- light?: string | undefined;
136
- };
137
- } | Record<string, {
138
- dark: {
139
- foreground?: string | undefined;
140
- background?: string | undefined;
141
- brand?: string | undefined;
142
- alternate?: string | undefined;
143
- accent?: string | undefined;
144
- link?: string | undefined;
145
- help?: string | undefined;
146
- success?: string | undefined;
147
- info?: string | undefined;
148
- warning?: string | undefined;
149
- danger?: string | undefined;
150
- fatal?: string | undefined;
151
- positive?: string | undefined;
152
- negative?: string | undefined;
153
- };
154
- light: {
155
- foreground?: string | undefined;
156
- background?: string | undefined;
157
- brand?: string | undefined;
158
- alternate?: string | undefined;
159
- accent?: string | undefined;
160
- link?: string | undefined;
161
- help?: string | undefined;
162
- success?: string | undefined;
163
- info?: string | undefined;
164
- warning?: string | undefined;
165
- danger?: string | undefined;
166
- fatal?: string | undefined;
167
- positive?: string | undefined;
168
- negative?: string | undefined;
169
- };
170
- } | {
171
- brand?: string | undefined;
172
- alternate?: string | undefined;
173
- accent?: string | undefined;
174
- link?: string | undefined;
175
- help?: string | undefined;
176
- success?: string | undefined;
177
- info?: string | undefined;
178
- warning?: string | undefined;
179
- danger?: string | undefined;
180
- fatal?: string | undefined;
181
- positive?: string | undefined;
182
- negative?: string | undefined;
183
- dark?: string | undefined;
184
- light?: string | undefined;
185
- }>;
186
- name?: string | undefined;
187
- $schema?: string | null | undefined;
188
- extends?: string | string[] | undefined;
189
- namespace?: string | undefined;
190
- organization?: string | undefined;
191
- repository?: string | undefined;
192
- license?: string | undefined;
193
- homepage?: string | undefined;
194
- docs?: string | undefined;
195
- licensing?: string | undefined;
196
- contact?: string | undefined;
197
- branch?: string | undefined;
198
- preid?: string | undefined;
199
- owner?: string | undefined;
200
- mode?: "development" | "staging" | "production" | undefined;
201
- externalPackagePatterns?: string[] | undefined;
202
- skipCache?: boolean | undefined;
203
- packageManager?: "npm" | "yarn" | "pnpm" | "bun" | undefined;
204
- timezone?: string | undefined;
205
- locale?: string | undefined;
206
- logLevel?: "success" | "info" | "fatal" | "error" | "silent" | "warn" | "debug" | "trace" | "all" | undefined;
207
- skipConfigLogging?: boolean | undefined;
208
- registry?: {
209
- github?: string | undefined;
210
- npm?: string | undefined;
211
- cargo?: string | undefined;
212
- cyclone?: string | undefined;
213
- container?: string | undefined;
214
- } | undefined;
215
- configFile?: string | null | undefined;
216
- extensions?: Record<string, any> | undefined;
217
- };