@frockbot/computer-host-runtime 0.3.15 → 0.3.17
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/package.json +1 -1
- package/src/runtime.test.ts +19 -0
- package/src/runtime.ts +8 -4
package/package.json
CHANGED
package/src/runtime.test.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { dirname, join } from "node:path";
|
|
|
14
14
|
import { describe, expect, test } from "bun:test";
|
|
15
15
|
import {
|
|
16
16
|
APPLET_SDK_VERSION,
|
|
17
|
+
appletSdkInstallScript,
|
|
17
18
|
APPLET_SHIM_PATH,
|
|
18
19
|
appletShimScript,
|
|
19
20
|
APPLETS_ROOT,
|
|
@@ -509,6 +510,24 @@ describe("the applets phase", () => {
|
|
|
509
510
|
expect(APPLETS_ROOT.startsWith(`${RUNTIME_ROOT}/`)).toBe(true);
|
|
510
511
|
});
|
|
511
512
|
|
|
513
|
+
test("recreates shared Applet dependencies outside every durable source root", () => {
|
|
514
|
+
const provision = PROVISION_PHASES.find(
|
|
515
|
+
(phase) => phase.name === "applets",
|
|
516
|
+
)!.body;
|
|
517
|
+
const update = UPDATE_PHASES.find(
|
|
518
|
+
(phase) => phase.name === "applets",
|
|
519
|
+
)!.body;
|
|
520
|
+
|
|
521
|
+
expect(APPLETS_ROOT).toBe(`${RUNTIME_ROOT}/applets`);
|
|
522
|
+
expect(APPLETS_ROOT).not.toContain("/agent-data/");
|
|
523
|
+
expect(provision).toContain(appletSdkInstallScript);
|
|
524
|
+
expect(update).toContain(appletSdkInstallScript);
|
|
525
|
+
expect(appletSdkInstallScript).toContain(
|
|
526
|
+
`npm install --prefix ${APPLETS_ROOT}`,
|
|
527
|
+
);
|
|
528
|
+
expect(appletSdkInstallScript).not.toContain("user-packages");
|
|
529
|
+
});
|
|
530
|
+
|
|
512
531
|
test("an SDK that cannot be fetched leaves a record and not a failed run", () => {
|
|
513
532
|
// `@frockbot/applet-sdk` is not on npm yet. A Computer whose SDK could not
|
|
514
533
|
// be installed still browses, execs, and syncs, so the phase records the
|
package/src/runtime.ts
CHANGED
|
@@ -1350,10 +1350,14 @@ ordinary file tools, then use \`applet\` — it is on your PATH:
|
|
|
1350
1350
|
| \`applet dev\` | run it locally on this Computer and print a URL to open in the browser |
|
|
1351
1351
|
|
|
1352
1352
|
The SDK and its runtime live under \`${APPLETS_ROOT}\`, installed when this
|
|
1353
|
-
Computer was provisioned
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1353
|
+
Computer was provisioned and repaired by a runtime update when missing. Applet
|
|
1354
|
+
projects have no durable \`node_modules\`: dependency, cache, VCS, and ordinary
|
|
1355
|
+
build directories are excluded from Workspace sync, and the SDK resolves
|
|
1356
|
+
imports from this shared installation. The three files a publish explicitly
|
|
1357
|
+
requests from \`dist/\` are the only build-output exception. An Applet **never
|
|
1358
|
+
runs for real here**: \`applet dev\` is a preview, and publishing hands the
|
|
1359
|
+
built artifact to the kernel, which runs it. If \`applet\` says the SDK is not
|
|
1360
|
+
installed, run the self-check and read the \`applets-sdk\` line.
|
|
1357
1361
|
`,
|
|
1358
1362
|
},
|
|
1359
1363
|
{
|