@absolutejs/absolute 0.20.0-beta.7 → 0.20.0-beta.70
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 +205 -0
- package/dist/angular/browser.js +392 -405
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/core/streamingSlotRegistrar.js +7 -7
- package/dist/angular/components/core/streamingSlotRegistry.js +4 -4
- package/dist/angular/index.js +379 -321
- package/dist/angular/index.js.map +8 -7
- package/dist/angular/server.js +133 -61
- package/dist/angular/server.js.map +8 -7
- package/dist/build.js +2629 -1416
- package/dist/build.js.map +26 -19
- package/dist/cli/config/client.js +12 -12
- package/dist/cli/config/server.js +1140 -1091
- package/dist/cli/index.js +41579 -15184
- package/dist/client/chunks/angularPatch-arh4sr68.js +157 -0
- package/dist/client/chunks/angularPatch-arh4sr68.js.map +10 -0
- package/dist/client/chunks/index-5py90ctf.js +87 -0
- package/dist/client/chunks/index-5py90ctf.js.map +10 -0
- package/dist/client/chunks/index-m35nbkdp.js +374 -0
- package/dist/client/chunks/index-m35nbkdp.js.map +12 -0
- package/dist/client/chunks/index-qxjc7kc5.js +12 -0
- package/dist/client/chunks/index-qxjc7kc5.js.map +9 -0
- package/dist/client/chunks/islands-xj2n8nwf.js +281 -0
- package/dist/client/chunks/islands-xj2n8nwf.js.map +14 -0
- package/dist/client/chunks/react-pdg4325x.js +65 -0
- package/dist/client/chunks/react-pdg4325x.js.map +10 -0
- package/dist/client/chunks/svelte-s0c964kb.js +19 -0
- package/dist/client/chunks/svelte-s0c964kb.js.map +10 -0
- package/dist/client/chunks/vue-rdskrnyg.js +24 -0
- package/dist/client/chunks/vue-rdskrnyg.js.map +10 -0
- package/dist/client/index.js +73 -841
- package/dist/client/index.js.map +7 -20
- package/dist/core/streamingSlotRegistrar.js +15 -13
- package/dist/core/streamingSlotRegistrar.js.map +2 -2
- package/dist/core/streamingSlotRegistry.js +11 -9
- package/dist/core/streamingSlotRegistry.js.map +2 -2
- package/dist/dev/client/hmrClient.ts +35 -3
- package/dist/dev/client/hmrTiming.ts +6 -0
- package/dist/dev/client/syncDevtools.ts +237 -0
- package/dist/dev/serverBootstrap.js +572 -6
- package/dist/image-client/imageClient.js +7 -7
- package/dist/index.js +4157 -2440
- package/dist/index.js.map +43 -32
- package/dist/islands/browser.js +11 -25
- package/dist/islands/browser.js.map +2 -2
- package/dist/islands/index.js +55 -52
- package/dist/islands/index.js.map +5 -4
- package/dist/mobile/browser.js +429 -20
- package/dist/mobile/browser.js.map +8 -5
- package/dist/mobile/index.js +37077 -4967
- package/dist/mobile/index.js.map +100 -18
- package/dist/mobile/mobilePreviewClient.ts +246 -0
- package/dist/mobile/remoteMacAgentEntry.js +1899 -14
- package/dist/mobile/shellAuth.js +20 -9
- package/dist/mobile/shellBootstrap.js +6801 -120
- package/dist/mobile/shellExpoAuth.js +179 -0
- package/dist/mobile/shellExpoDevices.js +93 -0
- package/dist/mobile/shellExpoSync.js +120 -0
- package/dist/mobile/shellSync.js +152 -3
- package/dist/mobile/shellUpdate.js +559 -0
- package/dist/mobile/uiPrimitives.js +280 -0
- package/dist/react/browser.js +17 -59
- package/dist/react/browser.js.map +2 -2
- package/dist/react/components/browser/index.js +107 -107
- package/dist/react/components/index.js +118 -116
- package/dist/react/components/index.js.map +2 -2
- package/dist/react/hooks/index.js +11 -25
- package/dist/react/hooks/index.js.map +2 -2
- package/dist/react/index.js +110 -67
- package/dist/react/index.js.map +8 -7
- package/dist/react/jsxDevRuntimeCompat.js +11 -9
- package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
- package/dist/react/jsxRuntimeCompat.js +11 -9
- package/dist/react/jsxRuntimeCompat.js.map +2 -2
- package/dist/react/router/browser.js +9 -7
- package/dist/react/router/browser.js.map +2 -2
- package/dist/react/router/index.js +9 -7
- package/dist/react/router/index.js.map +2 -2
- package/dist/react/server.js +67 -11
- package/dist/react/server.js.map +7 -6
- package/dist/src/build/chainInlineSourcemaps.d.ts +2 -0
- package/dist/src/build/pwa.d.ts +16 -0
- package/dist/src/build/vueCompileCache.d.ts +43 -0
- package/dist/src/cli/config/server.d.ts +1 -1
- package/dist/src/cli/instanceStatus.d.ts +1 -0
- package/dist/src/cli/scripts/dev.d.ts +2 -0
- package/dist/src/client/browserTranslation.d.ts +19 -0
- package/dist/src/client/index.d.ts +1 -0
- package/dist/src/core/browserTranslation.d.ts +6 -0
- package/dist/src/core/devBuild.d.ts +1 -0
- package/dist/src/core/prepare.d.ts +376 -0
- package/dist/src/dev/bootLifecycle.d.ts +11 -0
- package/dist/src/dev/clientManager.d.ts +1 -0
- package/dist/src/dev/devCert.d.ts +6 -4
- package/dist/src/dev/earlyListener.d.ts +41 -0
- package/dist/src/dev/serverEntryCopies.d.ts +3 -0
- package/dist/src/ember/browser.d.ts +0 -16
- package/dist/src/mobile/adaptiveShell.d.ts +27 -0
- package/dist/src/mobile/androidEmulatorController.d.ts +8 -1
- package/dist/src/mobile/androidRelease.d.ts +9 -2
- package/dist/src/mobile/androidTestReport.d.ts +14 -0
- package/dist/src/mobile/androidUpgradeConformance.d.ts +47 -0
- package/dist/src/mobile/androidWebView.d.ts +1 -0
- package/dist/src/mobile/browser.d.ts +2 -0
- package/dist/src/mobile/capacitorBundle.d.ts +33 -1
- package/dist/src/mobile/ciWorkflow.d.ts +26 -0
- package/dist/src/mobile/config.d.ts +22 -1
- package/dist/src/mobile/devDeviceAdapter.d.ts +3 -0
- package/dist/src/mobile/deviceCapabilities.d.ts +49 -0
- package/dist/src/mobile/expoBridge.d.ts +91 -0
- package/dist/src/mobile/expoCodeSigning.d.ts +14 -0
- package/dist/src/mobile/expoDevController.d.ts +64 -0
- package/dist/src/mobile/expoNativeObservability.d.ts +3 -0
- package/dist/src/mobile/expoProject.d.ts +16 -0
- package/dist/src/mobile/expoUpdate.d.ts +27 -0
- package/dist/src/mobile/index.d.ts +29 -0
- package/dist/src/mobile/iosDeviceAcceptance.d.ts +32 -0
- package/dist/src/mobile/iosPhysicalDeviceTransport.d.ts +16 -0
- package/dist/src/mobile/iosRelease.d.ts +63 -3
- package/dist/src/mobile/iosSimulatorController.d.ts +20 -2
- package/dist/src/mobile/iosTestReport.d.ts +24 -0
- package/dist/src/mobile/mobileBundleInspection.d.ts +63 -0
- package/dist/src/mobile/mobileInspect.d.ts +156 -0
- package/dist/src/mobile/mobilePreview.d.ts +174 -0
- package/dist/src/mobile/mobilePreviewClient.d.ts +1 -0
- package/dist/src/mobile/nativeAuth.d.ts +6 -0
- package/dist/src/mobile/nativeBackgroundSync.d.ts +4 -0
- package/dist/src/mobile/nativeDeviceCapabilities.d.ts +6 -0
- package/dist/src/mobile/nativeObservability.d.ts +4 -0
- package/dist/src/mobile/nativeRoute.d.ts +13 -0
- package/dist/src/mobile/nativeTestReport.d.ts +91 -0
- package/dist/src/mobile/nativeUpdates.d.ts +4 -0
- package/dist/src/mobile/navigationLifecycle.d.ts +36 -0
- package/dist/src/mobile/navigationState.d.ts +53 -0
- package/dist/src/mobile/pageProtocol.d.ts +2 -0
- package/dist/src/mobile/releaseDoctor.d.ts +23 -1
- package/dist/src/mobile/remoteMacProtocol.d.ts +134 -1
- package/dist/src/mobile/remoteMacWire.d.ts +1 -1
- package/dist/src/mobile/shellAuth.d.ts +5 -1
- package/dist/src/mobile/shellBootstrap.d.ts +12 -2
- package/dist/src/mobile/shellExpoAuth.d.ts +12 -0
- package/dist/src/mobile/shellExpoDevices.d.ts +3 -0
- package/dist/src/mobile/shellExpoSync.d.ts +18 -0
- package/dist/src/mobile/shellHttp.d.ts +2 -0
- package/dist/src/mobile/shellNativeObservability.d.ts +21 -0
- package/dist/src/mobile/shellObservability.d.ts +11 -0
- package/dist/src/mobile/shellPush.d.ts +11 -0
- package/dist/src/mobile/shellSync.d.ts +37 -4
- package/dist/src/mobile/shellUpdate.d.ts +2 -0
- package/dist/src/mobile/syncRemediation.d.ts +10 -0
- package/dist/src/mobile/syncSchema.d.ts +9 -0
- package/dist/src/mobile/transport.d.ts +21 -0
- package/dist/src/mobile/uiPrimitives.d.ts +37 -0
- package/dist/src/mobile/updateClient.d.ts +44 -0
- package/dist/src/mobile/updateProtocol.d.ts +51 -0
- package/dist/src/mobile/updatePublisher.d.ts +66 -0
- package/dist/src/mobile/updateRollout.d.ts +16 -0
- package/dist/src/mobile/updateRuntime.d.ts +37 -0
- package/dist/src/mobile/updateSigning.d.ts +20 -0
- package/dist/src/plugins/hmr.d.ts +3 -0
- package/dist/src/plugins/imageOptimizer.d.ts +1 -1
- package/dist/src/react/hooks/useMediaQuery.d.ts +1 -1
- package/dist/src/utils/imageProcessing.d.ts +3 -0
- package/dist/src/utils/loadConfig.d.ts +1 -0
- package/dist/src/utils/logger.d.ts +1 -0
- package/dist/src/utils/startupBanner.d.ts +1 -0
- package/dist/src/utils/startupTimings.d.ts +4 -0
- package/dist/src/utils/userAgentFunctions.d.ts +1 -1
- package/dist/src/vue/browser.d.ts +1 -0
- package/dist/src/vue/browserTranslation.d.ts +5 -0
- package/dist/src/vue/index.d.ts +1 -0
- package/dist/svelte/browser.js +12 -26
- package/dist/svelte/browser.js.map +2 -2
- package/dist/svelte/index.js +104 -61
- package/dist/svelte/index.js.map +8 -7
- package/dist/svelte/server.js +84 -28
- package/dist/svelte/server.js.map +7 -6
- package/dist/types/build.d.ts +83 -3
- package/dist/types/cli.d.ts +1 -0
- package/dist/types/globals.d.ts +15 -0
- package/dist/types/messages.d.ts +1 -1
- package/dist/vue/browser.js +116 -56
- package/dist/vue/browser.js.map +5 -3
- package/dist/vue/components/Image.js +9 -7
- package/dist/vue/components/Image.js.map +2 -2
- package/dist/vue/components/index.js +11 -9
- package/dist/vue/components/index.js.map +2 -2
- package/dist/vue/index.js +211 -94
- package/dist/vue/index.js.map +10 -7
- package/dist/vue/server.js +69 -13
- package/dist/vue/server.js.map +7 -6
- package/package.json +46 -15
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { keyboard, network, platform, systemBars, type DeviceKeyboardState, type DeviceNetworkStatus, type DevicePlatformInfo } from '@absolutejs/devices';
|
|
2
|
+
export type AbsoluteMobileAdaptiveShellState = {
|
|
3
|
+
availableHeight: number;
|
|
4
|
+
keyboard: DeviceKeyboardState;
|
|
5
|
+
network: DeviceNetworkStatus;
|
|
6
|
+
platform: DevicePlatformInfo;
|
|
7
|
+
viewportHeight: number;
|
|
8
|
+
viewportWidth: number;
|
|
9
|
+
};
|
|
10
|
+
declare global {
|
|
11
|
+
interface WindowEventMap {
|
|
12
|
+
'absolute:adaptive-shell-change': CustomEvent<AbsoluteMobileAdaptiveShellState>;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export type AbsoluteMobileAdaptiveShellDevices = {
|
|
16
|
+
keyboard: Pick<typeof keyboard, 'capability' | 'getState' | 'onChange'>;
|
|
17
|
+
network: Pick<typeof network, 'getStatus' | 'onChange'>;
|
|
18
|
+
platform: Pick<typeof platform, 'getInfo'>;
|
|
19
|
+
systemBars: Pick<typeof systemBars, 'capability' | 'setAppearance'>;
|
|
20
|
+
};
|
|
21
|
+
export type AbsoluteMobileAdaptiveShell = {
|
|
22
|
+
dispose(): Promise<void>;
|
|
23
|
+
refreshDocument(): void;
|
|
24
|
+
state(): AbsoluteMobileAdaptiveShellState;
|
|
25
|
+
};
|
|
26
|
+
/** Installs the framework-neutral environment contract owned by the native shell. */
|
|
27
|
+
export declare const installAbsoluteMobileAdaptiveShell: (devices?: AbsoluteMobileAdaptiveShellDevices) => Promise<AbsoluteMobileAdaptiveShell>;
|
|
@@ -24,7 +24,7 @@ export type AbsoluteAndroidDevProject = {
|
|
|
24
24
|
androidRoot: string;
|
|
25
25
|
cap: string;
|
|
26
26
|
config: NormalizedAbsoluteMobileConfig;
|
|
27
|
-
emulator
|
|
27
|
+
emulator?: string;
|
|
28
28
|
host: AbsoluteMobileHost;
|
|
29
29
|
nativeDirectory: string;
|
|
30
30
|
projectRoot: string;
|
|
@@ -47,6 +47,7 @@ export type AbsoluteAndroidDevPhaseTiming = {
|
|
|
47
47
|
export type PrepareAbsoluteAndroidDevOptions = {
|
|
48
48
|
createNativeProject: boolean;
|
|
49
49
|
projectRoot: string;
|
|
50
|
+
target?: 'device' | 'emulator';
|
|
50
51
|
run?: (command: string[], options?: AbsoluteAndroidCommandOptions) => Promise<number>;
|
|
51
52
|
};
|
|
52
53
|
export type StartAbsoluteAndroidDevOptions = {
|
|
@@ -59,8 +60,14 @@ export type StartAbsoluteAndroidDevOptions = {
|
|
|
59
60
|
/** Launch the locally embedded production web bundle while forwarding
|
|
60
61
|
* `port` only for its configured backend. No dev-server URL is written. */
|
|
61
62
|
embeddedBundle?: boolean;
|
|
63
|
+
/** A connected physical device selected explicitly by ADB serial. */
|
|
64
|
+
deviceSerial?: string;
|
|
65
|
+
/** CA certificate temporarily trusted only by this development app. */
|
|
66
|
+
certificateAuthorityPath?: string;
|
|
62
67
|
port: number;
|
|
63
68
|
project: AbsoluteAndroidDevProject;
|
|
69
|
+
/** Hostname or LAN address loaded by the physical device. */
|
|
70
|
+
serverHost?: string;
|
|
64
71
|
run?: (command: string[], options?: AbsoluteAndroidCommandOptions) => Promise<number>;
|
|
65
72
|
signal?: AbortSignal;
|
|
66
73
|
sleep?: (milliseconds: number) => Promise<void>;
|
|
@@ -7,7 +7,7 @@ export type AbsoluteAndroidReleaseMetadata = {
|
|
|
7
7
|
appId: string;
|
|
8
8
|
artifact: string;
|
|
9
9
|
bytes: number;
|
|
10
|
-
engine: 'capacitor';
|
|
10
|
+
engine: 'capacitor' | 'expo';
|
|
11
11
|
format: typeof ABSOLUTE_ANDROID_RELEASE_FORMAT;
|
|
12
12
|
platform: 'android';
|
|
13
13
|
releaseId: string;
|
|
@@ -22,12 +22,19 @@ export type BuildAbsoluteAndroidReleaseOptions = {
|
|
|
22
22
|
androidRoot?: string;
|
|
23
23
|
capture?: (command: string[], options?: AbsoluteAndroidCommandOptions) => AbsoluteAndroidCommandResult;
|
|
24
24
|
config: NormalizedAbsoluteMobileConfig;
|
|
25
|
+
env?: Record<string, string | undefined>;
|
|
25
26
|
host?: AbsoluteMobileHost;
|
|
26
27
|
jarsigner?: string | null;
|
|
27
28
|
outputDirectory?: string;
|
|
28
29
|
projectRoot: string;
|
|
29
30
|
run?: (command: string[], options?: AbsoluteAndroidCommandOptions) => Promise<number>;
|
|
30
31
|
prepareVersionCode?: (buildIdentity: string) => Promise<number>;
|
|
32
|
+
signing?: {
|
|
33
|
+
keyAlias: string;
|
|
34
|
+
keyPasswordEnvironment: string;
|
|
35
|
+
keystorePath: string;
|
|
36
|
+
storePasswordEnvironment: string;
|
|
37
|
+
};
|
|
31
38
|
versionCode?: number;
|
|
32
39
|
};
|
|
33
40
|
export declare const buildAbsoluteAndroidRelease: (options: BuildAbsoluteAndroidReleaseOptions) => Promise<{
|
|
@@ -43,7 +50,7 @@ export declare const buildAbsoluteAndroidRelease: (options: BuildAbsoluteAndroid
|
|
|
43
50
|
appBuild: string;
|
|
44
51
|
appId: string;
|
|
45
52
|
platform: "android";
|
|
46
|
-
engine: "capacitor";
|
|
53
|
+
engine: "capacitor" | "expo";
|
|
47
54
|
signed: boolean;
|
|
48
55
|
versionCode?: number | undefined;
|
|
49
56
|
};
|
|
@@ -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,23 +1,55 @@
|
|
|
1
1
|
import type { NormalizedAbsoluteMobileConfig } from './config';
|
|
2
|
-
import type { AbsoluteMobileCompatibilityArtifact } from './releaseArtifact';
|
|
2
|
+
import type { AbsoluteMobileCompatibilityArtifact, AbsoluteMobileCompatibilityPage } from './releaseArtifact';
|
|
3
3
|
import type { AbsoluteMobileAuthManifest } from './nativeAuth';
|
|
4
|
+
import type { SyncLocalStoreSchemaBundle } from '@absolutejs/sync/client';
|
|
5
|
+
import type { AbsoluteDeviceCapabilityPlan } from './deviceCapabilities';
|
|
4
6
|
export type AbsoluteCapacitorBundleOptions = {
|
|
5
7
|
artifact: AbsoluteMobileCompatibilityArtifact;
|
|
6
8
|
auth?: AbsoluteMobileAuthManifest;
|
|
7
9
|
buildDirectory: string;
|
|
8
10
|
config: NormalizedAbsoluteMobileConfig;
|
|
11
|
+
deviceCapabilities: AbsoluteDeviceCapabilityPlan;
|
|
12
|
+
projectRoot: string;
|
|
13
|
+
runtimeFingerprint: string;
|
|
9
14
|
sync?: boolean;
|
|
15
|
+
syncSchema?: SyncLocalStoreSchemaBundle;
|
|
10
16
|
};
|
|
17
|
+
export declare const materializeAbsoluteMobileSourcemaps: (pages: readonly AbsoluteMobileCompatibilityPage[], appBuild: string, projectRoot: string) => Promise<number>;
|
|
11
18
|
export declare const materializeAbsoluteCapacitorWebBundle: (options: AbsoluteCapacitorBundleOptions) => Promise<{
|
|
12
19
|
sync?: {
|
|
20
|
+
background: {
|
|
21
|
+
endpoint: string;
|
|
22
|
+
intervalMinutes: number;
|
|
23
|
+
};
|
|
13
24
|
socketTickets: true;
|
|
25
|
+
storageSchema: SyncLocalStoreSchemaBundle;
|
|
26
|
+
} | undefined;
|
|
27
|
+
updates?: {
|
|
28
|
+
bootTimeoutMs: number;
|
|
29
|
+
channel: string;
|
|
30
|
+
manifestUrl: string;
|
|
31
|
+
publicKeys: Record<string, string>;
|
|
32
|
+
expoCodeSigning?: {
|
|
33
|
+
algorithm: "rsa-v1_5-sha256";
|
|
34
|
+
certificatePem: string;
|
|
35
|
+
certificateSha256: string;
|
|
36
|
+
keyId: string;
|
|
37
|
+
};
|
|
38
|
+
} | undefined;
|
|
39
|
+
observability?: {
|
|
40
|
+
endpoint: string;
|
|
41
|
+
environment?: string;
|
|
42
|
+
project: string;
|
|
43
|
+
sampleRate: number;
|
|
14
44
|
} | undefined;
|
|
15
45
|
appId: string;
|
|
16
46
|
appName: string;
|
|
17
47
|
deepLinkHosts: string[];
|
|
18
48
|
deepLinkScheme: string | undefined;
|
|
49
|
+
deviceCapabilities: string[];
|
|
19
50
|
entry: string;
|
|
20
51
|
format: 1;
|
|
52
|
+
nativeRuntime: string;
|
|
21
53
|
pages: {
|
|
22
54
|
localStylePath?: string | undefined;
|
|
23
55
|
localBundlePath: string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { NormalizedAbsoluteMobileConfig } from './config';
|
|
2
|
+
export declare const ABSOLUTE_MOBILE_CI_WORKFLOW_FORMAT: 1;
|
|
3
|
+
export type AbsoluteMobileGithubWorkflowOptions = {
|
|
4
|
+
config: NormalizedAbsoluteMobileConfig;
|
|
5
|
+
configPath?: string;
|
|
6
|
+
force?: boolean;
|
|
7
|
+
includePublishing?: boolean;
|
|
8
|
+
outputPath?: string;
|
|
9
|
+
projectRoot: string;
|
|
10
|
+
registryModule?: string;
|
|
11
|
+
secretEnvironment?: readonly string[];
|
|
12
|
+
serverEntry?: string;
|
|
13
|
+
};
|
|
14
|
+
export type AbsoluteMobileGithubWorkflowResult = {
|
|
15
|
+
changed: boolean;
|
|
16
|
+
format: typeof ABSOLUTE_MOBILE_CI_WORKFLOW_FORMAT;
|
|
17
|
+
path: string;
|
|
18
|
+
platforms: ('android' | 'ios')[];
|
|
19
|
+
publishing: boolean;
|
|
20
|
+
requiredSecrets: string[];
|
|
21
|
+
};
|
|
22
|
+
export declare const createAbsoluteMobileGithubWorkflow: (options: AbsoluteMobileGithubWorkflowOptions) => {
|
|
23
|
+
requiredSecrets: string[];
|
|
24
|
+
workflow: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const writeAbsoluteMobileGithubWorkflow: (options: AbsoluteMobileGithubWorkflowOptions) => Promise<AbsoluteMobileGithubWorkflowResult>;
|
|
@@ -7,11 +7,32 @@ export type NormalizedAbsoluteMobileConfig = {
|
|
|
7
7
|
bundleDirectory: string;
|
|
8
8
|
deepLinkHosts: string[];
|
|
9
9
|
deepLinkScheme?: string;
|
|
10
|
-
engine: 'capacitor';
|
|
10
|
+
engine: 'capacitor' | 'expo';
|
|
11
11
|
entry: string;
|
|
12
|
+
expoNativeRoutes: Record<string, string>;
|
|
13
|
+
expoSdkVersion?: 57;
|
|
12
14
|
iosVersion?: string;
|
|
13
15
|
nativeProjectDirectory: string;
|
|
16
|
+
observability?: {
|
|
17
|
+
endpoint: string;
|
|
18
|
+
environment?: string;
|
|
19
|
+
project: string;
|
|
20
|
+
sampleRate: number;
|
|
21
|
+
};
|
|
14
22
|
platforms: MobilePlatform[];
|
|
15
23
|
productionOrigin: string;
|
|
24
|
+
pushAndroidGoogleServicesFile: string;
|
|
25
|
+
updates?: {
|
|
26
|
+
bootTimeoutMs: number;
|
|
27
|
+
channel: string;
|
|
28
|
+
manifestUrl: string;
|
|
29
|
+
publicKeys: Record<string, string>;
|
|
30
|
+
expoCodeSigning?: {
|
|
31
|
+
algorithm: 'rsa-v1_5-sha256';
|
|
32
|
+
certificatePem: string;
|
|
33
|
+
certificateSha256: string;
|
|
34
|
+
keyId: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
16
37
|
};
|
|
17
38
|
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, expoAdapterModule?: string, expoAuthModule?: string, expoSyncModule?: string) => string;
|
|
3
|
+
export declare const buildAbsoluteNativeDevAdapter: (projectRoot: string, mobile: MobileConfig) => Promise<string>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type AbsoluteDeviceCapabilityProvider = {
|
|
2
|
+
factory: string;
|
|
3
|
+
module: string;
|
|
4
|
+
plugins?: string[];
|
|
5
|
+
native?: {
|
|
6
|
+
android?: {
|
|
7
|
+
permissions: string[];
|
|
8
|
+
};
|
|
9
|
+
ios?: {
|
|
10
|
+
privacyAccessedApis?: Partial<Record<AbsoluteIosPrivacyAccessedApi, string[]>>;
|
|
11
|
+
pushNotifications?: true;
|
|
12
|
+
systemBars?: true;
|
|
13
|
+
usageDescriptions?: AbsoluteIosUsageDescription[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
packages: string[];
|
|
17
|
+
};
|
|
18
|
+
export type AbsoluteIosUsageDescription = 'camera' | 'location-always' | 'location-when-in-use' | 'photo-library' | 'photo-library-add';
|
|
19
|
+
export type AbsoluteIosPrivacyAccessedApi = 'NSPrivacyAccessedAPICategoryFileTimestamp';
|
|
20
|
+
export type AbsoluteDeviceCapabilityPlan = {
|
|
21
|
+
capabilities: string[];
|
|
22
|
+
providers: Record<string, AbsoluteDeviceCapabilityProvider>;
|
|
23
|
+
requiredPackages: string[];
|
|
24
|
+
};
|
|
25
|
+
export declare const ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABILITIES: readonly ["keyboard", "systemBars"];
|
|
26
|
+
export type AbsoluteDeviceProvider = 'capacitor' | 'expo';
|
|
27
|
+
export declare const absoluteDeviceNativeRequirements: (plan: AbsoluteDeviceCapabilityPlan) => {
|
|
28
|
+
androidPermissions: string[];
|
|
29
|
+
iosPrivacyAccessedApis: {
|
|
30
|
+
api: "NSPrivacyAccessedAPICategoryFileTimestamp";
|
|
31
|
+
reasons: string[];
|
|
32
|
+
}[];
|
|
33
|
+
iosPushNotifications: boolean;
|
|
34
|
+
iosSystemBars: boolean;
|
|
35
|
+
iosUsageDescriptions: AbsoluteIosUsageDescription[];
|
|
36
|
+
};
|
|
37
|
+
export declare const loadAbsoluteDeviceCapabilityProviders: (projectRoot: string, provider?: AbsoluteDeviceProvider) => {
|
|
38
|
+
[k: string]: AbsoluteDeviceCapabilityProvider;
|
|
39
|
+
};
|
|
40
|
+
export declare const assertAbsoluteDeviceCapabilityPackages: (projectRoot: string, plan: AbsoluteDeviceCapabilityPlan) => void;
|
|
41
|
+
export declare const directAbsoluteProjectPackages: (projectRoot: string) => Set<string>;
|
|
42
|
+
export declare const discoverAbsoluteDeviceCapabilities: (projectRoot: string, providers?: {
|
|
43
|
+
[k: string]: AbsoluteDeviceCapabilityProvider;
|
|
44
|
+
}) => string[];
|
|
45
|
+
export declare const missingAbsoluteDeviceCapabilityPackages: (plan: AbsoluteDeviceCapabilityPlan, directPackages: ReadonlySet<string>) => string[];
|
|
46
|
+
/** Framework-agnostic capability discovery used by web/PWA builds. This does
|
|
47
|
+
* not load a native provider manifest, so Web Push never requires Capacitor. */
|
|
48
|
+
export declare const projectImportsAbsoluteDeviceCapability: (projectRoot: string, capability: string) => boolean;
|
|
49
|
+
export declare const resolveAbsoluteDeviceCapabilityPlan: (projectRoot: string, provider?: AbsoluteDeviceProvider) => AbsoluteDeviceCapabilityPlan;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export declare const ABSOLUTE_EXPO_BRIDGE_FORMAT: 3;
|
|
2
|
+
export declare const ABSOLUTE_EXPO_BRIDGE_MAX_BYTES: number;
|
|
3
|
+
export declare const ABSOLUTE_EXPO_BRIDGE_METHODS: readonly ["devices.platform.getInfo", "devices.lifecycle.getState", "devices.links.getLaunchUrl", "devices.links.openExternal", "devices.network.getStatus", "devices.storage.clear", "devices.storage.get", "devices.storage.keys", "devices.storage.remove", "devices.storage.set", "devices.back.capability", "devices.clipboard.capability", "devices.clipboard.readText", "devices.clipboard.writeText", "devices.share.capability", "devices.share.share", "devices.haptics.capability", "devices.haptics.impact", "devices.haptics.notification", "devices.haptics.selectionChanged", "devices.haptics.vibrate", "devices.keyboard.capability", "devices.keyboard.dismiss", "devices.keyboard.getState", "devices.systemBars.capability", "devices.systemBars.setAppearance", "devices.systemBars.setVisible", "devices.camera.capability", "devices.camera.queryPermission", "devices.camera.requestPermission", "devices.camera.takePhoto", "devices.photos.capability", "devices.photos.pick", "devices.location.capability", "devices.location.current", "devices.location.queryPermission", "devices.location.requestPermission", "devices.location.watch.start", "devices.location.watch.stop", "devices.localNotifications.capability", "devices.localNotifications.queryPermission", "devices.localNotifications.requestPermission", "devices.localNotifications.schedule", "devices.localNotifications.pending", "devices.localNotifications.cancel", "devices.pushNotifications.capability", "devices.pushNotifications.queryPermission", "devices.pushNotifications.requestPermission", "devices.pushNotifications.enable", "devices.pushNotifications.disable", "devices.documents.capability", "devices.documents.pick", "devices.transfer.read", "devices.transfer.close", "devices.upload.begin", "devices.upload.write", "devices.documents.export", "devices.documents.open", "http.fetch", "auth.signIn", "auth.signOut", "auth.status", "sync.store.begin", "sync.store.deleteNamespace", "sync.store.end", "sync.store.schema", "sync.tx.deleteCollection", "sync.tx.deleteMutation", "sync.tx.getCollection", "sync.tx.getInstallationId", "sync.tx.getMutation", "sync.tx.listCollections", "sync.tx.listMutations", "sync.tx.putCollection", "sync.tx.putMutation", "sync.tx.setInstallationId", "sync.socket.close", "sync.socket.open", "sync.socket.sendChunk"];
|
|
4
|
+
export type AbsoluteExpoBridgeMethod = (typeof ABSOLUTE_EXPO_BRIDGE_METHODS)[number];
|
|
5
|
+
export type AbsoluteExpoBridgeRequest = {
|
|
6
|
+
format: typeof ABSOLUTE_EXPO_BRIDGE_FORMAT;
|
|
7
|
+
id: string;
|
|
8
|
+
kind: 'request';
|
|
9
|
+
method: AbsoluteExpoBridgeMethod;
|
|
10
|
+
params: Record<string, unknown>;
|
|
11
|
+
path: string;
|
|
12
|
+
};
|
|
13
|
+
export type AbsoluteExpoBridgeResponse = {
|
|
14
|
+
format: typeof ABSOLUTE_EXPO_BRIDGE_FORMAT;
|
|
15
|
+
id: string;
|
|
16
|
+
kind: 'response';
|
|
17
|
+
result?: unknown;
|
|
18
|
+
error?: {
|
|
19
|
+
code: string;
|
|
20
|
+
message: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export type AbsoluteExpoBridgeEvent = {
|
|
24
|
+
format: typeof ABSOLUTE_EXPO_BRIDGE_FORMAT;
|
|
25
|
+
kind: 'event';
|
|
26
|
+
event: 'ready' | 'navigation' | 'auth.principal' | 'sync.socket' | 'sync.wake';
|
|
27
|
+
path: string;
|
|
28
|
+
payload?: Record<string, unknown>;
|
|
29
|
+
};
|
|
30
|
+
export type AbsoluteExpoBridgeMessage = AbsoluteExpoBridgeEvent | AbsoluteExpoBridgeRequest | AbsoluteExpoBridgeResponse;
|
|
31
|
+
export declare const createAbsoluteExpoBridgeError: (id: string, code: string, message: string) => {
|
|
32
|
+
error: {
|
|
33
|
+
code: string;
|
|
34
|
+
message: string;
|
|
35
|
+
};
|
|
36
|
+
format: 3;
|
|
37
|
+
id: string;
|
|
38
|
+
kind: "response";
|
|
39
|
+
result?: undefined;
|
|
40
|
+
} | {
|
|
41
|
+
format: 3;
|
|
42
|
+
id: string;
|
|
43
|
+
kind: "response";
|
|
44
|
+
result: unknown;
|
|
45
|
+
error?: undefined;
|
|
46
|
+
};
|
|
47
|
+
export declare const createAbsoluteExpoBridgeResponse: (id: string, result: unknown) => {
|
|
48
|
+
error: {
|
|
49
|
+
code: string;
|
|
50
|
+
message: string;
|
|
51
|
+
};
|
|
52
|
+
format: 3;
|
|
53
|
+
id: string;
|
|
54
|
+
kind: "response";
|
|
55
|
+
result?: undefined;
|
|
56
|
+
} | {
|
|
57
|
+
format: 3;
|
|
58
|
+
id: string;
|
|
59
|
+
kind: "response";
|
|
60
|
+
result: unknown;
|
|
61
|
+
error?: undefined;
|
|
62
|
+
};
|
|
63
|
+
export declare const parseAbsoluteExpoBridgeMessage: (source: string) => {
|
|
64
|
+
format: 3;
|
|
65
|
+
id: string;
|
|
66
|
+
kind: "request";
|
|
67
|
+
method: "devices.platform.getInfo" | "devices.lifecycle.getState" | "devices.links.getLaunchUrl" | "devices.links.openExternal" | "devices.network.getStatus" | "devices.storage.clear" | "devices.storage.get" | "devices.storage.keys" | "devices.storage.remove" | "devices.storage.set" | "devices.back.capability" | "devices.clipboard.capability" | "devices.clipboard.readText" | "devices.clipboard.writeText" | "devices.share.capability" | "devices.share.share" | "devices.haptics.capability" | "devices.haptics.impact" | "devices.haptics.notification" | "devices.haptics.selectionChanged" | "devices.haptics.vibrate" | "devices.keyboard.capability" | "devices.keyboard.dismiss" | "devices.keyboard.getState" | "devices.systemBars.capability" | "devices.systemBars.setAppearance" | "devices.systemBars.setVisible" | "devices.camera.capability" | "devices.camera.queryPermission" | "devices.camera.requestPermission" | "devices.camera.takePhoto" | "devices.photos.capability" | "devices.photos.pick" | "devices.location.capability" | "devices.location.current" | "devices.location.queryPermission" | "devices.location.requestPermission" | "devices.location.watch.start" | "devices.location.watch.stop" | "devices.localNotifications.capability" | "devices.localNotifications.queryPermission" | "devices.localNotifications.requestPermission" | "devices.localNotifications.schedule" | "devices.localNotifications.pending" | "devices.localNotifications.cancel" | "devices.pushNotifications.capability" | "devices.pushNotifications.queryPermission" | "devices.pushNotifications.requestPermission" | "devices.pushNotifications.enable" | "devices.pushNotifications.disable" | "devices.documents.capability" | "devices.documents.pick" | "devices.transfer.read" | "devices.transfer.close" | "devices.upload.begin" | "devices.upload.write" | "devices.documents.export" | "devices.documents.open" | "http.fetch" | "auth.signIn" | "auth.signOut" | "auth.status" | "sync.store.begin" | "sync.store.deleteNamespace" | "sync.store.end" | "sync.store.schema" | "sync.tx.deleteCollection" | "sync.tx.deleteMutation" | "sync.tx.getCollection" | "sync.tx.getInstallationId" | "sync.tx.getMutation" | "sync.tx.listCollections" | "sync.tx.listMutations" | "sync.tx.putCollection" | "sync.tx.putMutation" | "sync.tx.setInstallationId" | "sync.socket.close" | "sync.socket.open" | "sync.socket.sendChunk";
|
|
68
|
+
params: Record<string, unknown>;
|
|
69
|
+
path: string;
|
|
70
|
+
} | {
|
|
71
|
+
error: {
|
|
72
|
+
code: string;
|
|
73
|
+
message: string;
|
|
74
|
+
};
|
|
75
|
+
format: 3;
|
|
76
|
+
id: string;
|
|
77
|
+
kind: "response";
|
|
78
|
+
result?: undefined;
|
|
79
|
+
} | {
|
|
80
|
+
format: 3;
|
|
81
|
+
id: string;
|
|
82
|
+
kind: "response";
|
|
83
|
+
result: unknown;
|
|
84
|
+
error?: undefined;
|
|
85
|
+
} | {
|
|
86
|
+
payload?: Record<string, unknown> | undefined;
|
|
87
|
+
event: string;
|
|
88
|
+
format: 3;
|
|
89
|
+
kind: "event";
|
|
90
|
+
path: string;
|
|
91
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type GenerateAbsoluteExpoCodeSigningOptions = {
|
|
2
|
+
certificatePath: string;
|
|
3
|
+
commonName: string;
|
|
4
|
+
privateKeyPath: string;
|
|
5
|
+
projectRoot: string;
|
|
6
|
+
publicKeyPath?: string;
|
|
7
|
+
validityYears?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const generateAbsoluteExpoCodeSigning: (options: GenerateAbsoluteExpoCodeSigningOptions) => Promise<{
|
|
10
|
+
certificatePath: string;
|
|
11
|
+
privateKeyPath: string;
|
|
12
|
+
publicKeyPath: string;
|
|
13
|
+
validityNotAfter: string;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import type { NormalizedAbsoluteMobileConfig } from './config';
|
|
3
|
+
import { type AbsoluteMobileHost } from './emulatorDoctor';
|
|
4
|
+
import { startAbsoluteIosCaEnrollmentServer } from './iosPhysicalDeviceTransport';
|
|
5
|
+
export type AbsoluteExpoDevPlatform = 'android' | 'ios';
|
|
6
|
+
export type AbsoluteExpoDevState = 'building-android' | 'building-ios' | 'closed' | 'enrolling-trust' | 'failed' | 'preparing-native' | 'ready' | 'starting-metro';
|
|
7
|
+
export type AbsoluteExpoDevCommand = {
|
|
8
|
+
args: string[];
|
|
9
|
+
env: Record<string, string>;
|
|
10
|
+
platform?: AbsoluteExpoDevPlatform;
|
|
11
|
+
role: 'metro' | 'native-build' | 'native-prepare';
|
|
12
|
+
};
|
|
13
|
+
export type AbsoluteExpoDevPlan = {
|
|
14
|
+
commands: AbsoluteExpoDevCommand[];
|
|
15
|
+
metroPort: number;
|
|
16
|
+
project: string;
|
|
17
|
+
};
|
|
18
|
+
export type PlanAbsoluteExpoDevOptions = {
|
|
19
|
+
androidDevice?: string;
|
|
20
|
+
androidOrigin?: string;
|
|
21
|
+
certificateAuthorityPath?: string;
|
|
22
|
+
iosDevice?: string;
|
|
23
|
+
iosOrigin?: string;
|
|
24
|
+
metroHost?: string;
|
|
25
|
+
metroPort: number;
|
|
26
|
+
/** The caller owns Metro, for example through a Remote Mac tunnel. */
|
|
27
|
+
metro?: 'external' | 'managed';
|
|
28
|
+
platforms: AbsoluteExpoDevPlatform[];
|
|
29
|
+
};
|
|
30
|
+
export type AbsoluteExpoDevPhaseTiming = {
|
|
31
|
+
durationMs: number;
|
|
32
|
+
phase: AbsoluteExpoDevState;
|
|
33
|
+
};
|
|
34
|
+
export type StartAbsoluteExpoDevOptions = PlanAbsoluteExpoDevOptions & {
|
|
35
|
+
androidAdb?: string;
|
|
36
|
+
androidRoot?: string;
|
|
37
|
+
capture?: (command: string[]) => {
|
|
38
|
+
exitCode: number;
|
|
39
|
+
stdout: string;
|
|
40
|
+
};
|
|
41
|
+
config: NormalizedAbsoluteMobileConfig;
|
|
42
|
+
executable?: string;
|
|
43
|
+
host?: AbsoluteMobileHost;
|
|
44
|
+
log?: (message: string) => void;
|
|
45
|
+
onPhaseTiming?: (timing: AbsoluteExpoDevPhaseTiming) => void;
|
|
46
|
+
onStateChange?: (state: AbsoluteExpoDevState) => void;
|
|
47
|
+
signal?: AbortSignal;
|
|
48
|
+
spawnProcess?: typeof spawn;
|
|
49
|
+
startCaEnrollmentServer?: typeof startAbsoluteIosCaEnrollmentServer;
|
|
50
|
+
};
|
|
51
|
+
export type AbsoluteExpoDevSession = {
|
|
52
|
+
close: () => Promise<void>;
|
|
53
|
+
metroPort: number;
|
|
54
|
+
platforms: AbsoluteExpoDevPlatform[];
|
|
55
|
+
timings: Partial<Record<AbsoluteExpoDevState, number>>;
|
|
56
|
+
};
|
|
57
|
+
export declare const absoluteExpoExecutable: (project: string) => Promise<string>;
|
|
58
|
+
export declare const planAbsoluteExpoDevSession: (config: NormalizedAbsoluteMobileConfig, options: PlanAbsoluteExpoDevOptions) => AbsoluteExpoDevPlan;
|
|
59
|
+
export declare const startAbsoluteExpoDevSession: (options: StartAbsoluteExpoDevOptions) => Promise<{
|
|
60
|
+
metroPort: number;
|
|
61
|
+
platforms: AbsoluteExpoDevPlatform[];
|
|
62
|
+
timings: Partial<Record<AbsoluteExpoDevState, number>>;
|
|
63
|
+
close: () => Promise<void>;
|
|
64
|
+
}>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const expoNativeObservabilityRuntimeSource = "// Generated by AbsoluteJS. Edit absolute.config.ts, then run absolute mobile sync.\nimport { requireNativeModule } from 'expo';\nimport { AppState, Platform } from 'react-native';\nimport { ABSOLUTE_MOBILE_MANIFEST } from './webAssets';\n\ntype NativeObservabilityModule = {\n\tacknowledge(options: { ids: string[] }): Promise<void>;\n\tcrashForTesting(options: { testId: string }): Promise<boolean>;\n\tpending(): Promise<{ reports: unknown[] }>;\n};\ntype NativeReport = { details: Record<string, unknown>; id: string; kind: string; occurredAt: number; platform: 'android' | 'ios' };\nconst native = requireNativeModule<NativeObservabilityModule>('AbsoluteMobileObservability');\nconst KINDS = new Set(['anr', 'app-launch', 'cpu-exception', 'crash', 'disk-write-exception', 'hang', 'initialization-failure', 'low-memory', 'native-crash', 'resource-exhaustion', 'signal']);\nconst ID = /^[A-Za-z0-9._:-]{1,128}$/;\nconst isRecord = (value: unknown): value is Record<string, unknown> => typeof value === 'object' && value !== null && !Array.isArray(value);\nconst redactText = (value: string) => value.slice(0, 8192)\n\t.replace(/\\b(Bearer)\\s+[A-Za-z0-9._~+/-]+=*/gi, '$1 [REDACTED]')\n\t.replace(/([?&](?:access_token|api_?key|authorization|code|id_token|password|refresh_token|secret|token)=)[^&#\\s]*/gi, '$1[REDACTED]')\n\t.replace(/\\b((?:access_?token|api_?key|authorization|client_?secret|cookie|id_?token|password|passwd|refresh_?token|secret|token)\\s*[:=]\\s*)[^,\\s;]+/gi, '$1[REDACTED]')\n\t.replace(/\\beyJ[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\b/g, '[REDACTED]');\nconst redact = (value: unknown, depth = 0): unknown => {\n\tif (depth >= 8) return '[TRUNCATED]';\n\tif (typeof value === 'string') return redactText(value);\n\tif (value === null || typeof value === 'number' || typeof value === 'boolean') return value;\n\tif (Array.isArray(value)) return value.slice(0, 64).map(entry => redact(entry, depth + 1));\n\tif (!isRecord(value)) return String(value).slice(0, 8192);\n\treturn Object.fromEntries(Object.entries(value).slice(0, 128).map(([key, entry]) => [key, /(?:authorization|cookie|password|secret|token)/i.test(key) ? '[REDACTED]' : redact(entry, depth + 1)]));\n};\nconst parse = (value: unknown): NativeReport | undefined => {\n\tif (!isRecord(value) || !isRecord(value.details) || typeof value.id !== 'string' || !ID.test(value.id) || typeof value.kind !== 'string' || !KINDS.has(value.kind) || typeof value.occurredAt !== 'number' || !Number.isFinite(value.occurredAt) || value.occurredAt <= 0 || value.platform !== 'android' && value.platform !== 'ios') return;\n\tconst details = redact(value.details);\n\tif (!isRecord(details) || new TextEncoder().encode(JSON.stringify(details)).byteLength > 64 * 1024) return;\n\treturn { details, id: value.id, kind: value.kind, occurredAt: value.occurredAt, platform: value.platform };\n};\nconst sampled = (id: string, rate: number) => {\n\tif (rate >= 1) return true;\n\tlet hash = 2166136261;\n\tfor (const character of id) { hash ^= character.codePointAt(0) ?? 0; hash = Math.imul(hash, 16777619); }\n\treturn (hash >>> 0) / 4294967296 < rate;\n};\nlet drainPromise: Promise<void> | undefined;\nlet started = false;\nconst drain = () => {\n\tdrainPromise ??= (async () => {\n\t\tconst manifest = ABSOLUTE_MOBILE_MANIFEST;\n\t\tconst config = manifest?.observability;\n\t\tif (!manifest || !config || Platform.OS !== 'android' && Platform.OS !== 'ios') return;\n\t\tconst reports = (await native.pending()).reports.slice(0, 8).map(parse).filter((report): report is NativeReport => report !== undefined);\n\t\tconst discarded = reports.filter(report => !sampled(report.id, config.sampleRate));\n\t\tif (discarded.length) await native.acknowledge({ ids: discarded.map(report => report.id) });\n\t\tconst selected = reports.filter(report => sampled(report.id, config.sampleRate));\n\t\tif (!selected.length) return;\n\t\tconst response = await fetch(config.endpoint, {\n\t\t\tbody: JSON.stringify({ ...(config.environment ? { environment: config.environment } : {}), events: selected.map(report => ({ at: report.occurredAt, extra: { nativeDiagnostic: report.details, nativeDiagnosticId: report.id }, groupingKey: 'absolute-native:' + report.platform + ':' + report.kind, level: ['app-launch', 'cpu-exception', 'disk-write-exception', 'low-memory', 'resource-exhaustion', 'signal'].includes(report.kind) ? 'warning' : 'error', message: 'Native process diagnostic \u2014 ' + report.kind, name: 'AbsoluteMobileNativeDiagnostic', tags: { absoluteMobile: 'true', mobileAppBuild: manifest.appBuild, mobileEngine: 'expo', mobileFailurePhase: 'native-process', mobileManifestFormat: '1', mobileNativeRuntime: 'expo', mobilePlatform: report.platform, mobileRuntime: manifest.runtime } })), project: config.project, release: manifest.appBuild, v: 1 }),\n\t\t\theaders: { 'content-type': 'application/json' },\n\t\t\tmethod: 'POST'\n\t\t});\n\t\tif (response.ok) await native.acknowledge({ ids: selected.map(report => report.id) });\n\t})().catch(() => undefined).finally(() => { drainPromise = undefined; });\n\treturn drainPromise;\n};\nexport const startAbsoluteExpoNativeObservability = () => {\n\tif (!started) {\n\t\tstarted = true;\n\t\tAppState.addEventListener('change', state => { if (state === 'active') void drain(); });\n\t}\n\treturn drain();\n};\nexport const crashAbsoluteExpoNativeObservabilityForTesting = (testId: string) => native.crashForTesting({ testId });\n";
|
|
2
|
+
export declare const absoluteExpoNativeObservabilityFiles: (project: string) => Map<string, string>;
|
|
3
|
+
export declare const absoluteExpoNativeObservabilityPaths: (project: string) => string[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { NormalizedAbsoluteMobileConfig } from './config';
|
|
2
|
+
export type WriteAbsoluteExpoProjectOptions = {
|
|
3
|
+
force?: boolean;
|
|
4
|
+
projectRoot: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const writeAbsoluteExpoProject: (config: NormalizedAbsoluteMobileConfig, options: WriteAbsoluteExpoProjectOptions) => Promise<{
|
|
7
|
+
changed: number;
|
|
8
|
+
path: string;
|
|
9
|
+
written: string[];
|
|
10
|
+
}>;
|
|
11
|
+
export declare const syncAbsoluteExpoWebAssets: (config: NormalizedAbsoluteMobileConfig) => Promise<{
|
|
12
|
+
appBuild: string;
|
|
13
|
+
assets: number;
|
|
14
|
+
bundleId: string;
|
|
15
|
+
path: string;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const ABSOLUTE_EXPO_UPDATE_DESCRIPTOR: "_absolute/expo-update.json";
|
|
2
|
+
export declare const ABSOLUTE_EXPO_UPDATE_FORMAT: 1;
|
|
3
|
+
export type AbsoluteExpoUpdateAsset = {
|
|
4
|
+
extension?: string;
|
|
5
|
+
path: string;
|
|
6
|
+
};
|
|
7
|
+
export type AbsoluteExpoUpdatePlatform = {
|
|
8
|
+
assets: AbsoluteExpoUpdateAsset[];
|
|
9
|
+
launchAsset: AbsoluteExpoUpdateAsset;
|
|
10
|
+
};
|
|
11
|
+
export type AbsoluteExpoUpdateDescriptor = {
|
|
12
|
+
engine: 'expo';
|
|
13
|
+
expoConfig: Record<string, unknown>;
|
|
14
|
+
format: typeof ABSOLUTE_EXPO_UPDATE_FORMAT;
|
|
15
|
+
platforms: Partial<Record<'android' | 'ios', AbsoluteExpoUpdatePlatform>>;
|
|
16
|
+
runtimeVersion: string;
|
|
17
|
+
};
|
|
18
|
+
declare const parseAbsoluteExpoUpdateDescriptor: (value: unknown) => AbsoluteExpoUpdateDescriptor;
|
|
19
|
+
declare const finalizeAbsoluteExpoUpdateExport: (options: {
|
|
20
|
+
expoConfig: Record<string, unknown>;
|
|
21
|
+
exportDirectory: string;
|
|
22
|
+
runtimeVersion: string;
|
|
23
|
+
}) => Promise<{
|
|
24
|
+
descriptor: AbsoluteExpoUpdateDescriptor;
|
|
25
|
+
path: string;
|
|
26
|
+
}>;
|
|
27
|
+
export { finalizeAbsoluteExpoUpdateExport, parseAbsoluteExpoUpdateDescriptor };
|
|
@@ -1,26 +1,55 @@
|
|
|
1
1
|
export * from './artifactStore';
|
|
2
|
+
export * from './adaptiveShell';
|
|
2
3
|
export * from './androidRelease';
|
|
4
|
+
export * from './androidUpgradeConformance';
|
|
3
5
|
export * from './iosRelease';
|
|
4
6
|
export * from './iosConformance';
|
|
5
7
|
export * from './iosSimulatorController';
|
|
8
|
+
export * from './iosPhysicalDeviceTransport';
|
|
6
9
|
export * from './iosNativeWatcher';
|
|
7
10
|
export * from './remoteMacProtocol';
|
|
11
|
+
export * from './iosDeviceAcceptance';
|
|
8
12
|
export * from './associationFiles';
|
|
9
13
|
export * from './buildMetadata';
|
|
10
14
|
export * from './buildPipeline';
|
|
11
15
|
export * from './buildRelease';
|
|
12
16
|
export * from './capacitorBundle';
|
|
17
|
+
export * from './syncSchema';
|
|
18
|
+
export * from './syncRemediation';
|
|
19
|
+
export * from './deviceCapabilities';
|
|
20
|
+
export * from './expoBridge';
|
|
21
|
+
export * from './expoCodeSigning';
|
|
22
|
+
export * from './expoDevController';
|
|
23
|
+
export * from './expoProject';
|
|
24
|
+
export * from './expoNativeObservability';
|
|
25
|
+
export * from './expoUpdate';
|
|
13
26
|
export * from './capacitorProject';
|
|
14
27
|
export * from './config';
|
|
15
28
|
export * from './client';
|
|
29
|
+
export * from './ciWorkflow';
|
|
16
30
|
export * from './compatibilityDispatcher';
|
|
17
31
|
export * from './materializedBundle';
|
|
32
|
+
export * from './mobilePreview';
|
|
18
33
|
export * from './nativeDeepLinks';
|
|
34
|
+
export * from './nativeDeviceCapabilities';
|
|
19
35
|
export * from './nativeAuth';
|
|
36
|
+
export * from './nativeRoute';
|
|
37
|
+
export * from './nativeUpdates';
|
|
38
|
+
export * from './nativeObservability';
|
|
20
39
|
export * from './pageProtocol';
|
|
21
40
|
export * from './producerContext';
|
|
22
41
|
export * from './releaseArtifact';
|
|
23
42
|
export * from './releasePublisher';
|
|
24
43
|
export * from './routeMetadataTransform';
|
|
25
44
|
export * from './routeMatcher';
|
|
45
|
+
export * from './shellHttp';
|
|
46
|
+
export * from './shellNativeObservability';
|
|
47
|
+
export * from './shellObservability';
|
|
26
48
|
export * from './transport';
|
|
49
|
+
export * from './uiPrimitives';
|
|
50
|
+
export * from './updateClient';
|
|
51
|
+
export * from './updateProtocol';
|
|
52
|
+
export * from './updatePublisher';
|
|
53
|
+
export * from './updateRuntime';
|
|
54
|
+
export * from './updateRollout';
|
|
55
|
+
export * from './updateSigning';
|