@markii/host 0.17.0-next.2 → 0.17.0-next.4
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 +10 -2
- package/dist/browser-worker.classic.js +640 -0
- package/dist/browser-worker.js +40 -40
- package/dist/browser.d.ts +7 -3
- package/dist/browser.js +16 -4
- package/dist/conformance/host/05-export-html-pack-directive/expected.json +2 -0
- package/dist/conformance/host/06-install-pack-then-render/expected.json +6 -1
- package/dist/conformance/host/README.md +4 -2
- package/dist/export/note-export.d.ts +1 -1
- package/dist/host/adapter.d.ts +22 -25
- package/dist/host/conformance-runner.d.ts +1 -1
- package/dist/host/conformance-runner.js +21 -11
- package/dist/host/create-host.d.ts +29 -11
- package/dist/host/create-host.js +34 -23
- package/dist/host/editor-behavior.d.ts +2 -6
- package/dist/host/editor-behavior.js +5 -9
- package/dist/host/export-behavior.d.ts +6 -7
- package/dist/host/export-behavior.js +1 -1
- package/dist/host/labels.d.ts +5 -15
- package/dist/host/labels.js +8 -22
- package/dist/host/pack-archive.d.ts +4 -10
- package/dist/host/pack-archive.js +12 -21
- package/dist/host/pack-install.d.ts +11 -23
- package/dist/host/pack-install.js +26 -23
- package/dist/host/pack-load.d.ts +1 -2
- package/dist/host/pack-trust-behavior.js +1 -1
- package/dist/host/refresh-interval.d.ts +1 -3
- package/dist/host/refresh-interval.js +1 -3
- package/dist/host/run-behavior.d.ts +3 -4
- package/dist/host/run-behavior.js +23 -2
- package/dist/host/script-execution.d.ts +1 -1
- package/dist/html-engine.js +4 -4
- package/dist/index.d.ts +15 -80
- package/dist/index.js +18 -63
- package/dist/internal.d.ts +30 -0
- package/dist/internal.js +31 -0
- package/dist/node-fs.d.ts +0 -3
- package/dist/node-fs.js +1 -21
- package/dist/node-worker.d.ts +8 -0
- package/dist/node-worker.js +20678 -0
- package/dist/node.d.ts +3 -3
- package/dist/node.js +5 -4
- package/dist/packs/discover.d.ts +2 -0
- package/dist/packs/discover.js +2 -1
- package/dist/packs/pack-diagnostics.d.ts +6 -8
- package/dist/packs/pack-diagnostics.js +6 -8
- package/dist/packs/pack-paths.js +1 -2
- package/dist/packs/pack-render-registry.d.ts +9 -10
- package/dist/run/browser-isolate.d.ts +5 -5
- package/dist/run/browser-isolate.js +5 -1
- package/dist/run/isolate.d.ts +3 -1
- package/dist/run/net-bridge.d.ts +5 -5
- package/dist/run/net-bridge.js +7 -5
- package/dist/run/net-pinning.d.ts +2 -0
- package/dist/run/net-pinning.js +17 -3
- package/dist/run/net-provider.d.ts +3 -1
- package/dist/run/net-provider.js +40 -15
- package/dist/run/net-refusal.d.ts +4 -0
- package/dist/run/net-refusal.js +24 -0
- package/dist/run/node-isolate.d.ts +13 -21
- package/dist/run/node-isolate.js +31 -80
- package/dist/run/run-flow.d.ts +1 -2
- package/dist/run/run-host.d.ts +3 -3
- package/dist/run/worker-entry-browser.d.ts +24 -4
- package/dist/run/worker-entry-browser.js +99 -4
- package/dist/run/worker-entry.js +2 -0
- package/package.json +31 -12
package/dist/index.d.ts
CHANGED
|
@@ -1,95 +1,30 @@
|
|
|
1
1
|
export type { ValuesFailure } from './values-failure.js';
|
|
2
|
-
export {
|
|
3
|
-
export type { RunJob, RunResult, RunFailure, RunProgress, SpawnRunOptions, SpawnRunRequest, } from './run/run-host.js';
|
|
4
|
-
export { isRunProgress } from './run/run-progress.js';
|
|
5
|
-
export { spawnRun } from './run/run-host.js';
|
|
2
|
+
export type { RunJob, RunResult, RunFailure, SpawnRunOptions, SpawnRunRequest, } from './run/run-host.js';
|
|
6
3
|
export type { IsolateSpawner, RunIsolate, SpawnIsolateOptions, } from './run/isolate.js';
|
|
7
|
-
export {
|
|
8
|
-
export type {
|
|
9
|
-
export {
|
|
10
|
-
export
|
|
11
|
-
export type { CacheSnapshot, RunOnceOptions, RunOnceResult, } from './run/run-flow.js';
|
|
12
|
-
export { MAX_CACHE_SNAPSHOT_BYTES, MAX_VALUES_SNAPSHOT_BYTES, cacheStorageKeyFor, isCacheSnapshotShape, mergePersistedValues, readPersistedValues, runOnce, serializeCacheSnapshotIfSmallEnough, valuesStorageKeyFor, } from './run/run-flow.js';
|
|
13
|
-
export type { GrantFlowOptions, GrantFlowRequirements, GrantFlowResult, GrantMemento, PromptHost, PromptManyHosts, PromptUnknownHosts, Thenable, } from './run/grant-flow.js';
|
|
14
|
-
export { ALLOW_LABEL, DONT_ALLOW_LABEL, MAX_HOST_PROMPTS, UNKNOWN_HOSTS_PROMPT_MESSAGE, clearGrantForDocument, hostPromptMessage, isSafeHostForPrompt, manyHostsPromptMessage, resolveStoredGrant, runGrantFlow, } from './run/grant-flow.js';
|
|
15
|
-
export type { BuildBundleSnapshotOptions, BundleSnapshotResult, EncodedBundleCache, } from './run/bundle-run.js';
|
|
16
|
-
export { DEFAULT_MAX_BUNDLE_SNAPSHOT_BYTES, DEFAULT_MAX_BUNDLE_SNAPSHOT_FILE_BYTES, MAX_PERSISTED_BUNDLE_CACHE_BYTES, buildBundleSnapshot, bundleModulesFromSnapshot, cacheFilesFrom, decodeBundleCacheFromStorage, encodeBundleCacheForStorage, manifestBundleFsGrants, manifestNetHosts, netDeclarationDiagnostics, withPersistedCache, } from './run/bundle-run.js';
|
|
17
|
-
export { BUNDLE_EXTENSION, DEFAULT_BUNDLE_DOCUMENT_PATH, LEGACY_BUNDLE_EXTENSION, isBundleName, resolveBundleDocumentPath, } from './run/bundle-document.js';
|
|
4
|
+
export type { RunOnceOptions, RunOnceResult } from './run/run-flow.js';
|
|
5
|
+
export type { GrantMemento, PromptHost, PromptManyHosts, PromptUnknownHosts, Thenable, } from './run/grant-flow.js';
|
|
6
|
+
export type { BuildBundleSnapshotOptions, BundleSnapshotResult, } from './run/bundle-run.js';
|
|
7
|
+
export { buildBundleSnapshot } from './run/bundle-run.js';
|
|
18
8
|
export type { RunTrace } from './run/run-trace.js';
|
|
19
|
-
export {
|
|
20
|
-
export type { RunRequirements } from './run/script-requirements.js';
|
|
21
|
-
export { extractRunRequirements } from './run/script-requirements.js';
|
|
22
|
-
export type { SnapshotStorage } from './run/snapshot-storage.js';
|
|
23
|
-
export { createSnapshotStorage } from './run/snapshot-storage.js';
|
|
24
|
-
export { staleValuesForRehydration } from './run/stale-values.js';
|
|
25
|
-
export type { HtmlExportEngine, CascadeIndexEntry, ComposeNoteHtmlExportOptions, ExportBodyRenderer, ExportBodyResult, ExportExtension, ExportPackStylesheet, ExportRenderInfo, NoteExportBuildRequest, NoteExportDocument, NoteHtmlExportOptions, StaticExportReason, } from './export/note-export.js';
|
|
26
|
-
export { EXPORT_HIDE_SCRIPT_BLOCKS_CLASS, EXPORT_PAGE_CSS, FALLBACK_EXPORT_BASE_NAME, MARK_EXTENSION, buildCascadeIndexHtml, buildNoteExport, buildNoteHtmlExport, composeNoteHtmlExport, noteHasScripts, exportBaseName, exportDocumentTitle, exportedFileName, exportedSiblingPath, packStylesheetsCss, } from './export/note-export.js';
|
|
9
|
+
export type { HtmlExportEngine, ExportBodyRenderer, ExportBodyResult, ExportPackStylesheet, ExportRenderInfo, StaticExportReason, } from './export/note-export.js';
|
|
27
10
|
export type { EmbeddedImageReport, ExportImageReader, ExportImageResult, ImageSkipReason, SkippedImage, } from './export/image-embed.js';
|
|
28
|
-
export {
|
|
29
|
-
export type { NoteLink, NoteLinkTargetResolver } from './export/note-links.js';
|
|
30
|
-
export { extractNoteLinks, isLocalNoteTarget, maskCodeRegions, rewriteNoteLinks, } from './export/note-links.js';
|
|
31
|
-
export type { CascadeLinkResolver, CascadeNote, CascadeNoteReader, CascadeTruncation, CascadeWalkOptions, CascadeWalkResult, } from './export/cascade.js';
|
|
32
|
-
export { CASCADE_INDEX_FILE_NAME, DEFAULT_CASCADE_MAX_DEPTH, DEFAULT_CASCADE_MAX_NOTES, assignCascadeFileNames, rewriteCascadeLinks, walkNoteCascade, } from './export/cascade.js';
|
|
33
|
-
export type { CascadeArchiveRequest, CascadeArchiveResult, CascadeExportOutcome, CascadeExportedNote, UnreadableCascadeNote, } from './host/cascade-export-behavior.js';
|
|
34
|
-
export { buildCascadeArchive, cascadeDiagnosticLines, cascadeReasonOf, cascadeResultMessage, countedNoun, } from './host/cascade-export-behavior.js';
|
|
35
|
-
export type { ExportArchiveEntry } from './export/export-zip.js';
|
|
36
|
-
export { zipExportArchive } from './export/export-zip.js';
|
|
37
|
-
export type { HostLookup, PinnedAddress, PinPolicy, PinResult, ResolvedAddress, } from './run/net-pinning.js';
|
|
38
|
-
export { pinHostAddress, pinnedLookup } from './run/net-pinning.js';
|
|
39
|
-
export type { AddressScope } from './run/ip-address.js';
|
|
40
|
-
export { classifyIpAddress, describeScope, isRestrictedScope, } from './run/ip-address.js';
|
|
11
|
+
export type { PinPolicy } from './run/net-pinning.js';
|
|
41
12
|
export type { PackModulesMap } from './run/lua-resolver.js';
|
|
42
|
-
export { createPackModuleResolver } from './run/lua-resolver.js';
|
|
43
13
|
export type { DiscoveredPack, DiscoverPacksResult, EngineUnsupportedPack, PackDirectoryLister, SkippedPackFolder, } from './packs/discover.js';
|
|
44
|
-
export {
|
|
45
|
-
export type { PackScriptsReader } from './packs/pack-scripts.js';
|
|
46
|
-
export { loadPackModules } from './packs/pack-scripts.js';
|
|
47
|
-
export { relativePackEntries, resolvePackPaths } from './packs/pack-paths.js';
|
|
48
|
-
export type { PackDiagnosticsContext, PackDiagnosticsPack, PackDiagnosticsSkippedFolder, } from './packs/pack-diagnostics.js';
|
|
49
|
-
export { formatPackDiagnosticLines, skippedPackCount, } from './packs/pack-diagnostics.js';
|
|
50
|
-
export type { PackPathExists, PrebuiltPackResolution, } from './packs/prebuilt.js';
|
|
51
|
-
export { PREBUILT_SCRIPT_FILENAME, PREBUILT_STYLESHEET_FILENAME, PREBUILT_TERMINAL_SCRIPT_FILENAME, emptyWebviewScript, prebuiltScriptPathFor, prebuiltStylesheetPathFor, prebuiltTerminalScriptPathFor, resolvePrebuiltPack, } from './packs/prebuilt.js';
|
|
14
|
+
export { discoverPacks } from './packs/discover.js';
|
|
52
15
|
export type { BuildRenderRegistryResult, DuplicateComposedName, PackRegistryEngine, QueuedPackRegistration, } from './packs/pack-render-registry.js';
|
|
53
16
|
export { buildRenderRegistry } from './packs/pack-render-registry.js';
|
|
54
|
-
export type { ComponentSkeleton, LineColumn } from '@markii/stdlib/editor';
|
|
55
|
-
export { componentSkeleton, offsetToLineColumn } from '@markii/stdlib/editor';
|
|
56
|
-
export { LAYOUT_WRAPPER_NAMES } from '@markii/stdlib/editor';
|
|
57
|
-
export type { InsertableComponent } from '@markii/stdlib/editor';
|
|
58
|
-
export type { PackComponentAttribute } from '@markii/pack';
|
|
59
17
|
export { buildComponentCatalog } from './insert/component-catalog.js';
|
|
60
|
-
export type { CompletionContext, CompletionContextKind, CompletionItem, CompletionItemKind, ComponentDocumentation, HoverInfo, } from '@markii/stdlib/editor';
|
|
61
|
-
export { completionAt, componentDocumentation, formatComponentDocumentation, hoverAt, } from '@markii/stdlib/editor';
|
|
62
|
-
export type { EnclosingContainerFence, FenceLineEdit, } from '@markii/stdlib/editor';
|
|
63
|
-
export { closesOpenContainerFence, enclosingContainerFences, fenceExtensionEdits, insertedContainerColonCount, } from '@markii/stdlib/editor';
|
|
64
|
-
export { createRenderDiagnosticCollector, createRenderDiagnosticReporter, renderDiagnosticLine, } from './diagnostics/render-diagnostics.js';
|
|
65
18
|
export type { HostAdapter, HostDirEntry, HostEditor, HostExportCapabilities, HostExportFormat, HostIsolate, HostLabels, HostPackSource, HostPromptRequest, HostTextEdit, } from './host/adapter.js';
|
|
66
|
-
export { BROWSER_ISOLATE_ENTRY } from './host/adapter.js';
|
|
67
|
-
export { CLI_LABELS, OBSIDIAN_LABELS, VSCODE_LABELS, packsNotInstalledLabel, } from './host/labels.js';
|
|
68
|
-
export { scheduledRefreshNotStartedLine, scriptsDisabledConfirmationText, scriptsDisabledDiagnosticLine, scriptsDisabledNotice, scriptsDisabledNoticeText, scriptsEnabledConfirmationText, } from './host/script-execution.js';
|
|
69
|
-
export { MIN_REFRESH_INTERVAL_SECONDS, parseRefreshIntervalSeconds, refreshIntervalMsFromSeconds, refreshIntervalValidationMessage, } from './host/refresh-interval.js';
|
|
70
|
-
export { promptsFromAdapter, runViaAdapter, spawnRunViaAdapter, RUN_TIMEOUT_MS as HOST_RUN_TIMEOUT_MS, } from './host/run-behavior.js';
|
|
71
19
|
export type { RunViaAdapterRequest, RunViaAdapterResult, } from './host/run-behavior.js';
|
|
72
|
-
export {
|
|
73
|
-
export type {
|
|
74
|
-
export {
|
|
75
|
-
export type { InstallPackFromArchiveOptions, PackDirectoryExists, } from './host/pack-install.js';
|
|
76
|
-
export { installConsentMessage, installPackDiagnosticLines, installPackFromArchive, installPackMessage, installReplaceConfirmMessage, } from './host/pack-install.js';
|
|
77
|
-
export type { LoadPacksResult, PackDiscoveryIo } from './host/pack-load.js';
|
|
78
|
-
export { discoverConfiguredPacks, loadPacksViaAdapter, packDiscoveryIoFromAdapter, } from './host/pack-load.js';
|
|
79
|
-
export { prebuiltShadowLine } from './packs/pack-diagnostics.js';
|
|
80
|
-
export type { ReadTerminalScriptsResult, TerminalPackScript, } from './host/terminal-packs.js';
|
|
81
|
-
export { packHasTerminalViews, readTerminalPackScripts, terminalScriptMissingLine, terminalScriptNamespaceMismatchLine, terminalScriptRejectedLine, terminalScriptUnreadableLine, } from './host/terminal-packs.js';
|
|
20
|
+
export { installPackMessage } from './host/pack-install.js';
|
|
21
|
+
export type { PackDiscoveryIo } from './host/pack-load.js';
|
|
22
|
+
export type { TerminalPackScript } from './host/terminal-packs.js';
|
|
82
23
|
export type { RemovePackOutcome } from './host/pack-remove.js';
|
|
83
|
-
export type { PackTrustEntry, PackTrustList } from './packs/pack-trust.js';
|
|
84
|
-
export { DEFAULT_PACK_TRUST_LIST, MAX_TRUSTED_PACKS, PACK_TRUST_STORAGE_KEY, isPackTrusted, normalizePackTrustList, trustPack, untrustPack, } from './packs/pack-trust.js';
|
|
85
24
|
export type { DisablePackOutcome, EnabledPack, EnablePackOutcome, InstalledPacksListing, } from './host/pack-trust-behavior.js';
|
|
86
|
-
export { disablePackMessage, enablePackMessage,
|
|
87
|
-
export {
|
|
88
|
-
export {
|
|
89
|
-
export type { ExportHtmlDocumentRequest, NoteFileExportOutcome, } from './host/export-behavior.js';
|
|
90
|
-
export { buildExportDocument, exportDefaultFileName, exportDiagnosticLines, exportNoteFileViaAdapter, exportResultMessage, fileNameOf, formatByteSize, imageEmbedDiagnosticLines, renderEngineDiagnosticLine, } from './host/export-behavior.js';
|
|
91
|
-
export type { CatalogCache, CompletionPlan, InsertComponentEdit, InsertComponentPlan, } from './host/editor-behavior.js';
|
|
92
|
-
export { LAYOUT_ORIGIN_TAG, STANDARD_ORIGIN_TAG, completeAtViaEditor, completionOriginTag, completionPlanAt, createCatalogCache, hoverAtViaEditor, hoverDocumentationText, insertComponentPlan, isContainerCompletionItem, } from './host/editor-behavior.js';
|
|
25
|
+
export { disablePackMessage, enablePackMessage, } from './host/pack-trust-behavior.js';
|
|
26
|
+
export { removePackMessage } from './host/pack-remove.js';
|
|
27
|
+
export { exportResultMessage } from './host/export-behavior.js';
|
|
93
28
|
export { createMarkiiHost } from './host/create-host.js';
|
|
94
29
|
export type { CompleteOutcome, EditorPositionRequest, ExportOutcome, ExportRequest, HoverOutcome, InsertComponentRequest, InstallPackOutcome, InstallPackRequest, LoadPacksOutcome, LoadTerminalPacksOutcome, MarkiiHost, MarkiiHostOptions, OpenOutcome, OpenRequest, RemovePackResult, DisablePackResult, EnablePackResult, InstalledPacksOutcome, RunOutcome, RunRequest, Unsupported, } from './host/create-host.js';
|
|
95
|
-
export {
|
|
30
|
+
export { netRefusal } from './run/net-refusal.js';
|
package/dist/index.js
CHANGED
|
@@ -1,70 +1,25 @@
|
|
|
1
|
-
// @markii/host: the
|
|
2
|
-
//
|
|
1
|
+
// @markii/host: the main entry. It carries what a host author needs to
|
|
2
|
+
// write a host against `createMarkiiHost`: the factory, the adapter and its
|
|
3
|
+
// capability groups, the request and outcome types, the labels type, the
|
|
4
|
+
// outcome wording helpers, bundle snapshots and pack discovery.
|
|
5
|
+
//
|
|
3
6
|
// Environment-neutral: nothing reachable from this entry imports `node:*`,
|
|
4
7
|
// `esbuild-wasm`, `@markii/react` or `@markii/html` at runtime
|
|
5
|
-
// (`
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
// `packages/markii-host` for the module-by-module breakdown.
|
|
8
|
+
// (`src/neutral-entries.probe.test.ts` bundles it for a browser to prove it).
|
|
9
|
+
// What needs Node lives in `./node.ts`; this repository's own apps reach the
|
|
10
|
+
// lower-level helpers through `./internal.ts`, which carries no semver
|
|
11
|
+
// promise. The editor seam is `@markii/stdlib/editor`, imported directly.
|
|
10
12
|
//
|
|
11
13
|
// This is the security-critical layer (tier gating, the grant model,
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
export { isRunProgress } from './run/run-progress.js';
|
|
17
|
-
export { spawnRun } from './run/run-host.js';
|
|
18
|
-
export { createBrowserIsolate } from './run/browser-isolate.js';
|
|
19
|
-
export { isNetBridgeRequest, serveNetRequest } from './run/net-bridge.js';
|
|
20
|
-
export { MAX_CACHE_SNAPSHOT_BYTES, MAX_VALUES_SNAPSHOT_BYTES, cacheStorageKeyFor, isCacheSnapshotShape, mergePersistedValues, readPersistedValues, runOnce, serializeCacheSnapshotIfSmallEnough, valuesStorageKeyFor, } from './run/run-flow.js';
|
|
21
|
-
export { ALLOW_LABEL, DONT_ALLOW_LABEL, MAX_HOST_PROMPTS, UNKNOWN_HOSTS_PROMPT_MESSAGE, clearGrantForDocument, hostPromptMessage, isSafeHostForPrompt, manyHostsPromptMessage, resolveStoredGrant, runGrantFlow, } from './run/grant-flow.js';
|
|
22
|
-
export { DEFAULT_MAX_BUNDLE_SNAPSHOT_BYTES, DEFAULT_MAX_BUNDLE_SNAPSHOT_FILE_BYTES, MAX_PERSISTED_BUNDLE_CACHE_BYTES, buildBundleSnapshot, bundleModulesFromSnapshot, cacheFilesFrom, decodeBundleCacheFromStorage, encodeBundleCacheForStorage, manifestBundleFsGrants, manifestNetHosts, netDeclarationDiagnostics, withPersistedCache, } from './run/bundle-run.js';
|
|
23
|
-
export { BUNDLE_EXTENSION, DEFAULT_BUNDLE_DOCUMENT_PATH, LEGACY_BUNDLE_EXTENSION, isBundleName, resolveBundleDocumentPath, } from './run/bundle-document.js';
|
|
24
|
-
export { isRunTrace, lastRunStorageKeyFor, readLastRunTrace, writeLastRunTrace, } from './run/run-trace.js';
|
|
25
|
-
export { extractRunRequirements } from './run/script-requirements.js';
|
|
26
|
-
export { createSnapshotStorage } from './run/snapshot-storage.js';
|
|
27
|
-
export { staleValuesForRehydration } from './run/stale-values.js';
|
|
28
|
-
export { EXPORT_HIDE_SCRIPT_BLOCKS_CLASS, EXPORT_PAGE_CSS, FALLBACK_EXPORT_BASE_NAME, MARK_EXTENSION, buildCascadeIndexHtml, buildNoteExport, buildNoteHtmlExport, composeNoteHtmlExport, noteHasScripts, exportBaseName, exportDocumentTitle, exportedFileName, exportedSiblingPath, packStylesheetsCss, } from './export/note-export.js';
|
|
29
|
-
export { EMBEDDABLE_IMAGE_EXTENSIONS, EMPTY_IMAGE_REPORT, MAX_EMBEDDED_IMAGE_BYTES, embedImagesInHtml, encodeBase64, isEmbeddableImageSrc, mimeTypeForImageSrc, toImageDataUri, } from './export/image-embed.js';
|
|
30
|
-
export { extractNoteLinks, isLocalNoteTarget, maskCodeRegions, rewriteNoteLinks, } from './export/note-links.js';
|
|
31
|
-
export { CASCADE_INDEX_FILE_NAME, DEFAULT_CASCADE_MAX_DEPTH, DEFAULT_CASCADE_MAX_NOTES, assignCascadeFileNames, rewriteCascadeLinks, walkNoteCascade, } from './export/cascade.js';
|
|
32
|
-
export { buildCascadeArchive, cascadeDiagnosticLines, cascadeReasonOf, cascadeResultMessage, countedNoun, } from './host/cascade-export-behavior.js';
|
|
33
|
-
export { zipExportArchive } from './export/export-zip.js';
|
|
34
|
-
export { pinHostAddress, pinnedLookup } from './run/net-pinning.js';
|
|
35
|
-
export { classifyIpAddress, describeScope, isRestrictedScope, } from './run/ip-address.js';
|
|
36
|
-
export { createPackModuleResolver } from './run/lua-resolver.js';
|
|
37
|
-
export { componentsWithoutEngineView, declaredPackComponents, discoverPacks, installedNamespaces, } from './packs/discover.js';
|
|
38
|
-
export { loadPackModules } from './packs/pack-scripts.js';
|
|
39
|
-
export { relativePackEntries, resolvePackPaths } from './packs/pack-paths.js';
|
|
40
|
-
export { formatPackDiagnosticLines, skippedPackCount, } from './packs/pack-diagnostics.js';
|
|
41
|
-
export { PREBUILT_SCRIPT_FILENAME, PREBUILT_STYLESHEET_FILENAME, PREBUILT_TERMINAL_SCRIPT_FILENAME, emptyWebviewScript, prebuiltScriptPathFor, prebuiltStylesheetPathFor, prebuiltTerminalScriptPathFor, resolvePrebuiltPack, } from './packs/prebuilt.js';
|
|
14
|
+
// address pinning, the terminatable-isolate watchdog): one copy lives here
|
|
15
|
+
// so no app grows a drifting second one.
|
|
16
|
+
export { buildBundleSnapshot } from './run/bundle-run.js';
|
|
17
|
+
export { discoverPacks } from './packs/discover.js';
|
|
42
18
|
export { buildRenderRegistry } from './packs/pack-render-registry.js';
|
|
43
|
-
export { componentSkeleton, offsetToLineColumn } from '@markii/stdlib/editor';
|
|
44
|
-
export { LAYOUT_WRAPPER_NAMES } from '@markii/stdlib/editor';
|
|
45
19
|
export { buildComponentCatalog } from './insert/component-catalog.js';
|
|
46
|
-
export {
|
|
47
|
-
export {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
// surface.
|
|
51
|
-
export { createRenderDiagnosticCollector, createRenderDiagnosticReporter, renderDiagnosticLine, } from './diagnostics/render-diagnostics.js';
|
|
52
|
-
export { BROWSER_ISOLATE_ENTRY } from './host/adapter.js';
|
|
53
|
-
export { CLI_LABELS, OBSIDIAN_LABELS, VSCODE_LABELS, packsNotInstalledLabel, } from './host/labels.js';
|
|
54
|
-
export { scheduledRefreshNotStartedLine, scriptsDisabledConfirmationText, scriptsDisabledDiagnosticLine, scriptsDisabledNotice, scriptsDisabledNoticeText, scriptsEnabledConfirmationText, } from './host/script-execution.js';
|
|
55
|
-
export { MIN_REFRESH_INTERVAL_SECONDS, parseRefreshIntervalSeconds, refreshIntervalMsFromSeconds, refreshIntervalValidationMessage, } from './host/refresh-interval.js';
|
|
56
|
-
export { promptsFromAdapter, runViaAdapter, spawnRunViaAdapter, RUN_TIMEOUT_MS as HOST_RUN_TIMEOUT_MS, } from './host/run-behavior.js';
|
|
57
|
-
export { formatRunFailureLines, runDiagnosticLines, } from './host/run-diagnostics.js';
|
|
58
|
-
export { describeArchiveError, writeArchiveContents, } from './host/pack-archive.js';
|
|
59
|
-
export { installConsentMessage, installPackDiagnosticLines, installPackFromArchive, installPackMessage, installReplaceConfirmMessage, } from './host/pack-install.js';
|
|
60
|
-
export { discoverConfiguredPacks, loadPacksViaAdapter, packDiscoveryIoFromAdapter, } from './host/pack-load.js';
|
|
61
|
-
export { prebuiltShadowLine } from './packs/pack-diagnostics.js';
|
|
62
|
-
export { packHasTerminalViews, readTerminalPackScripts, terminalScriptMissingLine, terminalScriptNamespaceMismatchLine, terminalScriptRejectedLine, terminalScriptUnreadableLine, } from './host/terminal-packs.js';
|
|
63
|
-
export { DEFAULT_PACK_TRUST_LIST, MAX_TRUSTED_PACKS, PACK_TRUST_STORAGE_KEY, isPackTrusted, normalizePackTrustList, trustPack, untrustPack, } from './packs/pack-trust.js';
|
|
64
|
-
export { disablePackMessage, enablePackMessage, notEnabledPackDiagnosticLine, selectEnabledPacks, } from './host/pack-trust-behavior.js';
|
|
65
|
-
export { removePackDiagnosticLine, removePackMessage, removePackViaAdapter, } from './host/pack-remove.js';
|
|
66
|
-
export { mdPlainFromSource } from './host/export/md-plain.js';
|
|
67
|
-
export { buildExportDocument, exportDefaultFileName, exportDiagnosticLines, exportNoteFileViaAdapter, exportResultMessage, fileNameOf, formatByteSize, imageEmbedDiagnosticLines, renderEngineDiagnosticLine, } from './host/export-behavior.js';
|
|
68
|
-
export { LAYOUT_ORIGIN_TAG, STANDARD_ORIGIN_TAG, completeAtViaEditor, completionOriginTag, completionPlanAt, createCatalogCache, hoverAtViaEditor, hoverDocumentationText, insertComponentPlan, isContainerCompletionItem, } from './host/editor-behavior.js';
|
|
20
|
+
export { installPackMessage } from './host/pack-install.js';
|
|
21
|
+
export { disablePackMessage, enablePackMessage, } from './host/pack-trust-behavior.js';
|
|
22
|
+
export { removePackMessage } from './host/pack-remove.js';
|
|
23
|
+
export { exportResultMessage } from './host/export-behavior.js';
|
|
69
24
|
export { createMarkiiHost } from './host/create-host.js';
|
|
70
|
-
export {
|
|
25
|
+
export { netRefusal } from './run/net-refusal.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export { mergeArrivingValue } from './values-merge.js';
|
|
2
|
+
export { isRunProgress } from './run/run-progress.js';
|
|
3
|
+
export { isNetBridgeRequest, serveNetRequest } from './run/net-bridge.js';
|
|
4
|
+
export type { NetBridgeReply } from './run/net-bridge.js';
|
|
5
|
+
export { MAX_VALUES_SNAPSHOT_BYTES, readPersistedValues, runOnce, valuesStorageKeyFor, } from './run/run-flow.js';
|
|
6
|
+
export { ALLOW_LABEL, DONT_ALLOW_LABEL, clearGrantForDocument, } from './run/grant-flow.js';
|
|
7
|
+
export { decodeBundleCacheFromStorage, encodeBundleCacheForStorage, withPersistedCache, } from './run/bundle-run.js';
|
|
8
|
+
export { isBundleName, resolveBundleDocumentPath, } from './run/bundle-document.js';
|
|
9
|
+
export { readLastRunTrace } from './run/run-trace.js';
|
|
10
|
+
export { staleValuesForRehydration } from './run/stale-values.js';
|
|
11
|
+
export { MARK_EXTENSION, buildNoteHtmlExport, composeNoteHtmlExport, noteHasScripts, exportBaseName, exportedSiblingPath, } from './export/note-export.js';
|
|
12
|
+
export { EMPTY_IMAGE_REPORT, MAX_EMBEDDED_IMAGE_BYTES, embedImagesInHtml, } from './export/image-embed.js';
|
|
13
|
+
export type { CascadeLinkResolver, CascadeNoteReader, } from './export/cascade.js';
|
|
14
|
+
export type { CascadeArchiveRequest, CascadeExportOutcome, } from './host/cascade-export-behavior.js';
|
|
15
|
+
export { buildCascadeArchive, cascadeDiagnosticLines, cascadeReasonOf, cascadeResultMessage, } from './host/cascade-export-behavior.js';
|
|
16
|
+
export { componentsWithoutEngineView, declaredPackComponents, installedNamespaces, } from './packs/discover.js';
|
|
17
|
+
export { loadPackModules } from './packs/pack-scripts.js';
|
|
18
|
+
export { relativePackEntries, resolvePackPaths } from './packs/pack-paths.js';
|
|
19
|
+
export { formatPackDiagnosticLines, skippedPackCount, prebuiltShadowLine, } from './packs/pack-diagnostics.js';
|
|
20
|
+
export type { PackPathExists } from './packs/prebuilt.js';
|
|
21
|
+
export { PREBUILT_SCRIPT_FILENAME, PREBUILT_STYLESHEET_FILENAME, PREBUILT_TERMINAL_SCRIPT_FILENAME, emptyWebviewScript, resolvePrebuiltPack, } from './packs/prebuilt.js';
|
|
22
|
+
export { createRenderDiagnosticCollector, createRenderDiagnosticReporter, } from './diagnostics/render-diagnostics.js';
|
|
23
|
+
export { packsNotInstalledLabel } from './host/labels.js';
|
|
24
|
+
export { scheduledRefreshNotStartedLine, scriptsDisabledConfirmationText, scriptsDisabledDiagnosticLine, scriptsDisabledNotice, scriptsDisabledNoticeText, scriptsEnabledConfirmationText, } from './host/script-execution.js';
|
|
25
|
+
export { MIN_REFRESH_INTERVAL_SECONDS, parseRefreshIntervalSeconds, refreshIntervalMsFromSeconds, refreshIntervalValidationMessage, } from './host/refresh-interval.js';
|
|
26
|
+
export { discoverConfiguredPacks } from './host/pack-load.js';
|
|
27
|
+
export { packHasTerminalViews, terminalScriptNamespaceMismatchLine, terminalScriptRejectedLine, } from './host/terminal-packs.js';
|
|
28
|
+
export { mdPlainFromSource } from './host/export/md-plain.js';
|
|
29
|
+
export { exportDefaultFileName, fileNameOf } from './host/export-behavior.js';
|
|
30
|
+
export { completionOriginTag, isContainerCompletionItem, } from './host/editor-behavior.js';
|
package/dist/internal.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// @markii/host/internal: the lower-level helpers this repository's own apps
|
|
2
|
+
// and `@markii/pack-build` build on. It carries NO semver promise: a name
|
|
3
|
+
// here can change or disappear in any release. An outside host should use
|
|
4
|
+
// the main entry. Environment-neutral like the main entry
|
|
5
|
+
// (`src/neutral-entries.probe.test.ts` bundles it for a browser).
|
|
6
|
+
export { mergeArrivingValue } from './values-merge.js';
|
|
7
|
+
export { isRunProgress } from './run/run-progress.js';
|
|
8
|
+
export { isNetBridgeRequest, serveNetRequest } from './run/net-bridge.js';
|
|
9
|
+
export { MAX_VALUES_SNAPSHOT_BYTES, readPersistedValues, runOnce, valuesStorageKeyFor, } from './run/run-flow.js';
|
|
10
|
+
export { ALLOW_LABEL, DONT_ALLOW_LABEL, clearGrantForDocument, } from './run/grant-flow.js';
|
|
11
|
+
export { decodeBundleCacheFromStorage, encodeBundleCacheForStorage, withPersistedCache, } from './run/bundle-run.js';
|
|
12
|
+
export { isBundleName, resolveBundleDocumentPath, } from './run/bundle-document.js';
|
|
13
|
+
export { readLastRunTrace } from './run/run-trace.js';
|
|
14
|
+
export { staleValuesForRehydration } from './run/stale-values.js';
|
|
15
|
+
export { MARK_EXTENSION, buildNoteHtmlExport, composeNoteHtmlExport, noteHasScripts, exportBaseName, exportedSiblingPath, } from './export/note-export.js';
|
|
16
|
+
export { EMPTY_IMAGE_REPORT, MAX_EMBEDDED_IMAGE_BYTES, embedImagesInHtml, } from './export/image-embed.js';
|
|
17
|
+
export { buildCascadeArchive, cascadeDiagnosticLines, cascadeReasonOf, cascadeResultMessage, } from './host/cascade-export-behavior.js';
|
|
18
|
+
export { componentsWithoutEngineView, declaredPackComponents, installedNamespaces, } from './packs/discover.js';
|
|
19
|
+
export { loadPackModules } from './packs/pack-scripts.js';
|
|
20
|
+
export { relativePackEntries, resolvePackPaths } from './packs/pack-paths.js';
|
|
21
|
+
export { formatPackDiagnosticLines, skippedPackCount, prebuiltShadowLine, } from './packs/pack-diagnostics.js';
|
|
22
|
+
export { PREBUILT_SCRIPT_FILENAME, PREBUILT_STYLESHEET_FILENAME, PREBUILT_TERMINAL_SCRIPT_FILENAME, emptyWebviewScript, resolvePrebuiltPack, } from './packs/prebuilt.js';
|
|
23
|
+
export { createRenderDiagnosticCollector, createRenderDiagnosticReporter, } from './diagnostics/render-diagnostics.js';
|
|
24
|
+
export { packsNotInstalledLabel } from './host/labels.js';
|
|
25
|
+
export { scheduledRefreshNotStartedLine, scriptsDisabledConfirmationText, scriptsDisabledDiagnosticLine, scriptsDisabledNotice, scriptsDisabledNoticeText, scriptsEnabledConfirmationText, } from './host/script-execution.js';
|
|
26
|
+
export { MIN_REFRESH_INTERVAL_SECONDS, parseRefreshIntervalSeconds, refreshIntervalMsFromSeconds, refreshIntervalValidationMessage, } from './host/refresh-interval.js';
|
|
27
|
+
export { discoverConfiguredPacks } from './host/pack-load.js';
|
|
28
|
+
export { packHasTerminalViews, terminalScriptNamespaceMismatchLine, terminalScriptRejectedLine, } from './host/terminal-packs.js';
|
|
29
|
+
export { mdPlainFromSource } from './host/export/md-plain.js';
|
|
30
|
+
export { exportDefaultFileName, fileNameOf } from './host/export-behavior.js';
|
|
31
|
+
export { completionOriginTag, isContainerCompletionItem, } from './host/editor-behavior.js';
|
package/dist/node-fs.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ArchiveExtractFs } from './host/pack-archive.js';
|
|
2
1
|
import type { PackDiscoveryIo } from './host/pack-load.js';
|
|
3
2
|
import type { PackDirectoryLister, PackFileReader } from './packs/discover.js';
|
|
4
3
|
import type { PackScriptsReader } from './packs/pack-scripts.js';
|
|
@@ -8,7 +7,5 @@ export declare function createNodeDirectoryLister(): PackDirectoryLister;
|
|
|
8
7
|
export declare function createNodeFileReader(): PackFileReader;
|
|
9
8
|
/** The real, Node-backed `PackScriptsReader`. */
|
|
10
9
|
export declare function createNodeReader(): PackScriptsReader;
|
|
11
|
-
/** The real, Node-backed `ArchiveExtractFs`. */
|
|
12
|
-
export declare function createNodeArchiveExtractFs(): ArchiveExtractFs;
|
|
13
10
|
/** Pack discovery's reads over the real file system. */
|
|
14
11
|
export declare function createNodePackDiscoveryIo(): PackDiscoveryIo;
|
package/dist/node-fs.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* extraction filesystem. Reached only through `@markii/host/node`; nothing
|
|
6
6
|
* in the main entry imports this module.
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { readFile, readdir } from 'node:fs/promises';
|
|
9
9
|
/** The real, Node-backed `PackDirectoryLister`. Never rejects: an unreadable, missing or non-directory path resolves `[]`. */
|
|
10
10
|
export function createNodeDirectoryLister() {
|
|
11
11
|
return async (absoluteDir) => {
|
|
@@ -41,26 +41,6 @@ export function createNodeReader() {
|
|
|
41
41
|
readFile: (absolutePath) => readText(absolutePath),
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
/** The real, Node-backed `ArchiveExtractFs`. */
|
|
45
|
-
export function createNodeArchiveExtractFs() {
|
|
46
|
-
return {
|
|
47
|
-
removeDirectory: async (absolutePath) => {
|
|
48
|
-
try {
|
|
49
|
-
await rm(absolutePath, { recursive: true, force: true });
|
|
50
|
-
}
|
|
51
|
-
catch {
|
|
52
|
-
// Quiet: the write that follows fails loudly on its own if the
|
|
53
|
-
// path is genuinely unusable.
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
makeDirectory: async (absolutePath) => {
|
|
57
|
-
await mkdir(absolutePath, { recursive: true });
|
|
58
|
-
},
|
|
59
|
-
writeFile: async (absolutePath, bytes) => {
|
|
60
|
-
await writeFile(absolutePath, bytes);
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
44
|
/** Pack discovery's reads over the real file system. */
|
|
65
45
|
export function createNodePackDiscoveryIo() {
|
|
66
46
|
return {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `@markii/host/node-worker` entry: the worker_threads isolate a Node
|
|
3
|
+
* host spawns by file path. Bundling this file produces the one
|
|
4
|
+
* self-contained worker (`dist/node-worker.js` for the package, a host's
|
|
5
|
+
* own `dist/run/worker.js` for an app that embeds it). It has no exports:
|
|
6
|
+
* loading it starts the worker's message loop.
|
|
7
|
+
*/
|
|
8
|
+
import './run/worker-entry.js';
|