@mdbase-dev/sdk 0.1.0-beta.231 → 0.1.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/dist/application/asset-pins.json +4 -4
- package/dist/application/manifest.d.ts +2 -2
- package/dist/application/worker-session.d.ts +2 -2
- package/dist/application/worker.js +179 -102
- package/dist/browser/mdbase-sdk.js +216 -127
- package/dist/browser/mdbase-sdk.min.js +52 -52
- package/dist/client.d.ts +16 -0
- package/dist/client.js +30 -1
- package/dist/client.js.map +1 -1
- package/dist/collection-api.d.ts +1 -0
- package/dist/collection-api.js.map +1 -1
- package/dist/describe-error.d.ts +1 -1
- package/dist/describe-error.js +2 -1
- package/dist/describe-error.js.map +1 -1
- package/dist/history.d.ts +66 -0
- package/dist/history.js +55 -0
- package/dist/history.js.map +1 -0
- package/dist/native/provenance.json +5 -5
- package/dist/native/runtime.wasm +0 -0
- package/dist/private.js +3 -2
- package/dist/private.js.map +1 -1
- package/dist/session.js +1 -1
- package/dist/session.js.map +1 -1
- package/node_modules/@mdbase-dev/connect-protocol/LICENSE +21 -0
- package/node_modules/@mdbase-dev/connect-protocol/dist/application-contract.d.ts +28 -0
- package/node_modules/@mdbase-dev/connect-protocol/dist/application-contract.js +21 -0
- package/node_modules/@mdbase-dev/connect-protocol/dist/application-declaration.d.ts +1 -1
- package/node_modules/@mdbase-dev/connect-protocol/dist/capabilities.d.ts +1 -0
- package/node_modules/@mdbase-dev/connect-protocol/dist/capabilities.js +2 -1
- package/node_modules/@mdbase-dev/connect-protocol/dist/connect-problems.generated.d.ts +14 -0
- package/node_modules/@mdbase-dev/connect-protocol/dist/connect-problems.generated.js +16 -0
- package/node_modules/@mdbase-dev/connect-protocol/dist/index.d.ts +2 -1
- package/node_modules/@mdbase-dev/connect-protocol/dist/index.js +2 -1
- package/node_modules/@mdbase-dev/connect-protocol/dist/manifest-validators.generated.js +4 -4
- package/node_modules/@mdbase-dev/connect-protocol/dist/manifest.d.ts +5 -0
- package/node_modules/@mdbase-dev/connect-protocol/dist/manifest.js +19 -19
- package/node_modules/@mdbase-dev/connect-protocol/dist/operations.d.ts +1 -1
- package/node_modules/@mdbase-dev/connect-protocol/dist/operations.js +9 -3
- package/node_modules/@mdbase-dev/connect-protocol/dist/service-urls.d.ts +11 -0
- package/node_modules/@mdbase-dev/connect-protocol/dist/service-urls.js +51 -0
- package/node_modules/@mdbase-dev/connect-protocol/package.json +7 -7
- package/node_modules/@mdbase-dev/connect-protocol/schemas/application-capability-catalog.v2.json +4 -0
- package/node_modules/@mdbase-dev/connect-protocol/schemas/connect-problem.v1.schema.json +57 -0
- package/node_modules/@mdbase-dev/connect-protocol/schemas/connect-problems.v1.catalog.json +11 -0
- package/node_modules/@mdbase-dev/connect-protocol/schemas/connect-protocol.v1.schema.json +1 -1
- package/node_modules/@mdbase-dev/connect-protocol/schemas/mdbase-app.schema.json +2 -1
- package/node_modules/@mdbase-dev/connect-protocol/schemas/operation-catalog.v1.json +3 -1
- package/node_modules/@mdbase-dev/connect-protocol/schemas/operation-mutation-classification.v1.json +28 -0
- package/package.json +2 -2
- package/vendor/mdbase-connect-sdk-3d3f95b80c9a.json +13 -0
- package/vendor/mdbase-dev-connect-protocol-0.1.0-beta.152-3d3f95b80c9a.tgz +0 -0
- package/vendor/mdbase-connect-sdk-e6e66bcd172f.json +0 -13
- package/vendor/mdbase-dev-connect-protocol-0.1.0-beta.145-e6e66bcd172f.tgz +0 -0
|
@@ -3667,7 +3667,7 @@ var MdbaseSDK = (() => {
|
|
|
3667
3667
|
init_bases_rpc();
|
|
3668
3668
|
init_original_session();
|
|
3669
3669
|
init_wire();
|
|
3670
|
-
API_VERSIONS = [{ major: 1, minor: 3 }, { major: 1, minor: 2 }, { major: 1, minor: 1 }, { major: 1, minor: 0 }];
|
|
3670
|
+
API_VERSIONS = [{ major: 1, minor: 4 }, { major: 1, minor: 3 }, { major: 1, minor: 2 }, { major: 1, minor: 1 }, { major: 1, minor: 0 }];
|
|
3671
3671
|
WriteRefusal = class extends MdbaseError {
|
|
3672
3672
|
constructor(error5, context = {}) {
|
|
3673
3673
|
super(schemaToError(error5, "submit").toProblem(), { ...context, cause: error5 });
|
|
@@ -4428,6 +4428,114 @@ var MdbaseSDK = (() => {
|
|
|
4428
4428
|
}
|
|
4429
4429
|
});
|
|
4430
4430
|
|
|
4431
|
+
// src/private.ts
|
|
4432
|
+
function formatSas(sas) {
|
|
4433
|
+
return /^\d{6}$/.test(sas) ? `${sas.slice(0, 3)} ${sas.slice(3)}` : sas;
|
|
4434
|
+
}
|
|
4435
|
+
var DEVICE_KINDS, kinds, deviceKind, pendingDeviceShape, pendingDevice, approvalReadinessShape, approvalReadiness, recoveryKeyStatus, recoveryKeyCreated, ACCOUNT_KEY_STATES, accountKeyState, accountKeyStatus;
|
|
4436
|
+
var init_private = __esm({
|
|
4437
|
+
"src/private.ts"() {
|
|
4438
|
+
"use strict";
|
|
4439
|
+
init_codec();
|
|
4440
|
+
init_wire();
|
|
4441
|
+
DEVICE_KINDS = ["desktop", "mobile", "app_runtime", "cli", "hosted", "escrow", "recovery"];
|
|
4442
|
+
kinds = enumOf("device-kind", DEVICE_KINDS);
|
|
4443
|
+
deviceKind = {
|
|
4444
|
+
name: "device-kind",
|
|
4445
|
+
enc: (v) => kinds.enc(v),
|
|
4446
|
+
dec: (c) => {
|
|
4447
|
+
try {
|
|
4448
|
+
return kinds.dec(c);
|
|
4449
|
+
} catch {
|
|
4450
|
+
return "unknown";
|
|
4451
|
+
}
|
|
4452
|
+
}
|
|
4453
|
+
};
|
|
4454
|
+
pendingDeviceShape = struct("pending-device", [
|
|
4455
|
+
[0, "device", uuid],
|
|
4456
|
+
[1, "account", uuid],
|
|
4457
|
+
[2, "kind", deviceKind],
|
|
4458
|
+
[3, "sas", tstr, "opt"],
|
|
4459
|
+
// Host response only; omitted from client encodings.
|
|
4460
|
+
[4, "exchangeReady", bool]
|
|
4461
|
+
]);
|
|
4462
|
+
pendingDevice = {
|
|
4463
|
+
...pendingDeviceShape,
|
|
4464
|
+
enc: (v) => pendingDeviceShape.enc({ ...v, sas: void 0 })
|
|
4465
|
+
};
|
|
4466
|
+
approvalReadinessShape = struct("approval-readiness", [
|
|
4467
|
+
[0, "device", uuid],
|
|
4468
|
+
[1, "sas", tstr, "opt"],
|
|
4469
|
+
// Reserved: decode-only.
|
|
4470
|
+
[2, "exchangeReady", bool]
|
|
4471
|
+
]);
|
|
4472
|
+
approvalReadiness = {
|
|
4473
|
+
...approvalReadinessShape,
|
|
4474
|
+
enc: (v) => approvalReadinessShape.enc({ ...v, sas: void 0 })
|
|
4475
|
+
};
|
|
4476
|
+
recoveryKeyStatus = struct("recovery-key-status", [
|
|
4477
|
+
[0, "configured", bool],
|
|
4478
|
+
[1, "device", uuid, "opt"]
|
|
4479
|
+
]);
|
|
4480
|
+
recoveryKeyCreated = struct("recovery-key-created", [
|
|
4481
|
+
[0, "phrase", tstr],
|
|
4482
|
+
[1, "device", uuid]
|
|
4483
|
+
]);
|
|
4484
|
+
ACCOUNT_KEY_STATES = ["idle", "reading_ahead", "pending_grant", "keyed", "refused"];
|
|
4485
|
+
accountKeyState = enumOf("account-key-state", ACCOUNT_KEY_STATES);
|
|
4486
|
+
accountKeyStatus = struct("account-key-status", [
|
|
4487
|
+
[0, "state", accountKeyState],
|
|
4488
|
+
[1, "problem", problem, "opt"]
|
|
4489
|
+
]);
|
|
4490
|
+
}
|
|
4491
|
+
});
|
|
4492
|
+
|
|
4493
|
+
// src/history.ts
|
|
4494
|
+
var recordHistoryParams, recordVersionParams, authorRef2, historyVersion, recordHistory, recordVersion;
|
|
4495
|
+
var init_history = __esm({
|
|
4496
|
+
"src/history.ts"() {
|
|
4497
|
+
"use strict";
|
|
4498
|
+
init_codec();
|
|
4499
|
+
init_private();
|
|
4500
|
+
recordHistoryParams = struct("record-history-params", [
|
|
4501
|
+
[0, "record", uuid],
|
|
4502
|
+
[1, "before", uint, "opt"],
|
|
4503
|
+
[2, "limit", uint, "opt"]
|
|
4504
|
+
]);
|
|
4505
|
+
recordVersionParams = struct("record-version-params", [
|
|
4506
|
+
[0, "record", uuid],
|
|
4507
|
+
[1, "seq", uint]
|
|
4508
|
+
]);
|
|
4509
|
+
authorRef2 = struct("author-ref", [
|
|
4510
|
+
[0, "account", uuid],
|
|
4511
|
+
[1, "device", uuid],
|
|
4512
|
+
[2, "grant", uuid, "opt"],
|
|
4513
|
+
[3, "grantAccount", uuid, "opt"]
|
|
4514
|
+
]);
|
|
4515
|
+
historyVersion = struct("history-version", [
|
|
4516
|
+
[0, "seq", uint],
|
|
4517
|
+
[1, "time", int],
|
|
4518
|
+
[2, "author", authorRef2],
|
|
4519
|
+
[3, "kind", enumOf("version-kind", ["created", "edited", "moved", "deleted"])],
|
|
4520
|
+
[4, "path", tstr],
|
|
4521
|
+
[5, "revision", hash, "opt"],
|
|
4522
|
+
[6, "source", enumOf("source", ["api", "external"])],
|
|
4523
|
+
[7, "deviceKind", deviceKind],
|
|
4524
|
+
[8, "app", tstr, "opt"]
|
|
4525
|
+
]);
|
|
4526
|
+
recordHistory = struct("record-history", [
|
|
4527
|
+
[0, "versions", list(historyVersion)],
|
|
4528
|
+
[1, "from", uint],
|
|
4529
|
+
[2, "fromTime", int, "opt"],
|
|
4530
|
+
[3, "next", uint, "opt"]
|
|
4531
|
+
]);
|
|
4532
|
+
recordVersion = struct("record-version", [
|
|
4533
|
+
[0, "path", tstr],
|
|
4534
|
+
[1, "document", tstr]
|
|
4535
|
+
]);
|
|
4536
|
+
}
|
|
4537
|
+
});
|
|
4538
|
+
|
|
4431
4539
|
// src/settle.ts
|
|
4432
4540
|
function unknown(mutationId, reason, text9, receipt4) {
|
|
4433
4541
|
const problem7 = { code: "outcome_unknown", recovery: "resolve_outcome", reason, message: text9 };
|
|
@@ -6627,68 +6735,6 @@ var MdbaseSDK = (() => {
|
|
|
6627
6735
|
}
|
|
6628
6736
|
});
|
|
6629
6737
|
|
|
6630
|
-
// src/private.ts
|
|
6631
|
-
function formatSas(sas) {
|
|
6632
|
-
return /^\d{6}$/.test(sas) ? `${sas.slice(0, 3)} ${sas.slice(3)}` : sas;
|
|
6633
|
-
}
|
|
6634
|
-
var DEVICE_KINDS, kinds, deviceKind, pendingDeviceShape, pendingDevice, approvalReadinessShape, approvalReadiness, recoveryKeyStatus, recoveryKeyCreated, ACCOUNT_KEY_STATES, accountKeyState, accountKeyStatus;
|
|
6635
|
-
var init_private = __esm({
|
|
6636
|
-
"src/private.ts"() {
|
|
6637
|
-
"use strict";
|
|
6638
|
-
init_codec();
|
|
6639
|
-
init_wire();
|
|
6640
|
-
DEVICE_KINDS = ["desktop", "mobile", "app_runtime", "cli", "hosted", "escrow", "recovery"];
|
|
6641
|
-
kinds = enumOf("device-kind", DEVICE_KINDS);
|
|
6642
|
-
deviceKind = {
|
|
6643
|
-
name: "device-kind",
|
|
6644
|
-
enc: (v) => kinds.enc(v),
|
|
6645
|
-
dec: (c) => {
|
|
6646
|
-
try {
|
|
6647
|
-
return kinds.dec(c);
|
|
6648
|
-
} catch {
|
|
6649
|
-
return "unknown";
|
|
6650
|
-
}
|
|
6651
|
-
}
|
|
6652
|
-
};
|
|
6653
|
-
pendingDeviceShape = struct("pending-device", [
|
|
6654
|
-
[0, "device", uuid],
|
|
6655
|
-
[1, "account", uuid],
|
|
6656
|
-
[2, "kind", deviceKind],
|
|
6657
|
-
[3, "sas", tstr, "opt"],
|
|
6658
|
-
// Host response only; omitted from client encodings.
|
|
6659
|
-
[4, "exchangeReady", bool]
|
|
6660
|
-
]);
|
|
6661
|
-
pendingDevice = {
|
|
6662
|
-
...pendingDeviceShape,
|
|
6663
|
-
enc: (v) => pendingDeviceShape.enc({ ...v, sas: void 0 })
|
|
6664
|
-
};
|
|
6665
|
-
approvalReadinessShape = struct("approval-readiness", [
|
|
6666
|
-
[0, "device", uuid],
|
|
6667
|
-
[1, "sas", tstr, "opt"],
|
|
6668
|
-
// Reserved: decode-only.
|
|
6669
|
-
[2, "exchangeReady", bool]
|
|
6670
|
-
]);
|
|
6671
|
-
approvalReadiness = {
|
|
6672
|
-
...approvalReadinessShape,
|
|
6673
|
-
enc: (v) => approvalReadinessShape.enc({ ...v, sas: void 0 })
|
|
6674
|
-
};
|
|
6675
|
-
recoveryKeyStatus = struct("recovery-key-status", [
|
|
6676
|
-
[0, "configured", bool],
|
|
6677
|
-
[1, "device", uuid, "opt"]
|
|
6678
|
-
]);
|
|
6679
|
-
recoveryKeyCreated = struct("recovery-key-created", [
|
|
6680
|
-
[0, "phrase", tstr],
|
|
6681
|
-
[1, "device", uuid]
|
|
6682
|
-
]);
|
|
6683
|
-
ACCOUNT_KEY_STATES = ["idle", "reading_ahead", "pending_grant", "keyed", "refused"];
|
|
6684
|
-
accountKeyState = enumOf("account-key-state", ACCOUNT_KEY_STATES);
|
|
6685
|
-
accountKeyStatus = struct("account-key-status", [
|
|
6686
|
-
[0, "state", accountKeyState],
|
|
6687
|
-
[1, "problem", problem, "opt"]
|
|
6688
|
-
]);
|
|
6689
|
-
}
|
|
6690
|
-
});
|
|
6691
|
-
|
|
6692
6738
|
// src/write-ledger.ts
|
|
6693
6739
|
function memoryWriteLedgerStore() {
|
|
6694
6740
|
const rows2 = /* @__PURE__ */ new Map();
|
|
@@ -6884,6 +6930,14 @@ var MdbaseSDK = (() => {
|
|
|
6884
6930
|
for (const [k, v] of entries) if (v !== void 0) m2.set(k, v);
|
|
6885
6931
|
return m2;
|
|
6886
6932
|
}
|
|
6933
|
+
function historyRead(read2) {
|
|
6934
|
+
return read2.catch((e) => {
|
|
6935
|
+
if (isMdbaseError(e, "invalid_request") && e.reason === "unknown_method") {
|
|
6936
|
+
throw mdbaseError("upgrade_required", "This collection's replica has no record history.", "history_unsupported");
|
|
6937
|
+
}
|
|
6938
|
+
throw e;
|
|
6939
|
+
});
|
|
6940
|
+
}
|
|
6887
6941
|
function withCurrentGrant(hello, grant) {
|
|
6888
6942
|
const prior = hello.grant;
|
|
6889
6943
|
if (!grant || prior.grant === grant.grant && prior.role === grant.role && valueEquals(prior.capabilities, grant.capabilities) && valueEquals(prior.fileFolders ?? null, grant.fileFolders ?? null)) return hello;
|
|
@@ -6922,6 +6976,7 @@ var MdbaseSDK = (() => {
|
|
|
6922
6976
|
init_validation();
|
|
6923
6977
|
init_errors();
|
|
6924
6978
|
init_files();
|
|
6979
|
+
init_history();
|
|
6925
6980
|
init_settle();
|
|
6926
6981
|
init_read_helpers();
|
|
6927
6982
|
init_records();
|
|
@@ -7133,7 +7188,9 @@ var MdbaseSDK = (() => {
|
|
|
7133
7188
|
"new_type_file",
|
|
7134
7189
|
"get_contract_v1",
|
|
7135
7190
|
"map_contract_write_v1",
|
|
7136
|
-
"plan_type_pack_v1"
|
|
7191
|
+
"plan_type_pack_v1",
|
|
7192
|
+
"record_history",
|
|
7193
|
+
"record_version"
|
|
7137
7194
|
]);
|
|
7138
7195
|
MdbaseClient = class _MdbaseClient {
|
|
7139
7196
|
constructor(opts, session) {
|
|
@@ -7945,6 +8002,29 @@ var MdbaseSDK = (() => {
|
|
|
7945
8002
|
throw e;
|
|
7946
8003
|
});
|
|
7947
8004
|
}
|
|
8005
|
+
/**
|
|
8006
|
+
* Record history (§4.4, API 1.4): the versions of a record that the log still
|
|
8007
|
+
* retains. Needs `collection.read` and `history.read` through a grant without
|
|
8008
|
+
* a folder scope. A replica without history,
|
|
8009
|
+
* the hosted replica and a local-only collection refuse with
|
|
8010
|
+
* `upgrade_required` / `history_unsupported`.
|
|
8011
|
+
*/
|
|
8012
|
+
history = {
|
|
8013
|
+
/** One page of a record's versions, newest first. Pass `next` as `before`
|
|
8014
|
+
* for older ones. `o.signal` cancels the read. */
|
|
8015
|
+
list: (record5, o = {}) => historyRead(this.call("record_history", recordHistoryParams.enc({ record: record5, before: o.before, limit: o.limit }), {
|
|
8016
|
+
codec: recordHistory,
|
|
8017
|
+
retry: true,
|
|
8018
|
+
...o.signal ? { signal: o.signal } : {}
|
|
8019
|
+
})),
|
|
8020
|
+
/** The exact document of the version at log position `seq`, checked
|
|
8021
|
+
* against its revision. `o.signal` cancels the read. */
|
|
8022
|
+
version: (record5, seq2, o = {}) => historyRead(this.call("record_version", recordVersionParams.enc({ record: record5, seq: seq2 }), {
|
|
8023
|
+
codec: recordVersion,
|
|
8024
|
+
retry: true,
|
|
8025
|
+
...o.signal ? { signal: o.signal } : {}
|
|
8026
|
+
}))
|
|
8027
|
+
};
|
|
7948
8028
|
/** Definitions: `mdbase.yaml`, type files, contract files (§4.1). */
|
|
7949
8029
|
resources = {
|
|
7950
8030
|
/** One definition by path. `o.signal` cancels the read. */
|
|
@@ -9606,6 +9686,7 @@ var MdbaseSDK = (() => {
|
|
|
9606
9686
|
"people_unsupported",
|
|
9607
9687
|
"people_permission_declined",
|
|
9608
9688
|
"people_access",
|
|
9689
|
+
"history_unsupported",
|
|
9609
9690
|
"configuration_conflict",
|
|
9610
9691
|
"configuration_unavailable",
|
|
9611
9692
|
"configuration_unsupported",
|
|
@@ -9743,6 +9824,7 @@ var MdbaseSDK = (() => {
|
|
|
9743
9824
|
people_unsupported: ["Sharing isn't available here", "People and sharing aren't supported for this collection yet.", "none", "info"],
|
|
9744
9825
|
people_permission_declined: ["People aren't shown", "This app wasn't allowed to see who else is in this collection. Approve it again and allow people to show them here.", "approve", "info", false, "Approve again"],
|
|
9745
9826
|
people_access: ["People can't be shown", "This app can't see the people in this collection right now. Everything else still works.", "none", "info"],
|
|
9827
|
+
history_unsupported: ["History isn't available here", "Earlier versions of records in this collection can't be read here. Everything else still works.", "none", "info"],
|
|
9746
9828
|
configuration_conflict: ["Settings changed elsewhere", "These settings were changed on another device. Review them and try again.", "retry", "warning"],
|
|
9747
9829
|
// The collection's setup couldn't be assessed: not a network problem.
|
|
9748
9830
|
configuration_unavailable: ["Couldn't check this collection's setup", "The app couldn't read how this collection is set up, so it didn't open it. Nothing in the collection was changed. Try again, and contact support if it keeps happening.", "retry", "warning"],
|
|
@@ -17090,7 +17172,7 @@ ${end.comment}` : end.comment;
|
|
|
17090
17172
|
const len0 = data1.length;
|
|
17091
17173
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
17092
17174
|
let data2 = data1[i0];
|
|
17093
|
-
if (!(data2 === "collection.read" || data2 === "records.create" || data2 === "records.edit" || data2 === "records.delete" || data2 === "views.manage" || data2 === "definitions.manage" || data2 === "background.schedule" || data2 === "offline.replica")) {
|
|
17175
|
+
if (!(data2 === "collection.read" || data2 === "records.create" || data2 === "records.edit" || data2 === "records.delete" || data2 === "views.manage" || data2 === "definitions.manage" || data2 === "background.schedule" || data2 === "offline.replica" || data2 === "history.read")) {
|
|
17094
17176
|
const err5 = { instancePath: instancePath + "/required/" + i0, schemaPath: "#/$defs/applicationCapability/enum", keyword: "enum", params: { allowedValues: schema37.enum }, message: "must be equal to one of the allowed values" };
|
|
17095
17177
|
if (vErrors === null) {
|
|
17096
17178
|
vErrors = [err5];
|
|
@@ -17143,7 +17225,7 @@ ${end.comment}` : end.comment;
|
|
|
17143
17225
|
const len1 = data3.length;
|
|
17144
17226
|
for (let i2 = 0; i2 < len1; i2++) {
|
|
17145
17227
|
let data4 = data3[i2];
|
|
17146
|
-
if (!(data4 === "collection.read" || data4 === "records.create" || data4 === "records.edit" || data4 === "records.delete" || data4 === "views.manage" || data4 === "definitions.manage" || data4 === "background.schedule" || data4 === "offline.replica")) {
|
|
17228
|
+
if (!(data4 === "collection.read" || data4 === "records.create" || data4 === "records.edit" || data4 === "records.delete" || data4 === "views.manage" || data4 === "definitions.manage" || data4 === "background.schedule" || data4 === "offline.replica" || data4 === "history.read")) {
|
|
17147
17229
|
const err9 = { instancePath: instancePath + "/optional/" + i2, schemaPath: "#/$defs/applicationCapability/enum", keyword: "enum", params: { allowedValues: schema37.enum }, message: "must be equal to one of the allowed values" };
|
|
17148
17230
|
if (vErrors === null) {
|
|
17149
17231
|
vErrors = [err9];
|
|
@@ -24063,7 +24145,7 @@ ${end.comment}` : end.comment;
|
|
|
24063
24145
|
"node_modules/@mdbase-dev/connect-protocol/dist/manifest-validators.generated.js"() {
|
|
24064
24146
|
"use strict";
|
|
24065
24147
|
appManifestValidator = validate20;
|
|
24066
|
-
schema31 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://mdbase.dev/connect/schemas/mdbase-app.v1.json", "title": "mdbase connect bundled application manifest v1", "type": "object", "additionalProperties": false, "required": ["manifest_version", "id", "name"], "properties": { "manifest_version": { "const": 1 }, "distribution": { "enum": ["web", "portable"], "description": "Portable declarations use device authorization and do not claim a browser origin." }, "id": { "type": "string", "minLength": 5, "maxLength": 150, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*){2,}$", "description": "Stable reverse-domain application identifier. This is presentation metadata, not publisher authentication." }, "name": { "type": "string", "minLength": 1, "maxLength": 100 }, "platform": { "const": "native", "description": "Unverified native app; permits literal IPv4 loopback HTTP on any port." }, "homepage": { "type": "string", "format": "uri", "pattern": "^https://" }, "project_url": { "type": "string", "format": "uri", "pattern": "^https://" }, "icon": { "type": "string", "format": "uri", "pattern": "^https://" }, "redirect_uris": { "type": "array", "minItems": 1, "maxItems": 10, "uniqueItems": true, "items": { "type": "string", "format": "uri", "description": "An HTTPS URI on the homepage origin or a private-use scheme derived from the application ID." } }, "installation_origins": { "type": "object", "additionalProperties": false, "properties": { "lab": { "$ref": "#/$defs/installationOriginPolicy" }, "staging": { "$ref": "#/$defs/installationOriginPolicy" }, "production": { "$ref": "#/$defs/installationOriginPolicy" } } }, "requirements": { "$ref": "#/$defs/requirements" }, "provisions": { "type": "object", "additionalProperties": false, "required": ["type_packs"], "properties": { "configuration": { "type": "array", "maxItems": 50, "items": { "$ref": "#/$defs/configurationProvision" } }, "type_packs": { "type": "array", "maxItems": 20, "items": { "$ref": "#/$defs/typePackProvision" } } } }, "notifications": { "type": "object", "additionalProperties": false, "required": ["criteria"], "properties": { "criteria": { "type": "array", "maxItems": 50, "items": { "$ref": "#/$defs/notificationCriterion" } }, "native_delivery": { "$ref": "#/$defs/nativeNotificationDelivery" } } } }, "oneOf": [{ "required": ["homepage", "redirect_uris"], "properties": { "distribution": { "const": "web" }, "homepage": true, "redirect_uris": true, "project_url": false } }, { "required": ["distribution"], "properties": { "distribution": { "const": "portable" }, "platform": false, "homepage": false, "redirect_uris": false } }], "$defs": { "installationOriginPolicy": { "type": "object", "additionalProperties": false, "properties": { "app-runtime": { "$ref": "#/$defs/installationOrigins" }, "mobile": { "$ref": "#/$defs/installationOrigins" } } }, "installationOrigins": { "type": "array", "maxItems": 16, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 255, "format": "uri" } }, "identifier": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)*$" }, "duration": { "type": "string", "pattern": "^[0-9]+(ms|s|m|h|d)$" }, "contract": { "type": "object", "additionalProperties": false, "required": ["id", "version", "digest"], "properties": { "id": { "$ref": "#/$defs/identifier" }, "version": { "type": "string", "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" }, "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" } } }, "requirements": { "type": "object", "additionalProperties": false, "required": ["access", "contracts"], "properties": { "capabilities": { "$ref": "#/$defs/capabilityRequirements" }, "access": { "const": "full_collection", "description": "Compatibility declaration for collection-level application authorization." }, "collection_kind": { "const": "hosted", "description": "Require a durable provider-backed collection with direct sync support." }, "people": { "type": "object", "additionalProperties": false, "required": ["version"], "anyOf": [{ "required": ["required"] }, { "required": ["optional"] }], "properties": { "version": { "const": 1 }, "required": { "$ref": "#/$defs/peoplePermissions" }, "optional": { "$ref": "#/$defs/peoplePermissions" } } }, "files": { "$ref": "#/$defs/fileRequirement" }, "configuration": { "type": "array", "maxItems": 50, "items": { "$ref": "#/$defs/configurationRequirement" } }, "contracts": { "type": "array", "maxItems": 20, "uniqueItems": true, "items": { "$ref": "#/$defs/contract" } } } }, "capabilityRequirements": { "type": "object", "additionalProperties": false, "required": ["contract_version", "required"], "properties": { "contract_version": { "const": 2 }, "required": { "type": "array", "maxItems": 32, "uniqueItems": true, "items": { "$ref": "#/$defs/applicationCapability" } }, "optional": { "type": "array", "maxItems": 32, "uniqueItems": true, "items": { "$ref": "#/$defs/applicationCapability" } } } }, "configurationValue": { "anyOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }] }, "configurationRequirement": { "type": "object", "additionalProperties": false, "required": ["id", "path", "predicate", "value"], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" }, "path": { "type": "string", "minLength": 1, "maxLength": 1024 }, "predicate": { "const": "contains" }, "value": { "$ref": "#/$defs/configurationValue" } } }, "configurationProvision": { "type": "object", "additionalProperties": false, "required": ["requirement", "operation", "path", "value"], "properties": { "requirement": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" }, "operation": { "const": "set_add" }, "path": { "type": "string", "minLength": 1, "maxLength": 1024 }, "value": { "$ref": "#/$defs/configurationValue" } } }, "applicationCapability": { "enum": ["collection.read", "records.create", "records.edit", "records.delete", "views.manage", "definitions.manage", "background.schedule", "offline.replica"] }, "peoplePermissions": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["identity", "members"] } }, "fileRequirement": { "type": "object", "additionalProperties": false, "required": ["required", "scope"], "properties": { "required": { "$ref": "#/$defs/fileActions" }, "optional": { "$ref": "#/$defs/fileActions" }, "scope": { "$ref": "#/$defs/fileScope" } } }, "fileActions": { "type": "array", "minItems": 1, "maxItems": 6, "uniqueItems": true, "items": { "enum": ["list", "read", "add", "replace", "move", "delete"] } }, "fileScope": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["kind", "folders"], "properties": { "kind": { "const": "selected_folders" }, "folders": { "type": "array", "minItems": 1, "maxItems": 100, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 1024, "pattern": "^(?!/)(?!\\.)(?!.*//)(?!.*\\\\)(?!.*/\\.)(?!(?:_contracts|_schemas|_types|_views|node_modules)(?:/|$))(?!.*\\/(?:_contracts|_schemas|_types|_views|node_modules)(?:/|$))(?!.*/$).+$" } } } }, { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "const": "collection" } } }] }, "typePackProvision": { "type": "object", "additionalProperties": false, "required": ["manifest", "resources", "provides"], "properties": { "manifest": { "$ref": "#/$defs/typePackManifest" }, "resources": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "$ref": "#/$defs/typePackSourceResource" } }, "provides": { "type": "array", "maxItems": 20, "uniqueItems": true, "items": { "$ref": "#/$defs/contract" } } } }, "typePackManifest": { "type": "object", "required": ["kind", "id", "version", "resources"], "properties": { "kind": { "const": "mdbase.type-pack" }, "id": { "$ref": "#/$defs/identifier" }, "version": { "$ref": "#/$defs/contract/properties/version" }, "name": { "type": "string", "minLength": 1, "maxLength": 100 }, "description": { "type": "string", "maxLength": 500 }, "resources": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "$ref": "#/$defs/typePackManifestResource" } } }, "patternProperties": { "^x-[A-Za-z][A-Za-z0-9._:-]{0,127}$": true }, "additionalProperties": false }, "typePackManifestResource": { "type": "object", "additionalProperties": false, "required": ["kind", "mode", "source", "target", "digest"], "properties": { "kind": { "enum": ["contract", "type", "schema"] }, "mode": { "enum": ["managed", "seed"] }, "upgrade_from": { "oneOf": [{ "$ref": "#/$defs/typePackUpgradeBaseline" }, { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/typePackUpgradeBaseline" } }] }, "source": { "type": "string", "minLength": 1, "maxLength": 240 }, "target": { "type": "string", "minLength": 1, "maxLength": 240 }, "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" } } }, "typePackUpgradeBaseline": { "type": "object", "additionalProperties": false, "required": ["digest", "document"], "properties": { "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "document": { "type": "string", "maxLength": 262144 }, "version": { "type": "integer", "minimum": 1 } } }, "typePackSourceResource": { "type": "object", "additionalProperties": false, "required": ["source", "document"], "properties": { "source": { "type": "string", "minLength": 1, "maxLength": 240 }, "document": { "type": "string", "maxLength": 262144 } } }, "notificationCriterion": { "type": "object", "additionalProperties": false, "required": ["id", "event", "presentation"], "properties": { "id": { "$ref": "#/$defs/identifier" }, "event": { "$ref": "#/$defs/contract" }, "if": { "type": "object", "additionalProperties": false, "required": ["$expr"], "properties": { "$expr": { "type": "string", "minLength": 1, "maxLength": 4096 } } }, "debounce": { "$ref": "#/$defs/duration" }, "minimum_interval": { "$ref": "#/$defs/duration" }, "presentation": { "type": "object", "additionalProperties": false, "required": ["title"], "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 80 }, "body": { "type": "string", "maxLength": 160 }, "tag": { "type": "string", "minLength": 1, "maxLength": 80 } } } } }, "nativeNotificationDelivery": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["mode", "firebase_project_id"], "properties": { "mode": { "const": "managed_fcm" }, "firebase_project_id": { "type": "string", "minLength": 6, "maxLength": 63, "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" } } }, { "type": "object", "additionalProperties": false, "required": ["mode", "url"], "properties": { "mode": { "const": "webhook" }, "url": { "type": "string", "format": "uri", "pattern": "^https://" } } }] } } };
|
|
24148
|
+
schema31 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://mdbase.dev/connect/schemas/mdbase-app.v1.json", "title": "mdbase connect bundled application manifest v1", "type": "object", "additionalProperties": false, "required": ["manifest_version", "id", "name"], "properties": { "manifest_version": { "const": 1 }, "distribution": { "enum": ["web", "portable"], "description": "Portable declarations use device authorization and do not claim a browser origin." }, "id": { "type": "string", "minLength": 5, "maxLength": 150, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*){2,}$", "description": "Stable reverse-domain application identifier. This is presentation metadata, not publisher authentication." }, "name": { "type": "string", "minLength": 1, "maxLength": 100 }, "platform": { "const": "native", "description": "Unverified native app; permits literal IPv4 loopback HTTP on any port." }, "homepage": { "type": "string", "format": "uri", "pattern": "^https://" }, "project_url": { "type": "string", "format": "uri", "pattern": "^https://" }, "icon": { "type": "string", "format": "uri", "pattern": "^https://" }, "redirect_uris": { "type": "array", "minItems": 1, "maxItems": 10, "uniqueItems": true, "items": { "type": "string", "format": "uri", "description": "An HTTPS URI on the homepage origin or a private-use scheme derived from the application ID." } }, "installation_origins": { "type": "object", "additionalProperties": false, "properties": { "lab": { "$ref": "#/$defs/installationOriginPolicy" }, "staging": { "$ref": "#/$defs/installationOriginPolicy" }, "production": { "$ref": "#/$defs/installationOriginPolicy" } } }, "requirements": { "$ref": "#/$defs/requirements" }, "provisions": { "type": "object", "additionalProperties": false, "required": ["type_packs"], "properties": { "configuration": { "type": "array", "maxItems": 50, "items": { "$ref": "#/$defs/configurationProvision" } }, "type_packs": { "type": "array", "maxItems": 20, "items": { "$ref": "#/$defs/typePackProvision" } } } }, "notifications": { "type": "object", "additionalProperties": false, "required": ["criteria"], "properties": { "criteria": { "type": "array", "maxItems": 50, "items": { "$ref": "#/$defs/notificationCriterion" } }, "native_delivery": { "$ref": "#/$defs/nativeNotificationDelivery" } } } }, "oneOf": [{ "required": ["homepage", "redirect_uris"], "properties": { "distribution": { "const": "web" }, "homepage": true, "redirect_uris": true, "project_url": false } }, { "required": ["distribution"], "properties": { "distribution": { "const": "portable" }, "platform": false, "homepage": false, "redirect_uris": false } }], "$defs": { "installationOriginPolicy": { "type": "object", "additionalProperties": false, "properties": { "app-runtime": { "$ref": "#/$defs/installationOrigins" }, "mobile": { "$ref": "#/$defs/installationOrigins" } } }, "installationOrigins": { "type": "array", "maxItems": 16, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 255, "format": "uri" } }, "identifier": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)*$" }, "duration": { "type": "string", "pattern": "^[0-9]+(ms|s|m|h|d)$" }, "contract": { "type": "object", "additionalProperties": false, "required": ["id", "version", "digest"], "properties": { "id": { "$ref": "#/$defs/identifier" }, "version": { "type": "string", "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" }, "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" } } }, "requirements": { "type": "object", "additionalProperties": false, "required": ["access", "contracts"], "properties": { "capabilities": { "$ref": "#/$defs/capabilityRequirements" }, "access": { "const": "full_collection", "description": "Compatibility declaration for collection-level application authorization." }, "collection_kind": { "const": "hosted", "description": "Require a durable provider-backed collection with direct sync support." }, "people": { "type": "object", "additionalProperties": false, "required": ["version"], "anyOf": [{ "required": ["required"] }, { "required": ["optional"] }], "properties": { "version": { "const": 1 }, "required": { "$ref": "#/$defs/peoplePermissions" }, "optional": { "$ref": "#/$defs/peoplePermissions" } } }, "files": { "$ref": "#/$defs/fileRequirement" }, "configuration": { "type": "array", "maxItems": 50, "items": { "$ref": "#/$defs/configurationRequirement" } }, "contracts": { "type": "array", "maxItems": 20, "uniqueItems": true, "items": { "$ref": "#/$defs/contract" } } } }, "capabilityRequirements": { "type": "object", "additionalProperties": false, "required": ["contract_version", "required"], "properties": { "contract_version": { "const": 2 }, "required": { "type": "array", "maxItems": 32, "uniqueItems": true, "items": { "$ref": "#/$defs/applicationCapability" } }, "optional": { "type": "array", "maxItems": 32, "uniqueItems": true, "items": { "$ref": "#/$defs/applicationCapability" } } } }, "configurationValue": { "anyOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }] }, "configurationRequirement": { "type": "object", "additionalProperties": false, "required": ["id", "path", "predicate", "value"], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" }, "path": { "type": "string", "minLength": 1, "maxLength": 1024 }, "predicate": { "const": "contains" }, "value": { "$ref": "#/$defs/configurationValue" } } }, "configurationProvision": { "type": "object", "additionalProperties": false, "required": ["requirement", "operation", "path", "value"], "properties": { "requirement": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" }, "operation": { "const": "set_add" }, "path": { "type": "string", "minLength": 1, "maxLength": 1024 }, "value": { "$ref": "#/$defs/configurationValue" } } }, "applicationCapability": { "enum": ["collection.read", "records.create", "records.edit", "records.delete", "views.manage", "definitions.manage", "background.schedule", "offline.replica", "history.read"] }, "peoplePermissions": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["identity", "members"] } }, "fileRequirement": { "type": "object", "additionalProperties": false, "required": ["required", "scope"], "properties": { "required": { "$ref": "#/$defs/fileActions" }, "optional": { "$ref": "#/$defs/fileActions" }, "scope": { "$ref": "#/$defs/fileScope" } } }, "fileActions": { "type": "array", "minItems": 1, "maxItems": 6, "uniqueItems": true, "items": { "enum": ["list", "read", "add", "replace", "move", "delete"] } }, "fileScope": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["kind", "folders"], "properties": { "kind": { "const": "selected_folders" }, "folders": { "type": "array", "minItems": 1, "maxItems": 100, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 1024, "pattern": "^(?!/)(?!\\.)(?!.*//)(?!.*\\\\)(?!.*/\\.)(?!(?:_contracts|_schemas|_types|_views|node_modules)(?:/|$))(?!.*\\/(?:_contracts|_schemas|_types|_views|node_modules)(?:/|$))(?!.*/$).+$" } } } }, { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "const": "collection" } } }] }, "typePackProvision": { "type": "object", "additionalProperties": false, "required": ["manifest", "resources", "provides"], "properties": { "manifest": { "$ref": "#/$defs/typePackManifest" }, "resources": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "$ref": "#/$defs/typePackSourceResource" } }, "provides": { "type": "array", "maxItems": 20, "uniqueItems": true, "items": { "$ref": "#/$defs/contract" } } } }, "typePackManifest": { "type": "object", "required": ["kind", "id", "version", "resources"], "properties": { "kind": { "const": "mdbase.type-pack" }, "id": { "$ref": "#/$defs/identifier" }, "version": { "$ref": "#/$defs/contract/properties/version" }, "name": { "type": "string", "minLength": 1, "maxLength": 100 }, "description": { "type": "string", "maxLength": 500 }, "resources": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "$ref": "#/$defs/typePackManifestResource" } } }, "patternProperties": { "^x-[A-Za-z][A-Za-z0-9._:-]{0,127}$": true }, "additionalProperties": false }, "typePackManifestResource": { "type": "object", "additionalProperties": false, "required": ["kind", "mode", "source", "target", "digest"], "properties": { "kind": { "enum": ["contract", "type", "schema"] }, "mode": { "enum": ["managed", "seed"] }, "upgrade_from": { "oneOf": [{ "$ref": "#/$defs/typePackUpgradeBaseline" }, { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/typePackUpgradeBaseline" } }] }, "source": { "type": "string", "minLength": 1, "maxLength": 240 }, "target": { "type": "string", "minLength": 1, "maxLength": 240 }, "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" } } }, "typePackUpgradeBaseline": { "type": "object", "additionalProperties": false, "required": ["digest", "document"], "properties": { "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "document": { "type": "string", "maxLength": 262144 }, "version": { "type": "integer", "minimum": 1 } } }, "typePackSourceResource": { "type": "object", "additionalProperties": false, "required": ["source", "document"], "properties": { "source": { "type": "string", "minLength": 1, "maxLength": 240 }, "document": { "type": "string", "maxLength": 262144 } } }, "notificationCriterion": { "type": "object", "additionalProperties": false, "required": ["id", "event", "presentation"], "properties": { "id": { "$ref": "#/$defs/identifier" }, "event": { "$ref": "#/$defs/contract" }, "if": { "type": "object", "additionalProperties": false, "required": ["$expr"], "properties": { "$expr": { "type": "string", "minLength": 1, "maxLength": 4096 } } }, "debounce": { "$ref": "#/$defs/duration" }, "minimum_interval": { "$ref": "#/$defs/duration" }, "presentation": { "type": "object", "additionalProperties": false, "required": ["title"], "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 80 }, "body": { "type": "string", "maxLength": 160 }, "tag": { "type": "string", "minLength": 1, "maxLength": 80 } } } } }, "nativeNotificationDelivery": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["mode", "firebase_project_id"], "properties": { "mode": { "const": "managed_fcm" }, "firebase_project_id": { "type": "string", "minLength": 6, "maxLength": 63, "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" } } }, { "type": "object", "additionalProperties": false, "required": ["mode", "url"], "properties": { "mode": { "const": "webhook" }, "url": { "type": "string", "format": "uri", "pattern": "^https://" } } }] } } };
|
|
24067
24149
|
func1 = Object.prototype.hasOwnProperty;
|
|
24068
24150
|
func2 = (function ucs2length(str3) {
|
|
24069
24151
|
const len = str3.length;
|
|
@@ -24093,7 +24175,7 @@ ${end.comment}` : end.comment;
|
|
|
24093
24175
|
})();
|
|
24094
24176
|
validate21.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
24095
24177
|
schema39 = { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["identity", "members"] } };
|
|
24096
|
-
schema37 = { "enum": ["collection.read", "records.create", "records.edit", "records.delete", "views.manage", "definitions.manage", "background.schedule", "offline.replica"] };
|
|
24178
|
+
schema37 = { "enum": ["collection.read", "records.create", "records.edit", "records.delete", "views.manage", "definitions.manage", "background.schedule", "offline.replica", "history.read"] };
|
|
24097
24179
|
func0 = (function equal2(a, b) {
|
|
24098
24180
|
if (a === b)
|
|
24099
24181
|
return true;
|
|
@@ -24171,15 +24253,6 @@ ${end.comment}` : end.comment;
|
|
|
24171
24253
|
}
|
|
24172
24254
|
});
|
|
24173
24255
|
|
|
24174
|
-
// node_modules/@mdbase-dev/connect-protocol/dist/collection-setup.js
|
|
24175
|
-
var RECORD_EXTENSIONS_CONFIGURATION_PATH, YAML_DOCUMENT_RECORDS_CAPABILITY;
|
|
24176
|
-
var init_collection_setup = __esm({
|
|
24177
|
-
"node_modules/@mdbase-dev/connect-protocol/dist/collection-setup.js"() {
|
|
24178
|
-
RECORD_EXTENSIONS_CONFIGURATION_PATH = "/settings/record_extensions";
|
|
24179
|
-
YAML_DOCUMENT_RECORDS_CAPABILITY = "yaml-document-records-v1";
|
|
24180
|
-
}
|
|
24181
|
-
});
|
|
24182
|
-
|
|
24183
24256
|
// node_modules/@mdbase-dev/connect-protocol/dist/capabilities.js
|
|
24184
24257
|
function capabilityOperationsForContractVersion(contractVersion, capability) {
|
|
24185
24258
|
const definitions = contractVersion === 1 ? APPLICATION_CAPABILITY_V1_DEFINITIONS : contractVersion === 2 ? APPLICATION_CAPABILITY_DEFINITIONS : void 0;
|
|
@@ -24199,7 +24272,8 @@ ${end.comment}` : end.comment;
|
|
|
24199
24272
|
"views.manage": ["create_view_source", "update_view_source", "delete_view_source"],
|
|
24200
24273
|
"definitions.manage": ["create_type", "update_type", "assess_type_pack", "apply_type_pack"],
|
|
24201
24274
|
"background.schedule": ["list_timers", "put_timer", "cancel_timer", "reconcile_timers"],
|
|
24202
|
-
"offline.replica": ["sync"]
|
|
24275
|
+
"offline.replica": ["sync"],
|
|
24276
|
+
"history.read": ["record_history", "record_version"]
|
|
24203
24277
|
};
|
|
24204
24278
|
APPLICATION_SETUP_OPERATIONS = [
|
|
24205
24279
|
"assess_collection_setup",
|
|
@@ -24246,11 +24320,26 @@ ${end.comment}` : end.comment;
|
|
|
24246
24320
|
}
|
|
24247
24321
|
});
|
|
24248
24322
|
|
|
24249
|
-
// node_modules/@mdbase-dev/connect-protocol/dist/
|
|
24250
|
-
|
|
24251
|
-
|
|
24252
|
-
|
|
24253
|
-
|
|
24323
|
+
// node_modules/@mdbase-dev/connect-protocol/dist/files.js
|
|
24324
|
+
function applicationFileRequest(requirement, options = {}) {
|
|
24325
|
+
return {
|
|
24326
|
+
actions: [.../* @__PURE__ */ new Set([
|
|
24327
|
+
...requirement.required,
|
|
24328
|
+
...options.includeOptional === false ? [] : requirement.optional ?? []
|
|
24329
|
+
])],
|
|
24330
|
+
scope: structuredClone(requirement.scope)
|
|
24331
|
+
};
|
|
24332
|
+
}
|
|
24333
|
+
var DEFAULT_FILE_CHUNK_BYTES, MAX_FILE_CHUNK_BYTES, MAX_FILE_FRAME_HEADER_BYTES, FILE_FRAME_PREFIX_BYTES, MAX_FILE_FRAME_BYTES, FILE_FRAME_MAGIC_BYTES, RELAY_FILE_MAGIC_BYTES;
|
|
24334
|
+
var init_files2 = __esm({
|
|
24335
|
+
"node_modules/@mdbase-dev/connect-protocol/dist/files.js"() {
|
|
24336
|
+
DEFAULT_FILE_CHUNK_BYTES = 1024 * 1024;
|
|
24337
|
+
MAX_FILE_CHUNK_BYTES = 4 * 1024 * 1024;
|
|
24338
|
+
MAX_FILE_FRAME_HEADER_BYTES = 16 * 1024;
|
|
24339
|
+
FILE_FRAME_PREFIX_BYTES = 16;
|
|
24340
|
+
MAX_FILE_FRAME_BYTES = FILE_FRAME_PREFIX_BYTES + MAX_FILE_FRAME_HEADER_BYTES + MAX_FILE_CHUNK_BYTES + 16;
|
|
24341
|
+
FILE_FRAME_MAGIC_BYTES = new Uint8Array([77, 68, 66, 70]);
|
|
24342
|
+
RELAY_FILE_MAGIC_BYTES = new Uint8Array([77, 68, 66, 82]);
|
|
24254
24343
|
}
|
|
24255
24344
|
});
|
|
24256
24345
|
|
|
@@ -24338,6 +24427,7 @@ ${end.comment}` : end.comment;
|
|
|
24338
24427
|
"manifest_load_failed": { category: "availability", recovery: "retry" },
|
|
24339
24428
|
"manifest_required": { category: "validation", recovery: "fix_request" },
|
|
24340
24429
|
"missing_grant_key": { category: "authorization", recovery: "reauthorize" },
|
|
24430
|
+
"mutation_abandoned": { category: "conflict", recovery: "none" },
|
|
24341
24431
|
"mutation_recovery_expired": { category: "compatibility", recovery: "none" },
|
|
24342
24432
|
"mutation_request_conflict": { category: "conflict", recovery: "resolve_conflict" },
|
|
24343
24433
|
"no_pending_mutation": { category: "conflict", recovery: "refresh" },
|
|
@@ -24449,30 +24539,23 @@ ${end.comment}` : end.comment;
|
|
|
24449
24539
|
}
|
|
24450
24540
|
});
|
|
24451
24541
|
|
|
24452
|
-
// node_modules/@mdbase-dev/connect-protocol/dist/
|
|
24453
|
-
function
|
|
24542
|
+
// node_modules/@mdbase-dev/connect-protocol/dist/application-contract.js
|
|
24543
|
+
function normalizeApplicationManifest(value2) {
|
|
24544
|
+
const manifest = structuredClone(value2);
|
|
24454
24545
|
return {
|
|
24455
|
-
|
|
24456
|
-
|
|
24457
|
-
|
|
24458
|
-
|
|
24459
|
-
|
|
24546
|
+
...manifest,
|
|
24547
|
+
requirements: {
|
|
24548
|
+
configuration: [],
|
|
24549
|
+
...manifest.requirements
|
|
24550
|
+
},
|
|
24551
|
+
provisions: {
|
|
24552
|
+
type_packs: [],
|
|
24553
|
+
configuration: [],
|
|
24554
|
+
...manifest.provisions
|
|
24555
|
+
},
|
|
24556
|
+
notifications: manifest.notifications ?? { criteria: [] }
|
|
24460
24557
|
};
|
|
24461
24558
|
}
|
|
24462
|
-
var DEFAULT_FILE_CHUNK_BYTES, MAX_FILE_CHUNK_BYTES, MAX_FILE_FRAME_HEADER_BYTES, FILE_FRAME_PREFIX_BYTES, MAX_FILE_FRAME_BYTES, FILE_FRAME_MAGIC_BYTES, RELAY_FILE_MAGIC_BYTES;
|
|
24463
|
-
var init_files2 = __esm({
|
|
24464
|
-
"node_modules/@mdbase-dev/connect-protocol/dist/files.js"() {
|
|
24465
|
-
DEFAULT_FILE_CHUNK_BYTES = 1024 * 1024;
|
|
24466
|
-
MAX_FILE_CHUNK_BYTES = 4 * 1024 * 1024;
|
|
24467
|
-
MAX_FILE_FRAME_HEADER_BYTES = 16 * 1024;
|
|
24468
|
-
FILE_FRAME_PREFIX_BYTES = 16;
|
|
24469
|
-
MAX_FILE_FRAME_BYTES = FILE_FRAME_PREFIX_BYTES + MAX_FILE_FRAME_HEADER_BYTES + MAX_FILE_CHUNK_BYTES + 16;
|
|
24470
|
-
FILE_FRAME_MAGIC_BYTES = new Uint8Array([77, 68, 66, 70]);
|
|
24471
|
-
RELAY_FILE_MAGIC_BYTES = new Uint8Array([77, 68, 66, 82]);
|
|
24472
|
-
}
|
|
24473
|
-
});
|
|
24474
|
-
|
|
24475
|
-
// node_modules/@mdbase-dev/connect-protocol/dist/application-contract.js
|
|
24476
24559
|
function semanticContractVersion(requirements2) {
|
|
24477
24560
|
const version3 = requirements2.capabilities === void 0 ? 1 : requirements2.capabilities?.contract_version;
|
|
24478
24561
|
if (version3 !== 1 && version3 !== 2)
|
|
@@ -24543,6 +24626,23 @@ ${end.comment}` : end.comment;
|
|
|
24543
24626
|
}
|
|
24544
24627
|
});
|
|
24545
24628
|
|
|
24629
|
+
// node_modules/@mdbase-dev/connect-protocol/dist/collection-setup.js
|
|
24630
|
+
var RECORD_EXTENSIONS_CONFIGURATION_PATH, YAML_DOCUMENT_RECORDS_CAPABILITY;
|
|
24631
|
+
var init_collection_setup = __esm({
|
|
24632
|
+
"node_modules/@mdbase-dev/connect-protocol/dist/collection-setup.js"() {
|
|
24633
|
+
RECORD_EXTENSIONS_CONFIGURATION_PATH = "/settings/record_extensions";
|
|
24634
|
+
YAML_DOCUMENT_RECORDS_CAPABILITY = "yaml-document-records-v1";
|
|
24635
|
+
}
|
|
24636
|
+
});
|
|
24637
|
+
|
|
24638
|
+
// node_modules/@mdbase-dev/connect-protocol/dist/records.js
|
|
24639
|
+
var MAX_READ_MANY_RESPONSE_BYTES;
|
|
24640
|
+
var init_records2 = __esm({
|
|
24641
|
+
"node_modules/@mdbase-dev/connect-protocol/dist/records.js"() {
|
|
24642
|
+
MAX_READ_MANY_RESPONSE_BYTES = 8 * 1024 * 1024;
|
|
24643
|
+
}
|
|
24644
|
+
});
|
|
24645
|
+
|
|
24546
24646
|
// node_modules/@mdbase-dev/connect-protocol/dist/operations.js
|
|
24547
24647
|
function mutationOperationIdentifier(operation, input) {
|
|
24548
24648
|
const object13 = isObject(input) ? input : {};
|
|
@@ -24595,7 +24695,9 @@ ${end.comment}` : end.comment;
|
|
|
24595
24695
|
"put_timer",
|
|
24596
24696
|
"cancel_timer",
|
|
24597
24697
|
"reconcile_timers",
|
|
24598
|
-
"sync"
|
|
24698
|
+
"sync",
|
|
24699
|
+
"record_history",
|
|
24700
|
+
"record_version"
|
|
24599
24701
|
];
|
|
24600
24702
|
FILE_CONTROL_MESSAGE_TYPES = [
|
|
24601
24703
|
"list_files",
|
|
@@ -24635,7 +24737,9 @@ ${end.comment}` : end.comment;
|
|
|
24635
24737
|
"put_timer": "always",
|
|
24636
24738
|
"cancel_timer": "always",
|
|
24637
24739
|
"reconcile_timers": "always",
|
|
24638
|
-
"sync": "sync_action"
|
|
24740
|
+
"sync": "sync_action",
|
|
24741
|
+
"record_history": "never",
|
|
24742
|
+
"record_version": "never"
|
|
24639
24743
|
};
|
|
24640
24744
|
MUTATING_FILE_CONTROL_MESSAGE_TYPES = /* @__PURE__ */ new Set([
|
|
24641
24745
|
"open_file_upload",
|
|
@@ -24994,23 +25098,7 @@ ${end.comment}` : end.comment;
|
|
|
24994
25098
|
const result2 = validateVersionedAppManifest(value2, options);
|
|
24995
25099
|
if (!result2.valid)
|
|
24996
25100
|
throw new AppManifestValidationError(result2.issues);
|
|
24997
|
-
return declaredContractVersion(value2) === 1 ? { contractVersion: 1, manifest:
|
|
24998
|
-
}
|
|
24999
|
-
function normalizeManifest(value2) {
|
|
25000
|
-
const manifest = structuredClone(value2);
|
|
25001
|
-
return {
|
|
25002
|
-
...manifest,
|
|
25003
|
-
requirements: {
|
|
25004
|
-
configuration: [],
|
|
25005
|
-
...manifest.requirements
|
|
25006
|
-
},
|
|
25007
|
-
provisions: {
|
|
25008
|
-
type_packs: [],
|
|
25009
|
-
configuration: [],
|
|
25010
|
-
...manifest.provisions
|
|
25011
|
-
},
|
|
25012
|
-
notifications: manifest.notifications ?? { criteria: [] }
|
|
25013
|
-
};
|
|
25101
|
+
return declaredContractVersion(value2) === 1 ? { contractVersion: 1, manifest: normalizeApplicationManifest(value2) } : { contractVersion: 2, manifest: normalizeApplicationManifest(value2) };
|
|
25014
25102
|
}
|
|
25015
25103
|
function formatManifestValidationIssues(issues) {
|
|
25016
25104
|
return issues.map((issue3) => `${issue3.path || "/"} ${issue3.message}`).join("; ");
|
|
@@ -25476,6 +25564,7 @@ ${end.comment}` : end.comment;
|
|
|
25476
25564
|
init_utils();
|
|
25477
25565
|
init_browser();
|
|
25478
25566
|
init_manifest_validators_generated();
|
|
25567
|
+
init_application_contract();
|
|
25479
25568
|
init_collection_setup();
|
|
25480
25569
|
init_dist2();
|
|
25481
25570
|
APPLICATION_MANIFEST_MAX_BYTES = 524288;
|
|
@@ -50447,12 +50536,12 @@ ${end.comment}` : end.comment;
|
|
|
50447
50536
|
// src/application/asset-pins.json
|
|
50448
50537
|
var asset_pins_default = {
|
|
50449
50538
|
runtime: {
|
|
50450
|
-
sha256: "
|
|
50451
|
-
bytes:
|
|
50452
|
-
maxBytes:
|
|
50539
|
+
sha256: "fa2c6c114536fd2ed822c6513a7ab7d3aa64e46aef7e37076fdbd230560d74ce",
|
|
50540
|
+
bytes: 3979440,
|
|
50541
|
+
maxBytes: 3979440,
|
|
50453
50542
|
source: {
|
|
50454
50543
|
repository: "mdbase-dev/mdbase-connect",
|
|
50455
|
-
commit: "
|
|
50544
|
+
commit: "e6fcee0b73ad6bd3f6188e07875dc5aef15f6955"
|
|
50456
50545
|
}
|
|
50457
50546
|
},
|
|
50458
50547
|
sqlite: {
|