@volter/world-core 3.0.10 → 3.0.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/dist/src/pack-fetch.js +4 -2
- package/package.json +1 -1
- package/src/pack-fetch.ts +6 -2
package/dist/src/pack-fetch.js
CHANGED
|
@@ -211,11 +211,13 @@ export function createPackFetch(parts, options = {}) {
|
|
|
211
211
|
// the workspaces a person can be shown (Viewing a World): each built workspace screen's id and path, the pack's own
|
|
212
212
|
// and its lanes'
|
|
213
213
|
const workspaces = () => [...(m.screens ?? []).filter((s) => s.kind === 'workspace' && s.status === 'done' && parts.screens?.[s.id]).map((s) => ({ id: s.id, path: s.path })), ...lanesWorkspaces(parts.lanes ?? {})];
|
|
214
|
-
/** Whether a built screen
|
|
214
|
+
/** Whether a built screen a person views (a workspace or a flow, never content an API client reads) draws a url: its host
|
|
215
|
+
* one the screen names, its path the screen's or under it (a root screen draws its root alone). */
|
|
215
216
|
const drawsUrl = (at) => {
|
|
216
217
|
try {
|
|
217
218
|
const u = new URL(at);
|
|
218
|
-
|
|
219
|
+
const path = u.pathname.replace(/\/+$/, '') || '/';
|
|
220
|
+
return screens.some((s) => s.decl.kind !== 'content' && Boolean(s.host(u.hostname.toLowerCase())) && (s.decl.path.replace(/\/+$/, '') === '' ? path === '/' : Boolean(s.path(path))));
|
|
219
221
|
}
|
|
220
222
|
catch {
|
|
221
223
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/world-core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.11",
|
|
4
4
|
"description": "The kernel of Volter World: one log per twin, branches as pointers, checkpoints, the fold that keeps a twin current, the head that performs a write against the vendor, references, and the git plane. A twin package builds on it; the runtime serves it.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"twin",
|
package/src/pack-fetch.ts
CHANGED
|
@@ -247,9 +247,13 @@ export function createPackFetch(parts: PackParts, options: PackFetchOptions = {}
|
|
|
247
247
|
// the workspaces a person can be shown (Viewing a World): each built workspace screen's id and path, the pack's own
|
|
248
248
|
// and its lanes'
|
|
249
249
|
const workspaces = (): Workspace[] => [...(m.screens ?? []).filter((s) => s.kind === 'workspace' && s.status === 'done' && parts.screens?.[s.id]).map((s) => ({ id: s.id, path: s.path })), ...lanesWorkspaces(parts.lanes ?? {})];
|
|
250
|
-
/** Whether a built screen
|
|
250
|
+
/** Whether a built screen a person views (a workspace or a flow, never content an API client reads) draws a url: its host
|
|
251
|
+
* one the screen names, its path the screen's or under it (a root screen draws its root alone). */
|
|
251
252
|
const drawsUrl = (at: string): boolean => {
|
|
252
|
-
try {
|
|
253
|
+
try {
|
|
254
|
+
const u = new URL(at); const path = u.pathname.replace(/\/+$/, '') || '/';
|
|
255
|
+
return screens.some((s) => s.decl.kind !== 'content' && Boolean(s.host(u.hostname.toLowerCase())) && (s.decl.path.replace(/\/+$/, '') === '' ? path === '/' : Boolean(s.path(path))));
|
|
256
|
+
} catch { return false; }
|
|
253
257
|
};
|
|
254
258
|
// a context the kernel opens for what no surface operation names: a door, a screen, the clock, the board
|
|
255
259
|
const open = (request: Request, id: string, method: string, path: string, params: Record<string, string>): Promise<HandlerContext> =>
|