@nextsparkjs/mobile 0.1.0-beta.81 → 0.1.0-beta.83
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextsparkjs/mobile",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.83",
|
|
4
4
|
"description": "Mobile app infrastructure for NextSpark - API client, providers, and utilities for Expo apps",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "NextSpark <hello@nextspark.dev>",
|
|
@@ -49,6 +49,15 @@
|
|
|
49
49
|
"templates",
|
|
50
50
|
"README.md"
|
|
51
51
|
],
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "tsup",
|
|
54
|
+
"build:watch": "tsup --watch",
|
|
55
|
+
"test": "jest",
|
|
56
|
+
"test:watch": "jest --watch",
|
|
57
|
+
"test:coverage": "jest --coverage",
|
|
58
|
+
"typecheck": "tsc --noEmit",
|
|
59
|
+
"clean": "rm -rf dist"
|
|
60
|
+
},
|
|
52
61
|
"peerDependencies": {
|
|
53
62
|
"@tanstack/react-query": "^5.0.0",
|
|
54
63
|
"expo": ">=54.0.0",
|
|
@@ -86,14 +95,5 @@
|
|
|
86
95
|
],
|
|
87
96
|
"nextspark": {
|
|
88
97
|
"type": "mobile"
|
|
89
|
-
},
|
|
90
|
-
"scripts": {
|
|
91
|
-
"build": "tsup",
|
|
92
|
-
"build:watch": "tsup --watch",
|
|
93
|
-
"test": "jest",
|
|
94
|
-
"test:watch": "jest --watch",
|
|
95
|
-
"test:coverage": "jest --coverage",
|
|
96
|
-
"typecheck": "tsc --noEmit",
|
|
97
|
-
"clean": "rm -rf dist"
|
|
98
98
|
}
|
|
99
|
-
}
|
|
99
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* API Configuration
|
|
3
|
+
*
|
|
4
|
+
* Resolution order:
|
|
5
|
+
* 1. EXPO_PUBLIC_API_URL env variable (set in .env or EAS)
|
|
6
|
+
* 2. Auto-detect from Expo dev server host IP + default web port
|
|
7
|
+
* This uses the same network IP that Expo uses, so it works
|
|
8
|
+
* on both iOS Simulator and Android Emulator.
|
|
9
|
+
* 3. Fallback to localhost:3000 (standard Next.js default)
|
|
3
10
|
*/
|
|
4
11
|
|
|
12
|
+
import { Platform } from 'react-native'
|
|
5
13
|
import Constants from 'expo-constants'
|
|
6
14
|
|
|
15
|
+
/** Default port for the NextSpark web app (Next.js default) */
|
|
16
|
+
const DEFAULT_WEB_PORT = 3000
|
|
17
|
+
|
|
7
18
|
const API_URL =
|
|
8
19
|
Constants.expoConfig?.extra?.apiUrl ||
|
|
9
20
|
(Constants.expoConfig?.hostUri
|
|
10
|
-
? `http://${Constants.expoConfig.hostUri.split(':')[0]}
|
|
11
|
-
: '
|
|
21
|
+
? `http://${Constants.expoConfig.hostUri.split(':')[0]}:${DEFAULT_WEB_PORT}`
|
|
22
|
+
: `http://${Platform.OS === 'android' ? '10.0.2.2' : 'localhost'}:${DEFAULT_WEB_PORT}`)
|
|
12
23
|
|
|
13
24
|
export const API_CONFIG = {
|
|
14
25
|
baseUrl: API_URL,
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 NextSpark
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|