@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.
- package/dist/_internal/core/schemas.d.ts +57 -57
- package/dist/_internal/core/types.d.ts +1 -1
- package/dist/_internal/runtime/virtual.d.ts +2 -2
- package/dist/core/cli/commands/link/index.js +3 -3
- package/dist/core/cli/commands/login/index.js +1 -1
- package/dist/core/cli/migration-queries.js +1 -2
- package/dist/core/cli/print-help.js +1 -1
- package/dist/core/integration/vite-plugin-db.d.ts +1 -1
- package/dist/core/integration/vite-plugin-db.js +3 -9
- package/dist/core/load-file.d.ts +6 -6
- package/dist/core/queries.d.ts +3 -3
- package/dist/core/schemas.d.ts +264 -264
- package/dist/core/types.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/virtual.js +21 -21
- package/package.json +4 -4
package/dist/core/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
import type {
|
|
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
package/dist/runtime/index.d.ts
CHANGED
|
@@ -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;
|
package/dist/runtime/index.js
CHANGED
|
@@ -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 {
|
|
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
|
}
|
package/dist/runtime/virtual.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
46
|
-
isNotNull,
|
|
47
|
-
inArray,
|
|
48
|
-
notInArray,
|
|
49
|
-
exists,
|
|
50
|
-
notExists,
|
|
51
|
-
between,
|
|
60
|
+
not,
|
|
52
61
|
notBetween,
|
|
53
|
-
|
|
54
|
-
ilike,
|
|
62
|
+
notExists,
|
|
55
63
|
notIlike,
|
|
56
|
-
|
|
57
|
-
asc,
|
|
58
|
-
desc,
|
|
59
|
-
and,
|
|
64
|
+
notInArray,
|
|
60
65
|
or,
|
|
61
|
-
|
|
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.
|
|
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.
|
|
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": "
|
|
87
|
-
"astro
|
|
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",
|