@nextclaw/app-runtime 0.9.13 → 0.9.14
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 +2 -2
- package/dist/{main.js → app/main.js} +2 -2
- package/dist/app/main.js.map +1 -0
- package/dist/{commands → controllers}/create.controller.d.ts +2 -2
- package/dist/controllers/create.controller.d.ts.map +1 -0
- package/dist/{commands → controllers}/create.controller.js +2 -2
- package/dist/controllers/create.controller.js.map +1 -0
- package/dist/{commands → controllers}/dev.controller.js +1 -1
- package/dist/controllers/dev.controller.js.map +1 -0
- package/dist/{commands → controllers}/grant.controller.d.ts +3 -3
- package/dist/controllers/grant.controller.d.ts.map +1 -0
- package/dist/{commands → controllers}/grant.controller.js +2 -2
- package/dist/controllers/grant.controller.js.map +1 -0
- package/dist/{commands → controllers}/info.controller.d.ts +2 -2
- package/dist/controllers/info.controller.d.ts.map +1 -0
- package/dist/{commands → controllers}/info.controller.js +2 -2
- package/dist/controllers/info.controller.js.map +1 -0
- package/dist/{commands → controllers}/inspect.controller.js +8 -2
- package/dist/controllers/inspect.controller.js.map +1 -0
- package/dist/{commands → controllers}/install.controller.d.ts +2 -2
- package/dist/controllers/install.controller.d.ts.map +1 -0
- package/dist/{commands → controllers}/install.controller.js +2 -2
- package/dist/controllers/install.controller.js.map +1 -0
- package/dist/{commands → controllers}/list.controller.d.ts +2 -2
- package/dist/controllers/list.controller.d.ts.map +1 -0
- package/dist/{commands → controllers}/list.controller.js +2 -2
- package/dist/controllers/list.controller.js.map +1 -0
- package/dist/controllers/pack.controller.d.ts +19 -0
- package/dist/controllers/pack.controller.d.ts.map +1 -0
- package/dist/{commands → controllers}/pack.controller.js +8 -4
- package/dist/controllers/pack.controller.js.map +1 -0
- package/dist/{commands → controllers}/permissions.controller.d.ts +2 -2
- package/dist/controllers/permissions.controller.d.ts.map +1 -0
- package/dist/{commands → controllers}/permissions.controller.js +2 -2
- package/dist/controllers/permissions.controller.js.map +1 -0
- package/dist/{commands → controllers}/publish.controller.d.ts +3 -3
- package/dist/controllers/publish.controller.d.ts.map +1 -0
- package/dist/{commands → controllers}/publish.controller.js +2 -2
- package/dist/controllers/publish.controller.js.map +1 -0
- package/dist/{commands → controllers}/registry.controller.d.ts +2 -2
- package/dist/controllers/registry.controller.d.ts.map +1 -0
- package/dist/{commands → controllers}/registry.controller.js +2 -2
- package/dist/controllers/registry.controller.js.map +1 -0
- package/dist/{commands → controllers}/revoke.controller.d.ts +2 -2
- package/dist/controllers/revoke.controller.d.ts.map +1 -0
- package/dist/{commands → controllers}/revoke.controller.js +2 -2
- package/dist/controllers/revoke.controller.js.map +1 -0
- package/dist/{commands → controllers}/run.controller.js +8 -6
- package/dist/controllers/run.controller.js.map +1 -0
- package/dist/{commands → controllers}/uninstall.controller.d.ts +2 -2
- package/dist/controllers/uninstall.controller.d.ts.map +1 -0
- package/dist/{commands → controllers}/uninstall.controller.js +2 -2
- package/dist/controllers/uninstall.controller.js.map +1 -0
- package/dist/{commands → controllers}/update.controller.d.ts +2 -2
- package/dist/controllers/update.controller.d.ts.map +1 -0
- package/dist/{commands → controllers}/update.controller.js +2 -2
- package/dist/controllers/update.controller.js.map +1 -0
- package/dist/{commands → controllers}/validate-publish.controller.d.ts +3 -3
- package/dist/controllers/validate-publish.controller.d.ts.map +1 -0
- package/dist/{commands → controllers}/validate-publish.controller.js +9 -5
- package/dist/controllers/validate-publish.controller.js.map +1 -0
- package/dist/index.d.ts +51 -51
- package/dist/index.js +46 -45
- package/dist/package.js +1 -1
- package/dist/{runtime → services}/app-build.service.d.ts +2 -2
- package/dist/services/app-build.service.d.ts.map +1 -0
- package/dist/{runtime → services}/app-build.service.js +4 -2
- package/dist/services/app-build.service.js.map +1 -0
- package/dist/{bundle → services}/app-bundle.service.d.ts +18 -6
- package/dist/services/app-bundle.service.d.ts.map +1 -0
- package/dist/services/app-bundle.service.js +305 -0
- package/dist/services/app-bundle.service.js.map +1 -0
- package/dist/{permissions → services}/app-grant.service.d.ts +4 -4
- package/dist/services/app-grant.service.d.ts.map +1 -0
- package/dist/{permissions → services}/app-grant.service.js +7 -4
- package/dist/services/app-grant.service.js.map +1 -0
- package/dist/{paths → services}/app-home.service.d.ts +1 -1
- package/dist/services/app-home.service.d.ts.map +1 -0
- package/dist/{paths → services}/app-home.service.js +1 -1
- package/dist/services/app-home.service.js.map +1 -0
- package/dist/{host → services}/app-host.service.d.ts +2 -2
- package/dist/services/app-host.service.d.ts.map +1 -0
- package/dist/{host → services}/app-host.service.js +3 -3
- package/dist/services/app-host.service.js.map +1 -0
- package/dist/services/app-install-source.service.js +72 -0
- package/dist/services/app-install-source.service.js.map +1 -0
- package/dist/{install → services}/app-installation.service.d.ts +15 -14
- package/dist/services/app-installation.service.d.ts.map +1 -0
- package/dist/services/app-installation.service.js +332 -0
- package/dist/services/app-installation.service.js.map +1 -0
- package/dist/services/app-instance.service.d.ts +34 -0
- package/dist/services/app-instance.service.d.ts.map +1 -0
- package/dist/{host → services}/app-instance.service.js +4 -4
- package/dist/services/app-instance.service.js.map +1 -0
- package/dist/{manifest → services}/app-manifest.service.d.ts +12 -2
- package/dist/services/app-manifest.service.d.ts.map +1 -0
- package/dist/services/app-manifest.service.js +271 -0
- package/dist/services/app-manifest.service.js.map +1 -0
- package/dist/{publish → services}/app-marketplace-client.service.d.ts +2 -2
- package/dist/services/app-marketplace-client.service.d.ts.map +1 -0
- package/dist/{publish → services}/app-marketplace-client.service.js +2 -2
- package/dist/services/app-marketplace-client.service.js.map +1 -0
- package/dist/{publish → services}/app-marketplace-metadata.service.d.ts +3 -3
- package/dist/services/app-marketplace-metadata.service.d.ts.map +1 -0
- package/dist/{publish → services}/app-marketplace-metadata.service.js +1 -1
- package/dist/services/app-marketplace-metadata.service.js.map +1 -0
- package/dist/{permissions → services}/app-permissions.service.d.ts +3 -3
- package/dist/services/app-permissions.service.d.ts.map +1 -0
- package/dist/{permissions → services}/app-permissions.service.js +4 -1
- package/dist/services/app-permissions.service.js.map +1 -0
- package/dist/{publish → services}/app-publish-validation.service.d.ts +9 -7
- package/dist/services/app-publish-validation.service.d.ts.map +1 -0
- package/dist/{publish → services}/app-publish-validation.service.js +14 -10
- package/dist/services/app-publish-validation.service.js.map +1 -0
- package/dist/{publish → services}/app-publish.service.d.ts +5 -5
- package/dist/services/app-publish.service.d.ts.map +1 -0
- package/dist/{publish → services}/app-publish.service.js +6 -6
- package/dist/services/app-publish.service.js.map +1 -0
- package/dist/{registry → services}/app-registry-config.service.d.ts +3 -3
- package/dist/{registry → services}/app-registry-config.service.d.ts.map +1 -1
- package/dist/{registry → services}/app-registry-config.service.js +3 -3
- package/dist/services/app-registry-config.service.js.map +1 -0
- package/dist/{registry → services}/app-registry.service.d.ts +18 -5
- package/dist/services/app-registry.service.d.ts.map +1 -0
- package/dist/services/app-registry.service.js +210 -0
- package/dist/services/app-registry.service.js.map +1 -0
- package/dist/{registry → services}/app-remote-registry-client.service.d.ts +6 -2
- package/dist/services/app-remote-registry-client.service.d.ts.map +1 -0
- package/dist/{registry → services}/app-remote-registry-client.service.js +54 -8
- package/dist/services/app-remote-registry-client.service.js.map +1 -0
- package/dist/{cli → services}/app-runtime-cli.service.d.ts +1 -1
- package/dist/services/app-runtime-cli.service.d.ts.map +1 -0
- package/dist/{cli → services}/app-runtime-cli.service.js +19 -19
- package/dist/services/app-runtime-cli.service.js.map +1 -0
- package/dist/{cli → services}/app-runtime-options.service.d.ts +6 -6
- package/dist/services/app-runtime-options.service.d.ts.map +1 -0
- package/dist/{cli → services}/app-runtime-options.service.js +3 -9
- package/dist/services/app-runtime-options.service.js.map +1 -0
- package/dist/{runtime → services}/app-runtime-toolchain.service.d.ts +1 -1
- package/dist/services/app-runtime-toolchain.service.d.ts.map +1 -0
- package/dist/{runtime → services}/app-runtime-toolchain.service.js +1 -1
- package/dist/services/app-runtime-toolchain.service.js.map +1 -0
- package/dist/{scaffold → services}/app-scaffold.service.d.ts +1 -1
- package/dist/{scaffold → services}/app-scaffold.service.d.ts.map +1 -1
- package/dist/{scaffold → services}/app-scaffold.service.js +1 -1
- package/dist/{scaffold → services}/app-scaffold.service.js.map +1 -1
- package/dist/{scaffold → services}/app-ts-http-lite-scaffold-template.service.d.ts +1 -1
- package/dist/{scaffold → services}/app-ts-http-lite-scaffold-template.service.d.ts.map +1 -1
- package/dist/{scaffold → services}/app-ts-http-lite-scaffold-template.service.js +1 -1
- package/dist/{scaffold → services}/app-ts-http-lite-scaffold-template.service.js.map +1 -1
- package/dist/{scaffold → services}/app-ts-http-scaffold-template.service.d.ts +1 -1
- package/dist/{scaffold → services}/app-ts-http-scaffold-template.service.d.ts.map +1 -1
- package/dist/{scaffold → services}/app-ts-http-scaffold-template.service.js +1 -1
- package/dist/{scaffold → services}/app-ts-http-scaffold-template.service.js.map +1 -1
- package/dist/{bridge → services}/host-bridge.service.d.ts +2 -2
- package/dist/services/host-bridge.service.d.ts.map +1 -0
- package/dist/{bridge → services}/host-bridge.service.js +1 -1
- package/dist/services/host-bridge.service.js.map +1 -0
- package/dist/services/main-runner.service.d.ts +9 -0
- package/dist/services/main-runner.service.d.ts.map +1 -0
- package/dist/services/main-runner.service.js +6 -0
- package/dist/services/main-runner.service.js.map +1 -0
- package/dist/{publish → services}/platform-auth-state.service.d.ts +1 -1
- package/dist/services/platform-auth-state.service.d.ts.map +1 -0
- package/dist/{publish → services}/platform-auth-state.service.js +1 -1
- package/dist/services/platform-auth-state.service.js.map +1 -0
- package/dist/{ui → services}/ui-server.service.d.ts +3 -3
- package/dist/services/ui-server.service.d.ts.map +1 -0
- package/dist/{ui → services}/ui-server.service.js +1 -1
- package/dist/services/ui-server.service.js.map +1 -0
- package/dist/{runtime → services}/wasm-main-runner.service.d.ts +3 -3
- package/dist/services/wasm-main-runner.service.d.ts.map +1 -0
- package/dist/{runtime → services}/wasm-main-runner.service.js +2 -2
- package/dist/services/wasm-main-runner.service.js.map +1 -0
- package/dist/{sidecar → services}/wasm-sidecar-client.service.d.ts +1 -1
- package/dist/services/wasm-sidecar-client.service.d.ts.map +1 -0
- package/dist/{sidecar → services}/wasm-sidecar-client.service.js +1 -1
- package/dist/services/wasm-sidecar-client.service.js.map +1 -0
- package/dist/{runtime → services}/wasmtime-wasi-http-component.service.d.ts +1 -1
- package/dist/services/wasmtime-wasi-http-component.service.d.ts.map +1 -0
- package/dist/{runtime → services}/wasmtime-wasi-http-component.service.js +1 -1
- package/dist/services/wasmtime-wasi-http-component.service.js.map +1 -0
- package/dist/{bundle → types}/app-bundle.types.d.ts +1 -1
- package/dist/types/app-bundle.types.d.ts.map +1 -0
- package/dist/{install → types}/app-installation.types.d.ts +27 -7
- package/dist/types/app-installation.types.d.ts.map +1 -0
- package/dist/types/app-manifest.types.d.ts +119 -0
- package/dist/types/app-manifest.types.d.ts.map +1 -0
- package/dist/types/app-manifest.types.js +11 -0
- package/dist/types/app-manifest.types.js.map +1 -0
- package/dist/{permissions → types}/app-permissions.types.d.ts +2 -2
- package/dist/types/app-permissions.types.d.ts.map +1 -0
- package/dist/{publish → types}/app-publish.types.d.ts +4 -4
- package/dist/types/app-publish.types.d.ts.map +1 -0
- package/dist/{publish → types}/app-publish.types.js +1 -1
- package/dist/types/app-publish.types.js.map +1 -0
- package/dist/{registry → types}/app-registry.types.d.ts +8 -4
- package/dist/types/app-registry.types.d.ts.map +1 -0
- package/dist/{registry → types}/app-remote-registry.types.d.ts +3 -3
- package/dist/types/app-remote-registry.types.d.ts.map +1 -0
- package/dist/{registry → types}/app-remote-registry.types.js +1 -1
- package/dist/types/app-remote-registry.types.js.map +1 -0
- package/dist/{runtime → types}/main-runner.types.d.ts +3 -3
- package/dist/types/main-runner.types.d.ts.map +1 -0
- package/package.json +10 -3
- package/dist/bridge/host-bridge.service.d.ts.map +0 -1
- package/dist/bridge/host-bridge.service.js.map +0 -1
- package/dist/bundle/app-bundle.service.d.ts.map +0 -1
- package/dist/bundle/app-bundle.service.js +0 -196
- package/dist/bundle/app-bundle.service.js.map +0 -1
- package/dist/bundle/app-bundle.types.d.ts.map +0 -1
- package/dist/cli/app-runtime-cli.service.d.ts.map +0 -1
- package/dist/cli/app-runtime-cli.service.js.map +0 -1
- package/dist/cli/app-runtime-options.service.d.ts.map +0 -1
- package/dist/cli/app-runtime-options.service.js.map +0 -1
- package/dist/commands/create.controller.d.ts.map +0 -1
- package/dist/commands/create.controller.js.map +0 -1
- package/dist/commands/dev.controller.js.map +0 -1
- package/dist/commands/grant.controller.d.ts.map +0 -1
- package/dist/commands/grant.controller.js.map +0 -1
- package/dist/commands/info.controller.d.ts.map +0 -1
- package/dist/commands/info.controller.js.map +0 -1
- package/dist/commands/inspect.controller.js.map +0 -1
- package/dist/commands/install.controller.d.ts.map +0 -1
- package/dist/commands/install.controller.js.map +0 -1
- package/dist/commands/list.controller.d.ts.map +0 -1
- package/dist/commands/list.controller.js.map +0 -1
- package/dist/commands/pack.controller.d.ts +0 -17
- package/dist/commands/pack.controller.d.ts.map +0 -1
- package/dist/commands/pack.controller.js.map +0 -1
- package/dist/commands/permissions.controller.d.ts.map +0 -1
- package/dist/commands/permissions.controller.js.map +0 -1
- package/dist/commands/publish.controller.d.ts.map +0 -1
- package/dist/commands/publish.controller.js.map +0 -1
- package/dist/commands/registry.controller.d.ts.map +0 -1
- package/dist/commands/registry.controller.js.map +0 -1
- package/dist/commands/revoke.controller.d.ts.map +0 -1
- package/dist/commands/revoke.controller.js.map +0 -1
- package/dist/commands/run.controller.js.map +0 -1
- package/dist/commands/uninstall.controller.d.ts.map +0 -1
- package/dist/commands/uninstall.controller.js.map +0 -1
- package/dist/commands/update.controller.d.ts.map +0 -1
- package/dist/commands/update.controller.js.map +0 -1
- package/dist/commands/validate-publish.controller.d.ts.map +0 -1
- package/dist/commands/validate-publish.controller.js.map +0 -1
- package/dist/host/app-host.service.d.ts.map +0 -1
- package/dist/host/app-host.service.js.map +0 -1
- package/dist/host/app-instance.service.d.ts +0 -34
- package/dist/host/app-instance.service.d.ts.map +0 -1
- package/dist/host/app-instance.service.js.map +0 -1
- package/dist/install/app-installation.service.d.ts.map +0 -1
- package/dist/install/app-installation.service.js +0 -276
- package/dist/install/app-installation.service.js.map +0 -1
- package/dist/install/app-installation.types.d.ts.map +0 -1
- package/dist/main.js.map +0 -1
- package/dist/manifest/app-manifest.service.d.ts.map +0 -1
- package/dist/manifest/app-manifest.service.js +0 -147
- package/dist/manifest/app-manifest.service.js.map +0 -1
- package/dist/manifest/app-manifest.types.d.ts +0 -68
- package/dist/manifest/app-manifest.types.d.ts.map +0 -1
- package/dist/paths/app-home.service.d.ts.map +0 -1
- package/dist/paths/app-home.service.js.map +0 -1
- package/dist/permissions/app-grant.service.d.ts.map +0 -1
- package/dist/permissions/app-grant.service.js.map +0 -1
- package/dist/permissions/app-permissions.service.d.ts.map +0 -1
- package/dist/permissions/app-permissions.service.js.map +0 -1
- package/dist/permissions/app-permissions.types.d.ts.map +0 -1
- package/dist/publish/app-marketplace-client.service.d.ts.map +0 -1
- package/dist/publish/app-marketplace-client.service.js.map +0 -1
- package/dist/publish/app-marketplace-metadata.service.d.ts.map +0 -1
- package/dist/publish/app-marketplace-metadata.service.js.map +0 -1
- package/dist/publish/app-publish-validation.service.d.ts.map +0 -1
- package/dist/publish/app-publish-validation.service.js.map +0 -1
- package/dist/publish/app-publish.service.d.ts.map +0 -1
- package/dist/publish/app-publish.service.js.map +0 -1
- package/dist/publish/app-publish.types.d.ts.map +0 -1
- package/dist/publish/app-publish.types.js.map +0 -1
- package/dist/publish/platform-auth-state.service.d.ts.map +0 -1
- package/dist/publish/platform-auth-state.service.js.map +0 -1
- package/dist/registry/app-registry-config.service.js.map +0 -1
- package/dist/registry/app-registry.service.d.ts.map +0 -1
- package/dist/registry/app-registry.service.js +0 -118
- package/dist/registry/app-registry.service.js.map +0 -1
- package/dist/registry/app-registry.types.d.ts.map +0 -1
- package/dist/registry/app-remote-registry-client.service.d.ts.map +0 -1
- package/dist/registry/app-remote-registry-client.service.js.map +0 -1
- package/dist/registry/app-remote-registry.types.d.ts.map +0 -1
- package/dist/registry/app-remote-registry.types.js.map +0 -1
- package/dist/runtime/app-build.service.d.ts.map +0 -1
- package/dist/runtime/app-build.service.js.map +0 -1
- package/dist/runtime/app-runtime-toolchain.service.d.ts.map +0 -1
- package/dist/runtime/app-runtime-toolchain.service.js.map +0 -1
- package/dist/runtime/main-runner.service.d.ts +0 -9
- package/dist/runtime/main-runner.service.d.ts.map +0 -1
- package/dist/runtime/main-runner.service.js +0 -6
- package/dist/runtime/main-runner.service.js.map +0 -1
- package/dist/runtime/main-runner.types.d.ts.map +0 -1
- package/dist/runtime/wasm-main-runner.service.d.ts.map +0 -1
- package/dist/runtime/wasm-main-runner.service.js.map +0 -1
- package/dist/runtime/wasmtime-wasi-http-component.service.d.ts.map +0 -1
- package/dist/runtime/wasmtime-wasi-http-component.service.js.map +0 -1
- package/dist/sidecar/wasm-sidecar-client.service.d.ts.map +0 -1
- package/dist/sidecar/wasm-sidecar-client.service.js.map +0 -1
- package/dist/ui/ui-server.service.d.ts.map +0 -1
- package/dist/ui/ui-server.service.js.map +0 -1
- /package/dist/{main.d.ts → app/main.d.ts} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { AppCoreWasmMainManifest, AppDocumentAccessMode, AppDocumentAccessScope, AppMainManifest, AppManifest, AppManifestBundle, AppManifestSummary, AppPermissions, AppUiManifest, AppWasiHttpComponentMainManifest } from "./
|
|
2
|
-
import { AppManifestService } from "./
|
|
3
|
-
import { AppBundleChecksums, AppBundleExtractResult, AppBundleMetadata, AppBundlePackResult, AppDistributionMode } from "./
|
|
4
|
-
import { AppBundleService } from "./
|
|
5
|
-
import { AppDocumentGrantMap, AppDocumentGrantMutationResult, AppDocumentGrantState, AppInstalledPermissionState, AppPermissionSummary, ResolvedDocumentGrant, ResolvedPermissions } from "./
|
|
6
|
-
import { AppPermissionsService } from "./
|
|
7
|
-
import { MainRunRequest, MainRunResult, WasmDocumentSummaryInput } from "./
|
|
8
|
-
import { MainRunnerService } from "./
|
|
9
|
-
import { WasmSidecarClientService } from "./
|
|
10
|
-
import { WasmMainRunnerService } from "./
|
|
11
|
-
import { AppInstanceService, AppRunResult } from "./
|
|
12
|
-
import { HostBridgeServer } from "./
|
|
13
|
-
import { AppScaffoldFile, AppTsHttpScaffoldTemplateService } from "./
|
|
14
|
-
import { AppTsHttpLiteScaffoldTemplateService } from "./
|
|
15
|
-
import { AppScaffoldResult, AppScaffoldService, AppScaffoldTemplate } from "./
|
|
16
|
-
import { AppRuntimeOptionsService, BuildCliOptions, CreateCliOptions, GrantCliOptions, InstallCliOptions, JsonOnlyCliOptions, PackCliOptions, PublishCliOptions, RevokeCliOptions, RuntimeCliOptions, UninstallCliOptions, UpdateCliOptions } from "./
|
|
17
|
-
import { AppRuntimeCliService } from "./
|
|
18
|
-
import { CreateCommand } from "./
|
|
19
|
-
import { AppHomeService } from "./
|
|
20
|
-
import { AppPublisher, AppRegistryConfig, AppRegistryConfigSnapshot, AppRemoteRegistryDocument, AppRemoteRegistryResolution, AppRemoteRegistryVersion, DEFAULT_APP_REGISTRY_URL } from "./
|
|
21
|
-
import { AppInstallSourceKind, AppRegistry, AppRegistryAppRecord, AppRegistryInstalledVersion } from "./
|
|
22
|
-
import { AppRegistryService } from "./
|
|
23
|
-
import { AppGrantService } from "./
|
|
24
|
-
import { GrantCommand } from "./
|
|
25
|
-
import { AppRuntimeCommandResult, AppRuntimeDoctorResult, AppRuntimeToolStatus, AppRuntimeToolchainService } from "./
|
|
26
|
-
import { AppBuildResult, AppBuildService } from "./
|
|
27
|
-
import { AppRegistryConfigService } from "./
|
|
28
|
-
import { AppRemoteRegistryClientService } from "./
|
|
29
|
-
import { AppInfoResult, AppInstallResult, AppLaunchResolution, AppUninstallResult, AppUpdateResult, InstalledAppListItem } from "./
|
|
30
|
-
import { AppInstallationService } from "./
|
|
31
|
-
import { InfoCommand } from "./
|
|
32
|
-
import { InstallCommand } from "./
|
|
33
|
-
import { ListCommand } from "./
|
|
34
|
-
import { PackCommand } from "./
|
|
35
|
-
import { PermissionsCommand } from "./
|
|
36
|
-
import { AppMarketplaceMetadata, AppPublishFile, AppPublishPayload, AppPublishResult, DEFAULT_APP_MARKETPLACE_API_BASE } from "./
|
|
37
|
-
import { AppMarketplaceClientService } from "./
|
|
38
|
-
import { AppMarketplaceMetadataService } from "./
|
|
39
|
-
import { PlatformAuthStateService, PlatformPublishAuthState } from "./
|
|
40
|
-
import { AppPublishService } from "./
|
|
41
|
-
import { PublishCommand } from "./
|
|
42
|
-
import { RegistryCommand } from "./
|
|
43
|
-
import { RevokeCommand } from "./
|
|
44
|
-
import { UpdateCommand } from "./
|
|
45
|
-
import { UninstallCommand } from "./
|
|
46
|
-
import { AppPublishValidationResult, AppPublishValidationService, AppPublishValidationWarning, AppPublishValidationWarningCode } from "./
|
|
47
|
-
import { ValidatePublishCommand } from "./
|
|
48
|
-
import { WasmtimeWasiHttpComponentHandle, WasmtimeWasiHttpComponentService, WasmtimeWasiHttpComponentStartOptions } from "./
|
|
49
|
-
import { AppHostHandle, AppHostService, AppHostStartOptions } from "./
|
|
50
|
-
import { UiServerService } from "./
|
|
51
|
-
export { AppBuildResult, AppBuildService, AppBundleChecksums, AppBundleExtractResult, AppBundleMetadata, AppBundlePackResult, AppBundleService, AppCoreWasmMainManifest, AppDistributionMode, AppDocumentAccessMode, AppDocumentAccessScope, AppDocumentGrantMap, AppDocumentGrantMutationResult, AppDocumentGrantState, AppGrantService, AppHomeService, AppHostHandle, AppHostService, AppHostStartOptions, AppInfoResult, AppInstallResult, AppInstallSourceKind, AppInstallationService, AppInstalledPermissionState, AppInstanceService, AppLaunchResolution, AppMainManifest, AppManifest, AppManifestBundle, AppManifestService, AppManifestSummary, AppMarketplaceClientService, AppMarketplaceMetadata, AppMarketplaceMetadataService, AppPermissionSummary, AppPermissions, AppPermissionsService, AppPublishFile, AppPublishPayload, AppPublishResult, AppPublishService, AppPublishValidationResult, AppPublishValidationService, AppPublishValidationWarning, AppPublishValidationWarningCode, AppPublisher, AppRegistry, AppRegistryAppRecord, AppRegistryConfig, AppRegistryConfigService, AppRegistryConfigSnapshot, AppRegistryInstalledVersion, AppRegistryService, AppRemoteRegistryClientService, AppRemoteRegistryDocument, AppRemoteRegistryResolution, AppRemoteRegistryVersion, AppRunResult, AppRuntimeCliService, AppRuntimeCommandResult, AppRuntimeDoctorResult, AppRuntimeOptionsService, AppRuntimeToolStatus, AppRuntimeToolchainService, AppScaffoldFile, AppScaffoldResult, AppScaffoldService, AppScaffoldTemplate, AppTsHttpLiteScaffoldTemplateService, AppTsHttpScaffoldTemplateService, AppUiManifest, AppUninstallResult, AppUpdateResult, AppWasiHttpComponentMainManifest, BuildCliOptions, CreateCliOptions, CreateCommand, DEFAULT_APP_MARKETPLACE_API_BASE, DEFAULT_APP_REGISTRY_URL, GrantCliOptions, GrantCommand, HostBridgeServer, InfoCommand, InstallCliOptions, InstallCommand, InstalledAppListItem, JsonOnlyCliOptions, ListCommand, MainRunRequest, MainRunResult, MainRunnerService, PackCliOptions, PackCommand, PermissionsCommand, PlatformAuthStateService, PlatformPublishAuthState, PublishCliOptions, PublishCommand, RegistryCommand, ResolvedDocumentGrant, ResolvedPermissions, RevokeCliOptions, RevokeCommand, RuntimeCliOptions, UiServerService, UninstallCliOptions, UninstallCommand, UpdateCliOptions, UpdateCommand, ValidatePublishCommand, WasmDocumentSummaryInput, WasmMainRunnerService, WasmSidecarClientService, WasmtimeWasiHttpComponentHandle, WasmtimeWasiHttpComponentService, WasmtimeWasiHttpComponentStartOptions };
|
|
1
|
+
import { AppComponentKind, AppComponentManifest, AppComponentManifestBundle, AppComponentManifestSummary, AppComponentReference, AppCoreWasmMainManifest, AppDocumentAccessMode, AppDocumentAccessScope, AppMainManifest, AppManifest, AppManifestBundle, AppManifestSummary, AppPermissions, AppResolvedComponent, AppStandaloneManifest, AppStandaloneManifestBundle, AppStandaloneManifestSummary, AppUiManifest, AppWasiHttpComponentMainManifest, isAppComponentManifestBundle, isAppStandaloneManifestBundle } from "./types/app-manifest.types.js";
|
|
2
|
+
import { AppManifestService } from "./services/app-manifest.service.js";
|
|
3
|
+
import { AppBundleChecksums, AppBundleExtractResult, AppBundleMetadata, AppBundlePackResult, AppDistributionMode } from "./types/app-bundle.types.js";
|
|
4
|
+
import { AppBundleService } from "./services/app-bundle.service.js";
|
|
5
|
+
import { AppDocumentGrantMap, AppDocumentGrantMutationResult, AppDocumentGrantState, AppInstalledPermissionState, AppPermissionSummary, ResolvedDocumentGrant, ResolvedPermissions } from "./types/app-permissions.types.js";
|
|
6
|
+
import { AppPermissionsService } from "./services/app-permissions.service.js";
|
|
7
|
+
import { MainRunRequest, MainRunResult, WasmDocumentSummaryInput } from "./types/main-runner.types.js";
|
|
8
|
+
import { MainRunnerService } from "./services/main-runner.service.js";
|
|
9
|
+
import { WasmSidecarClientService } from "./services/wasm-sidecar-client.service.js";
|
|
10
|
+
import { WasmMainRunnerService } from "./services/wasm-main-runner.service.js";
|
|
11
|
+
import { AppInstanceService, AppRunResult } from "./services/app-instance.service.js";
|
|
12
|
+
import { HostBridgeServer } from "./services/host-bridge.service.js";
|
|
13
|
+
import { AppScaffoldFile, AppTsHttpScaffoldTemplateService } from "./services/app-ts-http-scaffold-template.service.js";
|
|
14
|
+
import { AppTsHttpLiteScaffoldTemplateService } from "./services/app-ts-http-lite-scaffold-template.service.js";
|
|
15
|
+
import { AppScaffoldResult, AppScaffoldService, AppScaffoldTemplate } from "./services/app-scaffold.service.js";
|
|
16
|
+
import { AppRuntimeOptionsService, BuildCliOptions, CreateCliOptions, GrantCliOptions, InstallCliOptions, JsonOnlyCliOptions, PackCliOptions, PublishCliOptions, RevokeCliOptions, RuntimeCliOptions, UninstallCliOptions, UpdateCliOptions } from "./services/app-runtime-options.service.js";
|
|
17
|
+
import { AppRuntimeCliService } from "./services/app-runtime-cli.service.js";
|
|
18
|
+
import { CreateCommand } from "./controllers/create.controller.js";
|
|
19
|
+
import { AppHomeService } from "./services/app-home.service.js";
|
|
20
|
+
import { AppPublisher, AppRegistryConfig, AppRegistryConfigSnapshot, AppRemoteRegistryDocument, AppRemoteRegistryResolution, AppRemoteRegistryVersion, DEFAULT_APP_REGISTRY_URL } from "./types/app-remote-registry.types.js";
|
|
21
|
+
import { AppInstallSourceKind, AppRegistry, AppRegistryAppRecord, AppRegistryInstalledVersion } from "./types/app-registry.types.js";
|
|
22
|
+
import { AppRegistryService } from "./services/app-registry.service.js";
|
|
23
|
+
import { AppGrantService } from "./services/app-grant.service.js";
|
|
24
|
+
import { GrantCommand } from "./controllers/grant.controller.js";
|
|
25
|
+
import { AppRuntimeCommandResult, AppRuntimeDoctorResult, AppRuntimeToolStatus, AppRuntimeToolchainService } from "./services/app-runtime-toolchain.service.js";
|
|
26
|
+
import { AppBuildResult, AppBuildService } from "./services/app-build.service.js";
|
|
27
|
+
import { AppRegistryConfigService } from "./services/app-registry-config.service.js";
|
|
28
|
+
import { AppRemoteRegistryClientService } from "./services/app-remote-registry-client.service.js";
|
|
29
|
+
import { AppActivationResult, AppInfoResult, AppInstallResult, AppLaunchResolution, AppRollbackResult, AppUninstallResult, AppUpdateResult, InstalledAppListItem } from "./types/app-installation.types.js";
|
|
30
|
+
import { AppInstallationService } from "./services/app-installation.service.js";
|
|
31
|
+
import { InfoCommand } from "./controllers/info.controller.js";
|
|
32
|
+
import { InstallCommand } from "./controllers/install.controller.js";
|
|
33
|
+
import { ListCommand } from "./controllers/list.controller.js";
|
|
34
|
+
import { PackCommand } from "./controllers/pack.controller.js";
|
|
35
|
+
import { PermissionsCommand } from "./controllers/permissions.controller.js";
|
|
36
|
+
import { AppMarketplaceMetadata, AppPublishFile, AppPublishPayload, AppPublishResult, DEFAULT_APP_MARKETPLACE_API_BASE } from "./types/app-publish.types.js";
|
|
37
|
+
import { AppMarketplaceClientService } from "./services/app-marketplace-client.service.js";
|
|
38
|
+
import { AppMarketplaceMetadataService } from "./services/app-marketplace-metadata.service.js";
|
|
39
|
+
import { PlatformAuthStateService, PlatformPublishAuthState } from "./services/platform-auth-state.service.js";
|
|
40
|
+
import { AppPublishService } from "./services/app-publish.service.js";
|
|
41
|
+
import { PublishCommand } from "./controllers/publish.controller.js";
|
|
42
|
+
import { RegistryCommand } from "./controllers/registry.controller.js";
|
|
43
|
+
import { RevokeCommand } from "./controllers/revoke.controller.js";
|
|
44
|
+
import { UpdateCommand } from "./controllers/update.controller.js";
|
|
45
|
+
import { UninstallCommand } from "./controllers/uninstall.controller.js";
|
|
46
|
+
import { AppPublishValidationResult, AppPublishValidationService, AppPublishValidationWarning, AppPublishValidationWarningCode } from "./services/app-publish-validation.service.js";
|
|
47
|
+
import { ValidatePublishCommand } from "./controllers/validate-publish.controller.js";
|
|
48
|
+
import { WasmtimeWasiHttpComponentHandle, WasmtimeWasiHttpComponentService, WasmtimeWasiHttpComponentStartOptions } from "./services/wasmtime-wasi-http-component.service.js";
|
|
49
|
+
import { AppHostHandle, AppHostService, AppHostStartOptions } from "./services/app-host.service.js";
|
|
50
|
+
import { UiServerService } from "./services/ui-server.service.js";
|
|
51
|
+
export { AppActivationResult, AppBuildResult, AppBuildService, AppBundleChecksums, AppBundleExtractResult, AppBundleMetadata, AppBundlePackResult, AppBundleService, AppComponentKind, AppComponentManifest, AppComponentManifestBundle, AppComponentManifestSummary, AppComponentReference, AppCoreWasmMainManifest, AppDistributionMode, AppDocumentAccessMode, AppDocumentAccessScope, AppDocumentGrantMap, AppDocumentGrantMutationResult, AppDocumentGrantState, AppGrantService, AppHomeService, AppHostHandle, AppHostService, AppHostStartOptions, AppInfoResult, AppInstallResult, AppInstallSourceKind, AppInstallationService, AppInstalledPermissionState, AppInstanceService, AppLaunchResolution, AppMainManifest, AppManifest, AppManifestBundle, AppManifestService, AppManifestSummary, AppMarketplaceClientService, AppMarketplaceMetadata, AppMarketplaceMetadataService, AppPermissionSummary, AppPermissions, AppPermissionsService, AppPublishFile, AppPublishPayload, AppPublishResult, AppPublishService, AppPublishValidationResult, AppPublishValidationService, AppPublishValidationWarning, AppPublishValidationWarningCode, AppPublisher, AppRegistry, AppRegistryAppRecord, AppRegistryConfig, AppRegistryConfigService, AppRegistryConfigSnapshot, AppRegistryInstalledVersion, AppRegistryService, AppRemoteRegistryClientService, AppRemoteRegistryDocument, AppRemoteRegistryResolution, AppRemoteRegistryVersion, AppResolvedComponent, AppRollbackResult, AppRunResult, AppRuntimeCliService, AppRuntimeCommandResult, AppRuntimeDoctorResult, AppRuntimeOptionsService, AppRuntimeToolStatus, AppRuntimeToolchainService, AppScaffoldFile, AppScaffoldResult, AppScaffoldService, AppScaffoldTemplate, AppStandaloneManifest, AppStandaloneManifestBundle, AppStandaloneManifestSummary, AppTsHttpLiteScaffoldTemplateService, AppTsHttpScaffoldTemplateService, AppUiManifest, AppUninstallResult, AppUpdateResult, AppWasiHttpComponentMainManifest, BuildCliOptions, CreateCliOptions, CreateCommand, DEFAULT_APP_MARKETPLACE_API_BASE, DEFAULT_APP_REGISTRY_URL, GrantCliOptions, GrantCommand, HostBridgeServer, InfoCommand, InstallCliOptions, InstallCommand, InstalledAppListItem, JsonOnlyCliOptions, ListCommand, MainRunRequest, MainRunResult, MainRunnerService, PackCliOptions, PackCommand, PermissionsCommand, PlatformAuthStateService, PlatformPublishAuthState, PublishCliOptions, PublishCommand, RegistryCommand, ResolvedDocumentGrant, ResolvedPermissions, RevokeCliOptions, RevokeCommand, RuntimeCliOptions, UiServerService, UninstallCliOptions, UninstallCommand, UpdateCliOptions, UpdateCommand, ValidatePublishCommand, WasmDocumentSummaryInput, WasmMainRunnerService, WasmSidecarClientService, WasmtimeWasiHttpComponentHandle, WasmtimeWasiHttpComponentService, WasmtimeWasiHttpComponentStartOptions, isAppComponentManifestBundle, isAppStandaloneManifestBundle };
|
package/dist/index.js
CHANGED
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
import { AppManifestService } from "./
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
|
|
1
|
+
import { AppManifestService } from "./services/app-manifest.service.js";
|
|
2
|
+
import { isAppComponentManifestBundle, isAppStandaloneManifestBundle } from "./types/app-manifest.types.js";
|
|
3
|
+
import { AppBundleService } from "./services/app-bundle.service.js";
|
|
4
|
+
import { HostBridgeServer } from "./services/host-bridge.service.js";
|
|
5
|
+
import { AppTsHttpScaffoldTemplateService } from "./services/app-ts-http-scaffold-template.service.js";
|
|
6
|
+
import { AppTsHttpLiteScaffoldTemplateService } from "./services/app-ts-http-lite-scaffold-template.service.js";
|
|
7
|
+
import { AppScaffoldService } from "./services/app-scaffold.service.js";
|
|
8
|
+
import { CreateCommand } from "./controllers/create.controller.js";
|
|
9
|
+
import { UiServerService } from "./services/ui-server.service.js";
|
|
10
|
+
import { AppHostService } from "./services/app-host.service.js";
|
|
11
|
+
import { AppPermissionsService } from "./services/app-permissions.service.js";
|
|
12
|
+
import { MainRunnerService } from "./services/main-runner.service.js";
|
|
13
|
+
import { WasmSidecarClientService } from "./services/wasm-sidecar-client.service.js";
|
|
14
|
+
import { WasmMainRunnerService } from "./services/wasm-main-runner.service.js";
|
|
15
|
+
import { AppInstanceService } from "./services/app-instance.service.js";
|
|
16
|
+
import { AppHomeService } from "./services/app-home.service.js";
|
|
17
|
+
import { AppRuntimeToolchainService } from "./services/app-runtime-toolchain.service.js";
|
|
18
|
+
import { AppBuildService } from "./services/app-build.service.js";
|
|
19
|
+
import { DEFAULT_APP_REGISTRY_URL } from "./types/app-remote-registry.types.js";
|
|
20
|
+
import { AppRegistryConfigService } from "./services/app-registry-config.service.js";
|
|
21
|
+
import { AppRemoteRegistryClientService } from "./services/app-remote-registry-client.service.js";
|
|
22
|
+
import { AppRegistryService } from "./services/app-registry.service.js";
|
|
23
|
+
import { AppInstallationService } from "./services/app-installation.service.js";
|
|
24
|
+
import { WasmtimeWasiHttpComponentService } from "./services/wasmtime-wasi-http-component.service.js";
|
|
25
|
+
import { AppGrantService } from "./services/app-grant.service.js";
|
|
26
|
+
import { GrantCommand } from "./controllers/grant.controller.js";
|
|
27
|
+
import { InfoCommand } from "./controllers/info.controller.js";
|
|
28
|
+
import { InstallCommand } from "./controllers/install.controller.js";
|
|
29
|
+
import { ListCommand } from "./controllers/list.controller.js";
|
|
30
|
+
import { PackCommand } from "./controllers/pack.controller.js";
|
|
31
|
+
import { PermissionsCommand } from "./controllers/permissions.controller.js";
|
|
32
|
+
import { DEFAULT_APP_MARKETPLACE_API_BASE } from "./types/app-publish.types.js";
|
|
33
|
+
import { AppMarketplaceClientService } from "./services/app-marketplace-client.service.js";
|
|
34
|
+
import { AppMarketplaceMetadataService } from "./services/app-marketplace-metadata.service.js";
|
|
35
|
+
import { PlatformAuthStateService } from "./services/platform-auth-state.service.js";
|
|
36
|
+
import { AppPublishService } from "./services/app-publish.service.js";
|
|
37
|
+
import { PublishCommand } from "./controllers/publish.controller.js";
|
|
38
|
+
import { RegistryCommand } from "./controllers/registry.controller.js";
|
|
39
|
+
import { RevokeCommand } from "./controllers/revoke.controller.js";
|
|
40
|
+
import { UninstallCommand } from "./controllers/uninstall.controller.js";
|
|
41
|
+
import { UpdateCommand } from "./controllers/update.controller.js";
|
|
42
|
+
import { AppPublishValidationService } from "./services/app-publish-validation.service.js";
|
|
43
|
+
import { ValidatePublishCommand } from "./controllers/validate-publish.controller.js";
|
|
44
|
+
import { AppRuntimeOptionsService } from "./services/app-runtime-options.service.js";
|
|
45
|
+
import { AppRuntimeCliService } from "./services/app-runtime-cli.service.js";
|
|
46
|
+
export { AppBuildService, AppBundleService, AppGrantService, AppHomeService, AppHostService, AppInstallationService, AppInstanceService, AppManifestService, AppMarketplaceClientService, AppMarketplaceMetadataService, AppPermissionsService, AppPublishService, AppPublishValidationService, AppRegistryConfigService, AppRegistryService, AppRemoteRegistryClientService, AppRuntimeCliService, AppRuntimeOptionsService, AppRuntimeToolchainService, AppScaffoldService, AppTsHttpLiteScaffoldTemplateService, AppTsHttpScaffoldTemplateService, CreateCommand, DEFAULT_APP_MARKETPLACE_API_BASE, DEFAULT_APP_REGISTRY_URL, GrantCommand, HostBridgeServer, InfoCommand, InstallCommand, ListCommand, MainRunnerService, PackCommand, PermissionsCommand, PlatformAuthStateService, PublishCommand, RegistryCommand, RevokeCommand, UiServerService, UninstallCommand, UpdateCommand, ValidatePublishCommand, WasmMainRunnerService, WasmSidecarClientService, WasmtimeWasiHttpComponentService, isAppComponentManifestBundle, isAppStandaloneManifestBundle };
|
package/dist/package.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AppManifestService } from "
|
|
1
|
+
import { AppManifestService } from "./app-manifest.service.js";
|
|
2
2
|
import { AppRuntimeToolchainService } from "./app-runtime-toolchain.service.js";
|
|
3
3
|
|
|
4
|
-
//#region src/
|
|
4
|
+
//#region src/services/app-build.service.d.ts
|
|
5
5
|
type AppBuildResult = {
|
|
6
6
|
appDirectory: string;
|
|
7
7
|
mainKind: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-build.service.d.ts","names":[],"sources":["../../src/services/app-build.service.ts"],"mappings":";;;;KAMY,cAAA;EACV,YAAA;EACA,QAAA;EACA,aAAA;EACA,qBAAA;EACA,KAAA;EACA,aAAA;AAAA;AAAA,cAGW,eAAA;EAAA,iBAEQ,eAAA;EAAA,iBACA,gBAAA;cADA,eAAA,GAAiB,kBAAA,EACjB,gBAAA,GAAkB,0BAAA;EAGrC,KAAA,GAAe,MAAA;IACb,YAAA;IACA,OAAA;EAAA,MACE,OAAA,CAAQ,cAAA;EAAA,QA2CJ,UAAA;AAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { AppManifestService } from "
|
|
1
|
+
import { AppManifestService } from "./app-manifest.service.js";
|
|
2
|
+
import { isAppStandaloneManifestBundle } from "../types/app-manifest.types.js";
|
|
2
3
|
import { AppRuntimeToolchainService } from "./app-runtime-toolchain.service.js";
|
|
3
4
|
import { access } from "node:fs/promises";
|
|
4
5
|
import path from "node:path";
|
|
5
|
-
//#region src/
|
|
6
|
+
//#region src/services/app-build.service.ts
|
|
6
7
|
var AppBuildService = class {
|
|
7
8
|
constructor(manifestService = new AppManifestService(), toolchainService = new AppRuntimeToolchainService()) {
|
|
8
9
|
this.manifestService = manifestService;
|
|
@@ -11,6 +12,7 @@ var AppBuildService = class {
|
|
|
11
12
|
build = async (params) => {
|
|
12
13
|
const appDirectory = path.resolve(params.appDirectory);
|
|
13
14
|
const bundle = await this.manifestService.load(appDirectory);
|
|
15
|
+
if (!isAppStandaloneManifestBundle(bundle)) throw new Error("schema v2 组合包必须提交可直接运行的 bundle,不能执行本地 build。");
|
|
14
16
|
if (bundle.manifest.main.kind !== "wasi-http-component") return {
|
|
15
17
|
appDirectory,
|
|
16
18
|
mainKind: bundle.manifest.main.kind,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-build.service.js","names":[],"sources":["../../src/services/app-build.service.ts"],"sourcesContent":["import { access } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { AppManifestService } from \"#app-runtime/services/app-manifest.service.js\";\nimport { isAppStandaloneManifestBundle } from \"#app-runtime/types/app-manifest.types.js\";\nimport { AppRuntimeToolchainService } from \"./app-runtime-toolchain.service.js\";\n\nexport type AppBuildResult = {\n appDirectory: string;\n mainKind: string;\n mainEntryPath: string;\n installedDependencies: boolean;\n built: boolean;\n skippedReason?: string;\n};\n\nexport class AppBuildService {\n constructor(\n private readonly manifestService: AppManifestService = new AppManifestService(),\n private readonly toolchainService: AppRuntimeToolchainService = new AppRuntimeToolchainService(),\n ) {}\n\n build = async (params: {\n appDirectory: string;\n install: boolean;\n }): Promise<AppBuildResult> => {\n const appDirectory = path.resolve(params.appDirectory);\n const bundle = await this.manifestService.load(appDirectory);\n if (!isAppStandaloneManifestBundle(bundle)) {\n throw new Error(\"schema v2 组合包必须提交可直接运行的 bundle,不能执行本地 build。\");\n }\n if (bundle.manifest.main.kind !== \"wasi-http-component\") {\n return {\n appDirectory,\n mainKind: bundle.manifest.main.kind,\n mainEntryPath: bundle.mainEntryPath,\n installedDependencies: false,\n built: false,\n skippedReason: \"main.kind=wasm 应用不需要 TS/WASI HTTP 构建。\",\n };\n }\n\n await this.toolchainService.assertReadyForWasiHttpBuild();\n const mainDirectory = path.join(appDirectory, \"main\");\n await access(path.join(mainDirectory, \"package.json\"));\n const shouldInstall = params.install || !(await this.pathExists(path.join(mainDirectory, \"node_modules\")));\n if (shouldInstall) {\n await this.toolchainService.runCommand({\n command: \"npm\",\n args: [\"install\"],\n cwd: mainDirectory,\n });\n }\n await this.toolchainService.runCommand({\n command: \"npm\",\n args: [\"run\", \"build\"],\n cwd: mainDirectory,\n });\n await access(bundle.mainEntryPath);\n return {\n appDirectory,\n mainKind: bundle.manifest.main.kind,\n mainEntryPath: bundle.mainEntryPath,\n installedDependencies: shouldInstall,\n built: true,\n };\n };\n\n private pathExists = async (targetPath: string): Promise<boolean> => {\n try {\n await access(targetPath);\n return true;\n } catch {\n return false;\n }\n };\n}\n"],"mappings":";;;;;;AAeA,IAAa,kBAAb,MAA6B;CAC3B,YACE,kBAAuD,IAAI,oBAAoB,EAC/E,mBAAgE,IAAI,4BAA4B,EAChG;AAFiB,OAAA,kBAAA;AACA,OAAA,mBAAA;;CAGnB,QAAQ,OAAO,WAGgB;EAC7B,MAAM,eAAe,KAAK,QAAQ,OAAO,aAAa;EACtD,MAAM,SAAS,MAAM,KAAK,gBAAgB,KAAK,aAAa;AAC5D,MAAI,CAAC,8BAA8B,OAAO,CACxC,OAAM,IAAI,MAAM,+CAA+C;AAEjE,MAAI,OAAO,SAAS,KAAK,SAAS,sBAChC,QAAO;GACL;GACA,UAAU,OAAO,SAAS,KAAK;GAC/B,eAAe,OAAO;GACtB,uBAAuB;GACvB,OAAO;GACP,eAAe;GAChB;AAGH,QAAM,KAAK,iBAAiB,6BAA6B;EACzD,MAAM,gBAAgB,KAAK,KAAK,cAAc,OAAO;AACrD,QAAM,OAAO,KAAK,KAAK,eAAe,eAAe,CAAC;EACtD,MAAM,gBAAgB,OAAO,WAAW,CAAE,MAAM,KAAK,WAAW,KAAK,KAAK,eAAe,eAAe,CAAC;AACzG,MAAI,cACF,OAAM,KAAK,iBAAiB,WAAW;GACrC,SAAS;GACT,MAAM,CAAC,UAAU;GACjB,KAAK;GACN,CAAC;AAEJ,QAAM,KAAK,iBAAiB,WAAW;GACrC,SAAS;GACT,MAAM,CAAC,OAAO,QAAQ;GACtB,KAAK;GACN,CAAC;AACF,QAAM,OAAO,OAAO,cAAc;AAClC,SAAO;GACL;GACA,UAAU,OAAO,SAAS,KAAK;GAC/B,eAAe,OAAO;GACtB,uBAAuB;GACvB,OAAO;GACR;;CAGH,aAAqB,OAAO,eAAyC;AACnE,MAAI;AACF,SAAM,OAAO,WAAW;AACxB,UAAO;UACD;AACN,UAAO"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AppManifestService } from "
|
|
2
|
-
import { AppBundleExtractResult, AppBundlePackResult, AppDistributionMode } from "
|
|
1
|
+
import { AppManifestService } from "./app-manifest.service.js";
|
|
2
|
+
import { AppBundleExtractResult, AppBundlePackResult, AppDistributionMode } from "../types/app-bundle.types.js";
|
|
3
3
|
|
|
4
|
-
//#region src/
|
|
4
|
+
//#region src/services/app-bundle.service.d.ts
|
|
5
5
|
declare class AppBundleService {
|
|
6
6
|
private readonly manifestService;
|
|
7
7
|
constructor(manifestService?: AppManifestService);
|
|
@@ -14,19 +14,31 @@ declare class AppBundleService {
|
|
|
14
14
|
bundlePath: string;
|
|
15
15
|
targetDirectory: string;
|
|
16
16
|
}) => Promise<AppBundleExtractResult>;
|
|
17
|
+
private readValidatedArchive;
|
|
18
|
+
private replaceTargetWithArchive;
|
|
19
|
+
private writeArchiveEntries;
|
|
20
|
+
private assertExtractedManifest;
|
|
17
21
|
private collectRuntimeFiles;
|
|
18
22
|
private collectSourceFiles;
|
|
23
|
+
private readAppFiles;
|
|
19
24
|
private collectDirectoryPaths;
|
|
20
25
|
private collectSourceDirectoryPaths;
|
|
26
|
+
private addOptionalFile;
|
|
27
|
+
private shouldExcludeRuntimePath;
|
|
21
28
|
private shouldExcludeSourcePath;
|
|
29
|
+
private assertFileBudgets;
|
|
30
|
+
private normalizeArchive;
|
|
31
|
+
private readMetadataFromArchive;
|
|
32
|
+
private readChecksumsFromArchive;
|
|
33
|
+
private verifyArchiveChecksums;
|
|
34
|
+
private readJsonArchiveEntry;
|
|
22
35
|
private buildMetadata;
|
|
23
|
-
private normalizeMetadata;
|
|
24
36
|
private buildChecksums;
|
|
25
37
|
private computeSha256;
|
|
26
38
|
private normalizeBundleFileName;
|
|
27
39
|
private normalizeArchiveEntry;
|
|
28
|
-
private
|
|
29
|
-
private
|
|
40
|
+
private isMissingFileError;
|
|
41
|
+
private pathExists;
|
|
30
42
|
}
|
|
31
43
|
//#endregion
|
|
32
44
|
export { AppBundleService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-bundle.service.d.ts","names":[],"sources":["../../src/services/app-bundle.service.ts"],"mappings":";;;;cAyBa,gBAAA;EAAA,iBAEQ,eAAA;cAAA,eAAA,GAAiB,kBAAA;EAGpC,gBAAA,GAA0B,MAAA;IACxB,YAAA;IACA,UAAA;IACA,IAAA,GAAO,mBAAA;EAAA,MACL,OAAA,CAAQ,mBAAA;EAkDZ,aAAA,GAAuB,MAAA;IACrB,UAAA;IACA,eAAA;EAAA,MACE,OAAA,CAAQ,sBAAA;EAAA,QAQJ,oBAAA;EAAA,QAkCA,wBAAA;EAAA,QA+CA,mBAAA;EAAA,QAWA,uBAAA;EAAA,QAiBA,mBAAA;EAAA,QAuBA,kBAAA;EAAA,QAeA,YAAA;EAAA,QAYA,qBAAA;EAAA,QAgCA,2BAAA;EAAA,QAuBA,eAAA;EAAA,QAiBA,wBAAA;EAAA,QAYA,uBAAA;EAAA,QAOA,iBAAA;EAAA,QAiBA,gBAAA;EAAA,QAcA,uBAAA;EAAA,QA4BA,wBAAA;EAAA,QAcA,sBAAA;EAAA,QA4BA,oBAAA;EAAA,QAgBA,aAAA;EAAA,QAeA,cAAA;EAAA,QASA,aAAA;EAAA,QAGA,uBAAA;EAAA,QAGA,qBAAA;EAAA,QAaA,kBAAA;EAAA,QAIA,UAAA;AAAA"}
|