@ohos-ports/node-rs-bcrypt-openharmony-arm64 2.0.0-beta.0 → 2.0.0-beta.2
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/README.md +18 -12
- package/bcrypt.openharmony-arm64.node +0 -0
- package/index.js +2 -8
- package/package.json +14 -16
- package/bcrypt.android-arm64.node +0 -0
package/README.md
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
# `@ohos-ports/node-rs-bcrypt-openharmony-arm64`
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
Rust bcrypt binding — **openharmony/arm64** binary for `@node-rs/bcrypt`.
|
|
4
|
+
|
|
5
|
+
This is a port of the `@node-rs/bcrypt-darwin-x64@2.0.0` slot package: the original
|
|
6
|
+
`bcrypt.darwin-x64.node` (Mach-O x86-64) was replaced by `bcrypt.openharmony-arm64.node`,
|
|
7
|
+
rebuilt from the upstream Rust source ([napi-rs/node-rs](https://github.com/napi-rs/node-rs)
|
|
8
|
+
@ `b706e303`, `packages/bcrypt`) with the OHOS Rust toolchain for
|
|
9
|
+
`aarch64-unknown-linux-ohos`, and signed for openharmony. `os`/`cpu` in `package.json`
|
|
10
|
+
are set to `openharmony`/`arm64` so the host `@node-rs/bcrypt` loader can use it on
|
|
11
|
+
HarmonyOS.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
Install together with the host package `@node-rs/bcrypt` (its `binding.js`
|
|
16
|
+
`openharmony`/`arm64` branch resolves this slot package). Or require directly:
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
const { hashSync, verifySync } = require('@ohos-ports/node-rs-bcrypt-openharmony-arm64')
|
|
20
|
+
```
|
|
Binary file
|
package/index.js
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// HarmonyOS (openharmony) loads the locally compiled native binary;
|
|
4
|
-
// all other platforms fall back to the original prebuilt binary.
|
|
5
|
-
module.exports =
|
|
6
|
-
process.platform === 'openharmony'
|
|
7
|
-
? require('./bcrypt.openharmony-arm64.node')
|
|
8
|
-
: require('./bcrypt.android-arm64.node');
|
|
1
|
+
// HarmonyOS (openharmony) loader: loads the ohos-compiled native binary
|
|
2
|
+
module.exports = require('./bcrypt.openharmony-arm64.node')
|
package/package.json
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohos-ports/node-rs-bcrypt-openharmony-arm64",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
4
|
-
"
|
|
5
|
-
"arm64"
|
|
6
|
-
],
|
|
7
|
-
"main": "index.js",
|
|
8
|
-
"files": [
|
|
9
|
-
"bcrypt.android-arm64.node",
|
|
10
|
-
"index.js",
|
|
11
|
-
"bcrypt.openharmony-arm64.node"
|
|
12
|
-
],
|
|
13
|
-
"description": "Rust bcrypt binding (openharmony arm64 port of @node-rs/bcrypt-android-arm64@2.0.0, compiled from source napi-rs/node-rs for aarch64-unknown-linux-ohos)",
|
|
3
|
+
"version": "2.0.0-beta.2",
|
|
4
|
+
"description": "Rust bcrypt binding (port of @node-rs/bcrypt-darwin-x64@2.0.0 slot, compiled from source napi-rs/node-rs b706e303 for openharmony arm64)",
|
|
14
5
|
"keywords": [
|
|
15
6
|
"N-API",
|
|
16
7
|
"auth",
|
|
@@ -25,6 +16,17 @@
|
|
|
25
16
|
"author": "LongYinan <lynweklm@gmail.com>",
|
|
26
17
|
"homepage": "https://github.com/napi-rs/node-rs",
|
|
27
18
|
"license": "MIT",
|
|
19
|
+
"main": "./index.js",
|
|
20
|
+
"files": [
|
|
21
|
+
"index.js",
|
|
22
|
+
"bcrypt.openharmony-arm64.node"
|
|
23
|
+
],
|
|
24
|
+
"os": [
|
|
25
|
+
"openharmony"
|
|
26
|
+
],
|
|
27
|
+
"cpu": [
|
|
28
|
+
"arm64"
|
|
29
|
+
],
|
|
28
30
|
"engines": {
|
|
29
31
|
"node": ">= 10"
|
|
30
32
|
},
|
|
@@ -39,9 +41,5 @@
|
|
|
39
41
|
"publishConfig": {
|
|
40
42
|
"registry": "https://registry.npmjs.org/",
|
|
41
43
|
"access": "public"
|
|
42
|
-
}
|
|
43
|
-
"os": [
|
|
44
|
-
"android",
|
|
45
|
-
"openharmony"
|
|
46
|
-
]
|
|
44
|
+
}
|
|
47
45
|
}
|
|
Binary file
|