@absolutejs/absolute 0.20.0-beta.0 → 0.20.0-beta.10

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.
Files changed (118) hide show
  1. package/README.md +45 -0
  2. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  3. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  4. package/dist/angular/index.js +354 -22
  5. package/dist/angular/index.js.map +9 -6
  6. package/dist/angular/server.js +354 -22
  7. package/dist/angular/server.js.map +9 -6
  8. package/dist/build.js +742 -359
  9. package/dist/build.js.map +26 -24
  10. package/dist/cli/config/server.js +2 -2
  11. package/dist/cli/index.js +16105 -8429
  12. package/dist/dev/client/cssUtils.ts +112 -41
  13. package/dist/dev/client/handlers/html.ts +75 -15
  14. package/dist/dev/client/handlers/htmx.ts +43 -8
  15. package/dist/dev/client/handlers/react.ts +114 -32
  16. package/dist/dev/client/handlers/rebuild.ts +38 -8
  17. package/dist/dev/client/handlers/svelte.ts +33 -50
  18. package/dist/dev/client/handlers/vue.ts +36 -45
  19. package/dist/dev/client/hmrClient.ts +38 -6
  20. package/dist/dev/client/hmrTiming.ts +148 -0
  21. package/dist/dev/serverBootstrap.js +20 -11
  22. package/dist/index.js +1728 -864
  23. package/dist/index.js.map +38 -33
  24. package/dist/mobile/browser.js +14 -1
  25. package/dist/mobile/browser.js.map +3 -3
  26. package/dist/mobile/index.js +4853 -279
  27. package/dist/mobile/index.js.map +34 -7
  28. package/dist/mobile/remoteMacAgentEntry.js +29 -0
  29. package/dist/mobile/shellAuth.js +43 -0
  30. package/dist/mobile/shellBootstrap.js +581 -0
  31. package/dist/mobile/shellSync.js +74 -0
  32. package/dist/react/index.js +16 -3
  33. package/dist/react/index.js.map +4 -4
  34. package/dist/react/jsxDevRuntimeCompat.js +22 -2
  35. package/dist/react/jsxDevRuntimeCompat.js.map +5 -4
  36. package/dist/react/jsxRuntimeCompat.js +90 -0
  37. package/dist/react/jsxRuntimeCompat.js.map +10 -0
  38. package/dist/react/server.js +16 -3
  39. package/dist/react/server.js.map +4 -4
  40. package/dist/src/angular/pageHandler.d.ts +3 -0
  41. package/dist/src/build/compileVue.d.ts +1 -1
  42. package/dist/src/build/pwa.d.ts +15 -0
  43. package/dist/src/build/resolveBuildMode.d.ts +7 -0
  44. package/dist/src/cli/config/server.d.ts +1 -1
  45. package/dist/src/cli/scripts/dev.d.ts +4 -1
  46. package/dist/src/cli/scripts/mobile.d.ts +1 -0
  47. package/dist/src/cli/utils.d.ts +2 -2
  48. package/dist/src/core/build.d.ts +1 -1
  49. package/dist/src/core/pageHandlers.d.ts +11 -2
  50. package/dist/src/core/prepare.d.ts +6 -0
  51. package/dist/src/dev/clientManager.d.ts +9 -0
  52. package/dist/src/dev/configResolver.d.ts +2 -0
  53. package/dist/src/dev/moduleMapper.d.ts +1 -1
  54. package/dist/src/dev/moduleServer.d.ts +2 -1
  55. package/dist/src/dev/pathUtils.d.ts +1 -1
  56. package/dist/src/dev/reactComponentClassifier.d.ts +1 -1
  57. package/dist/src/mobile/androidConformance.d.ts +42 -0
  58. package/dist/src/mobile/androidEmulatorController.d.ts +105 -0
  59. package/dist/src/mobile/androidNativeWatcher.d.ts +19 -0
  60. package/dist/src/mobile/androidRelease.d.ts +51 -0
  61. package/dist/src/mobile/androidWebView.d.ts +46 -0
  62. package/dist/src/mobile/associationFiles.d.ts +49 -0
  63. package/dist/src/mobile/buildMetadata.d.ts +10 -0
  64. package/dist/src/mobile/buildPipeline.d.ts +9 -0
  65. package/dist/src/mobile/buildRelease.d.ts +24 -0
  66. package/dist/src/mobile/capacitorBundle.d.ts +42 -0
  67. package/dist/src/mobile/capacitorProject.d.ts +9 -0
  68. package/dist/src/mobile/client.d.ts +5 -1
  69. package/dist/src/mobile/config.d.ts +17 -0
  70. package/dist/src/mobile/emulatorDoctor.d.ts +25 -0
  71. package/dist/src/mobile/emulatorInstaller.d.ts +41 -0
  72. package/dist/src/mobile/index.d.ts +19 -0
  73. package/dist/src/mobile/iosConformance.d.ts +15 -0
  74. package/dist/src/mobile/iosNativeWatcher.d.ts +19 -0
  75. package/dist/src/mobile/iosRelease.d.ts +61 -0
  76. package/dist/src/mobile/iosSimulatorController.d.ts +89 -0
  77. package/dist/src/mobile/materializedBundle.d.ts +14 -0
  78. package/dist/src/mobile/nativeAuth.d.ts +17 -0
  79. package/dist/src/mobile/nativeBackgroundSync.d.ts +4 -0
  80. package/dist/src/mobile/nativeDeepLinks.d.ts +5 -0
  81. package/dist/src/mobile/releaseArtifact.d.ts +3 -0
  82. package/dist/src/mobile/releaseDoctor.d.ts +13 -0
  83. package/dist/src/mobile/releasePublisher.d.ts +130 -0
  84. package/dist/src/mobile/remoteMacAgent.d.ts +2 -0
  85. package/dist/src/mobile/remoteMacAgentEntry.d.ts +1 -0
  86. package/dist/src/mobile/remoteMacProtocol.d.ts +114 -0
  87. package/dist/src/mobile/remoteMacWire.d.ts +2 -0
  88. package/dist/src/mobile/routeMatcher.d.ts +3 -0
  89. package/dist/src/mobile/routeMetadataTransform.d.ts +13 -0
  90. package/dist/src/mobile/shellAuth.d.ts +13 -0
  91. package/dist/src/mobile/shellBootstrap.d.ts +18 -0
  92. package/dist/src/mobile/shellSync.d.ts +19 -0
  93. package/dist/src/mobile/staticDocument.d.ts +5 -0
  94. package/dist/src/mobile/transport.d.ts +43 -0
  95. package/dist/src/plugins/hmr.d.ts +3 -0
  96. package/dist/src/plugins/imageOptimizer.d.ts +1 -1
  97. package/dist/src/react/hooks/useMediaQuery.d.ts +1 -1
  98. package/dist/src/react/jsxDevRuntimeCompat.d.ts +1 -1
  99. package/dist/src/react/jsxRuntimeCompat.d.ts +7 -0
  100. package/dist/src/react/pageHandler.d.ts +3 -0
  101. package/dist/src/svelte/pageHandler.d.ts +3 -0
  102. package/dist/src/utils/loadConfig.d.ts +2 -0
  103. package/dist/src/utils/logger.d.ts +2 -0
  104. package/dist/src/utils/userAgentFunctions.d.ts +1 -1
  105. package/dist/src/vue/pageHandler.d.ts +3 -0
  106. package/dist/svelte/index.js +325 -23
  107. package/dist/svelte/index.js.map +8 -5
  108. package/dist/svelte/server.js +320 -18
  109. package/dist/svelte/server.js.map +8 -5
  110. package/dist/types/build.d.ts +59 -0
  111. package/dist/types/cli.d.ts +2 -0
  112. package/dist/types/globals.d.ts +14 -0
  113. package/dist/types/messages.d.ts +12 -0
  114. package/dist/vue/index.js +325 -23
  115. package/dist/vue/index.js.map +8 -5
  116. package/dist/vue/server.js +320 -18
  117. package/dist/vue/server.js.map +8 -5
  118. package/package.json +52 -8
@@ -1,4 +1,5 @@
1
1
  import type { EnvironmentProviders, Provider } from '@angular/core';
2
+ import type { AbsoluteMobileBuildPageMetadata } from '../mobile/buildMetadata';
2
3
  import { type StreamingSlotEnhancerOptions } from '../core/responseEnhancers';
3
4
  type AngularPageRenderOptions = StreamingSlotEnhancerOptions & {
4
5
  collectStreamingSlots?: boolean;
@@ -9,6 +10,8 @@ type AngularPageRenderOptions = StreamingSlotEnhancerOptions & {
9
10
  * passes no generic at all) can omit `requestContext`. */
10
11
  type HasNoRequiredContextKeys<Ctx> = keyof Ctx extends never ? true : Partial<Ctx> extends Ctx ? true : false;
11
12
  export type AngularPageRequestInput<Ctx = unknown> = AngularPageRenderOptions & {
13
+ /** @internal Build-generated mobile identity. Application code must not set this. */
14
+ __absoluteMobile?: AbsoluteMobileBuildPageMetadata;
12
15
  headTag?: `<head>${string}</head>`;
13
16
  indexPath: string;
14
17
  pagePath: string;
@@ -7,7 +7,7 @@ export declare const vueHmrMetadata: Map<string, {
7
7
  changeType: VueChangeType;
8
8
  }>;
9
9
  export declare const clearVueHmrCaches: () => void;
10
- export declare const detectVueChangeType: (filePath: string, descriptor: SFCDescriptor) => "script" | "template-only" | "full" | "style-only";
10
+ export declare const detectVueChangeType: (filePath: string, descriptor: SFCDescriptor) => "script" | "style-only" | "template-only" | "full";
11
11
  export declare const generateVueHmrId: (sourceFilePath: string, vueRootDir: string) => string;
12
12
  export declare const compileVue: (entryPoints: string[], vueRootDir: string, isDev?: boolean, stylePreprocessors?: StylePreprocessorConfig, ssrOnlyEntries?: ReadonlySet<string>) => Promise<{
13
13
  hmrMetadata: Map<string, {
@@ -0,0 +1,15 @@
1
+ import type { PwaConfig } from '../../types/build';
2
+ export declare const injectPwaBootstrapHtml: (html: string) => string;
3
+ export type AbsolutePwaBuildArtifacts = {
4
+ bootstrapBanner: string;
5
+ bootstrapPublicPath: string;
6
+ manifestPath?: string;
7
+ serviceWorkerPath: string;
8
+ };
9
+ export declare const materializeAbsolutePwa: ({ buildPath, config, generatedRoot, write }: {
10
+ buildPath: string;
11
+ config: PwaConfig;
12
+ generatedRoot: string;
13
+ /** Incremental HMR builds reuse the stable artifacts from the full build. */
14
+ write?: boolean;
15
+ }) => Promise<AbsolutePwaBuildArtifacts>;
@@ -0,0 +1,7 @@
1
+ import type { BuildConfig } from '../../types/build';
2
+ export declare const resolveBuildDevelopmentMode: (mode: BuildConfig["mode"], nodeEnv: string | undefined) => boolean;
3
+ export declare const resolveVueFeatureFlags: (development: boolean) => {
4
+ __VUE_OPTIONS_API__: string;
5
+ __VUE_PROD_DEVTOOLS__: string;
6
+ __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: string;
7
+ };
@@ -391,7 +391,7 @@ export declare const launchConfig: (args: string[], cwd?: string) => Promise<imp
391
391
  status?: number | keyof import("elysia").StatusMap;
392
392
  cookie?: Record<string, import("elysia").BaseCookie>;
393
393
  };
394
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 500 | 100 | 200 | 400 | 404 | 300 | 304 | 426 | 302 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 301 | 303 | 307 | 308 | 401 | 402 | 403 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
394
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 500 | 100 | 200 | 400 | 404 | 300 | 304 | 426 | 204 | 302 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 301 | 303 | 307 | 308 | 401 | 402 | 403 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
395
395
  readonly 100: "Continue";
396
396
  readonly 101: "Switching Protocols";
397
397
  readonly 102: "Processing";
@@ -1,2 +1,5 @@
1
1
  export declare const formatServerBootDiagnostic: (output: string, serverEntry: string) => string | null;
2
- export declare const dev: (serverEntry: string, configPath?: string) => Promise<void>;
2
+ export type AbsoluteDevOptions = {
3
+ mobile?: boolean;
4
+ };
5
+ export declare const dev: (serverEntry: string, configPath?: string, options?: AbsoluteDevOptions) => Promise<void>;
@@ -0,0 +1 @@
1
+ export declare const runMobile: (args: string[]) => Promise<void>;
@@ -2,10 +2,10 @@ import type { DbScripts } from '../../types/cli';
2
2
  export declare const COMPOSE_PATH = "db/docker-compose.db.yml";
3
3
  export declare const DEFAULT_SERVER_ENTRY = "src/backend/server.ts";
4
4
  export declare const isWSLEnvironment: () => boolean;
5
- export declare const findFreePort: () => number;
5
+ export declare const findFreePort: () => Promise<number>;
6
6
  export declare const killStaleProcesses: (port: number, logMessage?: (message: string) => void) => void;
7
7
  export declare const openUrlInBrowser: (url: string, onError?: (message: string) => void) => boolean;
8
- export declare const printHelp: (subject?: string) => void;
8
+ export declare const printHelp: (subject?: string, mobile?: boolean) => void;
9
9
  export declare const printHint: () => void;
10
10
  export declare const readDbScripts: () => Promise<{
11
11
  downCommand: string;
@@ -3,7 +3,7 @@ import type { ConventionsMap } from '../../types/conventions';
3
3
  import type { BuildConfig, BuildPassError, BunBuildConfigOverride, BunBuildPassKey } from '../../types/build';
4
4
  export declare const scanWorkerReferences: (dirs: string[]) => Promise<string[]>;
5
5
  type BunBuildOptions = Parameters<typeof bunBuild>[0];
6
- export declare const resolveBunBuildOverride: (config: BuildConfig["bunBuild"], pass: BunBuildPassKey) => Partial<Omit<Bun.BuildConfig, "entrypoints" | "outdir" | "root" | "target" | "format" | "throw" | "compile">>;
6
+ export declare const resolveBunBuildOverride: (config: BuildConfig["bunBuild"], pass: BunBuildPassKey) => Partial<Omit<Bun.BuildConfig, "target" | "entrypoints" | "outdir" | "root" | "format" | "throw" | "compile">>;
7
7
  /** Resolve the Bun `sourcemap` mode for CLIENT bundles from the `sourcemaps`
8
8
  * config. Dev always uses inline maps (HMR / devtools); production emits
9
9
  * external maps only when explicitly enabled — they're then chained back to
@@ -1,5 +1,14 @@
1
1
  import { type StreamingSlotEnhancerOptions } from './responseEnhancers';
2
+ import type { AbsoluteMobileBuildPageMetadata } from '../mobile/buildMetadata';
2
3
  export type StaticPageRequestOptions = StreamingSlotEnhancerOptions;
3
- export type HTMLPageRequestOptions = StaticPageRequestOptions;
4
+ export type HTMLPageRequestOptions = StaticPageRequestOptions & {
5
+ /** @internal Build-generated mobile identity. Application code must not set this. */
6
+ __absoluteMobile?: AbsoluteMobileBuildPageMetadata;
7
+ };
8
+ type HTMXPageRequestOptions = {
9
+ /** @internal Build-generated mobile identity. Application code must not set this. */
10
+ __absoluteMobile?: AbsoluteMobileBuildPageMetadata;
11
+ };
4
12
  export declare const handleHTMLPageRequest: (pagePath: string, options?: HTMLPageRequestOptions) => Promise<Response>;
5
- export declare const handleHTMXPageRequest: (pagePath: string) => Promise<Response>;
13
+ export declare const handleHTMXPageRequest: (pagePath: string, options?: HTMXPageRequestOptions) => Promise<Response>;
14
+ export {};
@@ -135,6 +135,9 @@ export declare const prepare: (configOrPath?: string) => Promise<{
135
135
  response: {
136
136
  200: {
137
137
  connectedClients: number;
138
+ connectedTargets: {
139
+ [k: string]: number;
140
+ };
138
141
  entryWatcherReady: boolean;
139
142
  isRebuilding: boolean;
140
143
  manifestKeys: string[];
@@ -268,6 +271,9 @@ export declare const prepare: (configOrPath?: string) => Promise<{
268
271
  response: {
269
272
  200: {
270
273
  connectedClients: number;
274
+ connectedTargets: {
275
+ [k: string]: number;
276
+ };
271
277
  entryWatcherReady: boolean;
272
278
  isRebuilding: boolean;
273
279
  manifestKeys: string[];
@@ -2,10 +2,16 @@ import type { FSWatcher } from 'fs';
2
2
  import { type DependencyGraph } from './dependencyGraph';
3
3
  import { type ModuleVersions } from './moduleVersionTracker';
4
4
  import type { HMRWebSocket } from '../../types/websocket';
5
+ import type { HMRClientTarget } from '../../types/messages';
5
6
  import type { BuildConfig, BuildPassError } from '../../types/build';
6
7
  import { type ResolvedBuildPaths } from './configResolver';
8
+ type HMRUpdateMetadata = {
9
+ framework?: string;
10
+ path?: string;
11
+ };
7
12
  export type HMRState = {
8
13
  connectedClients: Set<HMRWebSocket>;
14
+ clientTargets: Map<HMRWebSocket, HMRClientTarget>;
9
15
  activeFrameworks: Set<string>;
10
16
  dependencyGraph: DependencyGraph;
11
17
  isRebuilding: boolean;
@@ -25,6 +31,8 @@ export type HMRState = {
25
31
  rebuildCount: number;
26
32
  lastHmrPath?: string;
27
33
  lastHmrFramework?: string;
34
+ lastBroadcastTimestamp: number;
35
+ hmrUpdates: Map<number, HMRUpdateMetadata>;
28
36
  lastUserEditedFiles?: Set<string>;
29
37
  initialBuildFailed?: boolean;
30
38
  lastBuildErrors?: BuildPassError[];
@@ -33,3 +41,4 @@ export type HMRState = {
33
41
  export declare const createHMRState: (config: BuildConfig) => HMRState;
34
42
  export declare const incrementSourceFileVersion: (state: HMRState, filePath: string) => number;
35
43
  export declare const incrementSourceFileVersions: (state: HMRState, filePaths: string[]) => void;
44
+ export {};
@@ -7,6 +7,8 @@ export declare const resolveBuildPaths: (config: BuildConfig) => {
7
7
  emberDir: string | undefined;
8
8
  htmlDir: string | undefined;
9
9
  htmxDir: string | undefined;
10
+ mobileBundleDir: string | undefined;
11
+ mobileNativeDir: string | undefined;
10
12
  publicDir: string | undefined;
11
13
  reactDir: string | undefined;
12
14
  stylesDir: string | undefined;
@@ -12,7 +12,7 @@ export declare const createModuleUpdates: (changedFiles: string[], framework: st
12
12
  vueDir?: string;
13
13
  angularDir?: string;
14
14
  }) => {
15
- componentType: "server" | "client" | undefined;
15
+ componentType: "client" | "server" | undefined;
16
16
  framework: string;
17
17
  moduleKeys: string[];
18
18
  modulePaths: Record<string, string>;
@@ -10,6 +10,7 @@ type ModuleServerConfig = {
10
10
  };
11
11
  stylePreprocessors?: StylePreprocessorConfig;
12
12
  };
13
+ export declare const isReactFastRefreshSupported: () => boolean;
13
14
  export declare const warnIfReactFastRefreshUnsupported: () => void;
14
15
  export declare const warmCompilers: (frameworks: {
15
16
  svelte?: boolean;
@@ -17,7 +18,7 @@ export declare const warmCompilers: (frameworks: {
17
18
  }) => Promise<void>;
18
19
  export declare const createModuleServer: (config: ModuleServerConfig) => (pathname: string) => Promise<Response | undefined>;
19
20
  export declare const invalidateModule: (filePath: string) => void;
20
- export declare const warmCache: (pathname: string) => void;
21
+ export declare const warmCache: (pathname: string) => Promise<void>;
21
22
  declare let globalModuleServer: ((pathname: string) => Promise<Response | undefined> | Response | undefined) | null;
22
23
  export declare const SRC_URL_PREFIX = "/@src/";
23
24
  export declare const setGlobalModuleServer: (handler: typeof globalModuleServer) => void;
@@ -1,6 +1,6 @@
1
1
  import { BuildConfig } from '../../types/build';
2
2
  import type { ResolvedBuildPaths } from './configResolver';
3
- export declare const detectFramework: (filePath: string, resolved?: ResolvedBuildPaths) => "react" | "svelte" | "vue" | "angular" | "ember" | "html" | "unknown" | "ignored" | "styles" | "htmx" | "assets";
3
+ export declare const detectFramework: (filePath: string, resolved?: ResolvedBuildPaths) => "react" | "svelte" | "vue" | "angular" | "ember" | "html" | "htmx" | "unknown" | "ignored" | "styles" | "assets";
4
4
  export declare const getWatchPaths: (config: BuildConfig, resolved?: ResolvedBuildPaths) => string[];
5
5
  /** A path is ignored when it is NOT inside any of the configured
6
6
  * positive watch roots, OR when it falls inside a hard-denied
@@ -1,2 +1,2 @@
1
1
  export type ComponentType = 'client' | 'server';
2
- export declare const classifyComponent: (filePath: string) => "server" | "client";
2
+ export declare const classifyComponent: (filePath: string) => "client" | "server";
@@ -0,0 +1,42 @@
1
+ import type { HMRApplyKind, HMRApplyOutcome, HMRClientTarget } from '../../types/messages';
2
+ import type { AbsoluteAndroidWebViewSession } from './androidWebView';
3
+ export type AbsoluteAndroidHmrApply = {
4
+ clientMs: number;
5
+ duration: number;
6
+ kind?: HMRApplyKind;
7
+ outcome: HMRApplyOutcome;
8
+ serverMs: number;
9
+ target: HMRClientTarget;
10
+ updateId?: number;
11
+ };
12
+ export type AbsoluteAndroidRouteCheck = {
13
+ bodyText: string;
14
+ hmrConnected: boolean;
15
+ lastApply?: AbsoluteAndroidHmrApply;
16
+ nativeTarget: string;
17
+ overlayVisible: boolean;
18
+ route: string;
19
+ title: string;
20
+ url: string;
21
+ };
22
+ export declare const absoluteAndroidDevelopmentUrl: (port: number, route: string, https?: boolean) => string;
23
+ export declare const inspectAbsoluteAndroidRoute: (session: AbsoluteAndroidWebViewSession, options: {
24
+ https?: boolean;
25
+ port: number;
26
+ route: string;
27
+ timeoutMs?: number;
28
+ }) => Promise<{
29
+ route: string;
30
+ title: string;
31
+ url: string;
32
+ bodyText: string;
33
+ hmrConnected: boolean;
34
+ lastApply?: AbsoluteAndroidHmrApply | undefined;
35
+ nativeTarget: string;
36
+ overlayVisible: boolean;
37
+ }>;
38
+ export declare const waitForAbsoluteAndroidHmrApply: (session: AbsoluteAndroidWebViewSession, options: {
39
+ afterUpdateId?: number;
40
+ kind?: HMRApplyKind;
41
+ timeoutMs?: number;
42
+ }) => Promise<AbsoluteAndroidHmrApply>;
@@ -0,0 +1,105 @@
1
+ import { type AbsoluteMobileHost } from './emulatorDoctor';
2
+ import type { NormalizedAbsoluteMobileConfig } from './config';
3
+ export type AbsoluteAndroidCommandOptions = {
4
+ cwd?: string;
5
+ env?: Record<string, string | undefined>;
6
+ signal?: AbortSignal;
7
+ };
8
+ export type AbsoluteAndroidCommandResult = {
9
+ exitCode: number;
10
+ stderr: string;
11
+ stdout: string;
12
+ };
13
+ export type AbsoluteAndroidDevState = 'booting' | 'building' | 'closed' | 'closing' | 'configuring' | 'connecting' | 'failed' | 'forwarding' | 'installing' | 'checking-native' | 'launching' | 'ready' | 'streaming-logs' | 'syncing';
14
+ export type AbsoluteAndroidNativeLogEntry = {
15
+ level: 'debug' | 'error' | 'fatal' | 'info' | 'verbose' | 'warn';
16
+ message: string;
17
+ tag: string;
18
+ };
19
+ type AbsoluteAndroidLogStream = {
20
+ close: () => Promise<void>;
21
+ };
22
+ export type AbsoluteAndroidDevProject = {
23
+ adb: string;
24
+ androidRoot: string;
25
+ cap: string;
26
+ config: NormalizedAbsoluteMobileConfig;
27
+ emulator: string;
28
+ host: AbsoluteMobileHost;
29
+ nativeDirectory: string;
30
+ projectRoot: string;
31
+ };
32
+ export type AbsoluteAndroidDevSession = {
33
+ close: () => Promise<void>;
34
+ nativeCacheHit: boolean;
35
+ rebuild: () => Promise<AbsoluteAndroidDevSession>;
36
+ relaunch: () => Promise<void>;
37
+ serial: string;
38
+ state: AbsoluteAndroidDevState;
39
+ startedEmulator: boolean;
40
+ timings: Record<string, number>;
41
+ };
42
+ export type AbsoluteAndroidDevPhaseTiming = {
43
+ durationMs: number;
44
+ phase: AbsoluteAndroidDevState;
45
+ totalMs: number;
46
+ };
47
+ export type PrepareAbsoluteAndroidDevOptions = {
48
+ createNativeProject: boolean;
49
+ projectRoot: string;
50
+ run?: (command: string[], options?: AbsoluteAndroidCommandOptions) => Promise<number>;
51
+ };
52
+ export type StartAbsoluteAndroidDevOptions = {
53
+ capture?: (command: string[], options?: AbsoluteAndroidCommandOptions) => AbsoluteAndroidCommandResult;
54
+ log?: (message: string) => void;
55
+ nativeLog?: (entry: AbsoluteAndroidNativeLogEntry) => void;
56
+ onPhaseTiming?: (timing: AbsoluteAndroidDevPhaseTiming) => void;
57
+ onStateChange?: (state: AbsoluteAndroidDevState) => void;
58
+ https?: boolean;
59
+ /** Launch the locally embedded production web bundle while forwarding
60
+ * `port` only for its configured backend. No dev-server URL is written. */
61
+ embeddedBundle?: boolean;
62
+ port: number;
63
+ project: AbsoluteAndroidDevProject;
64
+ run?: (command: string[], options?: AbsoluteAndroidCommandOptions) => Promise<number>;
65
+ signal?: AbortSignal;
66
+ sleep?: (milliseconds: number) => Promise<void>;
67
+ spawn?: (command: string[], options?: AbsoluteAndroidCommandOptions) => void;
68
+ startNativeLogs?: (command: string[], options: AbsoluteAndroidCommandOptions, onLine: (line: string) => void) => AbsoluteAndroidLogStream;
69
+ };
70
+ export declare const redactAbsoluteAndroidLog: (value: string) => string;
71
+ export declare const isIgnorableAbsoluteAndroidLog: (entry: AbsoluteAndroidNativeLogEntry) => boolean;
72
+ export declare const parseAbsoluteAndroidLogLine: (line: string) => AbsoluteAndroidNativeLogEntry | null;
73
+ export declare const fingerprintAbsoluteAndroidNativeProject: (project: Pick<AbsoluteAndroidDevProject, "nativeDirectory">, options?: {
74
+ includePublicBundle?: boolean;
75
+ }) => Promise<string>;
76
+ export declare const repairAbsoluteAndroidDevSession: (projectRoot: string) => Promise<boolean>;
77
+ export declare const parseAdbDevices: (output: string) => string[];
78
+ export type AbsoluteAndroidGradleTask = 'assembleDebug' | 'assembleRelease' | 'bundleRelease';
79
+ export type BuildAbsoluteAndroidGradleOptions = {
80
+ capture?: NonNullable<StartAbsoluteAndroidDevOptions['capture']>;
81
+ env?: Record<string, string | undefined>;
82
+ gradleArguments?: readonly string[];
83
+ project: Pick<AbsoluteAndroidDevProject, 'androidRoot' | 'config' | 'host' | 'nativeDirectory' | 'projectRoot'>;
84
+ run?: NonNullable<StartAbsoluteAndroidDevOptions['run']>;
85
+ signal?: AbortSignal;
86
+ task: AbsoluteAndroidGradleTask;
87
+ };
88
+ export declare const buildAbsoluteAndroidGradleArtifact: (options: BuildAbsoluteAndroidGradleOptions) => Promise<{
89
+ artifactPath: string;
90
+ installPath: string;
91
+ }>;
92
+ export declare const prepareAbsoluteAndroidDevProject: (config: NormalizedAbsoluteMobileConfig, options: PrepareAbsoluteAndroidDevOptions) => Promise<AbsoluteAndroidDevProject>;
93
+ export declare const startAbsoluteAndroidDevSession: (options: StartAbsoluteAndroidDevOptions) => Promise<{
94
+ close: () => Promise<void>;
95
+ nativeCacheHit: boolean;
96
+ serial: string;
97
+ startedEmulator: boolean;
98
+ timings: {
99
+ [x: string]: number;
100
+ };
101
+ rebuild: () => Promise</*elided*/ any>;
102
+ relaunch: () => Promise<void>;
103
+ readonly state: AbsoluteAndroidDevState;
104
+ }>;
105
+ export {};
@@ -0,0 +1,19 @@
1
+ import { type AbsoluteAndroidDevProject } from './androidEmulatorController';
2
+ export type AbsoluteAndroidNativeChange = {
3
+ afterFingerprint: string;
4
+ beforeFingerprint: string;
5
+ paths: string[];
6
+ rootInputChanged: boolean;
7
+ };
8
+ export type AbsoluteAndroidNativeWatcher = {
9
+ close: () => void;
10
+ };
11
+ export type AbsoluteAndroidNativeWatcherOptions = {
12
+ debounceMs?: number;
13
+ onChange: (change: AbsoluteAndroidNativeChange) => Promise<void>;
14
+ onError?: (error: unknown) => void;
15
+ project: AbsoluteAndroidDevProject;
16
+ signal?: AbortSignal;
17
+ };
18
+ export declare const createAbsoluteAndroidNativeWatcher: (options: AbsoluteAndroidNativeWatcherOptions) => Promise<AbsoluteAndroidNativeWatcher>;
19
+ export declare const isAbsoluteAndroidNativeRootInput: (path: string) => boolean;
@@ -0,0 +1,51 @@
1
+ import { type AbsoluteMobileHost } from './emulatorDoctor';
2
+ import { type AbsoluteAndroidCommandOptions, type AbsoluteAndroidCommandResult } from './androidEmulatorController';
3
+ import type { NormalizedAbsoluteMobileConfig } from './config';
4
+ export declare const ABSOLUTE_ANDROID_RELEASE_FORMAT: 1;
5
+ export type AbsoluteAndroidReleaseMetadata = {
6
+ appBuild: string;
7
+ appId: string;
8
+ artifact: string;
9
+ bytes: number;
10
+ engine: 'capacitor';
11
+ format: typeof ABSOLUTE_ANDROID_RELEASE_FORMAT;
12
+ platform: 'android';
13
+ releaseId: string;
14
+ runtime: string;
15
+ sha256: string;
16
+ signed: boolean;
17
+ type: 'aab';
18
+ versionCode?: number;
19
+ };
20
+ export type BuildAbsoluteAndroidReleaseOptions = {
21
+ allowUnsigned?: boolean;
22
+ androidRoot?: string;
23
+ capture?: (command: string[], options?: AbsoluteAndroidCommandOptions) => AbsoluteAndroidCommandResult;
24
+ config: NormalizedAbsoluteMobileConfig;
25
+ host?: AbsoluteMobileHost;
26
+ jarsigner?: string | null;
27
+ outputDirectory?: string;
28
+ projectRoot: string;
29
+ run?: (command: string[], options?: AbsoluteAndroidCommandOptions) => Promise<number>;
30
+ prepareVersionCode?: (buildIdentity: string) => Promise<number>;
31
+ versionCode?: number;
32
+ };
33
+ export declare const buildAbsoluteAndroidRelease: (options: BuildAbsoluteAndroidReleaseOptions) => Promise<{
34
+ artifactPath: string;
35
+ metadata: {
36
+ artifact: string;
37
+ sha256: string;
38
+ type: "aab";
39
+ format: typeof ABSOLUTE_ANDROID_RELEASE_FORMAT;
40
+ bytes: number;
41
+ runtime: string;
42
+ releaseId: string;
43
+ appBuild: string;
44
+ appId: string;
45
+ platform: "android";
46
+ engine: "capacitor";
47
+ signed: boolean;
48
+ versionCode?: number | undefined;
49
+ };
50
+ releaseRoot: string;
51
+ }>;
@@ -0,0 +1,46 @@
1
+ type AndroidCommandResult = {
2
+ exitCode: number;
3
+ stderr: string;
4
+ stdout: string;
5
+ };
6
+ type AndroidCommandCapture = (command: string[]) => AndroidCommandResult;
7
+ type CdpTarget = {
8
+ description?: string;
9
+ title?: string;
10
+ type?: string;
11
+ url?: string;
12
+ webSocketDebuggerUrl?: string;
13
+ };
14
+ export type AbsoluteAndroidWebViewDiagnostic = {
15
+ level: 'error' | 'info' | 'warning';
16
+ message: string;
17
+ source: 'console' | 'exception' | 'log';
18
+ };
19
+ export type AbsoluteAndroidWebViewSession = {
20
+ close: () => Promise<void>;
21
+ diagnostics: readonly AbsoluteAndroidWebViewDiagnostic[];
22
+ evaluate: <T>(expression: string) => Promise<T>;
23
+ hostPort: number;
24
+ navigate: (url: string) => Promise<void>;
25
+ screenshot: (path: string) => Promise<string>;
26
+ serial: string;
27
+ socket: string;
28
+ target: CdpTarget;
29
+ waitFor: <T>(expression: string, options?: {
30
+ timeoutMs?: number;
31
+ }) => Promise<T>;
32
+ };
33
+ export type AttachAbsoluteAndroidWebViewOptions = {
34
+ adb: string;
35
+ appId: string;
36
+ capture?: AndroidCommandCapture;
37
+ fetch?: typeof fetch;
38
+ serial: string;
39
+ timeoutMs?: number;
40
+ };
41
+ export declare const parseAndroidWebViewDevtoolsSockets: (output: string, options: {
42
+ appId: string;
43
+ pids: readonly string[];
44
+ }) => string[];
45
+ export declare const attachAbsoluteAndroidWebView: (options: AttachAbsoluteAndroidWebViewOptions) => Promise<AbsoluteAndroidWebViewSession>;
46
+ export {};
@@ -0,0 +1,49 @@
1
+ import { Elysia } from 'elysia';
2
+ import type { MobileConfig } from '../../types/build';
3
+ import { type NormalizedAbsoluteMobileConfig } from './config';
4
+ export type AbsoluteAssociationRequest = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
5
+ export declare const ANDROID_ASSOCIATION_PATH = "/.well-known/assetlinks.json";
6
+ export declare const APPLE_ASSOCIATION_PATH = "/.well-known/apple-app-site-association";
7
+ export type AbsoluteMobileAssociationDocuments = {
8
+ android?: readonly [
9
+ {
10
+ relation: readonly ['delegate_permission/common.handle_all_urls'];
11
+ target: {
12
+ namespace: 'android_app';
13
+ package_name: string;
14
+ sha256_cert_fingerprints: string[];
15
+ };
16
+ }
17
+ ];
18
+ apple?: {
19
+ applinks: {
20
+ details: readonly [
21
+ {
22
+ appIDs: readonly [string];
23
+ components: readonly [{
24
+ '/': '/*';
25
+ }];
26
+ }
27
+ ];
28
+ };
29
+ };
30
+ };
31
+ export declare const createAbsoluteMobileAssociationDocuments: (config: NormalizedAbsoluteMobileConfig, options?: {
32
+ requireAll?: boolean;
33
+ }) => AbsoluteMobileAssociationDocuments;
34
+ export declare const createAbsoluteMobileAssociationPlugin: (mobile: MobileConfig | undefined, projectRoot: string, options?: {
35
+ requireAll?: boolean;
36
+ }) => Elysia<"", "local", import("elysia/types").DefaultSingleton, {
37
+ typebox: {};
38
+ error: [];
39
+ }, import("elysia/types").DefaultMetadata, {}, import("elysia/types").DefaultEphemeral, import("elysia/types").DefaultEphemeral>;
40
+ export declare const materializeAbsoluteMobileAssociationFiles: (config: NormalizedAbsoluteMobileConfig, outputDirectory: string) => Promise<{
41
+ root: string;
42
+ written: string[];
43
+ }>;
44
+ export declare const verifyAbsoluteMobileAssociationFiles: (config: NormalizedAbsoluteMobileConfig, request?: AbsoluteAssociationRequest) => Promise<{
45
+ results: {
46
+ platform: string;
47
+ url: string;
48
+ }[];
49
+ }>;
@@ -0,0 +1,10 @@
1
+ import type { AbsoluteMobilePageFramework } from './pageProtocol';
2
+ export declare const ABSOLUTE_MOBILE_ROUTE_DETAIL: "x-absolute-mobile";
3
+ export type AbsoluteMobileBuildPageMetadata = {
4
+ bundleKey: string;
5
+ contract: string;
6
+ framework: AbsoluteMobilePageFramework;
7
+ pageId: string;
8
+ propsSchemaHash: string;
9
+ };
10
+ export declare const parseAbsoluteMobileBuildPageMetadata: (value: unknown) => AbsoluteMobileBuildPageMetadata | undefined;
@@ -0,0 +1,9 @@
1
+ import type { MobileConfig } from '../../types/build';
2
+ export type FinalizeAbsoluteMobileBuildOptions = {
3
+ buildDirectory: string;
4
+ configPath?: string;
5
+ mobile: MobileConfig;
6
+ producerPath: string;
7
+ projectRoot: string;
8
+ };
9
+ export declare const finalizeAbsoluteMobileCompatibilityBuild: (options: FinalizeAbsoluteMobileBuildOptions) => Promise<import("./releaseArtifact").AbsoluteMobileCompatibilityArtifact>;
@@ -0,0 +1,24 @@
1
+ import type { Elysia } from 'elysia';
2
+ import { type AbsoluteMobileBuildPageMetadata } from './buildMetadata';
3
+ import { type AbsoluteMobileCompatibilityArtifact } from './releaseArtifact';
4
+ import type { AbsoluteMobileStoredCompatibilityRelease } from './artifactStore';
5
+ export type AbsoluteMobileBuildReleaseOptions = {
6
+ app: Pick<Elysia, 'compile' | 'modules' | 'routes'>;
7
+ appId: string;
8
+ buildDirectory: string;
9
+ manifest: Record<string, string>;
10
+ previousArtifacts?: readonly AbsoluteMobileCompatibilityArtifact[];
11
+ producerExport?: string;
12
+ producerModule?: string;
13
+ producerPath: string;
14
+ runtime: string;
15
+ };
16
+ export declare const buildAbsoluteMobileCompatibilityRelease: (options: AbsoluteMobileBuildReleaseOptions) => Promise<AbsoluteMobileStoredCompatibilityRelease>;
17
+ export declare const captureAbsoluteMobileRouteGraph: (app: Pick<Elysia, "compile" | "modules" | "routes">) => Promise<{
18
+ metadata: AbsoluteMobileBuildPageMetadata;
19
+ route: {
20
+ method: "GET" | "HEAD";
21
+ pageId: string;
22
+ pattern: string;
23
+ };
24
+ }[]>;
@@ -0,0 +1,42 @@
1
+ import type { NormalizedAbsoluteMobileConfig } from './config';
2
+ import type { AbsoluteMobileCompatibilityArtifact } from './releaseArtifact';
3
+ import type { AbsoluteMobileAuthManifest } from './nativeAuth';
4
+ export type AbsoluteCapacitorBundleOptions = {
5
+ artifact: AbsoluteMobileCompatibilityArtifact;
6
+ auth?: AbsoluteMobileAuthManifest;
7
+ buildDirectory: string;
8
+ config: NormalizedAbsoluteMobileConfig;
9
+ sync?: boolean;
10
+ };
11
+ export declare const materializeAbsoluteCapacitorWebBundle: (options: AbsoluteCapacitorBundleOptions) => Promise<{
12
+ sync?: {
13
+ background: {
14
+ endpoint: string;
15
+ intervalMinutes: number;
16
+ };
17
+ socketTickets: true;
18
+ } | undefined;
19
+ appId: string;
20
+ appName: string;
21
+ deepLinkHosts: string[];
22
+ deepLinkScheme: string | undefined;
23
+ entry: string;
24
+ format: 1;
25
+ pages: {
26
+ localStylePath?: string | undefined;
27
+ localBundlePath: string;
28
+ bundleHash: string;
29
+ bundlePath: string;
30
+ contract: string;
31
+ framework: import("./pageProtocol").AbsoluteMobilePageFramework;
32
+ pageId: string;
33
+ propsSchemaHash: string;
34
+ styleBundleHash?: string;
35
+ styleBundlePath?: string;
36
+ }[];
37
+ productionOrigin: string;
38
+ routes: import("./releaseArtifact").AbsoluteMobileCompatibilityRoute[];
39
+ runtime: string;
40
+ auth?: AbsoluteMobileAuthManifest | undefined;
41
+ appBuild: string;
42
+ }>;
@@ -0,0 +1,9 @@
1
+ import type { NormalizedAbsoluteMobileConfig } from './config';
2
+ export type WriteAbsoluteCapacitorConfigOptions = {
3
+ force?: boolean;
4
+ projectRoot: string;
5
+ };
6
+ export declare const writeAbsoluteCapacitorConfig: (config: NormalizedAbsoluteMobileConfig, options: WriteAbsoluteCapacitorConfigOptions) => Promise<{
7
+ changed: boolean;
8
+ path: string;
9
+ }>;