@lukoweb/apitogo 0.1.116 → 0.1.118

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.
Files changed (2) hide show
  1. package/dist/cli/cli.js +49 -8
  2. package/package.json +1 -1
package/dist/cli/cli.js CHANGED
@@ -5471,7 +5471,8 @@ function printWarningToConsole(message) {
5471
5471
  console.error(message);
5472
5472
  }
5473
5473
  async function printCriticalFailureToConsoleAndExit(message) {
5474
- console.error(colors.bold(colors.red(message)));
5474
+ const text = typeof message === "string" && message.trim() === "" ? "Command failed with no further details." : message;
5475
+ console.error(colors.bold(colors.red(text)));
5475
5476
  await Sentry.close(MAX_WAIT_PENDING_TIME_MS).then(() => {
5476
5477
  process.exit(1);
5477
5478
  });
@@ -5801,7 +5802,7 @@ import {
5801
5802
  // package.json
5802
5803
  var package_default = {
5803
5804
  name: "@lukoweb/apitogo",
5804
- version: "0.1.116",
5805
+ version: "0.1.118",
5805
5806
  type: "module",
5806
5807
  sideEffects: [
5807
5808
  "**/*.css",
@@ -10844,7 +10845,7 @@ async function parseErrorResponse(response) {
10844
10845
  } catch {
10845
10846
  bodyText = bodyText ?? await response.text().catch(() => void 0);
10846
10847
  }
10847
- const message = (problem ? formatProblemDetails(problem) : void 0) ?? bodyText?.trim() ?? `HTTP ${response.status} ${response.statusText}`;
10848
+ const message = (problem ? formatProblemDetails(problem) : void 0) || bodyText?.trim() || `HTTP ${response.status} ${response.statusText}`;
10848
10849
  return new PlatformApiError(message, response.status, problem);
10849
10850
  }
10850
10851
 
@@ -13249,7 +13250,15 @@ async function checkPublishReadiness(client, _config, args) {
13249
13250
  // src/cli/check/handler.ts
13250
13251
  async function check(argv) {
13251
13252
  const sourceDirectory = path41.resolve(process.cwd(), argv.dir);
13252
- const config2 = loadConfig();
13253
+ let config2;
13254
+ try {
13255
+ config2 = loadConfig();
13256
+ } catch (error) {
13257
+ await printCriticalFailureToConsoleAndExit(
13258
+ error instanceof Error ? error.message : String(error)
13259
+ );
13260
+ return;
13261
+ }
13253
13262
  const client = new PlatformApiClient(config2);
13254
13263
  let result;
13255
13264
  try {
@@ -21396,7 +21405,15 @@ function resultLooksFailed(payload) {
21396
21405
  }
21397
21406
  async function apply(argv) {
21398
21407
  const sourceDirectory = path63.resolve(process.cwd(), argv.dir);
21399
- const config2 = loadConfig();
21408
+ let config2;
21409
+ try {
21410
+ config2 = loadConfig();
21411
+ } catch (error) {
21412
+ await printCriticalFailureToConsoleAndExit(
21413
+ error instanceof Error ? error.message : String(error)
21414
+ );
21415
+ return;
21416
+ }
21400
21417
  const client = new PlatformApiClient(config2);
21401
21418
  let only;
21402
21419
  const onlyRaw = normalizeOnly(argv.only);
@@ -22377,7 +22394,15 @@ async function createProject(argv) {
22377
22394
  return;
22378
22395
  }
22379
22396
  const modules = (argv.modules ?? "apihub").split(",").map((m) => m.trim()).filter(Boolean);
22380
- const config2 = loadConfig();
22397
+ let config2;
22398
+ try {
22399
+ config2 = loadConfig();
22400
+ } catch (error) {
22401
+ await printCriticalFailureToConsoleAndExit(
22402
+ error instanceof Error ? error.message : String(error)
22403
+ );
22404
+ return;
22405
+ }
22381
22406
  const client = new PlatformApiClient(config2);
22382
22407
  let result;
22383
22408
  try {
@@ -22837,7 +22862,15 @@ var run_default = {
22837
22862
  import path70 from "node:path";
22838
22863
  async function status(argv) {
22839
22864
  const sourceDirectory = path70.resolve(process.cwd(), argv.dir);
22840
- const config2 = loadConfig();
22865
+ let config2;
22866
+ try {
22867
+ config2 = loadConfig();
22868
+ } catch (error) {
22869
+ await printCriticalFailureToConsoleAndExit(
22870
+ error instanceof Error ? error.message : String(error)
22871
+ );
22872
+ return;
22873
+ }
22841
22874
  const client = new PlatformApiClient(config2);
22842
22875
  let whoamiJson;
22843
22876
  try {
@@ -22933,7 +22966,15 @@ async function teardown(argv) {
22933
22966
  return;
22934
22967
  }
22935
22968
  const sourceDirectory = path71.resolve(process.cwd(), argv.dir);
22936
- const config2 = loadConfig();
22969
+ let config2;
22970
+ try {
22971
+ config2 = loadConfig();
22972
+ } catch (error) {
22973
+ await printCriticalFailureToConsoleAndExit(
22974
+ error instanceof Error ? error.message : String(error)
22975
+ );
22976
+ return;
22977
+ }
22937
22978
  const client = new PlatformApiClient(config2);
22938
22979
  let projectId = argv.projectId?.trim();
22939
22980
  if (!projectId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukoweb/apitogo",
3
- "version": "0.1.116",
3
+ "version": "0.1.118",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "**/*.css",