@absolutejs/absolute 0.20.0-beta.27 → 0.20.0-beta.29

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.
@@ -441,6 +441,17 @@ var initialNavigationPath = (entry) => {
441
441
  return current === "/" || current === "/index.html" ? entry : current;
442
442
  };
443
443
  var navigationGeneration = 0;
444
+ var notifyCapacitorSystemBarsDomReady = () => {
445
+ const provider = Reflect.get(globalThis, "CapacitorSystemBarsAndroidInterface");
446
+ if (typeof provider !== "object" || provider === null)
447
+ return;
448
+ const onDOMReady = Reflect.get(provider, "onDOMReady");
449
+ if (typeof onDOMReady !== "function")
450
+ return;
451
+ try {
452
+ onDOMReady.call(provider);
453
+ } catch {}
454
+ };
444
455
  var readManifest = async () => {
445
456
  const response = await fetch(MANIFEST_PATH, { cache: "no-store" });
446
457
  if (!response.ok) {
@@ -558,6 +569,7 @@ var navigateWithFailureState = async (manifest, path, pushHistory, reinstallBrow
558
569
  }
559
570
  };
560
571
  var startAbsoluteMobileShell = async (options = {}) => {
572
+ notifyCapacitorSystemBarsDomReady();
561
573
  const manifest = await readManifest();
562
574
  const auth = manifest.auth && options.createAuth ? await options.createAuth(manifest.auth, {
563
575
  beforeSignOut: options.beforeSignOut
@@ -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
@@ -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: {
@@ -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;
@@ -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>;
@@ -1,5 +1,6 @@
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';
@@ -1,3 +1,4 @@
1
+ import type { AbsoluteAndroidUpgradeConformanceResult } from './androidUpgradeConformance';
1
2
  export type AbsoluteNativeReportResult = 'FAIL' | 'NOT_RUN' | 'PASS' | 'SKIPPED';
2
3
  export type AbsoluteNativeReportCheck = {
3
4
  details: string;
@@ -24,6 +25,7 @@ export type AbsoluteNativeAutomatedRun = {
24
25
  status: 'fail' | 'pass';
25
26
  targetId: string;
26
27
  targetKind: 'device' | 'emulator' | 'simulator';
28
+ upgrade?: AbsoluteAndroidUpgradeConformanceResult;
27
29
  };
28
30
  export type AbsoluteNativeTestReport = {
29
31
  automatedChecks: AbsoluteNativeReportCheck[];
@@ -51,16 +53,7 @@ type CreateAbsoluteNativeTestReportOptions = {
51
53
  run: AbsoluteNativeAutomatedRun;
52
54
  };
53
55
  export declare const sanitizeNativeReportText: (value: string) => string;
54
- export declare const createAbsoluteNativeAutomatedChecks: (run: AbsoluteNativeAutomatedRun) => ({
55
- id: string;
56
- result: "FAIL" | "PASS";
57
- evidence?: string | undefined;
58
- details: string;
59
- } | {
60
- details: string;
61
- id: string;
62
- result: "FAIL" | "NOT_RUN" | "PASS";
63
- })[];
56
+ export declare const createAbsoluteNativeAutomatedChecks: (run: AbsoluteNativeAutomatedRun) => AbsoluteNativeReportCheck[];
64
57
  export declare const createAbsoluteNativeTestReport: (options: CreateAbsoluteNativeTestReportOptions) => AbsoluteNativeTestReport;
65
58
  export declare const readPackageVersionForNativeReport: (packageJsonPath: string) => Promise<string>;
66
59
  export declare const renderAbsoluteNativeTestReport: (report: AbsoluteNativeTestReport) => string;
package/package.json CHANGED
@@ -453,6 +453,7 @@
453
453
  "test:native:android:bundle": "ABSOLUTE_TEST_NATIVE_ANDROID=1 bun test tests/native/android-embedded-bundle-conformance.test.ts",
454
454
  "test:native:android:hmr": "ABSOLUTE_TEST_NATIVE_ANDROID=1 bun test tests/native/android-hmr-conformance.test.ts",
455
455
  "test:native:android:lifecycle": "ABSOLUTE_TEST_NATIVE_ANDROID=1 bun test tests/native/android-lifecycle-conformance.test.ts",
456
+ "test:native:android:upgrade": "ABSOLUTE_TEST_NATIVE_ANDROID=1 bun test tests/native/android-embedded-bundle-conformance.test.ts -t 'installed APK upgrade'",
456
457
  "test:native:ios": "ABSOLUTE_TEST_NATIVE_IOS=1 bun test tests/native/ios-lifecycle-conformance.test.ts",
457
458
  "test:unit": "bun test --max-concurrency 1 tests/unit",
458
459
  "typecheck": "bun run src/cli/index.ts typecheck --config example/absolute.config.ts",
@@ -502,7 +503,7 @@
502
503
  ]
503
504
  }
504
505
  },
505
- "version": "0.20.0-beta.27",
506
+ "version": "0.20.0-beta.29",
506
507
  "workspaces": [
507
508
  "tests/fixtures/*",
508
509
  "tests/fixtures/_packages/*"