@astrojs/db 0.14.5 → 0.14.7

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.
@@ -43,6 +43,6 @@ export declare function defineDb(userConfig: DBConfigInput): {
43
43
  export declare const NOW: import("drizzle-orm").SQL<unknown>;
44
44
  export declare const TRUE: import("drizzle-orm").SQL<unknown>;
45
45
  export declare const FALSE: import("drizzle-orm").SQL<unknown>;
46
- export { sql, eq, gt, gte, lt, lte, ne, isNull, isNotNull, inArray, notInArray, exists, notExists, between, notBetween, like, notIlike, not, asc, desc, and, or, count, countDistinct, avg, avgDistinct, sum, sumDistinct, max, min, } from 'drizzle-orm';
46
+ export { sql, eq, gt, gte, lt, lte, ne, isNull, isNotNull, inArray, notInArray, exists, notExists, between, notBetween, like, ilike, notIlike, not, asc, desc, and, or, count, countDistinct, avg, avgDistinct, sum, sumDistinct, max, min, } from 'drizzle-orm';
47
47
  export { alias } from 'drizzle-orm/sqlite-core';
48
48
  export { isDbError } from './utils.js';
@@ -33,7 +33,7 @@ async function cmd({
33
33
  ASTRO_DATABASE_FILE,
34
34
  new URL(DB_PATH, astroConfig.root).href
35
35
  );
36
- const db = createLocalDatabaseClient({ dbUrl, enableTransations: dbInfo.type === "libsql" });
36
+ const db = createLocalDatabaseClient({ dbUrl, enableTransactions: dbInfo.type === "libsql" });
37
37
  const result = await db.run(sql.raw(query));
38
38
  console.log(result);
39
39
  }
@@ -27,7 +27,7 @@ function printHelp({
27
27
  message.push(
28
28
  linebreak(),
29
29
  ` ${bgGreen(black(` ${commandName} `))} ${green(
30
- `v${"0.14.5"}`
30
+ `v${"0.14.7"}`
31
31
  )} ${headline}`
32
32
  );
33
33
  }
@@ -140,7 +140,7 @@ async function recreateTables({ tables, root }) {
140
140
  const dbInfo = getRemoteDatabaseInfo();
141
141
  const { ASTRO_DATABASE_FILE } = getAstroEnv();
142
142
  const dbUrl = normalizeDatabaseUrl(ASTRO_DATABASE_FILE, new URL(DB_PATH, root).href);
143
- const db = createLocalDatabaseClient({ dbUrl, enableTransations: dbInfo.type === "libsql" });
143
+ const db = createLocalDatabaseClient({ dbUrl, enableTransactions: dbInfo.type === "libsql" });
144
144
  const setupQueries = [];
145
145
  for (const [name, table] of Object.entries(tables.get() ?? {})) {
146
146
  const dropQuery = sql.raw(`DROP TABLE IF EXISTS ${sqlite.escapeName(name)}`);
@@ -2,7 +2,7 @@ import type { LibSQLDatabase } from 'drizzle-orm/libsql';
2
2
  import { type SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
3
3
  type LocalDbClientOptions = {
4
4
  dbUrl: string;
5
- enableTransations: boolean;
5
+ enableTransactions: boolean;
6
6
  };
7
7
  export declare function createLocalDatabaseClient(options: LocalDbClientOptions): LibSQLDatabase;
8
8
  type RemoteDbClientOptions = {
@@ -17,7 +17,7 @@ function createLocalDatabaseClient(options) {
17
17
  const url = isWebContainer ? "file:content.db" : options.dbUrl;
18
18
  const client = createClient({ url });
19
19
  const db = drizzleLibsql(client);
20
- if (!options.enableTransations) {
20
+ if (!options.enableTransactions) {
21
21
  applyTransactionNotSupported(db);
22
22
  }
23
23
  return db;
@@ -51,6 +51,7 @@ import {
51
51
  between,
52
52
  notBetween,
53
53
  like,
54
+ ilike,
54
55
  notIlike,
55
56
  not,
56
57
  asc,
@@ -88,6 +89,7 @@ export {
88
89
  exists,
89
90
  gt,
90
91
  gte,
92
+ ilike,
91
93
  inArray,
92
94
  isDbError,
93
95
  isNotNull,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/db",
3
- "version": "0.14.5",
3
+ "version": "0.14.7",
4
4
  "description": "Add libSQL and Astro Studio support to your Astro site",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -72,18 +72,18 @@
72
72
  "open": "^10.1.0",
73
73
  "prompts": "^2.4.2",
74
74
  "yargs-parser": "^21.1.1",
75
- "yocto-spinner": "^0.1.0",
76
- "zod": "^3.23.8",
77
- "@astrojs/studio": "0.1.3"
75
+ "yocto-spinner": "^0.2.0",
76
+ "zod": "^3.24.1",
77
+ "@astrojs/studio": "0.1.4"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@types/deep-diff": "^1.0.5",
81
81
  "@types/prompts": "^2.4.9",
82
82
  "@types/yargs-parser": "^21.0.3",
83
83
  "cheerio": "1.0.0",
84
- "typescript": "^5.6.3",
85
- "vite": "^6.0.5",
86
- "astro": "5.1.1",
84
+ "typescript": "^5.7.3",
85
+ "vite": "^6.0.11",
86
+ "astro": "5.4.0",
87
87
  "astro-scripts": "0.0.14"
88
88
  },
89
89
  "scripts": {
package/virtual.d.ts CHANGED
@@ -28,6 +28,7 @@ declare module 'astro:db' {
28
28
  export const between: RuntimeConfig['between'];
29
29
  export const notBetween: RuntimeConfig['notBetween'];
30
30
  export const like: RuntimeConfig['like'];
31
+ export const ilike: RuntimeConfig['ilike'];
31
32
  export const notIlike: RuntimeConfig['notIlike'];
32
33
  export const not: RuntimeConfig['not'];
33
34
  export const asc: RuntimeConfig['asc'];