@fungi.computer/oyster 0.27.0 → 0.28.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/apps/gate.js +1 -4
- package/dist/apps/installation.js +8 -10
- package/dist/apps/permissions.d.ts +2 -0
- package/dist/apps/permissions.js +2 -2
- package/dist/embed-metafiles.js +1 -1
- package/dist/host.js +7 -4
- package/dist/page/app-access.js +1 -0
- package/dist/page/app-permissions.js +1 -0
- package/dist/page-script.js +2 -2
- package/dist/standalone/computer.d.ts +8 -1
- package/dist/standalone/computer.js +17 -10
- package/dist/standalone/dashboard-approval.js +1 -2
- package/dist/standalone/media.d.ts +15 -2
- package/dist/standalone/media.js +8 -0
- package/dist/standalone/tenancy.d.ts +6 -0
- package/dist/standalone/tenancy.js +57 -0
- package/dist/tenancy/cloudflare/registry.d.ts +3 -0
- package/dist/tenancy/cloudflare/registry.js +43 -2
- package/dist/tenancy/cloudflare-access.d.ts +28 -0
- package/dist/tenancy/cloudflare-access.js +99 -0
- package/docs/api/README.md +69 -6
- package/docs/api/apps.md +14 -8
- package/docs/api/modules.md +37 -36
- package/docs/api/tenancy/cloudflare-access.md +82 -0
- package/docs/api/tenancy/cloudflare.md +1 -0
- package/examples/standalone/wrangler.jsonc +7 -0
- package/package.json +15 -11
package/dist/host.js
CHANGED
|
@@ -764,6 +764,11 @@ export function oysterRouteTable(host) {
|
|
|
764
764
|
current.release.artifact.artifactDigest !== parsed.data.artifactDigest)
|
|
765
765
|
return refusal(409, "stale_authority");
|
|
766
766
|
const release = await releaseOf(current.release);
|
|
767
|
+
// The owner approved what the page displayed: a host snapshot that
|
|
768
|
+
// changed since (not the stored one) needs a reload and a fresh review.
|
|
769
|
+
const snapshot = await deriveDeclaredOperations(current.release, release.declaration ?? emptyAppDeclaration, operationDescriptors);
|
|
770
|
+
if (snapshot.digest !== parsed.data.declaredOperationsDigest)
|
|
771
|
+
return refusal(409, "stale_authority");
|
|
767
772
|
const update = await reduceInstallation(current, parsed.data.command, release, principal, current);
|
|
768
773
|
if (Result.isFailure(update))
|
|
769
774
|
return refusal(409, update.failure.code);
|
|
@@ -1008,10 +1013,8 @@ export function oysterRouteTable(host) {
|
|
|
1008
1013
|
!method.requires.every((capability) => release.declaration?.capabilities.includes(capability)))
|
|
1009
1014
|
return refusal(403, "Gill source is not admitted");
|
|
1010
1015
|
const current = await gateFacts(installation, release, principal);
|
|
1011
|
-
if (current.declaredOperations.
|
|
1012
|
-
installation.
|
|
1013
|
-
current.declaredOperations.artifactDigest !==
|
|
1014
|
-
installation.release.artifact.artifactDigest)
|
|
1016
|
+
if (current.declaredOperations.artifactDigest !==
|
|
1017
|
+
installation.release.artifact.artifactDigest)
|
|
1015
1018
|
return refusal(403, "stale_authority");
|
|
1016
1019
|
if (method.requires.some((capability) => grantsFor({
|
|
1017
1020
|
status: installation.status,
|
package/dist/page/app-access.js
CHANGED
|
@@ -85,6 +85,7 @@ export function createShellAppAccess(directory) {
|
|
|
85
85
|
storeGeneration: view.storeGeneration,
|
|
86
86
|
authorityVersion: permissions.authority.authorityVersion,
|
|
87
87
|
artifactDigest: view.artifactDigest,
|
|
88
|
+
declaredOperationsDigest: permissions.declaredOperations.digest,
|
|
88
89
|
command: decision.command,
|
|
89
90
|
}),
|
|
90
91
|
});
|
|
@@ -238,6 +238,7 @@ function PermissionEditor({ port, appKey, onAccepted, onStateChange, }) {
|
|
|
238
238
|
storeGeneration: view.storeGeneration,
|
|
239
239
|
authorityVersion: view.permissions.authority.authorityVersion,
|
|
240
240
|
artifactDigest: view.artifactDigest,
|
|
241
|
+
declaredOperationsDigest: view.permissions.declaredOperations.digest,
|
|
241
242
|
}, planGrantChange(view.permissions.authority, nextDraft));
|
|
242
243
|
if (!isMounted())
|
|
243
244
|
return;
|