Comparing version 6.0.29 to 6.1.0-leo-ron-1099-experimental-67
#!/usr/bin/env bun | ||
// package.json | ||
var version = "6.0.29"; | ||
var version = "6.1.0-leo-ron-1099-experimental-67"; | ||
@@ -6,0 +6,0 @@ // src/bin/index.ts |
@@ -1,2 +0,2 @@ | ||
import { Q as QueryHandlerOptions, P as PromiseTuple } from './utils-Y8ub49mm.js'; | ||
import { Q as QueryHandlerOptions, P as PromiseTuple } from './utils-BjfAHZhS.js'; | ||
import { GetQuery, SetQuery, AddQuery, RemoveQuery, CountQuery, CreateQuery, AlterQuery, ModelField, ModelIndex, ModelTrigger, ModelPreset, DropQuery } from '@ronin/compiler'; | ||
@@ -59,2 +59,4 @@ import { DeepCallable } from '@ronin/syntax/queries'; | ||
batch: <T extends [Promise<any>, ...Array<Promise<any>>] | Array<Promise<any>>>(operations: () => T, queryOptions?: Record<string, unknown>) => Promise<PromiseTuple<T>>; | ||
sql: (strings: TemplateStringsArray, ...values: Array<unknown>) => Promise<any>; | ||
sqlBatch: <T extends [Promise<any>, ...Array<Promise<any>>] | Array<Promise<any>>>(operations: () => T, queryOptions?: Record<string, unknown>) => Promise<PromiseTuple<T>>; | ||
}; | ||
@@ -70,3 +72,5 @@ declare const get: DeepCallable<GetQuery>; | ||
declare const batch: <T extends [Promise<any>, ...Array<Promise<any>>] | Array<Promise<any>>>(operations: () => T, queryOptions?: Record<string, unknown>) => Promise<PromiseTuple<T>>; | ||
declare const sql: (strings: TemplateStringsArray, ...values: Array<unknown>) => Promise<any>; | ||
declare const sqlBatch: <T extends [Promise<any>, ...Array<Promise<any>>] | Array<Promise<any>>>(operations: () => T, queryOptions?: Record<string, unknown>) => Promise<PromiseTuple<T>>; | ||
export { add, alter, batch, count, create, createSyntaxFactory, createSyntaxFactory as default, drop, get, remove, set }; | ||
export { add, alter, batch, count, create, createSyntaxFactory, createSyntaxFactory as default, drop, get, remove, set, sql, sqlBatch }; |
import { | ||
isStorableObject, | ||
mergeOptions, | ||
runQueries, | ||
runQueriesWithStorageAndHooks | ||
} from "./chunk-76QKP2ER.js"; | ||
} from "./chunk-AT4DBHED.js"; | ||
// src/utils/handlers.ts | ||
var queriesHandler = async (queries, options = {}) => { | ||
var queriesHandler = (queries, options = {}) => { | ||
if (!options.token && typeof process !== "undefined") { | ||
@@ -23,6 +24,10 @@ const token2 = typeof process?.env !== "undefined" ? process.env.RONIN_TOKEN : typeof import.meta?.env !== "undefined" ? import.meta.env.RONIN_TOKEN : void 0; | ||
} | ||
if ("statements" in queries) { | ||
return runQueries({ statements: queries.statements }, options); | ||
} | ||
return runQueriesWithStorageAndHooks(queries, options); | ||
}; | ||
var queryHandler = async (query, options) => { | ||
const results = await queriesHandler([query], options); | ||
const input = "statement" in query ? { statements: [query.statement] } : [query]; | ||
const results = await queriesHandler(input, options); | ||
return results[0]; | ||
@@ -34,3 +39,5 @@ }; | ||
getBatchProxy, | ||
getSyntaxProxy | ||
getBatchProxySQL, | ||
getSyntaxProxy, | ||
getSyntaxProxySQL | ||
} from "@ronin/syntax/queries"; | ||
@@ -63,2 +70,11 @@ var createSyntaxFactory = (options) => { | ||
return queriesHandler(queries, finalOptions); | ||
}, | ||
sql: getSyntaxProxySQL({ | ||
callback: (statement) => queryHandler({ statement }, mergeOptions(options, {})) | ||
}), | ||
sqlBatch: (operations, queryOptions) => { | ||
const batchOperations = operations; | ||
const statements = getBatchProxySQL(batchOperations); | ||
const finalOptions = mergeOptions(options, queryOptions); | ||
return queriesHandler({ statements }, finalOptions); | ||
} | ||
@@ -77,2 +93,4 @@ }; | ||
var batch = factory.batch; | ||
var sql = factory.sql; | ||
var sqlBatch = factory.sqlBatch; | ||
var index_default = createSyntaxFactory; | ||
@@ -90,3 +108,5 @@ export { | ||
remove, | ||
set | ||
set, | ||
sql, | ||
sqlBatch | ||
}; |
@@ -1,4 +0,4 @@ | ||
export { A as AddHook, a as AfterAddHook, p as AfterAlterHook, j as AfterCountHook, m as AfterCreateHook, r as AfterDropHook, c as AfterGetHook, t as AfterHookHandler, h as AfterRemoveHook, e as AfterSetHook, n as AlterHook, B as BeforeAddHook, o as BeforeAlterHook, i as BeforeCountHook, l as BeforeCreateHook, q as BeforeDropHook, b as BeforeGetHook, s as BeforeHookHandler, g as BeforeRemoveHook, d as BeforeSetHook, C as CountHook, k as CreateHook, D as DropHook, u as DuringHookHandler, G as GetHook, H as HookContext, P as PromiseTuple, Q as QueryHandlerOptions, f as RemoveHook, R as Results, S as SetHook } from '../utils-Y8ub49mm.js'; | ||
export { A as AddHook, a as AfterAddHook, o as AfterAlterHook, i as AfterCountHook, l as AfterCreateHook, q as AfterDropHook, c as AfterGetHook, s as AfterHookHandler, g as AfterRemoveHook, e as AfterSetHook, m as AlterHook, B as BeforeAddHook, n as BeforeAlterHook, h as BeforeCountHook, k as BeforeCreateHook, p as BeforeDropHook, b as BeforeGetHook, r as BeforeHookHandler, f as BeforeRemoveHook, d as BeforeSetHook, C as CountHook, j as CreateHook, D as DropHook, t as DuringHookHandler, F as FormattedResults, G as GetHook, H as HookContext, P as PromiseTuple, Q as QueryHandlerOptions, R as RemoveHook, S as SetHook } from '../utils-BjfAHZhS.js'; | ||
export { AddInstructions, AddQuery, AddInstructions as AddQueryInstructions, CountInstructions, CountQuery, CountInstructions as CountQueryInstructions, GetInstructions, GetQuery, GetInstructions as GetQueryInstructions, Query, QueryInstruction, QueryType, RemoveInstructions, RemoveQuery, RemoveInstructions as RemoveQueryInstructions, SetInstructions, SetQuery, SetInstructions as SetQueryInstructions, StoredObject, WithInstruction } from '@ronin/compiler'; | ||
export { a as StorableObjectValue } from '../index-C_FCUYJ9.js'; | ||
export { a as StorableObjectValue } from '../index-eWDk2HVU.js'; | ||
import 'node:async_hooks'; |
@@ -1,4 +0,4 @@ | ||
import { Q as QueryHandlerOptions, R as Results } from '../utils-Y8ub49mm.js'; | ||
import { Query, StoredObject } from '@ronin/compiler'; | ||
import { S as StorableObject } from '../index-C_FCUYJ9.js'; | ||
import { Q as QueryHandlerOptions, F as FormattedResults } from '../utils-BjfAHZhS.js'; | ||
import { ResultRecord, Query, StoredObject } from '@ronin/compiler'; | ||
import { S as StorableObject } from '../index-eWDk2HVU.js'; | ||
import 'node:async_hooks'; | ||
@@ -9,3 +9,3 @@ | ||
* | ||
* @param queries - A list of queries to execute. | ||
* @param queries - A list of RONIN queries to execute. | ||
* @param options - A list of options to change how the queries are executed. | ||
@@ -15,3 +15,3 @@ * | ||
*/ | ||
declare const runQueriesWithStorageAndHooks: <T>(queries: Array<Query>, options?: QueryHandlerOptions) => Promise<Results<T>>; | ||
declare const runQueriesWithStorageAndHooks: <T extends ResultRecord>(queries: Array<Query>, options?: QueryHandlerOptions) => Promise<FormattedResults<T>>; | ||
@@ -30,19 +30,2 @@ /** | ||
interface InvalidQueryErrorDetails { | ||
message: string; | ||
query: string | null; | ||
path: string | null; | ||
details: string; | ||
code: string; | ||
fields: Array<string>; | ||
} | ||
declare class InvalidQueryError extends Error { | ||
message: InvalidQueryErrorDetails['message']; | ||
query: InvalidQueryErrorDetails['query']; | ||
path: InvalidQueryErrorDetails['path']; | ||
details: InvalidQueryErrorDetails['details']; | ||
code: InvalidQueryErrorDetails['code']; | ||
fields: InvalidQueryErrorDetails['fields']; | ||
constructor(details: InvalidQueryErrorDetails); | ||
} | ||
interface InvalidResponseErrorDetails { | ||
@@ -58,2 +41,2 @@ message: string; | ||
export { InvalidQueryError, InvalidResponseError, processStorableObjects, runQueriesWithStorageAndHooks as runQueries }; | ||
export { InvalidResponseError, processStorableObjects, runQueriesWithStorageAndHooks as runQueries }; |
import { | ||
InvalidQueryError, | ||
InvalidResponseError, | ||
processStorableObjects, | ||
runQueriesWithStorageAndHooks | ||
} from "../chunk-76QKP2ER.js"; | ||
} from "../chunk-AT4DBHED.js"; | ||
export { | ||
InvalidQueryError, | ||
InvalidResponseError, | ||
@@ -10,0 +8,0 @@ processStorableObjects, |
{ | ||
"name": "ronin", | ||
"version": "6.0.29", | ||
"version": "6.1.0-leo-ron-1099-experimental-67", | ||
"type": "module", | ||
@@ -75,9 +75,9 @@ "description": "Access your RONIN database via TypeScript.", | ||
"dependencies": { | ||
"@ronin/cli": "0.2.31", | ||
"@ronin/compiler": "0.14.14", | ||
"@ronin/syntax": "0.2.13" | ||
"@ronin/cli": "0.2.32", | ||
"@ronin/compiler": "0.16.1", | ||
"@ronin/syntax": "0.2.15" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.9.4", | ||
"@types/bun": "1.2.1", | ||
"@types/bun": "1.2.2", | ||
"tsup": "8.3.6", | ||
@@ -84,0 +84,0 @@ "typescript": "5.7.3" |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
50297
797
1
3
+ Added@ronin/cli@0.2.32(transitive)
+ Added@ronin/compiler@0.16.1(transitive)
+ Added@ronin/syntax@0.2.15(transitive)
- Removed@ronin/cli@0.2.31(transitive)
- Removed@ronin/compiler@0.14.14(transitive)
- Removed@ronin/syntax@0.2.13(transitive)
Updated@ronin/cli@0.2.32
Updated@ronin/compiler@0.16.1
Updated@ronin/syntax@0.2.15