Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@instantdb/core

Package Overview
Dependencies
Maintainers
0
Versions
205
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@instantdb/core - npm Package Compare versions

Comparing version 0.12.29 to 0.12.30

1

dist/coreTypes.d.ts

@@ -6,3 +6,4 @@ import { TxChunk } from "./instatx";

tx: TxChunk<Schema extends InstantGraph<any, any> ? Schema : InstantGraph<any, any>>;
withCardinalityInference?: WithCardinalityInference;
}
//# sourceMappingURL=coreTypes.d.ts.map

5

dist/helperTypes.d.ts
import { InstaQLQueryParams, InstaQLQueryResult, Remove$ } from "./queryTypes";
import { InstantGraph } from "./schema";
import { IDatabase } from "./coreTypes";
export type InstantQuery<_DB extends IDatabase<any, any, any>> = _DB extends IDatabase<infer Schema, any, any> ? Schema extends InstantGraph<any, any, any> ? InstaQLQueryParams<Schema> : never : never;
export type InstantQueryResult<_DB extends IDatabase<any, any, any>, Q> = _DB extends IDatabase<infer Schema, any, infer CardinalityInference> ? Schema extends InstantGraph<infer E, any> ? InstaQLQueryResult<E, Remove$<Q>, CardinalityInference> : never : never;
export type InstantQuery<DB extends IDatabase<any, any, any>> = DB extends IDatabase<infer Schema, any, any> ? Schema extends InstantGraph<any, any, any> ? InstaQLQueryParams<Schema> : never : never;
export type InstantQueryResult<DB extends IDatabase<any, any, any>, Q> = DB extends IDatabase<infer Schema, any, infer CardinalityInference> ? Schema extends InstantGraph<infer E, any> ? InstaQLQueryResult<E, Remove$<Q>, CardinalityInference> : never : never;
export type InstantSchema<DB extends IDatabase<any, any, any>> = DB extends IDatabase<infer Schema, any, any> ? Schema : never;
//# sourceMappingURL=helperTypes.d.ts.map

@@ -7,8 +7,8 @@ import Reactor from "./Reactor";

import WindowNetworkListener from "./WindowNetworkListener";
import * as i from "./schema";
import type { PresenceOpts, PresenceResponse, PresenceSlice, RoomSchemaShape } from "./presence";
import * as i from "./schema";
import type { IDatabase } from "./coreTypes";
import type { Query, QueryResponse, PageInfoResponse, Exactly, InstantObject, InstaQLQueryParams } from "./queryTypes";
import type { AuthState, User, AuthResult } from "./clientTypes";
import type { InstantQuery, InstantQueryResult } from "./helperTypes";
import type { InstantQuery, InstantQueryResult, InstantSchema } from "./helperTypes";
export type Config = {

@@ -77,3 +77,4 @@ appId: string;

declare function _init_internal<Schema extends {} | i.InstantGraph<any, any, any>, RoomSchema extends RoomSchemaShape, WithCardinalityInference extends boolean = false>(config: Config, Storage?: any, NetworkListener?: any): InstantCore<Schema, RoomSchema, WithCardinalityInference>;
declare class InstantCore<Schema extends i.InstantGraph<any, any> | {} = {}, RoomSchema extends RoomSchemaShape = {}, WithCardinalityInference extends boolean = false> implements IDatabase {
declare class InstantCore<Schema extends i.InstantGraph<any, any> | {} = {}, RoomSchema extends RoomSchemaShape = {}, WithCardinalityInference extends boolean = false> implements IDatabase<Schema, RoomSchema, WithCardinalityInference> {
withCardinalityInference?: WithCardinalityInference;
_reactor: Reactor<RoomSchema>;

@@ -333,3 +334,3 @@ auth: Auth;

declare function coerceQuery(o: any): any;
export { init, init_experimental, _init_internal, id, tx, txInit, lookup, i, getOps, coerceQuery, weakHash, IndexedDBStorage, WindowNetworkListener, InstantCore as InstantClient, Auth, Storage, IDatabase, RoomSchemaShape, Query, QueryResponse, InstantObject, Exactly, TransactionChunk, AuthState, User, AuthToken, TxChunk, SubscriptionState, LifecycleSubscriptionState, PresenceOpts, PresenceSlice, PresenceResponse, InstaQLQueryParams, InstantQuery, InstantQueryResult, };
export { init, init_experimental, _init_internal, id, tx, txInit, lookup, i, getOps, coerceQuery, weakHash, IndexedDBStorage, WindowNetworkListener, InstantCore as InstantClient, Auth, Storage, type IDatabase, type RoomSchemaShape, type Query, type QueryResponse, type InstantObject, type Exactly, type TransactionChunk, type AuthState, type User, type AuthToken, type TxChunk, type SubscriptionState, type LifecycleSubscriptionState, type PresenceOpts, type PresenceSlice, type PresenceResponse, type InstaQLQueryParams, type InstantQuery, type InstantQueryResult, type InstantSchema, };
//# sourceMappingURL=index.d.ts.map

@@ -6,3 +6,4 @@ import { TxChunk } from "./instatx";

tx: TxChunk<Schema extends InstantGraph<any, any> ? Schema : InstantGraph<any, any>>;
withCardinalityInference?: WithCardinalityInference;
}
//# sourceMappingURL=coreTypes.d.ts.map
import { InstaQLQueryParams, InstaQLQueryResult, Remove$ } from "./queryTypes";
import { InstantGraph } from "./schema";
import { IDatabase } from "./coreTypes";
export type InstantQuery<_DB extends IDatabase<any, any, any>> = _DB extends IDatabase<infer Schema, any, any> ? Schema extends InstantGraph<any, any, any> ? InstaQLQueryParams<Schema> : never : never;
export type InstantQueryResult<_DB extends IDatabase<any, any, any>, Q> = _DB extends IDatabase<infer Schema, any, infer CardinalityInference> ? Schema extends InstantGraph<infer E, any> ? InstaQLQueryResult<E, Remove$<Q>, CardinalityInference> : never : never;
export type InstantQuery<DB extends IDatabase<any, any, any>> = DB extends IDatabase<infer Schema, any, any> ? Schema extends InstantGraph<any, any, any> ? InstaQLQueryParams<Schema> : never : never;
export type InstantQueryResult<DB extends IDatabase<any, any, any>, Q> = DB extends IDatabase<infer Schema, any, infer CardinalityInference> ? Schema extends InstantGraph<infer E, any> ? InstaQLQueryResult<E, Remove$<Q>, CardinalityInference> : never : never;
export type InstantSchema<DB extends IDatabase<any, any, any>> = DB extends IDatabase<infer Schema, any, any> ? Schema : never;
//# sourceMappingURL=helperTypes.d.ts.map

@@ -7,8 +7,8 @@ import Reactor from "./Reactor";

import WindowNetworkListener from "./WindowNetworkListener";
import * as i from "./schema";
import type { PresenceOpts, PresenceResponse, PresenceSlice, RoomSchemaShape } from "./presence";
import * as i from "./schema";
import type { IDatabase } from "./coreTypes";
import type { Query, QueryResponse, PageInfoResponse, Exactly, InstantObject, InstaQLQueryParams } from "./queryTypes";
import type { AuthState, User, AuthResult } from "./clientTypes";
import type { InstantQuery, InstantQueryResult } from "./helperTypes";
import type { InstantQuery, InstantQueryResult, InstantSchema } from "./helperTypes";
export type Config = {

@@ -77,3 +77,4 @@ appId: string;

declare function _init_internal<Schema extends {} | i.InstantGraph<any, any, any>, RoomSchema extends RoomSchemaShape, WithCardinalityInference extends boolean = false>(config: Config, Storage?: any, NetworkListener?: any): InstantCore<Schema, RoomSchema, WithCardinalityInference>;
declare class InstantCore<Schema extends i.InstantGraph<any, any> | {} = {}, RoomSchema extends RoomSchemaShape = {}, WithCardinalityInference extends boolean = false> implements IDatabase {
declare class InstantCore<Schema extends i.InstantGraph<any, any> | {} = {}, RoomSchema extends RoomSchemaShape = {}, WithCardinalityInference extends boolean = false> implements IDatabase<Schema, RoomSchema, WithCardinalityInference> {
withCardinalityInference?: WithCardinalityInference;
_reactor: Reactor<RoomSchema>;

@@ -333,3 +334,3 @@ auth: Auth;

declare function coerceQuery(o: any): any;
export { init, init_experimental, _init_internal, id, tx, txInit, lookup, i, getOps, coerceQuery, weakHash, IndexedDBStorage, WindowNetworkListener, InstantCore as InstantClient, Auth, Storage, IDatabase, RoomSchemaShape, Query, QueryResponse, InstantObject, Exactly, TransactionChunk, AuthState, User, AuthToken, TxChunk, SubscriptionState, LifecycleSubscriptionState, PresenceOpts, PresenceSlice, PresenceResponse, InstaQLQueryParams, InstantQuery, InstantQueryResult, };
export { init, init_experimental, _init_internal, id, tx, txInit, lookup, i, getOps, coerceQuery, weakHash, IndexedDBStorage, WindowNetworkListener, InstantCore as InstantClient, Auth, Storage, type IDatabase, type RoomSchemaShape, type Query, type QueryResponse, type InstantObject, type Exactly, type TransactionChunk, type AuthState, type User, type AuthToken, type TxChunk, type SubscriptionState, type LifecycleSubscriptionState, type PresenceOpts, type PresenceSlice, type PresenceResponse, type InstaQLQueryParams, type InstantQuery, type InstantQueryResult, type InstantSchema, };
//# sourceMappingURL=index.d.ts.map

@@ -52,3 +52,3 @@ import type { RoomSchemaShape } from "./presence";

declare function entity<Attrs extends AttrsDefs>(attrs: Attrs): EntityDef<Attrs, {}, void>;
declare function string(): DataAttrDef<string, true>;
declare function string<StringEnum extends string = string>(): DataAttrDef<StringEnum, true>;
declare function number(): DataAttrDef<number, true>;

@@ -55,0 +55,0 @@ declare function boolean(): DataAttrDef<boolean, true>;

@@ -52,3 +52,3 @@ import type { RoomSchemaShape } from "./presence";

declare function entity<Attrs extends AttrsDefs>(attrs: Attrs): EntityDef<Attrs, {}, void>;
declare function string(): DataAttrDef<string, true>;
declare function string<StringEnum extends string = string>(): DataAttrDef<StringEnum, true>;
declare function number(): DataAttrDef<number, true>;

@@ -55,0 +55,0 @@ declare function boolean(): DataAttrDef<boolean, true>;

{
"name": "@instantdb/core",
"version": "v0.12.29",
"version": "v0.12.30",
"description": "Instant's core local abstraction",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -13,2 +13,4 @@ import { TxChunk } from "./instatx";

>;
withCardinalityInference?: WithCardinalityInference;
}

@@ -5,4 +5,4 @@ import { InstaQLQueryParams, InstaQLQueryResult, Remove$ } from "./queryTypes";

export type InstantQuery<_DB extends IDatabase<any, any, any>> =
_DB extends IDatabase<infer Schema, any, any>
export type InstantQuery<DB extends IDatabase<any, any, any>> =
DB extends IDatabase<infer Schema, any, any>
? Schema extends InstantGraph<any, any, any>

@@ -13,4 +13,4 @@ ? InstaQLQueryParams<Schema>

export type InstantQueryResult<_DB extends IDatabase<any, any, any>, Q> =
_DB extends IDatabase<infer Schema, any, infer CardinalityInference>
export type InstantQueryResult<DB extends IDatabase<any, any, any>, Q> =
DB extends IDatabase<infer Schema, any, infer CardinalityInference>
? Schema extends InstantGraph<infer E, any>

@@ -20,1 +20,4 @@ ? InstaQLQueryResult<E, Remove$<Q>, CardinalityInference>

: never;
export type InstantSchema<DB extends IDatabase<any, any, any>> =
DB extends IDatabase<infer Schema, any, any> ? Schema : never;

@@ -14,2 +14,5 @@ import Reactor from "./Reactor";

import WindowNetworkListener from "./WindowNetworkListener";
import * as i from "./schema";
import { createDevtool } from "./devtool";
import type {

@@ -21,5 +24,2 @@ PresenceOpts,

} from "./presence";
import * as i from "./schema";
import { createDevtool } from "./devtool";
import type { IDatabase } from "./coreTypes";

@@ -35,3 +35,7 @@ import type {

import type { AuthState, User, AuthResult } from "./clientTypes";
import type { InstantQuery, InstantQueryResult } from "./helperTypes";
import type {
InstantQuery,
InstantQueryResult,
InstantSchema,
} from "./helperTypes";

@@ -106,3 +110,6 @@ const defaultOpenDevtool = true;

// hmr
function initGlobalInstantCoreStore(): Record<string, InstantCore<any>> {
function initGlobalInstantCoreStore(): Record<
string,
InstantCore<any, any, any>
> {
globalThis.__instantDbStore = globalThis.__instantDbStore ?? {};

@@ -224,4 +231,5 @@ return globalThis.__instantDbStore;

WithCardinalityInference extends boolean = false,
> implements IDatabase
> implements IDatabase<Schema, RoomSchema, WithCardinalityInference>
{
public withCardinalityInference?: WithCardinalityInference;
public _reactor: Reactor<RoomSchema>;

@@ -597,21 +605,22 @@ public auth: Auth;

// types
IDatabase,
RoomSchemaShape,
Query,
QueryResponse,
InstantObject,
Exactly,
TransactionChunk,
AuthState,
User,
AuthToken,
TxChunk,
SubscriptionState,
LifecycleSubscriptionState,
PresenceOpts,
PresenceSlice,
PresenceResponse,
InstaQLQueryParams,
InstantQuery,
InstantQueryResult,
type IDatabase,
type RoomSchemaShape,
type Query,
type QueryResponse,
type InstantObject,
type Exactly,
type TransactionChunk,
type AuthState,
type User,
type AuthToken,
type TxChunk,
type SubscriptionState,
type LifecycleSubscriptionState,
type PresenceOpts,
type PresenceSlice,
type PresenceResponse,
type InstaQLQueryParams,
type InstantQuery,
type InstantQueryResult,
type InstantSchema,
};

@@ -96,3 +96,6 @@ import type { RoomSchemaShape } from "./presence";

function string(): DataAttrDef<string, true> {
function string<StringEnum extends string = string>(): DataAttrDef<
StringEnum,
true
> {
return new DataAttrDef("string", true);

@@ -99,0 +102,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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