@cretezy/d1-api
Advanced tools
Comparing version 0.0.5-test to 0.0.6-test
@@ -1,3 +0,3 @@ | ||
import type { D1QueryError, D1QueryResponse, D1Row } from './types'; | ||
export type * from './types'; | ||
import type { D1QueryError, D1QueryResponse, D1Row } from './types.js'; | ||
export type * from './types.js'; | ||
export interface D1APIOptions { | ||
@@ -13,4 +13,4 @@ accountId: string; | ||
exec<T extends D1Row>(strings: TemplateStringsArray, ...params: unknown[]): Promise<D1QueryResponse<T>>; | ||
allRaw<T extends D1Row>(sql: string, params?: unknown[]): Promise<import("./types").D1QueryResult<T>>; | ||
all<T extends D1Row>(strings: TemplateStringsArray, ...params: unknown[]): Promise<import("./types").D1QueryResult<T>>; | ||
allRaw<T extends D1Row>(sql: string, params?: unknown[]): Promise<import("./types.js").D1QueryResult<T>>; | ||
all<T extends D1Row>(strings: TemplateStringsArray, ...params: unknown[]): Promise<import("./types.js").D1QueryResult<T>>; | ||
firstRaw<T extends D1Row>(sql: string, params?: unknown[]): Promise<T | null>; | ||
@@ -17,0 +17,0 @@ first<T extends D1Row>(strings: TemplateStringsArray, ...params: unknown[]): Promise<T | null>; |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.D1Error = void 0; | ||
class D1API { | ||
export default class D1API { | ||
options; | ||
@@ -60,4 +57,3 @@ constructor(options) { | ||
} | ||
exports.default = D1API; | ||
class D1Error extends Error { | ||
export class D1Error extends Error { | ||
body; | ||
@@ -75,3 +71,2 @@ errors; | ||
} | ||
exports.D1Error = D1Error; | ||
function buildTaggedSql(strings) { | ||
@@ -78,0 +73,0 @@ return strings.reduce((sql, string, index) => { |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
export {}; |
{ | ||
"name": "@cretezy/d1-api", | ||
"version": "0.0.5-test", | ||
"version": "0.0.6-test", | ||
"description": "Use the Cloudflare D1 API outside Workers", | ||
@@ -9,2 +9,3 @@ "main": "./lib/index.js", | ||
], | ||
"type": "module", | ||
"repository": { | ||
@@ -11,0 +12,0 @@ "type": "git", |
Yes
12863
129