@wavemaker/rn-codegen 11.7.0-patch.3 → 11.7.0-patch.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/rn-codegen",
3
- "version": "11.7.0-patch.3",
3
+ "version": "11.7.0-patch.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -70,12 +70,12 @@ class App extends BaseApp {
70
70
 
71
71
  getServiceDefinitions() {
72
72
  {{#if profile.useLocalMetadata}}
73
- return import('./metadata/app/service-definitions.json').then(mod => mod.default)
73
+ return Promise.resolve(require('./metadata/app/service-definitions.json'))
74
74
  {{else}}
75
75
  return axios.get(this.baseUrl + '/services/servicedefs')
76
76
  .then((response) => response?.data || {})
77
- .catch(() => ({}))
78
- {{/if}}
77
+ .catch(() => ({}))
78
+ {{/if}}
79
79
  .then(data => {
80
80
  this.serviceDefinitions = data?.serviceDefs || {};
81
81
  Object.keys(this.serviceDefinitions).forEach((key) => {
@@ -94,13 +94,13 @@ class App extends BaseApp {
94
94
 
95
95
  loadWmProperties() {
96
96
  {{#if profile.useLocalMetadata}}
97
- return import('./src/wmProperties').then(mod => mod.default)
97
+ return Promise.resolve(require('./src/wmProperties').default)
98
98
  {{else}}
99
- return axios.get(this.baseUrl + '/services/application/wmProperties.js')
100
- .then((response) => {
101
- const data = response.data;
102
- return JSON.parse(data.substring(data.indexOf('{'), data.length - 1));
103
- })
99
+ return axios.get(this.baseUrl + '/services/application/wmProperties.js')
100
+ .then((response) => {
101
+ const data = response.data;
102
+ return JSON.parse(data.substring(data.indexOf('{'), data.length - 1));
103
+ })
104
104
  {{/if}}
105
105
  .then(appProperties => {
106
106
  this.appConfig.appProperties = appProperties;
@@ -265,36 +265,39 @@ class App extends BaseApp {
265
265
  {{/if}}
266
266
 
267
267
  componentDidMount() {
268
+ console.log(moment().format('HH:mm:ss:SSS') + ': Component Did Mount');
268
269
  {{#if animatedSplash}}
269
270
  SplashScreen.hideAsync().then(() => {});{{/if}}
270
271
  this.appConfig.getServiceDefinitions = this.getServiceDefinitions.bind(this);
271
- NetworkService.start(this.appConfig)
272
- {{#if profile.useLocalMetadata}}
273
- {{else}}
274
- .then(() => {
275
- NetworkService.connect(true);
276
- })
277
- {{/if}}
278
- .then(() => {console.log('NetworkService started')})
279
- .then(() => this.loadWmProperties())
280
- .then(() => {console.log('WmProperties loaded')})
281
- {{#if sslPinning}}
282
- .then(() => this.initSSLPininng())
283
- .then((flag) => {flag && console.log('SSL Pinning loaded')})
284
- {{/if}}
285
- .then(() => this.loadTheme())
286
- .then(() => {console.log('Theme loaded')})
287
- .then(() => AppI18nService.init())
288
- .then(() => this.changeLocale())
289
- .then(() => {console.log('Locale files loaded')})
290
- .then(() => this.getSecurityInfo())
291
- .then(() => {console.log('Security info loaded')})
292
- .then(() => this.loadFonts())
293
- .then(() => {console.log('Font files loaded')})
294
- .then(() => initializeDeviceOperations())
295
- .then(() => {console.log('Loaded device operations loaded')})
296
- .then(() => this.bootstrap())
297
- .then(() => {console.log('Bootstrap Complete')})
272
+ Promise.all([
273
+ NetworkService.start(this.appConfig)
274
+ {{#if profile.useLocalMetadata}}
275
+ {{else}}
276
+ .then(() => {
277
+ NetworkService.connect(true);
278
+ })
279
+ {{/if}}
280
+ .then(() => {console.log(moment().format('HH:mm:ss:SSS') + ': NetworkService started')}),
281
+ this.getSecurityInfo()
282
+ .then(() => {console.log(moment().format('HH:mm:ss:SSS') + ': Security info loaded')}),
283
+ this.loadWmProperties()
284
+ .then(() => {console.log(moment().format('HH:mm:ss:SSS') + ': WmProperties loaded')})
285
+ {{#if sslPinning}}
286
+ .then(() => this.initSSLPininng())
287
+ .then((flag) => {flag && console.log('SSL Pinning loaded')})
288
+ {{/if}}
289
+ .then(() => this.loadTheme())
290
+ .then(() => {console.log(moment().format('HH:mm:ss:SSS') + ': Theme loaded')})
291
+ .then(() => AppI18nService.init())
292
+ .then(() => this.changeLocale())
293
+ .then(() => {console.log(moment().format('HH:mm:ss:SSS') + ': Locale files loaded')})
294
+ .then(() => this.loadFonts())
295
+ .then(() => {console.log(moment().format('HH:mm:ss:SSS') + ': Font files loaded')})
296
+ .then(() => initializeDeviceOperations())
297
+ .then(() => {console.log(moment().format('HH:mm:ss:SSS') + ': Loaded device operations loaded')})
298
+ .then(() => this.bootstrap())
299
+ .then(() => {console.log(moment().format('HH:mm:ss:SSS') + ': Bootstrap Complete')})
300
+ ])
298
301
  .then(() => super.componentDidMount())
299
302
  .catch(error => {
300
303
  console.error(error);
@@ -373,6 +376,9 @@ export default (props) => {
373
376
  setVisible(true);
374
377
  }, 100);
375
378
  }, [visible]);
379
+ useCallback(() => {
380
+ console.log(moment().format('HH:mm:ss:SSS') + ': First App Render');
381
+ }, []);
376
382
  return visible ? (
377
383
  <>
378
384
  {{#if animatedSplash}}
@@ -89,8 +89,7 @@ export default class {{name}}{{typeLabel}} extends Base{{typeLabel}} {
89
89
  componentDidMount() {
90
90
  {{#ifEquals lType 'prefab' this}}
91
91
  {{#if profile.useLocalMetadata}}
92
- import('../../../service-definitions.json')
93
- .then(mod => mod.default?.serviceDefs)
92
+ Promise.resolve(require('../../../service-definitions.json').serviceDefs)
94
93
  {{else}}
95
94
  this.getServiceDefinitions()
96
95
  {{/if}}
@@ -10,9 +10,9 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@unimodules/react-native-adapter": "6.3.9",
13
- "@wavemaker/app-rn-runtime": "11.7.0-patch.3",
14
- "@wavemaker/variables": "11.7.0-patch.3",
15
- "@wavemaker/rn-codegen": "11.7.0-patch.3",
13
+ "@wavemaker/app-rn-runtime": "11.7.0-patch.5",
14
+ "@wavemaker/variables": "11.7.0-patch.5",
15
+ "@wavemaker/rn-codegen": "11.7.0-patch.5",
16
16
  "axios": "^1.4.0",
17
17
  "css-mediaquery": "^0.1.2",
18
18
  "deprecated-react-native-prop-types": "~4.1.0",
@@ -10,9 +10,9 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@unimodules/react-native-adapter": "6.3.9",
13
- "@wavemaker/app-rn-runtime": "11.7.0-patch.3",
14
- "@wavemaker/variables": "11.7.0-patch.3",
15
- "@wavemaker/rn-codegen": "11.7.0-patch.3",
13
+ "@wavemaker/app-rn-runtime": "11.7.0-patch.5",
14
+ "@wavemaker/variables": "11.7.0-patch.5",
15
+ "@wavemaker/rn-codegen": "11.7.0-patch.5",
16
16
  "axios": "^1.4.0",
17
17
  "css-mediaquery": "^0.1.2",
18
18
  "deprecated-react-native-prop-types": "~4.1.0",