@junejs/db 0.1.0-dev.2 → 0.2.0

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.
Files changed (2) hide show
  1. package/dist/scope.d.ts +13 -14
  2. package/package.json +2 -2
package/dist/scope.d.ts CHANGED
@@ -1,21 +1,20 @@
1
1
  import { JuneBlob, JuneDb, JuneKv, Resources } from "@junejs/core/resources";
2
2
  //#region src/scope.d.ts
3
- type RequestScope = {
3
+ export type RequestScope = {
4
4
  resources: Resources;
5
5
  locals?: Map<symbol, unknown>;
6
6
  locale?: string;
7
7
  services?: unknown;
8
8
  };
9
- declare function ensureScope(): Promise<void>;
10
- declare function runInScope<T>(scope: RequestScope, fn: () => T): T;
11
- declare function requestLocal<T>(key: symbol, make: () => T): T;
12
- declare function isolateLocal<T>(key: string | symbol, make: () => T): T;
13
- declare function setRequestLocale(locale: string): void;
14
- declare function currentLocale(): string | undefined;
15
- declare function currentServices<T = unknown>(): T | undefined;
16
- declare function registerSqlTagger(tag: (sql: string) => void): void;
17
- declare const db: JuneDb;
18
- declare const kv: JuneKv;
19
- declare const blob: JuneBlob;
20
- //#endregion
21
- export { RequestScope, blob, currentLocale, currentServices, db, ensureScope, isolateLocal, kv, registerSqlTagger, requestLocal, runInScope, setRequestLocale };
9
+ export declare function ensureScope(): Promise<void>;
10
+ export declare function runInScope<T>(scope: RequestScope, fn: () => T): T;
11
+ export declare function requestLocal<T>(key: symbol, make: () => T): T;
12
+ export declare function isolateLocal<T>(key: string | symbol, make: () => T): T;
13
+ export declare function setRequestLocale(locale: string): void;
14
+ export declare function currentLocale(): string | undefined;
15
+ export declare function currentServices<T = unknown>(): T | undefined;
16
+ export declare function registerSqlTagger(tag: (sql: string) => void): void;
17
+ export declare const db: JuneDb;
18
+ export declare const kv: JuneKv;
19
+ export declare const blob: JuneBlob;
20
+ //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junejs/db",
3
- "version": "0.1.0-dev.2",
3
+ "version": "0.2.0",
4
4
  "description": "June — the agent-native React framework. Ambient data resources (db/kv/blob).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -23,7 +23,7 @@
23
23
  "build": "tsdown"
24
24
  },
25
25
  "dependencies": {
26
- "@junejs/core": ">=0.2.0-dev.26"
26
+ "@junejs/core": "^0.2.0"
27
27
  },
28
28
  "repository": {
29
29
  "type": "git",