aranea-sdk-cli 0.3.9 → 0.3.11

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.
@@ -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();
@@ -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
@@ -28,7 +28,7 @@ const program = new commander_1.Command();
28
28
  program
29
29
  .name('aranea-sdk')
30
30
  .description('AraneaSDK CLI - デバイス開発支援ツール')
31
- .version('0.3.9');
31
+ .version('0.3.10');
32
32
  // test コマンド
33
33
  program.addCommand(test_1.testCommand);
34
34
  // simulate コマンド
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aranea-sdk-cli",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "description": "AraneaSDK CLI - ESP32 IoTデバイス開発支援ツール",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",