dreamboard 0.1.21 → 0.1.23
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/{chunk-EYYWGWTO.js → chunk-2RCUHMGL.js} +343 -1911
- package/dist/chunk-2RCUHMGL.js.map +1 -0
- package/dist/{chunk-MOVHYB6E.js → chunk-GN7232BY.js} +1025 -695
- package/dist/chunk-GN7232BY.js.map +1 -0
- package/dist/{chunk-BMYC6772.js → chunk-H3O43F5P.js} +9765 -3068
- package/dist/chunk-H3O43F5P.js.map +1 -0
- package/dist/dev-host/dev-api-proxy-plugin.ts +330 -0
- package/dist/dev-host/dev-diagnostics.ts +62 -0
- package/dist/dev-host/dev-fallback-stylesheet.ts +50 -0
- package/dist/dev-host/dev-host-controller.ts +686 -0
- package/dist/dev-host/dev-host-player-query.ts +17 -0
- package/dist/dev-host/dev-host-session-transport.ts +52 -0
- package/dist/dev-host/dev-host-storage.ts +56 -0
- package/dist/dev-host/dev-log-relay-plugin.ts +469 -0
- package/dist/dev-host/dev-runtime-config.ts +14 -0
- package/dist/dev-host/dev-runtime-platform.ts +419 -0
- package/dist/dev-host/dev-virtual-modules-plugin.ts +63 -0
- package/dist/dev-host/host-main.css +182 -0
- package/dist/dev-host/host-main.tsx +754 -0
- package/dist/dev-host/index.html +56 -0
- package/dist/dev-host/plugin-main.ts +55 -0
- package/dist/dev-host/plugin.html +24 -0
- package/dist/dev-host/start-dev-server.ts +138 -0
- package/dist/dev-host/virtual-modules.d.ts +27 -0
- package/dist/dist-FEPN3BDN.js +16543 -0
- package/dist/dist-FEPN3BDN.js.map +1 -0
- package/dist/{dist-WJRJNFLI.js → dist-FRURQI7Q.js} +4 -2
- package/dist/index.js +3 -3
- package/dist/internal.js +159 -124
- package/dist/internal.js.map +1 -1
- package/dist/runtime-packages/tailwind-config/shared-styles.css +146 -0
- package/dist/runtime-packages/ui/src/components/.gitkeep +0 -0
- package/dist/runtime-packages/ui/src/components/accordion.tsx +66 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/actions.tsx +65 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/artifact.tsx +147 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/branch.tsx +215 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/canvas.tsx +22 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/chain-of-thought.tsx +228 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/code-block.tsx +179 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/confirmation.tsx +158 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/connection.tsx +28 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/context.tsx +408 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/controls.tsx +18 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/conversation.tsx +97 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/edge.tsx +140 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/image.tsx +24 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/inline-citation.tsx +287 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/loader.tsx +96 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/message.tsx +463 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/node.tsx +71 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/open-in-chat.tsx +365 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/panel.tsx +15 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/plan.tsx +142 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/prompt-input.tsx +1380 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/queue.tsx +274 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/reasoning.tsx +182 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/response.tsx +22 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/shimmer.tsx +64 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/sources.tsx +77 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/suggestion.tsx +53 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/task.tsx +87 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/tool.tsx +165 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/toolbar.tsx +16 -0
- package/dist/runtime-packages/ui/src/components/ai-elements/web-preview.tsx +263 -0
- package/dist/runtime-packages/ui/src/components/alert-dialog.tsx +157 -0
- package/dist/runtime-packages/ui/src/components/alert.tsx +66 -0
- package/dist/runtime-packages/ui/src/components/avatar.tsx +53 -0
- package/dist/runtime-packages/ui/src/components/badge.tsx +46 -0
- package/dist/runtime-packages/ui/src/components/button-group.tsx +83 -0
- package/dist/runtime-packages/ui/src/components/button.tsx +65 -0
- package/dist/runtime-packages/ui/src/components/card.tsx +92 -0
- package/dist/runtime-packages/ui/src/components/carousel.tsx +241 -0
- package/dist/runtime-packages/ui/src/components/collapsible.tsx +33 -0
- package/dist/runtime-packages/ui/src/components/command.tsx +184 -0
- package/dist/runtime-packages/ui/src/components/context-menu.tsx +252 -0
- package/dist/runtime-packages/ui/src/components/counter.tsx +11 -0
- package/dist/runtime-packages/ui/src/components/dialog.tsx +146 -0
- package/dist/runtime-packages/ui/src/components/drawer.tsx +132 -0
- package/dist/runtime-packages/ui/src/components/dropdown-menu.tsx +257 -0
- package/dist/runtime-packages/ui/src/components/form.tsx +168 -0
- package/dist/runtime-packages/ui/src/components/header.tsx +13 -0
- package/dist/runtime-packages/ui/src/components/hover-card.tsx +44 -0
- package/dist/runtime-packages/ui/src/components/input-group.tsx +178 -0
- package/dist/runtime-packages/ui/src/components/input.tsx +21 -0
- package/dist/runtime-packages/ui/src/components/item.tsx +193 -0
- package/dist/runtime-packages/ui/src/components/label.tsx +24 -0
- package/dist/runtime-packages/ui/src/components/navigation-menu.tsx +168 -0
- package/dist/runtime-packages/ui/src/components/popover.tsx +55 -0
- package/dist/runtime-packages/ui/src/components/progress.tsx +31 -0
- package/dist/runtime-packages/ui/src/components/radio-group.tsx +45 -0
- package/dist/runtime-packages/ui/src/components/resizable.tsx +56 -0
- package/dist/runtime-packages/ui/src/components/scroll-area.tsx +58 -0
- package/dist/runtime-packages/ui/src/components/select.tsx +187 -0
- package/dist/runtime-packages/ui/src/components/separator.tsx +28 -0
- package/dist/runtime-packages/ui/src/components/skeleton.tsx +13 -0
- package/dist/runtime-packages/ui/src/components/sonner.tsx +25 -0
- package/dist/runtime-packages/ui/src/components/spinner.tsx +16 -0
- package/dist/runtime-packages/ui/src/components/switch.tsx +31 -0
- package/dist/runtime-packages/ui/src/components/table.tsx +137 -0
- package/dist/runtime-packages/ui/src/components/tabs.tsx +74 -0
- package/dist/runtime-packages/ui/src/components/textarea.tsx +23 -0
- package/dist/runtime-packages/ui/src/components/theme-provider.tsx +73 -0
- package/dist/runtime-packages/ui/src/components/tooltip.tsx +61 -0
- package/dist/runtime-packages/ui/src/components/ui/file-upload.tsx +195 -0
- package/dist/runtime-packages/ui/src/hooks/.gitkeep +0 -0
- package/dist/runtime-packages/ui/src/index.ts +68 -0
- package/dist/runtime-packages/ui/src/lib/utils.ts +6 -0
- package/dist/runtime-packages/ui-host-runtime/src/actor-principal.ts +68 -0
- package/dist/runtime-packages/ui-host-runtime/src/components/host-controls.tsx +359 -0
- package/dist/runtime-packages/ui-host-runtime/src/components/host-feedback-toaster.tsx +274 -0
- package/dist/runtime-packages/ui-host-runtime/src/components/host-feedback.tsx +214 -0
- package/dist/runtime-packages/ui-host-runtime/src/components/host-session-metadata.tsx +135 -0
- package/dist/runtime-packages/ui-host-runtime/src/components/index.ts +5 -0
- package/dist/runtime-packages/ui-host-runtime/src/components/perf-overlay.tsx +194 -0
- package/dist/runtime-packages/ui-host-runtime/src/host-controls.tsx +1 -0
- package/dist/runtime-packages/ui-host-runtime/src/host-feedback.tsx +1 -0
- package/dist/runtime-packages/ui-host-runtime/src/host-session-transport.ts +162 -0
- package/dist/runtime-packages/ui-host-runtime/src/index.ts +2 -0
- package/dist/runtime-packages/ui-host-runtime/src/logger.ts +11 -0
- package/dist/runtime-packages/ui-host-runtime/src/perf.ts +253 -0
- package/dist/runtime-packages/ui-host-runtime/src/plugin-bridge.ts +195 -0
- package/dist/runtime-packages/ui-host-runtime/src/plugin-health-check.ts +138 -0
- package/dist/runtime-packages/ui-host-runtime/src/plugin-messages.ts +159 -0
- package/dist/runtime-packages/ui-host-runtime/src/plugin-session-gateway.ts +524 -0
- package/dist/runtime-packages/ui-host-runtime/src/runtime/index.ts +12 -0
- package/dist/runtime-packages/ui-host-runtime/src/screenshot/projection-to-snapshot.ts +122 -0
- package/dist/runtime-packages/ui-host-runtime/src/screenshot/static-store-api.ts +26 -0
- package/dist/runtime-packages/ui-host-runtime/src/session-ingress-controller.ts +477 -0
- package/dist/runtime-packages/ui-host-runtime/src/session-ingress.ts +209 -0
- package/dist/runtime-packages/ui-host-runtime/src/session-live-runtime.ts +112 -0
- package/dist/runtime-packages/ui-host-runtime/src/session-model.ts +318 -0
- package/dist/runtime-packages/ui-host-runtime/src/session-projection.ts +211 -0
- package/dist/runtime-packages/ui-host-runtime/src/session-state-reducer.ts +814 -0
- package/dist/runtime-packages/ui-host-runtime/src/sse-manager.ts +334 -0
- package/dist/runtime-packages/ui-host-runtime/src/unified-session-store.ts +180 -0
- package/dist/scaffold/assets/static/app/tsconfig.framework.json +3 -1
- package/dist/scaffold/assets/static/ui/tsconfig.framework.json +7 -19
- package/package.json +52 -17
- package/skills/dreamboard/SKILL.md +41 -75
- package/LICENSE +0 -89
- package/NOTICE +0 -1
- package/dist/chunk-BMYC6772.js.map +0 -1
- package/dist/chunk-EYYWGWTO.js.map +0 -1
- package/dist/chunk-MOVHYB6E.js.map +0 -1
- package/dist/scaffold/assets/static/ui/App.tsx +0 -22
- package/dist/src-CUL7EGGG.js +0 -634
- package/dist/src-CUL7EGGG.js.map +0 -1
- package/skills/dreamboard/references/authoring-lifecycle.md +0 -102
- package/skills/dreamboard/references/board-surfaces.md +0 -36
- package/skills/dreamboard/references/board-topology.md +0 -443
- package/skills/dreamboard/references/boards-and-topology.md +0 -100
- package/skills/dreamboard/references/card-actions.md +0 -107
- package/skills/dreamboard/references/cli.md +0 -120
- package/skills/dreamboard/references/core-concepts.md +0 -514
- package/skills/dreamboard/references/custom-renderers.md +0 -26
- package/skills/dreamboard/references/derived-values.md +0 -55
- package/skills/dreamboard/references/effects.md +0 -111
- package/skills/dreamboard/references/game-contract.md +0 -89
- package/skills/dreamboard/references/game-definition.md +0 -89
- package/skills/dreamboard/references/game-shell.md +0 -80
- package/skills/dreamboard/references/hand-surfaces.md +0 -33
- package/skills/dreamboard/references/index.md +0 -112
- package/skills/dreamboard/references/inputs-and-targets.md +0 -160
- package/skills/dreamboard/references/interactions.md +0 -158
- package/skills/dreamboard/references/manifest-fields.md +0 -137
- package/skills/dreamboard/references/manifest.md +0 -81
- package/skills/dreamboard/references/package-surfaces.md +0 -69
- package/skills/dreamboard/references/phases.md +0 -145
- package/skills/dreamboard/references/prompts-and-choices.md +0 -55
- package/skills/dreamboard/references/quickstart.md +0 -71
- package/skills/dreamboard/references/rule-authoring.md +0 -144
- package/skills/dreamboard/references/setup-bootstrap.md +0 -78
- package/skills/dreamboard/references/stages-and-zones.md +0 -59
- package/skills/dreamboard/references/static-views.md +0 -67
- package/skills/dreamboard/references/table-queries-and-ops.md +0 -103
- package/skills/dreamboard/references/testing-bases.md +0 -147
- package/skills/dreamboard/references/testing-generated-contracts.md +0 -142
- package/skills/dreamboard/references/testing-runtime-assertions.md +0 -124
- package/skills/dreamboard/references/testing-scenarios.md +0 -148
- package/skills/dreamboard/references/testing-ui-tests.md +0 -174
- package/skills/dreamboard/references/testing.md +0 -161
- package/skills/dreamboard/references/ui-architecture.md +0 -137
- package/skills/dreamboard/references/ui-components.md +0 -34
- package/skills/dreamboard/references/views.md +0 -72
- package/skills/dreamboard/references/workspace-layout.md +0 -136
- /package/dist/{dist-WJRJNFLI.js.map → dist-FRURQI7Q.js.map} +0 -0
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
RealtimeClient,
|
|
34
34
|
RealtimePresence,
|
|
35
35
|
SIGN_OUT_SCOPES,
|
|
36
|
+
StorageApiError,
|
|
36
37
|
SupabaseClient,
|
|
37
38
|
createClient,
|
|
38
39
|
internals,
|
|
@@ -46,7 +47,7 @@ import {
|
|
|
46
47
|
navigatorLock,
|
|
47
48
|
processLock,
|
|
48
49
|
websocket_factory_default
|
|
49
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-H3O43F5P.js";
|
|
50
51
|
import "./chunk-D4HDZEJT.js";
|
|
51
52
|
export {
|
|
52
53
|
AuthAdminApi_default as AuthAdminApi,
|
|
@@ -82,6 +83,7 @@ export {
|
|
|
82
83
|
RealtimeClient,
|
|
83
84
|
RealtimePresence,
|
|
84
85
|
SIGN_OUT_SCOPES,
|
|
86
|
+
StorageApiError,
|
|
85
87
|
SupabaseClient,
|
|
86
88
|
websocket_factory_default as WebSocketFactory,
|
|
87
89
|
createClient,
|
|
@@ -96,4 +98,4 @@ export {
|
|
|
96
98
|
navigatorLock,
|
|
97
99
|
processLock
|
|
98
100
|
};
|
|
99
|
-
//# sourceMappingURL=dist-
|
|
101
|
+
//# sourceMappingURL=dist-FRURQI7Q.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runDreamboardCli
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GN7232BY.js";
|
|
5
5
|
import "./chunk-4S67A2YA.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-H3O43F5P.js";
|
|
7
|
+
import "./chunk-2RCUHMGL.js";
|
|
8
8
|
import "./chunk-D4HDZEJT.js";
|
|
9
9
|
|
|
10
10
|
// src/index.published.ts
|
package/dist/internal.js
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
PUBLISHED_ENVIRONMENT,
|
|
6
6
|
applyWorkspaceCodegen,
|
|
7
7
|
assertCliStaticScaffoldComplete,
|
|
8
|
+
assertCompilerPortableDependencies,
|
|
8
9
|
assertReducerBundleSmoke,
|
|
9
10
|
assertReducerContractPreflight,
|
|
10
11
|
compile_default,
|
|
@@ -45,7 +46,7 @@ import {
|
|
|
45
46
|
sync_default,
|
|
46
47
|
test_default,
|
|
47
48
|
toDreamboardApiError
|
|
48
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-GN7232BY.js";
|
|
49
50
|
import {
|
|
50
51
|
DEFAULT_LOGIN_TIMEOUT_MS,
|
|
51
52
|
ENVIRONMENT_CONFIGS,
|
|
@@ -55,20 +56,18 @@ import {
|
|
|
55
56
|
getGlobalConfigPath,
|
|
56
57
|
getStoredSession,
|
|
57
58
|
loadGlobalConfig,
|
|
58
|
-
readJsonFile,
|
|
59
59
|
readTextFile,
|
|
60
|
-
readTextFileIfExists,
|
|
61
60
|
saveGlobalConfig,
|
|
62
61
|
setAccessOnlySession,
|
|
63
62
|
setCredentials
|
|
64
63
|
} from "./chunk-4S67A2YA.js";
|
|
65
64
|
import {
|
|
66
65
|
createClient
|
|
67
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-H3O43F5P.js";
|
|
68
67
|
import {
|
|
69
68
|
getApiVersion,
|
|
70
69
|
queryWorkshopRulebook
|
|
71
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-2RCUHMGL.js";
|
|
72
71
|
import "./chunk-D4HDZEJT.js";
|
|
73
72
|
|
|
74
73
|
// src/commands/auth.ts
|
|
@@ -334,119 +333,7 @@ var auth_default = defineCommand({
|
|
|
334
333
|
|
|
335
334
|
// src/commands/internal.ts
|
|
336
335
|
import { spawn } from "child_process";
|
|
337
|
-
|
|
338
|
-
// src/services/project/dependency-portability.ts
|
|
339
|
-
import path from "path";
|
|
340
|
-
var DEPENDENCY_FIELDS = [
|
|
341
|
-
"dependencies",
|
|
342
|
-
"devDependencies",
|
|
343
|
-
"optionalDependencies",
|
|
344
|
-
"peerDependencies"
|
|
345
|
-
];
|
|
346
|
-
var UNPORTABLE_SPECIFIER_PATTERN = /^(file|link|portal|workspace):/;
|
|
347
|
-
async function buildSourceDependencyProfile(options) {
|
|
348
|
-
const packageJson = await readProjectPackageJson(options.projectRoot);
|
|
349
|
-
const packages = collectDreamboardPackageSpecifiers(packageJson);
|
|
350
|
-
return {
|
|
351
|
-
kind: "npm-registry",
|
|
352
|
-
packageManager: packageJson.packageManager,
|
|
353
|
-
dreamboardRegistryUrl: await readDreamboardRegistryFromNpmrc(options.projectRoot) ?? options.projectConfig?.localMaintainerRegistry?.registryUrl,
|
|
354
|
-
localSnapshotId: options.projectConfig?.localMaintainerRegistry?.snapshotId,
|
|
355
|
-
packages
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
async function assertCompilerPortableDependencies(options) {
|
|
359
|
-
const packageJson = await readProjectPackageJson(options.projectRoot);
|
|
360
|
-
const problems = collectUnportableDreamboardSpecifiers(packageJson);
|
|
361
|
-
if (problems.length > 0) {
|
|
362
|
-
const details = problems.map(
|
|
363
|
-
(problem) => `${problem.location} ${problem.packageName} -> ${problem.specifier}`
|
|
364
|
-
).join("; ");
|
|
365
|
-
throw new Error(
|
|
366
|
-
[
|
|
367
|
-
"Compiler-bound workspaces must install Dreamboard packages from a registry.",
|
|
368
|
-
`Found unportable Dreamboard dependency specifier(s): ${details}.`,
|
|
369
|
-
"Run `dreamboard sync` from a workspace that uses registry-pinned @dreamboard/* and dreamboard versions before compiling."
|
|
370
|
-
].join(" ")
|
|
371
|
-
);
|
|
372
|
-
}
|
|
373
|
-
const profile = await buildSourceDependencyProfile(options);
|
|
374
|
-
const hasLocalSnapshotPackage = Object.values(profile.packages).some(
|
|
375
|
-
(value) => value.includes("-local.")
|
|
376
|
-
);
|
|
377
|
-
if (hasLocalSnapshotPackage && !profile.dreamboardRegistryUrl) {
|
|
378
|
-
throw new Error(
|
|
379
|
-
"This workspace references local Dreamboard snapshot versions but has no @dreamboard registry configured. Run `dreamboard sync --env local` to refresh .npmrc before compiling."
|
|
380
|
-
);
|
|
381
|
-
}
|
|
382
|
-
return profile;
|
|
383
|
-
}
|
|
384
|
-
async function readProjectPackageJson(projectRoot) {
|
|
385
|
-
return readJsonFile(
|
|
386
|
-
path.join(projectRoot, "package.json")
|
|
387
|
-
);
|
|
388
|
-
}
|
|
389
|
-
function collectDreamboardPackageSpecifiers(packageJson) {
|
|
390
|
-
const packages = {};
|
|
391
|
-
for (const field of DEPENDENCY_FIELDS) {
|
|
392
|
-
const dependencies = packageJson[field];
|
|
393
|
-
if (!dependencies) continue;
|
|
394
|
-
for (const [packageName, specifier] of Object.entries(dependencies)) {
|
|
395
|
-
if (isDreamboardPackage(packageName)) {
|
|
396
|
-
packages[packageName] = specifier;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
const overrides = packageJson.pnpm?.overrides;
|
|
401
|
-
if (overrides) {
|
|
402
|
-
for (const [packageName, specifier] of Object.entries(overrides)) {
|
|
403
|
-
if (isDreamboardPackage(packageName) && typeof specifier === "string" && packages[packageName] === void 0) {
|
|
404
|
-
packages[packageName] = specifier;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
return packages;
|
|
409
|
-
}
|
|
410
|
-
function collectUnportableDreamboardSpecifiers(packageJson) {
|
|
411
|
-
const problems = [];
|
|
412
|
-
for (const field of DEPENDENCY_FIELDS) {
|
|
413
|
-
const dependencies = packageJson[field];
|
|
414
|
-
if (!dependencies) continue;
|
|
415
|
-
for (const [packageName, specifier] of Object.entries(dependencies)) {
|
|
416
|
-
if (isDreamboardPackage(packageName) && UNPORTABLE_SPECIFIER_PATTERN.test(specifier)) {
|
|
417
|
-
problems.push({ location: field, packageName, specifier });
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
const overrides = packageJson.pnpm?.overrides;
|
|
422
|
-
if (overrides) {
|
|
423
|
-
for (const [packageName, specifier] of Object.entries(overrides)) {
|
|
424
|
-
if (isDreamboardPackage(packageName) && typeof specifier === "string" && UNPORTABLE_SPECIFIER_PATTERN.test(specifier)) {
|
|
425
|
-
problems.push({
|
|
426
|
-
location: "pnpm.overrides",
|
|
427
|
-
packageName,
|
|
428
|
-
specifier
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
return problems;
|
|
434
|
-
}
|
|
435
|
-
function isDreamboardPackage(packageName) {
|
|
436
|
-
return packageName === "dreamboard" || packageName.startsWith("@dreamboard/");
|
|
437
|
-
}
|
|
438
|
-
async function readDreamboardRegistryFromNpmrc(projectRoot) {
|
|
439
|
-
const npmrc = await readTextFileIfExists(path.join(projectRoot, ".npmrc"));
|
|
440
|
-
if (!npmrc) return void 0;
|
|
441
|
-
for (const line of npmrc.split(/\r?\n/)) {
|
|
442
|
-
const trimmed = line.trim();
|
|
443
|
-
if (!trimmed.startsWith("@dreamboard:registry=")) continue;
|
|
444
|
-
return trimmed.slice("@dreamboard:registry=".length).trim() || void 0;
|
|
445
|
-
}
|
|
446
|
-
return void 0;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
// src/commands/internal.ts
|
|
336
|
+
import { createServer } from "net";
|
|
450
337
|
var verifyAgentWorkspaceCommand = defineCommand({
|
|
451
338
|
meta: {
|
|
452
339
|
name: "verify-agent-workspace",
|
|
@@ -490,6 +377,9 @@ var verifyAgentWorkspaceCommand = defineCommand({
|
|
|
490
377
|
await runCommandDefinition(compile_default, parsedFlags);
|
|
491
378
|
await runCommandDefinition(resolveTestSubCommand("generate"), parsedFlags);
|
|
492
379
|
await runCommandDefinition(resolveTestSubCommand("run"), parsedFlags);
|
|
380
|
+
if (mode === "fin") {
|
|
381
|
+
await runLocalDevBrowserSmoke(projectRoot, parsedFlags);
|
|
382
|
+
}
|
|
493
383
|
}
|
|
494
384
|
});
|
|
495
385
|
function parseVerificationMode(value) {
|
|
@@ -602,14 +492,159 @@ async function runCloudLocalVerification(projectRoot, projectConfig, config) {
|
|
|
602
492
|
}
|
|
603
493
|
consola.success("Agent workspace cloud-local verification passed.");
|
|
604
494
|
}
|
|
495
|
+
async function runLocalDevBrowserSmoke(projectRoot, parsedFlags) {
|
|
496
|
+
consola.start("Smoke-testing dreamboard dev in a browser...");
|
|
497
|
+
const port = await findAvailablePort();
|
|
498
|
+
const child = spawn(
|
|
499
|
+
"pnpm",
|
|
500
|
+
[
|
|
501
|
+
"dev",
|
|
502
|
+
"--",
|
|
503
|
+
"--port",
|
|
504
|
+
String(port),
|
|
505
|
+
...parsedFlags.env ? ["--env", parsedFlags.env] : []
|
|
506
|
+
],
|
|
507
|
+
{
|
|
508
|
+
cwd: projectRoot,
|
|
509
|
+
env: {
|
|
510
|
+
...process.env,
|
|
511
|
+
DREAMBOARD_REUSE_LOCAL_SDK_SNAPSHOT: process.env.DREAMBOARD_REUSE_LOCAL_SDK_SNAPSHOT ?? "1"
|
|
512
|
+
},
|
|
513
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
514
|
+
}
|
|
515
|
+
);
|
|
516
|
+
const output = [];
|
|
517
|
+
child.stdout.setEncoding("utf8");
|
|
518
|
+
child.stderr.setEncoding("utf8");
|
|
519
|
+
child.stdout.on("data", (chunk) => output.push(String(chunk)));
|
|
520
|
+
child.stderr.on("data", (chunk) => output.push(String(chunk)));
|
|
521
|
+
try {
|
|
522
|
+
child.once("error", (error) => {
|
|
523
|
+
output.push(`Failed to start pnpm dev: ${error.message}`);
|
|
524
|
+
});
|
|
525
|
+
const url = await waitForDevServerUrl(child, output, port);
|
|
526
|
+
await verifyDevHostWithPlaywright(url);
|
|
527
|
+
consola.success("dreamboard dev browser smoke passed.");
|
|
528
|
+
} finally {
|
|
529
|
+
child.kill("SIGTERM");
|
|
530
|
+
await sleep(500);
|
|
531
|
+
if (child.exitCode === null) {
|
|
532
|
+
child.kill("SIGKILL");
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
async function verifyDevHostWithPlaywright(url) {
|
|
537
|
+
const { chromium } = await import("playwright");
|
|
538
|
+
const browser = await chromium.launch({ headless: true });
|
|
539
|
+
const errors = [];
|
|
540
|
+
try {
|
|
541
|
+
const page = await browser.newPage({
|
|
542
|
+
viewport: { width: 1440, height: 900 }
|
|
543
|
+
});
|
|
544
|
+
page.on("console", (message) => {
|
|
545
|
+
if (message.type() === "error") {
|
|
546
|
+
errors.push(message.text());
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
page.on("pageerror", (error) => {
|
|
550
|
+
errors.push(error.message);
|
|
551
|
+
});
|
|
552
|
+
await page.goto(url, { waitUntil: "domcontentloaded", timeout: 3e4 });
|
|
553
|
+
const frameElement = await page.waitForSelector(
|
|
554
|
+
'iframe[title="Dreamboard UI Plugin"]',
|
|
555
|
+
{ timeout: 6e4 }
|
|
556
|
+
);
|
|
557
|
+
const frame = await frameElement.contentFrame();
|
|
558
|
+
if (!frame) {
|
|
559
|
+
throw new Error("dreamboard dev loaded without a plugin iframe.");
|
|
560
|
+
}
|
|
561
|
+
await frame.locator("body").waitFor({ timeout: 3e4 });
|
|
562
|
+
const playableCard = frame.locator('[data-dreamboard-zone-item][data-playable="true"]').first();
|
|
563
|
+
if (await playableCard.count() > 0) {
|
|
564
|
+
await playableCard.click({ timeout: 1e4 });
|
|
565
|
+
await frame.waitForFunction(
|
|
566
|
+
() => {
|
|
567
|
+
if (document.querySelector('[data-selected="true"]')) {
|
|
568
|
+
return true;
|
|
569
|
+
}
|
|
570
|
+
if (document.body.innerText.includes("Selected")) {
|
|
571
|
+
return true;
|
|
572
|
+
}
|
|
573
|
+
return Array.from(document.querySelectorAll("button")).some(
|
|
574
|
+
(button) => /confirm|submit/i.test(button.textContent ?? "") && !button.disabled
|
|
575
|
+
);
|
|
576
|
+
},
|
|
577
|
+
void 0,
|
|
578
|
+
{ timeout: 5e3 }
|
|
579
|
+
);
|
|
580
|
+
} else {
|
|
581
|
+
consola.info(
|
|
582
|
+
"No playable card-zone items found; verified dev host load only."
|
|
583
|
+
);
|
|
584
|
+
}
|
|
585
|
+
if (errors.length > 0) {
|
|
586
|
+
throw new Error(
|
|
587
|
+
`dreamboard dev browser console errors:
|
|
588
|
+
${errors.join("\n")}`
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
} finally {
|
|
592
|
+
await browser.close();
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
async function waitForDevServerUrl(child, output, port) {
|
|
596
|
+
const fallbackUrl = `http://localhost:${port}/index.html`;
|
|
597
|
+
const startedAt = Date.now();
|
|
598
|
+
while (Date.now() - startedAt < 9e4) {
|
|
599
|
+
const combined = output.join("");
|
|
600
|
+
const match = combined.match(/Local:\s+(http:\/\/[^\s]+)/);
|
|
601
|
+
if (match?.[1]) {
|
|
602
|
+
return match[1];
|
|
603
|
+
}
|
|
604
|
+
if (child.exitCode !== null) {
|
|
605
|
+
throw new Error(
|
|
606
|
+
[
|
|
607
|
+
`pnpm dev exited before serving ${fallbackUrl}.`,
|
|
608
|
+
combined.trim().slice(-2e3)
|
|
609
|
+
].filter(Boolean).join("\n")
|
|
610
|
+
);
|
|
611
|
+
}
|
|
612
|
+
await sleep(100);
|
|
613
|
+
}
|
|
614
|
+
throw new Error(
|
|
615
|
+
[
|
|
616
|
+
`Timed out waiting for pnpm dev to serve ${fallbackUrl}.`,
|
|
617
|
+
output.join("").trim().slice(-2e3)
|
|
618
|
+
].filter(Boolean).join("\n")
|
|
619
|
+
);
|
|
620
|
+
}
|
|
621
|
+
async function findAvailablePort() {
|
|
622
|
+
return await new Promise((resolve, reject) => {
|
|
623
|
+
const server = createServer();
|
|
624
|
+
server.once("error", reject);
|
|
625
|
+
server.listen(0, "127.0.0.1", () => {
|
|
626
|
+
const address = server.address();
|
|
627
|
+
server.close(() => {
|
|
628
|
+
if (!address || typeof address === "string") {
|
|
629
|
+
reject(new Error("Failed to reserve a local dev smoke port."));
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
resolve(address.port);
|
|
633
|
+
});
|
|
634
|
+
});
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
async function sleep(ms) {
|
|
638
|
+
await new Promise((resolve) => setTimeout(resolve, ms));
|
|
639
|
+
}
|
|
605
640
|
|
|
606
641
|
// src/commands/perf.ts
|
|
607
642
|
import { mkdirSync, writeFileSync } from "fs";
|
|
608
|
-
import
|
|
643
|
+
import path2 from "path";
|
|
609
644
|
|
|
610
645
|
// src/services/workflows/dev-preflight.ts
|
|
611
646
|
import { spawnSync } from "child_process";
|
|
612
|
-
import
|
|
647
|
+
import path from "path";
|
|
613
648
|
var defaultDependencies = {
|
|
614
649
|
getLocalDiff,
|
|
615
650
|
assertCliStaticScaffoldComplete,
|
|
@@ -792,7 +827,7 @@ function satisfiesTildeRange(candidate, minimum) {
|
|
|
792
827
|
return compareStableSdkVersions(candidate, minimum) >= 0 && candidate.major === minimum.major && candidate.minor === minimum.minor;
|
|
793
828
|
}
|
|
794
829
|
async function readLocalWorkspaceSdkVersion(projectRoot, dependencies) {
|
|
795
|
-
const packageJsonPath =
|
|
830
|
+
const packageJsonPath = path.join(projectRoot, "package.json");
|
|
796
831
|
let raw;
|
|
797
832
|
try {
|
|
798
833
|
raw = await dependencies.readTextFile(packageJsonPath);
|
|
@@ -812,7 +847,7 @@ async function readLocalWorkspaceSdkVersion(projectRoot, dependencies) {
|
|
|
812
847
|
const uiSdkSpecifier = typeof parsed === "object" && parsed !== null && "dependencies" in parsed && typeof parsed.dependencies === "object" && parsed.dependencies !== null && "@dreamboard/ui-sdk" in parsed.dependencies && typeof parsed.dependencies["@dreamboard/ui-sdk"] === "string" ? parsed.dependencies["@dreamboard/ui-sdk"].trim() : "";
|
|
813
848
|
let version = uiSdkSpecifier;
|
|
814
849
|
if (uiSdkSpecifier.startsWith("workspace:") || uiSdkSpecifier.startsWith("file:")) {
|
|
815
|
-
const repoUiSdkPackageJsonPath =
|
|
850
|
+
const repoUiSdkPackageJsonPath = path.join(
|
|
816
851
|
resolveCliRepoRoot(),
|
|
817
852
|
"packages",
|
|
818
853
|
"ui-sdk",
|
|
@@ -1135,8 +1170,8 @@ var replayScenarioCommand = defineCommand({
|
|
|
1135
1170
|
}
|
|
1136
1171
|
const jsonOutput = String(args["json-output"] ?? "").trim();
|
|
1137
1172
|
if (jsonOutput) {
|
|
1138
|
-
const outputPath =
|
|
1139
|
-
mkdirSync(
|
|
1173
|
+
const outputPath = path2.isAbsolute(jsonOutput) ? jsonOutput : path2.join(projectRoot, jsonOutput);
|
|
1174
|
+
mkdirSync(path2.dirname(outputPath), { recursive: true });
|
|
1140
1175
|
writeFileSync(outputPath, `${JSON.stringify(report, null, 2)}
|
|
1141
1176
|
`, "utf8");
|
|
1142
1177
|
consola.success(`Wrote perf artifact to ${outputPath}`);
|