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

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.
@@ -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,6 +2,7 @@ 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';
7
8
  type HMRUpdateMetadata = {
@@ -10,6 +11,7 @@ type HMRUpdateMetadata = {
10
11
  };
11
12
  export type HMRState = {
12
13
  connectedClients: Set<HMRWebSocket>;
14
+ clientTargets: Map<HMRWebSocket, HMRClientTarget>;
13
15
  activeFrameworks: Set<string>;
14
16
  dependencyGraph: DependencyGraph;
15
17
  isRebuilding: boolean;
@@ -67,13 +67,14 @@ export type StartAbsoluteAndroidDevOptions = {
67
67
  export declare const redactAbsoluteAndroidLog: (value: string) => string;
68
68
  export declare const isIgnorableAbsoluteAndroidLog: (entry: AbsoluteAndroidNativeLogEntry) => boolean;
69
69
  export declare const parseAbsoluteAndroidLogLine: (line: string) => AbsoluteAndroidNativeLogEntry | null;
70
- export declare const fingerprintAbsoluteAndroidNativeProject: (project: AbsoluteAndroidDevProject) => Promise<string>;
70
+ export declare const fingerprintAbsoluteAndroidNativeProject: (project: Pick<AbsoluteAndroidDevProject, "nativeDirectory">) => Promise<string>;
71
71
  export declare const repairAbsoluteAndroidDevSession: (projectRoot: string) => Promise<boolean>;
72
72
  export declare const parseAdbDevices: (output: string) => string[];
73
73
  export type AbsoluteAndroidGradleTask = 'assembleDebug' | 'assembleRelease' | 'bundleRelease';
74
74
  export type BuildAbsoluteAndroidGradleOptions = {
75
75
  capture?: NonNullable<StartAbsoluteAndroidDevOptions['capture']>;
76
76
  env?: Record<string, string | undefined>;
77
+ gradleArguments?: readonly string[];
77
78
  project: Pick<AbsoluteAndroidDevProject, 'androidRoot' | 'config' | 'host' | 'nativeDirectory' | 'projectRoot'>;
78
79
  run?: NonNullable<StartAbsoluteAndroidDevOptions['run']>;
79
80
  signal?: AbortSignal;
@@ -15,6 +15,7 @@ export type AbsoluteAndroidReleaseMetadata = {
15
15
  sha256: string;
16
16
  signed: boolean;
17
17
  type: 'aab';
18
+ versionCode?: number;
18
19
  };
19
20
  export type BuildAbsoluteAndroidReleaseOptions = {
20
21
  allowUnsigned?: boolean;
@@ -26,6 +27,8 @@ export type BuildAbsoluteAndroidReleaseOptions = {
26
27
  outputDirectory?: string;
27
28
  projectRoot: string;
28
29
  run?: (command: string[], options?: AbsoluteAndroidCommandOptions) => Promise<number>;
30
+ prepareVersionCode?: (buildIdentity: string) => Promise<number>;
31
+ versionCode?: number;
29
32
  };
30
33
  export declare const buildAbsoluteAndroidRelease: (options: BuildAbsoluteAndroidReleaseOptions) => Promise<{
31
34
  artifactPath: string;
@@ -42,6 +45,7 @@ export declare const buildAbsoluteAndroidRelease: (options: BuildAbsoluteAndroid
42
45
  platform: "android";
43
46
  engine: "capacitor";
44
47
  signed: boolean;
48
+ versionCode?: number | undefined;
45
49
  };
46
50
  releaseRoot: string;
47
51
  }>;
@@ -9,6 +9,7 @@ export type NormalizedAbsoluteMobileConfig = {
9
9
  deepLinkScheme?: string;
10
10
  engine: 'capacitor';
11
11
  entry: string;
12
+ iosVersion?: string;
12
13
  nativeProjectDirectory: string;
13
14
  platforms: MobilePlatform[];
14
15
  productionOrigin: string;
@@ -1,5 +1,9 @@
1
1
  export * from './artifactStore';
2
2
  export * from './androidRelease';
3
+ export * from './iosRelease';
4
+ export * from './iosConformance';
5
+ export * from './iosSimulatorController';
6
+ export * from './iosNativeWatcher';
3
7
  export * from './associationFiles';
4
8
  export * from './buildMetadata';
5
9
  export * from './buildPipeline';
@@ -14,6 +18,7 @@ export * from './nativeDeepLinks';
14
18
  export * from './pageProtocol';
15
19
  export * from './producerContext';
16
20
  export * from './releaseArtifact';
21
+ export * from './releasePublisher';
17
22
  export * from './routeMetadataTransform';
18
23
  export * from './routeMatcher';
19
24
  export * from './transport';
@@ -0,0 +1,15 @@
1
+ export type AbsoluteIosHmrApply = {
2
+ clientMs?: number;
3
+ duration: number;
4
+ line: string;
5
+ outcome: 'applied' | 'failed' | 'reloaded';
6
+ serverMs?: number;
7
+ };
8
+ export declare const parseAbsoluteIosHmrLog: (line: string) => AbsoluteIosHmrApply | null;
9
+ export declare const waitForAbsoluteIosHmrLog: (options: {
10
+ logPath: string;
11
+ signal?: AbortSignal;
12
+ sleep?: (milliseconds: number) => Promise<void>;
13
+ startOffset?: number;
14
+ timeoutMs?: number;
15
+ }) => Promise<AbsoluteIosHmrApply>;
@@ -0,0 +1,19 @@
1
+ import { type AbsoluteIosDevProject } from './iosSimulatorController';
2
+ export type AbsoluteIosNativeChange = {
3
+ afterFingerprint: string;
4
+ beforeFingerprint: string;
5
+ paths: string[];
6
+ rootInputChanged: boolean;
7
+ };
8
+ export type AbsoluteIosNativeWatcher = {
9
+ close: () => void;
10
+ };
11
+ export type AbsoluteIosNativeWatcherOptions = {
12
+ debounceMs?: number;
13
+ onChange: (change: AbsoluteIosNativeChange) => Promise<void>;
14
+ onError?: (error: unknown) => void;
15
+ project: AbsoluteIosDevProject;
16
+ signal?: AbortSignal;
17
+ };
18
+ export declare const createAbsoluteIosNativeWatcher: (options: AbsoluteIosNativeWatcherOptions) => Promise<AbsoluteIosNativeWatcher>;
19
+ export declare const isAbsoluteIosNativeRootInput: (path: string) => boolean;
@@ -0,0 +1,61 @@
1
+ import type { NormalizedAbsoluteMobileConfig } from './config';
2
+ import { type AbsoluteMobileHost } from './emulatorDoctor';
3
+ export declare const ABSOLUTE_IOS_RELEASE_FORMAT: 1;
4
+ export type AbsoluteIosReleaseMetadata = {
5
+ appBuild: string;
6
+ appId: string;
7
+ artifact: 'App.ipa';
8
+ buildNumber?: number;
9
+ bytes: number;
10
+ engine: 'capacitor';
11
+ format: typeof ABSOLUTE_IOS_RELEASE_FORMAT;
12
+ marketingVersion: string;
13
+ platform: 'ios';
14
+ releaseId: string;
15
+ runtime: string;
16
+ sha256: string;
17
+ signed: boolean;
18
+ type: 'ipa';
19
+ };
20
+ type CommandOptions = {
21
+ cwd?: string;
22
+ env?: Record<string, string | undefined>;
23
+ };
24
+ type CommandResult = {
25
+ exitCode: number;
26
+ stderr: string;
27
+ stdout: string;
28
+ };
29
+ export type BuildAbsoluteIosReleaseOptions = {
30
+ allowUnsigned?: boolean;
31
+ capture?: (command: string[], options?: CommandOptions) => CommandResult;
32
+ config: NormalizedAbsoluteMobileConfig;
33
+ host?: AbsoluteMobileHost;
34
+ outputDirectory?: string;
35
+ prepareBuildNumber?: (buildIdentity: string) => Promise<number>;
36
+ projectRoot: string;
37
+ run?: (command: string[], options?: CommandOptions) => Promise<number>;
38
+ buildNumber?: number;
39
+ };
40
+ export declare const fingerprintAbsoluteIosNativeProject: (nativeDirectory: string) => Promise<string>;
41
+ export declare const buildAbsoluteIosRelease: (options: BuildAbsoluteIosReleaseOptions) => Promise<{
42
+ artifactPath: string;
43
+ metadata: {
44
+ artifact: "App.ipa";
45
+ sha256: string;
46
+ type: "ipa";
47
+ format: typeof ABSOLUTE_IOS_RELEASE_FORMAT;
48
+ bytes: number;
49
+ runtime: string;
50
+ releaseId: string;
51
+ appBuild: string;
52
+ appId: string;
53
+ platform: "ios";
54
+ buildNumber?: number | undefined;
55
+ engine: "capacitor";
56
+ marketingVersion: string;
57
+ signed: boolean;
58
+ };
59
+ releaseRoot: string;
60
+ }>;
61
+ export {};
@@ -0,0 +1,89 @@
1
+ import type { NormalizedAbsoluteMobileConfig } from './config';
2
+ export declare const ABSOLUTE_IOS_SIMULATOR_NAME = "AbsoluteJS iPhone";
3
+ export type AbsoluteIosCommandOptions = {
4
+ cwd?: string;
5
+ env?: Record<string, string | undefined>;
6
+ signal?: AbortSignal;
7
+ };
8
+ export type AbsoluteIosCommandResult = {
9
+ exitCode: number;
10
+ stderr: string;
11
+ stdout: string;
12
+ };
13
+ export type AbsoluteIosDevState = 'booting' | 'building' | 'checking-native' | 'closed' | 'closing' | 'configuring' | 'connecting' | 'failed' | 'installing' | 'launching' | 'ready' | 'streaming-logs' | 'syncing';
14
+ export type AbsoluteIosNativeLogEntry = {
15
+ level: 'debug' | 'error' | 'fault' | 'info' | 'notice';
16
+ message: string;
17
+ tag: string;
18
+ };
19
+ type AbsoluteIosLogStream = {
20
+ close: () => Promise<void>;
21
+ };
22
+ export type AbsoluteIosDevProject = {
23
+ cap: string;
24
+ config: NormalizedAbsoluteMobileConfig;
25
+ nativeDirectory: string;
26
+ projectRoot: string;
27
+ xcodebuild: string;
28
+ xcrun: string;
29
+ };
30
+ export type AbsoluteIosDevSession = {
31
+ close: () => Promise<void>;
32
+ nativeCacheHit: boolean;
33
+ rebuild: () => Promise<AbsoluteIosDevSession>;
34
+ relaunch: () => Promise<void>;
35
+ screenshot: (destination: string) => Promise<string>;
36
+ startedSimulator: boolean;
37
+ state: AbsoluteIosDevState;
38
+ timings: Record<string, number>;
39
+ udid: string;
40
+ };
41
+ export type AbsoluteIosDevPhaseTiming = {
42
+ durationMs: number;
43
+ phase: AbsoluteIosDevState;
44
+ totalMs: number;
45
+ };
46
+ export type PrepareAbsoluteIosDevOptions = {
47
+ createNativeProject: boolean;
48
+ projectRoot: string;
49
+ run?: (command: string[], options?: AbsoluteIosCommandOptions) => Promise<number>;
50
+ };
51
+ export type StartAbsoluteIosDevOptions = {
52
+ capture?: (command: string[], options?: AbsoluteIosCommandOptions) => AbsoluteIosCommandResult;
53
+ https?: boolean;
54
+ log?: (message: string) => void;
55
+ nativeLog?: (entry: AbsoluteIosNativeLogEntry) => void;
56
+ onPhaseTiming?: (timing: AbsoluteIosDevPhaseTiming) => void;
57
+ onStateChange?: (state: AbsoluteIosDevState) => void;
58
+ port: number;
59
+ project: AbsoluteIosDevProject;
60
+ run?: (command: string[], options?: AbsoluteIosCommandOptions) => Promise<number>;
61
+ signal?: AbortSignal;
62
+ sleep?: (milliseconds: number) => Promise<void>;
63
+ spawn?: (command: string[], options?: AbsoluteIosCommandOptions) => void;
64
+ startNativeLogs?: (command: string[], options: AbsoluteIosCommandOptions, onLine: (line: string) => void) => AbsoluteIosLogStream;
65
+ };
66
+ export declare const parseIosDeviceTypes: (source: string) => {
67
+ identifier: string;
68
+ name: string;
69
+ }[];
70
+ export declare const parseIosRuntimes: (source: string) => {
71
+ identifier: string;
72
+ isAvailable: boolean;
73
+ name: string;
74
+ version: string;
75
+ }[];
76
+ export declare const parseIosSimulators: (source: string) => {
77
+ isAvailable: boolean;
78
+ name: string;
79
+ runtime: string;
80
+ state: string;
81
+ udid: string;
82
+ }[];
83
+ export declare const repairAbsoluteIosDevSession: (projectRoot: string) => Promise<boolean>;
84
+ export declare const fingerprintAbsoluteIosDevProject: (project: Pick<AbsoluteIosDevProject, "nativeDirectory">) => Promise<string>;
85
+ export declare const parseAbsoluteIosLogLine: (line: string) => AbsoluteIosNativeLogEntry | null;
86
+ export declare const redactAbsoluteIosLog: (value: string) => string;
87
+ export declare const prepareAbsoluteIosDevProject: (config: NormalizedAbsoluteMobileConfig, options: PrepareAbsoluteIosDevOptions) => Promise<AbsoluteIosDevProject>;
88
+ export declare const startAbsoluteIosDevSession: (options: StartAbsoluteIosDevOptions) => Promise<AbsoluteIosDevSession>;
89
+ export {};
@@ -0,0 +1,130 @@
1
+ import type { AbsoluteAndroidReleaseMetadata } from './androidRelease';
2
+ import type { AbsoluteIosReleaseMetadata } from './iosRelease';
3
+ export type AbsoluteGooglePlayReleaseTarget = {
4
+ changesNotSentForReview?: boolean;
5
+ inAppUpdatePriority?: number;
6
+ name?: string;
7
+ releaseNotes?: readonly {
8
+ language: string;
9
+ text: string;
10
+ }[];
11
+ reviewBehavior?: 'CANCEL_IN_REVIEW_AND_SUBMIT' | 'ERROR_IF_IN_REVIEW';
12
+ status?: 'completed' | 'draft' | 'halted' | 'inProgress';
13
+ track: string;
14
+ userFraction?: number;
15
+ };
16
+ export type AbsoluteAppStoreConnectReleaseTarget = {
17
+ groups?: readonly string[];
18
+ submitForReview?: boolean;
19
+ whatsNew?: readonly {
20
+ locale: string;
21
+ text: string;
22
+ }[];
23
+ };
24
+ export type AbsoluteNativeReleasePublication = {
25
+ channel?: {
26
+ channel: string;
27
+ releaseId: string;
28
+ };
29
+ record: {
30
+ metadata: AbsoluteAndroidReleaseMetadata | AbsoluteIosReleaseMetadata;
31
+ };
32
+ reused: boolean;
33
+ googlePlay?: {
34
+ receipt: {
35
+ intent: {
36
+ track: string;
37
+ };
38
+ packageName: string;
39
+ provider: 'google-play';
40
+ releaseId: string;
41
+ sha256: string;
42
+ stage: string;
43
+ versionCode?: string;
44
+ };
45
+ reused: boolean;
46
+ };
47
+ appStoreConnect?: {
48
+ receipt: {
49
+ appleAppId: string;
50
+ buildId?: string;
51
+ buildNumber: number;
52
+ intent: {
53
+ groups: string[];
54
+ submitForReview: boolean;
55
+ };
56
+ marketingVersion: string;
57
+ provider: 'app-store-connect';
58
+ releaseId: string;
59
+ sha256: string;
60
+ stage: string;
61
+ };
62
+ reused: boolean;
63
+ };
64
+ };
65
+ export type AbsoluteNativeReleasePublisher = {
66
+ prepareAndroidRelease?: (options: {
67
+ buildIdentity: string;
68
+ googlePlay?: AbsoluteGooglePlayReleaseTarget;
69
+ packageName: string;
70
+ signal?: AbortSignal;
71
+ }) => Promise<{
72
+ versionCode?: number;
73
+ }>;
74
+ prepareIosRelease?: (options: {
75
+ buildIdentity: string;
76
+ bundleId: string;
77
+ marketingVersion: string;
78
+ signal?: AbortSignal;
79
+ }) => Promise<{
80
+ buildNumber: number;
81
+ }>;
82
+ publish: (options: {
83
+ allowUnsigned?: boolean;
84
+ appStoreConnect?: AbsoluteAppStoreConnectReleaseTarget;
85
+ channel?: string;
86
+ googlePlay?: AbsoluteGooglePlayReleaseTarget;
87
+ releaseRoot: string;
88
+ signal?: AbortSignal;
89
+ }) => Promise<AbsoluteNativeReleasePublication>;
90
+ };
91
+ export declare const prepareAbsoluteIosRelease: (publisher: AbsoluteNativeReleasePublisher, options: {
92
+ buildIdentity: string;
93
+ bundleId: string;
94
+ marketingVersion: string;
95
+ signal?: AbortSignal;
96
+ }) => Promise<number>;
97
+ type PrepareAbsoluteAndroidReleaseOptions = {
98
+ buildIdentity: string;
99
+ googlePlay: AbsoluteGooglePlayReleaseTarget;
100
+ packageName: string;
101
+ signal?: AbortSignal;
102
+ };
103
+ export declare const prepareAbsoluteAndroidRelease: (publisher: AbsoluteNativeReleasePublisher, options: PrepareAbsoluteAndroidReleaseOptions) => Promise<number>;
104
+ export type PublishAbsoluteAndroidReleaseOptions = {
105
+ allowUnsigned?: boolean;
106
+ channel?: string;
107
+ googlePlay?: AbsoluteGooglePlayReleaseTarget;
108
+ modulePath: string;
109
+ projectRoot: string;
110
+ release: {
111
+ metadata: AbsoluteAndroidReleaseMetadata;
112
+ releaseRoot: string;
113
+ };
114
+ signal?: AbortSignal;
115
+ };
116
+ export declare const loadAbsoluteNativeReleasePublisher: (projectRoot: string, requestedModulePath: string) => Promise<AbsoluteNativeReleasePublisher>;
117
+ export declare const publishAbsoluteAndroidRelease: (options: PublishAbsoluteAndroidReleaseOptions) => Promise<AbsoluteNativeReleasePublication>;
118
+ export declare const publishAbsoluteIosRelease: (options: {
119
+ allowUnsigned?: boolean;
120
+ appStoreConnect?: AbsoluteAppStoreConnectReleaseTarget;
121
+ channel?: string;
122
+ modulePath: string;
123
+ projectRoot: string;
124
+ release: {
125
+ metadata: AbsoluteIosReleaseMetadata;
126
+ releaseRoot: string;
127
+ };
128
+ signal?: AbortSignal;
129
+ }) => Promise<AbsoluteNativeReleasePublication>;
130
+ export {};
@@ -80,6 +80,9 @@ export declare const hmr: (hmrState: HMRState, manifest: Record<string, string>,
80
80
  error: [];
81
81
  }, "get", "/hmr-status", import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{}, {}, "/hmr-status">, import("elysia/types").MergeScopedSchemas<{}, {}, {}>>, {}, () => {
82
82
  connectedClients: number;
83
+ connectedTargets: {
84
+ [k: string]: number;
85
+ };
83
86
  entryWatcherReady: boolean;
84
87
  isRebuilding: boolean;
85
88
  manifestKeys: string[];
@@ -45,6 +45,10 @@ export type MobileConfig = {
45
45
  /** Parent directory for generated iOS and Android projects. */
46
46
  directory?: string;
47
47
  };
48
+ ios?: {
49
+ /** App Store marketing version written to CFBundleShortVersionString. */
50
+ version: string;
51
+ };
48
52
  deepLinks?: {
49
53
  /** Optional custom URL scheme in addition to HTTPS app/universal links. */
50
54
  scheme?: string;
package/package.json CHANGED
@@ -265,12 +265,12 @@
265
265
  "main": "./dist/index.js",
266
266
  "name": "@absolutejs/absolute",
267
267
  "optionalDependencies": {
268
- "@absolutejs/native-darwin-arm64": "0.20.0-beta.0",
269
- "@absolutejs/native-darwin-x64": "0.20.0-beta.0",
270
- "@absolutejs/native-linux-arm64": "0.20.0-beta.0",
271
- "@absolutejs/native-linux-x64": "0.20.0-beta.0",
272
- "@absolutejs/native-windows-arm64": "0.20.0-beta.0",
273
- "@absolutejs/native-windows-x64": "0.20.0-beta.0"
268
+ "@absolutejs/native-darwin-arm64": "0.20.0-beta.3",
269
+ "@absolutejs/native-darwin-x64": "0.20.0-beta.3",
270
+ "@absolutejs/native-linux-arm64": "0.20.0-beta.3",
271
+ "@absolutejs/native-linux-x64": "0.20.0-beta.3",
272
+ "@absolutejs/native-windows-arm64": "0.20.0-beta.3",
273
+ "@absolutejs/native-windows-x64": "0.20.0-beta.3"
274
274
  },
275
275
  "overrides": {
276
276
  "@sinclair/typebox": "0.34.52",
@@ -427,6 +427,7 @@
427
427
  "test:native:android": "bun run test:native:android:lifecycle && bun run test:native:android:hmr",
428
428
  "test:native:android:hmr": "ABSOLUTE_TEST_NATIVE_ANDROID=1 bun test tests/native/android-hmr-conformance.test.ts",
429
429
  "test:native:android:lifecycle": "ABSOLUTE_TEST_NATIVE_ANDROID=1 bun test tests/native/android-lifecycle-conformance.test.ts",
430
+ "test:native:ios": "ABSOLUTE_TEST_NATIVE_IOS=1 bun test tests/native/ios-lifecycle-conformance.test.ts",
430
431
  "test:unit": "bun test tests/unit",
431
432
  "typecheck": "bun run src/cli/index.ts typecheck --config example/absolute.config.ts",
432
433
  "verify:release-versions": "bun run scripts/verifyReleaseVersions.ts"
@@ -475,7 +476,7 @@
475
476
  ]
476
477
  }
477
478
  },
478
- "version": "0.20.0-beta.1",
479
+ "version": "0.20.0-beta.3",
479
480
  "workspaces": [
480
481
  "tests/fixtures/*",
481
482
  "tests/fixtures/_packages/*"