@mdbase-dev/sdk 0.1.0-beta.158 → 0.1.0-beta.160
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 +4 -6
- package/dist/app-host/web-sign-in-session.js +2 -2
- package/dist/app-host/web-sign-in-session.js.map +1 -1
- package/dist/application/asset-pins.json +4 -4
- package/dist/application/entry.js +10 -1
- package/dist/application/entry.js.map +1 -1
- package/dist/application/worker.js +9 -6
- package/dist/browser/mdbase-sdk.js +24 -13
- package/dist/browser/mdbase-sdk.min.js +2 -2
- package/dist/client.js +3 -0
- package/dist/client.js.map +1 -1
- package/dist/describe-error.d.ts +1 -1
- package/dist/describe-error.js +3 -3
- package/dist/describe-error.js.map +1 -1
- package/dist/native/provenance.json +5 -5
- package/dist/native/runtime.wasm +0 -0
- package/dist/thin-client.d.ts +2 -2
- package/dist/thin-client.js +2 -2
- package/package.json +2 -2
|
@@ -15308,12 +15308,12 @@ function appReleaseTrust() {
|
|
|
15308
15308
|
// src/application/asset-pins.json
|
|
15309
15309
|
var asset_pins_default = {
|
|
15310
15310
|
runtime: {
|
|
15311
|
-
sha256: "
|
|
15312
|
-
bytes:
|
|
15313
|
-
maxBytes:
|
|
15311
|
+
sha256: "c30e2e23c1fbc6642936996b8495133ce66e87caaf49a99050fc38f8a7422667",
|
|
15312
|
+
bytes: 3803805,
|
|
15313
|
+
maxBytes: 3803805,
|
|
15314
15314
|
source: {
|
|
15315
15315
|
repository: "mdbase-dev/mdbase-connect",
|
|
15316
|
-
commit: "
|
|
15316
|
+
commit: "81462447473808e040d3b31d15ede54e987ffa1e"
|
|
15317
15317
|
}
|
|
15318
15318
|
},
|
|
15319
15319
|
sqlite: {
|
|
@@ -24526,6 +24526,9 @@ var MdbaseClient = class _MdbaseClient {
|
|
|
24526
24526
|
continue;
|
|
24527
24527
|
}
|
|
24528
24528
|
signal?.throwIfAborted();
|
|
24529
|
+
if (page.hasMore && !page.cursor) {
|
|
24530
|
+
throw mdbaseError("invalid_request", "Query requires offset paging", "query_cursor_required");
|
|
24531
|
+
}
|
|
24529
24532
|
yield page;
|
|
24530
24533
|
pagesYielded++;
|
|
24531
24534
|
if (!page.cursor) return;
|
|
@@ -31642,10 +31645,10 @@ var AppWebSignInSession = class {
|
|
|
31642
31645
|
* sign-in gesture; a pending ledger keeps its SAME request for authorize(). */
|
|
31643
31646
|
start() {
|
|
31644
31647
|
return this.operation(async () => {
|
|
31645
|
-
if (this.flow) return this.getSnapshot();
|
|
31648
|
+
if (this.flow && this.base.status !== "blocked") return this.getSnapshot();
|
|
31646
31649
|
this.publish({ status: "starting", problem: null, signOutResult: null });
|
|
31647
31650
|
const p = this.options;
|
|
31648
|
-
this.flow
|
|
31651
|
+
this.flow ??= await AppProtectedInstallationSignIn.open({
|
|
31649
31652
|
...p,
|
|
31650
31653
|
mode: p.storeMode ?? "open",
|
|
31651
31654
|
signal: this.flowLifetime.signal,
|
|
@@ -7150,6 +7150,9 @@ var MdbaseSDK = (() => {
|
|
|
7150
7150
|
continue;
|
|
7151
7151
|
}
|
|
7152
7152
|
signal?.throwIfAborted();
|
|
7153
|
+
if (page.hasMore && !page.cursor) {
|
|
7154
|
+
throw mdbaseError("invalid_request", "Query requires offset paging", "query_cursor_required");
|
|
7155
|
+
}
|
|
7153
7156
|
yield page;
|
|
7154
7157
|
pagesYielded++;
|
|
7155
7158
|
if (!page.cursor) return;
|
|
@@ -11787,7 +11790,7 @@ var MdbaseSDK = (() => {
|
|
|
11787
11790
|
const { key: key3, original } = resolve(found);
|
|
11788
11791
|
return key3 === null ? null : diagnostic(key3, original, found.refusal ?? null);
|
|
11789
11792
|
}
|
|
11790
|
-
var LABELS, PROBLEM_CODES, GENERIC, BUSY,
|
|
11793
|
+
var LABELS, PROBLEM_CODES, GENERIC, BUSY, UNAVAILABLE, UPDATE, CHOOSE, APPROVE, SET_UP, UNFINISHED_SIGN_IN, COPY, ALIASES, READINESS, NON_PROBLEM_CODES, NON_PROBLEMS, DEVELOPER, NAME2, str2, obj3, retry, isProblemCode;
|
|
11791
11794
|
var init_describe_error = __esm({
|
|
11792
11795
|
"src/describe-error.ts"() {
|
|
11793
11796
|
"use strict";
|
|
@@ -11933,7 +11936,7 @@ var MdbaseSDK = (() => {
|
|
|
11933
11936
|
];
|
|
11934
11937
|
GENERIC = ["Something went wrong", "An unexpected problem occurred. Reload the app, and contact support if it keeps happening.", "reload", "error"];
|
|
11935
11938
|
BUSY = ["Another step hasn't finished", "The app couldn't finish this step yet. Try again, or reload if it keeps happening.", "retry", "warning", true];
|
|
11936
|
-
|
|
11939
|
+
UNAVAILABLE = ["Can't complete this request", "mdbase couldn't complete this request. Try again.", "retry", "warning"];
|
|
11937
11940
|
UPDATE = ["Update required", "Update mdbase on this computer, then reload the app to try again.", "update_app", "warning", false, "Update mdbase"];
|
|
11938
11941
|
CHOOSE = ["Choose a collection", "Pick the collection you want this app to use.", "choose_collection", "info"];
|
|
11939
11942
|
APPROVE = ["Approval needed", "This app needs your approval for extra access to your collection.", "approve", "info"];
|
|
@@ -11965,7 +11968,7 @@ var MdbaseSDK = (() => {
|
|
|
11965
11968
|
read_only: ["View access only", "You have view access, so changes can't be saved. Ask the collection's owner for edit access.", "none", "warning"],
|
|
11966
11969
|
forbidden: ["Access needed", "This app doesn't have permission to do that. Approve access to continue.", "approve", "warning"],
|
|
11967
11970
|
collection_invalid: ["Your collection needs repair", "Something in this collection isn't valid. Contact support if this keeps happening.", "contact_support", "error"],
|
|
11968
|
-
unavailable:
|
|
11971
|
+
unavailable: UNAVAILABLE,
|
|
11969
11972
|
rate_limited: ["Too many requests", "Wait a moment, then try again.", "retry", "warning", true],
|
|
11970
11973
|
quota_exceeded: ["Out of storage", "You've reached your storage limit. Free up space to keep saving.", "free_space", "error"],
|
|
11971
11974
|
account_collection_quota_exceeded: ["Synced collection limit reached", ACCOUNT_COLLECTION_QUOTA_MESSAGE, "free_space", "error", false, "Manage collections"],
|
|
@@ -38810,7 +38813,7 @@ ${end.comment}` : end.comment;
|
|
|
38810
38813
|
try {
|
|
38811
38814
|
grant = input.grant();
|
|
38812
38815
|
} catch {
|
|
38813
|
-
return
|
|
38816
|
+
return UNAVAILABLE2;
|
|
38814
38817
|
}
|
|
38815
38818
|
if (!grant) return READY;
|
|
38816
38819
|
if (declaration.required.some((action) => !grant.actions.includes(action))) return incompatible("files_access_missing");
|
|
@@ -38845,14 +38848,14 @@ ${end.comment}` : end.comment;
|
|
|
38845
38848
|
}
|
|
38846
38849
|
});
|
|
38847
38850
|
}
|
|
38848
|
-
var facet, READY, FENCED,
|
|
38851
|
+
var facet, READY, FENCED, UNAVAILABLE2, incompatible;
|
|
38849
38852
|
var init_file_readiness = __esm({
|
|
38850
38853
|
"src/application/file-readiness.ts"() {
|
|
38851
38854
|
"use strict";
|
|
38852
38855
|
facet = (value2) => Object.freeze(value2);
|
|
38853
38856
|
READY = facet({ checking: false, assessment: Object.freeze({ status: "ready", problem: null }), problem: null });
|
|
38854
38857
|
FENCED = facet({ checking: false, assessment: null, problem: Object.freeze({ code: "files_fenced" }) });
|
|
38855
|
-
|
|
38858
|
+
UNAVAILABLE2 = facet({ checking: false, assessment: null, problem: Object.freeze({ code: "files_unavailable" }) });
|
|
38856
38859
|
incompatible = (code) => facet({ checking: false, assessment: Object.freeze({ status: "incompatible", problem: Object.freeze({ code }) }), problem: null });
|
|
38857
38860
|
}
|
|
38858
38861
|
});
|
|
@@ -40967,12 +40970,12 @@ ${end.comment}` : end.comment;
|
|
|
40967
40970
|
// src/application/asset-pins.json
|
|
40968
40971
|
var asset_pins_default = {
|
|
40969
40972
|
runtime: {
|
|
40970
|
-
sha256: "
|
|
40971
|
-
bytes:
|
|
40972
|
-
maxBytes:
|
|
40973
|
+
sha256: "c30e2e23c1fbc6642936996b8495133ce66e87caaf49a99050fc38f8a7422667",
|
|
40974
|
+
bytes: 3803805,
|
|
40975
|
+
maxBytes: 3803805,
|
|
40973
40976
|
source: {
|
|
40974
40977
|
repository: "mdbase-dev/mdbase-connect",
|
|
40975
|
-
commit: "
|
|
40978
|
+
commit: "81462447473808e040d3b31d15ede54e987ffa1e"
|
|
40976
40979
|
}
|
|
40977
40980
|
},
|
|
40978
40981
|
sqlite: {
|
|
@@ -42774,7 +42777,15 @@ ${end.comment}` : end.comment;
|
|
|
42774
42777
|
this.listeners.delete(listener);
|
|
42775
42778
|
};
|
|
42776
42779
|
},
|
|
42777
|
-
start: (options2) => this.track(() => this.call(
|
|
42780
|
+
start: (options2) => this.track(() => this.call(async (runtime2) => {
|
|
42781
|
+
const native = runtime2.getNativeSnapshot();
|
|
42782
|
+
if (native.status === "blocked" && native.signIn && native.selectedCollectionId === null)
|
|
42783
|
+
await runtime2.queue(() => runtime2.start(options2));
|
|
42784
|
+
else await this.started(runtime2, options2);
|
|
42785
|
+
const selection = this.choose(), snapshot4 = selection.getSnapshot();
|
|
42786
|
+
if (snapshot4.state === "blocked" && snapshot4.requested.approved && snapshot4.requested.collectionId !== null)
|
|
42787
|
+
await selection.select(snapshot4.requested.collectionId, options2);
|
|
42788
|
+
}).catch((error4) => {
|
|
42778
42789
|
const native = this.runtime?.getNativeSnapshot();
|
|
42779
42790
|
if (error4?.code === "open_in_another_tab" && native?.status === "blocked" && native.problem === "open_in_another_tab") return;
|
|
42780
42791
|
throw error4;
|
|
@@ -48484,10 +48495,10 @@ ${end.comment}` : end.comment;
|
|
|
48484
48495
|
* sign-in gesture; a pending ledger keeps its SAME request for authorize(). */
|
|
48485
48496
|
start() {
|
|
48486
48497
|
return this.operation(async () => {
|
|
48487
|
-
if (this.flow) return this.getSnapshot();
|
|
48498
|
+
if (this.flow && this.base.status !== "blocked") return this.getSnapshot();
|
|
48488
48499
|
this.publish({ status: "starting", problem: null, signOutResult: null });
|
|
48489
48500
|
const p = this.options;
|
|
48490
|
-
this.flow
|
|
48501
|
+
this.flow ??= await AppProtectedInstallationSignIn.open({
|
|
48491
48502
|
...p,
|
|
48492
48503
|
mode: p.storeMode ?? "open",
|
|
48493
48504
|
signal: this.flowLifetime.signal,
|