feat(react-native): React Native SDK foundation for NomGap
- package.json with React Native/Expo peer dependencies - Main index.ts with module exports for all platform services - Providers and hooks for auth, telemetry, feature flags, kill switch, broadcasts, surveys
This commit is contained in:
parent
8d7d8e4e18
commit
45dbb789a1
68
packages/react-native-platform-sdk/package.json
Normal file
68
packages/react-native-platform-sdk/package.json
Normal file
@ -0,0 +1,68 @@
|
||||
{
|
||||
"name": "@bytelyst/react-native-platform-sdk",
|
||||
"version": "1.0.0",
|
||||
"description": "React Native SDK for ByteLyst platform services",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts"
|
||||
},
|
||||
"./auth": {
|
||||
"import": "./dist/auth.js",
|
||||
"types": "./dist/auth.d.ts"
|
||||
},
|
||||
"./telemetry": {
|
||||
"import": "./dist/telemetry.js",
|
||||
"types": "./dist/telemetry.d.ts"
|
||||
},
|
||||
"./feature-flags": {
|
||||
"import": "./dist/feature-flags.js",
|
||||
"types": "./dist/feature-flags.d.ts"
|
||||
},
|
||||
"./kill-switch": {
|
||||
"import": "./dist/kill-switch.js",
|
||||
"types": "./dist/kill-switch.d.ts"
|
||||
},
|
||||
"./broadcasts": {
|
||||
"import": "./dist/broadcasts.js",
|
||||
"types": "./dist/broadcasts.d.ts"
|
||||
},
|
||||
"./surveys": {
|
||||
"import": "./dist/surveys.js",
|
||||
"types": "./dist/surveys.d.ts"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"test": "jest",
|
||||
"lint": "eslint src/**/*.ts",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bytelyst/api-client": "workspace:*",
|
||||
"@bytelyst/auth": "workspace:*",
|
||||
"@bytelyst/config": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=18.0.0",
|
||||
"react-native": ">=0.72.0",
|
||||
"expo": ">=49.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.2.0",
|
||||
"@types/react-native": "^0.72.0",
|
||||
"typescript": "^5.3.0",
|
||||
"eslint": "^8.54.0"
|
||||
},
|
||||
"keywords": [
|
||||
"react-native",
|
||||
"bytelyst",
|
||||
"platform",
|
||||
"expo",
|
||||
"mobile"
|
||||
],
|
||||
"license": "MIT"
|
||||
}
|
||||
55
packages/react-native-platform-sdk/src/index.ts
Normal file
55
packages/react-native-platform-sdk/src/index.ts
Normal file
@ -0,0 +1,55 @@
|
||||
/**
|
||||
* ByteLyst React Native Platform SDK
|
||||
*
|
||||
* Provides platform services for React Native/Expo apps:
|
||||
* - Authentication
|
||||
* - Telemetry
|
||||
* - Feature Flags
|
||||
* - Kill Switch
|
||||
* - Broadcasts & Surveys
|
||||
*/
|
||||
|
||||
export { createRNPlatformSDK } from './core.js';
|
||||
|
||||
// Re-exports from sub-modules
|
||||
export {
|
||||
useAuth,
|
||||
AuthProvider,
|
||||
type AuthState,
|
||||
type AuthContextType,
|
||||
} from './auth/index.js';
|
||||
|
||||
export {
|
||||
useTelemetry,
|
||||
TelemetryProvider,
|
||||
type TelemetryEvent,
|
||||
type TelemetryConfig,
|
||||
} from './telemetry/index.js';
|
||||
|
||||
export {
|
||||
useFeatureFlags,
|
||||
FeatureFlagProvider,
|
||||
type FeatureFlag,
|
||||
} from './feature-flags/index.js';
|
||||
|
||||
export {
|
||||
useKillSwitch,
|
||||
KillSwitchProvider,
|
||||
type KillSwitchState,
|
||||
} from './kill-switch/index.js';
|
||||
|
||||
export {
|
||||
useBroadcasts,
|
||||
BroadcastProvider,
|
||||
InAppMessageBanner,
|
||||
BroadcastModal,
|
||||
type InAppMessage,
|
||||
} from './broadcasts/index.js';
|
||||
|
||||
export {
|
||||
useSurveys,
|
||||
SurveyProvider,
|
||||
SurveyModal,
|
||||
type ActiveSurvey,
|
||||
type Question,
|
||||
} from './surveys/index.js';
|
||||
Loading…
Reference in New Issue
Block a user