create-disposabl-app 0.14.12 → 0.14.14
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/disposabl.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
|
8
8
|
import { Command, CommanderError } from "commander";
|
|
9
9
|
import * as p2 from "@clack/prompts";
|
|
10
10
|
// package.json
|
|
11
|
-
var version = "0.14.
|
|
11
|
+
var version = "0.14.14";
|
|
12
12
|
|
|
13
13
|
// ../disposabl-kit/platforms.ts
|
|
14
14
|
var platforms = [
|
|
@@ -50,6 +50,8 @@ TesterArmy claims the device for its own session. Run automated flows before ope
|
|
|
50
50
|
|
|
51
51
|
For a development client with several Metro servers running, set `E2E_MOBILE_DEV_URL` to this app's Metro URL and `E2E_MOBILE_DEV_SCHEME` to its unique installed URL scheme. The mobile flows explicitly connect after launch and restart. This prevents accidentally testing another server or backend. Release builds omit both variables.
|
|
52
52
|
|
|
53
|
+
Verify that only the intended installed app registers that scheme. A scheme matching the bundle ID can still collide when another test build copied it. On iOS, inspect `CFBundleURLTypes` in the installed apps' `Info.plist` files. If the driver reports that the target is not running while Metro serves a bundle or shows a missing-native-module error, identify the receiving app before changing dependencies. Select a scheme registered only to the intended client, or rebuild it with a unique scheme; preserve other apps and their data.
|
|
54
|
+
|
|
53
55
|
When supplying an isolated backend through Metro's shell environment, also set `EXPO_NO_DOTENV=1` and `EXPO_PUBLIC_E2E=true`. The Metro configuration excludes dotenv files in this mode: SDK 58's development environment module otherwise reloads `.env.local` after shell values. Set both `EXPO_PUBLIC_CONVEX_URL` and `EXPO_PUBLIC_CONVEX_SITE_URL` to the test backend, using the emulator's reachable host address. The test runner's `E2E_CONVEX_URL` and `E2E_CONVEX_SITE_URL` must address that same deployment from the host.
|
|
54
56
|
|
|
55
57
|
## CI
|
|
@@ -70,6 +70,8 @@ if (native.length) {
|
|
|
70
70
|
name: platform,
|
|
71
71
|
engine: mobile({
|
|
72
72
|
platform,
|
|
73
|
+
// UIKit exposes final AX frames before native transitions accept input.
|
|
74
|
+
transition: platform === "ios" ? 2000 : undefined,
|
|
73
75
|
device: process.env[`E2E_${platform.toUpperCase()}_DEVICE`],
|
|
74
76
|
}),
|
|
75
77
|
app: {
|
|
@@ -34,7 +34,12 @@ test(
|
|
|
34
34
|
}
|
|
35
35
|
const app = randomBytes(16).toString("hex");
|
|
36
36
|
const feed = `${site.origin}/desktop/updates/${app}/production/win32/x64/`;
|
|
37
|
-
async function upload(
|
|
37
|
+
async function upload(
|
|
38
|
+
build: number,
|
|
39
|
+
attempt: number,
|
|
40
|
+
bytes: string,
|
|
41
|
+
platform: "win32" | "darwin" = "win32",
|
|
42
|
+
) {
|
|
38
43
|
const url = await call("uploadUrl", {});
|
|
39
44
|
expect(url.status).toBe("success");
|
|
40
45
|
expect(new URL(url.value).hostname).toBe(origin.hostname);
|
|
@@ -45,12 +50,12 @@ test(
|
|
|
45
50
|
return {
|
|
46
51
|
app,
|
|
47
52
|
channel: "production",
|
|
48
|
-
platform
|
|
49
|
-
arch: "x64",
|
|
53
|
+
platform,
|
|
54
|
+
arch: platform === "darwin" ? "arm64" : "x64",
|
|
50
55
|
version,
|
|
51
56
|
build,
|
|
52
57
|
attempt,
|
|
53
|
-
filename: `fixture-${version}-full.nupkg`,
|
|
58
|
+
filename: `fixture-${version}${platform === "darwin" ? ".zip" : "-full.nupkg"}`,
|
|
54
59
|
storageId,
|
|
55
60
|
sha256: createHash("sha256").update(bytes).digest("hex"),
|
|
56
61
|
sha1: createHash("sha1").update(bytes).digest("hex").toUpperCase(),
|
|
@@ -98,5 +103,49 @@ test(
|
|
|
98
103
|
(await fetch(feed.replace("/production/", "/preview/") + "RELEASES"))
|
|
99
104
|
.status,
|
|
100
105
|
).toBe(404);
|
|
106
|
+
|
|
107
|
+
const mac = await upload(1, 1, "macOS production package", "darwin");
|
|
108
|
+
expect((await call("publish", mac)).status).toBe("success");
|
|
109
|
+
const macFeed = feed.replace("/win32/x64/", "/darwin/arm64/");
|
|
110
|
+
const macManifest = await fetch(`${macFeed}RELEASES.json`);
|
|
111
|
+
expect(macManifest.headers.get("content-type")).toBe("application/json");
|
|
112
|
+
expect(macManifest.headers.get("cache-control")).toBe("no-store");
|
|
113
|
+
const macRelease = {
|
|
114
|
+
currentRelease: mac.version,
|
|
115
|
+
releases: [
|
|
116
|
+
{
|
|
117
|
+
version: mac.version,
|
|
118
|
+
updateTo: {
|
|
119
|
+
version: mac.version,
|
|
120
|
+
name: mac.version,
|
|
121
|
+
url: `${macFeed}${mac.filename}`,
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
};
|
|
126
|
+
expect(await macManifest.json()).toEqual(macRelease);
|
|
127
|
+
expect(await (await fetch(`${macFeed}${mac.filename}`)).text()).toBe(
|
|
128
|
+
"macOS production package",
|
|
129
|
+
);
|
|
130
|
+
const preview = await upload(2, 1, "macOS preview package", "darwin");
|
|
131
|
+
expect(
|
|
132
|
+
(await call("publish", { ...preview, channel: "preview" })).status,
|
|
133
|
+
).toBe("success");
|
|
134
|
+
expect(await (await fetch(`${macFeed}RELEASES.json`)).json()).toEqual(
|
|
135
|
+
macRelease,
|
|
136
|
+
);
|
|
137
|
+
const previewFeed = macFeed.replace("/production/", "/preview/");
|
|
138
|
+
const previewManifest = await (
|
|
139
|
+
await fetch(`${previewFeed}RELEASES.json`)
|
|
140
|
+
).json();
|
|
141
|
+
expect(previewManifest.currentRelease).toBe(preview.version);
|
|
142
|
+
const previewUrl = previewManifest.releases[0].updateTo.url;
|
|
143
|
+
expect(previewUrl).toBe(previewFeed + preview.filename);
|
|
144
|
+
expect(await (await fetch(previewUrl)).text()).toBe(
|
|
145
|
+
"macOS preview package",
|
|
146
|
+
);
|
|
147
|
+
expect(await (await fetch(`${feed}RELEASES`)).text()).toBe(
|
|
148
|
+
`${next.sha1} ${feed}${next.filename} ${next.size}\n`,
|
|
149
|
+
);
|
|
101
150
|
},
|
|
102
151
|
);
|