├── .gitignore ├── .vscode └── launch.json ├── .vscodeignore ├── CHANGELOG.md ├── README.md ├── grammars_archive ├── tiddler.tmLanguage.json ├── tiddlywiki5.archive.json ├── tw5-dictionary.json ├── tw5-meta-file.json ├── tw5-multids-file.json ├── tw5-tid-file.json └── tw5-wikitext.json ├── language-configuration.json ├── node_modules ├── .bin │ ├── vscode-tmgrammar-snap │ ├── vscode-tmgrammar-snap.cmd │ ├── vscode-tmgrammar-snap.ps1 │ ├── vscode-tmgrammar-test │ ├── vscode-tmgrammar-test.cmd │ └── vscode-tmgrammar-test.ps1 ├── .package-lock.json ├── ansi-styles │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── balanced-match │ ├── .github │ │ └── FUNDING.yml │ ├── LICENSE.md │ ├── README.md │ ├── index.js │ └── package.json ├── bottleneck │ ├── .babelrc.es5 │ ├── .babelrc.lib │ ├── .env │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── bottleneck.d.ts │ ├── bottleneck.d.ts.ejs │ ├── bower.json │ ├── es5.js │ ├── lib │ │ ├── Batcher.js │ │ ├── Bottleneck.js │ │ ├── BottleneckError.js │ │ ├── DLList.js │ │ ├── Events.js │ │ ├── Group.js │ │ ├── IORedisConnection.js │ │ ├── Job.js │ │ ├── LocalDatastore.js │ │ ├── Queues.js │ │ ├── RedisConnection.js │ │ ├── RedisDatastore.js │ │ ├── Scripts.js │ │ ├── States.js │ │ ├── Sync.js │ │ ├── es5.js │ │ ├── index.js │ │ ├── lua.json │ │ ├── parser.js │ │ └── version.json │ ├── light.js │ ├── package.json │ ├── rollup.config.es5.js │ ├── rollup.config.light.js │ ├── scripts │ │ ├── assemble_lua.js │ │ ├── build.sh │ │ ├── test_all.sh │ │ └── version.js │ ├── src │ │ ├── Batcher.coffee │ │ ├── Bottleneck.coffee │ │ ├── BottleneckError.coffee │ │ ├── DLList.coffee │ │ ├── Events.coffee │ │ ├── Group.coffee │ │ ├── IORedisConnection.coffee │ │ ├── Job.coffee │ │ ├── LocalDatastore.coffee │ │ ├── Queues.coffee │ │ ├── RedisConnection.coffee │ │ ├── RedisDatastore.coffee │ │ ├── Scripts.coffee │ │ ├── States.coffee │ │ ├── Sync.coffee │ │ ├── es5.coffee │ │ ├── index.coffee │ │ ├── parser.coffee │ │ └── redis │ │ │ ├── blacklist_client.lua │ │ │ ├── check.lua │ │ │ ├── conditions_check.lua │ │ │ ├── current_reservoir.lua │ │ │ ├── done.lua │ │ │ ├── free.lua │ │ │ ├── get_time.lua │ │ │ ├── group_check.lua │ │ │ ├── heartbeat.lua │ │ │ ├── increment_reservoir.lua │ │ │ ├── init.lua │ │ │ ├── process_tick.lua │ │ │ ├── queued.lua │ │ │ ├── refresh_expiration.lua │ │ │ ├── refs.lua │ │ │ ├── register.lua │ │ │ ├── register_client.lua │ │ │ ├── running.lua │ │ │ ├── submit.lua │ │ │ ├── update_settings.lua │ │ │ ├── validate_client.lua │ │ │ └── validate_keys.lua │ ├── test.ts │ └── test │ │ ├── DLList.js │ │ ├── batcher.js │ │ ├── bottleneck.js │ │ ├── cluster.js │ │ ├── context.js │ │ ├── general.js │ │ ├── group.js │ │ ├── ioredis.js │ │ ├── node_redis.js │ │ ├── priority.js │ │ ├── promises.js │ │ ├── retries.js │ │ ├── spawn │ │ ├── increaseKeepAlive.js │ │ └── refreshKeepAlive.js │ │ ├── states.js │ │ └── stop.js ├── brace-expansion │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── chalk │ ├── index.js │ ├── index.js.flow │ ├── license │ ├── package.json │ ├── readme.md │ ├── templates.js │ └── types │ │ └── index.d.ts ├── color-convert │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── conversions.js │ ├── index.js │ ├── package.json │ └── route.js ├── color-name │ ├── .eslintrc.json │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── test.js ├── commander │ ├── LICENSE │ ├── Readme.md │ ├── esm.mjs │ ├── index.js │ ├── lib │ │ ├── argument.js │ │ ├── command.js │ │ ├── error.js │ │ ├── help.js │ │ ├── option.js │ │ └── suggestSimilar.js │ ├── package-support.json │ ├── package.json │ └── typings │ │ └── index.d.ts ├── concat-map │ ├── .travis.yml │ ├── LICENSE │ ├── README.markdown │ ├── example │ │ └── map.js │ ├── index.js │ ├── package.json │ └── test │ │ └── map.js ├── diff │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── dist │ │ ├── diff.js │ │ └── diff.min.js │ ├── lib │ │ ├── convert │ │ │ ├── dmp.js │ │ │ └── xml.js │ │ ├── diff │ │ │ ├── array.js │ │ │ ├── base.js │ │ │ ├── character.js │ │ │ ├── css.js │ │ │ ├── json.js │ │ │ ├── line.js │ │ │ ├── sentence.js │ │ │ └── word.js │ │ ├── index.es6.js │ │ ├── index.js │ │ ├── patch │ │ │ ├── apply.js │ │ │ ├── create.js │ │ │ ├── merge.js │ │ │ └── parse.js │ │ └── util │ │ │ ├── array.js │ │ │ ├── distance-iterator.js │ │ │ └── params.js │ ├── package.json │ ├── release-notes.md │ └── runtime.js ├── escape-string-regexp │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── fs.realpath │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── old.js │ └── package.json ├── glob │ ├── LICENSE │ ├── README.md │ ├── common.js │ ├── glob.js │ ├── package.json │ └── sync.js ├── has-flag │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── inflight │ ├── LICENSE │ ├── README.md │ ├── inflight.js │ └── package.json ├── inherits │ ├── LICENSE │ ├── README.md │ ├── inherits.js │ ├── inherits_browser.js │ └── package.json ├── minimatch │ ├── LICENSE │ ├── README.md │ ├── minimatch.js │ └── package.json ├── once │ ├── LICENSE │ ├── README.md │ ├── once.js │ └── package.json ├── path-is-absolute │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── supports-color │ ├── browser.js │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── vscode-oniguruma │ ├── LICENSE.txt │ ├── NOTICES.txt │ ├── README.md │ ├── SECURITY.md │ ├── main.d.ts │ ├── package.json │ └── release │ │ ├── main.js │ │ └── onig.wasm ├── vscode-textmate │ ├── .gitattributes │ ├── .github │ │ └── workflows │ │ │ ├── ci.yml │ │ │ └── rich-navigation.yml │ ├── .lsifrc.json │ ├── LICENSE.md │ ├── README.md │ ├── SECURITY.md │ ├── package.json │ └── release │ │ ├── debug.d.ts │ │ ├── encodedTokenAttributes.d.ts │ │ ├── grammar │ │ ├── basicScopesAttributeProvider.d.ts │ │ ├── grammar.d.ts │ │ ├── grammarDependencies.d.ts │ │ ├── index.d.ts │ │ └── tokenizeString.d.ts │ │ ├── json.d.ts │ │ ├── main.d.ts │ │ ├── main.js │ │ ├── main.js.map │ │ ├── matcher.d.ts │ │ ├── onigLib.d.ts │ │ ├── parseRawGrammar.d.ts │ │ ├── plist.d.ts │ │ ├── rawGrammar.d.ts │ │ ├── registry.d.ts │ │ ├── rule.d.ts │ │ ├── tests │ │ ├── all.test.d.ts │ │ ├── grammar.test.d.ts │ │ ├── inspect.d.ts │ │ ├── json.test.d.ts │ │ ├── matcher.test.d.ts │ │ ├── onigLibs.d.ts │ │ ├── resolver.d.ts │ │ ├── themeTest.d.ts │ │ ├── themedTokenizer.d.ts │ │ ├── themes.test.d.ts │ │ └── tokenization.test.d.ts │ │ ├── theme.d.ts │ │ ├── types.d.ts │ │ └── utils.d.ts ├── vscode-tmgrammar-test │ ├── .github │ │ └── workflows │ │ │ └── nodejs.yml │ ├── .prettierrc │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── dist │ │ ├── common │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── model.d.ts │ │ │ ├── model.js │ │ │ └── model.js.map │ │ ├── snapshot.d.ts │ │ ├── snapshot.js │ │ ├── snapshot.js.map │ │ ├── snapshot │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── model.d.ts │ │ │ ├── model.js │ │ │ ├── model.js.map │ │ │ ├── parsing.d.ts │ │ │ ├── parsing.js │ │ │ └── parsing.js.map │ │ ├── unit.d.ts │ │ ├── unit.js │ │ ├── unit.js.map │ │ └── unit │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ ├── model.d.ts │ │ │ ├── model.js │ │ │ ├── model.js.map │ │ │ ├── parsing.d.ts │ │ │ ├── parsing.js │ │ │ ├── parsing.js.map │ │ │ ├── reporter.d.ts │ │ │ ├── reporter.js │ │ │ └── reporter.js.map │ ├── flake.lock │ ├── flake.nix │ └── package.json └── wrappy │ ├── LICENSE │ ├── README.md │ ├── package.json │ └── wrappy.js ├── package-lock.json ├── package.json ├── run_tests.sh ├── snippets └── snippets.json ├── syntaxes ├── tiddlywiki5.json ├── tw5-fields.json ├── tw5-meta-file.json ├── tw5-multids-file.json ├── tw5-test-file.json └── tw5-tid-file.json ├── tests ├── APIBlueprint.tmLanguage ├── Asciidoctor.json ├── C++.plist ├── EEx.tmLanguage ├── Git-config.json ├── MSON.tmLanguage ├── asm.json ├── html.mustache.json ├── jQuery.tmLanguage ├── postscript.json ├── python-console.cson ├── python-console.json ├── samples │ ├── html.basic.tw │ ├── multids.multids │ ├── newsyntax.tw │ ├── simple-markdown.md │ ├── test.html │ ├── test.html.tw │ ├── test.tw │ ├── tid.tid │ ├── tiddlywiki.styleblock.tw │ ├── tiddlywiki5.basic.tw │ ├── tiddlywiki5.heading.tw │ ├── tiddlywiki5.inline.filteredtransclusions.tw │ ├── tiddlywiki5.inline.links.tw │ ├── tiddlywiki5.inline.macros.tw │ ├── tiddlywiki5.inline.styling.tw │ ├── tiddlywiki5.inline.tranclusions.tw │ ├── tiddlywiki5.inline.widgets.tw │ ├── tiddlywiki5.lists.tw │ ├── tiddlywiki5.math.tw │ ├── tiddlywiki5.pragma.tw │ ├── tiddlywiki5.quotes.tw │ ├── tiddlywiki5.simple.tw │ ├── tiddlywiki5.svg.tw │ ├── tiddlywiki5.tw │ └── tiddlywiki5.tw.meta └── tiddlywiki5 │ ├── html.advanced.tw5.test │ ├── html.basic.tw5.test │ ├── html.tiddler.tw5.test │ ├── tiddlywiki5.blockquote.tw5.test │ └── tiddlywiki5.heading.tw5.test └── tw5.png /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "runtimeExecutable": "${execPath}", 13 | "args": [ 14 | "--extensionDevelopmentPath=${workspaceFolder}" 15 | ] 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | -------------------------------------------------------------------------------- /grammars_archive/tw5-dictionary.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TiddlyWiki5 dictionary", 3 | "scopeName": "source.tw5.dictionary", 4 | "patterns": [{ "include": "#dictionary" }], 5 | "repository": { 6 | "dictionary": { 7 | "patterns": [{ "include": "#comment" }, { "include": "#field" }] 8 | }, 9 | "comment": { 10 | "match": "^(#).*$", 11 | "name": "comment.line.number-sign.tw5.dictionary", 12 | "captures": { 13 | "1": { "name": "punctuation.definition.comment.tw5.dictionary" } 14 | } 15 | }, 16 | "field": { 17 | "patterns": [ 18 | { 19 | "match": "^\\s*([^:]*?)\\s*(:)\\s*(.*?)\\s*$", 20 | "name": "meta.value-pair.tiddler-field.tw5.dictionary", 21 | "captures": { 22 | "1": { "name": "entity.other.tiddler-field.tw5.dictionary" }, 23 | "2": { 24 | "name": "punctuation.separator.key-value.tiddler-field.tw5.dictionary" 25 | }, 26 | "3": { "name": "string.other.field.value.tw5.dictionary" } 27 | } 28 | } 29 | ] 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /grammars_archive/tw5-meta-file.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TiddlyWiki5 meta file", 3 | "scopeName": "source.tw5.meta-file", 4 | "fileTypes": ["meta"], 5 | "patterns": [ 6 | { 7 | "begin": "^", 8 | "end": "(?=1)0", 9 | "contentName": "meta.dictionary.tiddler-fields.tw5.meta-file", 10 | "patterns": [{ "include": "source.tw5.dictionary" }] 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /grammars_archive/tw5-multids-file.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TiddlyWiki5 multids file", 3 | "scopeName": "source.tw5.multids-file", 4 | "fileTypes": ["multids"], 5 | "patterns": [ 6 | { 7 | "comment": "Tokenize tiddler title and text pairs.", 8 | "begin": "(?<=^$)", 9 | "end": "(?=1)0", 10 | "contentName": "meta.dictionary.tiddler-fields.title-text-pairs.tw5.multids-file", 11 | "patterns": [ 12 | { "include": "#comment" }, 13 | { "include": "#titleAndTextPair" } 14 | ] 15 | }, 16 | { 17 | "comment": "Tokenize common tiddler metadata.", 18 | "begin": "^", 19 | "end": "^$", 20 | "name": "meta.dictionary.tiddler-fields.tw5.multids-file", 21 | "patterns": [{ "include": "source.tw5.dictionary" }] 22 | } 23 | ], 24 | "repository": { 25 | "comment": { 26 | "match": "^(#).*$", 27 | "name": "comment.line.number-sign.tw5.multids-file", 28 | "captures": { 29 | "1": { "name": "punctuation.definition.comment.tw5.multids-file" } 30 | } 31 | }, 32 | "titleAndTextPair": { 33 | "match": "^(.*?)(: )(.*)", 34 | "name": "meta.value-pair.title-text.tw5.multids-file", 35 | "captures": { 36 | "1": { "name": "string.other.field.title.value.tw5.multids-file" }, 37 | "2": { 38 | "name": "punctuation.separator.key-value.title-text.tw5.multids-file" 39 | }, 40 | "3": { 41 | "patterns": [ 42 | { 43 | "begin": "^", 44 | "end": "$", 45 | "name": "meta.tiddler-field.text.tw5.multids-file", 46 | "contentName": "text.html.tw5.multids-file", 47 | "patterns": [{ "include": "text.html.tw5" }] 48 | } 49 | ] 50 | } 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /grammars_archive/tw5-tid-file.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TiddlyWiki5 tid file", 3 | "scopeName": "source.tw5.tid-file", 4 | "fileTypes": ["tid"], 5 | "patterns": [ 6 | { 7 | "comment": "Tokenize tiddler text field.", 8 | "begin": "(?<=^$)", 9 | "end": "(?=1)0", 10 | "name": "meta.tiddler-field.text.tw5.tid-file", 11 | "contentName": "text.html.tw5.tid-file", 12 | "patterns": [{ "include": "text.html.tw5" }] 13 | }, 14 | { 15 | "comment": "Tokenize mandatory tiddler metadata.", 16 | "begin": "^", 17 | "end": "^$", 18 | "name": "meta.dictionary.tiddler-fields.tw5.tid-file", 19 | "patterns": [{ "include": "source.tw5.dictionary" }] 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | "blockComment": [ "" ] 4 | }, 5 | // symbols used as brackets 6 | "brackets": [ 7 | [""], 8 | ["{", "}"], 9 | ["[", "]"], 10 | ["(", ")"], 11 | ["<", ">"], 12 | ], 13 | // symbols that are auto closed when typing 14 | "autoClosingPairs": [ 15 | { "open": "{", "close": "}"}, 16 | { "open": "[", "close": "]"}, 17 | { "open": "(", "close": ")" }, 18 | { "open": "\"", "close": "\"" }, 19 | { "open": "", "notIn": ["comment", "string"] } 20 | ], 21 | "autoCloseBefore": ";:.,=}])>` \n\t", 22 | // symbols that can be used to surround a selection 23 | "surroundingPairs": [ 24 | ["{", "}"], 25 | ["[", "]"], 26 | ["<", ">"], 27 | ["(", ")"], 28 | ["<%", "%>"], 29 | ["\"", "\""], 30 | ["'", "'"], 31 | ["`", "`"] 32 | ], 33 | "folding": { 34 | "offSide": true, 35 | "markers": { 36 | "start": "^\\s*", 37 | "end": "^\\s*" 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /node_modules/.bin/vscode-tmgrammar-snap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*|*MINGW*|*MSYS*) 6 | if command -v cygpath > /dev/null 2>&1; then 7 | basedir=`cygpath -w "$basedir"` 8 | fi 9 | ;; 10 | esac 11 | 12 | if [ -x "$basedir/node" ]; then 13 | exec "$basedir/node" "$basedir/../vscode-tmgrammar-test/dist/snapshot.js" "$@" 14 | else 15 | exec node "$basedir/../vscode-tmgrammar-test/dist/snapshot.js" "$@" 16 | fi 17 | -------------------------------------------------------------------------------- /node_modules/.bin/vscode-tmgrammar-snap.cmd: -------------------------------------------------------------------------------- 1 | @ECHO off 2 | GOTO start 3 | :find_dp0 4 | SET dp0=%~dp0 5 | EXIT /b 6 | :start 7 | SETLOCAL 8 | CALL :find_dp0 9 | 10 | IF EXIST "%dp0%\node.exe" ( 11 | SET "_prog=%dp0%\node.exe" 12 | ) ELSE ( 13 | SET "_prog=node" 14 | SET PATHEXT=%PATHEXT:;.JS;=;% 15 | ) 16 | 17 | endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\vscode-tmgrammar-test\dist\snapshot.js" %* 18 | -------------------------------------------------------------------------------- /node_modules/.bin/vscode-tmgrammar-snap.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent 3 | 4 | $exe="" 5 | if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { 6 | # Fix case when both the Windows and Linux builds of Node 7 | # are installed in the same directory 8 | $exe=".exe" 9 | } 10 | $ret=0 11 | if (Test-Path "$basedir/node$exe") { 12 | # Support pipeline input 13 | if ($MyInvocation.ExpectingInput) { 14 | $input | & "$basedir/node$exe" "$basedir/../vscode-tmgrammar-test/dist/snapshot.js" $args 15 | } else { 16 | & "$basedir/node$exe" "$basedir/../vscode-tmgrammar-test/dist/snapshot.js" $args 17 | } 18 | $ret=$LASTEXITCODE 19 | } else { 20 | # Support pipeline input 21 | if ($MyInvocation.ExpectingInput) { 22 | $input | & "node$exe" "$basedir/../vscode-tmgrammar-test/dist/snapshot.js" $args 23 | } else { 24 | & "node$exe" "$basedir/../vscode-tmgrammar-test/dist/snapshot.js" $args 25 | } 26 | $ret=$LASTEXITCODE 27 | } 28 | exit $ret 29 | -------------------------------------------------------------------------------- /node_modules/.bin/vscode-tmgrammar-test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*|*MINGW*|*MSYS*) 6 | if command -v cygpath > /dev/null 2>&1; then 7 | basedir=`cygpath -w "$basedir"` 8 | fi 9 | ;; 10 | esac 11 | 12 | if [ -x "$basedir/node" ]; then 13 | exec "$basedir/node" "$basedir/../vscode-tmgrammar-test/dist/unit.js" "$@" 14 | else 15 | exec node "$basedir/../vscode-tmgrammar-test/dist/unit.js" "$@" 16 | fi 17 | -------------------------------------------------------------------------------- /node_modules/.bin/vscode-tmgrammar-test.cmd: -------------------------------------------------------------------------------- 1 | @ECHO off 2 | GOTO start 3 | :find_dp0 4 | SET dp0=%~dp0 5 | EXIT /b 6 | :start 7 | SETLOCAL 8 | CALL :find_dp0 9 | 10 | IF EXIST "%dp0%\node.exe" ( 11 | SET "_prog=%dp0%\node.exe" 12 | ) ELSE ( 13 | SET "_prog=node" 14 | SET PATHEXT=%PATHEXT:;.JS;=;% 15 | ) 16 | 17 | endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\vscode-tmgrammar-test\dist\unit.js" %* 18 | -------------------------------------------------------------------------------- /node_modules/.bin/vscode-tmgrammar-test.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent 3 | 4 | $exe="" 5 | if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { 6 | # Fix case when both the Windows and Linux builds of Node 7 | # are installed in the same directory 8 | $exe=".exe" 9 | } 10 | $ret=0 11 | if (Test-Path "$basedir/node$exe") { 12 | # Support pipeline input 13 | if ($MyInvocation.ExpectingInput) { 14 | $input | & "$basedir/node$exe" "$basedir/../vscode-tmgrammar-test/dist/unit.js" $args 15 | } else { 16 | & "$basedir/node$exe" "$basedir/../vscode-tmgrammar-test/dist/unit.js" $args 17 | } 18 | $ret=$LASTEXITCODE 19 | } else { 20 | # Support pipeline input 21 | if ($MyInvocation.ExpectingInput) { 22 | $input | & "node$exe" "$basedir/../vscode-tmgrammar-test/dist/unit.js" $args 23 | } else { 24 | & "node$exe" "$basedir/../vscode-tmgrammar-test/dist/unit.js" $args 25 | } 26 | $ret=$LASTEXITCODE 27 | } 28 | exit $ret 29 | -------------------------------------------------------------------------------- /node_modules/ansi-styles/license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /node_modules/ansi-styles/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ansi-styles", 3 | "version": "3.2.1", 4 | "description": "ANSI escape codes for styling strings in the terminal", 5 | "license": "MIT", 6 | "repository": "chalk/ansi-styles", 7 | "author": { 8 | "name": "Sindre Sorhus", 9 | "email": "sindresorhus@gmail.com", 10 | "url": "sindresorhus.com" 11 | }, 12 | "engines": { 13 | "node": ">=4" 14 | }, 15 | "scripts": { 16 | "test": "xo && ava", 17 | "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" 18 | }, 19 | "files": [ 20 | "index.js" 21 | ], 22 | "keywords": [ 23 | "ansi", 24 | "styles", 25 | "color", 26 | "colour", 27 | "colors", 28 | "terminal", 29 | "console", 30 | "cli", 31 | "string", 32 | "tty", 33 | "escape", 34 | "formatting", 35 | "rgb", 36 | "256", 37 | "shell", 38 | "xterm", 39 | "log", 40 | "logging", 41 | "command-line", 42 | "text" 43 | ], 44 | "dependencies": { 45 | "color-convert": "^1.9.0" 46 | }, 47 | "devDependencies": { 48 | "ava": "*", 49 | "babel-polyfill": "^6.23.0", 50 | "svg-term-cli": "^2.1.1", 51 | "xo": "*" 52 | }, 53 | "ava": { 54 | "require": "babel-polyfill" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /node_modules/balanced-match/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | tidelift: "npm/balanced-match" 2 | patreon: juliangruber 3 | -------------------------------------------------------------------------------- /node_modules/balanced-match/LICENSE.md: -------------------------------------------------------------------------------- 1 | (MIT) 2 | 3 | Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | of the Software, and to permit persons to whom the Software is furnished to do 10 | so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/balanced-match/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = balanced; 3 | function balanced(a, b, str) { 4 | if (a instanceof RegExp) a = maybeMatch(a, str); 5 | if (b instanceof RegExp) b = maybeMatch(b, str); 6 | 7 | var r = range(a, b, str); 8 | 9 | return r && { 10 | start: r[0], 11 | end: r[1], 12 | pre: str.slice(0, r[0]), 13 | body: str.slice(r[0] + a.length, r[1]), 14 | post: str.slice(r[1] + b.length) 15 | }; 16 | } 17 | 18 | function maybeMatch(reg, str) { 19 | var m = str.match(reg); 20 | return m ? m[0] : null; 21 | } 22 | 23 | balanced.range = range; 24 | function range(a, b, str) { 25 | var begs, beg, left, right, result; 26 | var ai = str.indexOf(a); 27 | var bi = str.indexOf(b, ai + 1); 28 | var i = ai; 29 | 30 | if (ai >= 0 && bi > 0) { 31 | if(a===b) { 32 | return [ai, bi]; 33 | } 34 | begs = []; 35 | left = str.length; 36 | 37 | while (i >= 0 && !result) { 38 | if (i == ai) { 39 | begs.push(i); 40 | ai = str.indexOf(a, i + 1); 41 | } else if (begs.length == 1) { 42 | result = [ begs.pop(), bi ]; 43 | } else { 44 | beg = begs.pop(); 45 | if (beg < left) { 46 | left = beg; 47 | right = bi; 48 | } 49 | 50 | bi = str.indexOf(b, i + 1); 51 | } 52 | 53 | i = ai < bi && ai >= 0 ? ai : bi; 54 | } 55 | 56 | if (begs.length) { 57 | result = [ left, right ]; 58 | } 59 | } 60 | 61 | return result; 62 | } 63 | -------------------------------------------------------------------------------- /node_modules/balanced-match/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "balanced-match", 3 | "description": "Match balanced character pairs, like \"{\" and \"}\"", 4 | "version": "1.0.2", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/juliangruber/balanced-match.git" 8 | }, 9 | "homepage": "https://github.com/juliangruber/balanced-match", 10 | "main": "index.js", 11 | "scripts": { 12 | "test": "tape test/test.js", 13 | "bench": "matcha test/bench.js" 14 | }, 15 | "devDependencies": { 16 | "matcha": "^0.7.0", 17 | "tape": "^4.6.0" 18 | }, 19 | "keywords": [ 20 | "match", 21 | "regexp", 22 | "test", 23 | "balanced", 24 | "parse" 25 | ], 26 | "author": { 27 | "name": "Julian Gruber", 28 | "email": "mail@juliangruber.com", 29 | "url": "http://juliangruber.com" 30 | }, 31 | "license": "MIT", 32 | "testling": { 33 | "files": "test/*.js", 34 | "browsers": [ 35 | "ie/8..latest", 36 | "firefox/20..latest", 37 | "firefox/nightly", 38 | "chrome/25..latest", 39 | "chrome/canary", 40 | "opera/12..latest", 41 | "opera/next", 42 | "safari/5.1..latest", 43 | "ipad/6.0..latest", 44 | "iphone/6.0..latest", 45 | "android-browser/4.2..latest" 46 | ] 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /node_modules/bottleneck/.babelrc.es5: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["@babel/preset-env", {}] 4 | ] 5 | } -------------------------------------------------------------------------------- /node_modules/bottleneck/.babelrc.lib: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["@babel/preset-env", { 4 | "targets": { 5 | "node": "6.0" 6 | } 7 | }] 8 | ] 9 | } -------------------------------------------------------------------------------- /node_modules/bottleneck/.env: -------------------------------------------------------------------------------- 1 | REDIS_HOST=127.0.0.1 2 | REDIS_PORT=6379 3 | -------------------------------------------------------------------------------- /node_modules/bottleneck/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 8 4 | branches: 5 | only: 6 | - master 7 | - next 8 | services: 9 | - redis-server 10 | env: 11 | global: 12 | - "REDIS_HOST=127.0.0.1" 13 | - "REDIS_PORT=6379" 14 | cache: 15 | directories: 16 | - $HOME/.npm 17 | install: 18 | - npm i 19 | sudo: required 20 | after_success: npx codecov --file=./coverage/lcov.info 21 | script: npm run test-all 22 | 23 | before_install: 24 | - npm i -g npm@5.10 25 | - npm --version -------------------------------------------------------------------------------- /node_modules/bottleneck/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Simon Grondin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /node_modules/bottleneck/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bottleneck", 3 | "main": "bottleneck.js", 4 | "version": "2.19.5", 5 | "homepage": "https://github.com/SGrondin/bottleneck", 6 | "authors": [ 7 | "SGrondin " 8 | ], 9 | "description": "Distributed task scheduler and rate limiter", 10 | "moduleType": [ 11 | "globals", 12 | "node" 13 | ], 14 | "keywords": [ 15 | "async", 16 | "rate", 17 | "limiter", 18 | "limiting", 19 | "throttle", 20 | "throttling", 21 | "load", 22 | "ddos" 23 | ], 24 | "license": "MIT", 25 | "ignore": [ 26 | "**/.*", 27 | "node_modules", 28 | "bower_components" 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /node_modules/bottleneck/lib/Batcher.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var Batcher, Events, parser; 4 | parser = require("./parser"); 5 | Events = require("./Events"); 6 | 7 | Batcher = function () { 8 | class Batcher { 9 | constructor(options = {}) { 10 | this.options = options; 11 | parser.load(this.options, this.defaults, this); 12 | this.Events = new Events(this); 13 | this._arr = []; 14 | 15 | this._resetPromise(); 16 | 17 | this._lastFlush = Date.now(); 18 | } 19 | 20 | _resetPromise() { 21 | return this._promise = new this.Promise((res, rej) => { 22 | return this._resolve = res; 23 | }); 24 | } 25 | 26 | _flush() { 27 | clearTimeout(this._timeout); 28 | this._lastFlush = Date.now(); 29 | 30 | this._resolve(); 31 | 32 | this.Events.trigger("batch", this._arr); 33 | this._arr = []; 34 | return this._resetPromise(); 35 | } 36 | 37 | add(data) { 38 | var ret; 39 | 40 | this._arr.push(data); 41 | 42 | ret = this._promise; 43 | 44 | if (this._arr.length === this.maxSize) { 45 | this._flush(); 46 | } else if (this.maxTime != null && this._arr.length === 1) { 47 | this._timeout = setTimeout(() => { 48 | return this._flush(); 49 | }, this.maxTime); 50 | } 51 | 52 | return ret; 53 | } 54 | 55 | } 56 | 57 | ; 58 | Batcher.prototype.defaults = { 59 | maxTime: null, 60 | maxSize: null, 61 | Promise: Promise 62 | }; 63 | return Batcher; 64 | }.call(void 0); 65 | 66 | module.exports = Batcher; -------------------------------------------------------------------------------- /node_modules/bottleneck/lib/BottleneckError.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var BottleneckError; 4 | BottleneckError = class BottleneckError extends Error {}; 5 | module.exports = BottleneckError; -------------------------------------------------------------------------------- /node_modules/bottleneck/lib/Queues.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var DLList, Events, Queues; 4 | DLList = require("./DLList"); 5 | Events = require("./Events"); 6 | Queues = class Queues { 7 | constructor(num_priorities) { 8 | var i; 9 | this.Events = new Events(this); 10 | this._length = 0; 11 | 12 | this._lists = function () { 13 | var j, ref, results; 14 | results = []; 15 | 16 | for (i = j = 1, ref = num_priorities; 1 <= ref ? j <= ref : j >= ref; i = 1 <= ref ? ++j : --j) { 17 | results.push(new DLList(() => { 18 | return this.incr(); 19 | }, () => { 20 | return this.decr(); 21 | })); 22 | } 23 | 24 | return results; 25 | }.call(this); 26 | } 27 | 28 | incr() { 29 | if (this._length++ === 0) { 30 | return this.Events.trigger("leftzero"); 31 | } 32 | } 33 | 34 | decr() { 35 | if (--this._length === 0) { 36 | return this.Events.trigger("zero"); 37 | } 38 | } 39 | 40 | push(job) { 41 | return this._lists[job.options.priority].push(job); 42 | } 43 | 44 | queued(priority) { 45 | if (priority != null) { 46 | return this._lists[priority].length; 47 | } else { 48 | return this._length; 49 | } 50 | } 51 | 52 | shiftAll(fn) { 53 | return this._lists.forEach(function (list) { 54 | return list.forEachShift(fn); 55 | }); 56 | } 57 | 58 | getFirst(arr = this._lists) { 59 | var j, len, list; 60 | 61 | for (j = 0, len = arr.length; j < len; j++) { 62 | list = arr[j]; 63 | 64 | if (list.length > 0) { 65 | return list; 66 | } 67 | } 68 | 69 | return []; 70 | } 71 | 72 | shiftLastFrom(priority) { 73 | return this.getFirst(this._lists.slice(priority).reverse()).shift(); 74 | } 75 | 76 | }; 77 | module.exports = Queues; -------------------------------------------------------------------------------- /node_modules/bottleneck/lib/States.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var BottleneckError, States; 4 | BottleneckError = require("./BottleneckError"); 5 | States = class States { 6 | constructor(status1) { 7 | this.status = status1; 8 | this._jobs = {}; 9 | this.counts = this.status.map(function () { 10 | return 0; 11 | }); 12 | } 13 | 14 | next(id) { 15 | var current, next; 16 | current = this._jobs[id]; 17 | next = current + 1; 18 | 19 | if (current != null && next < this.status.length) { 20 | this.counts[current]--; 21 | this.counts[next]++; 22 | return this._jobs[id]++; 23 | } else if (current != null) { 24 | this.counts[current]--; 25 | return delete this._jobs[id]; 26 | } 27 | } 28 | 29 | start(id) { 30 | var initial; 31 | initial = 0; 32 | this._jobs[id] = initial; 33 | return this.counts[initial]++; 34 | } 35 | 36 | remove(id) { 37 | var current; 38 | current = this._jobs[id]; 39 | 40 | if (current != null) { 41 | this.counts[current]--; 42 | delete this._jobs[id]; 43 | } 44 | 45 | return current != null; 46 | } 47 | 48 | jobStatus(id) { 49 | var ref; 50 | return (ref = this.status[this._jobs[id]]) != null ? ref : null; 51 | } 52 | 53 | statusJobs(status) { 54 | var k, pos, ref, results, v; 55 | 56 | if (status != null) { 57 | pos = this.status.indexOf(status); 58 | 59 | if (pos < 0) { 60 | throw new BottleneckError(`status must be one of ${this.status.join(', ')}`); 61 | } 62 | 63 | ref = this._jobs; 64 | results = []; 65 | 66 | for (k in ref) { 67 | v = ref[k]; 68 | 69 | if (v === pos) { 70 | results.push(k); 71 | } 72 | } 73 | 74 | return results; 75 | } else { 76 | return Object.keys(this._jobs); 77 | } 78 | } 79 | 80 | statusCounts() { 81 | return this.counts.reduce((acc, v, i) => { 82 | acc[this.status[i]] = v; 83 | return acc; 84 | }, {}); 85 | } 86 | 87 | }; 88 | module.exports = States; -------------------------------------------------------------------------------- /node_modules/bottleneck/lib/es5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | require("regenerator-runtime/runtime"); 4 | 5 | module.exports = require("./Bottleneck"); -------------------------------------------------------------------------------- /node_modules/bottleneck/lib/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = require("./Bottleneck"); -------------------------------------------------------------------------------- /node_modules/bottleneck/lib/parser.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | exports.load = function (received, defaults, onto = {}) { 4 | var k, ref, v; 5 | 6 | for (k in defaults) { 7 | v = defaults[k]; 8 | onto[k] = (ref = received[k]) != null ? ref : v; 9 | } 10 | 11 | return onto; 12 | }; 13 | 14 | exports.overwrite = function (received, defaults, onto = {}) { 15 | var k, v; 16 | 17 | for (k in received) { 18 | v = received[k]; 19 | 20 | if (defaults[k] !== void 0) { 21 | onto[k] = v; 22 | } 23 | } 24 | 25 | return onto; 26 | }; -------------------------------------------------------------------------------- /node_modules/bottleneck/lib/version.json: -------------------------------------------------------------------------------- 1 | {"version":"2.19.5"} 2 | -------------------------------------------------------------------------------- /node_modules/bottleneck/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bottleneck", 3 | "version": "2.19.5", 4 | "description": "Distributed task scheduler and rate limiter", 5 | "main": "lib/index.js", 6 | "typings": "bottleneck.d.ts", 7 | "scripts": { 8 | "test": "mocha test", 9 | "test-all": "./scripts/test_all.sh" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/SGrondin/bottleneck" 14 | }, 15 | "keywords": [ 16 | "async rate limiter", 17 | "rate limiter", 18 | "rate limiting", 19 | "async", 20 | "rate", 21 | "limiting", 22 | "limiter", 23 | "throttle", 24 | "throttling", 25 | "throttler", 26 | "load", 27 | "clustering" 28 | ], 29 | "author": { 30 | "name": "Simon Grondin" 31 | }, 32 | "license": "MIT", 33 | "bugs": { 34 | "url": "https://github.com/SGrondin/bottleneck/issues" 35 | }, 36 | "devDependencies": { 37 | "@babel/core": "^7.5.0", 38 | "@babel/preset-env": "^7.5.0", 39 | "@types/es6-promise": "0.0.33", 40 | "assert": "^1.5.0", 41 | "coffeescript": "2.4.x", 42 | "ejs-cli": "github:SGrondin/ejs-cli#master", 43 | "ioredis": "^4.11.1", 44 | "leakage": "^0.4.0", 45 | "mocha": "^6.1.4", 46 | "redis": "^2.8.0", 47 | "regenerator-runtime": "^0.12.1", 48 | "rollup": "^0.66.6", 49 | "rollup-plugin-babel": "^4.3.3", 50 | "rollup-plugin-commonjs": "^9.3.4", 51 | "rollup-plugin-json": "^3.1.0", 52 | "rollup-plugin-node-resolve": "^3.4.0", 53 | "typescript": "^2.6.2" 54 | }, 55 | "dependencies": {} 56 | } 57 | -------------------------------------------------------------------------------- /node_modules/bottleneck/rollup.config.es5.js: -------------------------------------------------------------------------------- 1 | import json from 'rollup-plugin-json'; 2 | import resolve from 'rollup-plugin-node-resolve'; 3 | import commonjs from 'rollup-plugin-commonjs'; 4 | import babel from 'rollup-plugin-babel'; 5 | 6 | const bannerLines = [ 7 | 'This file contains the full Bottleneck library (MIT) compiled to ES5.', 8 | 'https://github.com/SGrondin/bottleneck', 9 | 'It also contains the regenerator-runtime (MIT), necessary for Babel-generated ES5 code to execute promise and async/await code.', 10 | 'See the following link for Copyright and License information:', 11 | 'https://github.com/facebook/regenerator/blob/master/packages/regenerator-runtime/runtime.js', 12 | ].map(x => ` * ${x}`).join('\n'); 13 | const banner = `/**\n${bannerLines}\n */`; 14 | 15 | export default { 16 | input: 'lib/es5.js', 17 | output: { 18 | name: 'Bottleneck', 19 | file: 'es5.js', 20 | sourcemap: false, 21 | globals: {}, 22 | format: 'umd', 23 | banner 24 | }, 25 | external: [], 26 | plugins: [ 27 | json(), 28 | resolve(), 29 | commonjs(), 30 | babel({ 31 | exclude: 'node_modules/**' 32 | }) 33 | ] 34 | }; 35 | -------------------------------------------------------------------------------- /node_modules/bottleneck/rollup.config.light.js: -------------------------------------------------------------------------------- 1 | import commonjs from 'rollup-plugin-commonjs'; 2 | import json from 'rollup-plugin-json'; 3 | import resolve from 'rollup-plugin-node-resolve'; 4 | 5 | const bannerLines = [ 6 | 'This file contains the Bottleneck library (MIT), compiled to ES2017, and without Clustering support.', 7 | 'https://github.com/SGrondin/bottleneck', 8 | ].map(x => ` * ${x}`).join('\n'); 9 | const banner = `/**\n${bannerLines}\n */`; 10 | 11 | const missing = `export default () => console.log('You must import the full version of Bottleneck in order to use this feature.');`; 12 | const exclude = [ 13 | 'RedisDatastore.js', 14 | 'RedisConnection.js', 15 | 'IORedisConnection.js', 16 | 'Scripts.js' 17 | ]; 18 | 19 | export default { 20 | input: 'lib/index.js', 21 | output: { 22 | name: 'Bottleneck', 23 | file: 'light.js', 24 | sourcemap: false, 25 | globals: {}, 26 | format: 'umd', 27 | banner 28 | }, 29 | external: [], 30 | plugins: [ 31 | json(), 32 | { 33 | load: id => { 34 | const chunks = id.split('/'); 35 | const file = chunks[chunks.length - 1]; 36 | if (exclude.indexOf(file) >= 0) { 37 | return missing 38 | } 39 | } 40 | }, 41 | resolve(), 42 | commonjs() 43 | ] 44 | }; 45 | -------------------------------------------------------------------------------- /node_modules/bottleneck/scripts/assemble_lua.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | 3 | var input = __dirname + '/../src/redis' 4 | var loaded = {} 5 | 6 | var promises = fs.readdirSync(input).map(function (file) { 7 | return new Promise(function (resolve, reject) { 8 | fs.readFile(input + '/' + file, function (err, data) { 9 | if (err != null) { 10 | return reject(err) 11 | } 12 | loaded[file] = data.toString('utf8') 13 | return resolve() 14 | }) 15 | }) 16 | }) 17 | 18 | Promise.all(promises) 19 | .then(function () { 20 | console.log(JSON.stringify(loaded, Object.keys(loaded).sort(), 2)) 21 | }) 22 | .catch(function (err) { 23 | console.error(err) 24 | process.exit(1) 25 | }) 26 | -------------------------------------------------------------------------------- /node_modules/bottleneck/scripts/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | if [ ! -d node_modules ]; then 6 | echo "[B] Run 'npm install' first" 7 | exit 1 8 | fi 9 | 10 | 11 | clean() { 12 | rm -f .babelrc 13 | rm -rf lib/* 14 | node scripts/version.js > lib/version.json 15 | node scripts/assemble_lua.js > lib/lua.json 16 | } 17 | 18 | makeLib10() { 19 | echo '[B] Compiling Bottleneck to Node 10+...' 20 | npx coffee --compile --bare --no-header src/*.coffee 21 | mv src/*.js lib/ 22 | } 23 | 24 | makeLib6() { 25 | echo '[B] Compiling Bottleneck to Node 6+...' 26 | ln -s .babelrc.lib .babelrc 27 | npx coffee --compile --bare --no-header --transpile src/*.coffee 28 | mv src/*.js lib/ 29 | } 30 | 31 | makeES5() { 32 | echo '[B] Compiling Bottleneck to ES5...' 33 | ln -s .babelrc.es5 .babelrc 34 | npx coffee --compile --bare --no-header src/*.coffee 35 | mv src/*.js lib/ 36 | 37 | echo '[B] Assembling ES5 bundle...' 38 | npx rollup -c rollup.config.es5.js 39 | } 40 | 41 | makeLight() { 42 | makeLib10 43 | 44 | echo '[B] Assembling light bundle...' 45 | npx rollup -c rollup.config.light.js 46 | } 47 | 48 | makeTypings() { 49 | echo '[B] Compiling and testing TS typings...' 50 | npx ejs-cli bottleneck.d.ts.ejs > bottleneck.d.ts 51 | npx tsc --noEmit --strict test.ts 52 | } 53 | 54 | if [ "$1" = 'dev' ]; then 55 | clean 56 | makeLib10 57 | elif [ "$1" = 'bench' ]; then 58 | clean 59 | makeLib6 60 | elif [ "$1" = 'es5' ]; then 61 | clean 62 | makeES5 63 | elif [ "$1" = 'light' ]; then 64 | clean 65 | makeLight 66 | elif [ "$1" = 'typings' ]; then 67 | makeTypings 68 | else 69 | clean 70 | makeES5 71 | 72 | clean 73 | makeLight 74 | 75 | clean 76 | makeLib6 77 | makeTypings 78 | fi 79 | 80 | rm -f .babelrc 81 | 82 | echo '[B] Done!' 83 | -------------------------------------------------------------------------------- /node_modules/bottleneck/scripts/test_all.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | source .env 6 | 7 | echo 'ioredis tests' 8 | DATASTORE=ioredis npm test 9 | 10 | echo 'NodeRedis tests' 11 | DATASTORE=redis npm test 12 | 13 | echo 'ES5 bundle tests' 14 | BUILD=es5 npm test 15 | 16 | echo 'Light bundle tests' 17 | BUILD=light npm test 18 | 19 | echo 'Local tests' 20 | npm test 21 | -------------------------------------------------------------------------------- /node_modules/bottleneck/scripts/version.js: -------------------------------------------------------------------------------- 1 | const packagejson = require('../package.json') 2 | 3 | console.log(JSON.stringify({version: packagejson.version})) 4 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/Batcher.coffee: -------------------------------------------------------------------------------- 1 | parser = require "./parser" 2 | Events = require "./Events" 3 | 4 | class Batcher 5 | defaults: 6 | maxTime: null 7 | maxSize: null 8 | Promise: Promise 9 | 10 | constructor: (@options={}) -> 11 | parser.load @options, @defaults, @ 12 | @Events = new Events @ 13 | @_arr = [] 14 | @_resetPromise() 15 | @_lastFlush = Date.now() 16 | 17 | _resetPromise: -> 18 | @_promise = new @Promise (res, rej) => @_resolve = res 19 | 20 | _flush: -> 21 | clearTimeout @_timeout 22 | @_lastFlush = Date.now() 23 | @_resolve() 24 | @Events.trigger "batch", @_arr 25 | @_arr = [] 26 | @_resetPromise() 27 | 28 | add: (data) -> 29 | @_arr.push data 30 | ret = @_promise 31 | if @_arr.length == @maxSize 32 | @_flush() 33 | else if @maxTime? and @_arr.length == 1 34 | @_timeout = setTimeout => 35 | @_flush() 36 | , @maxTime 37 | ret 38 | 39 | module.exports = Batcher 40 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/BottleneckError.coffee: -------------------------------------------------------------------------------- 1 | class BottleneckError extends Error 2 | 3 | module.exports = BottleneckError 4 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/DLList.coffee: -------------------------------------------------------------------------------- 1 | class DLList 2 | constructor: (@incr, @decr) -> 3 | @_first = null 4 | @_last = null 5 | @length = 0 6 | push: (value) -> 7 | @length++ 8 | @incr?() 9 | node = { value, prev: @_last, next: null } 10 | if @_last? 11 | @_last.next = node 12 | @_last = node 13 | else @_first = @_last = node 14 | undefined 15 | shift: () -> 16 | if not @_first? then return 17 | else 18 | @length-- 19 | @decr?() 20 | value = @_first.value 21 | if (@_first = @_first.next)? 22 | @_first.prev = null 23 | else 24 | @_last = null 25 | value 26 | first: () -> if @_first? then @_first.value 27 | getArray: () -> 28 | node = @_first 29 | while node? then (ref = node; node = node.next; ref.value) 30 | forEachShift: (cb) -> 31 | node = @shift() 32 | while node? then (cb node; node = @shift()) 33 | undefined 34 | debug: () -> 35 | node = @_first 36 | while node? then (ref = node; node = node.next; { value: ref.value, prev: ref.prev?.value, next: ref.next?.value }) 37 | 38 | module.exports = DLList 39 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/Events.coffee: -------------------------------------------------------------------------------- 1 | class Events 2 | constructor: (@instance) -> 3 | @_events = {} 4 | if @instance.on? or @instance.once? or @instance.removeAllListeners? 5 | throw new Error "An Emitter already exists for this object" 6 | @instance.on = (name, cb) => @_addListener name, "many", cb 7 | @instance.once = (name, cb) => @_addListener name, "once", cb 8 | @instance.removeAllListeners = (name=null) => 9 | if name? then delete @_events[name] else @_events = {} 10 | _addListener: (name, status, cb) -> 11 | @_events[name] ?= [] 12 | @_events[name].push {cb, status} 13 | @instance 14 | listenerCount: (name) -> 15 | if @_events[name]? then @_events[name].length else 0 16 | trigger: (name, args...) -> 17 | try 18 | if name != "debug" then @trigger "debug", "Event triggered: #{name}", args 19 | return unless @_events[name]? 20 | @_events[name] = @_events[name].filter (listener) -> listener.status != "none" 21 | promises = @_events[name].map (listener) => 22 | return if listener.status == "none" 23 | if listener.status == "once" then listener.status = "none" 24 | try 25 | returned = listener.cb?(args...) 26 | if typeof returned?.then == "function" 27 | await returned 28 | else 29 | returned 30 | catch e 31 | if "name" != "error" then @trigger "error", e 32 | null 33 | (await Promise.all promises).find (x) -> x? 34 | catch e 35 | if "name" != "error" then @trigger "error", e 36 | null 37 | 38 | module.exports = Events 39 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/Queues.coffee: -------------------------------------------------------------------------------- 1 | DLList = require "./DLList" 2 | Events = require "./Events" 3 | 4 | class Queues 5 | 6 | constructor: (num_priorities) -> 7 | @Events = new Events @ 8 | @_length = 0 9 | @_lists = for i in [1..num_priorities] then new DLList (=> @incr()), (=> @decr()) 10 | 11 | incr: -> if @_length++ == 0 then @Events.trigger "leftzero" 12 | 13 | decr: -> if --@_length == 0 then @Events.trigger "zero" 14 | 15 | push: (job) -> @_lists[job.options.priority].push job 16 | 17 | queued: (priority) -> if priority? then @_lists[priority].length else @_length 18 | 19 | shiftAll: (fn) -> @_lists.forEach (list) -> list.forEachShift fn 20 | 21 | getFirst: (arr=@_lists) -> 22 | for list in arr 23 | return list if list.length > 0 24 | [] 25 | 26 | shiftLastFrom: (priority) -> @getFirst(@_lists[priority..].reverse()).shift() 27 | 28 | module.exports = Queues 29 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/States.coffee: -------------------------------------------------------------------------------- 1 | BottleneckError = require "./BottleneckError" 2 | class States 3 | constructor: (@status) -> 4 | @_jobs = {} 5 | @counts = @status.map(-> 0) 6 | 7 | next: (id) -> 8 | current = @_jobs[id] 9 | next = current + 1 10 | if current? and next < @status.length 11 | @counts[current]-- 12 | @counts[next]++ 13 | @_jobs[id]++ 14 | else if current? 15 | @counts[current]-- 16 | delete @_jobs[id] 17 | 18 | start: (id) -> 19 | initial = 0 20 | @_jobs[id] = initial 21 | @counts[initial]++ 22 | 23 | remove: (id) -> 24 | current = @_jobs[id] 25 | if current? 26 | @counts[current]-- 27 | delete @_jobs[id] 28 | current? 29 | 30 | jobStatus: (id) -> @status[@_jobs[id]] ? null 31 | 32 | statusJobs: (status) -> 33 | if status? 34 | pos = @status.indexOf status 35 | if pos < 0 36 | throw new BottleneckError "status must be one of #{@status.join ', '}" 37 | k for k,v of @_jobs when v == pos 38 | else 39 | Object.keys @_jobs 40 | 41 | statusCounts: -> @counts.reduce(((acc, v, i) => acc[@status[i]] = v; acc), {}) 42 | 43 | module.exports = States 44 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/Sync.coffee: -------------------------------------------------------------------------------- 1 | DLList = require "./DLList" 2 | class Sync 3 | constructor: (@name, @Promise) -> 4 | @_running = 0 5 | @_queue = new DLList() 6 | isEmpty: -> @_queue.length == 0 7 | _tryToRun: -> 8 | if (@_running < 1) and @_queue.length > 0 9 | @_running++ 10 | { task, args, resolve, reject } = @_queue.shift() 11 | cb = try 12 | returned = await task args... 13 | () -> resolve returned 14 | catch error 15 | () -> reject error 16 | @_running-- 17 | @_tryToRun() 18 | cb() 19 | schedule: (task, args...) => 20 | resolve = reject = null 21 | promise = new @Promise (_resolve, _reject) -> 22 | resolve = _resolve 23 | reject = _reject 24 | @_queue.push { task, args, resolve, reject } 25 | @_tryToRun() 26 | promise 27 | 28 | module.exports = Sync 29 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/es5.coffee: -------------------------------------------------------------------------------- 1 | require("regenerator-runtime/runtime") 2 | 3 | module.exports = require "./Bottleneck" 4 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = require "./Bottleneck" 2 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/parser.coffee: -------------------------------------------------------------------------------- 1 | exports.load = (received, defaults, onto={}) -> 2 | for k, v of defaults 3 | onto[k] = received[k] ? v 4 | onto 5 | 6 | exports.overwrite = (received, defaults, onto={}) -> 7 | for k, v of received 8 | if defaults[k] != undefined 9 | onto[k] = v 10 | onto 11 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/blacklist_client.lua: -------------------------------------------------------------------------------- 1 | local blacklist = ARGV[num_static_argv + 1] 2 | 3 | if redis.call('zscore', client_last_seen_key, blacklist) then 4 | redis.call('zadd', client_last_seen_key, 0, blacklist) 5 | end 6 | 7 | 8 | return {} 9 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/check.lua: -------------------------------------------------------------------------------- 1 | local weight = tonumber(ARGV[num_static_argv + 1]) 2 | 3 | local capacity = process_tick(now, false)['capacity'] 4 | local nextRequest = tonumber(redis.call('hget', settings_key, 'nextRequest')) 5 | 6 | return conditions_check(capacity, weight) and nextRequest - now <= 0 7 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/conditions_check.lua: -------------------------------------------------------------------------------- 1 | local conditions_check = function (capacity, weight) 2 | return capacity == nil or weight <= capacity 3 | end 4 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/current_reservoir.lua: -------------------------------------------------------------------------------- 1 | return process_tick(now, false)['reservoir'] 2 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/done.lua: -------------------------------------------------------------------------------- 1 | process_tick(now, false) 2 | 3 | return tonumber(redis.call('hget', settings_key, 'done')) 4 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/free.lua: -------------------------------------------------------------------------------- 1 | local index = ARGV[num_static_argv + 1] 2 | 3 | redis.call('zadd', job_expirations_key, 0, index) 4 | 5 | return process_tick(now, false)['running'] 6 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/get_time.lua: -------------------------------------------------------------------------------- 1 | redis.replicate_commands() 2 | 3 | local get_time = function () 4 | local time = redis.call('time') 5 | 6 | return tonumber(time[1]..string.sub(time[2], 1, 3)) 7 | end 8 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/group_check.lua: -------------------------------------------------------------------------------- 1 | return not (redis.call('exists', settings_key) == 1) 2 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/heartbeat.lua: -------------------------------------------------------------------------------- 1 | process_tick(now, true) 2 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/increment_reservoir.lua: -------------------------------------------------------------------------------- 1 | local incr = tonumber(ARGV[num_static_argv + 1]) 2 | 3 | redis.call('hincrby', settings_key, 'reservoir', incr) 4 | 5 | local reservoir = process_tick(now, true)['reservoir'] 6 | 7 | local groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout')) 8 | refresh_expiration(0, 0, groupTimeout) 9 | 10 | return reservoir 11 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/queued.lua: -------------------------------------------------------------------------------- 1 | local clientTimeout = tonumber(redis.call('hget', settings_key, 'clientTimeout')) 2 | local valid_clients = redis.call('zrangebyscore', client_last_seen_key, (now - clientTimeout), 'inf') 3 | local client_queued = redis.call('hmget', client_num_queued_key, unpack(valid_clients)) 4 | 5 | local sum = 0 6 | for i = 1, #client_queued do 7 | sum = sum + tonumber(client_queued[i]) 8 | end 9 | 10 | return sum 11 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/refresh_expiration.lua: -------------------------------------------------------------------------------- 1 | local refresh_expiration = function (now, nextRequest, groupTimeout) 2 | 3 | if groupTimeout ~= nil then 4 | local ttl = (nextRequest + groupTimeout) - now 5 | 6 | for i = 1, #KEYS do 7 | redis.call('pexpire', KEYS[i], ttl) 8 | end 9 | end 10 | 11 | end 12 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/refs.lua: -------------------------------------------------------------------------------- 1 | local settings_key = KEYS[1] 2 | local job_weights_key = KEYS[2] 3 | local job_expirations_key = KEYS[3] 4 | local job_clients_key = KEYS[4] 5 | local client_running_key = KEYS[5] 6 | local client_num_queued_key = KEYS[6] 7 | local client_last_registered_key = KEYS[7] 8 | local client_last_seen_key = KEYS[8] 9 | 10 | local now = tonumber(ARGV[1]) 11 | local client = ARGV[2] 12 | 13 | local num_static_argv = 2 14 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/register.lua: -------------------------------------------------------------------------------- 1 | local index = ARGV[num_static_argv + 1] 2 | local weight = tonumber(ARGV[num_static_argv + 2]) 3 | local expiration = tonumber(ARGV[num_static_argv + 3]) 4 | 5 | local state = process_tick(now, false) 6 | local capacity = state['capacity'] 7 | local reservoir = state['reservoir'] 8 | 9 | local settings = redis.call('hmget', settings_key, 10 | 'nextRequest', 11 | 'minTime', 12 | 'groupTimeout' 13 | ) 14 | local nextRequest = tonumber(settings[1]) 15 | local minTime = tonumber(settings[2]) 16 | local groupTimeout = tonumber(settings[3]) 17 | 18 | if conditions_check(capacity, weight) then 19 | 20 | redis.call('hincrby', settings_key, 'running', weight) 21 | redis.call('hset', job_weights_key, index, weight) 22 | if expiration ~= nil then 23 | redis.call('zadd', job_expirations_key, now + expiration, index) 24 | end 25 | redis.call('hset', job_clients_key, index, client) 26 | redis.call('zincrby', client_running_key, weight, client) 27 | redis.call('hincrby', client_num_queued_key, client, -1) 28 | redis.call('zadd', client_last_registered_key, now, client) 29 | 30 | local wait = math.max(nextRequest - now, 0) 31 | local newNextRequest = now + wait + minTime 32 | 33 | if reservoir == nil then 34 | redis.call('hset', settings_key, 35 | 'nextRequest', newNextRequest 36 | ) 37 | else 38 | reservoir = reservoir - weight 39 | redis.call('hmset', settings_key, 40 | 'reservoir', reservoir, 41 | 'nextRequest', newNextRequest 42 | ) 43 | end 44 | 45 | refresh_expiration(now, newNextRequest, groupTimeout) 46 | 47 | return {true, wait, reservoir} 48 | 49 | else 50 | return {false} 51 | end 52 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/register_client.lua: -------------------------------------------------------------------------------- 1 | local queued = tonumber(ARGV[num_static_argv + 1]) 2 | 3 | -- Could have been re-registered concurrently 4 | if not redis.call('zscore', client_last_seen_key, client) then 5 | redis.call('zadd', client_running_key, 0, client) 6 | redis.call('hset', client_num_queued_key, client, queued) 7 | redis.call('zadd', client_last_registered_key, 0, client) 8 | end 9 | 10 | redis.call('zadd', client_last_seen_key, now, client) 11 | 12 | return {} 13 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/running.lua: -------------------------------------------------------------------------------- 1 | return process_tick(now, false)['running'] 2 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/submit.lua: -------------------------------------------------------------------------------- 1 | local queueLength = tonumber(ARGV[num_static_argv + 1]) 2 | local weight = tonumber(ARGV[num_static_argv + 2]) 3 | 4 | local capacity = process_tick(now, false)['capacity'] 5 | 6 | local settings = redis.call('hmget', settings_key, 7 | 'id', 8 | 'maxConcurrent', 9 | 'highWater', 10 | 'nextRequest', 11 | 'strategy', 12 | 'unblockTime', 13 | 'penalty', 14 | 'minTime', 15 | 'groupTimeout' 16 | ) 17 | local id = settings[1] 18 | local maxConcurrent = tonumber(settings[2]) 19 | local highWater = tonumber(settings[3]) 20 | local nextRequest = tonumber(settings[4]) 21 | local strategy = tonumber(settings[5]) 22 | local unblockTime = tonumber(settings[6]) 23 | local penalty = tonumber(settings[7]) 24 | local minTime = tonumber(settings[8]) 25 | local groupTimeout = tonumber(settings[9]) 26 | 27 | if maxConcurrent ~= nil and weight > maxConcurrent then 28 | return redis.error_reply('OVERWEIGHT:'..weight..':'..maxConcurrent) 29 | end 30 | 31 | local reachedHWM = (highWater ~= nil and queueLength == highWater 32 | and not ( 33 | conditions_check(capacity, weight) 34 | and nextRequest - now <= 0 35 | ) 36 | ) 37 | 38 | local blocked = strategy == 3 and (reachedHWM or unblockTime >= now) 39 | 40 | if blocked then 41 | local computedPenalty = penalty 42 | if computedPenalty == nil then 43 | if minTime == 0 then 44 | computedPenalty = 5000 45 | else 46 | computedPenalty = 15 * minTime 47 | end 48 | end 49 | 50 | local newNextRequest = now + computedPenalty + minTime 51 | 52 | redis.call('hmset', settings_key, 53 | 'unblockTime', now + computedPenalty, 54 | 'nextRequest', newNextRequest 55 | ) 56 | 57 | local clients_queued_reset = redis.call('hkeys', client_num_queued_key) 58 | local queued_reset = {} 59 | for i = 1, #clients_queued_reset do 60 | table.insert(queued_reset, clients_queued_reset[i]) 61 | table.insert(queued_reset, 0) 62 | end 63 | redis.call('hmset', client_num_queued_key, unpack(queued_reset)) 64 | 65 | redis.call('publish', 'b_'..id, 'blocked:') 66 | 67 | refresh_expiration(now, newNextRequest, groupTimeout) 68 | end 69 | 70 | if not blocked and not reachedHWM then 71 | redis.call('hincrby', client_num_queued_key, client, 1) 72 | end 73 | 74 | return {reachedHWM, blocked, strategy} 75 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/update_settings.lua: -------------------------------------------------------------------------------- 1 | local args = {'hmset', settings_key} 2 | 3 | for i = num_static_argv + 1, #ARGV do 4 | table.insert(args, ARGV[i]) 5 | end 6 | 7 | redis.call(unpack(args)) 8 | 9 | process_tick(now, true) 10 | 11 | local groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout')) 12 | refresh_expiration(0, 0, groupTimeout) 13 | 14 | return {} 15 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/validate_client.lua: -------------------------------------------------------------------------------- 1 | if not redis.call('zscore', client_last_seen_key, client) then 2 | return redis.error_reply('UNKNOWN_CLIENT') 3 | end 4 | 5 | redis.call('zadd', client_last_seen_key, now, client) 6 | -------------------------------------------------------------------------------- /node_modules/bottleneck/src/redis/validate_keys.lua: -------------------------------------------------------------------------------- 1 | if not (redis.call('exists', settings_key) == 1) then 2 | return redis.error_reply('SETTINGS_KEY_NOT_FOUND') 3 | end 4 | -------------------------------------------------------------------------------- /node_modules/bottleneck/test/bottleneck.js: -------------------------------------------------------------------------------- 1 | if (process.env.BUILD === 'es5') { 2 | module.exports = require('../es5.js') 3 | } else if (process.env.BUILD === 'light') { 4 | module.exports = require('../light.js') 5 | } else { 6 | module.exports = require('../lib/index.js') 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/bottleneck/test/spawn/increaseKeepAlive.js: -------------------------------------------------------------------------------- 1 | var Bottleneck = require('../bottleneck.js') 2 | var now = Date.now() 3 | 4 | var limiter = new Bottleneck({ 5 | reservoir: 2, 6 | reservoirIncreaseAmount: 2, 7 | reservoirIncreaseInterval: 200 8 | }) 9 | var f1 = () => { 10 | var secDiff = Math.floor((Date.now() - now) / 100) 11 | return Promise.resolve(`[${secDiff}]`) 12 | } 13 | 14 | limiter.schedule(f1).then((x) => process.stdout.write(x)) 15 | limiter.schedule(f1).then((x) => process.stdout.write(x)) 16 | limiter.schedule(f1).then((x) => process.stdout.write(x)) 17 | limiter.schedule(f1).then((x) => process.stdout.write(x)) 18 | -------------------------------------------------------------------------------- /node_modules/bottleneck/test/spawn/refreshKeepAlive.js: -------------------------------------------------------------------------------- 1 | var Bottleneck = require('../bottleneck.js') 2 | var now = Date.now() 3 | 4 | var limiter = new Bottleneck({ 5 | reservoir: 2, 6 | reservoirRefreshAmount: 2, 7 | reservoirRefreshInterval: 200 8 | }) 9 | var f1 = () => { 10 | var secDiff = Math.floor((Date.now() - now) / 100) 11 | return Promise.resolve(`[${secDiff}]`) 12 | } 13 | 14 | limiter.schedule(f1).then((x) => process.stdout.write(x)) 15 | limiter.schedule(f1).then((x) => process.stdout.write(x)) 16 | limiter.schedule(f1).then((x) => process.stdout.write(x)) 17 | limiter.schedule(f1).then((x) => process.stdout.write(x)) 18 | -------------------------------------------------------------------------------- /node_modules/brace-expansion/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2013 Julian Gruber 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/brace-expansion/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "brace-expansion", 3 | "description": "Brace expansion as known from sh/bash", 4 | "version": "1.1.11", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/juliangruber/brace-expansion.git" 8 | }, 9 | "homepage": "https://github.com/juliangruber/brace-expansion", 10 | "main": "index.js", 11 | "scripts": { 12 | "test": "tape test/*.js", 13 | "gentest": "bash test/generate.sh", 14 | "bench": "matcha test/perf/bench.js" 15 | }, 16 | "dependencies": { 17 | "balanced-match": "^1.0.0", 18 | "concat-map": "0.0.1" 19 | }, 20 | "devDependencies": { 21 | "matcha": "^0.7.0", 22 | "tape": "^4.6.0" 23 | }, 24 | "keywords": [], 25 | "author": { 26 | "name": "Julian Gruber", 27 | "email": "mail@juliangruber.com", 28 | "url": "http://juliangruber.com" 29 | }, 30 | "license": "MIT", 31 | "testling": { 32 | "files": "test/*.js", 33 | "browsers": [ 34 | "ie/8..latest", 35 | "firefox/20..latest", 36 | "firefox/nightly", 37 | "chrome/25..latest", 38 | "chrome/canary", 39 | "opera/12..latest", 40 | "opera/next", 41 | "safari/5.1..latest", 42 | "ipad/6.0..latest", 43 | "iphone/6.0..latest", 44 | "android-browser/4.2..latest" 45 | ] 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /node_modules/chalk/license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /node_modules/chalk/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chalk", 3 | "version": "2.4.2", 4 | "description": "Terminal string styling done right", 5 | "license": "MIT", 6 | "repository": "chalk/chalk", 7 | "engines": { 8 | "node": ">=4" 9 | }, 10 | "scripts": { 11 | "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava", 12 | "bench": "matcha benchmark.js", 13 | "coveralls": "nyc report --reporter=text-lcov | coveralls" 14 | }, 15 | "files": [ 16 | "index.js", 17 | "templates.js", 18 | "types/index.d.ts", 19 | "index.js.flow" 20 | ], 21 | "keywords": [ 22 | "color", 23 | "colour", 24 | "colors", 25 | "terminal", 26 | "console", 27 | "cli", 28 | "string", 29 | "str", 30 | "ansi", 31 | "style", 32 | "styles", 33 | "tty", 34 | "formatting", 35 | "rgb", 36 | "256", 37 | "shell", 38 | "xterm", 39 | "log", 40 | "logging", 41 | "command-line", 42 | "text" 43 | ], 44 | "dependencies": { 45 | "ansi-styles": "^3.2.1", 46 | "escape-string-regexp": "^1.0.5", 47 | "supports-color": "^5.3.0" 48 | }, 49 | "devDependencies": { 50 | "ava": "*", 51 | "coveralls": "^3.0.0", 52 | "execa": "^0.9.0", 53 | "flow-bin": "^0.68.0", 54 | "import-fresh": "^2.0.0", 55 | "matcha": "^0.7.0", 56 | "nyc": "^11.0.2", 57 | "resolve-from": "^4.0.0", 58 | "typescript": "^2.5.3", 59 | "xo": "*" 60 | }, 61 | "types": "types/index.d.ts", 62 | "xo": { 63 | "envs": [ 64 | "node", 65 | "mocha" 66 | ], 67 | "ignores": [ 68 | "test/_flow.js" 69 | ] 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /node_modules/color-convert/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 1.0.0 - 2016-01-07 2 | 3 | - Removed: unused speed test 4 | - Added: Automatic routing between previously unsupported conversions 5 | ([#27](https://github.com/Qix-/color-convert/pull/27)) 6 | - Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions 7 | ([#27](https://github.com/Qix-/color-convert/pull/27)) 8 | - Removed: `convert()` class 9 | ([#27](https://github.com/Qix-/color-convert/pull/27)) 10 | - Changed: all functions to lookup dictionary 11 | ([#27](https://github.com/Qix-/color-convert/pull/27)) 12 | - Changed: `ansi` to `ansi256` 13 | ([#27](https://github.com/Qix-/color-convert/pull/27)) 14 | - Fixed: argument grouping for functions requiring only one argument 15 | ([#27](https://github.com/Qix-/color-convert/pull/27)) 16 | 17 | # 0.6.0 - 2015-07-23 18 | 19 | - Added: methods to handle 20 | [ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors: 21 | - rgb2ansi16 22 | - rgb2ansi 23 | - hsl2ansi16 24 | - hsl2ansi 25 | - hsv2ansi16 26 | - hsv2ansi 27 | - hwb2ansi16 28 | - hwb2ansi 29 | - cmyk2ansi16 30 | - cmyk2ansi 31 | - keyword2ansi16 32 | - keyword2ansi 33 | - ansi162rgb 34 | - ansi162hsl 35 | - ansi162hsv 36 | - ansi162hwb 37 | - ansi162cmyk 38 | - ansi162keyword 39 | - ansi2rgb 40 | - ansi2hsl 41 | - ansi2hsv 42 | - ansi2hwb 43 | - ansi2cmyk 44 | - ansi2keyword 45 | ([#18](https://github.com/harthur/color-convert/pull/18)) 46 | 47 | # 0.5.3 - 2015-06-02 48 | 49 | - Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]` 50 | ([#15](https://github.com/harthur/color-convert/issues/15)) 51 | 52 | --- 53 | 54 | Check out commit logs for older releases 55 | -------------------------------------------------------------------------------- /node_modules/color-convert/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2016 Heather Arthur 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /node_modules/color-convert/index.js: -------------------------------------------------------------------------------- 1 | var conversions = require('./conversions'); 2 | var route = require('./route'); 3 | 4 | var convert = {}; 5 | 6 | var models = Object.keys(conversions); 7 | 8 | function wrapRaw(fn) { 9 | var wrappedFn = function (args) { 10 | if (args === undefined || args === null) { 11 | return args; 12 | } 13 | 14 | if (arguments.length > 1) { 15 | args = Array.prototype.slice.call(arguments); 16 | } 17 | 18 | return fn(args); 19 | }; 20 | 21 | // preserve .conversion property if there is one 22 | if ('conversion' in fn) { 23 | wrappedFn.conversion = fn.conversion; 24 | } 25 | 26 | return wrappedFn; 27 | } 28 | 29 | function wrapRounded(fn) { 30 | var wrappedFn = function (args) { 31 | if (args === undefined || args === null) { 32 | return args; 33 | } 34 | 35 | if (arguments.length > 1) { 36 | args = Array.prototype.slice.call(arguments); 37 | } 38 | 39 | var result = fn(args); 40 | 41 | // we're assuming the result is an array here. 42 | // see notice in conversions.js; don't use box types 43 | // in conversion functions. 44 | if (typeof result === 'object') { 45 | for (var len = result.length, i = 0; i < len; i++) { 46 | result[i] = Math.round(result[i]); 47 | } 48 | } 49 | 50 | return result; 51 | }; 52 | 53 | // preserve .conversion property if there is one 54 | if ('conversion' in fn) { 55 | wrappedFn.conversion = fn.conversion; 56 | } 57 | 58 | return wrappedFn; 59 | } 60 | 61 | models.forEach(function (fromModel) { 62 | convert[fromModel] = {}; 63 | 64 | Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); 65 | Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); 66 | 67 | var routes = route(fromModel); 68 | var routeModels = Object.keys(routes); 69 | 70 | routeModels.forEach(function (toModel) { 71 | var fn = routes[toModel]; 72 | 73 | convert[fromModel][toModel] = wrapRounded(fn); 74 | convert[fromModel][toModel].raw = wrapRaw(fn); 75 | }); 76 | }); 77 | 78 | module.exports = convert; 79 | -------------------------------------------------------------------------------- /node_modules/color-convert/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "color-convert", 3 | "description": "Plain color conversion functions", 4 | "version": "1.9.3", 5 | "author": "Heather Arthur ", 6 | "license": "MIT", 7 | "repository": "Qix-/color-convert", 8 | "scripts": { 9 | "pretest": "xo", 10 | "test": "node test/basic.js" 11 | }, 12 | "keywords": [ 13 | "color", 14 | "colour", 15 | "convert", 16 | "converter", 17 | "conversion", 18 | "rgb", 19 | "hsl", 20 | "hsv", 21 | "hwb", 22 | "cmyk", 23 | "ansi", 24 | "ansi16" 25 | ], 26 | "files": [ 27 | "index.js", 28 | "conversions.js", 29 | "css-keywords.js", 30 | "route.js" 31 | ], 32 | "xo": { 33 | "rules": { 34 | "default-case": 0, 35 | "no-inline-comments": 0, 36 | "operator-linebreak": 0 37 | } 38 | }, 39 | "devDependencies": { 40 | "chalk": "1.1.1", 41 | "xo": "0.11.2" 42 | }, 43 | "dependencies": { 44 | "color-name": "1.1.3" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /node_modules/color-name/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "node": true, 5 | "commonjs": true, 6 | "es6": true 7 | }, 8 | "extends": "eslint:recommended", 9 | "rules": { 10 | "strict": 2, 11 | "indent": 0, 12 | "linebreak-style": 0, 13 | "quotes": 0, 14 | "semi": 0, 15 | "no-cond-assign": 1, 16 | "no-constant-condition": 1, 17 | "no-duplicate-case": 1, 18 | "no-empty": 1, 19 | "no-ex-assign": 1, 20 | "no-extra-boolean-cast": 1, 21 | "no-extra-semi": 1, 22 | "no-fallthrough": 1, 23 | "no-func-assign": 1, 24 | "no-global-assign": 1, 25 | "no-implicit-globals": 2, 26 | "no-inner-declarations": ["error", "functions"], 27 | "no-irregular-whitespace": 2, 28 | "no-loop-func": 1, 29 | "no-multi-str": 1, 30 | "no-mixed-spaces-and-tabs": 1, 31 | "no-proto": 1, 32 | "no-sequences": 1, 33 | "no-throw-literal": 1, 34 | "no-unmodified-loop-condition": 1, 35 | "no-useless-call": 1, 36 | "no-void": 1, 37 | "no-with": 2, 38 | "wrap-iife": 1, 39 | "no-redeclare": 1, 40 | "no-unused-vars": ["error", { "vars": "all", "args": "none" }], 41 | "no-sparse-arrays": 1 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /node_modules/color-name/.npmignore: -------------------------------------------------------------------------------- 1 | //this will affect all the git repos 2 | git config --global core.excludesfile ~/.gitignore 3 | 4 | 5 | //update files since .ignore won't if already tracked 6 | git rm --cached 7 | 8 | # Compiled source # 9 | ################### 10 | *.com 11 | *.class 12 | *.dll 13 | *.exe 14 | *.o 15 | *.so 16 | 17 | # Packages # 18 | ############ 19 | # it's better to unpack these files and commit the raw source 20 | # git has its own built in compression methods 21 | *.7z 22 | *.dmg 23 | *.gz 24 | *.iso 25 | *.jar 26 | *.rar 27 | *.tar 28 | *.zip 29 | 30 | # Logs and databases # 31 | ###################### 32 | *.log 33 | *.sql 34 | *.sqlite 35 | 36 | # OS generated files # 37 | ###################### 38 | .DS_Store 39 | .DS_Store? 40 | ._* 41 | .Spotlight-V100 42 | .Trashes 43 | # Icon? 44 | ehthumbs.db 45 | Thumbs.db 46 | .cache 47 | .project 48 | .settings 49 | .tmproj 50 | *.esproj 51 | nbproject 52 | 53 | # Numerous always-ignore extensions # 54 | ##################################### 55 | *.diff 56 | *.err 57 | *.orig 58 | *.rej 59 | *.swn 60 | *.swo 61 | *.swp 62 | *.vi 63 | *~ 64 | *.sass-cache 65 | *.grunt 66 | *.tmp 67 | 68 | # Dreamweaver added files # 69 | ########################### 70 | _notes 71 | dwsync.xml 72 | 73 | # Komodo # 74 | ########################### 75 | *.komodoproject 76 | .komodotools 77 | 78 | # Node # 79 | ##################### 80 | node_modules 81 | 82 | # Bower # 83 | ##################### 84 | bower_components 85 | 86 | # Folders to ignore # 87 | ##################### 88 | .hg 89 | .svn 90 | .CVS 91 | intermediate 92 | publish 93 | .idea 94 | .graphics 95 | _test 96 | _archive 97 | uploads 98 | tmp 99 | 100 | # Vim files to ignore # 101 | ####################### 102 | .VimballRecord 103 | .netrwhist 104 | 105 | bundle.* 106 | 107 | _demo -------------------------------------------------------------------------------- /node_modules/color-name/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2015 Dmitry Ivanov 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/color-name/README.md: -------------------------------------------------------------------------------- 1 | A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. 2 | 3 | [![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) 4 | 5 | 6 | ```js 7 | var colors = require('color-name'); 8 | colors.red //[255,0,0] 9 | ``` 10 | 11 | 12 | -------------------------------------------------------------------------------- /node_modules/color-name/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "color-name", 3 | "version": "1.1.3", 4 | "description": "A list of color names and its values", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "node test.js" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git@github.com:dfcreative/color-name.git" 12 | }, 13 | "keywords": [ 14 | "color-name", 15 | "color", 16 | "color-keyword", 17 | "keyword" 18 | ], 19 | "author": "DY ", 20 | "license": "MIT", 21 | "bugs": { 22 | "url": "https://github.com/dfcreative/color-name/issues" 23 | }, 24 | "homepage": "https://github.com/dfcreative/color-name" 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/color-name/test.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var names = require('./'); 4 | var assert = require('assert'); 5 | 6 | assert.deepEqual(names.red, [255,0,0]); 7 | assert.deepEqual(names.aliceblue, [240,248,255]); 8 | -------------------------------------------------------------------------------- /node_modules/commander/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2011 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/commander/esm.mjs: -------------------------------------------------------------------------------- 1 | import commander from './index.js'; 2 | 3 | // wrapper to provide named exports for ESM. 4 | export const { 5 | program, 6 | createCommand, 7 | createArgument, 8 | createOption, 9 | CommanderError, 10 | InvalidArgumentError, 11 | InvalidOptionArgumentError, // deprecated old name 12 | Command, 13 | Argument, 14 | Option, 15 | Help 16 | } = commander; 17 | -------------------------------------------------------------------------------- /node_modules/commander/index.js: -------------------------------------------------------------------------------- 1 | const { Argument } = require('./lib/argument.js'); 2 | const { Command } = require('./lib/command.js'); 3 | const { CommanderError, InvalidArgumentError } = require('./lib/error.js'); 4 | const { Help } = require('./lib/help.js'); 5 | const { Option } = require('./lib/option.js'); 6 | 7 | // @ts-check 8 | 9 | /** 10 | * Expose the root command. 11 | */ 12 | 13 | exports = module.exports = new Command(); 14 | exports.program = exports; // More explicit access to global command. 15 | // Implicit export of createArgument, createCommand, and createOption. 16 | 17 | /** 18 | * Expose classes 19 | */ 20 | 21 | exports.Argument = Argument; 22 | exports.Command = Command; 23 | exports.CommanderError = CommanderError; 24 | exports.Help = Help; 25 | exports.InvalidArgumentError = InvalidArgumentError; 26 | exports.InvalidOptionArgumentError = InvalidArgumentError; // Deprecated 27 | exports.Option = Option; 28 | -------------------------------------------------------------------------------- /node_modules/commander/lib/error.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | /** 4 | * CommanderError class 5 | * @class 6 | */ 7 | class CommanderError extends Error { 8 | /** 9 | * Constructs the CommanderError class 10 | * @param {number} exitCode suggested exit code which could be used with process.exit 11 | * @param {string} code an id string representing the error 12 | * @param {string} message human-readable description of the error 13 | * @constructor 14 | */ 15 | constructor(exitCode, code, message) { 16 | super(message); 17 | // properly capture stack trace in Node.js 18 | Error.captureStackTrace(this, this.constructor); 19 | this.name = this.constructor.name; 20 | this.code = code; 21 | this.exitCode = exitCode; 22 | this.nestedError = undefined; 23 | } 24 | } 25 | 26 | /** 27 | * InvalidArgumentError class 28 | * @class 29 | */ 30 | class InvalidArgumentError extends CommanderError { 31 | /** 32 | * Constructs the InvalidArgumentError class 33 | * @param {string} [message] explanation of why argument is invalid 34 | * @constructor 35 | */ 36 | constructor(message) { 37 | super(1, 'commander.invalidArgument', message); 38 | // properly capture stack trace in Node.js 39 | Error.captureStackTrace(this, this.constructor); 40 | this.name = this.constructor.name; 41 | } 42 | } 43 | 44 | exports.CommanderError = CommanderError; 45 | exports.InvalidArgumentError = InvalidArgumentError; 46 | -------------------------------------------------------------------------------- /node_modules/commander/package-support.json: -------------------------------------------------------------------------------- 1 | { 2 | "versions": [ 3 | { 4 | "version": "*", 5 | "target": { 6 | "node": "supported" 7 | }, 8 | "response": { 9 | "type": "time-permitting" 10 | }, 11 | "backing": { 12 | "npm-funding": true 13 | } 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /node_modules/concat-map/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | -------------------------------------------------------------------------------- /node_modules/concat-map/LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /node_modules/concat-map/README.markdown: -------------------------------------------------------------------------------- 1 | concat-map 2 | ========== 3 | 4 | Concatenative mapdashery. 5 | 6 | [![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) 7 | 8 | [![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) 9 | 10 | example 11 | ======= 12 | 13 | ``` js 14 | var concatMap = require('concat-map'); 15 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 16 | var ys = concatMap(xs, function (x) { 17 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 18 | }); 19 | console.dir(ys); 20 | ``` 21 | 22 | *** 23 | 24 | ``` 25 | [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] 26 | ``` 27 | 28 | methods 29 | ======= 30 | 31 | ``` js 32 | var concatMap = require('concat-map') 33 | ``` 34 | 35 | concatMap(xs, fn) 36 | ----------------- 37 | 38 | Return an array of concatenated elements by calling `fn(x, i)` for each element 39 | `x` and each index `i` in the array `xs`. 40 | 41 | When `fn(x, i)` returns an array, its result will be concatenated with the 42 | result array. If `fn(x, i)` returns anything else, that value will be pushed 43 | onto the end of the result array. 44 | 45 | install 46 | ======= 47 | 48 | With [npm](http://npmjs.org) do: 49 | 50 | ``` 51 | npm install concat-map 52 | ``` 53 | 54 | license 55 | ======= 56 | 57 | MIT 58 | 59 | notes 60 | ===== 61 | 62 | This module was written while sitting high above the ground in a tree. 63 | -------------------------------------------------------------------------------- /node_modules/concat-map/example/map.js: -------------------------------------------------------------------------------- 1 | var concatMap = require('../'); 2 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 3 | var ys = concatMap(xs, function (x) { 4 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 5 | }); 6 | console.dir(ys); 7 | -------------------------------------------------------------------------------- /node_modules/concat-map/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function (xs, fn) { 2 | var res = []; 3 | for (var i = 0; i < xs.length; i++) { 4 | var x = fn(xs[i], i); 5 | if (isArray(x)) res.push.apply(res, x); 6 | else res.push(x); 7 | } 8 | return res; 9 | }; 10 | 11 | var isArray = Array.isArray || function (xs) { 12 | return Object.prototype.toString.call(xs) === '[object Array]'; 13 | }; 14 | -------------------------------------------------------------------------------- /node_modules/concat-map/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "concat-map", 3 | "description" : "concatenative mapdashery", 4 | "version" : "0.0.1", 5 | "repository" : { 6 | "type" : "git", 7 | "url" : "git://github.com/substack/node-concat-map.git" 8 | }, 9 | "main" : "index.js", 10 | "keywords" : [ 11 | "concat", 12 | "concatMap", 13 | "map", 14 | "functional", 15 | "higher-order" 16 | ], 17 | "directories" : { 18 | "example" : "example", 19 | "test" : "test" 20 | }, 21 | "scripts" : { 22 | "test" : "tape test/*.js" 23 | }, 24 | "devDependencies" : { 25 | "tape" : "~2.4.0" 26 | }, 27 | "license" : "MIT", 28 | "author" : { 29 | "name" : "James Halliday", 30 | "email" : "mail@substack.net", 31 | "url" : "http://substack.net" 32 | }, 33 | "testling" : { 34 | "files" : "test/*.js", 35 | "browsers" : { 36 | "ie" : [ 6, 7, 8, 9 ], 37 | "ff" : [ 3.5, 10, 15.0 ], 38 | "chrome" : [ 10, 22 ], 39 | "safari" : [ 5.1 ], 40 | "opera" : [ 12 ] 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /node_modules/concat-map/test/map.js: -------------------------------------------------------------------------------- 1 | var concatMap = require('../'); 2 | var test = require('tape'); 3 | 4 | test('empty or not', function (t) { 5 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 6 | var ixes = []; 7 | var ys = concatMap(xs, function (x, ix) { 8 | ixes.push(ix); 9 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 10 | }); 11 | t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); 12 | t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); 13 | t.end(); 14 | }); 15 | 16 | test('always something', function (t) { 17 | var xs = [ 'a', 'b', 'c', 'd' ]; 18 | var ys = concatMap(xs, function (x) { 19 | return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; 20 | }); 21 | t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); 22 | t.end(); 23 | }); 24 | 25 | test('scalars', function (t) { 26 | var xs = [ 'a', 'b', 'c', 'd' ]; 27 | var ys = concatMap(xs, function (x) { 28 | return x === 'b' ? [ 'B', 'B', 'B' ] : x; 29 | }); 30 | t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); 31 | t.end(); 32 | }); 33 | 34 | test('undefs', function (t) { 35 | var xs = [ 'a', 'b', 'c', 'd' ]; 36 | var ys = concatMap(xs, function () {}); 37 | t.same(ys, [ undefined, undefined, undefined, undefined ]); 38 | t.end(); 39 | }); 40 | -------------------------------------------------------------------------------- /node_modules/diff/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | ## Pull Requests 4 | 5 | We also accept [pull requests][pull-request]! 6 | 7 | Generally we like to see pull requests that 8 | 9 | - Maintain the existing code style 10 | - Are focused on a single change (i.e. avoid large refactoring or style adjustments in untouched code if not the primary goal of the pull request) 11 | - Have [good commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) 12 | - Have tests 13 | - Don't decrease the current code coverage (see coverage/lcov-report/index.html) 14 | 15 | ## Building 16 | 17 | ``` 18 | npm install 19 | npm test 20 | ``` 21 | 22 | The `npm test -- dev` implements watching for tests within Node and `karma start` may be used for manual testing in browsers. 23 | 24 | If you notice any problems, please report them to the GitHub issue tracker at 25 | [http://github.com/kpdecker/jsdiff/issues](http://github.com/kpdecker/jsdiff/issues). 26 | 27 | ## Releasing 28 | 29 | JsDiff utilizes the [release yeoman generator][generator-release] to perform most release tasks. 30 | 31 | A full release may be completed with the following: 32 | 33 | ``` 34 | yo release 35 | npm publish 36 | ``` 37 | 38 | [generator-release]: https://github.com/walmartlabs/generator-release 39 | [pull-request]: https://github.com/kpdecker/jsdiff/pull/new/master 40 | -------------------------------------------------------------------------------- /node_modules/diff/LICENSE: -------------------------------------------------------------------------------- 1 | Software License Agreement (BSD License) 2 | 3 | Copyright (c) 2009-2015, Kevin Decker 4 | 5 | All rights reserved. 6 | 7 | Redistribution and use of this software in source and binary forms, with or without modification, 8 | are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above 11 | copyright notice, this list of conditions and the 12 | following disclaimer. 13 | 14 | * Redistributions in binary form must reproduce the above 15 | copyright notice, this list of conditions and the 16 | following disclaimer in the documentation and/or other 17 | materials provided with the distribution. 18 | 19 | * Neither the name of Kevin Decker nor the names of its 20 | contributors may be used to endorse or promote products 21 | derived from this software without specific prior 22 | written permission. 23 | 24 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 25 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 26 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 30 | IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 31 | OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /node_modules/diff/lib/diff/character.js: -------------------------------------------------------------------------------- 1 | /*istanbul ignore start*/ 2 | "use strict"; 3 | 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | exports.diffChars = diffChars; 8 | exports.characterDiff = void 0; 9 | 10 | /*istanbul ignore end*/ 11 | var 12 | /*istanbul ignore start*/ 13 | _base = _interopRequireDefault(require("./base")) 14 | /*istanbul ignore end*/ 15 | ; 16 | 17 | /*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 18 | 19 | /*istanbul ignore end*/ 20 | var characterDiff = new 21 | /*istanbul ignore start*/ 22 | _base 23 | /*istanbul ignore end*/ 24 | . 25 | /*istanbul ignore start*/ 26 | default 27 | /*istanbul ignore end*/ 28 | (); 29 | 30 | /*istanbul ignore start*/ 31 | exports.characterDiff = characterDiff; 32 | 33 | /*istanbul ignore end*/ 34 | function diffChars(oldStr, newStr, options) { 35 | return characterDiff.diff(oldStr, newStr, options); 36 | } 37 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2NoYXJhY3Rlci5qcyJdLCJuYW1lcyI6WyJjaGFyYWN0ZXJEaWZmIiwiRGlmZiIsImRpZmZDaGFycyIsIm9sZFN0ciIsIm5ld1N0ciIsIm9wdGlvbnMiLCJkaWZmIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFFTyxJQUFNQSxhQUFhLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBSjtBQUFBLEVBQXRCOzs7Ozs7QUFDQSxTQUFTQyxTQUFULENBQW1CQyxNQUFuQixFQUEyQkMsTUFBM0IsRUFBbUNDLE9BQW5DLEVBQTRDO0FBQUUsU0FBT0wsYUFBYSxDQUFDTSxJQUFkLENBQW1CSCxNQUFuQixFQUEyQkMsTUFBM0IsRUFBbUNDLE9BQW5DLENBQVA7QUFBcUQiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRGlmZiBmcm9tICcuL2Jhc2UnO1xuXG5leHBvcnQgY29uc3QgY2hhcmFjdGVyRGlmZiA9IG5ldyBEaWZmKCk7XG5leHBvcnQgZnVuY3Rpb24gZGlmZkNoYXJzKG9sZFN0ciwgbmV3U3RyLCBvcHRpb25zKSB7IHJldHVybiBjaGFyYWN0ZXJEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIG9wdGlvbnMpOyB9XG4iXX0= 38 | -------------------------------------------------------------------------------- /node_modules/diff/lib/diff/css.js: -------------------------------------------------------------------------------- 1 | /*istanbul ignore start*/ 2 | "use strict"; 3 | 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | exports.diffCss = diffCss; 8 | exports.cssDiff = void 0; 9 | 10 | /*istanbul ignore end*/ 11 | var 12 | /*istanbul ignore start*/ 13 | _base = _interopRequireDefault(require("./base")) 14 | /*istanbul ignore end*/ 15 | ; 16 | 17 | /*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 18 | 19 | /*istanbul ignore end*/ 20 | var cssDiff = new 21 | /*istanbul ignore start*/ 22 | _base 23 | /*istanbul ignore end*/ 24 | . 25 | /*istanbul ignore start*/ 26 | default 27 | /*istanbul ignore end*/ 28 | (); 29 | 30 | /*istanbul ignore start*/ 31 | exports.cssDiff = cssDiff; 32 | 33 | /*istanbul ignore end*/ 34 | cssDiff.tokenize = function (value) { 35 | return value.split(/([{}:;,]|\s+)/); 36 | }; 37 | 38 | function diffCss(oldStr, newStr, callback) { 39 | return cssDiff.diff(oldStr, newStr, callback); 40 | } 41 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2Nzcy5qcyJdLCJuYW1lcyI6WyJjc3NEaWZmIiwiRGlmZiIsInRva2VuaXplIiwidmFsdWUiLCJzcGxpdCIsImRpZmZDc3MiLCJvbGRTdHIiLCJuZXdTdHIiLCJjYWxsYmFjayIsImRpZmYiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOzs7OztBQUVPLElBQU1BLE9BQU8sR0FBRztBQUFJQztBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFKO0FBQUEsRUFBaEI7Ozs7OztBQUNQRCxPQUFPLENBQUNFLFFBQVIsR0FBbUIsVUFBU0MsS0FBVCxFQUFnQjtBQUNqQyxTQUFPQSxLQUFLLENBQUNDLEtBQU4sQ0FBWSxlQUFaLENBQVA7QUFDRCxDQUZEOztBQUlPLFNBQVNDLE9BQVQsQ0FBaUJDLE1BQWpCLEVBQXlCQyxNQUF6QixFQUFpQ0MsUUFBakMsRUFBMkM7QUFBRSxTQUFPUixPQUFPLENBQUNTLElBQVIsQ0FBYUgsTUFBYixFQUFxQkMsTUFBckIsRUFBNkJDLFFBQTdCLENBQVA7QUFBZ0QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRGlmZiBmcm9tICcuL2Jhc2UnO1xuXG5leHBvcnQgY29uc3QgY3NzRGlmZiA9IG5ldyBEaWZmKCk7XG5jc3NEaWZmLnRva2VuaXplID0gZnVuY3Rpb24odmFsdWUpIHtcbiAgcmV0dXJuIHZhbHVlLnNwbGl0KC8oW3t9OjssXXxcXHMrKS8pO1xufTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZDc3Mob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKSB7IHJldHVybiBjc3NEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKTsgfVxuIl19 42 | -------------------------------------------------------------------------------- /node_modules/diff/lib/diff/sentence.js: -------------------------------------------------------------------------------- 1 | /*istanbul ignore start*/ 2 | "use strict"; 3 | 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | exports.diffSentences = diffSentences; 8 | exports.sentenceDiff = void 0; 9 | 10 | /*istanbul ignore end*/ 11 | var 12 | /*istanbul ignore start*/ 13 | _base = _interopRequireDefault(require("./base")) 14 | /*istanbul ignore end*/ 15 | ; 16 | 17 | /*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 18 | 19 | /*istanbul ignore end*/ 20 | var sentenceDiff = new 21 | /*istanbul ignore start*/ 22 | _base 23 | /*istanbul ignore end*/ 24 | . 25 | /*istanbul ignore start*/ 26 | default 27 | /*istanbul ignore end*/ 28 | (); 29 | 30 | /*istanbul ignore start*/ 31 | exports.sentenceDiff = sentenceDiff; 32 | 33 | /*istanbul ignore end*/ 34 | sentenceDiff.tokenize = function (value) { 35 | return value.split(/(\S.+?[.!?])(?=\s+|$)/); 36 | }; 37 | 38 | function diffSentences(oldStr, newStr, callback) { 39 | return sentenceDiff.diff(oldStr, newStr, callback); 40 | } 41 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL3NlbnRlbmNlLmpzIl0sIm5hbWVzIjpbInNlbnRlbmNlRGlmZiIsIkRpZmYiLCJ0b2tlbml6ZSIsInZhbHVlIiwic3BsaXQiLCJkaWZmU2VudGVuY2VzIiwib2xkU3RyIiwibmV3U3RyIiwiY2FsbGJhY2siLCJkaWZmIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFHTyxJQUFNQSxZQUFZLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBSjtBQUFBLEVBQXJCOzs7Ozs7QUFDUEQsWUFBWSxDQUFDRSxRQUFiLEdBQXdCLFVBQVNDLEtBQVQsRUFBZ0I7QUFDdEMsU0FBT0EsS0FBSyxDQUFDQyxLQUFOLENBQVksdUJBQVosQ0FBUDtBQUNELENBRkQ7O0FBSU8sU0FBU0MsYUFBVCxDQUF1QkMsTUFBdkIsRUFBK0JDLE1BQS9CLEVBQXVDQyxRQUF2QyxFQUFpRDtBQUFFLFNBQU9SLFlBQVksQ0FBQ1MsSUFBYixDQUFrQkgsTUFBbEIsRUFBMEJDLE1BQTFCLEVBQWtDQyxRQUFsQyxDQUFQO0FBQXFEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IERpZmYgZnJvbSAnLi9iYXNlJztcblxuXG5leHBvcnQgY29uc3Qgc2VudGVuY2VEaWZmID0gbmV3IERpZmYoKTtcbnNlbnRlbmNlRGlmZi50b2tlbml6ZSA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gIHJldHVybiB2YWx1ZS5zcGxpdCgvKFxcUy4rP1suIT9dKSg/PVxccyt8JCkvKTtcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiBkaWZmU2VudGVuY2VzKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjaykgeyByZXR1cm4gc2VudGVuY2VEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKTsgfVxuIl19 42 | -------------------------------------------------------------------------------- /node_modules/diff/lib/util/array.js: -------------------------------------------------------------------------------- 1 | /*istanbul ignore start*/ 2 | "use strict"; 3 | 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | exports.arrayEqual = arrayEqual; 8 | exports.arrayStartsWith = arrayStartsWith; 9 | 10 | /*istanbul ignore end*/ 11 | function arrayEqual(a, b) { 12 | if (a.length !== b.length) { 13 | return false; 14 | } 15 | 16 | return arrayStartsWith(a, b); 17 | } 18 | 19 | function arrayStartsWith(array, start) { 20 | if (start.length > array.length) { 21 | return false; 22 | } 23 | 24 | for (var i = 0; i < start.length; i++) { 25 | if (start[i] !== array[i]) { 26 | return false; 27 | } 28 | } 29 | 30 | return true; 31 | } 32 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL2FycmF5LmpzIl0sIm5hbWVzIjpbImFycmF5RXF1YWwiLCJhIiwiYiIsImxlbmd0aCIsImFycmF5U3RhcnRzV2l0aCIsImFycmF5Iiwic3RhcnQiLCJpIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQU8sU0FBU0EsVUFBVCxDQUFvQkMsQ0FBcEIsRUFBdUJDLENBQXZCLEVBQTBCO0FBQy9CLE1BQUlELENBQUMsQ0FBQ0UsTUFBRixLQUFhRCxDQUFDLENBQUNDLE1BQW5CLEVBQTJCO0FBQ3pCLFdBQU8sS0FBUDtBQUNEOztBQUVELFNBQU9DLGVBQWUsQ0FBQ0gsQ0FBRCxFQUFJQyxDQUFKLENBQXRCO0FBQ0Q7O0FBRU0sU0FBU0UsZUFBVCxDQUF5QkMsS0FBekIsRUFBZ0NDLEtBQWhDLEVBQXVDO0FBQzVDLE1BQUlBLEtBQUssQ0FBQ0gsTUFBTixHQUFlRSxLQUFLLENBQUNGLE1BQXpCLEVBQWlDO0FBQy9CLFdBQU8sS0FBUDtBQUNEOztBQUVELE9BQUssSUFBSUksQ0FBQyxHQUFHLENBQWIsRUFBZ0JBLENBQUMsR0FBR0QsS0FBSyxDQUFDSCxNQUExQixFQUFrQ0ksQ0FBQyxFQUFuQyxFQUF1QztBQUNyQyxRQUFJRCxLQUFLLENBQUNDLENBQUQsQ0FBTCxLQUFhRixLQUFLLENBQUNFLENBQUQsQ0FBdEIsRUFBMkI7QUFDekIsYUFBTyxLQUFQO0FBQ0Q7QUFDRjs7QUFFRCxTQUFPLElBQVA7QUFDRCIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBhcnJheUVxdWFsKGEsIGIpIHtcbiAgaWYgKGEubGVuZ3RoICE9PSBiLmxlbmd0aCkge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHJldHVybiBhcnJheVN0YXJ0c1dpdGgoYSwgYik7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBhcnJheVN0YXJ0c1dpdGgoYXJyYXksIHN0YXJ0KSB7XG4gIGlmIChzdGFydC5sZW5ndGggPiBhcnJheS5sZW5ndGgpIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cblxuICBmb3IgKGxldCBpID0gMDsgaSA8IHN0YXJ0Lmxlbmd0aDsgaSsrKSB7XG4gICAgaWYgKHN0YXJ0W2ldICE9PSBhcnJheVtpXSkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuIl19 33 | -------------------------------------------------------------------------------- /node_modules/diff/lib/util/params.js: -------------------------------------------------------------------------------- 1 | /*istanbul ignore start*/ 2 | "use strict"; 3 | 4 | Object.defineProperty(exports, "__esModule", { 5 | value: true 6 | }); 7 | exports.generateOptions = generateOptions; 8 | 9 | /*istanbul ignore end*/ 10 | function generateOptions(options, defaults) { 11 | if (typeof options === 'function') { 12 | defaults.callback = options; 13 | } else if (options) { 14 | for (var name in options) { 15 | /* istanbul ignore else */ 16 | if (options.hasOwnProperty(name)) { 17 | defaults[name] = options[name]; 18 | } 19 | } 20 | } 21 | 22 | return defaults; 23 | } 24 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL3BhcmFtcy5qcyJdLCJuYW1lcyI6WyJnZW5lcmF0ZU9wdGlvbnMiLCJvcHRpb25zIiwiZGVmYXVsdHMiLCJjYWxsYmFjayIsIm5hbWUiLCJoYXNPd25Qcm9wZXJ0eSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQU8sU0FBU0EsZUFBVCxDQUF5QkMsT0FBekIsRUFBa0NDLFFBQWxDLEVBQTRDO0FBQ2pELE1BQUksT0FBT0QsT0FBUCxLQUFtQixVQUF2QixFQUFtQztBQUNqQ0MsSUFBQUEsUUFBUSxDQUFDQyxRQUFULEdBQW9CRixPQUFwQjtBQUNELEdBRkQsTUFFTyxJQUFJQSxPQUFKLEVBQWE7QUFDbEIsU0FBSyxJQUFJRyxJQUFULElBQWlCSCxPQUFqQixFQUEwQjtBQUN4QjtBQUNBLFVBQUlBLE9BQU8sQ0FBQ0ksY0FBUixDQUF1QkQsSUFBdkIsQ0FBSixFQUFrQztBQUNoQ0YsUUFBQUEsUUFBUSxDQUFDRSxJQUFELENBQVIsR0FBaUJILE9BQU8sQ0FBQ0csSUFBRCxDQUF4QjtBQUNEO0FBQ0Y7QUFDRjs7QUFDRCxTQUFPRixRQUFQO0FBQ0QiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gZ2VuZXJhdGVPcHRpb25zKG9wdGlvbnMsIGRlZmF1bHRzKSB7XG4gIGlmICh0eXBlb2Ygb3B0aW9ucyA9PT0gJ2Z1bmN0aW9uJykge1xuICAgIGRlZmF1bHRzLmNhbGxiYWNrID0gb3B0aW9ucztcbiAgfSBlbHNlIGlmIChvcHRpb25zKSB7XG4gICAgZm9yIChsZXQgbmFtZSBpbiBvcHRpb25zKSB7XG4gICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgaWYgKG9wdGlvbnMuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcbiAgICAgICAgZGVmYXVsdHNbbmFtZV0gPSBvcHRpb25zW25hbWVdO1xuICAgICAgfVxuICAgIH1cbiAgfVxuICByZXR1cm4gZGVmYXVsdHM7XG59XG4iXX0= 25 | -------------------------------------------------------------------------------- /node_modules/diff/runtime.js: -------------------------------------------------------------------------------- 1 | require('@babel/register')({ 2 | ignore: ['lib', 'node_modules'] 3 | }); 4 | -------------------------------------------------------------------------------- /node_modules/escape-string-regexp/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; 4 | 5 | module.exports = function (str) { 6 | if (typeof str !== 'string') { 7 | throw new TypeError('Expected a string'); 8 | } 9 | 10 | return str.replace(matchOperatorsRe, '\\$&'); 11 | }; 12 | -------------------------------------------------------------------------------- /node_modules/escape-string-regexp/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/escape-string-regexp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "escape-string-regexp", 3 | "version": "1.0.5", 4 | "description": "Escape RegExp special characters", 5 | "license": "MIT", 6 | "repository": "sindresorhus/escape-string-regexp", 7 | "author": { 8 | "name": "Sindre Sorhus", 9 | "email": "sindresorhus@gmail.com", 10 | "url": "sindresorhus.com" 11 | }, 12 | "maintainers": [ 13 | "Sindre Sorhus (sindresorhus.com)", 14 | "Joshua Boy Nicolai Appelman (jbna.nl)" 15 | ], 16 | "engines": { 17 | "node": ">=0.8.0" 18 | }, 19 | "scripts": { 20 | "test": "xo && ava" 21 | }, 22 | "files": [ 23 | "index.js" 24 | ], 25 | "keywords": [ 26 | "escape", 27 | "regex", 28 | "regexp", 29 | "re", 30 | "regular", 31 | "expression", 32 | "string", 33 | "str", 34 | "special", 35 | "characters" 36 | ], 37 | "devDependencies": { 38 | "ava": "*", 39 | "xo": "*" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /node_modules/escape-string-regexp/readme.md: -------------------------------------------------------------------------------- 1 | # escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp) 2 | 3 | > Escape RegExp special characters 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install --save escape-string-regexp 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | const escapeStringRegexp = require('escape-string-regexp'); 17 | 18 | const escapedString = escapeStringRegexp('how much $ for a unicorn?'); 19 | //=> 'how much \$ for a unicorn\?' 20 | 21 | new RegExp(escapedString); 22 | ``` 23 | 24 | 25 | ## License 26 | 27 | MIT © [Sindre Sorhus](http://sindresorhus.com) 28 | -------------------------------------------------------------------------------- /node_modules/fs.realpath/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | 17 | ---- 18 | 19 | This library bundles a version of the `fs.realpath` and `fs.realpathSync` 20 | methods from Node.js v0.10 under the terms of the Node.js MIT license. 21 | 22 | Node's license follows, also included at the header of `old.js` which contains 23 | the licensed code: 24 | 25 | Copyright Joyent, Inc. and other Node contributors. 26 | 27 | Permission is hereby granted, free of charge, to any person obtaining a 28 | copy of this software and associated documentation files (the "Software"), 29 | to deal in the Software without restriction, including without limitation 30 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 31 | and/or sell copies of the Software, and to permit persons to whom the 32 | Software is furnished to do so, subject to the following conditions: 33 | 34 | The above copyright notice and this permission notice shall be included in 35 | all copies or substantial portions of the Software. 36 | 37 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 38 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 39 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 40 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 41 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 42 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 43 | DEALINGS IN THE SOFTWARE. 44 | -------------------------------------------------------------------------------- /node_modules/fs.realpath/README.md: -------------------------------------------------------------------------------- 1 | # fs.realpath 2 | 3 | A backwards-compatible fs.realpath for Node v6 and above 4 | 5 | In Node v6, the JavaScript implementation of fs.realpath was replaced 6 | with a faster (but less resilient) native implementation. That raises 7 | new and platform-specific errors and cannot handle long or excessively 8 | symlink-looping paths. 9 | 10 | This module handles those cases by detecting the new errors and 11 | falling back to the JavaScript implementation. On versions of Node 12 | prior to v6, it has no effect. 13 | 14 | ## USAGE 15 | 16 | ```js 17 | var rp = require('fs.realpath') 18 | 19 | // async version 20 | rp.realpath(someLongAndLoopingPath, function (er, real) { 21 | // the ELOOP was handled, but it was a bit slower 22 | }) 23 | 24 | // sync version 25 | var real = rp.realpathSync(someLongAndLoopingPath) 26 | 27 | // monkeypatch at your own risk! 28 | // This replaces the fs.realpath/fs.realpathSync builtins 29 | rp.monkeypatch() 30 | 31 | // un-do the monkeypatching 32 | rp.unmonkeypatch() 33 | ``` 34 | -------------------------------------------------------------------------------- /node_modules/fs.realpath/index.js: -------------------------------------------------------------------------------- 1 | module.exports = realpath 2 | realpath.realpath = realpath 3 | realpath.sync = realpathSync 4 | realpath.realpathSync = realpathSync 5 | realpath.monkeypatch = monkeypatch 6 | realpath.unmonkeypatch = unmonkeypatch 7 | 8 | var fs = require('fs') 9 | var origRealpath = fs.realpath 10 | var origRealpathSync = fs.realpathSync 11 | 12 | var version = process.version 13 | var ok = /^v[0-5]\./.test(version) 14 | var old = require('./old.js') 15 | 16 | function newError (er) { 17 | return er && er.syscall === 'realpath' && ( 18 | er.code === 'ELOOP' || 19 | er.code === 'ENOMEM' || 20 | er.code === 'ENAMETOOLONG' 21 | ) 22 | } 23 | 24 | function realpath (p, cache, cb) { 25 | if (ok) { 26 | return origRealpath(p, cache, cb) 27 | } 28 | 29 | if (typeof cache === 'function') { 30 | cb = cache 31 | cache = null 32 | } 33 | origRealpath(p, cache, function (er, result) { 34 | if (newError(er)) { 35 | old.realpath(p, cache, cb) 36 | } else { 37 | cb(er, result) 38 | } 39 | }) 40 | } 41 | 42 | function realpathSync (p, cache) { 43 | if (ok) { 44 | return origRealpathSync(p, cache) 45 | } 46 | 47 | try { 48 | return origRealpathSync(p, cache) 49 | } catch (er) { 50 | if (newError(er)) { 51 | return old.realpathSync(p, cache) 52 | } else { 53 | throw er 54 | } 55 | } 56 | } 57 | 58 | function monkeypatch () { 59 | fs.realpath = realpath 60 | fs.realpathSync = realpathSync 61 | } 62 | 63 | function unmonkeypatch () { 64 | fs.realpath = origRealpath 65 | fs.realpathSync = origRealpathSync 66 | } 67 | -------------------------------------------------------------------------------- /node_modules/fs.realpath/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fs.realpath", 3 | "version": "1.0.0", 4 | "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", 5 | "main": "index.js", 6 | "dependencies": {}, 7 | "devDependencies": {}, 8 | "scripts": { 9 | "test": "tap test/*.js --cov" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/isaacs/fs.realpath.git" 14 | }, 15 | "keywords": [ 16 | "realpath", 17 | "fs", 18 | "polyfill" 19 | ], 20 | "author": "Isaac Z. Schlueter (http://blog.izs.me/)", 21 | "license": "ISC", 22 | "files": [ 23 | "old.js", 24 | "index.js" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /node_modules/glob/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | 17 | ## Glob Logo 18 | 19 | Glob's logo created by Tanya Brassie , licensed 20 | under a Creative Commons Attribution-ShareAlike 4.0 International License 21 | https://creativecommons.org/licenses/by-sa/4.0/ 22 | -------------------------------------------------------------------------------- /node_modules/glob/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Isaac Z. Schlueter (http://blog.izs.me/)", 3 | "name": "glob", 4 | "description": "a little globber", 5 | "version": "7.2.3", 6 | "publishConfig": { 7 | "tag": "v7-legacy" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git://github.com/isaacs/node-glob.git" 12 | }, 13 | "main": "glob.js", 14 | "files": [ 15 | "glob.js", 16 | "sync.js", 17 | "common.js" 18 | ], 19 | "engines": { 20 | "node": "*" 21 | }, 22 | "dependencies": { 23 | "fs.realpath": "^1.0.0", 24 | "inflight": "^1.0.4", 25 | "inherits": "2", 26 | "minimatch": "^3.1.1", 27 | "once": "^1.3.0", 28 | "path-is-absolute": "^1.0.0" 29 | }, 30 | "devDependencies": { 31 | "memfs": "^3.2.0", 32 | "mkdirp": "0", 33 | "rimraf": "^2.2.8", 34 | "tap": "^15.0.6", 35 | "tick": "0.0.6" 36 | }, 37 | "tap": { 38 | "before": "test/00-setup.js", 39 | "after": "test/zz-cleanup.js", 40 | "jobs": 1 41 | }, 42 | "scripts": { 43 | "prepublish": "npm run benchclean", 44 | "profclean": "rm -f v8.log profile.txt", 45 | "test": "tap", 46 | "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", 47 | "bench": "bash benchmark.sh", 48 | "prof": "bash prof.sh && cat profile.txt", 49 | "benchclean": "node benchclean.js" 50 | }, 51 | "license": "ISC", 52 | "funding": { 53 | "url": "https://github.com/sponsors/isaacs" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /node_modules/has-flag/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = (flag, argv) => { 3 | argv = argv || process.argv; 4 | const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); 5 | const pos = argv.indexOf(prefix + flag); 6 | const terminatorPos = argv.indexOf('--'); 7 | return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); 8 | }; 9 | -------------------------------------------------------------------------------- /node_modules/has-flag/license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /node_modules/has-flag/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "has-flag", 3 | "version": "3.0.0", 4 | "description": "Check if argv has a specific flag", 5 | "license": "MIT", 6 | "repository": "sindresorhus/has-flag", 7 | "author": { 8 | "name": "Sindre Sorhus", 9 | "email": "sindresorhus@gmail.com", 10 | "url": "sindresorhus.com" 11 | }, 12 | "engines": { 13 | "node": ">=4" 14 | }, 15 | "scripts": { 16 | "test": "xo && ava" 17 | }, 18 | "files": [ 19 | "index.js" 20 | ], 21 | "keywords": [ 22 | "has", 23 | "check", 24 | "detect", 25 | "contains", 26 | "find", 27 | "flag", 28 | "cli", 29 | "command-line", 30 | "argv", 31 | "process", 32 | "arg", 33 | "args", 34 | "argument", 35 | "arguments", 36 | "getopt", 37 | "minimist", 38 | "optimist" 39 | ], 40 | "devDependencies": { 41 | "ava": "*", 42 | "xo": "*" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /node_modules/has-flag/readme.md: -------------------------------------------------------------------------------- 1 | # has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag) 2 | 3 | > Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag 4 | 5 | Correctly stops looking after an `--` argument terminator. 6 | 7 | 8 | ## Install 9 | 10 | ``` 11 | $ npm install has-flag 12 | ``` 13 | 14 | 15 | ## Usage 16 | 17 | ```js 18 | // foo.js 19 | const hasFlag = require('has-flag'); 20 | 21 | hasFlag('unicorn'); 22 | //=> true 23 | 24 | hasFlag('--unicorn'); 25 | //=> true 26 | 27 | hasFlag('f'); 28 | //=> true 29 | 30 | hasFlag('-f'); 31 | //=> true 32 | 33 | hasFlag('foo=bar'); 34 | //=> true 35 | 36 | hasFlag('foo'); 37 | //=> false 38 | 39 | hasFlag('rainbow'); 40 | //=> false 41 | ``` 42 | 43 | ``` 44 | $ node foo.js -f --unicorn --foo=bar -- --rainbow 45 | ``` 46 | 47 | 48 | ## API 49 | 50 | ### hasFlag(flag, [argv]) 51 | 52 | Returns a boolean for whether the flag exists. 53 | 54 | #### flag 55 | 56 | Type: `string` 57 | 58 | CLI flag to look for. The `--` prefix is optional. 59 | 60 | #### argv 61 | 62 | Type: `string[]`
63 | Default: `process.argv` 64 | 65 | CLI arguments. 66 | 67 | 68 | ## License 69 | 70 | MIT © [Sindre Sorhus](https://sindresorhus.com) 71 | -------------------------------------------------------------------------------- /node_modules/inflight/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/inflight/README.md: -------------------------------------------------------------------------------- 1 | # inflight 2 | 3 | Add callbacks to requests in flight to avoid async duplication 4 | 5 | ## USAGE 6 | 7 | ```javascript 8 | var inflight = require('inflight') 9 | 10 | // some request that does some stuff 11 | function req(key, callback) { 12 | // key is any random string. like a url or filename or whatever. 13 | // 14 | // will return either a falsey value, indicating that the 15 | // request for this key is already in flight, or a new callback 16 | // which when called will call all callbacks passed to inflightk 17 | // with the same key 18 | callback = inflight(key, callback) 19 | 20 | // If we got a falsey value back, then there's already a req going 21 | if (!callback) return 22 | 23 | // this is where you'd fetch the url or whatever 24 | // callback is also once()-ified, so it can safely be assigned 25 | // to multiple events etc. First call wins. 26 | setTimeout(function() { 27 | callback(null, key) 28 | }, 100) 29 | } 30 | 31 | // only assigns a single setTimeout 32 | // when it dings, all cbs get called 33 | req('foo', cb1) 34 | req('foo', cb2) 35 | req('foo', cb3) 36 | req('foo', cb4) 37 | ``` 38 | -------------------------------------------------------------------------------- /node_modules/inflight/inflight.js: -------------------------------------------------------------------------------- 1 | var wrappy = require('wrappy') 2 | var reqs = Object.create(null) 3 | var once = require('once') 4 | 5 | module.exports = wrappy(inflight) 6 | 7 | function inflight (key, cb) { 8 | if (reqs[key]) { 9 | reqs[key].push(cb) 10 | return null 11 | } else { 12 | reqs[key] = [cb] 13 | return makeres(key) 14 | } 15 | } 16 | 17 | function makeres (key) { 18 | return once(function RES () { 19 | var cbs = reqs[key] 20 | var len = cbs.length 21 | var args = slice(arguments) 22 | 23 | // XXX It's somewhat ambiguous whether a new callback added in this 24 | // pass should be queued for later execution if something in the 25 | // list of callbacks throws, or if it should just be discarded. 26 | // However, it's such an edge case that it hardly matters, and either 27 | // choice is likely as surprising as the other. 28 | // As it happens, we do go ahead and schedule it for later execution. 29 | try { 30 | for (var i = 0; i < len; i++) { 31 | cbs[i].apply(null, args) 32 | } 33 | } finally { 34 | if (cbs.length > len) { 35 | // added more in the interim. 36 | // de-zalgo, just in case, but don't call again. 37 | cbs.splice(0, len) 38 | process.nextTick(function () { 39 | RES.apply(null, args) 40 | }) 41 | } else { 42 | delete reqs[key] 43 | } 44 | } 45 | }) 46 | } 47 | 48 | function slice (args) { 49 | var length = args.length 50 | var array = [] 51 | 52 | for (var i = 0; i < length; i++) array[i] = args[i] 53 | return array 54 | } 55 | -------------------------------------------------------------------------------- /node_modules/inflight/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inflight", 3 | "version": "1.0.6", 4 | "description": "Add callbacks to requests in flight to avoid async duplication", 5 | "main": "inflight.js", 6 | "files": [ 7 | "inflight.js" 8 | ], 9 | "dependencies": { 10 | "once": "^1.3.0", 11 | "wrappy": "1" 12 | }, 13 | "devDependencies": { 14 | "tap": "^7.1.2" 15 | }, 16 | "scripts": { 17 | "test": "tap test.js --100" 18 | }, 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/npm/inflight.git" 22 | }, 23 | "author": "Isaac Z. Schlueter (http://blog.izs.me/)", 24 | "bugs": { 25 | "url": "https://github.com/isaacs/inflight/issues" 26 | }, 27 | "homepage": "https://github.com/isaacs/inflight", 28 | "license": "ISC" 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/inherits/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /node_modules/inherits/README.md: -------------------------------------------------------------------------------- 1 | Browser-friendly inheritance fully compatible with standard node.js 2 | [inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). 3 | 4 | This package exports standard `inherits` from node.js `util` module in 5 | node environment, but also provides alternative browser-friendly 6 | implementation through [browser 7 | field](https://gist.github.com/shtylman/4339901). Alternative 8 | implementation is a literal copy of standard one located in standalone 9 | module to avoid requiring of `util`. It also has a shim for old 10 | browsers with no `Object.create` support. 11 | 12 | While keeping you sure you are using standard `inherits` 13 | implementation in node.js environment, it allows bundlers such as 14 | [browserify](https://github.com/substack/node-browserify) to not 15 | include full `util` package to your client code if all you need is 16 | just `inherits` function. It worth, because browser shim for `util` 17 | package is large and `inherits` is often the single function you need 18 | from it. 19 | 20 | It's recommended to use this package instead of 21 | `require('util').inherits` for any code that has chances to be used 22 | not only in node.js but in browser too. 23 | 24 | ## usage 25 | 26 | ```js 27 | var inherits = require('inherits'); 28 | // then use exactly as the standard one 29 | ``` 30 | 31 | ## note on version ~1.0 32 | 33 | Version ~1.0 had completely different motivation and is not compatible 34 | neither with 2.0 nor with standard node.js `inherits`. 35 | 36 | If you are using version ~1.0 and planning to switch to ~2.0, be 37 | careful: 38 | 39 | * new version uses `super_` instead of `super` for referencing 40 | superclass 41 | * new version overwrites current prototype while old one preserves any 42 | existing fields on it 43 | -------------------------------------------------------------------------------- /node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | try { 2 | var util = require('util'); 3 | /* istanbul ignore next */ 4 | if (typeof util.inherits !== 'function') throw ''; 5 | module.exports = util.inherits; 6 | } catch (e) { 7 | /* istanbul ignore next */ 8 | module.exports = require('./inherits_browser.js'); 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/inherits/inherits_browser.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.create === 'function') { 2 | // implementation from standard node.js 'util' module 3 | module.exports = function inherits(ctor, superCtor) { 4 | if (superCtor) { 5 | ctor.super_ = superCtor 6 | ctor.prototype = Object.create(superCtor.prototype, { 7 | constructor: { 8 | value: ctor, 9 | enumerable: false, 10 | writable: true, 11 | configurable: true 12 | } 13 | }) 14 | } 15 | }; 16 | } else { 17 | // old school shim for old browsers 18 | module.exports = function inherits(ctor, superCtor) { 19 | if (superCtor) { 20 | ctor.super_ = superCtor 21 | var TempCtor = function () {} 22 | TempCtor.prototype = superCtor.prototype 23 | ctor.prototype = new TempCtor() 24 | ctor.prototype.constructor = ctor 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /node_modules/inherits/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inherits", 3 | "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", 4 | "version": "2.0.4", 5 | "keywords": [ 6 | "inheritance", 7 | "class", 8 | "klass", 9 | "oop", 10 | "object-oriented", 11 | "inherits", 12 | "browser", 13 | "browserify" 14 | ], 15 | "main": "./inherits.js", 16 | "browser": "./inherits_browser.js", 17 | "repository": "git://github.com/isaacs/inherits", 18 | "license": "ISC", 19 | "scripts": { 20 | "test": "tap" 21 | }, 22 | "devDependencies": { 23 | "tap": "^14.2.4" 24 | }, 25 | "files": [ 26 | "inherits.js", 27 | "inherits_browser.js" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/minimatch/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/minimatch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Isaac Z. Schlueter (http://blog.izs.me)", 3 | "name": "minimatch", 4 | "description": "a glob matcher in javascript", 5 | "version": "3.1.2", 6 | "publishConfig": { 7 | "tag": "v3-legacy" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git://github.com/isaacs/minimatch.git" 12 | }, 13 | "main": "minimatch.js", 14 | "scripts": { 15 | "test": "tap", 16 | "preversion": "npm test", 17 | "postversion": "npm publish", 18 | "postpublish": "git push origin --all; git push origin --tags" 19 | }, 20 | "engines": { 21 | "node": "*" 22 | }, 23 | "dependencies": { 24 | "brace-expansion": "^1.1.7" 25 | }, 26 | "devDependencies": { 27 | "tap": "^15.1.6" 28 | }, 29 | "license": "ISC", 30 | "files": [ 31 | "minimatch.js" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /node_modules/once/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/once/README.md: -------------------------------------------------------------------------------- 1 | # once 2 | 3 | Only call a function once. 4 | 5 | ## usage 6 | 7 | ```javascript 8 | var once = require('once') 9 | 10 | function load (file, cb) { 11 | cb = once(cb) 12 | loader.load('file') 13 | loader.once('load', cb) 14 | loader.once('error', cb) 15 | } 16 | ``` 17 | 18 | Or add to the Function.prototype in a responsible way: 19 | 20 | ```javascript 21 | // only has to be done once 22 | require('once').proto() 23 | 24 | function load (file, cb) { 25 | cb = cb.once() 26 | loader.load('file') 27 | loader.once('load', cb) 28 | loader.once('error', cb) 29 | } 30 | ``` 31 | 32 | Ironically, the prototype feature makes this module twice as 33 | complicated as necessary. 34 | 35 | To check whether you function has been called, use `fn.called`. Once the 36 | function is called for the first time the return value of the original 37 | function is saved in `fn.value` and subsequent calls will continue to 38 | return this value. 39 | 40 | ```javascript 41 | var once = require('once') 42 | 43 | function load (cb) { 44 | cb = once(cb) 45 | var stream = createStream() 46 | stream.once('data', cb) 47 | stream.once('end', function () { 48 | if (!cb.called) cb(new Error('not found')) 49 | }) 50 | } 51 | ``` 52 | 53 | ## `once.strict(func)` 54 | 55 | Throw an error if the function is called twice. 56 | 57 | Some functions are expected to be called only once. Using `once` for them would 58 | potentially hide logical errors. 59 | 60 | In the example below, the `greet` function has to call the callback only once: 61 | 62 | ```javascript 63 | function greet (name, cb) { 64 | // return is missing from the if statement 65 | // when no name is passed, the callback is called twice 66 | if (!name) cb('Hello anonymous') 67 | cb('Hello ' + name) 68 | } 69 | 70 | function log (msg) { 71 | console.log(msg) 72 | } 73 | 74 | // this will print 'Hello anonymous' but the logical error will be missed 75 | greet(null, once(msg)) 76 | 77 | // once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time 78 | greet(null, once.strict(msg)) 79 | ``` 80 | -------------------------------------------------------------------------------- /node_modules/once/once.js: -------------------------------------------------------------------------------- 1 | var wrappy = require('wrappy') 2 | module.exports = wrappy(once) 3 | module.exports.strict = wrappy(onceStrict) 4 | 5 | once.proto = once(function () { 6 | Object.defineProperty(Function.prototype, 'once', { 7 | value: function () { 8 | return once(this) 9 | }, 10 | configurable: true 11 | }) 12 | 13 | Object.defineProperty(Function.prototype, 'onceStrict', { 14 | value: function () { 15 | return onceStrict(this) 16 | }, 17 | configurable: true 18 | }) 19 | }) 20 | 21 | function once (fn) { 22 | var f = function () { 23 | if (f.called) return f.value 24 | f.called = true 25 | return f.value = fn.apply(this, arguments) 26 | } 27 | f.called = false 28 | return f 29 | } 30 | 31 | function onceStrict (fn) { 32 | var f = function () { 33 | if (f.called) 34 | throw new Error(f.onceError) 35 | f.called = true 36 | return f.value = fn.apply(this, arguments) 37 | } 38 | var name = fn.name || 'Function wrapped with `once`' 39 | f.onceError = name + " shouldn't be called more than once" 40 | f.called = false 41 | return f 42 | } 43 | -------------------------------------------------------------------------------- /node_modules/once/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "once", 3 | "version": "1.4.0", 4 | "description": "Run a function exactly one time", 5 | "main": "once.js", 6 | "directories": { 7 | "test": "test" 8 | }, 9 | "dependencies": { 10 | "wrappy": "1" 11 | }, 12 | "devDependencies": { 13 | "tap": "^7.0.1" 14 | }, 15 | "scripts": { 16 | "test": "tap test/*.js" 17 | }, 18 | "files": [ 19 | "once.js" 20 | ], 21 | "repository": { 22 | "type": "git", 23 | "url": "git://github.com/isaacs/once" 24 | }, 25 | "keywords": [ 26 | "once", 27 | "function", 28 | "one", 29 | "single" 30 | ], 31 | "author": "Isaac Z. Schlueter (http://blog.izs.me/)", 32 | "license": "ISC" 33 | } 34 | -------------------------------------------------------------------------------- /node_modules/path-is-absolute/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function posix(path) { 4 | return path.charAt(0) === '/'; 5 | } 6 | 7 | function win32(path) { 8 | // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 9 | var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; 10 | var result = splitDeviceRe.exec(path); 11 | var device = result[1] || ''; 12 | var isUnc = Boolean(device && device.charAt(1) !== ':'); 13 | 14 | // UNC paths are always absolute 15 | return Boolean(result[2] || isUnc); 16 | } 17 | 18 | module.exports = process.platform === 'win32' ? win32 : posix; 19 | module.exports.posix = posix; 20 | module.exports.win32 = win32; 21 | -------------------------------------------------------------------------------- /node_modules/path-is-absolute/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/path-is-absolute/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "path-is-absolute", 3 | "version": "1.0.1", 4 | "description": "Node.js 0.12 path.isAbsolute() ponyfill", 5 | "license": "MIT", 6 | "repository": "sindresorhus/path-is-absolute", 7 | "author": { 8 | "name": "Sindre Sorhus", 9 | "email": "sindresorhus@gmail.com", 10 | "url": "sindresorhus.com" 11 | }, 12 | "engines": { 13 | "node": ">=0.10.0" 14 | }, 15 | "scripts": { 16 | "test": "xo && node test.js" 17 | }, 18 | "files": [ 19 | "index.js" 20 | ], 21 | "keywords": [ 22 | "path", 23 | "paths", 24 | "file", 25 | "dir", 26 | "absolute", 27 | "isabsolute", 28 | "is-absolute", 29 | "built-in", 30 | "util", 31 | "utils", 32 | "core", 33 | "ponyfill", 34 | "polyfill", 35 | "shim", 36 | "is", 37 | "detect", 38 | "check" 39 | ], 40 | "devDependencies": { 41 | "xo": "^0.16.0" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /node_modules/path-is-absolute/readme.md: -------------------------------------------------------------------------------- 1 | # path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) 2 | 3 | > Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install --save path-is-absolute 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | const pathIsAbsolute = require('path-is-absolute'); 17 | 18 | // Running on Linux 19 | pathIsAbsolute('/home/foo'); 20 | //=> true 21 | pathIsAbsolute('C:/Users/foo'); 22 | //=> false 23 | 24 | // Running on Windows 25 | pathIsAbsolute('C:/Users/foo'); 26 | //=> true 27 | pathIsAbsolute('/home/foo'); 28 | //=> false 29 | 30 | // Running on any OS 31 | pathIsAbsolute.posix('/home/foo'); 32 | //=> true 33 | pathIsAbsolute.posix('C:/Users/foo'); 34 | //=> false 35 | pathIsAbsolute.win32('C:/Users/foo'); 36 | //=> true 37 | pathIsAbsolute.win32('/home/foo'); 38 | //=> false 39 | ``` 40 | 41 | 42 | ## API 43 | 44 | See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). 45 | 46 | ### pathIsAbsolute(path) 47 | 48 | ### pathIsAbsolute.posix(path) 49 | 50 | POSIX specific version. 51 | 52 | ### pathIsAbsolute.win32(path) 53 | 54 | Windows specific version. 55 | 56 | 57 | ## License 58 | 59 | MIT © [Sindre Sorhus](https://sindresorhus.com) 60 | -------------------------------------------------------------------------------- /node_modules/supports-color/browser.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = { 3 | stdout: false, 4 | stderr: false 5 | }; 6 | -------------------------------------------------------------------------------- /node_modules/supports-color/license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /node_modules/supports-color/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "supports-color", 3 | "version": "5.5.0", 4 | "description": "Detect whether a terminal supports color", 5 | "license": "MIT", 6 | "repository": "chalk/supports-color", 7 | "author": { 8 | "name": "Sindre Sorhus", 9 | "email": "sindresorhus@gmail.com", 10 | "url": "sindresorhus.com" 11 | }, 12 | "engines": { 13 | "node": ">=4" 14 | }, 15 | "scripts": { 16 | "test": "xo && ava" 17 | }, 18 | "files": [ 19 | "index.js", 20 | "browser.js" 21 | ], 22 | "keywords": [ 23 | "color", 24 | "colour", 25 | "colors", 26 | "terminal", 27 | "console", 28 | "cli", 29 | "ansi", 30 | "styles", 31 | "tty", 32 | "rgb", 33 | "256", 34 | "shell", 35 | "xterm", 36 | "command-line", 37 | "support", 38 | "supports", 39 | "capability", 40 | "detect", 41 | "truecolor", 42 | "16m" 43 | ], 44 | "dependencies": { 45 | "has-flag": "^3.0.0" 46 | }, 47 | "devDependencies": { 48 | "ava": "^0.25.0", 49 | "import-fresh": "^2.0.0", 50 | "xo": "^0.20.0" 51 | }, 52 | "browser": "browser.js" 53 | } 54 | -------------------------------------------------------------------------------- /node_modules/supports-color/readme.md: -------------------------------------------------------------------------------- 1 | # supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) 2 | 3 | > Detect whether a terminal supports color 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install supports-color 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | const supportsColor = require('supports-color'); 17 | 18 | if (supportsColor.stdout) { 19 | console.log('Terminal stdout supports color'); 20 | } 21 | 22 | if (supportsColor.stdout.has256) { 23 | console.log('Terminal stdout supports 256 colors'); 24 | } 25 | 26 | if (supportsColor.stderr.has16m) { 27 | console.log('Terminal stderr supports 16 million colors (truecolor)'); 28 | } 29 | ``` 30 | 31 | 32 | ## API 33 | 34 | Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported. 35 | 36 | The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag: 37 | 38 | - `.level = 1` and `.hasBasic = true`: Basic color support (16 colors) 39 | - `.level = 2` and `.has256 = true`: 256 color support 40 | - `.level = 3` and `.has16m = true`: Truecolor support (16 million colors) 41 | 42 | 43 | ## Info 44 | 45 | It obeys the `--color` and `--no-color` CLI flags. 46 | 47 | Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. 48 | 49 | Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. 50 | 51 | 52 | ## Related 53 | 54 | - [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module 55 | - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right 56 | 57 | 58 | ## Maintainers 59 | 60 | - [Sindre Sorhus](https://github.com/sindresorhus) 61 | - [Josh Junon](https://github.com/qix-) 62 | 63 | 64 | ## License 65 | 66 | MIT 67 | -------------------------------------------------------------------------------- /node_modules/vscode-oniguruma/LICENSE.txt: -------------------------------------------------------------------------------- 1 | VS Code Oniguruma Bindings 2 | 3 | MIT License 4 | 5 | Copyright (c) Microsoft Corporation. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/vscode-oniguruma/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vscode-oniguruma", 3 | "version": "1.7.0", 4 | "description": "VSCode oniguruma bindings", 5 | "author": { 6 | "name": "Microsoft Corporation" 7 | }, 8 | "main": "release/main.js", 9 | "typings": "main.d.ts", 10 | "repository": { 11 | "type": "git", 12 | "url": "https://github.com/microsoft/vscode-oniguruma" 13 | }, 14 | "license": "MIT", 15 | "bugs": { 16 | "url": "https://github.com/microsoft/vscode-oniguruma/issues" 17 | }, 18 | "scripts": { 19 | "test": "mocha --ui=tdd ./out/test/index.test.js", 20 | "build-onig": "cd deps/oniguruma && autoreconf -vfi && emconfigure ./configure && make clean && emmake make", 21 | "build-wasm": "./scripts/build.sh", 22 | "build-tsc": "tsc -p tsconfig.json", 23 | "watch-tsc": "tsc -w -p tsconfig.json", 24 | "package": "npm run build-tsc && webpack && node ./scripts/cp ./out/onig.wasm ./release/onig.wasm", 25 | "prepublishOnly": "npm run package" 26 | }, 27 | "devDependencies": { 28 | "@types/mocha": "^10.0.0", 29 | "@types/node": "^18.11.9", 30 | "mocha": "^10.1.0", 31 | "typescript": "^4.9.3", 32 | "webpack": "^5.75.0", 33 | "webpack-cli": "^5.0.0" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /node_modules/vscode-oniguruma/release/onig.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshuafontany/VSCode-TW5-Syntax/17df85daa4f9cacdaeb264253dd6632ad3099ae7/node_modules/vscode-oniguruma/release/onig.wasm -------------------------------------------------------------------------------- /node_modules/vscode-textmate/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | name: CI 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v2 11 | - uses: actions/setup-node@v2 12 | with: 13 | node-version: 14 14 | - run: npm ci 15 | - run: npm run compile 16 | - run: npm test 17 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/.github/workflows/rich-navigation.yml: -------------------------------------------------------------------------------- 1 | name: "Rich Navigation Indexing" 2 | on: 3 | workflow_dispatch: 4 | pull_request: 5 | push: 6 | branches: 7 | - main 8 | tags: 9 | - 'v[0-9]+.[0-9]+.[0-9]+' 10 | 11 | jobs: 12 | richnav: 13 | runs-on: windows-latest 14 | steps: 15 | - uses: actions/checkout@v2 16 | 17 | - uses: actions/setup-node@v2 18 | with: 19 | node-version: 14 20 | 21 | - name: Install dependencies 22 | run: npm install 23 | 24 | - uses: microsoft/RichCodeNavIndexer@v0.1 25 | with: 26 | languages: typescript 27 | repo-token: ${{ secrets.GITHUB_TOKEN }} 28 | typescriptVersion: 0.6.0-next.19 29 | configFiles: .lsifrc.json 30 | continue-on-error: true 31 | 32 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/.lsifrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "./tsconfig.json", 3 | "out": "vscode-textmate.lsif", 4 | "source": "./package.json", 5 | "package": "./package.json" 6 | } -------------------------------------------------------------------------------- /node_modules/vscode-textmate/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Microsoft Corporation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vscode-textmate", 3 | "version": "7.0.4", 4 | "description": "VSCode TextMate grammar helpers", 5 | "author": { 6 | "name": "Microsoft Corporation" 7 | }, 8 | "main": "./release/main.js", 9 | "typings": "./release/main.d.ts", 10 | "repository": { 11 | "type": "git", 12 | "url": "https://github.com/microsoft/vscode-textmate" 13 | }, 14 | "license": "MIT", 15 | "bugs": { 16 | "url": "https://github.com/microsoft/vscode-textmate/issues" 17 | }, 18 | "scripts": { 19 | "watch": "tsc --watch", 20 | "compile": "tsc", 21 | "test": "mocha --ui=tdd ./out/tests/all.test.js", 22 | "benchmark": "node benchmark/benchmark.js", 23 | "inspect": "node out/tests/inspect.js", 24 | "tmconvert": "node scripts/tmconvert.js", 25 | "version": "npm run compile && npm run test && node scripts/release.js", 26 | "postversion": "git push && git push --tags", 27 | "prepublishOnly": "tsc && webpack --progress && node scripts/release.js" 28 | }, 29 | "devDependencies": { 30 | "@types/node": "^16.6.1", 31 | "@types/mocha": "^9.1.0", 32 | "mocha": "^9.2.2", 33 | "typescript": "^4.3.5", 34 | "vscode-oniguruma": "^1.5.1", 35 | "webpack": "^5.50.0", 36 | "webpack-cli": "^4.8.0" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/debug.d.ts: -------------------------------------------------------------------------------- 1 | export declare const DebugFlags: { 2 | InDebugMode: boolean; 3 | }; 4 | export declare const UseOnigurumaFindOptions = false; 5 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/encodedTokenAttributes.d.ts: -------------------------------------------------------------------------------- 1 | import { FontStyle } from "./theme"; 2 | export declare type EncodedTokenAttributes = number; 3 | export declare namespace EncodedTokenAttributes { 4 | function toBinaryStr(encodedTokenAttributes: EncodedTokenAttributes): string; 5 | function print(encodedTokenAttributes: EncodedTokenAttributes): void; 6 | function getLanguageId(encodedTokenAttributes: EncodedTokenAttributes): number; 7 | function getTokenType(encodedTokenAttributes: EncodedTokenAttributes): StandardTokenType; 8 | function containsBalancedBrackets(encodedTokenAttributes: EncodedTokenAttributes): boolean; 9 | function getFontStyle(encodedTokenAttributes: EncodedTokenAttributes): number; 10 | function getForeground(encodedTokenAttributes: EncodedTokenAttributes): number; 11 | function getBackground(encodedTokenAttributes: EncodedTokenAttributes): number; 12 | /** 13 | * Updates the fields in `metadata`. 14 | * A value of `0`, `NotSet` or `null` indicates that the corresponding field should be left as is. 15 | */ 16 | function set(encodedTokenAttributes: EncodedTokenAttributes, languageId: number, tokenType: OptionalStandardTokenType, containsBalancedBrackets: boolean | null, fontStyle: FontStyle, foreground: number, background: number): number; 17 | } 18 | export declare const enum StandardTokenType { 19 | Other = 0, 20 | Comment = 1, 21 | String = 2, 22 | RegEx = 3 23 | } 24 | export declare function toOptionalTokenType(standardType: StandardTokenType): OptionalStandardTokenType; 25 | export declare const enum OptionalStandardTokenType { 26 | Other = 0, 27 | Comment = 1, 28 | String = 2, 29 | RegEx = 3, 30 | NotSet = 8 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/grammar/basicScopesAttributeProvider.d.ts: -------------------------------------------------------------------------------- 1 | import { OptionalStandardTokenType } from "../encodedTokenAttributes"; 2 | import { IEmbeddedLanguagesMap } from "../main"; 3 | import { ScopeName } from "../theme"; 4 | export declare class BasicScopeAttributes { 5 | readonly languageId: number; 6 | readonly tokenType: OptionalStandardTokenType; 7 | constructor(languageId: number, tokenType: OptionalStandardTokenType); 8 | } 9 | export declare class BasicScopeAttributesProvider { 10 | private readonly _defaultAttributes; 11 | private readonly _embeddedLanguagesMatcher; 12 | constructor(initialLanguageId: number, embeddedLanguages: IEmbeddedLanguagesMap | null); 13 | getDefaultAttributes(): BasicScopeAttributes; 14 | getBasicScopeAttributes(scopeName: ScopeName | null): BasicScopeAttributes; 15 | private static readonly _NULL_SCOPE_METADATA; 16 | private readonly _getBasicScopeAttributes; 17 | /** 18 | * Given a produced TM scope, return the language that token describes or null if unknown. 19 | * e.g. source.html => html, source.css.embedded.html => css, punctuation.definition.tag.html => null 20 | */ 21 | private _scopeToLanguage; 22 | private _toStandardTokenType; 23 | private static STANDARD_TOKEN_TYPE_REGEXP; 24 | } 25 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/grammar/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './grammar'; 2 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/grammar/tokenizeString.d.ts: -------------------------------------------------------------------------------- 1 | import type { LineTokens, StateStack } from './grammar'; 2 | import { OnigString } from '../onigLib'; 3 | import type { AttributedScopeStack, Grammar } from './grammar'; 4 | declare class TokenizeStringResult { 5 | readonly stack: StateStack; 6 | readonly stoppedEarly: boolean; 7 | constructor(stack: StateStack, stoppedEarly: boolean); 8 | } 9 | /** 10 | * Tokenize a string 11 | * @param grammar 12 | * @param lineText 13 | * @param isFirstLine 14 | * @param linePos 15 | * @param stack 16 | * @param lineTokens 17 | * @param checkWhileConditions 18 | * @param timeLimit Use `0` to indicate no time limit 19 | * @returns the StackElement or StackElement.TIME_LIMIT_REACHED if the time limit has been reached 20 | */ 21 | export declare function _tokenizeString(grammar: Grammar, lineText: OnigString, isFirstLine: boolean, linePos: number, stack: StateStack, lineTokens: LineTokens, checkWhileConditions: boolean, timeLimit: number): TokenizeStringResult; 22 | export declare class LocalStackElement { 23 | readonly scopes: AttributedScopeStack; 24 | readonly endPos: number; 25 | constructor(scopes: AttributedScopeStack, endPos: number); 26 | } 27 | export {}; 28 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/json.d.ts: -------------------------------------------------------------------------------- 1 | export interface ILocation { 2 | readonly filename: string | null; 3 | readonly line: number; 4 | readonly char: number; 5 | } 6 | export declare function parseJSON(source: string, filename: string | null, withMetadata: boolean): any; 7 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/matcher.d.ts: -------------------------------------------------------------------------------- 1 | export interface MatcherWithPriority { 2 | matcher: Matcher; 3 | priority: -1 | 0 | 1; 4 | } 5 | export interface Matcher { 6 | (matcherInput: T): boolean; 7 | } 8 | export declare function createMatchers(selector: string, matchesName: (names: string[], matcherInput: T) => boolean): MatcherWithPriority[]; 9 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/onigLib.d.ts: -------------------------------------------------------------------------------- 1 | import { OrMask } from "./utils"; 2 | export interface IOnigLib { 3 | createOnigScanner(sources: string[]): OnigScanner; 4 | createOnigString(str: string): OnigString; 5 | } 6 | export interface IOnigCaptureIndex { 7 | start: number; 8 | end: number; 9 | length: number; 10 | } 11 | export interface IOnigMatch { 12 | index: number; 13 | captureIndices: IOnigCaptureIndex[]; 14 | } 15 | export declare const enum FindOption { 16 | None = 0, 17 | /** 18 | * equivalent of ONIG_OPTION_NOT_BEGIN_STRING: (str) isn't considered as begin of string (* fail \A) 19 | */ 20 | NotBeginString = 1, 21 | /** 22 | * equivalent of ONIG_OPTION_NOT_END_STRING: (end) isn't considered as end of string (* fail \z, \Z) 23 | */ 24 | NotEndString = 2, 25 | /** 26 | * equivalent of ONIG_OPTION_NOT_BEGIN_POSITION: (start) isn't considered as start position of search (* fail \G) 27 | */ 28 | NotBeginPosition = 4, 29 | /** 30 | * used for debugging purposes. 31 | */ 32 | DebugCall = 8 33 | } 34 | export interface OnigScanner { 35 | findNextMatchSync(string: string | OnigString, startPosition: number, options: OrMask): IOnigMatch | null; 36 | dispose?(): void; 37 | } 38 | export interface OnigString { 39 | readonly content: string; 40 | dispose?(): void; 41 | } 42 | export declare function disposeOnigString(str: OnigString): void; 43 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/parseRawGrammar.d.ts: -------------------------------------------------------------------------------- 1 | import { IRawGrammar } from './rawGrammar'; 2 | export declare function parseRawGrammar(content: string, filePath?: string | null): IRawGrammar; 3 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/plist.d.ts: -------------------------------------------------------------------------------- 1 | export declare function parseWithLocation(content: string, filename: string | null, locationKeyName: string | null): any; 2 | /** 3 | * A very fast plist parser 4 | */ 5 | export declare function parsePLIST(content: string): any; 6 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/rawGrammar.d.ts: -------------------------------------------------------------------------------- 1 | import { RuleId } from "./rule"; 2 | export interface ILocation { 3 | readonly filename: string; 4 | readonly line: number; 5 | readonly char: number; 6 | } 7 | export interface ILocatable { 8 | readonly $vscodeTextmateLocation?: ILocation; 9 | } 10 | export interface IRawGrammar extends ILocatable { 11 | repository: IRawRepository; 12 | readonly scopeName: string; 13 | readonly patterns: IRawRule[]; 14 | readonly injections?: { 15 | [expression: string]: IRawRule; 16 | }; 17 | readonly injectionSelector?: string; 18 | readonly fileTypes?: string[]; 19 | readonly name?: string; 20 | readonly firstLineMatch?: string; 21 | } 22 | export interface IRawRepositoryMap { 23 | [name: string]: IRawRule; 24 | $self: IRawRule; 25 | $base: IRawRule; 26 | } 27 | export declare type IRawRepository = IRawRepositoryMap & ILocatable; 28 | export interface IRawRule extends ILocatable { 29 | id?: RuleId; 30 | readonly include?: string; 31 | readonly name?: string; 32 | readonly contentName?: string; 33 | readonly match?: string; 34 | readonly captures?: IRawCaptures; 35 | readonly begin?: string; 36 | readonly beginCaptures?: IRawCaptures; 37 | readonly end?: string; 38 | readonly endCaptures?: IRawCaptures; 39 | readonly while?: string; 40 | readonly whileCaptures?: IRawCaptures; 41 | readonly patterns?: IRawRule[]; 42 | readonly repository?: IRawRepository; 43 | readonly applyEndPatternLast?: boolean; 44 | } 45 | export interface IRawCapturesMap { 46 | [captureId: string]: IRawRule; 47 | } 48 | export declare type IRawCaptures = IRawCapturesMap & ILocatable; 49 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/registry.d.ts: -------------------------------------------------------------------------------- 1 | import { BalancedBracketSelectors, IGrammarRepository, IThemeProvider } from './grammar'; 2 | import { IRawGrammar } from './rawGrammar'; 3 | import { IGrammar, IEmbeddedLanguagesMap, ITokenTypeMap } from './main'; 4 | import { ScopeStack, Theme, StyleAttributes, ScopeName } from './theme'; 5 | import { IOnigLib } from './onigLib'; 6 | export declare class SyncRegistry implements IGrammarRepository, IThemeProvider { 7 | private readonly _onigLibPromise; 8 | private readonly _grammars; 9 | private readonly _rawGrammars; 10 | private readonly _injectionGrammars; 11 | private _theme; 12 | constructor(theme: Theme, _onigLibPromise: Promise); 13 | dispose(): void; 14 | setTheme(theme: Theme): void; 15 | getColorMap(): string[]; 16 | /** 17 | * Add `grammar` to registry and return a list of referenced scope names 18 | */ 19 | addGrammar(grammar: IRawGrammar, injectionScopeNames?: ScopeName[]): void; 20 | /** 21 | * Lookup a raw grammar. 22 | */ 23 | lookup(scopeName: ScopeName): IRawGrammar | undefined; 24 | /** 25 | * Returns the injections for the given grammar 26 | */ 27 | injections(targetScope: ScopeName): ScopeName[]; 28 | /** 29 | * Get the default theme settings 30 | */ 31 | getDefaults(): StyleAttributes; 32 | /** 33 | * Match a scope in the theme. 34 | */ 35 | themeMatch(scopePath: ScopeStack): StyleAttributes | null; 36 | /** 37 | * Lookup a grammar. 38 | */ 39 | grammarForScopeName(scopeName: ScopeName, initialLanguage: number, embeddedLanguages: IEmbeddedLanguagesMap | null, tokenTypes: ITokenTypeMap | null, balancedBracketSelectors: BalancedBracketSelectors | null): Promise; 40 | } 41 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/tests/all.test.d.ts: -------------------------------------------------------------------------------- 1 | import './grammar.test'; 2 | import './json.test'; 3 | import './matcher.test'; 4 | import './themes.test'; 5 | import './tokenization.test'; 6 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/tests/grammar.test.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/tests/inspect.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/tests/json.test.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/tests/matcher.test.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/tests/onigLibs.d.ts: -------------------------------------------------------------------------------- 1 | import { IOnigLib } from '../onigLib'; 2 | export declare function getOniguruma(): Promise; 3 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/tests/resolver.d.ts: -------------------------------------------------------------------------------- 1 | import { IOnigLib } from '../onigLib'; 2 | import { RegistryOptions } from '../main'; 3 | import { IRawGrammar } from '../rawGrammar'; 4 | export interface ILanguageRegistration { 5 | id: string; 6 | extensions: string[]; 7 | filenames: string[]; 8 | } 9 | export interface IGrammarRegistration { 10 | language: string; 11 | scopeName: string; 12 | path: string; 13 | embeddedLanguages: { 14 | [scopeName: string]: string; 15 | }; 16 | grammar?: Promise; 17 | } 18 | export declare class Resolver implements RegistryOptions { 19 | readonly language2id: { 20 | [languages: string]: number; 21 | }; 22 | private _lastLanguageId; 23 | private _id2language; 24 | private readonly _grammars; 25 | private readonly _languages; 26 | readonly onigLib: Promise; 27 | constructor(grammars: IGrammarRegistration[], languages: ILanguageRegistration[], onigLibPromise: Promise); 28 | findLanguageByExtension(fileExtension: string): string | null; 29 | findLanguageByFilename(filename: string): string | null; 30 | findScopeByFilename(filename: string): string | null; 31 | findGrammarByLanguage(language: string): IGrammarRegistration; 32 | loadGrammar(scopeName: string): Promise; 33 | } 34 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/tests/themeTest.d.ts: -------------------------------------------------------------------------------- 1 | import { ThemeData } from './themes.test'; 2 | import { Resolver } from './resolver'; 3 | export declare class ThemeTest { 4 | private static _readFile; 5 | private static _normalizeNewLines; 6 | private readonly EXPECTED_FILE_PATH; 7 | private readonly tests; 8 | readonly expected: string; 9 | readonly testName: string; 10 | actual: string | null; 11 | constructor(THEMES_TEST_PATH: string, testFile: string, themeDatas: ThemeData[], resolver: Resolver); 12 | evaluate(): Promise; 13 | writeExpected(): void; 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/tests/themedTokenizer.d.ts: -------------------------------------------------------------------------------- 1 | import { IGrammar } from '../main'; 2 | export interface IThemedToken { 3 | content: string; 4 | color: string; 5 | } 6 | export declare function tokenizeWithTheme(colorMap: string[], fileContents: string, grammar: IGrammar): IThemedToken[]; 7 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/tests/themes.test.d.ts: -------------------------------------------------------------------------------- 1 | import { Registry } from '../main'; 2 | import { IRawTheme } from '../theme'; 3 | export interface ThemeData { 4 | themeName: string; 5 | theme: IRawTheme; 6 | registry: Registry; 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/tests/tokenization.test.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /node_modules/vscode-textmate/release/utils.d.ts: -------------------------------------------------------------------------------- 1 | import { IOnigCaptureIndex } from './onigLib'; 2 | export declare function clone(something: T): T; 3 | export declare function mergeObjects(target: any, ...sources: any[]): any; 4 | export declare function basename(path: string): string; 5 | export declare class RegexSource { 6 | static hasCaptures(regexSource: string | null): boolean; 7 | static replaceCaptures(regexSource: string, captureSource: string, captureIndices: IOnigCaptureIndex[]): string; 8 | } 9 | /** 10 | * A union of given const enum values. 11 | */ 12 | export declare type OrMask = number; 13 | export declare function strcmp(a: string, b: string): number; 14 | export declare function strArrCmp(a: string[] | null, b: string[] | null): number; 15 | export declare function isValidHexColor(hex: string): boolean; 16 | /** 17 | * Escapes regular expression characters in a given string 18 | */ 19 | export declare function escapeRegExpCharacters(value: string): string; 20 | export declare class CachedFn { 21 | private readonly fn; 22 | private readonly cache; 23 | constructor(fn: (key: TKey) => TValue); 24 | get(key: TKey): TValue; 25 | } 26 | export declare const performanceNow: () => number; 27 | -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/.github/workflows/nodejs.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Node.js CI 5 | 6 | on: 7 | push: 8 | tags: 9 | - '*' 10 | branches: 11 | - '*' 12 | pull_request: 13 | branches: 14 | - '*' 15 | 16 | jobs: 17 | build: 18 | 19 | runs-on: ${{ matrix.os }} 20 | 21 | strategy: 22 | matrix: 23 | node-version: [18.x] 24 | os: [ubuntu-latest, macos-latest, windows-latest] 25 | 26 | steps: 27 | - uses: actions/checkout@v3 28 | - name: Use Node.js ${{ matrix.node-version }} 29 | uses: actions/setup-node@v3 30 | with: 31 | node-version: ${{ matrix.node-version }} 32 | - run: npm ci 33 | - run: npm run build --if-present 34 | - run: npm test 35 | env: 36 | CI: true 37 | -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "trailingComma": "none", 4 | "singleQuote": true, 5 | "printWidth": 120 6 | } -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Testing 2 | 3 | Any contributions are really appreciated! :) Just make sure that all existing tests work, or if they have changed the 4 | change is meaningful. 5 | 6 | 0. `npm run build` 7 | 1. `npm run test` 8 | 9 | 2. Manually: 10 | 11 | ``` 12 | node ./dist/unit.js --grammar ./test/resources/dhall.tmLanguage.json ./test/resources/multiple.groups.test.dhall 13 | node ./dist/unit.js --grammar ./test/resources/dhall.tmLanguage.json ./test/resources/misplaced.scopes.test.dhall 14 | node ./dist/unit.js --grammar ./test/resources/dhall.tmLanguage.json ./test/resources/out.of.bounds.test.dhall 15 | node ./dist/unit.js --grammar ./test/resources/dhall.tmLanguage.json ./test/resources/s.parser.test.dhall 16 | node ./dist/unit.js --grammar ./test/resources/dhall.tmLanguage.json ./test/resources/simple.dhall 17 | node ./dist/unit.js --grammar ./test/resources/dhall.tmLanguage.json ./test/resources/successful.test.dhall 18 | node ./dist/unit.js --grammar ./test/resources/dhall.tmLanguage.json ./test/resources/unexpected.scopes.test.dhall 19 | node ./dist/unit.js --grammar ./test/resources/dhall.tmLanguage.json ./test/resources/misplaced.scopes.test.dhall 20 | 21 | node ./dist/snapshot.js --scope source.dhall -g ./test/resources/dhall.tmLanguage.json ./test/resources/snaps/simple.dhall 22 | 23 | ``` 24 | 25 | ## Packaging: 26 | ``` 27 | npm run build 28 | npm version patch 29 | npm pack 30 | npm publish 31 | ``` -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2019 PanAeon 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/common/index.d.ts: -------------------------------------------------------------------------------- 1 | import * as tm from 'vscode-textmate'; 2 | import { IGrammarConfig } from './model'; 3 | export { IGrammarConfig }; 4 | export declare function createRegistry(gs: IGrammarConfig[]): tm.Registry; 5 | export declare function createRegistryFromGrammars(grammars: Array<{ 6 | grammar: IGrammarConfig; 7 | content: string; 8 | }>): tm.Registry; 9 | export declare function loadConfiguration(config: any, scope: any, grammar: any): { 10 | grammars: IGrammarConfig[]; 11 | extensionToScope: (ext: string) => string | undefined; 12 | }; 13 | -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/common/model.d.ts: -------------------------------------------------------------------------------- 1 | export interface IGrammarConfig { 2 | path: string; 3 | language?: string; 4 | scopeName: string; 5 | embeddedLanguages?: { 6 | [scopeName: string]: string; 7 | }; 8 | tokenTypes?: { 9 | [selector: string]: string; 10 | }; 11 | injectTo?: string[]; 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/common/model.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | //# sourceMappingURL=model.js.map -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/common/model.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/common/model.ts"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/snapshot.d.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | export {}; 3 | -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/snapshot/index.d.ts: -------------------------------------------------------------------------------- 1 | import * as tm from 'vscode-textmate'; 2 | import { AnnotatedLine } from './model'; 3 | import { parseSnap, renderSnap } from './parsing'; 4 | export { parseSnap, renderSnap, AnnotatedLine }; 5 | export declare function getVSCodeTokens(registry: tm.Registry, scope: string, source: string): Promise; 6 | -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/snapshot/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.getVSCodeTokens = exports.renderSnap = exports.parseSnap = void 0; 4 | const parsing_1 = require("./parsing"); 5 | Object.defineProperty(exports, "parseSnap", { enumerable: true, get: function () { return parsing_1.parseSnap; } }); 6 | Object.defineProperty(exports, "renderSnap", { enumerable: true, get: function () { return parsing_1.renderSnap; } }); 7 | async function getVSCodeTokens(registry, scope, source) { 8 | return registry.loadGrammar(scope).then((grammar) => { 9 | if (!grammar) { 10 | throw new Error(`Could not load scope ${scope}`); 11 | } 12 | let ruleStack = null; 13 | return source.split(/\r\n|\n/).map((line, n) => { 14 | var { tokens, ruleStack: ruleStack1 } = grammar.tokenizeLine(line, ruleStack); 15 | ruleStack = ruleStack1; 16 | return { 17 | src: line, 18 | tokens: tokens 19 | }; 20 | }); 21 | }); 22 | } 23 | exports.getVSCodeTokens = getVSCodeTokens; 24 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/snapshot/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/snapshot/index.ts"],"names":[],"mappings":";;;AAEA,uCAAiD;AAExC,0FAFA,mBAAS,OAEA;AAAE,2FAFA,oBAAU,OAEA;AAEvB,KAAK,UAAU,eAAe,CAAC,QAAqB,EAAE,KAAa,EAAE,MAAc;IACxF,OAAO,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,OAA2B,EAAE,EAAE;QACtE,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,wBAAwB,KAAK,EAAE,CAAC,CAAA;QAClD,CAAC;QAED,IAAI,SAAS,GAAyB,IAAI,CAAA;QAE1C,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,IAAY,EAAE,CAAS,EAAE,EAAE;YAC7D,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;YAC7E,SAAS,GAAG,UAAU,CAAA;YAEtB,OAAsB;gBACpB,GAAG,EAAE,IAAI;gBACT,MAAM,EAAE,MAAM;aACf,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC;AAlBD,0CAkBC"} -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/snapshot/model.d.ts: -------------------------------------------------------------------------------- 1 | import { IToken } from 'vscode-textmate'; 2 | export { IToken }; 3 | export interface AnnotatedLine { 4 | src: string; 5 | tokens: [IToken]; 6 | } 7 | -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/snapshot/model.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | //# sourceMappingURL=model.js.map -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/snapshot/model.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/snapshot/model.ts"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/snapshot/parsing.d.ts: -------------------------------------------------------------------------------- 1 | import { AnnotatedLine } from './model'; 2 | export declare function parseSnap(s: string): AnnotatedLine[]; 3 | export declare function renderSnap(xs: AnnotatedLine[]): string; 4 | -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/snapshot/parsing.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.renderSnap = exports.parseSnap = void 0; 4 | function parseSnap(s) { 5 | let result = []; 6 | let ls = s.split(/\r\n|\n/); 7 | let i = 0; 8 | while (i < ls.length) { 9 | let l = ls[i]; 10 | if (l.startsWith('>')) { 11 | const src = l.substring(1); 12 | i++; 13 | let tokens = []; 14 | while (i < ls.length && ls[i].startsWith('#')) { 15 | const startIndex = ls[i].indexOf('^'); 16 | const endIndex = ls[i].indexOf(' ', startIndex); 17 | const scopes = ls[i] 18 | .substring(endIndex + 1) 19 | .split(/\s+/) 20 | .filter((x) => x !== ''); 21 | tokens.push({ 22 | startIndex: startIndex - 1, 23 | endIndex: endIndex - 1, 24 | scopes: scopes 25 | }); 26 | i++; 27 | } 28 | result.push({ 29 | src: src, 30 | tokens: tokens 31 | }); 32 | } 33 | else { 34 | i++; 35 | } 36 | } 37 | return result; 38 | } 39 | exports.parseSnap = parseSnap; 40 | function renderSnap(xs) { 41 | let result = []; 42 | xs.forEach((line) => { 43 | result.push('>' + line.src); 44 | if (line.src.trim().length > 0) { 45 | line.tokens.forEach((token) => { 46 | result.push('#' + 47 | ' '.repeat(token.startIndex) + 48 | '^'.repeat(token.endIndex - token.startIndex) + 49 | ' ' + 50 | token.scopes.join(' ')); 51 | }); 52 | } 53 | }); 54 | return result.join('\n'); 55 | } 56 | exports.renderSnap = renderSnap; 57 | //# sourceMappingURL=parsing.js.map -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/snapshot/parsing.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"parsing.js","sourceRoot":"","sources":["../../src/snapshot/parsing.ts"],"names":[],"mappings":";;;AAEA,SAAgB,SAAS,CAAC,CAAS;IACjC,IAAI,MAAM,GAAoB,EAAE,CAAA;IAChC,IAAI,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IAC3B,IAAI,CAAC,GAAG,CAAC,CAAA;IACT,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC;QACrB,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAA;QACb,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,GAAG,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;YAC1B,CAAC,EAAE,CAAA;YACH,IAAI,MAAM,GAAa,EAAE,CAAA;YACzB,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC9C,MAAM,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;gBACrC,MAAM,QAAQ,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;gBAC/C,MAAM,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC;qBACjB,SAAS,CAAC,QAAQ,GAAG,CAAC,CAAC;qBACvB,KAAK,CAAC,KAAK,CAAC;qBACZ,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;gBAC1B,MAAM,CAAC,IAAI,CAAS;oBAClB,UAAU,EAAE,UAAU,GAAG,CAAC;oBAC1B,QAAQ,EAAE,QAAQ,GAAG,CAAC;oBACtB,MAAM,EAAE,MAAM;iBACf,CAAC,CAAA;gBACF,CAAC,EAAE,CAAA;YACL,CAAC;YACD,MAAM,CAAC,IAAI,CAAgB;gBACzB,GAAG,EAAE,GAAG;gBACR,MAAM,EAAE,MAAM;aACf,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,CAAC,EAAE,CAAA;QACL,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAlCD,8BAkCC;AAED,SAAgB,UAAU,CAAC,EAAmB;IAC5C,IAAI,MAAM,GAAa,EAAE,CAAA;IACzB,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAClB,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAA;QAC3B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/B,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;gBAC5B,MAAM,CAAC,IAAI,CACT,GAAG;oBACD,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC;oBAC5B,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC;oBAC7C,GAAG;oBACH,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CACzB,CAAA;YACH,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC,CAAC,CAAA;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAjBD,gCAiBC"} -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/unit.d.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | export {}; 3 | -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/unit/index.d.ts: -------------------------------------------------------------------------------- 1 | import * as tm from 'vscode-textmate'; 2 | import { GrammarTestCase, TestFailure } from './model'; 3 | import { parseGrammarTestCase } from './parsing'; 4 | export { parseGrammarTestCase, GrammarTestCase, TestFailure, missingScopes_ }; 5 | export declare function runGrammarTestCase(registry: tm.Registry, testCase: GrammarTestCase): Promise; 6 | declare function missingScopes_(rs: string[], as: string[]): string[]; 7 | -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/unit/model.d.ts: -------------------------------------------------------------------------------- 1 | export interface TestCaseMetadata { 2 | commentToken: string; 3 | scope: string; 4 | description: string; 5 | allowMiddleLineAssertions: boolean; 6 | } 7 | export interface ScopeAssertion { 8 | from: number; 9 | to: number; 10 | scopes: string[]; 11 | exclude: string[]; 12 | } 13 | export interface LineAssertion { 14 | testCaseLineNumber: number; 15 | sourceLineNumber: number; 16 | scopeAssertions: ScopeAssertion[]; 17 | } 18 | export interface GrammarTestCase { 19 | metadata: TestCaseMetadata; 20 | source: string[]; 21 | assertions: LineAssertion[]; 22 | } 23 | export interface TestFailure { 24 | missing: string[]; 25 | actual: string[]; 26 | unexpected: string[]; 27 | line: number; 28 | srcLine: number; 29 | start: number; 30 | end: number; 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/unit/model.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | //# sourceMappingURL=model.js.map -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/unit/model.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/unit/model.ts"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/dist/unit/parsing.d.ts: -------------------------------------------------------------------------------- 1 | import { ScopeAssertion, TestCaseMetadata, GrammarTestCase } from './model'; 2 | export declare function parseScopeAssertion(testCaseLineNumber: number, commentLength: number, as: String): ScopeAssertion[]; 3 | /** 4 | * parse the first line with the format: 5 | * SYNTAX TEST "" <"description">? ([+-])* 6 | */ 7 | export declare function parseHeader(as: string[]): TestCaseMetadata; 8 | export declare function parseGrammarTestCase(str: string): GrammarTestCase; 9 | -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "nixpkgs": { 4 | "locked": { 5 | "lastModified": 1688594934, 6 | "narHash": "sha256-3dUo20PsmUd57jVZRx5vgKyIN1tv+v/JQweZsve5q/A=", 7 | "path": "/nix/store/j5zsaqfgxakn7ir8075wlmry76azgi72-source", 8 | "rev": "e11142026e2cef35ea52c9205703823df225c947", 9 | "type": "path" 10 | }, 11 | "original": { 12 | "id": "nixpkgs", 13 | "type": "indirect" 14 | } 15 | }, 16 | "root": { 17 | "inputs": { 18 | "nixpkgs": "nixpkgs" 19 | } 20 | } 21 | }, 22 | "root": "root", 23 | "version": 7 24 | } 25 | -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "A very basic flake"; 3 | 4 | outputs = { self, nixpkgs }: 5 | let 6 | pkgs = nixpkgs.legacyPackages.x86_64-linux; 7 | in { 8 | devShells.x86_64-linux.default = pkgs.mkShell { 9 | # add things you want in your shell here 10 | buildInputs = with pkgs; [ 11 | nodejs 12 | python3 13 | coreutils 14 | ]; 15 | }; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /node_modules/vscode-tmgrammar-test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vscode-tmgrammar-test", 3 | "version": "0.1.3", 4 | "description": "Test runner for VSCode textmate grammars", 5 | "homepage": "https://github.com/PanAeon/vscode-tmgrammar-test", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/PanAeon/vscode-tmgrammar-test" 9 | }, 10 | "bugs": { 11 | "url": "https://github.com/PanAeon/vscode-tmgrammar-test/issues" 12 | }, 13 | "scripts": { 14 | "build": "npx tsc", 15 | "coverage": "npx nyc --reporter=html mocha -r ts-node/register 'test/**/*.test.ts'", 16 | "format": "prettier --config .prettierrc 'src/**/*.ts' 'test/**/*.ts' --write", 17 | "lint": "tslint -c tslint.json 'src/**/*.ts'", 18 | "test": "mocha -r ts-node/register 'test/**/*.test.ts'" 19 | }, 20 | "bin": { 21 | "vscode-tmgrammar-test": "./dist/unit.js", 22 | "vscode-tmgrammar-snap": "./dist/snapshot.js" 23 | }, 24 | "keywords": [ 25 | "test", 26 | "unit-test", 27 | "textmate", 28 | "grammar", 29 | "visual", 30 | "studio", 31 | "code" 32 | ], 33 | "author": "vitalii voloshyn", 34 | "license": "MIT", 35 | "devDependencies": { 36 | "@types/chai": "^4.2.11", 37 | "@types/diff": "^4.0.2", 38 | "@types/glob": "^7.1.1", 39 | "@types/mocha": "^10.0.1", 40 | "@types/node": "^18.11.9", 41 | "@types/xml2js": "^0.4.11", 42 | "chai": "^4.2.0", 43 | "mocha": "^10.2.0", 44 | "nyc": "^15.0.1", 45 | "prettier": "^2.1.2", 46 | "ts-node": "^8.10.2", 47 | "tslint": "^5.20.1", 48 | "typescript": "^5.1.6", 49 | "xml2js": "^0.6.0" 50 | }, 51 | "dependencies": { 52 | "bottleneck": "^2.19.5", 53 | "chalk": "^2.4.2", 54 | "commander": "^9.2.0", 55 | "diff": "^4.0.2", 56 | "glob": "^7.1.6", 57 | "vscode-oniguruma": "^1.5.1", 58 | "vscode-textmate": "^7.0.1" 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /node_modules/wrappy/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/wrappy/README.md: -------------------------------------------------------------------------------- 1 | # wrappy 2 | 3 | Callback wrapping utility 4 | 5 | ## USAGE 6 | 7 | ```javascript 8 | var wrappy = require("wrappy") 9 | 10 | // var wrapper = wrappy(wrapperFunction) 11 | 12 | // make sure a cb is called only once 13 | // See also: http://npm.im/once for this specific use case 14 | var once = wrappy(function (cb) { 15 | var called = false 16 | return function () { 17 | if (called) return 18 | called = true 19 | return cb.apply(this, arguments) 20 | } 21 | }) 22 | 23 | function printBoo () { 24 | console.log('boo') 25 | } 26 | // has some rando property 27 | printBoo.iAmBooPrinter = true 28 | 29 | var onlyPrintOnce = once(printBoo) 30 | 31 | onlyPrintOnce() // prints 'boo' 32 | onlyPrintOnce() // does nothing 33 | 34 | // random property is retained! 35 | assert.equal(onlyPrintOnce.iAmBooPrinter, true) 36 | ``` 37 | -------------------------------------------------------------------------------- /node_modules/wrappy/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wrappy", 3 | "version": "1.0.2", 4 | "description": "Callback wrapping utility", 5 | "main": "wrappy.js", 6 | "files": [ 7 | "wrappy.js" 8 | ], 9 | "directories": { 10 | "test": "test" 11 | }, 12 | "dependencies": {}, 13 | "devDependencies": { 14 | "tap": "^2.3.1" 15 | }, 16 | "scripts": { 17 | "test": "tap --coverage test/*.js" 18 | }, 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/npm/wrappy" 22 | }, 23 | "author": "Isaac Z. Schlueter (http://blog.izs.me/)", 24 | "license": "ISC", 25 | "bugs": { 26 | "url": "https://github.com/npm/wrappy/issues" 27 | }, 28 | "homepage": "https://github.com/npm/wrappy" 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/wrappy/wrappy.js: -------------------------------------------------------------------------------- 1 | // Returns a wrapper function that returns a wrapped callback 2 | // The wrapper function should do some stuff, and return a 3 | // presumably different callback function. 4 | // This makes sure that own properties are retained, so that 5 | // decorations and such are not lost along the way. 6 | module.exports = wrappy 7 | function wrappy (fn, cb) { 8 | if (fn && cb) return wrappy(fn)(cb) 9 | 10 | if (typeof fn !== 'function') 11 | throw new TypeError('need wrapper function') 12 | 13 | Object.keys(fn).forEach(function (k) { 14 | wrapper[k] = fn[k] 15 | }) 16 | 17 | return wrapper 18 | 19 | function wrapper() { 20 | var args = new Array(arguments.length) 21 | for (var i = 0; i < args.length; i++) { 22 | args[i] = arguments[i] 23 | } 24 | var ret = fn.apply(this, args) 25 | var cb = args[args.length-1] 26 | if (typeof ret === 'function' && ret !== cb) { 27 | Object.keys(cb).forEach(function (k) { 28 | ret[k] = cb[k] 29 | }) 30 | } 31 | return ret 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /syntaxes/tw5-fields.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TiddlyWiki5 fields", 3 | "scopeName": "source.tiddlywiki5.fields", 4 | "patterns": [{ "include": "#field" }], 5 | "repository": { 6 | "field": { 7 | "patterns": [ 8 | { 9 | "match": "^([^:]*?)(:)(.*?)$", 10 | "name": "meta.tiddler.field.tiddlywiki5", 11 | "captures": { 12 | "1": { 13 | "name": "entity.other.attribute.field.name.tiddlywiki5", 14 | "patterns": [ 15 | { 16 | "comment": "Test for illegal characters", 17 | "match": "(?=[^a-z0-9\\-\\._])(.*)", 18 | "name":"invalid.illegal.field.name.tiddlywiki5" 19 | } 20 | ] 21 | }, 22 | "2": { 23 | "name": "entity.name.operator.field.separator.tiddlywiki5" 24 | }, 25 | "3": { 26 | "comment": "Field value are interpreted as text.html.tiddlywiki5", 27 | "name": "field.value.text.html.tiddlywiki5", 28 | "patterns": [{ "include": "text.html.tiddlywiki5" }] 29 | } 30 | } 31 | } 32 | ] 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /syntaxes/tw5-meta-file.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TiddlyWiki5 meta file", 3 | "scopeName": "source.tiddlywiki5.meta-file", 4 | "fileTypes": ["meta"], 5 | "patterns": [ 6 | { 7 | "begin": "^", 8 | "contentName": "meta.tiddler.fields.tiddlywiki5", 9 | "patterns": [{ "include": "source.tiddlywiki5.fields" }] 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /syntaxes/tw5-multids-file.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TiddlyWiki5 tid file", 3 | "scopeName": "source.tiddlywiki5.multids-file", 4 | "fileTypes": ["multids"], 5 | "patterns": [ 6 | { 7 | "comment": "Tokenize tiddler text field.", 8 | "begin": "(?<=^$)", 9 | "contentName": "meta.multids.text.html.tiddlywiki5", 10 | "patterns": [{ "include": "#comment" }, {"include": "#titleline"},{ "include": "text.html.tiddlywiki5" }] 11 | }, 12 | { 13 | "comment": "Tokenize mandatory tiddler metadata.", 14 | "begin": "^", 15 | "end": "^$", 16 | "contentName": "meta.multids.tiddler.fields.tiddlywiki5", 17 | "patterns": [{ "include": "source.tiddlywiki5.fields" }] 18 | } 19 | ], 20 | "injections": { 21 | "L:meta.variable.macro.body.tiddlywiki5": { 22 | "patterns": [ 23 | { "include": "text.html.tiddlywiki5#substitute-param"}, 24 | { "include": "text.html.tiddlywiki5#substitute-variable"} 25 | ] 26 | } 27 | }, 28 | "repository": { 29 | "comment": { 30 | "match": "^(#).*$", 31 | "name": "comment.line.number-sign.tiddlywiki5.multids-file", 32 | "captures": { 33 | "1": { "name": "punctuation.definition.comment.tiddlywiki5.multids-file" } 34 | } 35 | }, 36 | "titleline": { 37 | "match": "^(.*?)(: )(.*)$", 38 | "name": "meta.multids.tiddler.title.text.htmltiddlywiki5.multids-file", 39 | "captures": { 40 | "1": { "name": "string.value.title.field.tiddlywiki5.multids-file" }, 41 | "2": { 42 | "name": "punctuation.separator.key-value.title-text.tiddlywiki5.multids-file" 43 | }, 44 | "3": { 45 | "name": "meta.tiddle.field.text.tiddlywiki5.multids-file", 46 | "patterns": [{ "include": "text.html.tiddlywiki5" }] 47 | } 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /syntaxes/tw5-test-file.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TiddlyWiki5 test file", 3 | "scopeName": "text.html.tiddlywiki5.test", 4 | "fileTypes": ["tw5.test"], 5 | "patterns": [ 6 | { 7 | "comment": "Tokenize tiddlywiki5 text.", 8 | "start": "^", 9 | "end": "$", 10 | "contentName": "text.html.tiddlywiki5", 11 | "patterns": [{ "include": "text.html.tiddlywiki5" }] 12 | } 13 | ], 14 | "injections": { 15 | "L:text.html.tiddlywiki5": { 16 | "comment": "Comment out test lines", 17 | "patterns": [ 18 | { 19 | "comment": "Tokenize test comment text.", 20 | "begin": "^(#)\\s*", 21 | "end": "$", 22 | "contentName": "comment.block.test.tiddlywiki5", 23 | "captures": { 24 | "1": { 25 | "name": "punctuation.definition.comment.block.test.tiddlywiki5" 26 | } 27 | } 28 | } 29 | ] 30 | }, 31 | "L:meta.variable.macro.body.tiddlywiki5, meta.variable.function.body.tiddlywiki5, meta.variable.procedure.body.tiddlywiki5, meta.variable.widget.body.tiddlywiki5": { 32 | "comment": "Text replacement in macro body contexts.", 33 | "patterns": [ 34 | { "include": "text.html.tiddlywiki5#substitute-param"}, 35 | { "include": "text.html.tiddlywiki5#substitute-variable"} 36 | ] 37 | }, 38 | "R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html, markup.quote.blockquote.tiddlywiki5)": { 39 | "comment": "Uses R: to ensure this matches after any other injections.", 40 | "patterns": [ 41 | { "match": "<{1}", "name": "invalid.illegal.bad-angle-bracket.html.tiddlywiki5" } 42 | ] 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /syntaxes/tw5-tid-file.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TiddlyWiki5 tid file", 3 | "scopeName": "source.tiddlywiki5.tid-file", 4 | "fileTypes": ["tid"], 5 | "patterns": [ 6 | { 7 | "comment": "Tokenize tiddler text field.", 8 | "begin": "(?<=^$)", 9 | "contentName": "meta.text.html.tiddlywiki5", 10 | "patterns": [{ "include": "text.html.tiddlywiki5" }] 11 | }, 12 | { 13 | "comment": "Tokenize mandatory tiddler metadata.", 14 | "begin": "^", 15 | "end": "^$", 16 | "contentName": "meta.text.tiddler.fields.tiddlywiki5", 17 | "patterns": [{ "include": "source.tiddlywiki5.fields" }] 18 | } 19 | ], 20 | "injections": { 21 | "L:meta.variable.macro.body.tiddlywiki5": { 22 | "patterns": [ 23 | { 24 | "comment": "Parse variable reference.", 25 | "match": "(\\$\\()(.+?)(\\)\\$)", 26 | "name": "markup.other.variable.variable-reference.tiddlywiki5", 27 | "captures": { 28 | "1": { 29 | "name": "keyword.other.variable.variable-reference.begin.tiddlywiki5" 30 | }, 31 | "2": { "name": "variable.name.variable-reference.tiddlywiki5" }, 32 | "3": { 33 | "name": "keyword.other.variable.variable-reference.end.tiddlywiki5" 34 | } 35 | } 36 | }, 37 | { 38 | "comment": "Parse variable parameter.", 39 | "match": "(\\$)(?!:\\/)(.*?)(\\$)(?!:\\/)", 40 | "name": "markup.other.variable.variable-parameter.tiddlywiki5", 41 | "captures": { 42 | "1": { 43 | "name": "keyword.other.variable.variable-parameter.begin.tiddlywiki5" 44 | }, 45 | "2": { "name": "entity.name.variable-parameter.tiddlywiki5" }, 46 | "3": { 47 | "name": "keyword.other.variable.variable-parameter.end.tiddlywiki5" 48 | } 49 | } 50 | } 51 | ] 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /tests/Git-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Gitconfig", 3 | "scopeName": "source.git-config", 4 | "fileTypes": [".gitconfig"], 5 | "patterns": [ 6 | { "match": "^\\[[^]\"]*(\"\\w+\")?\\]", 7 | "name": "entity.gitconfig", 8 | "captures": { 9 | "1": { "name": "string.gitconfig" } 10 | }, 11 | "comment": "Section headings" 12 | }, 13 | { "match": "([^=]+)\\s*=\\s*([^#]*)", 14 | "name": "support.gitconfig", 15 | "captures": { 16 | "1": { "name": "storage.gitconfig" }, 17 | "2": { "name": "string.gitconfig" } 18 | }, 19 | "comment": "Setting" 20 | }, 21 | { "match": "#.*", 22 | "name": "comment.gitconfig", 23 | "comment": "Comments" 24 | } 25 | ], 26 | "uuid": "ad48b2c7-9203-47d5-85ea-e41fe7705971" 27 | } -------------------------------------------------------------------------------- /tests/python-console.cson: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 GitHub Inc. 2 | 3 | # Permission is hereby granted, free of charge, to any person obtaining 4 | # a copy of this software and associated documentation files (the 5 | # "Software"), to deal in the Software without restriction, including 6 | # without limitation the rights to use, copy, modify, merge, publish, 7 | # distribute, sublicense, and/or sell copies of the Software, and to 8 | # permit persons to whom the Software is furnished to do so, subject to 9 | # the following conditions: 10 | 11 | # The above copyright notice and this permission notice shall be 12 | # included in all copies or substantial portions of the Software. 13 | 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | # -------------------------------------------------------------------- 23 | 24 | # This package was derived from a TextMate bundle located at 25 | # https://github.com/textmate/python.tmbundle and distributed under the following 26 | # license, located in `README.mdown`: 27 | 28 | # Permission to copy, use, modify, sell and distribute this 29 | # software is granted. This software is provided "as is" without 30 | # express or implied warranty, and with no claim as to its 31 | # suitability for any purpose. 32 | 33 | 'scopeName': 'text.python.console' 34 | 'name': 'Python Console' 35 | 'fileTypes': [ 36 | 'doctest' 37 | 'pycon' 38 | ] 39 | 'patterns': [ 40 | { 41 | 'match': '^(>{3}|\\.{3}|In \\[\\d+\\]:) (.+)$' 42 | 'captures': 43 | '1': 44 | 'name': 'punctuation.separator.prompt.python.console' 45 | '2': 46 | 'patterns': [ 47 | 'include': 'source.python' 48 | ] 49 | } 50 | ] 51 | -------------------------------------------------------------------------------- /tests/python-console.json: -------------------------------------------------------------------------------- 1 | { 2 | "scopeName": "text.python.console", 3 | "name": "Python Console", 4 | "fileTypes": [ 5 | "doctest", 6 | "pycon" 7 | ], 8 | "patterns": [ 9 | { 10 | "match": "^(>{3}|\\.{3}|In \\[\\d+\\]:) (.+)$", 11 | "captures": { 12 | "1": { "name": "punctuation.separator.prompt.python.console"}, 13 | "2": { 14 | "patterns": [ 15 | {"include": "source.python"} 16 | ] 17 | } 18 | } 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /tests/samples/multids.multids: -------------------------------------------------------------------------------- 1 | title: common title prefix/ 2 | tags: common tags list {{test}} 3 | text: this field will be overwritten by text fields of individual tiddlers. <> {{tid}} 4 | 5 | # Tiddler title suffixes and text fields 6 | tiddler: text 7 | tiddler: text 8 | tiddler : text 9 | tiddler : text 10 | tiddler : text <> {{tiddler}} 11 | tiddler:: text 12 | tiddler :: text 13 | tiddler : :text 14 | : 15 | : 16 | : 17 | : 18 | # No valid title-text pair in this line, just ignore it 19 | -------------------------------------------------------------------------------- /tests/samples/newsyntax.tw: -------------------------------------------------------------------------------- 1 | 2 | 3 | ! Major Improvements 4 | 5 | !! Conditional Shortcut Syntax 6 | 7 | added a new shortcut syntax for concisely expressing if-then-else logic. This is the first of a new type of wikitext syntax based on tokens delimited with <% and %>. We plan to introduce other structures using the same format such as a "case" statement. 8 | 9 | These new token-based shortcuts allow a richer structure and expressivity than existing features such as widgets or pragmas. For example: 10 | 11 | <% if [match[Elephant]] %> 12 | It is an elephant 13 | <% elseif [match[Giraffe]] %> 14 | It is a giraffe 15 | <% else %> 16 | It is completely unknown 17 | <% endif %> 18 | 19 | Behind the scenes, the conditional shortcut syntax is rendered as the equivalent ListWidgets. 20 | 21 | -------------------------------------------------------------------------------- /tests/samples/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 22 | 23 | 24 | VSCode Tests 25 | 26 | 33 | 34 | 35 | 36 | 37 | 38 | content 39 | 40 |
41 | 42 | 44 | 45 | 46 | 47 | 48 | 63 | 64 | 70 | 71 |
72 | 73 | test 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | <$widget> content 88 | 89 | <% IF %> 90 | 91 |
92 | 93 | -------------------------------------------------------------------------------- /tests/samples/test.tw: -------------------------------------------------------------------------------- 1 | \function __testFunction() [!is[blank]then[text]] 2 | \procedure __test(animal, __plant) 3 | <% if [match[Elephant]] %> 4 | It is an elephant 5 | <% else %> 6 | <% if [match[Giraffe]] %> 7 | It is a giraffe 8 | <% else %> 9 | It is completely unknown 10 | <% endif %> 11 | <% endif %> 12 | 13 | <<__test__>> 14 | \end 15 | 16 | 17 | <> 18 | 19 | <> 20 | 21 | <> 22 | 23 | {{{ 24 | 25 | +[[Hi, I'm $(name)$ and I live in $(address)$]substitute[]] 26 | -[[Hi, I'm $(name)$ and I live in $(address)$]substitute[]] 27 | ~[[Hi, I'm $(name)$ and I live in $(address)$]substitute[]] 28 | =[[Hi, I'm $(name)$ and I live in $(address)$]substitute[]] 29 | +"Test" 30 | -"Test" 31 | ~"Test" 32 | ="Test" 33 | :anything"Test" 34 | +'Tes' 35 | -'Test' 36 | ~'Test' 37 | ='Test' 38 | :anything'Test' 39 | 40 | }}} 41 | 42 | {{{ [[Something in the $(time)$ at $2$ about $1$ ]substitute[Maths],[the Library]] :anything[[test]] :test["Not Legal"] "test" }}} 43 | 44 | {{{ [[$mode]is[variable]then<$mode>!is[blank]] :else[[mode]is[variable]then!is[blank]] :else[<@parseMode>] }}} 45 | -------------------------------------------------------------------------------- /tests/samples/tiddlywiki.styleblock.tw: -------------------------------------------------------------------------------- 1 | @@background-color:lightcyan; 2 | * Item one 3 | * Item two 4 | @@ 5 | 6 | @@background-color:lightcyan; 7 | * Item one 8 | * Item two 9 | 10 | @@ 11 | 12 | -------------------------------------------------------------------------------- /tests/samples/tiddlywiki5.heading.tw: -------------------------------------------------------------------------------- 1 | 2 | ! ''Heading'' //1// Text [[ Test Tiddler ]] "String" 3 | !! ''Heading'' //2// Test 4 | !!! Heading 3 5 | !!!! Heading 4 6 | !!!!! Heading 5 7 | !!!!!! Heading 6 8 | !.class1.class2 ''Heading'' //1// [[ Test Tiddler ]] "String" 9 | !!.class1.class2 ''Heading'' //2// Test 10 | !!!.class1.class2 ''Heading'' //3// {{Tiddler!!field}} 11 | !!!!.class1.class2 ''Heading'' //4// 12 | !!!!!.class1.class2 ''Heading'' //5// 13 | !!!!!!.class1.class2 ''Heading'' //6// 14 | !.class1.class2.class3 ''Heading'' //1// 15 | !''Heading'' //1// 16 | ! ''Heading'' //1// 17 | !''Heading'' //1// 18 | ! ''Heading'' //1// 19 | 20 | !!.class1 ''TEST'' @@color:steelblue;background-color:lightcyan;Text with custom style@@ 21 | 22 | !.class1.class2 """Multiline 23 | ''heading'' 24 | """ //1// 25 | !!!.class1.class2 """Multiline 26 | ''heading'' 27 | """ //3// 28 | !.class1.class2 """Multiline 29 | ''heading'' 30 | """ //1// 31 | 32 | !! <>append additional content. 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /tests/samples/tiddlywiki5.inline.filteredtransclusions.tw: -------------------------------------------------------------------------------- 1 | 2 | * {{{}}} 3 | * {{{ }}} 4 | * {{{||}}} 5 | * {{{|| }}} 6 | * {{{ || }}} 7 | * {{{||templateTitle}}} 8 | * {{{ || templateTitle }}} 9 | * {{{filter }}} 10 | * {{{ filter }}} 11 | * {{{filter ||}}} 12 | * {{{ filter || templateTitle }}} 13 | * {{{ [filter[this is a string with $(substituted)$ text $n$ ${text}$ etc]stepstep{transclude!!field}] || templateTitle }}} 14 | * {{{ 15 | }}} 16 | * {{{ 17 | filter 18 | }}} 19 | * {{{ 20 | || 21 | }}} 22 | * {{{ 23 | || templateTitle 24 | }}} 25 | * {{{ 26 | filter 27 | || 28 | templateTitle 29 | }}} 30 | * {{{ 31 | 32 | multiline filter strings 33 | 34 | are legal 35 | 36 | || 37 | 38 | multiline template titles too, 39 | 40 | but don't use it here anyway 41 | 42 | }}} 43 | 44 | 45 | -------------------------------------------------------------------------------- /tests/samples/tiddlywiki5.inline.macros.tw: -------------------------------------------------------------------------------- 1 | 2 | 3 | * <> 4 | * <> 5 | * <> 7 | * <> 9 | * <> 14 | * <> 15 | * <> 19 | * <> 23 | * <> 27 | * <> 31 | * <> 32 | * <> 33 | * <> 37 | * <> 41 | * <> 45 | * <> 49 | 50 | 51 | -------------------------------------------------------------------------------- /tests/samples/tiddlywiki5.inline.styling.tw: -------------------------------------------------------------------------------- 1 | 2 | 3 | * @@@@ 4 | * @@''Inline styling''@@ 5 | * @@.class1.class2 ''Inline styling''@@ 6 | * @@color:blue;background-color:red; ''Inline styling''@@ 7 | * @@color:blue;background-color:red;''Inline styling''@@ 8 | * @@color:blue;background-color:red;.class1.class2 ''Inline styling''@@ 9 | * @@color:blue;background-color:red;.class1.class2 """ 10 | ''Inline styling'' 11 | wraps inline run""" into `HTMLSpanElement` @@ 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/samples/tiddlywiki5.inline.tranclusions.tw: -------------------------------------------------------------------------------- 1 | 2 | 3 | * {{}} 4 | * {{||}} 5 | * {{ }} 6 | * {{title}} 7 | * {{title!!field}} 8 | * {{title##index}} 9 | * {{|| }} 10 | * {{ || }} 11 | * {{||templateTitle}} 12 | * {{title||templateTitle}} 13 | * {{title!!field||templateTitle}} 14 | * {{title##index||templateTitle}} 15 | * {{ long title !!.long.___-field-|| long template title}} 16 | * {{ 17 | }} 18 | * {{ 19 | title 20 | }} 21 | * {{ 22 | title!!field 23 | }} 24 | * {{ 25 | title##index 26 | }} 27 | * {{ 28 | || 29 | }} 30 | * {{ 31 | ||templateTitle 32 | }} 33 | * {{||templateTitle 34 | }} 35 | * {{ 36 | title||templateTitle 37 | }} 38 | * {{title!!field || templateTitle}} 39 | * {{title##index || templateTitle}} 40 | * {{ long title !! long !! field || long template title}} 41 | * {{ 42 | long title !! long !! field 43 | || 44 | long template title 45 | }} 46 | * {{ don't use | one pipe}} 47 | * {{ 48 | 49 | multiline text reference 50 | 51 | is illegal 52 | 53 | || 54 | 55 | multiline template title is not 56 | 57 | but don't use it here anyway 58 | 59 | }} 60 | 61 | 62 | -------------------------------------------------------------------------------- /tests/samples/tiddlywiki5.lists.tw: -------------------------------------------------------------------------------- 1 | 2 | # ''Number'' //1// 3 | #* ''Bullet'' //2// 4 | #*; ''term'' 5 | #*: ''description'' 6 | #> ''quote'' 7 | #.class1.class2 ''Number'' //1// 8 | #*.class1.class2 ''Bullet'' //2// 9 | #*;.class1.class2 """ 10 | multiline 11 | ''term'' 12 | """ 13 | #*:.class1.class2 ''description'' 14 | #>.class1.class2 ''quote'' 15 | *> quote 16 | >quote 17 | 18 | * & 19 | * & 20 | * & 21 | * & 22 | * &&&& 23 | 24 | * """Multiline 25 | ''list item'' 26 | """ //1// 27 | 28 | * -- 29 | * --- 30 | * ---- 31 | * ----- 32 | * -- --- ---- ----- 33 | 34 | * ''bold'' 35 | * //italic// 36 | * __underscore__ 37 | * ^^superscript^^ 38 | * ,,subscript,, 39 | * ~~strikethrough~~ 40 | 41 | * ''bold //italic// __underscore__ ^^superscript^^ ,,subscript,, ~~strikethrough~~'' 42 | * //italic ''bold'' __underscore__ ^^superscript^^ ,,subscript,, ~~strikethrough~~// 43 | * __underscore ''bold'' //italic// ^^superscript^^ ,,subscript,, ~~strikethrough~~__ 44 | * ^^superscript ''bold'' //italic// __underscore__ ,,subscript,, ~~strikethrough~~^^ 45 | * ,,subscript ''bold'' //italic// __underscore__ ^^superscript^^ ~~strikethrough~~,, 46 | * ~~strikethrough ''bold'' //italic// __underscore__ ^^superscript^^ ,,subscript,, ~~ 47 | 48 | * `raw` 49 | * ``raw`` 50 | * `''raw''` 51 | * ``''raw''`` 52 | * ``raw``not raw 53 | * `raw``raw`not raw 54 | * ``raw` `raw``not raw 55 | 56 | -------------------------------------------------------------------------------- /tests/samples/tiddlywiki5.math.tw: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <> 6 | 2 7 | 8 | + 9 | 10 | y 11 | 2 12 | 13 | 14 | = 15 | 16 | {{z}} 17 | 2 18 | 19 | 20 | 21 | 22 |

23 | The infinite sum 24 | 25 | Paragraph text with a few [[Title Links]] and [[References]]... 26 | 27 | <> 28 | {{transclusion}} 29 | [[wiki-link]] 30 | 31 | : test 32 | ; this 33 | 34 | """ 35 | TEST TEXT 36 | BLOCK <$transclude tiddler="test"/> 37 | """ 38 | 39 | <> 40 | {{transclusion}} 41 | [[wiki-link]] 42 | 43 | >> 44 | 45 | 46 | 47 | 48 | n 49 | = 50 | 1 51 | 52 | 53 | + 54 | 55 | 56 | 57 | 58 | 1 59 | 60 | n Paragraph ''text'' with //a few// [[X]] ~~and~~ [[Y]]... 61 | 2 62 | 63 | 64 | 65 | 66 | is equal to the real number 67 | >> 68 | 69 | 70 | π Paragraph text with a few [[Title Links]] and [[References]]... 71 | 2 72 | 73 | 6 74 | 75 | >>. 76 |

77 | -------------------------------------------------------------------------------- /tests/samples/tiddlywiki5.simple.tw: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Paragraph text with a few [[Title Links]] and [[References]]... 5 | 6 | <> 7 | {{transclusion}} 8 | [[wiki-link]] 9 | 10 | : test 11 | ; this 12 | 13 | """ 14 | TEST TEXT 15 | BLOCK <$transclude tiddler="test"/> 16 | """ 17 | 18 | <> 19 | {{transclusion}} 20 | [[wiki-link]] 21 | 22 | -- ndash 23 | --- mdash 24 | 25 | ---- 26 | 27 | ----- 28 | 29 | -- --- horizontal rules --- -- 30 | 31 | ---- 32 | not valid, must have a blank line 33 | 34 | ----- 35 | 36 | -------------------------------------------------------------------------------- /tests/samples/tiddlywiki5.svg.tw: -------------------------------------------------------------------------------- 1 | \parameters (size:"22pt") 2 | > height=<> class="tc-image-advanced-search-button tc-image-button" viewBox="0 0 128 128"> 3 | >>>/> 4 | 5 | 6 | > class={{{ [tag[Class]] }}} > 7 | 8 | 9 | 10 | 11 | 13 | > 14 | begin="2s" dur="4s" from="#ff9" to="red" fill="freeze"/> 15 | 17 | 18 | 19 | 20 | 21 | > font-family="Arial, Helvetica, sans-serif">Sans ''serif'' 22 | >>Monospace 23 | -------------------------------------------------------------------------------- /tests/samples/tiddlywiki5.tw.meta: -------------------------------------------------------------------------------- 1 | field:value 2 | field : value <$test> {{test}} <> 3 | i||egal field name : :field value: @@.class test@@ 4 | no: {{{ [[test]prefix[test]] +[] }}} 5 | i||egal field name: 6 | title: $:/wikitext.tw 7 | # No valid key-value pair in this line, just ignore it -------------------------------------------------------------------------------- /tests/tiddlywiki5/tiddlywiki5.heading.tw5.test: -------------------------------------------------------------------------------- 1 | # SYNTAX TEST "text.html.tiddlywiki5" "Test for header syntaxes" 2 | 3 | ! Header 4 | #<- text.html.tiddlywiki5 meta.heading.heading-1.tiddlywiki5 markup.heading.punctuation.definition.tiddlywiki5 5 | #^ text.html.tiddlywiki5 meta.heading.heading-1.tiddlywiki5 6 | 7 | !! Header 8 | #<-- text.html.tiddlywiki5 meta.heading.heading-2.tiddlywiki5 markup.heading.punctuation.definition.tiddlywiki5 9 | # ^ text.html.tiddlywiki5 meta.heading.heading-2.tiddlywiki5 10 | 11 | !!! Header 12 | #<-- text.html.tiddlywiki5 meta.heading.heading-3.tiddlywiki5 markup.heading.punctuation.definition.tiddlywiki5 13 | # ^ text.html.tiddlywiki5 meta.heading.heading-3.tiddlywiki5 14 | 15 | !!!! Header 16 | #<-- text.html.tiddlywiki5 meta.heading.heading-4.tiddlywiki5 markup.heading.punctuation.definition.tiddlywiki5 17 | # ^ text.html.tiddlywiki5 meta.heading.heading-4.tiddlywiki5 18 | 19 | !!!!! Header 20 | #<-- text.html.tiddlywiki5 meta.heading.heading-5.tiddlywiki5 markup.heading.punctuation.definition.tiddlywiki5 21 | # ^ text.html.tiddlywiki5 meta.heading.heading-5.tiddlywiki5 22 | 23 | !!!!!! Header 24 | #<-- text.html.tiddlywiki5 meta.heading.heading-6.tiddlywiki5 markup.heading.punctuation.definition.tiddlywiki5 25 | # ^ text.html.tiddlywiki5 meta.heading.heading-6.tiddlywiki5 26 | -------------------------------------------------------------------------------- /tw5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joshuafontany/VSCode-TW5-Syntax/17df85daa4f9cacdaeb264253dd6632ad3099ae7/tw5.png --------------------------------------------------------------------------------