devintelligence 1.0.0 → 1.0.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/.env.example +14 -14
- package/LICENSE +22 -22
- package/README.md +146 -146
- package/bin/devintelligence.js +2481 -12
- package/bin/devintelligence.ts +244 -103
- package/dist/App.d.ts +3 -0
- package/dist/ai.js +366 -0
- package/dist/ai.js.map +7 -0
- package/dist/components/DeepAnalysisViews.d.ts +13 -0
- package/dist/components/MobileAndPlatformViews.d.ts +22 -0
- package/dist/components/OverviewAndExplorerViews.d.ts +20 -0
- package/dist/components/RepairAndGateViews.d.ts +25 -0
- package/dist/engine/aiEngine.d.ts +62 -0
- package/dist/engine/analyzerEngine.d.ts +19 -0
- package/dist/engine/repairEngine.d.ts +42 -0
- package/dist/engine.js +1541 -0
- package/dist/engine.js.map +7 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +2344 -0
- package/dist/index.js.map +7 -0
- package/dist/main.d.ts +1 -0
- package/dist/repair.js +2052 -0
- package/dist/repair.js.map +7 -0
- package/dist/src/App.d.ts +3 -0
- package/dist/src/components/DeepAnalysisViews.d.ts +13 -0
- package/dist/src/components/MobileAndPlatformViews.d.ts +22 -0
- package/dist/src/components/OverviewAndExplorerViews.d.ts +20 -0
- package/dist/src/components/RepairAndGateViews.d.ts +25 -0
- package/dist/src/engine/aiEngine.d.ts +62 -0
- package/dist/src/engine/analyzerEngine.d.ts +19 -0
- package/dist/src/engine/repairEngine.d.ts +42 -0
- package/dist/src/index.d.ts +10 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/types/devintelligence.d.ts +250 -0
- package/dist/types/devintelligence.d.ts +250 -0
- package/fixtures/django-analytics-service/requirements.txt +4 -4
- package/fixtures/django-analytics-service/settings.py +16 -16
- package/fixtures/express-api-gateway/package.json +14 -14
- package/fixtures/express-api-gateway/src/server.ts +16 -16
- package/fixtures/nextjs-saas-portal/package.json +21 -21
- package/fixtures/nextjs-saas-portal/src/app/dashboard/page.tsx +26 -26
- package/fixtures/rn-bare-fitness/android/build.gradle +19 -19
- package/fixtures/rn-bare-fitness/ios/Info.plist +14 -14
- package/fixtures/rn-bare-fitness/package.json +23 -23
- package/fixtures/rn-bare-fitness/src/WorkoutTracker.tsx +31 -31
- package/fixtures/rn-expo-commerce/android/app/build.gradle +20 -20
- package/fixtures/rn-expo-commerce/android/app/src/main/AndroidManifest.xml +21 -21
- package/fixtures/rn-expo-commerce/android/gradle.properties +6 -6
- package/fixtures/rn-expo-commerce/app.json +17 -17
- package/fixtures/rn-expo-commerce/babel.config.js +10 -10
- package/fixtures/rn-expo-commerce/ios/Podfile +13 -13
- package/fixtures/rn-expo-commerce/metro.config.js +7 -7
- package/fixtures/rn-expo-commerce/package.json +31 -31
- package/fixtures/rn-expo-commerce/src/components/LegacyPromoBanner.tsx +11 -11
- package/fixtures/rn-expo-commerce/src/screens/ProductFeedScreen.tsx +48 -48
- package/fixtures/rn-expo-commerce/src/services/api.ts +15 -15
- package/package.json +89 -77
- package/index.html +0 -21
- package/server.ts +0 -275
- package/src/App.tsx +0 -783
- package/src/components/DeepAnalysisViews.tsx +0 -526
- package/src/components/MobileAndPlatformViews.tsx +0 -625
- package/src/components/OverviewAndExplorerViews.tsx +0 -753
- package/src/components/RepairAndGateViews.tsx +0 -814
- package/src/engine/aiEngine.test.ts +0 -86
- package/src/engine/aiEngine.ts +0 -346
- package/src/engine/analyzerEngine.test.ts +0 -110
- package/src/engine/analyzerEngine.ts +0 -1579
- package/src/engine/repairEngine.ts +0 -545
- package/src/index.css +0 -44
- package/src/index.ts +0 -59
- package/src/main.tsx +0 -5
- package/src/types/devintelligence.ts +0 -310
- package/tsconfig.json +0 -28
- package/vite.config.ts +0 -22
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import _ from 'lodash';
|
|
3
|
-
import moment from 'moment';
|
|
4
|
-
|
|
5
|
-
const HARDCODED_WEBHOOK_TOKEN = "whsec_live_98a7bc654321devintelligence";
|
|
6
|
-
|
|
7
|
-
export default function DashboardPage() {
|
|
8
|
-
const items = _.chunk([1, 2, 3, 4, 5, 6], 2);
|
|
9
|
-
|
|
10
|
-
async function syncWebhook() {
|
|
11
|
-
const res = await fetch('http://internal.billing.local/sync', {
|
|
12
|
-
headers: { 'X-Token': HARDCODED_WEBHOOK_TOKEN }
|
|
13
|
-
});
|
|
14
|
-
return res.json();
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<main style={{ backgroundColor: '#111827', padding: '23px', borderRadius: '19px' }}>
|
|
19
|
-
<h1 style={{ color: '#F9FAFB', fontSize: '27px' }}>🚀 Billing Portal ({moment().format('YYYY-MM-DD')})</h1>
|
|
20
|
-
<img src="/hero-unoptimized-banner.bmp" width={1200} height={600} />
|
|
21
|
-
<button onClick={syncWebhook} style={{ backgroundColor: '#7C3AED', padding: '13px' }}>
|
|
22
|
-
✨ Sync Billing Now
|
|
23
|
-
</button>
|
|
24
|
-
</main>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import _ from 'lodash';
|
|
3
|
+
import moment from 'moment';
|
|
4
|
+
|
|
5
|
+
const HARDCODED_WEBHOOK_TOKEN = "whsec_live_98a7bc654321devintelligence";
|
|
6
|
+
|
|
7
|
+
export default function DashboardPage() {
|
|
8
|
+
const items = _.chunk([1, 2, 3, 4, 5, 6], 2);
|
|
9
|
+
|
|
10
|
+
async function syncWebhook() {
|
|
11
|
+
const res = await fetch('http://internal.billing.local/sync', {
|
|
12
|
+
headers: { 'X-Token': HARDCODED_WEBHOOK_TOKEN }
|
|
13
|
+
});
|
|
14
|
+
return res.json();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<main style={{ backgroundColor: '#111827', padding: '23px', borderRadius: '19px' }}>
|
|
19
|
+
<h1 style={{ color: '#F9FAFB', fontSize: '27px' }}>🚀 Billing Portal ({moment().format('YYYY-MM-DD')})</h1>
|
|
20
|
+
<img src="/hero-unoptimized-banner.bmp" width={1200} height={600} />
|
|
21
|
+
<button onClick={syncWebhook} style={{ backgroundColor: '#7C3AED', padding: '13px' }}>
|
|
22
|
+
✨ Sync Billing Now
|
|
23
|
+
</button>
|
|
24
|
+
</main>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
buildscript {
|
|
2
|
-
ext {
|
|
3
|
-
buildToolsVersion = "34.0.0"
|
|
4
|
-
minSdkVersion = 23
|
|
5
|
-
compileSdkVersion = 34
|
|
6
|
-
targetSdkVersion = 33
|
|
7
|
-
ndkVersion = "25.1.8937393"
|
|
8
|
-
kotlinVersion = "1.8.10"
|
|
9
|
-
}
|
|
10
|
-
repositories {
|
|
11
|
-
google()
|
|
12
|
-
mavenCentral()
|
|
13
|
-
}
|
|
14
|
-
dependencies {
|
|
15
|
-
classpath("com.android.tools.build:gradle:8.1.1")
|
|
16
|
-
classpath("com.facebook.react:react-native-gradle-plugin")
|
|
17
|
-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
buildscript {
|
|
2
|
+
ext {
|
|
3
|
+
buildToolsVersion = "34.0.0"
|
|
4
|
+
minSdkVersion = 23
|
|
5
|
+
compileSdkVersion = 34
|
|
6
|
+
targetSdkVersion = 33
|
|
7
|
+
ndkVersion = "25.1.8937393"
|
|
8
|
+
kotlinVersion = "1.8.10"
|
|
9
|
+
}
|
|
10
|
+
repositories {
|
|
11
|
+
google()
|
|
12
|
+
mavenCentral()
|
|
13
|
+
}
|
|
14
|
+
dependencies {
|
|
15
|
+
classpath("com.android.tools.build:gradle:8.1.1")
|
|
16
|
+
classpath("com.facebook.react:react-native-gradle-plugin")
|
|
17
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>CFBundleDisplayName</key>
|
|
6
|
-
<string>BareFitnessPro</string>
|
|
7
|
-
<key>CFBundleIdentifier</key>
|
|
8
|
-
<string>com.devintel.barefitness</string>
|
|
9
|
-
<key>CFBundleVersion</key>
|
|
10
|
-
<string>21</string>
|
|
11
|
-
<key>UILaunchStoryboardName</key>
|
|
12
|
-
<string>LaunchScreen</string>
|
|
13
|
-
</dict>
|
|
14
|
-
</plist>
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>CFBundleDisplayName</key>
|
|
6
|
+
<string>BareFitnessPro</string>
|
|
7
|
+
<key>CFBundleIdentifier</key>
|
|
8
|
+
<string>com.devintel.barefitness</string>
|
|
9
|
+
<key>CFBundleVersion</key>
|
|
10
|
+
<string>21</string>
|
|
11
|
+
<key>UILaunchStoryboardName</key>
|
|
12
|
+
<string>LaunchScreen</string>
|
|
13
|
+
</dict>
|
|
14
|
+
</plist>
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "rn-bare-fitness",
|
|
3
|
-
"version": "2.1.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"android": "react-native run-android",
|
|
7
|
-
"ios": "react-native run-ios",
|
|
8
|
-
"start": "react-native start",
|
|
9
|
-
"test": "jest"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"react": "18.2.0",
|
|
13
|
-
"react-native": "0.74.5",
|
|
14
|
-
"react-native-reanimated": "3.10.1",
|
|
15
|
-
"react-native-vision-camera": "^4.0.0",
|
|
16
|
-
"@react-navigation/native": "^6.1.18"
|
|
17
|
-
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"@react-native/babel-preset": "0.74.85",
|
|
20
|
-
"@react-native/metro-config": "0.74.85",
|
|
21
|
-
"typescript": "5.0.4"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "rn-bare-fitness",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"android": "react-native run-android",
|
|
7
|
+
"ios": "react-native run-ios",
|
|
8
|
+
"start": "react-native start",
|
|
9
|
+
"test": "jest"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"react": "18.2.0",
|
|
13
|
+
"react-native": "0.74.5",
|
|
14
|
+
"react-native-reanimated": "3.10.1",
|
|
15
|
+
"react-native-vision-camera": "^4.0.0",
|
|
16
|
+
"@react-navigation/native": "^6.1.18"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@react-native/babel-preset": "0.74.85",
|
|
20
|
+
"@react-native/metro-config": "0.74.85",
|
|
21
|
+
"typescript": "5.0.4"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { View, Text, FlatList, Pressable } from 'react-native';
|
|
3
|
-
|
|
4
|
-
export function WorkoutTracker() {
|
|
5
|
-
const [heartRate, setHeartRate] = useState(72);
|
|
6
|
-
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
setInterval(() => {
|
|
9
|
-
setHeartRate((h) => h + 1);
|
|
10
|
-
}, 1000);
|
|
11
|
-
}, []);
|
|
12
|
-
|
|
13
|
-
const sessions = [
|
|
14
|
-
{ id: '1', name: 'VO2 Max Interval', kcal: 640 },
|
|
15
|
-
{ id: '2', name: 'Threshold Tempo', kcal: 510 },
|
|
16
|
-
];
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<View style={{ flex: 1, backgroundColor: '#0D0D12', padding: 19 }}>
|
|
20
|
-
<Text style={{ color: '#00FF66', fontSize: 23 }}>⚡ Live HR: {heartRate} BPM</Text>
|
|
21
|
-
<FlatList
|
|
22
|
-
data={sessions}
|
|
23
|
-
renderItem={({ item }) => (
|
|
24
|
-
<Pressable style={{ padding: 13, borderRadius: 15, backgroundColor: '#1B1B22' }}>
|
|
25
|
-
<Text style={{ color: '#FFFFFF' }}>{item.name}</Text>
|
|
26
|
-
</Pressable>
|
|
27
|
-
)}
|
|
28
|
-
/>
|
|
29
|
-
</View>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { View, Text, FlatList, Pressable } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export function WorkoutTracker() {
|
|
5
|
+
const [heartRate, setHeartRate] = useState(72);
|
|
6
|
+
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
setInterval(() => {
|
|
9
|
+
setHeartRate((h) => h + 1);
|
|
10
|
+
}, 1000);
|
|
11
|
+
}, []);
|
|
12
|
+
|
|
13
|
+
const sessions = [
|
|
14
|
+
{ id: '1', name: 'VO2 Max Interval', kcal: 640 },
|
|
15
|
+
{ id: '2', name: 'Threshold Tempo', kcal: 510 },
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<View style={{ flex: 1, backgroundColor: '#0D0D12', padding: 19 }}>
|
|
20
|
+
<Text style={{ color: '#00FF66', fontSize: 23 }}>⚡ Live HR: {heartRate} BPM</Text>
|
|
21
|
+
<FlatList
|
|
22
|
+
data={sessions}
|
|
23
|
+
renderItem={({ item }) => (
|
|
24
|
+
<Pressable style={{ padding: 13, borderRadius: 15, backgroundColor: '#1B1B22' }}>
|
|
25
|
+
<Text style={{ color: '#FFFFFF' }}>{item.name}</Text>
|
|
26
|
+
</Pressable>
|
|
27
|
+
)}
|
|
28
|
+
/>
|
|
29
|
+
</View>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
android {
|
|
2
|
-
namespace "com.devintel.expocommerce"
|
|
3
|
-
compileSdkVersion 33
|
|
4
|
-
|
|
5
|
-
defaultConfig {
|
|
6
|
-
applicationId "com.devintel.expocommerce"
|
|
7
|
-
minSdkVersion 21
|
|
8
|
-
targetSdkVersion 31
|
|
9
|
-
versionCode 14
|
|
10
|
-
versionName "1.4.0"
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
buildTypes {
|
|
14
|
-
release {
|
|
15
|
-
minifyEnabled false
|
|
16
|
-
shrinkResources false
|
|
17
|
-
signingConfig signingConfigs.debug
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
android {
|
|
2
|
+
namespace "com.devintel.expocommerce"
|
|
3
|
+
compileSdkVersion 33
|
|
4
|
+
|
|
5
|
+
defaultConfig {
|
|
6
|
+
applicationId "com.devintel.expocommerce"
|
|
7
|
+
minSdkVersion 21
|
|
8
|
+
targetSdkVersion 31
|
|
9
|
+
versionCode 14
|
|
10
|
+
versionName "1.4.0"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
buildTypes {
|
|
14
|
+
release {
|
|
15
|
+
minifyEnabled false
|
|
16
|
+
shrinkResources false
|
|
17
|
+
signingConfig signingConfigs.debug
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
-
package="com.devintel.expocommerce">
|
|
3
|
-
|
|
4
|
-
<application
|
|
5
|
-
android:name=".MainApplication"
|
|
6
|
-
android:label="@string/app_name"
|
|
7
|
-
android:allowBackup="true"
|
|
8
|
-
android:usesCleartextTraffic="true"
|
|
9
|
-
android:theme="@style/AppTheme">
|
|
10
|
-
<activity
|
|
11
|
-
android:name=".MainActivity"
|
|
12
|
-
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
|
13
|
-
android:launchMode="singleTask"
|
|
14
|
-
android:windowSoftInputMode="adjustResize">
|
|
15
|
-
<intent-filter>
|
|
16
|
-
<action android:name="android.intent.action.MAIN" />
|
|
17
|
-
<category android:name="android.intent.category.LAUNCHER" />
|
|
18
|
-
</intent-filter>
|
|
19
|
-
</activity>
|
|
20
|
-
</application>
|
|
21
|
-
</manifest>
|
|
1
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
+
package="com.devintel.expocommerce">
|
|
3
|
+
|
|
4
|
+
<application
|
|
5
|
+
android:name=".MainApplication"
|
|
6
|
+
android:label="@string/app_name"
|
|
7
|
+
android:allowBackup="true"
|
|
8
|
+
android:usesCleartextTraffic="true"
|
|
9
|
+
android:theme="@style/AppTheme">
|
|
10
|
+
<activity
|
|
11
|
+
android:name=".MainActivity"
|
|
12
|
+
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
|
13
|
+
android:launchMode="singleTask"
|
|
14
|
+
android:windowSoftInputMode="adjustResize">
|
|
15
|
+
<intent-filter>
|
|
16
|
+
<action android:name="android.intent.action.MAIN" />
|
|
17
|
+
<category android:name="android.intent.category.LAUNCHER" />
|
|
18
|
+
</intent-filter>
|
|
19
|
+
</activity>
|
|
20
|
+
</application>
|
|
21
|
+
</manifest>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
org.gradle.jvmargs=-Xmx1024m -XX:MaxMetaspaceSize=256m
|
|
2
|
-
android.useAndroidX=true
|
|
3
|
-
android.enableJetifier=true
|
|
4
|
-
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
|
|
5
|
-
newArchEnabled=false
|
|
6
|
-
hermesEnabled=false
|
|
1
|
+
org.gradle.jvmargs=-Xmx1024m -XX:MaxMetaspaceSize=256m
|
|
2
|
+
android.useAndroidX=true
|
|
3
|
+
android.enableJetifier=true
|
|
4
|
+
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
|
|
5
|
+
newArchEnabled=false
|
|
6
|
+
hermesEnabled=false
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
{
|
|
2
|
-
"expo": {
|
|
3
|
-
"name": "ExpoCommerceMobile",
|
|
4
|
-
"slug": "expo-commerce-mobile",
|
|
5
|
-
"version": "1.4.0",
|
|
6
|
-
"orientation": "portrait",
|
|
7
|
-
"scheme": "expocommerce",
|
|
8
|
-
"newArchEnabled": false,
|
|
9
|
-
"ios": {
|
|
10
|
-
"supportsTablet": true,
|
|
11
|
-
"bundleIdentifier": "com.devintel.expocommerce"
|
|
12
|
-
},
|
|
13
|
-
"android": {
|
|
14
|
-
"package": "com.devintel.expocommerce"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"expo": {
|
|
3
|
+
"name": "ExpoCommerceMobile",
|
|
4
|
+
"slug": "expo-commerce-mobile",
|
|
5
|
+
"version": "1.4.0",
|
|
6
|
+
"orientation": "portrait",
|
|
7
|
+
"scheme": "expocommerce",
|
|
8
|
+
"newArchEnabled": false,
|
|
9
|
+
"ios": {
|
|
10
|
+
"supportsTablet": true,
|
|
11
|
+
"bundleIdentifier": "com.devintel.expocommerce"
|
|
12
|
+
},
|
|
13
|
+
"android": {
|
|
14
|
+
"package": "com.devintel.expocommerce"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
module.exports = function (api) {
|
|
2
|
-
api.cache(true);
|
|
3
|
-
return {
|
|
4
|
-
presets: ['babel-preset-expo'],
|
|
5
|
-
plugins: [
|
|
6
|
-
'react-native-reanimated/plugin',
|
|
7
|
-
'@babel/plugin-transform-export-namespace-from'
|
|
8
|
-
],
|
|
9
|
-
};
|
|
10
|
-
};
|
|
1
|
+
module.exports = function (api) {
|
|
2
|
+
api.cache(true);
|
|
3
|
+
return {
|
|
4
|
+
presets: ['babel-preset-expo'],
|
|
5
|
+
plugins: [
|
|
6
|
+
'react-native-reanimated/plugin',
|
|
7
|
+
'@babel/plugin-transform-export-namespace-from'
|
|
8
|
+
],
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
platform :ios, '12.4'
|
|
2
|
-
use_frameworks! :linkage => :static
|
|
3
|
-
|
|
4
|
-
target 'ExpoCommerceMobile' do
|
|
5
|
-
use_expo_modules!
|
|
6
|
-
config = use_native_modules!
|
|
7
|
-
|
|
8
|
-
use_react_native!(
|
|
9
|
-
:path => config[:reactNativePath],
|
|
10
|
-
:hermes_enabled => false,
|
|
11
|
-
:flipper_configuration => FlipperConfiguration.enabled
|
|
12
|
-
)
|
|
13
|
-
end
|
|
1
|
+
platform :ios, '12.4'
|
|
2
|
+
use_frameworks! :linkage => :static
|
|
3
|
+
|
|
4
|
+
target 'ExpoCommerceMobile' do
|
|
5
|
+
use_expo_modules!
|
|
6
|
+
config = use_native_modules!
|
|
7
|
+
|
|
8
|
+
use_react_native!(
|
|
9
|
+
:path => config[:reactNativePath],
|
|
10
|
+
:hermes_enabled => false,
|
|
11
|
+
:flipper_configuration => FlipperConfiguration.enabled
|
|
12
|
+
)
|
|
13
|
+
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const { getDefaultConfig } = require('expo/metro-config');
|
|
2
|
-
|
|
3
|
-
const config = getDefaultConfig(__dirname);
|
|
4
|
-
|
|
5
|
-
config.resolver.sourceExts.push('cjs');
|
|
6
|
-
|
|
7
|
-
module.exports = config;
|
|
1
|
+
const { getDefaultConfig } = require('expo/metro-config');
|
|
2
|
+
|
|
3
|
+
const config = getDefaultConfig(__dirname);
|
|
4
|
+
|
|
5
|
+
config.resolver.sourceExts.push('cjs');
|
|
6
|
+
|
|
7
|
+
module.exports = config;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "rn-expo-commerce",
|
|
3
|
-
"version": "1.4.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "expo-router/entry",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"start": "expo start",
|
|
8
|
-
"android": "expo run:android",
|
|
9
|
-
"ios": "expo run:ios",
|
|
10
|
-
"lint": "eslint .",
|
|
11
|
-
"test": "jest"
|
|
12
|
-
},
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"expo": "~52.0.0",
|
|
15
|
-
"expo-router": "~4.0.0",
|
|
16
|
-
"expo-status-bar": "~2.0.0",
|
|
17
|
-
"react": "18.3.1",
|
|
18
|
-
"react-native": "0.76.3",
|
|
19
|
-
"react-native-reanimated": "3.6.0",
|
|
20
|
-
"react-native-gesture-handler": "~2.20.2",
|
|
21
|
-
"react-native-safe-area-context": "4.12.0",
|
|
22
|
-
"@react-navigation/native": "^7.0.0",
|
|
23
|
-
"lodash": "^4.17.21",
|
|
24
|
-
"moment": "^2.30.1"
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@babel/core": "^7.25.2",
|
|
28
|
-
"@types/react": "~18.3.12",
|
|
29
|
-
"typescript": "~5.3.3"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "rn-expo-commerce",
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "expo-router/entry",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "expo start",
|
|
8
|
+
"android": "expo run:android",
|
|
9
|
+
"ios": "expo run:ios",
|
|
10
|
+
"lint": "eslint .",
|
|
11
|
+
"test": "jest"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"expo": "~52.0.0",
|
|
15
|
+
"expo-router": "~4.0.0",
|
|
16
|
+
"expo-status-bar": "~2.0.0",
|
|
17
|
+
"react": "18.3.1",
|
|
18
|
+
"react-native": "0.76.3",
|
|
19
|
+
"react-native-reanimated": "3.6.0",
|
|
20
|
+
"react-native-gesture-handler": "~2.20.2",
|
|
21
|
+
"react-native-safe-area-context": "4.12.0",
|
|
22
|
+
"@react-navigation/native": "^7.0.0",
|
|
23
|
+
"lodash": "^4.17.21",
|
|
24
|
+
"moment": "^2.30.1"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@babel/core": "^7.25.2",
|
|
28
|
+
"@types/react": "~18.3.12",
|
|
29
|
+
"typescript": "~5.3.3"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// Unused legacy component file left over from v1 migration
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { View, Text } from 'react-native';
|
|
4
|
-
|
|
5
|
-
export function LegacyPromoBanner() {
|
|
6
|
-
return (
|
|
7
|
-
<View style={{ backgroundColor: '#FF9500', padding: 19, borderRadius: 7 }}>
|
|
8
|
-
<Text>🔥 Flash Sale Legacy Component</Text>
|
|
9
|
-
</View>
|
|
10
|
-
);
|
|
11
|
-
}
|
|
1
|
+
// Unused legacy component file left over from v1 migration
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { View, Text } from 'react-native';
|
|
4
|
+
|
|
5
|
+
export function LegacyPromoBanner() {
|
|
6
|
+
return (
|
|
7
|
+
<View style={{ backgroundColor: '#FF9500', padding: 19, borderRadius: 7 }}>
|
|
8
|
+
<Text>🔥 Flash Sale Legacy Component</Text>
|
|
9
|
+
</View>
|
|
10
|
+
);
|
|
11
|
+
}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { View, Text, FlatList, TouchableOpacity, Image, AppState, KeyboardAvoidingView } from 'react-native';
|
|
3
|
-
import _ from 'lodash';
|
|
4
|
-
import moment from 'moment';
|
|
5
|
-
import { fetchCatalogItems } from '../services/api';
|
|
6
|
-
|
|
7
|
-
export function ProductFeedScreen() {
|
|
8
|
-
const [items, setItems] = useState<any[]>([]);
|
|
9
|
-
const [filterText, setFilterText] = useState('');
|
|
10
|
-
const unusedDebugFlag = true;
|
|
11
|
-
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
const subscription = AppState.addEventListener('change', (state) => {
|
|
14
|
-
if (state === 'active') {
|
|
15
|
-
fetchCatalogItems().then((data) => setItems(data));
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
fetchCatalogItems().then((data) => setItems(data));
|
|
19
|
-
}, []);
|
|
20
|
-
|
|
21
|
-
const filtered = _.filter(items, (item) => item.title.includes(filterText));
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<KeyboardAvoidingView style={{ flex: 1, backgroundColor: '#1C1C1E', padding: 17 }}>
|
|
25
|
-
<View style={{ borderRadius: 13, backgroundColor: '#2C2C2E', padding: 14 }}>
|
|
26
|
-
<Text style={{ fontSize: 21, color: '#FFFFFF', fontWeight: '700' }}>
|
|
27
|
-
Catalog Updated {moment().format('HH:mm')}
|
|
28
|
-
</Text>
|
|
29
|
-
</View>
|
|
30
|
-
|
|
31
|
-
<FlatList
|
|
32
|
-
data={filtered}
|
|
33
|
-
renderItem={({ item }) => (
|
|
34
|
-
<View style={{ padding: 15, borderRadius: 11, backgroundColor: '#252528', marginBottom: 9 }}>
|
|
35
|
-
<Image source={{ uri: item.imageUrl }} style={{ width: 320, height: 240 }} />
|
|
36
|
-
<Text style={{ color: '#F2F2F7', fontSize: 16 }}>{item.title}</Text>
|
|
37
|
-
<TouchableOpacity
|
|
38
|
-
onPress={() => console.log('Buy', item.id)}
|
|
39
|
-
style={{ backgroundColor: '#FF3B30', padding: 11, borderRadius: 9 }}
|
|
40
|
-
>
|
|
41
|
-
<Text style={{ color: '#FFFFFF' }}>🛒 Quick Checkout</Text>
|
|
42
|
-
</TouchableOpacity>
|
|
43
|
-
</View>
|
|
44
|
-
)}
|
|
45
|
-
/>
|
|
46
|
-
</KeyboardAvoidingView>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { View, Text, FlatList, TouchableOpacity, Image, AppState, KeyboardAvoidingView } from 'react-native';
|
|
3
|
+
import _ from 'lodash';
|
|
4
|
+
import moment from 'moment';
|
|
5
|
+
import { fetchCatalogItems } from '../services/api';
|
|
6
|
+
|
|
7
|
+
export function ProductFeedScreen() {
|
|
8
|
+
const [items, setItems] = useState<any[]>([]);
|
|
9
|
+
const [filterText, setFilterText] = useState('');
|
|
10
|
+
const unusedDebugFlag = true;
|
|
11
|
+
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
const subscription = AppState.addEventListener('change', (state) => {
|
|
14
|
+
if (state === 'active') {
|
|
15
|
+
fetchCatalogItems().then((data) => setItems(data));
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
fetchCatalogItems().then((data) => setItems(data));
|
|
19
|
+
}, []);
|
|
20
|
+
|
|
21
|
+
const filtered = _.filter(items, (item) => item.title.includes(filterText));
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<KeyboardAvoidingView style={{ flex: 1, backgroundColor: '#1C1C1E', padding: 17 }}>
|
|
25
|
+
<View style={{ borderRadius: 13, backgroundColor: '#2C2C2E', padding: 14 }}>
|
|
26
|
+
<Text style={{ fontSize: 21, color: '#FFFFFF', fontWeight: '700' }}>
|
|
27
|
+
Catalog Updated {moment().format('HH:mm')}
|
|
28
|
+
</Text>
|
|
29
|
+
</View>
|
|
30
|
+
|
|
31
|
+
<FlatList
|
|
32
|
+
data={filtered}
|
|
33
|
+
renderItem={({ item }) => (
|
|
34
|
+
<View style={{ padding: 15, borderRadius: 11, backgroundColor: '#252528', marginBottom: 9 }}>
|
|
35
|
+
<Image source={{ uri: item.imageUrl }} style={{ width: 320, height: 240 }} />
|
|
36
|
+
<Text style={{ color: '#F2F2F7', fontSize: 16 }}>{item.title}</Text>
|
|
37
|
+
<TouchableOpacity
|
|
38
|
+
onPress={() => console.log('Buy', item.id)}
|
|
39
|
+
style={{ backgroundColor: '#FF3B30', padding: 11, borderRadius: 9 }}
|
|
40
|
+
>
|
|
41
|
+
<Text style={{ color: '#FFFFFF' }}>🛒 Quick Checkout</Text>
|
|
42
|
+
</TouchableOpacity>
|
|
43
|
+
</View>
|
|
44
|
+
)}
|
|
45
|
+
/>
|
|
46
|
+
</KeyboardAvoidingView>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
const STRIPE_SECRET_KEY = "sk_test_51Nq9XyDevIntelHardcodedSecretKey99481";
|
|
2
|
-
const API_BASE_URL = "http://api.expocommerce-internal.local/v1";
|
|
3
|
-
|
|
4
|
-
export async function fetchCatalogItems() {
|
|
5
|
-
const response = await fetch(`${API_BASE_URL}/products`, {
|
|
6
|
-
headers: {
|
|
7
|
-
Authorization: `Bearer ${STRIPE_SECRET_KEY}`,
|
|
8
|
-
},
|
|
9
|
-
});
|
|
10
|
-
return response.json();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function deprecatedLegacySigner(payload: string) {
|
|
14
|
-
return payload + "_signed";
|
|
15
|
-
}
|
|
1
|
+
const STRIPE_SECRET_KEY = "sk_test_51Nq9XyDevIntelHardcodedSecretKey99481";
|
|
2
|
+
const API_BASE_URL = "http://api.expocommerce-internal.local/v1";
|
|
3
|
+
|
|
4
|
+
export async function fetchCatalogItems() {
|
|
5
|
+
const response = await fetch(`${API_BASE_URL}/products`, {
|
|
6
|
+
headers: {
|
|
7
|
+
Authorization: `Bearer ${STRIPE_SECRET_KEY}`,
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
return response.json();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function deprecatedLegacySigner(payload: string) {
|
|
14
|
+
return payload + "_signed";
|
|
15
|
+
}
|