isomorfeus-speednode 0.4.6 → 0.4.10
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca0207c7ed85d1fb9f3fd4bbefcd101f2fd07f8b12b9708cd090e0fef4f76880
|
4
|
+
data.tar.gz: cebac939d6b699bb9e2afab4a4eefb1880cab09ea6e64ddf23d231e36d64fbd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 909f2eafee666a73675fe313aed7dcf34674d8b0563649fffae41271131196b6fc333c61fdd6c2253fd86f2365b41efd788e51f1560fc27fbe5ec5fa4ba3549b
|
7
|
+
data.tar.gz: 2829dfa3c69ee7a402a325ca6cd1d7b6e1231f6fd8002f589c699c9b94a178bb7972da445a888d115c09c19fd5cf1d9c878a4c5ff983661cf93c2e2669627416
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ A fast runtime for execjs using node js. Works on Linux, BSDs, MacOS and Windows
|
|
7
7
|
Inspired by [execjs-fastnode](https://github.com/jhawthorn/execjs-fastnode).
|
8
8
|
|
9
9
|
### Community and Support
|
10
|
-
At the [Isomorfeus Framework Project](
|
10
|
+
At the [Isomorfeus Framework Project](https://isomorfeus.com)
|
11
11
|
|
12
12
|
### Installation
|
13
13
|
|
@@ -4,6 +4,11 @@ const vm = require('vm');
|
|
4
4
|
const net = require('net');
|
5
5
|
const os = require('os');
|
6
6
|
const fs = require('fs');
|
7
|
+
let crypto_var = null;
|
8
|
+
try {
|
9
|
+
crypto_var = require('crypto');
|
10
|
+
} catch (err) {}
|
11
|
+
const crypto = crypto_var;
|
7
12
|
let contexts = {};
|
8
13
|
let process_exit = false;
|
9
14
|
|
@@ -200,7 +205,7 @@ function createCompatibleContext(uuid, options) {
|
|
200
205
|
}
|
201
206
|
|
202
207
|
function createPermissiveContext(uuid, options) {
|
203
|
-
let c = vm.createContext({ __responder_socket: false, process: { release: { name: "node" }, env: process.env }, Buffer, clearTimeout, fs, net, os, require, setTimeout });
|
208
|
+
let c = vm.createContext({ __responder_socket: false, process: { release: { name: "node" }, env: process.env }, Buffer, clearTimeout, crypto, fs, net, os, require, setTimeout });
|
204
209
|
vm.runInContext('global = globalThis;', c);
|
205
210
|
contexts[uuid] = { context: c, options: options };
|
206
211
|
return c;
|
@@ -44,7 +44,7 @@ module Isomorfeus
|
|
44
44
|
attr_reader :responder
|
45
45
|
|
46
46
|
def initialize(options)
|
47
|
-
@mutex = Mutex.new
|
47
|
+
@mutex = Thread::Mutex.new
|
48
48
|
@socket_path = nil
|
49
49
|
@options = options
|
50
50
|
@started = false
|
@@ -101,7 +101,11 @@ module Isomorfeus
|
|
101
101
|
end
|
102
102
|
|
103
103
|
def delete_context(context)
|
104
|
-
|
104
|
+
@mutex.synchronize do
|
105
|
+
VMCommand.new(@socket, "deleteContext", [context]).execute rescue nil
|
106
|
+
end
|
107
|
+
rescue ThreadError
|
108
|
+
nil
|
105
109
|
end
|
106
110
|
|
107
111
|
# def context_options(context)
|
@@ -122,7 +126,7 @@ module Isomorfeus
|
|
122
126
|
@socket_dir = nil
|
123
127
|
@socket_path = SecureRandom.uuid
|
124
128
|
else
|
125
|
-
@socket_dir = Dir.mktmpdir("
|
129
|
+
@socket_dir = Dir.mktmpdir("iso-speednode-")
|
126
130
|
@socket_path = File.join(@socket_dir, "socket")
|
127
131
|
end
|
128
132
|
@pid = Process.spawn({"SOCKET_PATH" => @socket_path}, @options[:binary], @options[:source_maps], @options[:runner_path])
|
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.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.13.
|
33
|
+
version: 3.13.11
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.13.
|
40
|
+
version: 3.13.11
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: win32-pipe
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 5.
|
75
|
+
version: 5.15.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 5.
|
82
|
+
version: 5.15.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,11 +130,12 @@ files:
|
|
130
130
|
- lib/isomorfeus/speednode/runtime/vm.rb
|
131
131
|
- lib/isomorfeus/speednode/runtime/vm_command.rb
|
132
132
|
- lib/isomorfeus/speednode/version.rb
|
133
|
-
homepage:
|
133
|
+
homepage: https://isomorfeus.com
|
134
134
|
licenses:
|
135
135
|
- MIT
|
136
136
|
metadata:
|
137
137
|
github_repo: ssh://github.com/isomorfeus/gems
|
138
|
+
source_code_uri: https://github.com/isomorfeus/isomorfeus-speednode
|
138
139
|
post_install_message:
|
139
140
|
rdoc_options: []
|
140
141
|
require_paths:
|
@@ -143,14 +144,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
143
144
|
requirements:
|
144
145
|
- - ">="
|
145
146
|
- !ruby/object:Gem::Version
|
146
|
-
version:
|
147
|
+
version: 3.1.0
|
147
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
149
|
requirements:
|
149
150
|
- - ">="
|
150
151
|
- !ruby/object:Gem::Version
|
151
152
|
version: '0'
|
152
153
|
requirements: []
|
153
|
-
rubygems_version: 3.
|
154
|
+
rubygems_version: 3.3.3
|
154
155
|
signing_key:
|
155
156
|
specification_version: 4
|
156
157
|
summary: A fast ExecJS runtime based on nodejs, tuned for Isomorfeus.
|