@tailwindcss/oxide
Advanced tools
+68
-53
@@ -6,5 +6,2 @@ // prettier-ignore | ||
| const { createRequire } = require('node:module') | ||
| require = createRequire(__filename) | ||
| const { readFileSync } = require('node:fs') | ||
@@ -84,4 +81,4 @@ let nativeBinding = null | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-android-arm64/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -101,4 +98,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-android-arm-eabi/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -114,3 +111,20 @@ return binding | ||
| if (process.arch === 'x64') { | ||
| if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') { | ||
| try { | ||
| return require('./tailwindcss-oxide.win32-x64-gnu.node') | ||
| } catch (e) { | ||
| loadErrors.push(e) | ||
| } | ||
| try { | ||
| const binding = require('@tailwindcss/oxide-win32-x64-gnu') | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-win32-x64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
| return binding | ||
| } catch (e) { | ||
| loadErrors.push(e) | ||
| } | ||
| } else { | ||
| try { | ||
| return require('./tailwindcss-oxide.win32-x64-msvc.node') | ||
@@ -123,4 +137,4 @@ } catch (e) { | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-win32-x64-msvc/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -131,2 +145,3 @@ return binding | ||
| } | ||
| } | ||
| } else if (process.arch === 'ia32') { | ||
@@ -141,4 +156,4 @@ try { | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-win32-ia32-msvc/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -158,4 +173,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-win32-arm64-msvc/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -178,4 +193,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-darwin-universal/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -195,4 +210,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-darwin-x64/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -212,4 +227,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-darwin-arm64/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -233,4 +248,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-freebsd-x64/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -250,4 +265,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-freebsd-arm64/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -272,4 +287,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-linux-x64-musl/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -289,4 +304,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-linux-x64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -308,4 +323,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm64-musl/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -325,4 +340,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -344,4 +359,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm-musleabihf/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -361,4 +376,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm-gnueabihf/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -380,4 +395,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-linux-loong64-musl/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -397,4 +412,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-linux-loong64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -416,4 +431,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-linux-riscv64-musl/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -433,4 +448,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-linux-riscv64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -451,4 +466,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-linux-ppc64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -468,4 +483,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-linux-s390x-gnu/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -489,4 +504,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-arm64/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -506,4 +521,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-x64/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -523,4 +538,4 @@ return binding | ||
| const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-arm/package.json').version | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d96a48e' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d96a48e but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '0.0.0-insiders.d979daa' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 0.0.0-insiders.d979daa but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -527,0 +542,0 @@ return binding |
+18
-24
| { | ||
| "name": "@tailwindcss/oxide", | ||
| "version": "0.0.0-insiders.d96a48e", | ||
| "version": "0.0.0-insiders.d979daa", | ||
| "repository": { | ||
@@ -35,10 +35,6 @@ "type": "git", | ||
| "license": "MIT", | ||
| "dependencies": { | ||
| "tar": "^7.5.1", | ||
| "detect-libc": "^2.0.4" | ||
| }, | ||
| "devDependencies": { | ||
| "@napi-rs/cli": "^3.2.0", | ||
| "@napi-rs/wasm-runtime": "^1.0.5", | ||
| "emnapi": "1.5.0" | ||
| "@napi-rs/cli": "^3.4.1", | ||
| "@napi-rs/wasm-runtime": "^1.1.0", | ||
| "emnapi": "1.7.1" | ||
| }, | ||
@@ -50,4 +46,3 @@ "engines": { | ||
| "index.js", | ||
| "index.d.ts", | ||
| "scripts/install.js" | ||
| "index.d.ts" | ||
| ], | ||
@@ -59,14 +54,14 @@ "publishConfig": { | ||
| "optionalDependencies": { | ||
| "@tailwindcss/oxide-darwin-arm64": "0.0.0-insiders.d96a48e", | ||
| "@tailwindcss/oxide-freebsd-x64": "0.0.0-insiders.d96a48e", | ||
| "@tailwindcss/oxide-linux-arm-gnueabihf": "0.0.0-insiders.d96a48e", | ||
| "@tailwindcss/oxide-android-arm64": "0.0.0-insiders.d96a48e", | ||
| "@tailwindcss/oxide-linux-arm64-musl": "0.0.0-insiders.d96a48e", | ||
| "@tailwindcss/oxide-linux-arm64-gnu": "0.0.0-insiders.d96a48e", | ||
| "@tailwindcss/oxide-darwin-x64": "0.0.0-insiders.d96a48e", | ||
| "@tailwindcss/oxide-linux-x64-gnu": "0.0.0-insiders.d96a48e", | ||
| "@tailwindcss/oxide-linux-x64-musl": "0.0.0-insiders.d96a48e", | ||
| "@tailwindcss/oxide-win32-x64-msvc": "0.0.0-insiders.d96a48e", | ||
| "@tailwindcss/oxide-wasm32-wasi": "0.0.0-insiders.d96a48e", | ||
| "@tailwindcss/oxide-win32-arm64-msvc": "0.0.0-insiders.d96a48e" | ||
| "@tailwindcss/oxide-android-arm64": "0.0.0-insiders.d979daa", | ||
| "@tailwindcss/oxide-darwin-arm64": "0.0.0-insiders.d979daa", | ||
| "@tailwindcss/oxide-darwin-x64": "0.0.0-insiders.d979daa", | ||
| "@tailwindcss/oxide-freebsd-x64": "0.0.0-insiders.d979daa", | ||
| "@tailwindcss/oxide-linux-arm-gnueabihf": "0.0.0-insiders.d979daa", | ||
| "@tailwindcss/oxide-linux-arm64-musl": "0.0.0-insiders.d979daa", | ||
| "@tailwindcss/oxide-linux-arm64-gnu": "0.0.0-insiders.d979daa", | ||
| "@tailwindcss/oxide-linux-x64-musl": "0.0.0-insiders.d979daa", | ||
| "@tailwindcss/oxide-win32-arm64-msvc": "0.0.0-insiders.d979daa", | ||
| "@tailwindcss/oxide-win32-x64-msvc": "0.0.0-insiders.d979daa", | ||
| "@tailwindcss/oxide-linux-x64-gnu": "0.0.0-insiders.d979daa", | ||
| "@tailwindcss/oxide-wasm32-wasi": "0.0.0-insiders.d979daa" | ||
| }, | ||
@@ -81,5 +76,4 @@ "scripts": { | ||
| "build:debug": "napi build --platform", | ||
| "version": "napi version", | ||
| "postinstall": "node ./scripts/install.js" | ||
| "version": "napi version" | ||
| } | ||
| } |
| #!/usr/bin/env node | ||
| /** | ||
| * @tailwindcss/oxide postinstall script | ||
| * | ||
| * This script ensures that the correct binary for the current platform and | ||
| * architecture is downloaded and available. | ||
| */ | ||
| const fs = require('fs') | ||
| const path = require('path') | ||
| const https = require('https') | ||
| const { extract } = require('tar') | ||
| const packageJson = require('../package.json') | ||
| const detectLibc = require('detect-libc') | ||
| const version = packageJson.version | ||
| function getPlatformPackageName() { | ||
| let platform = process.platform | ||
| let arch = process.arch | ||
| let libc = '' | ||
| if (platform === 'linux') { | ||
| libc = detectLibc.isNonGlibcLinuxSync() ? 'musl' : 'gnu' | ||
| } | ||
| // Map to our package naming conventions | ||
| switch (platform) { | ||
| case 'darwin': | ||
| return arch === 'arm64' ? '@tailwindcss/oxide-darwin-arm64' : '@tailwindcss/oxide-darwin-x64' | ||
| case 'win32': | ||
| if (arch === 'arm64') return '@tailwindcss/oxide-win32-arm64-msvc' | ||
| if (arch === 'ia32') return '@tailwindcss/oxide-win32-ia32-msvc' | ||
| return '@tailwindcss/oxide-win32-x64-msvc' | ||
| case 'linux': | ||
| if (arch === 'x64') { | ||
| return libc === 'musl' | ||
| ? '@tailwindcss/oxide-linux-x64-musl' | ||
| : '@tailwindcss/oxide-linux-x64-gnu' | ||
| } else if (arch === 'arm64') { | ||
| return libc === 'musl' | ||
| ? '@tailwindcss/oxide-linux-arm64-musl' | ||
| : '@tailwindcss/oxide-linux-arm64-gnu' | ||
| } else if (arch === 'arm') { | ||
| return '@tailwindcss/oxide-linux-arm-gnueabihf' | ||
| } | ||
| break | ||
| case 'freebsd': | ||
| return '@tailwindcss/oxide-freebsd-x64' | ||
| case 'android': | ||
| return '@tailwindcss/oxide-android-arm64' | ||
| default: | ||
| return '@tailwindcss/oxide-wasm32-wasi' | ||
| } | ||
| } | ||
| function isPackageAvailable(packageName) { | ||
| try { | ||
| require.resolve(packageName) | ||
| return true | ||
| } catch (e) { | ||
| return false | ||
| } | ||
| } | ||
| // Extract all files from a tarball to a destination directory | ||
| async function extractTarball(tarballStream, destDir) { | ||
| if (!fs.existsSync(destDir)) { | ||
| fs.mkdirSync(destDir, { recursive: true }) | ||
| } | ||
| return new Promise((resolve, reject) => { | ||
| tarballStream | ||
| .pipe(extract({ cwd: destDir, strip: 1 })) | ||
| .on('error', (err) => reject(err)) | ||
| .on('end', () => resolve()) | ||
| }) | ||
| } | ||
| async function downloadAndExtractBinary(packageName) { | ||
| let tarballUrl = `https://registry.npmjs.org/${packageName}/-/${packageName.replace('@tailwindcss/', '')}-${version}.tgz` | ||
| console.log(`Downloading ${tarballUrl}...`) | ||
| return new Promise((resolve) => { | ||
| https | ||
| .get(tarballUrl, (response) => { | ||
| if (response.statusCode === 302 || response.statusCode === 301) { | ||
| // Handle redirects | ||
| https.get(response.headers.location, handleResponse).on('error', (err) => { | ||
| console.error('Download error:', err) | ||
| resolve() | ||
| }) | ||
| return | ||
| } | ||
| handleResponse(response) | ||
| async function handleResponse(response) { | ||
| try { | ||
| if (response.statusCode !== 200) { | ||
| throw new Error(`Download failed with status code: ${response.statusCode}`) | ||
| } | ||
| await extractTarball( | ||
| response, | ||
| path.join(__dirname, '..', 'node_modules', ...packageName.split('/')), | ||
| ) | ||
| console.log(`Successfully downloaded and installed ${packageName}`) | ||
| } catch (error) { | ||
| console.error('Error during extraction:', error) | ||
| resolve() | ||
| } finally { | ||
| resolve() | ||
| } | ||
| } | ||
| }) | ||
| .on('error', (err) => { | ||
| console.error('Download error:', err) | ||
| resolve() | ||
| }) | ||
| }) | ||
| } | ||
| async function main() { | ||
| // Don't run this script in the package source | ||
| try { | ||
| if (fs.existsSync(path.join(__dirname, '..', 'build.rs'))) { | ||
| return | ||
| } | ||
| let packageName = getPlatformPackageName() | ||
| if (!packageName) return | ||
| if (isPackageAvailable(packageName)) return | ||
| await downloadAndExtractBinary(packageName) | ||
| } catch (error) { | ||
| console.error(error) | ||
| return | ||
| } | ||
| } | ||
| main() |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed or built. Malicious packages often use scripts that run automatically to execute payloads or fetch additional code.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
12
-14.29%0
-100%1
-66.67%29897
-10.11%4
-20%607
-15.22%60
1.69%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed