@browsersync/bslive 0.0.5 → 0.0.7
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/Cargo.toml +4 -18
- package/bin.js +5 -0
- package/bslive/Cargo.toml +20 -0
- package/bslive/src/lib.rs +14 -0
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/package.json +22 -19
- package/src/lib.rs +0 -9
- /package/{build.rs → bslive/build.rs} +0 -0
package/Cargo.toml
CHANGED
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
[
|
|
2
|
-
|
|
3
|
-
name = "bslive"
|
|
4
|
-
version = "0.0.0"
|
|
1
|
+
workspace.members = ["bslive"]
|
|
2
|
+
workspace.resolver = "2"
|
|
5
3
|
|
|
6
|
-
[
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
[dependencies]
|
|
10
|
-
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
|
|
11
|
-
napi = { version = "2.12.2", default-features = false, features = ["napi4"] }
|
|
12
|
-
napi-derive = "2.12.2"
|
|
13
|
-
|
|
14
|
-
[build-dependencies]
|
|
15
|
-
napi-build = "2.0.1"
|
|
16
|
-
|
|
17
|
-
[profile.release]
|
|
18
|
-
lto = true
|
|
19
|
-
strip = "symbols"
|
|
4
|
+
[workspace.dependencies]
|
|
5
|
+
tokio = { version = "1.37.0", features = ["full"] }
|
package/bin.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
edition = "2021"
|
|
3
|
+
name = "bslive"
|
|
4
|
+
version = "0.0.0"
|
|
5
|
+
|
|
6
|
+
[lib]
|
|
7
|
+
crate-type = ["cdylib"]
|
|
8
|
+
|
|
9
|
+
[dependencies]
|
|
10
|
+
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
|
|
11
|
+
napi = { version = "2.12.2", default-features = false, features = ["napi4", "tokio_rt", "tokio_full"] }
|
|
12
|
+
napi-derive = "2.12.2"
|
|
13
|
+
tokio = { workspace = true }
|
|
14
|
+
|
|
15
|
+
[build-dependencies]
|
|
16
|
+
napi-build = "2.0.1"
|
|
17
|
+
|
|
18
|
+
[profile.release]
|
|
19
|
+
lto = true
|
|
20
|
+
strip = "symbols"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#![deny(clippy::all)]
|
|
2
|
+
|
|
3
|
+
#[macro_use]
|
|
4
|
+
extern crate napi_derive;
|
|
5
|
+
|
|
6
|
+
use std::time::Duration;
|
|
7
|
+
use tokio::time::sleep;
|
|
8
|
+
|
|
9
|
+
#[napi]
|
|
10
|
+
async fn start(args: Vec<String>) -> napi::bindgen_prelude::Result<i32> {
|
|
11
|
+
println!("{:?}", args);
|
|
12
|
+
sleep(Duration::from_secs(2)).await;
|
|
13
|
+
Ok(32)
|
|
14
|
+
}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@browsersync/bslive",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
|
+
"bin": {
|
|
7
|
+
"bslive": "./bin.js"
|
|
8
|
+
},
|
|
6
9
|
"napi": {
|
|
7
10
|
"name": "bslive",
|
|
8
11
|
"triples": {
|
|
@@ -36,29 +39,29 @@
|
|
|
36
39
|
},
|
|
37
40
|
"scripts": {
|
|
38
41
|
"artifacts": "napi artifacts",
|
|
39
|
-
"build": "napi build --platform --release",
|
|
40
|
-
"build:debug": "napi build --platform",
|
|
42
|
+
"build": "napi build --cargo-name bslive --platform --release",
|
|
43
|
+
"build:debug": "napi build --cargo-name bslive --platform",
|
|
41
44
|
"prepublishOnly": "napi prepublish -t npm",
|
|
42
45
|
"test": "ava",
|
|
43
46
|
"universal": "napi universal",
|
|
44
47
|
"version": "napi version"
|
|
45
48
|
},
|
|
46
49
|
"optionalDependencies": {
|
|
47
|
-
"@browsersync/bslive-win32-x64-msvc": "0.0.
|
|
48
|
-
"@browsersync/bslive-darwin-x64": "0.0.
|
|
49
|
-
"@browsersync/bslive-linux-x64-gnu": "0.0.
|
|
50
|
-
"@browsersync/bslive-darwin-arm64": "0.0.
|
|
51
|
-
"@browsersync/bslive-android-arm64": "0.0.
|
|
52
|
-
"@browsersync/bslive-linux-arm64-gnu": "0.0.
|
|
53
|
-
"@browsersync/bslive-linux-arm64-musl": "0.0.
|
|
54
|
-
"@browsersync/bslive-win32-arm64-msvc": "0.0.
|
|
55
|
-
"@browsersync/bslive-linux-arm-gnueabihf": "0.0.
|
|
56
|
-
"@browsersync/bslive-linux-arm-musleabihf": "0.0.
|
|
57
|
-
"@browsersync/bslive-linux-x64-musl": "0.0.
|
|
58
|
-
"@browsersync/bslive-freebsd-x64": "0.0.
|
|
59
|
-
"@browsersync/bslive-win32-ia32-msvc": "0.0.
|
|
60
|
-
"@browsersync/bslive-android-arm-eabi": "0.0.
|
|
61
|
-
"@browsersync/bslive-darwin-universal": "0.0.
|
|
62
|
-
"@browsersync/bslive-linux-riscv64-gnu": "0.0.
|
|
50
|
+
"@browsersync/bslive-win32-x64-msvc": "0.0.7",
|
|
51
|
+
"@browsersync/bslive-darwin-x64": "0.0.7",
|
|
52
|
+
"@browsersync/bslive-linux-x64-gnu": "0.0.7",
|
|
53
|
+
"@browsersync/bslive-darwin-arm64": "0.0.7",
|
|
54
|
+
"@browsersync/bslive-android-arm64": "0.0.7",
|
|
55
|
+
"@browsersync/bslive-linux-arm64-gnu": "0.0.7",
|
|
56
|
+
"@browsersync/bslive-linux-arm64-musl": "0.0.7",
|
|
57
|
+
"@browsersync/bslive-win32-arm64-msvc": "0.0.7",
|
|
58
|
+
"@browsersync/bslive-linux-arm-gnueabihf": "0.0.7",
|
|
59
|
+
"@browsersync/bslive-linux-arm-musleabihf": "0.0.7",
|
|
60
|
+
"@browsersync/bslive-linux-x64-musl": "0.0.7",
|
|
61
|
+
"@browsersync/bslive-freebsd-x64": "0.0.7",
|
|
62
|
+
"@browsersync/bslive-win32-ia32-msvc": "0.0.7",
|
|
63
|
+
"@browsersync/bslive-android-arm-eabi": "0.0.7",
|
|
64
|
+
"@browsersync/bslive-darwin-universal": "0.0.7",
|
|
65
|
+
"@browsersync/bslive-linux-riscv64-gnu": "0.0.7"
|
|
63
66
|
}
|
|
64
67
|
}
|
package/src/lib.rs
DELETED
|
File without changes
|