wawesome 0.0.6 → 0.0.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.
Files changed (3) hide show
  1. package/README.md +35 -0
  2. package/dist/index.mjs +1125 -335
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -41,6 +41,39 @@ them (no leading or trailing hyphen, 63 characters at most). Type something else
41
41
  and the CLI shows you the slug it would become (`my-client`) and asks again, rather than rewriting
42
42
  your answer behind your back.
43
43
 
44
+ #### Starting from a template
45
+
46
+ `npx wawesome templates` lists what is available; `--template` starts from one:
47
+
48
+ ```bash
49
+ mkdir acme-store && cd acme-store
50
+ npx wawesome init --template stripe-webhook
51
+ ```
52
+
53
+ This goes from nothing to a deployed Function in one command. The template is downloaded over
54
+ plain HTTP and unpacked — **git is not required**, on any platform — and its files land exactly as
55
+ they are published. Only the `name` in `package.json`, the App and Function names in
56
+ `wawesome-function.json`, and the `wawesome` dependency are touched — the last so the project you
57
+ get depends on the CLI that scaffolded it rather than the one the template was released against.
58
+
59
+ Templates declare what they need rather than shipping placeholders, so the CLI then asks for each
60
+ environment variable the template requires — showing where in the provider's own dashboard to find
61
+ the value — stores them (secrets write-only), enables any outbound providers the template calls,
62
+ and deploys. If a value does not exist yet, leave it blank; the CLI tells you the `env set` command
63
+ to run once it does.
64
+
65
+ Dependencies are installed for you (with whatever package manager launched the CLI — `npx`, `pnpm
66
+ dlx`, `bun x`), so the types are there when you open the project and the bundler can resolve the
67
+ template's imports. Pass `--no-install` to do it yourself. A failed install never stops the flow;
68
+ the command to re-run is printed.
69
+
70
+ Being logged in is checked **before** the first question, not at the deploy: an expired session
71
+ offers you a login there and then, and declining still leaves you the project plus the two commands
72
+ that finish it.
73
+
74
+ Run it in an empty directory: if any file would be overwritten, nothing is written at all and the
75
+ collision is named.
76
+
44
77
  ### 4. Build & Deploy
45
78
 
46
79
  Deploy your serverless function to Wawesome Cloud instantly:
@@ -58,7 +91,9 @@ npx wawesome deploy
58
91
  | `npx wawesome login` | Authenticate CLI with your Wawesome account via browser |
59
92
  | `npx wawesome logout` | Log out and clear saved credentials from your machine |
60
93
  | `npx wawesome whoami` | View current logged-in user, workspace, and gateway info |
94
+ | `npx wawesome templates` | Browse the template catalog (no login required) |
61
95
  | `npx wawesome init` | Scaffold a new serverless function project in the current directory |
96
+ | `npx wawesome init --template <name>` | Scaffold from a catalog template, wire up what it needs, and deploy |
62
97
  | `npx wawesome build` | Bundle TypeScript entry code into an optimized JS bundle |
63
98
  | `npx wawesome deploy` | Build, upload, and promote a function version to production |
64
99
  | `npx wawesome logs [func]` | List recent past invocations for a function |