@absolutejs/absolute 0.20.0-beta.3 → 0.20.0-beta.31

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 (79) hide show
  1. package/README.md +167 -0
  2. package/dist/angular/browser.js +15 -1
  3. package/dist/angular/browser.js.map +3 -3
  4. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  5. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  6. package/dist/angular/index.js +341 -22
  7. package/dist/angular/index.js.map +8 -5
  8. package/dist/angular/server.js +341 -22
  9. package/dist/angular/server.js.map +8 -5
  10. package/dist/build.js +2058 -1105
  11. package/dist/build.js.map +17 -13
  12. package/dist/cli/index.js +4085 -1139
  13. package/dist/dev/client/cssUtils.ts +16 -2
  14. package/dist/dev/client/handlers/rebuild.ts +11 -1
  15. package/dist/dev/client/hmrClient.ts +32 -3
  16. package/dist/dev/client/hmrTiming.ts +14 -7
  17. package/dist/dev/client/syncDevtools.ts +237 -0
  18. package/dist/index.js +2483 -1367
  19. package/dist/index.js.map +27 -22
  20. package/dist/mobile/browser.js +123 -1
  21. package/dist/mobile/browser.js.map +6 -4
  22. package/dist/mobile/index.js +2948 -328
  23. package/dist/mobile/index.js.map +27 -13
  24. package/dist/mobile/remoteMacAgentEntry.js +29 -0
  25. package/dist/mobile/shellAuth.js +36 -0
  26. package/dist/mobile/shellBootstrap.js +806 -0
  27. package/dist/mobile/shellSync.js +173 -0
  28. package/dist/src/angular/pageHandler.d.ts +3 -0
  29. package/dist/src/build/pwa.d.ts +16 -0
  30. package/dist/src/cli/config/server.d.ts +1 -1
  31. package/dist/src/core/devBuild.d.ts +1 -0
  32. package/dist/src/core/pageHandlers.d.ts +11 -2
  33. package/dist/src/core/prepare.d.ts +24 -0
  34. package/dist/src/mobile/androidEmulatorController.d.ts +6 -1
  35. package/dist/src/mobile/androidTestReport.d.ts +14 -0
  36. package/dist/src/mobile/androidUpgradeConformance.d.ts +47 -0
  37. package/dist/src/mobile/androidWebView.d.ts +1 -0
  38. package/dist/src/mobile/browser.d.ts +1 -0
  39. package/dist/src/mobile/buildPipeline.d.ts +1 -0
  40. package/dist/src/mobile/capacitorBundle.d.ts +22 -1
  41. package/dist/src/mobile/client.d.ts +4 -0
  42. package/dist/src/mobile/config.d.ts +1 -0
  43. package/dist/src/mobile/devDeviceAdapter.d.ts +3 -0
  44. package/dist/src/mobile/deviceCapabilities.d.ts +46 -0
  45. package/dist/src/mobile/index.d.ts +8 -0
  46. package/dist/src/mobile/iosTestReport.d.ts +23 -0
  47. package/dist/src/mobile/nativeAuth.d.ts +17 -0
  48. package/dist/src/mobile/nativeBackgroundSync.d.ts +4 -0
  49. package/dist/src/mobile/nativeDeviceCapabilities.d.ts +6 -0
  50. package/dist/src/mobile/nativeTestReport.d.ts +85 -0
  51. package/dist/src/mobile/releaseArtifact.d.ts +2 -0
  52. package/dist/src/mobile/remoteMacAgent.d.ts +2 -0
  53. package/dist/src/mobile/remoteMacAgentEntry.d.ts +1 -0
  54. package/dist/src/mobile/remoteMacProtocol.d.ts +114 -0
  55. package/dist/src/mobile/remoteMacWire.d.ts +2 -0
  56. package/dist/src/mobile/shellAuth.d.ts +15 -0
  57. package/dist/src/mobile/shellBootstrap.d.ts +22 -1
  58. package/dist/src/mobile/shellHttp.d.ts +2 -0
  59. package/dist/src/mobile/shellPush.d.ts +11 -0
  60. package/dist/src/mobile/shellSync.d.ts +47 -0
  61. package/dist/src/mobile/staticDocument.d.ts +5 -0
  62. package/dist/src/mobile/syncRemediation.d.ts +10 -0
  63. package/dist/src/mobile/syncSchema.d.ts +9 -0
  64. package/dist/src/mobile/transport.d.ts +16 -1
  65. package/dist/src/plugins/imageOptimizer.d.ts +1 -1
  66. package/dist/src/svelte/pageHandler.d.ts +3 -0
  67. package/dist/src/utils/imageProcessing.d.ts +3 -0
  68. package/dist/src/utils/loadConfig.d.ts +1 -0
  69. package/dist/src/vue/pageHandler.d.ts +3 -0
  70. package/dist/svelte/index.js +312 -23
  71. package/dist/svelte/index.js.map +7 -4
  72. package/dist/svelte/server.js +307 -18
  73. package/dist/svelte/server.js.map +7 -4
  74. package/dist/types/build.d.ts +29 -0
  75. package/dist/vue/index.js +312 -23
  76. package/dist/vue/index.js.map +7 -4
  77. package/dist/vue/server.js +307 -18
  78. package/dist/vue/server.js.map +7 -4
  79. package/package.json +38 -10
@@ -0,0 +1,173 @@
1
+ // src/mobile/shellSync.ts
2
+ import { lifecycle, network } from "@absolutejs/devices";
3
+ import {
4
+ createCapacitorSyncLocalStore,
5
+ createCapacitorSyncProtection,
6
+ AbsoluteBackgroundSync,
7
+ configureCapacitorBackgroundSync,
8
+ installCapacitorSyncLifecycle
9
+ } from "@absolutejs/sync-capacitor";
10
+ import { installSyncClientRuntimeTransport } from "@absolutejs/sync/client/runtime";
11
+
12
+ // src/mobile/syncRemediation.ts
13
+ import {
14
+ discardSyncRuntimeDeadLetter,
15
+ inspectSyncRuntime,
16
+ rebaseSyncRuntimeDeadLetter,
17
+ retrySyncRuntimeDeadLetter
18
+ } from "@absolutejs/sync/client/runtime";
19
+ var REMEDIATION_REGISTRY = Symbol.for("@absolutejs/mobile-sync-remediation");
20
+ var isRegistry = (value) => typeof value === "object" && value !== null && Array.isArray(Reflect.get(value, "installations"));
21
+ var resolveRegistry = () => {
22
+ const existing = Reflect.get(globalThis, REMEDIATION_REGISTRY);
23
+ if (isRegistry(existing))
24
+ return existing;
25
+ const created = { installations: [] };
26
+ Object.defineProperty(globalThis, REMEDIATION_REGISTRY, {
27
+ configurable: false,
28
+ enumerable: false,
29
+ value: created,
30
+ writable: false
31
+ });
32
+ return created;
33
+ };
34
+ var registry = resolveRegistry();
35
+ var installAbsoluteMobileSyncRemediation = (bridge = {
36
+ discard: discardSyncRuntimeDeadLetter,
37
+ inspect: inspectSyncRuntime,
38
+ rebase: rebaseSyncRuntimeDeadLetter,
39
+ retry: retrySyncRuntimeDeadLetter
40
+ }) => {
41
+ const installation = { bridge };
42
+ registry.installations.push(installation);
43
+ return () => {
44
+ const index = registry.installations.indexOf(installation);
45
+ if (index >= 0)
46
+ registry.installations.splice(index, 1);
47
+ };
48
+ };
49
+
50
+ // src/mobile/shellSync.ts
51
+ var reloadShell = () => globalThis.location.reload();
52
+ var ABSOLUTE_MOBILE_SYNC_SCHEMA_EVENT = "absolute:sync-schema";
53
+ var ABSOLUTE_MOBILE_SYNC_SCHEMA_STATE_KEY = "absolutejs.mobile.sync.schema-state";
54
+ var ABSOLUTE_MOBILE_SYNC_STATUS_EVENT = "absolute:sync-status";
55
+ var schemaStateSymbol = () => Symbol.for(ABSOLUTE_MOBILE_SYNC_SCHEMA_STATE_KEY);
56
+ var readAbsoluteMobileSyncSchemaState = () => {
57
+ const value = Reflect.get(globalThis, schemaStateSymbol());
58
+ if (typeof value !== "object" || value === null)
59
+ return;
60
+ const state = Reflect.get(value, "state");
61
+ if (state === "preparing")
62
+ return { state };
63
+ if (state === "failed")
64
+ return schemaFailureState(value);
65
+ const minimumCompatibleVersion = Reflect.get(value, "minimumCompatibleVersion");
66
+ const storedVersion = Reflect.get(value, "storedVersion");
67
+ const targetVersion = Reflect.get(value, "targetVersion");
68
+ if (state !== "ready" || typeof minimumCompatibleVersion !== "number" || typeof storedVersion !== "number" || typeof targetVersion !== "number")
69
+ return;
70
+ return {
71
+ minimumCompatibleVersion,
72
+ state,
73
+ storedVersion,
74
+ targetVersion
75
+ };
76
+ };
77
+ var reportShellSchemaState = (state) => {
78
+ Reflect.set(globalThis, schemaStateSymbol(), state);
79
+ globalThis.dispatchEvent(new CustomEvent(ABSOLUTE_MOBILE_SYNC_SCHEMA_EVENT, { detail: state }));
80
+ };
81
+ var schemaFailureState = (error) => {
82
+ if (typeof error !== "object" || error === null)
83
+ return { code: "UNKNOWN", state: "failed" };
84
+ const rawCode = Reflect.get(error, "code");
85
+ const code = rawCode === "INVALID_PLAN" || rawCode === "MIGRATION_MISSING" || rawCode === "SCHEMA_TOO_NEW" || rawCode === "SCHEMA_TOO_OLD" ? rawCode : "UNKNOWN";
86
+ const storedVersion = Reflect.get(error, "storedVersion");
87
+ const targetVersion = Reflect.get(error, "targetVersion");
88
+ return {
89
+ code,
90
+ state: "failed",
91
+ ...typeof storedVersion === "number" ? { storedVersion } : {},
92
+ ...typeof targetVersion === "number" ? { targetVersion } : {}
93
+ };
94
+ };
95
+ var reportShellStatus = (status) => globalThis.dispatchEvent(new CustomEvent(ABSOLUTE_MOBILE_SYNC_STATUS_EVENT, { detail: status }));
96
+ var installAbsoluteMobileShellSync = (auth, config, options = {}) => {
97
+ const namespace = auth.principal?.namespace;
98
+ const store = namespace ? options.createStore?.({
99
+ protection: createCapacitorSyncProtection(),
100
+ storageSchema: config?.storageSchema
101
+ }) ?? createCapacitorSyncLocalStore({
102
+ protection: createCapacitorSyncProtection(),
103
+ storageSchema: config?.storageSchema
104
+ }) : undefined;
105
+ const installLifecycle = options.installLifecycle ?? installCapacitorSyncLifecycle;
106
+ const reportStatus = options.reportStatus ?? reportShellStatus;
107
+ const reportSchemaState = options.reportSchemaState ?? reportShellSchemaState;
108
+ const configureBackground = options.configureBackground ?? configureCapacitorBackgroundSync;
109
+ const clearBackground = options.clearBackground ?? (() => AbsoluteBackgroundSync.clear());
110
+ if (store?.getSchemaStatus) {
111
+ reportSchemaState({ state: "preparing" });
112
+ store.getSchemaStatus().then(reportSchemaState).catch((error) => reportSchemaState(schemaFailureState(error)));
113
+ }
114
+ if (namespace && config) {
115
+ configureBackground({
116
+ clientId: auth.clientId,
117
+ endpoint: config.background.endpoint,
118
+ intervalMinutes: config.background.intervalMinutes,
119
+ issuer: auth.issuer,
120
+ namespace
121
+ }).catch((error) => console.error("[Absolute Mobile] Background Sync configuration failed:", error));
122
+ } else {
123
+ clearBackground().catch(() => {
124
+ return;
125
+ });
126
+ }
127
+ const removeTransport = installSyncClientRuntimeTransport({
128
+ ...namespace && store ? { durable: { namespace, store } } : {},
129
+ socketTicket: auth.socketTicket,
130
+ registerClient: (client) => {
131
+ let active2 = true;
132
+ const removeStatus = client.subscribeStatus(reportStatus);
133
+ const reportLifecycleFailure = (error) => console.error("[Absolute Mobile] Sync lifecycle installation failed:", error);
134
+ const removal = installLifecycle({
135
+ client,
136
+ lifecycle,
137
+ network
138
+ }).catch((error) => {
139
+ reportLifecycleFailure(error);
140
+ return;
141
+ });
142
+ return () => {
143
+ if (!active2)
144
+ return;
145
+ active2 = false;
146
+ removeStatus();
147
+ removal.then((remove) => remove?.());
148
+ };
149
+ }
150
+ });
151
+ const removeRemediation = installAbsoluteMobileSyncRemediation();
152
+ const reload = options.reload ?? reloadShell;
153
+ const removePrincipalListener = auth.onPrincipalChange((principal) => {
154
+ if (principal?.namespace !== namespace)
155
+ reload();
156
+ });
157
+ let active = true;
158
+ return () => {
159
+ if (!active)
160
+ return;
161
+ active = false;
162
+ removePrincipalListener();
163
+ removeRemediation();
164
+ removeTransport();
165
+ };
166
+ };
167
+ export {
168
+ readAbsoluteMobileSyncSchemaState,
169
+ installAbsoluteMobileShellSync,
170
+ ABSOLUTE_MOBILE_SYNC_STATUS_EVENT,
171
+ ABSOLUTE_MOBILE_SYNC_SCHEMA_STATE_KEY,
172
+ ABSOLUTE_MOBILE_SYNC_SCHEMA_EVENT
173
+ };
@@ -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;
@@ -0,0 +1,16 @@
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, projectRoot, write }: {
10
+ buildPath: string;
11
+ config: PwaConfig;
12
+ generatedRoot: string;
13
+ projectRoot: string;
14
+ /** Incremental HMR builds reuse the stable artifacts from the full build. */
15
+ write?: boolean;
16
+ }) => Promise<AbsolutePwaBuildArtifacts>;
@@ -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,5 +1,6 @@
1
1
  import type { BuildConfig } from '../../types/build';
2
2
  declare const FRAMEWORK_DIR_KEYS: readonly ["reactDirectory", "svelteDirectory", "vueDirectory", "htmlDirectory", "htmxDirectory", "angularDirectory"];
3
+ export declare const collectDepVendorSourceDirs: (config: BuildConfig) => string[];
3
4
  /** Result of `detectConfigChanges`: which framework dir keys were
4
5
  * added and which were removed in the new config. The additive case
5
6
  * is handled in-place by this function (vendor paths set, watchers
@@ -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 {};
@@ -37,6 +37,18 @@ export declare const prepare: (configOrPath?: string) => Promise<{
37
37
  error: never;
38
38
  };
39
39
  };
40
+ "native-device-adapter.js": {
41
+ get: {
42
+ body: unknown;
43
+ params: {};
44
+ query: unknown;
45
+ headers: unknown;
46
+ response: {
47
+ 200: Response;
48
+ };
49
+ error: never;
50
+ };
51
+ };
40
52
  };
41
53
  ".well-known": {
42
54
  appspecific: {
@@ -173,6 +185,18 @@ export declare const prepare: (configOrPath?: string) => Promise<{
173
185
  error: never;
174
186
  };
175
187
  };
188
+ "native-device-adapter.js": {
189
+ get: {
190
+ body: unknown;
191
+ params: {};
192
+ query: unknown;
193
+ headers: unknown;
194
+ response: {
195
+ 200: Response;
196
+ };
197
+ error: never;
198
+ };
199
+ };
176
200
  };
177
201
  ".well-known": {
178
202
  appspecific: {
@@ -56,6 +56,9 @@ export type StartAbsoluteAndroidDevOptions = {
56
56
  onPhaseTiming?: (timing: AbsoluteAndroidDevPhaseTiming) => void;
57
57
  onStateChange?: (state: AbsoluteAndroidDevState) => void;
58
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;
59
62
  port: number;
60
63
  project: AbsoluteAndroidDevProject;
61
64
  run?: (command: string[], options?: AbsoluteAndroidCommandOptions) => Promise<number>;
@@ -67,7 +70,9 @@ export type StartAbsoluteAndroidDevOptions = {
67
70
  export declare const redactAbsoluteAndroidLog: (value: string) => string;
68
71
  export declare const isIgnorableAbsoluteAndroidLog: (entry: AbsoluteAndroidNativeLogEntry) => boolean;
69
72
  export declare const parseAbsoluteAndroidLogLine: (line: string) => AbsoluteAndroidNativeLogEntry | null;
70
- export declare const fingerprintAbsoluteAndroidNativeProject: (project: Pick<AbsoluteAndroidDevProject, "nativeDirectory">) => Promise<string>;
73
+ export declare const fingerprintAbsoluteAndroidNativeProject: (project: Pick<AbsoluteAndroidDevProject, "nativeDirectory">, options?: {
74
+ includePublicBundle?: boolean;
75
+ }) => Promise<string>;
71
76
  export declare const repairAbsoluteAndroidDevSession: (projectRoot: string) => Promise<boolean>;
72
77
  export declare const parseAdbDevices: (output: string) => string[];
73
78
  export type AbsoluteAndroidGradleTask = 'assembleDebug' | 'assembleRelease' | 'bundleRelease';
@@ -0,0 +1,14 @@
1
+ import { type AbsoluteNativeAutomatedRun } from './nativeTestReport';
2
+ export type AbsoluteAndroidAutomatedResult = Omit<AbsoluteNativeAutomatedRun, 'platform' | 'targetId' | 'targetKind'> & {
3
+ serial: string;
4
+ };
5
+ type CreateAbsoluteAndroidTestReportOptions = {
6
+ absolutejsVersion: string;
7
+ adbVersion: string;
8
+ bunVersion: string;
9
+ generatedAt?: string;
10
+ host: string;
11
+ run: AbsoluteAndroidAutomatedResult;
12
+ };
13
+ export declare const createAbsoluteAndroidTestReport: (options: CreateAbsoluteAndroidTestReportOptions) => import("./nativeTestReport").AbsoluteNativeTestReport;
14
+ export {};
@@ -0,0 +1,47 @@
1
+ export type AbsoluteAndroidInstalledApp = {
2
+ appId: string;
3
+ dataDirectory?: string;
4
+ firstInstallTime?: string;
5
+ lastUpdateTime?: string;
6
+ uid?: string;
7
+ versionCode?: number;
8
+ versionName?: string;
9
+ };
10
+ export type AbsoluteAndroidUpgradeState = {
11
+ authCredential: boolean;
12
+ pendingOperations: boolean;
13
+ syncDatabase: boolean;
14
+ };
15
+ export type AbsoluteAndroidCompatibilityMatrix = {
16
+ nPlusOne: 'compatible' | 'upgrade-required';
17
+ nPlusTwo: 'compatible' | 'upgrade-required';
18
+ nPlusThree: 'compatible' | 'upgrade-required';
19
+ rollback: 'compatible' | 'failed';
20
+ };
21
+ export type AbsoluteAndroidUpgradeConformanceResult = {
22
+ after: AbsoluteAndroidInstalledApp;
23
+ before: AbsoluteAndroidInstalledApp;
24
+ compatibility?: AbsoluteAndroidCompatibilityMatrix;
25
+ durationMs: number;
26
+ installMs: number;
27
+ outcome: 'fail' | 'pass';
28
+ state: AbsoluteAndroidUpgradeState;
29
+ };
30
+ export type AbsoluteAndroidUpgradeCommandResult = {
31
+ exitCode: number;
32
+ stderr: string;
33
+ stdout: string;
34
+ };
35
+ export type RunAbsoluteAndroidUpgradeConformanceOptions = {
36
+ adb: string;
37
+ afterInstall?: (installed: AbsoluteAndroidInstalledApp) => Promise<void>;
38
+ apkPath: string;
39
+ appId: string;
40
+ compatibility?: AbsoluteAndroidCompatibilityMatrix;
41
+ run?: (command: string[]) => Promise<AbsoluteAndroidUpgradeCommandResult>;
42
+ serial: string;
43
+ verifyState: () => Promise<AbsoluteAndroidUpgradeState>;
44
+ };
45
+ export declare const inspectAbsoluteAndroidInstalledApp: (adb: string, serial: string, appId: string, run?: (command: string[]) => Promise<AbsoluteAndroidUpgradeCommandResult>) => Promise<AbsoluteAndroidInstalledApp>;
46
+ export declare const parseAbsoluteAndroidInstalledApp: (appId: string, output: string) => AbsoluteAndroidInstalledApp | null;
47
+ export declare const runAbsoluteAndroidUpgradeConformance: (options: RunAbsoluteAndroidUpgradeConformanceOptions) => Promise<AbsoluteAndroidUpgradeConformanceResult>;
@@ -25,6 +25,7 @@ export type AbsoluteAndroidWebViewSession = {
25
25
  screenshot: (path: string) => Promise<string>;
26
26
  serial: string;
27
27
  socket: string;
28
+ tap: (x: number, y: number) => Promise<void>;
28
29
  target: CdpTarget;
29
30
  waitFor: <T>(expression: string, options?: {
30
31
  timeoutMs?: number;
@@ -1,2 +1,3 @@
1
1
  export * from './client';
2
2
  export * from './pageProtocol';
3
+ export * from './syncRemediation';
@@ -1,6 +1,7 @@
1
1
  import type { MobileConfig } from '../../types/build';
2
2
  export type FinalizeAbsoluteMobileBuildOptions = {
3
3
  buildDirectory: string;
4
+ configPath?: string;
4
5
  mobile: MobileConfig;
5
6
  producerPath: string;
6
7
  projectRoot: string;
@@ -1,19 +1,36 @@
1
1
  import type { NormalizedAbsoluteMobileConfig } from './config';
2
2
  import type { AbsoluteMobileCompatibilityArtifact } from './releaseArtifact';
3
+ import type { AbsoluteMobileAuthManifest } from './nativeAuth';
4
+ import type { SyncLocalStoreSchemaBundle } from '@absolutejs/sync/client';
5
+ import type { AbsoluteDeviceCapabilityPlan } from './deviceCapabilities';
3
6
  export type AbsoluteCapacitorBundleOptions = {
4
7
  artifact: AbsoluteMobileCompatibilityArtifact;
8
+ auth?: AbsoluteMobileAuthManifest;
5
9
  buildDirectory: string;
6
10
  config: NormalizedAbsoluteMobileConfig;
11
+ deviceCapabilities: AbsoluteDeviceCapabilityPlan;
12
+ projectRoot: string;
13
+ sync?: boolean;
14
+ syncSchema?: SyncLocalStoreSchemaBundle;
7
15
  };
8
16
  export declare const materializeAbsoluteCapacitorWebBundle: (options: AbsoluteCapacitorBundleOptions) => Promise<{
9
- appBuild: string;
17
+ sync?: {
18
+ background: {
19
+ endpoint: string;
20
+ intervalMinutes: number;
21
+ };
22
+ socketTickets: true;
23
+ storageSchema: SyncLocalStoreSchemaBundle;
24
+ } | undefined;
10
25
  appId: string;
11
26
  appName: string;
12
27
  deepLinkHosts: string[];
13
28
  deepLinkScheme: string | undefined;
29
+ deviceCapabilities: string[];
14
30
  entry: string;
15
31
  format: 1;
16
32
  pages: {
33
+ localStylePath?: string | undefined;
17
34
  localBundlePath: string;
18
35
  bundleHash: string;
19
36
  bundlePath: string;
@@ -21,8 +38,12 @@ export declare const materializeAbsoluteCapacitorWebBundle: (options: AbsoluteCa
21
38
  framework: import("./pageProtocol").AbsoluteMobilePageFramework;
22
39
  pageId: string;
23
40
  propsSchemaHash: string;
41
+ styleBundleHash?: string;
42
+ styleBundlePath?: string;
24
43
  }[];
25
44
  productionOrigin: string;
26
45
  routes: import("./releaseArtifact").AbsoluteMobileCompatibilityRoute[];
27
46
  runtime: string;
47
+ auth?: AbsoluteMobileAuthManifest | undefined;
48
+ appBuild: string;
28
49
  }>;
@@ -1,6 +1,9 @@
1
1
  import { type AbsoluteMobilePageResult, type AbsoluteMobileUpgradeRequiredResult } from './pageProtocol';
2
2
  type AbsoluteMobileClientTarget = {
3
+ __ABSOLUTE_PAGE_DISPOSE__?: () => Promise<void> | void;
4
+ __ABSOLUTE_PAGE_READY__?: Promise<unknown>;
3
5
  __ABSOLUTE_PAGE_RENDER_MODE__?: 'client' | 'hydrate';
6
+ __ABS_ANGULAR_REQUEST_CONTEXT__?: Record<string, unknown>;
4
7
  __INITIAL_PROPS__?: Record<string, unknown>;
5
8
  };
6
9
  export type AbsoluteMobilePageLoader = (input: {
@@ -20,6 +23,7 @@ export declare class AbsoluteMobilePageProtocolError extends Error {
20
23
  readonly code: 'invalid-envelope' | 'invalid-props' | 'server-error' | 'server-rejected-request';
21
24
  constructor(code: AbsoluteMobilePageProtocolError['code'], message: string);
22
25
  }
26
+ export declare const disposeAbsoluteMobilePage: (target?: AbsoluteMobileClientTarget) => Promise<void>;
23
27
  export declare const activateAbsoluteMobilePage: (value: unknown, options: AbsoluteMobilePageActivationOptions) => Promise<AbsoluteMobileUpgradeRequiredResult | {
24
28
  contract: string;
25
29
  kind: "rendered";
@@ -13,5 +13,6 @@ export type NormalizedAbsoluteMobileConfig = {
13
13
  nativeProjectDirectory: string;
14
14
  platforms: MobilePlatform[];
15
15
  productionOrigin: string;
16
+ pushAndroidGoogleServicesFile: string;
16
17
  };
17
18
  export declare const normalizeAbsoluteMobileConfig: (config: MobileConfig, projectRoot: string) => NormalizedAbsoluteMobileConfig;
@@ -0,0 +1,3 @@
1
+ import type { MobileConfig } from '../../types/build';
2
+ export declare const absoluteNativeDevAdapterSource: (projectRoot: string, mobile: MobileConfig, resolveModule?: (specifier: string) => string) => string;
3
+ export declare const buildAbsoluteNativeDevAdapter: (projectRoot: string, mobile: MobileConfig) => Promise<string>;
@@ -0,0 +1,46 @@
1
+ export type AbsoluteDeviceCapabilityProvider = {
2
+ factory: string;
3
+ module: string;
4
+ native?: {
5
+ android?: {
6
+ permissions: string[];
7
+ };
8
+ ios?: {
9
+ privacyAccessedApis?: Partial<Record<AbsoluteIosPrivacyAccessedApi, string[]>>;
10
+ pushNotifications?: true;
11
+ systemBars?: true;
12
+ usageDescriptions?: AbsoluteIosUsageDescription[];
13
+ };
14
+ };
15
+ packages: string[];
16
+ };
17
+ export type AbsoluteIosUsageDescription = 'camera' | 'location-always' | 'location-when-in-use' | 'photo-library' | 'photo-library-add';
18
+ export type AbsoluteIosPrivacyAccessedApi = 'NSPrivacyAccessedAPICategoryFileTimestamp';
19
+ export type AbsoluteDeviceCapabilityPlan = {
20
+ capabilities: string[];
21
+ providers: Record<string, AbsoluteDeviceCapabilityProvider>;
22
+ requiredPackages: string[];
23
+ };
24
+ export declare const absoluteDeviceNativeRequirements: (plan: AbsoluteDeviceCapabilityPlan) => {
25
+ androidPermissions: string[];
26
+ iosPrivacyAccessedApis: {
27
+ api: "NSPrivacyAccessedAPICategoryFileTimestamp";
28
+ reasons: string[];
29
+ }[];
30
+ iosPushNotifications: boolean;
31
+ iosSystemBars: boolean;
32
+ iosUsageDescriptions: AbsoluteIosUsageDescription[];
33
+ };
34
+ export declare const loadAbsoluteDeviceCapabilityProviders: (projectRoot: string) => {
35
+ [k: string]: AbsoluteDeviceCapabilityProvider;
36
+ };
37
+ export declare const assertAbsoluteDeviceCapabilityPackages: (projectRoot: string, plan: AbsoluteDeviceCapabilityPlan) => void;
38
+ export declare const directAbsoluteProjectPackages: (projectRoot: string) => Set<string>;
39
+ export declare const discoverAbsoluteDeviceCapabilities: (projectRoot: string, providers?: {
40
+ [k: string]: AbsoluteDeviceCapabilityProvider;
41
+ }) => string[];
42
+ export declare const missingAbsoluteDeviceCapabilityPackages: (plan: AbsoluteDeviceCapabilityPlan, directPackages: ReadonlySet<string>) => string[];
43
+ /** Framework-agnostic capability discovery used by web/PWA builds. This does
44
+ * not load a native provider manifest, so Web Push never requires Capacitor. */
45
+ export declare const projectImportsAbsoluteDeviceCapability: (projectRoot: string, capability: string) => boolean;
46
+ export declare const resolveAbsoluteDeviceCapabilityPlan: (projectRoot: string) => AbsoluteDeviceCapabilityPlan;
@@ -1,24 +1,32 @@
1
1
  export * from './artifactStore';
2
2
  export * from './androidRelease';
3
+ export * from './androidUpgradeConformance';
3
4
  export * from './iosRelease';
4
5
  export * from './iosConformance';
5
6
  export * from './iosSimulatorController';
6
7
  export * from './iosNativeWatcher';
8
+ export * from './remoteMacProtocol';
7
9
  export * from './associationFiles';
8
10
  export * from './buildMetadata';
9
11
  export * from './buildPipeline';
10
12
  export * from './buildRelease';
11
13
  export * from './capacitorBundle';
14
+ export * from './syncSchema';
15
+ export * from './syncRemediation';
16
+ export * from './deviceCapabilities';
12
17
  export * from './capacitorProject';
13
18
  export * from './config';
14
19
  export * from './client';
15
20
  export * from './compatibilityDispatcher';
16
21
  export * from './materializedBundle';
17
22
  export * from './nativeDeepLinks';
23
+ export * from './nativeDeviceCapabilities';
24
+ export * from './nativeAuth';
18
25
  export * from './pageProtocol';
19
26
  export * from './producerContext';
20
27
  export * from './releaseArtifact';
21
28
  export * from './releasePublisher';
22
29
  export * from './routeMetadataTransform';
23
30
  export * from './routeMatcher';
31
+ export * from './shellHttp';
24
32
  export * from './transport';
@@ -0,0 +1,23 @@
1
+ import { type AbsoluteNativeAutomatedRun, type AbsoluteNativeTestReport } from './nativeTestReport';
2
+ export type AbsoluteIosAutomatedResult = Omit<AbsoluteNativeAutomatedRun, 'platform' | 'targetId' | 'targetKind'> & {
3
+ udid: string;
4
+ };
5
+ export type AbsoluteIosPartnerReport = AbsoluteNativeTestReport;
6
+ type CreateAbsoluteIosPartnerReportOptions = {
7
+ absolutejsVersion: string;
8
+ bunVersion: string;
9
+ generatedAt?: string;
10
+ macosVersion: string;
11
+ run: AbsoluteIosAutomatedResult;
12
+ xcodeVersion: string;
13
+ };
14
+ export declare const readPackageVersionForIosReport: (packageJsonPath: string) => Promise<string>;
15
+ export declare const renderAbsoluteIosPartnerReport: (report: AbsoluteNativeTestReport) => string;
16
+ export declare const sanitizeIosReportText: (value: string) => string;
17
+ export declare const writeAbsoluteIosPartnerReport: (directory: string, report: AbsoluteNativeTestReport) => Promise<{
18
+ directory: string;
19
+ jsonPath: string;
20
+ markdownPath: string;
21
+ }>;
22
+ export declare const createAbsoluteIosPartnerReport: (options: CreateAbsoluteIosPartnerReportOptions) => AbsoluteNativeTestReport;
23
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { NormalizedAbsoluteMobileConfig } from './config';
2
+ export declare const ABSOLUTE_AUTH_PACKAGE: "@absolutejs/auth";
3
+ export declare const ABSOLUTE_NATIVE_AUTH_CLIENTS_ENV: "ABSOLUTE_AUTH_NATIVE_CLIENTS";
4
+ export declare const ABSOLUTE_NATIVE_AUTH_SCOPES: readonly ["openid", "profile"];
5
+ export declare const ABSOLUTE_SYNC_PACKAGE: "@absolutejs/sync";
6
+ export type AbsoluteMobileAuthManifest = {
7
+ clientId: string;
8
+ issuer: string;
9
+ redirectUri: string;
10
+ scopes: string[];
11
+ };
12
+ export declare const createAbsoluteMobileAuthManifest: (config: NormalizedAbsoluteMobileConfig) => AbsoluteMobileAuthManifest;
13
+ export declare const installAbsoluteMobileAuthEnvironment: (projectRoot: string, config: NormalizedAbsoluteMobileConfig) => AbsoluteMobileAuthManifest | undefined;
14
+ export declare const projectUsesAbsoluteAuth: (projectRoot: string) => boolean;
15
+ export declare const projectUsesAbsoluteSync: (projectRoot: string) => boolean;
16
+ export declare const resolveAbsoluteMobileAuthManifest: (projectRoot: string, config: NormalizedAbsoluteMobileConfig) => AbsoluteMobileAuthManifest | undefined;
17
+ export declare const serializeAbsoluteMobileAuthEnvironment: (config: NormalizedAbsoluteMobileConfig, auth: AbsoluteMobileAuthManifest | undefined) => string | undefined;
@@ -0,0 +1,4 @@
1
+ import type { NormalizedAbsoluteMobileConfig } from './config';
2
+ export declare const applyAbsoluteNativeBackgroundSync: (projectRoot: string, config: NormalizedAbsoluteMobileConfig, platforms?: import("..").MobilePlatform[]) => Promise<{
3
+ changed: boolean;
4
+ }>;
@@ -0,0 +1,6 @@
1
+ import type { MobilePlatform } from '../../types/build';
2
+ import type { NormalizedAbsoluteMobileConfig } from './config';
3
+ import { type AbsoluteDeviceCapabilityPlan } from './deviceCapabilities';
4
+ export declare const applyAbsoluteNativeDeviceCapabilities: (projectRoot: string, config: NormalizedAbsoluteMobileConfig, platforms?: readonly MobilePlatform[], plan?: AbsoluteDeviceCapabilityPlan) => Promise<{
5
+ changed: MobilePlatform[];
6
+ }>;