webloom-framework 0.4.2 → 0.4.3
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 +11 -1
- package/dist/advanced.d.ts +8 -8
- package/dist/advanced.js +4 -4
- package/dist/advanced.js.map +1 -1
- package/dist/{chunk-RRNUE457.js → chunk-UZAO6ORB.js} +110 -26
- package/dist/chunk-UZAO6ORB.js.map +1 -0
- package/dist/{chunk-XVD7ALPV.js → chunk-YIIDRFHK.js} +106 -15
- package/dist/chunk-YIIDRFHK.js.map +1 -0
- package/dist/{chunk-CKML74MG.js → chunk-ZP5QYTXX.js} +4 -4
- package/dist/chunk-ZP5QYTXX.js.map +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -4
- package/dist/{messageBus-BDtkjs6y.d.ts → messageBus-DigYfj74.d.ts} +1 -1
- package/dist/messagePortServiceTransport-B9-24RK6.d.ts +355 -0
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/{runtimeTypes-CleHMFaq.d.ts → runtimeTypes-50LVQs0h.d.ts} +7 -220
- package/dist/{sharedWorkerHost-BNMUW-8v.d.ts → sharedWorkerHost-DikS18hA.d.ts} +55 -2
- package/dist/testing.d.ts +6 -6
- package/dist/testing.js +4 -4
- package/dist/{windowRuntime-BGl_jfbK.d.ts → windowRuntime-e1Tn6SnN.d.ts} +2 -2
- package/docs/api.md +28 -1
- package/docs/proposals/webloom-v4/requirements.md +1 -1
- package/package.json +1 -1
- package/dist/chunk-CKML74MG.js.map +0 -1
- package/dist/chunk-RRNUE457.js.map +0 -1
- package/dist/chunk-XVD7ALPV.js.map +0 -1
- package/dist/messagePortServiceTransport-DyNmdgoa.d.ts +0 -150
|
@@ -680,7 +680,7 @@ function validServiceIdentity(message2) {
|
|
|
680
680
|
return boundedText(message2.callId, MAX_CALL_ID_LENGTH) && boundedText(message2.serviceInstanceId, MAX_ID_LENGTH);
|
|
681
681
|
}
|
|
682
682
|
function validateSnapshot(value) {
|
|
683
|
-
if (value.type !== RUNTIME_SNAPSHOT_TYPE || !validIdentity(value) || !validBinding(value.binding) || !boundedText(value.runtimeId, MAX_ID_LENGTH) || !boundedText(value.runtimeInstanceId, MAX_ID_LENGTH) || value.runtimeKind !== "window-main" && value.runtimeKind !== "shared-worker" || !Number.isSafeInteger(value.revision) || value.revision < 0 || !["starting", "ready", "stopping", "failed", "disposed"].includes(String(value.state)) || !Array.isArray(value.units) || !Array.isArray(value.services) || value.units.length > MAX_SNAPSHOT_UNITS || value.services.length > MAX_SNAPSHOT_SERVICES) return false;
|
|
683
|
+
if (value.type !== RUNTIME_SNAPSHOT_TYPE || !validIdentity(value) || value.binding !== void 0 && !validBinding(value.binding) || !boundedText(value.runtimeId, MAX_ID_LENGTH) || !boundedText(value.runtimeInstanceId, MAX_ID_LENGTH) || value.runtimeKind !== "window-main" && value.runtimeKind !== "shared-worker" || !Number.isSafeInteger(value.revision) || value.revision < 0 || !["starting", "ready", "stopping", "failed", "disposed"].includes(String(value.state)) || !Array.isArray(value.units) || !Array.isArray(value.services) || value.units.length > MAX_SNAPSHOT_UNITS || value.services.length > MAX_SNAPSHOT_SERVICES) return false;
|
|
684
684
|
if (value.state !== "ready" && value.services.length !== 0) return false;
|
|
685
685
|
const unitKeys = /* @__PURE__ */ new Set();
|
|
686
686
|
for (const unit of value.units) {
|
|
@@ -710,7 +710,7 @@ function validateSnapshot(value) {
|
|
|
710
710
|
function validateMessage(value) {
|
|
711
711
|
if (!record(value) || !text(value.type) || !validIdentity(value)) return false;
|
|
712
712
|
if (value.type === RUNTIME_SNAPSHOT_TYPE) return validateSnapshot(value);
|
|
713
|
-
if (
|
|
713
|
+
if (value.binding !== void 0 && !validBinding(value.binding)) return false;
|
|
714
714
|
if (value.type === RUNTIME_ERROR_TYPE) return boundedText(value.code, MAX_ID_LENGTH) && boundedText(value.message, MAX_ERROR_MESSAGE_LENGTH) && phase(value.phase) && (value.pluginId === void 0 || boundedText(value.pluginId, MAX_ID_LENGTH)) && (value.unitId === void 0 || boundedText(value.unitId, MAX_ID_LENGTH));
|
|
715
715
|
if (value.type === RUNTIME_CALL_TYPE) return validServiceIdentity(value) && boundedText(value.capabilityId, MAX_ID_LENGTH) && boundedText(value.contractVersion, MAX_VERSION_LENGTH) && Object.hasOwn(value, "request") && validPayload(value.request) && (value.mode === "unary" || value.mode === "stream") && typeof value.timeoutMs === "number" && Number.isFinite(value.timeoutMs) && value.timeoutMs > 0 && value.timeoutMs <= 3e5 && (value.operationId === void 0 || boundedText(value.operationId, MAX_ID_LENGTH)) && (value.grantId === void 0 || boundedText(value.grantId, MAX_ID_LENGTH)) && (value.mode !== "stream" ? !Object.hasOwn(value, "initialCredit") : Number.isSafeInteger(value.initialCredit) && value.initialCredit >= 1 && value.initialCredit <= 256);
|
|
716
716
|
if (value.type === RUNTIME_RESULT_TYPE) return validServiceIdentity(value) && ((!Object.hasOwn(value, "result") || validPayload(value.result)) && (value.streamReady === true && !Object.hasOwn(value, "result") && !Object.hasOwn(value, "done") || value.done === true && !Object.hasOwn(value, "result") && !Object.hasOwn(value, "streamReady") || Object.hasOwn(value, "result") && !Object.hasOwn(value, "done") && !Object.hasOwn(value, "streamReady")));
|
|
@@ -4035,5 +4035,5 @@ function hostForWindowApp(app) {
|
|
|
4035
4035
|
}
|
|
4036
4036
|
|
|
4037
4037
|
export { DEFAULT_RUNTIME_LIMITS, LIFECYCLE_ERROR_TEXT, LifecycleScopeRevokedError, PermissionDeniedError, PermissionLeaseRevokedError, RESOURCE_OWNER, RESOURCE_REGISTRY, RUNTIME_CALL_TYPE, RUNTIME_CANCEL_TYPE, RUNTIME_CLOSE_ACK_TYPE, RUNTIME_CLOSE_TYPE, RUNTIME_CREDIT_TYPE, RUNTIME_ERROR_MESSAGE_TYPE, RUNTIME_ERROR_TYPE, RUNTIME_NEXT_TYPE, RUNTIME_PROTOCOL_VERSION, RUNTIME_RESULT_TYPE, RUNTIME_SNAPSHOT_TYPE, RuntimeInitializationError, RuntimeUnavailableError, SCOPED_TASK_SCHEDULER_CAPABILITY, StartupCapabilityError, StartupPluginError, UpgradeGateRejectedError, WebLoomError, assertCapability, assertReceivedPortSet, buildPluginGraph, capabilityDescriptor, capabilityKey, cloneFrozenAttributes, createCapabilityRegistry, createInMemoryPluginConfigStore, createLifecycleScope, createMessageBus, createPermissionLease, createPluginHost, createReceivePortLedger, createResourceRegistry, createResourceScope, createResourceStore, createRuntimeBudget, createRuntimeMessageCodec, createRuntimeUnitImplementationRegistry, createScopedTaskScheduler, createWindowApp, createWindowAppFromHost, defineCapability, dependenciesOfManifest, hostForWindowApp, invokeCapabilityHandler, isCapability, isCapabilityDescriptor, isRuntimeSnapshot, lifecycleErrorText, materializePluginDefinitions, normalizeRuntimeLimits, providesOfManifest, registerOwnedResource, reverseDependentsOf, selectRuntimeUnit, validateDto, validatePluginGraph, validateRawDto, validateTransferList, validateTransferListWithStats };
|
|
4038
|
-
//# sourceMappingURL=chunk-
|
|
4039
|
-
//# sourceMappingURL=chunk-
|
|
4038
|
+
//# sourceMappingURL=chunk-ZP5QYTXX.js.map
|
|
4039
|
+
//# sourceMappingURL=chunk-ZP5QYTXX.js.map
|