@minnovate/shadow-publisher 0.11.7 → 0.11.9

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "git-publisher",
3
3
  "displayName": "Git Publisher",
4
- "version": "0.11.7",
4
+ "version": "0.11.9",
5
5
  "description": "Publish an app folder's Git history to the serverless Git publishing backend and keep it updated (\"publish my app\", \"update my app\", \"fetch the engineered version\").",
6
6
  "author": { "name": "git-publisher project" },
7
7
  "keywords": ["git", "publish", "deploy", "serverless"]
@@ -211,7 +211,7 @@ var PublisherError = class _PublisherError extends Error {
211
211
  }
212
212
  };
213
213
 
214
- // ../../../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/util.js
214
+ // ../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
215
215
  function getEnumValues(entries) {
216
216
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
217
217
  const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
@@ -225,18 +225,22 @@ function jsonStringifyReplacer(_, value) {
225
225
  return value.toString();
226
226
  return value;
227
227
  }
228
- function cached(getter) {
229
- const set = false;
230
- return {
231
- get value() {
232
- if (!set) {
233
- const value = getter();
234
- Object.defineProperty(this, "value", { value });
235
- return value;
236
- }
237
- throw new Error("cached value already set");
228
+ var Cached = class {
229
+ constructor(getter) {
230
+ this._getter = getter;
231
+ this._value = void 0;
232
+ }
233
+ get value() {
234
+ const getter = this._getter;
235
+ if (getter !== void 0) {
236
+ this._value = getter();
237
+ this._getter = void 0;
238
238
  }
239
- };
239
+ return this._value;
240
+ }
241
+ };
242
+ function cached(getter) {
243
+ return new Cached(getter);
240
244
  }
241
245
  function nullish(input) {
242
246
  return input === null || input === void 0;
@@ -254,6 +258,56 @@ function assignProp(target, prop, value) {
254
258
  configurable: true
255
259
  });
256
260
  }
261
+ function rawShape(def) {
262
+ const desc = Object.getOwnPropertyDescriptor(def, "shape");
263
+ return desc?.get ? desc.get.raw : desc?.value;
264
+ }
265
+ function sourceShape(schema) {
266
+ return rawShape(schema._zod.def) ?? schema._zod.def.shape;
267
+ }
268
+ function deferProp(target, key, getter) {
269
+ Object.defineProperty(target, key, {
270
+ get() {
271
+ const value = getter();
272
+ assignProp(this, key, value);
273
+ return value;
274
+ },
275
+ enumerable: true,
276
+ configurable: true
277
+ });
278
+ }
279
+ function putProp(target, key, value) {
280
+ if (key in target)
281
+ assignProp(target, key, value);
282
+ else
283
+ target[key] = value;
284
+ }
285
+ function mirrorShape(target, source, keys, wrap) {
286
+ const raw = sourceShape(source);
287
+ for (const key of keys) {
288
+ const desc = Object.getOwnPropertyDescriptor(raw, key);
289
+ if (!desc.enumerable)
290
+ continue;
291
+ if (desc.get) {
292
+ deferProp(target, key, () => {
293
+ const value = source._zod.def.shape[key];
294
+ return wrap ? wrap(value, key) : value;
295
+ });
296
+ } else
297
+ putProp(target, key, wrap ? wrap(desc.value, key) : desc.value);
298
+ }
299
+ }
300
+ function mirrorProps(target, source) {
301
+ for (const key of Reflect.ownKeys(source)) {
302
+ const desc = Object.getOwnPropertyDescriptor(source, key);
303
+ if (!desc.enumerable)
304
+ continue;
305
+ if (desc.get)
306
+ deferProp(target, key, () => source[key]);
307
+ else
308
+ putProp(target, key, desc.value);
309
+ }
310
+ }
257
311
  function mergeDefs(...defs) {
258
312
  const mergedDescriptors = {};
259
313
  for (const def of defs) {
@@ -346,21 +400,20 @@ function extend(schema, shape) {
346
400
  const checks = schema._zod.def.checks;
347
401
  const hasChecks = checks && checks.length > 0;
348
402
  if (hasChecks) {
349
- const existingShape = schema._zod.def.shape;
403
+ const existingShape = sourceShape(schema);
350
404
  for (const key of Reflect.ownKeys(shape)) {
351
405
  if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) {
352
406
  throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
353
407
  }
354
408
  }
355
409
  }
356
- const def = mergeDefs(schema._zod.def, {
357
- get shape() {
358
- const _shape = { ...schema._zod.def.shape, ...shape };
359
- assignProp(this, "shape", _shape);
360
- return _shape;
361
- }
362
- });
363
- return clone(schema, def);
410
+ return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));
411
+ }
412
+ function extended(schema, shape) {
413
+ const newShape = {};
414
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)));
415
+ mirrorProps(newShape, shape);
416
+ return newShape;
364
417
  }
365
418
  function aborted(x, startIndex = 0) {
366
419
  if (x.aborted === true)
@@ -410,13 +463,18 @@ function finalizeIssue(iss, ctx, config2) {
410
463
  }
411
464
  const schemaError = iss.schema !== iss.inst ? iss.schema?._zod.def?.error : void 0;
412
465
  const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(schemaError?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
413
- const { inst: _inst, schema: _schema, continue: _continue, input: _input, ...rest } = iss;
414
- rest.path ?? (rest.path = []);
415
- rest.message = message;
466
+ const full = {};
467
+ for (const k of Object.keys(iss)) {
468
+ if (k === "inst" || k === "schema" || k === "continue" || k === "input" || k === "__proto__")
469
+ continue;
470
+ full[k] = iss[k];
471
+ }
472
+ full.path ?? (full.path = []);
473
+ full.message = message;
416
474
  if (ctx?.reportInput) {
417
- rest.input = _input;
475
+ full.input = iss.input;
418
476
  }
419
- return rest;
477
+ return full;
420
478
  }
421
479
  var highSurrogate = /[\uD800-\uDBFF]/;
422
480
  function codePointLength(str3) {
@@ -563,7 +621,7 @@ function installLazyProp(inst, key, make, enumerable) {
563
621
  });
564
622
  }
565
623
 
566
- // ../../../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/core.js
624
+ // ../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/core.js
567
625
  var _a;
568
626
  var _zodDesc = { value: void 0, enumerable: false };
569
627
  var _E = "captureStackTrace" in Error ? Error : null;
@@ -606,8 +664,7 @@ function $constructor(name, initializer2, proto, params) {
606
664
  } finally {
607
665
  _zodDesc.value = void 0;
608
666
  }
609
- }
610
- if (inst._zod.traits.has(name)) {
667
+ } else if (inst._zod.traits.has(name)) {
611
668
  return;
612
669
  }
613
670
  inst._zod.traits.add(name);
@@ -676,7 +733,7 @@ function config(newConfig) {
676
733
  return globalConfig;
677
734
  }
678
735
 
679
- // ../../../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/errors.js
736
+ // ../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/errors.js
680
737
  function _getMessage() {
681
738
  const internals = this._zod;
682
739
  internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
@@ -691,16 +748,12 @@ var _messageDesc = {
691
748
  enumerable: true,
692
749
  configurable: true
693
750
  };
694
- var _zodDesc2 = { value: void 0, enumerable: false };
695
751
  var _issuesDesc = { value: void 0, enumerable: false };
696
752
  var _installedToString = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
697
753
  var initializer = (inst, def) => {
698
754
  inst.name = "$ZodError";
699
- _zodDesc2.value = inst._zod;
700
- Object.defineProperty(inst, "_zod", _zodDesc2);
701
755
  _issuesDesc.value = def;
702
756
  Object.defineProperty(inst, "issues", _issuesDesc);
703
- _zodDesc2.value = void 0;
704
757
  _issuesDesc.value = void 0;
705
758
  Object.defineProperty(inst, "message", _messageDesc);
706
759
  const proto = Object.getPrototypeOf(inst);
@@ -725,7 +778,7 @@ var $ZodRealError = $constructor("$ZodError", initializer, void 0, {
725
778
  Parent: Error
726
779
  });
727
780
 
728
- // ../../../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/parse.js
781
+ // ../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/parse.js
729
782
  var _parse = (_Err) => {
730
783
  const fn = (schema, value, _ctx, _params) => {
731
784
  const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
@@ -765,25 +818,38 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
765
818
  if (result instanceof Promise) {
766
819
  throw new $ZodAsyncError();
767
820
  }
768
- return result.issues.length ? {
769
- success: false,
770
- error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
771
- } : { success: true, data: result.value };
821
+ return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };
772
822
  };
773
823
  var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
824
+ function failure(Err, issues, ctx) {
825
+ let error2;
826
+ return {
827
+ success: false,
828
+ get error() {
829
+ if (!error2) {
830
+ error2 = new Err(issues.map((iss) => finalizeIssue(iss, ctx, config())));
831
+ issues = void 0;
832
+ ctx = void 0;
833
+ }
834
+ return error2;
835
+ },
836
+ set error(e) {
837
+ error2 = e;
838
+ issues = void 0;
839
+ ctx = void 0;
840
+ }
841
+ };
842
+ }
774
843
  var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
775
844
  const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
776
845
  let result = schema._zod.run({ value, issues: [] }, ctx);
777
846
  if (result instanceof Promise)
778
847
  result = await result;
779
- return result.issues.length ? {
780
- success: false,
781
- error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
782
- } : { success: true, data: result.value };
848
+ return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };
783
849
  };
784
850
  var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
785
851
 
786
- // ../../../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/regexes.js
852
+ // ../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js
787
853
  var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
788
854
  var httpProtocol = /^https?$/;
789
855
  var dateSource = `(?:(?:\\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])))`;
@@ -807,15 +873,11 @@ function datetime(args) {
807
873
  const timeRegex = args.local ? `${qualified}|${timeSource({ precision: args.precision })}` : qualified;
808
874
  return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
809
875
  }
810
- var string = (params) => {
811
- const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
812
- return new RegExp(`^${regex}$`);
813
- };
814
- var integer = /^-?\d+$/;
876
+ var anyString = /^[\s\S]{0,}$/;
815
877
  var number = /^-?\d+(?:\.\d+)?$/;
816
878
  var boolean = /^(?:true|false)$/i;
817
879
 
818
- // ../../../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/checks.js
880
+ // ../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/checks.js
819
881
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
820
882
  var _a2;
821
883
  inst._zod ?? (inst._zod = {});
@@ -834,16 +896,6 @@ var numericOriginMap = {
834
896
  var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => {
835
897
  $ZodCheck.init(inst, def);
836
898
  const origin = numericOriginMap[typeof def.value];
837
- inst._zod.onattach.push((inst2) => {
838
- const bag = inst2._zod.bag;
839
- const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
840
- if (def.value > curr) {
841
- if (def.inclusive)
842
- bag.minimum = def.value;
843
- else
844
- bag.exclusiveMinimum = def.value;
845
- }
846
- });
847
899
  inst._zod.check = (payload) => {
848
900
  if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {
849
901
  return;
@@ -865,14 +917,6 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
865
917
  const isInt = def.format?.includes("int");
866
918
  const origin = isInt ? "int" : "number";
867
919
  const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
868
- inst._zod.onattach.push((inst2) => {
869
- const bag = inst2._zod.bag;
870
- bag.format = def.format;
871
- bag.minimum = minimum;
872
- bag.maximum = maximum;
873
- if (isInt)
874
- bag.pattern = integer;
875
- });
876
920
  inst._zod.check = (payload) => {
877
921
  const input = payload.value;
878
922
  if (isInt) {
@@ -942,11 +986,6 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
942
986
  var _a2;
943
987
  $ZodCheck.init(inst, def);
944
988
  (_a2 = inst._zod.def).when ?? (_a2.when = _whenHasLength);
945
- inst._zod.onattach.push((inst2) => {
946
- const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
947
- if (def.maximum < curr)
948
- inst2._zod.bag.maximum = def.maximum;
949
- });
950
989
  inst._zod.check = (payload) => {
951
990
  const input = payload.value;
952
991
  const units = input.length;
@@ -969,11 +1008,6 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
969
1008
  var _a2;
970
1009
  $ZodCheck.init(inst, def);
971
1010
  (_a2 = inst._zod.def).when ?? (_a2.when = _whenHasLength);
972
- inst._zod.onattach.push((inst2) => {
973
- const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
974
- if (def.minimum > curr)
975
- inst2._zod.bag.minimum = def.minimum;
976
- });
977
1011
  inst._zod.check = (payload) => {
978
1012
  const input = payload.value;
979
1013
  const units = input.length;
@@ -995,14 +1029,6 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
995
1029
  var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
996
1030
  var _a2, _b;
997
1031
  $ZodCheck.init(inst, def);
998
- inst._zod.onattach.push((inst2) => {
999
- const bag = inst2._zod.bag;
1000
- bag.format = def.format;
1001
- if (def.pattern) {
1002
- bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
1003
- bag.patterns.add(def.pattern);
1004
- }
1005
- });
1006
1032
  if (def.pattern)
1007
1033
  (_a2 = inst._zod).check ?? (_a2.check = (payload) => {
1008
1034
  def.pattern.lastIndex = 0;
@@ -1040,14 +1066,14 @@ var $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def)
1040
1066
  };
1041
1067
  });
1042
1068
 
1043
- // ../../../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/versions.js
1069
+ // ../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/versions.js
1044
1070
  var version = {
1045
1071
  major: 4,
1046
- minor: 5,
1047
- patch: 4
1072
+ minor: 6,
1073
+ patch: 5
1048
1074
  };
1049
1075
 
1050
- // ../../../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/schemas.js
1076
+ // ../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/schemas.js
1051
1077
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1052
1078
  var _a2;
1053
1079
  inst ?? (inst = {});
@@ -1157,15 +1183,22 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1157
1183
  own(this, "~standard", value);
1158
1184
  }
1159
1185
  });
1160
- var toStandardResult = (r) => r.success ? { value: r.data } : { issues: r.error?.issues };
1186
+ var toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value };
1187
+ async function validateAsync(inst, value) {
1188
+ const ctx = { async: true };
1189
+ return toStandardResult(await inst._zod.run({ value, issues: [] }, ctx), ctx);
1190
+ }
1161
1191
  function standardProps(inst) {
1162
1192
  return {
1163
1193
  validate: (value) => {
1194
+ const ctx = { async: false };
1164
1195
  try {
1165
- return toStandardResult(safeParse(inst, value));
1196
+ const r = inst._zod.run({ value, issues: [] }, ctx);
1197
+ if (!(r instanceof Promise))
1198
+ return toStandardResult(r, ctx);
1166
1199
  } catch (_) {
1167
- return safeParseAsync(inst, value).then(toStandardResult);
1168
1200
  }
1201
+ return validateAsync(inst, value);
1169
1202
  },
1170
1203
  vendor: "zod",
1171
1204
  version: 1
@@ -1173,7 +1206,7 @@ function standardProps(inst) {
1173
1206
  }
1174
1207
  var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
1175
1208
  $ZodType.init(inst, def);
1176
- inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag);
1209
+ inst._zod.pattern = def.pattern ?? anyString;
1177
1210
  inst._zod.parse = (payload, _) => {
1178
1211
  if (def.coerce)
1179
1212
  try {
@@ -1197,11 +1230,32 @@ var $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, d
1197
1230
  });
1198
1231
  var URL_BAD_FORMAT = 1;
1199
1232
  var URL_UNPARSEABLE = 2;
1233
+ function canParseURL(input) {
1234
+ try {
1235
+ if (typeof URL !== "undefined" && typeof URL.canParse === "function")
1236
+ return URL.canParse(input);
1237
+ new URL(input);
1238
+ return true;
1239
+ } catch {
1240
+ return false;
1241
+ }
1242
+ }
1243
+ function validateURL(trimmed, def) {
1244
+ if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) {
1245
+ return canParseURL(trimmed) || URL_UNPARSEABLE;
1246
+ }
1247
+ return parseURLObject(trimmed, def);
1248
+ }
1200
1249
  function parseURLObject(trimmed, def) {
1201
1250
  if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) {
1202
1251
  return URL_BAD_FORMAT;
1203
1252
  }
1204
1253
  try {
1254
+ if (typeof URL !== "undefined") {
1255
+ const URLStatic = URL;
1256
+ if (typeof URLStatic.parse === "function")
1257
+ return URLStatic.parse(trimmed) ?? URL_UNPARSEABLE;
1258
+ }
1205
1259
  return new URL(trimmed);
1206
1260
  } catch {
1207
1261
  return URL_UNPARSEABLE;
@@ -1224,7 +1278,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1224
1278
  inst._zod.check = (payload) => {
1225
1279
  try {
1226
1280
  const trimmed = payload.value.trim();
1227
- const url2 = parseURLObject(trimmed, def);
1281
+ const url2 = validateURL(trimmed, def);
1228
1282
  if (url2 === URL_BAD_FORMAT) {
1229
1283
  payload.issues.push({
1230
1284
  code: "invalid_format",
@@ -1246,6 +1300,10 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1246
1300
  });
1247
1301
  return;
1248
1302
  }
1303
+ if (url2 === true) {
1304
+ payload.value = stripTabAndNewline(trimmed);
1305
+ return;
1306
+ }
1249
1307
  if (def.hostname && !urlHostnameOk(url2, def.hostname)) {
1250
1308
  payload.issues.push({
1251
1309
  code: "invalid_format",
@@ -1284,12 +1342,6 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1284
1342
  var $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
1285
1343
  def.pattern ?? (def.pattern = datetime(def));
1286
1344
  $ZodStringFormat.init(inst, def);
1287
- if (def.local || def.precision === -1) {
1288
- inst._zod.bag.laxFormat = true;
1289
- inst._zod.onattach.push((s) => {
1290
- s._zod.bag.laxFormat = true;
1291
- });
1292
- }
1293
1345
  });
1294
1346
  var $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
1295
1347
  def.pattern ?? (def.pattern = date);
@@ -1305,7 +1357,7 @@ var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def
1305
1357
  });
1306
1358
  var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
1307
1359
  $ZodType.init(inst, def);
1308
- inst._zod.pattern = inst._zod.bag.pattern ?? number;
1360
+ inst._zod.pattern = number;
1309
1361
  inst._zod.parse = (payload, _ctx) => {
1310
1362
  if (def.coerce)
1311
1363
  try {
@@ -1379,6 +1431,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
1379
1431
  }
1380
1432
  payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);
1381
1433
  const proms = [];
1434
+ const abortEarly = ctx?.abortEarly;
1382
1435
  for (let i = 0; i < input.length; i++) {
1383
1436
  const item = input[i];
1384
1437
  const result = def.element._zod.run({
@@ -1389,6 +1442,8 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
1389
1442
  proms.push(result.then((result2) => handleArrayResult(result2, payload, i)));
1390
1443
  } else {
1391
1444
  handleArrayResult(result, payload, i);
1445
+ if (abortEarly && result.issues.length !== 0 && aborted(result))
1446
+ break;
1392
1447
  }
1393
1448
  }
1394
1449
  if (proms.length) {
@@ -1421,7 +1476,7 @@ function handlePropertyResult(result, final, key, input, optin, optout) {
1421
1476
  return;
1422
1477
  }
1423
1478
  if (result.value === void 0) {
1424
- if (isPresent) {
1479
+ if (isPresent || optin === "defaulted" && !isOptionalOut) {
1425
1480
  final.value[key] = void 0;
1426
1481
  }
1427
1482
  } else {
@@ -1450,14 +1505,20 @@ function normalizeDef(def) {
1450
1505
  optionalKeys: new Set(okeys)
1451
1506
  };
1452
1507
  }
1453
- function handleCatchall(proms, input, payload, ctx, def, inst) {
1508
+ function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
1454
1509
  const unrecognized = [];
1455
1510
  const keySet = def.keySet;
1456
1511
  const _catchall = def.catchall._zod;
1457
1512
  const t = _catchall.def.type;
1458
1513
  const optin = _catchall.optin;
1459
1514
  const optout = _catchall.optout;
1515
+ let seen = 0;
1460
1516
  for (const key in input) {
1517
+ if (abortEarly && payload.issues.length !== seen) {
1518
+ if (aborted(payload, seen))
1519
+ break;
1520
+ seen = payload.issues.length;
1521
+ }
1461
1522
  if (keySet.has(key))
1462
1523
  continue;
1463
1524
  if (key === "__proto__") {
@@ -1492,23 +1553,19 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
1492
1553
  return payload;
1493
1554
  });
1494
1555
  }
1495
- var propShapes = /* @__PURE__ */ new WeakMap();
1496
1556
  var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
1497
1557
  $ZodType.init(inst, def);
1498
1558
  const desc = Object.getOwnPropertyDescriptor(def, "shape");
1499
- if (!desc?.get) {
1500
- const sh = def.shape;
1501
- propShapes.set(def, sh);
1502
- Object.defineProperty(def, "shape", {
1503
- get: () => {
1504
- const newSh = { ...sh };
1505
- Object.defineProperty(def, "shape", {
1506
- value: newSh
1507
- });
1508
- propShapes.set(def, newSh);
1509
- return newSh;
1510
- }
1511
- });
1559
+ const sh = desc?.get ? desc.get.raw : def.shape ?? {};
1560
+ if (sh) {
1561
+ const get = () => {
1562
+ const newSh = { ...sh };
1563
+ Object.defineProperty(def, "shape", { value: newSh });
1564
+ get.raw = newSh;
1565
+ return newSh;
1566
+ };
1567
+ get.raw = sh;
1568
+ Object.defineProperty(def, "shape", { get });
1512
1569
  }
1513
1570
  const _normalized = cached(() => normalizeDef(def));
1514
1571
  defineLazyInternal(inst, "propValues", (zod) => {
@@ -1548,7 +1605,14 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
1548
1605
  payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
1549
1606
  const proms = [];
1550
1607
  const shape = value.shape;
1608
+ const abortEarly = ctx?.abortEarly;
1609
+ let seen = payload.issues.length;
1551
1610
  for (const key of value.allKeys) {
1611
+ if (abortEarly && payload.issues.length !== seen) {
1612
+ if (aborted(payload, seen))
1613
+ break;
1614
+ seen = payload.issues.length;
1615
+ }
1552
1616
  if (key === "__proto__")
1553
1617
  continue;
1554
1618
  const el = shape[key];
@@ -1564,7 +1628,7 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
1564
1628
  if (!catchall) {
1565
1629
  return proms.length ? Promise.all(proms).then(() => payload) : payload;
1566
1630
  }
1567
- return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
1631
+ return handleCatchall(proms, input, payload, ctx, _normalized.value, inst, abortEarly === true);
1568
1632
  };
1569
1633
  });
1570
1634
  function handleUnionResults(results, final, inst, ctx) {
@@ -1632,16 +1696,37 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
1632
1696
  });
1633
1697
  };
1634
1698
  });
1699
+ function discriminatorMap(def) {
1700
+ const map = /* @__PURE__ */ new Map();
1701
+ for (const option of def.options) {
1702
+ const values = option._zod.propValues?.[def.discriminator];
1703
+ if (!values || values.size === 0)
1704
+ throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
1705
+ for (const value of values) {
1706
+ if (map.has(value)) {
1707
+ if (value !== void 0)
1708
+ throw new Error(`Duplicate discriminator value "${String(value)}"`);
1709
+ map.set(value, null);
1710
+ } else {
1711
+ map.set(value, option);
1712
+ }
1713
+ }
1714
+ }
1715
+ return map;
1716
+ }
1635
1717
  var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
1636
1718
  def.inclusive = false;
1637
1719
  $ZodUnion.init(inst, def);
1638
1720
  const _super = inst._zod.parse;
1639
1721
  defineLazyInternal(inst, "propValues", (zod) => {
1640
1722
  const propValues = {};
1723
+ let undefinedCount = 0;
1641
1724
  for (const option of zod.def.options) {
1642
1725
  const pv = option._zod.propValues;
1643
1726
  if (!pv || Object.keys(pv).length === 0)
1644
1727
  throw new Error(`Invalid discriminated union option at index "${zod.def.options.indexOf(option)}"`);
1728
+ if (pv[zod.def.discriminator]?.has(void 0))
1729
+ undefinedCount++;
1645
1730
  for (const [k, v] of Object.entries(pv)) {
1646
1731
  if (!Object.prototype.hasOwnProperty.call(propValues, k)) {
1647
1732
  assignProp(propValues, k, /* @__PURE__ */ new Set());
@@ -1651,30 +1736,17 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
1651
1736
  }
1652
1737
  }
1653
1738
  }
1739
+ if (!zod.def.unionFallback && undefinedCount > 1)
1740
+ propValues[zod.def.discriminator]?.delete(void 0);
1654
1741
  return propValues;
1655
1742
  });
1656
1743
  def.options.forEach((option, i) => {
1657
- const propShape = propShapes.get(option._zod.def);
1744
+ const propShape = rawShape(option._zod.def);
1658
1745
  if (propShape && !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)) {
1659
1746
  throw new Error(`Invalid discriminated union option at index "${i}"`);
1660
1747
  }
1661
1748
  });
1662
- const disc = cached(() => {
1663
- const opts = def.options;
1664
- const map = /* @__PURE__ */ new Map();
1665
- for (const o of opts) {
1666
- const values = o._zod.propValues?.[def.discriminator];
1667
- if (!values || values.size === 0)
1668
- throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
1669
- for (const v of values) {
1670
- if (map.has(v)) {
1671
- throw new Error(`Duplicate discriminator value "${String(v)}"`);
1672
- }
1673
- map.set(v, o);
1674
- }
1675
- }
1676
- return map;
1677
- });
1749
+ const disc = cached(() => discriminatorMap(def));
1678
1750
  inst._zod.parse = (payload, ctx) => {
1679
1751
  const input = payload.value;
1680
1752
  if (!isObject(input)) {
@@ -1686,8 +1758,9 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
1686
1758
  });
1687
1759
  return payload;
1688
1760
  }
1689
- const opt = disc.value.get(input?.[def.discriminator]);
1690
- if (opt) {
1761
+ const value = input?.[def.discriminator];
1762
+ const opt = disc.value.get(value);
1763
+ if (opt && (value !== void 0 || ctx.direction !== "backward")) {
1691
1764
  return opt._zod.run(payload, ctx);
1692
1765
  }
1693
1766
  if (def.unionFallback || ctx.direction === "backward") {
@@ -1698,7 +1771,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
1698
1771
  errors: [],
1699
1772
  note: "No matching discriminator",
1700
1773
  discriminator: def.discriminator,
1701
- options: Array.from(disc.value.keys()),
1774
+ options: Array.from(disc.value.keys()).filter((value2) => disc.value.get(value2) !== null),
1702
1775
  input,
1703
1776
  path: [def.discriminator],
1704
1777
  inst
@@ -1866,8 +1939,10 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
1866
1939
  const values = getEnumValues(def.entries);
1867
1940
  const valuesSet = new Set(values);
1868
1941
  inst._zod.values = valuesSet;
1869
- const patternValues = values.filter((k) => propertyKeyTypes.has(typeof k));
1870
- inst._zod.pattern = new RegExp(patternValues.length ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$");
1942
+ defineLazyInternal(inst, "pattern", (zod) => {
1943
+ const patternValues = getEnumValues(zod.def.entries).filter((k) => propertyKeyTypes.has(typeof k));
1944
+ return new RegExp(patternValues.length ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$");
1945
+ });
1871
1946
  inst._zod.parse = (payload, _ctx) => {
1872
1947
  const input = payload.value;
1873
1948
  if (valuesSet.has(input)) {
@@ -1886,7 +1961,10 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
1886
1961
  $ZodType.init(inst, def);
1887
1962
  const values = new Set(def.values);
1888
1963
  inst._zod.values = values;
1889
- inst._zod.pattern = new RegExp(def.values.length ? `^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$` : "^[^\\s\\S]$");
1964
+ defineLazyInternal(inst, "pattern", (zod) => {
1965
+ const vals = zod.def.values;
1966
+ return new RegExp(vals.length ? `^(${vals.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$` : "^[^\\s\\S]$");
1967
+ });
1890
1968
  inst._zod.parse = (payload, _ctx) => {
1891
1969
  const input = payload.value;
1892
1970
  if (values.has(input)) {
@@ -2005,7 +2083,7 @@ function handleRefineResult(result, payload, input, inst) {
2005
2083
  }
2006
2084
  }
2007
2085
 
2008
- // ../../../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/en.js
2086
+ // ../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/en.js
2009
2087
  var error = () => {
2010
2088
  const Sizable = {
2011
2089
  string: { unit: "characters", verb: "to have" },
@@ -2045,7 +2123,9 @@ var error = () => {
2045
2123
  base64url: "base64url-encoded string",
2046
2124
  json_string: "JSON string",
2047
2125
  e164: "E.164 number",
2126
+ currency_code: "currency code",
2048
2127
  credit_card: "credit card number",
2128
+ iban: "IBAN",
2049
2129
  jwt: "JWT",
2050
2130
  template_literal: "input"
2051
2131
  };
@@ -2128,13 +2208,15 @@ function en_default() {
2128
2208
  };
2129
2209
  }
2130
2210
 
2131
- // ../../../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/api.js
2211
+ // ../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/api.js
2212
+ function snapshotChecks(def) {
2213
+ if (def.checks)
2214
+ def.checks = [...def.checks];
2215
+ return def;
2216
+ }
2132
2217
  // @__NO_SIDE_EFFECTS__
2133
2218
  function _string(Class, params) {
2134
- return new Class({
2135
- type: "string",
2136
- ...normalizeParams(params)
2137
- });
2219
+ return new Class(snapshotChecks({ type: "string", ...normalizeParams(params) }));
2138
2220
  }
2139
2221
  // @__NO_SIDE_EFFECTS__
2140
2222
  function _url(Class, params) {
@@ -2272,7 +2354,7 @@ function _refine(Class, fn, _params) {
2272
2354
  return schema;
2273
2355
  }
2274
2356
 
2275
- // ../../../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/mini/schemas.js
2357
+ // ../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/mini/schemas.js
2276
2358
  var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
2277
2359
  if (!inst._zod)
2278
2360
  throw new Error("Uninitialized schema in ZodMiniType.");
@@ -2437,7 +2519,7 @@ function record(keyType, valueType, params) {
2437
2519
  var ZodMiniEnum = /* @__PURE__ */ $constructor("ZodMiniEnum", (inst, def) => {
2438
2520
  $ZodEnum.init(inst, def);
2439
2521
  ZodMiniType.init(inst, def);
2440
- inst.options = Object.values(def.entries);
2522
+ inst.options = [...inst._zod.values];
2441
2523
  });
2442
2524
  // @__NO_SIDE_EFFECTS__
2443
2525
  function _enum(values, params) {
@@ -2505,7 +2587,7 @@ function refine(fn, _params = {}) {
2505
2587
  return _refine(ZodMiniCustom, fn, _params);
2506
2588
  }
2507
2589
 
2508
- // ../../../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/mini/iso.js
2590
+ // ../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/mini/iso.js
2509
2591
  var iso_exports = {};
2510
2592
  __export(iso_exports, {
2511
2593
  ZodMiniISODate: () => ZodMiniISODate,
@@ -2989,6 +3071,10 @@ function sanitizedGitEnv(opts = {}) {
2989
3071
  TZ: "UTC",
2990
3072
  GIT_CONFIG_NOSYSTEM: "1",
2991
3073
  GIT_CONFIG_GLOBAL: "/dev/null",
3074
+ // The defaults of core.excludesFile and core.attributesFile are `$XDG_CONFIG_HOME/git/…`, read
3075
+ // even with no global config file, and HOME is often `/tmp`, which every local user can write.
3076
+ // A directory that cannot exist, so git finds neither (it ignores ENOTDIR without a warning).
3077
+ XDG_CONFIG_HOME: "/dev/null",
2992
3078
  GIT_TERMINAL_PROMPT: "0",
2993
3079
  GIT_OPTIONAL_LOCKS: "0",
2994
3080
  GIT_ATTR_NOSYSTEM: "1",
@@ -3825,7 +3911,7 @@ async function packObjectsToFile(repoDir, extraArgs, stdinLines, opts) {
3825
3911
  }, timeoutMs);
3826
3912
  const onAbort = () => terminate(child);
3827
3913
  opts.signal?.addEventListener("abort", onAbort, { once: true });
3828
- let failure = null;
3914
+ let failure2 = null;
3829
3915
  try {
3830
3916
  const finished = new Promise((resolve3, reject) => out.on("finish", () => resolve3()).on("error", reject));
3831
3917
  finished.catch(() => void 0);
@@ -3858,7 +3944,7 @@ async function packObjectsToFile(repoDir, extraArgs, stdinLines, opts) {
3858
3944
  throw new PublisherError("GIT", `pack-objects failed: ${stderr.trim().split("\n").pop() ?? ""}`);
3859
3945
  }
3860
3946
  } catch (e) {
3861
- failure = e;
3947
+ failure2 = e;
3862
3948
  } finally {
3863
3949
  clearTimeout(timer);
3864
3950
  opts.signal?.removeEventListener("abort", onAbort);
@@ -3866,10 +3952,10 @@ async function packObjectsToFile(repoDir, extraArgs, stdinLines, opts) {
3866
3952
  }
3867
3953
  const cleanup = await reapChild(child, opts.groupObserver ? { observer: opts.groupObserver } : {});
3868
3954
  if (!reapSucceeded(cleanup)) {
3869
- throw cleanupFailure("git pack-objects", cleanup, failure ?? void 0);
3955
+ throw cleanupFailure("git pack-objects", cleanup, failure2 ?? void 0);
3870
3956
  }
3871
- if (failure) {
3872
- throw failure;
3957
+ if (failure2) {
3958
+ throw failure2;
3873
3959
  }
3874
3960
  const { sha256, size } = await sha256File(opts.outPath);
3875
3961
  return { sha256, size, objectCount: packObjectCount(await readPackHeader(opts.outPath)) };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minnovate/shadow-publisher",
3
- "version": "0.11.7",
3
+ "version": "0.11.9",
4
4
  "description": "publisher: publish an app's Git history to the serverless Git backend",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",