ignotum 0.0.18 → 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.
Files changed (78) hide show
  1. package/README.md +73 -62
  2. package/dist/cli/Undici-C6Asbalt.mjs +30 -0
  3. package/dist/cli/Undici-C6Asbalt.mjs.map +1 -0
  4. package/dist/cli/bin.mjs +732 -24022
  5. package/dist/cli/bin.mjs.map +1 -1
  6. package/dist/platform/_headers +1 -1
  7. package/dist/platform/_ignotum/v1.1/client.js +12 -0
  8. package/dist/runtime/{api-BnUKx9cj-D49Tf0rX.d.ts → api-BnUKx9cj-K-F-SOLs.d.ts} +4 -4
  9. package/dist/runtime/{api-C-tltz6s.js → api-CrrSjYL1.js} +2 -2
  10. package/dist/runtime/{api-C-tltz6s.js.map → api-CrrSjYL1.js.map} +1 -1
  11. package/dist/runtime/{bootstrap-DlNIfH-r.js → bootstrap-CLVnD5vS.js} +4 -4
  12. package/dist/runtime/bootstrap-CLVnD5vS.js.map +1 -0
  13. package/dist/runtime/{bootstrap-DjTwGJao-DBx5zdFI.d.ts → bootstrap-DjTwGJao-DPi768T4.d.ts} +3 -3
  14. package/dist/runtime/client.d.ts +9 -9
  15. package/dist/runtime/client.js +4 -4
  16. package/dist/runtime/id-BPFV3D3V.d.ts +1 -0
  17. package/dist/runtime/{id-7an3nxTu-DZJSM5xh.d.ts → id-D87q-n2D-CDMwTSUR.d.ts} +2 -2
  18. package/dist/runtime/{id-BrEnxY-r.js → id-rzjaCxeF.js} +11 -2
  19. package/dist/runtime/{id-BrEnxY-r.js.map → id-rzjaCxeF.js.map} +1 -1
  20. package/dist/runtime/{index-Biaw5vdF.d.ts → index-BWHInzfU.d.ts} +3 -3
  21. package/dist/runtime/internal/api.d.ts +1 -1
  22. package/dist/runtime/internal/api.js +1 -1
  23. package/dist/runtime/internal/bootstrap.d.ts +1 -1
  24. package/dist/runtime/internal/bootstrap.js +1 -1
  25. package/dist/runtime/internal/client.d.ts +1 -1
  26. package/dist/runtime/internal/client.js +4 -4
  27. package/dist/runtime/internal/client.js.map +1 -1
  28. package/dist/runtime/internal/host.d.ts +6 -6
  29. package/dist/runtime/internal/host.js +3 -3
  30. package/dist/runtime/internal/routes.d.ts +1 -1
  31. package/dist/runtime/internal/server.d.ts +1 -1
  32. package/dist/runtime/internal/server.js +1 -1
  33. package/dist/runtime/internal/types.d.ts +2 -2
  34. package/dist/runtime/internal/types.js +1 -1
  35. package/dist/runtime/pagination-BPFV3D3V.d.ts +1 -0
  36. package/dist/runtime/{pagination--f4kMKf6.js → pagination-CfEleffG.js} +3 -2
  37. package/dist/runtime/pagination-CfEleffG.js.map +1 -0
  38. package/dist/runtime/result-Bq32FA7g.d.ts +1 -0
  39. package/dist/runtime/{router-C1eC9yy5.js → router-CfNPtoVO.js} +109 -60
  40. package/dist/runtime/router-CfNPtoVO.js.map +1 -0
  41. package/dist/runtime/{schema-BSjepoNF.js → schema-JtFb4BbG.js} +3 -3
  42. package/dist/runtime/{schema-BSjepoNF.js.map → schema-JtFb4BbG.js.map} +1 -1
  43. package/dist/runtime/server.d.ts +5 -5
  44. package/dist/runtime/server.js +2 -2
  45. package/dist/runtime/{sync-By2hX5ev.d.ts → sync-BMmV8oYt.d.ts} +2 -2
  46. package/dist/runtime/{sync-BwgS19Xy.js → sync-DUfp7S5R.js} +2 -2
  47. package/dist/runtime/{sync-BwgS19Xy.js.map → sync-DUfp7S5R.js.map} +1 -1
  48. package/dist/runtime/{types-DeCCyqLU-CHx7KFtx.d.ts → types-BeT6F0Pg-DMvRDN0c.d.ts} +5 -5
  49. package/package.json +9 -8
  50. package/src/cli/app-configuration.ts +44 -5
  51. package/src/cli/auth-client.ts +3 -3
  52. package/src/cli/build/managed-server.ts +3 -2
  53. package/src/cli/build/server.ts +2 -2
  54. package/src/cli/command.ts +18 -11
  55. package/src/cli/control-client.ts +2 -2
  56. package/src/cli/deploy.ts +27 -2
  57. package/src/cli/dev.ts +1 -1
  58. package/src/cli/managed-dev-platform.ts +13 -4
  59. package/src/cli/module-boundaries.ts +1 -1
  60. package/src/cli/new-app.ts +35 -6
  61. package/src/cli/package-manager.ts +1 -1
  62. package/src/cli/route-static.ts +7 -2
  63. package/src/cli/typecheck.ts +66 -0
  64. package/src/cli/upload-journal.ts +3 -3
  65. package/src/dev-runtime/database.ts +1 -1
  66. package/src/dev-runtime/files.ts +1 -1
  67. package/src/dev-runtime/managed-functions.ts +3 -2
  68. package/src/dev-runtime/managed-sync.ts +114 -105
  69. package/src/dev-runtime/managed-websocket.ts +11 -7
  70. package/src/dev-runtime/migrations.ts +2 -2
  71. package/src/dev-runtime/sync.ts +3 -3
  72. package/dist/platform/_ignotum/v1.0/client.js +0 -12
  73. package/dist/runtime/bootstrap-DlNIfH-r.js.map +0 -1
  74. package/dist/runtime/id-BI08JkmR.d.ts +0 -1
  75. package/dist/runtime/pagination--f4kMKf6.js.map +0 -1
  76. package/dist/runtime/pagination-BI08JkmR.d.ts +0 -1
  77. package/dist/runtime/result-BkziOG1L.d.ts +0 -1
  78. 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 a TypeScript application platform with a schema, server queries and mutations, and a
4
- browser client. Generated references carry function argument, result, and error types from the
5
- server to the client.
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
- Ignotum writes generated bindings to `_generated`. Read those files when investigating a type, but
31
- do not edit them.
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
- ## Build the client
95
+ ## Define a page
88
96
 
89
- `client/index.tsx` default-exports one `app` definition. Use generated references with the query and
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
- function App() {
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: App,
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`. Tailwind classes work without an app
132
- configuration file. Import any custom CSS from client code. An optional `client/icon.svg` becomes
133
- the favicon. Import images from client source.
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 | Purpose |
138
- | --------------------------------- | ------------------------------------------------------------------ |
139
- | `npx ignotum new <directory>` | Create an app, optionally initialize Git, and install dependencies |
140
- | `npx ignotum install` | Install with pnpm when available, otherwise npm |
141
- | `npx ignotum codegen` | Regenerate `_generated` without starting the dev server |
142
- | `npx ignotum dev` | Run the local app and watch client, schema, and function changes |
143
- | `npx ignotum dev db reset` | Delete local app data while the dev server is stopped |
144
- | `npx ignotum auth login` | Sign in to Ignotum with GitHub |
145
- | `npx ignotum auth logout` | Revoke and remove the saved login |
146
- | `npx ignotum auth status` | Show the current account and team |
147
- | `npx ignotum deploy --app <slug>` | Link the app, then build and activate its first version |
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 `app`, query and mutation hooks, `Query.skip`, client-side result
160
- matching, application file URLs, and the supported UI APIs and types.
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 and function references. Imports from
163
- `@/_generated/server.js` belong in server code. Imports from `@/_generated/api.js` belong in client
164
- code. Shared modules may be imported through `@/shared`.
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, application
169
- image files, typed environments, Ignotum ID authentication, local development, and hosted apps. It
170
- does not provide custom HTTP endpoints, actions, scheduled jobs, or workflows.
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 validators, indexes, pagination,
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"}