@tailwindcss/oxide 4.0.0-alpha.9 → 4.0.0-beta.10
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/index.d.ts +21 -18
- package/index.js +27 -16
- package/package.json +20 -18
package/index.d.ts
CHANGED
|
@@ -4,31 +4,34 @@
|
|
|
4
4
|
/* auto-generated by NAPI-RS */
|
|
5
5
|
|
|
6
6
|
export interface ChangedContent {
|
|
7
|
+
/** File path to the changed file */
|
|
7
8
|
file?: string
|
|
9
|
+
/** Contents of the changed file */
|
|
8
10
|
content?: string
|
|
11
|
+
/** File extension */
|
|
9
12
|
extension: string
|
|
10
13
|
}
|
|
11
|
-
export interface ScanResult {
|
|
12
|
-
globs: Array<GlobEntry>
|
|
13
|
-
files: Array<string>
|
|
14
|
-
candidates: Array<string>
|
|
15
|
-
}
|
|
16
14
|
export interface GlobEntry {
|
|
15
|
+
/** Base path of the glob */
|
|
17
16
|
base: string
|
|
18
|
-
|
|
17
|
+
/** Glob pattern */
|
|
18
|
+
pattern: string
|
|
19
19
|
}
|
|
20
|
-
export interface
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
export interface ScannerOptions {
|
|
21
|
+
/** Glob sources */
|
|
22
|
+
sources?: Array<GlobEntry>
|
|
23
23
|
}
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
export interface CandidateWithPosition {
|
|
25
|
+
/** The candidate string */
|
|
26
|
+
candidate: string
|
|
27
|
+
/** The position of the candidate inside the content file */
|
|
28
|
+
position: number
|
|
29
29
|
}
|
|
30
|
-
export
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
export declare class Scanner {
|
|
31
|
+
constructor(opts: ScannerOptions)
|
|
32
|
+
scan(): Array<string>
|
|
33
|
+
scanFiles(input: Array<ChangedContent>): Array<string>
|
|
34
|
+
getCandidatesWithPositions(input: ChangedContent): Array<CandidateWithPosition>
|
|
35
|
+
get files(): Array<string>
|
|
36
|
+
get globs(): Array<GlobEntry>
|
|
33
37
|
}
|
|
34
|
-
export function scanFiles(input: Array<ChangedContent>, strategy: number): Array<string>
|
package/index.js
CHANGED
|
@@ -224,17 +224,32 @@ switch (platform) {
|
|
|
224
224
|
}
|
|
225
225
|
break
|
|
226
226
|
case 'arm':
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
227
|
+
if (isMusl()) {
|
|
228
|
+
localFileExisted = existsSync(
|
|
229
|
+
join(__dirname, 'tailwindcss-oxide.linux-arm-musleabihf.node')
|
|
230
|
+
)
|
|
231
|
+
try {
|
|
232
|
+
if (localFileExisted) {
|
|
233
|
+
nativeBinding = require('./tailwindcss-oxide.linux-arm-musleabihf.node')
|
|
234
|
+
} else {
|
|
235
|
+
nativeBinding = require('@tailwindcss/oxide-linux-arm-musleabihf')
|
|
236
|
+
}
|
|
237
|
+
} catch (e) {
|
|
238
|
+
loadError = e
|
|
239
|
+
}
|
|
240
|
+
} else {
|
|
241
|
+
localFileExisted = existsSync(
|
|
242
|
+
join(__dirname, 'tailwindcss-oxide.linux-arm-gnueabihf.node')
|
|
243
|
+
)
|
|
244
|
+
try {
|
|
245
|
+
if (localFileExisted) {
|
|
246
|
+
nativeBinding = require('./tailwindcss-oxide.linux-arm-gnueabihf.node')
|
|
247
|
+
} else {
|
|
248
|
+
nativeBinding = require('@tailwindcss/oxide-linux-arm-gnueabihf')
|
|
249
|
+
}
|
|
250
|
+
} catch (e) {
|
|
251
|
+
loadError = e
|
|
235
252
|
}
|
|
236
|
-
} catch (e) {
|
|
237
|
-
loadError = e
|
|
238
253
|
}
|
|
239
254
|
break
|
|
240
255
|
case 'riscv64':
|
|
@@ -295,10 +310,6 @@ if (!nativeBinding) {
|
|
|
295
310
|
throw new Error(`Failed to load native binding`)
|
|
296
311
|
}
|
|
297
312
|
|
|
298
|
-
const {
|
|
313
|
+
const { Scanner } = nativeBinding
|
|
299
314
|
|
|
300
|
-
module.exports.
|
|
301
|
-
module.exports.scanDir = scanDir
|
|
302
|
-
module.exports.IO = IO
|
|
303
|
-
module.exports.Parsing = Parsing
|
|
304
|
-
module.exports.scanFiles = scanFiles
|
|
315
|
+
module.exports.Scanner = Scanner
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailwindcss/oxide",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-beta.10",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",
|
|
7
|
-
"directory": "
|
|
7
|
+
"directory": "crates/node"
|
|
8
8
|
},
|
|
9
9
|
"main": "index.js",
|
|
10
10
|
"types": "index.d.ts",
|
|
@@ -20,13 +20,14 @@
|
|
|
20
20
|
"armv7-unknown-linux-gnueabihf",
|
|
21
21
|
"x86_64-unknown-linux-musl",
|
|
22
22
|
"x86_64-unknown-freebsd",
|
|
23
|
-
"i686-pc-windows-msvc"
|
|
23
|
+
"i686-pc-windows-msvc",
|
|
24
|
+
"aarch64-pc-windows-msvc"
|
|
24
25
|
]
|
|
25
26
|
}
|
|
26
27
|
},
|
|
27
28
|
"license": "MIT",
|
|
28
29
|
"devDependencies": {
|
|
29
|
-
"@napi-rs/cli": "^2.
|
|
30
|
+
"@napi-rs/cli": "^2.18.4"
|
|
30
31
|
},
|
|
31
32
|
"engines": {
|
|
32
33
|
"node": ">= 10"
|
|
@@ -40,22 +41,23 @@
|
|
|
40
41
|
"access": "public"
|
|
41
42
|
},
|
|
42
43
|
"optionalDependencies": {
|
|
43
|
-
"@tailwindcss/oxide-
|
|
44
|
-
"@tailwindcss/oxide-
|
|
45
|
-
"@tailwindcss/oxide-
|
|
46
|
-
"@tailwindcss/oxide-
|
|
47
|
-
"@tailwindcss/oxide-linux-
|
|
48
|
-
"@tailwindcss/oxide-linux-
|
|
49
|
-
"@tailwindcss/oxide-
|
|
50
|
-
"@tailwindcss/oxide-
|
|
51
|
-
"@tailwindcss/oxide-
|
|
52
|
-
"@tailwindcss/oxide-
|
|
44
|
+
"@tailwindcss/oxide-android-arm64": "4.0.0-beta.10",
|
|
45
|
+
"@tailwindcss/oxide-freebsd-x64": "4.0.0-beta.10",
|
|
46
|
+
"@tailwindcss/oxide-linux-arm64-musl": "4.0.0-beta.10",
|
|
47
|
+
"@tailwindcss/oxide-linux-x64-gnu": "4.0.0-beta.10",
|
|
48
|
+
"@tailwindcss/oxide-linux-arm64-gnu": "4.0.0-beta.10",
|
|
49
|
+
"@tailwindcss/oxide-linux-x64-musl": "4.0.0-beta.10",
|
|
50
|
+
"@tailwindcss/oxide-darwin-x64": "4.0.0-beta.10",
|
|
51
|
+
"@tailwindcss/oxide-win32-x64-msvc": "4.0.0-beta.10",
|
|
52
|
+
"@tailwindcss/oxide-win32-arm64-msvc": "4.0.0-beta.10",
|
|
53
|
+
"@tailwindcss/oxide-darwin-arm64": "4.0.0-beta.10",
|
|
54
|
+
"@tailwindcss/oxide-linux-arm-gnueabihf": "4.0.0-beta.10"
|
|
53
55
|
},
|
|
54
56
|
"scripts": {
|
|
55
|
-
"artifacts": "
|
|
56
|
-
"build": "
|
|
57
|
+
"artifacts": "napi artifacts",
|
|
58
|
+
"build": "napi build --platform --release --no-const-enum",
|
|
57
59
|
"dev": "cargo watch --quiet --shell 'npm run build'",
|
|
58
|
-
"build:debug": "
|
|
59
|
-
"version": "
|
|
60
|
+
"build:debug": "napi build --platform --no-const-enum",
|
|
61
|
+
"version": "napi version"
|
|
60
62
|
}
|
|
61
63
|
}
|