Merge branch 'stable' into sdl
commit
3ea3f6658c
|
|
@ -1,2 +1,6 @@
|
||||||
node_modules
|
node_modules
|
||||||
out
|
out
|
||||||
|
.system
|
||||||
|
*.tgz
|
||||||
|
.nyc_output
|
||||||
|
coverage
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"spec": [
|
||||||
|
"test/**/*.test.ts"
|
||||||
|
],
|
||||||
|
"loader": [
|
||||||
|
"ts-node/esm.mjs"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -4,3 +4,11 @@ test
|
||||||
.editorconfig
|
.editorconfig
|
||||||
tsconfig.json
|
tsconfig.json
|
||||||
examples
|
examples
|
||||||
|
.system
|
||||||
|
*.tgz
|
||||||
|
.nyc_output
|
||||||
|
coverage
|
||||||
|
syntax.md
|
||||||
|
testinglib
|
||||||
|
.travis.yml
|
||||||
|
.mocharc.json
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,6 @@ os:
|
||||||
- windows
|
- windows
|
||||||
- linux
|
- linux
|
||||||
- osx
|
- osx
|
||||||
|
env: YARN_GPG=no
|
||||||
|
|
||||||
|
script: yarn test:ci
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 267 KiB |
|
|
@ -6,6 +6,7 @@
|
||||||
- [Directives](#directives)
|
- [Directives](#directives)
|
||||||
- [keepalive directive](#keepalive-directive)
|
- [keepalive directive](#keepalive-directive)
|
||||||
- [singleton directive](#singleton-directive)
|
- [singleton directive](#singleton-directive)
|
||||||
|
- [static directive](#static-directive)
|
||||||
- [functions](#functions)
|
- [functions](#functions)
|
||||||
- [restore](#restore)
|
- [restore](#restore)
|
||||||
- [Links](#links)
|
- [Links](#links)
|
||||||
|
|
@ -13,7 +14,7 @@
|
||||||
|
|
||||||
## Basic System Structure
|
## Basic System Structure
|
||||||
|
|
||||||
A Vogue system is a database of interlinked instances and their persistent data. Two things are required to start: A group (usually a directory) of vogue modules that a system knows, and a database to load from or create (usually in the form of a single file).
|
A Vogue system is a database of interlinked instances and their persistent data. Only one thing is required to start a vogue system: The list of modules to be included in the system.
|
||||||
|
|
||||||
At the initial creation of a Vogue system, if there is no database to load from, any template module with the [singleton directive](#singleton-directive) will have an instance created of itself, without any predefined parameters.
|
At the initial creation of a Vogue system, if there is no database to load from, any template module with the [singleton directive](#singleton-directive) will have an instance created of itself, without any predefined parameters.
|
||||||
|
|
||||||
|
|
@ -21,6 +22,8 @@ When a database is loaded, all instances who's template module has the [keepaliv
|
||||||
|
|
||||||
## Keepalive Directive
|
## Keepalive Directive
|
||||||
|
|
||||||
|
`WARNING: the keepalive directive is not fully implemented. You may include it in your module files, however their existence in memory is not yet guaranteed.`
|
||||||
|
|
||||||
The keepalive directive is used to describe that a module should always remain in memory. This directive applies only to instances. This means that if no instances exist of a particular template module with the keepalive directive, then no instances will be restored.
|
The keepalive directive is used to describe that a module should always remain in memory. This directive applies only to instances. This means that if no instances exist of a particular template module with the keepalive directive, then no instances will be restored.
|
||||||
|
|
||||||
```vogue
|
```vogue
|
||||||
|
|
@ -37,9 +40,27 @@ The singleton directive implies the keepalive directive.
|
||||||
singleton;
|
singleton;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Static Directive
|
||||||
|
|
||||||
|
The static directive is like the singleton directive, except it makes the created instance available to all other instances in the system. These can be thought of as global variables. For example, `console` in vogue refers to the static instance (as a [link](#links)) of the console module.
|
||||||
|
|
||||||
|
The identifier after the static keyword is the name that is globally injected.
|
||||||
|
|
||||||
|
```
|
||||||
|
static util;
|
||||||
|
|
||||||
|
foo {
|
||||||
|
console.log('I can be called from anywhere!');
|
||||||
|
}
|
||||||
|
|
||||||
|
restore {
|
||||||
|
util.foo();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
|
|
||||||
functions can be referred to in other functions with or without the `this.` prefix. Use the prefix to disambiguate if local variables exist with the same identifier.
|
Functions are declared with an identifier, parameters (optional) and a javascript code block.
|
||||||
|
|
||||||
```vogue
|
```vogue
|
||||||
functionName (param1, param2) {
|
functionName (param1, param2) {
|
||||||
|
|
@ -685,6 +685,7 @@ tar@^6.1.0:
|
||||||
terminal-kit@^2.1.2:
|
terminal-kit@^2.1.2:
|
||||||
version "2.1.2"
|
version "2.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/terminal-kit/-/terminal-kit-2.1.2.tgz#08689ff9f8efc6614d34d4cc7be916a91742b896"
|
resolved "https://registry.yarnpkg.com/terminal-kit/-/terminal-kit-2.1.2.tgz#08689ff9f8efc6614d34d4cc7be916a91742b896"
|
||||||
|
integrity sha512-1eG7CrQfE1dd5ZHPG5WrTk/DTeskFPqSLEl+QYmvwvI41dRCN2j1qVyxA4FwE0/x24AbjhSA3FJSIgWqQD610Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@cronvel/get-pixels" "^3.4.0"
|
"@cronvel/get-pixels" "^3.4.0"
|
||||||
chroma-js "^2.1.1"
|
chroma-js "^2.1.1"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
static a;
|
||||||
|
|
||||||
|
restore() {
|
||||||
|
if(typeof b !== 'object') {
|
||||||
|
throw new Error('Static instance A does not exist!');
|
||||||
|
} else b.fun();
|
||||||
|
}
|
||||||
|
|
||||||
|
fun() {
|
||||||
|
console.log('hello from A');
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
static b;
|
||||||
|
|
||||||
|
restore() {
|
||||||
|
if(typeof a !== 'object') {
|
||||||
|
throw new Error('Static instance A does not exist!');
|
||||||
|
} else a.fun();
|
||||||
|
}
|
||||||
|
|
||||||
|
fun() {
|
||||||
|
console.log('hello from B');
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
singleton;
|
|
||||||
|
|
||||||
link counter;
|
link counter;
|
||||||
link window;
|
link window;
|
||||||
|
|
@ -19,4 +18,6 @@ async restore {
|
||||||
// window.setScene()
|
// window.setScene()
|
||||||
|
|
||||||
// await counter.render();
|
// await counter.render();
|
||||||
|
|
||||||
|
sync();
|
||||||
}
|
}
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "test",
|
"name": "valyria",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@kmamal/sdl": "^0.0.13",
|
||||||
|
"canvas": "^2.8.0",
|
||||||
"chalk": "^4.1.1",
|
"chalk": "^4.1.1",
|
||||||
"random-world": "^1.2.1",
|
|
||||||
"signale": "^1.4.0",
|
|
||||||
"sisteransi": "^1.0.5",
|
"sisteransi": "^1.0.5",
|
||||||
"terminal-kit": "^2.1.2"
|
"terminal-kit": "^2.1.2"
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,735 @@
|
||||||
|
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||||
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
"@cronvel/get-pixels@^3.4.0":
|
||||||
|
version "3.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@cronvel/get-pixels/-/get-pixels-3.4.0.tgz#697cd691c16bbb8b29ed596da73fd6a7e9a2f34d"
|
||||||
|
dependencies:
|
||||||
|
jpeg-js "^0.4.1"
|
||||||
|
ndarray "^1.0.19"
|
||||||
|
ndarray-pack "^1.1.1"
|
||||||
|
node-bitmap "0.0.1"
|
||||||
|
omggif "^1.0.10"
|
||||||
|
pngjs "^5.0.0"
|
||||||
|
|
||||||
|
"@kmamal/sdl@^0.0.13":
|
||||||
|
version "0.0.13"
|
||||||
|
resolved "https://registry.yarnpkg.com/@kmamal/sdl/-/sdl-0.0.13.tgz#20524ee00bc6fc427a2cc3c2d79ada1c34c7c338"
|
||||||
|
dependencies:
|
||||||
|
bindings "*"
|
||||||
|
prebuild-install "^6.0.1"
|
||||||
|
|
||||||
|
"@mapbox/node-pre-gyp@^1.0.0":
|
||||||
|
version "1.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.5.tgz#2a0b32fcb416fb3f2250fd24cb2a81421a4f5950"
|
||||||
|
dependencies:
|
||||||
|
detect-libc "^1.0.3"
|
||||||
|
https-proxy-agent "^5.0.0"
|
||||||
|
make-dir "^3.1.0"
|
||||||
|
node-fetch "^2.6.1"
|
||||||
|
nopt "^5.0.0"
|
||||||
|
npmlog "^4.1.2"
|
||||||
|
rimraf "^3.0.2"
|
||||||
|
semver "^7.3.4"
|
||||||
|
tar "^6.1.0"
|
||||||
|
|
||||||
|
abbrev@1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
|
||||||
|
|
||||||
|
agent-base@6:
|
||||||
|
version "6.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
|
||||||
|
dependencies:
|
||||||
|
debug "4"
|
||||||
|
|
||||||
|
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@^4.1.0:
|
||||||
|
version "4.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
|
||||||
|
dependencies:
|
||||||
|
color-convert "^2.0.1"
|
||||||
|
|
||||||
|
aproba@^1.0.3:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
|
||||||
|
|
||||||
|
are-we-there-yet@~1.1.2:
|
||||||
|
version "1.1.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21"
|
||||||
|
dependencies:
|
||||||
|
delegates "^1.0.0"
|
||||||
|
readable-stream "^2.0.6"
|
||||||
|
|
||||||
|
balanced-match@^1.0.0:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||||
|
|
||||||
|
base64-js@^1.3.1:
|
||||||
|
version "1.5.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
|
||||||
|
|
||||||
|
bindings@*:
|
||||||
|
version "1.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df"
|
||||||
|
dependencies:
|
||||||
|
file-uri-to-path "1.0.0"
|
||||||
|
|
||||||
|
bl@^4.0.3:
|
||||||
|
version "4.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a"
|
||||||
|
dependencies:
|
||||||
|
buffer "^5.5.0"
|
||||||
|
inherits "^2.0.4"
|
||||||
|
readable-stream "^3.4.0"
|
||||||
|
|
||||||
|
brace-expansion@^1.1.7:
|
||||||
|
version "1.1.11"
|
||||||
|
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||||
|
dependencies:
|
||||||
|
balanced-match "^1.0.0"
|
||||||
|
concat-map "0.0.1"
|
||||||
|
|
||||||
|
buffer@^5.5.0:
|
||||||
|
version "5.7.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
|
||||||
|
dependencies:
|
||||||
|
base64-js "^1.3.1"
|
||||||
|
ieee754 "^1.1.13"
|
||||||
|
|
||||||
|
canvas@^2.8.0:
|
||||||
|
version "2.8.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/canvas/-/canvas-2.8.0.tgz#f99ca7f25e6e26686661ffa4fec1239bbef74461"
|
||||||
|
dependencies:
|
||||||
|
"@mapbox/node-pre-gyp" "^1.0.0"
|
||||||
|
nan "^2.14.0"
|
||||||
|
simple-get "^3.0.3"
|
||||||
|
|
||||||
|
chalk@^4.1.1:
|
||||||
|
version "4.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad"
|
||||||
|
dependencies:
|
||||||
|
ansi-styles "^4.1.0"
|
||||||
|
supports-color "^7.1.0"
|
||||||
|
|
||||||
|
chownr@^1.1.1:
|
||||||
|
version "1.1.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b"
|
||||||
|
|
||||||
|
chownr@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
|
||||||
|
|
||||||
|
chroma-js@^2.1.1:
|
||||||
|
version "2.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/chroma-js/-/chroma-js-2.1.2.tgz#1075cb9ae25bcb2017c109394168b5cf3aa500ec"
|
||||||
|
dependencies:
|
||||||
|
cross-env "^6.0.3"
|
||||||
|
|
||||||
|
code-point-at@^1.0.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
|
||||||
|
|
||||||
|
color-convert@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
|
||||||
|
dependencies:
|
||||||
|
color-name "~1.1.4"
|
||||||
|
|
||||||
|
color-name@~1.1.4:
|
||||||
|
version "1.1.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
||||||
|
|
||||||
|
concat-map@0.0.1:
|
||||||
|
version "0.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||||
|
|
||||||
|
console-control-strings@^1.0.0, console-control-strings@~1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
|
||||||
|
|
||||||
|
core-util-is@~1.0.0:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
||||||
|
|
||||||
|
cross-env@^6.0.3:
|
||||||
|
version "6.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-6.0.3.tgz#4256b71e49b3a40637a0ce70768a6ef5c72ae941"
|
||||||
|
dependencies:
|
||||||
|
cross-spawn "^7.0.0"
|
||||||
|
|
||||||
|
cross-spawn@^7.0.0:
|
||||||
|
version "7.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
|
||||||
|
dependencies:
|
||||||
|
path-key "^3.1.0"
|
||||||
|
shebang-command "^2.0.0"
|
||||||
|
which "^2.0.1"
|
||||||
|
|
||||||
|
cwise-compiler@^1.1.2:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/cwise-compiler/-/cwise-compiler-1.1.3.tgz#f4d667410e850d3a313a7d2db7b1e505bb034cc5"
|
||||||
|
dependencies:
|
||||||
|
uniq "^1.0.0"
|
||||||
|
|
||||||
|
debug@4:
|
||||||
|
version "4.3.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
|
||||||
|
dependencies:
|
||||||
|
ms "2.1.2"
|
||||||
|
|
||||||
|
decompress-response@^4.2.0:
|
||||||
|
version "4.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986"
|
||||||
|
dependencies:
|
||||||
|
mimic-response "^2.0.0"
|
||||||
|
|
||||||
|
deep-extend@^0.6.0:
|
||||||
|
version "0.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
|
||||||
|
|
||||||
|
delegates@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
|
||||||
|
|
||||||
|
detect-libc@^1.0.3:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
|
||||||
|
|
||||||
|
end-of-stream@^1.1.0, end-of-stream@^1.4.1:
|
||||||
|
version "1.4.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
|
||||||
|
dependencies:
|
||||||
|
once "^1.4.0"
|
||||||
|
|
||||||
|
expand-template@^2.0.3:
|
||||||
|
version "2.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c"
|
||||||
|
|
||||||
|
file-uri-to-path@1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
|
||||||
|
|
||||||
|
fs-constants@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
|
||||||
|
|
||||||
|
fs-minipass@^2.0.0:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb"
|
||||||
|
dependencies:
|
||||||
|
minipass "^3.0.0"
|
||||||
|
|
||||||
|
fs.realpath@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||||
|
|
||||||
|
gauge@~2.7.3:
|
||||||
|
version "2.7.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
|
||||||
|
dependencies:
|
||||||
|
aproba "^1.0.3"
|
||||||
|
console-control-strings "^1.0.0"
|
||||||
|
has-unicode "^2.0.0"
|
||||||
|
object-assign "^4.1.0"
|
||||||
|
signal-exit "^3.0.0"
|
||||||
|
string-width "^1.0.1"
|
||||||
|
strip-ansi "^3.0.1"
|
||||||
|
wide-align "^1.1.0"
|
||||||
|
|
||||||
|
github-from-package@0.0.0:
|
||||||
|
version "0.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce"
|
||||||
|
|
||||||
|
glob@^7.1.3:
|
||||||
|
version "7.1.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90"
|
||||||
|
dependencies:
|
||||||
|
fs.realpath "^1.0.0"
|
||||||
|
inflight "^1.0.4"
|
||||||
|
inherits "2"
|
||||||
|
minimatch "^3.0.4"
|
||||||
|
once "^1.3.0"
|
||||||
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
|
has-flag@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
|
||||||
|
|
||||||
|
has-unicode@^2.0.0:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
|
||||||
|
|
||||||
|
https-proxy-agent@^5.0.0:
|
||||||
|
version "5.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2"
|
||||||
|
dependencies:
|
||||||
|
agent-base "6"
|
||||||
|
debug "4"
|
||||||
|
|
||||||
|
ieee754@^1.1.13:
|
||||||
|
version "1.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
|
||||||
|
|
||||||
|
inflight@^1.0.4:
|
||||||
|
version "1.0.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||||
|
dependencies:
|
||||||
|
once "^1.3.0"
|
||||||
|
wrappy "1"
|
||||||
|
|
||||||
|
inherits@2, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3:
|
||||||
|
version "2.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||||
|
|
||||||
|
ini@~1.3.0:
|
||||||
|
version "1.3.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
|
||||||
|
|
||||||
|
iota-array@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/iota-array/-/iota-array-1.0.0.tgz#81ef57fe5d05814cd58c2483632a99c30a0e8087"
|
||||||
|
|
||||||
|
is-buffer@^1.0.2:
|
||||||
|
version "1.1.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
|
||||||
|
|
||||||
|
is-fullwidth-code-point@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
|
||||||
|
dependencies:
|
||||||
|
number-is-nan "^1.0.0"
|
||||||
|
|
||||||
|
is-fullwidth-code-point@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
|
||||||
|
|
||||||
|
isarray@~1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||||
|
|
||||||
|
isexe@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||||
|
|
||||||
|
jpeg-js@^0.4.1:
|
||||||
|
version "0.4.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.4.3.tgz#6158e09f1983ad773813704be80680550eff977b"
|
||||||
|
|
||||||
|
lazyness@^1.2.0:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/lazyness/-/lazyness-1.2.0.tgz#5dc0f02c37280436b21f0e4918ce6e72a109c657"
|
||||||
|
|
||||||
|
lru-cache@^6.0.0:
|
||||||
|
version "6.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
|
||||||
|
dependencies:
|
||||||
|
yallist "^4.0.0"
|
||||||
|
|
||||||
|
make-dir@^3.1.0:
|
||||||
|
version "3.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
|
||||||
|
dependencies:
|
||||||
|
semver "^6.0.0"
|
||||||
|
|
||||||
|
mimic-response@^2.0.0:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43"
|
||||||
|
|
||||||
|
minimatch@^3.0.4:
|
||||||
|
version "3.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||||
|
dependencies:
|
||||||
|
brace-expansion "^1.1.7"
|
||||||
|
|
||||||
|
minimist@^1.2.0, minimist@^1.2.3:
|
||||||
|
version "1.2.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
|
||||||
|
|
||||||
|
minipass@^3.0.0:
|
||||||
|
version "3.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd"
|
||||||
|
dependencies:
|
||||||
|
yallist "^4.0.0"
|
||||||
|
|
||||||
|
minizlib@^2.1.1:
|
||||||
|
version "2.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931"
|
||||||
|
dependencies:
|
||||||
|
minipass "^3.0.0"
|
||||||
|
yallist "^4.0.0"
|
||||||
|
|
||||||
|
mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3:
|
||||||
|
version "0.5.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113"
|
||||||
|
|
||||||
|
mkdirp@^1.0.3:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
|
||||||
|
|
||||||
|
ms@2.1.2:
|
||||||
|
version "2.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
||||||
|
|
||||||
|
nan@^2.14.0:
|
||||||
|
version "2.14.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19"
|
||||||
|
|
||||||
|
napi-build-utils@^1.0.1:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806"
|
||||||
|
|
||||||
|
ndarray-pack@^1.1.1:
|
||||||
|
version "1.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/ndarray-pack/-/ndarray-pack-1.2.1.tgz#8caebeaaa24d5ecf70ff86020637977da8ee585a"
|
||||||
|
dependencies:
|
||||||
|
cwise-compiler "^1.1.2"
|
||||||
|
ndarray "^1.0.13"
|
||||||
|
|
||||||
|
ndarray@^1.0.13, ndarray@^1.0.19:
|
||||||
|
version "1.0.19"
|
||||||
|
resolved "https://registry.yarnpkg.com/ndarray/-/ndarray-1.0.19.tgz#6785b5f5dfa58b83e31ae5b2a058cfd1ab3f694e"
|
||||||
|
dependencies:
|
||||||
|
iota-array "^1.0.0"
|
||||||
|
is-buffer "^1.0.2"
|
||||||
|
|
||||||
|
nextgen-events@^1.3.4:
|
||||||
|
version "1.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/nextgen-events/-/nextgen-events-1.4.0.tgz#82e7201e4d8421f1cb4dcfce973c10b455fdc2be"
|
||||||
|
|
||||||
|
node-abi@^2.21.0:
|
||||||
|
version "2.26.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.26.0.tgz#355d5d4bc603e856f74197adbf3f5117a396ba40"
|
||||||
|
dependencies:
|
||||||
|
semver "^5.4.1"
|
||||||
|
|
||||||
|
node-bitmap@0.0.1:
|
||||||
|
version "0.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/node-bitmap/-/node-bitmap-0.0.1.tgz#180eac7003e0c707618ef31368f62f84b2a69091"
|
||||||
|
|
||||||
|
node-fetch@^2.6.1:
|
||||||
|
version "2.6.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
|
||||||
|
|
||||||
|
noop-logger@^0.1.1:
|
||||||
|
version "0.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2"
|
||||||
|
|
||||||
|
nopt@^5.0.0:
|
||||||
|
version "5.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88"
|
||||||
|
dependencies:
|
||||||
|
abbrev "1"
|
||||||
|
|
||||||
|
npmlog@^4.0.1, npmlog@^4.1.2:
|
||||||
|
version "4.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
|
||||||
|
dependencies:
|
||||||
|
are-we-there-yet "~1.1.2"
|
||||||
|
console-control-strings "~1.1.0"
|
||||||
|
gauge "~2.7.3"
|
||||||
|
set-blocking "~2.0.0"
|
||||||
|
|
||||||
|
number-is-nan@^1.0.0:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
|
||||||
|
|
||||||
|
object-assign@^4.1.0:
|
||||||
|
version "4.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
|
||||||
|
|
||||||
|
omggif@^1.0.10:
|
||||||
|
version "1.0.10"
|
||||||
|
resolved "https://registry.yarnpkg.com/omggif/-/omggif-1.0.10.tgz#ddaaf90d4a42f532e9e7cb3a95ecdd47f17c7b19"
|
||||||
|
|
||||||
|
once@^1.3.0, once@^1.3.1, once@^1.4.0:
|
||||||
|
version "1.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||||
|
dependencies:
|
||||||
|
wrappy "1"
|
||||||
|
|
||||||
|
path-is-absolute@^1.0.0:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||||
|
|
||||||
|
path-key@^3.1.0:
|
||||||
|
version "3.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
|
||||||
|
|
||||||
|
pngjs@^5.0.0:
|
||||||
|
version "5.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb"
|
||||||
|
|
||||||
|
prebuild-install@^6.0.1:
|
||||||
|
version "6.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.2.tgz#6ce5fc5978feba5d3cbffedca0682b136a0b5bff"
|
||||||
|
dependencies:
|
||||||
|
detect-libc "^1.0.3"
|
||||||
|
expand-template "^2.0.3"
|
||||||
|
github-from-package "0.0.0"
|
||||||
|
minimist "^1.2.3"
|
||||||
|
mkdirp-classic "^0.5.3"
|
||||||
|
napi-build-utils "^1.0.1"
|
||||||
|
node-abi "^2.21.0"
|
||||||
|
noop-logger "^0.1.1"
|
||||||
|
npmlog "^4.0.1"
|
||||||
|
pump "^3.0.0"
|
||||||
|
rc "^1.2.7"
|
||||||
|
simple-get "^3.0.3"
|
||||||
|
tar-fs "^2.0.0"
|
||||||
|
tunnel-agent "^0.6.0"
|
||||||
|
|
||||||
|
process-nextick-args@~2.0.0:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
|
||||||
|
|
||||||
|
pump@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
|
||||||
|
dependencies:
|
||||||
|
end-of-stream "^1.1.0"
|
||||||
|
once "^1.3.1"
|
||||||
|
|
||||||
|
rc@^1.2.7:
|
||||||
|
version "1.2.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
|
||||||
|
dependencies:
|
||||||
|
deep-extend "^0.6.0"
|
||||||
|
ini "~1.3.0"
|
||||||
|
minimist "^1.2.0"
|
||||||
|
strip-json-comments "~2.0.1"
|
||||||
|
|
||||||
|
readable-stream@^2.0.6:
|
||||||
|
version "2.3.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
|
||||||
|
dependencies:
|
||||||
|
core-util-is "~1.0.0"
|
||||||
|
inherits "~2.0.3"
|
||||||
|
isarray "~1.0.0"
|
||||||
|
process-nextick-args "~2.0.0"
|
||||||
|
safe-buffer "~5.1.1"
|
||||||
|
string_decoder "~1.1.1"
|
||||||
|
util-deprecate "~1.0.1"
|
||||||
|
|
||||||
|
readable-stream@^3.1.1, readable-stream@^3.4.0:
|
||||||
|
version "3.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198"
|
||||||
|
dependencies:
|
||||||
|
inherits "^2.0.3"
|
||||||
|
string_decoder "^1.1.1"
|
||||||
|
util-deprecate "^1.0.1"
|
||||||
|
|
||||||
|
rimraf@^3.0.2:
|
||||||
|
version "3.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
|
||||||
|
dependencies:
|
||||||
|
glob "^7.1.3"
|
||||||
|
|
||||||
|
safe-buffer@^5.0.1, safe-buffer@~5.2.0:
|
||||||
|
version "5.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
||||||
|
|
||||||
|
safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||||
|
version "5.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
||||||
|
|
||||||
|
semver@^5.4.1:
|
||||||
|
version "5.7.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
|
||||||
|
|
||||||
|
semver@^6.0.0:
|
||||||
|
version "6.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
|
||||||
|
|
||||||
|
semver@^7.3.4:
|
||||||
|
version "7.3.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
|
||||||
|
dependencies:
|
||||||
|
lru-cache "^6.0.0"
|
||||||
|
|
||||||
|
set-blocking@~2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
|
||||||
|
|
||||||
|
setimmediate@^1.0.5:
|
||||||
|
version "1.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
|
||||||
|
|
||||||
|
seventh@^0.7.40:
|
||||||
|
version "0.7.40"
|
||||||
|
resolved "https://registry.yarnpkg.com/seventh/-/seventh-0.7.40.tgz#a5a010496cb84421bb81f524840484a5aa473be9"
|
||||||
|
dependencies:
|
||||||
|
setimmediate "^1.0.5"
|
||||||
|
|
||||||
|
shebang-command@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
|
||||||
|
dependencies:
|
||||||
|
shebang-regex "^3.0.0"
|
||||||
|
|
||||||
|
shebang-regex@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
|
||||||
|
|
||||||
|
signal-exit@^3.0.0:
|
||||||
|
version "3.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
|
||||||
|
|
||||||
|
simple-concat@^1.0.0:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f"
|
||||||
|
|
||||||
|
simple-get@^3.0.3:
|
||||||
|
version "3.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.0.tgz#b45be062435e50d159540b576202ceec40b9c6b3"
|
||||||
|
dependencies:
|
||||||
|
decompress-response "^4.2.0"
|
||||||
|
once "^1.3.1"
|
||||||
|
simple-concat "^1.0.0"
|
||||||
|
|
||||||
|
sisteransi@^1.0.5:
|
||||||
|
version "1.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
|
||||||
|
|
||||||
|
string-kit@^0.12.5:
|
||||||
|
version "0.12.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/string-kit/-/string-kit-0.12.5.tgz#e7f646e7740e54b7ecae6cf67b73bb616aa16652"
|
||||||
|
|
||||||
|
string-width@^1.0.1:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
|
||||||
|
dependencies:
|
||||||
|
code-point-at "^1.0.0"
|
||||||
|
is-fullwidth-code-point "^1.0.0"
|
||||||
|
strip-ansi "^3.0.0"
|
||||||
|
|
||||||
|
"string-width@^1.0.2 || 2":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
|
||||||
|
dependencies:
|
||||||
|
is-fullwidth-code-point "^2.0.0"
|
||||||
|
strip-ansi "^4.0.0"
|
||||||
|
|
||||||
|
string_decoder@^1.1.1:
|
||||||
|
version "1.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e"
|
||||||
|
dependencies:
|
||||||
|
safe-buffer "~5.2.0"
|
||||||
|
|
||||||
|
string_decoder@~1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
|
||||||
|
dependencies:
|
||||||
|
safe-buffer "~5.1.0"
|
||||||
|
|
||||||
|
strip-ansi@^3.0.0, strip-ansi@^3.0.1:
|
||||||
|
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"
|
||||||
|
|
||||||
|
strip-json-comments@~2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
|
||||||
|
|
||||||
|
supports-color@^7.1.0:
|
||||||
|
version "7.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
|
||||||
|
dependencies:
|
||||||
|
has-flag "^4.0.0"
|
||||||
|
|
||||||
|
tar-fs@^2.0.0:
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784"
|
||||||
|
dependencies:
|
||||||
|
chownr "^1.1.1"
|
||||||
|
mkdirp-classic "^0.5.2"
|
||||||
|
pump "^3.0.0"
|
||||||
|
tar-stream "^2.1.4"
|
||||||
|
|
||||||
|
tar-stream@^2.1.4:
|
||||||
|
version "2.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287"
|
||||||
|
dependencies:
|
||||||
|
bl "^4.0.3"
|
||||||
|
end-of-stream "^1.4.1"
|
||||||
|
fs-constants "^1.0.0"
|
||||||
|
inherits "^2.0.3"
|
||||||
|
readable-stream "^3.1.1"
|
||||||
|
|
||||||
|
tar@^6.1.0:
|
||||||
|
version "6.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.0.tgz#d1724e9bcc04b977b18d5c573b333a2207229a83"
|
||||||
|
dependencies:
|
||||||
|
chownr "^2.0.0"
|
||||||
|
fs-minipass "^2.0.0"
|
||||||
|
minipass "^3.0.0"
|
||||||
|
minizlib "^2.1.1"
|
||||||
|
mkdirp "^1.0.3"
|
||||||
|
yallist "^4.0.0"
|
||||||
|
|
||||||
|
terminal-kit@^2.1.2:
|
||||||
|
version "2.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/terminal-kit/-/terminal-kit-2.1.2.tgz#08689ff9f8efc6614d34d4cc7be916a91742b896"
|
||||||
|
integrity sha512-1eG7CrQfE1dd5ZHPG5WrTk/DTeskFPqSLEl+QYmvwvI41dRCN2j1qVyxA4FwE0/x24AbjhSA3FJSIgWqQD610Q==
|
||||||
|
dependencies:
|
||||||
|
"@cronvel/get-pixels" "^3.4.0"
|
||||||
|
chroma-js "^2.1.1"
|
||||||
|
lazyness "^1.2.0"
|
||||||
|
ndarray "^1.0.19"
|
||||||
|
nextgen-events "^1.3.4"
|
||||||
|
seventh "^0.7.40"
|
||||||
|
string-kit "^0.12.5"
|
||||||
|
tree-kit "^0.7.0"
|
||||||
|
|
||||||
|
tree-kit@^0.7.0:
|
||||||
|
version "0.7.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/tree-kit/-/tree-kit-0.7.0.tgz#f677b10f79d9b4442ba20e0d87c8a12ecabe5fbb"
|
||||||
|
|
||||||
|
tunnel-agent@^0.6.0:
|
||||||
|
version "0.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
|
||||||
|
dependencies:
|
||||||
|
safe-buffer "^5.0.1"
|
||||||
|
|
||||||
|
uniq@^1.0.0:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff"
|
||||||
|
|
||||||
|
util-deprecate@^1.0.1, util-deprecate@~1.0.1:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||||
|
|
||||||
|
which@^2.0.1:
|
||||||
|
version "2.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
|
||||||
|
dependencies:
|
||||||
|
isexe "^2.0.0"
|
||||||
|
|
||||||
|
wide-align@^1.1.0:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
|
||||||
|
dependencies:
|
||||||
|
string-width "^1.0.2 || 2"
|
||||||
|
|
||||||
|
wrappy@1:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||||
|
|
||||||
|
yallist@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
|
||||||
61
package.json
61
package.json
|
|
@ -1,36 +1,65 @@
|
||||||
{
|
{
|
||||||
"name": "vogue",
|
"name": "vogue-runtime",
|
||||||
"version": "0.0.1",
|
"version": "0.2.0",
|
||||||
"main": "index.js",
|
"main": "out/run.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"types": "./out/run.d.ts",
|
||||||
"bin": {
|
"bin": {
|
||||||
"vogue": "out/run.js"
|
"vogue": "out/run.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"repository": {
|
||||||
"test": "node --enable-source-maps --unhandled-rejections=strict out/run.js test",
|
"url": "https://github.com/marcus13345/vogue"
|
||||||
"debug": "cross-env DEBUG=vogue:* yarn test",
|
|
||||||
"debug:watch": "cross-env DEBUG=vogue:* supervisor -w out,test,lib -n exit --exec yarn -- test",
|
|
||||||
"postinstall": "yarn compile && cd test && yarn",
|
|
||||||
"postcompile:watch": "echo DONE",
|
|
||||||
"compile": "tsc",
|
|
||||||
"compile:watch": "tsc --watch"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"scripts": {
|
||||||
|
"dev": "multiview [ yarn test:watch ] [ yarn compile:watch ] [ yarn debug:watch ]",
|
||||||
|
"test": "c8 --include src/**/*.ts --reporter lcov --reporter text mocha",
|
||||||
|
"test:watch": "cross-env FORCE_COLOR=true supervisor -t -w src,test,.mocharc.json -n exit --extensions js,ts,node --exec cross-env -- yarn test",
|
||||||
|
"debug": "cross-env DEBUG=vogue:* FORCE_COLOR=true DEBUG_COLORS=true DEBUG_HIDE_DATE=true node --enable-source-maps out/run.js examples/test",
|
||||||
|
"debug:watch": "supervisor -t -w out,test/system/**/*.v,lib -n exit --exec yarn -- debug",
|
||||||
|
"compile": "tsc",
|
||||||
|
"compile:watch": "yarn compile --watch --preserveWatchOutput",
|
||||||
|
"postinstall": "yarn compile && cd examples/test && yarn",
|
||||||
|
"test:ci": "yarn test && codecov",
|
||||||
|
"prepublish": "yarn compile"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/chai": "^4.2.18",
|
||||||
|
"@types/chai-as-promised": "^7.1.4",
|
||||||
"@types/debug": "^4.1.5",
|
"@types/debug": "^4.1.5",
|
||||||
|
"@types/fs-extra": "^9.0.11",
|
||||||
|
"@types/jest": "^26.0.23",
|
||||||
"@types/lodash": "^4.14.169",
|
"@types/lodash": "^4.14.169",
|
||||||
"@types/nearley": "^2.11.1",
|
"@types/nearley": "^2.11.1",
|
||||||
"@types/node": "^15.3.0",
|
"@types/node": "^15.3.0",
|
||||||
|
"@types/sinon": "^10.0.0",
|
||||||
"@types/uglify-js": "^3.13.0",
|
"@types/uglify-js": "^3.13.0",
|
||||||
|
"@types/uuid": "^8.3.0",
|
||||||
|
"c8": "^7.7.2",
|
||||||
|
"chai": "^4.3.4",
|
||||||
|
"chai-as-promised": "^7.1.1",
|
||||||
|
"codecov": "^3.8.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
|
"mocha": "^8.4.0",
|
||||||
|
"mocha-lcov-reporter": "^1.3.0",
|
||||||
|
"multiview": "^3.0.1",
|
||||||
|
"sinon": "^10.0.0",
|
||||||
|
"supervisor": "^0.12.0",
|
||||||
|
"ts-node": "^9.1.1",
|
||||||
|
"typescript": "^4.2.4",
|
||||||
|
"yarn": "^1.22.10"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/rimraf": "^3.0.0",
|
||||||
|
"@types/tmp": "^0.2.0",
|
||||||
"debug": "^4.3.1",
|
"debug": "^4.3.1",
|
||||||
|
"fs-extra": "^10.0.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"moo": "^0.5.1",
|
"moo": "^0.5.1",
|
||||||
"nearley": "^2.20.1",
|
"nearley": "^2.20.1",
|
||||||
"nedb": "^1.8.0",
|
"rimraf": "^3.0.2",
|
||||||
"supervisor": "^0.12.0",
|
"tmp": "^0.2.1",
|
||||||
"typescript": "^4.2.4",
|
|
||||||
"uglify-js": "^3.13.5",
|
"uglify-js": "^3.13.5",
|
||||||
"yarn": "^1.22.10"
|
"uuid": "^8.3.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fmarcus13345%2Fvogue?ref=badge_shield)
|
||||||
|

|
||||||
|
[](https://nodei.co/npm/vogue-runtime/)
|
||||||
|
|
||||||
|
Vogue is a programming language that leverages javascript to create no-config graph systems.
|
||||||
|
|
||||||
|
# Getting Started
|
||||||
|
|
||||||
|
To create a vogue system, create a vogue module file in a new folder:
|
||||||
|
`example/main.v`
|
||||||
|
```
|
||||||
|
singleton;
|
||||||
|
|
||||||
|
restore {
|
||||||
|
console.log('Hellow Vogue!');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
then run your system with `vogue example`.
|
||||||
|
|
||||||
|
# NPM Integration
|
||||||
|
|
||||||
|
your vogue system folder may have a `package.json` and a `node_modules` folder. If they do, you can import javascript modules into your vogue module.
|
||||||
|
|
||||||
|
```
|
||||||
|
example
|
||||||
|
|-- package.json
|
||||||
|
|-- main.v
|
||||||
|
`-- node_modules
|
||||||
|
`-- package
|
||||||
|
|-- package.json
|
||||||
|
`-- index.js
|
||||||
|
```
|
||||||
|
```
|
||||||
|
singleton;
|
||||||
|
|
||||||
|
import package from 'package';
|
||||||
|
|
||||||
|
restore {
|
||||||
|
console.log(package.foo());
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
# Persistence
|
||||||
|
|
||||||
|
Vogue systems automagically persist their data, unless otherwise specified. This data is stored inside the `.system` directory.
|
||||||
|
|
||||||
|
# Documentation
|
||||||
|
|
||||||
|
For the full spec of vogue module syntax, see: [syntax](docs/syntax.md).
|
||||||
|
|
||||||
|
To see some common examples and programming patterns, see [examples](examples).
|
||||||
|
|
||||||
|
# License
|
||||||
|
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fmarcus13345%2Fvogue?ref=badge_shield)
|
||||||
157
src/Instance.ts
157
src/Instance.ts
|
|
@ -1,33 +1,53 @@
|
||||||
|
|
||||||
import Serializable from './Serializable.js';
|
|
||||||
import minify from './minify.js';
|
|
||||||
import debug from 'debug';
|
import debug from 'debug';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
const log = debug('vogue:instance');
|
const log = debug('vogue:instance');
|
||||||
import vm from 'vm';
|
import vm from 'vm';
|
||||||
import Module, { Link } from './Module.js';
|
import Module, { LinkDescription, Variable } from './Module.js';
|
||||||
import System from './System.js';
|
import { System } from './System.js';
|
||||||
import { KV } from './KV.js';
|
import * as uuid from 'uuid';
|
||||||
/**
|
/**
|
||||||
* @typedef {import('./System.js').default} System
|
* @typedef {import('./System.js').default} System
|
||||||
* @typedef {import('./Module.js').default} Module
|
* @typedef {import('./Module.js').default} Module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
export type Link = any; // BUT PROXY
|
||||||
|
|
||||||
export default class Instance extends Serializable {
|
export type SerializedInstance = {
|
||||||
|
type: string,
|
||||||
|
links: {
|
||||||
|
[name: string]: string
|
||||||
|
},
|
||||||
|
members: {
|
||||||
|
[name: string]: any // SO LONG AS ITS SERIALIZABLE ._.*
|
||||||
|
},
|
||||||
|
id: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class Instance {
|
||||||
module: Module;
|
module: Module;
|
||||||
links = {}
|
links = {}
|
||||||
system: System;
|
system: System;
|
||||||
context: vm.Context;
|
context: vm.Context | null = null;
|
||||||
locals = [];
|
locals = [];
|
||||||
internalFunctions = {};
|
internalFunctions = {};
|
||||||
_link: Instance;
|
_link: Instance;
|
||||||
location: string;
|
location: string;
|
||||||
|
_id: string;
|
||||||
|
initialContext: any = {};
|
||||||
|
|
||||||
|
get currentContext(): any {
|
||||||
|
return this.context ?? this.initialContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
sync() {
|
||||||
|
this.system.saveInstance(this);
|
||||||
|
}
|
||||||
|
|
||||||
createContext(): vm.Context {
|
createContext(): vm.Context {
|
||||||
if(this.context) return this.context;
|
if(this.context) return this.context;
|
||||||
|
|
||||||
const initialContext: KV = {};
|
|
||||||
|
const initialContext: any = {};
|
||||||
|
|
||||||
// node bindings
|
// node bindings
|
||||||
initialContext.setTimeout = setTimeout;
|
initialContext.setTimeout = setTimeout;
|
||||||
|
|
@ -36,64 +56,143 @@ export default class Instance extends Serializable {
|
||||||
// system globals!
|
// system globals!
|
||||||
// TODO turn this into its own vogue module! system.create/instance.create
|
// TODO turn this into its own vogue module! system.create/instance.create
|
||||||
// TODO request context from system...
|
// TODO request context from system...
|
||||||
initialContext.create = this.system.newInstance.bind(this.system);
|
initialContext.create = this.system.newLink.bind(this.system);
|
||||||
for(const name in this.system.staticInstances)
|
initialContext.process = process;
|
||||||
initialContext[name] = this.system.staticInstances[name];
|
|
||||||
|
// static links!
|
||||||
|
for(const [name, link] of this.system.staticLinks) {
|
||||||
|
log('creating context with static link: ' + name);
|
||||||
|
initialContext[name] = this.system.staticLinks.get(name);
|
||||||
|
}
|
||||||
|
|
||||||
// local links!
|
// local links!
|
||||||
// optional arrays
|
// optional arrays
|
||||||
// TODO maybe make these property accessors to allow for some automation
|
// TODO maybe make these property accessors to allow for some automation
|
||||||
for(const link of this.module.links.filter((v: Link) => v.array && !v.required))
|
for(const link of this.module.links.filter((v: LinkDescription) => v.array && !v.required))
|
||||||
initialContext[link.name] = [];
|
initialContext[link.name] = [];
|
||||||
for(const link of this.module.links.filter((v: Link) => !v.array && !v.required))
|
for(const link of this.module.links.filter((v: LinkDescription) => !v.array && !v.required))
|
||||||
initialContext[link.name] = null;
|
initialContext[link.name] = null;
|
||||||
for(const variable of this.module.variables)
|
for(const variable of this.module.variables)
|
||||||
initialContext[variable.name] = null;
|
attachHookedProperty(initialContext, variable.name, null, this.sync.bind(this))
|
||||||
|
for(const name in this.initialContext)
|
||||||
|
initialContext[name] = this.initialContext[name]
|
||||||
for(const name in this.module.imports)
|
for(const name in this.module.imports)
|
||||||
initialContext[name] = this.module.imports[name];
|
initialContext[name] = this.module.imports[name];
|
||||||
|
|
||||||
|
// instance defined functions
|
||||||
|
initialContext.sync = this.system.saveInstance.bind(this.system, this);
|
||||||
|
|
||||||
const context = vm.createContext(initialContext);
|
const context = vm.createContext(initialContext);
|
||||||
|
|
||||||
|
// user defined functions
|
||||||
for(const name in this.module.functions) {
|
for(const name in this.module.functions) {
|
||||||
const { code, parameters, async } = this.module.functions[name];
|
const { code, parameters, async } = this.module.functions[name];
|
||||||
const injectedScript =
|
const injectedScript = `
|
||||||
`
|
|
||||||
var ${name} = ${async ? 'async ' : ''}function ${name}(${parameters.join(', ')}) ${code}
|
var ${name} = ${async ? 'async ' : ''}function ${name}(${parameters.join(', ')}) ${code}
|
||||||
`;
|
${name} = ${name}.bind(this);`.trim();
|
||||||
vm.runInContext(injectedScript, context, {
|
// log('injecting function...')
|
||||||
|
// log(injectedScript)
|
||||||
});
|
vm.runInContext(injectedScript, context, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log('context created!');
|
||||||
|
log(Object.keys(context));
|
||||||
|
// log(context);
|
||||||
|
|
||||||
|
this.context = context;
|
||||||
return context;
|
return context;
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(module: Module, location: string, parameters: {[name: string]: any}, system: System) {
|
setMember(name: string, value: any) {
|
||||||
super();
|
log('setMember: ' + this.toString() + '.' + name + ' => ' + value);
|
||||||
|
this.currentContext[name] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
setLink(name: string, value: Link) {
|
||||||
|
log('setLink: ' + this.toString() + '.' + name + ' => ' + value.__link__);
|
||||||
|
this.currentContext[name] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
module: Module,
|
||||||
|
parameters: {[name: string]: any},
|
||||||
|
system: System,
|
||||||
|
options?: {
|
||||||
|
id?: string
|
||||||
|
}
|
||||||
|
) {
|
||||||
this.module = module;
|
this.module = module;
|
||||||
this.location = location;
|
this.location = this.module.rootDir;
|
||||||
this.system = system;
|
this.system = system;
|
||||||
this.context = this.createContext();
|
// this.context = this.createContext();
|
||||||
|
this._id = options?.id ?? uuid.v4();
|
||||||
|
|
||||||
this._link = new Proxy(this, {
|
this._link = new Proxy(this, {
|
||||||
get(target: Instance, prop: string, receiver) {
|
get(target: Instance, prop: string, receiver) {
|
||||||
log(`getting ${target.module.name.full}.${prop}: (${target.module.identifiers[prop]}|${typeof target.context[prop]})`);
|
log(`getting ${target.module.name.full}.${prop.toString()}: (${target.module.identifiers[prop]}|${typeof target.context?.[prop]})`);
|
||||||
|
|
||||||
const DNEText = `${target.module.name.full}.${prop.toString()} either does not exist, or is not accessible`;
|
const DNEText = `${target.module.name.full}.${prop.toString()} either does not exist, or is not accessible`;
|
||||||
if(prop === 'restore') throw new Error(DNEText);
|
if(prop === 'restore') throw new Error(DNEText);
|
||||||
|
if(prop === '__link__') return target._id;
|
||||||
|
|
||||||
if(prop in target.module.functions) {
|
if(prop in target.module.functions) {
|
||||||
return target.context[prop];
|
return target.context?.[prop];
|
||||||
}
|
}
|
||||||
throw new Error(DNEText);
|
throw new Error(DNEText);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
log('created ' + this);
|
||||||
}
|
}
|
||||||
|
|
||||||
restore() {
|
async restore() {
|
||||||
return this.context.restore?.();
|
|
||||||
|
return await this.context?.restore?.();
|
||||||
}
|
}
|
||||||
|
|
||||||
get link () {
|
get link () {
|
||||||
return this._link;
|
return this._link;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toSerializableObject(): SerializedInstance {
|
||||||
|
const obj: any = {};
|
||||||
|
obj.type = this.module.name.full;
|
||||||
|
obj.links = Object.fromEntries(this.module.links.map((link: LinkDescription): [string, string] => {
|
||||||
|
const name = link.name;
|
||||||
|
const linkId = this.context?.[name]?.__link__;
|
||||||
|
return [name, linkId];
|
||||||
|
}));
|
||||||
|
obj.members = Object.fromEntries(
|
||||||
|
this.module.variables
|
||||||
|
.filter((member: Variable): boolean => {
|
||||||
|
return member.persist;
|
||||||
|
})
|
||||||
|
.map((member: Variable): [string, any] => {
|
||||||
|
const name = member.name;
|
||||||
|
const value = this.context?.[name];
|
||||||
|
return [name, value];
|
||||||
|
})
|
||||||
|
);
|
||||||
|
obj.id = this._id;
|
||||||
|
|
||||||
|
return obj as SerializedInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
toString() {
|
||||||
|
return this.module.name.full + '(' + this._id.substr(0, 4) + ')';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function attachHookedProperty(target: any, name: string, initialValue: any, changedHook: () => void) {
|
||||||
|
const propId = uuid.v4();
|
||||||
|
target[propId] = initialValue;
|
||||||
|
// TODO if its an object, replace it with a dead simple proxy? for detecting internal changes...
|
||||||
|
Object.defineProperty(target, name, {
|
||||||
|
get() {
|
||||||
|
return target[propId];
|
||||||
|
},
|
||||||
|
set(value) {
|
||||||
|
target[propId] = value;
|
||||||
|
changedHook();
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -14,7 +14,7 @@ import { createRequire } from 'module';
|
||||||
import { pathToFileURL } from 'url';
|
import { pathToFileURL } from 'url';
|
||||||
const log = debug('vogue:module');
|
const log = debug('vogue:module');
|
||||||
|
|
||||||
export type Link = {
|
export type LinkDescription = {
|
||||||
name: string,
|
name: string,
|
||||||
array: boolean,
|
array: boolean,
|
||||||
required: boolean
|
required: boolean
|
||||||
|
|
@ -26,7 +26,7 @@ export type Variable = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class Module {
|
export default class Module {
|
||||||
links: Link[] = [];
|
links: LinkDescription[] = [];
|
||||||
globals = [];
|
globals = [];
|
||||||
functions: {
|
functions: {
|
||||||
[name: string]: {
|
[name: string]: {
|
||||||
|
|
|
||||||
|
|
@ -1,198 +0,0 @@
|
||||||
// import { Ubjson } from '@shelacek/ubjson';
|
|
||||||
import { existsSync, readFileSync, writeFileSync } from 'fs';
|
|
||||||
import { KV } from './KV';
|
|
||||||
|
|
||||||
export default class Serializable {
|
|
||||||
|
|
||||||
constructor(...args: any[]) {}
|
|
||||||
|
|
||||||
// things that need to be stored only in cold
|
|
||||||
// storage are keyed with a special prefix
|
|
||||||
static CLASS_REFERENCE = '$$CLASS_NAME';
|
|
||||||
|
|
||||||
// things that need to be stored only at runtime
|
|
||||||
// are keyed with symbols to not interfere with
|
|
||||||
// user code.
|
|
||||||
static PERSIST_LOCATION = Symbol('PERSIST_LOCATION');
|
|
||||||
|
|
||||||
start() {}
|
|
||||||
|
|
||||||
// toUbj() {
|
|
||||||
// return Ubjson.encode(this.toSerializableObject());
|
|
||||||
// }
|
|
||||||
|
|
||||||
// static fromUbj(buffer) {
|
|
||||||
// return this.fromSerializableObject(Ubjson.decode(buffer));
|
|
||||||
// }
|
|
||||||
|
|
||||||
toJson() {
|
|
||||||
return JSON.stringify(this.toSerializableObject(), null, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
static serializationDependencies(): any[] {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
static fromJson(str: string) {
|
|
||||||
return this.fromSerializableObject(JSON.parse(str));
|
|
||||||
}
|
|
||||||
|
|
||||||
toSerializableObject() {
|
|
||||||
|
|
||||||
const transformValue = (val: any): any => {
|
|
||||||
if(Array.isArray(val)) {
|
|
||||||
return transformArray(val);
|
|
||||||
} else if (val === null || val === undefined) {
|
|
||||||
return val;
|
|
||||||
} else if(typeof val === 'object') {
|
|
||||||
return transformObject(val);
|
|
||||||
} else {
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const transformObject = (obj: KV): KV => {
|
|
||||||
const clone: KV = {};
|
|
||||||
for(const prop of Object.keys(obj)) {
|
|
||||||
if(prop.startsWith('_')) continue;
|
|
||||||
|
|
||||||
clone[prop] = transformValue(obj[prop]);
|
|
||||||
}
|
|
||||||
if(obj instanceof Serializable) {
|
|
||||||
clone[Serializable.CLASS_REFERENCE] = obj.constructor.name;
|
|
||||||
}
|
|
||||||
return clone;
|
|
||||||
}
|
|
||||||
|
|
||||||
const transformArray = (arr: any[]): any[] => {
|
|
||||||
const clone = [];
|
|
||||||
for(const item of arr) {
|
|
||||||
clone.push(transformValue(item));
|
|
||||||
}
|
|
||||||
return clone;
|
|
||||||
}
|
|
||||||
|
|
||||||
return transformObject(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
static fromSerializableObject(obj: KV) {
|
|
||||||
if(obj[Serializable.CLASS_REFERENCE] !== this.name) return null;
|
|
||||||
|
|
||||||
const transformValue = (val: any): any => {
|
|
||||||
if(Array.isArray(val)) {
|
|
||||||
return transformArray(val);
|
|
||||||
} else if(val === null || val === undefined) {
|
|
||||||
return val;
|
|
||||||
} else if(typeof val === 'object') {
|
|
||||||
if(Serializable.CLASS_REFERENCE in val) {
|
|
||||||
const classes = this.serializationDependencies();
|
|
||||||
const matchingClasses = classes.filter((classObject) => {
|
|
||||||
classObject.name === val[Serializable.CLASS_REFERENCE]
|
|
||||||
});
|
|
||||||
if(matchingClasses.length === 1) {
|
|
||||||
return matchingClasses[0].fromSerializableObject(val);
|
|
||||||
} else {
|
|
||||||
return transformObject(val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return transformObject(val);
|
|
||||||
} else {
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const transformObject = (obj: KV): KV => {
|
|
||||||
const clone: KV = {};
|
|
||||||
for(const prop of Object.keys(obj)) {
|
|
||||||
if(prop.startsWith('_')) continue;
|
|
||||||
|
|
||||||
clone[prop] = transformValue(obj[prop]);
|
|
||||||
}
|
|
||||||
return clone;
|
|
||||||
}
|
|
||||||
|
|
||||||
const transformArray = (arr: any[]): any[] => {
|
|
||||||
const clone = [];
|
|
||||||
for(const item of arr) {
|
|
||||||
clone.push(transformValue(item));
|
|
||||||
}
|
|
||||||
return clone;
|
|
||||||
}
|
|
||||||
|
|
||||||
const clone = transformObject(obj);
|
|
||||||
if(Serializable.CLASS_REFERENCE in obj)
|
|
||||||
clone.__proto__ = this.prototype;
|
|
||||||
|
|
||||||
clone.restore();
|
|
||||||
|
|
||||||
return clone;
|
|
||||||
}
|
|
||||||
|
|
||||||
serialize({
|
|
||||||
encoding = 'json'
|
|
||||||
} = {}) {
|
|
||||||
|
|
||||||
switch(encoding) {
|
|
||||||
case 'json': return this.toJson();
|
|
||||||
case 'ubjson':
|
|
||||||
// case 'ubj': return this.toUbj();
|
|
||||||
default: {
|
|
||||||
throw new TypeError('Unknown encoding: ' + encoding);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static deserialize(obj: any, {
|
|
||||||
encoding = 'json'
|
|
||||||
} = {}) {
|
|
||||||
|
|
||||||
switch(encoding) {
|
|
||||||
case 'json': return this.fromJson(obj);
|
|
||||||
case 'ubjson':
|
|
||||||
// case 'ubj': return this.fromUbj(obj);
|
|
||||||
default: {
|
|
||||||
throw new TypeError('Unknown encoding: ' + encoding);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async restore() {}
|
|
||||||
|
|
||||||
static createFromDisk(filename: string, ...args: any[]) {
|
|
||||||
if(existsSync(filename)) {
|
|
||||||
const instance = this.deserialize(readFileSync(createFilepath(filename)));
|
|
||||||
// TS is plain and simply wrong... symbols can be used to index object...
|
|
||||||
// @ts-ignore
|
|
||||||
instance[Serializable.PERSIST_LOCATION] = createFilepath(filename);
|
|
||||||
instance?.restore();
|
|
||||||
return instance;
|
|
||||||
} else {
|
|
||||||
const instance = new this(...args);
|
|
||||||
// again... TS is wrong...
|
|
||||||
// @ts-ignore
|
|
||||||
instance[Serializable.PERSIST_LOCATION] = createFilepath(filename);
|
|
||||||
instance?.updateDisk();
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
updateDisk(filepath?: string) {
|
|
||||||
// if it hasnt yet been written to disk...
|
|
||||||
// this can happen if the contrustor
|
|
||||||
// was called outside of createFromDisk
|
|
||||||
if(filepath) {
|
|
||||||
// see above... TS7053 is just _wrong_. incorrect. thats not how JS works.
|
|
||||||
// @ts-ignore
|
|
||||||
this[Serializable.PERSIST_LOCATION] = createFilepath(filepath);
|
|
||||||
}
|
|
||||||
const data = this.serialize();
|
|
||||||
// this is getting annoying...
|
|
||||||
// @ts-ignore
|
|
||||||
writeFileSync(this[Serializable.PERSIST_LOCATION], data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function createFilepath(path: string) {
|
|
||||||
return `data/${path}`;
|
|
||||||
}
|
|
||||||
227
src/System.ts
227
src/System.ts
|
|
@ -1,9 +1,12 @@
|
||||||
import Instance from './Instance.js';
|
import Instance, { Link, SerializedInstance } from './Instance.js';
|
||||||
import Serializable from './Serializable.js';
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import Module from './Module.js';
|
import Module from './Module.js';
|
||||||
import debug from 'debug';
|
import debug from 'debug';
|
||||||
const log = debug('vogue:system')
|
import { readdirSync, readFileSync, writeFileSync } from 'fs';
|
||||||
|
import { resolve } from 'path';
|
||||||
|
import { ensureDirSync } from 'fs-extra';
|
||||||
|
import * as uuid from 'uuid';
|
||||||
|
const log = debug('vogue:system');
|
||||||
|
|
||||||
const {get, set} = _;
|
const {get, set} = _;
|
||||||
|
|
||||||
|
|
@ -13,45 +16,164 @@ type ModuleNamespaceMap = {
|
||||||
|
|
||||||
type ModuleName = string;
|
type ModuleName = string;
|
||||||
|
|
||||||
class System extends Serializable {
|
export class System {
|
||||||
instances: Instance[] = [];
|
instances: Map<string, Instance> = new Map();
|
||||||
|
bootInstances: Map<string, Instance> = new Map();
|
||||||
|
staticInstances: Map<string, Instance> = new Map();
|
||||||
|
staticLinks: Map<string, Link> = new Map();
|
||||||
|
|
||||||
|
|
||||||
modules: Module[];
|
modules: Module[];
|
||||||
namespace: ModuleNamespaceMap = {};
|
namespace: ModuleNamespaceMap = {};
|
||||||
staticInstances: {
|
|
||||||
[key: string]: Instance
|
|
||||||
} = {};
|
|
||||||
rootDir: string;
|
rootDir: string;
|
||||||
|
|
||||||
constructor(modules: Module[], rootDir: string) {
|
static async create(modules: Module[], rootDir: string) {
|
||||||
super();
|
const system = new System(modules, rootDir);
|
||||||
|
await system.start();
|
||||||
|
return system;
|
||||||
|
}
|
||||||
|
|
||||||
|
async start() {
|
||||||
|
ensureDirSync(resolve(this.rootDir, '.system'));
|
||||||
|
|
||||||
|
log('System startup, in 5 steps!');
|
||||||
|
|
||||||
|
// step 1.1: load serialized instances...
|
||||||
|
log('Step 1.1: reading serialized instances...')
|
||||||
|
const serializedInstances: SerializedInstance[] =
|
||||||
|
readdirSync(resolve(this.rootDir, '.system'))
|
||||||
|
.map(v => resolve(this.rootDir, '.system', v))
|
||||||
|
.map(v => JSON.parse(readFileSync(v).toString()));
|
||||||
|
|
||||||
|
// step 1.2: create serialized instances
|
||||||
|
log('Step 1.2: creating serialized instances...');
|
||||||
|
for(const serializedInstance of serializedInstances)
|
||||||
|
this.createInstance(serializedInstance);
|
||||||
|
|
||||||
|
// TODO again, make links automagically tranform from strings to links when needed at runtime, so this isnt needed...
|
||||||
|
// step 1.2 addendum:
|
||||||
|
log('Step 1.2+: linking serialized instances...');
|
||||||
|
for(const serializedInstance of serializedInstances) {
|
||||||
|
const instance = this.getInstanceById(serializedInstance.id);
|
||||||
|
for(const name in serializedInstance.links) {
|
||||||
|
const linkId = serializedInstance.links[name]
|
||||||
|
const linkedInstance = this.getInstanceById(linkId);
|
||||||
|
const linkedInstanceLink = linkedInstance.link;
|
||||||
|
instance.setLink(name, linkedInstanceLink);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// step 2: validate all modules decalred as static have a static module counterpart
|
||||||
|
log('Step 2: creating missing static instances...');
|
||||||
|
for(const module of this.modules.filter(module => !!module.static)) {
|
||||||
|
const staticIdentifier = module.static;
|
||||||
|
const moduleName = module.name.full;
|
||||||
|
if(!this.staticLinks.has(staticIdentifier)) {
|
||||||
|
this.createInstance({
|
||||||
|
type: moduleName,
|
||||||
|
links: {},
|
||||||
|
members: {},
|
||||||
|
id: uuid.v4()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// step 3: create missing singleton instances
|
||||||
|
log('Step 3: creating missing singleton instances...');
|
||||||
|
for(const module of this.modules.filter(module => !!module.singleton)) {
|
||||||
|
let instanceCount = 0;
|
||||||
|
for(const [,instance] of this.instances) {
|
||||||
|
if(instance.module.name.full === module.name.full) {
|
||||||
|
instanceCount ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(instanceCount === 0) {
|
||||||
|
this.createInstance({
|
||||||
|
type: module.name.full,
|
||||||
|
links: {},
|
||||||
|
members: {},
|
||||||
|
id: uuid.v4()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// step 4: create context in all instances
|
||||||
|
log('Step 4: create context in instances...');
|
||||||
|
for(const [,instance] of this.instances) {
|
||||||
|
instance.createContext();
|
||||||
|
}
|
||||||
|
|
||||||
|
// step 5: restore all boot modules (static & singleton)
|
||||||
|
log('Step 5: restore all boot modules...');
|
||||||
|
for(const [,instance] of this.bootInstances) {
|
||||||
|
await instance.restore();
|
||||||
|
}
|
||||||
|
|
||||||
|
// log('restoring static instances...');
|
||||||
|
// for(const [,instance] of this.instances) {
|
||||||
|
// if(!!instance.module.static) {
|
||||||
|
// await instance.restore();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// log('restoring boot instances...');
|
||||||
|
// for(const [,instance] of this.instances) {
|
||||||
|
// if(!!instance.module.singleton) {
|
||||||
|
// await instance.restore();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const bootModules = this.deriveBootModules();
|
||||||
|
// this.createStaticInstances();
|
||||||
|
|
||||||
|
// log('instantiating boot modules...');
|
||||||
|
// for(const name of bootModules) {
|
||||||
|
// log(' ' + name);
|
||||||
|
// await this.newLink(name);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
private constructor(modules: Module[], rootDir: string) {
|
||||||
|
this.rootDir = rootDir;
|
||||||
this.modules = modules;
|
this.modules = modules;
|
||||||
this.createNamespace();
|
this.createNamespace();
|
||||||
const bootModules = this.deriveBootModules();
|
|
||||||
this.createStaticInstances();
|
|
||||||
this.rootDir = rootDir;
|
|
||||||
|
|
||||||
log('instantiating boot modules...');
|
|
||||||
for(const name of bootModules) {
|
|
||||||
log(' ' + name);
|
|
||||||
this.newInstance(name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
createStaticInstances() {
|
createInstance(serializedInstance: SerializedInstance) {
|
||||||
log('deriving static modules...');
|
// create instance
|
||||||
const staticModules = this.modules.filter((module) => {
|
const instance = new Instance(this.getModule(serializedInstance.type), {}, this, {
|
||||||
return !!module.static;
|
id: serializedInstance.id
|
||||||
}).map((module) => {
|
|
||||||
log(' ' + module.name.full);
|
|
||||||
return module;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
log('instantiating static modules...');
|
// preset members
|
||||||
for(const module of staticModules) {
|
for(const name in serializedInstance.members) {
|
||||||
log(' ' + module.static + ': ' + module.name.full);
|
instance.setMember(name, serializedInstance.members[name]);
|
||||||
this.staticInstances[module.static] =
|
|
||||||
this.newInstance(module.name.full, {});
|
|
||||||
}
|
}
|
||||||
|
// TODO preset links
|
||||||
|
// TODO consolidate links/members into args
|
||||||
|
|
||||||
|
// add to all isntances
|
||||||
|
this.instances.set(instance._id, instance);
|
||||||
|
|
||||||
|
// if its static, add it to both static instance data structures.
|
||||||
|
if(instance.module.static) {
|
||||||
|
this.staticLinks.set(instance.module.static, instance.link);
|
||||||
|
this.staticInstances.set(instance._id, instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
// if it static, or just a singleton, add it to boot modules!
|
||||||
|
if(instance.module.singleton || instance.module.static) {
|
||||||
|
this.bootInstances.set(instance._id, instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
getInstanceById(id: string): Instance {
|
||||||
|
if(!this.instances.has(id))
|
||||||
|
throw new Error(`${id} is not a valid instance link id`);
|
||||||
|
|
||||||
|
return this.instances.get(id) as Instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
deriveBootModules() {
|
deriveBootModules() {
|
||||||
|
|
@ -69,32 +191,49 @@ class System extends Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
createNamespace() {
|
createNamespace() {
|
||||||
log('creating namespace map...');
|
|
||||||
this.namespace = this.modules.reduce((acc, val) => {
|
this.namespace = this.modules.reduce((acc, val) => {
|
||||||
if(get(acc, val.name.full) instanceof Module)
|
if(get(acc, val.name.full) instanceof Module)
|
||||||
throw new Error('Duplicate module "' + val.name.full + '"');
|
throw new Error('Duplicate module "' + val.name.full + '"');
|
||||||
set(acc, val.name.full, val);
|
set(acc, val.name.full, val);
|
||||||
log(' ' + val.name.full);
|
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
saveInstance(instance: Instance): void {
|
||||||
|
const path = resolve(this.rootDir, '.system');
|
||||||
|
ensureDirSync(path);
|
||||||
|
const file = instance._id + '.json';
|
||||||
|
const filepath = resolve(path, file);
|
||||||
|
log('saving ' + instance + '...');
|
||||||
|
const json = JSON.stringify(instance.toSerializableObject(), null, 2)
|
||||||
|
writeFileSync(filepath, json);
|
||||||
|
}
|
||||||
|
|
||||||
getModule(name: ModuleName): Module {
|
getModule(name: ModuleName): Module {
|
||||||
const module = get(this.namespace, name);
|
const module = get(this.namespace, name);
|
||||||
if(module instanceof Module) return module;
|
if(module instanceof Module) return module;
|
||||||
else throw Error(`${name} is not a module`);
|
else throw Error(`unknown module ${name}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
createInstance(name: ModuleName, args = {}) {
|
async newLink(name: ModuleName, args = {}) {
|
||||||
return new Instance(this.getModule(name), '', args, this);
|
const instance = this.createInstance({
|
||||||
}
|
type: name,
|
||||||
|
links: args,
|
||||||
newInstance(name: ModuleName, args = {}) {
|
members: {},
|
||||||
const instance = this.createInstance(name, args);
|
id: uuid.v4()
|
||||||
const link = instance.link;
|
});
|
||||||
instance.restore();
|
instance.createContext();
|
||||||
return link;
|
await instance.restore();
|
||||||
|
return instance.link;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default System;
|
// class SerializedInstanceInjector {
|
||||||
|
// system: System;
|
||||||
|
// serializedInstances: SerializedInstance[];
|
||||||
|
|
||||||
|
// constructor(serializedInstances: SerializedInstance[], system: System) {
|
||||||
|
// this.serializedInstances = serializedInstances;
|
||||||
|
// this.system = system;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
@ -14,7 +14,6 @@ import { readFileSync } from 'fs';
|
||||||
import debug from 'debug';
|
import debug from 'debug';
|
||||||
import { resolve, dirname } from 'path';
|
import { resolve, dirname } from 'path';
|
||||||
import { fileURLToPath } from 'url';
|
import { fileURLToPath } from 'url';
|
||||||
import minify from './minify.js';
|
|
||||||
|
|
||||||
const log = debug('vogue:ast');
|
const log = debug('vogue:ast');
|
||||||
const grammarFile = resolve(fileURLToPath(dirname(import.meta.url)), '..', 'lib', 'grammar.ne');
|
const grammarFile = resolve(fileURLToPath(dirname(import.meta.url)), '..', 'lib', 'grammar.ne');
|
||||||
|
|
|
||||||
|
|
@ -4,3 +4,11 @@ Object.defineProperty(Array.prototype, 'empty', {
|
||||||
return this.length === 0;
|
return this.length === 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// ignored because there seems to be no good way to test this.
|
||||||
|
// would love to find one though...
|
||||||
|
/* c8 ignore start */
|
||||||
|
process.on('unhandledRejection', (reason: Error, p) => {
|
||||||
|
console.log(reason.stack ?? reason.name + '\n\nStack trace unavailable...');
|
||||||
|
});
|
||||||
|
/* c8 ignore end */
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
|
|
||||||
import uglify from 'uglify-js';
|
|
||||||
|
|
||||||
export default (code: string): string => {
|
|
||||||
return uglify.minify(code, {
|
|
||||||
compress: {
|
|
||||||
dead_code: true,
|
|
||||||
global_defs: {
|
|
||||||
DEBUG: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
sourceMap: {
|
|
||||||
content: 'inline'
|
|
||||||
}
|
|
||||||
}).code;
|
|
||||||
}
|
|
||||||
11
src/run.ts
11
src/run.ts
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node --enable-source-maps
|
||||||
import debug from 'debug';
|
import debug from 'debug';
|
||||||
const log = debug('vogue:cli');
|
const log = debug('vogue:cli');
|
||||||
const systemLocation = resolve(process.argv[2]);
|
const systemLocation = resolve(process.argv[2]);
|
||||||
|
|
@ -8,17 +8,14 @@ import { readdirSync, lstatSync } from 'fs';
|
||||||
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import Module from './Module.js';
|
import Module from './Module.js';
|
||||||
import System from './System.js';
|
import {System} from './System.js';
|
||||||
import './extensions.js';
|
import './extensions.js';
|
||||||
import { fileURLToPath } from 'url';
|
import { fileURLToPath } from 'url';
|
||||||
// globals inside grammar context
|
|
||||||
import minify from './minify';
|
|
||||||
|
|
||||||
const { get, set } = _;
|
const { get, set } = _;
|
||||||
const standardLibrary = resolve(fileURLToPath(dirname(import.meta.url)), '..', 'lib', 'vogue');
|
const standardLibrary = resolve(fileURLToPath(dirname(import.meta.url)), '..', 'lib', 'vogue');
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
// TODO simplify this line gaddam
|
|
||||||
const ignoreDeps = (path: string) => parse(path).name !== 'node_modules';
|
const ignoreDeps = (path: string) => parse(path).name !== 'node_modules';
|
||||||
|
|
||||||
const files = [
|
const files = [
|
||||||
|
|
@ -34,8 +31,8 @@ const standardLibrary = resolve(fileURLToPath(dirname(import.meta.url)), '..', '
|
||||||
log('parsing modules...');
|
log('parsing modules...');
|
||||||
const modules = await Promise.all(fullpaths.map(loc => Module.create(loc, systemLocation)));
|
const modules = await Promise.all(fullpaths.map(loc => Module.create(loc, systemLocation)));
|
||||||
|
|
||||||
const sys = new System(modules, systemLocation);
|
const sys = await System.create(modules, systemLocation);
|
||||||
})()
|
})();
|
||||||
|
|
||||||
function walkdirSync(root: string, filter: ((path: string) => boolean) = () => true): string[] {
|
function walkdirSync(root: string, filter: ((path: string) => boolean) = () => true): string[] {
|
||||||
log('reading', root, '...');
|
log('reading', root, '...');
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { expect } from './lib/expect.js';
|
||||||
|
import '../src/extensions.ts';
|
||||||
|
|
||||||
|
describe('extensions', () => {
|
||||||
|
it('creates empty array extensions', () => {
|
||||||
|
expect(([] as any).empty).to.be.true;
|
||||||
|
expect(([1] as any).empty).to.be.false;
|
||||||
|
expect(([1, 2, 3] as any).empty).to.be.false;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,106 @@
|
||||||
|
import { createAst } from '../src/createAst.js';
|
||||||
|
import { expect } from './lib/expect.js';
|
||||||
|
import * as ModuleFiles from './lib/ModuleFiles.js'
|
||||||
|
|
||||||
|
describe('Lexer', () => {
|
||||||
|
|
||||||
|
it('parses blank file', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.blank);
|
||||||
|
expect(ast).to.deep.equal([]);
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('namespaces', () => {
|
||||||
|
it('parses namespaces without dots', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.namespaceX);
|
||||||
|
expect(ast).to.deep.equal([{type: 'namespace', namespace: 'x'}]);
|
||||||
|
});
|
||||||
|
it('parses namespaces with a single dot', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.namespaceXY);
|
||||||
|
expect(ast).to.deep.equal([{type: 'namespace', namespace: 'x.y'}]);
|
||||||
|
});
|
||||||
|
it('parses namespaces two dots', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.namespaceXYZ);
|
||||||
|
expect(ast).to.deep.equal([{type: 'namespace', namespace: 'x.y.z'}]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('links', () => {
|
||||||
|
it('parses link', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.link);
|
||||||
|
expect(ast).to.deep.equal([{type: 'link', array: false, required: false, name: 'test'}]);
|
||||||
|
});
|
||||||
|
it('parses required link', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.requiredLink);
|
||||||
|
expect(ast).to.deep.equal([{type: 'link', array: false, required: true, name: 'test'}]);
|
||||||
|
});
|
||||||
|
it('parses link array', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.linkArray);
|
||||||
|
expect(ast).to.deep.equal([{type: 'link', array: true, required: false, name: 'test'}]);
|
||||||
|
});
|
||||||
|
it('parses required link array', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.requiredLinkArray);
|
||||||
|
expect(ast).to.deep.equal([{type: 'link', array: true, required: true, name: 'test'}]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('functions', () => {
|
||||||
|
it('function with parameters omitted', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.functionNoParams);
|
||||||
|
expect(ast).to.be.an('array').with.length(1);
|
||||||
|
expect(ast[0]).to.be.an('object');
|
||||||
|
expect(ast[0]).to.include({type: 'function', name: 'test', async: false});
|
||||||
|
expect(ast[0].parameters).to.be.an('array').of.length(0);
|
||||||
|
});
|
||||||
|
it('function with empty parameters', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.functionEmptyParams);
|
||||||
|
expect(ast).to.be.an('array').with.length(1);
|
||||||
|
expect(ast[0]).to.be.an('object');
|
||||||
|
expect(ast[0]).to.include({type: 'function', name: 'test', async: false});
|
||||||
|
expect(ast[0].parameters).to.be.an('array').of.length(0);
|
||||||
|
});
|
||||||
|
it('function with one parameter', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.functionOneParam);
|
||||||
|
expect(ast).to.be.an('array').with.length(1);
|
||||||
|
expect(ast[0]).to.be.an('object');
|
||||||
|
expect(ast[0]).to.include({type: 'function', name: 'test', async: false});
|
||||||
|
expect(ast[0].parameters).to.be.an('array').deep.equals(["a"]);
|
||||||
|
});
|
||||||
|
it('function with two parameters', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.functionTwoParams);
|
||||||
|
expect(ast).to.be.an('array').with.length(1);
|
||||||
|
expect(ast[0]).to.be.an('object');
|
||||||
|
expect(ast[0]).to.include({type: 'function', name: 'test', async: false});
|
||||||
|
expect(ast[0].parameters).to.be.an('array').deep.equals(["a", "b"]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('async function with parameters omitted', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.asyncFunctionNoParams);
|
||||||
|
expect(ast).to.be.an('array').with.length(1);
|
||||||
|
expect(ast[0]).to.be.an('object');
|
||||||
|
expect(ast[0]).to.deep.include({type: 'function', name: 'test', async: true});
|
||||||
|
expect(ast[0].parameters).to.be.an('array').of.length(0);
|
||||||
|
});
|
||||||
|
it('async function with empty parameters', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.asyncFunctionEmptyParams);
|
||||||
|
expect(ast).to.be.an('array').with.length(1);
|
||||||
|
expect(ast[0]).to.be.an('object');
|
||||||
|
expect(ast[0]).to.deep.include({type: 'function', name: 'test', async: true});
|
||||||
|
expect(ast[0].parameters).to.be.an('array').of.length(0);
|
||||||
|
});
|
||||||
|
it('async function with one parameter', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.asyncFunctionOneParam);
|
||||||
|
expect(ast).to.be.an('array').with.length(1);
|
||||||
|
expect(ast[0]).to.be.an('object');
|
||||||
|
expect(ast[0]).to.deep.include({type: 'function', name: 'test', async: true});
|
||||||
|
expect(ast[0].parameters).to.be.an('array').deep.equals(["a"]);
|
||||||
|
});
|
||||||
|
it('async function with two parameters', () => {
|
||||||
|
const ast: any = createAst(ModuleFiles.asyncFunctionTwoParams);
|
||||||
|
expect(ast).to.be.an('array').with.length(1);
|
||||||
|
expect(ast[0]).to.be.an('object');
|
||||||
|
expect(ast[0]).to.deep.include({type: 'function', name: 'test', async: true});
|
||||||
|
expect(ast[0].parameters).to.be.an('array').deep.equals(["a", "b"]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
|
||||||
|
import { resolve, parse } from 'path';
|
||||||
|
import { fileURLToPath } from 'url';
|
||||||
|
|
||||||
|
function file(str: string) {
|
||||||
|
return resolve(parse(fileURLToPath(import.meta.url)).dir, '..', 'modules', str + '.v')
|
||||||
|
}
|
||||||
|
|
||||||
|
export const blank = file('blank');
|
||||||
|
|
||||||
|
export const namespaceX = file('namespaceX');
|
||||||
|
export const namespaceXY = file('namespaceXY');
|
||||||
|
export const namespaceXYZ = file('namespaceXYZ');
|
||||||
|
|
||||||
|
export const link = file('link');
|
||||||
|
export const linkArray = file('linkArray');
|
||||||
|
export const requiredLink = file('requiredLink');
|
||||||
|
export const requiredLinkArray = file('requiredLinkArray');
|
||||||
|
|
||||||
|
export const functionNoParams = file('functionNoParams');
|
||||||
|
export const functionEmptyParams = file('functionEmptyParams');
|
||||||
|
export const functionOneParam = file('functionOneParam');
|
||||||
|
export const functionTwoParams = file('functionTwoParams');
|
||||||
|
export const asyncFunctionNoParams = file('asyncFunctionNoParams');
|
||||||
|
export const asyncFunctionEmptyParams = file('asyncFunctionEmptyParams');
|
||||||
|
export const asyncFunctionOneParam = file('asyncFunctionOneParam');
|
||||||
|
export const asyncFunctionTwoParams = file('asyncFunctionTwoParams');
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import {System} from '../../src/System.js';
|
||||||
|
import * as tmp from 'tmp';
|
||||||
|
import { dirname, resolve } from 'path';
|
||||||
|
import { fileURLToPath } from 'url';
|
||||||
|
import { createAst } from '../../src/createAst.js';
|
||||||
|
import { readdirSync } from 'fs';
|
||||||
|
import Module from '../../src/Module.js';
|
||||||
|
|
||||||
|
const systemsPath = resolve(fileURLToPath(dirname(import.meta.url)), '..', 'systems');
|
||||||
|
|
||||||
|
export async function createSystem(systemName: string) {
|
||||||
|
const { name: tmpDir } = tmp.dirSync();
|
||||||
|
|
||||||
|
const modulesPath = resolve(systemsPath, systemName);
|
||||||
|
const modules = await Promise.all(readdirSync(modulesPath)
|
||||||
|
.map(v => resolve(modulesPath, v))
|
||||||
|
.map(v => Module.create(v, modulesPath)));
|
||||||
|
|
||||||
|
const system = await System.create(modules, tmpDir);
|
||||||
|
|
||||||
|
return system;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
import * as chai from 'chai';
|
||||||
|
import cap from 'chai-as-promised';
|
||||||
|
|
||||||
|
chai.use(cap);
|
||||||
|
export const {expect} = chai;
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
async test() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
async test {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
async test(a) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
async test(a, b) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
test() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
test {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
test(a) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
test(a, b) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
link test;
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
link[] test;
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
namespace x;
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
namespace x.y;
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
namespace x.y.z;
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
required link test;
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
required link[] test;
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
restore {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { createSystem } from './lib/System.js';
|
||||||
|
import { expect } from './lib/expect.js'
|
||||||
|
|
||||||
|
describe('system', () => {
|
||||||
|
it('cross linked static instances', (done) => {
|
||||||
|
expect(createSystem('crossStaticLinking')).to.eventually.be.fulfilled.notify(done);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('non-existant module retrieval throws', (done) => {
|
||||||
|
expect(createSystem('unknownModule')).to.eventually.be.rejected.notify(done);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
static a;
|
||||||
|
|
||||||
|
restore() {
|
||||||
|
if(typeof b !== 'object') {
|
||||||
|
throw new Error('Static instance A does not exist!');
|
||||||
|
} else b.fun();
|
||||||
|
}
|
||||||
|
|
||||||
|
fun() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
static b;
|
||||||
|
|
||||||
|
restore() {
|
||||||
|
if(typeof a !== 'object') {
|
||||||
|
throw new Error('Static instance A does not exist!');
|
||||||
|
} else a.fun();
|
||||||
|
}
|
||||||
|
|
||||||
|
fun() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
singleton;
|
||||||
|
|
||||||
|
async restore {
|
||||||
|
await create('this.module.doesnt.exist');
|
||||||
|
}
|
||||||
11
test/trees.v
11
test/trees.v
|
|
@ -1,11 +0,0 @@
|
||||||
namespace structures;
|
|
||||||
|
|
||||||
member alive;
|
|
||||||
member age;
|
|
||||||
|
|
||||||
required link land;
|
|
||||||
|
|
||||||
restore {
|
|
||||||
alive ??= true;
|
|
||||||
age ??= 0;
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "esnext",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"target": "es2020",
|
||||||
|
"allowSyntheticDefaultImports": true
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"**/*.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
16
test/world.v
16
test/world.v
|
|
@ -1,16 +0,0 @@
|
||||||
link[] pawns;
|
|
||||||
|
|
||||||
member map;
|
|
||||||
member size;
|
|
||||||
|
|
||||||
restore {
|
|
||||||
for(let i = 0; i < 3; i ++) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
this.size ??= 64;
|
|
||||||
}
|
|
||||||
|
|
||||||
async render() {
|
|
||||||
|
|
||||||
}
|
|
||||||
346
test/yarn.lock
346
test/yarn.lock
|
|
@ -1,346 +0,0 @@
|
||||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
||||||
# yarn lockfile v1
|
|
||||||
|
|
||||||
|
|
||||||
"@cronvel/get-pixels@^3.4.0":
|
|
||||||
version "3.4.0"
|
|
||||||
resolved "https://registry.npmjs.org/@cronvel/get-pixels/-/get-pixels-3.4.0.tgz"
|
|
||||||
dependencies:
|
|
||||||
jpeg-js "^0.4.1"
|
|
||||||
ndarray "^1.0.19"
|
|
||||||
ndarray-pack "^1.1.1"
|
|
||||||
node-bitmap "0.0.1"
|
|
||||||
omggif "^1.0.10"
|
|
||||||
pngjs "^5.0.0"
|
|
||||||
|
|
||||||
ansi-styles@^3.2.1:
|
|
||||||
version "3.2.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
|
|
||||||
dependencies:
|
|
||||||
color-convert "^1.9.0"
|
|
||||||
|
|
||||||
ansi-styles@^4.1.0:
|
|
||||||
version "4.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
|
|
||||||
dependencies:
|
|
||||||
color-convert "^2.0.1"
|
|
||||||
|
|
||||||
chalk@^2.3.2:
|
|
||||||
version "2.4.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
|
|
||||||
dependencies:
|
|
||||||
ansi-styles "^3.2.1"
|
|
||||||
escape-string-regexp "^1.0.5"
|
|
||||||
supports-color "^5.3.0"
|
|
||||||
|
|
||||||
chalk@^4.1.1:
|
|
||||||
version "4.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad"
|
|
||||||
dependencies:
|
|
||||||
ansi-styles "^4.1.0"
|
|
||||||
supports-color "^7.1.0"
|
|
||||||
|
|
||||||
chroma-js@^2.1.1:
|
|
||||||
version "2.1.1"
|
|
||||||
resolved "https://registry.npmjs.org/chroma-js/-/chroma-js-2.1.1.tgz"
|
|
||||||
dependencies:
|
|
||||||
cross-env "^6.0.3"
|
|
||||||
|
|
||||||
color-convert@^1.9.0:
|
|
||||||
version "1.9.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
|
|
||||||
dependencies:
|
|
||||||
color-name "1.1.3"
|
|
||||||
|
|
||||||
color-convert@^2.0.1:
|
|
||||||
version "2.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
|
|
||||||
dependencies:
|
|
||||||
color-name "~1.1.4"
|
|
||||||
|
|
||||||
color-name@1.1.3:
|
|
||||||
version "1.1.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
|
|
||||||
|
|
||||||
color-name@~1.1.4:
|
|
||||||
version "1.1.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
|
||||||
|
|
||||||
cross-env@^6.0.3:
|
|
||||||
version "6.0.3"
|
|
||||||
resolved "https://registry.npmjs.org/cross-env/-/cross-env-6.0.3.tgz"
|
|
||||||
dependencies:
|
|
||||||
cross-spawn "^7.0.0"
|
|
||||||
|
|
||||||
cross-spawn@^7.0.0:
|
|
||||||
version "7.0.3"
|
|
||||||
resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz"
|
|
||||||
dependencies:
|
|
||||||
path-key "^3.1.0"
|
|
||||||
shebang-command "^2.0.0"
|
|
||||||
which "^2.0.1"
|
|
||||||
|
|
||||||
cwise-compiler@^1.1.2:
|
|
||||||
version "1.1.3"
|
|
||||||
resolved "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz"
|
|
||||||
dependencies:
|
|
||||||
uniq "^1.0.0"
|
|
||||||
|
|
||||||
error-ex@^1.3.1:
|
|
||||||
version "1.3.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
|
|
||||||
dependencies:
|
|
||||||
is-arrayish "^0.2.1"
|
|
||||||
|
|
||||||
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"
|
|
||||||
|
|
||||||
figures@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
|
|
||||||
dependencies:
|
|
||||||
escape-string-regexp "^1.0.5"
|
|
||||||
|
|
||||||
find-up@^2.0.0:
|
|
||||||
version "2.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
|
|
||||||
dependencies:
|
|
||||||
locate-path "^2.0.0"
|
|
||||||
|
|
||||||
graceful-fs@^4.1.2:
|
|
||||||
version "4.2.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"
|
|
||||||
|
|
||||||
has-flag@^3.0.0:
|
|
||||||
version "3.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
|
|
||||||
|
|
||||||
has-flag@^4.0.0:
|
|
||||||
version "4.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
|
|
||||||
|
|
||||||
iota-array@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.npmjs.org/iota-array/-/iota-array-1.0.0.tgz"
|
|
||||||
|
|
||||||
is-arrayish@^0.2.1:
|
|
||||||
version "0.2.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
|
|
||||||
|
|
||||||
is-buffer@^1.0.2:
|
|
||||||
version "1.1.6"
|
|
||||||
resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz"
|
|
||||||
|
|
||||||
isexe@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz"
|
|
||||||
|
|
||||||
jpeg-js@^0.4.1:
|
|
||||||
version "0.4.3"
|
|
||||||
resolved "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.3.tgz"
|
|
||||||
|
|
||||||
json-parse-better-errors@^1.0.1:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
|
|
||||||
|
|
||||||
lazyness@^1.2.0:
|
|
||||||
version "1.2.0"
|
|
||||||
resolved "https://registry.npmjs.org/lazyness/-/lazyness-1.2.0.tgz"
|
|
||||||
|
|
||||||
load-json-file@^4.0.0:
|
|
||||||
version "4.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b"
|
|
||||||
dependencies:
|
|
||||||
graceful-fs "^4.1.2"
|
|
||||||
parse-json "^4.0.0"
|
|
||||||
pify "^3.0.0"
|
|
||||||
strip-bom "^3.0.0"
|
|
||||||
|
|
||||||
locate-path@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
|
|
||||||
dependencies:
|
|
||||||
p-locate "^2.0.0"
|
|
||||||
path-exists "^3.0.0"
|
|
||||||
|
|
||||||
moment@^2.11.2:
|
|
||||||
version "2.29.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
|
|
||||||
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
|
|
||||||
|
|
||||||
ndarray-pack@^1.1.1:
|
|
||||||
version "1.2.1"
|
|
||||||
resolved "https://registry.npmjs.org/ndarray-pack/-/ndarray-pack-1.2.1.tgz"
|
|
||||||
dependencies:
|
|
||||||
cwise-compiler "^1.1.2"
|
|
||||||
ndarray "^1.0.13"
|
|
||||||
|
|
||||||
ndarray@^1.0.13, ndarray@^1.0.19:
|
|
||||||
version "1.0.19"
|
|
||||||
resolved "https://registry.npmjs.org/ndarray/-/ndarray-1.0.19.tgz"
|
|
||||||
dependencies:
|
|
||||||
iota-array "^1.0.0"
|
|
||||||
is-buffer "^1.0.2"
|
|
||||||
|
|
||||||
nextgen-events@^1.3.4:
|
|
||||||
version "1.3.4"
|
|
||||||
resolved "https://registry.npmjs.org/nextgen-events/-/nextgen-events-1.3.4.tgz"
|
|
||||||
|
|
||||||
node-bitmap@0.0.1:
|
|
||||||
version "0.0.1"
|
|
||||||
resolved "https://registry.npmjs.org/node-bitmap/-/node-bitmap-0.0.1.tgz"
|
|
||||||
|
|
||||||
omggif@^1.0.10:
|
|
||||||
version "1.0.10"
|
|
||||||
resolved "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz"
|
|
||||||
|
|
||||||
p-limit@^1.1.0:
|
|
||||||
version "1.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
|
|
||||||
dependencies:
|
|
||||||
p-try "^1.0.0"
|
|
||||||
|
|
||||||
p-locate@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
|
|
||||||
dependencies:
|
|
||||||
p-limit "^1.1.0"
|
|
||||||
|
|
||||||
p-try@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
|
|
||||||
|
|
||||||
parse-json@^4.0.0:
|
|
||||||
version "4.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
|
|
||||||
dependencies:
|
|
||||||
error-ex "^1.3.1"
|
|
||||||
json-parse-better-errors "^1.0.1"
|
|
||||||
|
|
||||||
path-exists@^3.0.0:
|
|
||||||
version "3.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
|
|
||||||
|
|
||||||
path-key@^3.1.0:
|
|
||||||
version "3.1.1"
|
|
||||||
resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz"
|
|
||||||
|
|
||||||
pify@^3.0.0:
|
|
||||||
version "3.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
|
|
||||||
|
|
||||||
pkg-conf@^2.1.0:
|
|
||||||
version "2.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-2.1.0.tgz#2126514ca6f2abfebd168596df18ba57867f0058"
|
|
||||||
dependencies:
|
|
||||||
find-up "^2.0.0"
|
|
||||||
load-json-file "^4.0.0"
|
|
||||||
|
|
||||||
pngjs@^5.0.0:
|
|
||||||
version "5.0.0"
|
|
||||||
resolved "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz"
|
|
||||||
|
|
||||||
random-world@^1.2.1:
|
|
||||||
version "1.2.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/random-world/-/random-world-1.2.1.tgz#aca953a169dc5ffa455a2bc39d7ee81da6f12480"
|
|
||||||
integrity sha1-rKlToWncX/pFWivDnX7oHabxJIA=
|
|
||||||
dependencies:
|
|
||||||
moment "^2.11.2"
|
|
||||||
seedrandom "^2.4.2"
|
|
||||||
underscore "^1.8.3"
|
|
||||||
uuid "^3.0.1"
|
|
||||||
|
|
||||||
seedrandom@^2.4.2:
|
|
||||||
version "2.4.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-2.4.4.tgz#b25ea98632c73e45f58b77cfaa931678df01f9ba"
|
|
||||||
integrity sha512-9A+PDmgm+2du77B5i0Ip2cxOqqHjgNxnBgglxLcX78A2D6c2rTo61z4jnVABpF4cKeDMDG+cmXXvdnqse2VqMA==
|
|
||||||
|
|
||||||
setimmediate@^1.0.5:
|
|
||||||
version "1.0.5"
|
|
||||||
resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz"
|
|
||||||
|
|
||||||
seventh@^0.7.40:
|
|
||||||
version "0.7.40"
|
|
||||||
resolved "https://registry.npmjs.org/seventh/-/seventh-0.7.40.tgz"
|
|
||||||
dependencies:
|
|
||||||
setimmediate "^1.0.5"
|
|
||||||
|
|
||||||
shebang-command@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz"
|
|
||||||
dependencies:
|
|
||||||
shebang-regex "^3.0.0"
|
|
||||||
|
|
||||||
shebang-regex@^3.0.0:
|
|
||||||
version "3.0.0"
|
|
||||||
resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz"
|
|
||||||
|
|
||||||
signale@^1.4.0:
|
|
||||||
version "1.4.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/signale/-/signale-1.4.0.tgz#c4be58302fb0262ac00fc3d886a7c113759042f1"
|
|
||||||
dependencies:
|
|
||||||
chalk "^2.3.2"
|
|
||||||
figures "^2.0.0"
|
|
||||||
pkg-conf "^2.1.0"
|
|
||||||
|
|
||||||
sisteransi@^1.0.5:
|
|
||||||
version "1.0.5"
|
|
||||||
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
|
|
||||||
|
|
||||||
string-kit@^0.12.5:
|
|
||||||
version "0.12.5"
|
|
||||||
resolved "https://registry.npmjs.org/string-kit/-/string-kit-0.12.5.tgz"
|
|
||||||
|
|
||||||
strip-bom@^3.0.0:
|
|
||||||
version "3.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
|
|
||||||
|
|
||||||
supports-color@^5.3.0:
|
|
||||||
version "5.5.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
|
|
||||||
dependencies:
|
|
||||||
has-flag "^3.0.0"
|
|
||||||
|
|
||||||
supports-color@^7.1.0:
|
|
||||||
version "7.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
|
|
||||||
dependencies:
|
|
||||||
has-flag "^4.0.0"
|
|
||||||
|
|
||||||
terminal-kit@^2.1.2:
|
|
||||||
version "2.1.2"
|
|
||||||
resolved "https://registry.npmjs.org/terminal-kit/-/terminal-kit-2.1.2.tgz"
|
|
||||||
dependencies:
|
|
||||||
"@cronvel/get-pixels" "^3.4.0"
|
|
||||||
chroma-js "^2.1.1"
|
|
||||||
lazyness "^1.2.0"
|
|
||||||
ndarray "^1.0.19"
|
|
||||||
nextgen-events "^1.3.4"
|
|
||||||
seventh "^0.7.40"
|
|
||||||
string-kit "^0.12.5"
|
|
||||||
tree-kit "^0.7.0"
|
|
||||||
|
|
||||||
tree-kit@^0.7.0:
|
|
||||||
version "0.7.0"
|
|
||||||
resolved "https://registry.npmjs.org/tree-kit/-/tree-kit-0.7.0.tgz"
|
|
||||||
|
|
||||||
underscore@^1.8.3:
|
|
||||||
version "1.13.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.1.tgz#0c1c6bd2df54b6b69f2314066d65b6cde6fcf9d1"
|
|
||||||
integrity sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==
|
|
||||||
|
|
||||||
uniq@^1.0.0:
|
|
||||||
version "1.0.1"
|
|
||||||
resolved "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz"
|
|
||||||
|
|
||||||
uuid@^3.0.1:
|
|
||||||
version "3.4.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
|
|
||||||
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
|
|
||||||
|
|
||||||
which@^2.0.1:
|
|
||||||
version "2.0.2"
|
|
||||||
resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz"
|
|
||||||
dependencies:
|
|
||||||
isexe "^2.0.0"
|
|
||||||
|
|
@ -7,7 +7,8 @@
|
||||||
"target": "esnext",
|
"target": "esnext",
|
||||||
"outDir": "out",
|
"outDir": "out",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"declaration": true
|
"declaration": true,
|
||||||
|
"pretty": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*.ts"
|
"src/**/*.ts"
|
||||||
|
|
|
||||||
BIN
vogue-0.0.1.tgz
BIN
vogue-0.0.1.tgz
Binary file not shown.
Reference in New Issue