New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ronin

Package Overview
Dependencies
Maintainers
4
Versions
1959
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ronin - npm Package Compare versions

Comparing version 6.0.19 to 6.0.20-leo-ron-1099-experimental-36

dist/chunk-MTB4U7YJ.js

49

dist/index.d.ts

@@ -1,49 +0,8 @@

import { R as ReducedFunction, Q as QueryHandlerOptions, P as PromiseTuple } from './utils-DIZyYZQi.js';
import { ResultRecord as ResultRecord$1, GetQuery, SetQuery, AddQuery, RemoveQuery, CountQuery, CreateQuery, Model, AlterQuery, ModelField, ModelIndex, ModelTrigger, ModelPreset, DropQuery } from '@ronin/compiler';
import { Q as QueryHandlerOptions, P as PromiseTuple } from './utils-Y8ub49mm.js';
import { GetQuery, SetQuery, AddQuery, RemoveQuery, CountQuery, CreateQuery, AlterQuery, ModelField, ModelIndex, ModelTrigger, ModelPreset, DropQuery } from '@ronin/compiler';
import { DeepCallable } from '@ronin/syntax/queries';
import { Model } from '@ronin/syntax/schema';
import 'node:async_hooks';
type ResultRecord = Omit<ResultRecord$1, 'ronin'> & {
ronin: Omit<ResultRecord$1['ronin'], 'createdAt' | 'updatedAt'> & {
createdAt: Date;
updatedAt: Date;
};
};
/**
* A recursive type making every property callable and chainable.
*
* - If `Query` (minus null/undefined) is an object:
* -- The call signature is `(arg?: Partial<NonNullable<Query>>) => Promise<Result> & DeepCallable<Query>`.
* -- Each key in `Query` is also a `DeepCallable`, excluding null/undefined from the
* sub-type so that calls to optional properties do not raise "possibly undefined" errors.
*
* - Otherwise (if it's a primitive like string/number/etc, or strictly null/undefined):
* -- The call signature is `(arg?: Query) => Promise<Result> & DeepCallable<Query>`.
* -- Can call it with an optional argument, and it returns a promise & chainable methods.
*
* This approach means you can do e.g. `get.spaces.orderedBy.descending(['handle'])`
* without TS complaining about `descending` being possibly undefined, and every call
* remains `await`able (returning `Result`) as well as chainable.
*/
type DeepCallable<Query, Result = ResultRecord> = [NonNullable<Query>] extends [
object
] ? /**
* Calls the object with an optional partial argument, returning a promise that
* resolves to `Result` and also remains a DeepCallable for further nested calls.
*/ ObjectCall<Query, Result, Partial<NonNullable<Query>>> & {
[K in keyof NonNullable<Query>]-?: DeepCallable<Exclude<NonNullable<Query>[K], null | undefined>, Result>;
} : ObjectCall<Query, Result, Query>;
/**
* A helper function type used by `DeepCallable`.
*
* @typeParam Query - The `Query` type for recursion.
* @typeParam DefaultResult - The default result if no generic is specified.
* @typeParam Arg - The type of the call's optional argument.
*
* The call returns a `Promise<FinalResult>`, with `FinalResult` defaulting to
* `DefaultResult` if no generic is provided. It also remains chainable by returning
* `DeepCallable<Query, FinalResult>`.
*/
type ObjectCall<Query, DefaultResult, Arg> = (<FinalResult = DefaultResult>(arg?: Arg) => Promise<FinalResult> & DeepCallable<Query, FinalResult>) & ReducedFunction;
/**
* Creates a syntax factory for generating and executing queries.

@@ -50,0 +9,0 @@ *

import {
mergeOptions,
runQueriesWithStorageAndHooks
} from "./chunk-BZGMJ4AM.js";
} from "./chunk-MTB4U7YJ.js";

@@ -30,3 +30,6 @@ // src/utils/handlers.ts

// src/index.ts
import { getBatchProxy, getSyntaxProxy } from "@ronin/syntax/queries";
import {
getBatchProxy,
getSyntaxProxy
} from "@ronin/syntax/queries";
var createSyntaxFactory = (options) => {

@@ -39,19 +42,7 @@ const callback = (query, queryOptions) => queryHandler(query, mergeOptions(options, queryOptions));

add: getSyntaxProxy({ rootProperty: "add", callback }),
remove: getSyntaxProxy({
rootProperty: "remove",
callback
}),
count: getSyntaxProxy({
rootProperty: "count",
callback
}),
remove: getSyntaxProxy({ rootProperty: "remove", callback }),
count: getSyntaxProxy({ rootProperty: "count", callback }),
// Query types for interacting with the database schema.
create: getSyntaxProxy({
rootProperty: "create",
callback
}),
alter: getSyntaxProxy({
rootProperty: "alter",
callback
}),
create: getSyntaxProxy({ rootProperty: "create", callback }),
alter: getSyntaxProxy({ rootProperty: "alter", callback }),
drop: getSyntaxProxy({ rootProperty: "drop", callback }),

@@ -58,0 +49,0 @@ // Function for executing a transaction containing multiple queries.

@@ -1,4 +0,4 @@

export { A as AddHook, b as AfterAddHook, q as AfterAlterHook, k as AfterCountHook, n as AfterCreateHook, s as AfterDropHook, d as AfterGetHook, u as AfterHookHandler, i as AfterRemoveHook, f as AfterSetHook, o as AlterHook, B as BeforeAddHook, p as BeforeAlterHook, j as BeforeCountHook, m as BeforeCreateHook, r as BeforeDropHook, c as BeforeGetHook, t as BeforeHookHandler, h as BeforeRemoveHook, e as BeforeSetHook, C as CountHook, l as CreateHook, D as DropHook, v as DuringHookHandler, G as GetHook, H as HookContext, P as PromiseTuple, Q as QueryHandlerOptions, g as RemoveHook, a as Results, S as SetHook } from '../utils-DIZyYZQi.js';
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 { 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-q0y6xKOy.js';
export { a as StorableObjectValue } from '../index-C_FCUYJ9.js';
import 'node:async_hooks';

@@ -1,4 +0,4 @@

import { Q as QueryHandlerOptions, a as Results } from '../utils-DIZyYZQi.js';
import { Q as QueryHandlerOptions, R as Results } from '../utils-Y8ub49mm.js';
import { Query, StoredObject } from '@ronin/compiler';
import { S as StorableObject } from '../index-q0y6xKOy.js';
import { S as StorableObject } from '../index-C_FCUYJ9.js';
import 'node:async_hooks';

@@ -5,0 +5,0 @@

@@ -6,3 +6,3 @@ import {

runQueriesWithStorageAndHooks
} from "../chunk-BZGMJ4AM.js";
} from "../chunk-MTB4U7YJ.js";
export {

@@ -9,0 +9,0 @@ InvalidQueryError,

{
"name": "ronin",
"version": "6.0.19",
"version": "6.0.20-leo-ron-1099-experimental-36",
"type": "module",

@@ -72,8 +72,8 @@ "license": "Apache-2.0",

"@ronin/cli": "0.2.23",
"@ronin/compiler": "0.14.9",
"@ronin/syntax": "0.2.5"
"@ronin/compiler": "0.14.10",
"@ronin/syntax": "0.2.6"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/bun": "1.1.18",
"@types/bun": "1.2.0",
"tsup": "8.3.5",

@@ -80,0 +80,0 @@ "typescript": "5.7.3"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc