expo-release 2.3.2 → 2.4.0
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 +117 -124
- package/action.yml +63 -12
- package/dist/args.d.ts +4 -2
- package/dist/cli.js +848 -131
- package/dist/decide.d.ts +26 -0
- package/dist/doctor.d.ts +30 -0
- package/dist/eas-json.d.ts +25 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +401 -113
- package/dist/operate.d.ts +8 -1
- package/dist/run.d.ts +42 -2
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +74 -14
- package/dist/runtime/ota.d.ts +23 -3
- package/dist/runtime/push.d.ts +15 -3
- package/dist/source-maps.d.ts +1 -0
- package/package.json +7 -3
- package/src/args.ts +13 -8
- package/src/cli.ts +224 -26
- package/src/decide.ts +236 -22
- package/src/doctor.ts +296 -0
- package/src/eas-json.ts +128 -0
- package/src/index.ts +2 -0
- package/src/operate.ts +97 -53
- package/src/run.ts +259 -37
- package/src/runtime/index.ts +2 -0
- package/src/runtime/ota.ts +92 -15
- package/src/runtime/push.ts +46 -13
- package/src/runtime/react-native.d.ts +10 -0
- package/src/source-maps.ts +4 -1
package/dist/decide.d.ts
CHANGED
|
@@ -7,13 +7,26 @@ export type EASBuild = {
|
|
|
7
7
|
buildUrl?: string;
|
|
8
8
|
fingerprint?: string;
|
|
9
9
|
runtimeVersion?: string;
|
|
10
|
+
/** Why EAS failed the build, for an errored one. */
|
|
11
|
+
error?: string;
|
|
12
|
+
};
|
|
13
|
+
/** Why the decision came out the way it did. */
|
|
14
|
+
export type DecisionReason = 'no-impact-path' | 'finished-build' | 'build-in-progress' | 'no-build-for-fingerprint';
|
|
15
|
+
/** What changed since the profile's last finished build, for a native decision. */
|
|
16
|
+
export type FingerprintDiff = {
|
|
17
|
+
buildId: string;
|
|
18
|
+
buildUrl?: string;
|
|
19
|
+
/** `changed <path>`, `added <path>` or `removed <path>`; contents sources by id. */
|
|
20
|
+
sources: string[];
|
|
10
21
|
};
|
|
11
22
|
export type ReleaseDecision = {
|
|
12
23
|
deployType: DeployType;
|
|
24
|
+
reason: DecisionReason;
|
|
13
25
|
nativeBuildPending: boolean;
|
|
14
26
|
changedFiles: string[];
|
|
15
27
|
fingerprint: string | null;
|
|
16
28
|
build: EASBuild | null;
|
|
29
|
+
fingerprintDiff?: FingerprintDiff | null;
|
|
17
30
|
};
|
|
18
31
|
export type DecisionInput = {
|
|
19
32
|
base?: string;
|
|
@@ -22,14 +35,27 @@ export type DecisionInput = {
|
|
|
22
35
|
platform: ReleasePlatform;
|
|
23
36
|
impactPaths: string[];
|
|
24
37
|
ignoreExpoImpact?: boolean;
|
|
38
|
+
/** Passed to `eas fingerprint:compare` when explaining a native decision. */
|
|
39
|
+
environment?: string;
|
|
40
|
+
/** Runs once the diff says EAS is needed, before the first EAS command. */
|
|
41
|
+
preflight?: () => Promise<void>;
|
|
25
42
|
};
|
|
26
43
|
export declare function parseBuildList(output: string): EASBuild[];
|
|
27
44
|
export declare function isExpoImpactPath(path: string, impactPaths?: readonly string[]): boolean;
|
|
28
45
|
export declare function hasExpoImpact(paths: string[], impactPaths?: readonly string[]): boolean;
|
|
29
46
|
export declare function resolveBuildDecision(builds: EASBuild[]): {
|
|
30
47
|
deployType: Exclude<DeployType, 'none'>;
|
|
48
|
+
reason: Exclude<DecisionReason, 'no-impact-path'>;
|
|
31
49
|
nativeBuildPending: boolean;
|
|
32
50
|
build: EASBuild | null;
|
|
33
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* Without `--base`: the merge base with the PR's base branch on a pull request
|
|
54
|
+
* (`github.event.before` there is the previous push, not the base), else
|
|
55
|
+
* `github.event.before`.
|
|
56
|
+
*/
|
|
57
|
+
export declare function defaultBase(head: string | undefined, commandRunner: CommandRunner): Promise<string | undefined>;
|
|
58
|
+
/** Changed sources between the two fingerprints `eas fingerprint:compare --json` prints. */
|
|
59
|
+
export declare function diffFingerprintSources(compare: unknown): string[];
|
|
34
60
|
export declare function decideRelease(input: DecisionInput, commandRunner?: CommandRunner): Promise<ReleaseDecision>;
|
|
35
61
|
export declare function writeDecideGitHubOutput(decision: ReleaseDecision): Promise<void>;
|
package/dist/doctor.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReleasePlatform } from './args';
|
|
2
|
+
import type { BuildProfile, EasJson } from './eas-json';
|
|
3
|
+
import { type CommandRunner } from './run';
|
|
4
|
+
export type Finding = {
|
|
5
|
+
level: 'error' | 'warning';
|
|
6
|
+
message: string;
|
|
7
|
+
/** The command or change that fixes it. */
|
|
8
|
+
fix?: string;
|
|
9
|
+
};
|
|
10
|
+
export type DoctorInput = {
|
|
11
|
+
profile: string;
|
|
12
|
+
platform: ReleasePlatform;
|
|
13
|
+
environment?: string;
|
|
14
|
+
autoSubmit: boolean;
|
|
15
|
+
easJson: EasJson | null;
|
|
16
|
+
buildProfile: BuildProfile | null;
|
|
17
|
+
/** Also load the app config (`expo config`, slow in large apps). */
|
|
18
|
+
full?: boolean;
|
|
19
|
+
readPackageJson?: () => Promise<unknown>;
|
|
20
|
+
readFile?: (path: string) => Promise<string | null>;
|
|
21
|
+
env?: Record<string, string | undefined>;
|
|
22
|
+
bunVersion?: string;
|
|
23
|
+
};
|
|
24
|
+
/** Checks what makes a release fail later, or ship the wrong thing. */
|
|
25
|
+
export declare function runDoctor(input: DoctorInput, runner?: CommandRunner): Promise<Finding[]>;
|
|
26
|
+
/** One line per finding; GitHub annotations inside Actions. */
|
|
27
|
+
export declare function formatFindings(findings: Finding[], options?: {
|
|
28
|
+
asWarnings?: boolean;
|
|
29
|
+
github?: boolean;
|
|
30
|
+
}): string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReleasePlatform } from './args';
|
|
2
|
+
/** The fields of an eas.json build profile that expo-release reads. */
|
|
3
|
+
export type BuildProfile = {
|
|
4
|
+
channel?: string;
|
|
5
|
+
environment?: string;
|
|
6
|
+
env?: Record<string, string>;
|
|
7
|
+
node?: string;
|
|
8
|
+
bun?: string;
|
|
9
|
+
};
|
|
10
|
+
export type EasJson = {
|
|
11
|
+
cli?: {
|
|
12
|
+
version?: string;
|
|
13
|
+
};
|
|
14
|
+
build?: Record<string, Record<string, unknown>>;
|
|
15
|
+
submit?: Record<string, unknown>;
|
|
16
|
+
};
|
|
17
|
+
/** Reads eas.json from the working directory. eas-cli accepts JSON5 there. */
|
|
18
|
+
export declare function readEasJson(path?: string): Promise<EasJson | null>;
|
|
19
|
+
/** `build.<name>` with `extends` and the platform block applied, or null. */
|
|
20
|
+
export declare function resolveBuildProfile(easJson: EasJson, name: string, platform: ReleasePlatform): BuildProfile | null;
|
|
21
|
+
/**
|
|
22
|
+
* Puts the profile's `env` into this process, so every EAS command and hook
|
|
23
|
+
* sees what the EAS build machine sees. Variables already set win.
|
|
24
|
+
*/
|
|
25
|
+
export declare function applyProfileEnv(profile: BuildProfile | null, env?: Record<string, string | undefined>): string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { DEFAULT_IMPACT_PATHS, type CommandName, type DeployType, type Operation, type ReleaseOptions, type ReleasePlatform } from './args';
|
|
2
|
-
export { type DecisionInput, type EASBuild, type ReleaseDecision, decideRelease } from './decide';
|
|
2
|
+
export { type DecisionInput, type DecisionReason, type EASBuild, type FingerprintDiff, type ReleaseDecision, decideRelease } from './decide';
|
|
3
3
|
export { type OperationInput, type OperationResult, operateRelease } from './operate';
|