mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-21 23:47:56 +00:00
fix: Remove workspace config, fix test suite, update snapshots
- Remove root /home/mamostehp/package.json workspace config - Each project now independent (aligned with CI workflow) - Add SafeAreaProvider mock to jest setup - Add __DEV__ global for React Native tests - Update 4 snapshots for SafeAreaView changes - All 29 test suites pass (122 tests)
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
// Setup file that runs BEFORE setupFilesAfterEnv
|
||||
// This is needed to mock Expo's winter runtime before it loads
|
||||
|
||||
// Define __DEV__ global for React Native
|
||||
global.__DEV__ = true;
|
||||
|
||||
// Mock the __ExpoImportMetaRegistry getter to prevent winter errors
|
||||
Object.defineProperty(global, '__ExpoImportMetaRegistry__', {
|
||||
get() {
|
||||
|
||||
@@ -68,6 +68,18 @@ jest.mock('./src/contexts/ThemeContext', () => require('./src/__mocks__/contexts
|
||||
// Mock BiometricAuthContext globally
|
||||
jest.mock('./src/contexts/BiometricAuthContext', () => require('./src/__mocks__/contexts/BiometricAuthContext'));
|
||||
|
||||
// Mock react-native-safe-area-context
|
||||
jest.mock('react-native-safe-area-context', () => {
|
||||
const insets = { top: 0, right: 0, bottom: 0, left: 0 };
|
||||
return {
|
||||
SafeAreaProvider: ({ children }) => children,
|
||||
SafeAreaView: ({ children }) => children,
|
||||
useSafeAreaInsets: () => insets,
|
||||
useSafeAreaFrame: () => ({ x: 0, y: 0, width: 390, height: 844 }),
|
||||
initialWindowMetrics: { insets, frame: { x: 0, y: 0, width: 390, height: 844 } },
|
||||
};
|
||||
});
|
||||
|
||||
// Mock expo modules
|
||||
jest.mock('expo-linear-gradient', () => ({
|
||||
LinearGradient: 'LinearGradient',
|
||||
|
||||
Generated
+16123
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -59,7 +59,6 @@
|
||||
"react": "19.1.0",
|
||||
"react-dom": "19.1.0",
|
||||
"react-i18next": "^16.3.3",
|
||||
"react-native": "0.81.5",
|
||||
"react-native-gesture-handler": "~2.28.0",
|
||||
"react-native-get-random-values": "~1.11.0",
|
||||
"react-native-qrcode-svg": "^6.3.11",
|
||||
@@ -110,7 +109,8 @@
|
||||
"eslint-plugin-react-native": "^5.0.0",
|
||||
"globals": "^16.5.0",
|
||||
"jest": "^29.7.0",
|
||||
"jest-expo": "^54.0.13",
|
||||
"jest-expo": "^54.0.16",
|
||||
"react-native": "^0.83.1",
|
||||
"react-test-renderer": "19.1.0",
|
||||
"typescript": "~5.9.2",
|
||||
"typescript-eslint": "^8.47.0"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`BeCitizenScreen should match snapshot 1`] = `
|
||||
<RCTSafeAreaView
|
||||
<View
|
||||
style={
|
||||
{
|
||||
"backgroundColor": "#FFFFFF",
|
||||
@@ -12,94 +12,86 @@ exports[`BeCitizenScreen should match snapshot 1`] = `
|
||||
<View
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"flex": 1,
|
||||
"borderBottomColor": "#E0E0E0",
|
||||
"borderBottomWidth": 1,
|
||||
"flexDirection": "row",
|
||||
"justifyContent": "space-between",
|
||||
"paddingHorizontal": 16,
|
||||
"paddingVertical": 12,
|
||||
}
|
||||
}
|
||||
>
|
||||
<View
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"borderBottomColor": "#E0E0E0",
|
||||
"borderBottomWidth": 1,
|
||||
"flexDirection": "row",
|
||||
"justifyContent": "space-between",
|
||||
"paddingHorizontal": 16,
|
||||
"paddingVertical": 12,
|
||||
"color": "#000",
|
||||
"flex": 1,
|
||||
"fontSize": 18,
|
||||
"fontWeight": "700",
|
||||
"textAlign": "center",
|
||||
}
|
||||
}
|
||||
>
|
||||
Be Citizen
|
||||
</Text>
|
||||
<View
|
||||
accessibilityState={
|
||||
{
|
||||
"busy": undefined,
|
||||
"checked": undefined,
|
||||
"disabled": undefined,
|
||||
"expanded": undefined,
|
||||
"selected": undefined,
|
||||
}
|
||||
}
|
||||
accessibilityValue={
|
||||
{
|
||||
"max": undefined,
|
||||
"min": undefined,
|
||||
"now": undefined,
|
||||
"text": undefined,
|
||||
}
|
||||
}
|
||||
accessible={true}
|
||||
collapsable={false}
|
||||
focusable={true}
|
||||
onClick={[Function]}
|
||||
onResponderGrant={[Function]}
|
||||
onResponderMove={[Function]}
|
||||
onResponderRelease={[Function]}
|
||||
onResponderTerminate={[Function]}
|
||||
onResponderTerminationRequest={[Function]}
|
||||
onStartShouldSetResponder={[Function]}
|
||||
style={
|
||||
{
|
||||
"opacity": 1,
|
||||
"padding": 8,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "#000",
|
||||
"flex": 1,
|
||||
"fontSize": 18,
|
||||
"fontWeight": "700",
|
||||
"textAlign": "center",
|
||||
"color": "#00A94F",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "600",
|
||||
}
|
||||
}
|
||||
>
|
||||
Be Citizen
|
||||
Reload
|
||||
</Text>
|
||||
<View
|
||||
accessibilityState={
|
||||
{
|
||||
"busy": undefined,
|
||||
"checked": undefined,
|
||||
"disabled": undefined,
|
||||
"expanded": undefined,
|
||||
"selected": undefined,
|
||||
}
|
||||
}
|
||||
accessibilityValue={
|
||||
{
|
||||
"max": undefined,
|
||||
"min": undefined,
|
||||
"now": undefined,
|
||||
"text": undefined,
|
||||
}
|
||||
}
|
||||
accessible={true}
|
||||
collapsable={false}
|
||||
focusable={true}
|
||||
onClick={[Function]}
|
||||
onResponderGrant={[Function]}
|
||||
onResponderMove={[Function]}
|
||||
onResponderRelease={[Function]}
|
||||
onResponderTerminate={[Function]}
|
||||
onResponderTerminationRequest={[Function]}
|
||||
onStartShouldSetResponder={[Function]}
|
||||
style={
|
||||
{
|
||||
"opacity": 1,
|
||||
"padding": 8,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "#00A94F",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "600",
|
||||
}
|
||||
}
|
||||
>
|
||||
Reload
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<WebView
|
||||
allowsBackForwardNavigationGestures={true}
|
||||
allowsInlineMediaPlayback={true}
|
||||
bounces={true}
|
||||
cacheEnabled={true}
|
||||
cacheMode="LOAD_DEFAULT"
|
||||
domStorageEnabled={true}
|
||||
injectedJavaScript="
|
||||
</View>
|
||||
<WebView
|
||||
allowsBackForwardNavigationGestures={true}
|
||||
allowsInlineMediaPlayback={true}
|
||||
bounces={true}
|
||||
cacheEnabled={true}
|
||||
cacheMode="LOAD_DEFAULT"
|
||||
domStorageEnabled={true}
|
||||
injectedJavaScript="
|
||||
(function() {
|
||||
// Mark this as mobile app
|
||||
window.PEZKUWI_MOBILE = true;
|
||||
@@ -109,6 +101,36 @@ exports[`BeCitizenScreen should match snapshot 1`] = `
|
||||
window.PEZKUWI_ADDRESS = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
|
||||
window.PEZKUWI_ACCOUNT_NAME = 'Mobile Wallet';
|
||||
|
||||
// Inject auth session for automatic login
|
||||
|
||||
|
||||
window.PEZKUWI_USER_ID = 'test-user-id';
|
||||
window.PEZKUWI_USER_EMAIL = 'test@pezkuwichain.io';
|
||||
|
||||
// Auto-authenticate with Supabase if session token exists
|
||||
if (window.PEZKUWI_SESSION_TOKEN) {
|
||||
(function autoAuth(attempts = 0) {
|
||||
if (attempts > 50) {
|
||||
console.warn('[Mobile] Auto-auth timed out: window.supabase not found');
|
||||
return;
|
||||
}
|
||||
|
||||
if (window.supabase && window.supabase.auth) {
|
||||
window.supabase.auth.setSession({
|
||||
access_token: window.PEZKUWI_SESSION_TOKEN,
|
||||
refresh_token: window.PEZKUWI_REFRESH_TOKEN || ''
|
||||
}).then(function(res) {
|
||||
if (res.error) console.warn('[Mobile] Auto-auth error:', res.error);
|
||||
else console.log('[Mobile] Auto-authenticated successfully');
|
||||
}).catch(function(err) {
|
||||
console.warn('[Mobile] Auto-auth promise failed:', err);
|
||||
});
|
||||
} else {
|
||||
setTimeout(function() { autoAuth(attempts + 1); }, 100);
|
||||
}
|
||||
})(0);
|
||||
}
|
||||
|
||||
// Override console.log to send to React Native (for debugging)
|
||||
const originalConsoleLog = console.log;
|
||||
console.log = function(...args) {
|
||||
@@ -166,66 +188,65 @@ exports[`BeCitizenScreen should match snapshot 1`] = `
|
||||
true; // Required for injectedJavaScript
|
||||
})();
|
||||
"
|
||||
javaScriptEnabled={true}
|
||||
mediaPlaybackRequiresUserAction={false}
|
||||
onError={[Function]}
|
||||
onHttpError={[Function]}
|
||||
onLoadEnd={[Function]}
|
||||
onLoadStart={[Function]}
|
||||
onMessage={[Function]}
|
||||
onNavigationStateChange={[Function]}
|
||||
pullToRefreshEnabled={true}
|
||||
ref={
|
||||
{
|
||||
"current": null,
|
||||
}
|
||||
javaScriptEnabled={true}
|
||||
mediaPlaybackRequiresUserAction={false}
|
||||
onError={[Function]}
|
||||
onHttpError={[Function]}
|
||||
onLoadEnd={[Function]}
|
||||
onLoadStart={[Function]}
|
||||
onMessage={[Function]}
|
||||
onNavigationStateChange={[Function]}
|
||||
pullToRefreshEnabled={true}
|
||||
ref={
|
||||
{
|
||||
"current": null,
|
||||
}
|
||||
sharedCookiesEnabled={true}
|
||||
showsHorizontalScrollIndicator={false}
|
||||
showsVerticalScrollIndicator={true}
|
||||
source={
|
||||
{
|
||||
"uri": "https://pezkuwichain.io/be-citizen",
|
||||
}
|
||||
}
|
||||
sharedCookiesEnabled={true}
|
||||
showsHorizontalScrollIndicator={false}
|
||||
showsVerticalScrollIndicator={true}
|
||||
source={
|
||||
{
|
||||
"uri": "https://pezkuwichain.io/be-citizen",
|
||||
}
|
||||
style={
|
||||
{
|
||||
"flex": 1,
|
||||
}
|
||||
}
|
||||
style={
|
||||
{
|
||||
"flex": 1,
|
||||
}
|
||||
thirdPartyCookiesEnabled={true}
|
||||
webviewDebuggingEnabled={true}
|
||||
}
|
||||
thirdPartyCookiesEnabled={true}
|
||||
webviewDebuggingEnabled={true}
|
||||
/>
|
||||
<View
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "rgba(255, 255, 255, 0.9)",
|
||||
"bottom": 0,
|
||||
"justifyContent": "center",
|
||||
"left": 0,
|
||||
"position": "absolute",
|
||||
"right": 0,
|
||||
"top": 0,
|
||||
}
|
||||
}
|
||||
>
|
||||
<ActivityIndicator
|
||||
color="#00A94F"
|
||||
size="large"
|
||||
/>
|
||||
<View
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "rgba(255, 255, 255, 0.9)",
|
||||
"bottom": 0,
|
||||
"justifyContent": "center",
|
||||
"left": 0,
|
||||
"position": "absolute",
|
||||
"right": 0,
|
||||
"top": 0,
|
||||
"color": "#666",
|
||||
"fontSize": 14,
|
||||
"marginTop": 12,
|
||||
}
|
||||
}
|
||||
>
|
||||
<ActivityIndicator
|
||||
color="#00A94F"
|
||||
size="large"
|
||||
/>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "#666",
|
||||
"fontSize": 14,
|
||||
"marginTop": 12,
|
||||
}
|
||||
}
|
||||
>
|
||||
Loading...
|
||||
</Text>
|
||||
</View>
|
||||
Loading...
|
||||
</Text>
|
||||
</View>
|
||||
</RCTSafeAreaView>
|
||||
</View>
|
||||
`;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`EducationScreen should match snapshot 1`] = `
|
||||
<RCTSafeAreaView
|
||||
<View
|
||||
style={
|
||||
{
|
||||
"backgroundColor": "#FFFFFF",
|
||||
@@ -12,94 +12,86 @@ exports[`EducationScreen should match snapshot 1`] = `
|
||||
<View
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"flex": 1,
|
||||
"borderBottomColor": "#E0E0E0",
|
||||
"borderBottomWidth": 1,
|
||||
"flexDirection": "row",
|
||||
"justifyContent": "space-between",
|
||||
"paddingHorizontal": 16,
|
||||
"paddingVertical": 12,
|
||||
}
|
||||
}
|
||||
>
|
||||
<View
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"borderBottomColor": "#E0E0E0",
|
||||
"borderBottomWidth": 1,
|
||||
"flexDirection": "row",
|
||||
"justifyContent": "space-between",
|
||||
"paddingHorizontal": 16,
|
||||
"paddingVertical": 12,
|
||||
"color": "#000",
|
||||
"flex": 1,
|
||||
"fontSize": 18,
|
||||
"fontWeight": "700",
|
||||
"textAlign": "center",
|
||||
}
|
||||
}
|
||||
>
|
||||
Perwerde
|
||||
</Text>
|
||||
<View
|
||||
accessibilityState={
|
||||
{
|
||||
"busy": undefined,
|
||||
"checked": undefined,
|
||||
"disabled": undefined,
|
||||
"expanded": undefined,
|
||||
"selected": undefined,
|
||||
}
|
||||
}
|
||||
accessibilityValue={
|
||||
{
|
||||
"max": undefined,
|
||||
"min": undefined,
|
||||
"now": undefined,
|
||||
"text": undefined,
|
||||
}
|
||||
}
|
||||
accessible={true}
|
||||
collapsable={false}
|
||||
focusable={true}
|
||||
onClick={[Function]}
|
||||
onResponderGrant={[Function]}
|
||||
onResponderMove={[Function]}
|
||||
onResponderRelease={[Function]}
|
||||
onResponderTerminate={[Function]}
|
||||
onResponderTerminationRequest={[Function]}
|
||||
onStartShouldSetResponder={[Function]}
|
||||
style={
|
||||
{
|
||||
"opacity": 1,
|
||||
"padding": 8,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "#000",
|
||||
"flex": 1,
|
||||
"fontSize": 18,
|
||||
"fontWeight": "700",
|
||||
"textAlign": "center",
|
||||
"color": "#00A94F",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "600",
|
||||
}
|
||||
}
|
||||
>
|
||||
Perwerde
|
||||
Reload
|
||||
</Text>
|
||||
<View
|
||||
accessibilityState={
|
||||
{
|
||||
"busy": undefined,
|
||||
"checked": undefined,
|
||||
"disabled": undefined,
|
||||
"expanded": undefined,
|
||||
"selected": undefined,
|
||||
}
|
||||
}
|
||||
accessibilityValue={
|
||||
{
|
||||
"max": undefined,
|
||||
"min": undefined,
|
||||
"now": undefined,
|
||||
"text": undefined,
|
||||
}
|
||||
}
|
||||
accessible={true}
|
||||
collapsable={false}
|
||||
focusable={true}
|
||||
onClick={[Function]}
|
||||
onResponderGrant={[Function]}
|
||||
onResponderMove={[Function]}
|
||||
onResponderRelease={[Function]}
|
||||
onResponderTerminate={[Function]}
|
||||
onResponderTerminationRequest={[Function]}
|
||||
onStartShouldSetResponder={[Function]}
|
||||
style={
|
||||
{
|
||||
"opacity": 1,
|
||||
"padding": 8,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "#00A94F",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "600",
|
||||
}
|
||||
}
|
||||
>
|
||||
Reload
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<WebView
|
||||
allowsBackForwardNavigationGestures={true}
|
||||
allowsInlineMediaPlayback={true}
|
||||
bounces={true}
|
||||
cacheEnabled={true}
|
||||
cacheMode="LOAD_DEFAULT"
|
||||
domStorageEnabled={true}
|
||||
injectedJavaScript="
|
||||
</View>
|
||||
<WebView
|
||||
allowsBackForwardNavigationGestures={true}
|
||||
allowsInlineMediaPlayback={true}
|
||||
bounces={true}
|
||||
cacheEnabled={true}
|
||||
cacheMode="LOAD_DEFAULT"
|
||||
domStorageEnabled={true}
|
||||
injectedJavaScript="
|
||||
(function() {
|
||||
// Mark this as mobile app
|
||||
window.PEZKUWI_MOBILE = true;
|
||||
@@ -109,6 +101,36 @@ exports[`EducationScreen should match snapshot 1`] = `
|
||||
window.PEZKUWI_ADDRESS = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
|
||||
window.PEZKUWI_ACCOUNT_NAME = 'Mobile Wallet';
|
||||
|
||||
// Inject auth session for automatic login
|
||||
|
||||
|
||||
window.PEZKUWI_USER_ID = 'test-user-id';
|
||||
window.PEZKUWI_USER_EMAIL = 'test@pezkuwichain.io';
|
||||
|
||||
// Auto-authenticate with Supabase if session token exists
|
||||
if (window.PEZKUWI_SESSION_TOKEN) {
|
||||
(function autoAuth(attempts = 0) {
|
||||
if (attempts > 50) {
|
||||
console.warn('[Mobile] Auto-auth timed out: window.supabase not found');
|
||||
return;
|
||||
}
|
||||
|
||||
if (window.supabase && window.supabase.auth) {
|
||||
window.supabase.auth.setSession({
|
||||
access_token: window.PEZKUWI_SESSION_TOKEN,
|
||||
refresh_token: window.PEZKUWI_REFRESH_TOKEN || ''
|
||||
}).then(function(res) {
|
||||
if (res.error) console.warn('[Mobile] Auto-auth error:', res.error);
|
||||
else console.log('[Mobile] Auto-authenticated successfully');
|
||||
}).catch(function(err) {
|
||||
console.warn('[Mobile] Auto-auth promise failed:', err);
|
||||
});
|
||||
} else {
|
||||
setTimeout(function() { autoAuth(attempts + 1); }, 100);
|
||||
}
|
||||
})(0);
|
||||
}
|
||||
|
||||
// Override console.log to send to React Native (for debugging)
|
||||
const originalConsoleLog = console.log;
|
||||
console.log = function(...args) {
|
||||
@@ -166,66 +188,65 @@ exports[`EducationScreen should match snapshot 1`] = `
|
||||
true; // Required for injectedJavaScript
|
||||
})();
|
||||
"
|
||||
javaScriptEnabled={true}
|
||||
mediaPlaybackRequiresUserAction={false}
|
||||
onError={[Function]}
|
||||
onHttpError={[Function]}
|
||||
onLoadEnd={[Function]}
|
||||
onLoadStart={[Function]}
|
||||
onMessage={[Function]}
|
||||
onNavigationStateChange={[Function]}
|
||||
pullToRefreshEnabled={true}
|
||||
ref={
|
||||
{
|
||||
"current": null,
|
||||
}
|
||||
javaScriptEnabled={true}
|
||||
mediaPlaybackRequiresUserAction={false}
|
||||
onError={[Function]}
|
||||
onHttpError={[Function]}
|
||||
onLoadEnd={[Function]}
|
||||
onLoadStart={[Function]}
|
||||
onMessage={[Function]}
|
||||
onNavigationStateChange={[Function]}
|
||||
pullToRefreshEnabled={true}
|
||||
ref={
|
||||
{
|
||||
"current": null,
|
||||
}
|
||||
sharedCookiesEnabled={true}
|
||||
showsHorizontalScrollIndicator={false}
|
||||
showsVerticalScrollIndicator={true}
|
||||
source={
|
||||
{
|
||||
"uri": "https://pezkuwichain.io/education",
|
||||
}
|
||||
}
|
||||
sharedCookiesEnabled={true}
|
||||
showsHorizontalScrollIndicator={false}
|
||||
showsVerticalScrollIndicator={true}
|
||||
source={
|
||||
{
|
||||
"uri": "https://pezkuwichain.io/education",
|
||||
}
|
||||
style={
|
||||
{
|
||||
"flex": 1,
|
||||
}
|
||||
}
|
||||
style={
|
||||
{
|
||||
"flex": 1,
|
||||
}
|
||||
thirdPartyCookiesEnabled={true}
|
||||
webviewDebuggingEnabled={true}
|
||||
}
|
||||
thirdPartyCookiesEnabled={true}
|
||||
webviewDebuggingEnabled={true}
|
||||
/>
|
||||
<View
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "rgba(255, 255, 255, 0.9)",
|
||||
"bottom": 0,
|
||||
"justifyContent": "center",
|
||||
"left": 0,
|
||||
"position": "absolute",
|
||||
"right": 0,
|
||||
"top": 0,
|
||||
}
|
||||
}
|
||||
>
|
||||
<ActivityIndicator
|
||||
color="#00A94F"
|
||||
size="large"
|
||||
/>
|
||||
<View
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "rgba(255, 255, 255, 0.9)",
|
||||
"bottom": 0,
|
||||
"justifyContent": "center",
|
||||
"left": 0,
|
||||
"position": "absolute",
|
||||
"right": 0,
|
||||
"top": 0,
|
||||
"color": "#666",
|
||||
"fontSize": 14,
|
||||
"marginTop": 12,
|
||||
}
|
||||
}
|
||||
>
|
||||
<ActivityIndicator
|
||||
color="#00A94F"
|
||||
size="large"
|
||||
/>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "#666",
|
||||
"fontSize": 14,
|
||||
"marginTop": 12,
|
||||
}
|
||||
}
|
||||
>
|
||||
Loading...
|
||||
</Text>
|
||||
</View>
|
||||
Loading...
|
||||
</Text>
|
||||
</View>
|
||||
</RCTSafeAreaView>
|
||||
</View>
|
||||
`;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`GovernanceScreen should match snapshot 1`] = `
|
||||
<RCTSafeAreaView
|
||||
<View
|
||||
style={
|
||||
{
|
||||
"backgroundColor": "#FFFFFF",
|
||||
@@ -12,94 +12,86 @@ exports[`GovernanceScreen should match snapshot 1`] = `
|
||||
<View
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"flex": 1,
|
||||
"borderBottomColor": "#E0E0E0",
|
||||
"borderBottomWidth": 1,
|
||||
"flexDirection": "row",
|
||||
"justifyContent": "space-between",
|
||||
"paddingHorizontal": 16,
|
||||
"paddingVertical": 12,
|
||||
}
|
||||
}
|
||||
>
|
||||
<View
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"borderBottomColor": "#E0E0E0",
|
||||
"borderBottomWidth": 1,
|
||||
"flexDirection": "row",
|
||||
"justifyContent": "space-between",
|
||||
"paddingHorizontal": 16,
|
||||
"paddingVertical": 12,
|
||||
"color": "#000",
|
||||
"flex": 1,
|
||||
"fontSize": 18,
|
||||
"fontWeight": "700",
|
||||
"textAlign": "center",
|
||||
}
|
||||
}
|
||||
>
|
||||
Governance
|
||||
</Text>
|
||||
<View
|
||||
accessibilityState={
|
||||
{
|
||||
"busy": undefined,
|
||||
"checked": undefined,
|
||||
"disabled": undefined,
|
||||
"expanded": undefined,
|
||||
"selected": undefined,
|
||||
}
|
||||
}
|
||||
accessibilityValue={
|
||||
{
|
||||
"max": undefined,
|
||||
"min": undefined,
|
||||
"now": undefined,
|
||||
"text": undefined,
|
||||
}
|
||||
}
|
||||
accessible={true}
|
||||
collapsable={false}
|
||||
focusable={true}
|
||||
onClick={[Function]}
|
||||
onResponderGrant={[Function]}
|
||||
onResponderMove={[Function]}
|
||||
onResponderRelease={[Function]}
|
||||
onResponderTerminate={[Function]}
|
||||
onResponderTerminationRequest={[Function]}
|
||||
onStartShouldSetResponder={[Function]}
|
||||
style={
|
||||
{
|
||||
"opacity": 1,
|
||||
"padding": 8,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "#000",
|
||||
"flex": 1,
|
||||
"fontSize": 18,
|
||||
"fontWeight": "700",
|
||||
"textAlign": "center",
|
||||
"color": "#00A94F",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "600",
|
||||
}
|
||||
}
|
||||
>
|
||||
Governance
|
||||
Reload
|
||||
</Text>
|
||||
<View
|
||||
accessibilityState={
|
||||
{
|
||||
"busy": undefined,
|
||||
"checked": undefined,
|
||||
"disabled": undefined,
|
||||
"expanded": undefined,
|
||||
"selected": undefined,
|
||||
}
|
||||
}
|
||||
accessibilityValue={
|
||||
{
|
||||
"max": undefined,
|
||||
"min": undefined,
|
||||
"now": undefined,
|
||||
"text": undefined,
|
||||
}
|
||||
}
|
||||
accessible={true}
|
||||
collapsable={false}
|
||||
focusable={true}
|
||||
onClick={[Function]}
|
||||
onResponderGrant={[Function]}
|
||||
onResponderMove={[Function]}
|
||||
onResponderRelease={[Function]}
|
||||
onResponderTerminate={[Function]}
|
||||
onResponderTerminationRequest={[Function]}
|
||||
onStartShouldSetResponder={[Function]}
|
||||
style={
|
||||
{
|
||||
"opacity": 1,
|
||||
"padding": 8,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "#00A94F",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "600",
|
||||
}
|
||||
}
|
||||
>
|
||||
Reload
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<WebView
|
||||
allowsBackForwardNavigationGestures={true}
|
||||
allowsInlineMediaPlayback={true}
|
||||
bounces={true}
|
||||
cacheEnabled={true}
|
||||
cacheMode="LOAD_DEFAULT"
|
||||
domStorageEnabled={true}
|
||||
injectedJavaScript="
|
||||
</View>
|
||||
<WebView
|
||||
allowsBackForwardNavigationGestures={true}
|
||||
allowsInlineMediaPlayback={true}
|
||||
bounces={true}
|
||||
cacheEnabled={true}
|
||||
cacheMode="LOAD_DEFAULT"
|
||||
domStorageEnabled={true}
|
||||
injectedJavaScript="
|
||||
(function() {
|
||||
// Mark this as mobile app
|
||||
window.PEZKUWI_MOBILE = true;
|
||||
@@ -109,6 +101,36 @@ exports[`GovernanceScreen should match snapshot 1`] = `
|
||||
window.PEZKUWI_ADDRESS = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
|
||||
window.PEZKUWI_ACCOUNT_NAME = 'Mobile Wallet';
|
||||
|
||||
// Inject auth session for automatic login
|
||||
|
||||
|
||||
window.PEZKUWI_USER_ID = 'test-user-id';
|
||||
window.PEZKUWI_USER_EMAIL = 'test@pezkuwichain.io';
|
||||
|
||||
// Auto-authenticate with Supabase if session token exists
|
||||
if (window.PEZKUWI_SESSION_TOKEN) {
|
||||
(function autoAuth(attempts = 0) {
|
||||
if (attempts > 50) {
|
||||
console.warn('[Mobile] Auto-auth timed out: window.supabase not found');
|
||||
return;
|
||||
}
|
||||
|
||||
if (window.supabase && window.supabase.auth) {
|
||||
window.supabase.auth.setSession({
|
||||
access_token: window.PEZKUWI_SESSION_TOKEN,
|
||||
refresh_token: window.PEZKUWI_REFRESH_TOKEN || ''
|
||||
}).then(function(res) {
|
||||
if (res.error) console.warn('[Mobile] Auto-auth error:', res.error);
|
||||
else console.log('[Mobile] Auto-authenticated successfully');
|
||||
}).catch(function(err) {
|
||||
console.warn('[Mobile] Auto-auth promise failed:', err);
|
||||
});
|
||||
} else {
|
||||
setTimeout(function() { autoAuth(attempts + 1); }, 100);
|
||||
}
|
||||
})(0);
|
||||
}
|
||||
|
||||
// Override console.log to send to React Native (for debugging)
|
||||
const originalConsoleLog = console.log;
|
||||
console.log = function(...args) {
|
||||
@@ -166,66 +188,65 @@ exports[`GovernanceScreen should match snapshot 1`] = `
|
||||
true; // Required for injectedJavaScript
|
||||
})();
|
||||
"
|
||||
javaScriptEnabled={true}
|
||||
mediaPlaybackRequiresUserAction={false}
|
||||
onError={[Function]}
|
||||
onHttpError={[Function]}
|
||||
onLoadEnd={[Function]}
|
||||
onLoadStart={[Function]}
|
||||
onMessage={[Function]}
|
||||
onNavigationStateChange={[Function]}
|
||||
pullToRefreshEnabled={true}
|
||||
ref={
|
||||
{
|
||||
"current": null,
|
||||
}
|
||||
javaScriptEnabled={true}
|
||||
mediaPlaybackRequiresUserAction={false}
|
||||
onError={[Function]}
|
||||
onHttpError={[Function]}
|
||||
onLoadEnd={[Function]}
|
||||
onLoadStart={[Function]}
|
||||
onMessage={[Function]}
|
||||
onNavigationStateChange={[Function]}
|
||||
pullToRefreshEnabled={true}
|
||||
ref={
|
||||
{
|
||||
"current": null,
|
||||
}
|
||||
sharedCookiesEnabled={true}
|
||||
showsHorizontalScrollIndicator={false}
|
||||
showsVerticalScrollIndicator={true}
|
||||
source={
|
||||
{
|
||||
"uri": "https://pezkuwichain.io/elections",
|
||||
}
|
||||
}
|
||||
sharedCookiesEnabled={true}
|
||||
showsHorizontalScrollIndicator={false}
|
||||
showsVerticalScrollIndicator={true}
|
||||
source={
|
||||
{
|
||||
"uri": "https://pezkuwichain.io/elections",
|
||||
}
|
||||
style={
|
||||
{
|
||||
"flex": 1,
|
||||
}
|
||||
}
|
||||
style={
|
||||
{
|
||||
"flex": 1,
|
||||
}
|
||||
thirdPartyCookiesEnabled={true}
|
||||
webviewDebuggingEnabled={true}
|
||||
}
|
||||
thirdPartyCookiesEnabled={true}
|
||||
webviewDebuggingEnabled={true}
|
||||
/>
|
||||
<View
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "rgba(255, 255, 255, 0.9)",
|
||||
"bottom": 0,
|
||||
"justifyContent": "center",
|
||||
"left": 0,
|
||||
"position": "absolute",
|
||||
"right": 0,
|
||||
"top": 0,
|
||||
}
|
||||
}
|
||||
>
|
||||
<ActivityIndicator
|
||||
color="#00A94F"
|
||||
size="large"
|
||||
/>
|
||||
<View
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "rgba(255, 255, 255, 0.9)",
|
||||
"bottom": 0,
|
||||
"justifyContent": "center",
|
||||
"left": 0,
|
||||
"position": "absolute",
|
||||
"right": 0,
|
||||
"top": 0,
|
||||
"color": "#666",
|
||||
"fontSize": 14,
|
||||
"marginTop": 12,
|
||||
}
|
||||
}
|
||||
>
|
||||
<ActivityIndicator
|
||||
color="#00A94F"
|
||||
size="large"
|
||||
/>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "#666",
|
||||
"fontSize": 14,
|
||||
"marginTop": 12,
|
||||
}
|
||||
}
|
||||
>
|
||||
Loading...
|
||||
</Text>
|
||||
</View>
|
||||
Loading...
|
||||
</Text>
|
||||
</View>
|
||||
</RCTSafeAreaView>
|
||||
</View>
|
||||
`;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`P2PScreen should match snapshot 1`] = `
|
||||
<RCTSafeAreaView
|
||||
<View
|
||||
style={
|
||||
{
|
||||
"backgroundColor": "#FFFFFF",
|
||||
@@ -12,94 +12,86 @@ exports[`P2PScreen should match snapshot 1`] = `
|
||||
<View
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"flex": 1,
|
||||
"borderBottomColor": "#E0E0E0",
|
||||
"borderBottomWidth": 1,
|
||||
"flexDirection": "row",
|
||||
"justifyContent": "space-between",
|
||||
"paddingHorizontal": 16,
|
||||
"paddingVertical": 12,
|
||||
}
|
||||
}
|
||||
>
|
||||
<View
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"borderBottomColor": "#E0E0E0",
|
||||
"borderBottomWidth": 1,
|
||||
"flexDirection": "row",
|
||||
"justifyContent": "space-between",
|
||||
"paddingHorizontal": 16,
|
||||
"paddingVertical": 12,
|
||||
"color": "#000",
|
||||
"flex": 1,
|
||||
"fontSize": 18,
|
||||
"fontWeight": "700",
|
||||
"textAlign": "center",
|
||||
}
|
||||
}
|
||||
>
|
||||
P2P Trading
|
||||
</Text>
|
||||
<View
|
||||
accessibilityState={
|
||||
{
|
||||
"busy": undefined,
|
||||
"checked": undefined,
|
||||
"disabled": undefined,
|
||||
"expanded": undefined,
|
||||
"selected": undefined,
|
||||
}
|
||||
}
|
||||
accessibilityValue={
|
||||
{
|
||||
"max": undefined,
|
||||
"min": undefined,
|
||||
"now": undefined,
|
||||
"text": undefined,
|
||||
}
|
||||
}
|
||||
accessible={true}
|
||||
collapsable={false}
|
||||
focusable={true}
|
||||
onClick={[Function]}
|
||||
onResponderGrant={[Function]}
|
||||
onResponderMove={[Function]}
|
||||
onResponderRelease={[Function]}
|
||||
onResponderTerminate={[Function]}
|
||||
onResponderTerminationRequest={[Function]}
|
||||
onStartShouldSetResponder={[Function]}
|
||||
style={
|
||||
{
|
||||
"opacity": 1,
|
||||
"padding": 8,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "#000",
|
||||
"flex": 1,
|
||||
"fontSize": 18,
|
||||
"fontWeight": "700",
|
||||
"textAlign": "center",
|
||||
"color": "#00A94F",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "600",
|
||||
}
|
||||
}
|
||||
>
|
||||
P2P Trading
|
||||
Reload
|
||||
</Text>
|
||||
<View
|
||||
accessibilityState={
|
||||
{
|
||||
"busy": undefined,
|
||||
"checked": undefined,
|
||||
"disabled": undefined,
|
||||
"expanded": undefined,
|
||||
"selected": undefined,
|
||||
}
|
||||
}
|
||||
accessibilityValue={
|
||||
{
|
||||
"max": undefined,
|
||||
"min": undefined,
|
||||
"now": undefined,
|
||||
"text": undefined,
|
||||
}
|
||||
}
|
||||
accessible={true}
|
||||
collapsable={false}
|
||||
focusable={true}
|
||||
onClick={[Function]}
|
||||
onResponderGrant={[Function]}
|
||||
onResponderMove={[Function]}
|
||||
onResponderRelease={[Function]}
|
||||
onResponderTerminate={[Function]}
|
||||
onResponderTerminationRequest={[Function]}
|
||||
onStartShouldSetResponder={[Function]}
|
||||
style={
|
||||
{
|
||||
"opacity": 1,
|
||||
"padding": 8,
|
||||
}
|
||||
}
|
||||
>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "#00A94F",
|
||||
"fontSize": 14,
|
||||
"fontWeight": "600",
|
||||
}
|
||||
}
|
||||
>
|
||||
Reload
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<WebView
|
||||
allowsBackForwardNavigationGestures={true}
|
||||
allowsInlineMediaPlayback={true}
|
||||
bounces={true}
|
||||
cacheEnabled={true}
|
||||
cacheMode="LOAD_DEFAULT"
|
||||
domStorageEnabled={true}
|
||||
injectedJavaScript="
|
||||
</View>
|
||||
<WebView
|
||||
allowsBackForwardNavigationGestures={true}
|
||||
allowsInlineMediaPlayback={true}
|
||||
bounces={true}
|
||||
cacheEnabled={true}
|
||||
cacheMode="LOAD_DEFAULT"
|
||||
domStorageEnabled={true}
|
||||
injectedJavaScript="
|
||||
(function() {
|
||||
// Mark this as mobile app
|
||||
window.PEZKUWI_MOBILE = true;
|
||||
@@ -109,6 +101,36 @@ exports[`P2PScreen should match snapshot 1`] = `
|
||||
window.PEZKUWI_ADDRESS = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
|
||||
window.PEZKUWI_ACCOUNT_NAME = 'Mobile Wallet';
|
||||
|
||||
// Inject auth session for automatic login
|
||||
|
||||
|
||||
window.PEZKUWI_USER_ID = 'test-user-id';
|
||||
window.PEZKUWI_USER_EMAIL = 'test@pezkuwichain.io';
|
||||
|
||||
// Auto-authenticate with Supabase if session token exists
|
||||
if (window.PEZKUWI_SESSION_TOKEN) {
|
||||
(function autoAuth(attempts = 0) {
|
||||
if (attempts > 50) {
|
||||
console.warn('[Mobile] Auto-auth timed out: window.supabase not found');
|
||||
return;
|
||||
}
|
||||
|
||||
if (window.supabase && window.supabase.auth) {
|
||||
window.supabase.auth.setSession({
|
||||
access_token: window.PEZKUWI_SESSION_TOKEN,
|
||||
refresh_token: window.PEZKUWI_REFRESH_TOKEN || ''
|
||||
}).then(function(res) {
|
||||
if (res.error) console.warn('[Mobile] Auto-auth error:', res.error);
|
||||
else console.log('[Mobile] Auto-authenticated successfully');
|
||||
}).catch(function(err) {
|
||||
console.warn('[Mobile] Auto-auth promise failed:', err);
|
||||
});
|
||||
} else {
|
||||
setTimeout(function() { autoAuth(attempts + 1); }, 100);
|
||||
}
|
||||
})(0);
|
||||
}
|
||||
|
||||
// Override console.log to send to React Native (for debugging)
|
||||
const originalConsoleLog = console.log;
|
||||
console.log = function(...args) {
|
||||
@@ -166,66 +188,65 @@ exports[`P2PScreen should match snapshot 1`] = `
|
||||
true; // Required for injectedJavaScript
|
||||
})();
|
||||
"
|
||||
javaScriptEnabled={true}
|
||||
mediaPlaybackRequiresUserAction={false}
|
||||
onError={[Function]}
|
||||
onHttpError={[Function]}
|
||||
onLoadEnd={[Function]}
|
||||
onLoadStart={[Function]}
|
||||
onMessage={[Function]}
|
||||
onNavigationStateChange={[Function]}
|
||||
pullToRefreshEnabled={true}
|
||||
ref={
|
||||
{
|
||||
"current": null,
|
||||
}
|
||||
javaScriptEnabled={true}
|
||||
mediaPlaybackRequiresUserAction={false}
|
||||
onError={[Function]}
|
||||
onHttpError={[Function]}
|
||||
onLoadEnd={[Function]}
|
||||
onLoadStart={[Function]}
|
||||
onMessage={[Function]}
|
||||
onNavigationStateChange={[Function]}
|
||||
pullToRefreshEnabled={true}
|
||||
ref={
|
||||
{
|
||||
"current": null,
|
||||
}
|
||||
sharedCookiesEnabled={true}
|
||||
showsHorizontalScrollIndicator={false}
|
||||
showsVerticalScrollIndicator={true}
|
||||
source={
|
||||
{
|
||||
"uri": "https://pezkuwichain.io/p2p",
|
||||
}
|
||||
}
|
||||
sharedCookiesEnabled={true}
|
||||
showsHorizontalScrollIndicator={false}
|
||||
showsVerticalScrollIndicator={true}
|
||||
source={
|
||||
{
|
||||
"uri": "https://pezkuwichain.io/p2p",
|
||||
}
|
||||
style={
|
||||
{
|
||||
"flex": 1,
|
||||
}
|
||||
}
|
||||
style={
|
||||
{
|
||||
"flex": 1,
|
||||
}
|
||||
thirdPartyCookiesEnabled={true}
|
||||
webviewDebuggingEnabled={true}
|
||||
}
|
||||
thirdPartyCookiesEnabled={true}
|
||||
webviewDebuggingEnabled={true}
|
||||
/>
|
||||
<View
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "rgba(255, 255, 255, 0.9)",
|
||||
"bottom": 0,
|
||||
"justifyContent": "center",
|
||||
"left": 0,
|
||||
"position": "absolute",
|
||||
"right": 0,
|
||||
"top": 0,
|
||||
}
|
||||
}
|
||||
>
|
||||
<ActivityIndicator
|
||||
color="#00A94F"
|
||||
size="large"
|
||||
/>
|
||||
<View
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"alignItems": "center",
|
||||
"backgroundColor": "rgba(255, 255, 255, 0.9)",
|
||||
"bottom": 0,
|
||||
"justifyContent": "center",
|
||||
"left": 0,
|
||||
"position": "absolute",
|
||||
"right": 0,
|
||||
"top": 0,
|
||||
"color": "#666",
|
||||
"fontSize": 14,
|
||||
"marginTop": 12,
|
||||
}
|
||||
}
|
||||
>
|
||||
<ActivityIndicator
|
||||
color="#00A94F"
|
||||
size="large"
|
||||
/>
|
||||
<Text
|
||||
style={
|
||||
{
|
||||
"color": "#666",
|
||||
"fontSize": 14,
|
||||
"marginTop": 12,
|
||||
}
|
||||
}
|
||||
>
|
||||
Loading...
|
||||
</Text>
|
||||
</View>
|
||||
Loading...
|
||||
</Text>
|
||||
</View>
|
||||
</RCTSafeAreaView>
|
||||
</View>
|
||||
`;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"types": ["jest", "node"]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.tsx",
|
||||
"__mocks__/**/*.ts",
|
||||
"__mocks__/**/*.tsx",
|
||||
"**/*.test.ts",
|
||||
"**/*.test.tsx",
|
||||
"**/*.spec.ts",
|
||||
"**/*.spec.tsx"
|
||||
]
|
||||
}
|
||||
Generated
+329
@@ -0,0 +1,329 @@
|
||||
{
|
||||
"name": "pwap",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "pwap",
|
||||
"version": "1.0.0",
|
||||
"devDependencies": {
|
||||
"concurrently": "^9.1.2"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-regex": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"color-convert": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/chalk/node_modules/supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has-flag": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/cliui": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
|
||||
"integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"string-width": "^4.2.0",
|
||||
"strip-ansi": "^6.0.1",
|
||||
"wrap-ansi": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"color-name": "~1.1.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/concurrently": {
|
||||
"version": "9.2.1",
|
||||
"resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.1.tgz",
|
||||
"integrity": "sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chalk": "4.1.2",
|
||||
"rxjs": "7.8.2",
|
||||
"shell-quote": "1.8.3",
|
||||
"supports-color": "8.1.1",
|
||||
"tree-kill": "1.2.2",
|
||||
"yargs": "17.7.2"
|
||||
},
|
||||
"bin": {
|
||||
"conc": "dist/bin/concurrently.js",
|
||||
"concurrently": "dist/bin/concurrently.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/open-cli-tools/concurrently?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/escalade": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
|
||||
"integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/get-caller-file": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": "6.* || 8.* || >= 10.*"
|
||||
}
|
||||
},
|
||||
"node_modules/has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-fullwidth-code-point": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/require-directory": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/rxjs": {
|
||||
"version": "7.8.2",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
|
||||
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/shell-quote": {
|
||||
"version": "1.8.3",
|
||||
"resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz",
|
||||
"integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/string-width": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
"strip-ansi": "^6.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/strip-ansi": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-color": {
|
||||
"version": "8.1.1",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
|
||||
"integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has-flag": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/supports-color?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/tree-kill": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
|
||||
"integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"tree-kill": "cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
||||
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
||||
"dev": true,
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/wrap-ansi": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
||||
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.0.0",
|
||||
"string-width": "^4.1.0",
|
||||
"strip-ansi": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/y18n": {
|
||||
"version": "5.0.8",
|
||||
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
|
||||
"integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/yargs": {
|
||||
"version": "17.7.2",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
|
||||
"integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cliui": "^8.0.1",
|
||||
"escalade": "^3.1.1",
|
||||
"get-caller-file": "^2.0.5",
|
||||
"require-directory": "^2.1.1",
|
||||
"string-width": "^4.2.3",
|
||||
"y18n": "^5.0.5",
|
||||
"yargs-parser": "^21.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/yargs-parser": {
|
||||
"version": "21.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
|
||||
"integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "pwap",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "Pezkuwi Web App Projects - Monorepo",
|
||||
"scripts": {
|
||||
"build": "npm run build:web && npm run build:sdk-ui && npm run build:mobile",
|
||||
"build:web": "cd web && npm run build",
|
||||
"build:sdk-ui": "cd /home/mamostehp/pezkuwi-sdk-ui && yarn build",
|
||||
"build:mobile": "cd mobile && npx expo export --platform web",
|
||||
"build:parallel": "concurrently \"npm run build:web\" \"npm run build:sdk-ui\"",
|
||||
"dev": "concurrently \"npm run dev:web\" \"npm run dev:mobile\"",
|
||||
"dev:web": "cd web && npm run dev",
|
||||
"dev:sdk-ui": "cd /home/mamostehp/pezkuwi-sdk-ui && yarn start",
|
||||
"dev:mobile": "cd mobile && npm run dev",
|
||||
"install:all": "npm run install:web && npm run install:sdk-ui && npm run install:mobile && npm run install:backend",
|
||||
"install:web": "cd web && npm install",
|
||||
"install:sdk-ui": "cd /home/mamostehp/pezkuwi-sdk-ui && yarn install",
|
||||
"install:mobile": "cd mobile && npm install",
|
||||
"install:backend": "cd backend && npm install",
|
||||
"lint": "npm run lint:web && npm run lint:mobile",
|
||||
"lint:web": "cd web && npm run lint",
|
||||
"lint:mobile": "cd mobile && npm run lint",
|
||||
"test": "npm run test:web && npm run test:mobile",
|
||||
"test:web": "cd web && npm run test",
|
||||
"test:mobile": "cd mobile && npm run test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^9.1.2"
|
||||
}
|
||||
}
|
||||
+22
-22
@@ -20,7 +20,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@hookform/resolvers": "^3.9.0",
|
||||
"@pezkuwi/api": "^16.5.9",
|
||||
"@pezkuwi/api": "^16.5.11",
|
||||
"@pezkuwi/extension-dapp": "^0.62.20",
|
||||
"@pezkuwi/keyring": "^14.0.11",
|
||||
"@pezkuwi/util": "^14.0.11",
|
||||
@@ -90,30 +90,30 @@
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
"overrides": {
|
||||
"@pezkuwi/api": "$@pezkuwi/api",
|
||||
"@pezkuwi/api-augment": "16.5.6",
|
||||
"@pezkuwi/api-base": "16.5.6",
|
||||
"@pezkuwi/api-derive": "16.5.6",
|
||||
"@pezkuwi/rpc-augment": "16.5.6",
|
||||
"@pezkuwi/rpc-core": "16.5.6",
|
||||
"@pezkuwi/rpc-provider": "16.5.6",
|
||||
"@pezkuwi/types": "16.5.6",
|
||||
"@pezkuwi/types-augment": "16.5.6",
|
||||
"@pezkuwi/types-codec": "16.5.6",
|
||||
"@pezkuwi/types-create": "16.5.6",
|
||||
"@pezkuwi/types-known": "16.5.6",
|
||||
"@pezkuwi/types-support": "16.5.6",
|
||||
"@pezkuwi/api": "^16.5.11",
|
||||
"@pezkuwi/api-augment": "^16.5.11",
|
||||
"@pezkuwi/api-base": "^16.5.11",
|
||||
"@pezkuwi/api-derive": "^16.5.11",
|
||||
"@pezkuwi/rpc-augment": "^16.5.11",
|
||||
"@pezkuwi/rpc-core": "^16.5.11",
|
||||
"@pezkuwi/rpc-provider": "^16.5.11",
|
||||
"@pezkuwi/types": "^16.5.11",
|
||||
"@pezkuwi/types-augment": "^16.5.11",
|
||||
"@pezkuwi/types-codec": "^16.5.11",
|
||||
"@pezkuwi/types-create": "^16.5.11",
|
||||
"@pezkuwi/types-known": "^16.5.11",
|
||||
"@pezkuwi/types-support": "^16.5.11",
|
||||
"@pezkuwi/keyring": "$@pezkuwi/keyring",
|
||||
"@pezkuwi/util": "$@pezkuwi/util",
|
||||
"@pezkuwi/util-crypto": "$@pezkuwi/util-crypto",
|
||||
"@pezkuwi/x-bigint": "14.0.7",
|
||||
"@pezkuwi/x-fetch": "14.0.7",
|
||||
"@pezkuwi/x-global": "14.0.7",
|
||||
"@pezkuwi/x-randomvalues": "14.0.7",
|
||||
"@pezkuwi/x-textdecoder": "14.0.7",
|
||||
"@pezkuwi/x-textencoder": "14.0.7",
|
||||
"@pezkuwi/x-ws": "14.0.7",
|
||||
"@pezkuwi/networks": "14.0.7"
|
||||
"@pezkuwi/x-bigint": "^14.0.11",
|
||||
"@pezkuwi/x-fetch": "^14.0.11",
|
||||
"@pezkuwi/x-global": "^14.0.11",
|
||||
"@pezkuwi/x-randomvalues": "^14.0.11",
|
||||
"@pezkuwi/x-textdecoder": "^14.0.11",
|
||||
"@pezkuwi/x-textencoder": "^14.0.11",
|
||||
"@pezkuwi/x-ws": "^14.0.11",
|
||||
"@pezkuwi/networks": "^16.5.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.9.0",
|
||||
|
||||
Reference in New Issue
Block a user