@apps-in-toss/cli 1.10.1 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +121 -111
- package/dist/index.js +121 -111
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -40,6 +40,80 @@ var init_cjs_shims = __esm({
|
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
+
// ../../../.yarn/cache/picocolors-npm-1.1.1-b0c45fa35e-e2e3e8170a.zip/node_modules/picocolors/picocolors.js
|
|
44
|
+
var require_picocolors = __commonJS({
|
|
45
|
+
"../../../.yarn/cache/picocolors-npm-1.1.1-b0c45fa35e-e2e3e8170a.zip/node_modules/picocolors/picocolors.js"(exports2, module2) {
|
|
46
|
+
"use strict";
|
|
47
|
+
init_cjs_shims();
|
|
48
|
+
var p5 = process || {};
|
|
49
|
+
var argv = p5.argv || [];
|
|
50
|
+
var env = p5.env || {};
|
|
51
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p5.platform === "win32" || (p5.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
52
|
+
var formatter = (open, close, replace = open) => (input) => {
|
|
53
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
54
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
55
|
+
};
|
|
56
|
+
var replaceClose = (string, close, replace, index) => {
|
|
57
|
+
let result = "", cursor = 0;
|
|
58
|
+
do {
|
|
59
|
+
result += string.substring(cursor, index) + replace;
|
|
60
|
+
cursor = index + close.length;
|
|
61
|
+
index = string.indexOf(close, cursor);
|
|
62
|
+
} while (~index);
|
|
63
|
+
return result + string.substring(cursor);
|
|
64
|
+
};
|
|
65
|
+
var createColors = (enabled = isColorSupported) => {
|
|
66
|
+
let f = enabled ? formatter : () => String;
|
|
67
|
+
return {
|
|
68
|
+
isColorSupported: enabled,
|
|
69
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
70
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
71
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
72
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
73
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
74
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
75
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
76
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
77
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
78
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
79
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
80
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
81
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
82
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
83
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
84
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
85
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
86
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
87
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
88
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
89
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
90
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
91
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
92
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
93
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
94
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
95
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
96
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
97
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
98
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
99
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
100
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
101
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
102
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
103
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
104
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
105
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
106
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
107
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
108
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
109
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
module2.exports = createColors();
|
|
113
|
+
module2.exports.createColors = createColors;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
43
117
|
// ../../../.yarn/cache/ms-npm-2.1.3-eae95409bd-d924b57e73.zip/node_modules/ms/index.js
|
|
44
118
|
var require_ms = __commonJS({
|
|
45
119
|
"../../../.yarn/cache/ms-npm-2.1.3-eae95409bd-d924b57e73.zip/node_modules/ms/index.js"(exports2, module2) {
|
|
@@ -192,11 +266,11 @@ var require_common = __commonJS({
|
|
|
192
266
|
let enableOverride = null;
|
|
193
267
|
let namespacesCache;
|
|
194
268
|
let enabledCache;
|
|
195
|
-
function
|
|
196
|
-
if (!
|
|
269
|
+
function debug5(...args) {
|
|
270
|
+
if (!debug5.enabled) {
|
|
197
271
|
return;
|
|
198
272
|
}
|
|
199
|
-
const self =
|
|
273
|
+
const self = debug5;
|
|
200
274
|
const curr = Number(/* @__PURE__ */ new Date());
|
|
201
275
|
const ms = curr - (prevTime || curr);
|
|
202
276
|
self.diff = ms;
|
|
@@ -226,12 +300,12 @@ var require_common = __commonJS({
|
|
|
226
300
|
const logFn = self.log || createDebug.log;
|
|
227
301
|
logFn.apply(self, args);
|
|
228
302
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
Object.defineProperty(
|
|
303
|
+
debug5.namespace = namespace;
|
|
304
|
+
debug5.useColors = createDebug.useColors();
|
|
305
|
+
debug5.color = createDebug.selectColor(namespace);
|
|
306
|
+
debug5.extend = extend;
|
|
307
|
+
debug5.destroy = createDebug.destroy;
|
|
308
|
+
Object.defineProperty(debug5, "enabled", {
|
|
235
309
|
enumerable: true,
|
|
236
310
|
configurable: false,
|
|
237
311
|
get: () => {
|
|
@@ -249,9 +323,9 @@ var require_common = __commonJS({
|
|
|
249
323
|
}
|
|
250
324
|
});
|
|
251
325
|
if (typeof createDebug.init === "function") {
|
|
252
|
-
createDebug.init(
|
|
326
|
+
createDebug.init(debug5);
|
|
253
327
|
}
|
|
254
|
-
return
|
|
328
|
+
return debug5;
|
|
255
329
|
}
|
|
256
330
|
function extend(namespace, delimiter) {
|
|
257
331
|
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
@@ -665,11 +739,11 @@ var require_node = __commonJS({
|
|
|
665
739
|
function load() {
|
|
666
740
|
return process.env.DEBUG;
|
|
667
741
|
}
|
|
668
|
-
function init(
|
|
669
|
-
|
|
742
|
+
function init(debug5) {
|
|
743
|
+
debug5.inspectOpts = {};
|
|
670
744
|
const keys = Object.keys(exports2.inspectOpts);
|
|
671
745
|
for (let i = 0; i < keys.length; i++) {
|
|
672
|
-
|
|
746
|
+
debug5.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
|
|
673
747
|
}
|
|
674
748
|
}
|
|
675
749
|
module2.exports = require_common()(exports2);
|
|
@@ -698,80 +772,6 @@ var require_src = __commonJS({
|
|
|
698
772
|
}
|
|
699
773
|
});
|
|
700
774
|
|
|
701
|
-
// ../../../.yarn/cache/picocolors-npm-1.1.1-b0c45fa35e-e2e3e8170a.zip/node_modules/picocolors/picocolors.js
|
|
702
|
-
var require_picocolors = __commonJS({
|
|
703
|
-
"../../../.yarn/cache/picocolors-npm-1.1.1-b0c45fa35e-e2e3e8170a.zip/node_modules/picocolors/picocolors.js"(exports2, module2) {
|
|
704
|
-
"use strict";
|
|
705
|
-
init_cjs_shims();
|
|
706
|
-
var p5 = process || {};
|
|
707
|
-
var argv = p5.argv || [];
|
|
708
|
-
var env = p5.env || {};
|
|
709
|
-
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p5.platform === "win32" || (p5.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
710
|
-
var formatter = (open, close, replace = open) => (input) => {
|
|
711
|
-
let string = "" + input, index = string.indexOf(close, open.length);
|
|
712
|
-
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
713
|
-
};
|
|
714
|
-
var replaceClose = (string, close, replace, index) => {
|
|
715
|
-
let result = "", cursor = 0;
|
|
716
|
-
do {
|
|
717
|
-
result += string.substring(cursor, index) + replace;
|
|
718
|
-
cursor = index + close.length;
|
|
719
|
-
index = string.indexOf(close, cursor);
|
|
720
|
-
} while (~index);
|
|
721
|
-
return result + string.substring(cursor);
|
|
722
|
-
};
|
|
723
|
-
var createColors = (enabled = isColorSupported) => {
|
|
724
|
-
let f = enabled ? formatter : () => String;
|
|
725
|
-
return {
|
|
726
|
-
isColorSupported: enabled,
|
|
727
|
-
reset: f("\x1B[0m", "\x1B[0m"),
|
|
728
|
-
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
729
|
-
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
730
|
-
italic: f("\x1B[3m", "\x1B[23m"),
|
|
731
|
-
underline: f("\x1B[4m", "\x1B[24m"),
|
|
732
|
-
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
733
|
-
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
734
|
-
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
735
|
-
black: f("\x1B[30m", "\x1B[39m"),
|
|
736
|
-
red: f("\x1B[31m", "\x1B[39m"),
|
|
737
|
-
green: f("\x1B[32m", "\x1B[39m"),
|
|
738
|
-
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
739
|
-
blue: f("\x1B[34m", "\x1B[39m"),
|
|
740
|
-
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
741
|
-
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
742
|
-
white: f("\x1B[37m", "\x1B[39m"),
|
|
743
|
-
gray: f("\x1B[90m", "\x1B[39m"),
|
|
744
|
-
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
745
|
-
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
746
|
-
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
747
|
-
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
748
|
-
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
749
|
-
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
750
|
-
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
751
|
-
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
752
|
-
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
753
|
-
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
754
|
-
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
755
|
-
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
756
|
-
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
757
|
-
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
758
|
-
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
759
|
-
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
760
|
-
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
761
|
-
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
762
|
-
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
763
|
-
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
764
|
-
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
765
|
-
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
766
|
-
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
767
|
-
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
768
|
-
};
|
|
769
|
-
};
|
|
770
|
-
module2.exports = createColors();
|
|
771
|
-
module2.exports.createColors = createColors;
|
|
772
|
-
}
|
|
773
|
-
});
|
|
774
|
-
|
|
775
775
|
// src/index.ts
|
|
776
776
|
var src_exports = {};
|
|
777
777
|
__export(src_exports, {
|
|
@@ -786,10 +786,10 @@ init_cjs_shims();
|
|
|
786
786
|
var import_assert = __toESM(require("assert"), 1);
|
|
787
787
|
var import_fs3 = __toESM(require("fs"), 1);
|
|
788
788
|
var import_path2 = __toESM(require("path"), 1);
|
|
789
|
+
var import_ait_format = require("@apps-in-toss/ait-format");
|
|
789
790
|
var p = __toESM(require("@clack/prompts"), 1);
|
|
790
791
|
var import_utils = require("@granite-js/utils");
|
|
791
792
|
var import_clipanion = require("clipanion");
|
|
792
|
-
var import_debug3 = __toESM(require_src(), 1);
|
|
793
793
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
794
794
|
|
|
795
795
|
// src/utils/TokenStorage.ts
|
|
@@ -1017,7 +1017,6 @@ function checkBundleStatus(delayMs = 1e4, maxRetries = 10) {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
|
|
1019
1019
|
// src/DeployCommand.ts
|
|
1020
|
-
var debug3 = (0, import_debug3.default)("cli:deploy");
|
|
1021
1020
|
var DeployCommand = class extends import_clipanion.Command {
|
|
1022
1021
|
static paths = [["deploy"]];
|
|
1023
1022
|
apiKey = import_clipanion.Option.String("--api-key", {
|
|
@@ -1056,17 +1055,28 @@ var DeployCommand = class extends import_clipanion.Command {
|
|
|
1056
1055
|
}
|
|
1057
1056
|
try {
|
|
1058
1057
|
const resolvedArtifactPath = this.getArtifactPath(this.location);
|
|
1059
|
-
const
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1058
|
+
const buffer = import_fs3.default.readFileSync(resolvedArtifactPath);
|
|
1059
|
+
const format = import_ait_format.AppsInTossBundle.detect(buffer);
|
|
1060
|
+
const { appName, deploymentId } = await (async () => {
|
|
1061
|
+
if (format === import_ait_format.AppsInTossBundle.Format.AIT) {
|
|
1062
|
+
const reader = import_ait_format.AppsInTossBundle.reader(buffer);
|
|
1063
|
+
const appName2 = reader.appName;
|
|
1064
|
+
const deploymentId2 = reader.deploymentId;
|
|
1065
|
+
(0, import_assert.default)(typeof appName2 === "string", "ait \uD30C\uC77C\uC5D0 appName\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
|
|
1066
|
+
(0, import_assert.default)(typeof deploymentId2 === "string", "ait \uD30C\uC77C\uC5D0 deploymentId\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4");
|
|
1067
|
+
return { appName: appName2, deploymentId: deploymentId2 };
|
|
1068
|
+
} else if (format === import_ait_format.AppsInTossBundle.Format.ZIP) {
|
|
1069
|
+
const rawAppManifest = await (0, import_utils.readZipContent)(resolvedArtifactPath, APP_MANIFEST_NAME);
|
|
1070
|
+
const appManifest = JSON.parse(rawAppManifest);
|
|
1071
|
+
const appName2 = appManifest.appName;
|
|
1072
|
+
const deploymentId2 = appManifest._metadata.deploymentId;
|
|
1073
|
+
(0, import_assert.default)(typeof appName2 === "string", "app.json \uD30C\uC77C\uC5D0 appName\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
|
|
1074
|
+
(0, import_assert.default)(typeof deploymentId2 === "string", "app.json \uD30C\uC77C\uC5D0 deploymentId\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4");
|
|
1075
|
+
return { appName: appName2, deploymentId: deploymentId2 };
|
|
1076
|
+
} else {
|
|
1077
|
+
throw new Error("\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uD30C\uC77C \uD615\uC2DD\uC785\uB2C8\uB2E4");
|
|
1078
|
+
}
|
|
1079
|
+
})();
|
|
1070
1080
|
const colorAppName = this.decorate(appName, import_picocolors.default.cyan);
|
|
1071
1081
|
if (this.schemeOnly) {
|
|
1072
1082
|
await uploadArtifact({
|
|
@@ -1998,8 +2008,8 @@ var MigrateCommand = class extends import_clipanion3.Command {
|
|
|
1998
2008
|
init_cjs_shims();
|
|
1999
2009
|
var p3 = __toESM(require("@clack/prompts"), 1);
|
|
2000
2010
|
var import_clipanion4 = require("clipanion");
|
|
2001
|
-
var
|
|
2002
|
-
var
|
|
2011
|
+
var import_debug3 = __toESM(require_src(), 1);
|
|
2012
|
+
var debug3 = (0, import_debug3.default)("cli:token");
|
|
2003
2013
|
var TokenCommand = class extends import_clipanion4.Command {
|
|
2004
2014
|
static paths = [["token"]];
|
|
2005
2015
|
static usage = import_clipanion4.Command.Usage({
|
|
@@ -2010,7 +2020,7 @@ var TokenCommand = class extends import_clipanion4.Command {
|
|
|
2010
2020
|
]
|
|
2011
2021
|
});
|
|
2012
2022
|
async execute() {
|
|
2013
|
-
|
|
2023
|
+
debug3("execute");
|
|
2014
2024
|
}
|
|
2015
2025
|
};
|
|
2016
2026
|
var TokenAddCommand = class extends import_clipanion4.Command {
|
|
@@ -2039,7 +2049,7 @@ var TokenAddCommand = class extends import_clipanion4.Command {
|
|
|
2039
2049
|
return;
|
|
2040
2050
|
}
|
|
2041
2051
|
TokenStorage.set(profile, secret);
|
|
2042
|
-
|
|
2052
|
+
debug3("token add", { profile });
|
|
2043
2053
|
this.context.stdout.write(`${profile} \uD504\uB85C\uD544\uB85C\uC758 \uC694\uCCAD\uC740 \uC774\uC81C \uBE44\uBC00 \uD1A0\uD070\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC778\uC99D\uB429\uB2C8\uB2E4.
|
|
2044
2054
|
`);
|
|
2045
2055
|
}
|
|
@@ -2057,7 +2067,7 @@ var TokenRemoveCommand = class extends import_clipanion4.Command {
|
|
|
2057
2067
|
async execute() {
|
|
2058
2068
|
const profile = this.profile || "default";
|
|
2059
2069
|
const removed = TokenStorage.delete(profile);
|
|
2060
|
-
|
|
2070
|
+
debug3("token remove", { profile });
|
|
2061
2071
|
if (removed) {
|
|
2062
2072
|
this.context.stdout.write(`\uD1A0\uD070\uC744 \uC81C\uAC70\uD588\uC2B5\uB2C8\uB2E4: ${profile}.
|
|
2063
2073
|
`);
|
|
@@ -2084,8 +2094,8 @@ var os2 = __toESM(require("os"), 1);
|
|
|
2084
2094
|
var path4 = __toESM(require("path"), 1);
|
|
2085
2095
|
var import_stream = require("stream");
|
|
2086
2096
|
var import_util = require("util");
|
|
2087
|
-
var
|
|
2088
|
-
var
|
|
2097
|
+
var import_debug4 = __toESM(require_src(), 1);
|
|
2098
|
+
var debug4 = (0, import_debug4.default)("integrations:sentry");
|
|
2089
2099
|
var streamPipeline = (0, import_util.promisify)(import_stream.pipeline);
|
|
2090
2100
|
async function downloadArtifacts(options) {
|
|
2091
2101
|
const { appName, deploymentId, apiKey, baseUrl = DEFAULT_API_BASE_URL } = options;
|
|
@@ -2094,7 +2104,7 @@ async function downloadArtifacts(options) {
|
|
|
2094
2104
|
deploymentId
|
|
2095
2105
|
});
|
|
2096
2106
|
const requestUrl = `${baseUrl}/api-public/v3/openapi/bundles/download?${params.toString()}`;
|
|
2097
|
-
|
|
2107
|
+
debug4("Request URL", { requestUrl });
|
|
2098
2108
|
const response = await fetch(`${baseUrl}/api-public/v3/openapi/bundles/download?${params.toString()}`, {
|
|
2099
2109
|
method: "GET",
|
|
2100
2110
|
headers: {
|
|
@@ -2113,13 +2123,13 @@ async function downloadArtifacts(options) {
|
|
|
2113
2123
|
const tmpFilePath = path4.join(tmpDir.path, tmpFile);
|
|
2114
2124
|
const fileStream = fs7.createWriteStream(tmpFilePath);
|
|
2115
2125
|
await streamPipeline(response.body, fileStream);
|
|
2116
|
-
|
|
2126
|
+
debug4("Artifacts downloaded", { tmpFilePath });
|
|
2117
2127
|
return tmpFilePath;
|
|
2118
2128
|
}
|
|
2119
2129
|
function createTempDirectory() {
|
|
2120
2130
|
const tempDir = path4.join(os2.tmpdir(), "apps-in-toss", "sentry-integration");
|
|
2121
2131
|
fs7.mkdirSync(tempDir, { recursive: true });
|
|
2122
|
-
|
|
2132
|
+
debug4("Temp directory created", { tempDir });
|
|
2123
2133
|
return {
|
|
2124
2134
|
path: tempDir,
|
|
2125
2135
|
cleanup: () => {
|
package/dist/index.js
CHANGED
|
@@ -41,6 +41,80 @@ var init_esm_shims = __esm({
|
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
+
// ../../../.yarn/cache/picocolors-npm-1.1.1-b0c45fa35e-e2e3e8170a.zip/node_modules/picocolors/picocolors.js
|
|
45
|
+
var require_picocolors = __commonJS({
|
|
46
|
+
"../../../.yarn/cache/picocolors-npm-1.1.1-b0c45fa35e-e2e3e8170a.zip/node_modules/picocolors/picocolors.js"(exports, module) {
|
|
47
|
+
"use strict";
|
|
48
|
+
init_esm_shims();
|
|
49
|
+
var p5 = process || {};
|
|
50
|
+
var argv = p5.argv || [];
|
|
51
|
+
var env = p5.env || {};
|
|
52
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p5.platform === "win32" || (p5.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
53
|
+
var formatter = (open, close, replace = open) => (input) => {
|
|
54
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
55
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
56
|
+
};
|
|
57
|
+
var replaceClose = (string, close, replace, index) => {
|
|
58
|
+
let result = "", cursor = 0;
|
|
59
|
+
do {
|
|
60
|
+
result += string.substring(cursor, index) + replace;
|
|
61
|
+
cursor = index + close.length;
|
|
62
|
+
index = string.indexOf(close, cursor);
|
|
63
|
+
} while (~index);
|
|
64
|
+
return result + string.substring(cursor);
|
|
65
|
+
};
|
|
66
|
+
var createColors = (enabled = isColorSupported) => {
|
|
67
|
+
let f = enabled ? formatter : () => String;
|
|
68
|
+
return {
|
|
69
|
+
isColorSupported: enabled,
|
|
70
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
71
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
72
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
73
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
74
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
75
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
76
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
77
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
78
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
79
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
80
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
81
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
82
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
83
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
84
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
85
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
86
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
87
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
88
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
89
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
90
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
91
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
92
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
93
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
94
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
95
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
96
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
97
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
98
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
99
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
100
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
101
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
102
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
103
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
104
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
105
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
106
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
107
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
108
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
109
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
110
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
module.exports = createColors();
|
|
114
|
+
module.exports.createColors = createColors;
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
|
|
44
118
|
// ../../../.yarn/cache/ms-npm-2.1.3-eae95409bd-d924b57e73.zip/node_modules/ms/index.js
|
|
45
119
|
var require_ms = __commonJS({
|
|
46
120
|
"../../../.yarn/cache/ms-npm-2.1.3-eae95409bd-d924b57e73.zip/node_modules/ms/index.js"(exports, module) {
|
|
@@ -193,11 +267,11 @@ var require_common = __commonJS({
|
|
|
193
267
|
let enableOverride = null;
|
|
194
268
|
let namespacesCache;
|
|
195
269
|
let enabledCache;
|
|
196
|
-
function
|
|
197
|
-
if (!
|
|
270
|
+
function debug5(...args) {
|
|
271
|
+
if (!debug5.enabled) {
|
|
198
272
|
return;
|
|
199
273
|
}
|
|
200
|
-
const self =
|
|
274
|
+
const self = debug5;
|
|
201
275
|
const curr = Number(/* @__PURE__ */ new Date());
|
|
202
276
|
const ms = curr - (prevTime || curr);
|
|
203
277
|
self.diff = ms;
|
|
@@ -227,12 +301,12 @@ var require_common = __commonJS({
|
|
|
227
301
|
const logFn = self.log || createDebug.log;
|
|
228
302
|
logFn.apply(self, args);
|
|
229
303
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
Object.defineProperty(
|
|
304
|
+
debug5.namespace = namespace;
|
|
305
|
+
debug5.useColors = createDebug.useColors();
|
|
306
|
+
debug5.color = createDebug.selectColor(namespace);
|
|
307
|
+
debug5.extend = extend;
|
|
308
|
+
debug5.destroy = createDebug.destroy;
|
|
309
|
+
Object.defineProperty(debug5, "enabled", {
|
|
236
310
|
enumerable: true,
|
|
237
311
|
configurable: false,
|
|
238
312
|
get: () => {
|
|
@@ -250,9 +324,9 @@ var require_common = __commonJS({
|
|
|
250
324
|
}
|
|
251
325
|
});
|
|
252
326
|
if (typeof createDebug.init === "function") {
|
|
253
|
-
createDebug.init(
|
|
327
|
+
createDebug.init(debug5);
|
|
254
328
|
}
|
|
255
|
-
return
|
|
329
|
+
return debug5;
|
|
256
330
|
}
|
|
257
331
|
function extend(namespace, delimiter) {
|
|
258
332
|
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
@@ -666,11 +740,11 @@ var require_node = __commonJS({
|
|
|
666
740
|
function load() {
|
|
667
741
|
return process.env.DEBUG;
|
|
668
742
|
}
|
|
669
|
-
function init(
|
|
670
|
-
|
|
743
|
+
function init(debug5) {
|
|
744
|
+
debug5.inspectOpts = {};
|
|
671
745
|
const keys = Object.keys(exports.inspectOpts);
|
|
672
746
|
for (let i = 0; i < keys.length; i++) {
|
|
673
|
-
|
|
747
|
+
debug5.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
674
748
|
}
|
|
675
749
|
}
|
|
676
750
|
module.exports = require_common()(exports);
|
|
@@ -699,91 +773,17 @@ var require_src = __commonJS({
|
|
|
699
773
|
}
|
|
700
774
|
});
|
|
701
775
|
|
|
702
|
-
// ../../../.yarn/cache/picocolors-npm-1.1.1-b0c45fa35e-e2e3e8170a.zip/node_modules/picocolors/picocolors.js
|
|
703
|
-
var require_picocolors = __commonJS({
|
|
704
|
-
"../../../.yarn/cache/picocolors-npm-1.1.1-b0c45fa35e-e2e3e8170a.zip/node_modules/picocolors/picocolors.js"(exports, module) {
|
|
705
|
-
"use strict";
|
|
706
|
-
init_esm_shims();
|
|
707
|
-
var p5 = process || {};
|
|
708
|
-
var argv = p5.argv || [];
|
|
709
|
-
var env = p5.env || {};
|
|
710
|
-
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p5.platform === "win32" || (p5.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
711
|
-
var formatter = (open, close, replace = open) => (input) => {
|
|
712
|
-
let string = "" + input, index = string.indexOf(close, open.length);
|
|
713
|
-
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
714
|
-
};
|
|
715
|
-
var replaceClose = (string, close, replace, index) => {
|
|
716
|
-
let result = "", cursor = 0;
|
|
717
|
-
do {
|
|
718
|
-
result += string.substring(cursor, index) + replace;
|
|
719
|
-
cursor = index + close.length;
|
|
720
|
-
index = string.indexOf(close, cursor);
|
|
721
|
-
} while (~index);
|
|
722
|
-
return result + string.substring(cursor);
|
|
723
|
-
};
|
|
724
|
-
var createColors = (enabled = isColorSupported) => {
|
|
725
|
-
let f = enabled ? formatter : () => String;
|
|
726
|
-
return {
|
|
727
|
-
isColorSupported: enabled,
|
|
728
|
-
reset: f("\x1B[0m", "\x1B[0m"),
|
|
729
|
-
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
730
|
-
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
731
|
-
italic: f("\x1B[3m", "\x1B[23m"),
|
|
732
|
-
underline: f("\x1B[4m", "\x1B[24m"),
|
|
733
|
-
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
734
|
-
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
735
|
-
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
736
|
-
black: f("\x1B[30m", "\x1B[39m"),
|
|
737
|
-
red: f("\x1B[31m", "\x1B[39m"),
|
|
738
|
-
green: f("\x1B[32m", "\x1B[39m"),
|
|
739
|
-
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
740
|
-
blue: f("\x1B[34m", "\x1B[39m"),
|
|
741
|
-
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
742
|
-
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
743
|
-
white: f("\x1B[37m", "\x1B[39m"),
|
|
744
|
-
gray: f("\x1B[90m", "\x1B[39m"),
|
|
745
|
-
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
746
|
-
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
747
|
-
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
748
|
-
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
749
|
-
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
750
|
-
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
751
|
-
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
752
|
-
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
753
|
-
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
754
|
-
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
755
|
-
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
756
|
-
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
757
|
-
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
758
|
-
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
759
|
-
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
760
|
-
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
761
|
-
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
762
|
-
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
763
|
-
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
764
|
-
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
765
|
-
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
766
|
-
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
767
|
-
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
768
|
-
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
769
|
-
};
|
|
770
|
-
};
|
|
771
|
-
module.exports = createColors();
|
|
772
|
-
module.exports.createColors = createColors;
|
|
773
|
-
}
|
|
774
|
-
});
|
|
775
|
-
|
|
776
776
|
// src/index.ts
|
|
777
777
|
init_esm_shims();
|
|
778
778
|
import { Cli, Builtins } from "clipanion";
|
|
779
779
|
|
|
780
780
|
// src/DeployCommand.ts
|
|
781
781
|
init_esm_shims();
|
|
782
|
-
var import_debug3 = __toESM(require_src(), 1);
|
|
783
782
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
784
783
|
import assert from "assert";
|
|
785
784
|
import fs3 from "fs";
|
|
786
785
|
import path2 from "path";
|
|
786
|
+
import { AppsInTossBundle } from "@apps-in-toss/ait-format";
|
|
787
787
|
import * as p from "@clack/prompts";
|
|
788
788
|
import { getPackageRoot, readZipContent } from "@granite-js/utils";
|
|
789
789
|
import { Command, Option } from "clipanion";
|
|
@@ -1013,7 +1013,6 @@ function checkBundleStatus(delayMs = 1e4, maxRetries = 10) {
|
|
|
1013
1013
|
}
|
|
1014
1014
|
|
|
1015
1015
|
// src/DeployCommand.ts
|
|
1016
|
-
var debug3 = (0, import_debug3.default)("cli:deploy");
|
|
1017
1016
|
var DeployCommand = class extends Command {
|
|
1018
1017
|
static paths = [["deploy"]];
|
|
1019
1018
|
apiKey = Option.String("--api-key", {
|
|
@@ -1052,17 +1051,28 @@ var DeployCommand = class extends Command {
|
|
|
1052
1051
|
}
|
|
1053
1052
|
try {
|
|
1054
1053
|
const resolvedArtifactPath = this.getArtifactPath(this.location);
|
|
1055
|
-
const
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1054
|
+
const buffer = fs3.readFileSync(resolvedArtifactPath);
|
|
1055
|
+
const format = AppsInTossBundle.detect(buffer);
|
|
1056
|
+
const { appName, deploymentId } = await (async () => {
|
|
1057
|
+
if (format === AppsInTossBundle.Format.AIT) {
|
|
1058
|
+
const reader = AppsInTossBundle.reader(buffer);
|
|
1059
|
+
const appName2 = reader.appName;
|
|
1060
|
+
const deploymentId2 = reader.deploymentId;
|
|
1061
|
+
assert(typeof appName2 === "string", "ait \uD30C\uC77C\uC5D0 appName\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
|
|
1062
|
+
assert(typeof deploymentId2 === "string", "ait \uD30C\uC77C\uC5D0 deploymentId\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4");
|
|
1063
|
+
return { appName: appName2, deploymentId: deploymentId2 };
|
|
1064
|
+
} else if (format === AppsInTossBundle.Format.ZIP) {
|
|
1065
|
+
const rawAppManifest = await readZipContent(resolvedArtifactPath, APP_MANIFEST_NAME);
|
|
1066
|
+
const appManifest = JSON.parse(rawAppManifest);
|
|
1067
|
+
const appName2 = appManifest.appName;
|
|
1068
|
+
const deploymentId2 = appManifest._metadata.deploymentId;
|
|
1069
|
+
assert(typeof appName2 === "string", "app.json \uD30C\uC77C\uC5D0 appName\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
|
|
1070
|
+
assert(typeof deploymentId2 === "string", "app.json \uD30C\uC77C\uC5D0 deploymentId\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4");
|
|
1071
|
+
return { appName: appName2, deploymentId: deploymentId2 };
|
|
1072
|
+
} else {
|
|
1073
|
+
throw new Error("\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uD30C\uC77C \uD615\uC2DD\uC785\uB2C8\uB2E4");
|
|
1074
|
+
}
|
|
1075
|
+
})();
|
|
1066
1076
|
const colorAppName = this.decorate(appName, import_picocolors.default.cyan);
|
|
1067
1077
|
if (this.schemeOnly) {
|
|
1068
1078
|
await uploadArtifact({
|
|
@@ -1992,10 +2002,10 @@ var MigrateCommand = class extends Command3 {
|
|
|
1992
2002
|
|
|
1993
2003
|
// src/TokenCommand.ts
|
|
1994
2004
|
init_esm_shims();
|
|
1995
|
-
var
|
|
2005
|
+
var import_debug3 = __toESM(require_src(), 1);
|
|
1996
2006
|
import * as p3 from "@clack/prompts";
|
|
1997
2007
|
import { Command as Command4, Option as Option4 } from "clipanion";
|
|
1998
|
-
var
|
|
2008
|
+
var debug3 = (0, import_debug3.default)("cli:token");
|
|
1999
2009
|
var TokenCommand = class extends Command4 {
|
|
2000
2010
|
static paths = [["token"]];
|
|
2001
2011
|
static usage = Command4.Usage({
|
|
@@ -2006,7 +2016,7 @@ var TokenCommand = class extends Command4 {
|
|
|
2006
2016
|
]
|
|
2007
2017
|
});
|
|
2008
2018
|
async execute() {
|
|
2009
|
-
|
|
2019
|
+
debug3("execute");
|
|
2010
2020
|
}
|
|
2011
2021
|
};
|
|
2012
2022
|
var TokenAddCommand = class extends Command4 {
|
|
@@ -2035,7 +2045,7 @@ var TokenAddCommand = class extends Command4 {
|
|
|
2035
2045
|
return;
|
|
2036
2046
|
}
|
|
2037
2047
|
TokenStorage.set(profile, secret);
|
|
2038
|
-
|
|
2048
|
+
debug3("token add", { profile });
|
|
2039
2049
|
this.context.stdout.write(`${profile} \uD504\uB85C\uD544\uB85C\uC758 \uC694\uCCAD\uC740 \uC774\uC81C \uBE44\uBC00 \uD1A0\uD070\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC778\uC99D\uB429\uB2C8\uB2E4.
|
|
2040
2050
|
`);
|
|
2041
2051
|
}
|
|
@@ -2053,7 +2063,7 @@ var TokenRemoveCommand = class extends Command4 {
|
|
|
2053
2063
|
async execute() {
|
|
2054
2064
|
const profile = this.profile || "default";
|
|
2055
2065
|
const removed = TokenStorage.delete(profile);
|
|
2056
|
-
|
|
2066
|
+
debug3("token remove", { profile });
|
|
2057
2067
|
if (removed) {
|
|
2058
2068
|
this.context.stdout.write(`\uD1A0\uD070\uC744 \uC81C\uAC70\uD588\uC2B5\uB2C8\uB2E4: ${profile}.
|
|
2059
2069
|
`);
|
|
@@ -2075,13 +2085,13 @@ import { Command as Command5, Option as Option5 } from "clipanion";
|
|
|
2075
2085
|
|
|
2076
2086
|
// src/integrations/UploadSentrySourcemap/downloadArtifacts.ts
|
|
2077
2087
|
init_esm_shims();
|
|
2078
|
-
var
|
|
2088
|
+
var import_debug4 = __toESM(require_src(), 1);
|
|
2079
2089
|
import * as fs7 from "fs";
|
|
2080
2090
|
import * as os2 from "os";
|
|
2081
2091
|
import * as path4 from "path";
|
|
2082
2092
|
import { pipeline } from "stream";
|
|
2083
2093
|
import { promisify } from "util";
|
|
2084
|
-
var
|
|
2094
|
+
var debug4 = (0, import_debug4.default)("integrations:sentry");
|
|
2085
2095
|
var streamPipeline = promisify(pipeline);
|
|
2086
2096
|
async function downloadArtifacts(options) {
|
|
2087
2097
|
const { appName, deploymentId, apiKey, baseUrl = DEFAULT_API_BASE_URL } = options;
|
|
@@ -2090,7 +2100,7 @@ async function downloadArtifacts(options) {
|
|
|
2090
2100
|
deploymentId
|
|
2091
2101
|
});
|
|
2092
2102
|
const requestUrl = `${baseUrl}/api-public/v3/openapi/bundles/download?${params.toString()}`;
|
|
2093
|
-
|
|
2103
|
+
debug4("Request URL", { requestUrl });
|
|
2094
2104
|
const response = await fetch(`${baseUrl}/api-public/v3/openapi/bundles/download?${params.toString()}`, {
|
|
2095
2105
|
method: "GET",
|
|
2096
2106
|
headers: {
|
|
@@ -2109,13 +2119,13 @@ async function downloadArtifacts(options) {
|
|
|
2109
2119
|
const tmpFilePath = path4.join(tmpDir.path, tmpFile);
|
|
2110
2120
|
const fileStream = fs7.createWriteStream(tmpFilePath);
|
|
2111
2121
|
await streamPipeline(response.body, fileStream);
|
|
2112
|
-
|
|
2122
|
+
debug4("Artifacts downloaded", { tmpFilePath });
|
|
2113
2123
|
return tmpFilePath;
|
|
2114
2124
|
}
|
|
2115
2125
|
function createTempDirectory() {
|
|
2116
2126
|
const tempDir = path4.join(os2.tmpdir(), "apps-in-toss", "sentry-integration");
|
|
2117
2127
|
fs7.mkdirSync(tempDir, { recursive: true });
|
|
2118
|
-
|
|
2128
|
+
debug4("Temp directory created", { tempDir });
|
|
2119
2129
|
return {
|
|
2120
2130
|
path: tempDir,
|
|
2121
2131
|
cleanup: () => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.11.1",
|
|
5
5
|
"description": "CLI for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"typecheck": "tsc --noEmit",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"vitest": "^3.0.5"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
+
"@apps-in-toss/ait-format": "^1.0.0",
|
|
41
42
|
"@clack/prompts": "^0.10.0",
|
|
42
43
|
"@granite-js/utils": "0.1.31",
|
|
43
44
|
"@sentry/cli": "^2.46.0",
|