@storm-software/config 1.80.0 → 1.91.1

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.js CHANGED
@@ -2,11 +2,12 @@
2
2
  var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
3
3
  var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
4
4
  var STORM_DEFAULT_LICENSING = "https://license.stormsoftware.com";
5
+ var STORM_DEFAULT_LICENSE = "Apache-2.0";
5
6
 
6
7
  // packages/config/src/define-config.ts
7
8
  var defineConfig = (input) => input;
8
9
 
9
- // node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs
10
+ // node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/index.mjs
10
11
  var util;
11
12
  (function(util2) {
12
13
  util2.assertEqual = (val) => val;
@@ -161,6 +162,9 @@ var quotelessJson = (obj) => {
161
162
  return json.replace(/"([^"]+)":/g, "$1:");
162
163
  };
163
164
  var ZodError = class _ZodError extends Error {
165
+ get errors() {
166
+ return this.issues;
167
+ }
164
168
  constructor(issues) {
165
169
  super();
166
170
  this.issues = [];
@@ -179,9 +183,6 @@ var ZodError = class _ZodError extends Error {
179
183
  this.name = "ZodError";
180
184
  this.issues = issues;
181
185
  }
182
- get errors() {
183
- return this.issues;
184
- }
185
186
  format(_mapper) {
186
187
  const mapper = _mapper || function(issue) {
187
188
  return issue.message;
@@ -392,8 +393,11 @@ function addIssueToContext(ctx, issueData) {
392
393
  path: ctx.path,
393
394
  errorMaps: [
394
395
  ctx.common.contextualErrorMap,
396
+ // contextual error map is first priority
395
397
  ctx.schemaErrorMap,
398
+ // then schema-bound map if available
396
399
  overrideMap,
400
+ // then global override map
397
401
  overrideMap === errorMap ? void 0 : errorMap
398
402
  // then global default map
399
403
  ].filter((x) => !!x)
@@ -544,34 +548,6 @@ function processCreateParams(params) {
544
548
  return { errorMap: customMap, description };
545
549
  }
546
550
  var ZodType = class {
547
- constructor(def) {
548
- this.spa = this.safeParseAsync;
549
- this._def = def;
550
- this.parse = this.parse.bind(this);
551
- this.safeParse = this.safeParse.bind(this);
552
- this.parseAsync = this.parseAsync.bind(this);
553
- this.safeParseAsync = this.safeParseAsync.bind(this);
554
- this.spa = this.spa.bind(this);
555
- this.refine = this.refine.bind(this);
556
- this.refinement = this.refinement.bind(this);
557
- this.superRefine = this.superRefine.bind(this);
558
- this.optional = this.optional.bind(this);
559
- this.nullable = this.nullable.bind(this);
560
- this.nullish = this.nullish.bind(this);
561
- this.array = this.array.bind(this);
562
- this.promise = this.promise.bind(this);
563
- this.or = this.or.bind(this);
564
- this.and = this.and.bind(this);
565
- this.transform = this.transform.bind(this);
566
- this.brand = this.brand.bind(this);
567
- this.default = this.default.bind(this);
568
- this.catch = this.catch.bind(this);
569
- this.describe = this.describe.bind(this);
570
- this.pipe = this.pipe.bind(this);
571
- this.readonly = this.readonly.bind(this);
572
- this.isNullable = this.isNullable.bind(this);
573
- this.isOptional = this.isOptional.bind(this);
574
- }
575
551
  get description() {
576
552
  return this._def.description;
577
553
  }
@@ -635,6 +611,43 @@ var ZodType = class {
635
611
  const result = this._parseSync({ data, path: ctx.path, parent: ctx });
636
612
  return handleResult(ctx, result);
637
613
  }
614
+ "~validate"(data) {
615
+ var _a, _b;
616
+ const ctx = {
617
+ common: {
618
+ issues: [],
619
+ async: !!this["~standard"].async
620
+ },
621
+ path: [],
622
+ schemaErrorMap: this._def.errorMap,
623
+ parent: null,
624
+ data,
625
+ parsedType: getParsedType(data)
626
+ };
627
+ if (!this["~standard"].async) {
628
+ try {
629
+ const result = this._parseSync({ data, path: [], parent: ctx });
630
+ return isValid(result) ? {
631
+ value: result.value
632
+ } : {
633
+ issues: ctx.common.issues
634
+ };
635
+ } catch (err) {
636
+ 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")) {
637
+ this["~standard"].async = true;
638
+ }
639
+ ctx.common = {
640
+ issues: [],
641
+ async: true
642
+ };
643
+ }
644
+ }
645
+ return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? {
646
+ value: result.value
647
+ } : {
648
+ issues: ctx.common.issues
649
+ });
650
+ }
638
651
  async parseAsync(data, params) {
639
652
  const result = await this.safeParseAsync(data, params);
640
653
  if (result.success)
@@ -712,6 +725,39 @@ var ZodType = class {
712
725
  superRefine(refinement) {
713
726
  return this._refinement(refinement);
714
727
  }
728
+ constructor(def) {
729
+ this.spa = this.safeParseAsync;
730
+ this._def = def;
731
+ this.parse = this.parse.bind(this);
732
+ this.safeParse = this.safeParse.bind(this);
733
+ this.parseAsync = this.parseAsync.bind(this);
734
+ this.safeParseAsync = this.safeParseAsync.bind(this);
735
+ this.spa = this.spa.bind(this);
736
+ this.refine = this.refine.bind(this);
737
+ this.refinement = this.refinement.bind(this);
738
+ this.superRefine = this.superRefine.bind(this);
739
+ this.optional = this.optional.bind(this);
740
+ this.nullable = this.nullable.bind(this);
741
+ this.nullish = this.nullish.bind(this);
742
+ this.array = this.array.bind(this);
743
+ this.promise = this.promise.bind(this);
744
+ this.or = this.or.bind(this);
745
+ this.and = this.and.bind(this);
746
+ this.transform = this.transform.bind(this);
747
+ this.brand = this.brand.bind(this);
748
+ this.default = this.default.bind(this);
749
+ this.catch = this.catch.bind(this);
750
+ this.describe = this.describe.bind(this);
751
+ this.pipe = this.pipe.bind(this);
752
+ this.readonly = this.readonly.bind(this);
753
+ this.isNullable = this.isNullable.bind(this);
754
+ this.isOptional = this.isOptional.bind(this);
755
+ this["~standard"] = {
756
+ version: 1,
757
+ vendor: "zod",
758
+ validate: (data) => this["~validate"](data)
759
+ };
760
+ }
715
761
  optional() {
716
762
  return ZodOptional.create(this, this._def);
717
763
  }
@@ -722,7 +768,7 @@ var ZodType = class {
722
768
  return this.nullable().optional();
723
769
  }
724
770
  array() {
725
- return ZodArray.create(this, this._def);
771
+ return ZodArray.create(this);
726
772
  }
727
773
  promise() {
728
774
  return ZodPromise.create(this, this._def);
@@ -788,16 +834,20 @@ var ZodType = class {
788
834
  };
789
835
  var cuidRegex = /^c[^\s-]{8,}$/i;
790
836
  var cuid2Regex = /^[0-9a-z]+$/;
791
- var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
837
+ var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
792
838
  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;
793
839
  var nanoidRegex = /^[a-z0-9_-]{21}$/i;
840
+ var jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
794
841
  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)?)??$/;
795
842
  var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
796
843
  var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
797
844
  var emojiRegex;
798
845
  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])$/;
799
- 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})))$/;
846
+ 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])$/;
847
+ 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]))$/;
848
+ 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])$/;
800
849
  var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
850
+ var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
801
851
  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])))`;
802
852
  var dateRegex = new RegExp(`^${dateRegexSource}$`);
803
853
  function timeRegexSource(args) {
@@ -830,6 +880,33 @@ function isValidIP(ip, version) {
830
880
  }
831
881
  return false;
832
882
  }
883
+ function isValidJWT(jwt, alg) {
884
+ if (!jwtRegex.test(jwt))
885
+ return false;
886
+ try {
887
+ const [header] = jwt.split(".");
888
+ const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
889
+ const decoded = JSON.parse(atob(base64));
890
+ if (typeof decoded !== "object" || decoded === null)
891
+ return false;
892
+ if (!decoded.typ || !decoded.alg)
893
+ return false;
894
+ if (alg && decoded.alg !== alg)
895
+ return false;
896
+ return true;
897
+ } catch (_a) {
898
+ return false;
899
+ }
900
+ }
901
+ function isValidCidr(ip, version) {
902
+ if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) {
903
+ return true;
904
+ }
905
+ if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) {
906
+ return true;
907
+ }
908
+ return false;
909
+ }
833
910
  var ZodString = class _ZodString extends ZodType {
834
911
  _parse(input) {
835
912
  if (this._def.coerce) {
@@ -1086,6 +1163,26 @@ var ZodString = class _ZodString extends ZodType {
1086
1163
  });
1087
1164
  status.dirty();
1088
1165
  }
1166
+ } else if (check.kind === "jwt") {
1167
+ if (!isValidJWT(input.data, check.alg)) {
1168
+ ctx = this._getOrReturnCtx(input, ctx);
1169
+ addIssueToContext(ctx, {
1170
+ validation: "jwt",
1171
+ code: ZodIssueCode.invalid_string,
1172
+ message: check.message
1173
+ });
1174
+ status.dirty();
1175
+ }
1176
+ } else if (check.kind === "cidr") {
1177
+ if (!isValidCidr(input.data, check.version)) {
1178
+ ctx = this._getOrReturnCtx(input, ctx);
1179
+ addIssueToContext(ctx, {
1180
+ validation: "cidr",
1181
+ code: ZodIssueCode.invalid_string,
1182
+ message: check.message
1183
+ });
1184
+ status.dirty();
1185
+ }
1089
1186
  } else if (check.kind === "base64") {
1090
1187
  if (!base64Regex.test(input.data)) {
1091
1188
  ctx = this._getOrReturnCtx(input, ctx);
@@ -1096,6 +1193,16 @@ var ZodString = class _ZodString extends ZodType {
1096
1193
  });
1097
1194
  status.dirty();
1098
1195
  }
1196
+ } else if (check.kind === "base64url") {
1197
+ if (!base64urlRegex.test(input.data)) {
1198
+ ctx = this._getOrReturnCtx(input, ctx);
1199
+ addIssueToContext(ctx, {
1200
+ validation: "base64url",
1201
+ code: ZodIssueCode.invalid_string,
1202
+ message: check.message
1203
+ });
1204
+ status.dirty();
1205
+ }
1099
1206
  } else {
1100
1207
  util.assertNever(check);
1101
1208
  }
@@ -1142,9 +1249,21 @@ var ZodString = class _ZodString extends ZodType {
1142
1249
  base64(message) {
1143
1250
  return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
1144
1251
  }
1252
+ base64url(message) {
1253
+ return this._addCheck({
1254
+ kind: "base64url",
1255
+ ...errorUtil.errToObj(message)
1256
+ });
1257
+ }
1258
+ jwt(options) {
1259
+ return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) });
1260
+ }
1145
1261
  ip(options) {
1146
1262
  return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) });
1147
1263
  }
1264
+ cidr(options) {
1265
+ return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
1266
+ }
1148
1267
  datetime(options) {
1149
1268
  var _a, _b;
1150
1269
  if (typeof options === "string") {
@@ -1235,8 +1354,7 @@ var ZodString = class _ZodString extends ZodType {
1235
1354
  });
1236
1355
  }
1237
1356
  /**
1238
- * @deprecated Use z.string().min(1) instead.
1239
- * @see {@link ZodString.min}
1357
+ * Equivalent to `.min(1)`
1240
1358
  */
1241
1359
  nonempty(message) {
1242
1360
  return this.min(1, errorUtil.errToObj(message));
@@ -1298,9 +1416,15 @@ var ZodString = class _ZodString extends ZodType {
1298
1416
  get isIP() {
1299
1417
  return !!this._def.checks.find((ch) => ch.kind === "ip");
1300
1418
  }
1419
+ get isCIDR() {
1420
+ return !!this._def.checks.find((ch) => ch.kind === "cidr");
1421
+ }
1301
1422
  get isBase64() {
1302
1423
  return !!this._def.checks.find((ch) => ch.kind === "base64");
1303
1424
  }
1425
+ get isBase64url() {
1426
+ return !!this._def.checks.find((ch) => ch.kind === "base64url");
1427
+ }
1304
1428
  get minLength() {
1305
1429
  let min = null;
1306
1430
  for (const ch of this._def.checks) {
@@ -1578,17 +1702,15 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
1578
1702
  }
1579
1703
  _parse(input) {
1580
1704
  if (this._def.coerce) {
1581
- input.data = BigInt(input.data);
1705
+ try {
1706
+ input.data = BigInt(input.data);
1707
+ } catch (_a) {
1708
+ return this._getInvalidInput(input);
1709
+ }
1582
1710
  }
1583
1711
  const parsedType = this._getType(input);
1584
1712
  if (parsedType !== ZodParsedType.bigint) {
1585
- const ctx2 = this._getOrReturnCtx(input);
1586
- addIssueToContext(ctx2, {
1587
- code: ZodIssueCode.invalid_type,
1588
- expected: ZodParsedType.bigint,
1589
- received: ctx2.parsedType
1590
- });
1591
- return INVALID;
1713
+ return this._getInvalidInput(input);
1592
1714
  }
1593
1715
  let ctx = void 0;
1594
1716
  const status = new ParseStatus();
@@ -1635,6 +1757,15 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
1635
1757
  }
1636
1758
  return { status: status.value, value: input.data };
1637
1759
  }
1760
+ _getInvalidInput(input) {
1761
+ const ctx = this._getOrReturnCtx(input);
1762
+ addIssueToContext(ctx, {
1763
+ code: ZodIssueCode.invalid_type,
1764
+ expected: ZodParsedType.bigint,
1765
+ received: ctx.parsedType
1766
+ });
1767
+ return INVALID;
1768
+ }
1638
1769
  gte(value, message) {
1639
1770
  return this.setLimit("min", value, true, errorUtil.toString(message));
1640
1771
  }
@@ -4002,18 +4133,39 @@ var ColorConfigMapSchema = z.union([
4002
4133
  z.object({ "base": ColorConfigSchema }),
4003
4134
  z.record(z.string(), ColorConfigSchema)
4004
4135
  ]);
4136
+ var WorkspaceBotConfigSchema = z.object({
4137
+ name: z.string().trim().default("Stormie-Bot").describe(
4138
+ "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
4139
+ ),
4140
+ email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
4141
+ }).describe(
4142
+ "The workspace's bot user's config used to automated various operations tasks"
4143
+ );
4144
+ var WorkspaceDirectoryConfigSchema = z.object({
4145
+ cache: z.string().trim().optional().describe(
4146
+ "The directory used to store the environment's cached file data"
4147
+ ),
4148
+ data: z.string().trim().optional().describe("The directory used to store the environment's data files"),
4149
+ config: z.string().trim().optional().describe(
4150
+ "The directory used to store the environment's configuration files"
4151
+ ),
4152
+ temp: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
4153
+ log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
4154
+ build: z.string().trim().default("dist").describe(
4155
+ "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
4156
+ )
4157
+ }).describe(
4158
+ "Various directories used by the workspace to store data, cache, and configuration files"
4159
+ );
4005
4160
  var StormConfigSchema = z.object({
4006
4161
  $schema: z.string().trim().default(
4007
4162
  "https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json"
4008
- ).describe(
4163
+ ).optional().nullish().describe(
4009
4164
  "The URL to the JSON schema file that describes the Storm configuration file"
4010
4165
  ),
4011
4166
  extends: z.string().trim().optional().describe(
4012
4167
  "The path to a base JSON file to use as a configuration preset file"
4013
4168
  ),
4014
- isRoot: z.boolean().optional().describe(
4015
- "A flag indicating if the current configuration is the set in the root of the workspace"
4016
- ),
4017
4169
  name: z.string().trim().toLowerCase().optional().describe(
4018
4170
  "The name of the service/package/scope using this configuration"
4019
4171
  ),
@@ -4027,30 +4179,14 @@ var StormConfigSchema = z.object({
4027
4179
  branch: z.string().trim().default("main").describe("The branch of the workspace"),
4028
4180
  preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
4029
4181
  owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
4030
- worker: z.string().trim().default("Stormie-Bot").describe(
4031
- "The worker of the package (this is the bot that will be used to perform various tasks)"
4032
- ),
4033
- envName: z.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment name for the package"),
4182
+ bot: WorkspaceBotConfigSchema,
4183
+ env: z.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment name for the package"),
4034
4184
  workspaceRoot: z.string().trim().default("").describe("The root directory of the workspace"),
4035
- packageDirectory: z.string().trim().optional().describe("The root directory of the package"),
4036
4185
  externalPackagePatterns: z.array(z.string()).default([]).describe(
4037
4186
  "The build will use these package patterns to determine if they should be external to the bundle"
4038
4187
  ),
4039
4188
  skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
4040
- cacheDirectory: z.string().trim().optional().describe(
4041
- "The directory used to store the environment's cached file data"
4042
- ),
4043
- dataDirectory: z.string().trim().optional().describe("The directory used to store the environment's data files"),
4044
- configDirectory: z.string().trim().optional().describe(
4045
- "The directory used to store the environment's configuration files"
4046
- ),
4047
- tempDirectory: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
4048
- logDirectory: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
4049
- buildDirectory: z.string().trim().default("dist").describe("The build directory for the workspace"),
4050
- outputDirectory: z.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
4051
- runtimeVersion: z.string().trim().regex(
4052
- /^(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-]+)*))?$/
4053
- ).default("1.0.0").describe("The global version of the Storm runtime"),
4189
+ directories: WorkspaceDirectoryConfigSchema,
4054
4190
  packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
4055
4191
  "The JavaScript/TypeScript package manager used by the repository"
4056
4192
  ),
@@ -4068,7 +4204,6 @@ var StormConfigSchema = z.object({
4068
4204
  ]).default("info").describe(
4069
4205
  "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`)."
4070
4206
  ),
4071
- 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"),
4072
4207
  registry: RegistryConfigSchema,
4073
4208
  configFile: z.string().trim().nullable().default(null).describe(
4074
4209
  "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
@@ -4110,8 +4245,11 @@ export {
4110
4245
  RegistryUrlConfigSchema,
4111
4246
  STORM_DEFAULT_DOCS,
4112
4247
  STORM_DEFAULT_HOMEPAGE,
4248
+ STORM_DEFAULT_LICENSE,
4113
4249
  STORM_DEFAULT_LICENSING,
4114
4250
  SingleThemeColorConfigSchema,
4115
4251
  StormConfigSchema,
4252
+ WorkspaceBotConfigSchema,
4253
+ WorkspaceDirectoryConfigSchema,
4116
4254
  defineConfig
4117
4255
  };
package/meta.cjs.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "inputs": {
3
3
  "packages/config/src/constants.ts": {
4
- "bytes": 211,
4
+ "bytes": 262,
5
5
  "imports": [],
6
6
  "format": "esm"
7
7
  },
@@ -10,16 +10,16 @@
10
10
  "imports": [],
11
11
  "format": "esm"
12
12
  },
13
- "node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs": {
14
- "bytes": 149466,
13
+ "node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/index.mjs": {
14
+ "bytes": 156114,
15
15
  "imports": [],
16
16
  "format": "esm"
17
17
  },
18
18
  "packages/config/src/schema.ts": {
19
- "bytes": 11868,
19
+ "bytes": 11475,
20
20
  "imports": [
21
21
  {
22
- "path": "node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs",
22
+ "path": "node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/index.mjs",
23
23
  "kind": "import-statement",
24
24
  "original": "zod"
25
25
  },
@@ -70,25 +70,25 @@
70
70
  "entryPoint": "packages/config/src/index.ts",
71
71
  "inputs": {
72
72
  "packages/config/src/index.ts": {
73
- "bytesInOutput": 841
73
+ "bytesInOutput": 1033
74
74
  },
75
75
  "packages/config/src/constants.ts": {
76
- "bytesInOutput": 184
76
+ "bytesInOutput": 226
77
77
  },
78
78
  "packages/config/src/define-config.ts": {
79
79
  "bytesInOutput": 37
80
80
  },
81
- "node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs": {
82
- "bytesInOutput": 116969
81
+ "node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/index.mjs": {
82
+ "bytesInOutput": 121995
83
83
  },
84
84
  "packages/config/src/schema.ts": {
85
- "bytesInOutput": 9829
85
+ "bytesInOutput": 9523
86
86
  },
87
87
  "packages/config/src/types.ts": {
88
88
  "bytesInOutput": 197
89
89
  }
90
90
  },
91
- "bytes": 129085
91
+ "bytes": 134039
92
92
  }
93
93
  }
94
94
  }
package/meta.esm.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "inputs": {
3
3
  "packages/config/src/constants.ts": {
4
- "bytes": 211,
4
+ "bytes": 262,
5
5
  "imports": [],
6
6
  "format": "esm"
7
7
  },
@@ -10,16 +10,16 @@
10
10
  "imports": [],
11
11
  "format": "esm"
12
12
  },
13
- "node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs": {
14
- "bytes": 149466,
13
+ "node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/index.mjs": {
14
+ "bytes": 156114,
15
15
  "imports": [],
16
16
  "format": "esm"
17
17
  },
18
18
  "packages/config/src/schema.ts": {
19
- "bytes": 11868,
19
+ "bytes": 11475,
20
20
  "imports": [
21
21
  {
22
- "path": "node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs",
22
+ "path": "node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/index.mjs",
23
23
  "kind": "import-statement",
24
24
  "original": "zod"
25
25
  },
@@ -77,15 +77,18 @@
77
77
  "RegistryUrlConfigSchema",
78
78
  "STORM_DEFAULT_DOCS",
79
79
  "STORM_DEFAULT_HOMEPAGE",
80
+ "STORM_DEFAULT_LICENSE",
80
81
  "STORM_DEFAULT_LICENSING",
81
82
  "SingleThemeColorConfigSchema",
82
83
  "StormConfigSchema",
84
+ "WorkspaceBotConfigSchema",
85
+ "WorkspaceDirectoryConfigSchema",
83
86
  "defineConfig"
84
87
  ],
85
88
  "entryPoint": "packages/config/src/index.ts",
86
89
  "inputs": {
87
90
  "packages/config/src/constants.ts": {
88
- "bytesInOutput": 184
91
+ "bytesInOutput": 226
89
92
  },
90
93
  "packages/config/src/index.ts": {
91
94
  "bytesInOutput": 0
@@ -93,17 +96,17 @@
93
96
  "packages/config/src/define-config.ts": {
94
97
  "bytesInOutput": 37
95
98
  },
96
- "node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs": {
97
- "bytesInOutput": 116969
99
+ "node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/index.mjs": {
100
+ "bytesInOutput": 121995
98
101
  },
99
102
  "packages/config/src/schema.ts": {
100
- "bytesInOutput": 9829
103
+ "bytesInOutput": 9523
101
104
  },
102
105
  "packages/config/src/types.ts": {
103
106
  "bytesInOutput": 197
104
107
  }
105
108
  },
106
- "bytes": 127782
109
+ "bytes": 132631
107
110
  }
108
111
  }
109
112
  }
package/package.json CHANGED
@@ -1,30 +1 @@
1
- {
2
- "name": "@storm-software/config",
3
- "version": "1.80.0",
4
- "description": "Configuration management tools and schemas for Storm Software projects, providing a standardized approach to handle project settings and presets.",
5
- "repository": {
6
- "type": "github",
7
- "url": "https://github.com/storm-software/storm-ops",
8
- "directory": "packages/config"
9
- },
10
- "private": false,
11
- "main": "./index.cjs",
12
- "module": "./index.js",
13
- "exports": {
14
- "./package.json": "./package.json",
15
- "./schemas/storm.schema.json": "./schemas/storm.schema.json",
16
- "./presets/base.json": "./presets/base.json",
17
- ".": {
18
- "types": "./declarations.d.ts",
19
- "import": "./index.js",
20
- "require": "./index.cjs"
21
- }
22
- },
23
- "types": "./declarations.d.ts",
24
- "dependencies": {
25
- "zod": "3.23.8"
26
- },
27
- "publishConfig": {
28
- "access": "public"
29
- }
30
- }
1
+ {"name":"@storm-software/config","version":"1.91.1","description":"Configuration management tools and schemas for Storm Software projects, providing a standardized approach to handle project settings and presets.","repository":{"type":"github","url":"https://github.com/storm-software/storm-ops","directory":"packages/config"},"private":false,"main":"./index.cjs","module":"./index.js","exports":{"./package.json":"./package.json","./schemas/storm.schema.json":"./schemas/storm.schema.json","./presets/base.json":"./presets/base.json",".":{"types":"./declarations.d.ts","import":"./index.js","require":"./index.cjs"}},"types":"./declarations.d.ts","dependencies":{"zod":"^3.24.0"},"devDependencies":{"@types/node":"^22.10.2"},"publishConfig":{"access":"public"}}
package/presets/base.json CHANGED
@@ -1,12 +1,16 @@
1
1
  {
2
+ "$schema": "https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json",
2
3
  "organization": "storm-software",
3
4
  "owner": "@storm-software/admin",
5
+ "bot": { "name": "Stormie-Bot", "email": "bot@stormsoftware.com" },
6
+ "env": "production",
4
7
  "timezone": "America/New_York",
5
8
  "locale": "en-US",
6
9
  "logLevel": "info",
7
10
  "skipCache": false,
8
- "buildDirectory": "dist",
9
- "outputDirectory": "node_modules/.storm",
11
+ "directories": {
12
+ "build": "dist"
13
+ },
10
14
  "externalPackagePatterns": ["@storm-software/"],
11
15
  "registry": {
12
16
  "github": "https://npm.pkg.github.com",
@@ -42,13 +46,5 @@
42
46
  "positive": "#22c55e",
43
47
  "negative": "#dc2626"
44
48
  }
45
- },
46
- "extensions": {
47
- "telemetry": {
48
- "fileName": "storm",
49
- "fileExtension": "log",
50
- "path": "tmp/storm/logs",
51
- "stacktrace": true
52
- }
53
49
  }
54
50
  }