@tailwindcss/oxide 0.0.0-development.5 → 0.0.0-insiders.0113b88
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/LICENSE +21 -0
- package/index.d.ts +35 -21
- package/index.js +518 -244
- package/package.json +52 -26
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Tailwind Labs, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/index.d.ts
CHANGED
|
@@ -1,34 +1,48 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export declare class Scanner {
|
|
4
|
+
constructor(opts: ScannerOptions)
|
|
5
|
+
scan(): Array<string>
|
|
6
|
+
scanFiles(input: Array<ChangedContent>): Array<string>
|
|
7
|
+
getCandidatesWithPositions(input: ChangedContent): Array<CandidateWithPosition>
|
|
8
|
+
get files(): Array<string>
|
|
9
|
+
get globs(): Array<GlobEntry>
|
|
10
|
+
get normalizedSources(): Array<GlobEntry>
|
|
11
|
+
}
|
|
3
12
|
|
|
4
|
-
|
|
13
|
+
export interface CandidateWithPosition {
|
|
14
|
+
/** The candidate string */
|
|
15
|
+
candidate: string
|
|
16
|
+
/** The position of the candidate inside the content file */
|
|
17
|
+
position: number
|
|
18
|
+
}
|
|
5
19
|
|
|
6
20
|
export interface ChangedContent {
|
|
21
|
+
/** File path to the changed file */
|
|
7
22
|
file?: string
|
|
23
|
+
/** Contents of the changed file */
|
|
8
24
|
content?: string
|
|
25
|
+
/** File extension */
|
|
9
26
|
extension: string
|
|
10
27
|
}
|
|
11
|
-
|
|
12
|
-
globs: Array<GlobEntry>
|
|
13
|
-
files: Array<string>
|
|
14
|
-
candidates: Array<string>
|
|
15
|
-
}
|
|
28
|
+
|
|
16
29
|
export interface GlobEntry {
|
|
30
|
+
/** Base path of the glob */
|
|
17
31
|
base: string
|
|
18
|
-
|
|
32
|
+
/** Glob pattern */
|
|
33
|
+
pattern: string
|
|
19
34
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export function clearCache(): void
|
|
25
|
-
export function scanDir(args: ScanOptions): ScanResult
|
|
26
|
-
export enum IO {
|
|
27
|
-
Sequential = 1,
|
|
28
|
-
Parallel = 2
|
|
35
|
+
|
|
36
|
+
export interface ScannerOptions {
|
|
37
|
+
/** Glob sources */
|
|
38
|
+
sources?: Array<SourceEntry>
|
|
29
39
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
40
|
+
|
|
41
|
+
export interface SourceEntry {
|
|
42
|
+
/** Base path of the glob */
|
|
43
|
+
base: string
|
|
44
|
+
/** Glob pattern */
|
|
45
|
+
pattern: string
|
|
46
|
+
/** Negated flag */
|
|
47
|
+
negated: boolean
|
|
33
48
|
}
|
|
34
|
-
export function scanFiles(input: Array<ChangedContent>, strategy: number): Array<string>
|
package/index.js
CHANGED
|
@@ -1,304 +1,578 @@
|
|
|
1
|
-
|
|
1
|
+
// prettier-ignore
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
// @ts-nocheck
|
|
5
4
|
/* auto-generated by NAPI-RS */
|
|
6
5
|
|
|
7
|
-
const {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const { platform, arch } = process
|
|
6
|
+
const { createRequire } = require('node:module')
|
|
7
|
+
require = createRequire(__filename)
|
|
11
8
|
|
|
9
|
+
const { readFileSync } = require('node:fs')
|
|
12
10
|
let nativeBinding = null
|
|
13
|
-
|
|
14
|
-
let loadError = null
|
|
11
|
+
const loadErrors = []
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
13
|
+
const isMusl = () => {
|
|
14
|
+
let musl = false
|
|
15
|
+
if (process.platform === 'linux') {
|
|
16
|
+
musl = isMuslFromFilesystem()
|
|
17
|
+
if (musl === null) {
|
|
18
|
+
musl = isMuslFromReport()
|
|
19
|
+
}
|
|
20
|
+
if (musl === null) {
|
|
21
|
+
musl = isMuslFromChildProcess()
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return musl
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-')
|
|
28
|
+
|
|
29
|
+
const isMuslFromFilesystem = () => {
|
|
30
|
+
try {
|
|
31
|
+
return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')
|
|
32
|
+
} catch {
|
|
33
|
+
return null
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const isMuslFromReport = () => {
|
|
38
|
+
let report = null
|
|
39
|
+
if (typeof process.report?.getReport === 'function') {
|
|
40
|
+
process.report.excludeNetwork = true
|
|
41
|
+
report = process.report.getReport()
|
|
42
|
+
}
|
|
43
|
+
if (!report) {
|
|
44
|
+
return null
|
|
45
|
+
}
|
|
46
|
+
if (report.header && report.header.glibcVersionRuntime) {
|
|
47
|
+
return false
|
|
48
|
+
}
|
|
49
|
+
if (Array.isArray(report.sharedObjects)) {
|
|
50
|
+
if (report.sharedObjects.some(isFileMusl)) {
|
|
23
51
|
return true
|
|
24
52
|
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
53
|
+
}
|
|
54
|
+
return false
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const isMuslFromChildProcess = () => {
|
|
58
|
+
try {
|
|
59
|
+
return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
|
|
60
|
+
} catch (e) {
|
|
61
|
+
// If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
|
|
62
|
+
return false
|
|
28
63
|
}
|
|
29
64
|
}
|
|
30
65
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
66
|
+
function requireNative() {
|
|
67
|
+
if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
|
|
68
|
+
try {
|
|
69
|
+
return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
|
|
70
|
+
} catch (err) {
|
|
71
|
+
loadErrors.push(err)
|
|
72
|
+
}
|
|
73
|
+
} else if (process.platform === 'android') {
|
|
74
|
+
if (process.arch === 'arm64') {
|
|
75
|
+
try {
|
|
76
|
+
return require('./tailwindcss-oxide.android-arm64.node')
|
|
77
|
+
} catch (e) {
|
|
78
|
+
loadErrors.push(e)
|
|
79
|
+
}
|
|
80
|
+
try {
|
|
81
|
+
const binding = require('@tailwindcss/oxide-android-arm64')
|
|
82
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-android-arm64/package.json').version
|
|
83
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
84
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
85
|
+
}
|
|
86
|
+
return binding
|
|
87
|
+
} catch (e) {
|
|
88
|
+
loadErrors.push(e)
|
|
89
|
+
}
|
|
90
|
+
} else if (process.arch === 'arm') {
|
|
91
|
+
try {
|
|
92
|
+
return require('./tailwindcss-oxide.android-arm-eabi.node')
|
|
93
|
+
} catch (e) {
|
|
94
|
+
loadErrors.push(e)
|
|
95
|
+
}
|
|
96
|
+
try {
|
|
97
|
+
const binding = require('@tailwindcss/oxide-android-arm-eabi')
|
|
98
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-android-arm-eabi/package.json').version
|
|
99
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
100
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
101
|
+
}
|
|
102
|
+
return binding
|
|
103
|
+
} catch (e) {
|
|
104
|
+
loadErrors.push(e)
|
|
105
|
+
}
|
|
106
|
+
} else {
|
|
107
|
+
loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`))
|
|
108
|
+
}
|
|
109
|
+
} else if (process.platform === 'win32') {
|
|
110
|
+
if (process.arch === 'x64') {
|
|
111
|
+
if (process.report?.getReport?.()?.header?.osName?.startsWith?.('MINGW')) {
|
|
36
112
|
try {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
113
|
+
return require('./tailwindcss-oxide.win32-x64-gnu.node')
|
|
114
|
+
} catch (e) {
|
|
115
|
+
loadErrors.push(e)
|
|
116
|
+
}
|
|
117
|
+
try {
|
|
118
|
+
const binding = require('@tailwindcss/oxide-win32-x64-gnu')
|
|
119
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-win32-x64-gnu/package.json').version
|
|
120
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
121
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
122
|
+
}
|
|
123
|
+
return binding
|
|
124
|
+
} catch (e) {
|
|
125
|
+
loadErrors.push(e)
|
|
126
|
+
}
|
|
127
|
+
} else {
|
|
128
|
+
try {
|
|
129
|
+
return require('./tailwindcss-oxide.win32-x64-msvc.node')
|
|
130
|
+
} catch (e) {
|
|
131
|
+
loadErrors.push(e)
|
|
132
|
+
}
|
|
133
|
+
try {
|
|
134
|
+
const binding = require('@tailwindcss/oxide-win32-x64-msvc')
|
|
135
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-win32-x64-msvc/package.json').version
|
|
136
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
137
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
138
|
+
}
|
|
139
|
+
return binding
|
|
140
|
+
} catch (e) {
|
|
141
|
+
loadErrors.push(e)
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
} else if (process.arch === 'ia32') {
|
|
145
|
+
try {
|
|
146
|
+
return require('./tailwindcss-oxide.win32-ia32-msvc.node')
|
|
147
|
+
} catch (e) {
|
|
148
|
+
loadErrors.push(e)
|
|
149
|
+
}
|
|
150
|
+
try {
|
|
151
|
+
const binding = require('@tailwindcss/oxide-win32-ia32-msvc')
|
|
152
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-win32-ia32-msvc/package.json').version
|
|
153
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
154
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
155
|
+
}
|
|
156
|
+
return binding
|
|
157
|
+
} catch (e) {
|
|
158
|
+
loadErrors.push(e)
|
|
159
|
+
}
|
|
160
|
+
} else if (process.arch === 'arm64') {
|
|
161
|
+
try {
|
|
162
|
+
return require('./tailwindcss-oxide.win32-arm64-msvc.node')
|
|
163
|
+
} catch (e) {
|
|
164
|
+
loadErrors.push(e)
|
|
165
|
+
}
|
|
166
|
+
try {
|
|
167
|
+
const binding = require('@tailwindcss/oxide-win32-arm64-msvc')
|
|
168
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-win32-arm64-msvc/package.json').version
|
|
169
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
170
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
171
|
+
}
|
|
172
|
+
return binding
|
|
173
|
+
} catch (e) {
|
|
174
|
+
loadErrors.push(e)
|
|
175
|
+
}
|
|
176
|
+
} else {
|
|
177
|
+
loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`))
|
|
178
|
+
}
|
|
179
|
+
} else if (process.platform === 'darwin') {
|
|
180
|
+
try {
|
|
181
|
+
return require('./tailwindcss-oxide.darwin-universal.node')
|
|
182
|
+
} catch (e) {
|
|
183
|
+
loadErrors.push(e)
|
|
184
|
+
}
|
|
185
|
+
try {
|
|
186
|
+
const binding = require('@tailwindcss/oxide-darwin-universal')
|
|
187
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-darwin-universal/package.json').version
|
|
188
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
189
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
190
|
+
}
|
|
191
|
+
return binding
|
|
192
|
+
} catch (e) {
|
|
193
|
+
loadErrors.push(e)
|
|
194
|
+
}
|
|
195
|
+
if (process.arch === 'x64') {
|
|
196
|
+
try {
|
|
197
|
+
return require('./tailwindcss-oxide.darwin-x64.node')
|
|
198
|
+
} catch (e) {
|
|
199
|
+
loadErrors.push(e)
|
|
200
|
+
}
|
|
201
|
+
try {
|
|
202
|
+
const binding = require('@tailwindcss/oxide-darwin-x64')
|
|
203
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-darwin-x64/package.json').version
|
|
204
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
205
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
206
|
+
}
|
|
207
|
+
return binding
|
|
208
|
+
} catch (e) {
|
|
209
|
+
loadErrors.push(e)
|
|
210
|
+
}
|
|
211
|
+
} else if (process.arch === 'arm64') {
|
|
212
|
+
try {
|
|
213
|
+
return require('./tailwindcss-oxide.darwin-arm64.node')
|
|
214
|
+
} catch (e) {
|
|
215
|
+
loadErrors.push(e)
|
|
216
|
+
}
|
|
217
|
+
try {
|
|
218
|
+
const binding = require('@tailwindcss/oxide-darwin-arm64')
|
|
219
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-darwin-arm64/package.json').version
|
|
220
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
221
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
222
|
+
}
|
|
223
|
+
return binding
|
|
224
|
+
} catch (e) {
|
|
225
|
+
loadErrors.push(e)
|
|
226
|
+
}
|
|
227
|
+
} else {
|
|
228
|
+
loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))
|
|
229
|
+
}
|
|
230
|
+
} else if (process.platform === 'freebsd') {
|
|
231
|
+
if (process.arch === 'x64') {
|
|
232
|
+
try {
|
|
233
|
+
return require('./tailwindcss-oxide.freebsd-x64.node')
|
|
234
|
+
} catch (e) {
|
|
235
|
+
loadErrors.push(e)
|
|
236
|
+
}
|
|
237
|
+
try {
|
|
238
|
+
const binding = require('@tailwindcss/oxide-freebsd-x64')
|
|
239
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-freebsd-x64/package.json').version
|
|
240
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
241
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
242
|
+
}
|
|
243
|
+
return binding
|
|
244
|
+
} catch (e) {
|
|
245
|
+
loadErrors.push(e)
|
|
246
|
+
}
|
|
247
|
+
} else if (process.arch === 'arm64') {
|
|
248
|
+
try {
|
|
249
|
+
return require('./tailwindcss-oxide.freebsd-arm64.node')
|
|
250
|
+
} catch (e) {
|
|
251
|
+
loadErrors.push(e)
|
|
252
|
+
}
|
|
253
|
+
try {
|
|
254
|
+
const binding = require('@tailwindcss/oxide-freebsd-arm64')
|
|
255
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-freebsd-arm64/package.json').version
|
|
256
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
257
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
258
|
+
}
|
|
259
|
+
return binding
|
|
260
|
+
} catch (e) {
|
|
261
|
+
loadErrors.push(e)
|
|
262
|
+
}
|
|
263
|
+
} else {
|
|
264
|
+
loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`))
|
|
265
|
+
}
|
|
266
|
+
} else if (process.platform === 'linux') {
|
|
267
|
+
if (process.arch === 'x64') {
|
|
268
|
+
if (isMusl()) {
|
|
269
|
+
try {
|
|
270
|
+
return require('./tailwindcss-oxide.linux-x64-musl.node')
|
|
42
271
|
} catch (e) {
|
|
43
|
-
|
|
272
|
+
loadErrors.push(e)
|
|
44
273
|
}
|
|
45
|
-
break
|
|
46
|
-
case 'arm':
|
|
47
|
-
localFileExisted = existsSync(join(__dirname, 'tailwindcss-oxide.android-arm-eabi.node'))
|
|
48
274
|
try {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
275
|
+
const binding = require('@tailwindcss/oxide-linux-x64-musl')
|
|
276
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-linux-x64-musl/package.json').version
|
|
277
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
278
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
53
279
|
}
|
|
280
|
+
return binding
|
|
54
281
|
} catch (e) {
|
|
55
|
-
|
|
282
|
+
loadErrors.push(e)
|
|
56
283
|
}
|
|
57
|
-
|
|
58
|
-
default:
|
|
59
|
-
throw new Error(`Unsupported architecture on Android ${arch}`)
|
|
60
|
-
}
|
|
61
|
-
break
|
|
62
|
-
case 'win32':
|
|
63
|
-
switch (arch) {
|
|
64
|
-
case 'x64':
|
|
65
|
-
localFileExisted = existsSync(
|
|
66
|
-
join(__dirname, 'tailwindcss-oxide.win32-x64-msvc.node')
|
|
67
|
-
)
|
|
284
|
+
} else {
|
|
68
285
|
try {
|
|
69
|
-
|
|
70
|
-
nativeBinding = require('./tailwindcss-oxide.win32-x64-msvc.node')
|
|
71
|
-
} else {
|
|
72
|
-
nativeBinding = require('@tailwindcss/oxide-win32-x64-msvc')
|
|
73
|
-
}
|
|
286
|
+
return require('./tailwindcss-oxide.linux-x64-gnu.node')
|
|
74
287
|
} catch (e) {
|
|
75
|
-
|
|
288
|
+
loadErrors.push(e)
|
|
76
289
|
}
|
|
77
|
-
break
|
|
78
|
-
case 'ia32':
|
|
79
|
-
localFileExisted = existsSync(
|
|
80
|
-
join(__dirname, 'tailwindcss-oxide.win32-ia32-msvc.node')
|
|
81
|
-
)
|
|
82
290
|
try {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
291
|
+
const binding = require('@tailwindcss/oxide-linux-x64-gnu')
|
|
292
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-linux-x64-gnu/package.json').version
|
|
293
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
294
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
87
295
|
}
|
|
296
|
+
return binding
|
|
297
|
+
} catch (e) {
|
|
298
|
+
loadErrors.push(e)
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
} else if (process.arch === 'arm64') {
|
|
302
|
+
if (isMusl()) {
|
|
303
|
+
try {
|
|
304
|
+
return require('./tailwindcss-oxide.linux-arm64-musl.node')
|
|
88
305
|
} catch (e) {
|
|
89
|
-
|
|
306
|
+
loadErrors.push(e)
|
|
90
307
|
}
|
|
91
|
-
break
|
|
92
|
-
case 'arm64':
|
|
93
|
-
localFileExisted = existsSync(
|
|
94
|
-
join(__dirname, 'tailwindcss-oxide.win32-arm64-msvc.node')
|
|
95
|
-
)
|
|
96
308
|
try {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
309
|
+
const binding = require('@tailwindcss/oxide-linux-arm64-musl')
|
|
310
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm64-musl/package.json').version
|
|
311
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
312
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
101
313
|
}
|
|
314
|
+
return binding
|
|
102
315
|
} catch (e) {
|
|
103
|
-
|
|
316
|
+
loadErrors.push(e)
|
|
104
317
|
}
|
|
105
|
-
break
|
|
106
|
-
default:
|
|
107
|
-
throw new Error(`Unsupported architecture on Windows: ${arch}`)
|
|
108
|
-
}
|
|
109
|
-
break
|
|
110
|
-
case 'darwin':
|
|
111
|
-
localFileExisted = existsSync(join(__dirname, 'tailwindcss-oxide.darwin-universal.node'))
|
|
112
|
-
try {
|
|
113
|
-
if (localFileExisted) {
|
|
114
|
-
nativeBinding = require('./tailwindcss-oxide.darwin-universal.node')
|
|
115
318
|
} else {
|
|
116
|
-
nativeBinding = require('@tailwindcss/oxide-darwin-universal')
|
|
117
|
-
}
|
|
118
|
-
break
|
|
119
|
-
} catch {}
|
|
120
|
-
switch (arch) {
|
|
121
|
-
case 'x64':
|
|
122
|
-
localFileExisted = existsSync(join(__dirname, 'tailwindcss-oxide.darwin-x64.node'))
|
|
123
319
|
try {
|
|
124
|
-
|
|
125
|
-
nativeBinding = require('./tailwindcss-oxide.darwin-x64.node')
|
|
126
|
-
} else {
|
|
127
|
-
nativeBinding = require('@tailwindcss/oxide-darwin-x64')
|
|
128
|
-
}
|
|
320
|
+
return require('./tailwindcss-oxide.linux-arm64-gnu.node')
|
|
129
321
|
} catch (e) {
|
|
130
|
-
|
|
322
|
+
loadErrors.push(e)
|
|
131
323
|
}
|
|
132
|
-
break
|
|
133
|
-
case 'arm64':
|
|
134
|
-
localFileExisted = existsSync(
|
|
135
|
-
join(__dirname, 'tailwindcss-oxide.darwin-arm64.node')
|
|
136
|
-
)
|
|
137
324
|
try {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
325
|
+
const binding = require('@tailwindcss/oxide-linux-arm64-gnu')
|
|
326
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm64-gnu/package.json').version
|
|
327
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
328
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
142
329
|
}
|
|
330
|
+
return binding
|
|
143
331
|
} catch (e) {
|
|
144
|
-
|
|
332
|
+
loadErrors.push(e)
|
|
145
333
|
}
|
|
146
|
-
break
|
|
147
|
-
default:
|
|
148
|
-
throw new Error(`Unsupported architecture on macOS: ${arch}`)
|
|
149
|
-
}
|
|
150
|
-
break
|
|
151
|
-
case 'freebsd':
|
|
152
|
-
if (arch !== 'x64') {
|
|
153
|
-
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
|
|
154
|
-
}
|
|
155
|
-
localFileExisted = existsSync(join(__dirname, 'tailwindcss-oxide.freebsd-x64.node'))
|
|
156
|
-
try {
|
|
157
|
-
if (localFileExisted) {
|
|
158
|
-
nativeBinding = require('./tailwindcss-oxide.freebsd-x64.node')
|
|
159
|
-
} else {
|
|
160
|
-
nativeBinding = require('@tailwindcss/oxide-freebsd-x64')
|
|
161
334
|
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
case 'x64':
|
|
169
|
-
if (isMusl()) {
|
|
170
|
-
localFileExisted = existsSync(
|
|
171
|
-
join(__dirname, 'tailwindcss-oxide.linux-x64-musl.node')
|
|
172
|
-
)
|
|
173
|
-
try {
|
|
174
|
-
if (localFileExisted) {
|
|
175
|
-
nativeBinding = require('./tailwindcss-oxide.linux-x64-musl.node')
|
|
176
|
-
} else {
|
|
177
|
-
nativeBinding = require('@tailwindcss/oxide-linux-x64-musl')
|
|
178
|
-
}
|
|
179
|
-
} catch (e) {
|
|
180
|
-
loadError = e
|
|
181
|
-
}
|
|
182
|
-
} else {
|
|
183
|
-
localFileExisted = existsSync(
|
|
184
|
-
join(__dirname, 'tailwindcss-oxide.linux-x64-gnu.node')
|
|
185
|
-
)
|
|
186
|
-
try {
|
|
187
|
-
if (localFileExisted) {
|
|
188
|
-
nativeBinding = require('./tailwindcss-oxide.linux-x64-gnu.node')
|
|
189
|
-
} else {
|
|
190
|
-
nativeBinding = require('@tailwindcss/oxide-linux-x64-gnu')
|
|
191
|
-
}
|
|
192
|
-
} catch (e) {
|
|
193
|
-
loadError = e
|
|
194
|
-
}
|
|
335
|
+
} else if (process.arch === 'arm') {
|
|
336
|
+
if (isMusl()) {
|
|
337
|
+
try {
|
|
338
|
+
return require('./tailwindcss-oxide.linux-arm-musleabihf.node')
|
|
339
|
+
} catch (e) {
|
|
340
|
+
loadErrors.push(e)
|
|
195
341
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
)
|
|
202
|
-
try {
|
|
203
|
-
if (localFileExisted) {
|
|
204
|
-
nativeBinding = require('./tailwindcss-oxide.linux-arm64-musl.node')
|
|
205
|
-
} else {
|
|
206
|
-
nativeBinding = require('@tailwindcss/oxide-linux-arm64-musl')
|
|
207
|
-
}
|
|
208
|
-
} catch (e) {
|
|
209
|
-
loadError = e
|
|
342
|
+
try {
|
|
343
|
+
const binding = require('@tailwindcss/oxide-linux-arm-musleabihf')
|
|
344
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm-musleabihf/package.json').version
|
|
345
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
346
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
210
347
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
348
|
+
return binding
|
|
349
|
+
} catch (e) {
|
|
350
|
+
loadErrors.push(e)
|
|
351
|
+
}
|
|
352
|
+
} else {
|
|
353
|
+
try {
|
|
354
|
+
return require('./tailwindcss-oxide.linux-arm-gnueabihf.node')
|
|
355
|
+
} catch (e) {
|
|
356
|
+
loadErrors.push(e)
|
|
357
|
+
}
|
|
358
|
+
try {
|
|
359
|
+
const binding = require('@tailwindcss/oxide-linux-arm-gnueabihf')
|
|
360
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm-gnueabihf/package.json').version
|
|
361
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
362
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
223
363
|
}
|
|
364
|
+
return binding
|
|
365
|
+
} catch (e) {
|
|
366
|
+
loadErrors.push(e)
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
} else if (process.arch === 'loong64') {
|
|
370
|
+
if (isMusl()) {
|
|
371
|
+
try {
|
|
372
|
+
return require('./tailwindcss-oxide.linux-loong64-musl.node')
|
|
373
|
+
} catch (e) {
|
|
374
|
+
loadErrors.push(e)
|
|
224
375
|
}
|
|
225
|
-
break
|
|
226
|
-
case 'arm':
|
|
227
|
-
localFileExisted = existsSync(
|
|
228
|
-
join(__dirname, 'tailwindcss-oxide.linux-arm-gnueabihf.node')
|
|
229
|
-
)
|
|
230
376
|
try {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
377
|
+
const binding = require('@tailwindcss/oxide-linux-loong64-musl')
|
|
378
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-linux-loong64-musl/package.json').version
|
|
379
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
380
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
235
381
|
}
|
|
382
|
+
return binding
|
|
236
383
|
} catch (e) {
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
} catch (e) {
|
|
252
|
-
loadError = e
|
|
384
|
+
loadErrors.push(e)
|
|
385
|
+
}
|
|
386
|
+
} else {
|
|
387
|
+
try {
|
|
388
|
+
return require('./tailwindcss-oxide.linux-loong64-gnu.node')
|
|
389
|
+
} catch (e) {
|
|
390
|
+
loadErrors.push(e)
|
|
391
|
+
}
|
|
392
|
+
try {
|
|
393
|
+
const binding = require('@tailwindcss/oxide-linux-loong64-gnu')
|
|
394
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-linux-loong64-gnu/package.json').version
|
|
395
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
396
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
253
397
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
398
|
+
return binding
|
|
399
|
+
} catch (e) {
|
|
400
|
+
loadErrors.push(e)
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
} else if (process.arch === 'riscv64') {
|
|
404
|
+
if (isMusl()) {
|
|
405
|
+
try {
|
|
406
|
+
return require('./tailwindcss-oxide.linux-riscv64-musl.node')
|
|
407
|
+
} catch (e) {
|
|
408
|
+
loadErrors.push(e)
|
|
409
|
+
}
|
|
410
|
+
try {
|
|
411
|
+
const binding = require('@tailwindcss/oxide-linux-riscv64-musl')
|
|
412
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-linux-riscv64-musl/package.json').version
|
|
413
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
414
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
266
415
|
}
|
|
416
|
+
return binding
|
|
417
|
+
} catch (e) {
|
|
418
|
+
loadErrors.push(e)
|
|
419
|
+
}
|
|
420
|
+
} else {
|
|
421
|
+
try {
|
|
422
|
+
return require('./tailwindcss-oxide.linux-riscv64-gnu.node')
|
|
423
|
+
} catch (e) {
|
|
424
|
+
loadErrors.push(e)
|
|
267
425
|
}
|
|
268
|
-
break
|
|
269
|
-
case 's390x':
|
|
270
|
-
localFileExisted = existsSync(
|
|
271
|
-
join(__dirname, 'tailwindcss-oxide.linux-s390x-gnu.node')
|
|
272
|
-
)
|
|
273
426
|
try {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
427
|
+
const binding = require('@tailwindcss/oxide-linux-riscv64-gnu')
|
|
428
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-linux-riscv64-gnu/package.json').version
|
|
429
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
430
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
278
431
|
}
|
|
432
|
+
return binding
|
|
279
433
|
} catch (e) {
|
|
280
|
-
|
|
434
|
+
loadErrors.push(e)
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
} else if (process.arch === 'ppc64') {
|
|
438
|
+
try {
|
|
439
|
+
return require('./tailwindcss-oxide.linux-ppc64-gnu.node')
|
|
440
|
+
} catch (e) {
|
|
441
|
+
loadErrors.push(e)
|
|
442
|
+
}
|
|
443
|
+
try {
|
|
444
|
+
const binding = require('@tailwindcss/oxide-linux-ppc64-gnu')
|
|
445
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-linux-ppc64-gnu/package.json').version
|
|
446
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
447
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
281
448
|
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
449
|
+
return binding
|
|
450
|
+
} catch (e) {
|
|
451
|
+
loadErrors.push(e)
|
|
452
|
+
}
|
|
453
|
+
} else if (process.arch === 's390x') {
|
|
454
|
+
try {
|
|
455
|
+
return require('./tailwindcss-oxide.linux-s390x-gnu.node')
|
|
456
|
+
} catch (e) {
|
|
457
|
+
loadErrors.push(e)
|
|
458
|
+
}
|
|
459
|
+
try {
|
|
460
|
+
const binding = require('@tailwindcss/oxide-linux-s390x-gnu')
|
|
461
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-linux-s390x-gnu/package.json').version
|
|
462
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
463
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
464
|
+
}
|
|
465
|
+
return binding
|
|
466
|
+
} catch (e) {
|
|
467
|
+
loadErrors.push(e)
|
|
468
|
+
}
|
|
469
|
+
} else {
|
|
470
|
+
loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
|
|
285
471
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
472
|
+
} else if (process.platform === 'openharmony') {
|
|
473
|
+
if (process.arch === 'arm64') {
|
|
474
|
+
try {
|
|
475
|
+
return require('./tailwindcss-oxide.openharmony-arm64.node')
|
|
476
|
+
} catch (e) {
|
|
477
|
+
loadErrors.push(e)
|
|
478
|
+
}
|
|
479
|
+
try {
|
|
480
|
+
const binding = require('@tailwindcss/oxide-openharmony-arm64')
|
|
481
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-arm64/package.json').version
|
|
482
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
483
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
484
|
+
}
|
|
485
|
+
return binding
|
|
486
|
+
} catch (e) {
|
|
487
|
+
loadErrors.push(e)
|
|
488
|
+
}
|
|
489
|
+
} else if (process.arch === 'x64') {
|
|
490
|
+
try {
|
|
491
|
+
return require('./tailwindcss-oxide.openharmony-x64.node')
|
|
492
|
+
} catch (e) {
|
|
493
|
+
loadErrors.push(e)
|
|
494
|
+
}
|
|
495
|
+
try {
|
|
496
|
+
const binding = require('@tailwindcss/oxide-openharmony-x64')
|
|
497
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-x64/package.json').version
|
|
498
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
499
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
500
|
+
}
|
|
501
|
+
return binding
|
|
502
|
+
} catch (e) {
|
|
503
|
+
loadErrors.push(e)
|
|
504
|
+
}
|
|
505
|
+
} else if (process.arch === 'arm') {
|
|
506
|
+
try {
|
|
507
|
+
return require('./tailwindcss-oxide.openharmony-arm.node')
|
|
508
|
+
} catch (e) {
|
|
509
|
+
loadErrors.push(e)
|
|
510
|
+
}
|
|
511
|
+
try {
|
|
512
|
+
const binding = require('@tailwindcss/oxide-openharmony-arm')
|
|
513
|
+
const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-arm/package.json').version
|
|
514
|
+
if (bindingPackageVersion !== '0.0.0-insiders.0113b88' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
515
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.0113b88 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
516
|
+
}
|
|
517
|
+
return binding
|
|
518
|
+
} catch (e) {
|
|
519
|
+
loadErrors.push(e)
|
|
520
|
+
}
|
|
521
|
+
} else {
|
|
522
|
+
loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`))
|
|
523
|
+
}
|
|
524
|
+
} else {
|
|
525
|
+
loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
nativeBinding = requireNative()
|
|
530
|
+
|
|
531
|
+
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
532
|
+
let wasiBinding = null
|
|
533
|
+
let wasiBindingError = null
|
|
534
|
+
try {
|
|
535
|
+
wasiBinding = require('./tailwindcss-oxide.wasi.cjs')
|
|
536
|
+
nativeBinding = wasiBinding
|
|
537
|
+
} catch (err) {
|
|
538
|
+
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
539
|
+
wasiBindingError = err
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
if (!nativeBinding) {
|
|
543
|
+
try {
|
|
544
|
+
wasiBinding = require('@tailwindcss/oxide-wasm32-wasi')
|
|
545
|
+
nativeBinding = wasiBinding
|
|
546
|
+
} catch (err) {
|
|
547
|
+
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
548
|
+
wasiBindingError.cause = err
|
|
549
|
+
loadErrors.push(err)
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
if (process.env.NAPI_RS_FORCE_WASI === 'error' && !wasiBinding) {
|
|
554
|
+
const error = new Error('WASI binding not found and NAPI_RS_FORCE_WASI is set to error')
|
|
555
|
+
error.cause = wasiBindingError
|
|
556
|
+
throw error
|
|
557
|
+
}
|
|
289
558
|
}
|
|
290
559
|
|
|
291
560
|
if (!nativeBinding) {
|
|
292
|
-
if (
|
|
293
|
-
throw
|
|
561
|
+
if (loadErrors.length > 0) {
|
|
562
|
+
throw new Error(
|
|
563
|
+
`Cannot find native binding. ` +
|
|
564
|
+
`npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
|
|
565
|
+
'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
|
|
566
|
+
{
|
|
567
|
+
cause: loadErrors.reduce((err, cur) => {
|
|
568
|
+
cur.cause = err
|
|
569
|
+
return cur
|
|
570
|
+
}),
|
|
571
|
+
},
|
|
572
|
+
)
|
|
294
573
|
}
|
|
295
574
|
throw new Error(`Failed to load native binding`)
|
|
296
575
|
}
|
|
297
576
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
module.exports.clearCache = clearCache
|
|
301
|
-
module.exports.scanDir = scanDir
|
|
302
|
-
module.exports.IO = IO
|
|
303
|
-
module.exports.Parsing = Parsing
|
|
304
|
-
module.exports.scanFiles = scanFiles
|
|
577
|
+
module.exports = nativeBinding
|
|
578
|
+
module.exports.Scanner = nativeBinding.Scanner
|
package/package.json
CHANGED
|
@@ -1,25 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailwindcss/oxide",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-insiders.0113b88",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",
|
|
7
|
+
"directory": "crates/node"
|
|
8
|
+
},
|
|
4
9
|
"main": "index.js",
|
|
5
10
|
"types": "index.d.ts",
|
|
6
11
|
"napi": {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
"binaryName": "tailwindcss-oxide",
|
|
13
|
+
"packageName": "@tailwindcss/oxide",
|
|
14
|
+
"targets": [
|
|
15
|
+
"armv7-linux-androideabi",
|
|
16
|
+
"aarch64-linux-android",
|
|
17
|
+
"aarch64-apple-darwin",
|
|
18
|
+
"aarch64-unknown-linux-gnu",
|
|
19
|
+
"aarch64-unknown-linux-musl",
|
|
20
|
+
"armv7-unknown-linux-gnueabihf",
|
|
21
|
+
"x86_64-unknown-linux-musl",
|
|
22
|
+
"x86_64-unknown-freebsd",
|
|
23
|
+
"i686-pc-windows-msvc",
|
|
24
|
+
"aarch64-pc-windows-msvc",
|
|
25
|
+
"wasm32-wasip1-threads"
|
|
26
|
+
],
|
|
27
|
+
"wasm": {
|
|
28
|
+
"initialMemory": 16384,
|
|
29
|
+
"browser": {
|
|
30
|
+
"fs": true
|
|
31
|
+
}
|
|
18
32
|
}
|
|
19
33
|
},
|
|
20
34
|
"license": "MIT",
|
|
21
35
|
"devDependencies": {
|
|
22
|
-
"@napi-rs/cli": "^
|
|
36
|
+
"@napi-rs/cli": "^3.3.0",
|
|
37
|
+
"@napi-rs/wasm-runtime": "^1.0.7",
|
|
38
|
+
"emnapi": "1.5.0"
|
|
23
39
|
},
|
|
24
40
|
"engines": {
|
|
25
41
|
"node": ">= 10"
|
|
@@ -28,22 +44,32 @@
|
|
|
28
44
|
"index.js",
|
|
29
45
|
"index.d.ts"
|
|
30
46
|
],
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"provenance": true,
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
31
51
|
"optionalDependencies": {
|
|
32
|
-
"@tailwindcss/oxide-
|
|
33
|
-
"@tailwindcss/oxide-darwin-x64": "0.0.0-
|
|
34
|
-
"@tailwindcss/oxide-
|
|
35
|
-
"@tailwindcss/oxide-linux-
|
|
36
|
-
"@tailwindcss/oxide-linux-arm64-
|
|
37
|
-
"@tailwindcss/oxide-
|
|
38
|
-
"@tailwindcss/oxide-linux-x64-gnu": "0.0.0-
|
|
39
|
-
"@tailwindcss/oxide-linux-x64-musl": "0.0.0-
|
|
40
|
-
"@tailwindcss/oxide-
|
|
52
|
+
"@tailwindcss/oxide-android-arm64": "0.0.0-insiders.0113b88",
|
|
53
|
+
"@tailwindcss/oxide-darwin-x64": "0.0.0-insiders.0113b88",
|
|
54
|
+
"@tailwindcss/oxide-linux-arm-gnueabihf": "0.0.0-insiders.0113b88",
|
|
55
|
+
"@tailwindcss/oxide-linux-arm64-gnu": "0.0.0-insiders.0113b88",
|
|
56
|
+
"@tailwindcss/oxide-linux-arm64-musl": "0.0.0-insiders.0113b88",
|
|
57
|
+
"@tailwindcss/oxide-darwin-arm64": "0.0.0-insiders.0113b88",
|
|
58
|
+
"@tailwindcss/oxide-linux-x64-gnu": "0.0.0-insiders.0113b88",
|
|
59
|
+
"@tailwindcss/oxide-linux-x64-musl": "0.0.0-insiders.0113b88",
|
|
60
|
+
"@tailwindcss/oxide-freebsd-x64": "0.0.0-insiders.0113b88",
|
|
61
|
+
"@tailwindcss/oxide-win32-arm64-msvc": "0.0.0-insiders.0113b88",
|
|
62
|
+
"@tailwindcss/oxide-wasm32-wasi": "0.0.0-insiders.0113b88",
|
|
63
|
+
"@tailwindcss/oxide-win32-x64-msvc": "0.0.0-insiders.0113b88"
|
|
41
64
|
},
|
|
42
65
|
"scripts": {
|
|
43
|
-
"
|
|
44
|
-
"build": "
|
|
66
|
+
"build": "pnpm run build:platform && pnpm run build:wasm",
|
|
67
|
+
"build:platform": "napi build --platform --release",
|
|
68
|
+
"postbuild:platform": "node ./scripts/move-artifacts.mjs",
|
|
69
|
+
"build:wasm": "napi build --release --target wasm32-wasip1-threads",
|
|
70
|
+
"postbuild:wasm": "node ./scripts/move-artifacts.mjs",
|
|
45
71
|
"dev": "cargo watch --quiet --shell 'npm run build'",
|
|
46
|
-
"build:debug": "
|
|
47
|
-
"version": "
|
|
72
|
+
"build:debug": "napi build --platform",
|
|
73
|
+
"version": "napi version"
|
|
48
74
|
}
|
|
49
75
|
}
|