@farcaster/miniapp-sdk 0.1.8 → 0.1.9
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/index.min.js +8 -8
- package/dist/index.min.js.map +3 -3
- package/dist/sdk.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/sdk.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farcaster/miniapp-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"comlink": "^4.4.2",
|
|
24
24
|
"eventemitter3": "^5.0.1",
|
|
25
25
|
"ox": "^0.4.4",
|
|
26
|
-
"@farcaster/miniapp-core": "0.3.
|
|
26
|
+
"@farcaster/miniapp-core": "0.3.8"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"clean": "rm -rf dist",
|
package/src/sdk.ts
CHANGED
|
@@ -16,10 +16,10 @@ let cachedIsInMiniAppResult: boolean | null = null
|
|
|
16
16
|
/**
|
|
17
17
|
* Determines if the current environment is a MiniApp context.
|
|
18
18
|
*
|
|
19
|
-
* @param timeoutMs - Optional timeout in milliseconds (default:
|
|
19
|
+
* @param timeoutMs - Optional timeout in milliseconds (default: 1000)
|
|
20
20
|
* @returns Promise resolving to boolean indicating if in MiniApp context
|
|
21
21
|
*/
|
|
22
|
-
async function isInMiniApp(timeoutMs =
|
|
22
|
+
async function isInMiniApp(timeoutMs = 1000): Promise<boolean> {
|
|
23
23
|
// Return cached result if we've already determined we are in a MiniApp
|
|
24
24
|
if (cachedIsInMiniAppResult === true) {
|
|
25
25
|
return true
|