aranea-sdk-cli 0.3.9 → 0.3.10
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/commands/knowledge.js +5 -0
- package/dist/commands/schema.js +10 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -353,10 +353,15 @@ exports.knowledgeCommand
|
|
|
353
353
|
.option('--token <token>', '認証トークン')
|
|
354
354
|
.option('-e, --endpoint <env>', '環境 (staging|production)', 'production')
|
|
355
355
|
.option('-y, --yes', '確認をスキップ')
|
|
356
|
+
.option('--force', 'Force operation on production (required for production)')
|
|
356
357
|
.action(async (options) => {
|
|
357
358
|
try {
|
|
358
359
|
const env = (0, config_1.resolveEnvironment)(options.endpoint);
|
|
359
360
|
(0, config_1.checkStagingAvailability)(env, 'knowledge delete --id <id>');
|
|
361
|
+
// Require --force for production
|
|
362
|
+
if (!(0, config_1.requireProductionConfirmation)(env, 'knowledge delete --id <id>', options.force)) {
|
|
363
|
+
process.exit(1);
|
|
364
|
+
}
|
|
360
365
|
(0, config_1.warnIfProduction)(env, 'knowledge delete');
|
|
361
366
|
console.log(chalk_1.default.bold(`\n=== Knowledge Delete (${env}) ===\n`));
|
|
362
367
|
const token = options.token || await getAuthToken();
|
package/dist/commands/schema.js
CHANGED
|
@@ -692,10 +692,15 @@ exports.schemaCommand
|
|
|
692
692
|
.option('-e, --endpoint <env>', 'Environment (staging|production)', 'staging')
|
|
693
693
|
.option('-d, --dry-run', 'Show what would be promoted without actually promoting')
|
|
694
694
|
.option('-y, --confirm', 'Skip confirmation prompt')
|
|
695
|
+
.option('--force', 'Force operation on production (required for production)')
|
|
695
696
|
.action(async (options) => {
|
|
696
697
|
const env = (0, config_1.resolveEnvironment)(options.endpoint);
|
|
697
698
|
// Check staging availability
|
|
698
699
|
(0, config_1.checkStagingAvailability)(env, 'schema promote --type <type>');
|
|
700
|
+
// Require --force for production
|
|
701
|
+
if (!options.dryRun && !(0, config_1.requireProductionConfirmation)(env, 'schema promote --type <type>', options.force)) {
|
|
702
|
+
process.exit(1);
|
|
703
|
+
}
|
|
699
704
|
const apiBase = getSchemaApiBase(env);
|
|
700
705
|
// Always warn for promote
|
|
701
706
|
console.log(chalk_1.default.yellow(`\nPromoting schema to PRODUCTION state in ${env} environment\n`));
|
|
@@ -963,10 +968,15 @@ exports.schemaCommand
|
|
|
963
968
|
.option('-e, --endpoint <env>', 'Environment (staging|production)', 'staging')
|
|
964
969
|
.option('-d, --dry-run', 'Show what would be rolled back without actually doing it')
|
|
965
970
|
.option('-y, --confirm', 'Skip confirmation prompt')
|
|
971
|
+
.option('--force', 'Force operation on production (required for production)')
|
|
966
972
|
.action(async (options) => {
|
|
967
973
|
const env = (0, config_1.resolveEnvironment)(options.endpoint);
|
|
968
974
|
// Check staging availability
|
|
969
975
|
(0, config_1.checkStagingAvailability)(env, 'schema rollback --type <type> --version <v>');
|
|
976
|
+
// Require --force for production
|
|
977
|
+
if (!options.dryRun && !(0, config_1.requireProductionConfirmation)(env, 'schema rollback --type <type> --version <v>', options.force)) {
|
|
978
|
+
process.exit(1);
|
|
979
|
+
}
|
|
970
980
|
const apiBase = getSchemaApiBase(env);
|
|
971
981
|
console.log(chalk_1.default.yellow(`\n⚠️ Schema Rollback (${env})\n`));
|
|
972
982
|
const spinner = (0, ora_1.default)(`Fetching schema info: ${options.type}...`).start();
|
package/dist/index.js
CHANGED