@markii/host 0.17.0-next.4 → 0.17.0-next.6
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/README.md +28 -1
- package/dist/browser-worker.classic.js +43 -43
- package/dist/browser-worker.js +43 -43
- package/dist/conformance/host/17-export-linked-set/expected.json +17 -0
- package/dist/conformance/host/17-export-linked-set/files/second.mk.md +3 -0
- package/dist/conformance/host/17-export-linked-set/note.mk.md +4 -0
- package/dist/conformance/host/17-export-linked-set/scenario.json +6 -0
- package/dist/conformance/host/18-last-run-and-grants/expected.json +42 -0
- package/dist/conformance/host/18-last-run-and-grants/note.mk.md +5 -0
- package/dist/conformance/host/18-last-run-and-grants/scenario.json +27 -0
- package/dist/conformance/host/README.md +24 -14
- package/dist/conformance.d.ts +1 -1
- package/dist/conformance.js +1 -1
- package/dist/diagnostics/render-diagnostics.d.ts +1 -1
- package/dist/host/adapter.d.ts +28 -6
- package/dist/host/cascade-export-behavior.d.ts +26 -8
- package/dist/host/cascade-export-behavior.js +64 -1
- package/dist/host/conformance-runner.d.ts +11 -1
- package/dist/host/conformance-runner.js +80 -4
- package/dist/host/create-host.d.ts +250 -44
- package/dist/host/create-host.js +222 -96
- package/dist/host/export-behavior.d.ts +2 -0
- package/dist/host/export-behavior.js +10 -4
- package/dist/host/pack-archive.d.ts +7 -6
- package/dist/host/pack-archive.js +11 -7
- package/dist/host/pack-install.js +9 -7
- package/dist/host/pack-remove.d.ts +7 -18
- package/dist/host/pack-remove.js +2 -0
- package/dist/host/pack-trust-behavior.d.ts +13 -36
- package/dist/host/pack-trust-behavior.js +23 -2
- package/dist/host/run-behavior.d.ts +25 -34
- package/dist/host/run-behavior.js +31 -5
- package/dist/host/terminal-packs.d.ts +1 -1
- package/dist/index.d.ts +8 -10
- package/dist/index.js +1 -1
- package/dist/internal.d.ts +10 -5
- package/dist/internal.js +4 -3
- package/dist/node-worker.js +3 -1
- package/dist/node.d.ts +1 -2
- package/dist/node.js +1 -1
- package/dist/run/bundle-run.d.ts +1 -1
- package/dist/run/bundle-run.js +1 -1
- package/dist/run/node-isolate.d.ts +6 -2
- package/dist/run/node-isolate.js +2 -0
- package/dist/run/run-host.d.ts +2 -2
- package/dist/run/worker-entry-browser.d.ts +6 -1
- package/dist/run/worker-entry-browser.js +62 -5
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -25,4 +25,31 @@ Entries:
|
|
|
25
25
|
- `@markii/host/conformance`: the host scenario corpus and its runner, to
|
|
26
26
|
prove an adapter behaves like the reference apps.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
A minimal browser host is one adapter and one call:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { createMarkiiHost } from '@markii/host';
|
|
32
|
+
import {
|
|
33
|
+
createBrowserHostIsolate,
|
|
34
|
+
createFetchNetProvider,
|
|
35
|
+
} from '@markii/host/browser';
|
|
36
|
+
|
|
37
|
+
const host = createMarkiiHost({
|
|
38
|
+
id: 'my-app',
|
|
39
|
+
labels,
|
|
40
|
+
readFile,
|
|
41
|
+
exists,
|
|
42
|
+
writeFile,
|
|
43
|
+
listFolder,
|
|
44
|
+
prompt: (request) => showDialog(request),
|
|
45
|
+
memento,
|
|
46
|
+
diagnostics: (line) => console.info(line),
|
|
47
|
+
now: () => Date.now(),
|
|
48
|
+
isolate: createBrowserHostIsolate({
|
|
49
|
+
netProvider: createFetchNetProvider({ allowedOrigins }),
|
|
50
|
+
}),
|
|
51
|
+
});
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
See `docs/hosts.md` in the repository for the adapter fields, the host
|
|
55
|
+
responsibilities and the reference hosts.
|