cloesce 0.0.4-unstable.9 → 0.0.5-unstable.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.
@@ -1,7 +1,17 @@
1
1
  import { D1Database } from "@cloudflare/workers-types/experimental/index.js";
2
- import { CrudKind, DeepPartial, Either, KeysOfType } from "../common.js";
3
- export { CloesceApp, MiddlewareFn, ResponseMiddlewareFn, DependencyInjector, } from "../router/router.js";
4
- export type { HttpResult, Either, DeepPartial, CrudKind } from "../common.js";
2
+ import { DeepPartial, Either, KeysOfType } from "./common.js";
3
+ import { CrudKind } from "../ast.js";
4
+ /**
5
+ * cloesce/backend
6
+ */
7
+ export {
8
+ CloesceApp,
9
+ DependencyContainer as DependencyInjector,
10
+ } from "../router/router.js";
11
+ export type { MiddlewareFn, ResultMiddlewareFn } from "../router/router.js";
12
+ export { HttpResult, Either, Stream } from "./common.js";
13
+ export type { DeepPartial } from "./common.js";
14
+ export type { CrudKind } from "../ast.js";
5
15
  /**
6
16
  * Marks a class as a D1-backed SQL model.
7
17
  *
@@ -23,6 +33,7 @@ export type { HttpResult, Either, DeepPartial, CrudKind } from "../common.js";
23
33
  * ```
24
34
  */
25
35
  export declare const D1: ClassDecorator;
36
+ export declare const Service: ClassDecorator;
26
37
  /**
27
38
  * Marks a class as a plain serializable object.
28
39
  *
@@ -167,7 +178,9 @@ export declare const DataSource: PropertyDecorator;
167
178
  * dogs: Dog[];
168
179
  * ```
169
180
  */
170
- export declare const OneToMany: (_foreignKeyColumn: string) => PropertyDecorator;
181
+ export declare const OneToMany: (
182
+ _foreignKeyColumn: string,
183
+ ) => PropertyDecorator;
171
184
  /**
172
185
  * Declares a one-to-one relationship between models.
173
186
  *
@@ -283,10 +296,14 @@ type Primitive = string | number | boolean | bigint | symbol | null | undefined;
283
296
  * }
284
297
  * ```
285
298
  */
286
- export type IncludeTree<T> = (T extends Primitive ? never : {
287
- [K in keyof T]?: T[K] extends (infer U)[] ? IncludeTree<NonNullable<U>> : IncludeTree<NonNullable<T[K]>>;
288
- }) & {
289
- __brand?: "IncludeTree";
299
+ export type IncludeTree<T> = (T extends Primitive
300
+ ? never
301
+ : {
302
+ [K in keyof T]?: T[K] extends (infer U)[]
303
+ ? IncludeTree<NonNullable<U>>
304
+ : IncludeTree<NonNullable<T[K]>>;
305
+ }) & {
306
+ __brand?: "IncludeTree";
290
307
  };
291
308
  /**
292
309
  * Represents the name of a `@DataSource` available on a model type `T`,
@@ -313,8 +330,11 @@ export type IncludeTree<T> = (T extends Primitive ? never : {
313
330
  * async foo(ds: "default" | "none"): Promise<void> {...}
314
331
  * ```
315
332
  */
316
- export type DataSourceOf<T extends object> = (KeysOfType<T, IncludeTree<T>> | "none") & {
317
- __brand?: "DataSource";
333
+ export type DataSourceOf<T extends object> = (
334
+ | KeysOfType<T, IncludeTree<T>>
335
+ | "none"
336
+ ) & {
337
+ __brand?: "DataSource";
318
338
  };
319
339
  /**
320
340
  * A branded `number` type indicating that the corresponding
@@ -334,179 +354,203 @@ export type DataSourceOf<T extends object> = (KeysOfType<T, IncludeTree<T>> | "n
334
354
  * ```
335
355
  */
336
356
  export type Integer = number & {
337
- __brand?: "Integer";
357
+ __brand?: "Integer";
338
358
  };
339
359
  /**
340
360
  * Exposes the ORM primitives Cloesce uses to interact with D1 databases.
341
361
  */
342
362
  export declare class Orm {
343
- private db;
344
- private constructor();
345
- /**
346
- * Creates an instance of an `Orm`
347
- * @param db The database to use for ORM calls.
348
- */
349
- static fromD1(db: D1Database): Orm;
350
- /**
351
- * Maps SQL records to an instantiated Model. The records must be flat
352
- * (e.g., of the form "id, name, address") or derive from a Cloesce data source view
353
- * (e.g., of the form "Horse.id, Horse.name, Horse.address")
354
- * @param ctor The model constructor
355
- * @param records D1 Result records
356
- * @param includeTree Include tree to define the relationships to join.
357
- */
358
- static mapSql<T extends object>(ctor: new () => T, records: Record<string, any>[], includeTree?: IncludeTree<T> | null): Either<string, T[]>;
359
- /**
360
- * Executes an "upsert" query, adding or augmenting a model in the database.
361
- *
362
- * If a model's primary key is not defined in `newModel`, the query is assumed to be an insert.
363
- *
364
- * If a model's primary key _is_ defined, but some attributes are missing, the query is assumed to be an update.
365
- *
366
- * Finally, if the primary key is defined, but all attributes are included, a SQLite upsert will be performed.
367
- *
368
- * In any other case, an error string will be returned.
369
- *
370
- * ### Inserting a new Model
371
- * ```ts
372
- * const model = {name: "julio", lastname: "pumpkin"};
373
- * const idRes = await orm.upsert(Person, model, null);
374
- * ```
375
- *
376
- * ### Updating an existing model
377
- * ```ts
378
- * const model = {id: 1, name: "timothy"};
379
- * const idRes = await orm.upsert(Person, model, null);
380
- * // (in db)=> {id: 1, name: "timothy", lastname: "pumpkin"}
381
- * ```
382
- *
383
- * ### Upserting a model
384
- * ```ts
385
- * // (assume a Person already exists)
386
- * const model = {
387
- * id: 1,
388
- * lastname: "burger", // updates last name
389
- * dog: {
390
- * name: "fido" // insert dog relationship
391
- * }
392
- * };
393
- * const idRes = await orm.upsert(Person, model, null);
394
- * // (in db)=> Person: {id: 1, dogId: 1 ...} ; Dog: {id: 1, name: "fido"}
395
- * ```
396
- *
397
- * @param ctor A model constructor.
398
- * @param newModel The new or augmented model.
399
- * @param includeTree An include tree describing which foreign keys to join.
400
- * @returns An error string, or the primary key of the inserted model.
401
- */
402
- upsert<T extends object>(ctor: new () => T, newModel: DeepPartial<T>, includeTree?: IncludeTree<T> | null): Promise<Either<string, any>>;
403
- /**
404
- * Returns a select query, creating a CTE view for the model using the provided include tree.
405
- *
406
- * @param ctor The model constructor.
407
- * @param includeTree An include tree describing which related models to join.
408
- * @param from An optional custom `FROM` clause to use instead of the base table.
409
- * @param tagCte An optional CTE name to tag the query with. Defaults to "Model.view".
410
- *
411
- * ### Example:
412
- * ```ts
413
- * // Using a data source
414
- * const query = Orm.listQuery(Person, "default");
415
- *
416
- * // Using a custom from statement
417
- * const query = Orm.listQuery(Person, null, "SELECT * FROM Person WHERE age > 18");
418
- * ```
419
- *
420
- * ### Example SQL output:
421
- * ```sql
422
- * WITH Person_view AS (
423
- * SELECT
424
- * "Person"."id" AS "id",
425
- * ...
426
- * FROM "Person"
427
- * LEFT JOIN ...
428
- * )
429
- * SELECT * FROM Person_view
430
- * ```
431
- */
432
- static listQuery<T extends object>(ctor: new () => T, opts: {
433
- includeTree?: IncludeTree<T> | null;
434
- from?: string;
435
- tagCte?: string;
436
- }): string;
437
- /**
438
- * Returns a select query for a single model by primary key, creating a CTE view using the provided include tree.
439
- *
440
- * @param ctor The model constructor.
441
- * @param includeTree An include tree describing which related models to join.
442
- *
443
- * ### Example:
444
- * ```ts
445
- * // Using a data source
446
- * const query = Orm.getQuery(Person, "default");
447
- * ```
448
- *
449
- * ### Example SQL output:
450
- *
451
- * ```sql
452
- * WITH Person_view AS (
453
- * SELECT
454
- * "Person"."id" AS "id",
455
- * ...
456
- * FROM "Person"
457
- * LEFT JOIN ...
458
- * )
459
- * SELECT * FROM Person_view WHERE [Person].[id] = ?
460
- * ```
461
- */
462
- static getQuery<T extends object>(ctor: new () => T, includeTree?: IncludeTree<T> | null): string;
463
- /**
464
- * Retrieves all instances of a model from the database.
465
- * @param ctor The model constructor.
466
- * @param includeTree An include tree describing which related models to join.
467
- * @param from An optional custom `FROM` clause to use instead of the base table.
468
- * @returns Either an error string, or an array of model instances.
469
- *
470
- * ### Example:
471
- * ```ts
472
- * const orm = Orm.fromD1(env.db);
473
- * const horses = await orm.list(Horse, Horse.default);
474
- * ```
475
- *
476
- * ### Example with custom from:
477
- * ```ts
478
- * const orm = Orm.fromD1(env.db);
479
- * const adultHorses = await orm.list(Horse, Horse.default, "SELECT * FROM Horse ORDER BY age DESC LIMIT 10");
480
- * ```
481
- *
482
- * =>
483
- *
484
- * ```sql
485
- * SELECT
486
- * "Horse"."id" AS "id",
487
- * ...
488
- * FROM (SELECT * FROM Horse ORDER BY age DESC LIMIT 10)
489
- * LEFT JOIN ...
490
- * ```
491
- *
492
- */
493
- list<T extends object>(ctor: new () => T, opts: {
494
- includeTree?: IncludeTree<T> | null;
495
- from?: string;
496
- }): Promise<Either<string, T[]>>;
497
- /**
498
- * Retrieves a single model by primary key.
499
- * @param ctor The model constructor.
500
- * @param id The primary key value.
501
- * @param includeTree An include tree describing which related models to join.
502
- * @returns Either an error string, or the model instance (null if not found).
503
- *
504
- * ### Example:
505
- * ```ts
506
- * const orm = Orm.fromD1(env.db);
507
- * const horse = await orm.get(Horse, 1, Horse.default);
508
- * ```
509
- */
510
- get<T extends object>(ctor: new () => T, id: any, includeTree?: IncludeTree<T> | null): Promise<Either<string, T | null>>;
363
+ private db;
364
+ private constructor();
365
+ /**
366
+ * Creates an instance of an `Orm`
367
+ * @param db The database to use for ORM calls.
368
+ */
369
+ static fromD1(db: D1Database): Orm;
370
+ /**
371
+ * Maps SQL records to an instantiated Model. The records must be flat
372
+ * (e.g., of the form "id, name, address") or derive from a Cloesce data source view
373
+ * (e.g., of the form "Horse.id, Horse.name, Horse.address")
374
+ *
375
+ * Assumes the data is formatted correctly, throwing an error otherwise.
376
+ *
377
+ * @param ctor The model constructor
378
+ * @param records D1 Result records
379
+ * @param includeTree Include tree to define the relationships to join.
380
+ */
381
+ static mapSql<T extends object>(
382
+ ctor: new () => T,
383
+ records: Record<string, any>[],
384
+ includeTree?: IncludeTree<T> | null,
385
+ ): T[];
386
+ /**
387
+ * Executes an "upsert" query, adding or augmenting a model in the database.
388
+ *
389
+ * If a model's primary key is not defined in `newModel`, the query is assumed to be an insert.
390
+ *
391
+ * If a model's primary key _is_ defined, but some attributes are missing, the query is assumed to be an update.
392
+ *
393
+ * Finally, if the primary key is defined, but all attributes are included, a SQLite upsert will be performed.
394
+ *
395
+ * In any other case, an error string will be returned.
396
+ *
397
+ * ### Inserting a new Model
398
+ * ```ts
399
+ * const model = {name: "julio", lastname: "pumpkin"};
400
+ * const idRes = await orm.upsert(Person, model, null);
401
+ * ```
402
+ *
403
+ * ### Updating an existing model
404
+ * ```ts
405
+ * const model = {id: 1, name: "timothy"};
406
+ * const idRes = await orm.upsert(Person, model, null);
407
+ * // (in db)=> {id: 1, name: "timothy", lastname: "pumpkin"}
408
+ * ```
409
+ *
410
+ * ### Upserting a model
411
+ * ```ts
412
+ * // (assume a Person already exists)
413
+ * const model = {
414
+ * id: 1,
415
+ * lastname: "burger", // updates last name
416
+ * dog: {
417
+ * name: "fido" // insert dog relationship
418
+ * }
419
+ * };
420
+ * const idRes = await orm.upsert(Person, model, null);
421
+ * // (in db)=> Person: {id: 1, dogId: 1 ...} ; Dog: {id: 1, name: "fido"}
422
+ * ```
423
+ *
424
+ * @param ctor A model constructor.
425
+ * @param newModel The new or augmented model.
426
+ * @param includeTree An include tree describing which foreign keys to join.
427
+ * @returns An error string, or the primary key of the inserted model.
428
+ */
429
+ upsert<T extends object>(
430
+ ctor: new () => T,
431
+ newModel: DeepPartial<T>,
432
+ includeTree?: IncludeTree<T> | null,
433
+ ): Promise<Either<string, any>>;
434
+ /**
435
+ * Returns a select query, creating a CTE view for the model using the provided include tree.
436
+ *
437
+ * @param ctor The model constructor.
438
+ * @param includeTree An include tree describing which related models to join.
439
+ * @param from An optional custom `FROM` clause to use instead of the base table.
440
+ * @param tagCte An optional CTE name to tag the query with. Defaults to "Model.view".
441
+ *
442
+ * ### Example:
443
+ * ```ts
444
+ * // Using a data source
445
+ * const query = Orm.listQuery(Person, "default");
446
+ *
447
+ * // Using a custom from statement
448
+ * const query = Orm.listQuery(Person, null, "SELECT * FROM Person WHERE age > 18");
449
+ * ```
450
+ *
451
+ * ### Example SQL output:
452
+ * ```sql
453
+ * WITH Person_view AS (
454
+ * SELECT
455
+ * "Person"."id" AS "id",
456
+ * ...
457
+ * FROM "Person"
458
+ * LEFT JOIN ...
459
+ * )
460
+ * SELECT * FROM Person_view
461
+ * ```
462
+ */
463
+ static listQuery<T extends object>(
464
+ ctor: new () => T,
465
+ opts: {
466
+ includeTree?: IncludeTree<T> | null;
467
+ from?: string;
468
+ tagCte?: string;
469
+ },
470
+ ): string;
471
+ /**
472
+ * Returns a select query for a single model by primary key, creating a CTE view using the provided include tree.
473
+ *
474
+ * @param ctor The model constructor.
475
+ * @param includeTree An include tree describing which related models to join.
476
+ *
477
+ * ### Example:
478
+ * ```ts
479
+ * // Using a data source
480
+ * const query = Orm.getQuery(Person, "default");
481
+ * ```
482
+ *
483
+ * ### Example SQL output:
484
+ *
485
+ * ```sql
486
+ * WITH Person_view AS (
487
+ * SELECT
488
+ * "Person"."id" AS "id",
489
+ * ...
490
+ * FROM "Person"
491
+ * LEFT JOIN ...
492
+ * )
493
+ * SELECT * FROM Person_view WHERE [Person].[id] = ?
494
+ * ```
495
+ */
496
+ static getQuery<T extends object>(
497
+ ctor: new () => T,
498
+ includeTree?: IncludeTree<T> | null,
499
+ ): string;
500
+ /**
501
+ * Retrieves all instances of a model from the database.
502
+ * @param ctor The model constructor.
503
+ * @param includeTree An include tree describing which related models to join.
504
+ * @param from An optional custom `FROM` clause to use instead of the base table.
505
+ * @returns Either an error string, or an array of model instances.
506
+ *
507
+ * ### Example:
508
+ * ```ts
509
+ * const orm = Orm.fromD1(env.db);
510
+ * const horses = await orm.list(Horse, Horse.default);
511
+ * ```
512
+ *
513
+ * ### Example with custom from:
514
+ * ```ts
515
+ * const orm = Orm.fromD1(env.db);
516
+ * const adultHorses = await orm.list(Horse, Horse.default, "SELECT * FROM Horse ORDER BY age DESC LIMIT 10");
517
+ * ```
518
+ *
519
+ * =>
520
+ *
521
+ * ```sql
522
+ * SELECT
523
+ * "Horse"."id" AS "id",
524
+ * ...
525
+ * FROM (SELECT * FROM Horse ORDER BY age DESC LIMIT 10)
526
+ * LEFT JOIN ...
527
+ * ```
528
+ *
529
+ */
530
+ list<T extends object>(
531
+ ctor: new () => T,
532
+ opts: {
533
+ includeTree?: IncludeTree<T> | null;
534
+ from?: string;
535
+ },
536
+ ): Promise<Either<string, T[]>>;
537
+ /**
538
+ * Retrieves a single model by primary key.
539
+ * @param ctor The model constructor.
540
+ * @param id The primary key value.
541
+ * @param includeTree An include tree describing which related models to join.
542
+ * @returns Either an error string, or the model instance (null if not found).
543
+ *
544
+ * ### Example:
545
+ * ```ts
546
+ * const orm = Orm.fromD1(env.db);
547
+ * const horse = await orm.get(Horse, 1, Horse.default);
548
+ * ```
549
+ */
550
+ get<T extends object>(
551
+ ctor: new () => T,
552
+ id: any,
553
+ includeTree?: IncludeTree<T> | null,
554
+ ): Promise<Either<string, T | null>>;
511
555
  }
512
- //# sourceMappingURL=backend.d.ts.map
556
+ //# sourceMappingURL=backend.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../src/ui/backend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQzE,OAAO,EACL,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,EAAE,EAAE,cAAyB,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,cAAc,EAAE,cAAyB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,WAAW,EAAE,cAAyB,CAAC;AAEpD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,UAAU,EAAE,iBAA4B,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,GAAG,EAAE,eAA0B,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,eAA0B,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,GAAG,EAAE,eAA0B,CAAC;AAE7C;;;GAGG;AACH,eAAO,M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