aranea-sdk-cli 0.3.7 → 0.3.8

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.
@@ -149,6 +149,7 @@ exports.knowledgeCommand
149
149
  .action(async (options) => {
150
150
  try {
151
151
  const env = (0, config_1.resolveEnvironment)(options.endpoint);
152
+ (0, config_1.checkStagingAvailability)(env, 'knowledge add --title <title> --category <cat>');
152
153
  (0, config_1.warnIfProduction)(env, 'knowledge add');
153
154
  console.log(chalk_1.default.bold(`\n=== Knowledge Add (${env}) ===\n`));
154
155
  // 認証トークン
@@ -234,6 +235,7 @@ exports.knowledgeCommand
234
235
  .action(async (options) => {
235
236
  try {
236
237
  const env = (0, config_1.resolveEnvironment)(options.endpoint);
238
+ (0, config_1.checkStagingAvailability)(env, 'knowledge search --query <query>');
237
239
  console.log(chalk_1.default.bold(`\n=== Knowledge Search (${env}) ===\n`));
238
240
  const token = options.token || await getAuthToken();
239
241
  if (!token) {
@@ -278,6 +280,7 @@ exports.knowledgeCommand
278
280
  .action(async (options) => {
279
281
  try {
280
282
  const env = (0, config_1.resolveEnvironment)(options.endpoint);
283
+ (0, config_1.checkStagingAvailability)(env, 'knowledge list');
281
284
  console.log(chalk_1.default.bold(`\n=== Knowledge List (${env}) ===\n`));
282
285
  const token = options.token || await getAuthToken();
283
286
  if (!token) {
@@ -320,6 +323,7 @@ exports.knowledgeCommand
320
323
  .action(async (options) => {
321
324
  try {
322
325
  const env = (0, config_1.resolveEnvironment)(options.endpoint);
326
+ (0, config_1.checkStagingAvailability)(env, 'knowledge get --id <id>');
323
327
  console.log(chalk_1.default.bold(`\n=== Knowledge Get (${env}) ===\n`));
324
328
  const token = options.token || await getAuthToken();
325
329
  if (!token) {
@@ -352,6 +356,7 @@ exports.knowledgeCommand
352
356
  .action(async (options) => {
353
357
  try {
354
358
  const env = (0, config_1.resolveEnvironment)(options.endpoint);
359
+ (0, config_1.checkStagingAvailability)(env, 'knowledge delete --id <id>');
355
360
  (0, config_1.warnIfProduction)(env, 'knowledge delete');
356
361
  console.log(chalk_1.default.bold(`\n=== Knowledge Delete (${env}) ===\n`));
357
362
  const token = options.token || await getAuthToken();
@@ -127,6 +127,7 @@ exports.metatronCommand
127
127
  .action(async (question, options) => {
128
128
  try {
129
129
  const env = (0, config_1.resolveEnvironment)(options.endpoint);
130
+ (0, config_1.checkStagingAvailability)(env, 'metatron ask "<question>"');
130
131
  if (!options.raw) {
131
132
  console.log(chalk_1.default.bold(`\n=== AraneaMetatron (${env}) ===\n`));
132
133
  console.log(chalk_1.default.gray(`Q: ${question}`));
@@ -160,6 +161,7 @@ exports.metatronCommand
160
161
  .option('-e, --endpoint <env>', '環境 (staging|production)', 'production')
161
162
  .action(async (options) => {
162
163
  const env = (0, config_1.resolveEnvironment)(options.endpoint);
164
+ (0, config_1.checkStagingAvailability)(env, 'metatron chat');
163
165
  console.log(chalk_1.default.bold(`\n=== AraneaMetatron Chat (${env}) ===\n`));
164
166
  console.log(chalk_1.default.gray('AraneaSDKについて質問してください。'));
165
167
  console.log(chalk_1.default.gray('終了するには "exit" または Ctrl+C を入力\n'));
@@ -165,6 +165,8 @@ exports.schemaCommand
165
165
  .option('-e, --endpoint <env>', 'Environment (staging|production)', 'staging')
166
166
  .action(async (options) => {
167
167
  const env = (0, config_1.resolveEnvironment)(options.endpoint);
168
+ // Check staging availability
169
+ (0, config_1.checkStagingAvailability)(env, 'schema list');
168
170
  const apiBase = getSchemaApiBase(env);
169
171
  const spinner = (0, ora_1.default)(`Fetching schema list from ${env}...`).start();
170
172
  try {
@@ -211,6 +213,8 @@ exports.schemaCommand
211
213
  .option('--json', 'Output as JSON')
212
214
  .action(async (options) => {
213
215
  const env = (0, config_1.resolveEnvironment)(options.endpoint);
216
+ // Check staging availability
217
+ (0, config_1.checkStagingAvailability)(env, 'schema get --type <type>');
214
218
  const apiBase = getSchemaApiBase(env);
215
219
  const spinner = (0, ora_1.default)(`Fetching schema for ${options.type} from ${env}...`).start();
216
220
  try {
@@ -358,6 +362,8 @@ exports.schemaCommand
358
362
  .option('-e, --endpoint <env>', 'Environment (staging|production)', 'staging')
359
363
  .action(async (options) => {
360
364
  const env = (0, config_1.resolveEnvironment)(options.endpoint);
365
+ // Check staging availability
366
+ (0, config_1.checkStagingAvailability)(env, 'schema validate --type <type> --file <file>');
361
367
  const apiBase = getSchemaApiBase(env);
362
368
  const spinner = (0, ora_1.default)('Validating...').start();
363
369
  try {
@@ -553,7 +559,7 @@ exports.schemaCommand
553
559
  .action(async (options) => {
554
560
  const env = (0, config_1.resolveEnvironment)(options.endpoint);
555
561
  // Check staging availability
556
- (0, config_1.checkStagingAvailability)(env, 'schema push --endpoint production');
562
+ (0, config_1.checkStagingAvailability)(env, 'schema push --file <file>');
557
563
  // Require --force for production
558
564
  if (!options.dryRun && !(0, config_1.requireProductionConfirmation)(env, 'schema push', options.force)) {
559
565
  process.exit(1);
@@ -688,6 +694,8 @@ exports.schemaCommand
688
694
  .option('-y, --confirm', 'Skip confirmation prompt')
689
695
  .action(async (options) => {
690
696
  const env = (0, config_1.resolveEnvironment)(options.endpoint);
697
+ // Check staging availability
698
+ (0, config_1.checkStagingAvailability)(env, 'schema promote --type <type>');
691
699
  const apiBase = getSchemaApiBase(env);
692
700
  // Always warn for promote
693
701
  console.log(chalk_1.default.yellow(`\nPromoting schema to PRODUCTION state in ${env} environment\n`));
@@ -794,6 +802,8 @@ exports.schemaCommand
794
802
  .option('--json', 'Output as JSON')
795
803
  .action(async (options) => {
796
804
  const env = (0, config_1.resolveEnvironment)(options.endpoint);
805
+ // Check staging availability
806
+ (0, config_1.checkStagingAvailability)(env, 'schema info --type <type>');
797
807
  const apiBase = getSchemaApiBase(env);
798
808
  const spinner = (0, ora_1.default)(`Fetching schema info: ${options.type} from ${env}...`).start();
799
809
  try {
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.7');
31
+ .version('0.3.8');
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.7",
3
+ "version": "0.3.8",
4
4
  "description": "AraneaSDK CLI - ESP32 IoTデバイス開発支援ツール",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",