@atscript/db-client 0.1.147 → 0.1.148

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/dist/index.cjs CHANGED
@@ -166,6 +166,17 @@ var ActionUnsupportedError = class extends Error {
166
166
  * const all = await users.query()
167
167
  * const page = await users.pages({ filter: { active: true } }, 1, 20)
168
168
  * ```
169
+ *
170
+ * `D` (since 0.1.148) types the display-only fields the controller declares
171
+ * with `@DbDecorations`: `$select` of the read methods accepts their keys and
172
+ * rows carry them as optional properties. Filter and sort stay over `T`'s own
173
+ * fields — a decoration is never filterable or sortable.
174
+ *
175
+ * ```typescript
176
+ * const tickets = new Client<typeof Ticket, TicketDecorations>('/api/tickets')
177
+ * const rows = await tickets.query({ controls: { $select: ['title', 'ownerName'] } })
178
+ * rows[0].ownerName // string | undefined
179
+ * ```
169
180
  */
170
181
  var Client = class {
171
182
  _path;
@@ -212,6 +223,12 @@ var Client = class {
212
223
  * bucket's value is typed as its `YYYY-MM-DD` (hour: `YYYY-MM-DDTHH:00`) label
213
224
  * (`| null` for an optional source).
214
225
  * Gap-fill between labels with `nextBucketLabel` (re-exported here).
226
+ *
227
+ * Arithmetic (since 0.1.148): `{ $fn: 'sum', $expr, $as }` aggregates a per-row
228
+ * expression over numeric fields; `{ $expr, $as }` computes over aliases of other
229
+ * numeric entries or numeric `$groupBy` fields (`number | null`). `first` / `last`
230
+ * read a representative row ordered by `$rowOrder`. The URL forms are `expr(a/b):x`,
231
+ * `sum(a*b):x`, `first(f):x` and `$rowOrder=f,-id`.
215
232
  */
216
233
  async aggregate(query) {
217
234
  return this._get("query", query);
@@ -274,8 +291,9 @@ var Client = class {
274
291
  const controlStr = query?.controls ? (0, _uniqu_url_builder.buildUrl)({ controls: query.controls }) : "";
275
292
  return this._getOrNull(this._idUrl("one", id, controlStr));
276
293
  }
277
- async insert(data) {
278
- return this._request("POST", "", await this._prepareWrite(data, "insert"));
294
+ async insert(data, opts) {
295
+ const query = opts?.onConflict === "ignore" ? "?$onConflict=ignore" : "";
296
+ return this._request("POST", query, await this._prepareWrite(data, "insert"));
279
297
  }
280
298
  /**
281
299
  * `PATCH /` — partial update one or many records by primary key.
package/dist/index.d.cts CHANGED
@@ -1,13 +1,15 @@
1
- import { A as TDbDeleteResult, C as OwnOf, D as RowOf, E as RelationInfo, F as TypedWithRelation, I as Uniquery, L as UniqueryControls, M as TDbInsertResult, N as TDbQueryTarget, O as SearchIndexInfo, P as TDbUpdateResult, R as ValidGroupBy, S as NavOf, T as PatchOf, _ as DbRow, a as ValidatorMode, b as IdOf, c as AggregateResult, d as BucketUnit, f as CalendarBucketLabel, g as DbPatch, h as DataOf, j as TDbInsertManyResult, k as ServerError, l as AtscriptClientShape, m as ClientResponse, n as ClientValidator, p as ClientOptions, r as ClientValidatorOptions, s as AggregateQuery, t as ClientValidationError, u as BucketExpr, v as FieldMeta, w as PageResult, x as MetaResponse, y as FilterExpr, z as WeekStart } from "./validator-DVha6LOQ.cjs";
2
- import { AggregateExpr, AggregateQuery as AggregateQuery$1, AggregateResult as AggregateResult$1, BucketExpr as BucketExpr$1, BucketSeriesOptions, NextBucketOptions, Uniquery as Uniquery$1, UniqueryControls as UniqueryControls$1, ValidGroupBy as ValidGroupBy$1, bucketSeries, bucketStartInstant, nextBucketLabel } from "@uniqu/core";
1
+ import { A as SearchIndexInfo, B as Uniquery, C as MetaResponse, D as PatchOf, E as PageResult, F as TDbInsertManyResult, H as ValidGroupBy, I as TDbInsertResult, L as TDbQueryTarget, M as TDbDeleteResult, N as TDbInsertIgnoreResult, O as RelationInfo, P as TDbInsertManyIgnoreResult, R as TDbUpdateResult, S as IdOf, T as OwnOf, U as WeekStart, V as UniqueryControls, _ as DbRow, a as ValidatorMode, b as FieldMeta, c as AggregateResult, d as BucketUnit, f as CalendarBucketLabel, g as DbPatch, h as DataOf, j as ServerError, k as RowOf, l as AtscriptClientShape, m as ClientResponse, n as ClientValidator, p as ClientOptions, r as ClientValidatorOptions, s as AggregateQuery, t as ClientValidationError, u as BucketExpr, v as DecoratedControls, w as NavOf, x as FilterExpr, y as DecoratedQuery, z as TypedWithRelation } from "./validator-CVM7eNP7.cjs";
2
+ import { AggregateExpr, AggregateOfExpr, AggregateQuery as AggregateQuery$1, AggregateResult as AggregateResult$1, BucketExpr as BucketExpr$1, BucketSeriesOptions, NextBucketOptions, SelectArithExpr, Uniquery as Uniquery$1, ValidGroupBy as ValidGroupBy$1, bucketSeries, bucketStartInstant, nextBucketLabel } from "@uniqu/core";
3
3
  import { TAtscriptAnnotatedType, TSerializedAnnotatedType } from "@atscript/typescript/utils";
4
- import { TCrudOp, TCrudPermissions, TDbActionInfo, TDbActionInfo as TDbActionInfo$1, TDbActionIntent, TDbActionLevel, TDbActionProcessor, TDbActionTargetSummary, TDbActionTargetSummary as TDbActionTargetSummary$1, TDbAvailableActions, TDbAvailableActions as TDbAvailableActions$1, TDbDeleteResult as TDbDeleteResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1 } from "@atscript/db";
4
+ import { TCrudOp, TCrudPermissions, TDbActionInfo, TDbActionInfo as TDbActionInfo$1, TDbActionIntent, TDbActionLevel, TDbActionProcessor, TDbActionTargetSummary, TDbActionTargetSummary as TDbActionTargetSummary$1, TDbAvailableActions, TDbAvailableActions as TDbAvailableActions$1, TDbDeleteResult as TDbDeleteResult$1, TDbInsertIgnoreResult as TDbInsertIgnoreResult$1, TDbInsertManyIgnoreResult as TDbInsertManyIgnoreResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1 } from "@atscript/db";
5
5
 
6
6
  //#region src/client.d.ts
7
7
  type Own<T> = OwnOf<T>;
8
8
  type Nav<T> = NavOf<T>;
9
9
  type Id<T> = IdOf<T>;
10
10
  type Response<T, Q> = ClientResponse<T, Q>;
11
+ /** A read row: the response over the own fields plus the declared decorations `D`, each optional. */
12
+ type DecoratedRow<T, Q, D> = Response<T, Q> & Partial<D>;
11
13
  /**
12
14
  * HTTP client for moost-db REST endpoints.
13
15
  *
@@ -28,8 +30,19 @@ type Response<T, Q> = ClientResponse<T, Q>;
28
30
  * const all = await users.query()
29
31
  * const page = await users.pages({ filter: { active: true } }, 1, 20)
30
32
  * ```
33
+ *
34
+ * `D` (since 0.1.148) types the display-only fields the controller declares
35
+ * with `@DbDecorations`: `$select` of the read methods accepts their keys and
36
+ * rows carry them as optional properties. Filter and sort stay over `T`'s own
37
+ * fields — a decoration is never filterable or sortable.
38
+ *
39
+ * ```typescript
40
+ * const tickets = new Client<typeof Ticket, TicketDecorations>('/api/tickets')
41
+ * const rows = await tickets.query({ controls: { $select: ['title', 'ownerName'] } })
42
+ * rows[0].ownerName // string | undefined
43
+ * ```
31
44
  */
32
- declare class Client<T extends AtscriptClientShape = AtscriptClientShape> {
45
+ declare class Client<T extends AtscriptClientShape = AtscriptClientShape, D extends object = Record<never, never>> {
33
46
  private readonly _path;
34
47
  private readonly _baseUrl;
35
48
  private readonly _fetch;
@@ -47,7 +60,7 @@ declare class Client<T extends AtscriptClientShape = AtscriptClientShape> {
47
60
  * The response type narrows by the literal `$with` array in `query` —
48
61
  * relations not listed in `$with` are stripped from the row type.
49
62
  */
50
- query<Q extends Uniquery$1<Own<T>, Nav<T>> = Uniquery$1<Own<T>, Nav<T>>>(query?: Q): Promise<Response<T, Q>[]>;
63
+ query<Q extends DecoratedQuery<T, D> = DecoratedQuery<T, D>>(query?: Q): Promise<DecoratedRow<T, Q, D>[]>;
51
64
  /**
52
65
  * `GET /query` with `$count: true` — returns record count.
53
66
  */
@@ -62,15 +75,21 @@ declare class Client<T extends AtscriptClientShape = AtscriptClientShape> {
62
75
  * bucket's value is typed as its `YYYY-MM-DD` (hour: `YYYY-MM-DDTHH:00`) label
63
76
  * (`| null` for an optional source).
64
77
  * Gap-fill between labels with `nextBucketLabel` (re-exported here).
78
+ *
79
+ * Arithmetic (since 0.1.148): `{ $fn: 'sum', $expr, $as }` aggregates a per-row
80
+ * expression over numeric fields; `{ $expr, $as }` computes over aliases of other
81
+ * numeric entries or numeric `$groupBy` fields (`number | null`). `first` / `last`
82
+ * read a representative row ordered by `$rowOrder`. The URL forms are `expr(a/b):x`,
83
+ * `sum(a*b):x`, `first(f):x` and `$rowOrder=f,-id`.
65
84
  */
66
- aggregate<const Q extends AggregateQuery$1<Own<T>>>(query: Q & ValidGroupBy$1<Own<T>, Q>): Promise<Q["controls"]["$select"] extends readonly (string | AggregateExpr | BucketExpr$1)[] ? AggregateResult$1<Own<T>, Q["controls"]["$select"]>[] : Record<string, unknown>[]>;
85
+ aggregate<const Q extends AggregateQuery$1<Own<T>>>(query: Q & ValidGroupBy$1<Own<T>, Q>): Promise<Q["controls"]["$select"] extends readonly (string | AggregateExpr | BucketExpr$1 | AggregateOfExpr | SelectArithExpr)[] ? AggregateResult$1<Own<T>, Q["controls"]["$select"]>[] : Record<string, unknown>[]>;
67
86
  /**
68
87
  * `GET /pages` — paginated query with typed filter and relations.
69
88
  *
70
89
  * Response rows narrow by the literal `$with` array — same algebra as
71
90
  * {@link query}.
72
91
  */
73
- pages<Q extends Uniquery$1<Own<T>, Nav<T>> = Uniquery$1<Own<T>, Nav<T>>>(query?: Q, page?: number, size?: number): Promise<PageResult<Response<T, Q>>>;
92
+ pages<Q extends DecoratedQuery<T, D> = DecoratedQuery<T, D>>(query?: Q, page?: number, size?: number): Promise<PageResult<DecoratedRow<T, Q, D>>>;
74
93
  /**
75
94
  * `GET /geo` — distance-ranked geospatial search (tables with `@db.index.geo`).
76
95
  *
@@ -80,13 +99,13 @@ declare class Client<T extends AtscriptClientShape = AtscriptClientShape> {
80
99
  * in `query.controls`; filter / `$select` / `$with` / `$skip` / `$limit`
81
100
  * compose as usual.
82
101
  */
83
- geoSearch<Q extends Uniquery$1<Own<T>, Nav<T>> = Uniquery$1<Own<T>, Nav<T>>>(point: [number, number], query?: Q): Promise<Array<Response<T, Q> & {
102
+ geoSearch<Q extends DecoratedQuery<T, D> = DecoratedQuery<T, D>>(point: [number, number], query?: Q): Promise<Array<DecoratedRow<T, Q, D> & {
84
103
  $distance: number;
85
104
  }>>;
86
105
  /**
87
106
  * `GET /geo` with `$page` / `$size` — paginated distance-ranked search.
88
107
  */
89
- geoPages<Q extends Uniquery$1<Own<T>, Nav<T>> = Uniquery$1<Own<T>, Nav<T>>>(point: [number, number], query?: Q, page?: number, size?: number): Promise<PageResult<Response<T, Q> & {
108
+ geoPages<Q extends DecoratedQuery<T, D> = DecoratedQuery<T, D>>(point: [number, number], query?: Q, page?: number, size?: number): Promise<PageResult<DecoratedRow<T, Q, D> & {
90
109
  $distance: number;
91
110
  }>>;
92
111
  /**
@@ -96,10 +115,10 @@ declare class Client<T extends AtscriptClientShape = AtscriptClientShape> {
96
115
  * `query.controls` — same algebra as {@link query}.
97
116
  */
98
117
  one<Q extends {
99
- controls?: UniqueryControls$1<Own<T>, Nav<T>>;
118
+ controls?: DecoratedControls<T, D>;
100
119
  } = {
101
- controls?: UniqueryControls$1<Own<T>, Nav<T>>;
102
- }>(id: Id<T>, query?: Q): Promise<Response<T, Q> | null>;
120
+ controls?: DecoratedControls<T, D>;
121
+ }>(id: Id<T>, query?: Q): Promise<DecoratedRow<T, Q, D> | null>;
103
122
  /**
104
123
  * `POST /` — insert one record. The version column (if any) is optional —
105
124
  * the server initialises it; `$cas` is rejected (no meaning on insert).
@@ -109,6 +128,20 @@ declare class Client<T extends AtscriptClientShape = AtscriptClientShape> {
109
128
  * `POST /` — insert many records.
110
129
  */
111
130
  insert(data: PatchOf<T>[]): Promise<TDbInsertManyResult$1>;
131
+ /**
132
+ * `POST /?$onConflict=ignore` — insert one record, skipping it when it
133
+ * collides on the primary key or a unique index (since 0.1.148).
134
+ */
135
+ insert(data: PatchOf<T>, opts: {
136
+ onConflict: "ignore";
137
+ }): Promise<TDbInsertIgnoreResult$1>;
138
+ /**
139
+ * `POST /?$onConflict=ignore` — insert many records, skipping the ones that
140
+ * collide; the result reports inserted and skipped input indices (since 0.1.148).
141
+ */
142
+ insert(data: PatchOf<T>[], opts: {
143
+ onConflict: "ignore";
144
+ }): Promise<TDbInsertManyIgnoreResult$1>;
112
145
  /**
113
146
  * `PATCH /` — partial update one or many records by primary key.
114
147
  *
@@ -464,4 +497,4 @@ declare class ActionUnsupportedError extends Error {
464
497
  constructor(action: string, processor: string, message: string);
465
498
  }
466
499
  //#endregion
467
- export { ActionDisabledError, type ActionDisabledErrorBody, ActionNotFoundError, ActionTargetError, type ActionTargetErrorBody, ActionUnsupportedError, type AggregateQuery, type AggregateResult, type AtscriptClientShape, type BucketExpr, type BucketSeriesOptions, type BucketUnit, type CalendarBucketLabel, Client, ClientError, type ClientOptions, type ClientResponse, type ClientValidationError, type ClientValidator, type ClientValidatorOptions, type DataOf, type DbPatch, type DbRow, type FieldMeta, type FilterExpr, type IdOf, type MetaResponse, type NavOf, type NextBucketOptions, type OwnOf, type PageResult, type PatchOf, type RelationInfo, type RowOf, type SearchIndexInfo, type ServerError, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbActionTargetSummary, type TDbAvailableActions, type TDbDeleteResult, type TDbInsertManyResult, type TDbInsertResult, type TDbQueryTarget, type TDbUpdateResult, type TSerializedAnnotatedType, TransportError, type TypedWithRelation, type Uniquery, type UniqueryControls, type ValidGroupBy, type ValidatorMode, VersionMismatchError, type VersionMismatchErrorBody, type WeekStart, actionIdentifier, bucketSeries, bucketStartInstant, encodeNavigateId, formatIdentifier, formatIdentifierField, nextBucketLabel };
500
+ export { ActionDisabledError, type ActionDisabledErrorBody, ActionNotFoundError, ActionTargetError, type ActionTargetErrorBody, ActionUnsupportedError, type AggregateQuery, type AggregateResult, type AtscriptClientShape, type BucketExpr, type BucketSeriesOptions, type BucketUnit, type CalendarBucketLabel, Client, ClientError, type ClientOptions, type ClientResponse, type ClientValidationError, type ClientValidator, type ClientValidatorOptions, type DataOf, type DbPatch, type DbRow, type FieldMeta, type FilterExpr, type IdOf, type MetaResponse, type NavOf, type NextBucketOptions, type OwnOf, type PageResult, type PatchOf, type RelationInfo, type RowOf, type SearchIndexInfo, type ServerError, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbActionTargetSummary, type TDbAvailableActions, type TDbDeleteResult, type TDbInsertIgnoreResult, type TDbInsertManyIgnoreResult, type TDbInsertManyResult, type TDbInsertResult, type TDbQueryTarget, type TDbUpdateResult, type TSerializedAnnotatedType, TransportError, type TypedWithRelation, type Uniquery, type UniqueryControls, type ValidGroupBy, type ValidatorMode, VersionMismatchError, type VersionMismatchErrorBody, type WeekStart, actionIdentifier, bucketSeries, bucketStartInstant, encodeNavigateId, formatIdentifier, formatIdentifierField, nextBucketLabel };
package/dist/index.d.mts CHANGED
@@ -1,13 +1,15 @@
1
- import { A as TDbDeleteResult, C as OwnOf, D as RowOf, E as RelationInfo, F as TypedWithRelation, I as Uniquery, L as UniqueryControls, M as TDbInsertResult, N as TDbQueryTarget, O as SearchIndexInfo, P as TDbUpdateResult, R as ValidGroupBy, S as NavOf, T as PatchOf, _ as DbRow, a as ValidatorMode, b as IdOf, c as AggregateResult, d as BucketUnit, f as CalendarBucketLabel, g as DbPatch, h as DataOf, j as TDbInsertManyResult, k as ServerError, l as AtscriptClientShape, m as ClientResponse, n as ClientValidator, p as ClientOptions, r as ClientValidatorOptions, s as AggregateQuery, t as ClientValidationError, u as BucketExpr, v as FieldMeta, w as PageResult, x as MetaResponse, y as FilterExpr, z as WeekStart } from "./validator-xkEq4h0X.mjs";
1
+ import { A as SearchIndexInfo, B as Uniquery, C as MetaResponse, D as PatchOf, E as PageResult, F as TDbInsertManyResult, H as ValidGroupBy, I as TDbInsertResult, L as TDbQueryTarget, M as TDbDeleteResult, N as TDbInsertIgnoreResult, O as RelationInfo, P as TDbInsertManyIgnoreResult, R as TDbUpdateResult, S as IdOf, T as OwnOf, U as WeekStart, V as UniqueryControls, _ as DbRow, a as ValidatorMode, b as FieldMeta, c as AggregateResult, d as BucketUnit, f as CalendarBucketLabel, g as DbPatch, h as DataOf, j as ServerError, k as RowOf, l as AtscriptClientShape, m as ClientResponse, n as ClientValidator, p as ClientOptions, r as ClientValidatorOptions, s as AggregateQuery, t as ClientValidationError, u as BucketExpr, v as DecoratedControls, w as NavOf, x as FilterExpr, y as DecoratedQuery, z as TypedWithRelation } from "./validator-CPmmXTAt.mjs";
2
2
  import { TAtscriptAnnotatedType, TSerializedAnnotatedType } from "@atscript/typescript/utils";
3
- import { AggregateExpr, AggregateQuery as AggregateQuery$1, AggregateResult as AggregateResult$1, BucketExpr as BucketExpr$1, BucketSeriesOptions, NextBucketOptions, Uniquery as Uniquery$1, UniqueryControls as UniqueryControls$1, ValidGroupBy as ValidGroupBy$1, bucketSeries, bucketStartInstant, nextBucketLabel } from "@uniqu/core";
4
- import { TCrudOp, TCrudPermissions, TDbActionInfo, TDbActionInfo as TDbActionInfo$1, TDbActionIntent, TDbActionLevel, TDbActionProcessor, TDbActionTargetSummary, TDbActionTargetSummary as TDbActionTargetSummary$1, TDbAvailableActions, TDbAvailableActions as TDbAvailableActions$1, TDbDeleteResult as TDbDeleteResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1 } from "@atscript/db";
3
+ import { AggregateExpr, AggregateOfExpr, AggregateQuery as AggregateQuery$1, AggregateResult as AggregateResult$1, BucketExpr as BucketExpr$1, BucketSeriesOptions, NextBucketOptions, SelectArithExpr, Uniquery as Uniquery$1, ValidGroupBy as ValidGroupBy$1, bucketSeries, bucketStartInstant, nextBucketLabel } from "@uniqu/core";
4
+ import { TCrudOp, TCrudPermissions, TDbActionInfo, TDbActionInfo as TDbActionInfo$1, TDbActionIntent, TDbActionLevel, TDbActionProcessor, TDbActionTargetSummary, TDbActionTargetSummary as TDbActionTargetSummary$1, TDbAvailableActions, TDbAvailableActions as TDbAvailableActions$1, TDbDeleteResult as TDbDeleteResult$1, TDbInsertIgnoreResult as TDbInsertIgnoreResult$1, TDbInsertManyIgnoreResult as TDbInsertManyIgnoreResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1 } from "@atscript/db";
5
5
 
6
6
  //#region src/client.d.ts
7
7
  type Own<T> = OwnOf<T>;
8
8
  type Nav<T> = NavOf<T>;
9
9
  type Id<T> = IdOf<T>;
10
10
  type Response<T, Q> = ClientResponse<T, Q>;
11
+ /** A read row: the response over the own fields plus the declared decorations `D`, each optional. */
12
+ type DecoratedRow<T, Q, D> = Response<T, Q> & Partial<D>;
11
13
  /**
12
14
  * HTTP client for moost-db REST endpoints.
13
15
  *
@@ -28,8 +30,19 @@ type Response<T, Q> = ClientResponse<T, Q>;
28
30
  * const all = await users.query()
29
31
  * const page = await users.pages({ filter: { active: true } }, 1, 20)
30
32
  * ```
33
+ *
34
+ * `D` (since 0.1.148) types the display-only fields the controller declares
35
+ * with `@DbDecorations`: `$select` of the read methods accepts their keys and
36
+ * rows carry them as optional properties. Filter and sort stay over `T`'s own
37
+ * fields — a decoration is never filterable or sortable.
38
+ *
39
+ * ```typescript
40
+ * const tickets = new Client<typeof Ticket, TicketDecorations>('/api/tickets')
41
+ * const rows = await tickets.query({ controls: { $select: ['title', 'ownerName'] } })
42
+ * rows[0].ownerName // string | undefined
43
+ * ```
31
44
  */
32
- declare class Client<T extends AtscriptClientShape = AtscriptClientShape> {
45
+ declare class Client<T extends AtscriptClientShape = AtscriptClientShape, D extends object = Record<never, never>> {
33
46
  private readonly _path;
34
47
  private readonly _baseUrl;
35
48
  private readonly _fetch;
@@ -47,7 +60,7 @@ declare class Client<T extends AtscriptClientShape = AtscriptClientShape> {
47
60
  * The response type narrows by the literal `$with` array in `query` —
48
61
  * relations not listed in `$with` are stripped from the row type.
49
62
  */
50
- query<Q extends Uniquery$1<Own<T>, Nav<T>> = Uniquery$1<Own<T>, Nav<T>>>(query?: Q): Promise<Response<T, Q>[]>;
63
+ query<Q extends DecoratedQuery<T, D> = DecoratedQuery<T, D>>(query?: Q): Promise<DecoratedRow<T, Q, D>[]>;
51
64
  /**
52
65
  * `GET /query` with `$count: true` — returns record count.
53
66
  */
@@ -62,15 +75,21 @@ declare class Client<T extends AtscriptClientShape = AtscriptClientShape> {
62
75
  * bucket's value is typed as its `YYYY-MM-DD` (hour: `YYYY-MM-DDTHH:00`) label
63
76
  * (`| null` for an optional source).
64
77
  * Gap-fill between labels with `nextBucketLabel` (re-exported here).
78
+ *
79
+ * Arithmetic (since 0.1.148): `{ $fn: 'sum', $expr, $as }` aggregates a per-row
80
+ * expression over numeric fields; `{ $expr, $as }` computes over aliases of other
81
+ * numeric entries or numeric `$groupBy` fields (`number | null`). `first` / `last`
82
+ * read a representative row ordered by `$rowOrder`. The URL forms are `expr(a/b):x`,
83
+ * `sum(a*b):x`, `first(f):x` and `$rowOrder=f,-id`.
65
84
  */
66
- aggregate<const Q extends AggregateQuery$1<Own<T>>>(query: Q & ValidGroupBy$1<Own<T>, Q>): Promise<Q["controls"]["$select"] extends readonly (string | AggregateExpr | BucketExpr$1)[] ? AggregateResult$1<Own<T>, Q["controls"]["$select"]>[] : Record<string, unknown>[]>;
85
+ aggregate<const Q extends AggregateQuery$1<Own<T>>>(query: Q & ValidGroupBy$1<Own<T>, Q>): Promise<Q["controls"]["$select"] extends readonly (string | AggregateExpr | BucketExpr$1 | AggregateOfExpr | SelectArithExpr)[] ? AggregateResult$1<Own<T>, Q["controls"]["$select"]>[] : Record<string, unknown>[]>;
67
86
  /**
68
87
  * `GET /pages` — paginated query with typed filter and relations.
69
88
  *
70
89
  * Response rows narrow by the literal `$with` array — same algebra as
71
90
  * {@link query}.
72
91
  */
73
- pages<Q extends Uniquery$1<Own<T>, Nav<T>> = Uniquery$1<Own<T>, Nav<T>>>(query?: Q, page?: number, size?: number): Promise<PageResult<Response<T, Q>>>;
92
+ pages<Q extends DecoratedQuery<T, D> = DecoratedQuery<T, D>>(query?: Q, page?: number, size?: number): Promise<PageResult<DecoratedRow<T, Q, D>>>;
74
93
  /**
75
94
  * `GET /geo` — distance-ranked geospatial search (tables with `@db.index.geo`).
76
95
  *
@@ -80,13 +99,13 @@ declare class Client<T extends AtscriptClientShape = AtscriptClientShape> {
80
99
  * in `query.controls`; filter / `$select` / `$with` / `$skip` / `$limit`
81
100
  * compose as usual.
82
101
  */
83
- geoSearch<Q extends Uniquery$1<Own<T>, Nav<T>> = Uniquery$1<Own<T>, Nav<T>>>(point: [number, number], query?: Q): Promise<Array<Response<T, Q> & {
102
+ geoSearch<Q extends DecoratedQuery<T, D> = DecoratedQuery<T, D>>(point: [number, number], query?: Q): Promise<Array<DecoratedRow<T, Q, D> & {
84
103
  $distance: number;
85
104
  }>>;
86
105
  /**
87
106
  * `GET /geo` with `$page` / `$size` — paginated distance-ranked search.
88
107
  */
89
- geoPages<Q extends Uniquery$1<Own<T>, Nav<T>> = Uniquery$1<Own<T>, Nav<T>>>(point: [number, number], query?: Q, page?: number, size?: number): Promise<PageResult<Response<T, Q> & {
108
+ geoPages<Q extends DecoratedQuery<T, D> = DecoratedQuery<T, D>>(point: [number, number], query?: Q, page?: number, size?: number): Promise<PageResult<DecoratedRow<T, Q, D> & {
90
109
  $distance: number;
91
110
  }>>;
92
111
  /**
@@ -96,10 +115,10 @@ declare class Client<T extends AtscriptClientShape = AtscriptClientShape> {
96
115
  * `query.controls` — same algebra as {@link query}.
97
116
  */
98
117
  one<Q extends {
99
- controls?: UniqueryControls$1<Own<T>, Nav<T>>;
118
+ controls?: DecoratedControls<T, D>;
100
119
  } = {
101
- controls?: UniqueryControls$1<Own<T>, Nav<T>>;
102
- }>(id: Id<T>, query?: Q): Promise<Response<T, Q> | null>;
120
+ controls?: DecoratedControls<T, D>;
121
+ }>(id: Id<T>, query?: Q): Promise<DecoratedRow<T, Q, D> | null>;
103
122
  /**
104
123
  * `POST /` — insert one record. The version column (if any) is optional —
105
124
  * the server initialises it; `$cas` is rejected (no meaning on insert).
@@ -109,6 +128,20 @@ declare class Client<T extends AtscriptClientShape = AtscriptClientShape> {
109
128
  * `POST /` — insert many records.
110
129
  */
111
130
  insert(data: PatchOf<T>[]): Promise<TDbInsertManyResult$1>;
131
+ /**
132
+ * `POST /?$onConflict=ignore` — insert one record, skipping it when it
133
+ * collides on the primary key or a unique index (since 0.1.148).
134
+ */
135
+ insert(data: PatchOf<T>, opts: {
136
+ onConflict: "ignore";
137
+ }): Promise<TDbInsertIgnoreResult$1>;
138
+ /**
139
+ * `POST /?$onConflict=ignore` — insert many records, skipping the ones that
140
+ * collide; the result reports inserted and skipped input indices (since 0.1.148).
141
+ */
142
+ insert(data: PatchOf<T>[], opts: {
143
+ onConflict: "ignore";
144
+ }): Promise<TDbInsertManyIgnoreResult$1>;
112
145
  /**
113
146
  * `PATCH /` — partial update one or many records by primary key.
114
147
  *
@@ -464,4 +497,4 @@ declare class ActionUnsupportedError extends Error {
464
497
  constructor(action: string, processor: string, message: string);
465
498
  }
466
499
  //#endregion
467
- export { ActionDisabledError, type ActionDisabledErrorBody, ActionNotFoundError, ActionTargetError, type ActionTargetErrorBody, ActionUnsupportedError, type AggregateQuery, type AggregateResult, type AtscriptClientShape, type BucketExpr, type BucketSeriesOptions, type BucketUnit, type CalendarBucketLabel, Client, ClientError, type ClientOptions, type ClientResponse, type ClientValidationError, type ClientValidator, type ClientValidatorOptions, type DataOf, type DbPatch, type DbRow, type FieldMeta, type FilterExpr, type IdOf, type MetaResponse, type NavOf, type NextBucketOptions, type OwnOf, type PageResult, type PatchOf, type RelationInfo, type RowOf, type SearchIndexInfo, type ServerError, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbActionTargetSummary, type TDbAvailableActions, type TDbDeleteResult, type TDbInsertManyResult, type TDbInsertResult, type TDbQueryTarget, type TDbUpdateResult, type TSerializedAnnotatedType, TransportError, type TypedWithRelation, type Uniquery, type UniqueryControls, type ValidGroupBy, type ValidatorMode, VersionMismatchError, type VersionMismatchErrorBody, type WeekStart, actionIdentifier, bucketSeries, bucketStartInstant, encodeNavigateId, formatIdentifier, formatIdentifierField, nextBucketLabel };
500
+ export { ActionDisabledError, type ActionDisabledErrorBody, ActionNotFoundError, ActionTargetError, type ActionTargetErrorBody, ActionUnsupportedError, type AggregateQuery, type AggregateResult, type AtscriptClientShape, type BucketExpr, type BucketSeriesOptions, type BucketUnit, type CalendarBucketLabel, Client, ClientError, type ClientOptions, type ClientResponse, type ClientValidationError, type ClientValidator, type ClientValidatorOptions, type DataOf, type DbPatch, type DbRow, type FieldMeta, type FilterExpr, type IdOf, type MetaResponse, type NavOf, type NextBucketOptions, type OwnOf, type PageResult, type PatchOf, type RelationInfo, type RowOf, type SearchIndexInfo, type ServerError, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbActionTargetSummary, type TDbAvailableActions, type TDbDeleteResult, type TDbInsertIgnoreResult, type TDbInsertManyIgnoreResult, type TDbInsertManyResult, type TDbInsertResult, type TDbQueryTarget, type TDbUpdateResult, type TSerializedAnnotatedType, TransportError, type TypedWithRelation, type Uniquery, type UniqueryControls, type ValidGroupBy, type ValidatorMode, VersionMismatchError, type VersionMismatchErrorBody, type WeekStart, actionIdentifier, bucketSeries, bucketStartInstant, encodeNavigateId, formatIdentifier, formatIdentifierField, nextBucketLabel };
package/dist/index.mjs CHANGED
@@ -165,6 +165,17 @@ var ActionUnsupportedError = class extends Error {
165
165
  * const all = await users.query()
166
166
  * const page = await users.pages({ filter: { active: true } }, 1, 20)
167
167
  * ```
168
+ *
169
+ * `D` (since 0.1.148) types the display-only fields the controller declares
170
+ * with `@DbDecorations`: `$select` of the read methods accepts their keys and
171
+ * rows carry them as optional properties. Filter and sort stay over `T`'s own
172
+ * fields — a decoration is never filterable or sortable.
173
+ *
174
+ * ```typescript
175
+ * const tickets = new Client<typeof Ticket, TicketDecorations>('/api/tickets')
176
+ * const rows = await tickets.query({ controls: { $select: ['title', 'ownerName'] } })
177
+ * rows[0].ownerName // string | undefined
178
+ * ```
168
179
  */
169
180
  var Client = class {
170
181
  _path;
@@ -211,6 +222,12 @@ var Client = class {
211
222
  * bucket's value is typed as its `YYYY-MM-DD` (hour: `YYYY-MM-DDTHH:00`) label
212
223
  * (`| null` for an optional source).
213
224
  * Gap-fill between labels with `nextBucketLabel` (re-exported here).
225
+ *
226
+ * Arithmetic (since 0.1.148): `{ $fn: 'sum', $expr, $as }` aggregates a per-row
227
+ * expression over numeric fields; `{ $expr, $as }` computes over aliases of other
228
+ * numeric entries or numeric `$groupBy` fields (`number | null`). `first` / `last`
229
+ * read a representative row ordered by `$rowOrder`. The URL forms are `expr(a/b):x`,
230
+ * `sum(a*b):x`, `first(f):x` and `$rowOrder=f,-id`.
214
231
  */
215
232
  async aggregate(query) {
216
233
  return this._get("query", query);
@@ -273,8 +290,9 @@ var Client = class {
273
290
  const controlStr = query?.controls ? buildUrl({ controls: query.controls }) : "";
274
291
  return this._getOrNull(this._idUrl("one", id, controlStr));
275
292
  }
276
- async insert(data) {
277
- return this._request("POST", "", await this._prepareWrite(data, "insert"));
293
+ async insert(data, opts) {
294
+ const query = opts?.onConflict === "ignore" ? "?$onConflict=ignore" : "";
295
+ return this._request("POST", query, await this._prepareWrite(data, "insert"));
278
296
  }
279
297
  /**
280
298
  * `PATCH /` — partial update one or many records by primary key.
@@ -1,7 +1,7 @@
1
- import { AggregateQuery as AggregateQuery$1, AggregateResult as AggregateResult$1, BucketExpr as BucketExpr$1, BucketUnit, CalendarBucketLabel, FilterExpr, TypedWithRelation, Uniquery as Uniquery$1, UniqueryControls as UniqueryControls$1, ValidGroupBy as ValidGroupBy$1, WeekStart } from "@uniqu/core";
2
1
  import { TAtscriptAnnotatedType, TAtscriptTypeObject } from "@atscript/typescript/utils";
3
- import { DbPatch, DbResponse, DbRow, TDbDeleteResult as TDbDeleteResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1, TFieldMeta, TMetaResponse, TRelationInfo, TSearchIndexInfo } from "@atscript/db";
2
+ import { AggregateQuery as AggregateQuery$1, AggregateResult as AggregateResult$1, BucketExpr as BucketExpr$1, BucketUnit, CalendarBucketLabel, FilterExpr, SelectExpr, TypedWithRelation, Uniquery as Uniquery$1, UniqueryControls, ValidGroupBy as ValidGroupBy$1, WeekStart } from "@uniqu/core";
4
3
  import { DbValidationContext, ValidatorMode, ValidatorMode as ValidatorMode$1 } from "@atscript/db/validator";
4
+ import { DbPatch, DbResponse, DbRow, TDbDeleteResult as TDbDeleteResult$1, TDbInsertIgnoreResult as TDbInsertIgnoreResult$1, TDbInsertManyIgnoreResult as TDbInsertManyIgnoreResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1, TFieldMeta, TMetaResponse, TRelationInfo, TSearchIndexInfo } from "@atscript/db";
5
5
 
6
6
  //#region src/types.d.ts
7
7
  /**
@@ -96,6 +96,18 @@ type DataOf<T> = T extends {
96
96
  __dataType?: infer D;
97
97
  };
98
98
  } ? unknown extends D ? T extends (new (...a: any[]) => infer I) ? I : Record<string, unknown> : D & Record<string, unknown> : Record<string, unknown>;
99
+ /**
100
+ * `$select` controls of a read over `T` whose controller declares the display-only
101
+ * fields `D` (`@DbDecorations`): `$select` also accepts `keyof D`; filter, sort
102
+ * and every other control stay over the own fields. Since 0.1.148.
103
+ */
104
+ type DecoratedControls<T, D> = Omit<UniqueryControls<OwnOf<T>, NavOf<T>>, "$select"> & {
105
+ $select?: SelectExpr<OwnOf<T> & D>;
106
+ };
107
+ /** A read query over `T` — {@link DecoratedControls} for the controls. Since 0.1.148. */
108
+ type DecoratedQuery<T, D> = Omit<Uniquery$1<OwnOf<T>, NavOf<T>>, "controls"> & {
109
+ controls?: DecoratedControls<T, D>;
110
+ };
99
111
  /** Extract own (non-nav) properties from an Atscript annotated type. */
100
112
  type OwnOf<T> = T extends {
101
113
  __ownProps: infer O;
@@ -236,4 +248,4 @@ declare class ClientValidationError extends Error {
236
248
  */
237
249
  declare function createClientValidator(meta: MetaResponse, opts?: ClientValidatorOptions): ClientValidator;
238
250
  //#endregion
239
- export { TDbDeleteResult$1 as A, OwnOf as C, RowOf as D, RelationInfo as E, TypedWithRelation as F, Uniquery$1 as I, UniqueryControls$1 as L, TDbInsertResult$1 as M, TDbQueryTarget as N, SearchIndexInfo as O, TDbUpdateResult$1 as P, ValidGroupBy$1 as R, NavOf as S, PatchOf as T, DbRow as _, ValidatorMode$1 as a, IdOf as b, AggregateResult$1 as c, BucketUnit as d, CalendarBucketLabel as f, DbPatch as g, DataOf as h, DbValidationContext as i, TDbInsertManyResult$1 as j, ServerError as k, AtscriptClientShape as l, ClientResponse as m, ClientValidator as n, createClientValidator as o, ClientOptions as p, ClientValidatorOptions as r, AggregateQuery$1 as s, ClientValidationError as t, BucketExpr$1 as u, FieldMeta as v, PageResult as w, MetaResponse as x, FilterExpr as y, WeekStart as z };
251
+ export { SearchIndexInfo as A, Uniquery$1 as B, MetaResponse as C, PatchOf as D, PageResult as E, TDbInsertManyResult$1 as F, ValidGroupBy$1 as H, TDbInsertResult$1 as I, TDbQueryTarget as L, TDbDeleteResult$1 as M, TDbInsertIgnoreResult$1 as N, RelationInfo as O, TDbInsertManyIgnoreResult$1 as P, TDbUpdateResult$1 as R, IdOf as S, OwnOf as T, WeekStart as U, UniqueryControls as V, DbRow as _, ValidatorMode$1 as a, FieldMeta as b, AggregateResult$1 as c, BucketUnit as d, CalendarBucketLabel as f, DbPatch as g, DataOf as h, DbValidationContext as i, ServerError as j, RowOf as k, AtscriptClientShape as l, ClientResponse as m, ClientValidator as n, createClientValidator as o, ClientOptions as p, ClientValidatorOptions as r, AggregateQuery$1 as s, ClientValidationError as t, BucketExpr$1 as u, DecoratedControls as v, NavOf as w, FilterExpr as x, DecoratedQuery as y, TypedWithRelation as z };
@@ -1,7 +1,7 @@
1
+ import { AggregateQuery as AggregateQuery$1, AggregateResult as AggregateResult$1, BucketExpr as BucketExpr$1, BucketUnit, CalendarBucketLabel, FilterExpr, SelectExpr, TypedWithRelation, Uniquery as Uniquery$1, UniqueryControls, ValidGroupBy as ValidGroupBy$1, WeekStart } from "@uniqu/core";
1
2
  import { TAtscriptAnnotatedType, TAtscriptTypeObject } from "@atscript/typescript/utils";
2
- import { AggregateQuery as AggregateQuery$1, AggregateResult as AggregateResult$1, BucketExpr as BucketExpr$1, BucketUnit, CalendarBucketLabel, FilterExpr, TypedWithRelation, Uniquery as Uniquery$1, UniqueryControls as UniqueryControls$1, ValidGroupBy as ValidGroupBy$1, WeekStart } from "@uniqu/core";
3
+ import { DbPatch, DbResponse, DbRow, TDbDeleteResult as TDbDeleteResult$1, TDbInsertIgnoreResult as TDbInsertIgnoreResult$1, TDbInsertManyIgnoreResult as TDbInsertManyIgnoreResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1, TFieldMeta, TMetaResponse, TRelationInfo, TSearchIndexInfo } from "@atscript/db";
3
4
  import { DbValidationContext, ValidatorMode, ValidatorMode as ValidatorMode$1 } from "@atscript/db/validator";
4
- import { DbPatch, DbResponse, DbRow, TDbDeleteResult as TDbDeleteResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1, TFieldMeta, TMetaResponse, TRelationInfo, TSearchIndexInfo } from "@atscript/db";
5
5
 
6
6
  //#region src/types.d.ts
7
7
  /**
@@ -96,6 +96,18 @@ type DataOf<T> = T extends {
96
96
  __dataType?: infer D;
97
97
  };
98
98
  } ? unknown extends D ? T extends (new (...a: any[]) => infer I) ? I : Record<string, unknown> : D & Record<string, unknown> : Record<string, unknown>;
99
+ /**
100
+ * `$select` controls of a read over `T` whose controller declares the display-only
101
+ * fields `D` (`@DbDecorations`): `$select` also accepts `keyof D`; filter, sort
102
+ * and every other control stay over the own fields. Since 0.1.148.
103
+ */
104
+ type DecoratedControls<T, D> = Omit<UniqueryControls<OwnOf<T>, NavOf<T>>, "$select"> & {
105
+ $select?: SelectExpr<OwnOf<T> & D>;
106
+ };
107
+ /** A read query over `T` — {@link DecoratedControls} for the controls. Since 0.1.148. */
108
+ type DecoratedQuery<T, D> = Omit<Uniquery$1<OwnOf<T>, NavOf<T>>, "controls"> & {
109
+ controls?: DecoratedControls<T, D>;
110
+ };
99
111
  /** Extract own (non-nav) properties from an Atscript annotated type. */
100
112
  type OwnOf<T> = T extends {
101
113
  __ownProps: infer O;
@@ -236,4 +248,4 @@ declare class ClientValidationError extends Error {
236
248
  */
237
249
  declare function createClientValidator(meta: MetaResponse, opts?: ClientValidatorOptions): ClientValidator;
238
250
  //#endregion
239
- export { TDbDeleteResult$1 as A, OwnOf as C, RowOf as D, RelationInfo as E, TypedWithRelation as F, Uniquery$1 as I, UniqueryControls$1 as L, TDbInsertResult$1 as M, TDbQueryTarget as N, SearchIndexInfo as O, TDbUpdateResult$1 as P, ValidGroupBy$1 as R, NavOf as S, PatchOf as T, DbRow as _, ValidatorMode$1 as a, IdOf as b, AggregateResult$1 as c, BucketUnit as d, CalendarBucketLabel as f, DbPatch as g, DataOf as h, DbValidationContext as i, TDbInsertManyResult$1 as j, ServerError as k, AtscriptClientShape as l, ClientResponse as m, ClientValidator as n, createClientValidator as o, ClientOptions as p, ClientValidatorOptions as r, AggregateQuery$1 as s, ClientValidationError as t, BucketExpr$1 as u, FieldMeta as v, PageResult as w, MetaResponse as x, FilterExpr as y, WeekStart as z };
251
+ export { SearchIndexInfo as A, Uniquery$1 as B, MetaResponse as C, PatchOf as D, PageResult as E, TDbInsertManyResult$1 as F, ValidGroupBy$1 as H, TDbInsertResult$1 as I, TDbQueryTarget as L, TDbDeleteResult$1 as M, TDbInsertIgnoreResult$1 as N, RelationInfo as O, TDbInsertManyIgnoreResult$1 as P, TDbUpdateResult$1 as R, IdOf as S, OwnOf as T, WeekStart as U, UniqueryControls as V, DbRow as _, ValidatorMode$1 as a, FieldMeta as b, AggregateResult$1 as c, BucketUnit as d, CalendarBucketLabel as f, DbPatch as g, DataOf as h, DbValidationContext as i, ServerError as j, RowOf as k, AtscriptClientShape as l, ClientResponse as m, ClientValidator as n, createClientValidator as o, ClientOptions as p, ClientValidatorOptions as r, AggregateQuery$1 as s, ClientValidationError as t, BucketExpr$1 as u, DecoratedControls as v, NavOf as w, FilterExpr as x, DecoratedQuery as y, TypedWithRelation as z };
@@ -1,2 +1,2 @@
1
- import { a as ValidatorMode, i as DbValidationContext, n as ClientValidator, o as createClientValidator, r as ClientValidatorOptions, t as ClientValidationError } from "./validator-DVha6LOQ.cjs";
1
+ import { a as ValidatorMode, i as DbValidationContext, n as ClientValidator, o as createClientValidator, r as ClientValidatorOptions, t as ClientValidationError } from "./validator-CVM7eNP7.cjs";
2
2
  export { ClientValidationError, ClientValidator, ClientValidatorOptions, type DbValidationContext, type ValidatorMode, createClientValidator };
@@ -1,2 +1,2 @@
1
- import { a as ValidatorMode, i as DbValidationContext, n as ClientValidator, o as createClientValidator, r as ClientValidatorOptions, t as ClientValidationError } from "./validator-xkEq4h0X.mjs";
1
+ import { a as ValidatorMode, i as DbValidationContext, n as ClientValidator, o as createClientValidator, r as ClientValidatorOptions, t as ClientValidationError } from "./validator-CPmmXTAt.mjs";
2
2
  export { ClientValidationError, ClientValidator, ClientValidatorOptions, type DbValidationContext, type ValidatorMode, createClientValidator };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/db-client",
3
- "version": "0.1.147",
3
+ "version": "0.1.148",
4
4
  "description": "Browser-compatible HTTP client for @atscript/moost-db REST endpoints.",
5
5
  "keywords": [
6
6
  "atscript",
@@ -43,18 +43,18 @@
43
43
  "access": "public"
44
44
  },
45
45
  "dependencies": {
46
- "@uniqu/core": "^0.1.12",
47
- "@uniqu/url": "^0.1.12"
46
+ "@uniqu/core": "^0.1.13",
47
+ "@uniqu/url": "^0.1.13"
48
48
  },
49
49
  "devDependencies": {
50
- "@atscript/core": "^0.1.99",
51
- "@atscript/typescript": "^0.1.99",
52
- "unplugin-atscript": "^0.1.99",
53
- "@atscript/db": "0.1.147"
50
+ "@atscript/core": "^0.1.100",
51
+ "@atscript/typescript": "^0.1.100",
52
+ "unplugin-atscript": "^0.1.100",
53
+ "@atscript/db": "0.1.148"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@atscript/db": "^0.1.44",
57
- "@atscript/typescript": "^0.1.99"
57
+ "@atscript/typescript": "^0.1.100"
58
58
  },
59
59
  "scripts": {
60
60
  "postinstall": "asc -f dts",