jazz-tools 2.0.0-alpha.70 → 2.0.0-beta.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.
- package/README.md +2 -3
- package/bin/jazz-tools.js +0 -3
- package/dist/accounts/account-manager-core.d.ts +54 -1
- package/dist/accounts/account-manager-core.d.ts.map +1 -1
- package/dist/accounts/account-manager-core.js +2 -2
- package/dist/accounts/account-manager-core.js.map +1 -1
- package/dist/accounts/context.js +1 -1
- package/dist/accounts/context.js.map +1 -1
- package/dist/backend/api.d.ts +1 -2
- package/dist/backend/api.d.ts.map +1 -1
- package/dist/backend/api.js +0 -2
- package/dist/backend/api.js.map +1 -1
- package/dist/backend/create-jazz.d.ts +0 -6
- package/dist/backend/create-jazz.d.ts.map +1 -1
- package/dist/backend/create-jazz.js +1 -1
- package/dist/backend/create-jazz.js.map +1 -1
- package/dist/backend/inspector-ui/11.js +2 -2
- package/dist/backend/inspector-ui/12.js +2 -2
- package/dist/backend/inspector-ui/13.js +2 -2
- package/dist/backend/inspector-ui/14.js +2 -2
- package/dist/backend/inspector-ui/20.js +1 -1
- package/dist/backend/inspector-ui-files.js +4 -4
- package/dist/backend/no-account-error.d.ts +1 -1
- package/dist/backend/no-account-error.js +1 -1
- package/dist/backend/no-account-error.js.map +1 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +8 -22
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +0 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +0 -2
- package/dist/client/index.js.map +1 -1
- package/dist/dev/app-files.js +1 -1
- package/dist/dev/app-files.js.map +1 -1
- package/dist/dev/catalogue-api.d.ts.map +1 -1
- package/dist/dev/catalogue-api.js +3 -6
- package/dist/dev/catalogue-api.js.map +1 -1
- package/dist/dev/inspector-overlay/embedded/assets/{index-D3RK8wNj.js → index-DUKUt96e.js} +3 -3
- package/dist/dev/inspector-overlay/embedded/assets/{jazz-broker-worker-EyaWhBtz.js → jazz-broker-worker-C_mr9Omd.js} +2 -2
- package/dist/dev/inspector-overlay/embedded/assets/{jazz_wasm-O10pptvY.js → jazz_wasm-BOvbCHn3.js} +1 -1
- package/dist/dev/inspector-overlay/embedded/assets/{jazz_wasm_bg-wI43fvvq.wasm → jazz_wasm_bg-BG8gazqt.wasm} +0 -0
- package/dist/dev/inspector-overlay/embedded/embedded.html +1 -1
- package/dist/dev/project.js +1 -1
- package/dist/dev/project.js.map +1 -1
- package/dist/dev/ts-project.d.ts.map +1 -1
- package/dist/dev/ts-project.js +3 -2
- package/dist/dev/ts-project.js.map +1 -1
- package/dist/expo/create-account-manager.d.ts +1 -1
- package/dist/expo/create-account-manager.js.map +1 -1
- package/dist/expo/index.d.ts +1 -2
- package/dist/expo/index.d.ts.map +1 -1
- package/dist/expo/index.js +1 -3
- package/dist/expo/index.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/dist/printer/index.d.ts +2 -2
- package/dist/printer/index.d.ts.map +1 -1
- package/dist/printer/index.js +4 -1
- package/dist/printer/index.js.map +1 -1
- package/dist/react/index.d.ts +1 -2
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +1 -3
- package/dist/react/index.js.map +1 -1
- package/dist/react/provider.d.ts +0 -2
- package/dist/react/provider.d.ts.map +1 -1
- package/dist/react/provider.js +1 -2
- package/dist/react/provider.js.map +1 -1
- package/dist/react-core/index.d.ts +1 -2
- package/dist/react-core/index.d.ts.map +1 -1
- package/dist/react-core/index.js +3 -5
- package/dist/react-core/index.js.map +1 -1
- package/dist/react-core/provider.d.ts +0 -8
- package/dist/react-core/provider.d.ts.map +1 -1
- package/dist/react-core/provider.js +0 -13
- package/dist/react-core/provider.js.map +1 -1
- package/dist/react-native/create-account-manager.d.ts +1 -1
- package/dist/react-native/create-account-manager.js.map +1 -1
- package/dist/react-native/index.d.ts +1 -3
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +1 -5
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/provider.d.ts +0 -2
- package/dist/react-native/provider.d.ts.map +1 -1
- package/dist/react-native/provider.js +1 -2
- package/dist/react-native/provider.js.map +1 -1
- package/dist/runtime/db.d.ts +0 -5
- package/dist/runtime/db.d.ts.map +1 -1
- package/dist/runtime/db.js +0 -5
- package/dist/runtime/db.js.map +1 -1
- package/dist/runtime/native-artifact-fingerprint-napi.d.ts +1 -1
- package/dist/runtime/native-artifact-fingerprint-napi.js +1 -1
- package/dist/runtime/native-artifact-fingerprint-napi.js.map +1 -1
- package/dist/runtime/native-artifact-fingerprint-wasm.d.ts +1 -1
- package/dist/runtime/native-artifact-fingerprint-wasm.js +1 -1
- package/dist/runtime/native-artifact-fingerprint-wasm.js.map +1 -1
- package/dist/runtime/native-artifact-fingerprints.d.ts +2 -2
- package/dist/schema-builders.d.ts +0 -7
- package/dist/schema-builders.d.ts.map +1 -1
- package/dist/schema-builders.js +0 -7
- package/dist/schema-builders.js.map +1 -1
- package/dist/session/create-jazz-session.d.ts +1 -1
- package/dist/session/create-jazz-session.d.ts.map +1 -1
- package/dist/session/create-jazz-session.js.map +1 -1
- package/dist/solid/index.d.ts +1 -2
- package/dist/solid/index.d.ts.map +1 -1
- package/dist/solid/index.js +7 -8
- package/dist/solid/index.ssr.js +2 -3
- package/dist/solid/provider.d.ts +1 -12
- package/dist/solid/provider.d.ts.map +1 -1
- package/dist/solid/provider.js +12 -18
- package/dist/solid/provider.js.map +1 -1
- package/dist/solid/provider.ssr.js +1 -11
- package/dist/solid/provider.ssr.js.map +1 -1
- package/dist/svelte/context.svelte.d.ts +1 -12
- package/dist/svelte/context.svelte.d.ts.map +1 -1
- package/dist/svelte/context.svelte.js +2 -20
- package/dist/svelte/index.d.ts +1 -2
- package/dist/svelte/index.d.ts.map +1 -1
- package/dist/svelte/index.js +1 -3
- package/dist/thin/index.d.ts +0 -1
- package/dist/thin/index.d.ts.map +1 -1
- package/dist/thin/index.js +0 -2
- package/dist/thin/index.js.map +1 -1
- package/dist/typed-app.d.ts +1 -1
- package/dist/typed-app.js.map +1 -1
- package/dist/vue/index.d.ts +1 -2
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +1 -3
- package/dist/vue/index.js.map +1 -1
- package/dist/vue/provider.d.ts +2 -35
- package/dist/vue/provider.d.ts.map +1 -1
- package/dist/vue/provider.js +1 -135
- package/dist/vue/provider.js.map +1 -1
- package/dist/web/lazy-local-first.d.ts +0 -3
- package/dist/web/lazy-local-first.d.ts.map +1 -1
- package/dist/web/lazy-local-first.js +1 -6
- package/dist/web/lazy-local-first.js.map +1 -1
- package/dist/worker/jazz-broker-worker.js +2 -2
- package/dist/worker/jazz_wasm_bg.wasm +0 -0
- package/package.json +4 -8
- package/dist/accounts/create-account-manager.d.ts +0 -57
- package/dist/accounts/create-account-manager.d.ts.map +0 -1
- package/dist/accounts/create-account-manager.js +0 -17
- package/dist/accounts/create-account-manager.js.map +0 -1
- package/dist/permissions/index.d.ts +0 -5
- package/dist/permissions/index.d.ts.map +0 -1
- package/dist/permissions/index.js +0 -11
- package/dist/permissions/index.js.map +0 -1
- package/dist/removed-api.d.ts +0 -87
- package/dist/removed-api.d.ts.map +0 -1
- package/dist/removed-api.js +0 -95
- package/dist/removed-api.js.map +0 -1
- package/dist/removed-schema-api.d.ts +0 -80
- package/dist/removed-schema-api.d.ts.map +0 -1
- package/dist/removed-schema-api.js +0 -128
- package/dist/removed-schema-api.js.map +0 -1
- package/dist/session/deprecated-session-hook.d.ts +0 -8
- package/dist/session/deprecated-session-hook.d.ts.map +0 -1
- package/dist/session/deprecated-session-hook.js +0 -28
- package/dist/session/deprecated-session-hook.js.map +0 -1
- package/dist/svelte/JazzSvelteProvider.svelte +0 -181
- package/dist/svelte/JazzSvelteProvider.svelte.d.ts +0 -14
- package/dist/svelte/JazzSvelteProvider.svelte.d.ts.map +0 -1
- package/dist/upgrade/aliases.d.ts +0 -25
- package/dist/upgrade/aliases.d.ts.map +0 -1
- package/dist/upgrade/aliases.js +0 -80
- package/dist/upgrade/aliases.js.map +0 -1
- package/dist/upgrade/app-json.d.ts +0 -32
- package/dist/upgrade/app-json.d.ts.map +0 -1
- package/dist/upgrade/app-json.js +0 -145
- package/dist/upgrade/app-json.js.map +0 -1
- package/dist/upgrade/constants.d.ts +0 -25
- package/dist/upgrade/constants.d.ts.map +0 -1
- package/dist/upgrade/constants.js +0 -136
- package/dist/upgrade/constants.js.map +0 -1
- package/dist/upgrade/edits.d.ts +0 -10
- package/dist/upgrade/edits.d.ts.map +0 -1
- package/dist/upgrade/edits.js +0 -21
- package/dist/upgrade/edits.js.map +0 -1
- package/dist/upgrade/errors.d.ts +0 -12
- package/dist/upgrade/errors.d.ts.map +0 -1
- package/dist/upgrade/errors.js +0 -18
- package/dist/upgrade/errors.js.map +0 -1
- package/dist/upgrade/extras.d.ts +0 -42
- package/dist/upgrade/extras.d.ts.map +0 -1
- package/dist/upgrade/extras.js +0 -487
- package/dist/upgrade/extras.js.map +0 -1
- package/dist/upgrade/fresh.d.ts +0 -36
- package/dist/upgrade/fresh.d.ts.map +0 -1
- package/dist/upgrade/fresh.js +0 -154
- package/dist/upgrade/fresh.js.map +0 -1
- package/dist/upgrade/index.d.ts +0 -79
- package/dist/upgrade/index.d.ts.map +0 -1
- package/dist/upgrade/index.js +0 -806
- package/dist/upgrade/index.js.map +0 -1
- package/dist/upgrade/json-only.d.ts +0 -24
- package/dist/upgrade/json-only.d.ts.map +0 -1
- package/dist/upgrade/json-only.js +0 -124
- package/dist/upgrade/json-only.js.map +0 -1
- package/dist/upgrade/names.d.ts +0 -29
- package/dist/upgrade/names.d.ts.map +0 -1
- package/dist/upgrade/names.js +0 -105
- package/dist/upgrade/names.js.map +0 -1
- package/dist/upgrade/payload-enums.d.ts +0 -18
- package/dist/upgrade/payload-enums.d.ts.map +0 -1
- package/dist/upgrade/payload-enums.js +0 -52
- package/dist/upgrade/payload-enums.js.map +0 -1
- package/dist/upgrade/permissions-check.d.ts +0 -10
- package/dist/upgrade/permissions-check.d.ts.map +0 -1
- package/dist/upgrade/permissions-check.js +0 -85
- package/dist/upgrade/permissions-check.js.map +0 -1
- package/dist/upgrade/program.d.ts +0 -18
- package/dist/upgrade/program.d.ts.map +0 -1
- package/dist/upgrade/program.js +0 -56
- package/dist/upgrade/program.js.map +0 -1
- package/dist/upgrade/project.d.ts +0 -56
- package/dist/upgrade/project.d.ts.map +0 -1
- package/dist/upgrade/project.js +0 -254
- package/dist/upgrade/project.js.map +0 -1
- package/dist/upgrade/rewrite.d.ts +0 -34
- package/dist/upgrade/rewrite.d.ts.map +0 -1
- package/dist/upgrade/rewrite.js +0 -500
- package/dist/upgrade/rewrite.js.map +0 -1
- package/dist/upgrade/schema-ts.d.ts +0 -59
- package/dist/upgrade/schema-ts.d.ts.map +0 -1
- package/dist/upgrade/schema-ts.js +0 -582
- package/dist/upgrade/schema-ts.js.map +0 -1
- package/dist/upgrade/snapshot.d.ts +0 -11
- package/dist/upgrade/snapshot.d.ts.map +0 -1
- package/dist/upgrade/snapshot.js +0 -90
- package/dist/upgrade/snapshot.js.map +0 -1
- package/dist/upgrade/upgrade-test-helpers.d.ts +0 -12
- package/dist/upgrade/upgrade-test-helpers.d.ts.map +0 -1
- package/dist/upgrade/upgrade-test-helpers.js +0 -72
- package/dist/upgrade/upgrade-test-helpers.js.map +0 -1
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jazz-tools",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-beta.0",
|
|
4
4
|
"description": "Jazz TypeScript SDK, React/Vue/Svelte bindings, and CLI tools",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -130,10 +130,6 @@
|
|
|
130
130
|
"types": "./dist/shared/index.d.ts",
|
|
131
131
|
"default": "./dist/shared/index.js"
|
|
132
132
|
},
|
|
133
|
-
"./permissions": {
|
|
134
|
-
"types": "./dist/permissions/index.d.ts",
|
|
135
|
-
"default": "./dist/permissions/index.js"
|
|
136
|
-
},
|
|
137
133
|
"./testing": {
|
|
138
134
|
"types": "./dist/testing/index.d.ts",
|
|
139
135
|
"default": "./dist/testing/index.js"
|
|
@@ -213,7 +209,7 @@
|
|
|
213
209
|
"tr46": "5.1.1",
|
|
214
210
|
"web-streams-polyfill": "^4.2.0",
|
|
215
211
|
"whatwg-url-without-unicode": "8.0.0-3",
|
|
216
|
-
"jazz-wasm": "2.0.0-
|
|
212
|
+
"jazz-wasm": "2.0.0-beta.0"
|
|
217
213
|
},
|
|
218
214
|
"devDependencies": {
|
|
219
215
|
"@better-auth/test-utils": "^1.7.22",
|
|
@@ -272,7 +268,7 @@
|
|
|
272
268
|
"svelte": "^5.0.0",
|
|
273
269
|
"vue": "^3.5.0",
|
|
274
270
|
"ws": "^8.18.0",
|
|
275
|
-
"jazz-rn": "2.0.0-
|
|
271
|
+
"jazz-rn": "2.0.0-beta.0"
|
|
276
272
|
},
|
|
277
273
|
"peerDependenciesMeta": {
|
|
278
274
|
"better-auth": {
|
|
@@ -328,7 +324,7 @@
|
|
|
328
324
|
}
|
|
329
325
|
},
|
|
330
326
|
"optionalDependencies": {
|
|
331
|
-
"jazz-napi": "2.0.0-
|
|
327
|
+
"jazz-napi": "2.0.0-beta.0"
|
|
332
328
|
},
|
|
333
329
|
"engines": {
|
|
334
330
|
"node": ">=22.18"
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import type { RuntimeSourcesConfig } from "../runtime/context.js";
|
|
2
|
-
import type { AccountStore } from "./persistence.js";
|
|
3
|
-
import type { AppBearer } from "./enrollment.js";
|
|
4
|
-
export interface AccountManagerConfig {
|
|
5
|
-
/**
|
|
6
|
-
* Backend and test code only; a browser client leaves it out and is scoped
|
|
7
|
-
* by `serverUrl` (see `clientScope`).
|
|
8
|
-
*/
|
|
9
|
-
appId?: string;
|
|
10
|
-
/** The app id an existing local-first app's users were created under. */
|
|
11
|
-
scope?: string;
|
|
12
|
-
/**
|
|
13
|
-
* The app's Jazz endpoint (default `"/jazz"`, its own backend), or `null`
|
|
14
|
-
* to keep Jazz on this device only, with no server and no sign-in.
|
|
15
|
-
*/
|
|
16
|
-
serverUrl?: string | null;
|
|
17
|
-
env?: string;
|
|
18
|
-
runtimeSources?: RuntimeSourcesConfig;
|
|
19
|
-
/**
|
|
20
|
-
* Where this device keeps its accounts' selection and device account keys.
|
|
21
|
-
* A browser page or worker defaults to localStorage; only that default
|
|
22
|
-
* reopens the last external account before its provider confirms it.
|
|
23
|
-
* Elsewhere (Node, Deno, Bun, a CLI) the default keeps the selection in
|
|
24
|
-
* memory for this process, which is enough for a user your backend names
|
|
25
|
-
* (`bearer`); a device account there needs a durable store (a file, the OS
|
|
26
|
-
* keychain) and is refused without one (`DeviceAccountNeedsStoreError`).
|
|
27
|
-
* React Native requires one; `jazz-tools/expo` supplies it.
|
|
28
|
-
*/
|
|
29
|
-
store?: AccountStore;
|
|
30
|
-
/**
|
|
31
|
-
* The `fetch` sign-in requests to the app's backend go through (default:
|
|
32
|
-
* the global one), as for a test or a proxy. The backend
|
|
33
|
-
* names the user by the cookie a browser sends on the sync connection too,
|
|
34
|
-
* so a bearer this adds would sign in but never sync: pass `bearer`
|
|
35
|
-
* instead. Outside a browser page or worker (Node, Deno, a CLI) without
|
|
36
|
-
* `bearer`, `loginWithBackend` and `linkWithBackend` refuse without
|
|
37
|
-
* calling it.
|
|
38
|
-
*/
|
|
39
|
-
fetch?: typeof fetch;
|
|
40
|
-
/**
|
|
41
|
-
* Hosts without cookies only (Node, Deno, Bun, a CLI): the app's own token
|
|
42
|
-
* for its backend, read whenever it is needed. It is sent as
|
|
43
|
-
* `Authorization: Bearer` when signing in through the backend
|
|
44
|
-
* (`loginWithBackend`, `linkWithBackend`) and on every sync connection,
|
|
45
|
-
* thin and local-first, where the backend's `authenticate` reads who the
|
|
46
|
-
* user is. Return null while no one is signed in.
|
|
47
|
-
*
|
|
48
|
-
* Not supported yet in a browser page or worker, whose sync connection
|
|
49
|
-
* can't carry a header: there the backend's cookie names the user. On
|
|
50
|
-
* React Native it is refused here: pass `bearer` to `createAccountManager`
|
|
51
|
-
* from `jazz-tools/react-native` or `jazz-tools/expo` instead.
|
|
52
|
-
*/
|
|
53
|
-
bearer?: AppBearer;
|
|
54
|
-
}
|
|
55
|
-
/** Prepare crypto and restore selection; createLocalFirst() is synchronous afterward. */
|
|
56
|
-
export declare function createAccountManager(config: AccountManagerConfig): Promise<import("./state.js").AccountManager<import("./enrollment.js").JWTAuth>>;
|
|
57
|
-
//# sourceMappingURL=create-account-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-account-manager.d.ts","sourceRoot":"","sources":["../../src/accounts/create-account-manager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,yFAAyF;AACzF,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,mFAYtE"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { DefaultRuntimeSource } from "../runtime/default-runtime-source.js";
|
|
2
|
-
import { authSecretSeedForMinting } from "../runtime/auth-secret-codec.js";
|
|
3
|
-
import { clientScope } from "../runtime/client-scope.js";
|
|
4
|
-
import { createAccountManagerWithMinter, resolvedServerUrl } from "./account-manager-core.js";
|
|
5
|
-
/** Prepare crypto and restore selection; createLocalFirst() is synchronous afterward. */
|
|
6
|
-
export async function createAccountManager(config) {
|
|
7
|
-
const scope = clientScope({ ...config, serverUrl: resolvedServerUrl(config) });
|
|
8
|
-
const source = new DefaultRuntimeSource();
|
|
9
|
-
await source.load({ appId: scope, runtimeSources: config.runtimeSources });
|
|
10
|
-
return createAccountManagerWithMinter(config, (secret, audience) => source.mintLocalFirstToken({
|
|
11
|
-
secret: authSecretSeedForMinting(secret),
|
|
12
|
-
audience,
|
|
13
|
-
ttlSeconds: 3600,
|
|
14
|
-
nowSeconds: BigInt(Math.floor(Date.now() / 1000)),
|
|
15
|
-
}));
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=create-account-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-account-manager.js","sourceRoot":"","sources":["../../src/accounts/create-account-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAE,8BAA8B,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAuD9F,yFAAyF;AACzF,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,MAA4B;IACrE,MAAM,KAAK,GAAG,WAAW,CAAC,EAAE,GAAG,MAAM,EAAE,SAAS,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC/E,MAAM,MAAM,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC1C,MAAM,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC;IAC3E,OAAO,8BAA8B,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,CACjE,MAAM,CAAC,mBAAmB,CAAC;QACzB,MAAM,EAAE,wBAAwB,CAAC,MAAM,CAAC;QACxC,QAAQ;QACR,UAAU,EAAE,IAAI;QAChB,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;KAClD,CAAC,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { DefaultRuntimeSource } from \"../runtime/default-runtime-source.js\";\nimport { authSecretSeedForMinting } from \"../runtime/auth-secret-codec.js\";\nimport type { RuntimeSourcesConfig } from \"../runtime/context.js\";\nimport { clientScope } from \"../runtime/client-scope.js\";\nimport type { AccountStore } from \"./persistence.js\";\nimport { createAccountManagerWithMinter, resolvedServerUrl } from \"./account-manager-core.js\";\nimport type { AppBearer } from \"./enrollment.js\";\n\nexport interface AccountManagerConfig {\n /**\n * Backend and test code only; a browser client leaves it out and is scoped\n * by `serverUrl` (see `clientScope`).\n */\n appId?: string;\n /** The app id an existing local-first app's users were created under. */\n scope?: string;\n /**\n * The app's Jazz endpoint (default `\"/jazz\"`, its own backend), or `null`\n * to keep Jazz on this device only, with no server and no sign-in.\n */\n serverUrl?: string | null;\n env?: string;\n runtimeSources?: RuntimeSourcesConfig;\n /**\n * Where this device keeps its accounts' selection and device account keys.\n * A browser page or worker defaults to localStorage; only that default\n * reopens the last external account before its provider confirms it.\n * Elsewhere (Node, Deno, Bun, a CLI) the default keeps the selection in\n * memory for this process, which is enough for a user your backend names\n * (`bearer`); a device account there needs a durable store (a file, the OS\n * keychain) and is refused without one (`DeviceAccountNeedsStoreError`).\n * React Native requires one; `jazz-tools/expo` supplies it.\n */\n store?: AccountStore;\n /**\n * The `fetch` sign-in requests to the app's backend go through (default:\n * the global one), as for a test or a proxy. The backend\n * names the user by the cookie a browser sends on the sync connection too,\n * so a bearer this adds would sign in but never sync: pass `bearer`\n * instead. Outside a browser page or worker (Node, Deno, a CLI) without\n * `bearer`, `loginWithBackend` and `linkWithBackend` refuse without\n * calling it.\n */\n fetch?: typeof fetch;\n /**\n * Hosts without cookies only (Node, Deno, Bun, a CLI): the app's own token\n * for its backend, read whenever it is needed. It is sent as\n * `Authorization: Bearer` when signing in through the backend\n * (`loginWithBackend`, `linkWithBackend`) and on every sync connection,\n * thin and local-first, where the backend's `authenticate` reads who the\n * user is. Return null while no one is signed in.\n *\n * Not supported yet in a browser page or worker, whose sync connection\n * can't carry a header: there the backend's cookie names the user. On\n * React Native it is refused here: pass `bearer` to `createAccountManager`\n * from `jazz-tools/react-native` or `jazz-tools/expo` instead.\n */\n bearer?: AppBearer;\n}\n\n/** Prepare crypto and restore selection; createLocalFirst() is synchronous afterward. */\nexport async function createAccountManager(config: AccountManagerConfig) {\n const scope = clientScope({ ...config, serverUrl: resolvedServerUrl(config) });\n const source = new DefaultRuntimeSource();\n await source.load({ appId: scope, runtimeSources: config.runtimeSources });\n return createAccountManagerWithMinter(config, (secret, audience) =>\n source.mintLocalFirstToken({\n secret: authSecretSeedForMinting(secret),\n audience,\n ttlSeconds: 3600,\n nowSeconds: BigInt(Math.floor(Date.now() / 1000)),\n }),\n );\n}\n"]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { RemovedApi } from "../removed-api.js";
|
|
2
|
-
export { definePermissions, anyOf, allOf } from "../removed-schema-api.js";
|
|
3
|
-
/** @deprecated Removed in alpha.65, and throws when used: permissions are written in jazz.permissions.json. Run `npx jazz-tools upgrade`. */
|
|
4
|
-
export declare const createSessionContext: RemovedApi;
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/permissions/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC3E,6IAA6I;AAC7I,eAAO,MAAM,oBAAoB,EAAE,UACqB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `jazz-tools/permissions`, the TypeScript permissions DSL, was removed in
|
|
3
|
-
* alpha.65: an app's permissions are its `jazz.permissions.json`. The names
|
|
4
|
-
* stay for one release as stubs that throw, pointing at `jazz-tools upgrade`.
|
|
5
|
-
*/
|
|
6
|
-
import { removedSchemaApi } from "../removed-schema-api.js";
|
|
7
|
-
export { definePermissions, anyOf, allOf } from "../removed-schema-api.js";
|
|
8
|
-
/** @deprecated Removed in alpha.65, and throws when used: permissions are written in jazz.permissions.json. Run `npx jazz-tools upgrade`. */
|
|
9
|
-
export const createSessionContext =
|
|
10
|
-
/*#__PURE__*/ removedSchemaApi("createSessionContext");
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/permissions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC3E,6IAA6I;AAC7I,MAAM,CAAC,MAAM,oBAAoB;AAC/B,aAAa,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,CAAC","sourcesContent":["/**\n * `jazz-tools/permissions`, the TypeScript permissions DSL, was removed in\n * alpha.65: an app's permissions are its `jazz.permissions.json`. The names\n * stay for one release as stubs that throw, pointing at `jazz-tools upgrade`.\n */\nimport { removedSchemaApi } from \"../removed-schema-api.js\";\nimport type { RemovedApi } from \"../removed-api.js\";\n\nexport { definePermissions, anyOf, allOf } from \"../removed-schema-api.js\";\n/** @deprecated Removed in alpha.65, and throws when used: permissions are written in jazz.permissions.json. Run `npx jazz-tools upgrade`. */\nexport const createSessionContext: RemovedApi =\n /*#__PURE__*/ removedSchemaApi(\"createSessionContext\");\n"]}
|
package/dist/removed-api.d.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Names alpha.60 exported and alpha.61 removed (the session replaced them),
|
|
3
|
-
* kept for one release as stubs that throw when used, naming what replaced
|
|
4
|
-
* them. Without them a bundler's "not exported" error guesses a similarly
|
|
5
|
-
* named export (Turbopack suggests `useJazzClient` for `useJazzAuth`), which
|
|
6
|
-
* is the wrong one. They are not working aliases.
|
|
7
|
-
*
|
|
8
|
-
* Each is typed so TypeScript shows it too: `@deprecated` with the
|
|
9
|
-
* replacement where it is declared, and parameters of type `never`, so a call
|
|
10
|
-
* with arguments doesn't type-check.
|
|
11
|
-
*/
|
|
12
|
-
/** Where the alpha.60 → alpha.61 changes are written up. */
|
|
13
|
-
export declare const UPGRADE_FROM_ALPHA_60_URL = "https://jazz.tools/docs/operating/backups-and-upgrades#upgrading-from-alpha60";
|
|
14
|
-
declare const removedApi: unique symbol;
|
|
15
|
-
/** A removed export: calling or constructing it throws, naming its replacement. */
|
|
16
|
-
export type RemovedApi = ((...args: never[]) => never) & (new (...args: never[]) => never) & {
|
|
17
|
-
readonly [removedApi]: never;
|
|
18
|
-
};
|
|
19
|
-
/** The error a removed export throws. `code` is `JAZZ_API_REMOVED`. */
|
|
20
|
-
export declare function removedApiError(name: string, replacement: string): Error;
|
|
21
|
-
/** @internal A stub for a removed export: throws when called or constructed. */
|
|
22
|
-
export declare function removed(name: string, replacement: string): RemovedApi;
|
|
23
|
-
/** What replaced each removed name. */
|
|
24
|
-
export declare const REPLACED: {
|
|
25
|
-
readonly useJazzAuth: "useJazzSession() (Svelte: getJazzSession()): the session, who is signed in, and its operations";
|
|
26
|
-
readonly useJazzSessionOwner: "useJazzSession() (Svelte: getJazzSession()): the session, who is signed in, and its operations";
|
|
27
|
-
readonly useAccountState: "useJazzSession() (Svelte: getJazzSession()): the session, who is signed in, and its operations";
|
|
28
|
-
readonly createAccountState: "useJazzSession() (the session's snapshot is reactive)";
|
|
29
|
-
readonly createJazzSessionState: "useJazzSession()";
|
|
30
|
-
readonly accountState: "getJazzSession()";
|
|
31
|
-
readonly createAccountManager: "createJazzClient(config) (the session signs in itself: initial: \"device\", createDeviceAccount(), or your backend's user)";
|
|
32
|
-
readonly AccountManager: "createJazzClient(config) (the session signs in itself: initial: \"device\", createDeviceAccount(), or your backend's user)";
|
|
33
|
-
readonly createDb: "createJazzClient(config), then session.db";
|
|
34
|
-
readonly createJazzApp: "createJazzClient(config), or <JazzProvider config={…}>";
|
|
35
|
-
readonly exportLocalFirstSecret: "session.exportDeviceKey()";
|
|
36
|
-
readonly useLocalFirstAuth: "device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key)";
|
|
37
|
-
readonly createUseLocalFirstAuth: "device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key)";
|
|
38
|
-
readonly LocalFirstAuth: "device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key)";
|
|
39
|
-
readonly BrowserAuthSecretStore: "device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key)";
|
|
40
|
-
readonly ExpoAuthSecretStore: "device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key)";
|
|
41
|
-
readonly expoAuthSecretStore: "device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key)";
|
|
42
|
-
readonly JazzSessionProvider: "<JazzProvider session={session}>";
|
|
43
|
-
readonly JazzSvelteProvider: "<JazzProvider config={…}>, or <JazzSvelteClientProvider client> for a client you opened yourself";
|
|
44
|
-
readonly acceptLocalFirstAuth: "acceptDeviceAccounts";
|
|
45
|
-
};
|
|
46
|
-
/** @deprecated Removed in alpha.61, and throws when used: use useJazzSession() (Svelte: getJazzSession()): the session, who is signed in, and its operations. */
|
|
47
|
-
export declare const useJazzAuth: RemovedApi;
|
|
48
|
-
/** @deprecated Removed in alpha.61, and throws when used: use useJazzSession() (Svelte: getJazzSession()): the session, who is signed in, and its operations. */
|
|
49
|
-
export declare const useJazzSessionOwner: RemovedApi;
|
|
50
|
-
/** @deprecated Removed in alpha.61, and throws when used: use useJazzSession() (Svelte: getJazzSession()): the session, who is signed in, and its operations. */
|
|
51
|
-
export declare const useAccountState: RemovedApi;
|
|
52
|
-
/** @deprecated Removed in alpha.61, and throws when used: use useJazzSession() (the session's snapshot is reactive). */
|
|
53
|
-
export declare const createAccountState: RemovedApi;
|
|
54
|
-
/** @deprecated Removed in alpha.61, and throws when used: use useJazzSession(). */
|
|
55
|
-
export declare const createJazzSessionState: RemovedApi;
|
|
56
|
-
/** @deprecated Removed in alpha.61, and throws when used: use getJazzSession(). */
|
|
57
|
-
export declare const accountState: RemovedApi;
|
|
58
|
-
/** @deprecated Removed in alpha.61, and throws when used: use createJazzClient(config) (the session signs in itself: initial: "device", createDeviceAccount(), or your backend's user). */
|
|
59
|
-
export declare const createAccountManager: RemovedApi;
|
|
60
|
-
/** @deprecated Removed in alpha.61, and throws when used: use createJazzClient(config) (the session signs in itself: initial: "device", createDeviceAccount(), or your backend's user). */
|
|
61
|
-
export declare const AccountManager: RemovedApi;
|
|
62
|
-
/** @deprecated Removed in alpha.61, and throws when used: use createJazzClient(config), then session.db. */
|
|
63
|
-
export declare const createDb: RemovedApi;
|
|
64
|
-
/** @deprecated Removed in alpha.61, and throws when used: use createJazzClient(config), or <JazzProvider config={…}>. */
|
|
65
|
-
export declare const createJazzApp: RemovedApi;
|
|
66
|
-
/** @deprecated Removed in alpha.61, and throws when used: use session.exportDeviceKey(). */
|
|
67
|
-
export declare const exportLocalFirstSecret: RemovedApi;
|
|
68
|
-
/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */
|
|
69
|
-
export declare const useLocalFirstAuth: RemovedApi;
|
|
70
|
-
/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */
|
|
71
|
-
export declare const createUseLocalFirstAuth: RemovedApi;
|
|
72
|
-
/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */
|
|
73
|
-
export declare const LocalFirstAuth: RemovedApi;
|
|
74
|
-
/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */
|
|
75
|
-
export declare const BrowserAuthSecretStore: RemovedApi;
|
|
76
|
-
/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */
|
|
77
|
-
export declare const ExpoAuthSecretStore: RemovedApi;
|
|
78
|
-
/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */
|
|
79
|
-
export declare const expoAuthSecretStore: RemovedApi;
|
|
80
|
-
/** @deprecated Removed in alpha.61, and throws when used: use <JazzProvider session={session}>. */
|
|
81
|
-
export declare const JazzSessionProvider: RemovedApi;
|
|
82
|
-
/** @deprecated Removed in alpha.61, and throws when used: use <JazzProvider config={…}>, or <JazzSvelteClientProvider client> for a client you opened yourself. */
|
|
83
|
-
export declare const JazzSvelteProvider: RemovedApi;
|
|
84
|
-
/** @deprecated Removed in alpha.61, and throws when used: use acceptDeviceAccounts. */
|
|
85
|
-
export declare const acceptLocalFirstAuth: RemovedApi;
|
|
86
|
-
export {};
|
|
87
|
-
//# sourceMappingURL=removed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B,CAAC;AACF,4GAA4G;AAC5G,eAAO,MAAM,QAAQ,EAAE,UAAiE,CAAC;AACzF,yHAAyH;AACzH,eAAO,MAAM,aAAa,EAAE,UAG3B,CAAC;AACF,4FAA4F;AAC5F,eAAO,MAAM,sBAAsB,EAAE,UAGpC,CAAC;AACF,yKAAyK;AACzK,eAAO,MAAM,iBAAiB,EAAE,UAG/B,CAAC;AACF,yKAAyK;AACzK,eAAO,MAAM,uBAAuB,EAAE,UAGrC,CAAC;AACF,yKAAyK;AACzK,eAAO,MAAM,cAAc,EAAE,UAG5B,CAAC;AACF,yKAAyK;AACzK,eAAO,MAAM,sBAAsB,EAAE,UAGpC,CAAC;AACF,yKAAyK;AACzK,eAAO,MAAM,mBAAmB,EAAE,UAGjC,CAAC;AACF,yKAAyK;AACzK,eAAO,MAAM,mBAAmB,EAAE,UAGjC,CAAC;AACF,mGAAmG;AACnG,eAAO,MAAM,mBAAmB,EAAE,UAGjC,CAAC;AACF,mKAAmK;AACnK,eAAO,MAAM,kBAAkB,EAAE,UAGhC,CAAC;AACF,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,EAAE,UAGlC,CAAC"}
|
package/dist/removed-api.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Names alpha.60 exported and alpha.61 removed (the session replaced them),
|
|
3
|
-
* kept for one release as stubs that throw when used, naming what replaced
|
|
4
|
-
* them. Without them a bundler's "not exported" error guesses a similarly
|
|
5
|
-
* named export (Turbopack suggests `useJazzClient` for `useJazzAuth`), which
|
|
6
|
-
* is the wrong one. They are not working aliases.
|
|
7
|
-
*
|
|
8
|
-
* Each is typed so TypeScript shows it too: `@deprecated` with the
|
|
9
|
-
* replacement where it is declared, and parameters of type `never`, so a call
|
|
10
|
-
* with arguments doesn't type-check.
|
|
11
|
-
*/
|
|
12
|
-
/** Where the alpha.60 → alpha.61 changes are written up. */
|
|
13
|
-
export const UPGRADE_FROM_ALPHA_60_URL = "https://jazz.tools/docs/operating/backups-and-upgrades#upgrading-from-alpha60";
|
|
14
|
-
/** The error a removed export throws. `code` is `JAZZ_API_REMOVED`. */
|
|
15
|
-
export function removedApiError(name, replacement) {
|
|
16
|
-
return Object.assign(new Error(`[JAZZ_API_REMOVED] ${name} was removed in jazz-tools alpha.61: use ${replacement}. See ${UPGRADE_FROM_ALPHA_60_URL}`), { code: "JAZZ_API_REMOVED" });
|
|
17
|
-
}
|
|
18
|
-
/** @internal A stub for a removed export: throws when called or constructed. */
|
|
19
|
-
export function removed(name, replacement) {
|
|
20
|
-
// A plain function (not a Proxy): React and Fast Refresh inspect exports,
|
|
21
|
-
// which must stay inert. Calling or constructing it throws.
|
|
22
|
-
const stub = function removedJazzApi() {
|
|
23
|
-
throw removedApiError(name, replacement);
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(stub, "name", { value: name });
|
|
26
|
-
return stub;
|
|
27
|
-
}
|
|
28
|
-
const SESSION_HOOK = "useJazzSession() (Svelte: getJazzSession()): the session, who is signed in, and its operations";
|
|
29
|
-
const SESSION = 'createJazzClient(config) (the session signs in itself: initial: "device", createDeviceAccount(), or your backend\'s user)';
|
|
30
|
-
const DEVICE_ACCOUNTS = "device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key)";
|
|
31
|
-
/** What replaced each removed name. */
|
|
32
|
-
export const REPLACED = {
|
|
33
|
-
useJazzAuth: SESSION_HOOK,
|
|
34
|
-
useJazzSessionOwner: SESSION_HOOK,
|
|
35
|
-
useAccountState: SESSION_HOOK,
|
|
36
|
-
createAccountState: "useJazzSession() (the session's snapshot is reactive)",
|
|
37
|
-
createJazzSessionState: "useJazzSession()",
|
|
38
|
-
accountState: "getJazzSession()",
|
|
39
|
-
createAccountManager: SESSION,
|
|
40
|
-
AccountManager: SESSION,
|
|
41
|
-
createDb: "createJazzClient(config), then session.db",
|
|
42
|
-
createJazzApp: "createJazzClient(config), or <JazzProvider config={…}>",
|
|
43
|
-
exportLocalFirstSecret: "session.exportDeviceKey()",
|
|
44
|
-
useLocalFirstAuth: DEVICE_ACCOUNTS,
|
|
45
|
-
createUseLocalFirstAuth: DEVICE_ACCOUNTS,
|
|
46
|
-
LocalFirstAuth: DEVICE_ACCOUNTS,
|
|
47
|
-
BrowserAuthSecretStore: DEVICE_ACCOUNTS,
|
|
48
|
-
ExpoAuthSecretStore: DEVICE_ACCOUNTS,
|
|
49
|
-
expoAuthSecretStore: DEVICE_ACCOUNTS,
|
|
50
|
-
JazzSessionProvider: "<JazzProvider session={session}>",
|
|
51
|
-
JazzSvelteProvider: "<JazzProvider config={…}>, or <JazzSvelteClientProvider client> for a client you opened yourself",
|
|
52
|
-
acceptLocalFirstAuth: "acceptDeviceAccounts",
|
|
53
|
-
};
|
|
54
|
-
// The stubs. Each entry point re-exports the ones it exported in alpha.60.
|
|
55
|
-
/** @deprecated Removed in alpha.61, and throws when used: use useJazzSession() (Svelte: getJazzSession()): the session, who is signed in, and its operations. */
|
|
56
|
-
export const useJazzAuth = /*#__PURE__*/ removed("useJazzAuth", REPLACED.useJazzAuth);
|
|
57
|
-
/** @deprecated Removed in alpha.61, and throws when used: use useJazzSession() (Svelte: getJazzSession()): the session, who is signed in, and its operations. */
|
|
58
|
-
export const useJazzSessionOwner = /*#__PURE__*/ removed("useJazzSessionOwner", REPLACED.useJazzSessionOwner);
|
|
59
|
-
/** @deprecated Removed in alpha.61, and throws when used: use useJazzSession() (Svelte: getJazzSession()): the session, who is signed in, and its operations. */
|
|
60
|
-
export const useAccountState = /*#__PURE__*/ removed("useAccountState", REPLACED.useAccountState);
|
|
61
|
-
/** @deprecated Removed in alpha.61, and throws when used: use useJazzSession() (the session's snapshot is reactive). */
|
|
62
|
-
export const createAccountState = /*#__PURE__*/ removed("createAccountState", REPLACED.createAccountState);
|
|
63
|
-
/** @deprecated Removed in alpha.61, and throws when used: use useJazzSession(). */
|
|
64
|
-
export const createJazzSessionState = /*#__PURE__*/ removed("createJazzSessionState", REPLACED.createJazzSessionState);
|
|
65
|
-
/** @deprecated Removed in alpha.61, and throws when used: use getJazzSession(). */
|
|
66
|
-
export const accountState = /*#__PURE__*/ removed("accountState", REPLACED.accountState);
|
|
67
|
-
/** @deprecated Removed in alpha.61, and throws when used: use createJazzClient(config) (the session signs in itself: initial: "device", createDeviceAccount(), or your backend's user). */
|
|
68
|
-
export const createAccountManager = /*#__PURE__*/ removed("createAccountManager", REPLACED.createAccountManager);
|
|
69
|
-
/** @deprecated Removed in alpha.61, and throws when used: use createJazzClient(config) (the session signs in itself: initial: "device", createDeviceAccount(), or your backend's user). */
|
|
70
|
-
export const AccountManager = /*#__PURE__*/ removed("AccountManager", REPLACED.AccountManager);
|
|
71
|
-
/** @deprecated Removed in alpha.61, and throws when used: use createJazzClient(config), then session.db. */
|
|
72
|
-
export const createDb = /*#__PURE__*/ removed("createDb", REPLACED.createDb);
|
|
73
|
-
/** @deprecated Removed in alpha.61, and throws when used: use createJazzClient(config), or <JazzProvider config={…}>. */
|
|
74
|
-
export const createJazzApp = /*#__PURE__*/ removed("createJazzApp", REPLACED.createJazzApp);
|
|
75
|
-
/** @deprecated Removed in alpha.61, and throws when used: use session.exportDeviceKey(). */
|
|
76
|
-
export const exportLocalFirstSecret = /*#__PURE__*/ removed("exportLocalFirstSecret", REPLACED.exportLocalFirstSecret);
|
|
77
|
-
/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */
|
|
78
|
-
export const useLocalFirstAuth = /*#__PURE__*/ removed("useLocalFirstAuth", REPLACED.useLocalFirstAuth);
|
|
79
|
-
/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */
|
|
80
|
-
export const createUseLocalFirstAuth = /*#__PURE__*/ removed("createUseLocalFirstAuth", REPLACED.createUseLocalFirstAuth);
|
|
81
|
-
/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */
|
|
82
|
-
export const LocalFirstAuth = /*#__PURE__*/ removed("LocalFirstAuth", REPLACED.LocalFirstAuth);
|
|
83
|
-
/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */
|
|
84
|
-
export const BrowserAuthSecretStore = /*#__PURE__*/ removed("BrowserAuthSecretStore", REPLACED.BrowserAuthSecretStore);
|
|
85
|
-
/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */
|
|
86
|
-
export const ExpoAuthSecretStore = /*#__PURE__*/ removed("ExpoAuthSecretStore", REPLACED.ExpoAuthSecretStore);
|
|
87
|
-
/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */
|
|
88
|
-
export const expoAuthSecretStore = /*#__PURE__*/ removed("expoAuthSecretStore", REPLACED.expoAuthSecretStore);
|
|
89
|
-
/** @deprecated Removed in alpha.61, and throws when used: use <JazzProvider session={session}>. */
|
|
90
|
-
export const JazzSessionProvider = /*#__PURE__*/ removed("JazzSessionProvider", REPLACED.JazzSessionProvider);
|
|
91
|
-
/** @deprecated Removed in alpha.61, and throws when used: use <JazzProvider config={…}>, or <JazzSvelteClientProvider client> for a client you opened yourself. */
|
|
92
|
-
export const JazzSvelteProvider = /*#__PURE__*/ removed("JazzSvelteProvider", REPLACED.JazzSvelteProvider);
|
|
93
|
-
/** @deprecated Removed in alpha.61, and throws when used: use acceptDeviceAccounts. */
|
|
94
|
-
export const acceptLocalFirstAuth = /*#__PURE__*/ removed("acceptLocalFirstAuth", REPLACED.acceptLocalFirstAuth);
|
|
95
|
-
//# sourceMappingURL=removed-api.js.map
|
package/dist/removed-api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"removed-api.js","sourceRoot":"","sources":["../src/removed-api.ts"],"names":[],"mappings":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EACpB,QAAQ,CAAC,kBAAkB,CAC5B,CAAC;AACF,uFAAuF;AACvF,MAAM,CAAC,MAAM,oBAAoB,GAAe,aAAa,CAAC,OAAO,CACnE,sBAAsB,EACtB,QAAQ,CAAC,oBAAoB,CAC9B,CAAC","sourcesContent":["/**\n * Names alpha.60 exported and alpha.61 removed (the session replaced them),\n * kept for one release as stubs that throw when used, naming what replaced\n * them. Without them a bundler's \"not exported\" error guesses a similarly\n * named export (Turbopack suggests `useJazzClient` for `useJazzAuth`), which\n * is the wrong one. They are not working aliases.\n *\n * Each is typed so TypeScript shows it too: `@deprecated` with the\n * replacement where it is declared, and parameters of type `never`, so a call\n * with arguments doesn't type-check.\n */\n\n/** Where the alpha.60 → alpha.61 changes are written up. */\nexport const UPGRADE_FROM_ALPHA_60_URL =\n \"https://jazz.tools/docs/operating/backups-and-upgrades#upgrading-from-alpha60\";\n\ndeclare const removedApi: unique symbol;\n\n/** A removed export: calling or constructing it throws, naming its replacement. */\nexport type RemovedApi = ((...args: never[]) => never) &\n (new (...args: never[]) => never) & { readonly [removedApi]: never };\n\n/** The error a removed export throws. `code` is `JAZZ_API_REMOVED`. */\nexport function removedApiError(name: string, replacement: string): Error {\n return Object.assign(\n new Error(\n `[JAZZ_API_REMOVED] ${name} was removed in jazz-tools alpha.61: use ${replacement}. See ${UPGRADE_FROM_ALPHA_60_URL}`,\n ),\n { code: \"JAZZ_API_REMOVED\" },\n );\n}\n\n/** @internal A stub for a removed export: throws when called or constructed. */\nexport function removed(name: string, replacement: string): RemovedApi {\n // A plain function (not a Proxy): React and Fast Refresh inspect exports,\n // which must stay inert. Calling or constructing it throws.\n const stub = function removedJazzApi(): never {\n throw removedApiError(name, replacement);\n };\n Object.defineProperty(stub, \"name\", { value: name });\n return stub as unknown as RemovedApi;\n}\n\nconst SESSION_HOOK =\n \"useJazzSession() (Svelte: getJazzSession()): the session, who is signed in, and its operations\";\nconst SESSION =\n 'createJazzClient(config) (the session signs in itself: initial: \"device\", createDeviceAccount(), or your backend\\'s user)';\nconst DEVICE_ACCOUNTS =\n \"device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key)\";\n\n/** What replaced each removed name. */\nexport const REPLACED = {\n useJazzAuth: SESSION_HOOK,\n useJazzSessionOwner: SESSION_HOOK,\n useAccountState: SESSION_HOOK,\n createAccountState: \"useJazzSession() (the session's snapshot is reactive)\",\n createJazzSessionState: \"useJazzSession()\",\n accountState: \"getJazzSession()\",\n createAccountManager: SESSION,\n AccountManager: SESSION,\n createDb: \"createJazzClient(config), then session.db\",\n createJazzApp: \"createJazzClient(config), or <JazzProvider config={…}>\",\n exportLocalFirstSecret: \"session.exportDeviceKey()\",\n useLocalFirstAuth: DEVICE_ACCOUNTS,\n createUseLocalFirstAuth: DEVICE_ACCOUNTS,\n LocalFirstAuth: DEVICE_ACCOUNTS,\n BrowserAuthSecretStore: DEVICE_ACCOUNTS,\n ExpoAuthSecretStore: DEVICE_ACCOUNTS,\n expoAuthSecretStore: DEVICE_ACCOUNTS,\n JazzSessionProvider: \"<JazzProvider session={session}>\",\n JazzSvelteProvider:\n \"<JazzProvider config={…}>, or <JazzSvelteClientProvider client> for a client you opened yourself\",\n acceptLocalFirstAuth: \"acceptDeviceAccounts\",\n} as const;\n\n// The stubs. Each entry point re-exports the ones it exported in alpha.60.\n/** @deprecated Removed in alpha.61, and throws when used: use useJazzSession() (Svelte: getJazzSession()): the session, who is signed in, and its operations. */\nexport const useJazzAuth: RemovedApi = /*#__PURE__*/ removed(\"useJazzAuth\", REPLACED.useJazzAuth);\n/** @deprecated Removed in alpha.61, and throws when used: use useJazzSession() (Svelte: getJazzSession()): the session, who is signed in, and its operations. */\nexport const useJazzSessionOwner: RemovedApi = /*#__PURE__*/ removed(\n \"useJazzSessionOwner\",\n REPLACED.useJazzSessionOwner,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use useJazzSession() (Svelte: getJazzSession()): the session, who is signed in, and its operations. */\nexport const useAccountState: RemovedApi = /*#__PURE__*/ removed(\n \"useAccountState\",\n REPLACED.useAccountState,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use useJazzSession() (the session's snapshot is reactive). */\nexport const createAccountState: RemovedApi = /*#__PURE__*/ removed(\n \"createAccountState\",\n REPLACED.createAccountState,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use useJazzSession(). */\nexport const createJazzSessionState: RemovedApi = /*#__PURE__*/ removed(\n \"createJazzSessionState\",\n REPLACED.createJazzSessionState,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use getJazzSession(). */\nexport const accountState: RemovedApi = /*#__PURE__*/ removed(\n \"accountState\",\n REPLACED.accountState,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use createJazzClient(config) (the session signs in itself: initial: \"device\", createDeviceAccount(), or your backend's user). */\nexport const createAccountManager: RemovedApi = /*#__PURE__*/ removed(\n \"createAccountManager\",\n REPLACED.createAccountManager,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use createJazzClient(config) (the session signs in itself: initial: \"device\", createDeviceAccount(), or your backend's user). */\nexport const AccountManager: RemovedApi = /*#__PURE__*/ removed(\n \"AccountManager\",\n REPLACED.AccountManager,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use createJazzClient(config), then session.db. */\nexport const createDb: RemovedApi = /*#__PURE__*/ removed(\"createDb\", REPLACED.createDb);\n/** @deprecated Removed in alpha.61, and throws when used: use createJazzClient(config), or <JazzProvider config={…}>. */\nexport const createJazzApp: RemovedApi = /*#__PURE__*/ removed(\n \"createJazzApp\",\n REPLACED.createJazzApp,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use session.exportDeviceKey(). */\nexport const exportLocalFirstSecret: RemovedApi = /*#__PURE__*/ removed(\n \"exportLocalFirstSecret\",\n REPLACED.exportLocalFirstSecret,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */\nexport const useLocalFirstAuth: RemovedApi = /*#__PURE__*/ removed(\n \"useLocalFirstAuth\",\n REPLACED.useLocalFirstAuth,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */\nexport const createUseLocalFirstAuth: RemovedApi = /*#__PURE__*/ removed(\n \"createUseLocalFirstAuth\",\n REPLACED.createUseLocalFirstAuth,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */\nexport const LocalFirstAuth: RemovedApi = /*#__PURE__*/ removed(\n \"LocalFirstAuth\",\n REPLACED.LocalFirstAuth,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */\nexport const BrowserAuthSecretStore: RemovedApi = /*#__PURE__*/ removed(\n \"BrowserAuthSecretStore\",\n REPLACED.BrowserAuthSecretStore,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */\nexport const ExpoAuthSecretStore: RemovedApi = /*#__PURE__*/ removed(\n \"ExpoAuthSecretStore\",\n REPLACED.ExpoAuthSecretStore,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use device accounts on the session: createDeviceAccount(), exportDeviceKey() and restoreDeviceAccount(key). */\nexport const expoAuthSecretStore: RemovedApi = /*#__PURE__*/ removed(\n \"expoAuthSecretStore\",\n REPLACED.expoAuthSecretStore,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use <JazzProvider session={session}>. */\nexport const JazzSessionProvider: RemovedApi = /*#__PURE__*/ removed(\n \"JazzSessionProvider\",\n REPLACED.JazzSessionProvider,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use <JazzProvider config={…}>, or <JazzSvelteClientProvider client> for a client you opened yourself. */\nexport const JazzSvelteProvider: RemovedApi = /*#__PURE__*/ removed(\n \"JazzSvelteProvider\",\n REPLACED.JazzSvelteProvider,\n);\n/** @deprecated Removed in alpha.61, and throws when used: use acceptDeviceAccounts. */\nexport const acceptLocalFirstAuth: RemovedApi = /*#__PURE__*/ removed(\n \"acceptLocalFirstAuth\",\n REPLACED.acceptLocalFirstAuth,\n);\n"]}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Root-level exports of the alpha.64/65 schema, permissions and migrations
|
|
3
|
-
* DSL that alpha.66's TS authoring replaced (`schema.ts` with
|
|
4
|
-
* `s.defineSchema` and the schema's own `definePermissions`, compiled by
|
|
5
|
-
* `npx jazz-tools generate` to `jazz.app.json`, `jazz.permissions.json` and
|
|
6
|
-
* `jazz.generated.ts`). The names stay as stubs that throw when used, naming
|
|
7
|
-
* the replacement and pointing at `jazz-tools upgrade`. Without them a
|
|
8
|
-
* bundler's "not exported" error would guess a similarly named export.
|
|
9
|
-
*/
|
|
10
|
-
import { type RemovedApi } from "./removed-api.js";
|
|
11
|
-
/** Where the upgrade from alpha.64 is written up (the alpha.65 section follows it). */
|
|
12
|
-
export declare const UPGRADE_FROM_ALPHA_64_URL = "https://jazz.tools/docs/operating/backups-and-upgrades#upgrading-from-alpha64";
|
|
13
|
-
/** The error a removed DSL export throws. `code` is `JAZZ_API_REMOVED`. */
|
|
14
|
-
export declare function removedSchemaApiError(name: string): Error;
|
|
15
|
-
/** @internal A stub for a removed DSL export: throws when called or constructed. */
|
|
16
|
-
export declare function removedSchemaApi(name: string): RemovedApi;
|
|
17
|
-
/**
|
|
18
|
-
* What `s.enum({ ...cases })` throws: enum cases with fields are gone for
|
|
19
|
-
* good, not just moved to jazz.app.json (jazz#5758).
|
|
20
|
-
*/
|
|
21
|
-
export declare const ENUM_CASES_NOT_SUPPORTED = "enum cases with fields are not supported; use s.enum(\"a\", \"b\") plus a nullable column per field, or s.json() (see https://github.com/garden-co/jazz/issues/5758)";
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated Not available here, and throws when used: the schema DSL is for
|
|
24
|
-
* authoring only. Define the app in schema.ts (`s.defineSchema`), run
|
|
25
|
-
* `npx jazz-tools generate`, and import `app` from ./jazz.generated at runtime.
|
|
26
|
-
*/
|
|
27
|
-
export declare const schema: {
|
|
28
|
-
readonly string: RemovedApi;
|
|
29
|
-
readonly bigint: RemovedApi;
|
|
30
|
-
readonly boolean: RemovedApi;
|
|
31
|
-
readonly enum: RemovedApi;
|
|
32
|
-
readonly array: RemovedApi;
|
|
33
|
-
readonly table: RemovedApi;
|
|
34
|
-
readonly reverse: RemovedApi;
|
|
35
|
-
readonly allowExternalProvenanceName: RemovedApi;
|
|
36
|
-
readonly defineApp: RemovedApi;
|
|
37
|
-
readonly defineSliceableApp: RemovedApi;
|
|
38
|
-
readonly defineSchema: RemovedApi;
|
|
39
|
-
readonly definePermissions: RemovedApi;
|
|
40
|
-
readonly computed: RemovedApi;
|
|
41
|
-
readonly uuid: RemovedApi;
|
|
42
|
-
readonly int: RemovedApi;
|
|
43
|
-
readonly timestamp: RemovedApi;
|
|
44
|
-
readonly float: RemovedApi;
|
|
45
|
-
readonly bytes: RemovedApi;
|
|
46
|
-
readonly json: RemovedApi;
|
|
47
|
-
readonly rel: RemovedApi;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* @deprecated Not available here, and throws when used: migrations are
|
|
51
|
-
* authored in migrations/*.ts, written by `npx jazz-tools migrations create`.
|
|
52
|
-
*/
|
|
53
|
-
export declare const migration: {
|
|
54
|
-
readonly add: RemovedApi;
|
|
55
|
-
readonly drop: RemovedApi;
|
|
56
|
-
readonly defineMigration: RemovedApi;
|
|
57
|
-
readonly renameTableFrom: RemovedApi;
|
|
58
|
-
readonly renameFrom: RemovedApi;
|
|
59
|
-
};
|
|
60
|
-
/** @deprecated Removed, and throws when used: define the schema in schema.ts with `export const schema = s.defineSchema({ … })`; import `app` from ./jazz.generated. Run `npx jazz-tools upgrade`. */
|
|
61
|
-
export declare const defineApp: RemovedApi;
|
|
62
|
-
/** @deprecated Removed, and throws when used: use `s.defineSchema({ … })` (`import { schema as s } from "jazz-tools"`). Run `npx jazz-tools upgrade`. */
|
|
63
|
-
export declare const defineSchema: RemovedApi;
|
|
64
|
-
/** @deprecated Removed, and throws when used: schema slicing is gone; use `s.defineSchema({ … })` and the generated `app`. Run `npx jazz-tools upgrade`. */
|
|
65
|
-
export declare const defineSliceableApp: RemovedApi;
|
|
66
|
-
/** @deprecated Removed, and throws when used: use the schema's own `definePermissions` (`const { definePermissions } = schema`). Run `npx jazz-tools upgrade`. */
|
|
67
|
-
export declare const definePermissions: RemovedApi;
|
|
68
|
-
/** @deprecated Removed, and throws when used: use `m.defineMigration` (`import { migration as m } from "jazz-tools"`). Run `npx jazz-tools upgrade`. */
|
|
69
|
-
export declare const defineMigration: RemovedApi;
|
|
70
|
-
/** @deprecated Removed, and throws when used: use `m.renameTableFrom` (`import { migration as m } from "jazz-tools"`). Run `npx jazz-tools upgrade`. */
|
|
71
|
-
export declare const renameTableFrom: RemovedApi;
|
|
72
|
-
/** @deprecated Removed, and throws when used: no replacement: jazz.generated.ts embeds the compiled schema. Run `npx jazz-tools upgrade`. */
|
|
73
|
-
export declare const schemaToWasm: RemovedApi;
|
|
74
|
-
/** @deprecated Removed, and throws when used: use `s.table(columns, relations)` inside `s.defineSchema({ … })`. Run `npx jazz-tools upgrade`. */
|
|
75
|
-
export declare const table: RemovedApi;
|
|
76
|
-
/** @deprecated Removed, and throws when used: use the schema's own `anyOf` (`const { anyOf } = schema`). Run `npx jazz-tools upgrade`. */
|
|
77
|
-
export declare const anyOf: RemovedApi;
|
|
78
|
-
/** @deprecated Removed, and throws when used: use the schema's own `allOf` (`const { allOf } = schema`). Run `npx jazz-tools upgrade`. */
|
|
79
|
-
export declare const allOf: RemovedApi;
|
|
80
|
-
//# sourceMappingURL=removed-schema-api.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"removed-schema-api.d.ts","sourceRoot":"","sources":["../src/removed-schema-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,uFAAuF;AACvF,eAAO,MAAM,yBAAyB,kFAC2C,CAAC;AAoClF,2EAA2E;AAC3E,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAMzD;AAED,oFAAoF;AACpF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAQzD;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,yKAC+H,CAAC;AA4BrK;;;;GAIG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;CAqBR,CAAC;AAEZ;;;GAGG;AACH,eAAO,MAAM,SAAS;;;;;;CAMX,CAAC;AAEZ,sMAAsM;AACtM,eAAO,MAAM,SAAS,EAAE,UAAwD,CAAC;AACjF,yJAAyJ;AACzJ,eAAO,MAAM,YAAY,EAAE,UAA2D,CAAC;AACvF,4JAA4J;AAC5J,eAAO,MAAM,kBAAkB,EAAE,UAAiE,CAAC;AACnG,kKAAkK;AAClK,eAAO,MAAM,iBAAiB,EAAE,UAAgE,CAAC;AACjG,wJAAwJ;AACxJ,eAAO,MAAM,eAAe,EAAE,UAA8D,CAAC;AAC7F,wJAAwJ;AACxJ,eAAO,MAAM,eAAe,EAAE,UAA8D,CAAC;AAC7F,6IAA6I;AAC7I,eAAO,MAAM,YAAY,EAAE,UAA2D,CAAC;AACvF,iJAAiJ;AACjJ,eAAO,MAAM,KAAK,EAAE,UAAoD,CAAC;AACzE,0IAA0I;AAC1I,eAAO,MAAM,KAAK,EAAE,UAAoD,CAAC;AACzE,0IAA0I;AAC1I,eAAO,MAAM,KAAK,EAAE,UAAoD,CAAC"}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
/** Where the upgrade from alpha.64 is written up (the alpha.65 section follows it). */
|
|
2
|
-
export const UPGRADE_FROM_ALPHA_64_URL = "https://jazz.tools/docs/operating/backups-and-upgrades#upgrading-from-alpha64";
|
|
3
|
-
const NO_REPLACEMENT = "it has no replacement: jazz.app.json and jazz.permissions.json are now the app's schema, migrations and permissions, " +
|
|
4
|
-
"generated from schema.ts (`s.defineSchema`) by `npx jazz-tools generate`, with typed bindings in jazz.generated.ts. " +
|
|
5
|
-
"Run `npx jazz-tools upgrade` to convert an alpha.64 or alpha.65 app";
|
|
6
|
-
/**
|
|
7
|
-
* What replaces each alpha.64 name in alpha.66's TS authoring (`schema.ts`
|
|
8
|
-
* with `s.defineSchema` and `schema.definePermissions`). Names not here
|
|
9
|
-
* have no replacement.
|
|
10
|
-
*/
|
|
11
|
-
const AUTHORING_REPLACEMENTS = {
|
|
12
|
-
defineApp: "define the schema with `export const schema = s.defineSchema({ … })` in schema.ts; runtime code imports `app` from ./jazz.generated",
|
|
13
|
-
"schema.defineApp": "define the schema with `export const schema = s.defineSchema({ … })` in schema.ts; runtime code imports `app` from ./jazz.generated",
|
|
14
|
-
defineSliceableApp: "schema slicing is gone: define the schema with `export const schema = s.defineSchema({ … })` and import `app` from ./jazz.generated",
|
|
15
|
-
"schema.defineSliceableApp": "schema slicing is gone: define the schema with `export const schema = s.defineSchema({ … })` and import `app` from ./jazz.generated",
|
|
16
|
-
defineSchema: 'use `s.defineSchema({ … })` (`import { schema as s } from "jazz-tools"`)',
|
|
17
|
-
definePermissions: "permissions use the new DSL: `const { definePermissions } = schema; export const permissions = definePermissions({ <table>: { read, insert, update, delete } })`",
|
|
18
|
-
"schema.definePermissions": "permissions use the new DSL: `const { definePermissions } = schema; export const permissions = definePermissions({ <table>: { read, insert, update, delete } })`",
|
|
19
|
-
defineMigration: 'use `migration.defineMigration({ … })` (`import { migration as m } from "jazz-tools"`)',
|
|
20
|
-
renameTableFrom: 'use `migration.renameTableFrom(…)` (`import { migration as m } from "jazz-tools"`)',
|
|
21
|
-
table: "use `s.table(columns, relations)` inside `s.defineSchema({ … })`",
|
|
22
|
-
anyOf: "use the schema's own `anyOf` (`const { anyOf } = schema`)",
|
|
23
|
-
allOf: "use the schema's own `allOf` (`const { allOf } = schema`)",
|
|
24
|
-
createSessionContext: "use the schema's own `session` (`const { session } = schema`)",
|
|
25
|
-
};
|
|
26
|
-
/** The error a removed DSL export throws. `code` is `JAZZ_API_REMOVED`. */
|
|
27
|
-
export function removedSchemaApiError(name) {
|
|
28
|
-
const replacement = AUTHORING_REPLACEMENTS[name];
|
|
29
|
-
const message = replacement
|
|
30
|
-
? `[JAZZ_API_REMOVED] ${name} was removed: ${replacement}. Run \`npx jazz-tools upgrade\` to convert an alpha.64 or alpha.65 app. See ${UPGRADE_FROM_ALPHA_64_URL}`
|
|
31
|
-
: `[JAZZ_API_REMOVED] ${name} was removed: ${NO_REPLACEMENT}. See ${UPGRADE_FROM_ALPHA_64_URL}`;
|
|
32
|
-
return Object.assign(new Error(message), { code: "JAZZ_API_REMOVED" });
|
|
33
|
-
}
|
|
34
|
-
/** @internal A stub for a removed DSL export: throws when called or constructed. */
|
|
35
|
-
export function removedSchemaApi(name) {
|
|
36
|
-
// A plain function (not a Proxy): React and Fast Refresh inspect exports,
|
|
37
|
-
// which must stay inert. Calling or constructing it throws.
|
|
38
|
-
const stub = function removedJazzSchemaApi() {
|
|
39
|
-
throw removedSchemaApiError(name);
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(stub, "name", { value: name });
|
|
42
|
-
return stub;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* What `s.enum({ ...cases })` throws: enum cases with fields are gone for
|
|
46
|
-
* good, not just moved to jazz.app.json (jazz#5758).
|
|
47
|
-
*/
|
|
48
|
-
export const ENUM_CASES_NOT_SUPPORTED = 'enum cases with fields are not supported; use s.enum("a", "b") plus a nullable column per field, or s.json() (see https://github.com/garden-co/jazz/issues/5758)';
|
|
49
|
-
/** `schema.enum`: like every removed member, except that the object form names its own refusal. */
|
|
50
|
-
function removedEnum() {
|
|
51
|
-
const stub = function removedJazzSchemaApi(...args) {
|
|
52
|
-
if (args.length === 1 && typeof args[0] === "object" && args[0] !== null) {
|
|
53
|
-
throw new Error(ENUM_CASES_NOT_SUPPORTED);
|
|
54
|
-
}
|
|
55
|
-
throw removedSchemaApiError("schema.enum");
|
|
56
|
-
};
|
|
57
|
-
Object.defineProperty(stub, "name", { value: "schema.enum" });
|
|
58
|
-
return stub;
|
|
59
|
-
}
|
|
60
|
-
/** A removed namespace: each member it had is a stub that throws, naming itself. */
|
|
61
|
-
function removedNamespace(namespace, members) {
|
|
62
|
-
const stubs = {};
|
|
63
|
-
for (const member of members)
|
|
64
|
-
stubs[member] =
|
|
65
|
-
namespace === "schema" && member === "enum"
|
|
66
|
-
? removedEnum()
|
|
67
|
-
: removedSchemaApi(`${namespace}.${member}`);
|
|
68
|
-
return Object.freeze(stubs);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* @deprecated Not available here, and throws when used: the schema DSL is for
|
|
72
|
-
* authoring only. Define the app in schema.ts (`s.defineSchema`), run
|
|
73
|
-
* `npx jazz-tools generate`, and import `app` from ./jazz.generated at runtime.
|
|
74
|
-
*/
|
|
75
|
-
export const schema = /*#__PURE__*/ removedNamespace("schema", [
|
|
76
|
-
"table",
|
|
77
|
-
"computed",
|
|
78
|
-
"string",
|
|
79
|
-
"uuid",
|
|
80
|
-
"boolean",
|
|
81
|
-
"int",
|
|
82
|
-
"bigint",
|
|
83
|
-
"timestamp",
|
|
84
|
-
"float",
|
|
85
|
-
"bytes",
|
|
86
|
-
"json",
|
|
87
|
-
"enum",
|
|
88
|
-
"array",
|
|
89
|
-
"rel",
|
|
90
|
-
"reverse",
|
|
91
|
-
"defineApp",
|
|
92
|
-
"defineSchema",
|
|
93
|
-
"defineSliceableApp",
|
|
94
|
-
"definePermissions",
|
|
95
|
-
"allowExternalProvenanceName",
|
|
96
|
-
]);
|
|
97
|
-
/**
|
|
98
|
-
* @deprecated Not available here, and throws when used: migrations are
|
|
99
|
-
* authored in migrations/*.ts, written by `npx jazz-tools migrations create`.
|
|
100
|
-
*/
|
|
101
|
-
export const migration = /*#__PURE__*/ removedNamespace("migration", [
|
|
102
|
-
"add",
|
|
103
|
-
"drop",
|
|
104
|
-
"renameFrom",
|
|
105
|
-
"defineMigration",
|
|
106
|
-
"renameTableFrom",
|
|
107
|
-
]);
|
|
108
|
-
/** @deprecated Removed, and throws when used: define the schema in schema.ts with `export const schema = s.defineSchema({ … })`; import `app` from ./jazz.generated. Run `npx jazz-tools upgrade`. */
|
|
109
|
-
export const defineApp = /*#__PURE__*/ removedSchemaApi("defineApp");
|
|
110
|
-
/** @deprecated Removed, and throws when used: use `s.defineSchema({ … })` (`import { schema as s } from "jazz-tools"`). Run `npx jazz-tools upgrade`. */
|
|
111
|
-
export const defineSchema = /*#__PURE__*/ removedSchemaApi("defineSchema");
|
|
112
|
-
/** @deprecated Removed, and throws when used: schema slicing is gone; use `s.defineSchema({ … })` and the generated `app`. Run `npx jazz-tools upgrade`. */
|
|
113
|
-
export const defineSliceableApp = /*#__PURE__*/ removedSchemaApi("defineSliceableApp");
|
|
114
|
-
/** @deprecated Removed, and throws when used: use the schema's own `definePermissions` (`const { definePermissions } = schema`). Run `npx jazz-tools upgrade`. */
|
|
115
|
-
export const definePermissions = /*#__PURE__*/ removedSchemaApi("definePermissions");
|
|
116
|
-
/** @deprecated Removed, and throws when used: use `m.defineMigration` (`import { migration as m } from "jazz-tools"`). Run `npx jazz-tools upgrade`. */
|
|
117
|
-
export const defineMigration = /*#__PURE__*/ removedSchemaApi("defineMigration");
|
|
118
|
-
/** @deprecated Removed, and throws when used: use `m.renameTableFrom` (`import { migration as m } from "jazz-tools"`). Run `npx jazz-tools upgrade`. */
|
|
119
|
-
export const renameTableFrom = /*#__PURE__*/ removedSchemaApi("renameTableFrom");
|
|
120
|
-
/** @deprecated Removed, and throws when used: no replacement: jazz.generated.ts embeds the compiled schema. Run `npx jazz-tools upgrade`. */
|
|
121
|
-
export const schemaToWasm = /*#__PURE__*/ removedSchemaApi("schemaToWasm");
|
|
122
|
-
/** @deprecated Removed, and throws when used: use `s.table(columns, relations)` inside `s.defineSchema({ … })`. Run `npx jazz-tools upgrade`. */
|
|
123
|
-
export const table = /*#__PURE__*/ removedSchemaApi("table");
|
|
124
|
-
/** @deprecated Removed, and throws when used: use the schema's own `anyOf` (`const { anyOf } = schema`). Run `npx jazz-tools upgrade`. */
|
|
125
|
-
export const anyOf = /*#__PURE__*/ removedSchemaApi("anyOf");
|
|
126
|
-
/** @deprecated Removed, and throws when used: use the schema's own `allOf` (`const { allOf } = schema`). Run `npx jazz-tools upgrade`. */
|
|
127
|
-
export const allOf = /*#__PURE__*/ removedSchemaApi("allOf");
|
|
128
|
-
//# sourceMappingURL=removed-schema-api.js.map
|