@storm-software/unbuild 0.25.1 → 0.25.3

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.
Files changed (86) hide show
  1. package/README.md +1 -1
  2. package/bin/unbuild.cjs +3402 -0
  3. package/bin/unbuild.js +2709 -62860
  4. package/dist/build.cjs +14 -0
  5. package/dist/{build.d.mts → build.d.cts} +1 -1
  6. package/dist/build.js +14 -20
  7. package/dist/{chunk-WXJPXYHF.mjs → chunk-2RMUO4GG.js} +3 -5
  8. package/dist/chunk-36OA7HRF.cjs +598 -0
  9. package/dist/chunk-3GQAWCBQ.js +13 -0
  10. package/dist/{chunk-BUCFGCTW.js → chunk-4AWYDOEH.cjs} +5 -7
  11. package/dist/chunk-ADWBQYE6.cjs +27 -0
  12. package/dist/chunk-BE5U4XRE.js +63 -0
  13. package/dist/{chunk-SQOZCV36.js → chunk-D5YXD4XE.cjs} +2 -4
  14. package/dist/{chunk-4ENAOJ33.mjs → chunk-ESRR2FD2.js} +2 -4
  15. package/dist/chunk-HYDGJLPG.cjs +2495 -0
  16. package/dist/{chunk-4BAUMYRN.mjs → chunk-JKBKJSU6.js} +2 -4
  17. package/dist/{chunk-PVZYPNLZ.js → chunk-KUMAH6IZ.cjs} +6 -8
  18. package/dist/chunk-LUXNRUAP.cjs +63 -0
  19. package/dist/chunk-ORA4UQMU.cjs +1 -0
  20. package/dist/chunk-OULCUN6I.js +0 -0
  21. package/dist/{chunk-6UMHN4KS.mjs → chunk-RHYLM6VP.js} +3 -5
  22. package/dist/chunk-RWW6C7JH.js +598 -0
  23. package/dist/{chunk-P6LWSWAQ.js → chunk-SHHAZOHN.cjs} +2 -4
  24. package/dist/chunk-T2Q5LQOI.js +2494 -0
  25. package/dist/{chunk-ESGPHEWU.mjs → chunk-T6BV33KD.js} +6 -8
  26. package/dist/chunk-YDYGZTJK.cjs +18 -0
  27. package/dist/clean.cjs +10 -0
  28. package/dist/clean.js +10 -10
  29. package/dist/config.cjs +12 -0
  30. package/dist/{config.d.mts → config.d.cts} +1 -1
  31. package/dist/config.js +12 -12
  32. package/dist/index.cjs +28 -0
  33. package/dist/{index.d.mts → index.d.cts} +4 -4
  34. package/dist/index.js +28 -39
  35. package/dist/types.cjs +2 -0
  36. package/dist/types.js +1 -2
  37. package/package.json +38 -37
  38. package/bin/unbuild.mjs +0 -63530
  39. package/dist/build.mjs +0 -20
  40. package/dist/chunk-3TNHGERR.mjs +0 -49
  41. package/dist/chunk-44VTNVZA.js +0 -29
  42. package/dist/chunk-45FJ3WQ6.js +0 -7528
  43. package/dist/chunk-4HFICKAT.js +0 -451
  44. package/dist/chunk-4IU7LXNH.mjs +0 -4054
  45. package/dist/chunk-523YIUTF.js +0 -19937
  46. package/dist/chunk-7G3WYTPJ.js +0 -6
  47. package/dist/chunk-AMTVM7UD.js +0 -4054
  48. package/dist/chunk-DIRFSBOA.mjs +0 -84
  49. package/dist/chunk-EGCWTBMT.mjs +0 -1120
  50. package/dist/chunk-EKTZK3IJ.mjs +0 -765
  51. package/dist/chunk-FAXWFK7Q.mjs +0 -7528
  52. package/dist/chunk-G6BE6UP3.mjs +0 -2481
  53. package/dist/chunk-K5SQO3GD.mjs +0 -451
  54. package/dist/chunk-MCNTIU52.js +0 -3050
  55. package/dist/chunk-NMYL4VJJ.js +0 -84
  56. package/dist/chunk-NOVWJHZD.mjs +0 -6
  57. package/dist/chunk-Q4GMTWGF.mjs +0 -19937
  58. package/dist/chunk-RBSVNX4W.js +0 -49
  59. package/dist/chunk-RM7SW35Z.js +0 -1120
  60. package/dist/chunk-S532A3LO.js +0 -510
  61. package/dist/chunk-TEEYWCSY.mjs +0 -3050
  62. package/dist/chunk-VJI72AA6.mjs +0 -510
  63. package/dist/chunk-W7YS7HE5.js +0 -765
  64. package/dist/chunk-YIP6AERX.js +0 -2484
  65. package/dist/clean.mjs +0 -10
  66. package/dist/config.mjs +0 -12
  67. package/dist/dist-JWSUGJW5.js +0 -17571
  68. package/dist/dist-LXRVOZWD.mjs +0 -17570
  69. package/dist/esm-2JSYGY2W.js +0 -1716
  70. package/dist/esm-2LICJFKF.mjs +0 -1716
  71. package/dist/execa-2KYLC5PR.mjs +0 -2424
  72. package/dist/execa-QRX32ES4.js +0 -2424
  73. package/dist/index.mjs +0 -39
  74. package/dist/json5-JI6Y4EBT.mjs +0 -10
  75. package/dist/json5-ZRUT32KA.js +0 -10
  76. package/dist/jsonc-2MC7UMCL.js +0 -15
  77. package/dist/jsonc-PDDMSRDH.mjs +0 -15
  78. package/dist/multipart-parser-FQDS23TV.mjs +0 -187
  79. package/dist/multipart-parser-IX66WIWH.js +0 -187
  80. package/dist/toml-IHKP66UV.mjs +0 -10
  81. package/dist/toml-MDHAEB3G.js +0 -10
  82. package/dist/types.mjs +0 -2
  83. package/dist/yaml-GMY56OHD.mjs +0 -10
  84. package/dist/yaml-UTMAXQ2T.js +0 -10
  85. /package/dist/{clean.d.mts → clean.d.cts} +0 -0
  86. /package/dist/{types.d.mts → types.d.cts} +0 -0
@@ -0,0 +1,598 @@
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
+
3
+ var _chunkYDYGZTJKcjs = require('./chunk-YDYGZTJK.cjs');
4
+
5
+ // ../config-tools/src/types.ts
6
+ var LogLevel = {
7
+ SILENT: 0,
8
+ FATAL: 10,
9
+ ERROR: 20,
10
+ WARN: 30,
11
+ SUCCESS: 35,
12
+ INFO: 40,
13
+ DEBUG: 60,
14
+ TRACE: 70,
15
+ ALL: 100
16
+ };
17
+ var LogLevelLabel = {
18
+ SILENT: "silent",
19
+ FATAL: "fatal",
20
+ ERROR: "error",
21
+ WARN: "warn",
22
+ SUCCESS: "success",
23
+ INFO: "info",
24
+ DEBUG: "debug",
25
+ TRACE: "trace",
26
+ ALL: "all"
27
+ };
28
+
29
+ // ../config-tools/src/utilities/correct-paths.ts
30
+ var _devkit = require('@nx/devkit');
31
+ var correctPaths = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (path) => {
32
+ if (!path) {
33
+ return "";
34
+ }
35
+ if (!path.toUpperCase().startsWith("C:") && path.includes("\\")) {
36
+ path = `C:${path}`;
37
+ }
38
+ return path.replaceAll("\\", "/");
39
+ }, "correctPaths");
40
+ var joinPaths = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (...paths) => {
41
+ if (!paths || paths.length === 0) {
42
+ return "";
43
+ }
44
+ return correctPaths(_devkit.joinPathFragments.call(void 0, ...paths.map((path) => correctPaths(path))));
45
+ }, "joinPaths");
46
+
47
+ // ../config-tools/src/logger/get-log-level.ts
48
+ var getLogLevel = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (label) => {
49
+ switch (label) {
50
+ case "all":
51
+ return LogLevel.ALL;
52
+ case "trace":
53
+ return LogLevel.TRACE;
54
+ case "debug":
55
+ return LogLevel.DEBUG;
56
+ case "info":
57
+ return LogLevel.INFO;
58
+ case "warn":
59
+ return LogLevel.WARN;
60
+ case "error":
61
+ return LogLevel.ERROR;
62
+ case "fatal":
63
+ return LogLevel.FATAL;
64
+ case "silent":
65
+ return LogLevel.SILENT;
66
+ default:
67
+ return LogLevel.INFO;
68
+ }
69
+ }, "getLogLevel");
70
+ var getLogLevelLabel = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (logLevel = LogLevel.INFO) => {
71
+ if (logLevel >= LogLevel.ALL) {
72
+ return LogLevelLabel.ALL;
73
+ }
74
+ if (logLevel >= LogLevel.TRACE) {
75
+ return LogLevelLabel.TRACE;
76
+ }
77
+ if (logLevel >= LogLevel.DEBUG) {
78
+ return LogLevelLabel.DEBUG;
79
+ }
80
+ if (logLevel >= LogLevel.INFO) {
81
+ return LogLevelLabel.INFO;
82
+ }
83
+ if (logLevel >= LogLevel.WARN) {
84
+ return LogLevelLabel.WARN;
85
+ }
86
+ if (logLevel >= LogLevel.ERROR) {
87
+ return LogLevelLabel.ERROR;
88
+ }
89
+ if (logLevel >= LogLevel.FATAL) {
90
+ return LogLevelLabel.FATAL;
91
+ }
92
+ if (logLevel <= LogLevel.SILENT) {
93
+ return LogLevelLabel.SILENT;
94
+ }
95
+ return LogLevelLabel.INFO;
96
+ }, "getLogLevelLabel");
97
+ var isVerbose = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (label = LogLevelLabel.SILENT) => {
98
+ const logLevel = typeof label === "string" ? getLogLevel(label) : label;
99
+ return logLevel >= LogLevel.DEBUG;
100
+ }, "isVerbose");
101
+
102
+ // ../config/src/constants.ts
103
+ var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
104
+ var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
105
+ var STORM_DEFAULT_LICENSING = "https://license.stormsoftware.com";
106
+ var STORM_DEFAULT_LICENSE = "Apache-2.0";
107
+
108
+ // ../config/src/schema.ts
109
+ var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);
110
+ 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");
111
+ 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");
112
+ 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");
113
+ 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");
114
+ 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");
115
+ 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");
116
+ 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");
117
+ 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");
118
+ 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");
119
+ 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");
120
+ 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");
121
+ 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");
122
+ 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");
123
+ 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");
124
+ var DarkThemeColorConfigSchema = _zod2.default.object({
125
+ foreground: LightColorSchema,
126
+ background: DarkColorSchema,
127
+ brand: BrandColorSchema,
128
+ alternate: AlternateColorSchema,
129
+ accent: AccentColorSchema,
130
+ link: LinkColorSchema,
131
+ help: HelpColorSchema,
132
+ success: SuccessColorSchema,
133
+ info: InfoColorSchema,
134
+ warning: WarningColorSchema,
135
+ danger: DangerColorSchema,
136
+ fatal: FatalColorSchema,
137
+ positive: PositiveColorSchema,
138
+ negative: NegativeColorSchema
139
+ });
140
+ var LightThemeColorConfigSchema = _zod2.default.object({
141
+ foreground: DarkColorSchema,
142
+ background: LightColorSchema,
143
+ brand: BrandColorSchema,
144
+ alternate: AlternateColorSchema,
145
+ accent: AccentColorSchema,
146
+ link: LinkColorSchema,
147
+ help: HelpColorSchema,
148
+ success: SuccessColorSchema,
149
+ info: InfoColorSchema,
150
+ warning: WarningColorSchema,
151
+ danger: DangerColorSchema,
152
+ fatal: FatalColorSchema,
153
+ positive: PositiveColorSchema,
154
+ negative: NegativeColorSchema
155
+ });
156
+ var MultiThemeColorConfigSchema = _zod2.default.object({
157
+ dark: DarkThemeColorConfigSchema,
158
+ light: LightThemeColorConfigSchema
159
+ });
160
+ var SingleThemeColorConfigSchema = _zod2.default.object({
161
+ dark: DarkColorSchema,
162
+ light: LightColorSchema,
163
+ brand: BrandColorSchema,
164
+ alternate: AlternateColorSchema,
165
+ accent: AccentColorSchema,
166
+ link: LinkColorSchema,
167
+ help: HelpColorSchema,
168
+ success: SuccessColorSchema,
169
+ info: InfoColorSchema,
170
+ warning: WarningColorSchema,
171
+ danger: DangerColorSchema,
172
+ fatal: FatalColorSchema,
173
+ positive: PositiveColorSchema,
174
+ negative: NegativeColorSchema
175
+ });
176
+ var RegistryUrlConfigSchema = _zod2.default.string().trim().toLowerCase().url().optional().describe("A remote registry URL used to publish distributable packages");
177
+ var RegistryConfigSchema = _zod2.default.object({
178
+ github: RegistryUrlConfigSchema,
179
+ npm: RegistryUrlConfigSchema,
180
+ cargo: RegistryUrlConfigSchema,
181
+ cyclone: RegistryUrlConfigSchema,
182
+ container: RegistryUrlConfigSchema
183
+ }).default({}).describe("A list of remote registry URLs used by Storm Software");
184
+ var ColorConfigSchema = SingleThemeColorConfigSchema.or(MultiThemeColorConfigSchema).describe("Colors used for various workspace elements");
185
+ var ColorConfigMapSchema = _zod2.default.union([
186
+ _zod2.default.object({
187
+ "base": ColorConfigSchema
188
+ }),
189
+ _zod2.default.record(_zod2.default.string(), ColorConfigSchema)
190
+ ]);
191
+ var WorkspaceBotConfigSchema = _zod2.default.object({
192
+ 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)"),
193
+ email: _zod2.default.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
194
+ }).describe("The workspace's bot user's config used to automated various operations tasks");
195
+ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
196
+ cache: _zod2.default.string().trim().optional().describe("The directory used to store the environment's cached file data"),
197
+ data: _zod2.default.string().trim().optional().describe("The directory used to store the environment's data files"),
198
+ config: _zod2.default.string().trim().optional().describe("The directory used to store the environment's configuration files"),
199
+ temp: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
200
+ log: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
201
+ 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)")
202
+ }).describe("Various directories used by the workspace to store data, cache, and configuration files");
203
+ var StormConfigSchema = _zod2.default.object({
204
+ $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"),
205
+ extends: _zod2.default.string().trim().optional().describe("The path to a base JSON file to use as a configuration preset file"),
206
+ name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
207
+ namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
208
+ organization: _zod2.default.string().trim().default("storm-software").describe("The organization of the workspace"),
209
+ repository: _zod2.default.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
210
+ license: _zod2.default.string().trim().default("Apache-2.0").describe("The license type of the package"),
211
+ homepage: _zod2.default.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
212
+ docs: _zod2.default.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
213
+ licensing: _zod2.default.string().trim().url().default(STORM_DEFAULT_LICENSING).describe("The base licensing site for the workspace"),
214
+ branch: _zod2.default.string().trim().default("main").describe("The branch of the workspace"),
215
+ preid: _zod2.default.string().optional().describe("A tag specifying the version pre-release identifier"),
216
+ owner: _zod2.default.string().trim().default("@storm-software/admin").describe("The owner of the package"),
217
+ bot: WorkspaceBotConfigSchema,
218
+ env: _zod2.default.enum([
219
+ "development",
220
+ "staging",
221
+ "production"
222
+ ]).default("production").describe("The current runtime environment name for the package"),
223
+ workspaceRoot: _zod2.default.string().trim().default("").describe("The root directory of the workspace"),
224
+ 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"),
225
+ skipCache: _zod2.default.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
226
+ directories: WorkspaceDirectoryConfigSchema,
227
+ packageManager: _zod2.default.enum([
228
+ "npm",
229
+ "yarn",
230
+ "pnpm",
231
+ "bun"
232
+ ]).default("npm").describe("The JavaScript/TypeScript package manager used by the repository"),
233
+ timezone: _zod2.default.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
234
+ locale: _zod2.default.string().trim().default("en-US").describe("The default locale of the workspace"),
235
+ logLevel: _zod2.default.enum([
236
+ "silent",
237
+ "fatal",
238
+ "error",
239
+ "warn",
240
+ "success",
241
+ "info",
242
+ "debug",
243
+ "trace",
244
+ "all"
245
+ ]).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`)."),
246
+ registry: RegistryConfigSchema,
247
+ 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."),
248
+ colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
249
+ extensions: _zod2.default.record(_zod2.default.any()).optional().default({}).describe("Configuration of each used extension")
250
+ }).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.");
251
+
252
+ // ../config/src/types.ts
253
+ var COLOR_KEYS = [
254
+ "dark",
255
+ "light",
256
+ "base",
257
+ "brand",
258
+ "alternate",
259
+ "accent",
260
+ "link",
261
+ "success",
262
+ "help",
263
+ "info",
264
+ "warning",
265
+ "danger",
266
+ "fatal",
267
+ "positive",
268
+ "negative"
269
+ ];
270
+
271
+ // ../config-tools/src/utilities/get-default-config.ts
272
+ var _fs = require('fs');
273
+ var _path = require('path');
274
+
275
+ // ../config-tools/src/utilities/find-up.ts
276
+
277
+
278
+ var MAX_PATH_SEARCH_DEPTH = 30;
279
+ var depth = 0;
280
+ function findFolderUp(startPath, endFileNames) {
281
+ const _startPath = _nullishCoalesce(startPath, () => ( process.cwd()));
282
+ if (endFileNames.some((endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName)))) {
283
+ return _startPath;
284
+ }
285
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
286
+ const parent = _path.join.call(void 0, _startPath, "..");
287
+ return findFolderUp(parent, endFileNames);
288
+ }
289
+ return void 0;
290
+ }
291
+ _chunkYDYGZTJKcjs.__name.call(void 0, findFolderUp, "findFolderUp");
292
+
293
+ // ../config-tools/src/utilities/find-workspace-root.ts
294
+ var rootFiles = [
295
+ "storm.json",
296
+ "storm.json",
297
+ "storm.yaml",
298
+ "storm.yml",
299
+ "storm.js",
300
+ "storm.ts",
301
+ ".storm.json",
302
+ ".storm.yaml",
303
+ ".storm.yml",
304
+ ".storm.js",
305
+ ".storm.ts",
306
+ "lerna.json",
307
+ "nx.json",
308
+ "turbo.json",
309
+ "npm-workspace.json",
310
+ "yarn-workspace.json",
311
+ "pnpm-workspace.json",
312
+ "npm-workspace.yaml",
313
+ "yarn-workspace.yaml",
314
+ "pnpm-workspace.yaml",
315
+ "npm-workspace.yml",
316
+ "yarn-workspace.yml",
317
+ "pnpm-workspace.yml",
318
+ "npm-lock.json",
319
+ "yarn-lock.json",
320
+ "pnpm-lock.json",
321
+ "npm-lock.yaml",
322
+ "yarn-lock.yaml",
323
+ "pnpm-lock.yaml",
324
+ "npm-lock.yml",
325
+ "yarn-lock.yml",
326
+ "pnpm-lock.yml",
327
+ "bun.lockb"
328
+ ];
329
+ function findWorkspaceRootSafe(pathInsideMonorepo) {
330
+ if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
331
+ return correctPaths(_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH)));
332
+ }
333
+ return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles));
334
+ }
335
+ _chunkYDYGZTJKcjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
336
+ function findWorkspaceRoot(pathInsideMonorepo) {
337
+ const result = findWorkspaceRootSafe(pathInsideMonorepo);
338
+ if (!result) {
339
+ throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
340
+ ${rootFiles.join("\n")}
341
+ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
342
+ }
343
+ return result;
344
+ }
345
+ _chunkYDYGZTJKcjs.__name.call(void 0, findWorkspaceRoot, "findWorkspaceRoot");
346
+
347
+ // ../config-tools/src/utilities/get-default-config.ts
348
+ var DEFAULT_COLOR_CONFIG = {
349
+ "light": {
350
+ "background": "#fafafa",
351
+ "foreground": "#1d1e22",
352
+ "brand": "#1fb2a6",
353
+ "alternate": "#db2777",
354
+ "help": "#5C4EE5",
355
+ "success": "#087f5b",
356
+ "info": "#0550ae",
357
+ "warning": "#e3b341",
358
+ "danger": "#D8314A",
359
+ "positive": "#22c55e",
360
+ "negative": "#dc2626"
361
+ },
362
+ "dark": {
363
+ "background": "#1d1e22",
364
+ "foreground": "#cbd5e1",
365
+ "brand": "#2dd4bf",
366
+ "alternate": "#db2777",
367
+ "help": "#818cf8",
368
+ "success": "#10b981",
369
+ "info": "#58a6ff",
370
+ "warning": "#f3d371",
371
+ "danger": "#D8314A",
372
+ "positive": "#22c55e",
373
+ "negative": "#dc2626"
374
+ }
375
+ };
376
+ var getDefaultConfig = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (root) => {
377
+ let license = STORM_DEFAULT_LICENSE;
378
+ let homepage = STORM_DEFAULT_HOMEPAGE;
379
+ let name;
380
+ let namespace;
381
+ let repository;
382
+ const workspaceRoot = findWorkspaceRoot(root);
383
+ if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
384
+ const file = _fs.readFileSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"), {
385
+ encoding: "utf8"
386
+ });
387
+ if (file) {
388
+ const packageJson = JSON.parse(file);
389
+ if (packageJson.name) {
390
+ name = packageJson.name;
391
+ }
392
+ if (packageJson.namespace) {
393
+ namespace = packageJson.namespace;
394
+ }
395
+ if (_optionalChain([packageJson, 'access', _2 => _2.repository, 'optionalAccess', _3 => _3.url])) {
396
+ repository = _optionalChain([packageJson, 'access', _4 => _4.repository, 'optionalAccess', _5 => _5.url]);
397
+ }
398
+ if (packageJson.license) {
399
+ license = packageJson.license;
400
+ }
401
+ if (packageJson.homepage) {
402
+ homepage = packageJson.homepage;
403
+ }
404
+ }
405
+ }
406
+ return {
407
+ workspaceRoot,
408
+ name,
409
+ namespace,
410
+ repository,
411
+ license,
412
+ homepage,
413
+ docs: `${homepage || STORM_DEFAULT_HOMEPAGE}/docs`,
414
+ licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`
415
+ };
416
+ }, "getDefaultConfig");
417
+
418
+ // ../config-tools/src/logger/chalk.ts
419
+ var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
420
+ var chalkDefault = {
421
+ hex: /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (_) => (message) => message, "hex"),
422
+ bgHex: /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (_) => ({
423
+ whiteBright: /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (message) => message, "whiteBright")
424
+ }), "bgHex"),
425
+ whiteBright: /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (message) => message, "whiteBright"),
426
+ gray: /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (message) => message, "gray"),
427
+ bold: {
428
+ hex: /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (_) => (message) => message, "hex"),
429
+ bgHex: /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (_) => ({
430
+ whiteBright: /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (message) => message, "whiteBright")
431
+ }), "bgHex"),
432
+ whiteBright: /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (message) => message, "whiteBright")
433
+ },
434
+ dim: {
435
+ hex: /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (_) => (message) => message, "hex"),
436
+ gray: /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (message) => message, "gray")
437
+ }
438
+ };
439
+ var getChalk = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, () => {
440
+ let _chalk = _chalk3.default;
441
+ if (!_optionalChain([_chalk, 'optionalAccess', _6 => _6.hex]) || !_optionalChain([_chalk, 'optionalAccess', _7 => _7.bold, 'optionalAccess', _8 => _8.hex]) || !_optionalChain([_chalk, 'optionalAccess', _9 => _9.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _10 => _10.whiteBright])) {
442
+ _chalk = chalkDefault;
443
+ }
444
+ return _chalk;
445
+ }, "getChalk");
446
+
447
+ // ../config-tools/src/logger/is-unicode-supported.ts
448
+ var _process = require('process'); var _process2 = _interopRequireDefault(_process);
449
+ function isUnicodeSupported() {
450
+ const { env } = _process2.default;
451
+ const { TERM, TERM_PROGRAM } = env;
452
+ if (_process2.default.platform !== "win32") {
453
+ return TERM !== "linux";
454
+ }
455
+ return Boolean(env.WT_SESSION) || // Windows Terminal
456
+ Boolean(env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
457
+ env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
458
+ TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
459
+ }
460
+ _chunkYDYGZTJKcjs.__name.call(void 0, isUnicodeSupported, "isUnicodeSupported");
461
+
462
+ // ../config-tools/src/logger/console-icons.ts
463
+ var useIcon = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
464
+ var CONSOLE_ICONS = {
465
+ [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
466
+ [LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
467
+ [LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
468
+ [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
469
+ [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
470
+ [LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
471
+ [LogLevelLabel.TRACE]: useIcon("\u{1F6E0}", "T"),
472
+ [LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
473
+ };
474
+
475
+ // ../config-tools/src/logger/format-timestamp.ts
476
+ var formatTimestamp = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (date = /* @__PURE__ */ new Date()) => {
477
+ return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
478
+ }, "formatTimestamp");
479
+
480
+ // ../config-tools/src/logger/console.ts
481
+ var getLogFn = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
482
+ const colors = !_optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12.dark]) && !_optionalChain([config, 'access', _13 => _13.colors, 'optionalAccess', _14 => _14["base"]]) && !_optionalChain([config, 'access', _15 => _15.colors, 'optionalAccess', _16 => _16["base"], 'optionalAccess', _17 => _17.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _18 => _18.colors, 'optionalAccess', _19 => _19.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _20 => _20.colors, 'optionalAccess', _21 => _21["base"], 'optionalAccess', _22 => _22.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _23 => _23.colors, 'optionalAccess', _24 => _24["base"]]) ? _optionalChain([config, 'access', _25 => _25.colors, 'optionalAccess', _26 => _26["base"]]) : DEFAULT_COLOR_CONFIG;
483
+ const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
484
+ if (typeof logLevel === "number" && (logLevel >= getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(configLogLevel)) {
485
+ return (_) => {
486
+ };
487
+ }
488
+ if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
489
+ return (message) => {
490
+ console.error(`
491
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
492
+ `);
493
+ };
494
+ }
495
+ if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
496
+ return (message) => {
497
+ console.error(`
498
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
499
+ `);
500
+ };
501
+ }
502
+ if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
503
+ return (message) => {
504
+ console.warn(`
505
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
506
+ `);
507
+ };
508
+ }
509
+ if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel || typeof logLevel === "string" && LogLevel.SUCCESS >= getLogLevel(logLevel)) {
510
+ return (message) => {
511
+ console.info(`
512
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
513
+ `);
514
+ };
515
+ }
516
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
517
+ return (message) => {
518
+ console.info(`
519
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
520
+ `);
521
+ };
522
+ }
523
+ if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
524
+ return (message) => {
525
+ console.debug(`
526
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
527
+ `);
528
+ };
529
+ }
530
+ return (message) => {
531
+ console.log(`
532
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
533
+ `);
534
+ };
535
+ }, "getLogFn");
536
+ var writeWarning = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.WARN, config)(message), "writeWarning");
537
+ var writeInfo = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.INFO, config)(message), "writeInfo");
538
+ var writeDebug = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
539
+ var writeTrace = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
540
+ var writeSystem = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.ALL, config)(message), "writeSystem");
541
+ var getStopwatch = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (name) => {
542
+ const start = process.hrtime();
543
+ return () => {
544
+ const end = process.hrtime(start);
545
+ console.info(`
546
+ > \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(end[0] * 1e3 + end[1] / 1e6)}ms to complete
547
+
548
+ `);
549
+ };
550
+ }, "getStopwatch");
551
+ var MAX_DEPTH = 4;
552
+ var formatLogMessage = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (message, options = {}, depth2 = 0) => {
553
+ if (depth2 > MAX_DEPTH) {
554
+ return "<max depth>";
555
+ }
556
+ const prefix = _nullishCoalesce(options.prefix, () => ( "-"));
557
+ const skip = _nullishCoalesce(options.skip, () => ( []));
558
+ return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : Array.isArray(message) ? `
559
+ ${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, {
560
+ prefix: `${prefix}-`,
561
+ skip
562
+ }, depth2 + 1)}`).join("\n")}` : typeof message === "object" ? `
563
+ ${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(message[key], {
564
+ prefix: `${prefix}-`,
565
+ skip
566
+ }, depth2 + 1) : message[key]}`).join("\n")}` : message;
567
+ }, "formatLogMessage");
568
+ var _isFunction = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (value) => {
569
+ try {
570
+ return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _27 => _27.constructor]) && _optionalChain([value, 'optionalAccess', _28 => _28.call]) && _optionalChain([value, 'optionalAccess', _29 => _29.apply]));
571
+ } catch (e) {
572
+ return false;
573
+ }
574
+ }, "_isFunction");
575
+
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+
592
+
593
+
594
+
595
+
596
+
597
+
598
+ exports.LogLevel = LogLevel; exports.LogLevelLabel = LogLevelLabel; exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.COLOR_KEYS = COLOR_KEYS; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.findWorkspaceRoot = findWorkspaceRoot; exports.getDefaultConfig = getDefaultConfig; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.isVerbose = isVerbose; exports.getLogFn = getLogFn; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.writeSystem = writeSystem; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage;
@@ -0,0 +1,13 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
4
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
5
+ }) : x)(function(x) {
6
+ if (typeof require !== "undefined") return require.apply(this, arguments);
7
+ throw Error('Dynamic require of "' + x + '" is not supported');
8
+ });
9
+
10
+ export {
11
+ __name,
12
+ __require
13
+ };
@@ -1,14 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkMCNTIU52js = require('./chunk-MCNTIU52.js');
3
+ var _chunk36OA7HRFcjs = require('./chunk-36OA7HRF.cjs');
4
4
 
5
5
 
6
-
7
- var _chunkRBSVNX4Wjs = require('./chunk-RBSVNX4W.js');
6
+ var _chunkYDYGZTJKcjs = require('./chunk-YDYGZTJK.cjs');
8
7
 
9
8
  // src/plugins/analyze.ts
10
- _chunkRBSVNX4Wjs.init_cjs_shims.call(void 0, );
11
- var formatBytes = /* @__PURE__ */ _chunkRBSVNX4Wjs.__name.call(void 0, (bytes) => {
9
+ var formatBytes = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (bytes) => {
12
10
  if (bytes === 0) return "0 Byte";
13
11
  const k = 1e3;
14
12
  const dm = 3;
@@ -21,13 +19,13 @@ var formatBytes = /* @__PURE__ */ _chunkRBSVNX4Wjs.__name.call(void 0, (bytes) =
21
19
  const i = Math.floor(Math.log(bytes) / Math.log(k));
22
20
  return `${parseFloat((bytes / k ** i).toFixed(dm))} ${sizes[i]}`;
23
21
  }, "formatBytes");
24
- var analyzePlugin = /* @__PURE__ */ _chunkRBSVNX4Wjs.__name.call(void 0, (options, resolvedOptions) => {
22
+ var analyzePlugin = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (options, resolvedOptions) => {
25
23
  return {
26
24
  name: "storm:analyzer",
27
25
  renderChunk(source, chunk) {
28
26
  const sourceBytes = formatBytes(source.length);
29
27
  const fileName = chunk.fileName;
30
- _chunkMCNTIU52js.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`, resolvedOptions.config);
28
+ _chunk36OA7HRFcjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`, resolvedOptions.config);
31
29
  }
32
30
  };
33
31
  }, "analyzePlugin");