@01.software/cli 0.7.1 → 0.9.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
@@ -241,7 +241,7 @@ var CLI_I18N_KO = {
241
241
  PassApiKey: "`--api-key <token>` \uC635\uC158\uC744 \uC804\uB2EC\uD558\uAC70\uB098,",
242
242
  SetEnvVars: "`SOFTWARE_PUBLISHABLE_KEY` / `SOFTWARE_SECRET_KEY` \uD658\uACBD \uBCC0\uC218\uB97C \uC124\uC815\uD558\uC138\uC694.",
243
243
  InvalidApiKeyFormat: "API \uD0A4 \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. `sk01_` \uB610\uB294 `pat01_` \uD1A0\uD070\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.",
244
- LegacyHexCredentialsRejected: "\uB808\uAC70\uC2DC hex \uC790\uACA9 \uC99D\uBA85\uC740 \uB354 \uC774\uC0C1 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 `01 login`\uC73C\uB85C \uB2E4\uC2DC \uC778\uC99D\uD558\uC138\uC694.",
244
+ RetiredHexCredentialsRejected: "\uC774\uC804 hex \uC790\uACA9 \uC99D\uBA85\uC740 \uB354 \uC774\uC0C1 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 `01 login`\uC73C\uB85C \uB2E4\uC2DC \uC778\uC99D\uD558\uC138\uC694.",
245
245
  InvalidJsonObject: "`--{{label}}` \uC778\uC790\uB294 JSON \uAC1D\uCCB4\uC5EC\uC57C \uD569\uB2C8\uB2E4.",
246
246
  InvalidJsonArray: "`--{{label}}` \uC778\uC790\uB294 JSON \uBC30\uC5F4\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.",
247
247
  InvalidJsonValue: "`--{{label}}` \uC778\uC790\uC758 JSON \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4: {{value}}",
@@ -273,7 +273,7 @@ var CLI_I18N_EN = {
273
273
  PassApiKey: "pass `--api-key <token>`, or",
274
274
  SetEnvVars: "set `SOFTWARE_PUBLISHABLE_KEY` and `SOFTWARE_SECRET_KEY` environment variables.",
275
275
  InvalidApiKeyFormat: "Invalid API key format. Expected `sk01_` or `pat01_` token.",
276
- LegacyHexCredentialsRejected: "Legacy hex credentials are no longer accepted \u2014 run `01 login` to re-authenticate.",
276
+ RetiredHexCredentialsRejected: "Retired hex credentials are no longer accepted \u2014 run `01 login` to re-authenticate.",
277
277
  InvalidJsonObject: "--{{label}} must be a JSON object.",
278
278
  InvalidJsonArray: "--{{label}} must be a JSON array.",
279
279
  InvalidJsonValue: "Invalid JSON for --{{label}}: {{value}}",
@@ -443,13 +443,11 @@ function isValidBearerToken(secret) {
443
443
  function resolveClient(apiKeyFlag) {
444
444
  let publishableKey = process.env.SOFTWARE_PUBLISHABLE_KEY;
445
445
  let secretKey = apiKeyFlag ?? process.env.SOFTWARE_SECRET_KEY;
446
- let tenantId;
447
446
  if (!publishableKey || !secretKey) {
448
447
  const local = loadLocalCredentials();
449
448
  if (local) {
450
449
  publishableKey = publishableKey ?? local.publishableKey;
451
450
  secretKey = secretKey ?? local.secretKey;
452
- tenantId = tenantId ?? local.tenantId;
453
451
  }
454
452
  }
455
453
  if (!publishableKey || !secretKey) {
@@ -457,7 +455,6 @@ function resolveClient(apiKeyFlag) {
457
455
  if (stored) {
458
456
  publishableKey = publishableKey ?? stored.publishableKey;
459
457
  secretKey = secretKey ?? stored.secretKey;
460
- tenantId = tenantId ?? stored.tenantId;
461
458
  }
462
459
  }
463
460
  if (!publishableKey || !secretKey) {
@@ -480,19 +477,18 @@ function resolveClient(apiKeyFlag) {
480
477
  code: "credential_invalid",
481
478
  detail: {
482
479
  message: t("InvalidApiKeyFormat"),
483
- suggestion: t("LegacyHexCredentialsRejected")
480
+ suggestion: t("RetiredHexCredentialsRejected")
484
481
  }
485
482
  });
486
483
  }
487
- const serverOptions = { publishableKey, secretKey, tenantId };
484
+ const serverOptions = { publishableKey, secretKey };
488
485
  return {
489
486
  collections: new CollectionClient(
490
487
  publishableKey,
491
488
  secretKey,
492
489
  void 0,
493
490
  void 0,
494
- void 0,
495
- tenantId
491
+ void 0
496
492
  ),
497
493
  commerce: new ServerCommerceClient(serverOptions),
498
494
  publishableKey,