@absolutejs/absolute 0.20.0-beta.84 → 0.20.0-beta.86
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/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/build.js +370 -17
- package/dist/build.js.map +5 -5
- package/dist/cli/{compile-t73ac1zb.js → compile-e9cn3xpx.js} +4 -4
- package/dist/cli/{config-naw5fer4.js → config-z2kf085h.js} +1 -1
- package/dist/cli/{dev-skb8dz33.js → dev-3hweza3s.js} +2 -2
- package/dist/cli/{expoProject-3mmwtemn.js → expoProject-dac8fqhq.js} +1 -1
- package/dist/cli/{index-czw3jd8f.js → index-3tsmbyze.js} +22 -1
- package/dist/cli/{index-q78x1k9q.js → index-9rk7v35t.js} +2 -2
- package/dist/cli/{index-p8ezgd5e.js → index-tame6e2c.js} +65 -3
- package/dist/cli/{index-8gksmws3.js → index-x48brywr.js} +2 -2
- package/dist/cli/index.js +5 -5
- package/dist/cli/{mobile-pdck6a35.js → mobile-2p3z33t1.js} +85 -8
- package/dist/cli/{start-jbgfw27x.js → start-7t186mhg.js} +4 -4
- package/dist/index.js +370 -17
- package/dist/index.js.map +5 -5
- package/dist/mobile/index.js +689 -69
- package/dist/mobile/index.js.map +8 -8
- package/dist/mobile/remoteMacAgentEntry.js +237 -175
- package/dist/mobile/shellUpdate.js +415 -67
- package/dist/src/mobile/config.d.ts +5 -0
- package/dist/src/mobile/updateClient.d.ts +33 -0
- package/dist/src/mobile/updatePublisher.d.ts +12 -1
- package/dist/src/mobile/updateServer.d.ts +10 -0
- package/dist/types/build.d.ts +9 -0
- package/package.json +2 -2
|
@@ -36,6 +36,11 @@ export type NormalizedAbsoluteMobileConfig = {
|
|
|
36
36
|
};
|
|
37
37
|
updateServer?: {
|
|
38
38
|
autoMount: boolean;
|
|
39
|
+
health?: {
|
|
40
|
+
failureRate: number;
|
|
41
|
+
minimumReports: number;
|
|
42
|
+
secretEnv: string;
|
|
43
|
+
};
|
|
39
44
|
expoCodeSigningKeys: Record<string, {
|
|
40
45
|
certificatePem: string;
|
|
41
46
|
privateKeyEnv: string;
|
|
@@ -13,8 +13,16 @@ export type AbsoluteMobileUpdateStore = {
|
|
|
13
13
|
activate(releaseId: string): Promise<void>;
|
|
14
14
|
begin(manifest: AbsoluteMobileUpdateManifest): Promise<void>;
|
|
15
15
|
commit(manifest: AbsoluteMobileUpdateManifest): Promise<void>;
|
|
16
|
+
/** Append a response chunk to persistent staging at the expected offset. */
|
|
17
|
+
appendPartial?(file: AbsoluteMobileUpdateFile, contents: Uint8Array, offset: number): Promise<void>;
|
|
18
|
+
/** Return an unverified, incomplete download from persistent staging. */
|
|
19
|
+
readPartial?(file: AbsoluteMobileUpdateFile): Promise<Uint8Array | null>;
|
|
16
20
|
/** Return a locally cached candidate for this exact path, when available. */
|
|
17
21
|
readReusable?(file: AbsoluteMobileUpdateFile): Promise<Uint8Array | null>;
|
|
22
|
+
/** Return an unverified completed file from a prior staging attempt. */
|
|
23
|
+
readStaged?(file: AbsoluteMobileUpdateFile): Promise<Uint8Array | null>;
|
|
24
|
+
/** End this attempt without deleting persistent staging. */
|
|
25
|
+
suspend?(releaseId: string): Promise<void>;
|
|
18
26
|
write(file: AbsoluteMobileUpdateFile, contents: Uint8Array): Promise<void>;
|
|
19
27
|
};
|
|
20
28
|
export type AbsoluteMobileUpdateVerifier = {
|
|
@@ -23,33 +31,58 @@ export type AbsoluteMobileUpdateVerifier = {
|
|
|
23
31
|
};
|
|
24
32
|
export type AbsoluteMobileUpdateClientOptions = {
|
|
25
33
|
config: AbsoluteMobileUpdateClientConfig;
|
|
34
|
+
/** Maximum parallel asset requests. Network conditions may reduce this. */
|
|
35
|
+
concurrency?: number;
|
|
26
36
|
fetch?: typeof globalThis.fetch;
|
|
37
|
+
onProgress?: (progress: AbsoluteMobileUpdateProgress) => void;
|
|
27
38
|
store: AbsoluteMobileUpdateStore;
|
|
28
39
|
verifier: AbsoluteMobileUpdateVerifier;
|
|
29
40
|
};
|
|
30
41
|
export type AbsoluteMobileUpdateCheckResult = {
|
|
31
42
|
kind: 'current';
|
|
32
43
|
} | {
|
|
44
|
+
healthToken?: string;
|
|
33
45
|
kind: 'downloaded';
|
|
34
46
|
manifest: AbsoluteMobileUpdateManifest;
|
|
35
47
|
transfer: AbsoluteMobileUpdateTransfer;
|
|
36
48
|
} | {
|
|
49
|
+
healthToken?: string;
|
|
37
50
|
kind: 'quarantined';
|
|
38
51
|
releaseId: string;
|
|
39
52
|
} | {
|
|
53
|
+
healthToken?: string;
|
|
40
54
|
kind: 'update-available';
|
|
41
55
|
manifest: AbsoluteMobileUpdateManifest;
|
|
42
56
|
};
|
|
57
|
+
export type AbsoluteMobileUpdateHealthKind = 'activated' | 'downloaded' | 'download-failed' | 'quarantined' | 'rolled-back';
|
|
58
|
+
export type AbsoluteMobileUpdateHealthEvidence = {
|
|
59
|
+
healthToken: string;
|
|
60
|
+
kind: AbsoluteMobileUpdateHealthKind;
|
|
61
|
+
reason?: 'boot-interrupted' | 'boot-timeout';
|
|
62
|
+
releaseId: string;
|
|
63
|
+
transfer?: Pick<AbsoluteMobileUpdateTransfer, 'avoidedBytes' | 'downloadedBytes' | 'durationMs' | 'resumedBytes' | 'reusedBytes' | 'throughputBytesPerSecond'>;
|
|
64
|
+
};
|
|
43
65
|
export type AbsoluteMobileUpdateTransfer = {
|
|
66
|
+
avoidedBytes: number;
|
|
67
|
+
completedFiles: number;
|
|
44
68
|
downloadedBytes: number;
|
|
45
69
|
downloadedFiles: number;
|
|
70
|
+
durationMs: number;
|
|
71
|
+
resumedBytes: number;
|
|
72
|
+
resumedFiles: number;
|
|
46
73
|
reusedBytes: number;
|
|
47
74
|
reusedFiles: number;
|
|
75
|
+
throughputBytesPerSecond: number;
|
|
48
76
|
totalBytes: number;
|
|
49
77
|
totalFiles: number;
|
|
50
78
|
};
|
|
79
|
+
export type AbsoluteMobileUpdateProgress = AbsoluteMobileUpdateTransfer & {
|
|
80
|
+
kind: 'download-progress';
|
|
81
|
+
};
|
|
82
|
+
export declare const reportAbsoluteMobileUpdateHealth: (config: AbsoluteMobileUpdateClientConfig, input: AbsoluteMobileUpdateHealthEvidence, request?: typeof globalThis.fetch) => Promise<void>;
|
|
51
83
|
export declare const createAbsoluteMobileUpdateClient: (options: AbsoluteMobileUpdateClientOptions) => {
|
|
52
84
|
check: (download?: boolean) => Promise<AbsoluteMobileUpdateCheckResult>;
|
|
53
85
|
activate: (releaseId: string) => Promise<void>;
|
|
54
86
|
download: () => Promise<AbsoluteMobileUpdateCheckResult>;
|
|
87
|
+
report: (input: AbsoluteMobileUpdateHealthEvidence) => Promise<void>;
|
|
55
88
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MobileUpdatePruneOptions, MobileUpdatePruneResult, MobileUpdateRetentionOptions, MobileUpdateStorageReport } from '@absolutejs/deploy/mobile-update';
|
|
1
|
+
import type { MobileUpdateHealthReport, MobileUpdatePruneOptions, MobileUpdatePruneResult, MobileUpdateRetentionOptions, MobileUpdateStorageReport } from '@absolutejs/deploy/mobile-update';
|
|
2
2
|
import { readAbsoluteMobileUpdate } from './updateSigning';
|
|
3
3
|
export type AbsoluteMobileUpdatePublication = {
|
|
4
4
|
appId: string;
|
|
@@ -26,6 +26,11 @@ export type AbsoluteMobileUpdateRollback = {
|
|
|
26
26
|
stage: 'rolled-back';
|
|
27
27
|
};
|
|
28
28
|
export type AbsoluteMobileUpdatePublisher = {
|
|
29
|
+
inspectUpdateHealth?: (options: {
|
|
30
|
+
appId: string;
|
|
31
|
+
channel: string;
|
|
32
|
+
releaseId?: string;
|
|
33
|
+
}) => Promise<MobileUpdateHealthReport | null>;
|
|
29
34
|
inspectUpdateStorage?: (options: MobileUpdateRetentionOptions) => Promise<MobileUpdateStorageReport>;
|
|
30
35
|
pruneUpdates?: (options: MobileUpdatePruneOptions) => Promise<MobileUpdatePruneResult>;
|
|
31
36
|
publishUpdate(options: {
|
|
@@ -48,6 +53,12 @@ export type AbsoluteMobileUpdatePublisher = {
|
|
|
48
53
|
signal?: AbortSignal;
|
|
49
54
|
}): Promise<AbsoluteMobileUpdateRollback>;
|
|
50
55
|
};
|
|
56
|
+
export declare const inspectAbsoluteMobileUpdateHealth: (options: {
|
|
57
|
+
appId: string;
|
|
58
|
+
channel: string;
|
|
59
|
+
publisher: AbsoluteMobileUpdatePublisher;
|
|
60
|
+
releaseId?: string;
|
|
61
|
+
}) => Promise<MobileUpdateHealthReport | null>;
|
|
51
62
|
export declare const inspectAbsoluteMobileUpdateStorage: (options: {
|
|
52
63
|
appId: string;
|
|
53
64
|
minAgeMs?: number;
|
|
@@ -22,11 +22,21 @@ export declare const createAbsoluteMobileUpdateServerPlugin: (config: Normalized
|
|
|
22
22
|
}, import("elysia/types").DefaultMetadata, {}, import("elysia/types").DefaultEphemeral, import("elysia/types").DefaultEphemeral>>;
|
|
23
23
|
export declare const inspectAbsoluteMobileUpdateServer: (config: NormalizedAbsoluteMobileConfig, projectRoot: string) => Promise<AbsoluteMobileUpdateServerMetadata | undefined>;
|
|
24
24
|
export declare const renderAbsoluteMobileUpdateRegistry: (options: {
|
|
25
|
+
health?: {
|
|
26
|
+
failureRate: number;
|
|
27
|
+
minimumReports: number;
|
|
28
|
+
secretEnv: string;
|
|
29
|
+
};
|
|
25
30
|
publicKeys: Readonly<Record<string, string>>;
|
|
26
31
|
storage: "local" | "s3";
|
|
27
32
|
}) => string;
|
|
28
33
|
export declare const writeAbsoluteMobileUpdateRegistry: (options: {
|
|
29
34
|
force?: boolean;
|
|
35
|
+
health?: {
|
|
36
|
+
failureRate: number;
|
|
37
|
+
minimumReports: number;
|
|
38
|
+
secretEnv: string;
|
|
39
|
+
};
|
|
30
40
|
modulePath?: string;
|
|
31
41
|
projectRoot: string;
|
|
32
42
|
publicKeys: Readonly<Record<string, string>>;
|
package/dist/types/build.d.ts
CHANGED
|
@@ -111,6 +111,15 @@ type MobileSharedConfig = {
|
|
|
111
111
|
server?: {
|
|
112
112
|
/** Mount the update endpoint in the AbsoluteJS runtime. Defaults to true. */
|
|
113
113
|
autoMount?: boolean;
|
|
114
|
+
/** Anonymous fleet-health receipts and automatic rollout protection. Enabled by default. */
|
|
115
|
+
health?: false | {
|
|
116
|
+
/** Failure fraction that pauses a promotion. Defaults to 0.2. */
|
|
117
|
+
failureRate?: number;
|
|
118
|
+
/** Terminal activation/rollback sample required before pausing. Defaults to 20. */
|
|
119
|
+
minimumReports?: number;
|
|
120
|
+
/** Trusted-server secret environment variable. */
|
|
121
|
+
secretEnv?: string;
|
|
122
|
+
};
|
|
114
123
|
/** Project-relative registry module. Defaults to `mobile.update.ts`. */
|
|
115
124
|
registry?: string;
|
|
116
125
|
/** Environment variable containing the Expo RSA private key PEM. */
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@absolutejs/auth": ">=0.75.0 <0.77.0",
|
|
11
11
|
"@absolutejs/beacon": ">=0.7.0-beta.4 <0.8.0",
|
|
12
|
-
"@absolutejs/deploy": "0.25.
|
|
12
|
+
"@absolutejs/deploy": "0.25.11",
|
|
13
13
|
"@absolutejs/devices": "0.7.0",
|
|
14
14
|
"@absolutejs/devices-capacitor": "0.8.0",
|
|
15
15
|
"@absolutejs/devices-expo": "0.0.2",
|
|
@@ -523,7 +523,7 @@
|
|
|
523
523
|
]
|
|
524
524
|
}
|
|
525
525
|
},
|
|
526
|
-
"version": "0.20.0-beta.
|
|
526
|
+
"version": "0.20.0-beta.86",
|
|
527
527
|
"workspaces": [
|
|
528
528
|
"tests/fixtures/*",
|
|
529
529
|
"tests/fixtures/_packages/*"
|