wawesome 0.24.0 → 0.25.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.
Files changed (2) hide show
  1. package/dist/index.mjs +8 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -687,7 +687,7 @@ async function buildHandler(entryInput, config, options) {
687
687
  * that has to name this version — `--version`, the dependency a scaffolded
688
688
  * project pins — reads it here, so a release bumps one file.
689
689
  */
690
- const CLI_VERSION = "0.24.0";
690
+ const CLI_VERSION = "0.25.0";
691
691
  //#endregion
692
692
  //#region src/cli-login.ts
693
693
  const START_PATH = "/v1/cli/login/start";
@@ -2985,6 +2985,10 @@ function reportPublishRefusal(message) {
2985
2985
  console.error("[wawesome] Re-run with \x1B[36mwawesome deploy --publish\x1B[0m to publish it, or put");
2986
2986
  console.error("[wawesome] \x1B[36m\"visibility\": \"private\"\x1B[0m back in wawesome-function.json.\n");
2987
2987
  }
2988
+ function reportAlreadyLive(message) {
2989
+ console.log(`[wawesome] ${message}`);
2990
+ process.exit(0);
2991
+ }
2988
2992
  /**
2989
2993
  * Deploy a function: build → upload JS to gateway → promote.
2990
2994
  */
@@ -3105,6 +3109,7 @@ async function deploy(entryInput, options) {
3105
3109
  console.error(`\n[wawesome] \x1b[31mError: ${refusal.message}\x1b[0m`);
3106
3110
  console.error(`[wawesome] ${planLimitAdvice(refusal.reason)}\n`);
3107
3111
  } else if (uploadRes.status === 409) {
3112
+ if (refusal.reason === "already-live") reportAlreadyLive(refusal.message);
3108
3113
  if (refusal.reason === "publish-needs-confirmation") {
3109
3114
  reportPublishRefusal(refusal.message);
3110
3115
  process.exit(1);
@@ -3265,12 +3270,13 @@ async function uploadAssets(creds, app, funcName, bundle, { assets, privateFiles
3265
3270
  return;
3266
3271
  }
3267
3272
  const refusal = rejectionOf(errorBody, manifestRes.status, "This deploy is already deployed.");
3273
+ if (refusal.reason === "already-live") reportAlreadyLive(refusal.message);
3268
3274
  if (refusal.reason === "publish-needs-confirmation") {
3269
3275
  reportPublishRefusal(refusal.message);
3270
3276
  process.exit(1);
3271
3277
  }
3272
3278
  console.error(`\n[wawesome] \x1b[31mError: ${refusal.message}\x1b[0m`);
3273
- console.error("[wawesome] Nothing changed since the last deploy, so nothing was uploaded.\n");
3279
+ console.error("[wawesome] Nothing was uploaded.\n");
3274
3280
  } else {
3275
3281
  const refusal = rejectionOf(errorBody, manifestRes.status, `Asset manifest failed (HTTP ${manifestRes.status}).`);
3276
3282
  console.error(`[wawesome] Error: ${refusal.message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wawesome",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "CLI tool for building and deploying serverless functions on wawesome.io platform",
5
5
  "license": "MIT",
6
6
  "type": "module",