isomorfeus-speednode 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -8
- data/lib/isomorfeus/speednode/runtime/vm.rb +5 -1
- data/lib/isomorfeus/speednode/runtime.rb +5 -5
- data/lib/isomorfeus/speednode/version.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87a39ac56870791f30d5da2cd2421132b54360e732596b487a674fd77985bfb4
|
4
|
+
data.tar.gz: e9f56a2e8f8596e7757da194b70fe299ec63566472da5e81188a997b6fb54558
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5710791bcc21e6694223d430ef943d526819a7159442003285ab0e12c07cf168856394a2eaf825edd82aca5d96b3da609322694237d9cbb069e4a25d97ddf63
|
7
|
+
data.tar.gz: 1dac21aab4f330ba546ae5389facd15858120109ae7996b955108c39bbb004f72ca612c63c8fd78b485c4a723fd9c03ddc6bdeddaf87766f92b213090c51e37a
|
data/README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
|
1
|
+
<h1 align="center">
|
2
|
+
<img src="https://github.com/isomorfeus/isomorfeus-speednode/blob/master/Logo.png?raw=true" align="center" width="234" height="127"/><br/>
|
3
|
+
Isomorfeus Speednode<br/>
|
4
|
+
</h1>
|
2
5
|
|
3
6
|
A fast runtime for execjs using node js. Works on Linux, BSDs, MacOS and Windows.
|
4
7
|
Inspired by [execjs-fastnode](https://github.com/jhawthorn/execjs-fastnode).
|
5
8
|
|
6
9
|
### Community and Support
|
7
|
-
At the [Isomorfeus Framework Project](http://isomorfeus.com)
|
8
|
-
|
9
|
-
### Tested
|
10
|
-
[TravisCI](https://travis-ci.org): [![Build Status](https://travis-ci.org/isomorfeus/isomorfeus-speednode.svg?branch=master)](https://travis-ci.org/isomorfeus/isomorfeus-speednode)
|
10
|
+
At the [Isomorfeus Framework Project](http://isomorfeus.com)
|
11
11
|
|
12
12
|
### Installation
|
13
13
|
|
@@ -40,8 +40,8 @@ Example for a compatible context:
|
|
40
40
|
compat_context = ExecJS.compile('Test = "test"')
|
41
41
|
compat_context.eval('1+1')
|
42
42
|
```
|
43
|
-
#### Permissive
|
44
|
-
A permissive context can be created with `ExecJS.permissive_compile` or code can be executed within a permissive context by using
|
43
|
+
#### Permissive
|
44
|
+
A permissive context can be created with `ExecJS.permissive_compile` or code can be executed within a permissive context by using
|
45
45
|
`ExecJS.permissive_eval` or `ExecJS.permissive_exec`.
|
46
46
|
Example for a permissive context:
|
47
47
|
```ruby
|
@@ -63,7 +63,7 @@ context.eval <<~JAVASCRIPT
|
|
63
63
|
return new Promise(function (resolve, reject) { resolve(val); });
|
64
64
|
}
|
65
65
|
JAVASCRIPT
|
66
|
-
|
66
|
+
|
67
67
|
context.await("foo('test')") # => 'test'
|
68
68
|
```
|
69
69
|
|
@@ -125,7 +125,11 @@ module Isomorfeus
|
|
125
125
|
@socket_dir = Dir.mktmpdir("isomorfeus-speednode-")
|
126
126
|
@socket_path = File.join(@socket_dir, "socket")
|
127
127
|
end
|
128
|
-
@pid =
|
128
|
+
@pid = if @options.key?(:source_maps)
|
129
|
+
Process.spawn({"SOCKET_PATH" => @socket_path}, @options[:binary], @options[:source_maps], @options[:runner_path])
|
130
|
+
else
|
131
|
+
Process.spawn({"SOCKET_PATH" => @socket_path}, @options[:binary], @options[:runner_path])
|
132
|
+
end
|
129
133
|
|
130
134
|
retries = 100
|
131
135
|
|
@@ -22,11 +22,11 @@ module Isomorfeus
|
|
22
22
|
@encoding = options[:encoding]
|
23
23
|
@deprecated = !!options[:deprecated]
|
24
24
|
|
25
|
-
@vm =
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
25
|
+
@vm = if Gem::Platform.local.cpu.start_with?('arm')
|
26
|
+
VM.new(binary: @binary, runner_path: @runner_path)
|
27
|
+
else
|
28
|
+
VM.new(binary: @binary, source_maps: '--enable-source-maps', runner_path: @runner_path)
|
29
|
+
end
|
30
30
|
|
31
31
|
@popen_options = {}
|
32
32
|
@popen_options[:external_encoding] = @encoding if @encoding
|
@@ -1,5 +1,5 @@
|
|
1
|
-
module Isomorfeus
|
2
|
-
module Speednode
|
3
|
-
VERSION = '0.4.
|
4
|
-
end
|
5
|
-
end
|
1
|
+
module Isomorfeus
|
2
|
+
module Speednode
|
3
|
+
VERSION = '0.4.5'
|
4
|
+
end
|
5
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-speednode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|