@wavemaker/rn-codegen 11.16.1-rc.270 → 11.16.2-rc.271

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.
Files changed (76) hide show
  1. package/npm-shrinkwrap.json +289 -273
  2. package/package-lock.json +289 -273
  3. package/package.json +3 -3
  4. package/scripts/check-deps-compat.js +554 -0
  5. package/src/app.generator.js +109 -70
  6. package/src/app.generator.js.map +1 -1
  7. package/src/pipeline/build-pipeline.js +19 -2
  8. package/src/pipeline/build-pipeline.js.map +1 -1
  9. package/src/pipeline/generation-store.js +43 -22
  10. package/src/pipeline/generation-store.js.map +1 -1
  11. package/src/pipeline/shared-node-modules.js +172 -13
  12. package/src/pipeline/shared-node-modules.js.map +1 -1
  13. package/src/templates/app.template +20 -0
  14. package/src/templates/bootstrap.template +2 -1
  15. package/src/templates/foundation-theme/build/android/wavemaker/components/input/epoch/date.less +8 -1
  16. package/src/templates/foundation-theme/build/android/wavemaker/components/input/epoch/datetime.less +8 -1
  17. package/src/templates/foundation-theme/build/android/wavemaker/components/input/epoch/time.less +8 -1
  18. package/src/templates/foundation-theme/build/android/wavemaker/components/input/number.less +14 -0
  19. package/src/templates/foundation-theme/build/android/wavemaker/design-tokens/basic/button.less +2 -2
  20. package/src/templates/foundation-theme/build/android/wavemaker/design-tokens/input/checkboxset.less +1 -0
  21. package/src/templates/foundation-theme/build/android/wavemaker/design-tokens/input/chips.less +12 -0
  22. package/src/templates/foundation-theme/build/android/wavemaker/design-tokens/input/radioset.less +1 -1
  23. package/src/templates/foundation-theme/build/android/wavemaker/design-tokens/studio/input/currency.less +6 -2
  24. package/src/templates/foundation-theme/build/android/wavemaker/design-tokens/tokens.light.css +3 -2
  25. package/src/templates/foundation-theme/build/android/wavemaker/design-tokens/variables/button.variant.less +2 -2
  26. package/src/templates/foundation-theme/build/ios/wavemaker/components/input/epoch/date.less +8 -1
  27. package/src/templates/foundation-theme/build/ios/wavemaker/components/input/epoch/datetime.less +8 -1
  28. package/src/templates/foundation-theme/build/ios/wavemaker/components/input/epoch/time.less +8 -1
  29. package/src/templates/foundation-theme/build/ios/wavemaker/components/input/number.less +14 -0
  30. package/src/templates/foundation-theme/build/ios/wavemaker/design-tokens/basic/button.less +2 -2
  31. package/src/templates/foundation-theme/build/ios/wavemaker/design-tokens/input/checkboxset.less +1 -0
  32. package/src/templates/foundation-theme/build/ios/wavemaker/design-tokens/input/chips.less +12 -0
  33. package/src/templates/foundation-theme/build/ios/wavemaker/design-tokens/input/radioset.less +1 -1
  34. package/src/templates/foundation-theme/build/ios/wavemaker/design-tokens/studio/input/currency.less +6 -2
  35. package/src/templates/foundation-theme/build/ios/wavemaker/design-tokens/tokens.light.css +3 -2
  36. package/src/templates/foundation-theme/build/ios/wavemaker/design-tokens/variables/button.variant.less +2 -2
  37. package/src/templates/foundation-theme/dist/android/style.css +5 -4
  38. package/src/templates/foundation-theme/dist/android/style.js +22 -9
  39. package/src/templates/foundation-theme/dist/android/tokens.js +3 -2
  40. package/src/templates/foundation-theme/dist/ios/style.css +5 -4
  41. package/src/templates/foundation-theme/dist/ios/style.js +22 -9
  42. package/src/templates/foundation-theme/dist/ios/tokens.js +3 -2
  43. package/src/templates/foundation-theme/wavemaker/components/input/epoch/date.less +8 -1
  44. package/src/templates/foundation-theme/wavemaker/components/input/epoch/datetime.less +8 -1
  45. package/src/templates/foundation-theme/wavemaker/components/input/epoch/time.less +8 -1
  46. package/src/templates/foundation-theme/wavemaker/components/input/number.less +14 -0
  47. package/src/templates/foundation-theme/wavemaker/design-tokens/basic/button.less +2 -2
  48. package/src/templates/foundation-theme/wavemaker/design-tokens/input/checkboxset.less +1 -0
  49. package/src/templates/foundation-theme/wavemaker/design-tokens/input/chips.less +12 -0
  50. package/src/templates/foundation-theme/wavemaker/design-tokens/input/radioset.less +1 -1
  51. package/src/templates/foundation-theme/wavemaker/design-tokens/studio/input/currency.less +6 -2
  52. package/src/templates/foundation-theme/wavemaker/design-tokens/tokens.light.css +3 -2
  53. package/src/templates/foundation-theme/wavemaker/design-tokens/variables/button.variant.less +2 -2
  54. package/src/templates/package.web.json +10 -5
  55. package/src/templates/project/metro/metro.script.js +19 -2
  56. package/src/templates/project/metro/vendor-cache.js +1 -1
  57. package/src/templates/project/metro/wm-boundary.js +40 -28
  58. package/src/templates/project/metro/wm-crawl-override.js +16 -2
  59. package/src/templates/project/metro/wm-prebuilt.js +31 -0
  60. package/src/templates/project/package-lock.json +13214 -0
  61. package/src/templates/project/package.json +10 -5
  62. package/src/templates/project/wavepulse/rn2css.json +5 -0
  63. package/src/theme/components/input/epoch/datetime.styledef.js +5 -0
  64. package/src/theme/components/input/epoch/datetime.styledef.js.map +1 -1
  65. package/src/theme/components/input/number.styledef.js +10 -0
  66. package/src/theme/components/input/number.styledef.js.map +1 -1
  67. package/src/transpile/bind.ex.transformer.js +109 -5
  68. package/src/transpile/bind.ex.transformer.js.map +1 -1
  69. package/src/transpile/components/data/form/form-field.transformer.js +25 -1
  70. package/src/transpile/components/data/form/form-field.transformer.js.map +1 -1
  71. package/test/pipeline/build-leftovers.test.js +172 -0
  72. package/test/pipeline/build-leftovers.test.js.map +1 -0
  73. package/test/pipeline/chmod-tree.test.js +54 -0
  74. package/test/pipeline/chmod-tree.test.js.map +1 -0
  75. package/test/pipeline/crawl-override.test.js +53 -0
  76. package/test/pipeline/crawl-override.test.js.map +1 -0
@@ -277,7 +277,7 @@ export default {
277
277
  "rippleColor": "var(--wm-btn-ripple-color)",
278
278
  "boxShadow": "var(--wm-btn-shadow)",
279
279
  "minWidth": "var(--wm-btn-min-width)",
280
- "minHeight": "var(--wm-btn-height)",
280
+ "minHeight": "var(--wm-btn-min-height)",
281
281
  "padding": "var(--wm-btn-padding)",
282
282
  "cursor": "var(--wm-btn-cursor)",
283
283
  "color": "var(--wm-btn-color)",
@@ -301,7 +301,7 @@ export default {
301
301
  "justifyContent": "center",
302
302
  "cursor": "pointer",
303
303
  "gap": "var(--wm-btn-gap)",
304
- "minHeight": "var(--wm-btn-height)"
304
+ "minHeight": "var(--wm-btn-min-height)"
305
305
  },
306
306
  "icon": {
307
307
  "padding": "var(--wm-btn-icon-padding)",
@@ -726,7 +726,7 @@ export default {
726
726
  "--wm-btn-color": "var(--wm-color-error)"
727
727
  },
728
728
  "btn-icon": {
729
- "--wm-btn-height": 40,
729
+ "--wm-btn-min-height": 40,
730
730
  "--wm-btn-min-width": 40,
731
731
  "--wm-btn-padding": "var(--wm-space-0)",
732
732
  "--wm-btn-icon-size": "var(--wm-icon-size-md)"
@@ -735,7 +735,7 @@ export default {
735
735
  "--wm-btn-shadow": "var(--wm-elevation-shadow-1)"
736
736
  },
737
737
  "btn-fab": {
738
- "--wm-btn-height": 56,
738
+ "--wm-btn-min-height": 56,
739
739
  "--wm-btn-min-width": 56,
740
740
  "--wm-btn-border-radius": 16,
741
741
  "--wm-btn-shadow": "var(--wm-elevation-shadow-1)"
@@ -4317,7 +4317,8 @@ export default {
4317
4317
  "marginRight": "var(--wm-checkboxset-item-margin-right)",
4318
4318
  "marginLeft": "var(--wm-checkboxset-item-margin-left)",
4319
4319
  "marginTop": "var(--wm-checkboxset-item-margin-top)",
4320
- "marginBottom": "var(--wm-checkboxset-item-margin-bottom)"
4320
+ "marginBottom": "var(--wm-checkboxset-item-margin-bottom)",
4321
+ "gap": "var(--wm-checkboxset-gap)"
4321
4322
  }
4322
4323
  },
4323
4324
  "app-checkboxset-disabled": {
@@ -4338,7 +4339,19 @@ export default {
4338
4339
  "--wm-chips-color": "var(--wm-color-on-surface-variant)",
4339
4340
  "--wm-chips-background-color": "var(--wm-color-secondary-container)",
4340
4341
  "--wm-chips-item-border-color": "var(--wm-color-secondary-container)",
4341
- "borderWidth": "var(--wm-chips-border-width)"
4342
+ "gap": "var(--wm-chips-item-gap)",
4343
+ "minHeight": "var(--wm-chips-item-height)",
4344
+ "height": "var(--wm-chips-item-height)",
4345
+ "padding": "var(--wm-chips-item-padding)",
4346
+ "borderRadius": "var(--wm-chips-item-border-radius)",
4347
+ "borderStyle": "var(--wm-chips-item-border-style)",
4348
+ "borderWidth": "var(--wm-chips-border-width)",
4349
+ "fontFamily": "var(--wm-chips-item-font-family)",
4350
+ "fontWeight": "var(--wm-chips-item-font-weight)",
4351
+ "fontSize": "var(--wm-chips-item-font-size)",
4352
+ "lineHeight": "var(--wm-chips-item-line-height)",
4353
+ "letterSpacing": "var(--wm-chips-item-letter-spacing)",
4354
+ "boxShadow": "var(--wm-chips-shadow)"
4342
4355
  },
4343
4356
  "activeChipLabel": {
4344
4357
  "color": "var(--wm-chips-color)",
@@ -4572,7 +4585,8 @@ export default {
4572
4585
  "flexDirection": "row",
4573
4586
  "alignContent": "center",
4574
4587
  "marginRight": "var(--wm-radiobutton-set-item-column-gap)",
4575
- "marginTop": "var(--wm-radiobutton-set-item-row-gap)"
4588
+ "marginTop": "var(--wm-radiobutton-set-item-row-gap)",
4589
+ "gap": "var(--wm-radiobutton-gap)"
4576
4590
  },
4577
4591
  "radioLabel": {
4578
4592
  "alignSelf": "center",
@@ -4581,8 +4595,7 @@ export default {
4581
4595
  "fontWeight": "var(--wm-radiobutton-label-font-weight)",
4582
4596
  "lineHeight": "var(--wm-radiobutton-label-line-height)",
4583
4597
  "letterSpacing": "var(--wm-radiobutton-label-letter-spacing)",
4584
- "color": "var(--wm-radiobutton-label-color)",
4585
- "marginLeft": "var(--wm-radiobutton-gap)"
4598
+ "color": "var(--wm-radiobutton-label-color)"
4586
4599
  },
4587
4600
  "uncheckedRadio": {
4588
4601
  "root": {
@@ -46,7 +46,6 @@ export default {
46
46
  "--wm-btn-border-width": 1,
47
47
  "--wm-btn-border-style": "solid",
48
48
  "--wm-btn-min-width": "auto",
49
- "--wm-btn-height": 40,
50
49
  "--wm-btn-shadow": "none",
51
50
  "--wm-btn-ripple-color": "rgba(255, 255, 255, 0.08)",
52
51
  "--wm-btn-skeleton-width": 96,
@@ -552,7 +551,8 @@ export default {
552
551
  "--wm-btn-letter-spacing": "var(--wm-label-large-letter-spacing)",
553
552
  "--wm-btn-border-color": "var(--wm-color-surface-container-highest)",
554
553
  "--wm-btn-radius": "var(--wm-radius-sm)",
555
- "--wm-btn-padding": "var(--wm-space-0) var(--wm-space-6)",
554
+ "--wm-btn-padding": "var(--wm-space-3) var(--wm-space-6)",
555
+ "--wm-btn-min-height": "var(--wm-space-10)",
556
556
  "--wm-btn-gap": "var(--wm-space-2)",
557
557
  "--wm-btn-icon-size": "var(--wm-icon-size-md)",
558
558
  "--wm-btn-icon-color": "var(--wm-color-on-surface)",
@@ -612,6 +612,7 @@ export default {
612
612
  "--wm-checkbox-icon-size": "var(--wm-icon-size)",
613
613
  "--wm-checkbox-border-radius": "var(--wm-radius-xxs)",
614
614
  "--wm-checkbox-border-color": "var(--wm-color-on-surface-variant)",
615
+ "--wm-checkboxset-gap": "var(--wm-space-1)",
615
616
  "--wm-checkboxset-height": "var(--wm-space-6)",
616
617
  "--wm-checkboxset-width": "var(--wm-space-6)",
617
618
  "--wm-checkboxset-label-font-size": "var(--wm-body-large-font-size)",
@@ -31,12 +31,19 @@ To style the clear icon of wm-date
31
31
 
32
32
 
33
33
  /**********************************************************************************
34
- To style the calendar icon of wm-date
34
+ To style the calendar icon of wm-date, and the trailing icon when trailingiconclass or trailingiconurl is set
35
35
  ***********************************************************************************/
36
36
  .app-date-calendar-icon {
37
37
  }
38
38
 
39
39
 
40
+ /**********************************************************************************
41
+ To style the leading icon of wm-date
42
+ ***********************************************************************************/
43
+ .app-date-leading-icon {
44
+ }
45
+
46
+
40
47
  /**********************************************************************************
41
48
  To style the floating-label in date widget.
42
49
  ***********************************************************************************/
@@ -34,12 +34,19 @@ To style the clear icon of wm-datetime
34
34
 
35
35
 
36
36
  /**********************************************************************************
37
- To style the calendar icon of wm-datetime
37
+ To style the calendar icon of wm-datetime, and the trailing icon when trailingiconclass or trailingiconurl is set
38
38
  ***********************************************************************************/
39
39
  .app-datetime-calendar-icon {
40
40
  }
41
41
 
42
42
 
43
+ /**********************************************************************************
44
+ To style the leading icon of wm-datetime
45
+ ***********************************************************************************/
46
+ .app-datetime-leading-icon {
47
+ }
48
+
49
+
43
50
  /**********************************************************************************
44
51
  To style the floating-label in date-time widget.
45
52
  ***********************************************************************************/
@@ -31,12 +31,19 @@ To style the clear icon of wm-time
31
31
 
32
32
 
33
33
  /**********************************************************************************
34
- To style the calendar icon of wm-time
34
+ To style the calendar icon of wm-time, and the trailing icon when trailingiconclass or trailingiconurl is set
35
35
  ***********************************************************************************/
36
36
  .app-time-calendar-icon {
37
37
  }
38
38
 
39
39
 
40
+ /**********************************************************************************
41
+ To style the leading icon of wm-time
42
+ ***********************************************************************************/
43
+ .app-time-leading-icon {
44
+ }
45
+
46
+
40
47
  /**********************************************************************************
41
48
  To style the floating-label in time widget.
42
49
  ***********************************************************************************/
@@ -80,6 +80,20 @@ To style the skeleton of label of number widget.
80
80
  .app-number-label-skeleton {
81
81
  }
82
82
 
83
+
84
+ /**********************************************************************************
85
+ To style the leading icon of number widget.
86
+ ***********************************************************************************/
87
+ .app-number-leading-icon {
88
+ }
89
+
90
+
91
+ /**********************************************************************************
92
+ To style the trailing icon of number widget.
93
+ ***********************************************************************************/
94
+ .app-number-trailing-icon {
95
+ }
96
+
83
97
  @import (optional) url('../../../wavemaker/design-tokens/input/number.less');
84
98
  @import (optional) url('../../../custom/components/input/number.less');
85
99
  @import (optional) url('../../../custom/os/components/input/number.less');
@@ -9,7 +9,7 @@
9
9
  flex-direction: column;
10
10
  overflow: hidden;
11
11
  min-width: var(--wm-btn-min-width);
12
- min-height: var(--wm-btn-height);
12
+ min-height: var(--wm-btn-min-height);
13
13
  padding: var(--wm-btn-padding);
14
14
  cursor: var(--wm-btn-cursor);
15
15
  color: var(--wm-btn-color);
@@ -35,7 +35,7 @@
35
35
  justify-content: center;
36
36
  cursor: pointer;
37
37
  gap: var(--wm-btn-gap);
38
- min-height: var(--wm-btn-height);
38
+ min-height: var(--wm-btn-min-height);
39
39
  }
40
40
 
41
41
 
@@ -47,6 +47,7 @@
47
47
  margin-left: var(--wm-checkboxset-item-margin-left);
48
48
  margin-top: var(--wm-checkboxset-item-margin-top);
49
49
  margin-bottom: var(--wm-checkboxset-item-margin-bottom);
50
+ gap: var(--wm-checkboxset-gap);
50
51
  }
51
52
 
52
53
  .app-checkboxset-selected-label {
@@ -63,9 +63,21 @@
63
63
  }
64
64
 
65
65
  .app-chips-active-item {
66
+ gap: var(--wm-chips-item-gap);
67
+ min-height: var(--wm-chips-item-height);
68
+ height: var(--wm-chips-item-height);
69
+ padding: var(--wm-chips-item-padding);
66
70
  background-color: var(--wm-chips-background-color);
71
+ border-radius: var(--wm-chips-item-border-radius);
72
+ border-style: var(--wm-chips-item-border-style);
67
73
  border-color: var(--wm-chips-item-border-color);
68
74
  border-width: var(--wm-chips-border-width);
75
+ font-family: var(--wm-chips-item-font-family);
76
+ font-weight: var(--wm-chips-item-font-weight);
77
+ font-size: var(--wm-chips-item-font-size);
78
+ line-height: var(--wm-chips-item-line-height);
79
+ letter-spacing: var(--wm-chips-item-letter-spacing);
80
+ box-shadow: var(--wm-chips-shadow);
69
81
  }
70
82
 
71
83
  .app-chips-active-item-text {
@@ -24,6 +24,7 @@
24
24
  align-content: center;
25
25
  margin-right: var(--wm-radiobutton-set-item-column-gap);
26
26
  margin-top: var(--wm-radiobutton-set-item-row-gap);
27
+ gap: var(--wm-radiobutton-gap);
27
28
  }
28
29
 
29
30
  .app-radioset-label {
@@ -34,7 +35,6 @@
34
35
  line-height: var(--wm-radiobutton-label-line-height);
35
36
  letter-spacing: var(--wm-radiobutton-label-letter-spacing);
36
37
  color: var(--wm-radiobutton-label-color);
37
- margin-left: var(--wm-radiobutton-gap);
38
38
  }
39
39
 
40
40
  .app-radioset-checked-icon.root {
@@ -1,11 +1,13 @@
1
1
  .app-currency {
2
- span,
2
+ span{
3
+ bottom:0px !important;
4
+ }
3
5
  .app-textbox {
4
6
  padding: 12px;
5
7
  font-size: 16px;
6
8
  height: auto;
7
9
  }
8
- span {
10
+ .input-group-addon {
9
11
  background-color: var(--wm-currency-labelwrapper-background) !important;
10
12
  min-height: var(--wm-currency-labelwrapper-min-height) !important;
11
13
  border-radius: var(--wm-currency-labelwrapper-border-radius) !important;
@@ -15,6 +17,8 @@
15
17
  font-family: var(--wm-currency-label-font-family) !important;
16
18
  font-size: var(--wm-currency-label-font-size) !important;
17
19
  color: var(--wm-currency-label-color) !important;
20
+ border-width: var(--wm-form-controls-border-width) !important;
21
+ border-color: var(--wm-form-controls-border-color) !important;
18
22
  }
19
23
  .app-textbox {
20
24
  border-top-right-radius: 4px;
@@ -42,7 +42,6 @@
42
42
  --wm-btn-border-width: 1px;
43
43
  --wm-btn-border-style: solid;
44
44
  --wm-btn-min-width: auto;
45
- --wm-btn-height: 40px;
46
45
  --wm-btn-shadow: none;
47
46
  --wm-btn-ripple-color: rgba(255, 255, 255, 0.08);
48
47
  --wm-btn-skeleton-width: 96px;
@@ -542,7 +541,8 @@
542
541
  --wm-btn-letter-spacing: var(--wm-label-large-letter-spacing);
543
542
  --wm-btn-border-color: var(--wm-color-surface-container-highest);
544
543
  --wm-btn-radius: var(--wm-radius-sm);
545
- --wm-btn-padding: var(--wm-space-0) var(--wm-space-6);
544
+ --wm-btn-padding: var(--wm-space-3) var(--wm-space-6);
545
+ --wm-btn-min-height: var(--wm-space-10);
546
546
  --wm-btn-gap: var(--wm-space-2);
547
547
  --wm-btn-icon-size: var(--wm-icon-size-md);
548
548
  --wm-btn-icon-color: var(--wm-color-on-surface);
@@ -602,6 +602,7 @@
602
602
  --wm-checkbox-icon-size: var(--wm-icon-size);
603
603
  --wm-checkbox-border-radius: var(--wm-radius-xxs);
604
604
  --wm-checkbox-border-color: var(--wm-color-on-surface-variant);
605
+ --wm-checkboxset-gap: var(--wm-space-1);
605
606
  --wm-checkboxset-height: var(--wm-space-6);
606
607
  --wm-checkboxset-width: var(--wm-space-6);
607
608
  --wm-checkboxset-label-font-size: var(--wm-body-large-font-size);
@@ -236,7 +236,7 @@
236
236
  }
237
237
 
238
238
  .btn-icon {
239
- --wm-btn-height: 40px;
239
+ --wm-btn-min-height: 40px;
240
240
  --wm-btn-min-width: 40px;
241
241
  --wm-btn-padding: var(--wm-space-0);
242
242
  --wm-btn-icon-size: var(--wm-icon-size-md);
@@ -247,7 +247,7 @@
247
247
  }
248
248
 
249
249
  .btn-fab {
250
- --wm-btn-height: 56px;
250
+ --wm-btn-min-height: 56px;
251
251
  --wm-btn-min-width: 56px;
252
252
  --wm-btn-border-radius: 16px;
253
253
  --wm-btn-shadow: var(--wm-elevation-shadow-1);
@@ -26,11 +26,11 @@
26
26
  "@react-native/metro-babel-transformer": "0.86.3",
27
27
  "@react-navigation/drawer": "7.10.3",
28
28
  "@react-navigation/native": "7.3.18",
29
- "@wavemaker/app-rn-runtime": "11.16.1-rc.270",
30
- "@wavemaker/foundation-css": "11.16.1-rc.270",
29
+ "@wavemaker/app-rn-runtime": "11.16.2-rc.271",
30
+ "@wavemaker/foundation-css": "11.16.2-rc.271",
31
31
  "@wavemaker/react-native-ssl-publickey": "1.0.2",
32
- "@wavemaker/rn-codegen": "11.16.1-rc.270",
33
- "@wavemaker/variables": "11.16.1-rc.270",
32
+ "@wavemaker/rn-codegen": "11.16.2-rc.271",
33
+ "@wavemaker/variables": "11.16.2-rc.271",
34
34
  "@wavemaker/wavepulse-agent": "1.0.11",
35
35
  "esbuild": "0.28.1",
36
36
  "esbuild-plugin-resolve": "2.0.0",
@@ -104,13 +104,18 @@
104
104
  "webpack-dev-middleware": "8.3.0"
105
105
  },
106
106
  "overrides": {
107
+ "fast-xml-parser": "5.11.2",
108
+ "axios": "1.20.0",
109
+ "@expo/mcp-tunnel": {
110
+ "zod": "4.6.7"
111
+ },
107
112
  "babel-plugin-react-native-web": "0.21.4",
108
113
  "react-native-worklets": "0.10.1",
109
114
  "@react-navigation/core": "7.21.13",
110
115
  "postcss": "8.5.26",
111
116
  "lodash": "4.18.1",
112
117
  "uuid": "11.1.1",
113
- "decode-uri-component": "0.5.0",
118
+ "decode-uri-component": "0.5.1",
114
119
  "lottie-react-native": {
115
120
  "@lottiefiles/dotlottie-react": "$@lottiefiles/dotlottie-react"
116
121
  },
@@ -430,6 +430,19 @@ const { createMetroCacheStores, PROJECT_CACHE_DIR } = require('./metro/module-pa
430
430
  + `, hard timeout ${timeoutMs / 60000}min`);
431
431
  const expoBin = path.join(projectRoot, 'node_modules', '.bin', 'expo');
432
432
  const useDirectBin = fs.existsSync(expoBin);
433
+ // A hard-linked vendor file can lose its execute bit (spawn EACCES); node runs the same CLI without it.
434
+ let expoBinExecutable = true;
435
+ if (useDirectBin) {
436
+ try {
437
+ fs.accessSync(expoBin, fs.constants.X_OK);
438
+ } catch {
439
+ expoBinExecutable = false;
440
+ console.warn(`[metro] ${expoBin} is not executable, running it with node`);
441
+ }
442
+ }
443
+ const [expoCmd, expoCmdArgs] = !useDirectBin ? ['npx', ['expo']]
444
+ : expoBinExecutable ? [expoBin, []]
445
+ : [process.execPath, [fs.realpathSync(expoBin)]];
433
446
  const maxWorkers = parseInt(process.env.WM_METRO_MAX_WORKERS, 10) || 1;
434
447
  const exportArgs = ['export', '--platform', 'web',
435
448
  '--output-dir', `${webapp}/rn-bundle-next`, '--max-workers', String(maxWorkers)];
@@ -437,10 +450,14 @@ const { createMetroCacheStores, PROJECT_CACHE_DIR } = require('./metro/module-pa
437
450
  // Preloaded rather than patched into node_modules so they survive a vendor reinstall.
438
451
  const crawlOverride = path.join(__dirname, 'wm-crawl-override.js');
439
452
  const boundary = path.join(__dirname, 'wm-boundary.js');
453
+ const prebuilt = path.join(__dirname, 'wm-prebuilt.js');
440
454
  const nodeOptions = [`--max-old-space-size=${maxOldSpaceMB}`];
441
455
  if (process.env.WM_CRAWL_OVERRIDE !== '0' && fs.existsSync(crawlOverride)) {
442
456
  nodeOptions.push(`--require ${crawlOverride}`);
443
457
  }
458
+ if (process.env.WM_PREBUILT !== '0' && fs.existsSync(prebuilt)) {
459
+ nodeOptions.push(`--require ${prebuilt}`);
460
+ }
444
461
  // Without a cached asset list the serializer refuses boundary mode only after the whole graph is
445
462
  // transformed (~14 min on large apps), so go straight to the full traversal.
446
463
  const boundaryEnabled = process.env.WM_BOUNDARY !== '0' && !boundaryDisabled && fs.existsSync(boundary)
@@ -451,8 +468,8 @@ const { createMetroCacheStores, PROJECT_CACHE_DIR } = require('./metro/module-pa
451
468
 
452
469
  return new Promise((resolve, reject) => {
453
470
  const child = spawn(
454
- useDirectBin ? expoBin : 'npx',
455
- useDirectBin ? exportArgs : ['expo', ...exportArgs],
471
+ expoCmd,
472
+ [...expoCmdArgs, ...exportArgs],
456
473
  {
457
474
  cwd: projectRoot,
458
475
  stdio: ['ignore', 'pipe', 'pipe'],
@@ -16,7 +16,7 @@ const MODULE_ID_SCHEME_VERSION = (() => {
16
16
  different rules share one cache key. wm-live-reload.js is deliberately absent: it is a client
17
17
  script injected into index.html and never affects chunk contents, so including it would bust
18
18
  every cache for a cosmetic edit. */
19
- for (const f of ['vendor-cache.js', 'split.serializer.js', 'stable-module-ids.js', 'split.static.js', 'module-path.js', 'wm-metro-adapter.js', 'wm-boundary.js', 'wm-crawl-override.js', 'wm-fastbuild.js']) {
19
+ for (const f of ['vendor-cache.js', 'split.serializer.js', 'stable-module-ids.js', 'split.static.js', 'module-path.js', 'wm-metro-adapter.js', 'wm-boundary.js', 'wm-crawl-override.js', 'wm-prebuilt.js', 'wm-fastbuild.js']) {
20
20
  const p = path.join(__dirname, f);
21
21
  if (fs.existsSync(p)) {
22
22
  h.update(f);
@@ -64,13 +64,36 @@ function stubResult(filePath) {
64
64
 
65
65
  const stats = { stubbed: 0, realNodeModules: 0, project: 0 };
66
66
 
67
- function install(TransformerClass, manifestKeys, normalizeKey) {
67
+ // handle(filePath) returns a result to skip the transform, or nothing to fall through.
68
+ function wrapTransformFile(TransformerClass, flag, handle) {
68
69
  const proto = TransformerClass && TransformerClass.prototype;
69
- if (!proto || typeof proto.transformFile !== 'function' || proto.transformFile.__wmBoundary) {
70
+ if (!proto || typeof proto.transformFile !== 'function' || proto.transformFile[flag]) {
70
71
  return false;
71
72
  }
72
73
  const original = proto.transformFile;
73
74
  const patched = async function transformFile(filePath, ...rest) {
75
+ return handle(filePath) || original.apply(this, [filePath, ...rest]);
76
+ };
77
+ patched[flag] = true;
78
+ Object.defineProperty(proto, 'transformFile', { value: patched, writable: true, configurable: true });
79
+ return true;
80
+ }
81
+
82
+ function whenTransformerLoads(onLoad) {
83
+ const originalLoad = Module._load;
84
+ Module._load = function (request, parent) {
85
+ const exported = originalLoad.apply(this, arguments);
86
+ let filename = '';
87
+ try { filename = Module._resolveFilename(request, parent) || ''; } catch {}
88
+ if (/DeltaBundler[/\\]Transformer\.js$/.test(filename)) {
89
+ onLoad(exported && (exported.Transformer || exported.default || exported));
90
+ }
91
+ return exported;
92
+ };
93
+ }
94
+
95
+ function install(TransformerClass, manifestKeys, normalizeKey) {
96
+ return wrapTransformFile(TransformerClass, '__wmBoundary', (filePath) => {
74
97
  if (typeof filePath === 'string' && filePath.includes('node_modules')) {
75
98
  let key = null;
76
99
  try { key = normalizeKey(filePath); } catch { key = null; }
@@ -82,11 +105,7 @@ function install(TransformerClass, manifestKeys, normalizeKey) {
82
105
  } else {
83
106
  stats.project++;
84
107
  }
85
- return original.apply(this, [filePath, ...rest]);
86
- };
87
- patched.__wmBoundary = true;
88
- Object.defineProperty(proto, 'transformFile', { value: patched, writable: true, configurable: true });
89
- return true;
108
+ });
90
109
  }
91
110
 
92
111
  if (process.env.WM_BOUNDARY !== '0') {
@@ -104,28 +123,21 @@ if (process.env.WM_BOUNDARY !== '0') {
104
123
  if (!normalizeKey) {
105
124
  console.log('[boundary] could not load module-path.js — running a normal full traversal');
106
125
  } else {
107
- const originalLoad = Module._load;
108
- Module._load = function (request, parent) {
109
- const exported = originalLoad.apply(this, arguments);
110
- let filename = '';
111
- try { filename = Module._resolveFilename(request, parent) || ''; } catch {}
112
- if (/DeltaBundler[/\\]Transformer\.js$/.test(filename)) {
113
- try {
114
- if (install(exported && (exported.Transformer || exported.default || exported), manifestKeys, normalizeKey)) {
115
- /* The serializer runs in this same process and must gate its safety checks on whether
116
- the graph is ACTUALLY truncated, not on WM_BOUNDARY. The env var only says the
117
- optimisation is permitted; every path above this line declines it and still leaves
118
- a complete graph, and a serializer that assumed otherwise would refuse builds that
119
- were never truncated (and, worse, trust a full graph to be small). */
120
- globalThis.__WM_BOUNDARY_ACTIVE__ = true;
121
- console.log(`[boundary] traversal will stop at node_modules (${manifestKeys.size} vendor keys known)`);
122
- }
123
- } catch (err) {
124
- console.warn('[boundary] could not install:', err.message);
126
+ whenTransformerLoads((TransformerClass) => {
127
+ try {
128
+ if (install(TransformerClass, manifestKeys, normalizeKey)) {
129
+ /* The serializer runs in this same process and must gate its safety checks on whether
130
+ the graph is ACTUALLY truncated, not on WM_BOUNDARY. The env var only says the
131
+ optimisation is permitted; every path above this line declines it and still leaves
132
+ a complete graph, and a serializer that assumed otherwise would refuse builds that
133
+ were never truncated (and, worse, trust a full graph to be small). */
134
+ globalThis.__WM_BOUNDARY_ACTIVE__ = true;
135
+ console.log(`[boundary] traversal will stop at node_modules (${manifestKeys.size} vendor keys known)`);
125
136
  }
137
+ } catch (err) {
138
+ console.warn('[boundary] could not install:', err.message);
126
139
  }
127
- return exported;
128
- };
140
+ });
129
141
 
130
142
  process.on('exit', () => {
131
143
  console.log(`[boundary] stubbed ${stats.stubbed} vendor module(s), `
@@ -135,4 +147,4 @@ if (process.env.WM_BOUNDARY !== '0') {
135
147
  }
136
148
  }
137
149
 
138
- module.exports = { stubResult, loadVendorManifestKeys };
150
+ module.exports = { stubResult, loadVendorManifestKeys, wrapTransformFile, whenTransformerLoads };
@@ -93,6 +93,18 @@ function writeManifest(root, files) {
93
93
  } catch {}
94
94
  }
95
95
 
96
+ // Metro's file-map cache (os.tmpdir) can be empty while the manifest matches; skipping then breaks resolution.
97
+ function previousMapHasFiles(watcher, files) {
98
+ const fileSystem = watcher && watcher._options && watcher._options.previousState
99
+ && watcher._options.previousState.fileSystem;
100
+ if (!fileSystem || typeof fileSystem.exists !== 'function') return false;
101
+ try {
102
+ return files.every(f => fileSystem.exists(f));
103
+ } catch {
104
+ return false;
105
+ }
106
+ }
107
+
96
108
  function install(WatcherClass) {
97
109
  const proto = WatcherClass && WatcherClass.prototype;
98
110
  if (!proto || typeof proto.crawl !== 'function' || proto.crawl.__wmOverride) return false;
@@ -111,11 +123,13 @@ function install(WatcherClass) {
111
123
  && prev.files.length === current.length
112
124
  && prev.files.every((f, i) => f === current[i]);
113
125
 
114
- if (unchanged) {
126
+ if (unchanged && previousMapHasFiles(this, current)) {
115
127
  console.log(`[crawl] skipped full crawl — ${current.length} project source files unchanged`);
116
128
  return { changedFiles: new Map(), removedFiles: new Set() };
117
129
  }
118
- console.log(`[crawl] running full crawl — project source file set changed (${prev ? prev.count : 'no'} -> ${current.length})`);
130
+ console.log(unchanged
131
+ ? '[crawl] running full crawl — Metro\'s cached file map is missing project files'
132
+ : `[crawl] running full crawl — project source file set changed (${prev ? prev.count : 'no'} -> ${current.length})`);
119
133
  }
120
134
 
121
135
  const result = await originalCrawl.apply(this, args);
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ /*
4
+ * Passes dependency-free prebuilt files through Metro untransformed. @babel/standalone (pulled in by a
5
+ * metadata wm-form) is a 5MB single-file UMD whose Babel transform exhausts the 1GB heap on cold builds,
6
+ * before a vendor manifest exists for wm-boundary.js to stub against.
7
+ */
8
+
9
+ const fs = require('fs');
10
+ const { stubResult, wrapTransformFile, whenTransformerLoads } = require('./wm-boundary');
11
+
12
+ const PREBUILT = [/[/\\]node_modules[/\\]@babel[/\\]standalone[/\\]babel(\.min)?\.js$/];
13
+
14
+ function prebuiltResult(filePath) {
15
+ const source = fs.readFileSync(filePath);
16
+ const code = `__d(function(global,require,_$$_IMPORT_DEFAULT,_$$_IMPORT_ALL,module,exports,_dependencyMap){${source}\n});`;
17
+ const result = stubResult(filePath);
18
+ Object.assign(result.output[0].data, { code, lineCount: code.split('\n').length });
19
+ result.unstable_transformResultKey = `wm-prebuilt:${filePath}`;
20
+ result.getSource = () => source;
21
+ return result;
22
+ }
23
+
24
+ whenTransformerLoads((TransformerClass) => {
25
+ try {
26
+ wrapTransformFile(TransformerClass, '__wmPrebuilt', (filePath) =>
27
+ (typeof filePath === 'string' && PREBUILT.some((re) => re.test(filePath)) ? prebuiltResult(filePath) : undefined));
28
+ } catch (err) {
29
+ console.warn('[prebuilt] could not install:', err.message);
30
+ }
31
+ });