quickjs 0.13.0 → 0.15.0
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.
- checksums.yaml +4 -4
- data/README.md +32 -2
- data/Rakefile +7 -0
- data/ext/quickjsrb/extconf.rb +8 -2
- data/ext/quickjsrb/quickjsrb.c +389 -65
- data/ext/quickjsrb/quickjsrb.h +6 -4
- data/ext/quickjsrb/quickjsrb_crypto.c +71 -0
- data/ext/quickjsrb/quickjsrb_crypto.h +6 -0
- data/ext/quickjsrb/quickjsrb_crypto_subtle.c +1001 -0
- data/ext/quickjsrb/quickjsrb_crypto_subtle.h +6 -0
- data/ext/quickjsrb/vendor/polyfill-intl-en.min.js +3 -11
- data/ext/quickjsrb/vendor/polyfill-url.min.js +1 -0
- data/lib/quickjs/crypto_key.rb +15 -0
- data/lib/quickjs/function.rb +36 -0
- data/lib/quickjs/subtle_crypto.rb +493 -0
- data/lib/quickjs/version.rb +1 -1
- data/lib/quickjs.rb +4 -0
- data/polyfills/check-licenses.mjs +72 -0
- data/polyfills/package-lock.json +183 -154
- data/polyfills/package.json +9 -8
- data/polyfills/rolldown.config.mjs +8 -0
- data/polyfills/src/url.js +1089 -0
- data/sig/quickjs.rbs +15 -1
- metadata +12 -2
data/sig/quickjs.rbs
CHANGED
|
@@ -7,6 +7,9 @@ module Quickjs
|
|
|
7
7
|
POLYFILL_INTL: Symbol
|
|
8
8
|
POLYFILL_FILE: Symbol
|
|
9
9
|
POLYFILL_HTML_BASE64: Symbol
|
|
10
|
+
POLYFILL_ENCODING: Symbol
|
|
11
|
+
POLYFILL_URL: Symbol
|
|
12
|
+
POLYFILL_CRYPTO: Symbol
|
|
10
13
|
|
|
11
14
|
def self.eval_code: (String code, ?Hash[Symbol, untyped] overwrite_opts) -> untyped
|
|
12
15
|
|
|
@@ -20,11 +23,14 @@ module Quickjs
|
|
|
20
23
|
|
|
21
24
|
def eval_code: (String code) -> untyped
|
|
22
25
|
|
|
26
|
+
def call: (String | Symbol name, *untyped args) -> untyped
|
|
27
|
+
|
|
23
28
|
def define_function: (String | Symbol name, *Symbol flags) { (*untyped) -> untyped } -> Symbol
|
|
29
|
+
| (Array[String | Symbol] path, *Symbol flags) { (*untyped) -> untyped } -> Array[Symbol]
|
|
24
30
|
|
|
25
31
|
def import: (String | Array[String] | Hash[Symbol, String] imported, from: String, ?code_to_expose: String?) -> true
|
|
26
32
|
|
|
27
|
-
def
|
|
33
|
+
def on_log: () { (Log) -> void } -> nil
|
|
28
34
|
|
|
29
35
|
class Log
|
|
30
36
|
attr_reader severity: Symbol
|
|
@@ -37,6 +43,14 @@ module Quickjs
|
|
|
37
43
|
end
|
|
38
44
|
end
|
|
39
45
|
|
|
46
|
+
class Function
|
|
47
|
+
def initialize: (String source) -> void
|
|
48
|
+
|
|
49
|
+
def source: () -> String
|
|
50
|
+
|
|
51
|
+
def call: (*untyped args, ?on: VM | Hash[Symbol, untyped] | nil) -> untyped
|
|
52
|
+
end
|
|
53
|
+
|
|
40
54
|
class RuntimeError < ::RuntimeError
|
|
41
55
|
def initialize: (String message, String? js_name) -> void
|
|
42
56
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: quickjs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- hmsk
|
|
@@ -78,19 +78,29 @@ files:
|
|
|
78
78
|
- ext/quickjsrb/quickjs/unicode_gen_def.h
|
|
79
79
|
- ext/quickjsrb/quickjsrb.c
|
|
80
80
|
- ext/quickjsrb/quickjsrb.h
|
|
81
|
+
- ext/quickjsrb/quickjsrb_crypto.c
|
|
82
|
+
- ext/quickjsrb/quickjsrb_crypto.h
|
|
83
|
+
- ext/quickjsrb/quickjsrb_crypto_subtle.c
|
|
84
|
+
- ext/quickjsrb/quickjsrb_crypto_subtle.h
|
|
81
85
|
- ext/quickjsrb/quickjsrb_file.c
|
|
82
86
|
- ext/quickjsrb/quickjsrb_file.h
|
|
83
87
|
- ext/quickjsrb/vendor/polyfill-encoding.min.js
|
|
84
88
|
- ext/quickjsrb/vendor/polyfill-file.min.js
|
|
85
89
|
- ext/quickjsrb/vendor/polyfill-intl-en.min.js
|
|
90
|
+
- ext/quickjsrb/vendor/polyfill-url.min.js
|
|
86
91
|
- lib/quickjs.rb
|
|
92
|
+
- lib/quickjs/crypto_key.rb
|
|
93
|
+
- lib/quickjs/function.rb
|
|
94
|
+
- lib/quickjs/subtle_crypto.rb
|
|
87
95
|
- lib/quickjs/version.rb
|
|
96
|
+
- polyfills/check-licenses.mjs
|
|
88
97
|
- polyfills/package-lock.json
|
|
89
98
|
- polyfills/package.json
|
|
90
99
|
- polyfills/rolldown.config.mjs
|
|
91
100
|
- polyfills/src/encoding.js
|
|
92
101
|
- polyfills/src/file.js
|
|
93
102
|
- polyfills/src/intl-en.js
|
|
103
|
+
- polyfills/src/url.js
|
|
94
104
|
- sig/quickjs.rbs
|
|
95
105
|
homepage: https://github.com/hmsk/quickjs.rb
|
|
96
106
|
licenses:
|
|
@@ -106,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
106
116
|
requirements:
|
|
107
117
|
- - ">="
|
|
108
118
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: 3.
|
|
119
|
+
version: 3.1.0
|
|
110
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
121
|
requirements:
|
|
112
122
|
- - ">="
|