Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wotb-rs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nodes
typescript
wotb-rs
Commits
ce9b80de
Commit
ce9b80de
authored
7 years ago
by
nanocryk
Browse files
Options
Downloads
Patches
Plain Diff
changed JsInteger to JsNumber (JsInteger is gone in neon 0.1.21)
parent
f0546226
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
native/Cargo.lock
+26
-10
26 additions, 10 deletions
native/Cargo.lock
native/Cargo.toml
+2
-2
2 additions, 2 deletions
native/Cargo.toml
native/src/lib.rs
+39
-39
39 additions, 39 deletions
native/src/lib.rs
package.json
+1
-1
1 addition, 1 deletion
package.json
yarn.lock
+27
-54
27 additions, 54 deletions
yarn.lock
with
95 additions
and
106 deletions
native/Cargo.lock
+
26
−
10
View file @
ce9b80de
...
...
@@ -3,8 +3,8 @@ name = "duniter-rs-wotb-js"
version = "0.0.0"
dependencies = [
"duniter-rs-wotb 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"neon 0.1.2
0
(registry+https://github.com/rust-lang/crates.io-index)",
"neon-build 0.1.2
0
(registry+https://github.com/rust-lang/crates.io-index)",
"neon 0.1.2
1
(registry+https://github.com/rust-lang/crates.io-index)",
"neon-build 0.1.2
1
(registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
...
...
@@ -69,22 +69,23 @@ dependencies = [
[[package]]
name = "neon"
version = "0.1.2
0
"
version = "0.1.2
1
"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cslice 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"neon-build 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
"neon-runtime 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
"neon-build 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
"neon-runtime 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "neon-build"
version = "0.1.2
0
"
version = "0.1.2
1
"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "neon-runtime"
version = "0.1.2
0
"
version = "0.1.2
1
"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cslice 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
...
...
@@ -114,6 +115,19 @@ name = "regex-syntax"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "semver"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "semver-parser"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde"
version = "1.0.19"
...
...
@@ -198,12 +212,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum lazy_static 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c9e5e58fa1a4c3b915a561a78a22ee0cac6ab97dca2504428bc1cb074375f8d5"
"checksum libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "5ba3df4dcb460b9dfbd070d41c94c19209620c191b0340b929ce748a2bcd42d2"
"checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a"
"checksum neon 0.1.2
0
(registry+https://github.com/rust-lang/crates.io-index)" = "
993372f453e05590ecf8ce5d63ec905836e8b8c4b504c56a55ea4b31ab8d198e
"
"checksum neon-build 0.1.2
0
(registry+https://github.com/rust-lang/crates.io-index)" = "
d098a268ae7508a1196c87bf3cf0f5835247d4e1babc07ccf01b4535b74394cb
"
"checksum neon-runtime 0.1.2
0
(registry+https://github.com/rust-lang/crates.io-index)" = "
f85b6c58cdd80613db616fe7ca8318ca6414d4af1ad49d80481a525bc1c6d905
"
"checksum neon 0.1.2
1
(registry+https://github.com/rust-lang/crates.io-index)" = "
db10beb9c26bc6e505075387aaa7251d8d65076f06acfe85ef4df728ed5785b7
"
"checksum neon-build 0.1.2
1
(registry+https://github.com/rust-lang/crates.io-index)" = "
e137cafeb2297a81d4c3e41a7c703570459c49a7c0a1623a4925e2a9fdb3eeb9
"
"checksum neon-runtime 0.1.2
1
(registry+https://github.com/rust-lang/crates.io-index)" = "
d8fa795c92c21498f215ee610671b2cc9260dbb5e02239e6b2d91f42d6d98014
"
"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
"checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b"
"checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db"
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
"checksum serde 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "0c9cab69e16835717c9b8bd13c29f92b6aa34fe32ce2866b1ab481cf2da8442a"
"checksum serde_derive 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "3bdafe3e71710131a919735916caa5b18c2754ad0d33d8ae5d586ccc804a403e"
"checksum serde_derive_internals 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32f1926285523b2db55df263d2aa4eb69ddcfa7a7eade6430323637866b513ab"
...
...
This diff is collapsed.
Click to expand it.
native/Cargo.toml
+
2
−
2
View file @
ce9b80de
...
...
@@ -10,8 +10,8 @@ name = "duniter_rs_wotb_js"
crate-type
=
[
"dylib"
]
[build-dependencies]
neon-build
=
"0.1.2
0
"
neon-build
=
"0.1.2
1
"
[dependencies]
neon
=
"0.1.2
0
"
neon
=
"0.1.2
1
"
duniter-rs-wotb
=
"0.3.2"
This diff is collapsed.
Click to expand it.
native/src/lib.rs
+
39
−
39
View file @
ce9b80de
...
...
@@ -6,7 +6,7 @@ extern crate duniter_rs_wotb;
use
std
::
path
::
Path
;
use
neon
::
js
::{
Value
,
JsInteger
,
JsString
,
JsBoolean
,
JsFunction
,
JsArray
,
JsNumber
,
JsObject
,
use
neon
::
js
::{
Value
,
JsString
,
JsBoolean
,
JsFunction
,
JsArray
,
JsNumber
,
JsObject
,
Object
};
use
neon
::
js
::
class
::{
Class
,
JsClass
};
use
neon
::
mem
::
Handle
;
...
...
@@ -22,10 +22,10 @@ declare_types! {
let
scope
=
call
.scope
;
let
arg0
=
try!
(
call
.arguments
.require
(
scope
,
0
));
if
let
Some
(
max_cert
)
=
arg0
.downcast
::
<
Js
Integ
er
>
()
{
if
let
Some
(
max_cert
)
=
arg0
.downcast
::
<
Js
Numb
er
>
()
{
let
max_cert
=
max_cert
.value
();
match
max_cert
>
0
{
match
max_cert
>
0
.0
{
true
=>
Ok
(
WebOfTrust
::
new
(
max_cert
as
usize
)),
false
=>
Err
(
Throw
),
}
...
...
@@ -65,7 +65,7 @@ declare_types! {
wot
.add_node
()
});
Ok
(
Js
Integ
er
::
new
(
scope
,
*
id
as
i32
)
.upcast
())
Ok
(
Js
Numb
er
::
new
(
scope
,
*
id
as
f64
)
.upcast
())
}
method
removeNode
(
call
)
{
...
...
@@ -73,19 +73,19 @@ declare_types! {
let
id
=
call
.arguments
.this
(
scope
)
.grab
(|
wot
|
{
match
wot
.remove_node
()
{
Some
(
id
)
=>
*
id
as
i32
,
None
=>
-
1
,
Some
(
id
)
=>
*
id
as
f64
,
None
=>
-
1
f64
,
}
});
Ok
(
Js
Integ
er
::
new
(
scope
,
id
)
.upcast
())
Ok
(
Js
Numb
er
::
new
(
scope
,
id
)
.upcast
())
}
method
getSentries
(
call
)
{
let
scope
=
call
.scope
;
let
arg0
=
try!
(
call
.arguments
.require
(
scope
,
0
));
let
d_min
=
try!
(
arg0
.check
::
<
Js
Integ
er
>
())
.value
()
as
usize
;
let
d_min
=
try!
(
arg0
.check
::
<
Js
Numb
er
>
())
.value
()
as
usize
;
let
array
=
call
.arguments
.this
(
scope
)
.grab
(|
wot
|
{
wot
.get_sentries
(
d_min
)
...
...
@@ -94,7 +94,7 @@ declare_types! {
let
jsarray
:
Handle
<
JsArray
>
=
JsArray
::
new
(
scope
,
array
.len
()
as
u32
);
for
(
index
,
&
item
)
in
array
.iter
()
.enumerate
()
{
try!
(
jsarray
.set
(
index
as
u32
,
Js
Integ
er
::
new
(
scope
,
*
item
as
i32
)));
try!
(
jsarray
.set
(
index
as
u32
,
Js
Numb
er
::
new
(
scope
,
*
item
as
f64
)));
}
Ok
(
jsarray
.upcast
())
...
...
@@ -104,7 +104,7 @@ declare_types! {
let
scope
=
call
.scope
;
let
arg0
=
try!
(
call
.arguments
.require
(
scope
,
0
));
let
d_min
=
try!
(
arg0
.check
::
<
Js
Integ
er
>
())
.value
()
as
usize
;
let
d_min
=
try!
(
arg0
.check
::
<
Js
Numb
er
>
())
.value
()
as
usize
;
let
array
=
call
.arguments
.this
(
scope
)
.grab
(|
wot
|
{
wot
.get_non_sentries
(
d_min
)
...
...
@@ -113,7 +113,7 @@ declare_types! {
let
jsarray
:
Handle
<
JsArray
>
=
JsArray
::
new
(
scope
,
array
.len
()
as
u32
);
for
(
index
,
&
item
)
in
array
.iter
()
.enumerate
()
{
try!
(
jsarray
.set
(
index
as
u32
,
Js
Integ
er
::
new
(
scope
,
*
item
as
i32
)));
try!
(
jsarray
.set
(
index
as
u32
,
Js
Numb
er
::
new
(
scope
,
*
item
as
f64
)));
}
Ok
(
jsarray
.upcast
())
...
...
@@ -129,7 +129,7 @@ declare_types! {
let
jsarray
:
Handle
<
JsArray
>
=
JsArray
::
new
(
scope
,
array
.len
()
as
u32
);
for
(
index
,
&
item
)
in
array
.iter
()
.enumerate
()
{
try!
(
jsarray
.set
(
index
as
u32
,
Js
Integ
er
::
new
(
scope
,
*
item
as
i32
)));
try!
(
jsarray
.set
(
index
as
u32
,
Js
Numb
er
::
new
(
scope
,
*
item
as
f64
)));
}
Ok
(
jsarray
.upcast
())
...
...
@@ -138,9 +138,9 @@ declare_types! {
method
getPaths
(
call
)
{
let
scope
=
call
.scope
;
let
from
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
usize
;
let
to
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
1
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
usize
;
let
k_max
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
2
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
u32
;
let
from
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
usize
;
let
to
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
1
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
usize
;
let
k_max
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
2
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
u32
;
let
paths
=
call
.arguments
.this
(
scope
)
.grab
(|
wot
|
{
wot
.get_paths
(
NodeId
(
from
),
NodeId
(
to
),
k_max
)
...
...
@@ -152,7 +152,7 @@ declare_types! {
let
inner_jsarray
:
Handle
<
JsArray
>
=
JsArray
::
new
(
scope
,
inner_array
.len
()
as
u32
);
for
(
inner_index
,
&
item
)
in
inner_array
.iter
()
.enumerate
()
{
try!
(
inner_jsarray
.set
(
inner_index
as
u32
,
Js
Integ
er
::
new
(
scope
,
*
item
as
i32
)));
try!
(
inner_jsarray
.set
(
inner_index
as
u32
,
Js
Numb
er
::
new
(
scope
,
*
item
as
f64
)));
}
try!
(
jsarray
.set
(
index
as
u32
,
inner_jsarray
));
...
...
@@ -168,13 +168,13 @@ declare_types! {
wot
.size
()
});
Ok
(
Js
Integ
er
::
new
(
scope
,
size
as
i32
)
.upcast
())
Ok
(
Js
Numb
er
::
new
(
scope
,
size
as
f64
)
.upcast
())
}
method
isEnabled
(
call
)
{
let
scope
=
call
.scope
;
let
node
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
usize
;
let
node
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
usize
;
match
call
.arguments
.this
(
scope
)
.grab
(|
wot
|
{
wot
.is_enabled
(
NodeId
(
node
))
...
...
@@ -187,7 +187,7 @@ declare_types! {
method
setEnabled
(
call
)
{
let
scope
=
call
.scope
;
let
node
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
usize
;
let
node
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
usize
;
let
state
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
1
))
.check
::
<
JsBoolean
>
())
.value
();
match
call
.arguments
.this
(
scope
)
.grab
(|
wot
|
{
...
...
@@ -201,15 +201,15 @@ declare_types! {
method
addLink
(
call
)
{
let
scope
=
call
.scope
;
let
from
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
usize
;
let
to
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
1
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
usize
;
let
from
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
usize
;
let
to
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
1
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
usize
;
match
call
.arguments
.this
(
scope
)
.grab
(|
wot
|
{
wot
.add_link
(
NodeId
(
from
),
NodeId
(
to
))
})
{
NewLinkResult
::
Ok
(
count
)
|
NewLinkResult
::
AlreadyCertified
(
count
)
|
NewLinkResult
::
AllCertificationsUsed
(
count
)
=>
Ok
(
Js
Integ
er
::
new
(
scope
,
count
as
i32
)
.upcast
()),
NewLinkResult
::
AllCertificationsUsed
(
count
)
=>
Ok
(
Js
Numb
er
::
new
(
scope
,
count
as
f64
)
.upcast
()),
_
=>
Err
(
Throw
),
}
}
...
...
@@ -217,13 +217,13 @@ declare_types! {
method
removeLink
(
call
)
{
let
scope
=
call
.scope
;
let
from
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
usize
;
let
to
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
1
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
usize
;
let
from
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
usize
;
let
to
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
1
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
usize
;
match
call
.arguments
.this
(
scope
)
.grab
(|
wot
|
{
wot
.remove_link
(
NodeId
(
from
),
NodeId
(
to
))
})
{
RemovedLinkResult
::
Removed
(
count
)
=>
Ok
(
Js
Integ
er
::
new
(
scope
,
count
as
i32
)
.upcast
()),
RemovedLinkResult
::
Removed
(
count
)
=>
Ok
(
Js
Numb
er
::
new
(
scope
,
count
as
f64
)
.upcast
()),
_
=>
Err
(
Throw
),
}
}
...
...
@@ -231,8 +231,8 @@ declare_types! {
method
existsLink
(
call
)
{
let
scope
=
call
.scope
;
let
from
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
usize
;
let
to
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
1
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
usize
;
let
from
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
usize
;
let
to
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
1
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
usize
;
let
result
=
call
.arguments
.this
(
scope
)
.grab
(|
wot
|
{
wot
.exists_link
(
NodeId
(
from
),
NodeId
(
to
))
...
...
@@ -244,9 +244,9 @@ declare_types! {
method
isOutdistanced
(
call
)
{
let
scope
=
call
.scope
;
let
node
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
usize
;
let
d_min
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
1
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
u32
;
let
d_max
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
2
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
u32
;
let
node
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
usize
;
let
d_min
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
1
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
u32
;
let
d_max
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
2
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
u32
;
let
x_percent
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
3
))
.check
::
<
JsNumber
>
())
.value
()
as
f64
;
match
call
.arguments
.this
(
scope
)
.grab
(|
wot
|
{
...
...
@@ -260,7 +260,7 @@ declare_types! {
method
setMaxCert
(
call
)
{
let
scope
=
call
.scope
;
let
max_cert
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
usize
;
let
max_cert
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
usize
;
call
.arguments
.this
(
scope
)
.grab
(|
wot
|
{
wot
.max_cert
=
max_cert
;
...
...
@@ -276,15 +276,15 @@ declare_types! {
wot
.max_cert
});
Ok
(
Js
Integ
er
::
new
(
scope
,
max_cert
as
i32
)
.upcast
())
Ok
(
Js
Numb
er
::
new
(
scope
,
max_cert
as
f64
)
.upcast
())
}
method
detailedDistance
(
call
)
{
let
scope
=
call
.scope
;
let
node
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
usize
;
let
d_min
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
1
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
u32
;
let
d_max
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
2
))
.check
::
<
Js
Integ
er
>
())
.value
()
as
u32
;
let
node
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
0
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
usize
;
let
d_min
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
1
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
u32
;
let
d_max
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
2
))
.check
::
<
Js
Numb
er
>
())
.value
()
as
u32
;
let
x_percent
=
try!
(
try!
(
call
.arguments
.require
(
scope
,
3
))
.check
::
<
JsNumber
>
())
.value
()
as
f64
;
let
wot_distance
=
call
.arguments
.this
(
scope
)
.grab
(|
wot
|
{
...
...
@@ -292,9 +292,9 @@ declare_types! {
});
let
jsobject
=
JsObject
::
new
(
scope
);
try!
(
jsobject
.set
(
"nbReached"
,
Js
Integ
er
::
new
(
scope
,
wot_distance
.reached
as
i32
)));
try!
(
jsobject
.set
(
"nbSuccess"
,
Js
Integ
er
::
new
(
scope
,
wot_distance
.success
as
i32
)));
try!
(
jsobject
.set
(
"nbSentries"
,
Js
Integ
er
::
new
(
scope
,
wot_distance
.sentries
as
i32
)));
try!
(
jsobject
.set
(
"nbReached"
,
Js
Numb
er
::
new
(
scope
,
wot_distance
.reached
as
f64
)));
try!
(
jsobject
.set
(
"nbSuccess"
,
Js
Numb
er
::
new
(
scope
,
wot_distance
.success
as
f64
)));
try!
(
jsobject
.set
(
"nbSentries"
,
Js
Numb
er
::
new
(
scope
,
wot_distance
.sentries
as
f64
)));
try!
(
jsobject
.set
(
"isOutdistanced"
,
JsBoolean
::
new
(
scope
,
wot_distance
.outdistanced
)));
Ok
(
jsobject
.upcast
())
...
...
@@ -306,7 +306,7 @@ declare_types! {
let
class
:
Handle
<
JsClass
<
JsWebOfTrust
>>
=
try!
(
JsWebOfTrust
::
class
(
scope
));
let
constructor
:
Handle
<
JsFunction
<
JsWebOfTrust
>>
=
try!
(
class
.constructor
(
scope
));
let
ctor_args
=
vec!
[
Js
Integ
er
::
new
(
scope
,
1
)];
let
ctor_args
=
vec!
[
Js
Numb
er
::
new
(
scope
,
1
f64
)];
let
mut
new_jswot
:
Handle
<
JsWebOfTrust
>
=
try!
(
constructor
.construct
(
scope
,
ctor_args
));
...
...
This diff is collapsed.
Click to expand it.
package.json
+
1
−
1
View file @
ce9b80de
...
...
@@ -10,7 +10,7 @@
"author"
:
"nanocryk <nanocryk@gmail.com>"
,
"license"
:
"
GPL-3.0
"
,
"dependencies"
:
{
"
neon-cli
"
:
"
^0.1.2
0
"
,
"
neon-cli
"
:
"
^0.1.2
1
"
,
"
aws-sdk
"
:
"
2.2.43
"
,
"
mocha
"
:
"
2.2.5
"
,
"
should
"
:
"
8.1.1
"
...
...
This diff is collapsed.
Click to expand it.
yarn.lock
+
27
−
54
View file @
ce9b80de
...
...
@@ -28,18 +28,10 @@ ansi-escapes@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92"
ansi-regex@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
ansi-regex@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
ansi-styles@^3.1.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88"
...
...
@@ -81,9 +73,9 @@ brace-expansion@^1.1.7:
balanced-match "^1.0.0"
concat-map "0.0.1"
builtins@
0
.0.
7
:
version "
0
.0.
7
"
resolved "https://registry.yarnpkg.com/builtins/-/builtins-
0
.0.
7
.tgz#
355219cd6cf18dbe7c01cc7fd2dce765cfdc549a
"
builtins@
^1
.0.
3
:
version "
1
.0.
3
"
resolved "https://registry.yarnpkg.com/builtins/-/builtins-
1
.0.
3
.tgz#
cb94faeb61c8696451db36534e1422f94f0aee88
"
camelcase@^1.0.2:
version "1.2.1"
...
...
@@ -96,16 +88,6 @@ center-align@^0.1.1:
align-text "^0.1.3"
lazy-cache "^1.0.3"
chalk@^1.1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
dependencies:
ansi-styles "^2.2.1"
escape-string-regexp "^1.0.2"
has-ansi "^2.0.0"
strip-ansi "^3.0.0"
supports-color "^2.0.0"
chalk@^2.0.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba"
...
...
@@ -114,6 +96,14 @@ chalk@^2.0.0:
escape-string-regexp "^1.0.5"
supports-color "^4.0.0"
chalk@~2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e"
dependencies:
ansi-styles "^3.1.0"
escape-string-regexp "^1.0.5"
supports-color "^4.0.0"
cli-cursor@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
...
...
@@ -199,7 +189,7 @@ escape-string-regexp@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1"
escape-string-regexp@^1.0.2,
escape-string-regexp@^1.0.5:
escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
...
...
@@ -271,12 +261,6 @@ handlebars@^4.0.3:
optionalDependencies:
uglify-js "^2.6"
has-ansi@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
dependencies:
ansi-regex "^2.0.0"
has-flag@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51"
...
...
@@ -285,10 +269,6 @@ iconv-lite@^0.4.17:
version "0.4.19"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
in-publish@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51"
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
...
...
@@ -439,27 +419,26 @@ mute-stream@0.0.7:
version "0.0.7"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
neon-cli@^0.1.2
0
:
version "0.1.2
0
"
resolved "https://registry.yarnpkg.com/neon-cli/-/neon-cli-0.1.2
0
.tgz#
a5cbec90ea305c140e5bcb4feda15890fe0edcb8
"
neon-cli@^0.1.2
1
:
version "0.1.2
1
"
resolved "https://registry.yarnpkg.com/neon-cli/-/neon-cli-0.1.2
1
.tgz#
8167d5bebc6ff69d62c06af28adcffe75e365cdb
"
dependencies:
chalk "
^1
.1.
1
"
chalk "
~2
.1.
0
"
command-line-args "^4.0.2"
command-line-commands "^2.0.0"
command-line-usage "^4.0.0"
git-config "0.0.7"
handlebars "^4.0.3"
in-publish "^2.0.0"
inquirer "^3.0.6"
mkdirp "^0.5.1"
quickly-copy-file "^1.0.0"
rimraf "^2.6.1"
rsvp "^
3.1.0
"
rsvp "^
4.6.1
"
semver "^5.1.0"
toml "^2.3.0"
ts-typed-json "^0.2.2"
validate-npm-package-license "^3.0.1"
validate-npm-package-name "^
2.2.2
"
validate-npm-package-name "^
3.0.0
"
once@^1.3.0:
version "1.4.0"
...
...
@@ -521,10 +500,14 @@ rimraf@^2.6.1:
dependencies:
glob "^7.0.5"
rsvp@^3.1.0,
rsvp@^3.5.0:
rsvp@^3.5.0:
version "3.6.2"
resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a"
rsvp@^4.6.1:
version "4.7.0"
resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.7.0.tgz#dc1b0b1a536f7dec9d2be45e0a12ad4197c9fd96"
run-async@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
...
...
@@ -616,22 +599,12 @@ string-width@^2.1.0:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^4.0.0"
strip-ansi@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
dependencies:
ansi-regex "^2.0.0"
strip-ansi@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
dependencies:
ansi-regex "^3.0.0"
supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
supports-color@^4.0.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b"
...
...
@@ -707,11 +680,11 @@ validate-npm-package-license@^3.0.1:
spdx-correct "~1.0.0"
spdx-expression-parse "~1.0.0"
validate-npm-package-name@^
2.2.2
:
version "
2.2.2
"
resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-
2.2.2.tgz#f65695b22f7324442019a3c7fa39a6e7fd299085
"
validate-npm-package-name@^
3.0.0
:
version "
3.0.0
"
resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-
3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e
"
dependencies:
builtins "
0
.0.
7
"
builtins "
^1
.0.
3
"
window-size@0.1.0:
version "0.1.0"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment