@fungi.computer/nacre 0.1.2 → 0.1.4

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.
@@ -105,7 +105,7 @@ export declare const appDirectoryEntrySchema: z.ZodObject<{
105
105
  agent?: (Readonly<{
106
106
  order?: number | undefined;
107
107
  }> & Readonly<{
108
- keybind? /** The selected Computers and what the App may do on each. */: string | undefined;
108
+ keybind?: string | undefined;
109
109
  }>) | undefined;
110
110
  help?: Readonly<{
111
111
  order?: number | undefined;
@@ -297,7 +297,7 @@ export declare const appDirectoryResponseSchema: z.ZodLazy<z.ZodObject<{
297
297
  agent?: (Readonly<{
298
298
  order?: number | undefined;
299
299
  }> & Readonly<{
300
- keybind? /** The selected Computers and what the App may do on each. */: string | undefined;
300
+ keybind?: string | undefined;
301
301
  }>) | undefined;
302
302
  help?: Readonly<{
303
303
  order?: number | undefined;
@@ -90,6 +90,20 @@ export declare class ShellModuleError extends Error {
90
90
  /** Always ShellModuleError. */
91
91
  readonly name = "ShellModuleError";
92
92
  }
93
+ /**
94
+ * The picked shell's module could not be fetched or evaluated. A browser keeps
95
+ * a failed module fetch for the life of the document, so only loading the
96
+ * page again can recover it.
97
+ */
98
+ export declare class ShellModuleUnavailable extends Error {
99
+ /** The module URL that could not load. */
100
+ readonly moduleUrl: string;
101
+ /** Always ShellModuleUnavailable. */
102
+ readonly name = "ShellModuleUnavailable";
103
+ constructor(
104
+ /** The module URL that could not load. */
105
+ moduleUrl: string, options: ErrorOptions);
106
+ }
93
107
  /**
94
108
  * Import the picked shell Release's module from the host's own origin and
95
109
  * check that it exports `mountShell`, and `mountPlatformControls` when it
@@ -61,6 +61,22 @@ export class ShellModuleError extends Error {
61
61
  /** Always ShellModuleError. */
62
62
  name = "ShellModuleError";
63
63
  }
64
+ /**
65
+ * The picked shell's module could not be fetched or evaluated. A browser keeps
66
+ * a failed module fetch for the life of the document, so only loading the
67
+ * page again can recover it.
68
+ */
69
+ export class ShellModuleUnavailable extends Error {
70
+ moduleUrl;
71
+ /** Always ShellModuleUnavailable. */
72
+ name = "ShellModuleUnavailable";
73
+ constructor(
74
+ /** The module URL that could not load. */
75
+ moduleUrl, options) {
76
+ super("The picked shell could not be loaded", options);
77
+ this.moduleUrl = moduleUrl;
78
+ }
79
+ }
64
80
  /**
65
81
  * Import the picked shell Release's module from the host's own origin and
66
82
  * check that it exports `mountShell`, and `mountPlatformControls` when it
@@ -74,9 +90,7 @@ export async function importShellModule(moduleUrl, hostOrigin) {
74
90
  namespace = await import(/* @vite-ignore */ moduleUrl.href);
75
91
  }
76
92
  catch (cause) {
77
- throw new ShellModuleError("The picked shell could not be loaded", {
78
- cause,
79
- });
93
+ throw new ShellModuleUnavailable(moduleUrl.href, { cause });
80
94
  }
81
95
  const decoded = shellModuleSchema().safeParse(namespace);
82
96
  if (!decoded.success)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/nacre",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "description": "The shell client for hosting Apps: workbench, command host, keys, commands, window manager and App directory rows",
6
6
  "type": "module",
@@ -52,10 +52,10 @@
52
52
  "LICENSE"
53
53
  ],
54
54
  "dependencies": {
55
- "@fungi.computer/agar": "0.6.1",
55
+ "@fungi.computer/agar": "0.7.1",
56
56
  "@fungi.computer/ear-tag": "0.1.0",
57
- "@fungi.computer/gills": "0.2.0",
58
- "@fungi.computer/puffball": "0.4.0",
57
+ "@fungi.computer/gills": "0.2.1",
58
+ "@fungi.computer/puffball": "0.5.1",
59
59
  "@fungi.computer/whistle": "0.3.0",
60
60
  "effect": "4.0.2",
61
61
  "zod": "4.4.3"