ignotum 0.0.17 → 0.0.19
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 +73 -62
- package/dist/cli/Undici-C6Asbalt.mjs +30 -0
- package/dist/cli/Undici-C6Asbalt.mjs.map +1 -0
- package/dist/cli/bin.mjs +739 -24023
- package/dist/cli/bin.mjs.map +1 -1
- package/dist/platform/_headers +1 -1
- package/dist/platform/_ignotum/v1.1/client.js +12 -0
- package/dist/runtime/{api-BnUKx9cj-D49Tf0rX.d.ts → api-BnUKx9cj-K-F-SOLs.d.ts} +4 -4
- package/dist/runtime/{api-C-tltz6s.js → api-CrrSjYL1.js} +2 -2
- package/dist/runtime/{api-C-tltz6s.js.map → api-CrrSjYL1.js.map} +1 -1
- package/dist/runtime/{bootstrap-DlNIfH-r.js → bootstrap-CLVnD5vS.js} +4 -4
- package/dist/runtime/bootstrap-CLVnD5vS.js.map +1 -0
- package/dist/runtime/{bootstrap-DjTwGJao-DBx5zdFI.d.ts → bootstrap-DjTwGJao-DPi768T4.d.ts} +3 -3
- package/dist/runtime/client.d.ts +9 -9
- package/dist/runtime/client.js +4 -4
- package/dist/runtime/id-BPFV3D3V.d.ts +1 -0
- package/dist/runtime/{id-7an3nxTu-DZJSM5xh.d.ts → id-D87q-n2D-CDMwTSUR.d.ts} +2 -2
- package/dist/runtime/{id-BrEnxY-r.js → id-rzjaCxeF.js} +11 -2
- package/dist/runtime/{id-BrEnxY-r.js.map → id-rzjaCxeF.js.map} +1 -1
- package/dist/runtime/{index-Biaw5vdF.d.ts → index-BWHInzfU.d.ts} +3 -3
- package/dist/runtime/internal/api.d.ts +1 -1
- package/dist/runtime/internal/api.js +1 -1
- package/dist/runtime/internal/bootstrap.d.ts +1 -1
- package/dist/runtime/internal/bootstrap.js +1 -1
- package/dist/runtime/internal/client.d.ts +1 -1
- package/dist/runtime/internal/client.js +4 -4
- package/dist/runtime/internal/client.js.map +1 -1
- package/dist/runtime/internal/host.d.ts +6 -6
- package/dist/runtime/internal/host.js +3 -3
- package/dist/runtime/internal/routes.d.ts +1 -1
- package/dist/runtime/internal/server.d.ts +1 -1
- package/dist/runtime/internal/server.js +1 -1
- package/dist/runtime/internal/types.d.ts +2 -2
- package/dist/runtime/internal/types.js +1 -1
- package/dist/runtime/pagination-BPFV3D3V.d.ts +1 -0
- package/dist/runtime/{pagination--f4kMKf6.js → pagination-CfEleffG.js} +3 -2
- package/dist/runtime/pagination-CfEleffG.js.map +1 -0
- package/dist/runtime/result-Bq32FA7g.d.ts +1 -0
- package/dist/runtime/{router-C1eC9yy5.js → router-CfNPtoVO.js} +109 -60
- package/dist/runtime/router-CfNPtoVO.js.map +1 -0
- package/dist/runtime/{schema-BSjepoNF.js → schema-JtFb4BbG.js} +3 -3
- package/dist/runtime/{schema-BSjepoNF.js.map → schema-JtFb4BbG.js.map} +1 -1
- package/dist/runtime/server.d.ts +5 -5
- package/dist/runtime/server.js +2 -2
- package/dist/runtime/{sync-By2hX5ev.d.ts → sync-BMmV8oYt.d.ts} +2 -2
- package/dist/runtime/{sync-BwgS19Xy.js → sync-DUfp7S5R.js} +2 -2
- package/dist/runtime/{sync-BwgS19Xy.js.map → sync-DUfp7S5R.js.map} +1 -1
- package/dist/runtime/{types-DeCCyqLU-CHx7KFtx.d.ts → types-BeT6F0Pg-DMvRDN0c.d.ts} +5 -5
- package/package.json +10 -9
- package/src/cli/app-configuration.ts +44 -5
- package/src/cli/auth-client.ts +3 -3
- package/src/cli/build/managed-server.ts +3 -2
- package/src/cli/build/server.ts +2 -2
- package/src/cli/command.ts +19 -11
- package/src/cli/control-client.ts +2 -2
- package/src/cli/deploy.ts +27 -2
- package/src/cli/dev.ts +1 -1
- package/src/cli/managed-dev-platform.ts +13 -4
- package/src/cli/module-boundaries.ts +1 -1
- package/src/cli/new-app.ts +35 -6
- package/src/cli/package-manager.ts +1 -1
- package/src/cli/path.ts +11 -0
- package/src/cli/route-codegen.ts +2 -1
- package/src/cli/route-static.ts +10 -4
- package/src/cli/typecheck.ts +66 -0
- package/src/cli/upload-journal.ts +3 -3
- package/src/dev-runtime/database.ts +1 -1
- package/src/dev-runtime/files.ts +1 -1
- package/src/dev-runtime/managed-functions.ts +3 -2
- package/src/dev-runtime/managed-sync.ts +114 -105
- package/src/dev-runtime/managed-websocket.ts +11 -7
- package/src/dev-runtime/migrations.ts +2 -2
- package/src/dev-runtime/sync.ts +3 -3
- package/dist/platform/_ignotum/v1.0/client.js +0 -12
- package/dist/runtime/bootstrap-DlNIfH-r.js.map +0 -1
- package/dist/runtime/id-BI08JkmR.d.ts +0 -1
- package/dist/runtime/pagination--f4kMKf6.js.map +0 -1
- package/dist/runtime/pagination-BI08JkmR.d.ts +0 -1
- package/dist/runtime/result-BkziOG1L.d.ts +0 -1
- package/dist/runtime/router-C1eC9yy5.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# Ignotum
|
|
2
2
|
|
|
3
|
-
Ignotum is
|
|
4
|
-
browser
|
|
5
|
-
|
|
3
|
+
Ignotum is an application cloud for TypeScript apps. An app defines its data, callable functions,
|
|
4
|
+
browser pages, and files in one project. Generated references carry function argument, result,
|
|
5
|
+
error, and route types into browser code.
|
|
6
|
+
|
|
7
|
+
Ignotum is currently in private alpha. APIs and hosted service behavior may change before public
|
|
8
|
+
availability.
|
|
6
9
|
|
|
7
10
|
The package requires Node.js 22.18 or newer.
|
|
8
11
|
|
|
@@ -18,17 +21,22 @@ Open `http://127.0.0.1:3210`. The generated counter app has this source layout:
|
|
|
18
21
|
|
|
19
22
|
```text
|
|
20
23
|
client/
|
|
24
|
+
+layout.tsx
|
|
21
25
|
index.tsx
|
|
26
|
+
about.tsx
|
|
22
27
|
icon.svg
|
|
28
|
+
styles.css
|
|
23
29
|
server/
|
|
24
30
|
counter.ts
|
|
25
31
|
schema.ts
|
|
26
32
|
shared/
|
|
27
33
|
utils.ts
|
|
34
|
+
_generated/
|
|
28
35
|
```
|
|
29
36
|
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
Page file names determine their URLs. `client/index.tsx` defines `/`, `client/about.tsx` defines
|
|
38
|
+
`/about`, and `client/+layout.tsx` shares navigation, providers, metadata, and styles. Ignotum owns
|
|
39
|
+
the files under `_generated`; read them when investigating a type, but do not edit them.
|
|
32
40
|
|
|
33
41
|
## Define the schema
|
|
34
42
|
|
|
@@ -84,43 +92,41 @@ Typed server-only configuration can be declared in `server/env.ts` with `defineE
|
|
|
84
92
|
the project-root `.env.ignotum`, and read through `ctx.env`. Use `values.secret()` for redacted
|
|
85
93
|
values and `Secret.value(...)` when a function deliberately needs the underlying value.
|
|
86
94
|
|
|
87
|
-
##
|
|
95
|
+
## Define a page
|
|
88
96
|
|
|
89
|
-
|
|
90
|
-
mutation hooks:
|
|
97
|
+
Each page default-exports a generated `route(...)` definition. Use generated function references
|
|
98
|
+
with the query and mutation hooks:
|
|
91
99
|
|
|
92
100
|
```tsx
|
|
93
|
-
import { app, Result, useMutation, useQuery } from "ignotum/client";
|
|
94
|
-
|
|
95
101
|
import { api } from "@/_generated/api.js";
|
|
102
|
+
import { route } from "@/_generated/client.js";
|
|
103
|
+
import { Result, useMutation, useQuery } from "ignotum/client";
|
|
96
104
|
|
|
97
|
-
|
|
98
|
-
const todos = useQuery(api.todos.list);
|
|
99
|
-
const create = useMutation(api.todos.create);
|
|
100
|
-
|
|
101
|
-
return (
|
|
102
|
-
<main class="mx-auto max-w-xl p-8">
|
|
103
|
-
<button type="button" onClick={() => void create({ text: "New todo" })}>
|
|
104
|
-
Add todo
|
|
105
|
-
</button>
|
|
106
|
-
|
|
107
|
-
{Result.match(todos, {
|
|
108
|
-
pending: () => <p>Loading...</p>,
|
|
109
|
-
value: (items) => (
|
|
110
|
-
<ul>
|
|
111
|
-
{items.map((todo) => (
|
|
112
|
-
<li key={todo.id}>{todo.text}</li>
|
|
113
|
-
))}
|
|
114
|
-
</ul>
|
|
115
|
-
),
|
|
116
|
-
})}
|
|
117
|
-
</main>
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export default app({
|
|
105
|
+
export default route({
|
|
122
106
|
title: "Todos",
|
|
123
|
-
component:
|
|
107
|
+
component: function TodosPage() {
|
|
108
|
+
const todos = useQuery(api.todos.list);
|
|
109
|
+
const create = useMutation(api.todos.create);
|
|
110
|
+
|
|
111
|
+
return (
|
|
112
|
+
<main class="mx-auto max-w-xl p-8">
|
|
113
|
+
<button type="button" onClick={() => void create({ text: "New todo" })}>
|
|
114
|
+
Add todo
|
|
115
|
+
</button>
|
|
116
|
+
|
|
117
|
+
{Result.match(todos, {
|
|
118
|
+
pending: () => <p>Loading...</p>,
|
|
119
|
+
value: (items) => (
|
|
120
|
+
<ul>
|
|
121
|
+
{items.map((todo) => (
|
|
122
|
+
<li key={todo.id}>{todo.text}</li>
|
|
123
|
+
))}
|
|
124
|
+
</ul>
|
|
125
|
+
),
|
|
126
|
+
})}
|
|
127
|
+
</main>
|
|
128
|
+
);
|
|
129
|
+
},
|
|
124
130
|
});
|
|
125
131
|
```
|
|
126
132
|
|
|
@@ -128,46 +134,51 @@ export default app({
|
|
|
128
134
|
a value or declared application error. `useMutation` returns a stable typed function. Its promise
|
|
129
135
|
settles after the mutation result arrives; affected queries may refresh afterward.
|
|
130
136
|
|
|
131
|
-
Import UI components, hooks, and types from `ignotum/client`.
|
|
132
|
-
|
|
133
|
-
|
|
137
|
+
Import UI components, hooks, and types from `ignotum/client`. Import `route`, `layout`, and URL
|
|
138
|
+
validators from `@/_generated/client.js`, and import typed destinations from
|
|
139
|
+
`@/_generated/routes.js`. Tailwind classes work without an app configuration file. Import custom
|
|
140
|
+
CSS and images from client code. An optional `client/icon.svg` becomes the favicon.
|
|
134
141
|
|
|
135
142
|
## Commands
|
|
136
143
|
|
|
137
|
-
| Command
|
|
138
|
-
|
|
|
139
|
-
| `npx ignotum new <directory>`
|
|
140
|
-
| `npx ignotum install`
|
|
141
|
-
| `npx ignotum codegen`
|
|
142
|
-
| `npx ignotum dev`
|
|
143
|
-
| `npx ignotum dev db reset`
|
|
144
|
-
| `npx ignotum auth login`
|
|
145
|
-
| `npx ignotum auth logout`
|
|
146
|
-
| `npx ignotum auth status`
|
|
147
|
-
| `npx ignotum deploy
|
|
144
|
+
| Command | Purpose |
|
|
145
|
+
| ----------------------------- | ------------------------------------------------------------------ |
|
|
146
|
+
| `npx ignotum new <directory>` | Create an app, optionally initialize Git, and install dependencies |
|
|
147
|
+
| `npx ignotum install` | Install with pnpm when available, otherwise npm |
|
|
148
|
+
| `npx ignotum codegen` | Regenerate `_generated` without starting the dev server |
|
|
149
|
+
| `npx ignotum dev` | Run the local app and watch client, schema, and function changes |
|
|
150
|
+
| `npx ignotum dev db reset` | Delete local app data while the dev server is stopped |
|
|
151
|
+
| `npx ignotum auth login` | Sign in to Ignotum with GitHub |
|
|
152
|
+
| `npx ignotum auth logout` | Revoke and remove the saved login |
|
|
153
|
+
| `npx ignotum auth status` | Show the current account and team |
|
|
154
|
+
| `npx ignotum deploy` | Link the app, then build and activate its first version |
|
|
148
155
|
|
|
149
156
|
Run `npx ignotum auth login` before deploying the first version. The CLI stores the login outside
|
|
150
157
|
the app directory. After deploying, it records the app link in `.ignotum/app.json`; later deploy
|
|
151
|
-
commands do not need `--app`.
|
|
158
|
+
commands do not need `--app`. The first deploy tries the name saved by `ignotum new` in
|
|
159
|
+
`ignotum.json`. Use `--app <slug>` to choose a different slug.
|
|
152
160
|
|
|
153
161
|
## Package entry points
|
|
154
162
|
|
|
155
|
-
Application code uses two entry points:
|
|
163
|
+
Application code uses two package entry points:
|
|
156
164
|
|
|
157
165
|
- `ignotum/server` exports `defineSchema`, `defineEnv`, `Secret`, the server form of `Result`, and
|
|
158
166
|
server authoring types.
|
|
159
|
-
- `ignotum/client` exports
|
|
160
|
-
matching, application file URLs, and the supported
|
|
167
|
+
- `ignotum/client` exports query and mutation hooks, navigation components and hooks, `Query.skip`,
|
|
168
|
+
client-side result matching, application file URLs, imported-image rendering, and the supported
|
|
169
|
+
Preact APIs and types.
|
|
161
170
|
|
|
162
|
-
Generated files provide schema-bound server builders
|
|
163
|
-
|
|
164
|
-
|
|
171
|
+
Generated files provide schema-bound server builders, function references, route definitions,
|
|
172
|
+
typed destinations, and data types. Imports from `@/_generated/server.js` belong in server code.
|
|
173
|
+
Imports from `@/_generated/api.js`, `@/_generated/client.js`, and `@/_generated/routes.js` belong in
|
|
174
|
+
client code. Shared modules may be imported through `@/shared`.
|
|
165
175
|
|
|
166
176
|
## Current scope
|
|
167
177
|
|
|
168
|
-
Ignotum currently supports schema-defined data, queries, mutations, live query results,
|
|
169
|
-
|
|
170
|
-
does not provide custom HTTP endpoints,
|
|
178
|
+
Ignotum currently supports schema-defined data, queries, mutations, live query results,
|
|
179
|
+
file-based pages and layouts, application files, imported images, typed environments, Ignotum ID
|
|
180
|
+
authentication, local development, and hosted apps. It does not provide custom HTTP endpoints,
|
|
181
|
+
actions, scheduled jobs, or workflows.
|
|
171
182
|
|
|
172
|
-
See the [Ignotum documentation](https://docs.ignotum.cloud) for
|
|
173
|
-
errors, consistency guarantees, hosted limits, and App Version behavior.
|
|
183
|
+
See the [Ignotum documentation](https://docs.ignotum.cloud) for routes, navigation, validators,
|
|
184
|
+
indexes, pagination, errors, consistency guarantees, hosted limits, and App Version behavior.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import Undici from "undici";
|
|
2
|
+
export * from "undici";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@effect+platform-node@4.0.0_effect@4.0.0_redis@6.2.1/node_modules/@effect/platform-node/dist/Undici.js
|
|
4
|
+
/**
|
|
5
|
+
* Re-export of the Undici HTTP client package used by the Node platform.
|
|
6
|
+
*
|
|
7
|
+
* This module gives Effect applications a package-local import for Undici
|
|
8
|
+
* primitives while working with `@effect/platform-node`. Import named Undici
|
|
9
|
+
* APIs from here when configuring Node HTTP client dispatchers, creating agents
|
|
10
|
+
* or mock agents, setting the process-global dispatcher, or sharing the same
|
|
11
|
+
* Undici types with integrations that use the platform HTTP client.
|
|
12
|
+
*
|
|
13
|
+
* The module does not wrap or reinterpret Undici behavior. It forwards the
|
|
14
|
+
* installed `undici` named exports and default export, so connection pooling,
|
|
15
|
+
* dispatcher lifetimes, mocking, aborts, and request options follow Undici's
|
|
16
|
+
* own semantics.
|
|
17
|
+
*
|
|
18
|
+
* @stability unstable
|
|
19
|
+
* @since 4.0.0
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* @stability unstable
|
|
23
|
+
* @category re-exports
|
|
24
|
+
* @since 4.0.0
|
|
25
|
+
*/
|
|
26
|
+
var Undici_default = Undici;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { Undici_default as default };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=Undici-C6Asbalt.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Undici-C6Asbalt.mjs","names":[],"sources":["../../../../node_modules/.pnpm/@effect+platform-node@4.0.0_effect@4.0.0_redis@6.2.1/node_modules/@effect/platform-node/dist/Undici.js"],"sourcesContent":["/**\n * Re-export of the Undici HTTP client package used by the Node platform.\n *\n * This module gives Effect applications a package-local import for Undici\n * primitives while working with `@effect/platform-node`. Import named Undici\n * APIs from here when configuring Node HTTP client dispatchers, creating agents\n * or mock agents, setting the process-global dispatcher, or sharing the same\n * Undici types with integrations that use the platform HTTP client.\n *\n * The module does not wrap or reinterpret Undici behavior. It forwards the\n * installed `undici` named exports and default export, so connection pooling,\n * dispatcher lifetimes, mocking, aborts, and request options follow Undici's\n * own semantics.\n *\n * @stability unstable\n * @since 4.0.0\n */\nimport Undici from \"undici\";\n/**\n * @stability unstable\n * @category re-exports\n * @since 4.0.0\n */\nexport * from \"undici\";\n/**\n * @stability unstable\n * @category re-exports\n * @since 4.0.0\n */\nexport default Undici;\n//# sourceMappingURL=Undici.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAA,iBAAe"}
|