ignotum 0.0.13 → 0.0.15

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 (131) hide show
  1. package/README.md +6 -6
  2. package/dist/cli/bin.mjs +6111 -4448
  3. package/dist/cli/bin.mjs.map +1 -1
  4. package/dist/cli/emscripten-module-D5GzfUNv.mjs +533 -0
  5. package/dist/cli/emscripten-module-D5GzfUNv.mjs.map +1 -0
  6. package/dist/cli/ffi-7IElU4Co.mjs +148 -0
  7. package/dist/cli/ffi-7IElU4Co.mjs.map +1 -0
  8. package/dist/cli/managed-release-WHYLZwaS.mjs +10902 -0
  9. package/dist/cli/managed-release-WHYLZwaS.mjs.map +1 -0
  10. package/dist/cli/managed-release.d.mts +1 -0
  11. package/dist/cli/managed-release.mjs +14 -0
  12. package/dist/cli/managed-release.mjs.map +1 -0
  13. package/dist/cli/module-ES6BEMUI-D36I4NVn.mjs +1289 -0
  14. package/dist/cli/module-ES6BEMUI-D36I4NVn.mjs.map +1 -0
  15. package/dist/runtime/{api-Cv3hMbzo.d.ts → api-B4fwp5a2.d.ts} +4 -4
  16. package/dist/runtime/bootstrap-BISQSn_O.js +916 -0
  17. package/dist/runtime/bootstrap-BISQSn_O.js.map +1 -0
  18. package/dist/runtime/bootstrap-BTFScKAc.d.ts +545 -0
  19. package/dist/runtime/client.d.ts +50 -15
  20. package/dist/runtime/client.js +7 -1138
  21. package/dist/runtime/client.js.map +1 -1
  22. package/dist/runtime/descriptor-CTY4mtwS-cS43EbwS.js +269 -0
  23. package/dist/runtime/descriptor-CTY4mtwS-cS43EbwS.js.map +1 -0
  24. package/dist/runtime/{id-Bt9XWRGL.js → id--1m0NuUL.js} +4 -4
  25. package/dist/runtime/id--1m0NuUL.js.map +1 -0
  26. package/dist/runtime/{id-BzFHf3Wo-DGPCjgrf.d.ts → id-7an3nxTu-DZJSM5xh.d.ts} +2 -2
  27. package/dist/runtime/id-CBOt2kDo.d.ts +1 -0
  28. package/dist/runtime/identity-QjtJRxBD.d.ts +2 -0
  29. package/dist/runtime/image-Djtjy4Z8.js +19 -0
  30. package/dist/runtime/image-Djtjy4Z8.js.map +1 -0
  31. package/dist/runtime/index-D4seNHlX.d.ts +184 -0
  32. package/dist/runtime/internal/api.d.ts +1 -1
  33. package/dist/runtime/internal/api.js +30 -1
  34. package/dist/runtime/internal/api.js.map +1 -0
  35. package/dist/runtime/internal/bootstrap.d.ts +2 -0
  36. package/dist/runtime/internal/bootstrap.js +2 -0
  37. package/dist/runtime/internal/client.d.ts +2 -0
  38. package/dist/runtime/internal/client.js +75 -0
  39. package/dist/runtime/internal/client.js.map +1 -0
  40. package/dist/runtime/internal/host.d.ts +25 -8
  41. package/dist/runtime/internal/host.js +27 -6
  42. package/dist/runtime/internal/host.js.map +1 -1
  43. package/dist/runtime/internal/routes.d.ts +2 -0
  44. package/dist/runtime/internal/routes.js +2 -0
  45. package/dist/runtime/internal/server.d.ts +1 -1
  46. package/dist/runtime/internal/server.js +1 -1
  47. package/dist/runtime/internal/types.d.ts +2 -1
  48. package/dist/runtime/internal/types.js +1 -1
  49. package/dist/runtime/pagination-CBOt2kDo.d.ts +1 -0
  50. package/dist/runtime/pagination-D3qd6s9N.js +33 -0
  51. package/dist/runtime/pagination-D3qd6s9N.js.map +1 -0
  52. package/dist/runtime/result-BkziOG1L.d.ts +1 -0
  53. package/dist/runtime/router-BSBI1oN1.js +2377 -0
  54. package/dist/runtime/router-BSBI1oN1.js.map +1 -0
  55. package/dist/runtime/routes-Ce8TVP-T.js +690 -0
  56. package/dist/runtime/routes-Ce8TVP-T.js.map +1 -0
  57. package/dist/runtime/{schema-1Zs03-iS.js → schema-D1wOqiNH.js} +40 -12
  58. package/dist/runtime/schema-D1wOqiNH.js.map +1 -0
  59. package/dist/runtime/server.d.ts +5 -5
  60. package/dist/runtime/server.js +2 -2
  61. package/dist/runtime/{sync-Bs8J3fIr.d.ts → sync-D-GK2sv9.d.ts} +3 -2
  62. package/dist/runtime/{api-CAgKDij7.js → sync-DzUwA8W9.js} +22 -41
  63. package/dist/runtime/sync-DzUwA8W9.js.map +1 -0
  64. package/dist/runtime/types-DeCCyqLU-BIm7rU-0.d.ts +341 -0
  65. package/package.json +29 -4
  66. package/src/cli/agent-files.ts +14 -8
  67. package/src/cli/build/managed-client.ts +411 -0
  68. package/src/cli/build/managed-server.ts +294 -0
  69. package/src/cli/build/managed.ts +67 -0
  70. package/src/cli/build/output.ts +47 -0
  71. package/src/cli/build/server.ts +51 -220
  72. package/src/cli/client-config.ts +1 -140
  73. package/src/cli/client-styles.ts +1 -0
  74. package/src/cli/codegen.ts +9 -4
  75. package/src/cli/command.ts +28 -5
  76. package/src/cli/control-client.ts +84 -101
  77. package/src/cli/deploy.ts +133 -177
  78. package/src/cli/dev.ts +506 -107
  79. package/src/cli/image-assets.ts +499 -0
  80. package/src/cli/managed-client-boundaries.ts +103 -0
  81. package/src/cli/managed-dev-platform.ts +118 -0
  82. package/src/cli/managed-exports.ts +219 -0
  83. package/src/cli/managed-release-bin.ts +13 -0
  84. package/src/cli/managed-release.ts +260 -0
  85. package/src/cli/module-boundaries.ts +11 -1
  86. package/src/cli/new-app.ts +111 -87
  87. package/src/cli/route-codegen.ts +311 -0
  88. package/src/cli/route-static.ts +710 -0
  89. package/src/client/bootstrap.ts +110 -0
  90. package/src/client/errors.ts +13 -7
  91. package/src/client/files.ts +64 -0
  92. package/src/client/id.ts +9 -5
  93. package/src/client/image.ts +28 -0
  94. package/src/client/index.ts +25 -2
  95. package/src/client/managed-client.ts +729 -0
  96. package/src/client/managed-upgrade.ts +283 -0
  97. package/src/client/recovery-journal.ts +195 -0
  98. package/src/client/route-boundaries.ts +184 -0
  99. package/src/client/router-history.ts +152 -0
  100. package/src/client/router-store.ts +644 -0
  101. package/src/client/router.ts +324 -0
  102. package/src/client/routes.ts +28 -0
  103. package/src/client/sync.ts +66 -592
  104. package/src/dev-runtime/database.ts +77 -2
  105. package/src/dev-runtime/functions.ts +3 -3
  106. package/src/dev-runtime/id.ts +19 -4
  107. package/src/dev-runtime/managed-functions.ts +255 -0
  108. package/src/dev-runtime/managed-sync.ts +263 -0
  109. package/src/dev-runtime/managed-websocket.ts +71 -0
  110. package/src/dev-runtime/migrations.ts +20 -0
  111. package/src/dev-runtime/sync.ts +236 -236
  112. package/src/image-assets.d.ts +36 -0
  113. package/src/internal/client.ts +186 -0
  114. package/src/internal/host.ts +1 -1
  115. package/src/internal/http-paths.ts +0 -3
  116. package/src/internal/routes.ts +45 -0
  117. package/dist/runtime/api-CAgKDij7.js.map +0 -1
  118. package/dist/runtime/descriptor-Cyo9FP9n-C0SRVXNW.js +0 -154
  119. package/dist/runtime/descriptor-Cyo9FP9n-C0SRVXNW.js.map +0 -1
  120. package/dist/runtime/id-Bt9XWRGL.js.map +0 -1
  121. package/dist/runtime/id-Dz0apuB3.d.ts +0 -1
  122. package/dist/runtime/index-D54flWtH.d.ts +0 -402
  123. package/dist/runtime/pagination-DnKg3dkI-r5ZUxBBx.d.ts +0 -112
  124. package/dist/runtime/pagination-Dz0apuB3.d.ts +0 -1
  125. package/dist/runtime/result-DKAA4gpS.d.ts +0 -1
  126. package/dist/runtime/schema-1Zs03-iS.js.map +0 -1
  127. package/src/cli/build/client.ts +0 -119
  128. package/src/cli/build/public.ts +0 -186
  129. package/src/cli/client-entry.ts +0 -152
  130. package/src/cli/client-plugin.ts +0 -136
  131. package/src/client/app.ts +0 -15
@@ -0,0 +1,341 @@
1
+ import { _ as fileFormats, c as Result$1, g as FileValue, p as FileFormat, r as ErrorBrand, t as GeneratedId } from "./id-7an3nxTu-DZJSM5xh.js";
2
+ import { Brand, Effect, Redacted, Schema, Struct } from "effect";
3
+ //#region ../contracts/dist/descriptor-DUgW3hSe.d.ts
4
+ //#region src/schema/evolution.d.ts
5
+ type Defaulted<Value extends Schema.Constraint> = Omit<Value, "~type.constructor.default"> & {
6
+ readonly "~type.constructor.default": "with-default";
7
+ };
8
+ interface ValueEvolution<Value extends Schema.Constraint> {
9
+ default(value: Value["Type"]): DescribedValue<Defaulted<Value>>;
10
+ renameFrom(name: string): DescribedValue<Value>;
11
+ from<Previous extends DescribedValue>(previous: Previous, convert: (value: Previous["Type"]) => Value["Type"]): DescribedValue<Value>;
12
+ }
13
+ //#endregion
14
+ //#region src/schema/descriptor.d.ts
15
+ interface DescriptorField {
16
+ readonly name: string;
17
+ readonly value: ValueDescriptor;
18
+ }
19
+ type ValueDescriptor = {
20
+ readonly type: "array";
21
+ readonly value: ValueDescriptor;
22
+ } | {
23
+ readonly type: "boolean";
24
+ } | {
25
+ readonly type: "date";
26
+ } | {
27
+ readonly type: "file";
28
+ readonly formats: ReadonlyArray<"jpeg" | "png" | "webp" | "avif" | "gif">;
29
+ readonly maxBytes: number;
30
+ } | {
31
+ readonly type: "error";
32
+ readonly tag: string;
33
+ readonly fields: ReadonlyArray<DescriptorField>;
34
+ } | {
35
+ readonly type: "id";
36
+ readonly table: string;
37
+ } | {
38
+ readonly type: "userId";
39
+ } | {
40
+ readonly type: "integer";
41
+ } | {
42
+ readonly type: "literal";
43
+ readonly value: string | number | boolean;
44
+ } | {
45
+ readonly type: "literals";
46
+ readonly values: ReadonlyArray<string | number | boolean>;
47
+ } | {
48
+ readonly type: "never";
49
+ } | {
50
+ readonly type: "null";
51
+ } | {
52
+ readonly type: "nullable";
53
+ readonly value: ValueDescriptor;
54
+ } | {
55
+ readonly type: "number";
56
+ } | {
57
+ readonly type: "object";
58
+ readonly fields: ReadonlyArray<DescriptorField>;
59
+ } | {
60
+ readonly type: "optional";
61
+ readonly value: ValueDescriptor;
62
+ } | {
63
+ readonly type: "record";
64
+ readonly value: ValueDescriptor;
65
+ } | {
66
+ readonly type: "secret";
67
+ readonly value: ValueDescriptor;
68
+ } | {
69
+ readonly type: "string";
70
+ } | {
71
+ readonly type: "union";
72
+ readonly members: ReadonlyArray<ValueDescriptor>;
73
+ };
74
+ declare const ValueDescriptor: Schema.Codec<ValueDescriptor>;
75
+ declare const ValueDescriptorTypeId: unique symbol;
76
+ interface ValueDescriptorCarrier {
77
+ readonly [ValueDescriptorTypeId]: ValueDescriptor;
78
+ }
79
+ type DescribedValue<Value extends Schema.Constraint = Schema.Constraint> = Value & ValueDescriptorCarrier & ValueEvolution<Value>;
80
+ type ValueFields = {
81
+ readonly [fieldName: PropertyKey]: DescribedValue;
82
+ };
83
+ //#endregion
84
+ //#region ../contracts/dist/id-W_I1iiJQ.d.ts
85
+ declare const UserId: Schema.brand<Schema.String, "ignotum/id/UserId">;
86
+ type UserId = typeof UserId.Type;
87
+ declare const User: Schema.Struct<{
88
+ readonly id: Schema.brand<Schema.String, "ignotum/id/UserId">;
89
+ readonly name: Schema.optional<Schema.String>;
90
+ readonly email: Schema.optional<Schema.String>;
91
+ readonly image: Schema.optional<Schema.String>;
92
+ }>;
93
+ type User = typeof User.Type;
94
+ declare const ProfileField: Schema.Literals<readonly ["name", "email", "image"]>;
95
+ type ProfileField = typeof ProfileField.Type;
96
+ declare const IdRequired: Schema.brand<Schema.Struct<{
97
+ readonly _tag: Schema.tag<"IdRequired">;
98
+ }>, "ignotum/error">;
99
+ type IdRequired = typeof IdRequired.Type;
100
+ interface IdContext {
101
+ readonly current: () => Result$1<User | null, never>;
102
+ readonly require: () => Result$1<User, IdRequired>;
103
+ }
104
+ declare const SessionOutcome: Schema.Literals<readonly ["SignedIn", "ProfileUpdated", "Cancelled"]>;
105
+ type SessionOutcome = typeof SessionOutcome.Type;
106
+ //#endregion
107
+ //#region ../contracts/dist/pagination-CbYlCjjP.d.ts
108
+ //#region src/runtime/pagination.d.ts
109
+ declare const PaginationCursor: Schema.brand<Schema.String, "ignotum/runtime/PaginationCursor">;
110
+ type PaginationCursor = typeof PaginationCursor.Type;
111
+ declare const PaginationOptions: Schema.Struct<{
112
+ readonly cursor: Schema.NullOr<Schema.brand<Schema.String, "ignotum/runtime/PaginationCursor">>;
113
+ readonly pageSize: Schema.brand<Schema.Int, "ignotum/runtime/PaginationPageSize">;
114
+ }>;
115
+ type PaginationOptions = typeof PaginationOptions.Type;
116
+ interface PaginationPage<Item> {
117
+ readonly items: ReadonlyArray<Item>;
118
+ readonly nextCursor: PaginationCursor | null;
119
+ }
120
+ //#endregion
121
+ //#region ../contracts/dist/values-DM_s3QjY.d.ts
122
+ //#region src/schema/values.d.ts
123
+ declare const IdTargetsTypeId: unique symbol;
124
+ declare const UnresolvedReferencesTypeId: unique symbol;
125
+ interface IdTargets<TableName extends string> {
126
+ readonly [IdTargetsTypeId]: TableName;
127
+ }
128
+ interface UnresolvedReferences<TableName extends string> {
129
+ readonly [UnresolvedReferencesTypeId]: TableName;
130
+ }
131
+ type IdTargetsOf<Value> = Value extends IdTargets<infer TableName> ? TableName : never;
132
+ type UnresolvedReferencesOf<Value> = Value extends UnresolvedReferences<infer TableName> ? TableName : never;
133
+ type WithIdTargets<Value, TableName extends string> = [TableName] extends [never] ? Value : Value & IdTargets<TableName>;
134
+ type WithUnresolvedReferences<Value, TableName extends string> = [TableName] extends [never] ? Value : Value & UnresolvedReferences<TableName>;
135
+ type PreserveIdMetadata<Value, Source> = WithUnresolvedReferences<WithIdTargets<Value, IdTargetsOf<Source>>, UnresolvedReferencesOf<Source>>;
136
+ type PreserveValueMetadata<Value extends Schema.Constraint, Source> = Source extends ValueDescriptorCarrier ? DescribedValue<PreserveIdMetadata<Value, Source> & Schema.Constraint> : PreserveIdMetadata<Value, Source>;
137
+ type IdDefinition<TableName extends string> = DescribedValue<Schema.brand<typeof GeneratedId, `ignotum/id/${TableName}`> & IdTargets<TableName>>;
138
+ type ReferenceDefinition<TableName extends string> = IdDefinition<TableName> & UnresolvedReferences<TableName>;
139
+ type AddedFieldValidation<Fields, AddedFields> = Extract<keyof AddedFields, keyof Fields> extends never ? readonly [] : readonly [invalidFields: never];
140
+ type OverriddenFieldValidation<Fields, OverriddenFields> = Exclude<keyof OverriddenFields, keyof Fields> extends never ? readonly [] : readonly [invalidFields: never];
141
+ type PartialFields<Fields extends Schema.Struct.Fields> = { readonly [FieldName in keyof Fields]: Fields[FieldName] extends Schema.Constraint ? PreserveValueMetadata<Schema.optional<Fields[FieldName]>, Fields[FieldName]> : never; };
142
+ interface FixedObjectValidator<Fields extends Schema.Struct.Fields> extends Schema.Struct<Fields> {
143
+ readonly pick: <const Keys extends ReadonlyArray<keyof Fields>>(...keys: Keys) => ObjectDefinition<Pick<Fields, Keys[number]>>;
144
+ readonly omit: <const Keys extends ReadonlyArray<keyof Fields>>(...keys: Keys) => ObjectDefinition<Omit<Fields, Keys[number]>>;
145
+ readonly extend: <const AddedFields extends ValueFields>(fields: AddedFields, ...validation: AddedFieldValidation<Fields, AddedFields>) => ObjectDefinition<Struct.Assign<Fields, AddedFields>>;
146
+ readonly override: <const OverriddenFields extends Partial<Record<keyof Fields, DescribedValue>>>(fields: OverriddenFields, ...validation: OverriddenFieldValidation<Fields, OverriddenFields>) => ObjectDefinition<Struct.Assign<Fields, OverriddenFields>>;
147
+ readonly partial: () => ObjectDefinition<PartialFields<Fields>>;
148
+ }
149
+ type ObjectDefinition<Fields extends Schema.Struct.Fields> = DescribedValue<PreserveIdMetadata<FixedObjectValidator<Fields>, Fields[keyof Fields]>>;
150
+ type ResolvedFields<Fields extends Schema.Struct.Fields> = { readonly [FieldName in keyof Fields]: Omit<Fields[FieldName], typeof UnresolvedReferencesTypeId>; };
151
+ type LiteralValue = string | number | boolean;
152
+ interface IndexDefinition<Name extends string = string, FieldNames extends readonly string[] = readonly string[]> {
153
+ readonly name: Name;
154
+ readonly fields: FieldNames;
155
+ }
156
+ interface IndexDefinitions {
157
+ readonly [indexName: string]: IndexDefinition;
158
+ }
159
+ type IndexScalar = boolean | Date | number | string;
160
+ type IndexFieldName<Fields extends Schema.Struct.Fields> = { readonly [FieldName in keyof Fields & string]: Fields[FieldName]["Type"] extends IndexScalar ? FieldName : never; }[keyof Fields & string];
161
+ type IndexFieldTuple<Fields extends Schema.Struct.Fields> = readonly [IndexFieldName<Fields>, ...ReadonlyArray<IndexFieldName<Fields>>];
162
+ interface TableDefinition<Fields extends Schema.Struct.Fields, Indexes extends IndexDefinitions = {}> {
163
+ readonly _tag: "Table";
164
+ readonly descriptor: ValueDescriptor;
165
+ readonly fields: Fields;
166
+ readonly indexes: Indexes;
167
+ readonly schema: Schema.Struct<Fields>;
168
+ from<Previous extends DescribedValue>(previous: Previous, convert: (value: Previous["Type"]) => Schema.Struct.Type<Fields>): TableDefinition<Fields, Indexes>;
169
+ readonly index: <const Name extends string, const FieldNames extends IndexFieldTuple<Fields>>(name: Name extends keyof Indexes ? never : Name, fields: FieldNames) => TableDefinition<Fields, Indexes & Record<Name, IndexDefinition<Name, FieldNames>>>;
170
+ }
171
+ interface TableDefinitions {
172
+ readonly [tableName: string]: TableDefinition<Schema.Struct.Fields, IndexDefinitions>;
173
+ }
174
+ type TableNameOf$1<Definition extends TableDefinitions> = keyof Definition & string;
175
+ type ReservedFieldName = "createdAt" | "id" | "updatedAt";
176
+ type ReservedErrorTagName = "InternalServerError";
177
+ declare const ReservedFieldTypeId: unique symbol;
178
+ interface ReservedField<FieldName extends string> {
179
+ readonly [ReservedFieldTypeId]: `The field name '${FieldName}' is reserved by Ignotum`;
180
+ }
181
+ declare const ReservedErrorTagTypeId: unique symbol;
182
+ interface ReservedErrorTag<Tag extends string> {
183
+ readonly [ReservedErrorTagTypeId]: `The error tag '${Tag}' is reserved by Ignotum`;
184
+ }
185
+ type ErrorTagValidation<Tag extends string> = Tag extends ReservedErrorTagName ? ReservedErrorTag<Tag> : unknown;
186
+ type ReservedFieldValidation<Fields extends Schema.Struct.Fields> = { readonly [FieldName in Extract<keyof Fields, ReservedFieldName>]: ReservedField<FieldName>; };
187
+ type ReservedErrorFieldValidation<Fields extends Schema.Struct.Fields> = { readonly [FieldName in Extract<keyof Fields, "_tag">]: ReservedField<FieldName>; };
188
+ type ErrorDefinition<Tag extends string, Fields extends Schema.Struct.Fields> = DescribedValue<PreserveIdMetadata<Schema.brand<Schema.TaggedStruct<Tag, Fields>, typeof ErrorBrand> & ((fields: Schema.Struct.MakeIn<Fields>) => Schema.brand<Schema.TaggedStruct<Tag, Fields>, typeof ErrorBrand>["Type"]), Fields[keyof Fields]>>;
189
+ declare const table: <const Fields extends ValueFields>(fields: Fields & ReservedFieldValidation<NoInfer<Fields>>) => TableDefinition<Fields>;
190
+ declare const string: () => DescribedValue<Schema.String>;
191
+ declare const number: () => DescribedValue<Schema.Finite>;
192
+ declare const integer: () => DescribedValue<Schema.Int>;
193
+ declare const boolean: () => DescribedValue<Schema.Boolean>;
194
+ declare const date: () => DescribedValue<Schema.DateFromMillis>;
195
+ interface FileOptions<Formats extends readonly FileFormat[]> {
196
+ readonly formats?: Formats;
197
+ readonly maxBytes?: number;
198
+ }
199
+ declare const file: <const Formats extends readonly FileFormat[] = typeof fileFormats>(options?: FileOptions<Formats>) => DescribedValue<Schema.decodeTo<Schema.declare<FileValue<"avif" | "gif" | "jpeg" | "png" | "webp">, FileValue<"avif" | "gif" | "jpeg" | "png" | "webp">>, Schema.Struct<{
200
+ readonly $ignotum: Schema.Literal<"file">;
201
+ readonly id: Schema.brand<Schema.String, "ignotum/file/FileId"> & {
202
+ readonly idPrefix: "file";
203
+ };
204
+ readonly format: Schema.Literals<readonly ["jpeg", "png", "webp", "avif", "gif"]>;
205
+ readonly name: Schema.String;
206
+ readonly size: Schema.Int;
207
+ }>, never, never>> & Schema.Schema<FileValue<Formats[number]>>;
208
+ declare const never: () => DescribedValue<Schema.Never>;
209
+ declare const nullValue: () => DescribedValue<Schema.Null>;
210
+ declare const literal: <const Value extends LiteralValue>(value: Value) => DescribedValue<Schema.Literal<Value>>;
211
+ declare const literals: <const Members extends readonly [LiteralValue, LiteralValue, ...ReadonlyArray<LiteralValue>]>(...members: Members) => DescribedValue<Schema.Literals<Members>>;
212
+ declare const userId: () => DescribedValue<Schema.brand<Schema.String, "ignotum/id/UserId">>;
213
+ declare const id: <const TableName extends string>(tableName: TableName) => ReferenceDefinition<TableName>;
214
+ declare const array: <Value extends DescribedValue>(value: Value) => PreserveValueMetadata<Schema.$Array<Value>, Value>;
215
+ declare const object: <const Fields extends ValueFields>(fields: Fields) => ObjectDefinition<Fields>;
216
+ declare const optional: <Value extends DescribedValue>(value: Value) => PreserveValueMetadata<Schema.optional<Value>, Value>;
217
+ declare const nullable: <Value extends DescribedValue>(value: Value) => PreserveValueMetadata<Schema.NullOr<Value>, Value>;
218
+ declare const record: <Value extends DescribedValue>(value: Value) => PreserveValueMetadata<Schema.$Record<Schema.String, Value>, Value>;
219
+ declare const union: <const Members extends ReadonlyArray<DescribedValue>>(...members: Members) => PreserveValueMetadata<Schema.Union<Members>, Members[number]>;
220
+ type Secret<Value> = Redacted.Redacted<Value>;
221
+ declare const Secret: {
222
+ readonly isSecret: (u: unknown) => u is Redacted.Redacted<unknown>;
223
+ readonly value: <T>(self: Redacted.Redacted<T>) => T;
224
+ };
225
+ type SecretDefinition<Value extends DescribedValue> = DescribedValue<Schema.RedactedFromValue<Value>>;
226
+ declare function secret(): SecretDefinition<ReturnType<typeof string>>;
227
+ declare function secret<Value extends DescribedValue>(value: Value): SecretDefinition<Value>;
228
+ declare const pagination: () => ObjectDefinition<{
229
+ readonly cursor: DescribedValue<Schema.NullOr<DescribedValue<Schema.brand<Schema.String, "ignotum/runtime/PaginationCursor">>> & Schema.Constraint>;
230
+ readonly pageSize: DescribedValue<Schema.brand<Schema.Int, "ignotum/runtime/PaginationPageSize">>;
231
+ }>;
232
+ declare const page: <Value extends DescribedValue>(value: Value) => ObjectDefinition<{
233
+ readonly items: PreserveValueMetadata<Schema.$Array<Value>, Value>;
234
+ readonly nextCursor: DescribedValue<Schema.NullOr<DescribedValue<Schema.brand<Schema.String, "ignotum/runtime/PaginationCursor">>> & Schema.Constraint>;
235
+ }> & Schema.Schema<PaginationPage<Value["Type"]>>;
236
+ declare const error: <const Tag extends string, const Fields extends ValueFields>(tag: Tag & ErrorTagValidation<Tag>, fields: Fields & ReservedErrorFieldValidation<NoInfer<Fields>>) => ErrorDefinition<Tag, Fields>;
237
+ declare const values: {
238
+ userId: typeof userId;
239
+ array: typeof array;
240
+ boolean: typeof boolean;
241
+ date: typeof date;
242
+ file: typeof file;
243
+ error: typeof error;
244
+ id: typeof id;
245
+ integer: typeof integer;
246
+ literal: typeof literal;
247
+ literals: typeof literals;
248
+ never: typeof never;
249
+ null: typeof nullValue;
250
+ nullable: typeof nullable;
251
+ number: typeof number;
252
+ object: typeof object;
253
+ optional: typeof optional;
254
+ record: typeof record;
255
+ string: typeof string;
256
+ union: typeof union;
257
+ };
258
+ declare const environmentValues: {
259
+ array: typeof array;
260
+ boolean: typeof boolean;
261
+ date: typeof date;
262
+ integer: typeof integer;
263
+ literal: typeof literal;
264
+ literals: typeof literals;
265
+ never: typeof never;
266
+ null: typeof nullValue;
267
+ nullable: typeof nullable;
268
+ number: typeof number;
269
+ object: typeof object;
270
+ optional: typeof optional;
271
+ record: typeof record;
272
+ secret: typeof secret;
273
+ string: typeof string;
274
+ union: typeof union;
275
+ };
276
+ type EnvironmentValues = typeof environmentValues;
277
+ type DocumentDefinition<Definition extends TableDefinitions, TableName extends TableNameOf$1<Definition>> = ObjectDefinition<Struct.Assign<ResolvedFields<Definition[TableName]["fields"]>, {
278
+ readonly id: IdDefinition<TableName>;
279
+ readonly createdAt: typeof Schema.DateFromMillis;
280
+ readonly updatedAt: typeof Schema.DateFromMillis;
281
+ }>>;
282
+ type BoundValues<Definition extends TableDefinitions> = Omit<typeof values, "id"> & {
283
+ readonly doc: <const TableName extends TableNameOf$1<Definition>>(tableName: TableName) => DocumentDefinition<Definition, TableName>;
284
+ readonly id: <const TableName extends TableNameOf$1<Definition>>(tableName: TableName) => IdDefinition<TableName>;
285
+ readonly page: typeof page;
286
+ readonly pagination: () => ReturnType<typeof pagination> & Schema.Schema<PaginationOptions>;
287
+ };
288
+ //#endregion
289
+ //#region ../contracts/dist/types-DeCCyqLU.d.ts
290
+ //#region src/schema/environment.d.ts
291
+ declare const EnvironmentDefinitionTypeId: unique symbol;
292
+ declare const EnvironmentDecoderTypeId: unique symbol;
293
+ type EnvironmentFields = {
294
+ readonly [fieldName: PropertyKey]: DescribedValue<Schema.ConstraintDecoder<unknown, never>>;
295
+ };
296
+ interface DefinedEnv<Fields extends EnvironmentFields = EnvironmentFields> {
297
+ readonly _tag: "Environment";
298
+ readonly fields: Fields;
299
+ readonly descriptors: ReadonlyArray<DescriptorField>;
300
+ readonly schema: Schema.Struct<Fields>;
301
+ readonly [EnvironmentDefinitionTypeId]: Fields;
302
+ readonly [EnvironmentDecoderTypeId]: (raw: Readonly<Record<string, string>>) => Effect.Effect<Readonly<EnvironmentType<DefinedEnv<Fields>>>, EnvironmentValueInvalid>;
303
+ }
304
+ interface EnvironmentAuthoring {
305
+ readonly values: EnvironmentValues;
306
+ }
307
+ type EnvironmentType<Environment extends DefinedEnv> = Schema.Struct.Type<Environment[typeof EnvironmentDefinitionTypeId]>;
308
+ declare const EnvironmentValueInvalid_base: Schema.Class<EnvironmentValueInvalid, Schema.TaggedStruct<"EnvironmentValueInvalid", {
309
+ readonly key: Schema.optional<Schema.String>;
310
+ readonly message: Schema.String;
311
+ }>, import("effect/Cause").YieldableError>;
312
+ declare class EnvironmentValueInvalid extends EnvironmentValueInvalid_base {}
313
+ declare const defineEnv: <const Fields extends EnvironmentFields>(define: (authoring: EnvironmentAuthoring) => Fields) => DefinedEnv<Fields>;
314
+ declare const emptyEnv: DefinedEnv<{}>;
315
+ //#endregion
316
+ //#region src/schema/types.d.ts
317
+ /** A document identifier branded with the table it belongs to. */
318
+ type Id<TableName extends string> = GeneratedId & Brand.Brand<`ignotum/id/${TableName}`>;
319
+ declare const SchemaDefinitionTypeId: unique symbol;
320
+ interface SchemaDefinitionContract<Definition> {
321
+ readonly [SchemaDefinitionTypeId]: Definition;
322
+ }
323
+ type SchemaDefinitionOf<SchemaDefinition> = SchemaDefinition extends SchemaDefinitionContract<infer Definition> ? Definition : never;
324
+ interface TableDefinitionLike {
325
+ readonly fields: Schema.Struct.Fields;
326
+ }
327
+ interface TablesLike {
328
+ readonly [tableName: string]: TableDefinitionLike;
329
+ }
330
+ type TableNameOf<Definition extends TablesLike> = keyof Definition & string;
331
+ interface SystemFields<TableName extends string> {
332
+ readonly id: Id<TableName>;
333
+ readonly createdAt: Date;
334
+ readonly updatedAt: Date;
335
+ }
336
+ type DocumentFields<TableName extends string, Table extends TableDefinitionLike> = SystemFields<TableName> & Schema.Struct.Type<Table["fields"]>;
337
+ /** The complete document returned for a table, including Ignotum system fields. */
338
+ type Document<Definition extends TablesLike, TableName extends TableNameOf<Definition>> = { readonly [FieldName in keyof DocumentFields<TableName, Definition[TableName]>]: DocumentFields<TableName, Definition[TableName]>[FieldName]; };
339
+ //#endregion
340
+ export { SessionOutcome as C, ProfileField as S, UserId as T, table as _, Id as a, PaginationPage as b, SchemaDefinitionTypeId as c, BoundValues as d, IdTargetsOf as f, UnresolvedReferencesTypeId as g, TableDefinition as h, EnvironmentType as i, defineEnv as l, Secret as m, Document as n, SchemaDefinitionContract as o, IndexDefinitions as p, EnvironmentAuthoring as r, SchemaDefinitionOf as s, DefinedEnv as t, emptyEnv as u, values as v, User as w, IdContext as x, PaginationOptions as y };
341
+ //# sourceMappingURL=types-DeCCyqLU-BIm7rU-0.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ignotum",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "Ignotum is an opinionated TypeScript application cloud.",
5
5
  "author": "Johannes Schießl",
6
6
  "repository": {
@@ -12,7 +12,8 @@
12
12
  "ignotum": "dist/cli/bin.mjs"
13
13
  },
14
14
  "files": [
15
- "dist",
15
+ "dist/cli",
16
+ "dist/runtime",
16
17
  "src"
17
18
  ],
18
19
  "type": "module",
@@ -38,6 +39,9 @@
38
39
  "types": "./dist/runtime/client/jsx-runtime.d.ts",
39
40
  "import": "./dist/runtime/client/jsx-runtime.js"
40
41
  },
42
+ "./image-assets": {
43
+ "types": "./src/image-assets.d.ts"
44
+ },
41
45
  "./internal/api": {
42
46
  "@ignotum/source": "./src/internal/api.ts",
43
47
  "types": "./dist/runtime/internal/api.d.ts",
@@ -57,6 +61,16 @@
57
61
  "@ignotum/source": "./src/internal/types.ts",
58
62
  "types": "./dist/runtime/internal/types.d.ts",
59
63
  "import": "./dist/runtime/internal/types.js"
64
+ },
65
+ "./internal/client": {
66
+ "@ignotum/source": "./src/internal/client.ts",
67
+ "types": "./dist/runtime/internal/client.d.ts",
68
+ "import": "./dist/runtime/internal/client.js"
69
+ },
70
+ "./internal/routes": {
71
+ "@ignotum/source": "./src/internal/routes.ts",
72
+ "types": "./dist/runtime/internal/routes.d.ts",
73
+ "import": "./dist/runtime/internal/routes.js"
60
74
  }
61
75
  },
62
76
  "publishConfig": {
@@ -72,16 +86,27 @@
72
86
  "nanoid": "6.0.1",
73
87
  "open": "11.0.0",
74
88
  "oxc-parser": "0.121.0",
89
+ "postcss": "8.5.26",
90
+ "postcss-value-parser": "4.2.0",
75
91
  "preact": "10.29.8",
92
+ "semver": "7.8.5",
76
93
  "tailwindcss": "4.3.3",
77
94
  "vite": "8.2.2"
78
95
  },
79
96
  "devDependencies": {
97
+ "@cloudflare/vitest-plugin": "1.1.1",
98
+ "@cloudflare/workers-types": "5.20260901.1",
80
99
  "@effect/platform-node": "4.0.0-rc.111",
100
+ "@effect/sql-d1": "4.0.0-rc.112",
81
101
  "@effect/sql-sqlite-node": "4.0.0-rc.111",
102
+ "@playwright/test": "1.63.0",
103
+ "@types/semver": "^7.8.0",
104
+ "alchemy": "2.0.0-beta.74",
105
+ "miniflare": "5.20260826.0-alpha",
106
+ "quickjs-emscripten": "0.32.0",
82
107
  "redis": "6.2.1",
83
108
  "@ignotum/contracts": "1.0.0",
84
- "@ignotum/deployment": "1.0.0",
109
+ "@ignotum/versions": "1.0.0",
85
110
  "@ignotum/runtime": "1.0.0",
86
111
  "@ignotum/shared": "1.0.0"
87
112
  },
@@ -89,7 +114,7 @@
89
114
  "node": ">=22.18.0"
90
115
  },
91
116
  "scripts": {
92
- "build": "vp pack",
117
+ "test:browser:serve": "vp exec vite --config test/browser/vite.config.ts",
93
118
  "typecheck": "tsc -p tsconfig.json"
94
119
  }
95
120
  }
@@ -4,12 +4,13 @@ import localAuthentication from "../../../../docs/user/local-authentication.md?r
4
4
  import agents from "../../../../docs/agent/AGENTS.md?raw";
5
5
  import skill from "../../../../docs/agent/skills/ignotum/SKILL.md?raw";
6
6
  import api from "../../../../docs/user/api.md?raw";
7
- import appEntry from "../../../../docs/user/app-entry.md?raw";
7
+ import routes from "../../../../docs/user/routes.md?raw";
8
8
  import cli from "../../../../docs/user/cli.md?raw";
9
9
  import database from "../../../../docs/user/database.md?raw";
10
10
  import deployApp from "../../../../docs/user/deploy-app.md?raw";
11
- import deploymentModel from "../../../../docs/user/deployment-model.md?raw";
12
- import deployments from "../../../../docs/user/deployments.md?raw";
11
+ import consoleGuide from "../../../../docs/user/console.md?raw";
12
+ import versionModel from "../../../../docs/user/version-model.md?raw";
13
+ import versions from "../../../../docs/user/versions.md?raw";
13
14
  import errors from "../../../../docs/user/errors.md?raw";
14
15
  import environmentVariables from "../../../../docs/user/environment-variables.md?raw";
15
16
  import files from "../../../../docs/user/files.md?raw";
@@ -21,11 +22,13 @@ import index from "../../../../docs/user/index.md?raw";
21
22
  import indexes from "../../../../docs/user/indexes.md?raw";
22
23
  import limits from "../../../../docs/user/limits.md?raw";
23
24
  import localDevelopment from "../../../../docs/user/local-development.md?raw";
25
+ import migrations from "../../../../docs/user/migrations.md?raw";
24
26
  import mutations from "../../../../docs/user/mutations.md?raw";
25
27
  import pagination from "../../../../docs/user/pagination.md?raw";
26
28
  import preact from "../../../../docs/user/preact.md?raw";
29
+ import routing from "../../../../docs/user/routing.md?raw";
27
30
  import projectStructure from "../../../../docs/user/project-structure.md?raw";
28
- import publicAssets from "../../../../docs/user/public-assets.md?raw";
31
+ import images from "../../../../docs/user/images.md?raw";
29
32
  import queries from "../../../../docs/user/queries.md?raw";
30
33
  import quickstart from "../../../../docs/user/quickstart.md?raw";
31
34
  import readingData from "../../../../docs/user/reading-data.md?raw";
@@ -45,12 +48,13 @@ const references = [
45
48
  ["profile-sharing.md", profileSharing],
46
49
  ["local-authentication.md", localAuthentication],
47
50
  ["api.md", api],
48
- ["app-entry.md", appEntry],
51
+ ["routes.md", routes],
49
52
  ["cli.md", cli],
50
53
  ["database.md", database],
51
54
  ["deploy-app.md", deployApp],
52
- ["deployment-model.md", deploymentModel],
53
- ["deployments.md", deployments],
55
+ ["console.md", consoleGuide],
56
+ ["version-model.md", versionModel],
57
+ ["versions.md", versions],
54
58
  ["errors.md", errors],
55
59
  ["environment-variables.md", environmentVariables],
56
60
  ["files.md", files],
@@ -62,11 +66,13 @@ const references = [
62
66
  ["indexes.md", indexes],
63
67
  ["limits.md", limits],
64
68
  ["local-development.md", localDevelopment],
69
+ ["migrations.md", migrations],
65
70
  ["mutations.md", mutations],
66
71
  ["pagination.md", pagination],
67
72
  ["preact.md", preact],
73
+ ["routing.md", routing],
68
74
  ["project-structure.md", projectStructure],
69
- ["public-assets.md", publicAssets],
75
+ ["images.md", images],
70
76
  ["queries.md", queries],
71
77
  ["quickstart.md", quickstart],
72
78
  ["reading-data.md", readingData],