@lunora/client 1.0.0-alpha.25 → 1.0.0-alpha.27
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.
- package/dist/auth/index.d.mts +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/{LunoraClient-D3h4P7hg.mjs → LunoraClient-DKATLGHY.mjs} +18 -0
- package/dist/packem_shared/{createServerClient-DzeC2J3A.mjs → createServerClient-Bp2r9tcB.mjs} +1 -1
- package/dist/packem_shared/{lunora-client.d-C4ud8bej.d.mts → lunora-client.d-B1iZb2Ph.d.mts} +12 -1
- package/dist/packem_shared/{lunora-client.d-C4ud8bej.d.ts → lunora-client.d-B1iZb2Ph.d.ts} +12 -1
- package/dist/packem_shared/{preload.d-Dvk8zg6m.d.mts → preload.d-CLwoXl3R.d.mts} +1 -1
- package/dist/packem_shared/{preload.d-B6-lqUf2.d.ts → preload.d-Cqb4Kh2I.d.ts} +1 -1
- package/dist/query/index.d.mts +2 -2
- package/dist/query/index.d.ts +2 -2
- package/dist/ssr/index.d.mts +3 -3
- package/dist/ssr/index.d.ts +3 -3
- package/dist/ssr/index.mjs +1 -1
- package/dist/upload.d.mts +35 -0
- package/dist/upload.d.ts +35 -0
- package/dist/upload.mjs +24 -0
- package/package.json +7 -2
package/dist/auth/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as User, L as LunoraClient } from "../packem_shared/lunora-client.d-
|
|
1
|
+
import { U as User, L as LunoraClient } from "../packem_shared/lunora-client.d-B1iZb2Ph.mjs";
|
|
2
2
|
import '@lunora/runtime';
|
|
3
3
|
interface IdentityStore {
|
|
4
4
|
/** Read the current resolved user, or `null` when signed out / not yet resolved. */
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as User, L as LunoraClient } from "../packem_shared/lunora-client.d-
|
|
1
|
+
import { U as User, L as LunoraClient } from "../packem_shared/lunora-client.d-B1iZb2Ph.js";
|
|
2
2
|
import '@lunora/runtime';
|
|
3
3
|
interface IdentityStore {
|
|
4
4
|
/** Read the current resolved user, or `null` when signed out / not yet resolved. */
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as PersistenceAdapter, B as BookmarkStorage, S as SubscriptionError, H as HttpStreamRef, d as HttpStreamArgsOf, e as HttpStreamChunkOf, f as StreamIterable, F as FunctionReference, A as ArgsOf, M as MutationCallOptions, R as ReturnOf, O as OfflineQueueOptions, Q as QueryCacheAdapter, g as ReconnectOptions, L as LunoraClient } from "./packem_shared/lunora-client.d-
|
|
2
|
-
export { type h as BatchSlot, C as CONFLICT_ERROR_CODE, type i as CachedQuery, type j as ClientMessage, type k as ClientQueryRef, type l as ClientShapeSubscribeMessage, type m as ClientShapeUnsubscribeMessage, type n as ConnectionStatus, D as DEFAULT_MAX_BUFFER, type o as FunctionArgumentDescriptor, type p as FunctionDescriptor, type G as GlobalFacetResult, type q as GlobalFacetValue, type r as GlobalFilterClause, type s as GlobalTableInfo, type t as GlobalTablePage, type u as HttpStreamCallArgs, type v as LunoraClientError, type w as LunoraClientOptions, type x as LunoraErrorCode, type y as MutationSettledEvent, type z as OptimisticLocalStore, type E as OptimisticUpdate, type I as OutboxMutation, type J as OutboxSink, type K as PersistedMutation, type P as Preloaded, type N as RowOp, type T as RpcEnvelope, type V as RpcResponseBody, type W as ScheduleRecord, type X as SchedulerPoolStatus, type Y as SchedulerStatus, type Z as ServerMessage, type _ as ServerPokeEndMessage, type $ as ServerPokePartMessage, type a0 as ServerPokeStartMessage, type a1 as ShardTrafficEntry, type a2 as ShardTrafficResult, type a3 as StorageListPage, type a4 as StorageObject, type a5 as StreamHandle, type a6 as SubscriptionCallback, type b as SubscriptionErrorCallback, a7 as SubscriptionRegistry, type a8 as SubscriptionState, type a9 as SyncWatermark, type a as Unsubscribe, type U as User, type aa as WorkflowInstanceAction, type ab as WorkflowInstanceDetail, type ac as WorkflowInstancePage, type ad as WorkflowInstanceStatus, type ae as WorkflowInstanceSummary, type af as WorkflowStepDetail, type ag as WsTokenProvider, ah as createClientQuery, ai as createLocalStore, aj as createStream, ak as getErrorCode, al as getRetryAfterMs, am as isConflictError, an as isForbiddenError, ao as isRateLimitedError, ap as isUnauthorizedError } from "./packem_shared/lunora-client.d-
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-
|
|
4
|
-
export type { AuthCapabilities, AuthConfigInfo, AuthImpersonation, AuthPage, AuthSession, AuthUser, AuthUserFieldSpec, CronJobInfo, KvKeyEntry, KvKeyListResult, KvNamespaceSummary, KvValueResult, VectorIndexSummary, VectorQueryMatch } from '@lunora/runtime';
|
|
1
|
+
import { c as PersistenceAdapter, B as BookmarkStorage, S as SubscriptionError, H as HttpStreamRef, d as HttpStreamArgsOf, e as HttpStreamChunkOf, f as StreamIterable, F as FunctionReference, A as ArgsOf, M as MutationCallOptions, R as ReturnOf, O as OfflineQueueOptions, Q as QueryCacheAdapter, g as ReconnectOptions, L as LunoraClient } from "./packem_shared/lunora-client.d-B1iZb2Ph.mjs";
|
|
2
|
+
export { type h as BatchSlot, C as CONFLICT_ERROR_CODE, type i as CachedQuery, type j as ClientMessage, type k as ClientQueryRef, type l as ClientShapeSubscribeMessage, type m as ClientShapeUnsubscribeMessage, type n as ConnectionStatus, D as DEFAULT_MAX_BUFFER, type o as FunctionArgumentDescriptor, type p as FunctionDescriptor, type G as GlobalFacetResult, type q as GlobalFacetValue, type r as GlobalFilterClause, type s as GlobalTableInfo, type t as GlobalTablePage, type u as HttpStreamCallArgs, type v as LunoraClientError, type w as LunoraClientOptions, type x as LunoraErrorCode, type y as MutationSettledEvent, type z as OptimisticLocalStore, type E as OptimisticUpdate, type I as OutboxMutation, type J as OutboxSink, type K as PersistedMutation, type P as Preloaded, type N as RowOp, type T as RpcEnvelope, type V as RpcResponseBody, type W as ScheduleRecord, type X as SchedulerPoolStatus, type Y as SchedulerStatus, type Z as ServerMessage, type _ as ServerPokeEndMessage, type $ as ServerPokePartMessage, type a0 as ServerPokeStartMessage, type a1 as ShardTrafficEntry, type a2 as ShardTrafficResult, type a3 as StorageListPage, type a4 as StorageObject, type a5 as StreamHandle, type a6 as SubscriptionCallback, type b as SubscriptionErrorCallback, a7 as SubscriptionRegistry, type a8 as SubscriptionState, type a9 as SyncWatermark, type a as Unsubscribe, type U as User, type aa as WorkflowInstanceAction, type ab as WorkflowInstanceDetail, type ac as WorkflowInstancePage, type ad as WorkflowInstanceStatus, type ae as WorkflowInstanceSummary, type af as WorkflowStepDetail, type ag as WsTokenProvider, ah as createClientQuery, ai as createLocalStore, aj as createStream, ak as getErrorCode, al as getRetryAfterMs, am as isConflictError, an as isForbiddenError, ao as isRateLimitedError, ap as isUnauthorizedError } from "./packem_shared/lunora-client.d-B1iZb2Ph.mjs";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-CLwoXl3R.mjs";
|
|
4
|
+
export type { AuthCapabilities, AuthConfigInfo, AuthImpersonation, AuthPage, AuthSession, AuthUser, AuthUserFieldSpec, CronJobInfo, KvKeyEntry, KvKeyListResult, KvNamespaceSummary, KvValueResult, PipelineLogColumnMap, PipelineLogCursor, PipelineLogField, PipelineLogPage, PipelineLogQuery, PipelineLogRow, VectorIndexSummary, VectorQueryMatch } from '@lunora/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* The slice of React Native's `AsyncStorage` (or any async key/value store —
|
|
7
7
|
* Expo `SecureStore`, a wrapped `localForage`, an in-memory map in tests) this
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as PersistenceAdapter, B as BookmarkStorage, S as SubscriptionError, H as HttpStreamRef, d as HttpStreamArgsOf, e as HttpStreamChunkOf, f as StreamIterable, F as FunctionReference, A as ArgsOf, M as MutationCallOptions, R as ReturnOf, O as OfflineQueueOptions, Q as QueryCacheAdapter, g as ReconnectOptions, L as LunoraClient } from "./packem_shared/lunora-client.d-
|
|
2
|
-
export { type h as BatchSlot, C as CONFLICT_ERROR_CODE, type i as CachedQuery, type j as ClientMessage, type k as ClientQueryRef, type l as ClientShapeSubscribeMessage, type m as ClientShapeUnsubscribeMessage, type n as ConnectionStatus, D as DEFAULT_MAX_BUFFER, type o as FunctionArgumentDescriptor, type p as FunctionDescriptor, type G as GlobalFacetResult, type q as GlobalFacetValue, type r as GlobalFilterClause, type s as GlobalTableInfo, type t as GlobalTablePage, type u as HttpStreamCallArgs, type v as LunoraClientError, type w as LunoraClientOptions, type x as LunoraErrorCode, type y as MutationSettledEvent, type z as OptimisticLocalStore, type E as OptimisticUpdate, type I as OutboxMutation, type J as OutboxSink, type K as PersistedMutation, type P as Preloaded, type N as RowOp, type T as RpcEnvelope, type V as RpcResponseBody, type W as ScheduleRecord, type X as SchedulerPoolStatus, type Y as SchedulerStatus, type Z as ServerMessage, type _ as ServerPokeEndMessage, type $ as ServerPokePartMessage, type a0 as ServerPokeStartMessage, type a1 as ShardTrafficEntry, type a2 as ShardTrafficResult, type a3 as StorageListPage, type a4 as StorageObject, type a5 as StreamHandle, type a6 as SubscriptionCallback, type b as SubscriptionErrorCallback, a7 as SubscriptionRegistry, type a8 as SubscriptionState, type a9 as SyncWatermark, type a as Unsubscribe, type U as User, type aa as WorkflowInstanceAction, type ab as WorkflowInstanceDetail, type ac as WorkflowInstancePage, type ad as WorkflowInstanceStatus, type ae as WorkflowInstanceSummary, type af as WorkflowStepDetail, type ag as WsTokenProvider, ah as createClientQuery, ai as createLocalStore, aj as createStream, ak as getErrorCode, al as getRetryAfterMs, am as isConflictError, an as isForbiddenError, ao as isRateLimitedError, ap as isUnauthorizedError } from "./packem_shared/lunora-client.d-
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-
|
|
4
|
-
export type { AuthCapabilities, AuthConfigInfo, AuthImpersonation, AuthPage, AuthSession, AuthUser, AuthUserFieldSpec, CronJobInfo, KvKeyEntry, KvKeyListResult, KvNamespaceSummary, KvValueResult, VectorIndexSummary, VectorQueryMatch } from '@lunora/runtime';
|
|
1
|
+
import { c as PersistenceAdapter, B as BookmarkStorage, S as SubscriptionError, H as HttpStreamRef, d as HttpStreamArgsOf, e as HttpStreamChunkOf, f as StreamIterable, F as FunctionReference, A as ArgsOf, M as MutationCallOptions, R as ReturnOf, O as OfflineQueueOptions, Q as QueryCacheAdapter, g as ReconnectOptions, L as LunoraClient } from "./packem_shared/lunora-client.d-B1iZb2Ph.js";
|
|
2
|
+
export { type h as BatchSlot, C as CONFLICT_ERROR_CODE, type i as CachedQuery, type j as ClientMessage, type k as ClientQueryRef, type l as ClientShapeSubscribeMessage, type m as ClientShapeUnsubscribeMessage, type n as ConnectionStatus, D as DEFAULT_MAX_BUFFER, type o as FunctionArgumentDescriptor, type p as FunctionDescriptor, type G as GlobalFacetResult, type q as GlobalFacetValue, type r as GlobalFilterClause, type s as GlobalTableInfo, type t as GlobalTablePage, type u as HttpStreamCallArgs, type v as LunoraClientError, type w as LunoraClientOptions, type x as LunoraErrorCode, type y as MutationSettledEvent, type z as OptimisticLocalStore, type E as OptimisticUpdate, type I as OutboxMutation, type J as OutboxSink, type K as PersistedMutation, type P as Preloaded, type N as RowOp, type T as RpcEnvelope, type V as RpcResponseBody, type W as ScheduleRecord, type X as SchedulerPoolStatus, type Y as SchedulerStatus, type Z as ServerMessage, type _ as ServerPokeEndMessage, type $ as ServerPokePartMessage, type a0 as ServerPokeStartMessage, type a1 as ShardTrafficEntry, type a2 as ShardTrafficResult, type a3 as StorageListPage, type a4 as StorageObject, type a5 as StreamHandle, type a6 as SubscriptionCallback, type b as SubscriptionErrorCallback, a7 as SubscriptionRegistry, type a8 as SubscriptionState, type a9 as SyncWatermark, type a as Unsubscribe, type U as User, type aa as WorkflowInstanceAction, type ab as WorkflowInstanceDetail, type ac as WorkflowInstancePage, type ad as WorkflowInstanceStatus, type ae as WorkflowInstanceSummary, type af as WorkflowStepDetail, type ag as WsTokenProvider, ah as createClientQuery, ai as createLocalStore, aj as createStream, ak as getErrorCode, al as getRetryAfterMs, am as isConflictError, an as isForbiddenError, ao as isRateLimitedError, ap as isUnauthorizedError } from "./packem_shared/lunora-client.d-B1iZb2Ph.js";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-Cqb4Kh2I.js";
|
|
4
|
+
export type { AuthCapabilities, AuthConfigInfo, AuthImpersonation, AuthPage, AuthSession, AuthUser, AuthUserFieldSpec, CronJobInfo, KvKeyEntry, KvKeyListResult, KvNamespaceSummary, KvValueResult, PipelineLogColumnMap, PipelineLogCursor, PipelineLogField, PipelineLogPage, PipelineLogQuery, PipelineLogRow, VectorIndexSummary, VectorQueryMatch } from '@lunora/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* The slice of React Native's `AsyncStorage` (or any async key/value store —
|
|
7
7
|
* Expo `SecureStore`, a wrapped `localForage`, an in-memory map in tests) this
|
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ export { applyDelta, isMutationDelta } from './packem_shared/applyDelta-CRKZ1PBt
|
|
|
6
6
|
export { CONFLICT_ERROR_CODE, getErrorCode, getRetryAfterMs, isConflictError, isForbiddenError, isRateLimitedError, isUnauthorizedError } from './packem_shared/CONFLICT_ERROR_CODE-B8gQ8tyU.mjs';
|
|
7
7
|
export { httpStream } from './packem_shared/httpStream-DIdL8NEw.mjs';
|
|
8
8
|
export { c as createLocalStore } from './packem_shared/local-store-DIq-UWfD.mjs';
|
|
9
|
-
export { LunoraClient } from './packem_shared/LunoraClient-
|
|
9
|
+
export { LunoraClient } from './packem_shared/LunoraClient-DKATLGHY.mjs';
|
|
10
10
|
export { createMutationRunner } from './packem_shared/createMutationRunner-BqsavzvG.mjs';
|
|
11
11
|
export { createMutatorRunner } from './packem_shared/createMutatorRunner-BETvCd0p.mjs';
|
|
12
12
|
export { O as OfflineQueue } from './packem_shared/offline-queue-N-1JvYb4.mjs';
|
|
@@ -97,6 +97,7 @@ const GLOBAL_TABLE_PATH = "/_lunora/admin/global/table";
|
|
|
97
97
|
const GLOBAL_FACET_PATH = "/_lunora/admin/global/facet";
|
|
98
98
|
const VECTOR_INDEXES_PATH = "/_lunora/admin/vector/indexes";
|
|
99
99
|
const VECTOR_QUERY_PATH = "/_lunora/admin/vector/query";
|
|
100
|
+
const LOG_ARCHIVE_PATH = "/_lunora/admin/logs/archive";
|
|
100
101
|
const KV_NAMESPACES_PATH = "/_lunora/admin/kv/namespaces";
|
|
101
102
|
const KV_KEYS_PATH = "/_lunora/admin/kv/keys";
|
|
102
103
|
const KV_VALUE_PATH = "/_lunora/admin/kv/value";
|
|
@@ -1663,6 +1664,23 @@ class LunoraClient {
|
|
|
1663
1664
|
const body = await this.adminFetch(VECTOR_QUERY_PATH, "POST", options);
|
|
1664
1665
|
return body.matches ?? [];
|
|
1665
1666
|
}
|
|
1667
|
+
/**
|
|
1668
|
+
* Read one keyset-paginated page of the durable `ctx.log` archive that
|
|
1669
|
+
* `pipelineLogSink` writes to R2. Server-side only — the worker holds the R2
|
|
1670
|
+
* SQL credentials and runs the reader; the browser only sees the decoded
|
|
1671
|
+
* `{ rows, nextCursor }`. Pass the previous page's `nextCursor` as
|
|
1672
|
+
* `query.cursor` to page. Admin-gated. When the operator hasn't wired the
|
|
1673
|
+
* archive, `adminFetch` throws a `LunoraClientError` with `.code ===
|
|
1674
|
+
* "LOG_ARCHIVE_NOT_CONFIGURED"`, so a caller can render a "not configured"
|
|
1675
|
+
* state rather than an error.
|
|
1676
|
+
*/
|
|
1677
|
+
async queryLogArchive(query = {}) {
|
|
1678
|
+
if (this.closed) {
|
|
1679
|
+
throw new LunoraError("INTERNAL", "LunoraClient is closed");
|
|
1680
|
+
}
|
|
1681
|
+
const body = await this.adminFetch(LOG_ARCHIVE_PATH, "POST", query);
|
|
1682
|
+
return { nextCursor: body.nextCursor, rows: body.rows ?? [] };
|
|
1683
|
+
}
|
|
1666
1684
|
// --- KV namespace admin -------------------------------------------------
|
|
1667
1685
|
/**
|
|
1668
1686
|
* List the worker's registered Workers KV namespaces (binding names). Hits
|
package/dist/packem_shared/{lunora-client.d-C4ud8bej.d.mts → lunora-client.d-B1iZb2Ph.d.mts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CronJobInfo, VectorIndexSummary, VectorQueryMatch, KvNamespaceSummary, KvKeyListResult, KvValueResult, AuthUser, AuthPage, AuthImpersonation, AuthCapabilities, AuthConfigInfo, AuthSession } from '@lunora/runtime';
|
|
1
|
+
import { CronJobInfo, VectorIndexSummary, VectorQueryMatch, PipelineLogQuery, PipelineLogPage, KvNamespaceSummary, KvKeyListResult, KvValueResult, AuthUser, AuthPage, AuthImpersonation, AuthCapabilities, AuthConfigInfo, AuthSession } from '@lunora/runtime';
|
|
2
2
|
/**
|
|
3
3
|
* Reactive key-value store for local-only client state.
|
|
4
4
|
*
|
|
@@ -2123,6 +2123,17 @@ declare class LunoraClient {
|
|
|
2123
2123
|
text: string;
|
|
2124
2124
|
topK?: number;
|
|
2125
2125
|
}): Promise<VectorQueryMatch[]>;
|
|
2126
|
+
/**
|
|
2127
|
+
* Read one keyset-paginated page of the durable `ctx.log` archive that
|
|
2128
|
+
* `pipelineLogSink` writes to R2. Server-side only — the worker holds the R2
|
|
2129
|
+
* SQL credentials and runs the reader; the browser only sees the decoded
|
|
2130
|
+
* `{ rows, nextCursor }`. Pass the previous page's `nextCursor` as
|
|
2131
|
+
* `query.cursor` to page. Admin-gated. When the operator hasn't wired the
|
|
2132
|
+
* archive, `adminFetch` throws a `LunoraClientError` with `.code ===
|
|
2133
|
+
* "LOG_ARCHIVE_NOT_CONFIGURED"`, so a caller can render a "not configured"
|
|
2134
|
+
* state rather than an error.
|
|
2135
|
+
*/
|
|
2136
|
+
queryLogArchive(query?: PipelineLogQuery): Promise<PipelineLogPage>;
|
|
2126
2137
|
/**
|
|
2127
2138
|
* List the worker's registered Workers KV namespaces (binding names). Hits
|
|
2128
2139
|
* the admin-gated `GET /_lunora/admin/kv/namespaces` endpoint — the worker
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CronJobInfo, VectorIndexSummary, VectorQueryMatch, KvNamespaceSummary, KvKeyListResult, KvValueResult, AuthUser, AuthPage, AuthImpersonation, AuthCapabilities, AuthConfigInfo, AuthSession } from '@lunora/runtime';
|
|
1
|
+
import { CronJobInfo, VectorIndexSummary, VectorQueryMatch, PipelineLogQuery, PipelineLogPage, KvNamespaceSummary, KvKeyListResult, KvValueResult, AuthUser, AuthPage, AuthImpersonation, AuthCapabilities, AuthConfigInfo, AuthSession } from '@lunora/runtime';
|
|
2
2
|
/**
|
|
3
3
|
* Reactive key-value store for local-only client state.
|
|
4
4
|
*
|
|
@@ -2123,6 +2123,17 @@ declare class LunoraClient {
|
|
|
2123
2123
|
text: string;
|
|
2124
2124
|
topK?: number;
|
|
2125
2125
|
}): Promise<VectorQueryMatch[]>;
|
|
2126
|
+
/**
|
|
2127
|
+
* Read one keyset-paginated page of the durable `ctx.log` archive that
|
|
2128
|
+
* `pipelineLogSink` writes to R2. Server-side only — the worker holds the R2
|
|
2129
|
+
* SQL credentials and runs the reader; the browser only sees the decoded
|
|
2130
|
+
* `{ rows, nextCursor }`. Pass the previous page's `nextCursor` as
|
|
2131
|
+
* `query.cursor` to page. Admin-gated. When the operator hasn't wired the
|
|
2132
|
+
* archive, `adminFetch` throws a `LunoraClientError` with `.code ===
|
|
2133
|
+
* "LOG_ARCHIVE_NOT_CONFIGURED"`, so a caller can render a "not configured"
|
|
2134
|
+
* state rather than an error.
|
|
2135
|
+
*/
|
|
2136
|
+
queryLogArchive(query?: PipelineLogQuery): Promise<PipelineLogPage>;
|
|
2126
2137
|
/**
|
|
2127
2138
|
* List the worker's registered Workers KV namespaces (binding names). Hits
|
|
2128
2139
|
* the admin-gated `GET /_lunora/admin/kv/namespaces` endpoint — the worker
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FunctionReference, L as LunoraClient, A as ArgsOf, R as ReturnOf, P as Preloaded } from "./lunora-client.d-
|
|
1
|
+
import { F as FunctionReference, L as LunoraClient, A as ArgsOf, R as ReturnOf, P as Preloaded } from "./lunora-client.d-B1iZb2Ph.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* Run a query once on the server (during SSR) and capture its result in a
|
|
4
4
|
* serializable {@link Preloaded} token. Embed the token in the rendered HTML and
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FunctionReference, L as LunoraClient, A as ArgsOf, R as ReturnOf, P as Preloaded } from "./lunora-client.d-
|
|
1
|
+
import { F as FunctionReference, L as LunoraClient, A as ArgsOf, R as ReturnOf, P as Preloaded } from "./lunora-client.d-B1iZb2Ph.js";
|
|
2
2
|
/**
|
|
3
3
|
* Run a query once on the server (during SSR) and capture its result in a
|
|
4
4
|
* serializable {@link Preloaded} token. Embed the token in the rendered HTML and
|
package/dist/query/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SubscriptionError, F as FunctionReference, A as ArgsOf, R as ReturnOf, L as LunoraClient, a as Unsubscribe } from "../packem_shared/lunora-client.d-
|
|
2
|
-
export type { b as SubscriptionErrorCallback } from "../packem_shared/lunora-client.d-
|
|
1
|
+
import { S as SubscriptionError, F as FunctionReference, A as ArgsOf, R as ReturnOf, L as LunoraClient, a as Unsubscribe } from "../packem_shared/lunora-client.d-B1iZb2Ph.mjs";
|
|
2
|
+
export type { b as SubscriptionErrorCallback } from "../packem_shared/lunora-client.d-B1iZb2Ph.mjs";
|
|
3
3
|
import '@lunora/runtime';
|
|
4
4
|
/**
|
|
5
5
|
* The sentinel a framework adapter resolves its reactive args to when it wants
|
package/dist/query/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SubscriptionError, F as FunctionReference, A as ArgsOf, R as ReturnOf, L as LunoraClient, a as Unsubscribe } from "../packem_shared/lunora-client.d-
|
|
2
|
-
export type { b as SubscriptionErrorCallback } from "../packem_shared/lunora-client.d-
|
|
1
|
+
import { S as SubscriptionError, F as FunctionReference, A as ArgsOf, R as ReturnOf, L as LunoraClient, a as Unsubscribe } from "../packem_shared/lunora-client.d-B1iZb2Ph.js";
|
|
2
|
+
export type { b as SubscriptionErrorCallback } from "../packem_shared/lunora-client.d-B1iZb2Ph.js";
|
|
3
3
|
import '@lunora/runtime';
|
|
4
4
|
/**
|
|
5
5
|
* The sentinel a framework adapter resolves its reactive args to when it wants
|
package/dist/ssr/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as Preloaded, L as LunoraClient } from "../packem_shared/lunora-client.d-
|
|
2
|
-
export type { A as ArgsOf, F as FunctionReference, R as ReturnOf } from "../packem_shared/lunora-client.d-
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "../packem_shared/preload.d-
|
|
1
|
+
import { P as Preloaded, L as LunoraClient } from "../packem_shared/lunora-client.d-B1iZb2Ph.mjs";
|
|
2
|
+
export type { A as ArgsOf, F as FunctionReference, R as ReturnOf } from "../packem_shared/lunora-client.d-B1iZb2Ph.mjs";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "../packem_shared/preload.d-CLwoXl3R.mjs";
|
|
4
4
|
import '@lunora/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* Structural shape of a better-auth `getSession` call's resolved value.
|
package/dist/ssr/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as Preloaded, L as LunoraClient } from "../packem_shared/lunora-client.d-
|
|
2
|
-
export type { A as ArgsOf, F as FunctionReference, R as ReturnOf } from "../packem_shared/lunora-client.d-
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "../packem_shared/preload.d-
|
|
1
|
+
import { P as Preloaded, L as LunoraClient } from "../packem_shared/lunora-client.d-B1iZb2Ph.js";
|
|
2
|
+
export type { A as ArgsOf, F as FunctionReference, R as ReturnOf } from "../packem_shared/lunora-client.d-B1iZb2Ph.js";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "../packem_shared/preload.d-Cqb4Kh2I.js";
|
|
4
4
|
import '@lunora/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* Structural shape of a better-auth `getSession` call's resolved value.
|
package/dist/ssr/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { getServerSession } from '../packem_shared/getServerSession-8jXewqxd.mjs';
|
|
2
2
|
export { deserializePreloaded, serializePreloaded } from '../packem_shared/deserializePreloaded-C0eJTY_W.mjs';
|
|
3
|
-
export { createServerClient } from '../packem_shared/createServerClient-
|
|
3
|
+
export { createServerClient } from '../packem_shared/createServerClient-Bp2r9tcB.mjs';
|
|
4
4
|
export { preloadQuery, preloadedQueryResult } from '../packem_shared/preloadQuery-lobFkD2Z.mjs';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { UploadControl, HeadersResolver, UploadRestrictions, ChunkedRestAdapter, MultipartAdapter, TusAdapter } from '@visulima/storage-client';
|
|
2
|
+
export { type ChunkedRestAdapter, type ChunkedRestAdapterOptions, type FingerprintFunction, type HeadersResolver, LocalStorageUrlStorage, MemoryUrlStorage, type MultipartAdapter, type MultipartAdapterOptions, type OnBeforeRequest, type RequestOptions, RestrictionError, type TusAdapter, type TusAdapterOptions, type UploadControl, UploadError, type UploadMethod, type UploadRestrictions, type UploadResult, type Uploader, type UrlStorage, createChunkedRestAdapter, createMultipartAdapter, createTusAdapter, putFile, validateFile, validateFiles } from '@visulima/storage-client';
|
|
3
|
+
/** Resumable upload wire protocols {@link createUpload} can drive. */
|
|
4
|
+
type UploadProtocol = "chunked-rest" | "multipart" | "tus";
|
|
5
|
+
/** The adapter shape {@link createUpload} returns — a `.upload(file)` driver plus lifecycle callbacks. */
|
|
6
|
+
type UploadAdapter = ChunkedRestAdapter | MultipartAdapter | TusAdapter;
|
|
7
|
+
/** Options for {@link createUpload}. */
|
|
8
|
+
interface CreateUploadOptions {
|
|
9
|
+
/** Chunk size in bytes (TUS / chunked-REST only). */
|
|
10
|
+
chunkSize?: number;
|
|
11
|
+
/** A shared {@link UploadControl} for pause/resume/cancel (TUS / chunked-REST). */
|
|
12
|
+
control?: UploadControl;
|
|
13
|
+
/** The upload endpoint — a route backed by `@lunora/storage/upload`'s handler. */
|
|
14
|
+
endpoint: string;
|
|
15
|
+
/** Static or dynamically-resolved request headers (e.g. an `Authorization` token). */
|
|
16
|
+
headers?: HeadersResolver;
|
|
17
|
+
/** Maximum retry attempts (TUS / chunked-REST, when `retry` is on). */
|
|
18
|
+
maxRetries?: number;
|
|
19
|
+
/** Extra metadata sent with the upload. */
|
|
20
|
+
metadata?: Record<string, string>;
|
|
21
|
+
/** Which protocol to speak. Default `"tus"` (resumable, pause/resume-capable). */
|
|
22
|
+
protocol?: UploadProtocol;
|
|
23
|
+
/** Client-side size/type restrictions, validated before any network request. */
|
|
24
|
+
restrictions?: UploadRestrictions;
|
|
25
|
+
/** Enable automatic retry on failure (TUS / chunked-REST). */
|
|
26
|
+
retry?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Create a protocol-appropriate upload adapter against an RLS-gated endpoint.
|
|
30
|
+
* Defaults to TUS — the resumable path that survives pause/resume and a dropped
|
|
31
|
+
* connection. Call `.upload(file)` to start; use the shared {@link UploadControl}
|
|
32
|
+
* (or the adapter's `pause`/`resume`/`abort`) to steer it.
|
|
33
|
+
*/
|
|
34
|
+
declare const createUpload: (options: CreateUploadOptions) => UploadAdapter;
|
|
35
|
+
export { CreateUploadOptions, UploadAdapter, UploadProtocol, createUpload };
|
package/dist/upload.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { UploadControl, HeadersResolver, UploadRestrictions, ChunkedRestAdapter, MultipartAdapter, TusAdapter } from '@visulima/storage-client';
|
|
2
|
+
export { type ChunkedRestAdapter, type ChunkedRestAdapterOptions, type FingerprintFunction, type HeadersResolver, LocalStorageUrlStorage, MemoryUrlStorage, type MultipartAdapter, type MultipartAdapterOptions, type OnBeforeRequest, type RequestOptions, RestrictionError, type TusAdapter, type TusAdapterOptions, type UploadControl, UploadError, type UploadMethod, type UploadRestrictions, type UploadResult, type Uploader, type UrlStorage, createChunkedRestAdapter, createMultipartAdapter, createTusAdapter, putFile, validateFile, validateFiles } from '@visulima/storage-client';
|
|
3
|
+
/** Resumable upload wire protocols {@link createUpload} can drive. */
|
|
4
|
+
type UploadProtocol = "chunked-rest" | "multipart" | "tus";
|
|
5
|
+
/** The adapter shape {@link createUpload} returns — a `.upload(file)` driver plus lifecycle callbacks. */
|
|
6
|
+
type UploadAdapter = ChunkedRestAdapter | MultipartAdapter | TusAdapter;
|
|
7
|
+
/** Options for {@link createUpload}. */
|
|
8
|
+
interface CreateUploadOptions {
|
|
9
|
+
/** Chunk size in bytes (TUS / chunked-REST only). */
|
|
10
|
+
chunkSize?: number;
|
|
11
|
+
/** A shared {@link UploadControl} for pause/resume/cancel (TUS / chunked-REST). */
|
|
12
|
+
control?: UploadControl;
|
|
13
|
+
/** The upload endpoint — a route backed by `@lunora/storage/upload`'s handler. */
|
|
14
|
+
endpoint: string;
|
|
15
|
+
/** Static or dynamically-resolved request headers (e.g. an `Authorization` token). */
|
|
16
|
+
headers?: HeadersResolver;
|
|
17
|
+
/** Maximum retry attempts (TUS / chunked-REST, when `retry` is on). */
|
|
18
|
+
maxRetries?: number;
|
|
19
|
+
/** Extra metadata sent with the upload. */
|
|
20
|
+
metadata?: Record<string, string>;
|
|
21
|
+
/** Which protocol to speak. Default `"tus"` (resumable, pause/resume-capable). */
|
|
22
|
+
protocol?: UploadProtocol;
|
|
23
|
+
/** Client-side size/type restrictions, validated before any network request. */
|
|
24
|
+
restrictions?: UploadRestrictions;
|
|
25
|
+
/** Enable automatic retry on failure (TUS / chunked-REST). */
|
|
26
|
+
retry?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Create a protocol-appropriate upload adapter against an RLS-gated endpoint.
|
|
30
|
+
* Defaults to TUS — the resumable path that survives pause/resume and a dropped
|
|
31
|
+
* connection. Call `.upload(file)` to start; use the shared {@link UploadControl}
|
|
32
|
+
* (or the adapter's `pause`/`resume`/`abort`) to steer it.
|
|
33
|
+
*/
|
|
34
|
+
declare const createUpload: (options: CreateUploadOptions) => UploadAdapter;
|
|
35
|
+
export { CreateUploadOptions, UploadAdapter, UploadProtocol, createUpload };
|
package/dist/upload.mjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createMultipartAdapter, createChunkedRestAdapter, createTusAdapter } from '@visulima/storage-client';
|
|
2
|
+
export { LocalStorageUrlStorage, MemoryUrlStorage, RestrictionError, UploadControl, UploadError, createChunkedRestAdapter, createMultipartAdapter, createTusAdapter, putFile, validateFile, validateFiles } from '@visulima/storage-client';
|
|
3
|
+
|
|
4
|
+
const createUpload = (options) => {
|
|
5
|
+
const protocol = options.protocol ?? "tus";
|
|
6
|
+
const { chunkSize, control, endpoint, headers, maxRetries, metadata, restrictions, retry } = options;
|
|
7
|
+
if (protocol === "multipart") {
|
|
8
|
+
const multipartOptions = { endpoint, headers, maxRetries, metadata, restrictions, retry };
|
|
9
|
+
return createMultipartAdapter(multipartOptions);
|
|
10
|
+
}
|
|
11
|
+
const resumableOptions = {
|
|
12
|
+
chunkSize,
|
|
13
|
+
control,
|
|
14
|
+
endpoint,
|
|
15
|
+
headers,
|
|
16
|
+
maxRetries,
|
|
17
|
+
metadata,
|
|
18
|
+
restrictions,
|
|
19
|
+
retry
|
|
20
|
+
};
|
|
21
|
+
return protocol === "chunked-rest" ? createChunkedRestAdapter(resumableOptions) : createTusAdapter(resumableOptions);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { createUpload };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/client",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.27",
|
|
4
4
|
"description": "Lunora browser SDK: WebSocket transport, optimistic updates, and an offline mutation queue",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -56,13 +56,18 @@
|
|
|
56
56
|
"types": "./dist/ssr/index.d.ts",
|
|
57
57
|
"import": "./dist/ssr/index.mjs"
|
|
58
58
|
},
|
|
59
|
+
"./upload": {
|
|
60
|
+
"types": "./dist/upload.d.ts",
|
|
61
|
+
"import": "./dist/upload.mjs"
|
|
62
|
+
},
|
|
59
63
|
"./package.json": "./package.json"
|
|
60
64
|
},
|
|
61
65
|
"publishConfig": {
|
|
62
66
|
"access": "public"
|
|
63
67
|
},
|
|
64
68
|
"dependencies": {
|
|
65
|
-
"@lunora/errors": "1.0.0-alpha.
|
|
69
|
+
"@lunora/errors": "1.0.0-alpha.7",
|
|
70
|
+
"@visulima/storage-client": "1.0.0"
|
|
66
71
|
},
|
|
67
72
|
"engines": {
|
|
68
73
|
"node": "^22.15.0 || >=24.11.0"
|