@astrojs/db 0.15.0 → 0.15.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,5 +1,5 @@
1
1
  import type { z } from 'zod';
2
- import type { MaybeArray, booleanColumnSchema, columnSchema, columnsSchema, dateColumnSchema, dbConfigSchema, indexSchema, jsonColumnSchema, numberColumnOptsSchema, numberColumnSchema, referenceableColumnSchema, resolvedIndexSchema, tableSchema, textColumnOptsSchema, textColumnSchema } from './schemas.js';
2
+ import type { booleanColumnSchema, columnSchema, columnsSchema, dateColumnSchema, dbConfigSchema, indexSchema, jsonColumnSchema, MaybeArray, numberColumnOptsSchema, numberColumnSchema, referenceableColumnSchema, resolvedIndexSchema, tableSchema, textColumnOptsSchema, textColumnSchema } from './schemas.js';
3
3
  export type ResolvedIndexes = z.output<typeof dbConfigSchema>['tables'][string]['indexes'];
4
4
  export type BooleanColumn = z.infer<typeof booleanColumnSchema>;
5
5
  export type BooleanColumnInput = z.input<typeof booleanColumnSchema>;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export type { TableConfig } from './core/types.js';
2
1
  export { cli } from './core/cli/index.js';
3
2
  export { integration as default } from './core/integration/index.js';
3
+ export type { TableConfig } from './core/types.js';
@@ -2,8 +2,8 @@ import { type ColumnDataType } from 'drizzle-orm';
2
2
  import type { LibSQLDatabase } from 'drizzle-orm/libsql';
3
3
  import type { DBColumn, DBTable } from '../core/types.js';
4
4
  export type Database = LibSQLDatabase;
5
+ export { createLocalDatabaseClient, createRemoteDatabaseClient } from './db-client.js';
5
6
  export type { Table } from './types.js';
6
- export { createRemoteDatabaseClient, createLocalDatabaseClient } from './db-client.js';
7
7
  export declare function hasPrimaryKey(column: DBColumn): boolean;
8
8
  export declare function asDrizzleTable(name: string, table: DBTable): import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
9
9
  name: string;
@@ -8,7 +8,7 @@ import {
8
8
  } from "drizzle-orm/sqlite-core";
9
9
  import { isSerializedSQL } from "./types.js";
10
10
  import { pathToFileURL } from "./utils.js";
11
- import { createRemoteDatabaseClient, createLocalDatabaseClient } from "./db-client.js";
11
+ import { createLocalDatabaseClient, createRemoteDatabaseClient } from "./db-client.js";
12
12
  function hasPrimaryKey(column) {
13
13
  return "primaryKey" in column.schema && !!column.schema.primaryKey;
14
14
  }
@@ -35,37 +35,37 @@ const NOW = _sql`CURRENT_TIMESTAMP`;
35
35
  const TRUE = _sql`TRUE`;
36
36
  const FALSE = _sql`FALSE`;
37
37
  import {
38
- sql,
38
+ and,
39
+ asc,
40
+ avg,
41
+ avgDistinct,
42
+ between,
43
+ count,
44
+ countDistinct,
45
+ desc,
39
46
  eq,
47
+ exists,
40
48
  gt,
41
49
  gte,
50
+ ilike,
51
+ inArray,
52
+ isNotNull,
53
+ isNull,
54
+ like,
42
55
  lt,
43
56
  lte,
57
+ max,
58
+ min,
44
59
  ne,
45
- isNull,
46
- isNotNull,
47
- inArray,
48
- notInArray,
49
- exists,
50
- notExists,
51
- between,
60
+ not,
52
61
  notBetween,
53
- like,
54
- ilike,
62
+ notExists,
55
63
  notIlike,
56
- not,
57
- asc,
58
- desc,
59
- and,
64
+ notInArray,
60
65
  or,
61
- count,
62
- countDistinct,
63
- avg,
64
- avgDistinct,
66
+ sql,
65
67
  sum,
66
- sumDistinct,
67
- max,
68
- min
68
+ sumDistinct
69
69
  } from "drizzle-orm";
70
70
  import { alias } from "drizzle-orm/sqlite-core";
71
71
  import { isDbError } from "./utils.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/db",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "Add libSQL and Astro Studio support to your Astro site",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -73,7 +73,7 @@
73
73
  "prompts": "^2.4.2",
74
74
  "yargs-parser": "^21.1.1",
75
75
  "yocto-spinner": "^0.2.1",
76
- "zod": "^3.24.2",
76
+ "zod": "^3.24.4",
77
77
  "@astrojs/studio": "0.1.9"
78
78
  },
79
79
  "devDependencies": {
@@ -83,8 +83,8 @@
83
83
  "cheerio": "1.0.0",
84
84
  "typescript": "^5.8.3",
85
85
  "vite": "^6.3.4",
86
- "astro": "5.8.1",
87
- "astro-scripts": "0.0.14"
86
+ "astro-scripts": "0.0.14",
87
+ "astro": "5.12.4"
88
88
  },
89
89
  "scripts": {
90
90
  "types:virtual": "tsc -p ./tsconfig.virtual.json",