@gonvex/cli 0.1.32 → 0.3.1
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/README.md +30 -15
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +1 -1
- package/dist/browser.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +274 -555
- package/dist/index.js.map +1 -1
- package/dist/manifest-types.d.ts +261 -0
- package/dist/manifest-types.js +3 -0
- package/dist/manifest-types.js.map +1 -0
- package/dist/module-artifact.d.ts +26 -0
- package/dist/module-artifact.js +1585 -0
- package/dist/module-artifact.js.map +1 -0
- package/dist/react.d.ts +2 -2
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/dist/templates/vite-react/README.md +5 -2
- package/dist/templates/vite-react/gonvex/_build/module.js +407 -0
- package/dist/templates/vite-react/gonvex/_generated/api.ts +185 -3
- package/dist/templates/vite-react/gonvex/_generated/client.ts +1 -1
- package/dist/templates/vite-react/gonvex/_generated/{landlord → control-plane}/schema.ts +2 -1
- package/dist/templates/vite-react/gonvex/_generated/{landlord → control-plane}/tables.ts +1 -1
- package/dist/templates/vite-react/gonvex/_generated/manifest.json +201 -66
- package/dist/templates/vite-react/gonvex/_generated/module.json +120 -0
- package/dist/templates/vite-react/gonvex/_generated/react.ts +2 -2
- package/dist/templates/vite-react/gonvex/_generated/schema.ts +4 -34
- package/dist/templates/vite-react/gonvex/_generated/tenant/schema.ts +1 -30
- package/dist/templates/vite-react/gonvex/_generated/tenant/tables.ts +0 -30
- package/dist/templates/vite-react/gonvex/index.ts +1 -0
- package/dist/templates/vite-react/gonvex/messages.ts +47 -0
- package/dist/templates/vite-react/migrations/0001_messages.sql +9 -0
- package/dist/templates/vite-react/package.json +1 -0
- package/dist/templates/vite-react/src/App.tsx +5 -5
- package/package.json +4 -3
- package/dist/templates/vite-react/gonvex/messages.go +0 -38
- package/dist/templates/vite-react/gonvex/schema.go +0 -14
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
The Gonvex CLI for app-local development with the Gonvex runtime.
|
|
4
4
|
|
|
5
|
-
Gonvex gives you a Convex-style workflow with
|
|
6
|
-
TypeScript bindings, React hooks, realtime subscriptions,
|
|
7
|
-
backed by Postgres.
|
|
5
|
+
Gonvex gives you a Convex-style workflow with TypeScript backend functions,
|
|
6
|
+
generated TypeScript bindings, React hooks, realtime subscriptions,
|
|
7
|
+
and a local runtime backed by Postgres.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -60,10 +60,25 @@ frontend dev server:
|
|
|
60
60
|
npx gonvex dev -- vite
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
The manifest supports
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
The manifest supports exactly Queries, Reducers, and Actions as executable
|
|
64
|
+
application kinds. Structured Live Queries and bounded Replica Collections are
|
|
65
|
+
Query delivery modes. Live Query dependencies are derived from their plans;
|
|
66
|
+
declared write sets do not exist. TypeScript modules are bundled by the CLI into
|
|
67
|
+
one self-contained, platform-neutral ESM
|
|
68
|
+
module before upload. The default entrypoint search starts at `gonvex/index.ts`;
|
|
69
|
+
configure a different project-relative path with `module.entrypoint` in
|
|
70
|
+
`gonvex.json`:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"language": "typescript",
|
|
75
|
+
"module": { "entrypoint": "gonvex/index.ts" }
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Build output is written to `gonvex/_build/module.js` and is not watched as source.
|
|
80
|
+
Unresolved packages and Node built-in imports fail the build instead of becoming
|
|
81
|
+
runtime imports. Registered `app.Cron`, `app.CronExpr`,
|
|
67
82
|
`app.TenantCron`, and `app.TenantCronExpr` schedules are loaded from that
|
|
68
83
|
compiled app.
|
|
69
84
|
|
|
@@ -74,7 +89,7 @@ npx gonvex dev --once
|
|
|
74
89
|
```
|
|
75
90
|
|
|
76
91
|
By default, `gonvex dev` streams only runtime warnings and errors to the
|
|
77
|
-
terminal. To tail every
|
|
92
|
+
terminal. To tail every Query, Reducer, and Action:
|
|
78
93
|
|
|
79
94
|
```bash
|
|
80
95
|
npx gonvex dev --verbose-logs -- vite
|
|
@@ -90,20 +105,20 @@ npx gonvex env push .env.production
|
|
|
90
105
|
npx gonvex env remove NAME
|
|
91
106
|
```
|
|
92
107
|
|
|
93
|
-
Enable native
|
|
94
|
-
project:
|
|
108
|
+
Enable native authentication without Firebase or a browser provider SDK:
|
|
95
109
|
|
|
96
110
|
```bash
|
|
97
111
|
npx gonvex auth add google --origin http://localhost:5173
|
|
98
112
|
npx gonvex auth status
|
|
99
113
|
npx gonvex auth doctor
|
|
100
|
-
npx gonvex auth
|
|
114
|
+
npx gonvex auth accounts
|
|
101
115
|
```
|
|
102
116
|
|
|
103
117
|
The command registers the exact callback with the runtime and writes
|
|
104
|
-
`gonvex/auth.tsx`, which exports a configured provider
|
|
105
|
-
|
|
106
|
-
|
|
118
|
+
`gonvex/auth.tsx`, which exports a configured provider and hook. The hook exposes
|
|
119
|
+
password login plus explicit Google, Microsoft, and Apple selection. A Gonvex
|
|
120
|
+
operator stores provider credentials in the Control Plane. Client code receives
|
|
121
|
+
only public provider settings and `hasClientSecret` flags.
|
|
107
122
|
|
|
108
123
|
For a new app, provision and wire everything at once:
|
|
109
124
|
|
|
@@ -128,7 +143,7 @@ CLI sends the selected project key in both supported authentication headers, and
|
|
|
128
143
|
the runtime scopes that key to the exact project in the request. If environment
|
|
129
144
|
commands return `dashboard sign-in is required` while `gonvex dev --once` works,
|
|
130
145
|
upgrade and recreate the runtime; updating this npm package alone does not update
|
|
131
|
-
the deployed
|
|
146
|
+
the deployed Gonvex runtime.
|
|
132
147
|
|
|
133
148
|
## Runtime Settings
|
|
134
149
|
|
package/dist/browser.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { GonvexClient } from "@gonvex/client";
|
package/dist/browser.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { GonvexClient } from "@gonvex/client";
|
|
2
2
|
//# sourceMappingURL=browser.js.map
|
package/dist/browser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
export type * from "./manifest-types.js";
|
|
3
|
+
export type { ProjectLanguage } from "./module-artifact.js";
|
|
2
4
|
export declare function main(argv?: string[]): Promise<void>;
|
|
3
5
|
export declare function runCreate(argv: string[]): Promise<void>;
|
|
4
6
|
export declare function runAuth(argv: string[]): Promise<void>;
|