Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
InventivetalentDev committed Aug 17, 2024
1 parent ef35b0c commit 1b061d2
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 65 deletions.
108 changes: 54 additions & 54 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@ switch (platform) {
case 'android':
switch (arch) {
case 'arm64':
localFileExisted = existsSync(join(__dirname, 'mineskin-hash-rust.android-arm64.node'))
localFileExisted = existsSync(join(__dirname, '@mineskin/hash-rust.android-arm64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.android-arm64.node')
nativeBinding = require('./@mineskin/hash-rust.android-arm64.node')
} else {
nativeBinding = require('mineskin-hash-rust-android-arm64')
nativeBinding = require('@mineskin/hash-rust-android-arm64')
}
} catch (e) {
loadError = e
}
break
case 'arm':
localFileExisted = existsSync(join(__dirname, 'mineskin-hash-rust.android-arm-eabi.node'))
localFileExisted = existsSync(join(__dirname, '@mineskin/hash-rust.android-arm-eabi.node'))
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.android-arm-eabi.node')
nativeBinding = require('./@mineskin/hash-rust.android-arm-eabi.node')
} else {
nativeBinding = require('mineskin-hash-rust-android-arm-eabi')
nativeBinding = require('@mineskin/hash-rust-android-arm-eabi')
}
} catch (e) {
loadError = e
Expand All @@ -63,41 +63,41 @@ switch (platform) {
switch (arch) {
case 'x64':
localFileExisted = existsSync(
join(__dirname, 'mineskin-hash-rust.win32-x64-msvc.node')
join(__dirname, '@mineskin/hash-rust.win32-x64-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.win32-x64-msvc.node')
nativeBinding = require('./@mineskin/hash-rust.win32-x64-msvc.node')
} else {
nativeBinding = require('mineskin-hash-rust-win32-x64-msvc')
nativeBinding = require('@mineskin/hash-rust-win32-x64-msvc')
}
} catch (e) {
loadError = e
}
break
case 'ia32':
localFileExisted = existsSync(
join(__dirname, 'mineskin-hash-rust.win32-ia32-msvc.node')
join(__dirname, '@mineskin/hash-rust.win32-ia32-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.win32-ia32-msvc.node')
nativeBinding = require('./@mineskin/hash-rust.win32-ia32-msvc.node')
} else {
nativeBinding = require('mineskin-hash-rust-win32-ia32-msvc')
nativeBinding = require('@mineskin/hash-rust-win32-ia32-msvc')
}
} catch (e) {
loadError = e
}
break
case 'arm64':
localFileExisted = existsSync(
join(__dirname, 'mineskin-hash-rust.win32-arm64-msvc.node')
join(__dirname, '@mineskin/hash-rust.win32-arm64-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.win32-arm64-msvc.node')
nativeBinding = require('./@mineskin/hash-rust.win32-arm64-msvc.node')
} else {
nativeBinding = require('mineskin-hash-rust-win32-arm64-msvc')
nativeBinding = require('@mineskin/hash-rust-win32-arm64-msvc')
}
} catch (e) {
loadError = e
Expand All @@ -108,37 +108,37 @@ switch (platform) {
}
break
case 'darwin':
localFileExisted = existsSync(join(__dirname, 'mineskin-hash-rust.darwin-universal.node'))
localFileExisted = existsSync(join(__dirname, '@mineskin/hash-rust.darwin-universal.node'))
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.darwin-universal.node')
nativeBinding = require('./@mineskin/hash-rust.darwin-universal.node')
} else {
nativeBinding = require('mineskin-hash-rust-darwin-universal')
nativeBinding = require('@mineskin/hash-rust-darwin-universal')
}
break
} catch {}
switch (arch) {
case 'x64':
localFileExisted = existsSync(join(__dirname, 'mineskin-hash-rust.darwin-x64.node'))
localFileExisted = existsSync(join(__dirname, '@mineskin/hash-rust.darwin-x64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.darwin-x64.node')
nativeBinding = require('./@mineskin/hash-rust.darwin-x64.node')
} else {
nativeBinding = require('mineskin-hash-rust-darwin-x64')
nativeBinding = require('@mineskin/hash-rust-darwin-x64')
}
} catch (e) {
loadError = e
}
break
case 'arm64':
localFileExisted = existsSync(
join(__dirname, 'mineskin-hash-rust.darwin-arm64.node')
join(__dirname, '@mineskin/hash-rust.darwin-arm64.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.darwin-arm64.node')
nativeBinding = require('./@mineskin/hash-rust.darwin-arm64.node')
} else {
nativeBinding = require('mineskin-hash-rust-darwin-arm64')
nativeBinding = require('@mineskin/hash-rust-darwin-arm64')
}
} catch (e) {
loadError = e
Expand All @@ -152,12 +152,12 @@ switch (platform) {
if (arch !== 'x64') {
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
}
localFileExisted = existsSync(join(__dirname, 'mineskin-hash-rust.freebsd-x64.node'))
localFileExisted = existsSync(join(__dirname, '@mineskin/hash-rust.freebsd-x64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.freebsd-x64.node')
nativeBinding = require('./@mineskin/hash-rust.freebsd-x64.node')
} else {
nativeBinding = require('mineskin-hash-rust-freebsd-x64')
nativeBinding = require('@mineskin/hash-rust-freebsd-x64')
}
} catch (e) {
loadError = e
Expand All @@ -168,26 +168,26 @@ switch (platform) {
case 'x64':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'mineskin-hash-rust.linux-x64-musl.node')
join(__dirname, '@mineskin/hash-rust.linux-x64-musl.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.linux-x64-musl.node')
nativeBinding = require('./@mineskin/hash-rust.linux-x64-musl.node')
} else {
nativeBinding = require('mineskin-hash-rust-linux-x64-musl')
nativeBinding = require('@mineskin/hash-rust-linux-x64-musl')
}
} catch (e) {
loadError = e
}
} else {
localFileExisted = existsSync(
join(__dirname, 'mineskin-hash-rust.linux-x64-gnu.node')
join(__dirname, '@mineskin/hash-rust.linux-x64-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.linux-x64-gnu.node')
nativeBinding = require('./@mineskin/hash-rust.linux-x64-gnu.node')
} else {
nativeBinding = require('mineskin-hash-rust-linux-x64-gnu')
nativeBinding = require('@mineskin/hash-rust-linux-x64-gnu')
}
} catch (e) {
loadError = e
Expand All @@ -197,26 +197,26 @@ switch (platform) {
case 'arm64':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'mineskin-hash-rust.linux-arm64-musl.node')
join(__dirname, '@mineskin/hash-rust.linux-arm64-musl.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.linux-arm64-musl.node')
nativeBinding = require('./@mineskin/hash-rust.linux-arm64-musl.node')
} else {
nativeBinding = require('mineskin-hash-rust-linux-arm64-musl')
nativeBinding = require('@mineskin/hash-rust-linux-arm64-musl')
}
} catch (e) {
loadError = e
}
} else {
localFileExisted = existsSync(
join(__dirname, 'mineskin-hash-rust.linux-arm64-gnu.node')
join(__dirname, '@mineskin/hash-rust.linux-arm64-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.linux-arm64-gnu.node')
nativeBinding = require('./@mineskin/hash-rust.linux-arm64-gnu.node')
} else {
nativeBinding = require('mineskin-hash-rust-linux-arm64-gnu')
nativeBinding = require('@mineskin/hash-rust-linux-arm64-gnu')
}
} catch (e) {
loadError = e
Expand All @@ -226,26 +226,26 @@ switch (platform) {
case 'arm':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'mineskin-hash-rust.linux-arm-musleabihf.node')
join(__dirname, '@mineskin/hash-rust.linux-arm-musleabihf.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.linux-arm-musleabihf.node')
nativeBinding = require('./@mineskin/hash-rust.linux-arm-musleabihf.node')
} else {
nativeBinding = require('mineskin-hash-rust-linux-arm-musleabihf')
nativeBinding = require('@mineskin/hash-rust-linux-arm-musleabihf')
}
} catch (e) {
loadError = e
}
} else {
localFileExisted = existsSync(
join(__dirname, 'mineskin-hash-rust.linux-arm-gnueabihf.node')
join(__dirname, '@mineskin/hash-rust.linux-arm-gnueabihf.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.linux-arm-gnueabihf.node')
nativeBinding = require('./@mineskin/hash-rust.linux-arm-gnueabihf.node')
} else {
nativeBinding = require('mineskin-hash-rust-linux-arm-gnueabihf')
nativeBinding = require('@mineskin/hash-rust-linux-arm-gnueabihf')
}
} catch (e) {
loadError = e
Expand All @@ -255,26 +255,26 @@ switch (platform) {
case 'riscv64':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'mineskin-hash-rust.linux-riscv64-musl.node')
join(__dirname, '@mineskin/hash-rust.linux-riscv64-musl.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.linux-riscv64-musl.node')
nativeBinding = require('./@mineskin/hash-rust.linux-riscv64-musl.node')
} else {
nativeBinding = require('mineskin-hash-rust-linux-riscv64-musl')
nativeBinding = require('@mineskin/hash-rust-linux-riscv64-musl')
}
} catch (e) {
loadError = e
}
} else {
localFileExisted = existsSync(
join(__dirname, 'mineskin-hash-rust.linux-riscv64-gnu.node')
join(__dirname, '@mineskin/hash-rust.linux-riscv64-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.linux-riscv64-gnu.node')
nativeBinding = require('./@mineskin/hash-rust.linux-riscv64-gnu.node')
} else {
nativeBinding = require('mineskin-hash-rust-linux-riscv64-gnu')
nativeBinding = require('@mineskin/hash-rust-linux-riscv64-gnu')
}
} catch (e) {
loadError = e
Expand All @@ -283,13 +283,13 @@ switch (platform) {
break
case 's390x':
localFileExisted = existsSync(
join(__dirname, 'mineskin-hash-rust.linux-s390x-gnu.node')
join(__dirname, '@mineskin/hash-rust.linux-s390x-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./mineskin-hash-rust.linux-s390x-gnu.node')
nativeBinding = require('./@mineskin/hash-rust.linux-s390x-gnu.node')
} else {
nativeBinding = require('mineskin-hash-rust-linux-s390x-gnu')
nativeBinding = require('@mineskin/hash-rust-linux-s390x-gnu')
}
} catch (e) {
loadError = e
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "mineskin-hash-rust",
"name": "@mineskin/hash-rust",
"version": "0.0.0",
"main": "index.js",
"types": "index.d.ts",
"napi": {
"name": "mineskin-hash-rust",
"name": "@mineskin/hash-rust",
"triples": {}
},
"license": "MIT",
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ __metadata:
languageName: node
linkType: hard

"@mineskin/hash-rust@workspace:.":
version: 0.0.0-use.local
resolution: "@mineskin/hash-rust@workspace:."
dependencies:
"@napi-rs/cli": "npm:^2.18.4"
ava: "npm:^6.0.1"
languageName: unknown
linkType: soft

"@napi-rs/cli@npm:^2.18.4":
version: 2.18.4
resolution: "@napi-rs/cli@npm:2.18.4"
Expand Down Expand Up @@ -955,15 +964,6 @@ __metadata:
languageName: node
linkType: hard

"mineskin-hash-rust@workspace:.":
version: 0.0.0-use.local
resolution: "mineskin-hash-rust@workspace:."
dependencies:
"@napi-rs/cli": "npm:^2.18.4"
ava: "npm:^6.0.1"
languageName: unknown
linkType: soft

"minimatch@npm:^3.1.1":
version: 3.1.2
resolution: "minimatch@npm:3.1.2"
Expand Down

0 comments on commit 1b061d2

Please sign in to comment.