@apps-in-toss/cli 0.0.0-dev.1744801739343 → 0.0.0-dev.1752049503789

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 (3) hide show
  1. package/dist/index.cjs +343 -1505
  2. package/dist/index.js +339 -1501
  3. package/package.json +10 -7
package/dist/index.cjs CHANGED
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  ));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // ../../.yarn/__virtual__/tsup-virtual-7254073ea3/0/cache/tsup-npm-8.3.5-ed25596739-7794953cbc.zip/node_modules/tsup/assets/cjs_shims.js
36
+ // ../../.yarn/__virtual__/tsup-virtual-7863592962/0/cache/tsup-npm-8.3.5-ed25596739-7794953cbc.zip/node_modules/tsup/assets/cjs_shims.js
37
37
  var init_cjs_shims = __esm({
38
- "../../.yarn/__virtual__/tsup-virtual-7254073ea3/0/cache/tsup-npm-8.3.5-ed25596739-7794953cbc.zip/node_modules/tsup/assets/cjs_shims.js"() {
38
+ "../../.yarn/__virtual__/tsup-virtual-7863592962/0/cache/tsup-npm-8.3.5-ed25596739-7794953cbc.zip/node_modules/tsup/assets/cjs_shims.js"() {
39
39
  "use strict";
40
40
  }
41
41
  });
@@ -51,13 +51,13 @@ var require_ms = __commonJS({
51
51
  var d = h * 24;
52
52
  var w = d * 7;
53
53
  var y = d * 365.25;
54
- module2.exports = function(val, options2) {
55
- options2 = options2 || {};
54
+ module2.exports = function(val, options) {
55
+ options = options || {};
56
56
  var type = typeof val;
57
57
  if (type === "string" && val.length > 0) {
58
58
  return parse(val);
59
59
  } else if (type === "number" && isFinite(val)) {
60
- return options2.long ? fmtLong(val) : fmtShort(val);
60
+ return options.long ? fmtLong(val) : fmtShort(val);
61
61
  }
62
62
  throw new Error(
63
63
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
@@ -192,11 +192,11 @@ var require_common = __commonJS({
192
192
  let enableOverride = null;
193
193
  let namespacesCache;
194
194
  let enabledCache;
195
- function debug3(...args) {
196
- if (!debug3.enabled) {
195
+ function debug5(...args) {
196
+ if (!debug5.enabled) {
197
197
  return;
198
198
  }
199
- const self = debug3;
199
+ const self = debug5;
200
200
  const curr = Number(/* @__PURE__ */ new Date());
201
201
  const ms = curr - (prevTime || curr);
202
202
  self.diff = ms;
@@ -226,12 +226,12 @@ var require_common = __commonJS({
226
226
  const logFn = self.log || createDebug.log;
227
227
  logFn.apply(self, args);
228
228
  }
229
- debug3.namespace = namespace;
230
- debug3.useColors = createDebug.useColors();
231
- debug3.color = createDebug.selectColor(namespace);
232
- debug3.extend = extend;
233
- debug3.destroy = createDebug.destroy;
234
- Object.defineProperty(debug3, "enabled", {
229
+ debug5.namespace = namespace;
230
+ debug5.useColors = createDebug.useColors();
231
+ debug5.color = createDebug.selectColor(namespace);
232
+ debug5.extend = extend;
233
+ debug5.destroy = createDebug.destroy;
234
+ Object.defineProperty(debug5, "enabled", {
235
235
  enumerable: true,
236
236
  configurable: false,
237
237
  get: () => {
@@ -249,9 +249,9 @@ var require_common = __commonJS({
249
249
  }
250
250
  });
251
251
  if (typeof createDebug.init === "function") {
252
- createDebug.init(debug3);
252
+ createDebug.init(debug5);
253
253
  }
254
- return debug3;
254
+ return debug5;
255
255
  }
256
256
  function extend(namespace, delimiter) {
257
257
  const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
@@ -517,7 +517,7 @@ var require_node = __commonJS({
517
517
  var tty = require("tty");
518
518
  var util = require("util");
519
519
  exports2.init = init;
520
- exports2.log = log3;
520
+ exports2.log = log4;
521
521
  exports2.formatArgs = formatArgs;
522
522
  exports2.save = save;
523
523
  exports2.load = load;
@@ -652,7 +652,7 @@ var require_node = __commonJS({
652
652
  }
653
653
  return (/* @__PURE__ */ new Date()).toISOString() + " ";
654
654
  }
655
- function log3(...args) {
655
+ function log4(...args) {
656
656
  return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
657
657
  }
658
658
  function save(namespaces) {
@@ -665,11 +665,11 @@ var require_node = __commonJS({
665
665
  function load() {
666
666
  return process.env.DEBUG;
667
667
  }
668
- function init(debug3) {
669
- debug3.inspectOpts = {};
668
+ function init(debug5) {
669
+ debug5.inspectOpts = {};
670
670
  const keys = Object.keys(exports2.inspectOpts);
671
671
  for (let i = 0; i < keys.length; i++) {
672
- debug3.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
672
+ debug5.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
673
673
  }
674
674
  }
675
675
  module2.exports = require_common()(exports2);
@@ -703,10 +703,10 @@ var require_picocolors = __commonJS({
703
703
  "../../.yarn/cache/picocolors-npm-1.1.1-b0c45fa35e-e2e3e8170a.zip/node_modules/picocolors/picocolors.js"(exports2, module2) {
704
704
  "use strict";
705
705
  init_cjs_shims();
706
- var p3 = process || {};
707
- var argv = p3.argv || [];
708
- var env = p3.env || {};
709
- var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p3.platform === "win32" || (p3.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
706
+ var p4 = process || {};
707
+ var argv = p4.argv || [];
708
+ var env = p4.env || {};
709
+ var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p4.platform === "win32" || (p4.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
710
710
  var formatter = (open, close, replace = open) => (input) => {
711
711
  let string = "" + input, index = string.indexOf(close, open.length);
712
712
  return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
@@ -772,1387 +772,6 @@ var require_picocolors = __commonJS({
772
772
  }
773
773
  });
774
774
 
775
- // ../../.yarn/cache/pend-npm-1.2.0-dddaab3bf3-8a87e63f7a.zip/node_modules/pend/index.js
776
- var require_pend = __commonJS({
777
- "../../.yarn/cache/pend-npm-1.2.0-dddaab3bf3-8a87e63f7a.zip/node_modules/pend/index.js"(exports2, module2) {
778
- "use strict";
779
- init_cjs_shims();
780
- module2.exports = Pend;
781
- function Pend() {
782
- this.pending = 0;
783
- this.max = Infinity;
784
- this.listeners = [];
785
- this.waiting = [];
786
- this.error = null;
787
- }
788
- Pend.prototype.go = function(fn) {
789
- if (this.pending < this.max) {
790
- pendGo(this, fn);
791
- } else {
792
- this.waiting.push(fn);
793
- }
794
- };
795
- Pend.prototype.wait = function(cb) {
796
- if (this.pending === 0) {
797
- cb(this.error);
798
- } else {
799
- this.listeners.push(cb);
800
- }
801
- };
802
- Pend.prototype.hold = function() {
803
- return pendHold(this);
804
- };
805
- function pendHold(self) {
806
- self.pending += 1;
807
- var called = false;
808
- return onCb;
809
- function onCb(err) {
810
- if (called) throw new Error("callback called twice");
811
- called = true;
812
- self.error = self.error || err;
813
- self.pending -= 1;
814
- if (self.waiting.length > 0 && self.pending < self.max) {
815
- pendGo(self, self.waiting.shift());
816
- } else if (self.pending === 0) {
817
- var listeners = self.listeners;
818
- self.listeners = [];
819
- listeners.forEach(cbListener);
820
- }
821
- }
822
- function cbListener(listener) {
823
- listener(self.error);
824
- }
825
- }
826
- function pendGo(self, fn) {
827
- fn(pendHold(self));
828
- }
829
- }
830
- });
831
-
832
- // ../../.yarn/cache/yauzl-npm-3.2.0-b1af038bc6-7b40b3dc46.zip/node_modules/yauzl/fd-slicer.js
833
- var require_fd_slicer = __commonJS({
834
- "../../.yarn/cache/yauzl-npm-3.2.0-b1af038bc6-7b40b3dc46.zip/node_modules/yauzl/fd-slicer.js"(exports2) {
835
- "use strict";
836
- init_cjs_shims();
837
- var fs5 = require("fs");
838
- var util = require("util");
839
- var stream = require("stream");
840
- var Readable = stream.Readable;
841
- var Writable = stream.Writable;
842
- var PassThrough = stream.PassThrough;
843
- var Pend = require_pend();
844
- var EventEmitter = require("events").EventEmitter;
845
- exports2.createFromBuffer = createFromBuffer;
846
- exports2.createFromFd = createFromFd;
847
- exports2.BufferSlicer = BufferSlicer;
848
- exports2.FdSlicer = FdSlicer;
849
- util.inherits(FdSlicer, EventEmitter);
850
- function FdSlicer(fd, options2) {
851
- options2 = options2 || {};
852
- EventEmitter.call(this);
853
- this.fd = fd;
854
- this.pend = new Pend();
855
- this.pend.max = 1;
856
- this.refCount = 0;
857
- this.autoClose = !!options2.autoClose;
858
- }
859
- FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
860
- var self = this;
861
- self.pend.go(function(cb) {
862
- fs5.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer2) {
863
- cb();
864
- callback(err, bytesRead, buffer2);
865
- });
866
- });
867
- };
868
- FdSlicer.prototype.write = function(buffer, offset, length, position, callback) {
869
- var self = this;
870
- self.pend.go(function(cb) {
871
- fs5.write(self.fd, buffer, offset, length, position, function(err, written, buffer2) {
872
- cb();
873
- callback(err, written, buffer2);
874
- });
875
- });
876
- };
877
- FdSlicer.prototype.createReadStream = function(options2) {
878
- return new ReadStream(this, options2);
879
- };
880
- FdSlicer.prototype.createWriteStream = function(options2) {
881
- return new WriteStream(this, options2);
882
- };
883
- FdSlicer.prototype.ref = function() {
884
- this.refCount += 1;
885
- };
886
- FdSlicer.prototype.unref = function() {
887
- var self = this;
888
- self.refCount -= 1;
889
- if (self.refCount > 0) return;
890
- if (self.refCount < 0) throw new Error("invalid unref");
891
- if (self.autoClose) {
892
- fs5.close(self.fd, onCloseDone);
893
- }
894
- function onCloseDone(err) {
895
- if (err) {
896
- self.emit("error", err);
897
- } else {
898
- self.emit("close");
899
- }
900
- }
901
- };
902
- util.inherits(ReadStream, Readable);
903
- function ReadStream(context, options2) {
904
- options2 = options2 || {};
905
- Readable.call(this, options2);
906
- this.context = context;
907
- this.context.ref();
908
- this.start = options2.start || 0;
909
- this.endOffset = options2.end;
910
- this.pos = this.start;
911
- this.destroyed = false;
912
- }
913
- ReadStream.prototype._read = function(n) {
914
- var self = this;
915
- if (self.destroyed) return;
916
- var toRead = Math.min(self._readableState.highWaterMark, n);
917
- if (self.endOffset != null) {
918
- toRead = Math.min(toRead, self.endOffset - self.pos);
919
- }
920
- if (toRead <= 0) {
921
- self.destroyed = true;
922
- self.push(null);
923
- self.context.unref();
924
- return;
925
- }
926
- self.context.pend.go(function(cb) {
927
- if (self.destroyed) return cb();
928
- var buffer = Buffer.allocUnsafe(toRead);
929
- fs5.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
930
- if (err) {
931
- self.destroy(err);
932
- } else if (bytesRead === 0) {
933
- self.destroyed = true;
934
- self.push(null);
935
- self.context.unref();
936
- } else {
937
- self.pos += bytesRead;
938
- self.push(buffer.slice(0, bytesRead));
939
- }
940
- cb();
941
- });
942
- });
943
- };
944
- ReadStream.prototype.destroy = function(err) {
945
- if (this.destroyed) return;
946
- err = err || new Error("stream destroyed");
947
- this.destroyed = true;
948
- this.emit("error", err);
949
- this.context.unref();
950
- };
951
- util.inherits(WriteStream, Writable);
952
- function WriteStream(context, options2) {
953
- options2 = options2 || {};
954
- Writable.call(this, options2);
955
- this.context = context;
956
- this.context.ref();
957
- this.start = options2.start || 0;
958
- this.endOffset = options2.end == null ? Infinity : +options2.end;
959
- this.bytesWritten = 0;
960
- this.pos = this.start;
961
- this.destroyed = false;
962
- this.on("finish", this.destroy.bind(this));
963
- }
964
- WriteStream.prototype._write = function(buffer, encoding, callback) {
965
- var self = this;
966
- if (self.destroyed) return;
967
- if (self.pos + buffer.length > self.endOffset) {
968
- var err = new Error("maximum file length exceeded");
969
- err.code = "ETOOBIG";
970
- self.destroy();
971
- callback(err);
972
- return;
973
- }
974
- self.context.pend.go(function(cb) {
975
- if (self.destroyed) return cb();
976
- fs5.write(self.context.fd, buffer, 0, buffer.length, self.pos, function(err2, bytes) {
977
- if (err2) {
978
- self.destroy();
979
- cb();
980
- callback(err2);
981
- } else {
982
- self.bytesWritten += bytes;
983
- self.pos += bytes;
984
- self.emit("progress");
985
- cb();
986
- callback();
987
- }
988
- });
989
- });
990
- };
991
- WriteStream.prototype.destroy = function() {
992
- if (this.destroyed) return;
993
- this.destroyed = true;
994
- this.context.unref();
995
- };
996
- util.inherits(BufferSlicer, EventEmitter);
997
- function BufferSlicer(buffer, options2) {
998
- EventEmitter.call(this);
999
- options2 = options2 || {};
1000
- this.refCount = 0;
1001
- this.buffer = buffer;
1002
- this.maxChunkSize = options2.maxChunkSize || Number.MAX_SAFE_INTEGER;
1003
- }
1004
- BufferSlicer.prototype.read = function(buffer, offset, length, position, callback) {
1005
- if (!(0 <= offset && offset <= buffer.length)) throw new RangeError("offset outside buffer: 0 <= " + offset + " <= " + buffer.length);
1006
- if (position < 0) throw new RangeError("position is negative: " + position);
1007
- if (offset + length > buffer.length) {
1008
- length = buffer.length - offset;
1009
- }
1010
- if (position + length > this.buffer.length) {
1011
- length = this.buffer.length - position;
1012
- }
1013
- if (length <= 0) {
1014
- setImmediate(function() {
1015
- callback(null, 0);
1016
- });
1017
- return;
1018
- }
1019
- this.buffer.copy(buffer, offset, position, position + length);
1020
- setImmediate(function() {
1021
- callback(null, length);
1022
- });
1023
- };
1024
- BufferSlicer.prototype.write = function(buffer, offset, length, position, callback) {
1025
- buffer.copy(this.buffer, position, offset, offset + length);
1026
- setImmediate(function() {
1027
- callback(null, length, buffer);
1028
- });
1029
- };
1030
- BufferSlicer.prototype.createReadStream = function(options2) {
1031
- options2 = options2 || {};
1032
- var readStream = new PassThrough(options2);
1033
- readStream.destroyed = false;
1034
- readStream.start = options2.start || 0;
1035
- readStream.endOffset = options2.end;
1036
- readStream.pos = readStream.endOffset || this.buffer.length;
1037
- var entireSlice = this.buffer.slice(readStream.start, readStream.pos);
1038
- var offset = 0;
1039
- while (true) {
1040
- var nextOffset = offset + this.maxChunkSize;
1041
- if (nextOffset >= entireSlice.length) {
1042
- if (offset < entireSlice.length) {
1043
- readStream.write(entireSlice.slice(offset, entireSlice.length));
1044
- }
1045
- break;
1046
- }
1047
- readStream.write(entireSlice.slice(offset, nextOffset));
1048
- offset = nextOffset;
1049
- }
1050
- readStream.end();
1051
- readStream.destroy = function() {
1052
- readStream.destroyed = true;
1053
- };
1054
- return readStream;
1055
- };
1056
- BufferSlicer.prototype.createWriteStream = function(options2) {
1057
- var bufferSlicer = this;
1058
- options2 = options2 || {};
1059
- var writeStream = new Writable(options2);
1060
- writeStream.start = options2.start || 0;
1061
- writeStream.endOffset = options2.end == null ? this.buffer.length : +options2.end;
1062
- writeStream.bytesWritten = 0;
1063
- writeStream.pos = writeStream.start;
1064
- writeStream.destroyed = false;
1065
- writeStream._write = function(buffer, encoding, callback) {
1066
- if (writeStream.destroyed) return;
1067
- var end = writeStream.pos + buffer.length;
1068
- if (end > writeStream.endOffset) {
1069
- var err = new Error("maximum file length exceeded");
1070
- err.code = "ETOOBIG";
1071
- writeStream.destroyed = true;
1072
- callback(err);
1073
- return;
1074
- }
1075
- buffer.copy(bufferSlicer.buffer, writeStream.pos, 0, buffer.length);
1076
- writeStream.bytesWritten += buffer.length;
1077
- writeStream.pos = end;
1078
- writeStream.emit("progress");
1079
- callback();
1080
- };
1081
- writeStream.destroy = function() {
1082
- writeStream.destroyed = true;
1083
- };
1084
- return writeStream;
1085
- };
1086
- BufferSlicer.prototype.ref = function() {
1087
- this.refCount += 1;
1088
- };
1089
- BufferSlicer.prototype.unref = function() {
1090
- this.refCount -= 1;
1091
- if (this.refCount < 0) {
1092
- throw new Error("invalid unref");
1093
- }
1094
- };
1095
- function createFromBuffer(buffer, options2) {
1096
- return new BufferSlicer(buffer, options2);
1097
- }
1098
- function createFromFd(fd, options2) {
1099
- return new FdSlicer(fd, options2);
1100
- }
1101
- }
1102
- });
1103
-
1104
- // ../../.yarn/cache/buffer-crc32-npm-0.2.13-e25ddc91f5-cb0a8ddf5c.zip/node_modules/buffer-crc32/index.js
1105
- var require_buffer_crc32 = __commonJS({
1106
- "../../.yarn/cache/buffer-crc32-npm-0.2.13-e25ddc91f5-cb0a8ddf5c.zip/node_modules/buffer-crc32/index.js"(exports2, module2) {
1107
- "use strict";
1108
- init_cjs_shims();
1109
- var Buffer2 = require("buffer").Buffer;
1110
- var CRC_TABLE = [
1111
- 0,
1112
- 1996959894,
1113
- 3993919788,
1114
- 2567524794,
1115
- 124634137,
1116
- 1886057615,
1117
- 3915621685,
1118
- 2657392035,
1119
- 249268274,
1120
- 2044508324,
1121
- 3772115230,
1122
- 2547177864,
1123
- 162941995,
1124
- 2125561021,
1125
- 3887607047,
1126
- 2428444049,
1127
- 498536548,
1128
- 1789927666,
1129
- 4089016648,
1130
- 2227061214,
1131
- 450548861,
1132
- 1843258603,
1133
- 4107580753,
1134
- 2211677639,
1135
- 325883990,
1136
- 1684777152,
1137
- 4251122042,
1138
- 2321926636,
1139
- 335633487,
1140
- 1661365465,
1141
- 4195302755,
1142
- 2366115317,
1143
- 997073096,
1144
- 1281953886,
1145
- 3579855332,
1146
- 2724688242,
1147
- 1006888145,
1148
- 1258607687,
1149
- 3524101629,
1150
- 2768942443,
1151
- 901097722,
1152
- 1119000684,
1153
- 3686517206,
1154
- 2898065728,
1155
- 853044451,
1156
- 1172266101,
1157
- 3705015759,
1158
- 2882616665,
1159
- 651767980,
1160
- 1373503546,
1161
- 3369554304,
1162
- 3218104598,
1163
- 565507253,
1164
- 1454621731,
1165
- 3485111705,
1166
- 3099436303,
1167
- 671266974,
1168
- 1594198024,
1169
- 3322730930,
1170
- 2970347812,
1171
- 795835527,
1172
- 1483230225,
1173
- 3244367275,
1174
- 3060149565,
1175
- 1994146192,
1176
- 31158534,
1177
- 2563907772,
1178
- 4023717930,
1179
- 1907459465,
1180
- 112637215,
1181
- 2680153253,
1182
- 3904427059,
1183
- 2013776290,
1184
- 251722036,
1185
- 2517215374,
1186
- 3775830040,
1187
- 2137656763,
1188
- 141376813,
1189
- 2439277719,
1190
- 3865271297,
1191
- 1802195444,
1192
- 476864866,
1193
- 2238001368,
1194
- 4066508878,
1195
- 1812370925,
1196
- 453092731,
1197
- 2181625025,
1198
- 4111451223,
1199
- 1706088902,
1200
- 314042704,
1201
- 2344532202,
1202
- 4240017532,
1203
- 1658658271,
1204
- 366619977,
1205
- 2362670323,
1206
- 4224994405,
1207
- 1303535960,
1208
- 984961486,
1209
- 2747007092,
1210
- 3569037538,
1211
- 1256170817,
1212
- 1037604311,
1213
- 2765210733,
1214
- 3554079995,
1215
- 1131014506,
1216
- 879679996,
1217
- 2909243462,
1218
- 3663771856,
1219
- 1141124467,
1220
- 855842277,
1221
- 2852801631,
1222
- 3708648649,
1223
- 1342533948,
1224
- 654459306,
1225
- 3188396048,
1226
- 3373015174,
1227
- 1466479909,
1228
- 544179635,
1229
- 3110523913,
1230
- 3462522015,
1231
- 1591671054,
1232
- 702138776,
1233
- 2966460450,
1234
- 3352799412,
1235
- 1504918807,
1236
- 783551873,
1237
- 3082640443,
1238
- 3233442989,
1239
- 3988292384,
1240
- 2596254646,
1241
- 62317068,
1242
- 1957810842,
1243
- 3939845945,
1244
- 2647816111,
1245
- 81470997,
1246
- 1943803523,
1247
- 3814918930,
1248
- 2489596804,
1249
- 225274430,
1250
- 2053790376,
1251
- 3826175755,
1252
- 2466906013,
1253
- 167816743,
1254
- 2097651377,
1255
- 4027552580,
1256
- 2265490386,
1257
- 503444072,
1258
- 1762050814,
1259
- 4150417245,
1260
- 2154129355,
1261
- 426522225,
1262
- 1852507879,
1263
- 4275313526,
1264
- 2312317920,
1265
- 282753626,
1266
- 1742555852,
1267
- 4189708143,
1268
- 2394877945,
1269
- 397917763,
1270
- 1622183637,
1271
- 3604390888,
1272
- 2714866558,
1273
- 953729732,
1274
- 1340076626,
1275
- 3518719985,
1276
- 2797360999,
1277
- 1068828381,
1278
- 1219638859,
1279
- 3624741850,
1280
- 2936675148,
1281
- 906185462,
1282
- 1090812512,
1283
- 3747672003,
1284
- 2825379669,
1285
- 829329135,
1286
- 1181335161,
1287
- 3412177804,
1288
- 3160834842,
1289
- 628085408,
1290
- 1382605366,
1291
- 3423369109,
1292
- 3138078467,
1293
- 570562233,
1294
- 1426400815,
1295
- 3317316542,
1296
- 2998733608,
1297
- 733239954,
1298
- 1555261956,
1299
- 3268935591,
1300
- 3050360625,
1301
- 752459403,
1302
- 1541320221,
1303
- 2607071920,
1304
- 3965973030,
1305
- 1969922972,
1306
- 40735498,
1307
- 2617837225,
1308
- 3943577151,
1309
- 1913087877,
1310
- 83908371,
1311
- 2512341634,
1312
- 3803740692,
1313
- 2075208622,
1314
- 213261112,
1315
- 2463272603,
1316
- 3855990285,
1317
- 2094854071,
1318
- 198958881,
1319
- 2262029012,
1320
- 4057260610,
1321
- 1759359992,
1322
- 534414190,
1323
- 2176718541,
1324
- 4139329115,
1325
- 1873836001,
1326
- 414664567,
1327
- 2282248934,
1328
- 4279200368,
1329
- 1711684554,
1330
- 285281116,
1331
- 2405801727,
1332
- 4167216745,
1333
- 1634467795,
1334
- 376229701,
1335
- 2685067896,
1336
- 3608007406,
1337
- 1308918612,
1338
- 956543938,
1339
- 2808555105,
1340
- 3495958263,
1341
- 1231636301,
1342
- 1047427035,
1343
- 2932959818,
1344
- 3654703836,
1345
- 1088359270,
1346
- 936918e3,
1347
- 2847714899,
1348
- 3736837829,
1349
- 1202900863,
1350
- 817233897,
1351
- 3183342108,
1352
- 3401237130,
1353
- 1404277552,
1354
- 615818150,
1355
- 3134207493,
1356
- 3453421203,
1357
- 1423857449,
1358
- 601450431,
1359
- 3009837614,
1360
- 3294710456,
1361
- 1567103746,
1362
- 711928724,
1363
- 3020668471,
1364
- 3272380065,
1365
- 1510334235,
1366
- 755167117
1367
- ];
1368
- if (typeof Int32Array !== "undefined") {
1369
- CRC_TABLE = new Int32Array(CRC_TABLE);
1370
- }
1371
- function ensureBuffer(input) {
1372
- if (Buffer2.isBuffer(input)) {
1373
- return input;
1374
- }
1375
- var hasNewBufferAPI = typeof Buffer2.alloc === "function" && typeof Buffer2.from === "function";
1376
- if (typeof input === "number") {
1377
- return hasNewBufferAPI ? Buffer2.alloc(input) : new Buffer2(input);
1378
- } else if (typeof input === "string") {
1379
- return hasNewBufferAPI ? Buffer2.from(input) : new Buffer2(input);
1380
- } else {
1381
- throw new Error("input must be buffer, number, or string, received " + typeof input);
1382
- }
1383
- }
1384
- function bufferizeInt(num) {
1385
- var tmp = ensureBuffer(4);
1386
- tmp.writeInt32BE(num, 0);
1387
- return tmp;
1388
- }
1389
- function _crc32(buf, previous) {
1390
- buf = ensureBuffer(buf);
1391
- if (Buffer2.isBuffer(previous)) {
1392
- previous = previous.readUInt32BE(0);
1393
- }
1394
- var crc = ~~previous ^ -1;
1395
- for (var n = 0; n < buf.length; n++) {
1396
- crc = CRC_TABLE[(crc ^ buf[n]) & 255] ^ crc >>> 8;
1397
- }
1398
- return crc ^ -1;
1399
- }
1400
- function crc32() {
1401
- return bufferizeInt(_crc32.apply(null, arguments));
1402
- }
1403
- crc32.signed = function() {
1404
- return _crc32.apply(null, arguments);
1405
- };
1406
- crc32.unsigned = function() {
1407
- return _crc32.apply(null, arguments) >>> 0;
1408
- };
1409
- module2.exports = crc32;
1410
- }
1411
- });
1412
-
1413
- // ../../.yarn/cache/yauzl-npm-3.2.0-b1af038bc6-7b40b3dc46.zip/node_modules/yauzl/index.js
1414
- var require_yauzl = __commonJS({
1415
- "../../.yarn/cache/yauzl-npm-3.2.0-b1af038bc6-7b40b3dc46.zip/node_modules/yauzl/index.js"(exports2) {
1416
- "use strict";
1417
- init_cjs_shims();
1418
- var fs5 = require("fs");
1419
- var zlib = require("zlib");
1420
- var fd_slicer = require_fd_slicer();
1421
- var crc32 = require_buffer_crc32();
1422
- var util = require("util");
1423
- var EventEmitter = require("events").EventEmitter;
1424
- var Transform = require("stream").Transform;
1425
- var PassThrough = require("stream").PassThrough;
1426
- var Writable = require("stream").Writable;
1427
- exports2.open = open;
1428
- exports2.fromFd = fromFd;
1429
- exports2.fromBuffer = fromBuffer;
1430
- exports2.fromRandomAccessReader = fromRandomAccessReader;
1431
- exports2.dosDateTimeToDate = dosDateTimeToDate;
1432
- exports2.getFileNameLowLevel = getFileNameLowLevel;
1433
- exports2.validateFileName = validateFileName;
1434
- exports2.parseExtraFields = parseExtraFields;
1435
- exports2.ZipFile = ZipFile;
1436
- exports2.Entry = Entry;
1437
- exports2.LocalFileHeader = LocalFileHeader;
1438
- exports2.RandomAccessReader = RandomAccessReader;
1439
- function open(path4, options2, callback) {
1440
- if (typeof options2 === "function") {
1441
- callback = options2;
1442
- options2 = null;
1443
- }
1444
- if (options2 == null) options2 = {};
1445
- if (options2.autoClose == null) options2.autoClose = true;
1446
- if (options2.lazyEntries == null) options2.lazyEntries = false;
1447
- if (options2.decodeStrings == null) options2.decodeStrings = true;
1448
- if (options2.validateEntrySizes == null) options2.validateEntrySizes = true;
1449
- if (options2.strictFileNames == null) options2.strictFileNames = false;
1450
- if (callback == null) callback = defaultCallback;
1451
- fs5.open(path4, "r", function(err, fd) {
1452
- if (err) return callback(err);
1453
- fromFd(fd, options2, function(err2, zipfile) {
1454
- if (err2) fs5.close(fd, defaultCallback);
1455
- callback(err2, zipfile);
1456
- });
1457
- });
1458
- }
1459
- function fromFd(fd, options2, callback) {
1460
- if (typeof options2 === "function") {
1461
- callback = options2;
1462
- options2 = null;
1463
- }
1464
- if (options2 == null) options2 = {};
1465
- if (options2.autoClose == null) options2.autoClose = false;
1466
- if (options2.lazyEntries == null) options2.lazyEntries = false;
1467
- if (options2.decodeStrings == null) options2.decodeStrings = true;
1468
- if (options2.validateEntrySizes == null) options2.validateEntrySizes = true;
1469
- if (options2.strictFileNames == null) options2.strictFileNames = false;
1470
- if (callback == null) callback = defaultCallback;
1471
- fs5.fstat(fd, function(err, stats) {
1472
- if (err) return callback(err);
1473
- var reader = fd_slicer.createFromFd(fd, { autoClose: true });
1474
- fromRandomAccessReader(reader, stats.size, options2, callback);
1475
- });
1476
- }
1477
- function fromBuffer(buffer, options2, callback) {
1478
- if (typeof options2 === "function") {
1479
- callback = options2;
1480
- options2 = null;
1481
- }
1482
- if (options2 == null) options2 = {};
1483
- options2.autoClose = false;
1484
- if (options2.lazyEntries == null) options2.lazyEntries = false;
1485
- if (options2.decodeStrings == null) options2.decodeStrings = true;
1486
- if (options2.validateEntrySizes == null) options2.validateEntrySizes = true;
1487
- if (options2.strictFileNames == null) options2.strictFileNames = false;
1488
- var reader = fd_slicer.createFromBuffer(buffer, { maxChunkSize: 65536 });
1489
- fromRandomAccessReader(reader, buffer.length, options2, callback);
1490
- }
1491
- function fromRandomAccessReader(reader, totalSize, options2, callback) {
1492
- if (typeof options2 === "function") {
1493
- callback = options2;
1494
- options2 = null;
1495
- }
1496
- if (options2 == null) options2 = {};
1497
- if (options2.autoClose == null) options2.autoClose = true;
1498
- if (options2.lazyEntries == null) options2.lazyEntries = false;
1499
- if (options2.decodeStrings == null) options2.decodeStrings = true;
1500
- var decodeStrings = !!options2.decodeStrings;
1501
- if (options2.validateEntrySizes == null) options2.validateEntrySizes = true;
1502
- if (options2.strictFileNames == null) options2.strictFileNames = false;
1503
- if (callback == null) callback = defaultCallback;
1504
- if (typeof totalSize !== "number") throw new Error("expected totalSize parameter to be a number");
1505
- if (totalSize > Number.MAX_SAFE_INTEGER) {
1506
- throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.");
1507
- }
1508
- reader.ref();
1509
- var eocdrWithoutCommentSize = 22;
1510
- var zip64EocdlSize = 20;
1511
- var maxCommentSize = 65535;
1512
- var bufferSize = Math.min(zip64EocdlSize + eocdrWithoutCommentSize + maxCommentSize, totalSize);
1513
- var buffer = newBuffer(bufferSize);
1514
- var bufferReadStart = totalSize - buffer.length;
1515
- readAndAssertNoEof(reader, buffer, 0, bufferSize, bufferReadStart, function(err) {
1516
- if (err) return callback(err);
1517
- for (var i = bufferSize - eocdrWithoutCommentSize; i >= 0; i -= 1) {
1518
- if (buffer.readUInt32LE(i) !== 101010256) continue;
1519
- var eocdrBuffer = buffer.subarray(i);
1520
- var diskNumber = eocdrBuffer.readUInt16LE(4);
1521
- var entryCount = eocdrBuffer.readUInt16LE(10);
1522
- var centralDirectoryOffset = eocdrBuffer.readUInt32LE(16);
1523
- var commentLength = eocdrBuffer.readUInt16LE(20);
1524
- var expectedCommentLength = eocdrBuffer.length - eocdrWithoutCommentSize;
1525
- if (commentLength !== expectedCommentLength) {
1526
- return callback(new Error("Invalid comment length. Expected: " + expectedCommentLength + ". Found: " + commentLength + ". Are there extra bytes at the end of the file? Or is the end of central dir signature `PK\u263A\u263B` in the comment?"));
1527
- }
1528
- var comment = decodeStrings ? decodeBuffer(eocdrBuffer.subarray(22), false) : eocdrBuffer.subarray(22);
1529
- if (i - zip64EocdlSize >= 0 && buffer.readUInt32LE(i - zip64EocdlSize) === 117853008) {
1530
- var zip64EocdlBuffer = buffer.subarray(i - zip64EocdlSize, i - zip64EocdlSize + zip64EocdlSize);
1531
- var zip64EocdrOffset = readUInt64LE(zip64EocdlBuffer, 8);
1532
- var zip64EocdrBuffer = newBuffer(56);
1533
- return readAndAssertNoEof(reader, zip64EocdrBuffer, 0, zip64EocdrBuffer.length, zip64EocdrOffset, function(err2) {
1534
- if (err2) return callback(err2);
1535
- if (zip64EocdrBuffer.readUInt32LE(0) !== 101075792) {
1536
- return callback(new Error("invalid zip64 end of central directory record signature"));
1537
- }
1538
- diskNumber = zip64EocdrBuffer.readUInt32LE(16);
1539
- if (diskNumber !== 0) {
1540
- return callback(new Error("multi-disk zip files are not supported: found disk number: " + diskNumber));
1541
- }
1542
- entryCount = readUInt64LE(zip64EocdrBuffer, 32);
1543
- centralDirectoryOffset = readUInt64LE(zip64EocdrBuffer, 48);
1544
- return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options2.autoClose, options2.lazyEntries, decodeStrings, options2.validateEntrySizes, options2.strictFileNames));
1545
- });
1546
- }
1547
- if (diskNumber !== 0) {
1548
- return callback(new Error("multi-disk zip files are not supported: found disk number: " + diskNumber));
1549
- }
1550
- return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options2.autoClose, options2.lazyEntries, decodeStrings, options2.validateEntrySizes, options2.strictFileNames));
1551
- }
1552
- callback(new Error("End of central directory record signature not found. Either not a zip file, or file is truncated."));
1553
- });
1554
- }
1555
- util.inherits(ZipFile, EventEmitter);
1556
- function ZipFile(reader, centralDirectoryOffset, fileSize, entryCount, comment, autoClose, lazyEntries, decodeStrings, validateEntrySizes, strictFileNames) {
1557
- var self = this;
1558
- EventEmitter.call(self);
1559
- self.reader = reader;
1560
- self.reader.on("error", function(err) {
1561
- emitError(self, err);
1562
- });
1563
- self.reader.once("close", function() {
1564
- self.emit("close");
1565
- });
1566
- self.readEntryCursor = centralDirectoryOffset;
1567
- self.fileSize = fileSize;
1568
- self.entryCount = entryCount;
1569
- self.comment = comment;
1570
- self.entriesRead = 0;
1571
- self.autoClose = !!autoClose;
1572
- self.lazyEntries = !!lazyEntries;
1573
- self.decodeStrings = !!decodeStrings;
1574
- self.validateEntrySizes = !!validateEntrySizes;
1575
- self.strictFileNames = !!strictFileNames;
1576
- self.isOpen = true;
1577
- self.emittedError = false;
1578
- if (!self.lazyEntries) self._readEntry();
1579
- }
1580
- ZipFile.prototype.close = function() {
1581
- if (!this.isOpen) return;
1582
- this.isOpen = false;
1583
- this.reader.unref();
1584
- };
1585
- function emitErrorAndAutoClose(self, err) {
1586
- if (self.autoClose) self.close();
1587
- emitError(self, err);
1588
- }
1589
- function emitError(self, err) {
1590
- if (self.emittedError) return;
1591
- self.emittedError = true;
1592
- self.emit("error", err);
1593
- }
1594
- ZipFile.prototype.readEntry = function() {
1595
- if (!this.lazyEntries) throw new Error("readEntry() called without lazyEntries:true");
1596
- this._readEntry();
1597
- };
1598
- ZipFile.prototype._readEntry = function() {
1599
- var self = this;
1600
- if (self.entryCount === self.entriesRead) {
1601
- setImmediate(function() {
1602
- if (self.autoClose) self.close();
1603
- if (self.emittedError) return;
1604
- self.emit("end");
1605
- });
1606
- return;
1607
- }
1608
- if (self.emittedError) return;
1609
- var buffer = newBuffer(46);
1610
- readAndAssertNoEof(self.reader, buffer, 0, buffer.length, self.readEntryCursor, function(err) {
1611
- if (err) return emitErrorAndAutoClose(self, err);
1612
- if (self.emittedError) return;
1613
- var entry = new Entry();
1614
- var signature = buffer.readUInt32LE(0);
1615
- if (signature !== 33639248) return emitErrorAndAutoClose(self, new Error("invalid central directory file header signature: 0x" + signature.toString(16)));
1616
- entry.versionMadeBy = buffer.readUInt16LE(4);
1617
- entry.versionNeededToExtract = buffer.readUInt16LE(6);
1618
- entry.generalPurposeBitFlag = buffer.readUInt16LE(8);
1619
- entry.compressionMethod = buffer.readUInt16LE(10);
1620
- entry.lastModFileTime = buffer.readUInt16LE(12);
1621
- entry.lastModFileDate = buffer.readUInt16LE(14);
1622
- entry.crc32 = buffer.readUInt32LE(16);
1623
- entry.compressedSize = buffer.readUInt32LE(20);
1624
- entry.uncompressedSize = buffer.readUInt32LE(24);
1625
- entry.fileNameLength = buffer.readUInt16LE(28);
1626
- entry.extraFieldLength = buffer.readUInt16LE(30);
1627
- entry.fileCommentLength = buffer.readUInt16LE(32);
1628
- entry.internalFileAttributes = buffer.readUInt16LE(36);
1629
- entry.externalFileAttributes = buffer.readUInt32LE(38);
1630
- entry.relativeOffsetOfLocalHeader = buffer.readUInt32LE(42);
1631
- if (entry.generalPurposeBitFlag & 64) return emitErrorAndAutoClose(self, new Error("strong encryption is not supported"));
1632
- self.readEntryCursor += 46;
1633
- buffer = newBuffer(entry.fileNameLength + entry.extraFieldLength + entry.fileCommentLength);
1634
- readAndAssertNoEof(self.reader, buffer, 0, buffer.length, self.readEntryCursor, function(err2) {
1635
- if (err2) return emitErrorAndAutoClose(self, err2);
1636
- if (self.emittedError) return;
1637
- entry.fileNameRaw = buffer.subarray(0, entry.fileNameLength);
1638
- var fileCommentStart = entry.fileNameLength + entry.extraFieldLength;
1639
- entry.extraFieldRaw = buffer.subarray(entry.fileNameLength, fileCommentStart);
1640
- entry.fileCommentRaw = buffer.subarray(fileCommentStart, fileCommentStart + entry.fileCommentLength);
1641
- try {
1642
- entry.extraFields = parseExtraFields(entry.extraFieldRaw);
1643
- } catch (err3) {
1644
- return emitErrorAndAutoClose(self, err3);
1645
- }
1646
- if (self.decodeStrings) {
1647
- var isUtf8 = (entry.generalPurposeBitFlag & 2048) !== 0;
1648
- entry.fileComment = decodeBuffer(entry.fileCommentRaw, isUtf8);
1649
- entry.fileName = getFileNameLowLevel(entry.generalPurposeBitFlag, entry.fileNameRaw, entry.extraFields, self.strictFileNames);
1650
- var errorMessage = validateFileName(entry.fileName);
1651
- if (errorMessage != null) return emitErrorAndAutoClose(self, new Error(errorMessage));
1652
- } else {
1653
- entry.fileComment = entry.fileCommentRaw;
1654
- entry.fileName = entry.fileNameRaw;
1655
- }
1656
- entry.comment = entry.fileComment;
1657
- self.readEntryCursor += buffer.length;
1658
- self.entriesRead += 1;
1659
- for (var i = 0; i < entry.extraFields.length; i++) {
1660
- var extraField = entry.extraFields[i];
1661
- if (extraField.id !== 1) continue;
1662
- var zip64EiefBuffer = extraField.data;
1663
- var index = 0;
1664
- if (entry.uncompressedSize === 4294967295) {
1665
- if (index + 8 > zip64EiefBuffer.length) {
1666
- return emitErrorAndAutoClose(self, new Error("zip64 extended information extra field does not include uncompressed size"));
1667
- }
1668
- entry.uncompressedSize = readUInt64LE(zip64EiefBuffer, index);
1669
- index += 8;
1670
- }
1671
- if (entry.compressedSize === 4294967295) {
1672
- if (index + 8 > zip64EiefBuffer.length) {
1673
- return emitErrorAndAutoClose(self, new Error("zip64 extended information extra field does not include compressed size"));
1674
- }
1675
- entry.compressedSize = readUInt64LE(zip64EiefBuffer, index);
1676
- index += 8;
1677
- }
1678
- if (entry.relativeOffsetOfLocalHeader === 4294967295) {
1679
- if (index + 8 > zip64EiefBuffer.length) {
1680
- return emitErrorAndAutoClose(self, new Error("zip64 extended information extra field does not include relative header offset"));
1681
- }
1682
- entry.relativeOffsetOfLocalHeader = readUInt64LE(zip64EiefBuffer, index);
1683
- index += 8;
1684
- }
1685
- break;
1686
- }
1687
- if (self.validateEntrySizes && entry.compressionMethod === 0) {
1688
- var expectedCompressedSize = entry.uncompressedSize;
1689
- if (entry.isEncrypted()) {
1690
- expectedCompressedSize += 12;
1691
- }
1692
- if (entry.compressedSize !== expectedCompressedSize) {
1693
- var msg = "compressed/uncompressed size mismatch for stored file: " + entry.compressedSize + " != " + entry.uncompressedSize;
1694
- return emitErrorAndAutoClose(self, new Error(msg));
1695
- }
1696
- }
1697
- self.emit("entry", entry);
1698
- if (!self.lazyEntries) self._readEntry();
1699
- });
1700
- });
1701
- };
1702
- ZipFile.prototype.openReadStream = function(entry, options2, callback) {
1703
- var self = this;
1704
- var relativeStart = 0;
1705
- var relativeEnd = entry.compressedSize;
1706
- if (callback == null) {
1707
- callback = options2;
1708
- options2 = null;
1709
- }
1710
- if (options2 == null) {
1711
- options2 = {};
1712
- } else {
1713
- if (options2.decrypt != null) {
1714
- if (!entry.isEncrypted()) {
1715
- throw new Error("options.decrypt can only be specified for encrypted entries");
1716
- }
1717
- if (options2.decrypt !== false) throw new Error("invalid options.decrypt value: " + options2.decrypt);
1718
- if (entry.isCompressed()) {
1719
- if (options2.decompress !== false) throw new Error("entry is encrypted and compressed, and options.decompress !== false");
1720
- }
1721
- }
1722
- if (options2.decompress != null) {
1723
- if (!entry.isCompressed()) {
1724
- throw new Error("options.decompress can only be specified for compressed entries");
1725
- }
1726
- if (!(options2.decompress === false || options2.decompress === true)) {
1727
- throw new Error("invalid options.decompress value: " + options2.decompress);
1728
- }
1729
- }
1730
- if (options2.start != null || options2.end != null) {
1731
- if (entry.isCompressed() && options2.decompress !== false) {
1732
- throw new Error("start/end range not allowed for compressed entry without options.decompress === false");
1733
- }
1734
- if (entry.isEncrypted() && options2.decrypt !== false) {
1735
- throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false");
1736
- }
1737
- }
1738
- if (options2.start != null) {
1739
- relativeStart = options2.start;
1740
- if (relativeStart < 0) throw new Error("options.start < 0");
1741
- if (relativeStart > entry.compressedSize) throw new Error("options.start > entry.compressedSize");
1742
- }
1743
- if (options2.end != null) {
1744
- relativeEnd = options2.end;
1745
- if (relativeEnd < 0) throw new Error("options.end < 0");
1746
- if (relativeEnd > entry.compressedSize) throw new Error("options.end > entry.compressedSize");
1747
- if (relativeEnd < relativeStart) throw new Error("options.end < options.start");
1748
- }
1749
- }
1750
- if (!self.isOpen) return callback(new Error("closed"));
1751
- if (entry.isEncrypted()) {
1752
- if (options2.decrypt !== false) return callback(new Error("entry is encrypted, and options.decrypt !== false"));
1753
- }
1754
- var decompress;
1755
- if (entry.compressionMethod === 0) {
1756
- decompress = false;
1757
- } else if (entry.compressionMethod === 8) {
1758
- decompress = options2.decompress != null ? options2.decompress : true;
1759
- } else {
1760
- return callback(new Error("unsupported compression method: " + entry.compressionMethod));
1761
- }
1762
- self.readLocalFileHeader(entry, { minimal: true }, function(err, localFileHeader) {
1763
- if (err) return callback(err);
1764
- self.openReadStreamLowLevel(
1765
- localFileHeader.fileDataStart,
1766
- entry.compressedSize,
1767
- relativeStart,
1768
- relativeEnd,
1769
- decompress,
1770
- entry.uncompressedSize,
1771
- callback
1772
- );
1773
- });
1774
- };
1775
- ZipFile.prototype.openReadStreamLowLevel = function(fileDataStart, compressedSize, relativeStart, relativeEnd, decompress, uncompressedSize, callback) {
1776
- var self = this;
1777
- var fileDataEnd = fileDataStart + compressedSize;
1778
- var readStream = self.reader.createReadStream({
1779
- start: fileDataStart + relativeStart,
1780
- end: fileDataStart + relativeEnd
1781
- });
1782
- var endpointStream = readStream;
1783
- if (decompress) {
1784
- var destroyed = false;
1785
- var inflateFilter = zlib.createInflateRaw();
1786
- readStream.on("error", function(err) {
1787
- setImmediate(function() {
1788
- if (!destroyed) inflateFilter.emit("error", err);
1789
- });
1790
- });
1791
- readStream.pipe(inflateFilter);
1792
- if (self.validateEntrySizes) {
1793
- endpointStream = new AssertByteCountStream(uncompressedSize);
1794
- inflateFilter.on("error", function(err) {
1795
- setImmediate(function() {
1796
- if (!destroyed) endpointStream.emit("error", err);
1797
- });
1798
- });
1799
- inflateFilter.pipe(endpointStream);
1800
- } else {
1801
- endpointStream = inflateFilter;
1802
- }
1803
- installDestroyFn(endpointStream, function() {
1804
- destroyed = true;
1805
- if (inflateFilter !== endpointStream) inflateFilter.unpipe(endpointStream);
1806
- readStream.unpipe(inflateFilter);
1807
- readStream.destroy();
1808
- });
1809
- }
1810
- callback(null, endpointStream);
1811
- };
1812
- ZipFile.prototype.readLocalFileHeader = function(entry, options2, callback) {
1813
- var self = this;
1814
- if (callback == null) {
1815
- callback = options2;
1816
- options2 = null;
1817
- }
1818
- if (options2 == null) options2 = {};
1819
- self.reader.ref();
1820
- var buffer = newBuffer(30);
1821
- readAndAssertNoEof(self.reader, buffer, 0, buffer.length, entry.relativeOffsetOfLocalHeader, function(err) {
1822
- try {
1823
- if (err) return callback(err);
1824
- var signature = buffer.readUInt32LE(0);
1825
- if (signature !== 67324752) {
1826
- return callback(new Error("invalid local file header signature: 0x" + signature.toString(16)));
1827
- }
1828
- var fileNameLength = buffer.readUInt16LE(26);
1829
- var extraFieldLength = buffer.readUInt16LE(28);
1830
- var fileDataStart = entry.relativeOffsetOfLocalHeader + 30 + fileNameLength + extraFieldLength;
1831
- if (fileDataStart + entry.compressedSize > self.fileSize) {
1832
- return callback(new Error("file data overflows file bounds: " + fileDataStart + " + " + entry.compressedSize + " > " + self.fileSize));
1833
- }
1834
- if (options2.minimal) {
1835
- return callback(null, { fileDataStart });
1836
- }
1837
- var localFileHeader = new LocalFileHeader();
1838
- localFileHeader.fileDataStart = fileDataStart;
1839
- localFileHeader.versionNeededToExtract = buffer.readUInt16LE(4);
1840
- localFileHeader.generalPurposeBitFlag = buffer.readUInt16LE(6);
1841
- localFileHeader.compressionMethod = buffer.readUInt16LE(8);
1842
- localFileHeader.lastModFileTime = buffer.readUInt16LE(10);
1843
- localFileHeader.lastModFileDate = buffer.readUInt16LE(12);
1844
- localFileHeader.crc32 = buffer.readUInt32LE(14);
1845
- localFileHeader.compressedSize = buffer.readUInt32LE(18);
1846
- localFileHeader.uncompressedSize = buffer.readUInt32LE(22);
1847
- localFileHeader.fileNameLength = fileNameLength;
1848
- localFileHeader.extraFieldLength = extraFieldLength;
1849
- buffer = newBuffer(fileNameLength + extraFieldLength);
1850
- self.reader.ref();
1851
- readAndAssertNoEof(self.reader, buffer, 0, buffer.length, entry.relativeOffsetOfLocalHeader + 30, function(err2) {
1852
- try {
1853
- if (err2) return callback(err2);
1854
- localFileHeader.fileName = buffer.subarray(0, fileNameLength);
1855
- localFileHeader.extraField = buffer.subarray(fileNameLength);
1856
- return callback(null, localFileHeader);
1857
- } finally {
1858
- self.reader.unref();
1859
- }
1860
- });
1861
- } finally {
1862
- self.reader.unref();
1863
- }
1864
- });
1865
- };
1866
- function Entry() {
1867
- }
1868
- Entry.prototype.getLastModDate = function(options2) {
1869
- if (options2 == null) options2 = {};
1870
- if (!options2.forceDosFormat) {
1871
- for (var i = 0; i < this.extraFields.length; i++) {
1872
- var extraField = this.extraFields[i];
1873
- if (extraField.id === 21589) {
1874
- var data = extraField.data;
1875
- if (data.length < 5) continue;
1876
- var flags = data[0];
1877
- var HAS_MTIME = 1;
1878
- if (!(flags & HAS_MTIME)) continue;
1879
- var posixTimestamp = data.readInt32LE(1);
1880
- return new Date(posixTimestamp * 1e3);
1881
- } else if (extraField.id === 10) {
1882
- var data = extraField.data;
1883
- var cursor = 4;
1884
- while (cursor < data.length + 4) {
1885
- var tag = data.readUInt16LE(cursor);
1886
- cursor += 2;
1887
- var size = data.readUInt16LE(cursor);
1888
- cursor += 2;
1889
- if (tag !== 1) {
1890
- cursor += size;
1891
- continue;
1892
- }
1893
- if (size < 8 || cursor + size > data.length) break;
1894
- var hundredNanoSecondsSince1601 = 4294967296 * data.readInt32LE(cursor + 4) + data.readUInt32LE(cursor);
1895
- var millisecondsSince1970 = hundredNanoSecondsSince1601 / 1e4 - 116444736e5;
1896
- return new Date(millisecondsSince1970);
1897
- }
1898
- }
1899
- }
1900
- }
1901
- return dosDateTimeToDate(this.lastModFileDate, this.lastModFileTime, options2.timezone);
1902
- };
1903
- Entry.prototype.isEncrypted = function() {
1904
- return (this.generalPurposeBitFlag & 1) !== 0;
1905
- };
1906
- Entry.prototype.isCompressed = function() {
1907
- return this.compressionMethod === 8;
1908
- };
1909
- function LocalFileHeader() {
1910
- }
1911
- function dosDateTimeToDate(date, time, timezone) {
1912
- var day = date & 31;
1913
- var month = (date >> 5 & 15) - 1;
1914
- var year = (date >> 9 & 127) + 1980;
1915
- var millisecond = 0;
1916
- var second = (time & 31) * 2;
1917
- var minute = time >> 5 & 63;
1918
- var hour = time >> 11 & 31;
1919
- if (timezone == null || timezone === "local") {
1920
- return new Date(year, month, day, hour, minute, second, millisecond);
1921
- } else if (timezone === "UTC") {
1922
- return new Date(Date.UTC(year, month, day, hour, minute, second, millisecond));
1923
- } else {
1924
- throw new Error("unrecognized options.timezone: " + options.timezone);
1925
- }
1926
- }
1927
- function getFileNameLowLevel(generalPurposeBitFlag, fileNameBuffer, extraFields, strictFileNames) {
1928
- var fileName = null;
1929
- for (var i = 0; i < extraFields.length; i++) {
1930
- var extraField = extraFields[i];
1931
- if (extraField.id === 28789) {
1932
- if (extraField.data.length < 6) {
1933
- continue;
1934
- }
1935
- if (extraField.data.readUInt8(0) !== 1) {
1936
- continue;
1937
- }
1938
- var oldNameCrc32 = extraField.data.readUInt32LE(1);
1939
- if (crc32.unsigned(fileNameBuffer) !== oldNameCrc32) {
1940
- continue;
1941
- }
1942
- fileName = decodeBuffer(extraField.data.subarray(5), true);
1943
- break;
1944
- }
1945
- }
1946
- if (fileName == null) {
1947
- var isUtf8 = (generalPurposeBitFlag & 2048) !== 0;
1948
- fileName = decodeBuffer(fileNameBuffer, isUtf8);
1949
- }
1950
- if (!strictFileNames) {
1951
- fileName = fileName.replace(/\\/g, "/");
1952
- }
1953
- return fileName;
1954
- }
1955
- function validateFileName(fileName) {
1956
- if (fileName.indexOf("\\") !== -1) {
1957
- return "invalid characters in fileName: " + fileName;
1958
- }
1959
- if (/^[a-zA-Z]:/.test(fileName) || /^\//.test(fileName)) {
1960
- return "absolute path: " + fileName;
1961
- }
1962
- if (fileName.split("/").indexOf("..") !== -1) {
1963
- return "invalid relative path: " + fileName;
1964
- }
1965
- return null;
1966
- }
1967
- function parseExtraFields(extraFieldBuffer) {
1968
- var extraFields = [];
1969
- var i = 0;
1970
- while (i < extraFieldBuffer.length - 3) {
1971
- var headerId = extraFieldBuffer.readUInt16LE(i + 0);
1972
- var dataSize = extraFieldBuffer.readUInt16LE(i + 2);
1973
- var dataStart = i + 4;
1974
- var dataEnd = dataStart + dataSize;
1975
- if (dataEnd > extraFieldBuffer.length) throw new Error("extra field length exceeds extra field buffer size");
1976
- var dataBuffer = extraFieldBuffer.subarray(dataStart, dataEnd);
1977
- extraFields.push({
1978
- id: headerId,
1979
- data: dataBuffer
1980
- });
1981
- i = dataEnd;
1982
- }
1983
- return extraFields;
1984
- }
1985
- function readAndAssertNoEof(reader, buffer, offset, length, position, callback) {
1986
- if (length === 0) {
1987
- return setImmediate(function() {
1988
- callback(null, newBuffer(0));
1989
- });
1990
- }
1991
- reader.read(buffer, offset, length, position, function(err, bytesRead) {
1992
- if (err) return callback(err);
1993
- if (bytesRead < length) {
1994
- return callback(new Error("unexpected EOF"));
1995
- }
1996
- callback();
1997
- });
1998
- }
1999
- util.inherits(AssertByteCountStream, Transform);
2000
- function AssertByteCountStream(byteCount) {
2001
- Transform.call(this);
2002
- this.actualByteCount = 0;
2003
- this.expectedByteCount = byteCount;
2004
- }
2005
- AssertByteCountStream.prototype._transform = function(chunk, encoding, cb) {
2006
- this.actualByteCount += chunk.length;
2007
- if (this.actualByteCount > this.expectedByteCount) {
2008
- var msg = "too many bytes in the stream. expected " + this.expectedByteCount + ". got at least " + this.actualByteCount;
2009
- return cb(new Error(msg));
2010
- }
2011
- cb(null, chunk);
2012
- };
2013
- AssertByteCountStream.prototype._flush = function(cb) {
2014
- if (this.actualByteCount < this.expectedByteCount) {
2015
- var msg = "not enough bytes in the stream. expected " + this.expectedByteCount + ". got only " + this.actualByteCount;
2016
- return cb(new Error(msg));
2017
- }
2018
- cb();
2019
- };
2020
- util.inherits(RandomAccessReader, EventEmitter);
2021
- function RandomAccessReader() {
2022
- EventEmitter.call(this);
2023
- this.refCount = 0;
2024
- }
2025
- RandomAccessReader.prototype.ref = function() {
2026
- this.refCount += 1;
2027
- };
2028
- RandomAccessReader.prototype.unref = function() {
2029
- var self = this;
2030
- self.refCount -= 1;
2031
- if (self.refCount > 0) return;
2032
- if (self.refCount < 0) throw new Error("invalid unref");
2033
- self.close(onCloseDone);
2034
- function onCloseDone(err) {
2035
- if (err) return self.emit("error", err);
2036
- self.emit("close");
2037
- }
2038
- };
2039
- RandomAccessReader.prototype.createReadStream = function(options2) {
2040
- if (options2 == null) options2 = {};
2041
- var start = options2.start;
2042
- var end = options2.end;
2043
- if (start === end) {
2044
- var emptyStream = new PassThrough();
2045
- setImmediate(function() {
2046
- emptyStream.end();
2047
- });
2048
- return emptyStream;
2049
- }
2050
- var stream = this._readStreamForRange(start, end);
2051
- var destroyed = false;
2052
- var refUnrefFilter = new RefUnrefFilter(this);
2053
- stream.on("error", function(err) {
2054
- setImmediate(function() {
2055
- if (!destroyed) refUnrefFilter.emit("error", err);
2056
- });
2057
- });
2058
- installDestroyFn(refUnrefFilter, function() {
2059
- stream.unpipe(refUnrefFilter);
2060
- refUnrefFilter.unref();
2061
- stream.destroy();
2062
- });
2063
- var byteCounter = new AssertByteCountStream(end - start);
2064
- refUnrefFilter.on("error", function(err) {
2065
- setImmediate(function() {
2066
- if (!destroyed) byteCounter.emit("error", err);
2067
- });
2068
- });
2069
- installDestroyFn(byteCounter, function() {
2070
- destroyed = true;
2071
- refUnrefFilter.unpipe(byteCounter);
2072
- refUnrefFilter.destroy();
2073
- });
2074
- return stream.pipe(refUnrefFilter).pipe(byteCounter);
2075
- };
2076
- RandomAccessReader.prototype._readStreamForRange = function(start, end) {
2077
- throw new Error("not implemented");
2078
- };
2079
- RandomAccessReader.prototype.read = function(buffer, offset, length, position, callback) {
2080
- var readStream = this.createReadStream({ start: position, end: position + length });
2081
- var writeStream = new Writable();
2082
- var written = 0;
2083
- writeStream._write = function(chunk, encoding, cb) {
2084
- chunk.copy(buffer, offset + written, 0, chunk.length);
2085
- written += chunk.length;
2086
- cb();
2087
- };
2088
- writeStream.on("finish", callback);
2089
- readStream.on("error", function(error) {
2090
- callback(error);
2091
- });
2092
- readStream.pipe(writeStream);
2093
- };
2094
- RandomAccessReader.prototype.close = function(callback) {
2095
- setImmediate(callback);
2096
- };
2097
- util.inherits(RefUnrefFilter, PassThrough);
2098
- function RefUnrefFilter(context) {
2099
- PassThrough.call(this);
2100
- this.context = context;
2101
- this.context.ref();
2102
- this.unreffedYet = false;
2103
- }
2104
- RefUnrefFilter.prototype._flush = function(cb) {
2105
- this.unref();
2106
- cb();
2107
- };
2108
- RefUnrefFilter.prototype.unref = function(cb) {
2109
- if (this.unreffedYet) return;
2110
- this.unreffedYet = true;
2111
- this.context.unref();
2112
- };
2113
- var cp437 = "\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0";
2114
- function decodeBuffer(buffer, isUtf8) {
2115
- if (isUtf8) {
2116
- return buffer.toString("utf8");
2117
- } else {
2118
- var result = "";
2119
- for (var i = 0; i < buffer.length; i++) {
2120
- result += cp437[buffer[i]];
2121
- }
2122
- return result;
2123
- }
2124
- }
2125
- function readUInt64LE(buffer, offset) {
2126
- var lower32 = buffer.readUInt32LE(offset);
2127
- var upper32 = buffer.readUInt32LE(offset + 4);
2128
- return upper32 * 4294967296 + lower32;
2129
- }
2130
- var newBuffer;
2131
- if (typeof Buffer.allocUnsafe === "function") {
2132
- newBuffer = function(len) {
2133
- return Buffer.allocUnsafe(len);
2134
- };
2135
- } else {
2136
- newBuffer = function(len) {
2137
- return new Buffer(len);
2138
- };
2139
- }
2140
- function installDestroyFn(stream, fn) {
2141
- if (typeof stream.destroy === "function") {
2142
- stream._destroy = function(err, cb) {
2143
- fn();
2144
- if (cb != null) cb(err);
2145
- };
2146
- } else {
2147
- stream.destroy = fn;
2148
- }
2149
- }
2150
- function defaultCallback(err) {
2151
- if (err) throw err;
2152
- }
2153
- }
2154
- });
2155
-
2156
775
  // src/index.ts
2157
776
  var src_exports = {};
2158
777
  __export(src_exports, {
@@ -2160,16 +779,17 @@ __export(src_exports, {
2160
779
  });
2161
780
  module.exports = __toCommonJS(src_exports);
2162
781
  init_cjs_shims();
2163
- var import_clipanion3 = require("clipanion");
782
+ var import_clipanion4 = require("clipanion");
2164
783
 
2165
784
  // src/DeployCommand.ts
2166
785
  init_cjs_shims();
2167
786
  var import_assert = __toESM(require("assert"), 1);
2168
- var import_fs3 = __toESM(require("fs"), 1);
2169
- var import_path2 = __toESM(require("path"), 1);
787
+ var import_fs2 = __toESM(require("fs"), 1);
788
+ var import_path = __toESM(require("path"), 1);
2170
789
  var p = __toESM(require("@clack/prompts"), 1);
790
+ var import_utils = require("@granite-js/utils");
2171
791
  var import_clipanion = require("clipanion");
2172
- var import_debug2 = __toESM(require_src(), 1);
792
+ var import_debug3 = __toESM(require_src(), 1);
2173
793
  var import_picocolors = __toESM(require_picocolors(), 1);
2174
794
 
2175
795
  // src/utils/constants.ts
@@ -2177,66 +797,33 @@ init_cjs_shims();
2177
797
  var APP_MANIFEST_NAME = "app.json";
2178
798
  var DEFAULT_API_BASE_URL = "https://apps-in-toss.toss.im/console";
2179
799
 
2180
- // src/utils/getPackageRoot.ts
800
+ // src/utils/upload.ts
2181
801
  init_cjs_shims();
2182
802
  var import_fs = __toESM(require("fs"), 1);
2183
- var import_path = __toESM(require("path"), 1);
2184
- function getPackageRoot() {
2185
- let cwd = process.cwd();
2186
- const root = import_path.default.parse(cwd).root;
2187
- while (cwd !== root) {
2188
- if (import_fs.default.existsSync(import_path.default.join(cwd, "package.json"))) {
2189
- return cwd;
2190
- }
2191
- cwd = import_path.default.dirname(cwd);
2192
- }
2193
- return cwd;
2194
- }
803
+ var import_debug2 = __toESM(require_src(), 1);
2195
804
 
2196
- // src/utils/readZipContent.ts
805
+ // src/utils/handleFetchResponse.ts
2197
806
  init_cjs_shims();
2198
- var import_yauzl = __toESM(require_yauzl(), 1);
2199
- function readZipContent(zipPath, fileName) {
2200
- return new Promise((resolve, reject) => {
2201
- import_yauzl.default.open(zipPath, { lazyEntries: true }, (error, zipFile) => {
2202
- if (error) {
2203
- reject(error);
2204
- return;
2205
- }
2206
- zipFile.on("entry", (entry) => {
2207
- if (entry.fileName === fileName) {
2208
- zipFile.openReadStream(entry, (error2, readStream) => {
2209
- if (error2) {
2210
- throw error2;
2211
- }
2212
- let fileData = "";
2213
- readStream.on("data", (chunk) => fileData += chunk.toString("utf8")).on("end", () => {
2214
- zipFile.close();
2215
- resolve(fileData);
2216
- });
2217
- });
2218
- } else {
2219
- zipFile.readEntry();
2220
- }
2221
- }).on("end", () => {
2222
- zipFile.close();
2223
- reject(new Error(`'${fileName}' not found in zip file`));
2224
- }).on("error", (error2) => {
2225
- zipFile.close();
2226
- reject(error2);
2227
- });
2228
- zipFile.readEntry();
2229
- });
2230
- });
807
+ var import_debug = __toESM(require_src(), 1);
808
+ var debug = (0, import_debug.default)("api");
809
+ async function handleFetchResponse(response) {
810
+ debug(`Response ${response.status} ${response.statusText}`);
811
+ if (!response.ok) {
812
+ throw new Error(`HTTP ${response.status}: ${response.statusText}`);
813
+ }
814
+ const data = await response.clone().json();
815
+ debug("response", data);
816
+ if (data.resultType !== "SUCCESS") {
817
+ const errorCode = data?.error?.errorCode ?? "-1";
818
+ const errorReason = data?.error.reason ?? "unknown";
819
+ throw new Error(`${errorReason} (Code: ${errorCode})`);
820
+ }
2231
821
  }
2232
822
 
2233
823
  // src/utils/upload.ts
2234
- init_cjs_shims();
2235
- var import_fs2 = __toESM(require("fs"), 1);
2236
- var import_debug = __toESM(require_src(), 1);
2237
- var debug = (0, import_debug.default)("cli:deploy");
824
+ var debug2 = (0, import_debug2.default)("cli:deploy");
2238
825
  async function uploadArtifact(config) {
2239
- debug("uploadArtifact", config);
826
+ debug2("uploadArtifact", config);
2240
827
  const baseUrl = config.baseUrl ?? DEFAULT_API_BASE_URL;
2241
828
  const response = await fetch(
2242
829
  `${baseUrl}/api-public/v3/appsintossconsole/bundles/${config.appName}/deployments/${config.deploymentId}/upload`,
@@ -2246,28 +833,15 @@ async function uploadArtifact(config) {
2246
833
  "Content-Type": "application/octet-stream",
2247
834
  "X-Ait-Console-Api-Key": config.apiKey
2248
835
  },
2249
- body: import_fs2.default.createReadStream(config.artifactPath),
836
+ body: import_fs.default.createReadStream(config.artifactPath),
2250
837
  duplex: "half"
2251
838
  }
2252
839
  );
2253
- return handleResponse(response);
2254
- }
2255
- async function handleResponse(response) {
2256
- debug(`Response ${response.status} ${response.statusText}`);
2257
- if (!response.ok) {
2258
- throw new Error(`HTTP ${response.status}: ${response.statusText}`);
2259
- }
2260
- const data = await response.clone().json();
2261
- debug("uploadArtifact response", data);
2262
- if (data.resultType !== "SUCCESS") {
2263
- const errorCode = data?.error?.errorCode ?? "-1";
2264
- const errorReason = data?.error.reason ?? "unknown";
2265
- throw new Error(`${errorReason} (Code: ${errorCode})`);
2266
- }
840
+ return handleFetchResponse(response);
2267
841
  }
2268
842
 
2269
843
  // src/DeployCommand.ts
2270
- var debug2 = (0, import_debug2.default)("cli:deploy");
844
+ var debug3 = (0, import_debug3.default)("cli:deploy");
2271
845
  var DeployCommand = class extends import_clipanion.Command {
2272
846
  static paths = [["deploy"]];
2273
847
  apiKey = import_clipanion.Option.String("--api-key", {
@@ -2292,13 +866,13 @@ var DeployCommand = class extends import_clipanion.Command {
2292
866
  return;
2293
867
  }
2294
868
  try {
2295
- const packageRoot = getPackageRoot();
2296
- const artifactFile = import_fs3.default.readdirSync(packageRoot).find((file) => file.endsWith(".ait"));
869
+ const packageRoot = (0, import_utils.getPackageRoot)();
870
+ const artifactFile = import_fs2.default.readdirSync(packageRoot).find((file) => file.endsWith(".ait"));
2297
871
  if (!artifactFile) {
2298
872
  throw new Error("\uBC30\uD3EC\uD560 .ait \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");
2299
873
  }
2300
- const resolvedArtifactPath = import_path2.default.resolve(packageRoot, artifactFile);
2301
- const { appName, deploymentId } = await readZipContent(resolvedArtifactPath, APP_MANIFEST_NAME).then((rawAppManifest) => {
874
+ const resolvedArtifactPath = import_path.default.resolve(packageRoot, artifactFile);
875
+ const { appName, deploymentId } = await (0, import_utils.readZipContent)(resolvedArtifactPath, APP_MANIFEST_NAME).then((rawAppManifest) => {
2302
876
  const appManifest = JSON.parse(rawAppManifest);
2303
877
  const appName2 = appManifest.appName;
2304
878
  const deploymentId2 = appManifest._metadata.deploymentId;
@@ -2306,7 +880,7 @@ var DeployCommand = class extends import_clipanion.Command {
2306
880
  (0, import_assert.default)(typeof deploymentId2 === "string", "invalid deploymentId");
2307
881
  return { appName: appName2, deploymentId: deploymentId2 };
2308
882
  }).catch((error) => {
2309
- debug2("invalid ait file", error);
883
+ debug3("invalid ait file", error);
2310
884
  throw new Error("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 ait \uD30C\uC77C\uC785\uB2C8\uB2E4");
2311
885
  });
2312
886
  const colorAppName = import_picocolors.default.underline(import_picocolors.default.cyan(appName));
@@ -2339,9 +913,10 @@ var DeployCommand = class extends import_clipanion.Command {
2339
913
 
2340
914
  // src/InitCommand.ts
2341
915
  init_cjs_shims();
2342
- var import_fs4 = __toESM(require("fs"), 1);
2343
- var import_path3 = __toESM(require("path"), 1);
916
+ var import_fs3 = __toESM(require("fs"), 1);
917
+ var import_path2 = __toESM(require("path"), 1);
2344
918
  var p2 = __toESM(require("@clack/prompts"), 1);
919
+ var import_utils2 = require("@granite-js/utils");
2345
920
  var import_clipanion2 = require("clipanion");
2346
921
 
2347
922
  // ../../.yarn/cache/es-toolkit-npm-1.32.0-019fc7c155-56ba965570.zip/node_modules/es-toolkit/dist/index.mjs
@@ -2386,9 +961,10 @@ export default defineConfig({
2386
961
  });
2387
962
  `;
2388
963
  var REACT_NATIVE_FRAMEWORK_CONFIG_TEMPLATE = `import { appsInToss } from '@apps-in-toss/framework/plugins';
2389
- import { defineConfig } from 'react-native-bedrock/config';
964
+ import { defineConfig } from '@granite-js/react-native/config';
2390
965
 
2391
966
  export default defineConfig({
967
+ scheme: 'intoss',
2392
968
  appName: '%%appName%%',
2393
969
  plugins: [
2394
970
  appsInToss({
@@ -2405,7 +981,7 @@ export default defineConfig({
2405
981
  `;
2406
982
  var APP_TEMPLATE = `import { AppsInToss } from '@apps-in-toss/framework';
2407
983
  import { PropsWithChildren } from 'react';
2408
- import { InitialProps } from 'react-native-bedrock';
984
+ import { InitialProps } from '@granite-js/react-native';
2409
985
  import { context } from '../require.context';
2410
986
 
2411
987
  function AppContainer({ children }: PropsWithChildren<InitialProps>) {
@@ -2440,7 +1016,7 @@ function transformTemplate(templateString, values) {
2440
1016
 
2441
1017
  // src/InitCommand.ts
2442
1018
  async function templateWebFramework({ appName, cwd, skipInput }) {
2443
- const packageJson = await import_fs4.default.promises.readFile(import_path3.default.join(cwd, "package.json"), {
1019
+ const packageJson = await import_fs3.default.promises.readFile(import_path2.default.join(cwd, "package.json"), {
2444
1020
  encoding: "utf-8"
2445
1021
  });
2446
1022
  const scripts = JSON.parse(packageJson);
@@ -2448,17 +1024,17 @@ async function templateWebFramework({ appName, cwd, skipInput }) {
2448
1024
  dev: scripts?.scripts?.dev || scripts?.scripts?.start,
2449
1025
  build: scripts?.scripts?.build
2450
1026
  };
2451
- scripts.scripts.dev = "bedrock dev";
2452
- scripts.scripts.build = "bedrock build";
1027
+ scripts.scripts.dev = "granite dev";
1028
+ scripts.scripts.build = "granite build";
2453
1029
  scripts.scripts.deploy = "ait deploy";
2454
- await import_fs4.default.promises.writeFile(import_path3.default.join(cwd, "package.json"), JSON.stringify(scripts, null, 2), {
1030
+ await import_fs3.default.promises.writeFile(import_path2.default.join(cwd, "package.json"), JSON.stringify(scripts, null, 2), {
2455
1031
  encoding: "utf-8"
2456
1032
  });
2457
1033
  p2.log.step(".gitignore \uD30C\uC77C\uC744 \uC5C5\uB370\uC774\uD2B8\uD558\uB294 \uC911...");
2458
- await import_fs4.default.promises.appendFile(import_path3.default.join(cwd, ".gitignore"), "\n.bedrock\n");
1034
+ await import_fs3.default.promises.appendFile(import_path2.default.join(cwd, ".gitignore"), "\n.granite\n");
2459
1035
  const placeholder = {
2460
- dev: originalScripts.dev === "bedrock dev" ? "" : originalScripts.dev,
2461
- build: originalScripts.build === "bedrock build" ? "" : originalScripts.build
1036
+ dev: originalScripts.dev === "granite dev" ? "" : originalScripts.dev,
1037
+ build: originalScripts.build === "granite build" ? "" : originalScripts.build
2462
1038
  };
2463
1039
  const scriptInputs = skipInput ? placeholder : await p2.group(
2464
1040
  {
@@ -2479,7 +1055,7 @@ async function templateWebFramework({ appName, cwd, skipInput }) {
2479
1055
  }
2480
1056
  }
2481
1057
  );
2482
- p2.log.step("bedrock.config.ts \uD30C\uC77C\uC744 \uC0DD\uC131\uD558\uB294 \uC911...");
1058
+ p2.log.step("granite.config.ts \uD30C\uC77C\uC744 \uC0DD\uC131\uD558\uB294 \uC911...");
2483
1059
  const webPort = skipInput ? "5173" : await p2.text({
2484
1060
  message: "Enter web port",
2485
1061
  placeholder: "5173",
@@ -2492,23 +1068,23 @@ async function templateWebFramework({ appName, cwd, skipInput }) {
2492
1068
  const config = transformTemplate(WEB_FRAMEWORK_CONFIG_TEMPLATE, {
2493
1069
  appName,
2494
1070
  webPort,
2495
- webDevCommand: scriptInputs.dev === "bedrock dev" ? "" : scriptInputs.dev,
2496
- webBuildCommand: scriptInputs.build === "bedrock build" ? "" : scriptInputs.build
1071
+ webDevCommand: scriptInputs.dev === "granite dev" ? "" : scriptInputs.dev,
1072
+ webBuildCommand: scriptInputs.build === "granite build" ? "" : scriptInputs.build
2497
1073
  });
2498
- await import_fs4.default.promises.writeFile(import_path3.default.join(cwd, "bedrock.config.ts"), config, {
1074
+ await import_fs3.default.promises.writeFile(import_path2.default.join(cwd, "granite.config.ts"), config, {
2499
1075
  encoding: "utf-8"
2500
1076
  });
2501
1077
  }
2502
1078
  async function templateReactNative({ appName, cwd }) {
2503
- p2.log.step("bedrock.config.ts \uD30C\uC77C\uC744 \uC0DD\uC131\uD558\uB294 \uC911...");
1079
+ p2.log.step("granite.config.ts \uD30C\uC77C\uC744 \uC0DD\uC131\uD558\uB294 \uC911...");
2504
1080
  const config = transformTemplate(REACT_NATIVE_FRAMEWORK_CONFIG_TEMPLATE, {
2505
1081
  appName
2506
1082
  });
2507
- await import_fs4.default.promises.writeFile(import_path3.default.join(cwd, "bedrock.config.ts"), config, {
1083
+ await import_fs3.default.promises.writeFile(import_path2.default.join(cwd, "granite.config.ts"), config, {
2508
1084
  encoding: "utf-8"
2509
1085
  });
2510
1086
  p2.log.step("src/_app.tsx \uD30C\uC77C\uC744 \uC0DD\uC131\uD558\uB294 \uC911...");
2511
- await import_fs4.default.promises.writeFile(import_path3.default.join(cwd, "src", "_app.tsx"), APP_TEMPLATE, {
1087
+ await import_fs3.default.promises.writeFile(import_path2.default.join(cwd, "src", "_app.tsx"), APP_TEMPLATE, {
2512
1088
  encoding: "utf-8"
2513
1089
  });
2514
1090
  }
@@ -2530,8 +1106,8 @@ var InitCommand = class extends import_clipanion2.Command {
2530
1106
  },
2531
1107
  {
2532
1108
  value: "react-native",
2533
- label: "React Native \uD504\uB808\uC784\uC6CC\uD06C (Bedrock)",
2534
- hint: "Bedrock \uD504\uB85C\uC81D\uD2B8\uC5D0 \uC571\uC778\uD1A0\uC2A4 React Native\uC6A9 \uAC1C\uBC1C\uD658\uACBD\uC744 \uC138\uD305\uD569\uB2C8\uB2E4."
1109
+ label: "React Native \uD504\uB808\uC784\uC6CC\uD06C (Granite)",
1110
+ hint: "Granite \uD504\uB85C\uC81D\uD2B8\uC5D0 \uC571\uC778\uD1A0\uC2A4 React Native\uC6A9 \uAC1C\uBC1C\uD658\uACBD\uC744 \uC138\uD305\uD569\uB2C8\uB2E4."
2535
1111
  }
2536
1112
  ]
2537
1113
  })
@@ -2539,7 +1115,7 @@ var InitCommand = class extends import_clipanion2.Command {
2539
1115
  if (p2.isCancel(template)) {
2540
1116
  process.exit(0);
2541
1117
  }
2542
- const cwd = getPackageRoot();
1118
+ const cwd = (0, import_utils2.getPackageRoot)();
2543
1119
  p2.intro("\u{1F680} \uC571 \uCD08\uAE30\uD654\uB97C \uC2DC\uC791\uD569\uB2C8\uB2E4");
2544
1120
  const appName = await ensureSelect({
2545
1121
  value: this.appName,
@@ -2583,14 +1159,276 @@ var InitCommand = class extends import_clipanion2.Command {
2583
1159
  }
2584
1160
  };
2585
1161
 
1162
+ // src/integrations/UploadSentrySourcemap/index.ts
1163
+ init_cjs_shims();
1164
+
1165
+ // src/integrations/UploadSentrySourcemap/UploadSentrySourcemap.ts
1166
+ init_cjs_shims();
1167
+ var fs7 = __toESM(require("fs/promises"), 1);
1168
+ var p3 = __toESM(require("@clack/prompts"), 1);
1169
+ var import_clipanion3 = require("clipanion");
1170
+
1171
+ // src/integrations/UploadSentrySourcemap/downloadArtifacts.ts
1172
+ init_cjs_shims();
1173
+ var fs4 = __toESM(require("fs"), 1);
1174
+ var os = __toESM(require("os"), 1);
1175
+ var path3 = __toESM(require("path"), 1);
1176
+ var import_stream = require("stream");
1177
+ var import_util = require("util");
1178
+ var import_debug4 = __toESM(require_src(), 1);
1179
+ var debug4 = (0, import_debug4.default)("integrations:sentry");
1180
+ var streamPipeline = (0, import_util.promisify)(import_stream.pipeline);
1181
+ async function downloadArtifacts(options) {
1182
+ const { appName, deploymentId, apiKey, baseUrl = DEFAULT_API_BASE_URL } = options;
1183
+ const params = new URLSearchParams({
1184
+ appName,
1185
+ deploymentId
1186
+ });
1187
+ const requestUrl = `${baseUrl}/api-public/v3/openapi/bundles/download?${params.toString()}`;
1188
+ debug4("Request URL", { requestUrl });
1189
+ const response = await fetch(`${baseUrl}/api-public/v3/openapi/bundles/download?${params.toString()}`, {
1190
+ method: "GET",
1191
+ headers: {
1192
+ "Content-Type": "application/json",
1193
+ Authorization: `Bearer ${apiKey}`
1194
+ }
1195
+ });
1196
+ if (!response.ok) {
1197
+ throw new Error(`HTTP ${response.status}: ${response.statusText}`);
1198
+ }
1199
+ if (response.body == null) {
1200
+ throw new Error("No response body");
1201
+ }
1202
+ const tmpDir = await createTempDirectory();
1203
+ const tmpFile = `${deploymentId}.zip`;
1204
+ const tmpFilePath = path3.join(tmpDir.path, tmpFile);
1205
+ const fileStream = fs4.createWriteStream(tmpFilePath);
1206
+ await streamPipeline(response.body, fileStream);
1207
+ debug4("Artifacts downloaded", { tmpFilePath });
1208
+ return tmpFilePath;
1209
+ }
1210
+ function createTempDirectory() {
1211
+ const tempDir = path3.join(os.tmpdir(), "apps-in-toss", "sentry-integration");
1212
+ fs4.mkdirSync(tempDir, { recursive: true });
1213
+ debug4("Temp directory created", { tempDir });
1214
+ return {
1215
+ path: tempDir,
1216
+ cleanup: () => {
1217
+ fs4.rmSync(tempDir, { recursive: true, force: true });
1218
+ }
1219
+ };
1220
+ }
1221
+
1222
+ // src/integrations/UploadSentrySourcemap/extractSentryDebugId.ts
1223
+ init_cjs_shims();
1224
+ var import_promises = __toESM(require("fs/promises"), 1);
1225
+ async function extractSentryDebugId(bundlePath) {
1226
+ const bundleContent = await import_promises.default.readFile(bundlePath, "utf-8");
1227
+ return bundleContent.match(/SENTRY_DEBUG_ID=([\w-]+)/)?.[1];
1228
+ }
1229
+
1230
+ // src/integrations/UploadSentrySourcemap/extractSources.ts
1231
+ init_cjs_shims();
1232
+ var fs6 = __toESM(require("fs"), 1);
1233
+ var path4 = __toESM(require("path"), 1);
1234
+ var import_stream2 = require("stream");
1235
+ var import_util2 = require("util");
1236
+ var zlib = __toESM(require("zlib"), 1);
1237
+ var unzipper = __toESM(require("unzipper"), 1);
1238
+ var pipe = (0, import_util2.promisify)(import_stream2.pipeline);
1239
+ async function extractSources(zipPath) {
1240
+ const sources = {
1241
+ android: {
1242
+ packagerBundle: "",
1243
+ packagerSourceMap: "",
1244
+ hermesBundle: "",
1245
+ hermesSourceMap: ""
1246
+ },
1247
+ ios: {
1248
+ packagerBundle: "",
1249
+ packagerSourceMap: "",
1250
+ hermesBundle: "",
1251
+ hermesSourceMap: ""
1252
+ }
1253
+ };
1254
+ await fs6.createReadStream(zipPath).pipe(unzipper.Parse()).on("entry", async (entry) => {
1255
+ const isRoot = !entry.path.includes("/");
1256
+ const fileName = path4.basename(entry.path);
1257
+ const outputPath = path4.join(path4.dirname(zipPath), fileName);
1258
+ if (isRoot) {
1259
+ entry.pipe(fs6.createWriteStream(outputPath));
1260
+ const platform = fileName.includes("android") ? "android" : "ios";
1261
+ if (fileName.endsWith(".js")) {
1262
+ sources[platform].packagerBundle = outputPath;
1263
+ } else if (fileName.endsWith(".hbc.gz")) {
1264
+ sources[platform].hermesBundle = outputPath;
1265
+ } else if (fileName.endsWith(".js.map")) {
1266
+ sources[platform].packagerSourceMap = outputPath;
1267
+ } else if (fileName.endsWith(".hbc.map")) {
1268
+ sources[platform].hermesSourceMap = outputPath;
1269
+ }
1270
+ } else {
1271
+ entry.autodrain();
1272
+ }
1273
+ }).promise();
1274
+ if (Object.values({ ...sources.android, ...sources.ios }).some((source) => source === "")) {
1275
+ throw new Error("invalid artifact");
1276
+ }
1277
+ const [androidHermesBundle, iosHermesBundle] = await Promise.all([
1278
+ decompressGzip(sources.android.hermesBundle),
1279
+ decompressGzip(sources.ios.hermesBundle)
1280
+ ]);
1281
+ sources.android.hermesBundle = androidHermesBundle;
1282
+ sources.ios.hermesBundle = iosHermesBundle;
1283
+ return sources;
1284
+ }
1285
+ async function decompressGzip(gzFile) {
1286
+ const outfile = gzFile.replace(/\.gz$/g, "");
1287
+ await pipe(fs6.createReadStream(gzFile), zlib.createGunzip(), fs6.createWriteStream(outfile));
1288
+ return outfile;
1289
+ }
1290
+
1291
+ // src/integrations/UploadSentrySourcemap/injectSentryDebugId.ts
1292
+ init_cjs_shims();
1293
+ function injectSentryDebugId(rawSourceMap, debugId) {
1294
+ rawSourceMap.debugId = debugId;
1295
+ return rawSourceMap;
1296
+ }
1297
+
1298
+ // src/integrations/UploadSentrySourcemap/mergeSourcemap.ts
1299
+ init_cjs_shims();
1300
+ var import_source_map = require("source-map");
1301
+ async function mergeSourceMaps(packagerSourceMap, hermesSourceMap) {
1302
+ const packagerMapConsumer = await new import_source_map.SourceMapConsumer(packagerSourceMap);
1303
+ const hermesMapConsumer = await new import_source_map.SourceMapConsumer(hermesSourceMap);
1304
+ const generator = import_source_map.SourceMapGenerator.fromSourceMap(hermesMapConsumer);
1305
+ generator.applySourceMap(packagerMapConsumer, hermesMapConsumer.sources[0]);
1306
+ return generator.toJSON();
1307
+ }
1308
+
1309
+ // src/integrations/UploadSentrySourcemap/uploadSourcemap.ts
1310
+ init_cjs_shims();
1311
+ var import_cli = __toESM(require("@sentry/cli"), 1);
1312
+ function uploadSourcemap(bundlePath, sourcemapPath, options) {
1313
+ const client = new import_cli.default(null, options);
1314
+ return client.execute(["sourcemaps", "upload", "--debug-id-reference", bundlePath, sourcemapPath], true);
1315
+ }
1316
+
1317
+ // src/integrations/UploadSentrySourcemap/UploadSentrySourcemap.ts
1318
+ var UploadSentrySourcemap = class extends import_clipanion3.Command {
1319
+ static paths = [["sentry", "upload-sourcemap"]];
1320
+ apiKey = import_clipanion3.Option.String("--api-key", {
1321
+ required: false,
1322
+ description: "\uC778\uC99D API \uD0A4"
1323
+ });
1324
+ appName = import_clipanion3.Option.String("--app-name", {
1325
+ required: false,
1326
+ description: "\uC571 \uC774\uB984"
1327
+ });
1328
+ deploymentId = import_clipanion3.Option.String("--deployment-id", {
1329
+ required: false,
1330
+ description: "\uBC30\uD3EC ID"
1331
+ });
1332
+ sentryAuthToken = import_clipanion3.Option.String("--sentry-auth-token", {
1333
+ required: false,
1334
+ description: "Sentry \uC778\uC99D\uD0A4"
1335
+ });
1336
+ sentryOrg = import_clipanion3.Option.String("--sentry-org", {
1337
+ required: false,
1338
+ description: "Sentry \uC870\uC9C1"
1339
+ });
1340
+ sentryProject = import_clipanion3.Option.String("--sentry-project", {
1341
+ required: false,
1342
+ description: "Sentry \uD504\uB85C\uC81D\uD2B8"
1343
+ });
1344
+ baseUrl = import_clipanion3.Option.String("--base-url", {
1345
+ description: "API Base URL"
1346
+ });
1347
+ async execute() {
1348
+ const { baseUrl } = this;
1349
+ const apiKey = this.apiKey || await this.promptRequiredValue("password", "\uC571\uC778\uD1A0\uC2A4 API \uD0A4\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694", "API \uD0A4\uB294 \uD544\uC218 \uC785\uB825 \uD56D\uBAA9\uC785\uB2C8\uB2E4.");
1350
+ const appName = this.appName || await this.promptRequiredValue("text", "\uC571 \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694", "\uC571 \uC774\uB984\uC740 \uD544\uC218 \uC785\uB825 \uD56D\uBAA9\uC785\uB2C8\uB2E4.");
1351
+ const deploymentId = this.deploymentId || await this.promptRequiredValue("text", "\uBC30\uD3EC ID\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694", "\uBC30\uD3EC ID\uB294 \uD544\uC218 \uC785\uB825 \uD56D\uBAA9\uC785\uB2C8\uB2E4.");
1352
+ const sentryAuthToken = this.sentryAuthToken || process.env.SENTRY_AUTH_TOKEN || await this.promptRequiredValue("password", "Sentry \uC778\uC99D\uD0A4\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694", "\uC778\uC99D\uD0A4\uB294 \uD544\uC218 \uC785\uB825 \uD56D\uBAA9\uC785\uB2C8\uB2E4.");
1353
+ const sentryOrg = this.sentryOrg || process.env.SENTRY_ORG || await this.promptRequiredValue("text", "Sentry \uC870\uC9C1\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694", "\uC870\uC9C1\uC740 \uD544\uC218 \uC785\uB825 \uD56D\uBAA9\uC785\uB2C8\uB2E4.");
1354
+ const sentryProject = this.sentryProject || process.env.SENTRY_PROJECT || await this.promptRequiredValue("text", "Sentry \uD504\uB85C\uC81D\uD2B8\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694", "\uD504\uB85C\uC81D\uD2B8\uB294 \uD544\uC218 \uC785\uB825 \uD56D\uBAA9\uC785\uB2C8\uB2E4.");
1355
+ try {
1356
+ const zipPath = await downloadArtifacts({ apiKey, appName, deploymentId, baseUrl });
1357
+ const sources = await extractSources(zipPath);
1358
+ await p3.tasks([
1359
+ {
1360
+ title: "Android \uC18C\uC2A4\uB9F5 \uC5C5\uB85C\uB4DC \uC911...",
1361
+ task: async () => {
1362
+ await this.prepareSourceMapForUpload(sources.android);
1363
+ await uploadSourcemap(sources.android.hermesBundle, sources.android.hermesSourceMap, {
1364
+ authToken: sentryAuthToken,
1365
+ org: sentryOrg,
1366
+ project: sentryProject
1367
+ });
1368
+ return "Android \uC18C\uC2A4\uB9F5 \uC5C5\uB85C\uB4DC \uC644\uB8CC";
1369
+ }
1370
+ },
1371
+ {
1372
+ title: "iOS \uC18C\uC2A4\uB9F5 \uC5C5\uB85C\uB4DC \uC911...",
1373
+ task: async () => {
1374
+ await this.prepareSourceMapForUpload(sources.ios);
1375
+ await uploadSourcemap(sources.ios.hermesBundle, sources.ios.hermesSourceMap, {
1376
+ authToken: sentryAuthToken,
1377
+ org: sentryOrg,
1378
+ project: sentryProject
1379
+ });
1380
+ return "iOS \uC18C\uC2A4\uB9F5 \uC5C5\uB85C\uB4DC \uC644\uB8CC";
1381
+ }
1382
+ }
1383
+ ]);
1384
+ p3.outro("Sentry \uC18C\uC2A4\uB9F5 \uC5C5\uB85C\uB4DC \uC644\uB8CC");
1385
+ } catch (error) {
1386
+ if (error instanceof Error) {
1387
+ p3.log.error(error.message);
1388
+ } else {
1389
+ console.error(error);
1390
+ }
1391
+ process.exit(1);
1392
+ }
1393
+ }
1394
+ async prepareSourceMapForUpload(sources) {
1395
+ const debugId = await extractSentryDebugId(sources.packagerBundle);
1396
+ if (debugId == null) {
1397
+ throw new Error("Sentry Debug ID\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
1398
+ }
1399
+ const mergedSourceMap = await mergeSourceMaps(
1400
+ await fs7.readFile(sources.packagerSourceMap, "utf-8"),
1401
+ await fs7.readFile(sources.hermesSourceMap, "utf-8")
1402
+ );
1403
+ const injectedSourceMap = injectSentryDebugId(mergedSourceMap, debugId);
1404
+ await fs7.writeFile(sources.hermesSourceMap, JSON.stringify(injectedSourceMap, null, 2), "utf-8");
1405
+ }
1406
+ async promptRequiredValue(type, message, validateMessage) {
1407
+ const result = await p3[type]({
1408
+ message,
1409
+ validate: (value) => {
1410
+ if (value.length === 0) {
1411
+ return validateMessage;
1412
+ }
1413
+ return;
1414
+ }
1415
+ });
1416
+ if (p3.isCancel(result)) {
1417
+ throw new Error("\uC791\uC5C5\uC774 \uCDE8\uC18C\uB418\uC5C8\uC5B4\uC694.");
1418
+ }
1419
+ return result;
1420
+ }
1421
+ };
1422
+
2586
1423
  // src/index.ts
2587
1424
  function initialize() {
2588
- const cli = new import_clipanion3.Cli({
1425
+ const cli = new import_clipanion4.Cli({
2589
1426
  binaryLabel: "ait",
2590
1427
  binaryName: "ait"
2591
1428
  });
2592
1429
  cli.register(DeployCommand);
2593
1430
  cli.register(InitCommand);
1431
+ cli.register(UploadSentrySourcemap);
2594
1432
  cli.runExit(process.argv.slice(2));
2595
1433
  }
2596
1434
  // Annotate the CommonJS export names for ESM import in node: