bmdl-sdk 2.0.37 → 2.0.39

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 (168) hide show
  1. package/dist/BUILD_ID +1 -1
  2. package/dist/build/chunks/[turbopack-node]_transforms_postcss_ts_0b7xl6g._.js +1 -1
  3. package/dist/build/chunks/{node_modules_20v-8wl._.js → node_modules_05oslht._.js} +1424 -1869
  4. package/dist/build/chunks/node_modules_05oslht._.js.map +47 -0
  5. package/dist/build-manifest.json +6 -6
  6. package/dist/cache/.tsbuildinfo +1 -1
  7. package/dist/diagnostics/route-bundle-stats.json +8 -8
  8. package/dist/fallback-build-manifest.json +3 -3
  9. package/dist/next-server.js.nft.json +1 -1
  10. package/dist/server/app/_global-error/page/build-manifest.json +3 -3
  11. package/dist/server/app/_global-error/page.js.nft.json +1 -1
  12. package/dist/server/app/_global-error/page_client-reference-manifest.js +1 -1
  13. package/dist/server/app/_global-error.html +1 -1
  14. package/dist/server/app/_global-error.rsc +1 -1
  15. package/dist/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  16. package/dist/server/app/_global-error.segments/_full.segment.rsc +1 -1
  17. package/dist/server/app/_global-error.segments/_head.segment.rsc +1 -1
  18. package/dist/server/app/_global-error.segments/_index.segment.rsc +1 -1
  19. package/dist/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  20. package/dist/server/app/_not-found/page/build-manifest.json +3 -3
  21. package/dist/server/app/_not-found/page.js.nft.json +1 -1
  22. package/dist/server/app/_not-found/page_client-reference-manifest.js +1 -1
  23. package/dist/server/app/_not-found.html +1 -1
  24. package/dist/server/app/_not-found.rsc +2 -2
  25. package/dist/server/app/_not-found.segments/_full.segment.rsc +2 -2
  26. package/dist/server/app/_not-found.segments/_head.segment.rsc +1 -1
  27. package/dist/server/app/_not-found.segments/_index.segment.rsc +2 -2
  28. package/dist/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  29. package/dist/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  30. package/dist/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  31. package/dist/server/app/api/component/route.js +1 -1
  32. package/dist/server/app/api/component/route.js.nft.json +1 -1
  33. package/dist/server/app/index.html +1 -1
  34. package/dist/server/app/index.rsc +3 -3
  35. package/dist/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  36. package/dist/server/app/index.segments/_full.segment.rsc +3 -3
  37. package/dist/server/app/index.segments/_head.segment.rsc +1 -1
  38. package/dist/server/app/index.segments/_index.segment.rsc +2 -2
  39. package/dist/server/app/index.segments/_tree.segment.rsc +2 -2
  40. package/dist/server/app/page/build-manifest.json +3 -3
  41. package/dist/server/app/page.js.nft.json +1 -1
  42. package/dist/server/app/page_client-reference-manifest.js +1 -1
  43. package/dist/server/chunks/[root-of-the-server]__1ewn43n._.js +11 -0
  44. package/dist/server/chunks/[root-of-the-server]__1ewn43n._.js.map +1 -0
  45. package/dist/server/chunks/ssr/{[root-of-the-server]__1vhgpuw._.js → [root-of-the-server]__1tcd_jn._.js} +2 -2
  46. package/dist/server/chunks/ssr/[root-of-the-server]__1tcd_jn._.js.map +1 -0
  47. package/dist/server/chunks/ssr/{[root-of-the-server]__1fno3kn._.js → [root-of-the-server]__1w1ep09._.js} +2 -2
  48. package/dist/server/chunks/ssr/[root-of-the-server]__1w1ep09._.js.map +1 -0
  49. package/dist/server/chunks/ssr/[root-of-the-server]__214wyau._.js +1 -1
  50. package/dist/server/chunks/ssr/[root-of-the-server]__214wyau._.js.map +1 -1
  51. package/dist/server/chunks/ssr/{node_modules_next_dist_18tu5cb._.js → node_modules_next_dist_1vgd_ru._.js} +2 -2
  52. package/dist/server/chunks/ssr/node_modules_next_dist_1vgd_ru._.js.map +1 -0
  53. package/dist/server/chunks/ssr/src_components_ComponentWidget_DynamicComponentLoader_tsx_08tgduo._.js +4 -4
  54. package/dist/server/chunks/ssr/src_components_ComponentWidget_DynamicComponentLoader_tsx_08tgduo._.js.map +1 -1
  55. package/dist/server/middleware-build-manifest.js +6 -6
  56. package/dist/server/pages/404.html +1 -1
  57. package/dist/server/pages/500.html +1 -1
  58. package/dist/standalone/dist/BUILD_ID +1 -1
  59. package/dist/standalone/dist/build-manifest.json +6 -6
  60. package/dist/standalone/dist/server/app/_global-error/page/build-manifest.json +3 -3
  61. package/dist/standalone/dist/server/app/_global-error/page.js.nft.json +1 -1
  62. package/dist/standalone/dist/server/app/_global-error/page_client-reference-manifest.js +1 -1
  63. package/dist/standalone/dist/server/app/_global-error.html +1 -1
  64. package/dist/standalone/dist/server/app/_global-error.rsc +1 -1
  65. package/dist/standalone/dist/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  66. package/dist/standalone/dist/server/app/_global-error.segments/_full.segment.rsc +1 -1
  67. package/dist/standalone/dist/server/app/_global-error.segments/_head.segment.rsc +1 -1
  68. package/dist/standalone/dist/server/app/_global-error.segments/_index.segment.rsc +1 -1
  69. package/dist/standalone/dist/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  70. package/dist/standalone/dist/server/app/_not-found/page/build-manifest.json +3 -3
  71. package/dist/standalone/dist/server/app/_not-found/page.js.nft.json +1 -1
  72. package/dist/standalone/dist/server/app/_not-found/page_client-reference-manifest.js +1 -1
  73. package/dist/standalone/dist/server/app/_not-found.html +1 -1
  74. package/dist/standalone/dist/server/app/_not-found.rsc +2 -2
  75. package/dist/standalone/dist/server/app/_not-found.segments/_full.segment.rsc +2 -2
  76. package/dist/standalone/dist/server/app/_not-found.segments/_head.segment.rsc +1 -1
  77. package/dist/standalone/dist/server/app/_not-found.segments/_index.segment.rsc +2 -2
  78. package/dist/standalone/dist/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  79. package/dist/standalone/dist/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  80. package/dist/standalone/dist/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  81. package/dist/standalone/dist/server/app/api/component/route.js +1 -1
  82. package/dist/standalone/dist/server/app/api/component/route.js.nft.json +1 -1
  83. package/dist/standalone/dist/server/app/index.html +1 -1
  84. package/dist/standalone/dist/server/app/index.rsc +3 -3
  85. package/dist/standalone/dist/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  86. package/dist/standalone/dist/server/app/index.segments/_full.segment.rsc +3 -3
  87. package/dist/standalone/dist/server/app/index.segments/_head.segment.rsc +1 -1
  88. package/dist/standalone/dist/server/app/index.segments/_index.segment.rsc +2 -2
  89. package/dist/standalone/dist/server/app/index.segments/_tree.segment.rsc +2 -2
  90. package/dist/standalone/dist/server/app/page/build-manifest.json +3 -3
  91. package/dist/standalone/dist/server/app/page.js.nft.json +1 -1
  92. package/dist/standalone/dist/server/app/page_client-reference-manifest.js +1 -1
  93. package/dist/standalone/dist/server/chunks/[root-of-the-server]__1ewn43n._.js +11 -0
  94. package/dist/standalone/dist/server/chunks/ssr/{[root-of-the-server]__1vhgpuw._.js → [root-of-the-server]__1tcd_jn._.js} +2 -2
  95. package/dist/standalone/dist/server/chunks/ssr/{[root-of-the-server]__1fno3kn._.js → [root-of-the-server]__1w1ep09._.js} +2 -2
  96. package/dist/standalone/dist/server/chunks/ssr/[root-of-the-server]__214wyau._.js +1 -1
  97. package/dist/standalone/dist/server/chunks/ssr/{node_modules_next_dist_18tu5cb._.js → node_modules_next_dist_1vgd_ru._.js} +2 -2
  98. package/dist/standalone/dist/server/chunks/ssr/src_components_ComponentWidget_DynamicComponentLoader_tsx_08tgduo._.js +4 -4
  99. package/dist/standalone/dist/server/middleware-build-manifest.js +6 -6
  100. package/dist/standalone/dist/server/pages/404.html +1 -1
  101. package/dist/standalone/dist/server/pages/500.html +1 -1
  102. package/dist/standalone/dist/static/chunks/0atut6a2uuyid.js +5 -0
  103. package/dist/standalone/dist/static/chunks/1jq4o6yq14o4c.js +31 -0
  104. package/dist/standalone/dist/static/chunks/2c5nzc2ljqups.css +3 -0
  105. package/dist/standalone/dist/static/chunks/2cwj6u4m-2xhv.js +4 -0
  106. package/dist/{static/chunks/turbopack-2d7f32bwbsmp8.js → standalone/dist/static/chunks/turbopack-38l7qwik-h828.js} +1 -1
  107. package/dist/standalone/node_modules/@swc/core/LICENSE +201 -0
  108. package/dist/standalone/node_modules/@swc/core/README.md +100 -0
  109. package/dist/standalone/node_modules/@swc/core/Visitor.js +1399 -0
  110. package/dist/standalone/node_modules/@swc/core/binding.js +368 -0
  111. package/dist/standalone/node_modules/@swc/core/index.js +466 -0
  112. package/dist/standalone/node_modules/@swc/core/package.json +119 -0
  113. package/dist/standalone/node_modules/@swc/core/postinstall.js +148 -0
  114. package/dist/standalone/node_modules/@swc/core/spack.js +87 -0
  115. package/dist/standalone/node_modules/@swc/core/util.js +103 -0
  116. package/dist/standalone/node_modules/@swc/core-win32-x64-msvc/package.json +43 -0
  117. package/dist/standalone/node_modules/@swc/core-win32-x64-msvc/swc.win32-x64-msvc.node +0 -0
  118. package/dist/standalone/package.json +8 -1
  119. package/dist/static/chunks/0atut6a2uuyid.js +5 -0
  120. package/dist/static/chunks/1jq4o6yq14o4c.js +31 -0
  121. package/dist/static/chunks/2c5nzc2ljqups.css +3 -0
  122. package/dist/static/chunks/2cwj6u4m-2xhv.js +4 -0
  123. package/dist/{standalone/dist/static/chunks/turbopack-2d7f32bwbsmp8.js → static/chunks/turbopack-38l7qwik-h828.js} +1 -1
  124. package/dist/trace +1 -1
  125. package/dist/trace-build +1 -1
  126. package/package.json +8 -1
  127. package/dist/build/chunks/node_modules_20v-8wl._.js.map +0 -47
  128. package/dist/server/chunks/[root-of-the-server]__0vtkqkv._.js +0 -11
  129. package/dist/server/chunks/[root-of-the-server]__0vtkqkv._.js.map +0 -1
  130. package/dist/server/chunks/ssr/[root-of-the-server]__1fno3kn._.js.map +0 -1
  131. package/dist/server/chunks/ssr/[root-of-the-server]__1vhgpuw._.js.map +0 -1
  132. package/dist/server/chunks/ssr/node_modules_next_dist_18tu5cb._.js.map +0 -1
  133. package/dist/standalone/dist/server/chunks/[root-of-the-server]__0vtkqkv._.js +0 -11
  134. package/dist/standalone/dist/static/chunks/0ie0zj6s4jns8.js +0 -5
  135. package/dist/standalone/dist/static/chunks/1zm_64y3b_d7d.js +0 -4
  136. package/dist/standalone/dist/static/chunks/2ovwin8y5r_vj.css +0 -3
  137. package/dist/standalone/dist/static/chunks/3l2cn98nr6ga3.js +0 -31
  138. package/dist/static/chunks/0ie0zj6s4jns8.js +0 -5
  139. package/dist/static/chunks/1zm_64y3b_d7d.js +0 -4
  140. package/dist/static/chunks/2ovwin8y5r_vj.css +0 -3
  141. package/dist/static/chunks/3l2cn98nr6ga3.js +0 -31
  142. /package/dist/standalone/dist/static/{CLxrQ2qwRm8rvSc-vd6MQ → gwQzOw5VFPX9p238BrwNq}/_buildManifest.js +0 -0
  143. /package/dist/standalone/dist/static/{CLxrQ2qwRm8rvSc-vd6MQ → gwQzOw5VFPX9p238BrwNq}/_clientMiddlewareManifest.js +0 -0
  144. /package/dist/standalone/dist/static/{CLxrQ2qwRm8rvSc-vd6MQ → gwQzOw5VFPX9p238BrwNq}/_ssgManifest.js +0 -0
  145. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/classes/comparator.js +0 -0
  146. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/classes/range.js +0 -0
  147. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/classes/semver.js +0 -0
  148. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/functions/cmp.js +0 -0
  149. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/functions/coerce.js +0 -0
  150. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/functions/compare.js +0 -0
  151. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/functions/eq.js +0 -0
  152. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/functions/gt.js +0 -0
  153. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/functions/gte.js +0 -0
  154. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/functions/lt.js +0 -0
  155. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/functions/lte.js +0 -0
  156. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/functions/neq.js +0 -0
  157. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/functions/parse.js +0 -0
  158. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/functions/satisfies.js +0 -0
  159. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/internal/constants.js +0 -0
  160. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/internal/debug.js +0 -0
  161. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/internal/identifiers.js +0 -0
  162. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/internal/lrucache.js +0 -0
  163. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/internal/parse-options.js +0 -0
  164. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/internal/re.js +0 -0
  165. /package/dist/standalone/node_modules/{sharp/node_modules/semver → semver}/package.json +0 -0
  166. /package/dist/static/{CLxrQ2qwRm8rvSc-vd6MQ → gwQzOw5VFPX9p238BrwNq}/_buildManifest.js +0 -0
  167. /package/dist/static/{CLxrQ2qwRm8rvSc-vd6MQ → gwQzOw5VFPX9p238BrwNq}/_clientMiddlewareManifest.js +0 -0
  168. /package/dist/static/{CLxrQ2qwRm8rvSc-vd6MQ → gwQzOw5VFPX9p238BrwNq}/_ssgManifest.js +0 -0
@@ -0,0 +1,368 @@
1
+ // prettier-ignore
2
+ /* eslint-disable */
3
+ /* auto-generated by NAPI-RS */
4
+
5
+ const { readFileSync } = require('fs')
6
+
7
+ let nativeBinding = null
8
+ const loadErrors = []
9
+
10
+ const isMusl = () => {
11
+ let musl = false
12
+ if (process.platform === 'linux') {
13
+ musl = isMuslFromFilesystem()
14
+ if (musl === null) {
15
+ musl = isMuslFromReport()
16
+ }
17
+ if (musl === null) {
18
+ musl = isMuslFromChildProcess()
19
+ }
20
+ }
21
+ return musl
22
+ }
23
+
24
+ const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-')
25
+
26
+ const isMuslFromFilesystem = () => {
27
+ try {
28
+ return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')
29
+ } catch {
30
+ return null
31
+ }
32
+ }
33
+
34
+ const isMuslFromReport = () => {
35
+ const report = typeof process.report.getReport === 'function' ? process.report.getReport() : null
36
+ if (!report) {
37
+ return null
38
+ }
39
+ if (report.header && report.header.glibcVersionRuntime) {
40
+ return false
41
+ }
42
+ if (Array.isArray(report.sharedObjects)) {
43
+ if (report.sharedObjects.some(isFileMusl)) {
44
+ return true
45
+ }
46
+ }
47
+ return false
48
+ }
49
+
50
+ const isMuslFromChildProcess = () => {
51
+ try {
52
+ return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
53
+ } catch (e) {
54
+ // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
55
+ return false
56
+ }
57
+ }
58
+
59
+ function requireNative() {
60
+ if (process.platform === 'android') {
61
+ if (process.arch === 'arm64') {
62
+ try {
63
+ return require('./swc.android-arm64.node')
64
+ } catch (e) {
65
+ loadErrors.push(e)
66
+ }
67
+ try {
68
+ return require('@swc/core-android-arm64')
69
+ } catch (e) {
70
+ loadErrors.push(e)
71
+ }
72
+
73
+ } else if (process.arch === 'arm') {
74
+ try {
75
+ return require('./swc.android-arm-eabi.node')
76
+ } catch (e) {
77
+ loadErrors.push(e)
78
+ }
79
+ try {
80
+ return require('@swc/core-android-arm-eabi')
81
+ } catch (e) {
82
+ loadErrors.push(e)
83
+ }
84
+
85
+ } else {
86
+ loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`))
87
+ }
88
+ } else if (process.platform === 'win32') {
89
+ if (process.arch === 'x64') {
90
+ try {
91
+ return require('./swc.win32-x64-msvc.node')
92
+ } catch (e) {
93
+ loadErrors.push(e)
94
+ }
95
+ try {
96
+ return require('@swc/core-win32-x64-msvc')
97
+ } catch (e) {
98
+ loadErrors.push(e)
99
+ }
100
+
101
+ } else if (process.arch === 'ia32') {
102
+ try {
103
+ return require('./swc.win32-ia32-msvc.node')
104
+ } catch (e) {
105
+ loadErrors.push(e)
106
+ }
107
+ try {
108
+ return require('@swc/core-win32-ia32-msvc')
109
+ } catch (e) {
110
+ loadErrors.push(e)
111
+ }
112
+
113
+ } else if (process.arch === 'arm64') {
114
+ try {
115
+ return require('./swc.win32-arm64-msvc.node')
116
+ } catch (e) {
117
+ loadErrors.push(e)
118
+ }
119
+ try {
120
+ return require('@swc/core-win32-arm64-msvc')
121
+ } catch (e) {
122
+ loadErrors.push(e)
123
+ }
124
+
125
+ } else {
126
+ loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`))
127
+ }
128
+ } else if (process.platform === 'darwin') {
129
+ try {
130
+ return require('./swc.darwin-universal.node')
131
+ } catch (e) {
132
+ loadErrors.push(e)
133
+ }
134
+ try {
135
+ return require('@swc/core-darwin-universal')
136
+ } catch (e) {
137
+ loadErrors.push(e)
138
+ }
139
+
140
+ if (process.arch === 'x64') {
141
+ try {
142
+ return require('./swc.darwin-x64.node')
143
+ } catch (e) {
144
+ loadErrors.push(e)
145
+ }
146
+ try {
147
+ return require('@swc/core-darwin-x64')
148
+ } catch (e) {
149
+ loadErrors.push(e)
150
+ }
151
+
152
+ } else if (process.arch === 'arm64') {
153
+ try {
154
+ return require('./swc.darwin-arm64.node')
155
+ } catch (e) {
156
+ loadErrors.push(e)
157
+ }
158
+ try {
159
+ return require('@swc/core-darwin-arm64')
160
+ } catch (e) {
161
+ loadErrors.push(e)
162
+ }
163
+
164
+ } else {
165
+ loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))
166
+ }
167
+ } else if (process.platform === 'freebsd') {
168
+ if (process.arch === 'x64') {
169
+ try {
170
+ return require('./swc.freebsd-x64.node')
171
+ } catch (e) {
172
+ loadErrors.push(e)
173
+ }
174
+ try {
175
+ return require('@swc/core-freebsd-x64')
176
+ } catch (e) {
177
+ loadErrors.push(e)
178
+ }
179
+
180
+ } else if (process.arch === 'arm64') {
181
+ try {
182
+ return require('./swc.freebsd-arm64.node')
183
+ } catch (e) {
184
+ loadErrors.push(e)
185
+ }
186
+ try {
187
+ return require('@swc/core-freebsd-arm64')
188
+ } catch (e) {
189
+ loadErrors.push(e)
190
+ }
191
+
192
+ } else {
193
+ loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`))
194
+ }
195
+ } else if (process.platform === 'linux') {
196
+ if (process.arch === 'x64') {
197
+ if (isMusl()) {
198
+ try {
199
+ return require('./swc.linux-x64-musl.node')
200
+ } catch (e) {
201
+ loadErrors.push(e)
202
+ }
203
+ try {
204
+ return require('@swc/core-linux-x64-musl')
205
+ } catch (e) {
206
+ loadErrors.push(e)
207
+ }
208
+
209
+ } else {
210
+ try {
211
+ return require('./swc.linux-x64-gnu.node')
212
+ } catch (e) {
213
+ loadErrors.push(e)
214
+ }
215
+ try {
216
+ return require('@swc/core-linux-x64-gnu')
217
+ } catch (e) {
218
+ loadErrors.push(e)
219
+ }
220
+
221
+ }
222
+ } else if (process.arch === 'arm64') {
223
+ if (isMusl()) {
224
+ try {
225
+ return require('./swc.linux-arm64-musl.node')
226
+ } catch (e) {
227
+ loadErrors.push(e)
228
+ }
229
+ try {
230
+ return require('@swc/core-linux-arm64-musl')
231
+ } catch (e) {
232
+ loadErrors.push(e)
233
+ }
234
+
235
+ } else {
236
+ try {
237
+ return require('./swc.linux-arm64-gnu.node')
238
+ } catch (e) {
239
+ loadErrors.push(e)
240
+ }
241
+ try {
242
+ return require('@swc/core-linux-arm64-gnu')
243
+ } catch (e) {
244
+ loadErrors.push(e)
245
+ }
246
+
247
+ }
248
+ } else if (process.arch === 'arm') {
249
+ try {
250
+ return require('./swc.linux-arm-gnueabihf.node')
251
+ } catch (e) {
252
+ loadErrors.push(e)
253
+ }
254
+ try {
255
+ return require('@swc/core-linux-arm-gnueabihf')
256
+ } catch (e) {
257
+ loadErrors.push(e)
258
+ }
259
+
260
+ } else if (process.arch === 'riscv64') {
261
+ if (isMusl()) {
262
+ try {
263
+ return require('./swc.linux-riscv64-musl.node')
264
+ } catch (e) {
265
+ loadErrors.push(e)
266
+ }
267
+ try {
268
+ return require('@swc/core-linux-riscv64-musl')
269
+ } catch (e) {
270
+ loadErrors.push(e)
271
+ }
272
+
273
+ } else {
274
+ try {
275
+ return require('./swc.linux-riscv64-gnu.node')
276
+ } catch (e) {
277
+ loadErrors.push(e)
278
+ }
279
+ try {
280
+ return require('@swc/core-linux-riscv64-gnu')
281
+ } catch (e) {
282
+ loadErrors.push(e)
283
+ }
284
+
285
+ }
286
+ } else if (process.arch === 'ppc64') {
287
+ try {
288
+ return require('./swc.linux-ppc64-gnu.node')
289
+ } catch (e) {
290
+ loadErrors.push(e)
291
+ }
292
+ try {
293
+ return require('@swc/core-linux-ppc64-gnu')
294
+ } catch (e) {
295
+ loadErrors.push(e)
296
+ }
297
+
298
+ } else if (process.arch === 's390x') {
299
+ try {
300
+ return require('./swc.linux-s390x-gnu.node')
301
+ } catch (e) {
302
+ loadErrors.push(e)
303
+ }
304
+ try {
305
+ return require('@swc/core-linux-s390x-gnu')
306
+ } catch (e) {
307
+ loadErrors.push(e)
308
+ }
309
+
310
+ } else {
311
+ loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
312
+ }
313
+ } else {
314
+ loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))
315
+ }
316
+ }
317
+
318
+ nativeBinding = requireNative()
319
+
320
+ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
321
+ try {
322
+ nativeBinding = require('./swc.wasi.cjs')
323
+ } catch (err) {
324
+ if (process.env.NAPI_RS_FORCE_WASI) {
325
+ console.error(err)
326
+ }
327
+ }
328
+ if (!nativeBinding) {
329
+ try {
330
+ nativeBinding = require('@swc/core-wasm32-wasi')
331
+ } catch (err) {
332
+ if (process.env.NAPI_RS_FORCE_WASI) {
333
+ console.error(err)
334
+ }
335
+ }
336
+ }
337
+ }
338
+
339
+ if (!nativeBinding) {
340
+ if (loadErrors.length > 0) {
341
+ // TODO Link to documentation with potential fixes
342
+ // - The package owner could build/publish bindings for this arch
343
+ // - The user may need to bundle the correct files
344
+ // - The user may need to re-install node_modules to get new packages
345
+ throw new Error('Failed to load native binding', { cause: loadErrors })
346
+ }
347
+ throw new Error(`Failed to load native binding`)
348
+ }
349
+
350
+ module.exports.Compiler = nativeBinding.Compiler
351
+ module.exports.JsCompiler = nativeBinding.JsCompiler
352
+ module.exports.analyze = nativeBinding.analyze
353
+ module.exports.bundle = nativeBinding.bundle
354
+ module.exports.getTargetTriple = nativeBinding.getTargetTriple
355
+ module.exports.initCustomTraceSubscriber = nativeBinding.initCustomTraceSubscriber
356
+ module.exports.minify = nativeBinding.minify
357
+ module.exports.minifySync = nativeBinding.minifySync
358
+ module.exports.newMangleNameCache = nativeBinding.newMangleNameCache
359
+ module.exports.parse = nativeBinding.parse
360
+ module.exports.parseFile = nativeBinding.parseFile
361
+ module.exports.parseFileSync = nativeBinding.parseFileSync
362
+ module.exports.parseSync = nativeBinding.parseSync
363
+ module.exports.print = nativeBinding.print
364
+ module.exports.printSync = nativeBinding.printSync
365
+ module.exports.transform = nativeBinding.transform
366
+ module.exports.transformFile = nativeBinding.transformFile
367
+ module.exports.transformFileSync = nativeBinding.transformFileSync
368
+ module.exports.transformSync = nativeBinding.transformSync