create-signet-app 0.9.0 → 0.9.1
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/package.json
CHANGED
package/src/mobile.ts
CHANGED
|
@@ -9,9 +9,12 @@
|
|
|
9
9
|
export const MOBILE_PKG = {
|
|
10
10
|
main: "expo-router/entry",
|
|
11
11
|
scripts: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
// --go: Expo Go, since expo-dev-client otherwise expects a development
|
|
13
|
+
// build to be installed. start:dev is for that build (push needs it).
|
|
14
|
+
start: "expo start --go",
|
|
15
|
+
android: "expo start --go --android",
|
|
16
|
+
ios: "expo start --go --ios",
|
|
17
|
+
"start:dev": "expo start --dev-client",
|
|
15
18
|
lint: "biome check .",
|
|
16
19
|
format: "biome check --write .",
|
|
17
20
|
typecheck: "tsc --noEmit",
|
|
@@ -97,6 +97,9 @@ __PM_X__ eas-cli init # creates the project; put its id in EAS_PROJEC
|
|
|
97
97
|
__PM_X__ eas-cli build --profile development --platform ios # or android
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
+
Once it is installed, run `__PM_RUN__ start:dev` instead of `start` (which
|
|
101
|
+
opens Expo Go).
|
|
102
|
+
|
|
100
103
|
`eas.json` has three profiles: `development` (a development build with the dev
|
|
101
104
|
client, for push and native debugging), `preview` (an internal build to share)
|
|
102
105
|
and `production` (store builds, version numbers kept by EAS). Change the
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
import { randomUUID } from "expo-crypto"
|
|
2
|
-
|
|
3
1
|
// Signet's outbox and analytics call crypto.randomUUID, which Hermes lacks.
|
|
2
|
+
// expo-crypto supplies it in a development or store build; an Expo Go build
|
|
3
|
+
// without the ExpoCrypto native module falls back to Math.random.
|
|
4
|
+
// ponytail: Math.random v4 ids are fine for outbox and analytics ids, not for secrets.
|
|
4
5
|
const g = globalThis as { crypto?: { randomUUID?: () => string } }
|
|
5
6
|
g.crypto ??= {}
|
|
6
|
-
g.crypto.randomUUID
|
|
7
|
+
if (!g.crypto.randomUUID) {
|
|
8
|
+
let native: (() => string) | undefined
|
|
9
|
+
try {
|
|
10
|
+
native = (require("expo-crypto") as { randomUUID: () => string }).randomUUID
|
|
11
|
+
} catch {}
|
|
12
|
+
g.crypto.randomUUID =
|
|
13
|
+
native ??
|
|
14
|
+
(() =>
|
|
15
|
+
"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
16
|
+
const r = (Math.random() * 16) | 0
|
|
17
|
+
return (c === "x" ? r : (r & 3) | 8).toString(16)
|
|
18
|
+
}))
|
|
19
|
+
}
|