@storm-software/config 1.80.0 → 1.91.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/index.cjs CHANGED
@@ -17,8 +17,8 @@ var __copyProps = (to, from, except, desc) => {
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
19
  // packages/config/src/index.ts
20
- var src_exports = {};
21
- __export(src_exports, {
20
+ var index_exports = {};
21
+ __export(index_exports, {
22
22
  COLOR_KEYS: () => COLOR_KEYS,
23
23
  ColorConfigMapSchema: () => ColorConfigMapSchema,
24
24
  ColorConfigSchema: () => ColorConfigSchema,
@@ -29,22 +29,26 @@ __export(src_exports, {
29
29
  RegistryUrlConfigSchema: () => RegistryUrlConfigSchema,
30
30
  STORM_DEFAULT_DOCS: () => STORM_DEFAULT_DOCS,
31
31
  STORM_DEFAULT_HOMEPAGE: () => STORM_DEFAULT_HOMEPAGE,
32
+ STORM_DEFAULT_LICENSE: () => STORM_DEFAULT_LICENSE,
32
33
  STORM_DEFAULT_LICENSING: () => STORM_DEFAULT_LICENSING,
33
34
  SingleThemeColorConfigSchema: () => SingleThemeColorConfigSchema,
34
35
  StormConfigSchema: () => StormConfigSchema,
36
+ WorkspaceBotConfigSchema: () => WorkspaceBotConfigSchema,
37
+ WorkspaceDirectoryConfigSchema: () => WorkspaceDirectoryConfigSchema,
35
38
  defineConfig: () => defineConfig
36
39
  });
37
- module.exports = __toCommonJS(src_exports);
40
+ module.exports = __toCommonJS(index_exports);
38
41
 
39
42
  // packages/config/src/constants.ts
40
43
  var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
41
44
  var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
42
45
  var STORM_DEFAULT_LICENSING = "https://license.stormsoftware.com";
46
+ var STORM_DEFAULT_LICENSE = "Apache-2.0";
43
47
 
44
48
  // packages/config/src/define-config.ts
45
49
  var defineConfig = (input) => input;
46
50
 
47
- // node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs
51
+ // node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/index.mjs
48
52
  var util;
49
53
  (function(util2) {
50
54
  util2.assertEqual = (val) => val;
@@ -199,6 +203,9 @@ var quotelessJson = (obj) => {
199
203
  return json.replace(/"([^"]+)":/g, "$1:");
200
204
  };
201
205
  var ZodError = class _ZodError extends Error {
206
+ get errors() {
207
+ return this.issues;
208
+ }
202
209
  constructor(issues) {
203
210
  super();
204
211
  this.issues = [];
@@ -217,9 +224,6 @@ var ZodError = class _ZodError extends Error {
217
224
  this.name = "ZodError";
218
225
  this.issues = issues;
219
226
  }
220
- get errors() {
221
- return this.issues;
222
- }
223
227
  format(_mapper) {
224
228
  const mapper = _mapper || function(issue) {
225
229
  return issue.message;
@@ -430,8 +434,11 @@ function addIssueToContext(ctx, issueData) {
430
434
  path: ctx.path,
431
435
  errorMaps: [
432
436
  ctx.common.contextualErrorMap,
437
+ // contextual error map is first priority
433
438
  ctx.schemaErrorMap,
439
+ // then schema-bound map if available
434
440
  overrideMap,
441
+ // then global override map
435
442
  overrideMap === errorMap ? void 0 : errorMap
436
443
  // then global default map
437
444
  ].filter((x) => !!x)
@@ -582,34 +589,6 @@ function processCreateParams(params) {
582
589
  return { errorMap: customMap, description };
583
590
  }
584
591
  var ZodType = class {
585
- constructor(def) {
586
- this.spa = this.safeParseAsync;
587
- this._def = def;
588
- this.parse = this.parse.bind(this);
589
- this.safeParse = this.safeParse.bind(this);
590
- this.parseAsync = this.parseAsync.bind(this);
591
- this.safeParseAsync = this.safeParseAsync.bind(this);
592
- this.spa = this.spa.bind(this);
593
- this.refine = this.refine.bind(this);
594
- this.refinement = this.refinement.bind(this);
595
- this.superRefine = this.superRefine.bind(this);
596
- this.optional = this.optional.bind(this);
597
- this.nullable = this.nullable.bind(this);
598
- this.nullish = this.nullish.bind(this);
599
- this.array = this.array.bind(this);
600
- this.promise = this.promise.bind(this);
601
- this.or = this.or.bind(this);
602
- this.and = this.and.bind(this);
603
- this.transform = this.transform.bind(this);
604
- this.brand = this.brand.bind(this);
605
- this.default = this.default.bind(this);
606
- this.catch = this.catch.bind(this);
607
- this.describe = this.describe.bind(this);
608
- this.pipe = this.pipe.bind(this);
609
- this.readonly = this.readonly.bind(this);
610
- this.isNullable = this.isNullable.bind(this);
611
- this.isOptional = this.isOptional.bind(this);
612
- }
613
592
  get description() {
614
593
  return this._def.description;
615
594
  }
@@ -673,6 +652,43 @@ var ZodType = class {
673
652
  const result = this._parseSync({ data, path: ctx.path, parent: ctx });
674
653
  return handleResult(ctx, result);
675
654
  }
655
+ "~validate"(data) {
656
+ var _a, _b;
657
+ const ctx = {
658
+ common: {
659
+ issues: [],
660
+ async: !!this["~standard"].async
661
+ },
662
+ path: [],
663
+ schemaErrorMap: this._def.errorMap,
664
+ parent: null,
665
+ data,
666
+ parsedType: getParsedType(data)
667
+ };
668
+ if (!this["~standard"].async) {
669
+ try {
670
+ const result = this._parseSync({ data, path: [], parent: ctx });
671
+ return isValid(result) ? {
672
+ value: result.value
673
+ } : {
674
+ issues: ctx.common.issues
675
+ };
676
+ } catch (err) {
677
+ if ((_b = (_a = err === null || err === void 0 ? void 0 : err.message) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes("encountered")) {
678
+ this["~standard"].async = true;
679
+ }
680
+ ctx.common = {
681
+ issues: [],
682
+ async: true
683
+ };
684
+ }
685
+ }
686
+ return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? {
687
+ value: result.value
688
+ } : {
689
+ issues: ctx.common.issues
690
+ });
691
+ }
676
692
  async parseAsync(data, params) {
677
693
  const result = await this.safeParseAsync(data, params);
678
694
  if (result.success)
@@ -750,6 +766,39 @@ var ZodType = class {
750
766
  superRefine(refinement) {
751
767
  return this._refinement(refinement);
752
768
  }
769
+ constructor(def) {
770
+ this.spa = this.safeParseAsync;
771
+ this._def = def;
772
+ this.parse = this.parse.bind(this);
773
+ this.safeParse = this.safeParse.bind(this);
774
+ this.parseAsync = this.parseAsync.bind(this);
775
+ this.safeParseAsync = this.safeParseAsync.bind(this);
776
+ this.spa = this.spa.bind(this);
777
+ this.refine = this.refine.bind(this);
778
+ this.refinement = this.refinement.bind(this);
779
+ this.superRefine = this.superRefine.bind(this);
780
+ this.optional = this.optional.bind(this);
781
+ this.nullable = this.nullable.bind(this);
782
+ this.nullish = this.nullish.bind(this);
783
+ this.array = this.array.bind(this);
784
+ this.promise = this.promise.bind(this);
785
+ this.or = this.or.bind(this);
786
+ this.and = this.and.bind(this);
787
+ this.transform = this.transform.bind(this);
788
+ this.brand = this.brand.bind(this);
789
+ this.default = this.default.bind(this);
790
+ this.catch = this.catch.bind(this);
791
+ this.describe = this.describe.bind(this);
792
+ this.pipe = this.pipe.bind(this);
793
+ this.readonly = this.readonly.bind(this);
794
+ this.isNullable = this.isNullable.bind(this);
795
+ this.isOptional = this.isOptional.bind(this);
796
+ this["~standard"] = {
797
+ version: 1,
798
+ vendor: "zod",
799
+ validate: (data) => this["~validate"](data)
800
+ };
801
+ }
753
802
  optional() {
754
803
  return ZodOptional.create(this, this._def);
755
804
  }
@@ -760,7 +809,7 @@ var ZodType = class {
760
809
  return this.nullable().optional();
761
810
  }
762
811
  array() {
763
- return ZodArray.create(this, this._def);
812
+ return ZodArray.create(this);
764
813
  }
765
814
  promise() {
766
815
  return ZodPromise.create(this, this._def);
@@ -826,16 +875,20 @@ var ZodType = class {
826
875
  };
827
876
  var cuidRegex = /^c[^\s-]{8,}$/i;
828
877
  var cuid2Regex = /^[0-9a-z]+$/;
829
- var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
878
+ var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
830
879
  var uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
831
880
  var nanoidRegex = /^[a-z0-9_-]{21}$/i;
881
+ var jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
832
882
  var durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
833
883
  var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
834
884
  var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
835
885
  var emojiRegex;
836
886
  var ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
837
- var ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
887
+ var ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
888
+ var ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
889
+ var ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
838
890
  var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
891
+ var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
839
892
  var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
840
893
  var dateRegex = new RegExp(`^${dateRegexSource}$`);
841
894
  function timeRegexSource(args) {
@@ -868,6 +921,33 @@ function isValidIP(ip, version) {
868
921
  }
869
922
  return false;
870
923
  }
924
+ function isValidJWT(jwt, alg) {
925
+ if (!jwtRegex.test(jwt))
926
+ return false;
927
+ try {
928
+ const [header] = jwt.split(".");
929
+ const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
930
+ const decoded = JSON.parse(atob(base64));
931
+ if (typeof decoded !== "object" || decoded === null)
932
+ return false;
933
+ if (!decoded.typ || !decoded.alg)
934
+ return false;
935
+ if (alg && decoded.alg !== alg)
936
+ return false;
937
+ return true;
938
+ } catch (_a) {
939
+ return false;
940
+ }
941
+ }
942
+ function isValidCidr(ip, version) {
943
+ if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) {
944
+ return true;
945
+ }
946
+ if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) {
947
+ return true;
948
+ }
949
+ return false;
950
+ }
871
951
  var ZodString = class _ZodString extends ZodType {
872
952
  _parse(input) {
873
953
  if (this._def.coerce) {
@@ -1124,6 +1204,26 @@ var ZodString = class _ZodString extends ZodType {
1124
1204
  });
1125
1205
  status.dirty();
1126
1206
  }
1207
+ } else if (check.kind === "jwt") {
1208
+ if (!isValidJWT(input.data, check.alg)) {
1209
+ ctx = this._getOrReturnCtx(input, ctx);
1210
+ addIssueToContext(ctx, {
1211
+ validation: "jwt",
1212
+ code: ZodIssueCode.invalid_string,
1213
+ message: check.message
1214
+ });
1215
+ status.dirty();
1216
+ }
1217
+ } else if (check.kind === "cidr") {
1218
+ if (!isValidCidr(input.data, check.version)) {
1219
+ ctx = this._getOrReturnCtx(input, ctx);
1220
+ addIssueToContext(ctx, {
1221
+ validation: "cidr",
1222
+ code: ZodIssueCode.invalid_string,
1223
+ message: check.message
1224
+ });
1225
+ status.dirty();
1226
+ }
1127
1227
  } else if (check.kind === "base64") {
1128
1228
  if (!base64Regex.test(input.data)) {
1129
1229
  ctx = this._getOrReturnCtx(input, ctx);
@@ -1134,6 +1234,16 @@ var ZodString = class _ZodString extends ZodType {
1134
1234
  });
1135
1235
  status.dirty();
1136
1236
  }
1237
+ } else if (check.kind === "base64url") {
1238
+ if (!base64urlRegex.test(input.data)) {
1239
+ ctx = this._getOrReturnCtx(input, ctx);
1240
+ addIssueToContext(ctx, {
1241
+ validation: "base64url",
1242
+ code: ZodIssueCode.invalid_string,
1243
+ message: check.message
1244
+ });
1245
+ status.dirty();
1246
+ }
1137
1247
  } else {
1138
1248
  util.assertNever(check);
1139
1249
  }
@@ -1180,9 +1290,21 @@ var ZodString = class _ZodString extends ZodType {
1180
1290
  base64(message) {
1181
1291
  return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
1182
1292
  }
1293
+ base64url(message) {
1294
+ return this._addCheck({
1295
+ kind: "base64url",
1296
+ ...errorUtil.errToObj(message)
1297
+ });
1298
+ }
1299
+ jwt(options) {
1300
+ return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) });
1301
+ }
1183
1302
  ip(options) {
1184
1303
  return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) });
1185
1304
  }
1305
+ cidr(options) {
1306
+ return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
1307
+ }
1186
1308
  datetime(options) {
1187
1309
  var _a, _b;
1188
1310
  if (typeof options === "string") {
@@ -1273,8 +1395,7 @@ var ZodString = class _ZodString extends ZodType {
1273
1395
  });
1274
1396
  }
1275
1397
  /**
1276
- * @deprecated Use z.string().min(1) instead.
1277
- * @see {@link ZodString.min}
1398
+ * Equivalent to `.min(1)`
1278
1399
  */
1279
1400
  nonempty(message) {
1280
1401
  return this.min(1, errorUtil.errToObj(message));
@@ -1336,9 +1457,15 @@ var ZodString = class _ZodString extends ZodType {
1336
1457
  get isIP() {
1337
1458
  return !!this._def.checks.find((ch) => ch.kind === "ip");
1338
1459
  }
1460
+ get isCIDR() {
1461
+ return !!this._def.checks.find((ch) => ch.kind === "cidr");
1462
+ }
1339
1463
  get isBase64() {
1340
1464
  return !!this._def.checks.find((ch) => ch.kind === "base64");
1341
1465
  }
1466
+ get isBase64url() {
1467
+ return !!this._def.checks.find((ch) => ch.kind === "base64url");
1468
+ }
1342
1469
  get minLength() {
1343
1470
  let min = null;
1344
1471
  for (const ch of this._def.checks) {
@@ -1616,17 +1743,15 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
1616
1743
  }
1617
1744
  _parse(input) {
1618
1745
  if (this._def.coerce) {
1619
- input.data = BigInt(input.data);
1746
+ try {
1747
+ input.data = BigInt(input.data);
1748
+ } catch (_a) {
1749
+ return this._getInvalidInput(input);
1750
+ }
1620
1751
  }
1621
1752
  const parsedType = this._getType(input);
1622
1753
  if (parsedType !== ZodParsedType.bigint) {
1623
- const ctx2 = this._getOrReturnCtx(input);
1624
- addIssueToContext(ctx2, {
1625
- code: ZodIssueCode.invalid_type,
1626
- expected: ZodParsedType.bigint,
1627
- received: ctx2.parsedType
1628
- });
1629
- return INVALID;
1754
+ return this._getInvalidInput(input);
1630
1755
  }
1631
1756
  let ctx = void 0;
1632
1757
  const status = new ParseStatus();
@@ -1673,6 +1798,15 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
1673
1798
  }
1674
1799
  return { status: status.value, value: input.data };
1675
1800
  }
1801
+ _getInvalidInput(input) {
1802
+ const ctx = this._getOrReturnCtx(input);
1803
+ addIssueToContext(ctx, {
1804
+ code: ZodIssueCode.invalid_type,
1805
+ expected: ZodParsedType.bigint,
1806
+ received: ctx.parsedType
1807
+ });
1808
+ return INVALID;
1809
+ }
1676
1810
  gte(value, message) {
1677
1811
  return this.setLimit("min", value, true, errorUtil.toString(message));
1678
1812
  }
@@ -4040,18 +4174,39 @@ var ColorConfigMapSchema = z.union([
4040
4174
  z.object({ "base": ColorConfigSchema }),
4041
4175
  z.record(z.string(), ColorConfigSchema)
4042
4176
  ]);
4177
+ var WorkspaceBotConfigSchema = z.object({
4178
+ name: z.string().trim().default("Stormie-Bot").describe(
4179
+ "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
4180
+ ),
4181
+ email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
4182
+ }).describe(
4183
+ "The workspace's bot user's config used to automated various operations tasks"
4184
+ );
4185
+ var WorkspaceDirectoryConfigSchema = z.object({
4186
+ cache: z.string().trim().optional().describe(
4187
+ "The directory used to store the environment's cached file data"
4188
+ ),
4189
+ data: z.string().trim().optional().describe("The directory used to store the environment's data files"),
4190
+ config: z.string().trim().optional().describe(
4191
+ "The directory used to store the environment's configuration files"
4192
+ ),
4193
+ temp: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
4194
+ log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
4195
+ build: z.string().trim().default("dist").describe(
4196
+ "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
4197
+ )
4198
+ }).describe(
4199
+ "Various directories used by the workspace to store data, cache, and configuration files"
4200
+ );
4043
4201
  var StormConfigSchema = z.object({
4044
4202
  $schema: z.string().trim().default(
4045
4203
  "https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json"
4046
- ).describe(
4204
+ ).optional().nullish().describe(
4047
4205
  "The URL to the JSON schema file that describes the Storm configuration file"
4048
4206
  ),
4049
4207
  extends: z.string().trim().optional().describe(
4050
4208
  "The path to a base JSON file to use as a configuration preset file"
4051
4209
  ),
4052
- isRoot: z.boolean().optional().describe(
4053
- "A flag indicating if the current configuration is the set in the root of the workspace"
4054
- ),
4055
4210
  name: z.string().trim().toLowerCase().optional().describe(
4056
4211
  "The name of the service/package/scope using this configuration"
4057
4212
  ),
@@ -4065,30 +4220,14 @@ var StormConfigSchema = z.object({
4065
4220
  branch: z.string().trim().default("main").describe("The branch of the workspace"),
4066
4221
  preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
4067
4222
  owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
4068
- worker: z.string().trim().default("Stormie-Bot").describe(
4069
- "The worker of the package (this is the bot that will be used to perform various tasks)"
4070
- ),
4071
- envName: z.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment name for the package"),
4223
+ bot: WorkspaceBotConfigSchema,
4224
+ env: z.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment name for the package"),
4072
4225
  workspaceRoot: z.string().trim().default("").describe("The root directory of the workspace"),
4073
- packageDirectory: z.string().trim().optional().describe("The root directory of the package"),
4074
4226
  externalPackagePatterns: z.array(z.string()).default([]).describe(
4075
4227
  "The build will use these package patterns to determine if they should be external to the bundle"
4076
4228
  ),
4077
4229
  skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
4078
- cacheDirectory: z.string().trim().optional().describe(
4079
- "The directory used to store the environment's cached file data"
4080
- ),
4081
- dataDirectory: z.string().trim().optional().describe("The directory used to store the environment's data files"),
4082
- configDirectory: z.string().trim().optional().describe(
4083
- "The directory used to store the environment's configuration files"
4084
- ),
4085
- tempDirectory: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
4086
- logDirectory: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
4087
- buildDirectory: z.string().trim().default("dist").describe("The build directory for the workspace"),
4088
- outputDirectory: z.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
4089
- runtimeVersion: z.string().trim().regex(
4090
- /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
4091
- ).default("1.0.0").describe("The global version of the Storm runtime"),
4230
+ directories: WorkspaceDirectoryConfigSchema,
4092
4231
  packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
4093
4232
  "The JavaScript/TypeScript package manager used by the repository"
4094
4233
  ),
@@ -4106,7 +4245,6 @@ var StormConfigSchema = z.object({
4106
4245
  ]).default("info").describe(
4107
4246
  "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`)."
4108
4247
  ),
4109
- cloudflareAccountId: z.string().trim().toLowerCase().length(32).regex(/^([0-9a-fA-F]{32})$/i).nullable().default(null).describe("The default Cloudflare account ID of the workspace"),
4110
4248
  registry: RegistryConfigSchema,
4111
4249
  configFile: z.string().trim().nullable().default(null).describe(
4112
4250
  "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."