@hachej/boring-workspace 0.1.63 → 0.1.65

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.
Files changed (36) hide show
  1. package/dist/FileTree-B_fRS4Om.js +230 -0
  2. package/dist/MarkdownEditor-C55gVDyW.js +743 -0
  3. package/dist/WorkspaceLoadingState-D3i4X-eH.js +847 -0
  4. package/dist/WorkspaceProvider-Ddx7GByq.js +8770 -0
  5. package/dist/app-front.d.ts +106 -4
  6. package/dist/app-front.js +3110 -2427
  7. package/dist/app-server.d.ts +2 -2
  8. package/dist/app-server.js +6 -4
  9. package/dist/boring-workspace.css +2 -1
  10. package/dist/charts.d.ts +6 -1
  11. package/dist/charts.js +131 -138
  12. package/dist/plugin.d.ts +64 -1
  13. package/dist/plugin.js +32 -0
  14. package/dist/rolldown-runtime-Dqa2HsxW.js +20 -0
  15. package/dist/{runtimeEnv-HolIkcoB.d.ts → runtimeEnv-CU-c4kaV.d.ts} +7 -0
  16. package/dist/server.d.ts +2 -2
  17. package/dist/server.js +4 -3
  18. package/dist/testing-e2e.d.ts +5 -0
  19. package/dist/testing-e2e.js +33 -42
  20. package/dist/testing.d.ts +6 -1
  21. package/dist/testing.js +9474 -10814
  22. package/dist/utils-BRcxFdrz.js +8 -0
  23. package/dist/workspace.css +2790 -301
  24. package/dist/workspace.d.ts +164 -21
  25. package/dist/workspace.js +568 -734
  26. package/docs/plans/archive/CODE_OWNERSHIP_CLEANUP_PLAN.md +1 -1
  27. package/docs/plans/archive/DECLARATIVE_LAYOUT_MIGRATION.md +4 -4
  28. package/docs/plans/archive/GENERIC_EXPLORER_PLUGIN_PLAN.md +10 -10
  29. package/docs/plans/archive/PLUGIN_MODEL.md +37 -37
  30. package/docs/plans/archive/WORKSPACE_V2_PLAN.md +2 -2
  31. package/package.json +50 -50
  32. package/dist/FileTree-CUvn5K86.js +0 -315
  33. package/dist/MarkdownEditor-5f4lhBqc.js +0 -598
  34. package/dist/WorkspaceLoadingState-y087Q6ek.js +0 -866
  35. package/dist/WorkspaceProvider-U4izhS84.js +0 -8660
  36. package/dist/utils-B6yFEsav.js +0 -8
package/dist/server.js CHANGED
@@ -1143,17 +1143,18 @@ function createLocalCliBridgeAuthPolicy(options) {
1143
1143
  );
1144
1144
  }
1145
1145
  ensureCallerAllowed(input.definition, "browser");
1146
- if (input.workspaceId !== options.workspaceId) {
1146
+ if (!options.forceOwnerWorkspaceId && input.workspaceId !== options.workspaceId) {
1147
1147
  throw createWorkspaceBridgeError(
1148
1148
  "BRIDGE_RESOURCE_SCOPE_DENIED" /* ResourceScopeDenied */,
1149
1149
  "Local CLI bridge caller is not authorized for workspace"
1150
1150
  );
1151
1151
  }
1152
+ const workspaceId = options.forceOwnerWorkspaceId ? options.workspaceId : input.workspaceId;
1152
1153
  const capabilities = options.capabilities ?? input.definition.requiredCapabilities;
1153
1154
  ensureCapabilities(capabilities, input.requiredCapabilities ?? input.definition.requiredCapabilities);
1154
1155
  const context = makeContext({
1155
1156
  callerClass: "browser",
1156
- workspaceId: input.workspaceId,
1157
+ workspaceId,
1157
1158
  sessionId: input.sessionId,
1158
1159
  pluginId: input.pluginId,
1159
1160
  capabilities,
@@ -1163,7 +1164,7 @@ function createLocalCliBridgeAuthPolicy(options) {
1163
1164
  context,
1164
1165
  effectiveCapabilities: capabilities,
1165
1166
  principal: { userId: "local-cli" },
1166
- resourceScope: { workspaceId: input.workspaceId, sessionId: input.sessionId }
1167
+ resourceScope: { workspaceId, sessionId: input.sessionId }
1167
1168
  };
1168
1169
  }
1169
1170
  };
@@ -66,3 +66,8 @@ export declare function openWorkbench(page: Page, opts: {
66
66
  }): Promise<void>;
67
67
 
68
68
  export { }
69
+
70
+
71
+ declare global {
72
+ var __BORING_RUNTIME_SINGLETONS__: Record<string, unknown> | undefined;
73
+ }
@@ -1,45 +1,36 @@
1
- async function r(t, e) {
2
- try {
3
- await t.context().request.get("/api/v1/ui/commands/next?poll=true", {
4
- timeout: 2e3
5
- });
6
- } catch {
7
- }
8
- const a = { ...e.seed ?? {} };
9
- e.openWorkbenchAtBoot !== !1 && (a[`${e.shellKey}:surface`] = "1"), await t.addInitScript((o) => {
10
- try {
11
- localStorage.clear();
12
- for (const [n, i] of Object.entries(o))
13
- localStorage.setItem(n, i);
14
- } catch {
15
- }
16
- }, a), await t.goto("/", { waitUntil: "domcontentloaded" }), await t.waitForTimeout(e.mountSettleMs ?? 2500);
1
+ //#region src/front/testing/e2e.ts
2
+ async function e(e, t) {
3
+ try {
4
+ await e.context().request.get("/api/v1/ui/commands/next?poll=true", { timeout: 2e3 });
5
+ } catch {}
6
+ let n = { ...t.seed ?? {} };
7
+ t.openWorkbenchAtBoot !== !1 && (n[`${t.shellKey}:surface`] = "1"), await e.addInitScript((e) => {
8
+ try {
9
+ localStorage.clear();
10
+ for (let [t, n] of Object.entries(e)) localStorage.setItem(t, n);
11
+ } catch {}
12
+ }, n), await e.goto("/", { waitUntil: "domcontentloaded" }), await e.waitForTimeout(t.mountSettleMs ?? 2500);
17
13
  }
18
- async function c(t, e) {
19
- await t.evaluate(
20
- (o) => localStorage.getItem(`${o}:surface`) === "1",
21
- e.shellKey
22
- ) || (await t.locator("body").click({ position: { x: 750, y: 300 } }), await t.keyboard.press("Meta+2"), await t.waitForTimeout(800));
14
+ async function t(e, t) {
15
+ await e.evaluate((e) => localStorage.getItem(`${e}:surface`) === "1", t.shellKey) || (await e.locator("body").click({ position: {
16
+ x: 750,
17
+ y: 300
18
+ } }), await e.keyboard.press("Meta+2"), await e.waitForTimeout(800));
23
19
  }
24
- async function l(t, e) {
25
- if (await t.waitForTimeout(700), !await t.evaluate(async (o) => (await fetch("/api/v1/ui/commands", {
26
- method: "POST",
27
- headers: { "Content-Type": "application/json" },
28
- body: JSON.stringify({ kind: "openPanel", params: o })
29
- })).ok, e)) throw new Error(`bridge openPanel failed for ${e.id}`);
30
- await t.waitForFunction(
31
- (o) => {
32
- const n = document.querySelectorAll(".dv-tab");
33
- for (const i of n)
34
- if ((i.textContent ?? "").includes(o)) return !0;
35
- return !1;
36
- },
37
- e.title,
38
- { timeout: e.paneMountTimeoutMs ?? 1e4 }
39
- ), await t.waitForTimeout(800);
20
+ async function n(e, t) {
21
+ if (await e.waitForTimeout(700), !await e.evaluate(async (e) => (await fetch("/api/v1/ui/commands", {
22
+ method: "POST",
23
+ headers: { "Content-Type": "application/json" },
24
+ body: JSON.stringify({
25
+ kind: "openPanel",
26
+ params: e
27
+ })
28
+ })).ok, t)) throw Error(`bridge openPanel failed for ${t.id}`);
29
+ await e.waitForFunction((e) => {
30
+ let t = document.querySelectorAll(".dv-tab");
31
+ for (let n of t) if ((n.textContent ?? "").includes(e)) return !0;
32
+ return !1;
33
+ }, t.title, { timeout: t.paneMountTimeoutMs ?? 1e4 }), await e.waitForTimeout(800);
40
34
  }
41
- export {
42
- r as bootClean,
43
- l as openPaneViaBridge,
44
- c as openWorkbench
45
- };
35
+ //#endregion
36
+ export { e as bootClean, n as openPaneViaBridge, t as openWorkbench };
package/dist/testing.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ComponentType } from 'react';
2
2
  import { DockviewApi } from 'dockview-react';
3
3
  import { DockviewPanelApi } from 'dockview-react';
4
- import { JSX } from 'react/jsx-runtime';
4
+ import { JSX } from 'react';
5
5
  import { Page } from '@playwright/test';
6
6
  import { ReactElement } from 'react';
7
7
  import { ReactNode } from 'react';
@@ -426,3 +426,8 @@ declare interface WorkspaceState {
426
426
  }
427
427
 
428
428
  export { }
429
+
430
+
431
+ declare global {
432
+ var __BORING_RUNTIME_SINGLETONS__: Record<string, unknown> | undefined;
433
+ }