@common-stack/mobile-stack-react 6.0.6-alpha.7 → 6.0.6-alpha.79
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/lib/config/base-apollo-cache.js +2 -2
- package/lib/config/base-apollo-client.d.ts +2 -3
- package/lib/config/base-apollo-client.js +18 -21
- package/lib/config/base-redux-config.d.ts +1 -1
- package/lib/config/base-redux-config.js +5 -14
- package/lib/config/client.service.d.ts +2 -2
- package/lib/config/client.service.js +3 -3
- package/lib/config/mobile-env-config.js +2 -2
- package/lib/config/redux-config.d.ts +14 -20
- package/lib/config/redux-config.js +18 -15
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -1
- package/lib/load-context.mobile.d.ts +8 -0
- package/lib/load-context.mobile.js +14 -0
- package/lib/modules.d.ts +0 -1
- package/lib/modules.js +1 -2
- package/lib/utils/index.js +0 -1
- package/package.json +43 -41
|
@@ -14,7 +14,7 @@ const initializeCache = ({ cache, initialState, clientState, logger, }) => {
|
|
|
14
14
|
logger.debug('Cache restored with initial state');
|
|
15
15
|
}
|
|
16
16
|
catch (err) {
|
|
17
|
-
logger.error('Error restoring cache'
|
|
17
|
+
logger.error(err, 'Error restoring cache');
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
else {
|
|
@@ -28,7 +28,7 @@ const initializeCache = ({ cache, initialState, clientState, logger, }) => {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
catch (err) {
|
|
31
|
-
logger.error('Error writing to cache'
|
|
31
|
+
logger.error(err, 'Error writing to cache');
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ApolloClient } from '@apollo/client';
|
|
2
|
-
import { InMemoryCache } from '@apollo/client/cache';
|
|
1
|
+
import { ApolloClient, NormalizedCacheObject, InMemoryCache } from '@apollo/client/index.js';
|
|
3
2
|
import { CdmLogger } from '@cdm-logger/core';
|
|
4
3
|
interface IApolloClientParams {
|
|
5
4
|
initialState?: any;
|
|
@@ -14,7 +13,7 @@ interface IApolloClientParams {
|
|
|
14
13
|
logger: CdmLogger.ILogger;
|
|
15
14
|
}
|
|
16
15
|
export declare const createApolloClient: ({ scope, isDev, isDebug, isSSR, getDataIdFromObject, clientState, httpGraphqlURL, httpLocalGraphqlURL, initialState, logger, }: IApolloClientParams) => {
|
|
17
|
-
apolloClient: ApolloClient<
|
|
16
|
+
apolloClient: ApolloClient<NormalizedCacheObject>;
|
|
18
17
|
cache: InMemoryCache;
|
|
19
18
|
};
|
|
20
19
|
export {};
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {ApolloLink,ApolloClient}from'@apollo/client';import {HttpLink}from'@apollo/client/link/http';import {BatchHttpLink}from'@apollo/client/link/batch-http';import {onError}from'@apollo/client/link/error/index.js';import {GraphQLWsLink}from'@apollo/client/link/subscriptions';import {getOperationAST}from'graphql';import {invariant}from'ts-invariant';import
|
|
2
|
-
// version 09/18/2021
|
|
3
|
-
/* eslint-disable import/no-extraneous-dependencies */
|
|
4
|
-
/* eslint-disable no-underscore-dangle */
|
|
5
|
-
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
1
|
+
import {isBoolean,merge}from'lodash-es';import {ApolloLink,ApolloClient}from'@apollo/client/index.js';import {HttpLink}from'@apollo/client/link/http/index.js';import {BatchHttpLink}from'@apollo/client/link/batch-http/index.js';import {onError}from'@apollo/client/link/error/index.js';import {GraphQLWsLink}from'@apollo/client/link/subscriptions/index.js';import {getOperationAST}from'graphql';import {invariant}from'ts-invariant';import {RetryLink}from'@apollo/client/link/retry/index.js';import {createClient}from'graphql-ws';import fetch from'cross-fetch';import {createCache,initializeCache}from'./base-apollo-cache.js';// apolloClient.ts
|
|
6
2
|
const schema = `
|
|
7
|
-
|
|
3
|
+
# Add your schema here
|
|
8
4
|
`;
|
|
9
5
|
const errorLink = onError(({ graphQLErrors, networkError }) => {
|
|
10
6
|
if (graphQLErrors) {
|
|
@@ -36,7 +32,7 @@ const createApolloClient = ({ scope, isDev, isDebug, isSSR, getDataIdFromObject,
|
|
|
36
32
|
return !!result.find((item) => item && isBoolean(item));
|
|
37
33
|
}
|
|
38
34
|
catch (e) {
|
|
39
|
-
logger.error('Error occurred in retryLink attempt condition'
|
|
35
|
+
logger.error(e, 'Error occurred in retryLink attempt condition');
|
|
40
36
|
throw e;
|
|
41
37
|
}
|
|
42
38
|
},
|
|
@@ -62,7 +58,7 @@ const createApolloClient = ({ scope, isDev, isDebug, isSSR, getDataIdFromObject,
|
|
|
62
58
|
on: {
|
|
63
59
|
connected: (socket) => logger.debug('WebSocket connected'),
|
|
64
60
|
error: async (error) => {
|
|
65
|
-
logger.error(error, '
|
|
61
|
+
logger.error(error, 'WebSocket connection error');
|
|
66
62
|
const promises = (clientState.connectionCallbackFuncs || []).map((func) => func(wsLink, error, {}));
|
|
67
63
|
try {
|
|
68
64
|
await Promise.all(promises);
|
|
@@ -72,10 +68,8 @@ const createApolloClient = ({ scope, isDev, isDebug, isSSR, getDataIdFromObject,
|
|
|
72
68
|
throw err;
|
|
73
69
|
}
|
|
74
70
|
},
|
|
75
|
-
|
|
76
|
-
ping: () => logger.trace('Ping sent'),
|
|
71
|
+
ping: () => logger.trace('Ping server'),
|
|
77
72
|
pong: () => logger.trace('Pong received'),
|
|
78
|
-
// inactivityTimeout: 10000,
|
|
79
73
|
},
|
|
80
74
|
}));
|
|
81
75
|
link = ApolloLink.split(({ query, operationName }) => {
|
|
@@ -84,20 +78,26 @@ const createApolloClient = ({ scope, isDev, isDebug, isSSR, getDataIdFromObject,
|
|
|
84
78
|
}
|
|
85
79
|
const operationAST = getOperationAST(query, operationName);
|
|
86
80
|
return !!operationAST && operationAST.operation === 'subscription';
|
|
87
|
-
}, wsLink, new HttpLink({
|
|
88
|
-
uri: httpGraphqlURL,
|
|
89
|
-
}));
|
|
81
|
+
}, wsLink, new HttpLink({ uri: httpGraphqlURL, credentials: 'include', fetch }));
|
|
90
82
|
}
|
|
91
83
|
else if (isServer) {
|
|
92
|
-
|
|
84
|
+
logger.debug('Creating BatchHttpLink for server');
|
|
85
|
+
link = new BatchHttpLink({
|
|
86
|
+
uri: httpLocalGraphqlURL,
|
|
87
|
+
fetch,
|
|
88
|
+
batchInterval: 200,
|
|
89
|
+
batchMax: 100,
|
|
90
|
+
credentials: 'include',
|
|
91
|
+
});
|
|
93
92
|
}
|
|
94
93
|
else {
|
|
95
|
-
|
|
94
|
+
logger.debug('Creating HttpLink for native');
|
|
95
|
+
link = new HttpLink({ uri: httpLocalGraphqlURL, fetch, credentials: 'include' });
|
|
96
96
|
}
|
|
97
|
-
const links = [errorLink, retryLink, ...(clientState.preLinks || []), link];
|
|
97
|
+
const links = [errorLink, retryLink, ...(clientState.preLinks || []), link].filter(Boolean);
|
|
98
98
|
const params = {
|
|
99
99
|
queryDeduplication: true,
|
|
100
|
-
typeDefs: schema.concat(clientState.typeDefs),
|
|
100
|
+
typeDefs: schema.concat(clientState.typeDefs || ''),
|
|
101
101
|
resolvers: clientState.resolvers,
|
|
102
102
|
link: ApolloLink.from(links),
|
|
103
103
|
cache,
|
|
@@ -106,9 +106,6 @@ const createApolloClient = ({ scope, isDev, isDebug, isSSR, getDataIdFromObject,
|
|
|
106
106
|
};
|
|
107
107
|
if (isSSR) {
|
|
108
108
|
if (isBrowser) {
|
|
109
|
-
if (initialState) {
|
|
110
|
-
cache.restore(initialState);
|
|
111
|
-
}
|
|
112
109
|
params.ssrForceFetchDelay = 100;
|
|
113
110
|
}
|
|
114
111
|
else if (isServer) {
|
|
@@ -20,5 +20,5 @@ interface IReduxStore<S = any> {
|
|
|
20
20
|
* Add any reducers required for this app dirctly in to
|
|
21
21
|
* `combineReducers`
|
|
22
22
|
*/
|
|
23
|
-
export declare const createReduxStore: ({ scope, isDebug, isDev, reducers, rootEpic, enhancers, epicMiddleware, preMiddleware, postMiddleware, middleware, initialState, persistConfig, reduxConfig, }: IReduxStore<any>) => import("
|
|
23
|
+
export declare const createReduxStore: ({ scope, isDebug, isDev, reducers, rootEpic, enhancers, epicMiddleware, preMiddleware, postMiddleware, middleware, initialState, persistConfig, reduxConfig, }: IReduxStore<any>) => import("redux").Store<any, import("redux").UnknownAction, unknown>;
|
|
24
24
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {combineReducers,configureStore}from'@reduxjs/toolkit';import {persistReducer
|
|
1
|
+
import {combineReducers,configureStore}from'@reduxjs/toolkit';import {persistReducer}from'redux-persist';// version 11/12/2021
|
|
2
2
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
@@ -11,11 +11,12 @@ import {combineReducers,configureStore}from'@reduxjs/toolkit';import {persistRed
|
|
|
11
11
|
const createReduxStore = ({ scope, isDebug, isDev, reducers, rootEpic, enhancers = [], epicMiddleware, preMiddleware = [], postMiddleware = [], middleware = [], initialState, persistConfig, reduxConfig, }) => {
|
|
12
12
|
const isBrowser = scope === 'browser';
|
|
13
13
|
const isElectronMain = scope === 'ElectronMain';
|
|
14
|
+
const rootReducer = combineReducers(reducers);
|
|
15
|
+
const persistedReducer = persistConfig && isBrowser ? persistReducer(persistConfig, rootReducer) : rootReducer;
|
|
14
16
|
/**
|
|
15
17
|
* Add middleware that required for this app.
|
|
16
18
|
*/
|
|
17
|
-
|
|
18
|
-
const persistedReducer = persistConfig && isBrowser ? persistReducer(persistConfig, rootReducer) : rootReducer;
|
|
19
|
+
// Add redux logger during development only
|
|
19
20
|
const middlewares = [
|
|
20
21
|
...preMiddleware,
|
|
21
22
|
...(epicMiddleware ? [epicMiddleware] : []),
|
|
@@ -25,17 +26,7 @@ const createReduxStore = ({ scope, isDebug, isDev, reducers, rootEpic, enhancers
|
|
|
25
26
|
const store = configureStore({
|
|
26
27
|
reducer: persistedReducer,
|
|
27
28
|
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
|
|
28
|
-
serializableCheck:
|
|
29
|
-
ignoredActions: [
|
|
30
|
-
FLUSH,
|
|
31
|
-
REHYDRATE,
|
|
32
|
-
PAUSE,
|
|
33
|
-
PERSIST,
|
|
34
|
-
PURGE,
|
|
35
|
-
REGISTER,
|
|
36
|
-
...(reduxConfig?.ignoredActions || []),
|
|
37
|
-
],
|
|
38
|
-
},
|
|
29
|
+
serializableCheck: false,
|
|
39
30
|
}).concat(...middlewares),
|
|
40
31
|
devTools: isDev || isDebug,
|
|
41
32
|
preloadedState: initialState,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
2
|
import { Container } from 'inversify';
|
|
3
|
-
import { ApolloClient } from '@apollo/client/index.js';
|
|
3
|
+
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/index.js';
|
|
4
4
|
export declare const createClientContainer: (req?: any, res?: any) => {
|
|
5
5
|
container: Container;
|
|
6
|
-
apolloClient: ApolloClient<
|
|
6
|
+
apolloClient: ApolloClient<NormalizedCacheObject>;
|
|
7
7
|
serviceFunc: () => any;
|
|
8
8
|
logger: import("@cdm-logger/core/lib/interface").ILogger;
|
|
9
9
|
};
|
|
@@ -30,12 +30,12 @@ const createClientContainer = (req, res) => {
|
|
|
30
30
|
httpGraphqlURL: config.GRAPHQL_URL,
|
|
31
31
|
httpLocalGraphqlURL: config.LOCAL_GRAPHQL_URL,
|
|
32
32
|
isDev: process.env.NODE_ENV === 'development',
|
|
33
|
-
isDebug:
|
|
34
|
-
isSSR:
|
|
33
|
+
isDebug: false,
|
|
34
|
+
isSSR: true,
|
|
35
35
|
scope: typeof window !== 'undefined' ? 'browser' : 'server',
|
|
36
36
|
clientState,
|
|
37
37
|
getDataIdFromObject: (result) => features.getDataIdFromObject(result),
|
|
38
|
-
initialState:
|
|
38
|
+
initialState: undefined,
|
|
39
39
|
logger,
|
|
40
40
|
});
|
|
41
41
|
if (!container.isBound(ClientTypes.InMemoryCache)) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {cleanEnv,str}from'envalid';import {getEnvironment}from'@common-stack/core';const env = getEnvironment();
|
|
2
2
|
const config = cleanEnv(env, {
|
|
3
3
|
GA_ID: str({ devDefault: 'G-xxxxxxx' }),
|
|
4
|
-
GRAPHQL_URL: str({
|
|
5
|
-
LOCAL_GRAPHQL_URL: str({ default:
|
|
4
|
+
GRAPHQL_URL: str({ default: env?.GRAPHQL_URL }),
|
|
5
|
+
LOCAL_GRAPHQL_URL: str({ default: env?.GRAPHQL_URL }),
|
|
6
6
|
GRAPHQL_SUBSCRIPTION_URL: str({ default: env?.GRAPHQL_URL?.replace(/^http/, 'ws') }),
|
|
7
7
|
LOG_LEVEL: str({ devDefault: 'debug' }),
|
|
8
8
|
});export{config};
|
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { EpicMiddleware } from 'redux-observable';
|
|
3
|
+
import { PersistConfig } from 'redux-persist';
|
|
4
|
+
import modules from '../modules';
|
|
2
5
|
import history from './router-history';
|
|
6
|
+
import { logger } from '../utils';
|
|
3
7
|
export { history };
|
|
4
|
-
|
|
8
|
+
interface Dependencies {
|
|
5
9
|
apolloClient: any;
|
|
6
|
-
routes:
|
|
10
|
+
routes: ReturnType<typeof modules.getConfiguredRoutes>;
|
|
7
11
|
services: any;
|
|
8
12
|
container: any;
|
|
9
|
-
logger:
|
|
10
|
-
config
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export declare const
|
|
15
|
-
|
|
16
|
-
storage: import("@react-native-async-storage/async-storage").AsyncStorageStatic;
|
|
17
|
-
stateReconciler: typeof autoMergeLevel2;
|
|
18
|
-
transforms: any[];
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Add any reducers required for this app dirctly in to
|
|
22
|
-
* `combineReducers`
|
|
23
|
-
*/
|
|
24
|
-
export declare const createReduxStore: (history: any, apolloClient: any, services: any, container: any) => {
|
|
25
|
-
store: import("@reduxjs/toolkit").Store<any, import("@reduxjs/toolkit").UnknownAction, unknown>;
|
|
13
|
+
logger: typeof logger;
|
|
14
|
+
config?: any;
|
|
15
|
+
}
|
|
16
|
+
export declare const epicMiddlewareFunc: (apolloClient: any, services: any, container: any) => EpicMiddleware<any, any, any, Dependencies>;
|
|
17
|
+
export declare const persistConfig: PersistConfig<any>;
|
|
18
|
+
export declare const createReduxStore: (apolloClient: any, services: any, container: any) => {
|
|
19
|
+
store: any;
|
|
26
20
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import storage from'@react-native-async-storage/async-storage';import autoMergeLevel2 from'redux-persist/lib/stateReconciler/autoMergeLevel2';import {createEpicMiddleware}from'redux-observable';import {REDUX_PERSIST_KEY}from'@common-stack/client-core';import {createReduxStore as createReduxStore$1}from'./base-redux-config.js';import features from'../modules.js';import {rootEpic}from'./epic-config.js';export{default as history}from'./router-history.js';import {logger}from'../utils/index.js';const epicMiddlewareFunc = (apolloClient, services, container) => createEpicMiddleware({
|
|
1
|
+
import'reflect-metadata';import storage from'@react-native-async-storage/async-storage';import autoMergeLevel2 from'redux-persist/lib/stateReconciler/autoMergeLevel2';import {createEpicMiddleware}from'redux-observable';import {REDUX_PERSIST_KEY,ClientTypes}from'@common-stack/client-core';import {createReduxStore as createReduxStore$1}from'./base-redux-config.js';import features from'../modules.js';import {rootEpic}from'./epic-config.js';export{default as history}from'./router-history.js';import {logger}from'../utils/index.js';const epicMiddlewareFunc = (apolloClient, services, container) => createEpicMiddleware({
|
|
2
2
|
dependencies: {
|
|
3
3
|
apolloClient,
|
|
4
4
|
routes: features.getConfiguredRoutes(),
|
|
@@ -6,6 +6,7 @@ import storage from'@react-native-async-storage/async-storage';import autoMergeL
|
|
|
6
6
|
container,
|
|
7
7
|
logger,
|
|
8
8
|
config: {
|
|
9
|
+
loadRoot: true,
|
|
9
10
|
isMobile: true,
|
|
10
11
|
},
|
|
11
12
|
},
|
|
@@ -16,34 +17,36 @@ const persistConfig = {
|
|
|
16
17
|
stateReconciler: autoMergeLevel2,
|
|
17
18
|
transforms: features.reduxPersistStateTransformers,
|
|
18
19
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
scope: 'browser',
|
|
27
|
-
isDebug: __DEBUGGING__,
|
|
20
|
+
const createReduxStore = (apolloClient, services, container) => {
|
|
21
|
+
let store;
|
|
22
|
+
let initialState = {};
|
|
23
|
+
let middlewares = [];
|
|
24
|
+
store = createReduxStore$1({
|
|
25
|
+
scope: typeof window !== 'undefined' ? 'browser' : 'server',
|
|
26
|
+
isDebug: true,
|
|
28
27
|
isDev: process.env.NODE_ENV === 'development',
|
|
29
|
-
initialState
|
|
28
|
+
initialState,
|
|
30
29
|
persistConfig,
|
|
31
|
-
middleware:
|
|
30
|
+
middleware: middlewares,
|
|
32
31
|
epicMiddleware: epicMiddlewareFunc(apolloClient, services, container),
|
|
33
32
|
rootEpic: rootEpic,
|
|
34
33
|
reducers: { ...features.reducers },
|
|
34
|
+
reduxConfig: features.getReduxConfig(),
|
|
35
35
|
});
|
|
36
|
-
|
|
36
|
+
logger.debug('Created new Redux store');
|
|
37
|
+
if (container.isBound(ClientTypes.ReduxStore)) {
|
|
37
38
|
container
|
|
38
|
-
.rebind(
|
|
39
|
+
.rebind(ClientTypes.ReduxStore)
|
|
39
40
|
.toDynamicValue(() => store)
|
|
40
41
|
.inRequestScope();
|
|
42
|
+
logger.debug('Rebound ReduxStore in container');
|
|
41
43
|
}
|
|
42
44
|
else {
|
|
43
45
|
container
|
|
44
|
-
.bind(
|
|
46
|
+
.bind(ClientTypes.ReduxStore)
|
|
45
47
|
.toDynamicValue(() => store)
|
|
46
48
|
.inRequestScope();
|
|
49
|
+
logger.debug('Bound ReduxStore in container');
|
|
47
50
|
}
|
|
48
51
|
return { store };
|
|
49
52
|
};export{createReduxStore,epicMiddlewareFunc,persistConfig};
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{createClientContainer}from'./config/client.service.js';export{createReduxStore,epicMiddlewareFunc,persistConfig}from'./config/redux-config.js';export{UtilityClass,logger}from'./utils/index.js';export{default as history}from'./config/router-history.js';
|
|
1
|
+
export{createClientContainer}from'./config/client.service.js';export{createReduxStore,epicMiddlewareFunc,persistConfig}from'./config/redux-config.js';export{UtilityClass,logger}from'./utils/index.js';export{loadContext}from'./load-context.mobile.js';export{default as history}from'./config/router-history.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
export declare const loadContext: () => {
|
|
3
|
+
modules: import("packages/common-client-react/lib").Feature;
|
|
4
|
+
store: any;
|
|
5
|
+
container: import("inversify").Container;
|
|
6
|
+
apolloClient: import("@apollo/client").ApolloClient<import("@apollo/client").NormalizedCacheObject>;
|
|
7
|
+
persistor: import("redux-persist").Persistor;
|
|
8
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import'reflect-metadata';import {persistStore}from'redux-persist';import features from'./modules.js';import {createReduxStore}from'./config/redux-config.js';import {createClientContainer}from'./config/client.service.js';/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
3
|
+
const loadContext = () => {
|
|
4
|
+
const { apolloClient: client, container, serviceFunc } = createClientContainer();
|
|
5
|
+
const { store } = createReduxStore(client, serviceFunc(), container);
|
|
6
|
+
const persistor = persistStore(store);
|
|
7
|
+
return {
|
|
8
|
+
modules: features,
|
|
9
|
+
store,
|
|
10
|
+
container,
|
|
11
|
+
apolloClient: client,
|
|
12
|
+
persistor,
|
|
13
|
+
};
|
|
14
|
+
};export{loadContext};
|
package/lib/modules.d.ts
CHANGED
package/lib/modules.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import {Feature}from'@common-stack/client-react';// This is a sample `module.ts` that will be replaced during run time.
|
|
2
|
-
const features = new Feature({});
|
|
3
|
-
features.getComponentFillPlugins();export{features as default};
|
|
2
|
+
const features = new Feature({});export{features as default};
|
package/lib/utils/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {ClientLogger}from'@cdm-logger/client';export{default}from'../modules.js';import {navigate}from'./navigator.js';/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
/* eslint-disable import/no-cycle */
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
4
|
-
Object.assign(global, require('../../build.config'));
|
|
5
4
|
class UtilityClass {
|
|
6
5
|
modules;
|
|
7
6
|
// tslint:disable-next-line:no-shadowed-variable
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@common-stack/mobile-stack-react",
|
|
3
|
-
"version": "6.0.6-alpha.
|
|
3
|
+
"version": "6.0.6-alpha.79",
|
|
4
4
|
"description": "Client Module for mobile app",
|
|
5
5
|
"homepage": "https://github.com/cdmbase/fullstack-pro#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@apollo/client": "^3.9.0",
|
|
33
33
|
"@cdm-logger/client": "^9.0.3",
|
|
34
|
-
"@common-stack/client-core": "6.0.6-alpha.
|
|
35
|
-
"@common-stack/client-react": "6.0.6-alpha.
|
|
36
|
-
"@common-stack/components-pro": "6.0.6-alpha.
|
|
37
|
-
"@common-stack/core": "6.0.6-alpha.
|
|
38
|
-
"@expo/vector-icons": "
|
|
39
|
-
"@react-native-async-storage/async-storage": "1.
|
|
40
|
-
"@react-native-community/datetimepicker": "
|
|
34
|
+
"@common-stack/client-core": "6.0.6-alpha.73",
|
|
35
|
+
"@common-stack/client-react": "6.0.6-alpha.73",
|
|
36
|
+
"@common-stack/components-pro": "6.0.6-alpha.50",
|
|
37
|
+
"@common-stack/core": "6.0.6-alpha.50",
|
|
38
|
+
"@expo/vector-icons": "^14.0.3",
|
|
39
|
+
"@react-native-async-storage/async-storage": "1.23.1",
|
|
40
|
+
"@react-native-community/datetimepicker": "8.0.1",
|
|
41
41
|
"@react-native-community/masked-view": "~0.1.10",
|
|
42
42
|
"@react-native-community/segmented-control": "~2.2.2",
|
|
43
43
|
"@react-navigation/bottom-tabs": "~6.5.9",
|
|
@@ -52,25 +52,26 @@
|
|
|
52
52
|
"big-integer": "^1.6.51",
|
|
53
53
|
"cross-fetch": "^4.0.0",
|
|
54
54
|
"envalid": "~7.2.2",
|
|
55
|
-
"expo": "~
|
|
56
|
-
"expo-apple-authentication": "~6.
|
|
57
|
-
"expo-asset": "~
|
|
58
|
-
"expo-auth-session": "~5.
|
|
59
|
-
"expo-build-properties": "~0.
|
|
60
|
-
"expo-constants": "~
|
|
61
|
-
"expo-dev-client": "~
|
|
62
|
-
"expo-device": "~
|
|
63
|
-
"expo-file-system": "~
|
|
64
|
-
"expo-image-picker": "~
|
|
65
|
-
"expo-linking": "~
|
|
66
|
-
"expo-localization": "~
|
|
67
|
-
"expo-notifications": "~0.
|
|
68
|
-
"expo-random": "~
|
|
69
|
-
"expo-secure-store": "~
|
|
70
|
-
"expo-splash-screen": "~0.
|
|
71
|
-
"expo-status-bar": "~1.
|
|
72
|
-
"expo-updates": "~0.
|
|
73
|
-
"expo-web-browser": "~
|
|
55
|
+
"expo": "~51.0.38",
|
|
56
|
+
"expo-apple-authentication": "~6.4.2",
|
|
57
|
+
"expo-asset": "~10.0.10",
|
|
58
|
+
"expo-auth-session": "~5.5.2",
|
|
59
|
+
"expo-build-properties": "~0.12.5",
|
|
60
|
+
"expo-constants": "~16.0.2",
|
|
61
|
+
"expo-dev-client": "~4.0.28",
|
|
62
|
+
"expo-device": "~6.0.2",
|
|
63
|
+
"expo-file-system": "~17.0.1",
|
|
64
|
+
"expo-image-picker": "~15.0.7",
|
|
65
|
+
"expo-linking": "~6.3.1",
|
|
66
|
+
"expo-localization": "~15.0.3",
|
|
67
|
+
"expo-notifications": "~0.28.19",
|
|
68
|
+
"expo-random": "~14.0.1",
|
|
69
|
+
"expo-secure-store": "~13.0.2",
|
|
70
|
+
"expo-splash-screen": "~0.27.6",
|
|
71
|
+
"expo-status-bar": "~1.12.1",
|
|
72
|
+
"expo-updates": "~0.25.27",
|
|
73
|
+
"expo-web-browser": "~13.0.3",
|
|
74
|
+
"graphql": "^16.0.0",
|
|
74
75
|
"graphql-ws": "^5.11.2",
|
|
75
76
|
"history": "^4.10.1",
|
|
76
77
|
"immutability-helper": "^3.0.1",
|
|
@@ -85,28 +86,27 @@
|
|
|
85
86
|
"react": "18.2.0",
|
|
86
87
|
"react-dom": "18.2.0",
|
|
87
88
|
"react-helmet": "^6.1.0",
|
|
88
|
-
"react-native": "0.
|
|
89
|
+
"react-native": "0.74.5",
|
|
89
90
|
"react-native-confirmation-code-field": "7.3.1",
|
|
90
91
|
"react-native-dotenv": "^3.3.1",
|
|
91
|
-
"react-native-gesture-handler": "~2.
|
|
92
|
-
"react-native-get-random-values": "~1.
|
|
92
|
+
"react-native-gesture-handler": "~2.16.1",
|
|
93
|
+
"react-native-get-random-values": "~1.11.0",
|
|
93
94
|
"react-native-keyboard-aware-scroll-view": "^0.9.3",
|
|
94
95
|
"react-native-keyboard-spacer": "^0.4.1",
|
|
95
|
-
"react-native-maps": "1.
|
|
96
|
+
"react-native-maps": "1.14.0",
|
|
96
97
|
"react-native-mime-types": "^2.3.0",
|
|
97
98
|
"react-native-modal": "^11.6.1",
|
|
98
|
-
"react-native-pager-view": "6.
|
|
99
|
-
"react-native-reanimated": "~3.
|
|
100
|
-
"react-native-safe-area-context": "4.
|
|
101
|
-
"react-native-screens": "
|
|
102
|
-
"react-native-svg": "
|
|
99
|
+
"react-native-pager-view": "6.3.0",
|
|
100
|
+
"react-native-reanimated": "~3.10.1",
|
|
101
|
+
"react-native-safe-area-context": "4.10.5",
|
|
102
|
+
"react-native-screens": "3.31.1",
|
|
103
|
+
"react-native-svg": "15.2.0",
|
|
103
104
|
"react-native-tab-view": "^3.5.2",
|
|
104
105
|
"react-native-tags": "2.2.1",
|
|
105
106
|
"react-native-url-polyfill": "^2.0.0",
|
|
106
107
|
"react-native-web": "~0.19.6",
|
|
107
108
|
"react-native-web-maps": "~0.3.0",
|
|
108
109
|
"react-redux": "^9.1.1",
|
|
109
|
-
"redux": "^4.0.5",
|
|
110
110
|
"redux-logger": "^3.0.6",
|
|
111
111
|
"redux-observable": "^1.2.0",
|
|
112
112
|
"redux-persist": "^6.0.0",
|
|
@@ -116,14 +116,16 @@
|
|
|
116
116
|
"rxjs": "^6.5.3",
|
|
117
117
|
"rxjs-compat": "^6.5.3",
|
|
118
118
|
"rxjs-hooks": "^0.5.2",
|
|
119
|
-
"sentry-expo": "~7.
|
|
119
|
+
"sentry-expo": "~7.0.0",
|
|
120
120
|
"subscriptions-transport-ws": "0.9.18",
|
|
121
|
-
"text-encoding-polyfill": "^0.6.7"
|
|
121
|
+
"text-encoding-polyfill": "^0.6.7",
|
|
122
|
+
"ts-invariant": "^0.10.3"
|
|
122
123
|
},
|
|
123
124
|
"peerDependencies": {
|
|
124
125
|
"@apollo/client": ">=3.0.0",
|
|
125
126
|
"react": ">=18",
|
|
126
|
-
"react-dom": ">=18"
|
|
127
|
+
"react-dom": ">=18",
|
|
128
|
+
"redux": ">=5.0.1"
|
|
127
129
|
},
|
|
128
130
|
"publishConfig": {
|
|
129
131
|
"access": "public"
|
|
@@ -131,5 +133,5 @@
|
|
|
131
133
|
"typescript": {
|
|
132
134
|
"definition": "lib/index.d.ts"
|
|
133
135
|
},
|
|
134
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "a82d5a31306df13fa8c0b747ab7c0714c0b16ac5"
|
|
135
137
|
}
|