@hachej/boring-workspace 0.1.64 → 0.1.66
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/FileTree-B_fRS4Om.js +230 -0
- package/dist/MarkdownEditor-C55gVDyW.js +743 -0
- package/dist/WorkspaceLoadingState-D3i4X-eH.js +847 -0
- package/dist/WorkspaceProvider-Ddx7GByq.js +8770 -0
- package/dist/app-front.d.ts +79 -2
- package/dist/app-front.js +3110 -2467
- package/dist/app-server.d.ts +2 -2
- package/dist/app-server.js +6 -4
- package/dist/boring-workspace.css +2 -1
- package/dist/charts.d.ts +6 -1
- package/dist/charts.js +131 -138
- package/dist/plugin.d.ts +64 -1
- package/dist/plugin.js +32 -0
- package/dist/rolldown-runtime-Dqa2HsxW.js +20 -0
- package/dist/{runtimeEnv-HolIkcoB.d.ts → runtimeEnv-CU-c4kaV.d.ts} +7 -0
- package/dist/server.d.ts +2 -2
- package/dist/server.js +4 -3
- package/dist/testing-e2e.d.ts +5 -0
- package/dist/testing-e2e.js +33 -42
- package/dist/testing.d.ts +6 -1
- package/dist/testing.js +9474 -10814
- package/dist/utils-BRcxFdrz.js +8 -0
- package/dist/workspace.css +2756 -290
- package/dist/workspace.d.ts +132 -15
- package/dist/workspace.js +568 -734
- package/docs/plans/archive/CODE_OWNERSHIP_CLEANUP_PLAN.md +1 -1
- package/docs/plans/archive/DECLARATIVE_LAYOUT_MIGRATION.md +4 -4
- package/docs/plans/archive/GENERIC_EXPLORER_PLUGIN_PLAN.md +10 -10
- package/docs/plans/archive/PLUGIN_MODEL.md +37 -37
- package/docs/plans/archive/WORKSPACE_V2_PLAN.md +2 -2
- package/package.json +50 -50
- package/dist/FileTree-DjhAzlg3.js +0 -315
- package/dist/MarkdownEditor-CeN7n6mw.js +0 -610
- package/dist/WorkspaceLoadingState-D4SB2awA.js +0 -867
- package/dist/WorkspaceProvider-CEZUOy1M.js +0 -8725
- 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
|
|
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
|
|
1167
|
+
resourceScope: { workspaceId, sessionId: input.sessionId }
|
|
1167
1168
|
};
|
|
1168
1169
|
}
|
|
1169
1170
|
};
|
package/dist/testing-e2e.d.ts
CHANGED
package/dist/testing-e2e.js
CHANGED
|
@@ -1,45 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
42
|
-
|
|
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
|
|
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
|
+
}
|