@bifos/nhncloud-cli 0.15.0 → 0.16.0
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.js
CHANGED
|
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
));
|
|
25
25
|
|
|
26
26
|
// src/index.ts
|
|
27
|
-
var
|
|
27
|
+
var import_commander59 = require("commander");
|
|
28
28
|
var import_chalk18 = __toESM(require("chalk"));
|
|
29
29
|
|
|
30
30
|
// src/utils/spinner.ts
|
|
@@ -193,6 +193,18 @@ nhncloud configure \uB97C \uC2E4\uD589\uD574 UAK id/secret \uC744 \uC124\uC815\u
|
|
|
193
193
|
return uak;
|
|
194
194
|
}
|
|
195
195
|
async function getServiceCredential(service, profileName) {
|
|
196
|
+
const cred = await getOptionalServiceCredential(service, profileName);
|
|
197
|
+
if (!cred) {
|
|
198
|
+
throw new NhnCloudCliError(
|
|
199
|
+
`profile "${profileName}" \uC5D0 "${service}" \uC790\uACA9\uC99D\uBA85\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
|
|
200
|
+
${CREDENTIALS_PATH} \uC5D0\uC11C profiles.${profileName}.${service} \uBE14\uB85D\uC744 \uCD94\uAC00\uD558\uC138\uC694.
|
|
201
|
+
\uC608\uC2DC: { "appkey": "<appkey>" }`,
|
|
202
|
+
EXIT_CONFIG_ERROR
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
return cred;
|
|
206
|
+
}
|
|
207
|
+
async function getOptionalServiceCredential(service, profileName) {
|
|
196
208
|
if (service === "userAccessKey" || service === "iaas") {
|
|
197
209
|
throw new NhnCloudCliError(
|
|
198
210
|
`"${service}" \uB294 \uC11C\uBE44\uC2A4 \uC790\uACA9\uC99D\uBA85\uC774 \uC544\uB2D9\uB2C8\uB2E4 \u2014 \uC804\uC6A9 getter \uB97C \uC0AC\uC6A9\uD558\uC138\uC694.`,
|
|
@@ -208,16 +220,7 @@ ${CREDENTIALS_PATH} \uC5D0\uC11C profiles.${profileName} \uBE14\uB85D\uC744 \uCD
|
|
|
208
220
|
EXIT_CONFIG_ERROR
|
|
209
221
|
);
|
|
210
222
|
}
|
|
211
|
-
|
|
212
|
-
if (!cred) {
|
|
213
|
-
throw new NhnCloudCliError(
|
|
214
|
-
`profile "${profileName}" \uC5D0 "${service}" \uC790\uACA9\uC99D\uBA85\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
|
|
215
|
-
${CREDENTIALS_PATH} \uC5D0\uC11C profiles.${profileName}.${service} \uBE14\uB85D\uC744 \uCD94\uAC00\uD558\uC138\uC694.
|
|
216
|
-
\uC608\uC2DC: { "appkey": "<appkey>" }`,
|
|
217
|
-
EXIT_CONFIG_ERROR
|
|
218
|
-
);
|
|
219
|
-
}
|
|
220
|
-
return cred;
|
|
223
|
+
return profile[service];
|
|
221
224
|
}
|
|
222
225
|
async function loadCredentialsOrEmpty() {
|
|
223
226
|
try {
|
|
@@ -377,8 +380,23 @@ function parseNonNegativeIntegerOption(value, flag) {
|
|
|
377
380
|
return parseIntegerOption(value, flag, { min: 0 });
|
|
378
381
|
}
|
|
379
382
|
|
|
380
|
-
// src/commands/
|
|
383
|
+
// src/commands/commander-errors.ts
|
|
381
384
|
var import_commander = require("commander");
|
|
385
|
+
function throwWithNormalizedExitCode(error) {
|
|
386
|
+
if (error.code === "commander.missingMandatoryOptionValue") {
|
|
387
|
+
error.exitCode = EXIT_PARAM_ERROR;
|
|
388
|
+
}
|
|
389
|
+
throw error;
|
|
390
|
+
}
|
|
391
|
+
function configureCommanderExitCodes(root) {
|
|
392
|
+
root.exitOverride(throwWithNormalizedExitCode);
|
|
393
|
+
for (const command of root.commands) {
|
|
394
|
+
configureCommanderExitCodes(command);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// src/commands/configure.ts
|
|
399
|
+
var import_commander2 = require("commander");
|
|
382
400
|
var import_chalk2 = __toESM(require("chalk"));
|
|
383
401
|
var import_core = require("@inquirer/core");
|
|
384
402
|
|
|
@@ -783,6 +801,13 @@ function unwrap(res) {
|
|
|
783
801
|
return res.body;
|
|
784
802
|
}
|
|
785
803
|
|
|
804
|
+
// src/services/logncrash/types.ts
|
|
805
|
+
function isAvailableTokenResult(value) {
|
|
806
|
+
if (typeof value !== "object" || value === null) return false;
|
|
807
|
+
const availableToken = value["availableToken"];
|
|
808
|
+
return typeof availableToken === "number" && Number.isSafeInteger(availableToken);
|
|
809
|
+
}
|
|
810
|
+
|
|
786
811
|
// src/services/logncrash/errors.ts
|
|
787
812
|
var import_ky4 = require("ky");
|
|
788
813
|
var RATE_LIMIT_RESULT_CODE = 429;
|
|
@@ -792,7 +817,7 @@ function isRateLimitError(err) {
|
|
|
792
817
|
function withRateLimitHint(err) {
|
|
793
818
|
return new NhnCloudCliError(
|
|
794
819
|
`${err.message}
|
|
795
|
-
\uC870\uD68C \uD69F\uC218 \uC81C\uD55C\uC5D0 \uAC78\uB838\uC2B5\uB2C8\uB2E4. \
|
|
820
|
+
\uC870\uD68C \uD69F\uC218 \uC81C\uD55C\uC5D0 \uAC78\uB838\uC2B5\uB2C8\uB2E4. \uC790\uB3D9\uC73C\uB85C \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uAC80\uC0C9 \uAE30\uAC04\uB9CC \uC881\uD600 \uD574\uACB0\uC744 \uBCF4\uC7A5\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. nhncloud logncrash available-token\uC73C\uB85C \uC794\uB7C9\uACFC \uCD94\uC815 \uB300\uAE30 \uC2DC\uAC04\uC744 \uB2E4\uC2DC \uD655\uC778\uD558\uC138\uC694.`,
|
|
796
821
|
err.exitCode
|
|
797
822
|
);
|
|
798
823
|
}
|
|
@@ -831,6 +856,28 @@ var LogncrashClient = class {
|
|
|
831
856
|
this.appkey = appkey;
|
|
832
857
|
this.accessToken = accessToken;
|
|
833
858
|
}
|
|
859
|
+
async availableToken() {
|
|
860
|
+
const headers = this.readHeaders();
|
|
861
|
+
const endpoint = endpointFor("logncrash");
|
|
862
|
+
const url = `${endpoint}/v3/${encodeURIComponent(this.appkey)}/logs/available-token`;
|
|
863
|
+
try {
|
|
864
|
+
const res = await import_ky5.default.get(url, {
|
|
865
|
+
headers,
|
|
866
|
+
retry: 0,
|
|
867
|
+
timeout: DEFAULT_TIMEOUT_MS
|
|
868
|
+
}).json();
|
|
869
|
+
const body = unwrap(res);
|
|
870
|
+
if (!isAvailableTokenResult(body)) {
|
|
871
|
+
throw new NhnCloudCliError(
|
|
872
|
+
"logncrash available-token \uC751\uB2F5 \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 availableToken \uC815\uC218 \uD544\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
873
|
+
EXIT_API_ERROR
|
|
874
|
+
);
|
|
875
|
+
}
|
|
876
|
+
return body;
|
|
877
|
+
} catch (err) {
|
|
878
|
+
throw await toLogncrashError(err);
|
|
879
|
+
}
|
|
880
|
+
}
|
|
834
881
|
async cursorSearch(params) {
|
|
835
882
|
const headers = this.readHeaders();
|
|
836
883
|
const endpoint = endpointFor("logncrash");
|
|
@@ -2242,7 +2289,7 @@ async function runNonInteractive(opts) {
|
|
|
2242
2289
|
logncrashUak
|
|
2243
2290
|
);
|
|
2244
2291
|
}
|
|
2245
|
-
var configureCommand = new
|
|
2292
|
+
var configureCommand = new import_commander2.Command("configure").description("\uC790\uACA9\uC99D\uBA85 \uC124\uC815 \uB9C8\uBC95\uC0AC (\uB300\uD654\uD615 + flag)").option("--profile <name>", "\uB300\uC0C1 profile \uC774\uB984 (\uAE30\uBCF8: default)").option("--uak-id <id>", "\uAC1C\uC778 UAK ID (\uBE44\uB300\uD654\uD615)").option("--uak-secret <secret>", "\uAC1C\uC778 UAK Secret (\uBE44\uB300\uD654\uD615, \uB178\uCD9C \uBC29\uC9C0\uB85C env NHNCLOUD_UAK_SECRET \uAD8C\uC7A5)").option("--logncrash-appkey <key>", "logncrash appkey (\uBE44\uB300\uD654\uD615)").option("--logncrash-secret <secret>", "\uD3D0\uAE30 \uC608\uC815: Search v3\uC5D0\uC11C\uB294 \uC0AC\uC6A9\xB7\uC800\uC7A5\uD558\uC9C0 \uC54A\uC74C").option("--iaas-tenant-id <id>", "iaas tenantId / \uD504\uB85C\uC81D\uD2B8 ID (\uBE44\uB300\uD654\uD615)").option("--iaas-username <user>", "iaas IAM username (\uBE44\uB300\uD654\uD615)").option(
|
|
2246
2293
|
"--iaas-password <pass>",
|
|
2247
2294
|
"iaas API \uBE44\uBC00\uBC88\uD638 (\uBE44\uB300\uD654\uD615, \uB178\uCD9C \uBC29\uC9C0\uB85C env NHNCLOUD_IAAS_PASSWORD \uAD8C\uC7A5)"
|
|
2248
2295
|
).option("--iaas-region <region>", "iaas region (\uAE30\uBCF8: kr1)", "kr1").option("--ncr-appkey <key>", "ncr appkey (\uBE44\uB300\uD654\uD615)").option("--ncs-appkey <key>", "ncs appkey (\uBE44\uB300\uD654\uD615)").option("--apigateway-appkey <key>", "API Gateway appkey (\uBE44\uB300\uD654\uD615)").option("--deploy-appkey <key>", "deploy appkey (\uBE44\uB300\uD654\uD615)").option("--no-verify", "\uC5F0\uACB0 \uD14C\uC2A4\uD2B8 \uC0DD\uB7B5").action(async (opts) => {
|
|
@@ -2263,7 +2310,7 @@ var configureCommand = new import_commander.Command("configure").description("\u
|
|
|
2263
2310
|
});
|
|
2264
2311
|
|
|
2265
2312
|
// src/commands/skills.ts
|
|
2266
|
-
var
|
|
2313
|
+
var import_commander3 = require("commander");
|
|
2267
2314
|
|
|
2268
2315
|
// src/skill/context.ts
|
|
2269
2316
|
var import_node_fs = require("fs");
|
|
@@ -3078,7 +3125,7 @@ async function showStatus(cmd, dependencies) {
|
|
|
3078
3125
|
outputSkillStatus(opts, await dependencies.inspect(context));
|
|
3079
3126
|
}
|
|
3080
3127
|
function createInstallCommand(name, dependencies) {
|
|
3081
|
-
return new
|
|
3128
|
+
return new import_commander3.Command(name).description(
|
|
3082
3129
|
name === "install" ? "Claude Code \uC2A4\uD0AC\uC744 \uAD00\uB9AC \uC800\uC7A5\uC18C\uC5D0 \uC124\uCE58\uD55C\uB2E4" : "Claude Code \uC2A4\uD0AC\uC744 \uD604\uC7AC CLI \uBC84\uC804\uC73C\uB85C \uAC31\uC2E0\uD55C\uB2E4"
|
|
3083
3130
|
).option("--force", "\uC0AC\uC6A9\uC790 \uD56D\uBAA9\uC774\uB098 \uC218\uC815\xB7\uC190\uC0C1\uB41C \uAD00\uB9AC \uC800\uC7A5\uC18C\uB97C \uBC31\uC5C5 \uD6C4 \uAD50\uCCB4\uD55C\uB2E4").action(async (_localOpts, cmd) => {
|
|
3084
3131
|
const opts = cmd.optsWithGlobals();
|
|
@@ -3088,8 +3135,8 @@ function createInstallCommand(name, dependencies) {
|
|
|
3088
3135
|
});
|
|
3089
3136
|
}
|
|
3090
3137
|
function createSkillsCommand(dependencies = defaultDependencies) {
|
|
3091
|
-
const statusCommand = new
|
|
3092
|
-
const uninstallCommand = new
|
|
3138
|
+
const statusCommand = new import_commander3.Command("status").description("Claude Code \uC2A4\uD0AC\uC758 \uAD00\uB9AC \uC0C1\uD0DC\uB97C \uC870\uD68C\uD55C\uB2E4").action(async (_opts, cmd) => showStatus(cmd, dependencies));
|
|
3139
|
+
const uninstallCommand = new import_commander3.Command("uninstall").description("\uD65C\uC131 Claude Code \uC2A4\uD0AC \uB9C1\uD06C\uB97C \uC81C\uAC70\uD55C\uB2E4").action(async (_opts, cmd) => {
|
|
3093
3140
|
const opts = cmd.optsWithGlobals();
|
|
3094
3141
|
const context = dependencies.createContext();
|
|
3095
3142
|
const previousStatus = await dependencies.inspect(context);
|
|
@@ -3104,12 +3151,12 @@ function createSkillsCommand(dependencies = defaultDependencies) {
|
|
|
3104
3151
|
};
|
|
3105
3152
|
outputSkillUninstallResult(opts, result);
|
|
3106
3153
|
});
|
|
3107
|
-
return new
|
|
3154
|
+
return new import_commander3.Command("skills").description(`Claude Code \uC2A4\uD0AC(${SKILL_NAME3}) \uC124\uCE58 \uAD00\uB9AC`).addCommand(statusCommand).addCommand(createInstallCommand("install", dependencies)).addCommand(createInstallCommand("update", dependencies)).addCommand(uninstallCommand).action(async (_opts, cmd) => showStatus(cmd, dependencies));
|
|
3108
3155
|
}
|
|
3109
3156
|
var skillsCommand = createSkillsCommand();
|
|
3110
3157
|
|
|
3111
3158
|
// src/commands/doctor.ts
|
|
3112
|
-
var
|
|
3159
|
+
var import_commander4 = require("commander");
|
|
3113
3160
|
var import_chalk3 = __toESM(require("chalk"));
|
|
3114
3161
|
var import_promises4 = require("fs/promises");
|
|
3115
3162
|
var import_node_os4 = require("os");
|
|
@@ -3140,7 +3187,7 @@ async function readDefaultProfile() {
|
|
|
3140
3187
|
return null;
|
|
3141
3188
|
}
|
|
3142
3189
|
}
|
|
3143
|
-
var doctorCommand = new
|
|
3190
|
+
var doctorCommand = new import_commander4.Command("doctor").description("\uC790\uACA9\uC99D\uBA85\xB7\uC2A4\uD0AC \uC124\uCE58 \uC0C1\uD0DC\uB97C \uC9C4\uB2E8\uD55C\uB2E4(\uC624\uD504\uB77C\uC778 \u2014 \uC5F0\uACB0 \uD14C\uC2A4\uD2B8\uB294 configure \uB85C)").action(async () => {
|
|
3144
3191
|
console.log(import_chalk3.default.bold("\n\u{1F50D} nhncloud-cli \uC9C4\uB2E8\n"));
|
|
3145
3192
|
const creds = await readProfiles();
|
|
3146
3193
|
const defaultProfile = await readDefaultProfile();
|
|
@@ -3180,7 +3227,7 @@ var doctorCommand = new import_commander3.Command("doctor").description("\uC790\
|
|
|
3180
3227
|
});
|
|
3181
3228
|
|
|
3182
3229
|
// src/commands/logncrash/search.ts
|
|
3183
|
-
var
|
|
3230
|
+
var import_commander5 = require("commander");
|
|
3184
3231
|
|
|
3185
3232
|
// src/utils/time.ts
|
|
3186
3233
|
function toLocalISOString(date) {
|
|
@@ -3298,6 +3345,22 @@ function assertSearchRange(fromIso, toIso) {
|
|
|
3298
3345
|
}
|
|
3299
3346
|
}
|
|
3300
3347
|
|
|
3348
|
+
// src/services/logncrash/token.ts
|
|
3349
|
+
var OBSERVED_REFILL_RATE_PER_SECOND = 1.6;
|
|
3350
|
+
function availableTokenStatus(availableToken) {
|
|
3351
|
+
return {
|
|
3352
|
+
availableToken,
|
|
3353
|
+
estimatedWaitSeconds: availableToken > 0 ? null : Math.ceil((1 - availableToken) / OBSERVED_REFILL_RATE_PER_SECOND)
|
|
3354
|
+
};
|
|
3355
|
+
}
|
|
3356
|
+
function assertAvailableSearchToken(status) {
|
|
3357
|
+
if (status.estimatedWaitSeconds === null) return;
|
|
3358
|
+
throw new NhnCloudCliError(
|
|
3359
|
+
`\uC870\uD68C \uD1A0\uD070 \uC794\uB7C9\uC774 ${status.availableToken}\uC774\uBBC0\uB85C \uAC80\uC0C9 \uC694\uCCAD\uC744 \uBCF4\uB0B4\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uAD00\uCE21\uD55C \uD68C\uBCF5 \uC18D\uB3C4 ${OBSERVED_REFILL_RATE_PER_SECOND} token/s \uAE30\uC900\uC73C\uB85C \uC794\uB7C9\uC774 \uC591\uC218\uAC00 \uB418\uAE30\uAE4C\uC9C0 \uC57D ${status.estimatedWaitSeconds}\uCD08\uC785\uB2C8\uB2E4. CLI\uB294 \uC790\uB3D9\uC73C\uB85C \uAE30\uB2E4\uB9AC\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. nhncloud logncrash available-token\uC73C\uB85C \uB2E4\uC2DC \uD655\uC778\uD558\uC138\uC694.`,
|
|
3360
|
+
EXIT_API_ERROR
|
|
3361
|
+
);
|
|
3362
|
+
}
|
|
3363
|
+
|
|
3301
3364
|
// src/commands/logncrash/helpers.ts
|
|
3302
3365
|
async function resolveLogncrashClient(profile) {
|
|
3303
3366
|
const profileName = await resolveProfileName(profile);
|
|
@@ -3312,6 +3375,10 @@ async function resolveLogncrashClient(profile) {
|
|
|
3312
3375
|
const accessToken = await getAccessToken(profileName, uak.id, uak.secret);
|
|
3313
3376
|
return new LogncrashClient(credential.appkey, accessToken);
|
|
3314
3377
|
}
|
|
3378
|
+
async function preflightLogncrashSearchToken(client) {
|
|
3379
|
+
const result = await client.availableToken();
|
|
3380
|
+
assertAvailableSearchToken(availableTokenStatus(result.availableToken));
|
|
3381
|
+
}
|
|
3315
3382
|
|
|
3316
3383
|
// src/commands/logncrash/search.ts
|
|
3317
3384
|
function getString(value) {
|
|
@@ -3323,7 +3390,7 @@ function formatLogRow(log) {
|
|
|
3323
3390
|
const body = truncate(getString(log["logBody"] ?? log["body"] ?? log["message"] ?? ""), 60);
|
|
3324
3391
|
return [logTime, logType, body];
|
|
3325
3392
|
}
|
|
3326
|
-
var searchCommand = new
|
|
3393
|
+
var searchCommand = new import_commander5.Command("search").description("Log & Crash \uB85C\uADF8 \uAC80\uC0C9").option("--query <lucene>", "Lucene \uC9C8\uC758 \uBB38\uC790\uC5F4 (\uD544\uC218)").option("--from <time>", "\uAC80\uC0C9 \uC2DC\uC791: \uCD08\xB7\uC2DC\uAC04\uB300 \uD3EC\uD568 ISO8601 \uB610\uB294 \uC0C1\uB300\uC2DC\uAC04 (1h/30m/2d/now) (\uD544\uC218)").option("--to <time>", "\uAC80\uC0C9 \uB05D: \uCD08\xB7\uC2DC\uAC04\uB300 \uD3EC\uD568 ISO8601 \uB610\uB294 \uC0C1\uB300\uC2DC\uAC04 (\uD544\uC218)").option("--page <n>", "\uC804\uD658 \uD638\uD658\uC6A9 pageNumber. 0\uB9CC \uD5C8\uC6A9 (\uB2E4\uC74C \uD398\uC774\uC9C0\uB294 --cursor)", "0").option("--size <n>", "pageSize (\uAE30\uBCF8 10, \uCD5C\uB300 100)", "10").option("--cursor <value>", "\uB2E4\uC74C \uD398\uC774\uC9C0 \uC870\uD68C\uC6A9 opaque cursor").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
3327
3394
|
const opts = cmd.optsWithGlobals();
|
|
3328
3395
|
if (!opts.query) {
|
|
3329
3396
|
throw new NhnCloudCliError(`--query \uC635\uC158\uC740 \uD544\uC218\uC785\uB2C8\uB2E4. \uC608: --query 'logType:"NORMAL"'`, EXIT_PARAM_ERROR);
|
|
@@ -3350,6 +3417,12 @@ var searchCommand = new import_commander4.Command("search").description("Log & C
|
|
|
3350
3417
|
assertSearchRange(fromIso, toIso);
|
|
3351
3418
|
const client = await resolveLogncrashClient(opts.profile);
|
|
3352
3419
|
startSpinner("\uB85C\uADF8 \uAC80\uC0C9 \uC911...");
|
|
3420
|
+
try {
|
|
3421
|
+
await preflightLogncrashSearchToken(client);
|
|
3422
|
+
} catch (err) {
|
|
3423
|
+
stopSpinner(false);
|
|
3424
|
+
throw err;
|
|
3425
|
+
}
|
|
3353
3426
|
let result;
|
|
3354
3427
|
try {
|
|
3355
3428
|
result = await client.cursorSearch({
|
|
@@ -3392,7 +3465,7 @@ var searchCommand = new import_commander4.Command("search").description("Log & C
|
|
|
3392
3465
|
});
|
|
3393
3466
|
|
|
3394
3467
|
// src/commands/logncrash/send.ts
|
|
3395
|
-
var
|
|
3468
|
+
var import_commander6 = require("commander");
|
|
3396
3469
|
var import_node_fs3 = require("fs");
|
|
3397
3470
|
var MAX_LOG_BYTES = 8 * 1024 * 1024;
|
|
3398
3471
|
var VALID_LEVELS = ["DEBUG", "INFO", "WARN", "ERROR", "FATAL"];
|
|
@@ -3425,7 +3498,7 @@ function resolveBody(opts) {
|
|
|
3425
3498
|
EXIT_PARAM_ERROR
|
|
3426
3499
|
);
|
|
3427
3500
|
}
|
|
3428
|
-
var sendCommand = new
|
|
3501
|
+
var sendCommand = new import_commander6.Command("send").description("\uB85C\uADF8 \uD55C \uAC74\uC744 Log & Crash \uB85C \uC804\uC1A1\uD55C\uB2E4 (--body / --file / stdin)").option("--body <text>", "\uB85C\uADF8 \uBA54\uC2DC\uC9C0 \uBCF8\uBB38 (\uBBF8\uC9C0\uC815 \uC2DC --file \uB610\uB294 stdin)").option("--file <path>", "\uB85C\uADF8 \uBCF8\uBB38\uC744 \uC77D\uC744 \uD30C\uC77C \uACBD\uB85C").option("--level <level>", "\uB85C\uADF8 \uB808\uBCA8 (DEBUG/INFO/WARN/ERROR/FATAL)").option("--app-version <ver>", "projectVersion (\uBBF8\uC9C0\uC815 \uC2DC \uAE30\uBCF8 '1.0.0')").option("--source <source>", "logSource (collector \uAE30\uBCF8 'http')").option("--type <type>", "logType (collector \uAE30\uBCF8 'log')").option("--host <host>", "\uB85C\uADF8\uB97C \uBCF4\uB0B8 host \uC2DD\uBCC4").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
3429
3502
|
const opts = cmd.optsWithGlobals();
|
|
3430
3503
|
const body = resolveBody(opts);
|
|
3431
3504
|
const bytes = Buffer.byteLength(body, "utf-8");
|
|
@@ -3480,11 +3553,12 @@ credentials.json \uC5D0 "appkey": "<appkey>" \uB97C \uCD94\uAC00\uD558\uC138\uC6
|
|
|
3480
3553
|
});
|
|
3481
3554
|
|
|
3482
3555
|
// src/commands/logncrash/export.ts
|
|
3483
|
-
var
|
|
3556
|
+
var import_commander7 = require("commander");
|
|
3484
3557
|
var import_promises5 = require("fs/promises");
|
|
3485
3558
|
var import_node_fs4 = require("fs");
|
|
3486
3559
|
var import_node_crypto4 = require("crypto");
|
|
3487
3560
|
var MAX_TOTAL = 1e5;
|
|
3561
|
+
var defaultExportFileOps = { appendFile: import_promises5.appendFile, rename: import_promises5.rename };
|
|
3488
3562
|
function assertWritable(path5, force) {
|
|
3489
3563
|
if (force) return;
|
|
3490
3564
|
try {
|
|
@@ -3499,183 +3573,233 @@ function assertWritable(path5, force) {
|
|
|
3499
3573
|
EXIT_PARAM_ERROR
|
|
3500
3574
|
);
|
|
3501
3575
|
}
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
if (!opts.from) {
|
|
3508
|
-
throw new NhnCloudCliError("--from \uC635\uC158\uC740 \uD544\uC218\uC785\uB2C8\uB2E4. \uC608: --from 1h", EXIT_PARAM_ERROR);
|
|
3509
|
-
}
|
|
3510
|
-
if (!opts.to) {
|
|
3511
|
-
throw new NhnCloudCliError("--to \uC635\uC158\uC740 \uD544\uC218\uC785\uB2C8\uB2E4. \uC608: --to now", EXIT_PARAM_ERROR);
|
|
3512
|
-
}
|
|
3513
|
-
if (!opts.output) {
|
|
3514
|
-
throw new NhnCloudCliError("--output \uC635\uC158\uC740 \uD544\uC218\uC785\uB2C8\uB2E4. \uC608: --output logs.jsonl", EXIT_PARAM_ERROR);
|
|
3515
|
-
}
|
|
3516
|
-
const format = opts.format ?? "jsonl";
|
|
3517
|
-
if (format !== "jsonl" && format !== "json") {
|
|
3518
|
-
throw new NhnCloudCliError("--format \uC740 jsonl \uB610\uB294 json \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.", EXIT_PARAM_ERROR);
|
|
3519
|
-
}
|
|
3520
|
-
if (opts.size !== void 0) {
|
|
3521
|
-
if (!/^[1-9]\d*$/.test(opts.size)) {
|
|
3522
|
-
throw new NhnCloudCliError("--size \uB294 \uC591\uC758 \uC815\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4 (\uD638\uD658 \uBC94\uC704 10~100).", EXIT_PARAM_ERROR);
|
|
3576
|
+
function createExportCommand(finalizeOps) {
|
|
3577
|
+
return new import_commander7.Command("export").description("Log & Crash \uB85C\uADF8\uB97C scroll \uB85C \uC804\uCCB4 \uCD94\uCD9C\uD574 \uD30C\uC77C\uB85C \uC800\uC7A5 (\uB300\uB7C9 \uCD94\uCD9C)").option("--query <lucene>", "Lucene \uC9C8\uC758 \uBB38\uC790\uC5F4 (\uD544\uC218)").option("--from <time>", "\uAC80\uC0C9 \uC2DC\uC791: \uCD08\xB7\uC2DC\uAC04\uB300 \uD3EC\uD568 ISO8601 \uB610\uB294 \uC0C1\uB300\uC2DC\uAC04 (1h/30m/2d/now) (\uD544\uC218)").option("--to <time>", "\uAC80\uC0C9 \uB05D: \uCD08\xB7\uC2DC\uAC04\uB300 \uD3EC\uD568 ISO8601 \uB610\uB294 \uC0C1\uB300\uC2DC\uAC04 (\uD544\uC218)").option("--output <file>", "\uCD9C\uB825 \uD30C\uC77C \uACBD\uB85C (\uD544\uC218)").option("--format <fmt>", "\uCD9C\uB825 \uD615\uC2DD: jsonl(\uAE30\uBCF8, \uD55C \uC904\uB2F9 \uD55C \uB85C\uADF8) \uB610\uB294 json(\uBC30\uC5F4)", "jsonl").option("--size <n>", "\uD3D0\uAE30 \uC608\uC815: Search v3\uC5D0\uC11C\uB294 \uBB34\uC2DC\uB428 (\uD638\uD658 \uAC80\uC99D \uBC94\uC704 10~100)").option("--force", "\uCD9C\uB825 \uD30C\uC77C\uC774 \uC788\uC73C\uBA74 \uB36E\uC5B4\uC4F4\uB2E4").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
3578
|
+
const opts = cmd.optsWithGlobals();
|
|
3579
|
+
if (!opts.query) {
|
|
3580
|
+
throw new NhnCloudCliError(`--query \uC635\uC158\uC740 \uD544\uC218\uC785\uB2C8\uB2E4. \uC608: --query 'logType:"NORMAL"'`, EXIT_PARAM_ERROR);
|
|
3523
3581
|
}
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
throw new NhnCloudCliError("--size \uB294 10~100 \uC0AC\uC774\uC5EC\uC57C \uD569\uB2C8\uB2E4.", EXIT_PARAM_ERROR);
|
|
3582
|
+
if (!opts.from) {
|
|
3583
|
+
throw new NhnCloudCliError("--from \uC635\uC158\uC740 \uD544\uC218\uC785\uB2C8\uB2E4. \uC608: --from 1h", EXIT_PARAM_ERROR);
|
|
3527
3584
|
}
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
);
|
|
3531
|
-
}
|
|
3532
|
-
const fromIso = resolveTime(opts.from);
|
|
3533
|
-
const toIso = resolveTime(opts.to);
|
|
3534
|
-
assertSearchRange(fromIso, toIso);
|
|
3535
|
-
assertWritable(opts.output, opts.force ?? false);
|
|
3536
|
-
const client = await resolveLogncrashClient(opts.profile);
|
|
3537
|
-
const tmp = opts.output + "." + (0, import_node_crypto4.randomBytes)(4).toString("hex") + ".tmp";
|
|
3538
|
-
let stream = (0, import_node_fs4.createWriteStream)(tmp, { encoding: "utf-8" });
|
|
3539
|
-
const spinner = startSpinner("\uB85C\uADF8 \uCD94\uCD9C \uC911...");
|
|
3540
|
-
let count = 0;
|
|
3541
|
-
let total = 0;
|
|
3542
|
-
let hasUnqueriedWindows = false;
|
|
3543
|
-
let first = true;
|
|
3544
|
-
let bytePosition = 0;
|
|
3545
|
-
let resumeFrom = "";
|
|
3546
|
-
const write = (chunk) => {
|
|
3547
|
-
stream.write(chunk);
|
|
3548
|
-
bytePosition += Buffer.byteLength(chunk, "utf-8");
|
|
3549
|
-
};
|
|
3550
|
-
const writePage = (data) => {
|
|
3551
|
-
for (const log of data) {
|
|
3552
|
-
if (count >= MAX_TOTAL) break;
|
|
3553
|
-
const json = JSON.stringify(log);
|
|
3554
|
-
write(format === "json" ? first ? json : "," + json : json + "\n");
|
|
3555
|
-
first = false;
|
|
3556
|
-
count++;
|
|
3585
|
+
if (!opts.to) {
|
|
3586
|
+
throw new NhnCloudCliError("--to \uC635\uC158\uC740 \uD544\uC218\uC785\uB2C8\uB2E4. \uC608: --to now", EXIT_PARAM_ERROR);
|
|
3557
3587
|
}
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3588
|
+
if (!opts.output) {
|
|
3589
|
+
throw new NhnCloudCliError("--output \uC635\uC158\uC740 \uD544\uC218\uC785\uB2C8\uB2E4. \uC608: --output logs.jsonl", EXIT_PARAM_ERROR);
|
|
3590
|
+
}
|
|
3591
|
+
const format = opts.format ?? "jsonl";
|
|
3592
|
+
if (format !== "jsonl" && format !== "json") {
|
|
3593
|
+
throw new NhnCloudCliError("--format \uC740 jsonl \uB610\uB294 json \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.", EXIT_PARAM_ERROR);
|
|
3594
|
+
}
|
|
3595
|
+
if (opts.size !== void 0) {
|
|
3596
|
+
if (!/^[1-9]\d*$/.test(opts.size)) {
|
|
3597
|
+
throw new NhnCloudCliError("--size \uB294 \uC591\uC758 \uC815\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4 (\uD638\uD658 \uBC94\uC704 10~100).", EXIT_PARAM_ERROR);
|
|
3598
|
+
}
|
|
3599
|
+
const size = parseInt(opts.size, 10);
|
|
3600
|
+
if (size < 10 || size > 100) {
|
|
3601
|
+
throw new NhnCloudCliError("--size \uB294 10~100 \uC0AC\uC774\uC5EC\uC57C \uD569\uB2C8\uB2E4.", EXIT_PARAM_ERROR);
|
|
3602
|
+
}
|
|
3603
|
+
process.stderr.write(
|
|
3604
|
+
"\uACBD\uACE0: logncrash export --size\uB294 \uD3D0\uAE30 \uC608\uC815\uC774\uBA70 Search v3 \uC694\uCCAD\uC5D0\uC11C\uB294 \uBB34\uC2DC\uB429\uB2C8\uB2E4.\n"
|
|
3605
|
+
);
|
|
3606
|
+
}
|
|
3607
|
+
const fromIso = resolveTime(opts.from);
|
|
3608
|
+
const toIso = resolveTime(opts.to);
|
|
3609
|
+
assertSearchRange(fromIso, toIso);
|
|
3610
|
+
assertWritable(opts.output, opts.force ?? false);
|
|
3611
|
+
const client = await resolveLogncrashClient(opts.profile);
|
|
3612
|
+
const id = (0, import_node_crypto4.randomUUID)();
|
|
3613
|
+
const tmp = `${opts.output}.${id}.tmp`;
|
|
3614
|
+
let stream = (0, import_node_fs4.createWriteStream)(tmp, { encoding: "utf-8" });
|
|
3615
|
+
const spinner = startSpinner("\uB85C\uADF8 \uCD94\uCD9C \uC911...");
|
|
3616
|
+
let count = 0;
|
|
3617
|
+
let total = 0;
|
|
3618
|
+
let hasUnqueriedWindows = false;
|
|
3619
|
+
let first = true;
|
|
3620
|
+
let bytePosition = 0;
|
|
3621
|
+
let resumeFrom = "";
|
|
3622
|
+
let failureOrigin = "preflight";
|
|
3623
|
+
const write = (chunk) => {
|
|
3624
|
+
stream.write(chunk);
|
|
3625
|
+
bytePosition += Buffer.byteLength(chunk, "utf-8");
|
|
3626
|
+
};
|
|
3627
|
+
const writePage = (data) => {
|
|
3628
|
+
for (const log of data) {
|
|
3629
|
+
if (count >= MAX_TOTAL) break;
|
|
3630
|
+
const json = JSON.stringify(log);
|
|
3631
|
+
write(format === "json" ? first ? json : "," + json : json + "\n");
|
|
3632
|
+
first = false;
|
|
3633
|
+
count++;
|
|
3634
|
+
}
|
|
3567
3635
|
};
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
const
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
total
|
|
3636
|
+
try {
|
|
3637
|
+
if (format === "json") write("[");
|
|
3638
|
+
let pendingWindows = [{ from: fromIso, to: toIso }];
|
|
3639
|
+
let completedWindows = 0;
|
|
3640
|
+
const progressText = () => {
|
|
3641
|
+
const totalWindows = completedWindows + pendingWindows.length + 1;
|
|
3642
|
+
const windowPart = totalWindows > 1 ? `\uCC3D ${completedWindows + 1}/${totalWindows} ` : "";
|
|
3643
|
+
return `\uB85C\uADF8 \uCD94\uCD9C \uC911... ${windowPart}${count}/${total}`;
|
|
3577
3644
|
};
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3645
|
+
while (pendingWindows.length > 0) {
|
|
3646
|
+
const window = pendingWindows.shift();
|
|
3647
|
+
if (!window) break;
|
|
3648
|
+
resumeFrom = window.from;
|
|
3649
|
+
const checkpoint = {
|
|
3650
|
+
bytesWritten: bytePosition,
|
|
3651
|
+
count,
|
|
3652
|
+
first,
|
|
3653
|
+
total
|
|
3654
|
+
};
|
|
3655
|
+
try {
|
|
3656
|
+
failureOrigin = "preflight";
|
|
3657
|
+
await preflightLogncrashSearchToken(client);
|
|
3658
|
+
failureOrigin = "search";
|
|
3659
|
+
let res = await client.scrollStart({
|
|
3660
|
+
query: opts.query,
|
|
3661
|
+
from: window.from,
|
|
3662
|
+
to: window.to
|
|
3663
|
+
});
|
|
3664
|
+
total += res.totalItems;
|
|
3589
3665
|
writePage(res.data);
|
|
3590
3666
|
spinner.text = progressText();
|
|
3667
|
+
while (res.data.length > 0 && res.scrollKey && count < Math.min(total, MAX_TOTAL)) {
|
|
3668
|
+
failureOrigin = "preflight";
|
|
3669
|
+
await preflightLogncrashSearchToken(client);
|
|
3670
|
+
failureOrigin = "search";
|
|
3671
|
+
res = await scrollNextWithHint(client, res.scrollKey);
|
|
3672
|
+
writePage(res.data);
|
|
3673
|
+
spinner.text = progressText();
|
|
3674
|
+
}
|
|
3675
|
+
completedWindows++;
|
|
3676
|
+
if (count >= MAX_TOTAL && pendingWindows.length > 0) {
|
|
3677
|
+
hasUnqueriedWindows = true;
|
|
3678
|
+
break;
|
|
3679
|
+
}
|
|
3680
|
+
} catch (err) {
|
|
3681
|
+
if (failureOrigin !== "search" || !(err instanceof LogncrashServerError)) throw err;
|
|
3682
|
+
await endAndClose(stream);
|
|
3683
|
+
await (0, import_promises5.truncate)(tmp, checkpoint.bytesWritten);
|
|
3684
|
+
stream = (0, import_node_fs4.createWriteStream)(tmp, { encoding: "utf-8", flags: "a" });
|
|
3685
|
+
bytePosition = checkpoint.bytesWritten;
|
|
3686
|
+
count = checkpoint.count;
|
|
3687
|
+
first = checkpoint.first;
|
|
3688
|
+
total = checkpoint.total;
|
|
3689
|
+
const currentWindowMs = new Date(window.to).getTime() - new Date(window.from).getTime();
|
|
3690
|
+
const smallerWindowMs = Math.ceil(currentWindowMs / 2);
|
|
3691
|
+
if (smallerWindowMs < MIN_SPLIT_WINDOW_MS) throw err;
|
|
3692
|
+
pendingWindows = splitTimeRange(window.from, toIso, smallerWindowMs);
|
|
3591
3693
|
}
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3694
|
+
}
|
|
3695
|
+
await endAndClose(stream);
|
|
3696
|
+
} catch (err) {
|
|
3697
|
+
stopSpinner(false);
|
|
3698
|
+
const failure = failureOrigin === "search" && isRateLimitError(err) ? withRateLimitHint(err) : err;
|
|
3699
|
+
await new Promise((resolve) => {
|
|
3700
|
+
if (stream.closed) {
|
|
3701
|
+
resolve();
|
|
3702
|
+
return;
|
|
3596
3703
|
}
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
const currentWindowMs = new Date(window.to).getTime() - new Date(window.from).getTime();
|
|
3607
|
-
const smallerWindowMs = Math.ceil(currentWindowMs / 2);
|
|
3608
|
-
if (smallerWindowMs < MIN_SPLIT_WINDOW_MS) throw err;
|
|
3609
|
-
pendingWindows = splitTimeRange(window.from, toIso, smallerWindowMs);
|
|
3704
|
+
stream.once("close", () => resolve());
|
|
3705
|
+
stream.once("error", () => resolve());
|
|
3706
|
+
if (stream.destroyed) return;
|
|
3707
|
+
stream.end();
|
|
3708
|
+
});
|
|
3709
|
+
if (count === 0) {
|
|
3710
|
+
await (0, import_promises5.rm)(tmp, { force: true }).catch(() => {
|
|
3711
|
+
});
|
|
3712
|
+
throw failure;
|
|
3610
3713
|
}
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3714
|
+
const partial = `${opts.output}.partial`;
|
|
3715
|
+
try {
|
|
3716
|
+
if (format === "json") await (0, import_promises5.appendFile)(tmp, "]\n");
|
|
3717
|
+
await (0, import_promises5.rename)(tmp, partial);
|
|
3718
|
+
} catch {
|
|
3719
|
+
process.stderr.write(
|
|
3720
|
+
`\uACBD\uACE0: \uBD80\uBD84 \uACB0\uACFC\uB97C ${partial} \uC5D0 \uB0A8\uAE30\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. \uC784\uC2DC \uD30C\uC77C: ${tmp}
|
|
3721
|
+
`
|
|
3722
|
+
);
|
|
3723
|
+
throw failure;
|
|
3621
3724
|
}
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
if (
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
if (count === 0) {
|
|
3628
|
-
await (0, import_promises5.rm)(tmp, { force: true }).catch(() => {
|
|
3629
|
-
});
|
|
3630
|
-
throw failure;
|
|
3631
|
-
}
|
|
3632
|
-
const partial = `${opts.output}.partial`;
|
|
3633
|
-
try {
|
|
3634
|
-
if (format === "json") await (0, import_promises5.appendFile)(tmp, "]\n");
|
|
3635
|
-
await (0, import_promises5.rename)(tmp, partial);
|
|
3636
|
-
} catch {
|
|
3637
|
-
process.stderr.write(
|
|
3638
|
-
`\uACBD\uACE0: \uBD80\uBD84 \uACB0\uACFC\uB97C ${partial} \uC5D0 \uB0A8\uAE30\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. \uC784\uC2DC \uD30C\uC77C: ${tmp}
|
|
3725
|
+
process.stderr.write(`\uC548\uB0B4: \uC5EC\uAE30\uAE4C\uC9C0 \uBC1B\uC740 ${count}\uAC74\uC744 ${partial} \uC5D0 \uB0A8\uACBC\uC2B5\uB2C8\uB2E4.
|
|
3726
|
+
`);
|
|
3727
|
+
if (resumeFrom === fromIso) {
|
|
3728
|
+
process.stderr.write(
|
|
3729
|
+
`\uC548\uB0B4: \uC774\uC5B4\uBC1B\uC744 \uC9C0\uC810\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \uAC19\uC740 \uBA85\uB839\uC744 \uB2E4\uC2DC \uC2E4\uD589\uD558\uBA74 ${count}\uAC74\uB3C4 \uB2E4\uC2DC \uC870\uD68C\uB429\uB2C8\uB2E4.
|
|
3639
3730
|
`
|
|
3640
|
-
|
|
3731
|
+
);
|
|
3732
|
+
} else {
|
|
3733
|
+
process.stderr.write(
|
|
3734
|
+
`\uC548\uB0B4: \uC774\uC5B4\uBC1B\uC73C\uB824\uBA74 --from "${resumeFrom}" --to "${toIso}" \uB85C \uB2E4\uC2DC \uC2E4\uD589\uD558\uC138\uC694. \uACBD\uACC4 \uAD6C\uAC04\uC758 \uB85C\uADF8\uAC00 \uC911\uBCF5\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
|
|
3735
|
+
`
|
|
3736
|
+
);
|
|
3737
|
+
}
|
|
3641
3738
|
throw failure;
|
|
3642
3739
|
}
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3740
|
+
const finalized = await finalizeExportFile(tmp, opts.output, id, format, finalizeOps);
|
|
3741
|
+
if (!finalized.ok) {
|
|
3742
|
+
stopSpinner(false);
|
|
3743
|
+
const reason = errorReason(finalized.cause);
|
|
3744
|
+
if (finalized.preserved) {
|
|
3745
|
+
const guidance = finalized.state === "complete" ? `\uC548\uB0B4: API \uC7AC\uC870\uD68C\uAC00 \uD544\uC694 \uC5C6\uB294 \uC804\uCCB4 \uACB0\uACFC\uB97C ${finalized.recoveryPath} \uC5D0 \uB0A8\uACBC\uC2B5\uB2C8\uB2E4. \uADF8\uB300\uB85C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
|
|
3746
|
+
` : `\uC548\uB0B4: API \uC7AC\uC870\uD68C\uAC00 \uD544\uC694 \uC5C6\uB294 \uC804\uCCB4 \uB370\uC774\uD130\uB97C ${finalized.recoveryPath} \uC5D0 \uB0A8\uACBC\uC2B5\uB2C8\uB2E4. JSON \uBC30\uC5F4\uC758 \uB9C8\uC9C0\uB9C9 ]\uB97C \uD655\uC778\uD558\uC138\uC694.
|
|
3747
|
+
`;
|
|
3748
|
+
process.stderr.write(guidance);
|
|
3749
|
+
} else {
|
|
3750
|
+
process.stderr.write(
|
|
3751
|
+
`\uACBD\uACE0: \uBCF5\uAD6C \uD30C\uC77C ${finalized.recoveryPath} \uB85C \uC62E\uAE30\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. \uC784\uC2DC \uD30C\uC77C\uC744 \uC0AD\uC81C\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4: ${tmp}
|
|
3648
3752
|
`
|
|
3649
|
-
|
|
3650
|
-
|
|
3753
|
+
);
|
|
3754
|
+
}
|
|
3755
|
+
const message = finalized.state === "complete" ? `\uCD9C\uB825 \uD30C\uC77C \uCD5C\uC885 \uAD50\uCCB4\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4: ${opts.output} (${reason})` : `JSON \uBC30\uC5F4\uC744 \uB9C8\uBB34\uB9AC\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4: ${opts.output} (${reason})`;
|
|
3756
|
+
throw new NhnCloudCliError(message, EXIT_PARAM_ERROR);
|
|
3757
|
+
}
|
|
3758
|
+
stopSpinner(true, `${count}\uAC74 \uCD94\uCD9C \uC644\uB8CC`);
|
|
3759
|
+
await (0, import_promises5.rm)(`${opts.output}.partial`, { force: true }).catch(() => {
|
|
3760
|
+
});
|
|
3761
|
+
if (count >= MAX_TOTAL && (total > MAX_TOTAL || hasUnqueriedWindows)) {
|
|
3762
|
+
const totalDescription = hasUnqueriedWindows ? `\uC870\uD68C\uD55C \uCC3D\uC5D0\uC11C ${total}\uAC74\uC744 \uD655\uC778\uD588\uACE0 \uB0A8\uC740 \uCC3D\uC744 \uC870\uD68C\uD558\uC9C0 \uC54A\uC740 \uCC44` : `\uC804\uCCB4 ${total}\uAC74 \uC911`;
|
|
3651
3763
|
process.stderr.write(
|
|
3652
|
-
`\
|
|
3764
|
+
`\uACBD\uACE0: ${totalDescription} \uC0C1\uD55C ${MAX_TOTAL}\uAC74\uAE4C\uC9C0\uB9CC \uCD94\uCD9C\uD588\uC2B5\uB2C8\uB2E4. \uAC80\uC0C9 \uBC94\uC704\uB97C \uC881\uD600 \uB098\uB220 \uCD94\uCD9C\uD558\uC138\uC694.
|
|
3653
3765
|
`
|
|
3654
3766
|
);
|
|
3655
3767
|
}
|
|
3656
|
-
|
|
3768
|
+
process.stderr.write(`${opts.output} \uC5D0 ${count}\uAC74 \uC800\uC7A5
|
|
3769
|
+
`);
|
|
3770
|
+
});
|
|
3771
|
+
}
|
|
3772
|
+
var exportCommand = createExportCommand();
|
|
3773
|
+
async function finalizeExportFile(tmp, output2, id, format, ops = defaultExportFileOps) {
|
|
3774
|
+
if (format === "json") {
|
|
3775
|
+
try {
|
|
3776
|
+
await ops.appendFile(tmp, "]\n");
|
|
3777
|
+
} catch (cause) {
|
|
3778
|
+
return await preserveCompletedExport(tmp, output2, id, "unfinalized", cause, ops);
|
|
3779
|
+
}
|
|
3657
3780
|
}
|
|
3658
|
-
stopSpinner(true, `${count}\uAC74 \uCD94\uCD9C \uC644\uB8CC`);
|
|
3659
3781
|
try {
|
|
3660
|
-
await
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
const reason = err.code ?? (err instanceof Error ? err.message : String(err));
|
|
3665
|
-
throw new NhnCloudCliError(`\uCD9C\uB825 \uD30C\uC77C\uC744 \uC4F8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: ${opts.output} (${reason})`, EXIT_PARAM_ERROR);
|
|
3782
|
+
await ops.rename(tmp, output2);
|
|
3783
|
+
return { ok: true };
|
|
3784
|
+
} catch (cause) {
|
|
3785
|
+
return await preserveCompletedExport(tmp, output2, id, "complete", cause, ops);
|
|
3666
3786
|
}
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3787
|
+
}
|
|
3788
|
+
async function preserveCompletedExport(tmp, output2, id, state, cause, ops) {
|
|
3789
|
+
const recoveryPath = `${output2}.${id}.${state}`;
|
|
3790
|
+
try {
|
|
3791
|
+
await ops.rename(tmp, recoveryPath);
|
|
3792
|
+
return { ok: false, state, cause, recoveryPath, preserved: true };
|
|
3793
|
+
} catch {
|
|
3794
|
+
return { ok: false, state, cause, recoveryPath, preserved: false };
|
|
3675
3795
|
}
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3796
|
+
}
|
|
3797
|
+
function errorReason(error) {
|
|
3798
|
+
if (error instanceof Error) {
|
|
3799
|
+
return error.code ?? error.message;
|
|
3800
|
+
}
|
|
3801
|
+
return String(error);
|
|
3802
|
+
}
|
|
3679
3803
|
async function scrollNextWithHint(client, scrollKey) {
|
|
3680
3804
|
try {
|
|
3681
3805
|
return await client.scrollNext(scrollKey);
|
|
@@ -3699,8 +3823,37 @@ async function endAndClose(stream) {
|
|
|
3699
3823
|
});
|
|
3700
3824
|
}
|
|
3701
3825
|
|
|
3826
|
+
// src/commands/logncrash/available-token.ts
|
|
3827
|
+
var import_commander8 = require("commander");
|
|
3828
|
+
var availableTokenCommand = new import_commander8.Command("available-token").description("Log & Crash \uB0A8\uC740 \uC870\uD68C \uD1A0\uD070\uACFC \uCD94\uC815 \uB300\uAE30 \uC2DC\uAC04\uC744 \uD655\uC778").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
3829
|
+
const opts = cmd.optsWithGlobals();
|
|
3830
|
+
const client = await resolveLogncrashClient(opts.profile);
|
|
3831
|
+
startSpinner("\uC870\uD68C \uD1A0\uD070 \uD655\uC778 \uC911...");
|
|
3832
|
+
let status;
|
|
3833
|
+
try {
|
|
3834
|
+
const result = await client.availableToken();
|
|
3835
|
+
status = availableTokenStatus(result.availableToken);
|
|
3836
|
+
} catch (err) {
|
|
3837
|
+
stopSpinner(false);
|
|
3838
|
+
throw err;
|
|
3839
|
+
}
|
|
3840
|
+
stopSpinner(true);
|
|
3841
|
+
output(opts, {
|
|
3842
|
+
headers: ["\uD56D\uBAA9", "\uAC12"],
|
|
3843
|
+
rows: [
|
|
3844
|
+
["\uB0A8\uC740 \uC870\uD68C \uD1A0\uD070", String(status.availableToken)],
|
|
3845
|
+
[
|
|
3846
|
+
"\uC591\uC218\uAE4C\uC9C0 \uCD94\uC815 \uB300\uAE30 \uC2DC\uAC04(\uCD08)",
|
|
3847
|
+
status.estimatedWaitSeconds === null ? "\uB300\uAE30 \uBD88\uD544\uC694" : String(status.estimatedWaitSeconds)
|
|
3848
|
+
]
|
|
3849
|
+
],
|
|
3850
|
+
raw: status,
|
|
3851
|
+
ids: [String(status.availableToken)]
|
|
3852
|
+
});
|
|
3853
|
+
});
|
|
3854
|
+
|
|
3702
3855
|
// src/commands/deploy/run.ts
|
|
3703
|
-
var
|
|
3856
|
+
var import_commander9 = require("commander");
|
|
3704
3857
|
|
|
3705
3858
|
// src/services/deploy/client.ts
|
|
3706
3859
|
var import_ky8 = __toESM(require("ky"));
|
|
@@ -3938,6 +4091,15 @@ var DeployClient = class {
|
|
|
3938
4091
|
}
|
|
3939
4092
|
};
|
|
3940
4093
|
|
|
4094
|
+
// src/commands/service-appkey.ts
|
|
4095
|
+
async function resolveServiceAppKey(service, profileName, missingMessage) {
|
|
4096
|
+
const credential = await getOptionalServiceCredential(service, profileName);
|
|
4097
|
+
if (!credential?.appkey) {
|
|
4098
|
+
throw new NhnCloudCliError(missingMessage, EXIT_CONFIG_ERROR);
|
|
4099
|
+
}
|
|
4100
|
+
return credential.appkey;
|
|
4101
|
+
}
|
|
4102
|
+
|
|
3941
4103
|
// src/commands/deploy/helpers.ts
|
|
3942
4104
|
async function createDeployClient(profileOpt) {
|
|
3943
4105
|
const profileName = await resolveProfileName(profileOpt);
|
|
@@ -3946,21 +4108,11 @@ async function createDeployClient(profileOpt) {
|
|
|
3946
4108
|
return { client: new DeployClient(accessToken), profileName };
|
|
3947
4109
|
}
|
|
3948
4110
|
async function resolveDeployAppKey(profileName) {
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
throw err;
|
|
3955
|
-
}
|
|
3956
|
-
}
|
|
3957
|
-
if (!cred?.appkey) {
|
|
3958
|
-
throw new NhnCloudCliError(
|
|
3959
|
-
"Deploy appKey \uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.\nnhncloud configure --deploy-appkey <key> \uB97C \uC2E4\uD589\uD574 \uC124\uC815\uD558\uC138\uC694.",
|
|
3960
|
-
EXIT_CONFIG_ERROR
|
|
3961
|
-
);
|
|
3962
|
-
}
|
|
3963
|
-
return cred.appkey;
|
|
4111
|
+
return resolveServiceAppKey(
|
|
4112
|
+
"deploy",
|
|
4113
|
+
profileName,
|
|
4114
|
+
"Deploy appKey \uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.\nnhncloud configure --deploy-appkey <key> \uB97C \uC2E4\uD589\uD574 \uC124\uC815\uD558\uC138\uC694."
|
|
4115
|
+
);
|
|
3964
4116
|
}
|
|
3965
4117
|
function requireCoordinate(value, flag) {
|
|
3966
4118
|
if (!value) {
|
|
@@ -3970,7 +4122,7 @@ function requireCoordinate(value, flag) {
|
|
|
3970
4122
|
}
|
|
3971
4123
|
|
|
3972
4124
|
// src/commands/deploy/run.ts
|
|
3973
|
-
var runCommand = new
|
|
4125
|
+
var runCommand = new import_commander9.Command("run").description("\uBC30\uD3EC\uB97C \uC2E4\uD589\uD55C\uB2E4").option("--artifact-id <id>", "\uBC30\uD3EC\uD560 \uC544\uD2F0\uD329\uD2B8 ID (artifacts \uB85C \uD655\uC778)").option("--server-group-id <id>", "\uBC30\uD3EC \uB300\uC0C1 \uC11C\uBC84\uADF8\uB8F9 ID (server-groups \uB85C \uD655\uC778)").option("--scenario-ids <csv>", "\uC2E4\uD589\uD560 \uC2DC\uB098\uB9AC\uC624 ID \uBAA9\uB85D (\uC27C\uD45C \uAD6C\uBD84)").option("--target-hosts <csv>", "\uB300\uC0C1 \uD638\uC2A4\uD2B8 (\uC0DD\uB7B5 \uC2DC \uC11C\uBC84\uADF8\uB8F9 \uC804\uCCB4)").option("--concurrent <n>", "\uBCD1\uB82C \uBC30\uD3EC \uC218 (\uAE30\uBCF8 1)", "1").option("--next-when-fail", "\uC2DC\uB098\uB9AC\uC624 \uC2E4\uD328 \uC2DC\uC5D0\uB3C4 \uC9C4\uD589").option("--note <s>", "\uBC30\uD3EC \uBA54\uBAA8").option("--async", "\uC989\uC2DC \uBC18\uD658 (\uAE30\uBCF8\uC740 \uC644\uB8CC \uB300\uAE30)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
3974
4126
|
const opts = cmd.optsWithGlobals();
|
|
3975
4127
|
const concurrentNum = parsePositiveIntegerOption(opts.concurrent ?? "1", "--concurrent");
|
|
3976
4128
|
const artifactId = requireCoordinate(opts.artifactId, "--artifact-id");
|
|
@@ -4006,8 +4158,8 @@ var runCommand = new import_commander7.Command("run").description("\uBC30\uD3EC\
|
|
|
4006
4158
|
});
|
|
4007
4159
|
|
|
4008
4160
|
// src/commands/deploy/artifacts.ts
|
|
4009
|
-
var
|
|
4010
|
-
var artifactsCommand = new
|
|
4161
|
+
var import_commander10 = require("commander");
|
|
4162
|
+
var artifactsCommand = new import_commander10.Command("artifacts").description("\uC544\uD2F0\uD329\uD2B8 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
4011
4163
|
const opts = cmd.optsWithGlobals();
|
|
4012
4164
|
const { client, profileName } = await createDeployClient(opts.profile);
|
|
4013
4165
|
const appKey = await resolveDeployAppKey(profileName);
|
|
@@ -4036,8 +4188,8 @@ var artifactsCommand = new import_commander8.Command("artifacts").description("\
|
|
|
4036
4188
|
});
|
|
4037
4189
|
|
|
4038
4190
|
// src/commands/deploy/server-groups.ts
|
|
4039
|
-
var
|
|
4040
|
-
var serverGroupsCommand = new
|
|
4191
|
+
var import_commander11 = require("commander");
|
|
4192
|
+
var serverGroupsCommand = new import_commander11.Command("server-groups").description("\uC11C\uBC84\uADF8\uB8F9 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").option("--artifact-id <id>", "\uC870\uD68C\uD560 \uC544\uD2F0\uD329\uD2B8 ID (artifacts \uB85C \uD655\uC778)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
4041
4193
|
const opts = cmd.optsWithGlobals();
|
|
4042
4194
|
const artifactId = requireCoordinate(opts.artifactId, "--artifact-id");
|
|
4043
4195
|
const { client, profileName } = await createDeployClient(opts.profile);
|
|
@@ -4060,8 +4212,8 @@ var serverGroupsCommand = new import_commander9.Command("server-groups").descrip
|
|
|
4060
4212
|
});
|
|
4061
4213
|
|
|
4062
4214
|
// src/commands/deploy/histories.ts
|
|
4063
|
-
var
|
|
4064
|
-
var historiesCommand = new
|
|
4215
|
+
var import_commander12 = require("commander");
|
|
4216
|
+
var historiesCommand = new import_commander12.Command("histories").description("\uBC30\uD3EC \uC774\uB825\uC744 \uC870\uD68C\uD55C\uB2E4").option("--artifact-id <id>", "\uC870\uD68C\uD560 \uC544\uD2F0\uD329\uD2B8 ID (artifacts \uB85C \uD655\uC778)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
4065
4217
|
const opts = cmd.optsWithGlobals();
|
|
4066
4218
|
const artifactId = requireCoordinate(opts.artifactId, "--artifact-id");
|
|
4067
4219
|
const { client, profileName } = await createDeployClient(opts.profile);
|
|
@@ -4084,8 +4236,8 @@ var historiesCommand = new import_commander10.Command("histories").description("
|
|
|
4084
4236
|
});
|
|
4085
4237
|
|
|
4086
4238
|
// src/commands/deploy/binary-groups.ts
|
|
4087
|
-
var
|
|
4088
|
-
var binaryGroupsCommand = new
|
|
4239
|
+
var import_commander13 = require("commander");
|
|
4240
|
+
var binaryGroupsCommand = new import_commander13.Command("binary-groups").description("\uBC14\uC774\uB108\uB9AC \uADF8\uB8F9 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").option("--artifact-id <id>", "\uC870\uD68C\uD560 \uC544\uD2F0\uD329\uD2B8 ID (artifacts \uB85C \uD655\uC778)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
4089
4241
|
const opts = cmd.optsWithGlobals();
|
|
4090
4242
|
const artifactId = requireCoordinate(opts.artifactId, "--artifact-id");
|
|
4091
4243
|
const { client, profileName } = await createDeployClient(opts.profile);
|
|
@@ -4116,7 +4268,7 @@ var binaryGroupsCommand = new import_commander11.Command("binary-groups").descri
|
|
|
4116
4268
|
});
|
|
4117
4269
|
|
|
4118
4270
|
// src/commands/deploy/binaries.ts
|
|
4119
|
-
var
|
|
4271
|
+
var import_commander14 = require("commander");
|
|
4120
4272
|
function parsePositiveInt(value, flag) {
|
|
4121
4273
|
if (value === void 0) return void 0;
|
|
4122
4274
|
if (!/^[1-9]\d*$/.test(value)) {
|
|
@@ -4127,7 +4279,7 @@ function parsePositiveInt(value, flag) {
|
|
|
4127
4279
|
}
|
|
4128
4280
|
return Number(value);
|
|
4129
4281
|
}
|
|
4130
|
-
var binariesCommand = new
|
|
4282
|
+
var binariesCommand = new import_commander14.Command("binaries").description("\uD2B9\uC815 \uBC14\uC774\uB108\uB9AC \uADF8\uB8F9\uC758 \uBC14\uC774\uB108\uB9AC \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").requiredOption("--binary-group <key>", "\uC870\uD68C\uD560 \uBC14\uC774\uB108\uB9AC \uADF8\uB8F9 key (binary-groups \uB85C \uD655\uC778)").option("--page-num <n>", "\uD398\uC774\uC9C0 \uBC88\uD638 (1 \uC774\uC0C1)").option("--page-size <n>", "\uD398\uC774\uC9C0 \uD06C\uAE30 (1 \uC774\uC0C1)").option("--sort-key <k>", "\uC815\uB82C \uAE30\uC900 (\uC608: UPLOAD_DATE)").option("--sort-direction <d>", "\uC815\uB82C \uBC29\uD5A5 (\uC608: DESC)").option("--artifact-id <id>", "\uC870\uD68C\uD560 \uC544\uD2F0\uD329\uD2B8 ID (artifacts \uB85C \uD655\uC778)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
4131
4283
|
const opts = cmd.optsWithGlobals();
|
|
4132
4284
|
const binaryGroupKey = parsePositiveInt(opts.binaryGroup, "--binary-group");
|
|
4133
4285
|
if (binaryGroupKey === void 0) {
|
|
@@ -4171,7 +4323,7 @@ var binariesCommand = new import_commander12.Command("binaries").description("\u
|
|
|
4171
4323
|
});
|
|
4172
4324
|
|
|
4173
4325
|
// src/commands/deploy/upload.ts
|
|
4174
|
-
var
|
|
4326
|
+
var import_commander15 = require("commander");
|
|
4175
4327
|
var import_node_fs5 = require("fs");
|
|
4176
4328
|
var import_node_path7 = require("path");
|
|
4177
4329
|
var MAX_UPLOAD_BYTES = 512 * 1024 * 1024;
|
|
@@ -4185,7 +4337,7 @@ function parsePositiveInt2(value, flag) {
|
|
|
4185
4337
|
}
|
|
4186
4338
|
return Number(value);
|
|
4187
4339
|
}
|
|
4188
|
-
var uploadCommand = new
|
|
4340
|
+
var uploadCommand = new import_commander15.Command("upload").description("\uB85C\uCEEC \uD30C\uC77C\uC744 \uBC14\uC774\uB108\uB9AC \uADF8\uB8F9\uC5D0 \uC5C5\uB85C\uB4DC\uD55C\uB2E4").requiredOption("--file <path>", "\uC5C5\uB85C\uB4DC\uD560 \uD30C\uC77C \uACBD\uB85C").requiredOption("--binary-group <key>", "\uC5C5\uB85C\uB4DC \uB300\uC0C1 \uBC14\uC774\uB108\uB9AC \uADF8\uB8F9 key (binary-groups \uB85C \uD655\uC778)").option("--application-type <type>", "applicationType (\uC608: server)", "server").option("--description <text>", "\uBC14\uC774\uB108\uB9AC \uC124\uBA85").option("--artifact-id <id>", "\uC5C5\uB85C\uB4DC \uB300\uC0C1 \uC544\uD2F0\uD329\uD2B8 ID (artifacts \uB85C \uD655\uC778)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
4189
4341
|
const opts = cmd.optsWithGlobals();
|
|
4190
4342
|
const binaryGroupKey = parsePositiveInt2(opts.binaryGroup, "--binary-group");
|
|
4191
4343
|
if (binaryGroupKey === void 0) {
|
|
@@ -4246,7 +4398,7 @@ var uploadCommand = new import_commander13.Command("upload").description("\uB85C
|
|
|
4246
4398
|
});
|
|
4247
4399
|
|
|
4248
4400
|
// src/commands/deploy/download.ts
|
|
4249
|
-
var
|
|
4401
|
+
var import_commander16 = require("commander");
|
|
4250
4402
|
var import_node_fs6 = require("fs");
|
|
4251
4403
|
var import_chalk4 = __toESM(require("chalk"));
|
|
4252
4404
|
function parsePositiveInt3(value, flag) {
|
|
@@ -4276,7 +4428,7 @@ function assertWritable2(path5, force) {
|
|
|
4276
4428
|
EXIT_PARAM_ERROR
|
|
4277
4429
|
);
|
|
4278
4430
|
}
|
|
4279
|
-
var downloadCommand = new
|
|
4431
|
+
var downloadCommand = new import_commander16.Command("download").description("\uBC14\uC774\uB108\uB9AC\uB97C \uB85C\uCEEC \uD30C\uC77C\uB85C \uB2E4\uC6B4\uB85C\uB4DC\uD55C\uB2E4").requiredOption("--binary-group <key>", "\uBC14\uC774\uB108\uB9AC \uADF8\uB8F9 key (binary-groups \uB85C \uD655\uC778)").requiredOption("--binary-key <key>", "\uB2E4\uC6B4\uB85C\uB4DC\uD560 \uBC14\uC774\uB108\uB9AC key (binaries \uB610\uB294 upload \uB85C \uD655\uC778)").requiredOption("-o, --output <file>", "\uC800\uC7A5\uD560 \uD30C\uC77C \uACBD\uB85C").option("--force", "\uB300\uC0C1 \uD30C\uC77C\uC774 \uC788\uC73C\uBA74 \uB36E\uC5B4\uC4F4\uB2E4").option("--artifact-id <id>", "\uB300\uC0C1 \uC544\uD2F0\uD329\uD2B8 ID (artifacts \uB85C \uD655\uC778)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
4280
4432
|
const opts = cmd.optsWithGlobals();
|
|
4281
4433
|
const binaryGroupKey = parsePositiveInt3(opts.binaryGroup, "--binary-group");
|
|
4282
4434
|
const binaryKey = parsePositiveInt3(opts.binaryKey, "--binary-key");
|
|
@@ -4304,7 +4456,7 @@ var downloadCommand = new import_commander14.Command("download").description("\u
|
|
|
4304
4456
|
});
|
|
4305
4457
|
|
|
4306
4458
|
// src/commands/instance/list.ts
|
|
4307
|
-
var
|
|
4459
|
+
var import_commander17 = require("commander");
|
|
4308
4460
|
|
|
4309
4461
|
// src/commands/iaas.ts
|
|
4310
4462
|
async function resolveIaasTokenContext(opts) {
|
|
@@ -4869,7 +5021,7 @@ async function resolveInstanceClient(opts) {
|
|
|
4869
5021
|
function getIps(server) {
|
|
4870
5022
|
return Object.values(server.addresses).flat().map((a) => a.addr).join(", ");
|
|
4871
5023
|
}
|
|
4872
|
-
var listCommand = new
|
|
5024
|
+
var listCommand = new import_commander17.Command("list").description("\uC778\uC2A4\uD134\uC2A4 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
4873
5025
|
const opts = cmd.optsWithGlobals();
|
|
4874
5026
|
const { client } = await resolveInstanceClient(opts);
|
|
4875
5027
|
startSpinner("\uC778\uC2A4\uD134\uC2A4 \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -4890,7 +5042,7 @@ var listCommand = new import_commander15.Command("list").description("\uC778\uC2
|
|
|
4890
5042
|
});
|
|
4891
5043
|
|
|
4892
5044
|
// src/commands/volume/list.ts
|
|
4893
|
-
var
|
|
5045
|
+
var import_commander18 = require("commander");
|
|
4894
5046
|
|
|
4895
5047
|
// src/services/blockstorage/client.ts
|
|
4896
5048
|
var import_ky10 = __toESM(require("ky"));
|
|
@@ -5008,7 +5160,7 @@ function parsePositiveInt4(value, flag) {
|
|
|
5008
5160
|
}
|
|
5009
5161
|
return Number(value);
|
|
5010
5162
|
}
|
|
5011
|
-
var listCommand2 = new
|
|
5163
|
+
var listCommand2 = new import_commander18.Command("list").description("\uBCFC\uB968 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").option("--sort <key:dir>", "\uC815\uB82C \uAE30\uC900 (\uC608: created_at:desc)").option("--limit <n>", "\uCD5C\uB300 \uBC18\uD658 \uAC1C\uC218").option("--offset <n>", "\uD398\uC774\uC9C0 \uC2DC\uC791 \uC624\uD504\uC14B").option("--marker <id>", "\uD398\uC774\uC9C0\uB124\uC774\uC158 \uB9C8\uCEE4 \uBCFC\uB968 ID").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
5012
5164
|
const opts = cmd.optsWithGlobals();
|
|
5013
5165
|
const limitNum = opts.limit !== void 0 ? parsePositiveInt4(opts.limit, "--limit") : void 0;
|
|
5014
5166
|
const offsetNum = opts.offset !== void 0 ? parsePositiveInt4(opts.offset, "--offset") : void 0;
|
|
@@ -5042,8 +5194,8 @@ var listCommand2 = new import_commander16.Command("list").description("\uBCFC\uB
|
|
|
5042
5194
|
});
|
|
5043
5195
|
|
|
5044
5196
|
// src/commands/volume/get.ts
|
|
5045
|
-
var
|
|
5046
|
-
var getCommand = new
|
|
5197
|
+
var import_commander19 = require("commander");
|
|
5198
|
+
var getCommand = new import_commander19.Command("get").description("\uB2E8\uC77C \uBCFC\uB968 \uC0C1\uD0DC\uB97C \uC870\uD68C\uD55C\uB2E4").argument("<id>", "\uBCFC\uB968 ID").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
5047
5199
|
const opts = cmd.optsWithGlobals();
|
|
5048
5200
|
const { client } = await resolveVolumeClient(opts);
|
|
5049
5201
|
startSpinner("\uBCFC\uB968 \uC870\uD68C \uC911...");
|
|
@@ -5074,9 +5226,9 @@ var getCommand = new import_commander17.Command("get").description("\uB2E8\uC77C
|
|
|
5074
5226
|
});
|
|
5075
5227
|
|
|
5076
5228
|
// src/commands/volume/create.ts
|
|
5077
|
-
var
|
|
5229
|
+
var import_commander20 = require("commander");
|
|
5078
5230
|
var import_chalk5 = __toESM(require("chalk"));
|
|
5079
|
-
var createCommand = new
|
|
5231
|
+
var createCommand = new import_commander20.Command("create").description("\uBCFC\uB968\uC744 \uBC1C\uAE09\uD55C\uB2E4").requiredOption("--size <gb>", "\uBCFC\uB968 \uD06C\uAE30(GB) \u2014 \uD544\uC218").option("--name <name>", "\uBCFC\uB968 \uC774\uB984").option("--description <text>", "\uBCFC\uB968 \uC124\uBA85").option("--volume-type <type>", "\uBCFC\uB968 \uD0C0\uC785").option("--availability-zone <az>", "\uAC00\uC6A9\uC131 \uC601\uC5ED(AZ). instance availability-zones \uB85C \uC870\uD68C\uD55C zoneName \uC9C0\uC815").option("--snapshot-id <id>", "\uC2A4\uB0C5\uC0F7 ID (\uC2A4\uB0C5\uC0F7\uC5D0\uC11C \uBCFC\uB968 \uC0DD\uC131)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
5080
5232
|
const opts = cmd.optsWithGlobals();
|
|
5081
5233
|
if (!/^[1-9]\d*$/.test(opts.size)) {
|
|
5082
5234
|
throw new NhnCloudCliError(
|
|
@@ -5129,7 +5281,7 @@ var createCommand = new import_commander18.Command("create").description("\uBCFC
|
|
|
5129
5281
|
});
|
|
5130
5282
|
|
|
5131
5283
|
// src/commands/network/list.ts
|
|
5132
|
-
var
|
|
5284
|
+
var import_commander21 = require("commander");
|
|
5133
5285
|
|
|
5134
5286
|
// src/services/network/client.ts
|
|
5135
5287
|
var import_ky11 = __toESM(require("ky"));
|
|
@@ -5308,7 +5460,7 @@ async function resolveNetworkClient(opts) {
|
|
|
5308
5460
|
}
|
|
5309
5461
|
|
|
5310
5462
|
// src/commands/network/list.ts
|
|
5311
|
-
var listCommand3 = new
|
|
5463
|
+
var listCommand3 = new import_commander21.Command("list").description("VPC \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4 (\uC804\uCCB4 \uD544\uB4DC\uB294 --json)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
5312
5464
|
const opts = cmd.optsWithGlobals();
|
|
5313
5465
|
const { client } = await resolveNetworkClient(opts);
|
|
5314
5466
|
startSpinner("VPC \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -5329,8 +5481,8 @@ var listCommand3 = new import_commander19.Command("list").description("VPC \uBAA
|
|
|
5329
5481
|
});
|
|
5330
5482
|
|
|
5331
5483
|
// src/commands/network/subnet.ts
|
|
5332
|
-
var
|
|
5333
|
-
var subnetListCommand = new
|
|
5484
|
+
var import_commander22 = require("commander");
|
|
5485
|
+
var subnetListCommand = new import_commander22.Command("list").description("\uC11C\uBE0C\uB137 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4 (\uC804\uCCB4 \uD544\uB4DC\uB294 --json)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
5334
5486
|
const opts = cmd.optsWithGlobals();
|
|
5335
5487
|
const { client } = await resolveNetworkClient(opts);
|
|
5336
5488
|
startSpinner("\uC11C\uBE0C\uB137 \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -5355,11 +5507,11 @@ var subnetListCommand = new import_commander20.Command("list").description("\uC1
|
|
|
5355
5507
|
ids: subnets.map((s) => s.id)
|
|
5356
5508
|
});
|
|
5357
5509
|
});
|
|
5358
|
-
var subnetCommand = new
|
|
5510
|
+
var subnetCommand = new import_commander22.Command("subnet").description("\uC11C\uBE0C\uB137 \uAD00\uB828 \uBA85\uB839").addCommand(subnetListCommand);
|
|
5359
5511
|
|
|
5360
5512
|
// src/commands/floatingip/list.ts
|
|
5361
|
-
var
|
|
5362
|
-
var listCommand4 = new
|
|
5513
|
+
var import_commander23 = require("commander");
|
|
5514
|
+
var listCommand4 = new import_commander23.Command("list").description("Floating IP \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
5363
5515
|
const opts = cmd.optsWithGlobals();
|
|
5364
5516
|
const { client } = await resolveNetworkClient(opts);
|
|
5365
5517
|
startSpinner("Floating IP \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -5386,9 +5538,9 @@ var listCommand4 = new import_commander21.Command("list").description("Floating
|
|
|
5386
5538
|
});
|
|
5387
5539
|
|
|
5388
5540
|
// src/commands/floatingip/create.ts
|
|
5389
|
-
var
|
|
5541
|
+
var import_commander24 = require("commander");
|
|
5390
5542
|
var import_chalk6 = __toESM(require("chalk"));
|
|
5391
|
-
var createCommand2 = new
|
|
5543
|
+
var createCommand2 = new import_commander24.Command("create").description("Floating IP \uB97C \uBC1C\uAE09\uD55C\uB2E4 (--network \uBBF8\uC9C0\uC815 \uC2DC \uC678\uBD80 VPC \uC790\uB3D9 \uC870\uD68C)").option("--network <id>", "\uC678\uBD80 \uB124\uD2B8\uC6CC\uD06C(VPC) id (\uBBF8\uC9C0\uC815 \uC2DC router:external=true \uC790\uB3D9 \uC870\uD68C)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
5392
5544
|
const opts = cmd.optsWithGlobals();
|
|
5393
5545
|
const { client } = await resolveNetworkClient(opts);
|
|
5394
5546
|
let networkId = opts.network;
|
|
@@ -5431,9 +5583,9 @@ var createCommand2 = new import_commander22.Command("create").description("Float
|
|
|
5431
5583
|
});
|
|
5432
5584
|
|
|
5433
5585
|
// src/commands/floatingip/delete.ts
|
|
5434
|
-
var
|
|
5586
|
+
var import_commander25 = require("commander");
|
|
5435
5587
|
var import_chalk7 = __toESM(require("chalk"));
|
|
5436
|
-
var deleteCommand = new
|
|
5588
|
+
var deleteCommand = new import_commander25.Command("delete").description("Floating IP \uB97C \uC0AD\uC81C\uD55C\uB2E4").argument("<id>", "Floating IP ID").option("--yes", "\uD655\uC778 \uD504\uB86C\uD504\uD2B8 \uC0DD\uB7B5 (CI/\uBE44\uB300\uD654\uD615 \uD544\uC218)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
5437
5589
|
const opts = cmd.optsWithGlobals();
|
|
5438
5590
|
const isTTY = process.stdin.isTTY;
|
|
5439
5591
|
if (!isTTY && !opts.yes) {
|
|
@@ -5467,8 +5619,8 @@ var deleteCommand = new import_commander23.Command("delete").description("Floati
|
|
|
5467
5619
|
});
|
|
5468
5620
|
|
|
5469
5621
|
// src/commands/instance/flavors.ts
|
|
5470
|
-
var
|
|
5471
|
-
var flavorsCommand = new
|
|
5622
|
+
var import_commander26 = require("commander");
|
|
5623
|
+
var flavorsCommand = new import_commander26.Command("flavors").description("\uC778\uC2A4\uD134\uC2A4 \uD0C0\uC785(flavor)\uC744 \uC870\uD68C\uD55C\uB2E4 (\uAE30\uBCF8 id\xB7name, --detail \uB85C \uC2A4\uD399, \uC804\uCCB4 \uD544\uB4DC\uB294 --json)").option("--detail", "vcpus\xB7ram\xB7disk \uB4F1 \uC2A4\uD399 \uD3EC\uD568 (GET /flavors/detail)").option("--min-disk <gb>", "\uCD5C\uC18C \uBE14\uB85D \uC2A4\uD1A0\uB9AC\uC9C0 \uD06C\uAE30(GB) \uC774\uC0C1\uB9CC \uD544\uD130").option("--min-ram <mb>", "\uCD5C\uC18C RAM \uD06C\uAE30(MB) \uC774\uC0C1\uB9CC \uD544\uD130").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
5472
5624
|
const opts = cmd.optsWithGlobals();
|
|
5473
5625
|
const minDisk = parseNonNegativeIntegerOption(opts.minDisk, "--min-disk");
|
|
5474
5626
|
const minRam = parseNonNegativeIntegerOption(opts.minRam, "--min-ram");
|
|
@@ -5511,8 +5663,8 @@ function isDetailList(flavors) {
|
|
|
5511
5663
|
}
|
|
5512
5664
|
|
|
5513
5665
|
// src/commands/instance/availability-zones.ts
|
|
5514
|
-
var
|
|
5515
|
-
var availabilityZonesCommand = new
|
|
5666
|
+
var import_commander27 = require("commander");
|
|
5667
|
+
var availabilityZonesCommand = new import_commander27.Command("availability-zones").description("\uAC00\uC6A9\uC131 \uC601\uC5ED(availability zone) \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4 (zoneName\xB7available)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
5516
5668
|
const opts = cmd.optsWithGlobals();
|
|
5517
5669
|
const { client } = await resolveInstanceClient(opts);
|
|
5518
5670
|
startSpinner("\uAC00\uC6A9\uC131 \uC601\uC5ED \uC870\uD68C \uC911...");
|
|
@@ -5533,14 +5685,14 @@ var availabilityZonesCommand = new import_commander25.Command("availability-zone
|
|
|
5533
5685
|
});
|
|
5534
5686
|
|
|
5535
5687
|
// src/commands/instance/get.ts
|
|
5536
|
-
var
|
|
5688
|
+
var import_commander28 = require("commander");
|
|
5537
5689
|
function getIps2(server) {
|
|
5538
5690
|
return Object.values(server.addresses).flat().map((a) => a.addr).join(", ");
|
|
5539
5691
|
}
|
|
5540
5692
|
function getImageId(server) {
|
|
5541
5693
|
return typeof server.image === "object" ? server.image.id : "";
|
|
5542
5694
|
}
|
|
5543
|
-
var getCommand2 = new
|
|
5695
|
+
var getCommand2 = new import_commander28.Command("get").description("\uB2E8\uC77C \uC778\uC2A4\uD134\uC2A4 \uC0C1\uD0DC\uB97C \uC870\uD68C\uD55C\uB2E4").argument("<id>", "\uC778\uC2A4\uD134\uC2A4 ID").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
5544
5696
|
const opts = cmd.optsWithGlobals();
|
|
5545
5697
|
const { client } = await resolveInstanceClient(opts);
|
|
5546
5698
|
startSpinner("\uC778\uC2A4\uD134\uC2A4 \uC870\uD68C \uC911...");
|
|
@@ -5572,7 +5724,7 @@ var getCommand2 = new import_commander26.Command("get").description("\uB2E8\uC77
|
|
|
5572
5724
|
});
|
|
5573
5725
|
|
|
5574
5726
|
// src/commands/instance/create.ts
|
|
5575
|
-
var
|
|
5727
|
+
var import_commander29 = require("commander");
|
|
5576
5728
|
var import_node_fs7 = require("fs");
|
|
5577
5729
|
var import_chalk8 = __toESM(require("chalk"));
|
|
5578
5730
|
function getFirstIp(server) {
|
|
@@ -5589,7 +5741,7 @@ function getIps3(server) {
|
|
|
5589
5741
|
function getImageId2(server) {
|
|
5590
5742
|
return typeof server.image === "object" ? server.image.id : "";
|
|
5591
5743
|
}
|
|
5592
|
-
var createCommand3 = new
|
|
5744
|
+
var createCommand3 = new import_commander29.Command("create").description("\uC778\uC2A4\uD134\uC2A4\uB97C \uC0DD\uC131\uD55C\uB2E4").requiredOption("--name <name>", "\uC778\uC2A4\uD134\uC2A4 \uC774\uB984").requiredOption("--flavor <id>", "flavor ID").requiredOption("--image <id>", "\uC774\uBBF8\uC9C0 ID").requiredOption("--network <uuid>", "\uB124\uD2B8\uC6CC\uD06C UUID (\uC5EC\uB7EC \uAC1C: \uBC18\uBCF5 \uC9C0\uC815)", (v, prev) => [...prev, v], []).option("--boot-volume-size <gb>", "boot-from-volume root \uBCFC\uB968 \uD06C\uAE30 (GB). GPU(g2) \uB4F1 boot-from-volume \uD544\uC218 flavor \uC5D0 \uC9C0\uC815").option("--key-name <name>", "\uD0A4\uD398\uC5B4 \uC774\uB984").option("--security-group <name>", "\uBCF4\uC548 \uADF8\uB8F9 \uC774\uB984 (\uC5EC\uB7EC \uAC1C: \uBC18\uBCF5 \uC9C0\uC815)", (v, prev) => [...prev, v], []).option("--ephemeral-disk-size <gb>", "\uC784\uC2DC \uB514\uC2A4\uD06C \uD06C\uAE30 (GB, NHN \uD655\uC7A5)").option("--protect", "\uC0AD\uC81C \uBC29\uC9C0 \uC124\uC815 (NHN \uD655\uC7A5)").option("--user-data <path>", "cloud-init user-data \uD30C\uC77C \uACBD\uB85C (base64 \uC778\uCF54\uB529\uD574 \uC8FC\uC785, \uC778\uCF54\uB529 \uD6C4 65535 \uBC14\uC774\uD2B8 \uD55C\uB3C4)").option("--wait", "ACTIVE \uC0C1\uD0DC\uAC00 \uB420 \uB54C\uAE4C\uC9C0 \uB300\uAE30").option("--timeout <sec>", "wait \uD0C0\uC784\uC544\uC6C3 (\uCD08, \uAE30\uBCF8 300)", "300").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
5593
5745
|
const opts = cmd.optsWithGlobals();
|
|
5594
5746
|
const networks = opts.network ?? [];
|
|
5595
5747
|
if (networks.length === 0) {
|
|
@@ -5688,9 +5840,9 @@ var createCommand3 = new import_commander27.Command("create").description("\uC77
|
|
|
5688
5840
|
});
|
|
5689
5841
|
|
|
5690
5842
|
// src/commands/instance/delete.ts
|
|
5691
|
-
var
|
|
5843
|
+
var import_commander30 = require("commander");
|
|
5692
5844
|
var import_chalk9 = __toESM(require("chalk"));
|
|
5693
|
-
var deleteCommand2 = new
|
|
5845
|
+
var deleteCommand2 = new import_commander30.Command("delete").description("\uC778\uC2A4\uD134\uC2A4\uB97C \uC0AD\uC81C\uD55C\uB2E4").argument("<id>", "\uC778\uC2A4\uD134\uC2A4 ID").option("--yes", "\uD655\uC778 \uD504\uB86C\uD504\uD2B8 \uC0DD\uB7B5 (CI/\uBE44\uB300\uD654\uD615 \uD544\uC218)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
5694
5846
|
const opts = cmd.optsWithGlobals();
|
|
5695
5847
|
const isTTY = process.stdin.isTTY;
|
|
5696
5848
|
if (!isTTY && !opts.yes) {
|
|
@@ -5724,9 +5876,9 @@ var deleteCommand2 = new import_commander28.Command("delete").description("\uC77
|
|
|
5724
5876
|
});
|
|
5725
5877
|
|
|
5726
5878
|
// src/commands/instance/power.ts
|
|
5727
|
-
var
|
|
5879
|
+
var import_commander31 = require("commander");
|
|
5728
5880
|
var import_chalk10 = __toESM(require("chalk"));
|
|
5729
|
-
var startCommand = new
|
|
5881
|
+
var startCommand = new import_commander31.Command("start").description("\uC778\uC2A4\uD134\uC2A4\uB97C \uC2DC\uC791\uD55C\uB2E4 (SHUTOFF \u2192 ACTIVE)").argument("<id>", "\uC778\uC2A4\uD134\uC2A4 ID").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
5730
5882
|
const opts = cmd.optsWithGlobals();
|
|
5731
5883
|
const { client } = await resolveInstanceClient(opts);
|
|
5732
5884
|
startSpinner(`\uC778\uC2A4\uD134\uC2A4 \uC2DC\uC791 \uC911... (id: ${id})`);
|
|
@@ -5740,7 +5892,7 @@ var startCommand = new import_commander29.Command("start").description("\uC778\u
|
|
|
5740
5892
|
process.stderr.write(import_chalk10.default.green(`\u2713 \uC778\uC2A4\uD134\uC2A4 "${id}" \uC2DC\uC791\uC744 \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4 (\u2192 ACTIVE).
|
|
5741
5893
|
`));
|
|
5742
5894
|
});
|
|
5743
|
-
var stopCommand = new
|
|
5895
|
+
var stopCommand = new import_commander31.Command("stop").description("\uC778\uC2A4\uD134\uC2A4\uB97C \uC815\uC9C0\uD55C\uB2E4 (ACTIVE/ERROR \u2192 SHUTOFF)").argument("<id>", "\uC778\uC2A4\uD134\uC2A4 ID").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
5744
5896
|
const opts = cmd.optsWithGlobals();
|
|
5745
5897
|
const { client } = await resolveInstanceClient(opts);
|
|
5746
5898
|
startSpinner(`\uC778\uC2A4\uD134\uC2A4 \uC815\uC9C0 \uC911... (id: ${id})`);
|
|
@@ -5754,7 +5906,7 @@ var stopCommand = new import_commander29.Command("stop").description("\uC778\uC2
|
|
|
5754
5906
|
process.stderr.write(import_chalk10.default.green(`\u2713 \uC778\uC2A4\uD134\uC2A4 "${id}" \uC815\uC9C0\uB97C \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4 (\u2192 SHUTOFF).
|
|
5755
5907
|
`));
|
|
5756
5908
|
});
|
|
5757
|
-
var rebootCommand = new
|
|
5909
|
+
var rebootCommand = new import_commander31.Command("reboot").description("\uC778\uC2A4\uD134\uC2A4\uB97C \uC7AC\uBD80\uD305\uD55C\uB2E4 (\uAE30\uBCF8 SOFT, --hard \uB85C HARD)").argument("<id>", "\uC778\uC2A4\uD134\uC2A4 ID").option("--hard", "HARD \uC7AC\uBD80\uD305 (\uAC15\uC81C \uC804\uC6D0 cycle, \uAE30\uBCF8\uC740 SOFT)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
5758
5910
|
const opts = cmd.optsWithGlobals();
|
|
5759
5911
|
const { client } = await resolveInstanceClient(opts);
|
|
5760
5912
|
const type = opts.hard ? "HARD" : "SOFT";
|
|
@@ -5771,9 +5923,9 @@ var rebootCommand = new import_commander29.Command("reboot").description("\uC778
|
|
|
5771
5923
|
});
|
|
5772
5924
|
|
|
5773
5925
|
// src/commands/instance/resize.ts
|
|
5774
|
-
var
|
|
5926
|
+
var import_commander32 = require("commander");
|
|
5775
5927
|
var import_chalk11 = __toESM(require("chalk"));
|
|
5776
|
-
var resizeCommand = new
|
|
5928
|
+
var resizeCommand = new import_commander32.Command("resize").description("\uC778\uC2A4\uD134\uC2A4 \uD0C0\uC785(flavor)\uC744 \uBCC0\uACBD\uD55C\uB2E4").argument("<id>", "\uC778\uC2A4\uD134\uC2A4 ID").requiredOption("--flavor <id>", "\uBCC0\uACBD\uD560 flavor ID (instance flavors \uB85C \uD6C4\uBCF4 \uC870\uD68C)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
5777
5929
|
const opts = cmd.optsWithGlobals();
|
|
5778
5930
|
const { client } = await resolveInstanceClient(opts);
|
|
5779
5931
|
startSpinner(`\uC778\uC2A4\uD134\uC2A4 \uD0C0\uC785 \uBCC0\uACBD \uC911... (id: ${id})`);
|
|
@@ -5791,7 +5943,7 @@ var resizeCommand = new import_commander30.Command("resize").description("\uC778
|
|
|
5791
5943
|
)
|
|
5792
5944
|
);
|
|
5793
5945
|
});
|
|
5794
|
-
var resizeConfirmCommand = new
|
|
5946
|
+
var resizeConfirmCommand = new import_commander32.Command("resize-confirm").description("resize \uB97C \uD655\uC815\uD55C\uB2E4 (VERIFY_RESIZE \u2192 ACTIVE, \uC0C8 flavor \uB85C \uACE0\uC815)").argument("<id>", "\uC778\uC2A4\uD134\uC2A4 ID").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
5795
5947
|
const opts = cmd.optsWithGlobals();
|
|
5796
5948
|
const { client } = await resolveInstanceClient(opts);
|
|
5797
5949
|
startSpinner(`resize \uD655\uC815 \uC911... (id: ${id})`);
|
|
@@ -5805,7 +5957,7 @@ var resizeConfirmCommand = new import_commander30.Command("resize-confirm").desc
|
|
|
5805
5957
|
process.stderr.write(import_chalk11.default.green(`\u2713 \uC778\uC2A4\uD134\uC2A4 "${id}" resize \uD655\uC815\uC744 \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4 (\u2192 ACTIVE).
|
|
5806
5958
|
`));
|
|
5807
5959
|
});
|
|
5808
|
-
var resizeRevertCommand = new
|
|
5960
|
+
var resizeRevertCommand = new import_commander32.Command("resize-revert").description("resize \uB97C \uB864\uBC31\uD55C\uB2E4 (VERIFY_RESIZE \u2192 ACTIVE, \uC774\uC804 flavor \uB85C \uBCF5\uADC0)").argument("<id>", "\uC778\uC2A4\uD134\uC2A4 ID").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
5809
5961
|
const opts = cmd.optsWithGlobals();
|
|
5810
5962
|
const { client } = await resolveInstanceClient(opts);
|
|
5811
5963
|
startSpinner(`resize \uB864\uBC31 \uC911... (id: ${id})`);
|
|
@@ -5823,9 +5975,9 @@ var resizeRevertCommand = new import_commander30.Command("resize-revert").descri
|
|
|
5823
5975
|
});
|
|
5824
5976
|
|
|
5825
5977
|
// src/commands/instance/images.ts
|
|
5826
|
-
var
|
|
5978
|
+
var import_commander33 = require("commander");
|
|
5827
5979
|
var VISIBILITY_VALUES = ["public", "private", "shared"];
|
|
5828
|
-
var imagesCommand = new
|
|
5980
|
+
var imagesCommand = new import_commander33.Command("images").description("\uC774\uBBF8\uC9C0 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4 (create --image <id> \uC18C\uC2A4, \uC804\uCCB4 \uD544\uB4DC\uB294 --json)").option("--limit <n>", "\uD55C \uD398\uC774\uC9C0 \uCD5C\uB300 \uAC1C\uC218 (\uAE30\uBCF8: \uC11C\uBC84 \uAE30\uBCF8\uAC12 25)").option("--marker <id>", "\uC774 image id \uB2E4\uC74C\uBD80\uD130 \uC870\uD68C (\uD398\uC774\uC9C0\uB124\uC774\uC158)").option("--name <name>", "\uC774\uB984\uC73C\uB85C \uD544\uD130").option("--visibility <v>", `\uB178\uCD9C \uBC94\uC704 \uD544\uD130 (${VISIBILITY_VALUES.join("|")})`).option("--owner <id>", "\uC18C\uC720\uC790(\uD504\uB85C\uC81D\uD2B8 id)\uB85C \uD544\uD130").option("--status <status>", "\uC0C1\uD0DC\uB85C \uD544\uD130 (\uC608: active)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
5829
5981
|
const opts = cmd.optsWithGlobals();
|
|
5830
5982
|
const limit = parsePositiveIntegerOption(opts.limit, "--limit");
|
|
5831
5983
|
if (opts.visibility !== void 0 && !VISIBILITY_VALUES.includes(opts.visibility)) {
|
|
@@ -5873,8 +6025,8 @@ var imagesCommand = new import_commander31.Command("images").description("\uC774
|
|
|
5873
6025
|
});
|
|
5874
6026
|
|
|
5875
6027
|
// src/commands/instance/keypairs.ts
|
|
5876
|
-
var
|
|
5877
|
-
var keypairsCommand = new
|
|
6028
|
+
var import_commander34 = require("commander");
|
|
6029
|
+
var keypairsCommand = new import_commander34.Command("keypairs").description("\uD0A4\uD398\uC5B4 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4 (name\xB7fingerprint, \uC804\uCCB4 \uD544\uB4DC\uB294 --json)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
5878
6030
|
const opts = cmd.optsWithGlobals();
|
|
5879
6031
|
const { client } = await resolveInstanceClient(opts);
|
|
5880
6032
|
startSpinner("\uD0A4\uD398\uC5B4 \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -5895,7 +6047,7 @@ var keypairsCommand = new import_commander32.Command("keypairs").description("\u
|
|
|
5895
6047
|
});
|
|
5896
6048
|
|
|
5897
6049
|
// src/commands/instance/keypair.ts
|
|
5898
|
-
var
|
|
6050
|
+
var import_commander35 = require("commander");
|
|
5899
6051
|
var import_node_fs8 = require("fs");
|
|
5900
6052
|
var import_node_crypto5 = require("crypto");
|
|
5901
6053
|
var import_chalk12 = __toESM(require("chalk"));
|
|
@@ -5938,7 +6090,7 @@ function savePrivateKey(filePath, privateKey) {
|
|
|
5938
6090
|
);
|
|
5939
6091
|
}
|
|
5940
6092
|
}
|
|
5941
|
-
var getKeypairCmd = new
|
|
6093
|
+
var getKeypairCmd = new import_commander35.Command("get").description("\uB2E8\uC77C \uD0A4\uD398\uC5B4\uB97C \uC870\uD68C\uD55C\uB2E4").argument("<name>", "\uD0A4\uD398\uC5B4 \uC774\uB984").option("--region <region>", "region override").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (name, _opts, cmd) => {
|
|
5942
6094
|
const opts = cmd.optsWithGlobals();
|
|
5943
6095
|
const { client } = await resolveInstanceClient(opts);
|
|
5944
6096
|
startSpinner("\uD0A4\uD398\uC5B4 \uC870\uD68C \uC911...");
|
|
@@ -5963,7 +6115,7 @@ var getKeypairCmd = new import_commander33.Command("get").description("\uB2E8\uC
|
|
|
5963
6115
|
ids: [kp.name]
|
|
5964
6116
|
});
|
|
5965
6117
|
});
|
|
5966
|
-
var createKeypairCmd = new
|
|
6118
|
+
var createKeypairCmd = new import_commander35.Command("create").description("\uD0A4\uD398\uC5B4\uB97C \uC0DD\uC131\uD55C\uB2E4 (--public-key \uBBF8\uC9C0\uC815 \uC2DC NHN \uC774 \uD0A4\uC30D \uC0DD\uC131 \u2014 private_key 1\uD68C\uC131)").argument("<name>", "\uD0A4\uD398\uC5B4 \uC774\uB984").option("--public-key <path|key>", "\uAE30\uC874 \uACF5\uAC1C\uD0A4 (\uD30C\uC77C \uACBD\uB85C \uB610\uB294 \uD0A4 \uBB38\uC790\uC5F4). \uC9C0\uC815 \uC2DC private_key \uBBF8\uBC18\uD658").option("-o, --output <keyfile>", "\uC0DD\uC131\uB41C private_key \uB97C \uD30C\uC77C(mode 0600)\uB85C \uC800\uC7A5").option("--region <region>", "region override").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (name, _opts, cmd) => {
|
|
5967
6119
|
const opts = cmd.optsWithGlobals();
|
|
5968
6120
|
const publicKey = opts.publicKey !== void 0 ? resolvePublicKey(opts.publicKey) : void 0;
|
|
5969
6121
|
if (opts.output !== void 0 && publicKey !== void 0) {
|
|
@@ -6022,7 +6174,7 @@ var createKeypairCmd = new import_commander33.Command("create").description("\uD
|
|
|
6022
6174
|
ids: [meta.name]
|
|
6023
6175
|
});
|
|
6024
6176
|
});
|
|
6025
|
-
var deleteKeypairCmd = new
|
|
6177
|
+
var deleteKeypairCmd = new import_commander35.Command("delete").description("\uD0A4\uD398\uC5B4\uB97C \uC0AD\uC81C\uD55C\uB2E4").argument("<name>", "\uD0A4\uD398\uC5B4 \uC774\uB984").option("--region <region>", "region override").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (name, _opts, cmd) => {
|
|
6026
6178
|
const opts = cmd.optsWithGlobals();
|
|
6027
6179
|
const { client } = await resolveInstanceClient(opts);
|
|
6028
6180
|
startSpinner("\uD0A4\uD398\uC5B4 \uC0AD\uC81C \uC911...");
|
|
@@ -6036,12 +6188,12 @@ var deleteKeypairCmd = new import_commander33.Command("delete").description("\uD
|
|
|
6036
6188
|
process.stderr.write(import_chalk12.default.green(`\u2713 \uD0A4\uD398\uC5B4 "${name}" \uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
|
|
6037
6189
|
`));
|
|
6038
6190
|
});
|
|
6039
|
-
var keypairCommand = new
|
|
6191
|
+
var keypairCommand = new import_commander35.Command("keypair").description("\uD0A4\uD398\uC5B4 \uB2E8\uAC74 \uAD00\uB9AC (get / create / delete)").addCommand(getKeypairCmd).addCommand(createKeypairCmd).addCommand(deleteKeypairCmd);
|
|
6040
6192
|
|
|
6041
6193
|
// src/commands/instance/volume.ts
|
|
6042
|
-
var
|
|
6194
|
+
var import_commander36 = require("commander");
|
|
6043
6195
|
var import_chalk13 = __toESM(require("chalk"));
|
|
6044
|
-
var attachCommand = new
|
|
6196
|
+
var attachCommand = new import_commander36.Command("attach").description("\uBCFC\uB968\uC744 \uC778\uC2A4\uD134\uC2A4\uC5D0 \uC5F0\uACB0\uD55C\uB2E4").argument("<id>", "\uC778\uC2A4\uD134\uC2A4 ID").requiredOption("--volume <volumeId>", "\uC5F0\uACB0\uD560 \uBCFC\uB968 ID").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
6045
6197
|
const opts = cmd.optsWithGlobals();
|
|
6046
6198
|
const { client } = await resolveInstanceClient(opts);
|
|
6047
6199
|
startSpinner("\uBCFC\uB968 \uC5F0\uACB0 \uC911...");
|
|
@@ -6069,7 +6221,7 @@ var attachCommand = new import_commander34.Command("attach").description("\uBCFC
|
|
|
6069
6221
|
ids: [att.id]
|
|
6070
6222
|
});
|
|
6071
6223
|
});
|
|
6072
|
-
var detachCommand = new
|
|
6224
|
+
var detachCommand = new import_commander36.Command("detach").description("\uBCFC\uB968 \uC5F0\uACB0\uC744 \uD574\uC81C\uD55C\uB2E4").argument("<id>", "\uC778\uC2A4\uD134\uC2A4 ID").argument("<volumeId>", "\uD574\uC81C\uD560 \uBCFC\uB968 ID").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, volumeId, _opts, cmd) => {
|
|
6073
6225
|
const opts = cmd.optsWithGlobals();
|
|
6074
6226
|
const { client } = await resolveInstanceClient(opts);
|
|
6075
6227
|
startSpinner("\uBCFC\uB968 \uC5F0\uACB0 \uD574\uC81C \uC911...");
|
|
@@ -6085,15 +6237,15 @@ var detachCommand = new import_commander34.Command("detach").description("\uBCFC
|
|
|
6085
6237
|
`)
|
|
6086
6238
|
);
|
|
6087
6239
|
});
|
|
6088
|
-
var volumeCommand = new
|
|
6240
|
+
var volumeCommand = new import_commander36.Command("volume").description(
|
|
6089
6241
|
"\uC778\uC2A4\uD134\uC2A4 \uBCFC\uB968 \uC5F0\uACB0/\uD574\uC81C"
|
|
6090
6242
|
);
|
|
6091
6243
|
volumeCommand.addCommand(attachCommand);
|
|
6092
6244
|
volumeCommand.addCommand(detachCommand);
|
|
6093
6245
|
|
|
6094
6246
|
// src/commands/instance/volumes.ts
|
|
6095
|
-
var
|
|
6096
|
-
var volumesCommand = new
|
|
6247
|
+
var import_commander37 = require("commander");
|
|
6248
|
+
var volumesCommand = new import_commander37.Command("volumes").description("\uC778\uC2A4\uD134\uC2A4\uC5D0 \uC5F0\uACB0\uB41C \uBCFC\uB968 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<id>", "\uC778\uC2A4\uD134\uC2A4 ID").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
6097
6249
|
const opts = cmd.optsWithGlobals();
|
|
6098
6250
|
const { client } = await resolveInstanceClient(opts);
|
|
6099
6251
|
startSpinner("\uBCFC\uB968 \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -6114,7 +6266,7 @@ var volumesCommand = new import_commander35.Command("volumes").description("\uC7
|
|
|
6114
6266
|
});
|
|
6115
6267
|
|
|
6116
6268
|
// src/commands/ncr/list.ts
|
|
6117
|
-
var
|
|
6269
|
+
var import_commander38 = require("commander");
|
|
6118
6270
|
|
|
6119
6271
|
// src/services/ncr/harbor-client.ts
|
|
6120
6272
|
var import_ky12 = __toESM(require("ky"));
|
|
@@ -6207,21 +6359,11 @@ async function createNcrClient(opts) {
|
|
|
6207
6359
|
return { client: new NcrClient(uak.id, uak.secret, region), profileName };
|
|
6208
6360
|
}
|
|
6209
6361
|
async function resolveAppKey(profileName) {
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
throw err;
|
|
6216
|
-
}
|
|
6217
|
-
}
|
|
6218
|
-
if (!cred?.appkey) {
|
|
6219
|
-
throw new NhnCloudCliError(
|
|
6220
|
-
"NCR appKey \uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.\nnhncloud configure --ncr-appkey <key> \uB97C \uC2E4\uD589\uD574 \uC124\uC815\uD558\uC138\uC694.",
|
|
6221
|
-
EXIT_CONFIG_ERROR
|
|
6222
|
-
);
|
|
6223
|
-
}
|
|
6224
|
-
return cred.appkey;
|
|
6362
|
+
return resolveServiceAppKey(
|
|
6363
|
+
"ncr",
|
|
6364
|
+
profileName,
|
|
6365
|
+
"NCR appKey \uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.\nnhncloud configure --ncr-appkey <key> \uB97C \uC2E4\uD589\uD574 \uC124\uC815\uD558\uC138\uC694."
|
|
6366
|
+
);
|
|
6225
6367
|
}
|
|
6226
6368
|
async function createHarborClient(opts, registryArg) {
|
|
6227
6369
|
const { client: ncrClient, profileName } = await createNcrClient(opts);
|
|
@@ -6251,7 +6393,7 @@ function parseHarborHost(uri) {
|
|
|
6251
6393
|
}
|
|
6252
6394
|
|
|
6253
6395
|
// src/commands/ncr/list.ts
|
|
6254
|
-
var listCommand5 = new
|
|
6396
|
+
var listCommand5 = new import_commander38.Command("list").description("NCR \uB808\uC9C0\uC2A4\uD2B8\uB9AC \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").option("--region <region>", "NCR region (\uAE30\uBCF8: kr1)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
6255
6397
|
const opts = cmd.optsWithGlobals();
|
|
6256
6398
|
const { client, profileName } = await createNcrClient(opts);
|
|
6257
6399
|
const appKey = await resolveAppKey(profileName);
|
|
@@ -6277,8 +6419,8 @@ var listCommand5 = new import_commander36.Command("list").description("NCR \uB80
|
|
|
6277
6419
|
});
|
|
6278
6420
|
|
|
6279
6421
|
// src/commands/ncr/get.ts
|
|
6280
|
-
var
|
|
6281
|
-
var getCommand3 = new
|
|
6422
|
+
var import_commander39 = require("commander");
|
|
6423
|
+
var getCommand3 = new import_commander39.Command("get").description("\uB2E8\uC77C NCR \uB808\uC9C0\uC2A4\uD2B8\uB9AC\uB97C \uC870\uD68C\uD55C\uB2E4").argument("<registry>", "\uB808\uC9C0\uC2A4\uD2B8\uB9AC \uC774\uB984 \uB610\uB294 ID").option("--region <region>", "NCR region (\uAE30\uBCF8: kr1)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (registry, _opts, cmd) => {
|
|
6282
6424
|
const opts = cmd.optsWithGlobals();
|
|
6283
6425
|
if (!registry.trim()) {
|
|
6284
6426
|
throw new NhnCloudCliError(
|
|
@@ -6306,8 +6448,8 @@ var getCommand3 = new import_commander37.Command("get").description("\uB2E8\uC77
|
|
|
6306
6448
|
});
|
|
6307
6449
|
|
|
6308
6450
|
// src/commands/ncr/images.ts
|
|
6309
|
-
var
|
|
6310
|
-
var imagesCommand2 = new
|
|
6451
|
+
var import_commander40 = require("commander");
|
|
6452
|
+
var imagesCommand2 = new import_commander40.Command("images").description("\uB808\uC9C0\uC2A4\uD2B8\uB9AC\uC758 \uC774\uBBF8\uC9C0(repository) \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<registry>", "\uB808\uC9C0\uC2A4\uD2B8\uB9AC \uC774\uB984").option("--region <region>", "NCR region (\uAE30\uBCF8: kr1)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (registry, _opts, cmd) => {
|
|
6311
6453
|
const opts = cmd.optsWithGlobals();
|
|
6312
6454
|
if (!registry.trim()) {
|
|
6313
6455
|
throw new NhnCloudCliError(
|
|
@@ -6341,8 +6483,8 @@ var imagesCommand2 = new import_commander38.Command("images").description("\uB80
|
|
|
6341
6483
|
});
|
|
6342
6484
|
|
|
6343
6485
|
// src/commands/ncr/tags.ts
|
|
6344
|
-
var
|
|
6345
|
-
var tagsCommand = new
|
|
6486
|
+
var import_commander41 = require("commander");
|
|
6487
|
+
var tagsCommand = new import_commander41.Command("tags").description("\uD2B9\uC815 \uC774\uBBF8\uC9C0\uC758 \uD0DC\uADF8 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<registry>", "\uB808\uC9C0\uC2A4\uD2B8\uB9AC \uC774\uB984").argument("<repository>", "\uC774\uBBF8\uC9C0(repository) \uC774\uB984 (\uC9E7\uC740 \uC774\uB984 \uB610\uB294 {project}/{repo})").option("--region <region>", "NCR region (\uAE30\uBCF8: kr1)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (registry, repository, _opts, cmd) => {
|
|
6346
6488
|
const opts = cmd.optsWithGlobals();
|
|
6347
6489
|
if (!registry.trim()) {
|
|
6348
6490
|
throw new NhnCloudCliError(
|
|
@@ -6383,7 +6525,7 @@ var tagsCommand = new import_commander39.Command("tags").description("\uD2B9\uC8
|
|
|
6383
6525
|
});
|
|
6384
6526
|
|
|
6385
6527
|
// src/commands/commands.ts
|
|
6386
|
-
var
|
|
6528
|
+
var import_commander42 = require("commander");
|
|
6387
6529
|
function commandPath(command) {
|
|
6388
6530
|
const names = [];
|
|
6389
6531
|
let current2 = command;
|
|
@@ -6421,7 +6563,7 @@ function collectCommandCatalog(program2) {
|
|
|
6421
6563
|
return { commands };
|
|
6422
6564
|
}
|
|
6423
6565
|
function createCommandsCommand(program2) {
|
|
6424
|
-
return new
|
|
6566
|
+
return new import_commander42.Command("commands").description("\uBA85\uB839 \uACBD\uB85C\uC640 \uC635\uC158 catalog\uB97C \uCD9C\uB825\uD55C\uB2E4").action((_opts, cmd) => {
|
|
6425
6567
|
const opts = cmd.optsWithGlobals();
|
|
6426
6568
|
const catalog = collectCommandCatalog(program2);
|
|
6427
6569
|
output(opts, {
|
|
@@ -6438,7 +6580,7 @@ function createCommandsCommand(program2) {
|
|
|
6438
6580
|
}
|
|
6439
6581
|
|
|
6440
6582
|
// src/commands/nks/supports.ts
|
|
6441
|
-
var
|
|
6583
|
+
var import_commander43 = require("commander");
|
|
6442
6584
|
|
|
6443
6585
|
// src/commands/nks/helpers.ts
|
|
6444
6586
|
var import_promises6 = require("fs/promises");
|
|
@@ -7011,7 +7153,7 @@ function parseNonNegativeInteger(value, optionName) {
|
|
|
7011
7153
|
}
|
|
7012
7154
|
|
|
7013
7155
|
// src/commands/nks/supports.ts
|
|
7014
|
-
var supportsCommand = new
|
|
7156
|
+
var supportsCommand = new import_commander43.Command("supports").description("NKS \uC9C0\uC6D0 Kubernetes \uBC84\uC804\uACFC event type \uC744 \uC870\uD68C\uD55C\uB2E4").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
7015
7157
|
const opts = cmd.optsWithGlobals();
|
|
7016
7158
|
const { client } = await resolveNksClient(opts);
|
|
7017
7159
|
startSpinner("NKS \uC9C0\uC6D0 \uC815\uBCF4 \uC870\uD68C \uC911...");
|
|
@@ -7036,9 +7178,9 @@ var supportsCommand = new import_commander41.Command("supports").description("NK
|
|
|
7036
7178
|
|
|
7037
7179
|
// src/commands/nks/cluster.ts
|
|
7038
7180
|
var import_promises7 = require("fs/promises");
|
|
7039
|
-
var
|
|
7181
|
+
var import_commander44 = require("commander");
|
|
7040
7182
|
var import_chalk14 = __toESM(require("chalk"));
|
|
7041
|
-
var listCommand6 = new
|
|
7183
|
+
var listCommand6 = new import_commander44.Command("list").description("NKS \uD074\uB7EC\uC2A4\uD130 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
7042
7184
|
const opts = cmd.optsWithGlobals();
|
|
7043
7185
|
const { client } = await resolveNksClient(opts);
|
|
7044
7186
|
startSpinner("NKS \uD074\uB7EC\uC2A4\uD130 \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -7144,7 +7286,7 @@ async function writeKubeconfigFile(path5, contents, force) {
|
|
|
7144
7286
|
throw err;
|
|
7145
7287
|
}
|
|
7146
7288
|
}
|
|
7147
|
-
var createCommand4 = new
|
|
7289
|
+
var createCommand4 = new import_commander44.Command("create").description("NKS \uD074\uB7EC\uC2A4\uD130\uB97C \uC0DD\uC131\uD55C\uB2E4").requiredOption("--file <json>", "\uACF5\uC2DD API payload JSON \uD30C\uC77C").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
7148
7290
|
const opts = cmd.optsWithGlobals();
|
|
7149
7291
|
const payload = await readJsonFile(opts.file);
|
|
7150
7292
|
const { client } = await resolveNksClient(opts);
|
|
@@ -7159,7 +7301,7 @@ var createCommand4 = new import_commander42.Command("create").description("NKS \
|
|
|
7159
7301
|
stopSpinner(true);
|
|
7160
7302
|
uuidOutput(opts, result, "\uD074\uB7EC\uC2A4\uD130 \uC0DD\uC131");
|
|
7161
7303
|
});
|
|
7162
|
-
var deleteCommand3 = new
|
|
7304
|
+
var deleteCommand3 = new import_commander44.Command("delete").description("NKS \uD074\uB7EC\uC2A4\uD130\uB97C \uC0AD\uC81C\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").option("--yes", "\uD655\uC778 \uD504\uB86C\uD504\uD2B8 \uC0DD\uB7B5 (CI/\uBE44\uB300\uD654\uD615 \uD544\uC218)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, _opts, cmd) => {
|
|
7163
7305
|
const opts = cmd.optsWithGlobals();
|
|
7164
7306
|
const ok = await confirmDangerousAction(`NKS \uD074\uB7EC\uC2A4\uD130 "${cluster}" \uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`, opts.yes);
|
|
7165
7307
|
if (!ok) return;
|
|
@@ -7175,7 +7317,7 @@ var deleteCommand3 = new import_commander42.Command("delete").description("NKS \
|
|
|
7175
7317
|
process.stderr.write(import_chalk14.default.green(`\u2713 NKS \uD074\uB7EC\uC2A4\uD130 "${cluster}" \uC0AD\uC81C \uC694\uCCAD \uC644\uB8CC
|
|
7176
7318
|
`));
|
|
7177
7319
|
});
|
|
7178
|
-
var resizeCommand2 = new
|
|
7320
|
+
var resizeCommand2 = new import_commander44.Command("resize").description("NKS \uD074\uB7EC\uC2A4\uD130 \uB178\uB4DC \uADF8\uB8F9 \uD06C\uAE30\uB97C \uBCC0\uACBD\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").requiredOption("--nodegroup <name-or-uuid>", "\uB178\uB4DC \uADF8\uB8F9 UUID \uB610\uB294 \uC774\uB984").requiredOption("--node-count <n>", "\uBCC0\uACBD\uD560 \uB178\uB4DC \uC218").option("--nodes-to-remove <csv>", "\uC0AD\uC81C\uD560 \uB178\uB4DC \uC774\uB984/ID CSV").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, _opts, cmd) => {
|
|
7179
7321
|
const opts = cmd.optsWithGlobals();
|
|
7180
7322
|
const nodeCount = parsePositiveInteger(opts.nodeCount, "--node-count");
|
|
7181
7323
|
const nodesToRemove = opts.nodesToRemove?.split(",").map((node) => node.trim()).filter(Boolean);
|
|
@@ -7199,7 +7341,7 @@ var resizeCommand2 = new import_commander42.Command("resize").description("NKS \
|
|
|
7199
7341
|
stopSpinner(true);
|
|
7200
7342
|
uuidOutput(opts, result, "\uD074\uB7EC\uC2A4\uD130 resize");
|
|
7201
7343
|
});
|
|
7202
|
-
var setIpAclCommand = new
|
|
7344
|
+
var setIpAclCommand = new import_commander44.Command("set-ipacl").description("NKS \uD074\uB7EC\uC2A4\uD130 API endpoint IP ACL \uC744 \uC124\uC815\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").requiredOption("--file <json>", "\uACF5\uC2DD API payload JSON \uD30C\uC77C").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, _opts, cmd) => {
|
|
7203
7345
|
const opts = cmd.optsWithGlobals();
|
|
7204
7346
|
const payload = await readJsonFile(opts.file);
|
|
7205
7347
|
const { client } = await resolveNksClient(opts);
|
|
@@ -7214,7 +7356,7 @@ var setIpAclCommand = new import_commander42.Command("set-ipacl").description("N
|
|
|
7214
7356
|
stopSpinner(true);
|
|
7215
7357
|
uuidOutput(opts, result, "IP ACL \uC124\uC815");
|
|
7216
7358
|
});
|
|
7217
|
-
var renewCertificateCommand = new
|
|
7359
|
+
var renewCertificateCommand = new import_commander44.Command("renew-certificate").description("NKS \uD074\uB7EC\uC2A4\uD130 \uC778\uC99D\uC11C\uB97C \uAC31\uC2E0\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").requiredOption("--term-of-validity <1-5>", "\uC778\uC99D\uC11C \uC720\uD6A8 \uAE30\uAC04(\uB144)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, _opts, cmd) => {
|
|
7218
7360
|
const opts = cmd.optsWithGlobals();
|
|
7219
7361
|
const term = parsePositiveInteger(opts.termOfValidity, "--term-of-validity");
|
|
7220
7362
|
if (term < 1 || term > 5) {
|
|
@@ -7232,7 +7374,7 @@ var renewCertificateCommand = new import_commander42.Command("renew-certificate"
|
|
|
7232
7374
|
stopSpinner(true);
|
|
7233
7375
|
uuidOutput(opts, result, "\uC778\uC99D\uC11C \uAC31\uC2E0");
|
|
7234
7376
|
});
|
|
7235
|
-
var updateSgwCommand = new
|
|
7377
|
+
var updateSgwCommand = new import_commander44.Command("update-sgw").description("NKS \uD074\uB7EC\uC2A4\uD130 \uC11C\uBE44\uC2A4 \uAC8C\uC774\uD2B8\uC6E8\uC774\uB97C \uBCC0\uACBD\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").requiredOption("--ncr-sgw <uuid>", "NCR service gateway UUID").requiredOption("--obs-sgw <uuid>", "Object Storage service gateway UUID").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, _opts, cmd) => {
|
|
7236
7378
|
const opts = cmd.optsWithGlobals();
|
|
7237
7379
|
const { client } = await resolveNksClient(opts);
|
|
7238
7380
|
startSpinner("NKS \uC11C\uBE44\uC2A4 \uAC8C\uC774\uD2B8\uC6E8\uC774 \uBCC0\uACBD \uC694\uCCAD \uC911...");
|
|
@@ -7246,7 +7388,7 @@ var updateSgwCommand = new import_commander42.Command("update-sgw").description(
|
|
|
7246
7388
|
stopSpinner(true);
|
|
7247
7389
|
uuidOutput(opts, result, "\uC11C\uBE44\uC2A4 \uAC8C\uC774\uD2B8\uC6E8\uC774 \uBCC0\uACBD");
|
|
7248
7390
|
});
|
|
7249
|
-
var setControlPlaneLogCommand = new
|
|
7391
|
+
var setControlPlaneLogCommand = new import_commander44.Command("set-control-plane-log").description("NKS \uD074\uB7EC\uC2A4\uD130 control plane log \uC124\uC815\uC744 \uBCC0\uACBD\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").requiredOption("--file <json>", "control_plane_log \uAC1D\uCCB4 JSON \uD30C\uC77C").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, _opts, cmd) => {
|
|
7250
7392
|
const opts = cmd.optsWithGlobals();
|
|
7251
7393
|
const controlPlaneLog = await readJsonFile(opts.file);
|
|
7252
7394
|
const { client } = await resolveNksClient(opts);
|
|
@@ -7261,7 +7403,7 @@ var setControlPlaneLogCommand = new import_commander42.Command("set-control-plan
|
|
|
7261
7403
|
stopSpinner(true);
|
|
7262
7404
|
uuidOutput(opts, result, "control plane log \uC124\uC815");
|
|
7263
7405
|
});
|
|
7264
|
-
var getCommand4 = new
|
|
7406
|
+
var getCommand4 = new import_commander44.Command("get").description("NKS \uD074\uB7EC\uC2A4\uD130\uB97C \uC870\uD68C\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, _opts, cmd) => {
|
|
7265
7407
|
const opts = cmd.optsWithGlobals();
|
|
7266
7408
|
const { client } = await resolveNksClient(opts);
|
|
7267
7409
|
startSpinner("NKS \uD074\uB7EC\uC2A4\uD130 \uC870\uD68C \uC911...");
|
|
@@ -7280,7 +7422,7 @@ var getCommand4 = new import_commander42.Command("get").description("NKS \uD074\
|
|
|
7280
7422
|
ids: [resourceId(result)]
|
|
7281
7423
|
});
|
|
7282
7424
|
});
|
|
7283
|
-
var eventsCommand = new
|
|
7425
|
+
var eventsCommand = new import_commander44.Command("events").description("NKS \uD074\uB7EC\uC2A4\uD130 \uC791\uC5C5 \uC774\uB825\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, _opts, cmd) => {
|
|
7284
7426
|
const opts = cmd.optsWithGlobals();
|
|
7285
7427
|
const { client } = await resolveNksClient(opts);
|
|
7286
7428
|
startSpinner("NKS \uD074\uB7EC\uC2A4\uD130 \uC791\uC5C5 \uC774\uB825 \uC870\uD68C \uC911...");
|
|
@@ -7301,7 +7443,7 @@ var eventsCommand = new import_commander42.Command("events").description("NKS \u
|
|
|
7301
7443
|
ids: events.map((event) => event.uuid)
|
|
7302
7444
|
});
|
|
7303
7445
|
});
|
|
7304
|
-
var eventCommand = new
|
|
7446
|
+
var eventCommand = new import_commander44.Command("event").description("NKS \uD074\uB7EC\uC2A4\uD130 \uC791\uC5C5 \uC774\uB825 \uB2E8\uAC74\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").argument("<event>", "\uC791\uC5C5 \uC774\uB825 UUID (\uC815\uC218 id \uAC00 \uC544\uB2C8\uB2E4)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, event, _opts, cmd) => {
|
|
7305
7447
|
const opts = cmd.optsWithGlobals();
|
|
7306
7448
|
if (!isUuid(event)) {
|
|
7307
7449
|
throw new NhnCloudCliError(
|
|
@@ -7330,7 +7472,7 @@ var eventCommand = new import_commander42.Command("event").description("NKS \uD0
|
|
|
7330
7472
|
ids: [result.uuid]
|
|
7331
7473
|
});
|
|
7332
7474
|
});
|
|
7333
|
-
var kubeconfigCommand = new
|
|
7475
|
+
var kubeconfigCommand = new import_commander44.Command("kubeconfig").description("NKS \uD074\uB7EC\uC2A4\uD130 kubeconfig \uB97C \uCD9C\uB825\uD558\uAC70\uB098 \uC800\uC7A5\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").option("--output <file>", "kubeconfig \uC800\uC7A5 \uACBD\uB85C").option("--force", "\uAE30\uC874 \uD30C\uC77C \uB36E\uC5B4\uC4F0\uAE30").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, _opts, cmd) => {
|
|
7334
7476
|
const opts = cmd.optsWithGlobals();
|
|
7335
7477
|
const { client } = await resolveNksClient(opts);
|
|
7336
7478
|
startSpinner("NKS kubeconfig \uC870\uD68C \uC911...");
|
|
@@ -7350,7 +7492,7 @@ var kubeconfigCommand = new import_commander42.Command("kubeconfig").description
|
|
|
7350
7492
|
}
|
|
7351
7493
|
process.stdout.write(kubeconfig.endsWith("\n") ? kubeconfig : kubeconfig + "\n");
|
|
7352
7494
|
});
|
|
7353
|
-
var ipAclCommand = new
|
|
7495
|
+
var ipAclCommand = new import_commander44.Command("ipacl").description("NKS \uD074\uB7EC\uC2A4\uD130 API endpoint IP ACL \uC744 \uC870\uD68C\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, _opts, cmd) => {
|
|
7354
7496
|
const opts = cmd.optsWithGlobals();
|
|
7355
7497
|
const { client } = await resolveNksClient(opts);
|
|
7356
7498
|
startSpinner("NKS IP ACL \uC870\uD68C \uC911...");
|
|
@@ -7369,7 +7511,7 @@ var ipAclCommand = new import_commander42.Command("ipacl").description("NKS \uD0
|
|
|
7369
7511
|
ids: [result.cluster_uuid]
|
|
7370
7512
|
});
|
|
7371
7513
|
});
|
|
7372
|
-
var clusterAddonListCommand = new
|
|
7514
|
+
var clusterAddonListCommand = new import_commander44.Command("list").description("NKS \uD074\uB7EC\uC2A4\uD130\uC5D0 \uC124\uCE58\uB41C \uC560\uB4DC\uC628 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, _opts, cmd) => {
|
|
7373
7515
|
const opts = cmd.optsWithGlobals();
|
|
7374
7516
|
const { client } = await resolveNksClient(opts);
|
|
7375
7517
|
startSpinner("NKS \uD074\uB7EC\uC2A4\uD130 \uC560\uB4DC\uC628 \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -7388,7 +7530,7 @@ var clusterAddonListCommand = new import_commander42.Command("list").description
|
|
|
7388
7530
|
ids: addons.map((addon) => addon.uuid ?? addon.id ?? addon.name)
|
|
7389
7531
|
});
|
|
7390
7532
|
});
|
|
7391
|
-
var clusterAddonGetCommand = new
|
|
7533
|
+
var clusterAddonGetCommand = new import_commander44.Command("get").description("NKS \uD074\uB7EC\uC2A4\uD130\uC5D0 \uC124\uCE58\uB41C \uC560\uB4DC\uC628\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").argument("<addon>", "\uC560\uB4DC\uC628 UUID \uB610\uB294 \uC774\uB984").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, addon, _opts, cmd) => {
|
|
7392
7534
|
const opts = cmd.optsWithGlobals();
|
|
7393
7535
|
const { client } = await resolveNksClient(opts);
|
|
7394
7536
|
startSpinner("NKS \uD074\uB7EC\uC2A4\uD130 \uC560\uB4DC\uC628 \uC870\uD68C \uC911...");
|
|
@@ -7416,7 +7558,7 @@ function parseResolveConflicts(value) {
|
|
|
7416
7558
|
EXIT_PARAM_ERROR
|
|
7417
7559
|
);
|
|
7418
7560
|
}
|
|
7419
|
-
var clusterAddonInstallCommand = new
|
|
7561
|
+
var clusterAddonInstallCommand = new import_commander44.Command("install").description("NKS \uD074\uB7EC\uC2A4\uD130 \uC560\uB4DC\uC628\uC744 \uC124\uCE58\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").requiredOption("--name <name>", "\uC560\uB4DC\uC628 \uC774\uB984").requiredOption("--addon-version <version>", "\uC560\uB4DC\uC628 \uBC84\uC804").requiredOption("--resolve-conflicts <none|overwrite|preserve>", "\uCDA9\uB3CC \uD574\uACB0 \uC815\uCC45").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, _opts, cmd) => {
|
|
7420
7562
|
const opts = cmd.optsWithGlobals();
|
|
7421
7563
|
const resolveConflicts = parseResolveConflicts(opts.resolveConflicts);
|
|
7422
7564
|
const { client } = await resolveNksClient(opts);
|
|
@@ -7435,7 +7577,7 @@ var clusterAddonInstallCommand = new import_commander42.Command("install").descr
|
|
|
7435
7577
|
stopSpinner(true);
|
|
7436
7578
|
uuidOutput(opts, result, "\uD074\uB7EC\uC2A4\uD130 \uC560\uB4DC\uC628 \uC124\uCE58");
|
|
7437
7579
|
});
|
|
7438
|
-
var clusterAddonUpdateCommand = new
|
|
7580
|
+
var clusterAddonUpdateCommand = new import_commander44.Command("update").description("NKS \uD074\uB7EC\uC2A4\uD130 \uC560\uB4DC\uC628\uC744 \uC5C5\uB370\uC774\uD2B8\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").argument("<addon>", "\uC560\uB4DC\uC628 UUID \uB610\uB294 \uC774\uB984").requiredOption("--addon-version <version>", "\uC560\uB4DC\uC628 \uBC84\uC804").requiredOption("--resolve-conflicts <none|overwrite|preserve>", "\uCDA9\uB3CC \uD574\uACB0 \uC815\uCC45").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, addon, _opts, cmd) => {
|
|
7439
7581
|
const opts = cmd.optsWithGlobals();
|
|
7440
7582
|
const resolveConflicts = parseResolveConflicts(opts.resolveConflicts);
|
|
7441
7583
|
const { client } = await resolveNksClient(opts);
|
|
@@ -7453,7 +7595,7 @@ var clusterAddonUpdateCommand = new import_commander42.Command("update").descrip
|
|
|
7453
7595
|
stopSpinner(true);
|
|
7454
7596
|
uuidOutput(opts, result, "\uD074\uB7EC\uC2A4\uD130 \uC560\uB4DC\uC628 \uC5C5\uB370\uC774\uD2B8");
|
|
7455
7597
|
});
|
|
7456
|
-
var clusterAddonRemoveCommand = new
|
|
7598
|
+
var clusterAddonRemoveCommand = new import_commander44.Command("remove").description("NKS \uD074\uB7EC\uC2A4\uD130 \uC560\uB4DC\uC628\uC744 \uC81C\uAC70\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").argument("<addon>", "\uC560\uB4DC\uC628 UUID \uB610\uB294 \uC774\uB984").option("--yes", "\uD655\uC778 \uD504\uB86C\uD504\uD2B8 \uC0DD\uB7B5 (CI/\uBE44\uB300\uD654\uD615 \uD544\uC218)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, addon, _opts, cmd) => {
|
|
7457
7599
|
const opts = cmd.optsWithGlobals();
|
|
7458
7600
|
const ok = await confirmDangerousAction(`NKS \uD074\uB7EC\uC2A4\uD130 \uC560\uB4DC\uC628 "${addon}" \uC744 \uC81C\uAC70\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`, opts.yes);
|
|
7459
7601
|
if (!ok) return;
|
|
@@ -7469,11 +7611,11 @@ var clusterAddonRemoveCommand = new import_commander42.Command("remove").descrip
|
|
|
7469
7611
|
stopSpinner(true);
|
|
7470
7612
|
uuidOutput(opts, result, "\uD074\uB7EC\uC2A4\uD130 \uC560\uB4DC\uC628 \uC81C\uAC70");
|
|
7471
7613
|
});
|
|
7472
|
-
var clusterAddonCommand = new
|
|
7473
|
-
var clusterCommand = new
|
|
7614
|
+
var clusterAddonCommand = new import_commander44.Command("addon").description("NKS \uD074\uB7EC\uC2A4\uD130 \uC560\uB4DC\uC628 \uAD00\uB828 \uBA85\uB839").addCommand(clusterAddonListCommand).addCommand(clusterAddonGetCommand).addCommand(clusterAddonInstallCommand).addCommand(clusterAddonUpdateCommand).addCommand(clusterAddonRemoveCommand);
|
|
7615
|
+
var clusterCommand = new import_commander44.Command("cluster").description("NKS \uD074\uB7EC\uC2A4\uD130 \uAD00\uB828 \uBA85\uB839").addCommand(listCommand6).addCommand(getCommand4).addCommand(createCommand4).addCommand(deleteCommand3).addCommand(resizeCommand2).addCommand(eventsCommand).addCommand(eventCommand).addCommand(kubeconfigCommand).addCommand(ipAclCommand).addCommand(setIpAclCommand).addCommand(renewCertificateCommand).addCommand(updateSgwCommand).addCommand(setControlPlaneLogCommand).addCommand(clusterAddonCommand);
|
|
7474
7616
|
|
|
7475
7617
|
// src/commands/nks/nodegroup.ts
|
|
7476
|
-
var
|
|
7618
|
+
var import_commander45 = require("commander");
|
|
7477
7619
|
var import_chalk15 = __toESM(require("chalk"));
|
|
7478
7620
|
function nodeGroupRow(nodegroup) {
|
|
7479
7621
|
return [
|
|
@@ -7527,7 +7669,7 @@ async function confirmDangerousAction2(message, yes) {
|
|
|
7527
7669
|
if (!ok) process.stderr.write(import_chalk15.default.yellow("\uC791\uC5C5\uC774 \uCDE8\uC18C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n"));
|
|
7528
7670
|
return ok;
|
|
7529
7671
|
}
|
|
7530
|
-
var listCommand7 = new
|
|
7672
|
+
var listCommand7 = new import_commander45.Command("list").description("NKS \uB178\uB4DC \uADF8\uB8F9 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, _opts, cmd) => {
|
|
7531
7673
|
const opts = cmd.optsWithGlobals();
|
|
7532
7674
|
const { client } = await resolveNksClient(opts);
|
|
7533
7675
|
startSpinner("NKS \uB178\uB4DC \uADF8\uB8F9 \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -7546,7 +7688,7 @@ var listCommand7 = new import_commander43.Command("list").description("NKS \uB17
|
|
|
7546
7688
|
ids: nodegroups.map((nodegroup) => nodegroup.uuid)
|
|
7547
7689
|
});
|
|
7548
7690
|
});
|
|
7549
|
-
var getCommand5 = new
|
|
7691
|
+
var getCommand5 = new import_commander45.Command("get").description("NKS \uB178\uB4DC \uADF8\uB8F9\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").argument("<nodegroup>", "\uB178\uB4DC \uADF8\uB8F9 UUID \uB610\uB294 \uC774\uB984").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, nodegroup, _opts, cmd) => {
|
|
7550
7692
|
const opts = cmd.optsWithGlobals();
|
|
7551
7693
|
const { client } = await resolveNksClient(opts);
|
|
7552
7694
|
startSpinner("NKS \uB178\uB4DC \uADF8\uB8F9 \uC870\uD68C \uC911...");
|
|
@@ -7565,7 +7707,7 @@ var getCommand5 = new import_commander43.Command("get").description("NKS \uB178\
|
|
|
7565
7707
|
ids: [result.uuid]
|
|
7566
7708
|
});
|
|
7567
7709
|
});
|
|
7568
|
-
var createCommand5 = new
|
|
7710
|
+
var createCommand5 = new import_commander45.Command("create").description("NKS \uB178\uB4DC \uADF8\uB8F9\uC744 \uC0DD\uC131\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").requiredOption("--file <json>", "\uACF5\uC2DD API payload JSON \uD30C\uC77C").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, _opts, cmd) => {
|
|
7569
7711
|
const opts = cmd.optsWithGlobals();
|
|
7570
7712
|
const payload = await readJsonFile(opts.file);
|
|
7571
7713
|
const { client } = await resolveNksClient(opts);
|
|
@@ -7580,7 +7722,7 @@ var createCommand5 = new import_commander43.Command("create").description("NKS \
|
|
|
7580
7722
|
stopSpinner(true);
|
|
7581
7723
|
uuidOutput2(opts, result, "\uB178\uB4DC \uADF8\uB8F9 \uC0DD\uC131");
|
|
7582
7724
|
});
|
|
7583
|
-
var deleteCommand4 = new
|
|
7725
|
+
var deleteCommand4 = new import_commander45.Command("delete").description("NKS \uB178\uB4DC \uADF8\uB8F9\uC744 \uC0AD\uC81C\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").argument("<nodegroup>", "\uB178\uB4DC \uADF8\uB8F9 UUID \uB610\uB294 \uC774\uB984").option("--yes", "\uD655\uC778 \uD504\uB86C\uD504\uD2B8 \uC0DD\uB7B5 (CI/\uBE44\uB300\uD654\uD615 \uD544\uC218)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, nodegroup, _opts, cmd) => {
|
|
7584
7726
|
const opts = cmd.optsWithGlobals();
|
|
7585
7727
|
const ok = await confirmDangerousAction2(`NKS \uB178\uB4DC \uADF8\uB8F9 "${nodegroup}" \uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`, opts.yes);
|
|
7586
7728
|
if (!ok) return;
|
|
@@ -7597,7 +7739,7 @@ var deleteCommand4 = new import_commander43.Command("delete").description("NKS \
|
|
|
7597
7739
|
`));
|
|
7598
7740
|
});
|
|
7599
7741
|
function nodeActionCommand(name) {
|
|
7600
|
-
return new
|
|
7742
|
+
return new import_commander45.Command(name).description(`NKS \uB178\uB4DC \uADF8\uB8F9 \uB178\uB4DC\uB97C ${name === "stop-node" ? "\uC911\uC9C0" : "\uC2DC\uC791"}\uD55C\uB2E4`).argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").argument("<nodegroup>", "\uB178\uB4DC \uADF8\uB8F9 UUID \uB610\uB294 \uC774\uB984").requiredOption("--nodes <csv>", "\uB300\uC0C1 \uB178\uB4DC CSV").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, nodegroup, _opts, cmd) => {
|
|
7601
7743
|
const opts = cmd.optsWithGlobals();
|
|
7602
7744
|
const nodes = parseCsv(opts.nodes, "--nodes");
|
|
7603
7745
|
const { client } = await resolveNksClient(opts);
|
|
@@ -7613,7 +7755,7 @@ function nodeActionCommand(name) {
|
|
|
7613
7755
|
uuidOutput2(opts, result, `\uB178\uB4DC ${name === "stop-node" ? "\uC911\uC9C0" : "\uC2DC\uC791"}`);
|
|
7614
7756
|
});
|
|
7615
7757
|
}
|
|
7616
|
-
var autoscaleCommand = new
|
|
7758
|
+
var autoscaleCommand = new import_commander45.Command("autoscale").description("NKS \uB178\uB4DC \uADF8\uB8F9 autoscale \uC124\uC815\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").argument("<nodegroup>", "\uB178\uB4DC \uADF8\uB8F9 UUID \uB610\uB294 \uC774\uB984").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, nodegroup, _opts, cmd) => {
|
|
7617
7759
|
const opts = cmd.optsWithGlobals();
|
|
7618
7760
|
const { client } = await resolveNksClient(opts);
|
|
7619
7761
|
startSpinner("NKS \uB178\uB4DC \uADF8\uB8F9 autoscale \uC870\uD68C \uC911...");
|
|
@@ -7632,7 +7774,7 @@ var autoscaleCommand = new import_commander43.Command("autoscale").description("
|
|
|
7632
7774
|
ids: []
|
|
7633
7775
|
});
|
|
7634
7776
|
});
|
|
7635
|
-
var setAutoscaleCommand = new
|
|
7777
|
+
var setAutoscaleCommand = new import_commander45.Command("set-autoscale").description("NKS \uB178\uB4DC \uADF8\uB8F9 autoscale \uC124\uC815\uC744 \uBCC0\uACBD\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").argument("<nodegroup>", "\uB178\uB4DC \uADF8\uB8F9 UUID \uB610\uB294 \uC774\uB984").requiredOption("--file <json>", "\uACF5\uC2DD API payload JSON \uD30C\uC77C").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, nodegroup, _opts, cmd) => {
|
|
7636
7778
|
const opts = cmd.optsWithGlobals();
|
|
7637
7779
|
const payload = await readJsonFile(opts.file);
|
|
7638
7780
|
const { client } = await resolveNksClient(opts);
|
|
@@ -7647,7 +7789,7 @@ var setAutoscaleCommand = new import_commander43.Command("set-autoscale").descri
|
|
|
7647
7789
|
stopSpinner(true);
|
|
7648
7790
|
uuidOutput2(opts, result, "autoscale \uBCC0\uACBD");
|
|
7649
7791
|
});
|
|
7650
|
-
var setMetricAutoscaleCommand = new
|
|
7792
|
+
var setMetricAutoscaleCommand = new import_commander45.Command("set-metric-autoscale").description("NKS \uB178\uB4DC \uADF8\uB8F9 metric autoscale \uC124\uC815\uC744 \uBCC0\uACBD\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").argument("<nodegroup>", "\uB178\uB4DC \uADF8\uB8F9 UUID \uB610\uB294 \uC774\uB984").requiredOption("--file <json>", "\uACF5\uC2DD API payload JSON \uD30C\uC77C").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, nodegroup, _opts, cmd) => {
|
|
7651
7793
|
const opts = cmd.optsWithGlobals();
|
|
7652
7794
|
const payload = await readJsonFile(opts.file);
|
|
7653
7795
|
const { client } = await resolveNksClient(opts);
|
|
@@ -7662,7 +7804,7 @@ var setMetricAutoscaleCommand = new import_commander43.Command("set-metric-autos
|
|
|
7662
7804
|
stopSpinner(true);
|
|
7663
7805
|
uuidOutput2(opts, result, "metric autoscale \uBCC0\uACBD");
|
|
7664
7806
|
});
|
|
7665
|
-
var upgradeCommand = new
|
|
7807
|
+
var upgradeCommand = new import_commander45.Command("upgrade").description("NKS \uB178\uB4DC \uADF8\uB8F9 Kubernetes version \uC744 \uC5C5\uADF8\uB808\uC774\uB4DC\uD55C\uB2E4 (default-master \uB85C control plane \uC5C5\uADF8\uB808\uC774\uB4DC)").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").argument("<nodegroup>", "\uB178\uB4DC \uADF8\uB8F9 UUID \uB610\uB294 \uC774\uB984. control plane \uC740 default-master \uB85C \uC9C0\uC815\uD55C\uB2E4").requiredOption("--kube-version <v>", "\uB300\uC0C1 Kubernetes version").option("--num-buffer-nodes <n>", "\uCD95\uCD9C\uB41C \uD30C\uB4DC\uB97C \uBC1B\uC744 \uC5EC\uC720 \uB178\uB4DC \uC218 (\uAE30\uBCF8 1, \uC791\uC5C5 \uD6C4 \uC790\uB3D9 \uC0AD\uC81C, \uC778\uC2A4\uD134\uC2A4 \uC694\uAE08 \uBC1C\uC0DD)").option("--num-max-unavailable-nodes <n>", "\uD55C \uBC88\uC5D0 \uC11C\uBE44\uC2A4 \uBD88\uAC00 \uC0C1\uD0DC\uB85C \uB458 \uB178\uB4DC \uC218 (\uAE30\uBCF8 1, \uD06C\uBA74 \uBE60\uB974\uACE0 \uAC00\uC6A9\uC131 \uB0AE\uC74C)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, nodegroup, _opts, cmd) => {
|
|
7666
7808
|
const opts = cmd.optsWithGlobals();
|
|
7667
7809
|
const { client } = await resolveNksClient(opts);
|
|
7668
7810
|
startSpinner("NKS \uB178\uB4DC \uADF8\uB8F9 upgrade \uC694\uCCAD \uC911...");
|
|
@@ -7680,7 +7822,7 @@ var upgradeCommand = new import_commander43.Command("upgrade").description("NKS
|
|
|
7680
7822
|
stopSpinner(true);
|
|
7681
7823
|
uuidOutput2(opts, result, "\uB178\uB4DC \uADF8\uB8F9 upgrade");
|
|
7682
7824
|
});
|
|
7683
|
-
var setUserscriptCommand = new
|
|
7825
|
+
var setUserscriptCommand = new import_commander45.Command("set-userscript").description("NKS \uB178\uB4DC \uADF8\uB8F9 user script \uB97C \uBCC0\uACBD\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").argument("<nodegroup>", "\uB178\uB4DC \uADF8\uB8F9 UUID \uB610\uB294 \uC774\uB984").requiredOption("--file <script>", "script \uD30C\uC77C").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, nodegroup, _opts, cmd) => {
|
|
7684
7826
|
const opts = cmd.optsWithGlobals();
|
|
7685
7827
|
const contents = await readTextFile(opts.file);
|
|
7686
7828
|
const { client } = await resolveNksClient(opts);
|
|
@@ -7695,7 +7837,7 @@ var setUserscriptCommand = new import_commander43.Command("set-userscript").desc
|
|
|
7695
7837
|
stopSpinner(true);
|
|
7696
7838
|
uuidOutput2(opts, result, "user script \uBCC0\uACBD");
|
|
7697
7839
|
});
|
|
7698
|
-
var updateFlavorCommand = new
|
|
7840
|
+
var updateFlavorCommand = new import_commander45.Command("update-flavor").description("NKS \uB178\uB4DC \uADF8\uB8F9 flavor \uB97C \uBCC0\uACBD\uD55C\uB2E4").argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").argument("<nodegroup>", "\uB178\uB4DC \uADF8\uB8F9 UUID \uB610\uB294 \uC774\uB984").requiredOption("--flavor <uuid>", "\uBCC0\uACBD\uD560 flavor UUID").option("--num-buffer-nodes <n>", "\uCD95\uCD9C\uB41C \uD30C\uB4DC\uB97C \uBC1B\uC744 \uC5EC\uC720 \uB178\uB4DC \uC218 (\uAE30\uBCF8 1, \uC791\uC5C5 \uD6C4 \uC790\uB3D9 \uC0AD\uC81C, \uC778\uC2A4\uD134\uC2A4 \uC694\uAE08 \uBC1C\uC0DD)").option("--num-max-unavailable-nodes <n>", "\uD55C \uBC88\uC5D0 \uC11C\uBE44\uC2A4 \uBD88\uAC00 \uC0C1\uD0DC\uB85C \uB458 \uB178\uB4DC \uC218 (\uAE30\uBCF8 1, \uD06C\uBA74 \uBE60\uB974\uACE0 \uAC00\uC6A9\uC131 \uB0AE\uC74C)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, nodegroup, _opts, cmd) => {
|
|
7699
7841
|
const opts = cmd.optsWithGlobals();
|
|
7700
7842
|
const { client } = await resolveNksClient(opts);
|
|
7701
7843
|
startSpinner("NKS \uB178\uB4DC \uADF8\uB8F9 flavor \uBCC0\uACBD \uC694\uCCAD \uC911...");
|
|
@@ -7714,7 +7856,7 @@ var updateFlavorCommand = new import_commander43.Command("update-flavor").descri
|
|
|
7714
7856
|
uuidOutput2(opts, result, "flavor \uBCC0\uACBD");
|
|
7715
7857
|
});
|
|
7716
7858
|
function patchPayloadCommand(name) {
|
|
7717
|
-
return new
|
|
7859
|
+
return new import_commander45.Command(name).description(`NKS \uB178\uB4DC \uADF8\uB8F9 ${name === "set-fip-auto-bind" ? "Floating IP \uC790\uB3D9 \uC5F0\uACB0" : "Kubernetes labels"} \uC124\uC815\uC744 \uBCC0\uACBD\uD55C\uB2E4`).argument("<cluster>", "\uD074\uB7EC\uC2A4\uD130 UUID \uB610\uB294 \uC774\uB984").argument("<nodegroup>", "\uB178\uB4DC \uADF8\uB8F9 UUID \uB610\uB294 \uC774\uB984").requiredOption("--file <json>", "\uACF5\uC2DD API payload JSON \uD30C\uC77C").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (cluster, nodegroup, _opts, cmd) => {
|
|
7718
7860
|
const opts = cmd.optsWithGlobals();
|
|
7719
7861
|
const payload = await readJsonFile(opts.file);
|
|
7720
7862
|
const { client } = await resolveNksClient(opts);
|
|
@@ -7730,10 +7872,10 @@ function patchPayloadCommand(name) {
|
|
|
7730
7872
|
uuidOutput2(opts, result, name);
|
|
7731
7873
|
});
|
|
7732
7874
|
}
|
|
7733
|
-
var nodegroupCommand = new
|
|
7875
|
+
var nodegroupCommand = new import_commander45.Command("nodegroup").description("NKS \uB178\uB4DC \uADF8\uB8F9 \uAD00\uB828 \uBA85\uB839").addCommand(listCommand7).addCommand(getCommand5).addCommand(createCommand5).addCommand(deleteCommand4).addCommand(nodeActionCommand("stop-node")).addCommand(nodeActionCommand("start-node")).addCommand(autoscaleCommand).addCommand(setAutoscaleCommand).addCommand(setMetricAutoscaleCommand).addCommand(upgradeCommand).addCommand(setUserscriptCommand).addCommand(updateFlavorCommand).addCommand(patchPayloadCommand("set-fip-auto-bind")).addCommand(patchPayloadCommand("set-labels"));
|
|
7734
7876
|
|
|
7735
7877
|
// src/commands/nks/addon.ts
|
|
7736
|
-
var
|
|
7878
|
+
var import_commander46 = require("commander");
|
|
7737
7879
|
function addonTypeRow(addonType) {
|
|
7738
7880
|
return [
|
|
7739
7881
|
addonType.uuid ?? addonType.id ?? addonType.name,
|
|
@@ -7749,7 +7891,7 @@ function addonRow2(addon) {
|
|
|
7749
7891
|
addon.status ?? ""
|
|
7750
7892
|
];
|
|
7751
7893
|
}
|
|
7752
|
-
var addonTypeListCommand = new
|
|
7894
|
+
var addonTypeListCommand = new import_commander46.Command("list").description("NKS \uC560\uB4DC\uC628 \uD0C0\uC785 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
7753
7895
|
const opts = cmd.optsWithGlobals();
|
|
7754
7896
|
const { client } = await resolveNksClient(opts);
|
|
7755
7897
|
startSpinner("NKS \uC560\uB4DC\uC628 \uD0C0\uC785 \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -7768,7 +7910,7 @@ var addonTypeListCommand = new import_commander44.Command("list").description("N
|
|
|
7768
7910
|
ids: addonTypes.map((addonType) => addonType.uuid ?? addonType.id ?? addonType.name)
|
|
7769
7911
|
});
|
|
7770
7912
|
});
|
|
7771
|
-
var addonTypeGetCommand = new
|
|
7913
|
+
var addonTypeGetCommand = new import_commander46.Command("get").description("NKS \uC560\uB4DC\uC628 \uD0C0\uC785\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<addon-type>", "\uC560\uB4DC\uC628 \uD0C0\uC785 UUID \uB610\uB294 \uC774\uB984").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (addonType, _opts, cmd) => {
|
|
7772
7914
|
const opts = cmd.optsWithGlobals();
|
|
7773
7915
|
const { client } = await resolveNksClient(opts);
|
|
7774
7916
|
startSpinner("NKS \uC560\uB4DC\uC628 \uD0C0\uC785 \uC870\uD68C \uC911...");
|
|
@@ -7787,8 +7929,8 @@ var addonTypeGetCommand = new import_commander44.Command("get").description("NKS
|
|
|
7787
7929
|
ids: [result.uuid ?? result.id ?? result.name]
|
|
7788
7930
|
});
|
|
7789
7931
|
});
|
|
7790
|
-
var addonTypeCommand = new
|
|
7791
|
-
var addonListCommand = new
|
|
7932
|
+
var addonTypeCommand = new import_commander46.Command("addon-type").description("NKS \uC560\uB4DC\uC628 \uD0C0\uC785 \uAD00\uB828 \uBA85\uB839").addCommand(addonTypeListCommand).addCommand(addonTypeGetCommand);
|
|
7933
|
+
var addonListCommand = new import_commander46.Command("list").description("NKS \uC560\uB4DC\uC628 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").option("--k8s-version <version>", "Kubernetes version filter").option("--image <image>", "image filter").option("--platform-version <version>", "platform version filter").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
7792
7934
|
const opts = cmd.optsWithGlobals();
|
|
7793
7935
|
const { client } = await resolveNksClient(opts);
|
|
7794
7936
|
startSpinner("NKS \uC560\uB4DC\uC628 \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -7811,7 +7953,7 @@ var addonListCommand = new import_commander44.Command("list").description("NKS \
|
|
|
7811
7953
|
ids: addons.map((addon) => addon.uuid ?? addon.id ?? addon.name)
|
|
7812
7954
|
});
|
|
7813
7955
|
});
|
|
7814
|
-
var addonGetCommand = new
|
|
7956
|
+
var addonGetCommand = new import_commander46.Command("get").description("NKS \uC560\uB4DC\uC628\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<addon>", "\uC560\uB4DC\uC628 UUID \uB610\uB294 \uC774\uB984").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (addon, _opts, cmd) => {
|
|
7815
7957
|
const opts = cmd.optsWithGlobals();
|
|
7816
7958
|
const { client } = await resolveNksClient(opts);
|
|
7817
7959
|
startSpinner("NKS \uC560\uB4DC\uC628 \uC870\uD68C \uC911...");
|
|
@@ -7830,10 +7972,10 @@ var addonGetCommand = new import_commander44.Command("get").description("NKS \uC
|
|
|
7830
7972
|
ids: [result.uuid ?? result.id ?? result.name]
|
|
7831
7973
|
});
|
|
7832
7974
|
});
|
|
7833
|
-
var addonCommand = new
|
|
7975
|
+
var addonCommand = new import_commander46.Command("addon").description("NKS \uC560\uB4DC\uC628 \uAD00\uB828 \uBA85\uB839").addCommand(addonListCommand).addCommand(addonGetCommand);
|
|
7834
7976
|
|
|
7835
7977
|
// src/commands/ncs/template.ts
|
|
7836
|
-
var
|
|
7978
|
+
var import_commander47 = require("commander");
|
|
7837
7979
|
var import_chalk16 = __toESM(require("chalk"));
|
|
7838
7980
|
|
|
7839
7981
|
// src/commands/ncs/helpers.ts
|
|
@@ -7940,21 +8082,11 @@ function normalizeNcsTimeRange(from, to, now) {
|
|
|
7940
8082
|
};
|
|
7941
8083
|
}
|
|
7942
8084
|
async function resolveNcsAppKey(profileName) {
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
throw err;
|
|
7949
|
-
}
|
|
7950
|
-
}
|
|
7951
|
-
if (!cred?.appkey) {
|
|
7952
|
-
throw new NhnCloudCliError(
|
|
7953
|
-
"NCS appKey \uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. nhncloud configure --ncs-appkey <key> \uB97C \uC2E4\uD589\uD574 \uC124\uC815\uD558\uC138\uC694.",
|
|
7954
|
-
EXIT_CONFIG_ERROR
|
|
7955
|
-
);
|
|
7956
|
-
}
|
|
7957
|
-
return cred.appkey;
|
|
8085
|
+
return resolveServiceAppKey(
|
|
8086
|
+
"ncs",
|
|
8087
|
+
profileName,
|
|
8088
|
+
"NCS appKey \uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. nhncloud configure --ncs-appkey <key> \uB97C \uC2E4\uD589\uD574 \uC124\uC815\uD558\uC138\uC694."
|
|
8089
|
+
);
|
|
7958
8090
|
}
|
|
7959
8091
|
async function resolveNcsClient(opts) {
|
|
7960
8092
|
const profileName = await resolveProfileName(opts.profile);
|
|
@@ -8016,7 +8148,7 @@ async function confirmDestructive(message, yes) {
|
|
|
8016
8148
|
}
|
|
8017
8149
|
|
|
8018
8150
|
// src/commands/ncs/template.ts
|
|
8019
|
-
var listCommand8 = new
|
|
8151
|
+
var listCommand8 = new import_commander47.Command("list").description("NCS \uC124\uACC4\uB3C4(template) \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").option("--page <page>", "\uC870\uD68C\uD560 page \uBC88\uD638").option("--size <size>", "page \uB2F9 \uD56D\uBAA9 \uC218 (\uAE30\uBCF8: API \uAE30\uBCF8\uAC12 10)").action(async (_opts, cmd) => {
|
|
8020
8152
|
const opts = cmd.optsWithGlobals();
|
|
8021
8153
|
const { client } = await resolveNcsClient(opts);
|
|
8022
8154
|
startSpinner("NCS \uC124\uACC4\uB3C4 \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -8047,7 +8179,7 @@ var listCommand8 = new import_commander45.Command("list").description("NCS \uC12
|
|
|
8047
8179
|
ids: templates.map((t) => t.id)
|
|
8048
8180
|
});
|
|
8049
8181
|
});
|
|
8050
|
-
var getCommand6 = new
|
|
8182
|
+
var getCommand6 = new import_commander47.Command("get").description("NCS \uC124\uACC4\uB3C4(template) \uB2E8\uAC74\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<id>", "template ID").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
8051
8183
|
const opts = cmd.optsWithGlobals();
|
|
8052
8184
|
requireNonEmpty(id, "id");
|
|
8053
8185
|
const { client } = await resolveNcsClient(opts);
|
|
@@ -8075,7 +8207,7 @@ var getCommand6 = new import_commander45.Command("get").description("NCS \uC124\
|
|
|
8075
8207
|
ids: [template.id]
|
|
8076
8208
|
});
|
|
8077
8209
|
});
|
|
8078
|
-
var createCommand6 = new
|
|
8210
|
+
var createCommand6 = new import_commander47.Command("create").description("NCS \uC124\uACC4\uB3C4(template) \uB97C \uC0DD\uC131\uD55C\uB2E4 (--file \uB85C JSON spec \uC804\uB2EC)").requiredOption("--file <path>", "template \uC0DD\uC131 spec \uC774 \uB2F4\uAE34 JSON \uD30C\uC77C \uACBD\uB85C").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
8079
8211
|
const opts = cmd.optsWithGlobals();
|
|
8080
8212
|
const payload = readJsonPayload(opts.file);
|
|
8081
8213
|
const { client } = await resolveNcsClient(opts);
|
|
@@ -8103,7 +8235,7 @@ var createCommand6 = new import_commander45.Command("create").description("NCS \
|
|
|
8103
8235
|
ids: [template.id]
|
|
8104
8236
|
});
|
|
8105
8237
|
});
|
|
8106
|
-
var deleteCommand5 = new
|
|
8238
|
+
var deleteCommand5 = new import_commander47.Command("delete").description("NCS \uC124\uACC4\uB3C4(template) \uB97C \uC0AD\uC81C\uD55C\uB2E4").argument("<id>", "template ID").option("--yes", "\uD655\uC778 \uD504\uB86C\uD504\uD2B8 \uC0DD\uB7B5 (CI/\uBE44\uB300\uD654\uD615 \uD544\uC218)").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
8107
8239
|
const opts = cmd.optsWithGlobals();
|
|
8108
8240
|
requireNonEmpty(id, "id");
|
|
8109
8241
|
const ok = await confirmDestructive(`NCS \uC124\uACC4\uB3C4 "${id}" \uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`, opts.yes);
|
|
@@ -8123,7 +8255,7 @@ var deleteCommand5 = new import_commander45.Command("delete").description("NCS \
|
|
|
8123
8255
|
process.stderr.write(import_chalk16.default.green(`\u2713 NCS \uC124\uACC4\uB3C4 "${id}" \uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
|
|
8124
8256
|
`));
|
|
8125
8257
|
});
|
|
8126
|
-
var versionListCommand = new
|
|
8258
|
+
var versionListCommand = new import_commander47.Command("list").description("NCS \uC124\uACC4\uB3C4(template) \uC758 \uBC84\uC804 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<id>", "template ID").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").option("--q <query>", "\uAC80\uC0C9\uC5B4").option("--sort <sort>", "\uC815\uB82C \uC870\uAC74").option("--page <page>", "\uC870\uD68C\uD560 page \uBC88\uD638").option("--size <size>", "page \uB2F9 \uD56D\uBAA9 \uC218 (\uAE30\uBCF8: API \uAE30\uBCF8\uAC12 10)").action(async (id, _opts, cmd) => {
|
|
8127
8259
|
const opts = cmd.optsWithGlobals();
|
|
8128
8260
|
requireNonEmpty(id, "id");
|
|
8129
8261
|
const { client } = await resolveNcsClient(opts);
|
|
@@ -8156,7 +8288,7 @@ var versionListCommand = new import_commander45.Command("list").description("NCS
|
|
|
8156
8288
|
ids: versions.map((v) => v.id)
|
|
8157
8289
|
});
|
|
8158
8290
|
});
|
|
8159
|
-
var versionGetCommand = new
|
|
8291
|
+
var versionGetCommand = new import_commander47.Command("get").description("NCS \uC124\uACC4\uB3C4(template) \uBC84\uC804 \uB2E8\uAC74\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<id>", "template ID").argument("<version>", "\uBC84\uC804 \uAC12").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, version, _opts, cmd) => {
|
|
8160
8292
|
const opts = cmd.optsWithGlobals();
|
|
8161
8293
|
requireNonEmpty(id, "id");
|
|
8162
8294
|
requireNonEmpty(version, "version");
|
|
@@ -8177,7 +8309,7 @@ var versionGetCommand = new import_commander45.Command("get").description("NCS \
|
|
|
8177
8309
|
ids: [detail.id]
|
|
8178
8310
|
});
|
|
8179
8311
|
});
|
|
8180
|
-
var versionCreateCommand = new
|
|
8312
|
+
var versionCreateCommand = new import_commander47.Command("create").description("NCS \uC124\uACC4\uB3C4(template) \uC758 \uC0C8 \uBC84\uC804\uC744 \uC0DD\uC131\uD55C\uB2E4 (--file \uB85C JSON spec \uC804\uB2EC, sourceVersion \uD544\uC218)").argument("<id>", "template ID").requiredOption("--file <path>", "\uBC84\uC804 \uC0DD\uC131 spec \uC774 \uB2F4\uAE34 JSON \uD30C\uC77C \uACBD\uB85C (sourceVersion \uD544\uB4DC \uD544\uC218)").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
8181
8313
|
const opts = cmd.optsWithGlobals();
|
|
8182
8314
|
requireNonEmpty(id, "id");
|
|
8183
8315
|
const payload = readJsonPayload(opts.file);
|
|
@@ -8198,7 +8330,7 @@ var versionCreateCommand = new import_commander45.Command("create").description(
|
|
|
8198
8330
|
ids: [version.id]
|
|
8199
8331
|
});
|
|
8200
8332
|
});
|
|
8201
|
-
var versionDeleteCommand = new
|
|
8333
|
+
var versionDeleteCommand = new import_commander47.Command("delete").description("NCS \uC124\uACC4\uB3C4(template) \uBC84\uC804\uC744 \uC0AD\uC81C\uD55C\uB2E4").argument("<id>", "template ID").argument("<version>", "\uBC84\uC804 \uAC12").option("--yes", "\uD655\uC778 \uD504\uB86C\uD504\uD2B8 \uC0DD\uB7B5 (CI/\uBE44\uB300\uD654\uD615 \uD544\uC218)").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, version, _opts, cmd) => {
|
|
8202
8334
|
const opts = cmd.optsWithGlobals();
|
|
8203
8335
|
requireNonEmpty(id, "id");
|
|
8204
8336
|
requireNonEmpty(version, "version");
|
|
@@ -8224,11 +8356,11 @@ var versionDeleteCommand = new import_commander45.Command("delete").description(
|
|
|
8224
8356
|
`)
|
|
8225
8357
|
);
|
|
8226
8358
|
});
|
|
8227
|
-
var versionCommand = new
|
|
8228
|
-
var templateCommand = new
|
|
8359
|
+
var versionCommand = new import_commander47.Command("version").description("NCS \uC124\uACC4\uB3C4(template) \uBC84\uC804 \uAD00\uB9AC").addCommand(versionListCommand).addCommand(versionGetCommand).addCommand(versionCreateCommand).addCommand(versionDeleteCommand);
|
|
8360
|
+
var templateCommand = new import_commander47.Command("template").description("NCS \uC124\uACC4\uB3C4(template) \uAD00\uB9AC").addCommand(listCommand8).addCommand(getCommand6).addCommand(createCommand6).addCommand(deleteCommand5).addCommand(versionCommand);
|
|
8229
8361
|
|
|
8230
8362
|
// src/commands/ncs/workload.ts
|
|
8231
|
-
var
|
|
8363
|
+
var import_commander48 = require("commander");
|
|
8232
8364
|
var import_chalk17 = __toESM(require("chalk"));
|
|
8233
8365
|
function workloadRows(w) {
|
|
8234
8366
|
return [
|
|
@@ -8243,7 +8375,7 @@ function workloadRows(w) {
|
|
|
8243
8375
|
];
|
|
8244
8376
|
}
|
|
8245
8377
|
var WORKLOAD_HEADERS = ["id", "name", "type", "status", "desired", "available"];
|
|
8246
|
-
var listCommand9 = new
|
|
8378
|
+
var listCommand9 = new import_commander48.Command("list").description("NCS workload(\uB7F0\uD0C0\uC784 \uC2E4\uD589) \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").option("--q <query>", "\uC6CC\uD06C\uB85C\uB4DC \uC774\uB984\xB7\uD15C\uD50C\uB9BF ID\xB7\uD15C\uD50C\uB9BF \uBC84\uC804\uC73C\uB85C \uD544\uD130\uB9C1").option("--page <page>", "\uC870\uD68C\uD560 page \uBC88\uD638").option("--size <size>", "page \uB2F9 \uD56D\uBAA9 \uC218 (\uAE30\uBCF8: API \uAE30\uBCF8\uAC12 10)").action(async (_opts, cmd) => {
|
|
8247
8379
|
const opts = cmd.optsWithGlobals();
|
|
8248
8380
|
const { client } = await resolveNcsClient(opts);
|
|
8249
8381
|
startSpinner("NCS workload \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -8276,7 +8408,7 @@ var listCommand9 = new import_commander46.Command("list").description("NCS workl
|
|
|
8276
8408
|
ids: workloads.map((w) => w.id)
|
|
8277
8409
|
});
|
|
8278
8410
|
});
|
|
8279
|
-
var getCommand7 = new
|
|
8411
|
+
var getCommand7 = new import_commander48.Command("get").description("NCS workload \uB2E8\uAC74\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<id>", "workload ID").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
8280
8412
|
const opts = cmd.optsWithGlobals();
|
|
8281
8413
|
requireNonEmpty(id, "id");
|
|
8282
8414
|
const { client } = await resolveNcsClient(opts);
|
|
@@ -8306,7 +8438,7 @@ var getCommand7 = new import_commander46.Command("get").description("NCS workloa
|
|
|
8306
8438
|
ids: [workload.id]
|
|
8307
8439
|
});
|
|
8308
8440
|
});
|
|
8309
|
-
var logsCommand = new
|
|
8441
|
+
var logsCommand = new import_commander48.Command("logs").description("NCS workload task \uC758 \uCEE8\uD14C\uC774\uB108 \uB85C\uADF8\uB97C \uC870\uD68C\uD55C\uB2E4").argument("<id>", "workload ID").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").option("--task <taskId>", "task ID (\uD544\uC218)").option("--container <name>", "\uCEE8\uD14C\uC774\uB108 \uC774\uB984 (\uD544\uC218)").option(
|
|
8310
8442
|
"--from <time>",
|
|
8311
8443
|
"\uB85C\uADF8 \uC2DC\uC791: \uC2DC\uAC04\uB300 \uD3EC\uD568 RFC3339, now \uB610\uB294 0 \uC774\uC0C1\uC758 \uC815\uC218\uC640 m/h/d \uB2E8\uC704 (\uC608: 30m, 1h, 2d). UTC Z\uB85C \uC815\uADDC\uD654\uD558\uBA70 \uC0DD\uB7B5 \uC2DC API \uAE30\uBCF8 \uBC94\uC704"
|
|
8312
8444
|
).option(
|
|
@@ -8351,7 +8483,7 @@ var logsCommand = new import_commander46.Command("logs").description("NCS worklo
|
|
|
8351
8483
|
ids: []
|
|
8352
8484
|
});
|
|
8353
8485
|
});
|
|
8354
|
-
var eventsCommand2 = new
|
|
8486
|
+
var eventsCommand2 = new import_commander48.Command("events").description("NCS workload task \uC758 \uC774\uBCA4\uD2B8\uB97C \uC870\uD68C\uD55C\uB2E4").argument("<id>", "workload ID").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").option("--task <taskId>", "task ID (\uD544\uC218)").option("--type <type>", "\uC774\uBCA4\uD2B8 \uD0C0\uC785 (Normal | Warning)").option("--q <query>", "\uC774\uBCA4\uD2B8 \uB0B4\uC6A9 \uD544\uD130\uB9C1").option(
|
|
8355
8487
|
"--from <time>",
|
|
8356
8488
|
"\uC774\uBCA4\uD2B8 \uC2DC\uC791: \uC2DC\uAC04\uB300 \uD3EC\uD568 RFC3339, now \uB610\uB294 0 \uC774\uC0C1\uC758 \uC815\uC218\uC640 m/h/d \uB2E8\uC704 (\uC608: 30m, 1h, 2d). UTC Z\uB85C \uC815\uADDC\uD654\uD558\uBA70 \uC0DD\uB7B5 \uC2DC API \uAE30\uBCF8 \uBC94\uC704"
|
|
8357
8489
|
).option(
|
|
@@ -8393,7 +8525,7 @@ var eventsCommand2 = new import_commander46.Command("events").description("NCS w
|
|
|
8393
8525
|
ids: []
|
|
8394
8526
|
});
|
|
8395
8527
|
});
|
|
8396
|
-
var historyGetCommand = new
|
|
8528
|
+
var historyGetCommand = new import_commander48.Command("get").description("NCS workload \uC2E4\uD589 \uD788\uC2A4\uD1A0\uB9AC \uB2E8\uAC74\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<id>", "workload ID").argument("<historyId>", "\uD788\uC2A4\uD1A0\uB9AC ID").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, historyId, _opts, cmd) => {
|
|
8397
8529
|
const opts = cmd.optsWithGlobals();
|
|
8398
8530
|
requireNonEmpty(id, "id");
|
|
8399
8531
|
requireNonEmpty(historyId, "historyId");
|
|
@@ -8422,7 +8554,7 @@ var historyGetCommand = new import_commander46.Command("get").description("NCS w
|
|
|
8422
8554
|
ids: [String(detail.id)]
|
|
8423
8555
|
});
|
|
8424
8556
|
});
|
|
8425
|
-
var historyCommand = new
|
|
8557
|
+
var historyCommand = new import_commander48.Command("history").description("NCS workload \uC2E4\uD589 \uD788\uC2A4\uD1A0\uB9AC \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<id>", "workload ID").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").option("--page <page>", "\uC870\uD68C\uD560 page \uBC88\uD638").option("--size <size>", "page \uB2F9 \uD56D\uBAA9 \uC218 (\uAE30\uBCF8: API \uAE30\uBCF8\uAC12 10)").option("--sort <sort>", "\uC815\uB82C \uAE30\uC900 \uD544\uB4DC\uBA85 (\uC5ED\uC21C\uC740 \uD544\uB4DC\uBA85 \uC55E\uC5D0 - \uB97C \uBD99\uC784, \uC608: -id)").action(async (id, _opts, cmd) => {
|
|
8426
8558
|
const opts = cmd.optsWithGlobals();
|
|
8427
8559
|
requireNonEmpty(id, "id");
|
|
8428
8560
|
const { client } = await resolveNcsClient(opts);
|
|
@@ -8455,7 +8587,7 @@ var historyCommand = new import_commander46.Command("history").description("NCS
|
|
|
8455
8587
|
ids: history.map((h) => String(h.id))
|
|
8456
8588
|
});
|
|
8457
8589
|
}).addCommand(historyGetCommand);
|
|
8458
|
-
var scheduleHistoryCommand = new
|
|
8590
|
+
var scheduleHistoryCommand = new import_commander48.Command("schedule-history").description("NCS workload \uC608\uC57D \uC2E4\uD589 \uD788\uC2A4\uD1A0\uB9AC\uB97C \uC870\uD68C\uD55C\uB2E4").argument("<id>", "workload ID").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
8459
8591
|
const opts = cmd.optsWithGlobals();
|
|
8460
8592
|
requireNonEmpty(id, "id");
|
|
8461
8593
|
const { client } = await resolveNcsClient(opts);
|
|
@@ -8476,7 +8608,7 @@ var scheduleHistoryCommand = new import_commander46.Command("schedule-history").
|
|
|
8476
8608
|
ids: scheduleHistory.map((s) => s.id)
|
|
8477
8609
|
});
|
|
8478
8610
|
});
|
|
8479
|
-
var createCommand7 = new
|
|
8611
|
+
var createCommand7 = new import_commander48.Command("create").description("NCS workload(\uB7F0\uD0C0\uC784 \uC2E4\uD589) \uB97C \uC0DD\uC131\uD55C\uB2E4 (--file \uB85C JSON spec \uC804\uB2EC)").requiredOption("--file <path>", "workload \uC0DD\uC131 spec \uC774 \uB2F4\uAE34 JSON \uD30C\uC77C \uACBD\uB85C").option("--wait", "workload \uAC00 Running \uC0C1\uD0DC\uAC00 \uB420 \uB54C\uAE4C\uC9C0 \uB300\uAE30").option("--timeout <sec>", "wait \uD0C0\uC784\uC544\uC6C3 (\uCD08, \uAE30\uBCF8 300)", "300").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
8480
8612
|
const opts = cmd.optsWithGlobals();
|
|
8481
8613
|
const payload = readJsonPayload(opts.file);
|
|
8482
8614
|
const timeoutMs = parsePositiveIntegerOption(opts.timeout ?? "300", "--timeout") * 1e3;
|
|
@@ -8507,7 +8639,7 @@ var createCommand7 = new import_commander46.Command("create").description("NCS w
|
|
|
8507
8639
|
ids: [workload.id]
|
|
8508
8640
|
});
|
|
8509
8641
|
});
|
|
8510
|
-
var updateCommand = new
|
|
8642
|
+
var updateCommand = new import_commander48.Command("update").description("NCS workload \uB97C \uC804\uCCB4 \uAD50\uCCB4\uD55C\uB2E4 (--file \uB85C JSON spec \uC804\uB2EC, PUT)").argument("<id>", "workload ID").requiredOption("--file <path>", "workload \uAD50\uCCB4 spec \uC774 \uB2F4\uAE34 JSON \uD30C\uC77C \uACBD\uB85C").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
8511
8643
|
const opts = cmd.optsWithGlobals();
|
|
8512
8644
|
requireNonEmpty(id, "id");
|
|
8513
8645
|
const payload = readJsonPayload(opts.file);
|
|
@@ -8528,7 +8660,7 @@ var updateCommand = new import_commander46.Command("update").description("NCS wo
|
|
|
8528
8660
|
ids: [workload.id]
|
|
8529
8661
|
});
|
|
8530
8662
|
});
|
|
8531
|
-
var patchCommand = new
|
|
8663
|
+
var patchCommand = new import_commander48.Command("patch").description("NCS workload \uB97C \uBD80\uBD84 \uBCC0\uACBD\uD55C\uB2E4 (--file \uB85C JSON Patch \uBC30\uC5F4 \uC804\uB2EC, RFC 6902)").argument("<id>", "workload ID").requiredOption("--file <path>", "JSON Patch \uBC30\uC5F4(op/path/value)\uC774 \uB2F4\uAE34 \uD30C\uC77C \uACBD\uB85C").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
8532
8664
|
const opts = cmd.optsWithGlobals();
|
|
8533
8665
|
requireNonEmpty(id, "id");
|
|
8534
8666
|
const payload = readJsonPayload(opts.file);
|
|
@@ -8549,7 +8681,7 @@ var patchCommand = new import_commander46.Command("patch").description("NCS work
|
|
|
8549
8681
|
ids: [workload.id]
|
|
8550
8682
|
});
|
|
8551
8683
|
});
|
|
8552
|
-
var pauseCommand = new
|
|
8684
|
+
var pauseCommand = new import_commander48.Command("pause").description("NCS workload \uB97C \uC77C\uC2DC\uC815\uC9C0\uD55C\uB2E4").argument("<id>", "workload ID").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
8553
8685
|
const opts = cmd.optsWithGlobals();
|
|
8554
8686
|
requireNonEmpty(id, "id");
|
|
8555
8687
|
const { client } = await resolveNcsClient(opts);
|
|
@@ -8564,7 +8696,7 @@ var pauseCommand = new import_commander46.Command("pause").description("NCS work
|
|
|
8564
8696
|
process.stderr.write(import_chalk17.default.green(`\u2713 NCS workload "${id}" \uAC00 \uC77C\uC2DC\uC815\uC9C0\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
|
|
8565
8697
|
`));
|
|
8566
8698
|
});
|
|
8567
|
-
var resumeCommand = new
|
|
8699
|
+
var resumeCommand = new import_commander48.Command("resume").description("NCS workload \uB97C \uC7AC\uAC1C\uD55C\uB2E4").argument("<id>", "workload ID").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
8568
8700
|
const opts = cmd.optsWithGlobals();
|
|
8569
8701
|
requireNonEmpty(id, "id");
|
|
8570
8702
|
const { client } = await resolveNcsClient(opts);
|
|
@@ -8579,7 +8711,7 @@ var resumeCommand = new import_commander46.Command("resume").description("NCS wo
|
|
|
8579
8711
|
process.stderr.write(import_chalk17.default.green(`\u2713 NCS workload "${id}" \uAC00 \uC7AC\uAC1C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
|
|
8580
8712
|
`));
|
|
8581
8713
|
});
|
|
8582
|
-
var restartCommand = new
|
|
8714
|
+
var restartCommand = new import_commander48.Command("restart").description("NCS workload task \uB97C \uC7AC\uC2DC\uC791\uD55C\uB2E4").argument("<id>", "workload ID").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").option("--task <taskId>", "task ID (\uD544\uC218)").action(async (id, _opts, cmd) => {
|
|
8583
8715
|
const opts = cmd.optsWithGlobals();
|
|
8584
8716
|
requireNonEmpty(id, "id");
|
|
8585
8717
|
if (!opts.task || !opts.task.trim()) {
|
|
@@ -8602,7 +8734,7 @@ var restartCommand = new import_commander46.Command("restart").description("NCS
|
|
|
8602
8734
|
`)
|
|
8603
8735
|
);
|
|
8604
8736
|
});
|
|
8605
|
-
var deleteCommand6 = new
|
|
8737
|
+
var deleteCommand6 = new import_commander48.Command("delete").description("NCS workload \uB97C \uC0AD\uC81C\uD55C\uB2E4").argument("<id>", "workload ID").option("--yes", "\uD655\uC778 \uD504\uB86C\uD504\uD2B8 \uC0DD\uB7B5 (CI/\uBE44\uB300\uD654\uD615 \uD544\uC218)").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (id, _opts, cmd) => {
|
|
8606
8738
|
const opts = cmd.optsWithGlobals();
|
|
8607
8739
|
requireNonEmpty(id, "id");
|
|
8608
8740
|
const ok = await confirmDestructive(`NCS workload "${id}" \uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`, opts.yes);
|
|
@@ -8622,10 +8754,10 @@ var deleteCommand6 = new import_commander46.Command("delete").description("NCS w
|
|
|
8622
8754
|
process.stderr.write(import_chalk17.default.green(`\u2713 NCS workload "${id}" \uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
|
|
8623
8755
|
`));
|
|
8624
8756
|
});
|
|
8625
|
-
var workloadCommand = new
|
|
8757
|
+
var workloadCommand = new import_commander48.Command("workload").description("NCS workload(\uB7F0\uD0C0\uC784 \uC2E4\uD589) \uAD00\uB9AC").addCommand(listCommand9).addCommand(getCommand7).addCommand(logsCommand).addCommand(eventsCommand2).addCommand(historyCommand).addCommand(scheduleHistoryCommand).addCommand(createCommand7).addCommand(updateCommand).addCommand(patchCommand).addCommand(pauseCommand).addCommand(resumeCommand).addCommand(restartCommand).addCommand(deleteCommand6);
|
|
8626
8758
|
|
|
8627
8759
|
// src/commands/ncs/malware.ts
|
|
8628
|
-
var
|
|
8760
|
+
var import_commander49 = require("commander");
|
|
8629
8761
|
function parseEnabledOption(value) {
|
|
8630
8762
|
if (value === "true") return true;
|
|
8631
8763
|
if (value === "false") return false;
|
|
@@ -8634,7 +8766,7 @@ function parseEnabledOption(value) {
|
|
|
8634
8766
|
EXIT_PARAM_ERROR
|
|
8635
8767
|
);
|
|
8636
8768
|
}
|
|
8637
|
-
var configGetCommand = new
|
|
8769
|
+
var configGetCommand = new import_commander49.Command("get").description("NCS \uC545\uC131\uCF54\uB4DC \uAC80\uC0AC \uC124\uC815\uC744 \uC870\uD68C\uD55C\uB2E4").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
8638
8770
|
const opts = cmd.optsWithGlobals();
|
|
8639
8771
|
const { client } = await resolveNcsClient(opts);
|
|
8640
8772
|
startSpinner("NCS \uC545\uC131\uCF54\uB4DC \uAC80\uC0AC \uC124\uC815 \uC870\uD68C \uC911...");
|
|
@@ -8653,7 +8785,7 @@ var configGetCommand = new import_commander47.Command("get").description("NCS \u
|
|
|
8653
8785
|
ids: []
|
|
8654
8786
|
});
|
|
8655
8787
|
});
|
|
8656
|
-
var configSetCommand = new
|
|
8788
|
+
var configSetCommand = new import_commander49.Command("set").description("NCS \uC545\uC131\uCF54\uB4DC \uAC80\uC0AC \uC124\uC815\uC744 \uBCC0\uACBD\uD55C\uB2E4").requiredOption("--enabled <true|false>", "\uC545\uC131\uCF54\uB4DC \uAC80\uC0AC \uC0AC\uC6A9 \uC5EC\uBD80").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
8657
8789
|
const opts = cmd.optsWithGlobals();
|
|
8658
8790
|
const enabled = parseEnabledOption(opts.enabled);
|
|
8659
8791
|
const { client } = await resolveNcsClient(opts);
|
|
@@ -8673,8 +8805,8 @@ var configSetCommand = new import_commander47.Command("set").description("NCS \u
|
|
|
8673
8805
|
ids: []
|
|
8674
8806
|
});
|
|
8675
8807
|
});
|
|
8676
|
-
var configCommand = new
|
|
8677
|
-
var resultCommand = new
|
|
8808
|
+
var configCommand = new import_commander49.Command("config").description("NCS \uC545\uC131\uCF54\uB4DC \uAC80\uC0AC \uC124\uC815 \uAD00\uB9AC").addCommand(configGetCommand).addCommand(configSetCommand);
|
|
8809
|
+
var resultCommand = new import_commander49.Command("result").description("NCS workload \uC2E4\uD589 \uD788\uC2A4\uD1A0\uB9AC\uC758 \uC545\uC131\uCF54\uB4DC \uAC80\uC0AC \uACB0\uACFC\uB97C \uC870\uD68C\uD55C\uB2E4").argument("<workloadId>", "workload ID").argument("<historyId>", "\uD788\uC2A4\uD1A0\uB9AC ID").option("--region <region>", "NCS region (\uAE30\uBCF8: kr1, kr1/kr3 \uB9CC \uC9C0\uC6D0)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (workloadId, historyId, _opts, cmd) => {
|
|
8678
8810
|
const opts = cmd.optsWithGlobals();
|
|
8679
8811
|
requireNonEmpty(workloadId, "workloadId");
|
|
8680
8812
|
requireNonEmpty(historyId, "historyId");
|
|
@@ -8705,10 +8837,10 @@ var resultCommand = new import_commander47.Command("result").description("NCS wo
|
|
|
8705
8837
|
ids: []
|
|
8706
8838
|
});
|
|
8707
8839
|
});
|
|
8708
|
-
var malwareCommand = new
|
|
8840
|
+
var malwareCommand = new import_commander49.Command("malware").description("NCS \uC545\uC131\uCF54\uB4DC \uAC80\uC0AC \uAD00\uB9AC").addCommand(configCommand).addCommand(resultCommand);
|
|
8709
8841
|
|
|
8710
8842
|
// src/commands/apigateway/service.ts
|
|
8711
|
-
var
|
|
8843
|
+
var import_commander50 = require("commander");
|
|
8712
8844
|
|
|
8713
8845
|
// src/commands/apigateway/helpers.ts
|
|
8714
8846
|
var import_promises8 = require("fs/promises");
|
|
@@ -9390,21 +9522,11 @@ function writtenStageResourceOutput(resources) {
|
|
|
9390
9522
|
};
|
|
9391
9523
|
}
|
|
9392
9524
|
async function resolveApiGatewayAppKey(profileName) {
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
throw err;
|
|
9399
|
-
}
|
|
9400
|
-
}
|
|
9401
|
-
if (!credential?.appkey) {
|
|
9402
|
-
throw new NhnCloudCliError(
|
|
9403
|
-
"API Gateway appKey\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. nhncloud configure --apigateway-appkey <key>\uB85C \uC124\uC815\uD558\uC138\uC694.",
|
|
9404
|
-
EXIT_CONFIG_ERROR
|
|
9405
|
-
);
|
|
9406
|
-
}
|
|
9407
|
-
return credential.appkey;
|
|
9525
|
+
return resolveServiceAppKey(
|
|
9526
|
+
"apigateway",
|
|
9527
|
+
profileName,
|
|
9528
|
+
"API Gateway appKey\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. nhncloud configure --apigateway-appkey <key>\uB85C \uC124\uC815\uD558\uC138\uC694."
|
|
9529
|
+
);
|
|
9408
9530
|
}
|
|
9409
9531
|
async function resolveApiGatewayClient(opts) {
|
|
9410
9532
|
const profileName = await resolveProfileName(opts.profile);
|
|
@@ -9418,7 +9540,7 @@ async function resolveApiGatewayClient(opts) {
|
|
|
9418
9540
|
}
|
|
9419
9541
|
|
|
9420
9542
|
// src/commands/apigateway/service.ts
|
|
9421
|
-
var listCommand10 = new
|
|
9543
|
+
var listCommand10 = new import_commander50.Command("list").description("API Gateway service \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4 (\uC804\uCCB4 \uD544\uB4DC\uB294 --json)").option("--region <region>", "API Gateway region (\uAE30\uBCF8: kr1)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, command) => {
|
|
9422
9544
|
const opts = command.optsWithGlobals();
|
|
9423
9545
|
const { client } = await resolveApiGatewayClient(opts);
|
|
9424
9546
|
startSpinner("API Gateway service \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -9449,7 +9571,7 @@ var listCommand10 = new import_commander48.Command("list").description("API Gate
|
|
|
9449
9571
|
ids: services.map((service) => sanitizeForTerminal(service.apigwServiceId))
|
|
9450
9572
|
});
|
|
9451
9573
|
});
|
|
9452
|
-
var getCommand8 = new
|
|
9574
|
+
var getCommand8 = new import_commander50.Command("get").description("API Gateway service \uD55C \uAC74\uC744 \uC870\uD68C\uD55C\uB2E4 (\uC804\uCCB4 \uD544\uB4DC\uB294 --json)").argument("<service-id>", "API Gateway service ID").option("--region <region>", "API Gateway region (\uAE30\uBCF8: kr1)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (serviceId, _opts, command) => {
|
|
9453
9575
|
const opts = command.optsWithGlobals();
|
|
9454
9576
|
const parsedServiceId = parseRequiredArgument(serviceId, "service-id");
|
|
9455
9577
|
const displayServiceId = sanitizeForTerminal(parsedServiceId);
|
|
@@ -9482,10 +9604,10 @@ var getCommand8 = new import_commander48.Command("get").description("API Gateway
|
|
|
9482
9604
|
ids: [sanitizeForTerminal(service.apigwServiceId)]
|
|
9483
9605
|
});
|
|
9484
9606
|
});
|
|
9485
|
-
var serviceCommand = new
|
|
9607
|
+
var serviceCommand = new import_commander50.Command("service").description("API Gateway service \uC870\uD68C \uBA85\uB839").addCommand(listCommand10).addCommand(getCommand8);
|
|
9486
9608
|
|
|
9487
9609
|
// src/commands/apigateway/resource.ts
|
|
9488
|
-
var
|
|
9610
|
+
var import_commander51 = require("commander");
|
|
9489
9611
|
function addApiGatewayOptions(command) {
|
|
9490
9612
|
return command.option("--region <region>", "API Gateway region (\uAE30\uBCF8: kr1)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984");
|
|
9491
9613
|
}
|
|
@@ -9567,7 +9689,7 @@ function updatedResourceOutput(opts, resources) {
|
|
|
9567
9689
|
});
|
|
9568
9690
|
}
|
|
9569
9691
|
var listCommand11 = addApiGatewayOptions(
|
|
9570
|
-
new
|
|
9692
|
+
new import_commander51.Command("list").description("API Gateway resource \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4 (\uC804\uCCB4 \uD544\uB4DC\uB294 --json)").argument("<service-id>", "API Gateway service ID")
|
|
9571
9693
|
).action(async (serviceId, _opts, command) => {
|
|
9572
9694
|
const opts = command.optsWithGlobals();
|
|
9573
9695
|
const parsedServiceId = parseRequiredArgument(serviceId, "service-id");
|
|
@@ -9596,7 +9718,7 @@ var listCommand11 = addApiGatewayOptions(
|
|
|
9596
9718
|
});
|
|
9597
9719
|
});
|
|
9598
9720
|
var parametersCommand = addApiGatewayOptions(
|
|
9599
|
-
new
|
|
9721
|
+
new import_commander51.Command("parameters").description("API Gateway resource \uC694\uCCAD parameter\uB97C \uC870\uD68C\uD55C\uB2E4 (\uC804\uCCB4 \uD544\uB4DC\uB294 --json)").argument("<service-id>", "API Gateway service ID").argument("<resource-id>", "API Gateway resource ID")
|
|
9600
9722
|
).action(async (serviceId, resourceId2, _opts, command) => {
|
|
9601
9723
|
const opts = command.optsWithGlobals();
|
|
9602
9724
|
const parsedServiceId = parseRequiredArgument(serviceId, "service-id");
|
|
@@ -9625,7 +9747,7 @@ var parametersCommand = addApiGatewayOptions(
|
|
|
9625
9747
|
});
|
|
9626
9748
|
});
|
|
9627
9749
|
var responsesCommand = addApiGatewayOptions(
|
|
9628
|
-
new
|
|
9750
|
+
new import_commander51.Command("responses").description("API Gateway resource \uC751\uB2F5 \uC815\uC758\uB97C \uC870\uD68C\uD55C\uB2E4 (\uC804\uCCB4 \uD544\uB4DC\uB294 --json)").argument("<service-id>", "API Gateway service ID").argument("<resource-id>", "API Gateway resource ID")
|
|
9629
9751
|
).action(async (serviceId, resourceId2, _opts, command) => {
|
|
9630
9752
|
const opts = command.optsWithGlobals();
|
|
9631
9753
|
const parsedServiceId = parseRequiredArgument(serviceId, "service-id");
|
|
@@ -9651,7 +9773,7 @@ var responsesCommand = addApiGatewayOptions(
|
|
|
9651
9773
|
});
|
|
9652
9774
|
});
|
|
9653
9775
|
var setPathPluginCommand = addApiGatewayOptions(
|
|
9654
|
-
new
|
|
9776
|
+
new import_commander51.Command("set-path-plugin").description("API Gateway resource \uACBD\uB85C \uD50C\uB7EC\uADF8\uC778\uC744 \uC124\uC815\uD55C\uB2E4").argument("<service-id>", "API Gateway service ID").argument("<resource-id>", "API Gateway resource ID").requiredOption("--config-file <path>", "\uD50C\uB7EC\uADF8\uC778 \uC124\uC815 JSON \uD30C\uC77C").option("--dry-run", "\uC4F0\uAE30 \uC5C6\uC774 \uC608\uC0C1 \uC601\uD5A5 \uBC94\uC704\uB97C \uCD9C\uB825\uD55C\uB2E4").option("--yes", "\uB9AC\uC18C\uC2A4 \uACBD\uB85C \uD50C\uB7EC\uADF8\uC778 \uC124\uC815\uC744 \uD655\uC778\uD55C\uB2E4")
|
|
9655
9777
|
).action(async (serviceId, resourceId2, _opts, command) => {
|
|
9656
9778
|
const opts = command.optsWithGlobals();
|
|
9657
9779
|
const parsedServiceId = parseRequiredArgument(serviceId, "service-id");
|
|
@@ -9725,7 +9847,7 @@ var setPathPluginCommand = addApiGatewayOptions(
|
|
|
9725
9847
|
updatedResourceOutput(opts, updatedResources);
|
|
9726
9848
|
});
|
|
9727
9849
|
var setMethodPluginCommand = addApiGatewayOptions(
|
|
9728
|
-
new
|
|
9850
|
+
new import_commander51.Command("set-method-plugin").description("API Gateway resource \uBA54\uC11C\uB4DC \uD50C\uB7EC\uADF8\uC778\uC744 \uC124\uC815\uD55C\uB2E4").argument("<service-id>", "API Gateway service ID").argument("<resource-id>", "API Gateway resource ID").requiredOption("--config-file <path>", "\uD50C\uB7EC\uADF8\uC778 \uC124\uC815 JSON \uD30C\uC77C").option("--dry-run", "\uC4F0\uAE30 \uC5C6\uC774 \uC608\uC0C1 \uBCC0\uACBD \uB0B4\uC6A9\uC744 \uCD9C\uB825\uD55C\uB2E4").option("--yes", "\uB9AC\uC18C\uC2A4 \uBA54\uC11C\uB4DC \uD50C\uB7EC\uADF8\uC778 \uC124\uC815\uC744 \uD655\uC778\uD55C\uB2E4")
|
|
9729
9851
|
).action(async (serviceId, resourceId2, _opts, command) => {
|
|
9730
9852
|
const opts = command.optsWithGlobals();
|
|
9731
9853
|
const parsedServiceId = parseRequiredArgument(serviceId, "service-id");
|
|
@@ -9813,19 +9935,19 @@ var setMethodPluginCommand = addApiGatewayOptions(
|
|
|
9813
9935
|
}
|
|
9814
9936
|
updatedResourceOutput(opts, updatedResources);
|
|
9815
9937
|
});
|
|
9816
|
-
var resourceCommand = new
|
|
9938
|
+
var resourceCommand = new import_commander51.Command("resource").description("API Gateway resource \uC870\uD68C \uBC0F \uBCC0\uACBD \uBA85\uB839").addCommand(listCommand11).addCommand(parametersCommand).addCommand(responsesCommand).addCommand(setPathPluginCommand).addCommand(setMethodPluginCommand);
|
|
9817
9939
|
|
|
9818
9940
|
// src/commands/apigateway/stage.ts
|
|
9819
9941
|
var import_promises9 = require("fs/promises");
|
|
9820
|
-
var
|
|
9942
|
+
var import_commander53 = require("commander");
|
|
9821
9943
|
|
|
9822
9944
|
// src/commands/apigateway/deploy.ts
|
|
9823
|
-
var
|
|
9945
|
+
var import_commander52 = require("commander");
|
|
9824
9946
|
function addApiGatewayOptions2(command) {
|
|
9825
9947
|
return command.option("--region <region>", "API Gateway region (\uAE30\uBCF8: kr1)", "kr1").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984");
|
|
9826
9948
|
}
|
|
9827
9949
|
var listCommand12 = addApiGatewayOptions2(
|
|
9828
|
-
new
|
|
9950
|
+
new import_commander52.Command("list").description("API Gateway stage \uBC30\uD3EC \uC774\uB825 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4 (\uC804\uCCB4 \uD544\uB4DC\uB294 --json)").argument("<service-id>", "API Gateway service ID").argument("<stage-id>", "API Gateway stage ID")
|
|
9829
9951
|
).action(async (serviceId, stageId, _opts, command) => {
|
|
9830
9952
|
const opts = command.optsWithGlobals();
|
|
9831
9953
|
const parsedServiceId = parseRequiredArgument(serviceId, "service-id");
|
|
@@ -9854,7 +9976,7 @@ var listCommand12 = addApiGatewayOptions2(
|
|
|
9854
9976
|
});
|
|
9855
9977
|
});
|
|
9856
9978
|
var latestCommand = addApiGatewayOptions2(
|
|
9857
|
-
new
|
|
9979
|
+
new import_commander52.Command("latest").description("API Gateway stage \uCD5C\uC2E0 \uBC30\uD3EC \uACB0\uACFC\uB97C \uC870\uD68C\uD55C\uB2E4 (resource \uC804\uCCB4\uB294 --json)").argument("<service-id>", "API Gateway service ID").argument("<stage-id>", "API Gateway stage ID")
|
|
9858
9980
|
).action(async (serviceId, stageId, _opts, command) => {
|
|
9859
9981
|
const opts = command.optsWithGlobals();
|
|
9860
9982
|
const parsedServiceId = parseRequiredArgument(serviceId, "service-id");
|
|
@@ -9884,7 +10006,7 @@ var latestCommand = addApiGatewayOptions2(
|
|
|
9884
10006
|
});
|
|
9885
10007
|
});
|
|
9886
10008
|
var createCommand8 = addApiGatewayOptions2(
|
|
9887
|
-
new
|
|
10009
|
+
new import_commander52.Command("create").description("stage \uC124\uC815\uC744 API Gateway service \uC5D0 \uBC30\uD3EC\uD55C\uB2E4").argument("<service-id>", "API Gateway service ID").argument("<stage-id>", "API Gateway stage ID").option("--description <text>", "\uBC30\uD3EC \uC124\uBA85 (\uCD5C\uB300 200\uC790)").option("--no-wait", "\uBC30\uD3EC \uACB0\uACFC\uB97C \uAE30\uB2E4\uB9AC\uC9C0 \uC54A\uACE0 \uC694\uCCAD\uB9CC \uD55C\uB2E4").option("--timeout <sec>", "\uBC30\uD3EC \uB300\uAE30 \uC0C1\uD55C (\uCD08, \uAE30\uBCF8 300)", "300").option("--yes", "\uBC30\uD3EC\uB97C \uD655\uC778\uD55C\uB2E4")
|
|
9888
10010
|
).action(async (serviceId, stageId, _opts, command) => {
|
|
9889
10011
|
const opts = command.optsWithGlobals();
|
|
9890
10012
|
const parsedServiceId = parseRequiredArgument(serviceId, "service-id");
|
|
@@ -9982,7 +10104,7 @@ var createCommand8 = addApiGatewayOptions2(
|
|
|
9982
10104
|
});
|
|
9983
10105
|
});
|
|
9984
10106
|
var rollbackCommand = addApiGatewayOptions2(
|
|
9985
|
-
new
|
|
10107
|
+
new import_commander52.Command("rollback").description("\uBC30\uD3EC \uC774\uB825\uC73C\uB85C stage \uC124\uC815\uC744 \uB418\uB3CC\uB9B0\uB2E4").argument("<service-id>", "API Gateway service ID").argument("<stage-id>", "API Gateway stage ID").argument("<deploy-id>", "\uB418\uB3CC\uB9B4 \uBC30\uD3EC ID").option("--yes", "\uB418\uB3CC\uB9AC\uAE30\uB97C \uD655\uC778\uD55C\uB2E4")
|
|
9986
10108
|
).action(async (serviceId, stageId, deployId, _opts, command) => {
|
|
9987
10109
|
const opts = command.optsWithGlobals();
|
|
9988
10110
|
const parsedServiceId = parseRequiredArgument(serviceId, "service-id");
|
|
@@ -10010,7 +10132,7 @@ var rollbackCommand = addApiGatewayOptions2(
|
|
|
10010
10132
|
);
|
|
10011
10133
|
process.stderr.write("\uC644\uB8CC: \uC9C1\uC804\uAE4C\uC9C0\uC758 \uC2A4\uD14C\uC774\uC9C0 \uC124\uC815\uC740 \uC774 \uBC30\uD3EC \uC774\uB825\uC758 \uB0B4\uC6A9\uC73C\uB85C \uB300\uCCB4\uB410\uC2B5\uB2C8\uB2E4.\n");
|
|
10012
10134
|
});
|
|
10013
|
-
var deployCommand = new
|
|
10135
|
+
var deployCommand = new import_commander52.Command("deploy").description("API Gateway stage \uBC30\uD3EC \uC870\uD68C\uC640 \uC2E4\uD589 \uBA85\uB839").addCommand(listCommand12).addCommand(latestCommand).addCommand(createCommand8).addCommand(rollbackCommand);
|
|
10014
10136
|
|
|
10015
10137
|
// src/commands/apigateway/stage.ts
|
|
10016
10138
|
function addApiGatewayOptions3(command) {
|
|
@@ -10039,7 +10161,7 @@ async function writeStageSwaggerFile(path5, swagger, force) {
|
|
|
10039
10161
|
}
|
|
10040
10162
|
}
|
|
10041
10163
|
var listCommand13 = addApiGatewayOptions3(
|
|
10042
|
-
new
|
|
10164
|
+
new import_commander53.Command("list").description("API Gateway stage \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4 (resourceUpdatedAt\uC740 \uB9AC\uC18C\uC2A4 \uBC18\uC601 \uC2DC\uAC01)").argument("<service-id>", "API Gateway service ID")
|
|
10043
10165
|
).action(async (serviceId, _opts, command) => {
|
|
10044
10166
|
const opts = command.optsWithGlobals();
|
|
10045
10167
|
const parsedServiceId = parseRequiredArgument(serviceId, "service-id");
|
|
@@ -10068,7 +10190,7 @@ var listCommand13 = addApiGatewayOptions3(
|
|
|
10068
10190
|
});
|
|
10069
10191
|
});
|
|
10070
10192
|
var swaggerCommand = addApiGatewayOptions3(
|
|
10071
|
-
new
|
|
10193
|
+
new import_commander53.Command("swagger").description("API Gateway stage Swagger\uB97C \uCD9C\uB825\uD558\uAC70\uB098 \uC800\uC7A5\uD55C\uB2E4").argument("<service-id>", "API Gateway service ID").argument("<stage-id>", "API Gateway stage ID").option("--output <file>", "Swagger JSON \uC800\uC7A5 \uACBD\uB85C").option("--force", "\uAE30\uC874 \uD30C\uC77C \uB36E\uC5B4\uC4F0\uAE30")
|
|
10072
10194
|
).action(async (serviceId, stageId, _opts, command) => {
|
|
10073
10195
|
const opts = command.optsWithGlobals();
|
|
10074
10196
|
const parsedServiceId = parseRequiredArgument(serviceId, "service-id");
|
|
@@ -10092,7 +10214,7 @@ var swaggerCommand = addApiGatewayOptions3(
|
|
|
10092
10214
|
printJson(swagger);
|
|
10093
10215
|
});
|
|
10094
10216
|
var resourcesCommand = addApiGatewayOptions3(
|
|
10095
|
-
new
|
|
10217
|
+
new import_commander53.Command("resources").description("\uBC30\uD3EC\uB41C API Gateway stage resource \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4 (\uC804\uCCB4 \uD544\uB4DC\uB294 --json)").argument("<service-id>", "API Gateway service ID").argument("<stage-id>", "API Gateway stage ID")
|
|
10096
10218
|
).action(async (serviceId, stageId, _opts, command) => {
|
|
10097
10219
|
const opts = command.optsWithGlobals();
|
|
10098
10220
|
const parsedServiceId = parseRequiredArgument(serviceId, "service-id");
|
|
@@ -10122,7 +10244,7 @@ var resourcesCommand = addApiGatewayOptions3(
|
|
|
10122
10244
|
});
|
|
10123
10245
|
});
|
|
10124
10246
|
var updateCommand2 = addApiGatewayOptions3(
|
|
10125
|
-
new
|
|
10247
|
+
new import_commander53.Command("update").description("API Gateway stage\uC758 backend endpoint URL\uACFC \uC124\uBA85\uC744 \uC218\uC815\uD55C\uB2E4").argument("<service-id>", "API Gateway service ID").argument("<stage-id>", "API Gateway stage ID").option("--backend-endpoint-url <url>", "\uBCC0\uACBD\uD560 backend endpoint URL").option("--description <text>", "\uBCC0\uACBD\uD560 stage \uC124\uBA85").option("--yes", "\uC2A4\uD14C\uC774\uC9C0 \uC218\uC815\uC744 \uD655\uC778\uD55C\uB2E4")
|
|
10126
10248
|
).action(async (serviceId, stageId, _opts, command) => {
|
|
10127
10249
|
const opts = command.optsWithGlobals();
|
|
10128
10250
|
const parsedServiceId = parseRequiredArgument(serviceId, "service-id");
|
|
@@ -10171,7 +10293,7 @@ var updateCommand2 = addApiGatewayOptions3(
|
|
|
10171
10293
|
process.stderr.write("\uC548\uB0B4: \uC2A4\uD14C\uC774\uC9C0 \uBCC0\uACBD \uD6C4 \uC2E4\uC81C \uD2B8\uB798\uD53D \uBC18\uC601 \uC0C1\uD0DC\uB97C \uD655\uC778\uD558\uC138\uC694.\n");
|
|
10172
10294
|
});
|
|
10173
10295
|
var importResourcesCommand = addApiGatewayOptions3(
|
|
10174
|
-
new
|
|
10296
|
+
new import_commander53.Command("import-resources").description("API Gateway service \uC758 \uB9AC\uC18C\uC2A4\uB97C stage \uB85C \uAC00\uC838\uC628\uB2E4").argument("<service-id>", "API Gateway service ID").argument("<stage-id>", "API Gateway stage ID").option("--yes", "\uC2A4\uD14C\uC774\uC9C0 \uBC18\uC601\uC744 \uD655\uC778\uD55C\uB2E4")
|
|
10175
10297
|
).action(async (serviceId, stageId, _opts, command) => {
|
|
10176
10298
|
const opts = command.optsWithGlobals();
|
|
10177
10299
|
const parsedServiceId = parseRequiredArgument(serviceId, "service-id");
|
|
@@ -10193,10 +10315,10 @@ var importResourcesCommand = addApiGatewayOptions3(
|
|
|
10193
10315
|
"\uC548\uB0B4: \uBC18\uC601\uC740 \uC2A4\uD14C\uC774\uC9C0 \uC124\uC815\uB9CC \uBC14\uAFC9\uB2C8\uB2E4. \uC11C\uBE44\uC2A4\uC5D0 \uC801\uC6A9\uD558\uB824\uBA74 apigateway stage deploy create \uB97C \uC2E4\uD589\uD558\uC138\uC694.\n"
|
|
10194
10316
|
);
|
|
10195
10317
|
});
|
|
10196
|
-
var stageCommand = new
|
|
10318
|
+
var stageCommand = new import_commander53.Command("stage").description("API Gateway stage \uC870\uD68C \uBC0F \uBCC0\uACBD \uBA85\uB839").addCommand(listCommand13).addCommand(swaggerCommand).addCommand(resourcesCommand).addCommand(updateCommand2).addCommand(importResourcesCommand).addCommand(deployCommand);
|
|
10197
10319
|
|
|
10198
10320
|
// src/commands/loadbalancer/list.ts
|
|
10199
|
-
var
|
|
10321
|
+
var import_commander54 = require("commander");
|
|
10200
10322
|
|
|
10201
10323
|
// src/commands/loadbalancer/helpers.ts
|
|
10202
10324
|
var import_node_net = require("net");
|
|
@@ -10569,7 +10691,7 @@ async function resolveLoadBalancerClient(opts) {
|
|
|
10569
10691
|
}
|
|
10570
10692
|
|
|
10571
10693
|
// src/commands/loadbalancer/list.ts
|
|
10572
|
-
var listCommand14 = new
|
|
10694
|
+
var listCommand14 = new import_commander54.Command("list").description("Load Balancer \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4 (\uC804\uCCB4 \uD544\uB4DC\uB294 --json)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
10573
10695
|
const opts = cmd.optsWithGlobals();
|
|
10574
10696
|
const { client } = await resolveLoadBalancerClient(opts);
|
|
10575
10697
|
startSpinner("Load Balancer \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -10607,8 +10729,8 @@ var listCommand14 = new import_commander52.Command("list").description("Load Bal
|
|
|
10607
10729
|
});
|
|
10608
10730
|
|
|
10609
10731
|
// src/commands/loadbalancer/get.ts
|
|
10610
|
-
var
|
|
10611
|
-
var getCommand9 = new
|
|
10732
|
+
var import_commander55 = require("commander");
|
|
10733
|
+
var getCommand9 = new import_commander55.Command("get").description("Load Balancer\uB97C \uC774\uB984 \uB610\uB294 UUID\uB85C \uC870\uD68C\uD55C\uB2E4").argument("<loadbalancer>", "Load Balancer \uC774\uB984 \uB610\uB294 UUID").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (loadBalancerInput, _opts, cmd) => {
|
|
10612
10734
|
const opts = cmd.optsWithGlobals();
|
|
10613
10735
|
const input = requireResourceInput(loadBalancerInput, "Load Balancer");
|
|
10614
10736
|
const { client } = await resolveLoadBalancerClient(opts);
|
|
@@ -10645,10 +10767,10 @@ var getCommand9 = new import_commander53.Command("get").description("Load Balanc
|
|
|
10645
10767
|
});
|
|
10646
10768
|
|
|
10647
10769
|
// src/commands/loadbalancer/ipacl.ts
|
|
10648
|
-
var
|
|
10770
|
+
var import_commander57 = require("commander");
|
|
10649
10771
|
|
|
10650
10772
|
// src/commands/loadbalancer/target.ts
|
|
10651
|
-
var
|
|
10773
|
+
var import_commander56 = require("commander");
|
|
10652
10774
|
|
|
10653
10775
|
// src/commands/loadbalancer/rebind.ts
|
|
10654
10776
|
function shellQuote(value) {
|
|
@@ -10779,7 +10901,7 @@ function targetWriteResult(operation, target, rebind) {
|
|
|
10779
10901
|
rebind
|
|
10780
10902
|
};
|
|
10781
10903
|
}
|
|
10782
|
-
var listCommand15 = new
|
|
10904
|
+
var listCommand15 = new import_commander56.Command("list").description("IP ACL \uB300\uC0C1 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4").argument("<group>", "IP ACL \uADF8\uB8F9 \uC774\uB984 \uB610\uB294 UUID").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (groupInput, _opts, cmd) => {
|
|
10783
10905
|
const opts = cmd.optsWithGlobals();
|
|
10784
10906
|
const input = requireResourceInput(groupInput, "IP ACL \uADF8\uB8F9");
|
|
10785
10907
|
const { client } = await resolveLoadBalancerClient(opts);
|
|
@@ -10808,7 +10930,7 @@ var listCommand15 = new import_commander54.Command("list").description("IP ACL \
|
|
|
10808
10930
|
ids: targets.map((target) => target.id)
|
|
10809
10931
|
});
|
|
10810
10932
|
});
|
|
10811
|
-
var addCommand = new
|
|
10933
|
+
var addCommand = new import_commander56.Command("add").description("IP ACL \uB300\uC0C1\uC744 \uCD94\uAC00\uD558\uACE0 \uC5F0\uACB0\uB41C Load Balancer\uB97C \uC7AC\uBC14\uC778\uB529\uD55C\uB2E4").argument("<group>", "IP ACL \uADF8\uB8F9 \uC774\uB984 \uB610\uB294 UUID").requiredOption("--cidr <ip-or-cidr>", "\uCD94\uAC00\uD560 IP \uC8FC\uC18C \uB610\uB294 CIDR").option("--description <text>", "IP ACL \uB300\uC0C1 \uC124\uBA85").option("--no-rebind", "\uB300\uC0C1 \uCD94\uAC00 \uD6C4 Load Balancer \uC7AC\uBC14\uC778\uB529 \uC0DD\uB7B5").option("--yes", "\uB300\uC0C1 \uCD94\uAC00 \uD655\uC778").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (groupInput, _opts, cmd) => {
|
|
10812
10934
|
const opts = cmd.optsWithGlobals();
|
|
10813
10935
|
requireYes2(opts.yes, "IP ACL \uB300\uC0C1 \uCD94\uAC00");
|
|
10814
10936
|
const parsedGroup = requireResourceInput(groupInput, "IP ACL \uADF8\uB8F9");
|
|
@@ -10845,7 +10967,7 @@ var addCommand = new import_commander54.Command("add").description("IP ACL \uB30
|
|
|
10845
10967
|
writeTargetWarnings(group, result);
|
|
10846
10968
|
if (result.status === "partial") process.exitCode = EXIT_API_ERROR;
|
|
10847
10969
|
});
|
|
10848
|
-
var removeCommand = new
|
|
10970
|
+
var removeCommand = new import_commander56.Command("remove").description("IP ACL \uB300\uC0C1\uC744 \uC0AD\uC81C\uD558\uACE0 \uC5F0\uACB0\uB41C Load Balancer\uB97C \uC7AC\uBC14\uC778\uB529\uD55C\uB2E4").argument("<target-id>", "\uC0AD\uC81C\uD560 IP ACL \uB300\uC0C1 UUID").option("--no-rebind", "\uB300\uC0C1 \uC0AD\uC81C \uD6C4 Load Balancer \uC7AC\uBC14\uC778\uB529 \uC0DD\uB7B5").option("--yes", "\uB300\uC0C1 \uC0AD\uC81C \uD655\uC778").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (targetInput, _opts, cmd) => {
|
|
10849
10971
|
const opts = cmd.optsWithGlobals();
|
|
10850
10972
|
requireYes2(opts.yes, "IP ACL \uB300\uC0C1 \uC0AD\uC81C");
|
|
10851
10973
|
const parsedTargetId = requireResourceInput(targetInput, "IP ACL \uB300\uC0C1");
|
|
@@ -10876,13 +10998,13 @@ var removeCommand = new import_commander54.Command("remove").description("IP ACL
|
|
|
10876
10998
|
writeTargetWarnings(group, result);
|
|
10877
10999
|
if (result.status === "partial") process.exitCode = EXIT_API_ERROR;
|
|
10878
11000
|
});
|
|
10879
|
-
var targetCommand = new
|
|
11001
|
+
var targetCommand = new import_commander56.Command("target").description("IP ACL \uB300\uC0C1 \uC870\uD68C\xB7\uAD00\uB9AC");
|
|
10880
11002
|
targetCommand.addCommand(listCommand15);
|
|
10881
11003
|
targetCommand.addCommand(addCommand);
|
|
10882
11004
|
targetCommand.addCommand(removeCommand);
|
|
10883
11005
|
|
|
10884
11006
|
// src/commands/loadbalancer/ipacl.ts
|
|
10885
|
-
var listCommand16 = new
|
|
11007
|
+
var listCommand16 = new import_commander57.Command("list").description("IP ACL \uADF8\uB8F9 \uBAA9\uB85D\uC744 \uC870\uD68C\uD55C\uB2E4 (\uC804\uCCB4 \uD544\uB4DC\uB294 --json)").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
10886
11008
|
const opts = cmd.optsWithGlobals();
|
|
10887
11009
|
const { client } = await resolveLoadBalancerClient(opts);
|
|
10888
11010
|
startSpinner("IP ACL \uADF8\uB8F9 \uBAA9\uB85D \uC870\uD68C \uC911...");
|
|
@@ -10910,7 +11032,7 @@ var listCommand16 = new import_commander55.Command("list").description("IP ACL \
|
|
|
10910
11032
|
ids: groups.map((group) => group.id)
|
|
10911
11033
|
});
|
|
10912
11034
|
});
|
|
10913
|
-
var getCommand10 = new
|
|
11035
|
+
var getCommand10 = new import_commander57.Command("get").description("IP ACL \uADF8\uB8F9\uC744 \uC774\uB984 \uB610\uB294 UUID\uB85C \uC870\uD68C\uD55C\uB2E4").argument("<group>", "IP ACL \uADF8\uB8F9 \uC774\uB984 \uB610\uB294 UUID").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (groupInput, _opts, cmd) => {
|
|
10914
11036
|
const opts = cmd.optsWithGlobals();
|
|
10915
11037
|
const input = requireResourceInput(groupInput, "IP ACL \uADF8\uB8F9");
|
|
10916
11038
|
const { client } = await resolveLoadBalancerClient(opts);
|
|
@@ -10943,7 +11065,7 @@ var getCommand10 = new import_commander55.Command("get").description("IP ACL \uA
|
|
|
10943
11065
|
ids: [group.id]
|
|
10944
11066
|
});
|
|
10945
11067
|
});
|
|
10946
|
-
var createCommand9 = new
|
|
11068
|
+
var createCommand9 = new import_commander57.Command("create").description("IP ACL \uADF8\uB8F9\uC744 \uC0DD\uC131\uD55C\uB2E4").requiredOption("--name <name>", "IP ACL \uADF8\uB8F9 \uC774\uB984").requiredOption("--action <ALLOW|DENY>", "IP \uC811\uADFC \uC81C\uC5B4 \uB3D9\uC791").option("--description <text>", "IP ACL \uADF8\uB8F9 \uC124\uBA85").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (_opts, cmd) => {
|
|
10947
11069
|
const opts = cmd.optsWithGlobals();
|
|
10948
11070
|
const parsedName = requireResourceInput(opts.name ?? "", "IP ACL \uADF8\uB8F9");
|
|
10949
11071
|
const parsedAction = parseIpAclAction(opts.action ?? "");
|
|
@@ -10974,7 +11096,7 @@ var createCommand9 = new import_commander55.Command("create").description("IP AC
|
|
|
10974
11096
|
ids: [group.id]
|
|
10975
11097
|
});
|
|
10976
11098
|
});
|
|
10977
|
-
var deleteCommand7 = new
|
|
11099
|
+
var deleteCommand7 = new import_commander57.Command("delete").description("IP ACL \uADF8\uB8F9\uACFC \uD558\uC704 \uB300\uC0C1\uC744 \uC0AD\uC81C\uD55C\uB2E4").argument("<group>", "IP ACL \uADF8\uB8F9 \uC774\uB984 \uB610\uB294 UUID").option("--yes", "\uC0AD\uC81C\uC640 \uC5F0\uACB0 \uADDC\uCE59 \uC81C\uAC70 \uD655\uC778").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (groupInput, _opts, cmd) => {
|
|
10978
11100
|
const opts = cmd.optsWithGlobals();
|
|
10979
11101
|
const confirmedYes = requireYes2(opts.yes, "IP ACL \uADF8\uB8F9 \uC0AD\uC81C");
|
|
10980
11102
|
const parsedGroup = requireResourceInput(groupInput, "IP ACL \uADF8\uB8F9");
|
|
@@ -11006,7 +11128,7 @@ var deleteCommand7 = new import_commander55.Command("delete").description("IP AC
|
|
|
11006
11128
|
ids: [groupId]
|
|
11007
11129
|
});
|
|
11008
11130
|
});
|
|
11009
|
-
var ipaclCommand = new
|
|
11131
|
+
var ipaclCommand = new import_commander57.Command("ipacl").description("IP ACL \uADF8\uB8F9\xB7\uB300\uC0C1 \uC870\uD68C");
|
|
11010
11132
|
ipaclCommand.addCommand(listCommand16);
|
|
11011
11133
|
ipaclCommand.addCommand(getCommand10);
|
|
11012
11134
|
ipaclCommand.addCommand(createCommand9);
|
|
@@ -11022,7 +11144,7 @@ function configureLoadBalancerHelp(command) {
|
|
|
11022
11144
|
}
|
|
11023
11145
|
|
|
11024
11146
|
// src/commands/loadbalancer/binding.ts
|
|
11025
|
-
var
|
|
11147
|
+
var import_commander58 = require("commander");
|
|
11026
11148
|
function bindingResult(operation, loadBalancerId, groupIds) {
|
|
11027
11149
|
return {
|
|
11028
11150
|
operation,
|
|
@@ -11044,7 +11166,7 @@ function outputBindingResult(opts, result) {
|
|
|
11044
11166
|
ids: [result.loadbalancer_id]
|
|
11045
11167
|
});
|
|
11046
11168
|
}
|
|
11047
|
-
var setIpAclCommand2 = new
|
|
11169
|
+
var setIpAclCommand2 = new import_commander58.Command("set-ipacl").description("Load Balancer\uC758 IP ACL \uADF8\uB8F9 \uC5F0\uACB0\uC744 \uC804\uCCB4 \uAD50\uCCB4\uD55C\uB2E4").argument("<loadbalancer>", "Load Balancer \uC774\uB984 \uB610\uB294 UUID").requiredOption(
|
|
11048
11170
|
"--group <group>",
|
|
11049
11171
|
"\uC801\uC6A9\uD560 IP ACL \uADF8\uB8F9 \uC774\uB984 \uB610\uB294 UUID (\uBC18\uBCF5 \uAC00\uB2A5)",
|
|
11050
11172
|
collectOption
|
|
@@ -11084,7 +11206,7 @@ var setIpAclCommand2 = new import_commander56.Command("set-ipacl").description("
|
|
|
11084
11206
|
bindingResult("loadbalancer-set-ipacl", loadBalancerId, groupIds)
|
|
11085
11207
|
);
|
|
11086
11208
|
});
|
|
11087
|
-
var clearIpAclCommand = new
|
|
11209
|
+
var clearIpAclCommand = new import_commander58.Command("clear-ipacl").description("Load Balancer\uC758 \uBAA8\uB4E0 IP ACL \uADF8\uB8F9 \uC5F0\uACB0\uC744 \uD574\uC81C\uD55C\uB2E4").argument("<loadbalancer>", "Load Balancer \uC774\uB984 \uB610\uB294 UUID").option("--yes", "\uBAA8\uB4E0 IP ACL \uC5F0\uACB0 \uD574\uC81C \uD655\uC778").option("--region <region>", "region override (\uAE30\uBCF8: iaas \uC790\uACA9\uC99D\uBA85\uC758 region)").option("--profile <name>", "\uC0AC\uC6A9\uD560 profile \uC774\uB984").action(async (loadBalancerInput, _opts, cmd) => {
|
|
11088
11210
|
const opts = cmd.optsWithGlobals();
|
|
11089
11211
|
const confirmedYes = requireYes2(opts.yes, "Load Balancer IP ACL \uC5F0\uACB0 \uD574\uC81C");
|
|
11090
11212
|
const parsedLoadBalancer = requireResourceInput(loadBalancerInput, "Load Balancer");
|
|
@@ -11109,15 +11231,16 @@ var clearIpAclCommand = new import_commander56.Command("clear-ipacl").descriptio
|
|
|
11109
11231
|
var rootAgentHints = `
|
|
11110
11232
|
Agent hints:
|
|
11111
11233
|
- Prefer --json for structured output.
|
|
11112
|
-
- Use --quiet only when the command documents
|
|
11234
|
+
- Use --quiet only when the command documents a one-line core value.
|
|
11113
11235
|
- Use --profile <name> to avoid relying on default profile.
|
|
11114
11236
|
- For IaaS/NKS commands, use --region <region> when region matters.
|
|
11115
11237
|
- Run "nhncloud commands --json" to inspect command paths and options.
|
|
11116
11238
|
`;
|
|
11117
11239
|
var logncrashAgentWorkflow = `
|
|
11118
11240
|
Agent workflow:
|
|
11119
|
-
1. nhncloud logncrash
|
|
11120
|
-
2. nhncloud logncrash
|
|
11241
|
+
1. nhncloud logncrash available-token --json
|
|
11242
|
+
2. nhncloud logncrash search --query '*' --from 1h --to now --json
|
|
11243
|
+
3. nhncloud logncrash export --query '<lucene>' --from 1h --to now --output logs.jsonl
|
|
11121
11244
|
`;
|
|
11122
11245
|
var deployAgentWorkflow = `
|
|
11123
11246
|
Agent workflow:
|
|
@@ -11172,8 +11295,8 @@ Agent workflow:
|
|
|
11172
11295
|
2. nhncloud ncs workload list --json
|
|
11173
11296
|
3. nhncloud ncs workload get <id> --json
|
|
11174
11297
|
`;
|
|
11175
|
-
var program = new
|
|
11176
|
-
program.name("nhncloud").description("NHN Cloud CLI \u2014 AI agent & terminal friendly").version("0.
|
|
11298
|
+
var program = new import_commander59.Command();
|
|
11299
|
+
program.name("nhncloud").description("NHN Cloud CLI \u2014 AI agent & terminal friendly").version("0.16.0").option("--json", "JSON \uD615\uC2DD\uC73C\uB85C \uCD9C\uB825").option("--quiet", "\uCD5C\uC18C \uCD9C\uB825 (\uC790\uB3D9\uD654\uC6A9)").option("--no-color", "\uC0C9\uC0C1 \uBE44\uD65C\uC131\uD654").option("--request-timeout <sec>", "HTTP \uC694\uCCAD \uD0C0\uC784\uC544\uC6C3 (\uCD08, \uAE30\uBCF8 30, \uBC94\uC704 1~3600). NHNCLOUD_REQUEST_TIMEOUT \uB85C\uB3C4 \uC9C0\uC815").addHelpText("after", rootAgentHints);
|
|
11177
11300
|
program.hook("preAction", () => {
|
|
11178
11301
|
const opts = program.opts();
|
|
11179
11302
|
const rawTimeout = opts.requestTimeout ?? process.env["NHNCLOUD_REQUEST_TIMEOUT"];
|
|
@@ -11194,12 +11317,13 @@ program.hook("preAction", () => {
|
|
|
11194
11317
|
}
|
|
11195
11318
|
});
|
|
11196
11319
|
program.addCommand(configureCommand);
|
|
11197
|
-
var logncrashCommand = new
|
|
11320
|
+
var logncrashCommand = new import_commander59.Command("logncrash").description("Log & Crash \uAD00\uB828 \uBA85\uB839").addHelpText("after", logncrashAgentWorkflow);
|
|
11321
|
+
logncrashCommand.addCommand(availableTokenCommand);
|
|
11198
11322
|
logncrashCommand.addCommand(searchCommand);
|
|
11199
11323
|
logncrashCommand.addCommand(sendCommand);
|
|
11200
11324
|
logncrashCommand.addCommand(exportCommand);
|
|
11201
11325
|
program.addCommand(logncrashCommand);
|
|
11202
|
-
var deployCommand2 = new
|
|
11326
|
+
var deployCommand2 = new import_commander59.Command("deploy").description("NHN Cloud Deploy \uAD00\uB828 \uBA85\uB839").addHelpText("after", deployAgentWorkflow);
|
|
11203
11327
|
deployCommand2.hook("preSubcommand", async () => {
|
|
11204
11328
|
await warnLegacyDeployTargets();
|
|
11205
11329
|
});
|
|
@@ -11212,7 +11336,7 @@ deployCommand2.addCommand(binariesCommand);
|
|
|
11212
11336
|
deployCommand2.addCommand(uploadCommand);
|
|
11213
11337
|
deployCommand2.addCommand(downloadCommand);
|
|
11214
11338
|
program.addCommand(deployCommand2);
|
|
11215
|
-
var instanceCommand = new
|
|
11339
|
+
var instanceCommand = new import_commander59.Command("instance").description("Compute \uC778\uC2A4\uD134\uC2A4 \uAD00\uB828 \uBA85\uB839").addHelpText("after", instanceAgentWorkflow);
|
|
11216
11340
|
instanceCommand.addCommand(listCommand);
|
|
11217
11341
|
instanceCommand.addCommand(flavorsCommand);
|
|
11218
11342
|
instanceCommand.addCommand(availabilityZonesCommand);
|
|
@@ -11231,23 +11355,23 @@ instanceCommand.addCommand(keypairCommand);
|
|
|
11231
11355
|
instanceCommand.addCommand(volumeCommand);
|
|
11232
11356
|
instanceCommand.addCommand(volumesCommand);
|
|
11233
11357
|
program.addCommand(instanceCommand);
|
|
11234
|
-
var networkCommand = new
|
|
11358
|
+
var networkCommand = new import_commander59.Command("network").description("VPC\xB7\uC11C\uBE0C\uB137 \uC870\uD68C").addHelpText("after", networkAgentWorkflow);
|
|
11235
11359
|
networkCommand.addCommand(listCommand3);
|
|
11236
11360
|
networkCommand.addCommand(subnetCommand);
|
|
11237
11361
|
program.addCommand(networkCommand);
|
|
11238
|
-
var volumeCommand2 = new
|
|
11362
|
+
var volumeCommand2 = new import_commander59.Command("volume").description("Block Storage \uBCFC\uB968 \uAD00\uB828 \uBA85\uB839").addHelpText("after", volumeAgentWorkflow);
|
|
11239
11363
|
volumeCommand2.addCommand(listCommand2);
|
|
11240
11364
|
volumeCommand2.addCommand(getCommand);
|
|
11241
11365
|
volumeCommand2.addCommand(createCommand);
|
|
11242
11366
|
program.addCommand(volumeCommand2);
|
|
11243
|
-
var floatingipCommand = new
|
|
11367
|
+
var floatingipCommand = new import_commander59.Command("floatingip").description(
|
|
11244
11368
|
"Floating IP(\uC778\uC2A4\uD134\uC2A4 \uACF5\uC778 IP) \uAD00\uB9AC"
|
|
11245
11369
|
).addHelpText("after", floatingIpAgentWorkflow);
|
|
11246
11370
|
floatingipCommand.addCommand(listCommand4);
|
|
11247
11371
|
floatingipCommand.addCommand(createCommand2);
|
|
11248
11372
|
floatingipCommand.addCommand(deleteCommand);
|
|
11249
11373
|
program.addCommand(floatingipCommand);
|
|
11250
|
-
var loadbalancerCommand = new
|
|
11374
|
+
var loadbalancerCommand = new import_commander59.Command("loadbalancer").description("Load Balancer\xB7IP ACL \uC870\uD68C\xB7\uAD00\uB9AC").addHelpText("after", loadbalancerAgentWorkflow);
|
|
11251
11375
|
loadbalancerCommand.addCommand(listCommand14);
|
|
11252
11376
|
loadbalancerCommand.addCommand(getCommand9);
|
|
11253
11377
|
loadbalancerCommand.addCommand(ipaclCommand);
|
|
@@ -11255,25 +11379,25 @@ loadbalancerCommand.addCommand(setIpAclCommand2);
|
|
|
11255
11379
|
loadbalancerCommand.addCommand(clearIpAclCommand);
|
|
11256
11380
|
configureLoadBalancerHelp(loadbalancerCommand);
|
|
11257
11381
|
program.addCommand(loadbalancerCommand);
|
|
11258
|
-
var ncrCommand = new
|
|
11382
|
+
var ncrCommand = new import_commander59.Command("ncr").description("NHN Container Registry \uAD00\uB828 \uBA85\uB839").addHelpText("after", ncrAgentWorkflow);
|
|
11259
11383
|
ncrCommand.addCommand(listCommand5);
|
|
11260
11384
|
ncrCommand.addCommand(getCommand3);
|
|
11261
11385
|
ncrCommand.addCommand(imagesCommand2);
|
|
11262
11386
|
ncrCommand.addCommand(tagsCommand);
|
|
11263
11387
|
program.addCommand(ncrCommand);
|
|
11264
|
-
var nksCommand = new
|
|
11388
|
+
var nksCommand = new import_commander59.Command("nks").description("NHN Kubernetes Service \uAD00\uB828 \uBA85\uB839").addHelpText("after", nksAgentWorkflow);
|
|
11265
11389
|
nksCommand.addCommand(supportsCommand);
|
|
11266
11390
|
nksCommand.addCommand(clusterCommand);
|
|
11267
11391
|
nksCommand.addCommand(nodegroupCommand);
|
|
11268
11392
|
nksCommand.addCommand(addonTypeCommand);
|
|
11269
11393
|
nksCommand.addCommand(addonCommand);
|
|
11270
11394
|
program.addCommand(nksCommand);
|
|
11271
|
-
var ncsCommand = new
|
|
11395
|
+
var ncsCommand = new import_commander59.Command("ncs").description("NHN Container Service \uAD00\uB828 \uBA85\uB839").addHelpText("after", ncsAgentWorkflow);
|
|
11272
11396
|
ncsCommand.addCommand(templateCommand);
|
|
11273
11397
|
ncsCommand.addCommand(workloadCommand);
|
|
11274
11398
|
ncsCommand.addCommand(malwareCommand);
|
|
11275
11399
|
program.addCommand(ncsCommand);
|
|
11276
|
-
var apiGatewayCommand = new
|
|
11400
|
+
var apiGatewayCommand = new import_commander59.Command("apigateway").description("NHN API Gateway \uC870\uD68C \uBA85\uB839");
|
|
11277
11401
|
apiGatewayCommand.addCommand(serviceCommand);
|
|
11278
11402
|
apiGatewayCommand.addCommand(resourceCommand);
|
|
11279
11403
|
apiGatewayCommand.addCommand(stageCommand);
|
|
@@ -11281,7 +11405,11 @@ program.addCommand(apiGatewayCommand);
|
|
|
11281
11405
|
program.addCommand(skillsCommand);
|
|
11282
11406
|
program.addCommand(doctorCommand);
|
|
11283
11407
|
program.addCommand(createCommandsCommand(program));
|
|
11408
|
+
configureCommanderExitCodes(program);
|
|
11284
11409
|
program.parseAsync().catch((err) => {
|
|
11410
|
+
if (err instanceof import_commander59.CommanderError) {
|
|
11411
|
+
process.exit(err.exitCode);
|
|
11412
|
+
}
|
|
11285
11413
|
const message = sanitizeMultilineForTerminal(
|
|
11286
11414
|
err instanceof Error ? err.message : String(err)
|
|
11287
11415
|
);
|