@fungi.computer/shed 0.7.9 → 0.7.11
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 +5 -3
- package/backend/methods.ts +1 -2
- package/backend/test/runs.node.test.ts +1 -2
- package/dist/assets/index-DT5cobOX.js +1742 -0
- package/dist/assets/index-zjjMF3-_.css +1 -0
- package/dist/index.html +2 -2
- package/package.json +6 -6
- package/dist/assets/index--PRmIQpI.css +0 -1
- package/dist/assets/index-DExFKez2.js +0 -1742
package/README.md
CHANGED
|
@@ -45,9 +45,11 @@ Oyster with `git push`, builds them on your Computer and installs them. Sign in
|
|
|
45
45
|
at `$OYSTER_URL/login` with the owner key and open Shed from the Tourtois
|
|
46
46
|
desktop. Run `install-apps` again to update; each App keeps its data.
|
|
47
47
|
|
|
48
|
-
Port previews open on a
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
Port previews open on a separate host for each Computer and port. Oyster
|
|
49
|
+
requires `OYSTER_PREVIEW_DOMAIN` with wildcard TLS and routing on a different
|
|
50
|
+
registrable site from the owner sign-in. Without it, **Ports** still exposes and
|
|
51
|
+
removes ports and says that previews are off. Reopen old preview links from the
|
|
52
|
+
Ports tray.
|
|
51
53
|
|
|
52
54
|
## Change it
|
|
53
55
|
|
package/backend/methods.ts
CHANGED
|
@@ -61,7 +61,6 @@ export type ShedMethodContext = Readonly<{
|
|
|
61
61
|
}>;
|
|
62
62
|
const preview = z.strictObject({
|
|
63
63
|
previewUrl: z.url(),
|
|
64
|
-
expiresAt: z.number().int().positive(),
|
|
65
64
|
});
|
|
66
65
|
const bytes = z.strictObject({
|
|
67
66
|
path: z.string(),
|
|
@@ -100,7 +99,7 @@ export const appBackend = defineAppBackend<ShedMethodContext>({
|
|
|
100
99
|
handler: async (input, context: ShedMethodContext, caller) => {
|
|
101
100
|
if (!caller.computerId)
|
|
102
101
|
throw new Error("Computer preview access is not granted");
|
|
103
|
-
// Project the
|
|
102
|
+
// Project the preview URL; preview-row presentation policy stays with the host.
|
|
104
103
|
return z
|
|
105
104
|
.object(preview.shape)
|
|
106
105
|
.parse(await context.env.COMPUTER.preview(input));
|
|
@@ -242,7 +242,6 @@ void it("returns only an admitted preview and refuses an unexposed port", async
|
|
|
242
242
|
return Promise.resolve({
|
|
243
243
|
port: input.port,
|
|
244
244
|
previewUrl: "https://fixture.preview.example/",
|
|
245
|
-
expiresAt: 5000,
|
|
246
245
|
openMode: "external-only",
|
|
247
246
|
});
|
|
248
247
|
return Promise.resolve({ error: "not_granted" });
|
|
@@ -256,7 +255,7 @@ void it("returns only an admitted preview and refuses an unexposed port", async
|
|
|
256
255
|
} satisfies Parameters<typeof appBackend.call>[3];
|
|
257
256
|
assert.deepEqual(
|
|
258
257
|
await appBackend.call("expose", { port: 3000 }, context, caller),
|
|
259
|
-
{ previewUrl: "https://fixture.preview.example/"
|
|
258
|
+
{ previewUrl: "https://fixture.preview.example/" },
|
|
260
259
|
);
|
|
261
260
|
await assert.rejects(
|
|
262
261
|
appBackend.call("expose", { port: 3001 }, context, caller),
|