├── .gitattributes ├── .github ├── funding.yml └── workflows │ └── build.yml ├── .gitignore ├── .vscode ├── launch.json ├── settings.json └── tasks.json ├── Data ├── android │ ├── app │ │ ├── build.gradle │ │ ├── gitignore │ │ └── proguard-rules.pro │ ├── build.gradle │ ├── gitignore │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── idea │ │ ├── codeStyles │ │ │ └── Project.xml │ │ ├── gradle.xml │ │ ├── misc.xml │ │ └── runConfigurations.xml │ ├── main │ │ ├── AndroidManifest.xml │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ └── settings.gradle ├── debug-html5 │ ├── electron.js │ ├── index.html │ ├── package.json │ └── preload.js ├── hl │ ├── kfile.js │ ├── kincfile.js │ └── kore_sources.c ├── html5 │ └── index.html ├── hxcpp │ └── kfile.js ├── intellij │ ├── idea │ │ ├── compiler.xml │ │ ├── copyright │ │ │ └── profiles_settings.xml │ │ ├── haxe.xml │ │ ├── misc.xml │ │ ├── modules.xml │ │ ├── name │ │ └── vcs.xml │ └── name.iml ├── node │ ├── package.json │ └── server.js └── psm │ ├── Texture.fcg │ ├── Texture.vcg │ └── app.xml ├── hooks └── pre-commit ├── khamake.js ├── node_modules ├── .bin │ ├── mime │ ├── mime.cmd │ ├── mime.ps1 │ ├── static │ ├── static.cmd │ ├── static.ps1 │ ├── tsc.ps1 │ ├── tsserver.ps1 │ ├── uuid │ ├── uuid.cmd │ └── uuid.ps1 ├── .package-lock.json ├── @types │ ├── fs-extra │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.d.ts │ │ └── package.json │ ├── node │ │ ├── LICENSE │ │ ├── README.md │ │ ├── assert.d.ts │ │ ├── async_hooks.d.ts │ │ ├── base.d.ts │ │ ├── buffer.d.ts │ │ ├── child_process.d.ts │ │ ├── cluster.d.ts │ │ ├── console.d.ts │ │ ├── constants.d.ts │ │ ├── crypto.d.ts │ │ ├── dgram.d.ts │ │ ├── dns.d.ts │ │ ├── domain.d.ts │ │ ├── events.d.ts │ │ ├── fs.d.ts │ │ ├── globals.d.ts │ │ ├── http.d.ts │ │ ├── http2.d.ts │ │ ├── https.d.ts │ │ ├── inspector.d.ts │ │ ├── module.d.ts │ │ ├── net.d.ts │ │ ├── os.d.ts │ │ ├── package.json │ │ ├── path.d.ts │ │ ├── perf_hooks.d.ts │ │ ├── process.d.ts │ │ ├── punycode.d.ts │ │ ├── querystring.d.ts │ │ ├── readline.d.ts │ │ ├── repl.d.ts │ │ ├── stream.d.ts │ │ ├── string_decoder.d.ts │ │ ├── timers.d.ts │ │ ├── tls.d.ts │ │ ├── trace_events.d.ts │ │ ├── ts3.2 │ │ │ ├── globals.d.ts │ │ │ ├── index.d.ts │ │ │ └── util.d.ts │ │ ├── tty.d.ts │ │ ├── url.d.ts │ │ ├── util.d.ts │ │ ├── v8.d.ts │ │ ├── vm.d.ts │ │ ├── worker_threads.d.ts │ │ └── zlib.d.ts │ └── ws │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.d.mts │ │ ├── index.d.ts │ │ └── package.json ├── anymatch │ ├── LICENSE │ ├── README.md │ ├── index.d.ts │ ├── index.js │ └── package.json ├── binary-extensions │ ├── binary-extensions.json │ ├── binary-extensions.json.d.ts │ ├── index.d.ts │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── braces │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── compile.js │ │ ├── constants.js │ │ ├── expand.js │ │ ├── parse.js │ │ ├── stringify.js │ │ └── utils.js │ └── package.json ├── chokidar │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── constants.js │ │ ├── fsevents-handler.js │ │ └── nodefs-handler.js │ ├── package.json │ └── types │ │ └── index.d.ts ├── colors │ ├── LICENSE │ ├── ReadMe.md │ ├── examples │ │ ├── normal-usage.js │ │ └── safe-string.js │ ├── index.d.ts │ ├── lib │ │ ├── colors.js │ │ ├── custom │ │ │ ├── trap.js │ │ │ └── zalgo.js │ │ ├── extendStringPrototype.js │ │ ├── index.js │ │ ├── maps │ │ │ ├── america.js │ │ │ ├── rainbow.js │ │ │ ├── random.js │ │ │ └── zebra.js │ │ ├── styles.js │ │ └── system │ │ │ ├── has-flag.js │ │ │ └── supports-colors.js │ ├── package.json │ ├── safe.d.ts │ ├── safe.js │ └── themes │ │ └── generic-logging.js ├── fill-range │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── fs-extra │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── docs │ │ ├── copy-sync.md │ │ ├── copy.md │ │ ├── emptyDir-sync.md │ │ ├── emptyDir.md │ │ ├── ensureDir-sync.md │ │ ├── ensureDir.md │ │ ├── ensureFile-sync.md │ │ ├── ensureFile.md │ │ ├── ensureLink-sync.md │ │ ├── ensureLink.md │ │ ├── ensureSymlink-sync.md │ │ ├── ensureSymlink.md │ │ ├── fs-read-write.md │ │ ├── move-sync.md │ │ ├── move.md │ │ ├── outputFile-sync.md │ │ ├── outputFile.md │ │ ├── outputJson-sync.md │ │ ├── outputJson.md │ │ ├── pathExists-sync.md │ │ ├── pathExists.md │ │ ├── readJson-sync.md │ │ ├── readJson.md │ │ ├── remove-sync.md │ │ ├── remove.md │ │ ├── writeJson-sync.md │ │ └── writeJson.md │ ├── lib │ │ ├── copy-sync │ │ │ ├── copy-sync.js │ │ │ └── index.js │ │ ├── copy │ │ │ ├── copy.js │ │ │ └── index.js │ │ ├── empty │ │ │ └── index.js │ │ ├── ensure │ │ │ ├── file.js │ │ │ ├── index.js │ │ │ ├── link.js │ │ │ ├── symlink-paths.js │ │ │ ├── symlink-type.js │ │ │ └── symlink.js │ │ ├── fs │ │ │ └── index.js │ │ ├── index.js │ │ ├── json │ │ │ ├── index.js │ │ │ ├── jsonfile.js │ │ │ ├── output-json-sync.js │ │ │ └── output-json.js │ │ ├── mkdirs │ │ │ ├── index.js │ │ │ ├── mkdirs-sync.js │ │ │ ├── mkdirs.js │ │ │ └── win32.js │ │ ├── move-sync │ │ │ └── index.js │ │ ├── move │ │ │ └── index.js │ │ ├── output │ │ │ └── index.js │ │ ├── path-exists │ │ │ └── index.js │ │ ├── remove │ │ │ ├── index.js │ │ │ └── rimraf.js │ │ └── util │ │ │ ├── buffer.js │ │ │ └── utimes.js │ └── package.json ├── fsevents │ ├── LICENSE │ ├── README.md │ ├── fsevents.d.ts │ ├── fsevents.js │ ├── fsevents.node │ └── package.json ├── glob-parent │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── graceful-fs │ ├── LICENSE │ ├── README.md │ ├── fs.js │ ├── graceful-fs.js │ ├── legacy-streams.js │ ├── package.json │ └── polyfills.js ├── is-binary-path │ ├── index.d.ts │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── is-extglob │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── is-glob │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── is-number │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── jsonfile │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── mime │ ├── .npmignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── cli.js │ ├── mime.js │ ├── package.json │ ├── src │ │ ├── build.js │ │ └── test.js │ └── types.json ├── minimist │ ├── .travis.yml │ ├── LICENSE │ ├── example │ │ └── parse.js │ ├── index.js │ ├── package.json │ ├── readme.markdown │ └── test │ │ ├── bool.js │ │ ├── dash.js │ │ ├── default_bool.js │ │ ├── dotted.js │ │ ├── long.js │ │ ├── num.js │ │ ├── parse.js │ │ ├── parse_modified.js │ │ ├── short.js │ │ └── whitespace.js ├── node-static │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── benchmark │ │ └── node-static-0.3.0.txt │ ├── bin │ │ └── cli.js │ ├── examples │ │ └── file-server.js │ ├── lib │ │ ├── node-static.js │ │ └── node-static │ │ │ └── util.js │ ├── package.json │ └── test │ │ ├── fixtures │ │ ├── empty.css │ │ ├── hello.txt │ │ ├── index.html │ │ └── there │ │ │ └── index.html │ │ └── integration │ │ └── node-static-test.js ├── normalize-path │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── optimist │ ├── .travis.yml │ ├── LICENSE │ ├── example │ │ ├── bool.js │ │ ├── boolean_double.js │ │ ├── boolean_single.js │ │ ├── default_hash.js │ │ ├── default_singles.js │ │ ├── divide.js │ │ ├── line_count.js │ │ ├── line_count_options.js │ │ ├── line_count_wrap.js │ │ ├── nonopt.js │ │ ├── reflect.js │ │ ├── short.js │ │ ├── string.js │ │ ├── usage-options.js │ │ └── xup.js │ ├── index.js │ ├── package.json │ ├── readme.markdown │ └── test │ │ ├── _.js │ │ ├── _ │ │ ├── argv.js │ │ └── bin.js │ │ ├── dash.js │ │ ├── parse.js │ │ ├── parse_modified.js │ │ ├── short.js │ │ ├── usage.js │ │ └── whitespace.js ├── picomatch │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── constants.js │ │ ├── parse.js │ │ ├── picomatch.js │ │ ├── scan.js │ │ └── utils.js │ └── package.json ├── promise-parallel-throttle │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── throttle.d.ts │ │ └── throttle.js │ ├── coverage │ │ ├── clover.xml │ │ ├── coverage-final.json │ │ ├── lcov-report │ │ │ ├── base.css │ │ │ ├── index.html │ │ │ ├── prettify.css │ │ │ ├── prettify.js │ │ │ ├── sort-arrow-sprite.png │ │ │ ├── sorter.js │ │ │ └── throttle.ts.html │ │ ├── lcov.info │ │ └── remapped │ │ │ ├── coverage.json │ │ │ ├── coverage.txt │ │ │ ├── html │ │ │ ├── base.css │ │ │ ├── index.html │ │ │ ├── prettify.css │ │ │ ├── prettify.js │ │ │ ├── sort-arrow-sprite.png │ │ │ ├── sorter.js │ │ │ └── src │ │ │ │ ├── index.html │ │ │ │ └── throttle.ts.html │ │ │ └── lcov.info │ ├── package.json │ ├── tsconfig.json │ ├── tslint.json │ └── yarn.lock ├── readdirp │ ├── LICENSE │ ├── README.md │ ├── index.d.ts │ ├── index.js │ └── package.json ├── to-regex-range │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── universalify │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── uuid │ ├── .eslintrc.json │ ├── AUTHORS │ ├── CHANGELOG.md │ ├── LICENSE.md │ ├── README.md │ ├── README_js.md │ ├── bin │ │ └── uuid │ ├── index.js │ ├── lib │ │ ├── bytesToUuid.js │ │ ├── md5-browser.js │ │ ├── md5.js │ │ ├── rng-browser.js │ │ ├── rng.js │ │ ├── sha1-browser.js │ │ ├── sha1.js │ │ └── v35.js │ ├── package.json │ ├── v1.js │ ├── v3.js │ ├── v4.js │ └── v5.js ├── wordwrap │ ├── LICENSE │ ├── README.markdown │ ├── example │ │ ├── center.js │ │ └── meat.js │ ├── index.js │ ├── package.json │ └── test │ │ ├── break.js │ │ ├── idleness.txt │ │ └── wrap.js └── ws │ ├── LICENSE │ ├── README.md │ ├── browser.js │ ├── index.js │ ├── lib │ ├── buffer-util.js │ ├── constants.js │ ├── event-target.js │ ├── extension.js │ ├── limiter.js │ ├── permessage-deflate.js │ ├── receiver.js │ ├── sender.js │ ├── stream.js │ ├── subprotocol.js │ ├── validation.js │ ├── websocket-server.js │ └── websocket.js │ ├── package.json │ └── wrapper.mjs ├── out ├── Architecture.js ├── AssetConverter.js ├── AudioApi.js ├── Color.js ├── Converter.js ├── Exporters │ ├── AndroidExporter.js │ ├── CSharpExporter.js │ ├── DebugHtml5Exporter.js │ ├── EmptyExporter.js │ ├── Exporter.js │ ├── FlashExporter.js │ ├── Html5Exporter.js │ ├── Html5WorkerExporter.js │ ├── JavaExporter.js │ ├── KhaExporter.js │ ├── KoreExporter.js │ ├── KoreHLExporter.js │ ├── KromExporter.js │ ├── NodeExporter.js │ ├── PlayStationMobileExporter.js │ ├── UnityExporter.js │ └── WpfExporter.js ├── GraphicsApi.js ├── Haxe.js ├── HaxeCompiler.js ├── HaxeProject.js ├── Icon.js ├── ImageTool.js ├── Options.js ├── Platform.js ├── Project.js ├── ProjectFile.js ├── RayTraceApi.js ├── ShaderCompiler.js ├── VisualStudioVersion.js ├── VrApi.js ├── XmlWriter.js ├── defaults.js ├── exec.js ├── init.js ├── khamake.js ├── korepath.js ├── log.js ├── main.js └── typings.json ├── package-lock.json ├── package.json ├── src ├── Architecture.ts ├── AssetConverter.ts ├── AudioApi.ts ├── Color.ts ├── Converter.ts ├── Exporters │ ├── CSharpExporter.ts │ ├── DebugHtml5Exporter.ts │ ├── EmptyExporter.ts │ ├── Exporter.ts │ ├── FlashExporter.ts │ ├── Html5Exporter.ts │ ├── Html5WorkerExporter.ts │ ├── JavaExporter.ts │ ├── KhaExporter.ts │ ├── KoreExporter.ts │ ├── KoreHLExporter.ts │ ├── KromExporter.ts │ ├── NodeExporter.ts │ ├── PlayStationMobileExporter.ts │ └── WpfExporter.ts ├── GraphicsApi.ts ├── Haxe.ts ├── HaxeCompiler.ts ├── HaxeProject.ts ├── Icon.ts ├── ImageTool.ts ├── Options.ts ├── Platform.ts ├── Project.ts ├── ProjectFile.ts ├── RayTraceApi.ts ├── ShaderCompiler.ts ├── VisualStudioVersion.ts ├── VrApi.ts ├── XmlWriter.ts ├── defaults.ts ├── exec.ts ├── init.ts ├── khamake.ts ├── korepath.ts ├── log.ts └── main.ts ├── tsconfig.json └── tslint.json /.gitattributes: -------------------------------------------------------------------------------- 1 | * -text 2 | -------------------------------------------------------------------------------- /.github/funding.yml: -------------------------------------------------------------------------------- 1 | github: RobDangerous 2 | patreon: RobDangerous 3 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | branches: 9 | - master 10 | 11 | jobs: 12 | build: 13 | 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - uses: actions/checkout@v1 18 | - name: Install tslint 19 | run: sudo npm install -g tslint 20 | - name: Lint 21 | run: tslint -c tslint.json src/*.ts src/Exporters/*.ts 22 | - name: Compile 23 | run: tsc 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.js.map 2 | /.vscode/.BROWSE.VC.DB 3 | /.vscode/.BROWSE.VC.DB-shm 4 | /.vscode/.BROWSE.VC.DB-wal 5 | /node_modules/typescript 6 | /node_modules/.bin/tsserver.cmd 7 | /node_modules/.bin/tsc 8 | /node_modules/.bin/tsc.cmd 9 | /node_modules/.bin/tsserver 10 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 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 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "Launch khamake", 11 | "program": "${workspaceFolder}/../../make.js", 12 | "args": [ 13 | "html5" 14 | ], 15 | "cwd": "${workspaceFolder}/../../..", 16 | // "preLaunchTask": "tsc: build - tsconfig.json", 17 | "outFiles": [ 18 | "${workspaceFolder}/out/**/*.js" 19 | ] 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "search.exclude": { 3 | "/out": true, 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "type": "typescript", 6 | "tsconfig": "tsconfig.json", 7 | "problemMatcher": [ 8 | "$tsc" 9 | ], 10 | "group": { 11 | "kind": "build", 12 | "isDefault": true 13 | } 14 | }, 15 | { 16 | "label": "Linter", 17 | "type": "shell", 18 | "command": "tslint", 19 | "args": [ 20 | "-c", 21 | "tslint.json", 22 | "src/*.ts", 23 | "src/Exporters/*.ts", 24 | ], 25 | "problemMatcher": [] 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /Data/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | defaultConfig { 6 | applicationId "{package}" 7 | minSdkVersion 14 8 | targetSdkVersion 28 9 | versionCode 1 10 | versionName "1.0" 11 | } 12 | signingConfigs { 13 | release { 14 | if (project.hasProperty('RELEASE_STORE_FILE')) { 15 | storeFile file(RELEASE_STORE_FILE) 16 | storePassword RELEASE_STORE_PASSWORD 17 | keyAlias RELEASE_KEY_ALIAS 18 | keyPassword RELEASE_KEY_PASSWORD 19 | } 20 | } 21 | } 22 | buildTypes { 23 | release { 24 | if (project.hasProperty('RELEASE_STORE_FILE')) { 25 | signingConfig signingConfigs.release 26 | } 27 | minifyEnabled false 28 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 29 | } 30 | } 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/../../../src' 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Data/android/app/gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Data/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /Data/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | google() 6 | jcenter() 7 | 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:3.3.0' 11 | 12 | // NOTE: Do not place your application dependencies here; they belong 13 | // in the individual module build.gradle files 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | jcenter() 21 | 22 | } 23 | } 24 | 25 | task clean(type: Delete) { 26 | delete rootProject.buildDir 27 | } 28 | -------------------------------------------------------------------------------- /Data/android/gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | -------------------------------------------------------------------------------- /Data/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | 15 | 16 | -------------------------------------------------------------------------------- /Data/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kode/khamake/6a859252b7ef6250f43d0a410e44e7ff1e538b2c/Data/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Data/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Feb 03 14:14:14 CET 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip 7 | -------------------------------------------------------------------------------- /Data/android/idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /Data/android/idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /Data/android/idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /Data/android/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | {permissions} 2 | 7 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Data/android/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | {name} 3 | 4 | -------------------------------------------------------------------------------- /Data/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /Data/debug-html5/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {Name} 8 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Data/debug-html5/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "kodestudio-debug", 3 | "version" : "0.1.0", 4 | "main" : "electron.js" 5 | } 6 | -------------------------------------------------------------------------------- /Data/debug-html5/preload.js: -------------------------------------------------------------------------------- 1 | const electron = require('electron'); 2 | const fs = require('fs'); 3 | const path = require('path'); 4 | 5 | let blobId = 0; 6 | let blobRequests = {}; 7 | 8 | electron.ipcRenderer.on('blob-loaded', (event, args) => { 9 | const blobRequest = blobRequests[args.id]; 10 | delete blobRequests[args.id]; 11 | blobRequest.done(new Uint8Array(args.data)); 12 | }); 13 | 14 | electron.ipcRenderer.on('blob-failed', (event, args) => { 15 | const blobRequest = blobRequests[args.id]; 16 | delete blobRequests[args.id]; 17 | blobRequest.failed({url: args.url, error: args.error}); 18 | }); 19 | 20 | electron.contextBridge.exposeInMainWorld( 21 | 'electron', { 22 | {Expose} 23 | showWindow: (title, x, y, width, height) => { 24 | if (electron.webFrame.setZoomLevelLimits != null) { // TODO: Figure out why this check is sometimes required 25 | electron.webFrame.setZoomLevelLimits(1, 1); 26 | } 27 | const options = { 28 | title: title, 29 | x: x, 30 | y: y, 31 | width: width, 32 | height: height, 33 | }; 34 | electron.ipcRenderer.send('show-window', options); 35 | }, 36 | loadBlob: (desc, done, failed) => { 37 | const options = { 38 | file: desc.files[0], 39 | id: blobId++ 40 | }; 41 | blobRequests[options.id] = { 42 | done: done, 43 | failed: failed 44 | }; 45 | electron.ipcRenderer.send('load-blob', options); 46 | } 47 | } 48 | ); 49 | -------------------------------------------------------------------------------- /Data/hl/kfile.js: -------------------------------------------------------------------------------- 1 | let project = new Project('HaxeC'); 2 | project.addFiles('kore_sources.c'); 3 | project.addFiles('Sources/**.metal'); 4 | project.addIncludeDirs('.'); 5 | resolve(project); 6 | -------------------------------------------------------------------------------- /Data/hl/kincfile.js: -------------------------------------------------------------------------------- 1 | let project = new Project('HaxeC'); 2 | project.addFiles('kore_sources.c'); 3 | project.addFiles('Sources/**.metal'); 4 | project.addIncludeDirs('.'); 5 | resolve(project); 6 | -------------------------------------------------------------------------------- /Data/hl/kore_sources.c: -------------------------------------------------------------------------------- 1 | #include "sources.c" 2 | 3 | void frame() { 4 | kha_SystemImpl_frame(); 5 | } 6 | -------------------------------------------------------------------------------- /Data/html5/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {Name} 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Data/hxcpp/kfile.js: -------------------------------------------------------------------------------- 1 | let project = new Project('HaxeCpp'); 2 | if (platform === Platform.WindowsApp) { 3 | project.addFiles('Sources/**.h', 'Sources/**.cpp'); 4 | } 5 | else { 6 | project.addFiles('Sources/**.h', 'Sources/**.cpp', { pch: 'hxcpp.h' }); 7 | } 8 | project.addFiles('Sources/src/resources/**.cpp'); 9 | project.addFiles('Sources/src/__lib__.cpp', 'Sources/src/__boot__.cpp'); 10 | project.addExcludes('Sources/src/__main__.cpp'); 11 | project.addIncludeDirs('Sources/include'); 12 | //project.addDefine('HX_SMART_STRINGS'); 13 | resolve(project); 14 | -------------------------------------------------------------------------------- /Data/intellij/idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Data/intellij/idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Data/intellij/idea/haxe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Data/intellij/idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Data/intellij/idea/name: -------------------------------------------------------------------------------- 1 | {name} -------------------------------------------------------------------------------- /Data/intellij/idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Data/intellij/name.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 16 | 17 | 18 | {sources} 19 | 20 | {libraries} 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Data/node/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kha-server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "kha.js", 6 | "dependencies": { 7 | "express": "^4.13.3", 8 | "express-ws": "^0.2.6" 9 | }, 10 | "devDependencies": { 11 | "nodemon": "^1.11.0", 12 | "livereloadx": "^0.3.10" 13 | }, 14 | "scripts": { 15 | "autoserve": "nodemon kha.js", 16 | "autoreload": "livereloadx ./", 17 | "test": "echo \"Error: no test specified\" && exit 1" 18 | }, 19 | "author": "khamake", 20 | "license": "Zlib" 21 | } 22 | -------------------------------------------------------------------------------- /Data/psm/Texture.fcg: -------------------------------------------------------------------------------- 1 | /* 2 | #version 100 3 | 4 | #ifdef GL_ES 5 | precision mediump float; 6 | #endif 7 | 8 | uniform sampler2D tex; 9 | varying vec2 texCoord; 10 | varying vec4 color; 11 | 12 | void kore() { 13 | vec4 texcolor = texture2D(tex, texCoord) * color; 14 | texcolor.rgb *= color.a; 15 | gl_FragColor = texcolor; 16 | } 17 | */ 18 | 19 | /*void main(float2 in v_TexCoord : TEXCOORD0, float4 out Color : COLOR, uniform sampler2D Texture0 : TEXUNIT0) { 20 | Color = tex2D(Texture0, v_TexCoord); 21 | }*/ 22 | 23 | void main(float2 in texCoord : TEXCOORD0, float4 in color : TEXCOORD1, float4 out gl_FragColor : COLOR, uniform sampler2D tex : TEXUNIT0) { 24 | float4 texcolor = tex2D(tex, texCoord) * color; 25 | //texcolor.rgb *= color.a; 26 | gl_FragColor = texcolor; 27 | //gl_FragColor = float4(1.0, 0.0, 0.0, 1.0); 28 | } 29 | -------------------------------------------------------------------------------- /Data/psm/Texture.vcg: -------------------------------------------------------------------------------- 1 | /* 2 | #version 100 3 | 4 | attribute vec3 vertexPosition; 5 | attribute vec2 texPosition; 6 | attribute vec4 vertexColor; 7 | uniform mat4 projectionMatrix; 8 | varying vec2 texCoord; 9 | varying vec4 color; 10 | 11 | void kore() { 12 | gl_Position = projectionMatrix * vec4(vertexPosition, 1.0); 13 | texCoord = texPosition; 14 | color = vertexColor; 15 | } 16 | */ 17 | 18 | /*void main(float4 in a_Position : POSITION, float2 in a_TexCoord : TEXCOORD0, float4 out v_Position : POSITION, float2 out v_TexCoord : TEXCOORD0, uniform float4x4 WorldViewProj) { 19 | v_Position = mul(a_Position, WorldViewProj); 20 | v_TexCoord = a_TexCoord; 21 | }*/ 22 | 23 | void main( 24 | float3 in vertexPosition : TEXCOORD0, float2 in texPosition : TEXCOORD1, float4 in vertexColor : TEXCOORD2, 25 | float4 out gl_Position : POSITION, float2 out texCoord : TEXCOORD0, float4 out color : TEXCOORD1, 26 | uniform float4x4 projectionMatrix) { 27 | gl_Position = mul(transpose(projectionMatrix), float4(vertexPosition, 1.0)); 28 | gl_Position.z = 0.5; 29 | texCoord = texPosition; 30 | color = vertexColor; 31 | } 32 | -------------------------------------------------------------------------------- /Data/psm/app.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /hooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | tslint -c tslint.json src/*.ts src/Exporters/*.ts 3 | -------------------------------------------------------------------------------- /khamake.js: -------------------------------------------------------------------------------- 1 | let versions = process.version.substring(1).split('.'); 2 | if ((Number(versions[0]) < 8 || (Number(versions[0]) === 8 && Number(versions[1]) < 9)) && process.version !== 'v7.4.0' /* Kode Studio 17.9 */) { 3 | console.error('Requires Node.js version 8.9 or higher but found ' + process.version + '.'); 4 | process.exit(1); 5 | } 6 | 7 | require('./out/khamake.js'); 8 | -------------------------------------------------------------------------------- /node_modules/.bin/mime: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | exec "$basedir/node" "$basedir/../mime/cli.js" "$@" 10 | else 11 | exec node "$basedir/../mime/cli.js" "$@" 12 | fi 13 | -------------------------------------------------------------------------------- /node_modules/.bin/mime.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%\..\mime\cli.js" %* 18 | -------------------------------------------------------------------------------- /node_modules/.bin/mime.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/../mime/cli.js" $args 15 | } else { 16 | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args 17 | } 18 | $ret=$LASTEXITCODE 19 | } else { 20 | # Support pipeline input 21 | if ($MyInvocation.ExpectingInput) { 22 | $input | & "node$exe" "$basedir/../mime/cli.js" $args 23 | } else { 24 | & "node$exe" "$basedir/../mime/cli.js" $args 25 | } 26 | $ret=$LASTEXITCODE 27 | } 28 | exit $ret 29 | -------------------------------------------------------------------------------- /node_modules/.bin/static: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | exec "$basedir/node" "$basedir/../node-static/bin/cli.js" "$@" 10 | else 11 | exec node "$basedir/../node-static/bin/cli.js" "$@" 12 | fi 13 | -------------------------------------------------------------------------------- /node_modules/.bin/static.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%\..\node-static\bin\cli.js" %* 18 | -------------------------------------------------------------------------------- /node_modules/.bin/static.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/../node-static/bin/cli.js" $args 15 | } else { 16 | & "$basedir/node$exe" "$basedir/../node-static/bin/cli.js" $args 17 | } 18 | $ret=$LASTEXITCODE 19 | } else { 20 | # Support pipeline input 21 | if ($MyInvocation.ExpectingInput) { 22 | $input | & "node$exe" "$basedir/../node-static/bin/cli.js" $args 23 | } else { 24 | & "node$exe" "$basedir/../node-static/bin/cli.js" $args 25 | } 26 | $ret=$LASTEXITCODE 27 | } 28 | exit $ret 29 | -------------------------------------------------------------------------------- /node_modules/.bin/tsc.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/../typescript/bin/tsc" $args 15 | } else { 16 | & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args 17 | } 18 | $ret=$LASTEXITCODE 19 | } else { 20 | # Support pipeline input 21 | if ($MyInvocation.ExpectingInput) { 22 | $input | & "node$exe" "$basedir/../typescript/bin/tsc" $args 23 | } else { 24 | & "node$exe" "$basedir/../typescript/bin/tsc" $args 25 | } 26 | $ret=$LASTEXITCODE 27 | } 28 | exit $ret 29 | -------------------------------------------------------------------------------- /node_modules/.bin/tsserver.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/../typescript/bin/tsserver" $args 15 | } else { 16 | & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args 17 | } 18 | $ret=$LASTEXITCODE 19 | } else { 20 | # Support pipeline input 21 | if ($MyInvocation.ExpectingInput) { 22 | $input | & "node$exe" "$basedir/../typescript/bin/tsserver" $args 23 | } else { 24 | & "node$exe" "$basedir/../typescript/bin/tsserver" $args 25 | } 26 | $ret=$LASTEXITCODE 27 | } 28 | exit $ret 29 | -------------------------------------------------------------------------------- /node_modules/.bin/uuid: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | exec "$basedir/node" "$basedir/../uuid/bin/uuid" "$@" 10 | else 11 | exec node "$basedir/../uuid/bin/uuid" "$@" 12 | fi 13 | -------------------------------------------------------------------------------- /node_modules/.bin/uuid.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%\..\uuid\bin\uuid" %* 18 | -------------------------------------------------------------------------------- /node_modules/.bin/uuid.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/../uuid/bin/uuid" $args 15 | } else { 16 | & "$basedir/node$exe" "$basedir/../uuid/bin/uuid" $args 17 | } 18 | $ret=$LASTEXITCODE 19 | } else { 20 | # Support pipeline input 21 | if ($MyInvocation.ExpectingInput) { 22 | $input | & "node$exe" "$basedir/../uuid/bin/uuid" $args 23 | } else { 24 | & "node$exe" "$basedir/../uuid/bin/uuid" $args 25 | } 26 | $ret=$LASTEXITCODE 27 | } 28 | exit $ret 29 | -------------------------------------------------------------------------------- /node_modules/@types/fs-extra/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 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/@types/fs-extra/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/fs-extra` 3 | 4 | # Summary 5 | This package contains type definitions for fs-extra (https://github.com/jprichardson/node-fs-extra). 6 | 7 | # Details 8 | Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra 9 | 10 | Additional Details 11 | * Last updated: Wed, 11 Apr 2018 19:11:59 GMT 12 | * Dependencies: fs, node 13 | * Global values: none 14 | 15 | # Credits 16 | These definitions were written by Alan Agius , midknight41 , Brendan Forster , Mees van Dijk , Justin Rockwood . 17 | -------------------------------------------------------------------------------- /node_modules/@types/fs-extra/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@types/fs-extra", 3 | "version": "5.0.2", 4 | "description": "TypeScript definitions for fs-extra", 5 | "license": "MIT", 6 | "contributors": [ 7 | { 8 | "name": "Alan Agius", 9 | "url": "https://github.com/alan-agius4", 10 | "githubUsername": "alan-agius4" 11 | }, 12 | { 13 | "name": "midknight41", 14 | "url": "https://github.com/midknight41", 15 | "githubUsername": "midknight41" 16 | }, 17 | { 18 | "name": "Brendan Forster", 19 | "url": "https://github.com/shiftkey", 20 | "githubUsername": "shiftkey" 21 | }, 22 | { 23 | "name": "Mees van Dijk", 24 | "url": "https://github.com/mees-", 25 | "githubUsername": "mees-" 26 | }, 27 | { 28 | "name": "Justin Rockwood", 29 | "url": "https://github.com/jrockwood", 30 | "githubUsername": "jrockwood" 31 | } 32 | ], 33 | "main": "", 34 | "repository": { 35 | "type": "git", 36 | "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" 37 | }, 38 | "scripts": {}, 39 | "dependencies": { 40 | "@types/node": "*" 41 | }, 42 | "typesPublisherContentHash": "b2733d283c46366a0a9b1bc4deeec119ff9685362d4046289de118a3d6698be6", 43 | "typeScriptVersion": "2.2" 44 | } -------------------------------------------------------------------------------- /node_modules/@types/node/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 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/@types/node/buffer.d.ts: -------------------------------------------------------------------------------- 1 | declare module "buffer" { 2 | export const INSPECT_MAX_BYTES: number; 3 | export const kMaxLength: number; 4 | export const kStringMaxLength: number; 5 | export const constants: { 6 | MAX_LENGTH: number; 7 | MAX_STRING_LENGTH: number; 8 | }; 9 | const BuffType: typeof Buffer; 10 | 11 | export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary"; 12 | 13 | export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer; 14 | 15 | export const SlowBuffer: { 16 | /** @deprecated since v6.0.0, use Buffer.allocUnsafeSlow() */ 17 | new(size: number): Buffer; 18 | prototype: Buffer; 19 | }; 20 | 21 | export { BuffType as Buffer }; 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/@types/node/console.d.ts: -------------------------------------------------------------------------------- 1 | declare module "console" { 2 | export = console; 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/@types/node/domain.d.ts: -------------------------------------------------------------------------------- 1 | declare module "domain" { 2 | import * as events from "events"; 3 | 4 | class Domain extends events.EventEmitter implements NodeJS.Domain { 5 | run(fn: (...args: any[]) => T, ...args: any[]): T; 6 | add(emitter: events.EventEmitter | NodeJS.Timer): void; 7 | remove(emitter: events.EventEmitter | NodeJS.Timer): void; 8 | bind(cb: T): T; 9 | intercept(cb: T): T; 10 | members: Array; 11 | enter(): void; 12 | exit(): void; 13 | } 14 | 15 | function create(): Domain; 16 | } 17 | -------------------------------------------------------------------------------- /node_modules/@types/node/events.d.ts: -------------------------------------------------------------------------------- 1 | declare module "events" { 2 | class internal extends NodeJS.EventEmitter { } 3 | 4 | namespace internal { 5 | function once(emitter: EventEmitter, event: string | symbol): Promise; 6 | class EventEmitter extends internal { 7 | /** @deprecated since v4.0.0 */ 8 | static listenerCount(emitter: EventEmitter, event: string | symbol): number; 9 | static defaultMaxListeners: number; 10 | 11 | addListener(event: string | symbol, listener: (...args: any[]) => void): this; 12 | on(event: string | symbol, listener: (...args: any[]) => void): this; 13 | once(event: string | symbol, listener: (...args: any[]) => void): this; 14 | prependListener(event: string | symbol, listener: (...args: any[]) => void): this; 15 | prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; 16 | removeListener(event: string | symbol, listener: (...args: any[]) => void): this; 17 | off(event: string | symbol, listener: (...args: any[]) => void): this; 18 | removeAllListeners(event?: string | symbol): this; 19 | setMaxListeners(n: number): this; 20 | getMaxListeners(): number; 21 | listeners(event: string | symbol): Function[]; 22 | rawListeners(event: string | symbol): Function[]; 23 | emit(event: string | symbol, ...args: any[]): boolean; 24 | eventNames(): Array; 25 | listenerCount(type: string | symbol): number; 26 | } 27 | } 28 | 29 | export = internal; 30 | } 31 | -------------------------------------------------------------------------------- /node_modules/@types/node/module.d.ts: -------------------------------------------------------------------------------- 1 | declare module "module" { 2 | export = NodeJS.Module; 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/@types/node/process.d.ts: -------------------------------------------------------------------------------- 1 | declare module "process" { 2 | import * as tty from "tty"; 3 | 4 | global { 5 | namespace NodeJS { 6 | // this namespace merge is here because these are specifically used 7 | // as the type for process.stdin, process.stdout, and process.stderr. 8 | // they can't live in tty.d.ts because we need to disambiguate the imported name. 9 | interface ReadStream extends tty.ReadStream {} 10 | interface WriteStream extends tty.WriteStream {} 11 | } 12 | } 13 | 14 | export = process; 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/@types/node/punycode.d.ts: -------------------------------------------------------------------------------- 1 | declare module "punycode" { 2 | function decode(string: string): string; 3 | function encode(string: string): string; 4 | function toUnicode(domain: string): string; 5 | function toASCII(domain: string): string; 6 | const ucs2: ucs2; 7 | interface ucs2 { 8 | decode(string: string): number[]; 9 | encode(codePoints: number[]): string; 10 | } 11 | const version: string; 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/@types/node/querystring.d.ts: -------------------------------------------------------------------------------- 1 | declare module "querystring" { 2 | interface StringifyOptions { 3 | encodeURIComponent?: (str: string) => string; 4 | } 5 | 6 | interface ParseOptions { 7 | maxKeys?: number; 8 | decodeURIComponent?: (str: string) => string; 9 | } 10 | 11 | interface ParsedUrlQuery { [key: string]: string | string[]; } 12 | 13 | interface ParsedUrlQueryInput { 14 | [key: string]: 15 | // The value type here is a "poor man's `unknown`". When these types support TypeScript 16 | // 3.0+, we can replace this with `unknown`. 17 | {} | null | undefined; 18 | } 19 | 20 | function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; 21 | function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; 22 | /** 23 | * The querystring.encode() function is an alias for querystring.stringify(). 24 | */ 25 | const encode: typeof stringify; 26 | /** 27 | * The querystring.decode() function is an alias for querystring.parse(). 28 | */ 29 | const decode: typeof parse; 30 | function escape(str: string): string; 31 | function unescape(str: string): string; 32 | } 33 | -------------------------------------------------------------------------------- /node_modules/@types/node/string_decoder.d.ts: -------------------------------------------------------------------------------- 1 | declare module "string_decoder" { 2 | class StringDecoder { 3 | constructor(encoding?: string); 4 | write(buffer: Buffer): string; 5 | end(buffer?: Buffer): string; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/@types/node/timers.d.ts: -------------------------------------------------------------------------------- 1 | declare module "timers" { 2 | function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; 3 | namespace setTimeout { 4 | function __promisify__(ms: number): Promise; 5 | function __promisify__(ms: number, value: T): Promise; 6 | } 7 | function clearTimeout(timeoutId: NodeJS.Timeout): void; 8 | function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; 9 | function clearInterval(intervalId: NodeJS.Timeout): void; 10 | function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate; 11 | namespace setImmediate { 12 | function __promisify__(): Promise; 13 | function __promisify__(value: T): Promise; 14 | } 15 | function clearImmediate(immediateId: NodeJS.Immediate): void; 16 | } 17 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts3.2/globals.d.ts: -------------------------------------------------------------------------------- 1 | // tslint:disable-next-line:no-bad-reference 2 | /// 3 | 4 | declare namespace NodeJS { 5 | interface HRTime { 6 | bigint(): bigint; 7 | } 8 | } 9 | 10 | interface Buffer extends Uint8Array { 11 | readBigUInt64BE(offset?: number): bigint; 12 | readBigUInt64LE(offset?: number): bigint; 13 | readBigInt64BE(offset?: number): bigint; 14 | readBigInt64LE(offset?: number): bigint; 15 | writeBigInt64BE(value: bigint, offset?: number): number; 16 | writeBigInt64LE(value: bigint, offset?: number): number; 17 | writeBigUInt64BE(value: bigint, offset?: number): number; 18 | writeBigUInt64LE(value: bigint, offset?: number): number; 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts3.2/index.d.ts: -------------------------------------------------------------------------------- 1 | // NOTE: These definitions support NodeJS and TypeScript 3.2. 2 | 3 | // NOTE: TypeScript version-specific augmentations can be found in the following paths: 4 | // - ~/base.d.ts - Shared definitions common to all TypeScript versions 5 | // - ~/index.d.ts - Definitions specific to TypeScript 2.1 6 | // - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 7 | 8 | // Reference required types from the default lib: 9 | /// 10 | /// 11 | /// 12 | /// 13 | 14 | // Base definitions for all NodeJS modules that are not specific to any version of TypeScript: 15 | // tslint:disable-next-line:no-bad-reference 16 | /// 17 | 18 | // TypeScript 3.2-specific augmentations: 19 | /// 20 | /// 21 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts3.2/util.d.ts: -------------------------------------------------------------------------------- 1 | // tslint:disable-next-line:no-bad-reference 2 | /// 3 | 4 | declare module "util" { 5 | namespace inspect { 6 | const custom: unique symbol; 7 | } 8 | namespace promisify { 9 | const custom: unique symbol; 10 | } 11 | namespace types { 12 | function isBigInt64Array(value: any): value is BigInt64Array; 13 | function isBigUint64Array(value: any): value is BigUint64Array; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/@types/ws/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 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/@types/ws/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/ws` 3 | 4 | # Summary 5 | This package contains type definitions for ws (https://github.com/websockets/ws). 6 | 7 | # Details 8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ws. 9 | 10 | ### Additional Details 11 | * Last updated: Fri, 11 Mar 2022 23:31:44 GMT 12 | * Dependencies: [@types/node](https://npmjs.com/package/@types/node) 13 | * Global values: none 14 | 15 | # Credits 16 | These definitions were written by [Paul Loyd](https://github.com/loyd), [Margus Lamp](https://github.com/mlamp), [Philippe D'Alva](https://github.com/TitaneBoy), [reduckted](https://github.com/reduckted), [teidesu](https://github.com/teidesu), [Bartosz Wojtkowiak](https://github.com/wojtkowiak), [Kyle Hensel](https://github.com/k-yle), and [Samuel Skeen](https://github.com/cwadrupldijjit). 17 | -------------------------------------------------------------------------------- /node_modules/@types/ws/index.d.mts: -------------------------------------------------------------------------------- 1 | export { createWebSocketStream, WebSocket, WebSocketServer, RawData, Data, CertMeta, VerifyClientCallbackSync, VerifyClientCallbackAsync, ClientOptions, PerMessageDeflateOptions, Event, ErrorEvent, CloseEvent, MessageEvent, EventListenerOptions, ServerOptions, AddressInfo } from "./index.js"; 2 | import WebSocket = require("./index.js"); 3 | export default WebSocket; -------------------------------------------------------------------------------- /node_modules/anymatch/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) 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/anymatch/index.d.ts: -------------------------------------------------------------------------------- 1 | type AnymatchFn = (testString: string) => boolean; 2 | type AnymatchPattern = string|RegExp|AnymatchFn; 3 | type AnymatchMatcher = AnymatchPattern|AnymatchPattern[] 4 | type AnymatchTester = { 5 | (testString: string|any[], returnIndex: true): number; 6 | (testString: string|any[]): boolean; 7 | } 8 | 9 | type PicomatchOptions = {dot: boolean}; 10 | 11 | declare const anymatch: { 12 | (matchers: AnymatchMatcher): AnymatchTester; 13 | (matchers: AnymatchMatcher, testString: null, returnIndex: true | PicomatchOptions): AnymatchTester; 14 | (matchers: AnymatchMatcher, testString: string|any[], returnIndex: true | PicomatchOptions): number; 15 | (matchers: AnymatchMatcher, testString: string|any[]): boolean; 16 | } 17 | 18 | export {AnymatchMatcher as Matcher} 19 | export {AnymatchTester as Tester} 20 | export default anymatch 21 | -------------------------------------------------------------------------------- /node_modules/anymatch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "anymatch", 3 | "version": "3.1.3", 4 | "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", 5 | "files": [ 6 | "index.js", 7 | "index.d.ts" 8 | ], 9 | "dependencies": { 10 | "normalize-path": "^3.0.0", 11 | "picomatch": "^2.0.4" 12 | }, 13 | "author": { 14 | "name": "Elan Shanker", 15 | "url": "https://github.com/es128" 16 | }, 17 | "license": "ISC", 18 | "homepage": "https://github.com/micromatch/anymatch", 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/micromatch/anymatch" 22 | }, 23 | "keywords": [ 24 | "match", 25 | "any", 26 | "string", 27 | "file", 28 | "fs", 29 | "list", 30 | "glob", 31 | "regex", 32 | "regexp", 33 | "regular", 34 | "expression", 35 | "function" 36 | ], 37 | "scripts": { 38 | "test": "nyc mocha", 39 | "mocha": "mocha" 40 | }, 41 | "devDependencies": { 42 | "mocha": "^6.1.3", 43 | "nyc": "^14.0.0" 44 | }, 45 | "engines": { 46 | "node": ">= 8" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /node_modules/binary-extensions/binary-extensions.json.d.ts: -------------------------------------------------------------------------------- 1 | declare const binaryExtensionsJson: readonly string[]; 2 | 3 | export = binaryExtensionsJson; 4 | -------------------------------------------------------------------------------- /node_modules/binary-extensions/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | List of binary file extensions. 3 | 4 | @example 5 | ``` 6 | import binaryExtensions = require('binary-extensions'); 7 | 8 | console.log(binaryExtensions); 9 | //=> ['3ds', '3g2', …] 10 | ``` 11 | */ 12 | declare const binaryExtensions: readonly string[]; 13 | 14 | export = binaryExtensions; 15 | -------------------------------------------------------------------------------- /node_modules/binary-extensions/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./binary-extensions.json'); 2 | -------------------------------------------------------------------------------- /node_modules/binary-extensions/license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.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/binary-extensions/readme.md: -------------------------------------------------------------------------------- 1 | # binary-extensions [![Build Status](https://travis-ci.org/sindresorhus/binary-extensions.svg?branch=master)](https://travis-ci.org/sindresorhus/binary-extensions) 2 | 3 | > List of binary file extensions 4 | 5 | The list is just a [JSON file](binary-extensions.json) and can be used anywhere. 6 | 7 | 8 | ## Install 9 | 10 | ``` 11 | $ npm install binary-extensions 12 | ``` 13 | 14 | 15 | ## Usage 16 | 17 | ```js 18 | const binaryExtensions = require('binary-extensions'); 19 | 20 | console.log(binaryExtensions); 21 | //=> ['3ds', '3g2', …] 22 | ``` 23 | 24 | 25 | ## Related 26 | 27 | - [is-binary-path](https://github.com/sindresorhus/is-binary-path) - Check if a filepath is a binary file 28 | - [text-extensions](https://github.com/sindresorhus/text-extensions) - List of text file extensions 29 | 30 | 31 | ## License 32 | 33 | MIT © [Sindre Sorhus](https://sindresorhus.com), [Paul Miller](https://paulmillr.com) 34 | -------------------------------------------------------------------------------- /node_modules/braces/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2018, Jon Schlinkert. 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/braces/lib/stringify.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const utils = require('./utils'); 4 | 5 | module.exports = (ast, options = {}) => { 6 | let stringify = (node, parent = {}) => { 7 | let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); 8 | let invalidNode = node.invalid === true && options.escapeInvalid === true; 9 | let output = ''; 10 | 11 | if (node.value) { 12 | if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { 13 | return '\\' + node.value; 14 | } 15 | return node.value; 16 | } 17 | 18 | if (node.value) { 19 | return node.value; 20 | } 21 | 22 | if (node.nodes) { 23 | for (let child of node.nodes) { 24 | output += stringify(child); 25 | } 26 | } 27 | return output; 28 | }; 29 | 30 | return stringify(ast); 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /node_modules/chokidar/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker 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/colors/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Original Library 4 | - Copyright (c) Marak Squires 5 | 6 | Additional Functionality 7 | - Copyright (c) Sindre Sorhus (sindresorhus.com) 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in 17 | all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /node_modules/colors/lib/index.js: -------------------------------------------------------------------------------- 1 | var colors = require('./colors'); 2 | module['exports'] = colors; 3 | 4 | // Remark: By default, colors will add style properties to String.prototype. 5 | // 6 | // If you don't wish to extend String.prototype, you can do this instead and 7 | // native String will not be touched: 8 | // 9 | // var colors = require('colors/safe); 10 | // colors.red("foo") 11 | // 12 | // 13 | require('./extendStringPrototype')(); 14 | -------------------------------------------------------------------------------- /node_modules/colors/lib/maps/america.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function() { 4 | return function(letter, i, exploded) { 5 | if (letter === ' ') return letter; 6 | switch (i%3) { 7 | case 0: return colors.red(letter); 8 | case 1: return colors.white(letter); 9 | case 2: return colors.blue(letter); 10 | } 11 | }; 12 | })(); 13 | -------------------------------------------------------------------------------- /node_modules/colors/lib/maps/rainbow.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function() { 4 | // RoY G BiV 5 | var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; 6 | return function(letter, i, exploded) { 7 | if (letter === ' ') { 8 | return letter; 9 | } else { 10 | return colors[rainbowColors[i++ % rainbowColors.length]](letter); 11 | } 12 | }; 13 | })(); 14 | 15 | -------------------------------------------------------------------------------- /node_modules/colors/lib/maps/random.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = (function() { 4 | var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 5 | 'blue', 'white', 'cyan', 'magenta']; 6 | return function(letter, i, exploded) { 7 | return letter === ' ' ? letter : 8 | colors[ 9 | available[Math.round(Math.random() * (available.length - 2))] 10 | ](letter); 11 | }; 12 | })(); 13 | -------------------------------------------------------------------------------- /node_modules/colors/lib/maps/zebra.js: -------------------------------------------------------------------------------- 1 | var colors = require('../colors'); 2 | 3 | module['exports'] = function(letter, i, exploded) { 4 | return i % 2 === 0 ? letter : colors.inverse(letter); 5 | }; 6 | -------------------------------------------------------------------------------- /node_modules/colors/lib/system/has-flag.js: -------------------------------------------------------------------------------- 1 | /* 2 | MIT License 3 | 4 | Copyright (c) Sindre Sorhus (sindresorhus.com) 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | this software and associated documentation files (the "Software"), to deal in 8 | the Software without restriction, including without limitation the rights to 9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 10 | of the Software, and to permit persons to whom the Software is furnished to do 11 | so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | */ 24 | 25 | 'use strict'; 26 | 27 | module.exports = function(flag, argv) { 28 | argv = argv || process.argv; 29 | 30 | var terminatorPos = argv.indexOf('--'); 31 | var prefix = /^-{1,2}/.test(flag) ? '' : '--'; 32 | var pos = argv.indexOf(prefix + flag); 33 | 34 | return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); 35 | }; 36 | -------------------------------------------------------------------------------- /node_modules/colors/safe.js: -------------------------------------------------------------------------------- 1 | // 2 | // Remark: Requiring this file will use the "safe" colors API, 3 | // which will not touch String.prototype. 4 | // 5 | // var colors = require('colors/safe'); 6 | // colors.red("foo") 7 | // 8 | // 9 | var colors = require('./lib/colors'); 10 | module['exports'] = colors; 11 | -------------------------------------------------------------------------------- /node_modules/colors/themes/generic-logging.js: -------------------------------------------------------------------------------- 1 | module['exports'] = { 2 | silly: 'rainbow', 3 | input: 'grey', 4 | verbose: 'cyan', 5 | prompt: 'grey', 6 | info: 'green', 7 | data: 'grey', 8 | help: 'cyan', 9 | warn: 'yellow', 10 | debug: 'blue', 11 | error: 'red', 12 | }; 13 | -------------------------------------------------------------------------------- /node_modules/fill-range/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-present, Jon Schlinkert. 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/fs-extra/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2011-2017 JP Richardson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files 6 | (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, 7 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 14 | OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 15 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/emptyDir-sync.md: -------------------------------------------------------------------------------- 1 | # emptyDirSync(dir) 2 | 3 | Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted. 4 | 5 | **Alias:** `emptydirSync()` 6 | 7 | - `dir` `` 8 | 9 | ## Example: 10 | 11 | ```js 12 | const fs = require('fs-extra') 13 | 14 | // assume this directory has a lot of files and folders 15 | fs.emptyDirSync('/tmp/some/dir') 16 | ``` 17 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/emptyDir.md: -------------------------------------------------------------------------------- 1 | # emptyDir(dir, [callback]) 2 | 3 | Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted. 4 | 5 | **Alias:** `emptydir()` 6 | 7 | - `dir` `` 8 | - `callback` `` 9 | 10 | ## Example: 11 | 12 | ```js 13 | const fs = require('fs-extra') 14 | 15 | // assume this directory has a lot of files and folders 16 | // With a callback: 17 | fs.emptyDir('/tmp/some/dir', err => { 18 | if (err) return console.error(err) 19 | 20 | console.log('success!') 21 | }) 22 | 23 | // With Promises: 24 | fs.emptyDir('/tmp/some/dir') 25 | .then(() => { 26 | console.log('success!') 27 | }) 28 | .catch(err => { 29 | console.error(err) 30 | }) 31 | 32 | // With async/await: 33 | async function example () { 34 | try { 35 | await fs.emptyDir('/tmp/some/dir') 36 | console.log('success!') 37 | } catch (err) { 38 | console.error(err) 39 | } 40 | } 41 | 42 | example() 43 | ``` 44 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/ensureDir-sync.md: -------------------------------------------------------------------------------- 1 | # ensureDirSync(dir) 2 | 3 | Ensures that the directory exists. If the directory structure does not exist, it is created. Like `mkdir -p`. 4 | 5 | **Aliases:** `mkdirsSync()`, `mkdirpSync()` 6 | 7 | - `dir` `` 8 | 9 | ## Example: 10 | 11 | ```js 12 | const fs = require('fs-extra') 13 | 14 | const dir = '/tmp/this/path/does/not/exist' 15 | fs.ensureDirSync(dir) 16 | // dir has now been created, including the directory it is to be placed in 17 | ``` 18 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/ensureDir.md: -------------------------------------------------------------------------------- 1 | # ensureDir(dir, [callback]) 2 | 3 | Ensures that the directory exists. If the directory structure does not exist, it is created. Like `mkdir -p`. 4 | 5 | **Aliases:** `mkdirs()`, `mkdirp()` 6 | 7 | - `dir` `` 8 | - `callback` `` 9 | 10 | ## Example: 11 | 12 | ```js 13 | const fs = require('fs-extra') 14 | 15 | const dir = '/tmp/this/path/does/not/exist' 16 | 17 | // With a callback: 18 | fs.ensureDir(dir, err => { 19 | console.log(err) // => null 20 | // dir has now been created, including the directory it is to be placed in 21 | }) 22 | 23 | // With Promises: 24 | fs.ensureDir(dir) 25 | .then(() => { 26 | console.log('success!') 27 | }) 28 | .catch(err => { 29 | console.error(err) 30 | }) 31 | 32 | // With async/await: 33 | async function example (directory) { 34 | try { 35 | await fs.ensureDir(directory) 36 | console.log('success!') 37 | } catch (err) { 38 | console.error(err) 39 | } 40 | } 41 | 42 | example(dir) 43 | ``` 44 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/ensureFile-sync.md: -------------------------------------------------------------------------------- 1 | # ensureFileSync(file) 2 | 3 | Ensures that the file exists. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is **NOT MODIFIED**. 4 | 5 | **Alias:** `createFileSync()` 6 | 7 | - `file` `` 8 | 9 | ## Example: 10 | 11 | ```js 12 | const fs = require('fs-extra') 13 | 14 | const file = '/tmp/this/path/does/not/exist/file.txt' 15 | fs.ensureFileSync(file) 16 | // file has now been created, including the directory it is to be placed in 17 | ``` 18 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/ensureFile.md: -------------------------------------------------------------------------------- 1 | # ensureFile(file, [callback]) 2 | 3 | Ensures that the file exists. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is **NOT MODIFIED**. 4 | 5 | **Alias:** `createFile()` 6 | 7 | - `file` `` 8 | - `callback` `` 9 | 10 | ## Example: 11 | 12 | ```js 13 | const fs = require('fs-extra') 14 | 15 | const file = '/tmp/this/path/does/not/exist/file.txt' 16 | 17 | // With a callback: 18 | fs.ensureFile(file, err => { 19 | console.log(err) // => null 20 | // file has now been created, including the directory it is to be placed in 21 | }) 22 | 23 | // With Promises: 24 | fs.ensureFile(file) 25 | .then(() => { 26 | console.log('success!') 27 | }) 28 | .catch(err => { 29 | console.error(err) 30 | }) 31 | 32 | // With async/await: 33 | async function example (f) { 34 | try { 35 | await fs.ensureFile(f) 36 | console.log('success!') 37 | } catch (err) { 38 | console.error(err) 39 | } 40 | } 41 | 42 | example(file) 43 | ``` 44 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/ensureLink-sync.md: -------------------------------------------------------------------------------- 1 | # ensureLinkSync(srcpath, dstpath) 2 | 3 | Ensures that the link exists. If the directory structure does not exist, it is created. 4 | 5 | - `srcpath` `` 6 | - `dstpath` `` 7 | 8 | ## Example: 9 | 10 | ```js 11 | const fs = require('fs-extra') 12 | 13 | const srcpath = '/tmp/file.txt' 14 | const dstpath = '/tmp/this/path/does/not/exist/file.txt' 15 | fs.ensureLinkSync(srcpath, dstpath) 16 | // link has now been created, including the directory it is to be placed in 17 | ``` 18 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/ensureLink.md: -------------------------------------------------------------------------------- 1 | # ensureLink(srcpath, dstpath, [callback]) 2 | 3 | Ensures that the link exists. If the directory structure does not exist, it is created. 4 | 5 | - `srcpath` `` 6 | - `dstpath` `` 7 | - `callback` `` 8 | 9 | ## Example: 10 | 11 | ```js 12 | const fs = require('fs-extra') 13 | 14 | const srcpath = '/tmp/file.txt' 15 | const dstpath = '/tmp/this/path/does/not/exist/file.txt' 16 | 17 | // With a callback: 18 | fs.ensureLink(srcpath, dstpath, err => { 19 | console.log(err) // => null 20 | // link has now been created, including the directory it is to be placed in 21 | }) 22 | 23 | // With Promises: 24 | fs.ensureLink(srcpath, dstpath) 25 | .then(() => { 26 | console.log('success!') 27 | }) 28 | .catch(err => { 29 | console.error(err) 30 | }) 31 | 32 | // With async/await: 33 | async function example (src, dest) { 34 | try { 35 | await fs.ensureLink(src, dest) 36 | console.log('success!') 37 | } catch (err) { 38 | console.error(err) 39 | } 40 | } 41 | 42 | example(srcpath, dstpath) 43 | ``` 44 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/ensureSymlink-sync.md: -------------------------------------------------------------------------------- 1 | # ensureSymlinkSync(srcpath, dstpath, [type]) 2 | 3 | Ensures that the symlink exists. If the directory structure does not exist, it is created. 4 | 5 | - `srcpath` `` 6 | - `dstpath` `` 7 | - `type` `` 8 | 9 | ## Example: 10 | 11 | ```js 12 | const fs = require('fs-extra') 13 | 14 | const srcpath = '/tmp/file.txt' 15 | const dstpath = '/tmp/this/path/does/not/exist/file.txt' 16 | fs.ensureSymlinkSync(srcpath, dstpath) 17 | // symlink has now been created, including the directory it is to be placed in 18 | ``` 19 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/ensureSymlink.md: -------------------------------------------------------------------------------- 1 | # ensureSymlink(srcpath, dstpath, [type, callback]) 2 | 3 | Ensures that the symlink exists. If the directory structure does not exist, it is created. 4 | 5 | - `srcpath` `` 6 | - `dstpath` `` 7 | - `type` `` 8 | - `callback` `` 9 | 10 | ## Example: 11 | 12 | ```js 13 | const fs = require('fs-extra') 14 | 15 | const srcpath = '/tmp/file.txt' 16 | const dstpath = '/tmp/this/path/does/not/exist/file.txt' 17 | 18 | // With a callback: 19 | fs.ensureSymlink(srcpath, dstpath, err => { 20 | console.log(err) // => null 21 | // symlink has now been created, including the directory it is to be placed in 22 | }) 23 | 24 | // With Promises: 25 | fs.ensureSymlink(srcpath, dstpath) 26 | .then(() => { 27 | console.log('success!') 28 | }) 29 | .catch(err => { 30 | console.error(err) 31 | }) 32 | 33 | // With async/await: 34 | async function example (src, dest) { 35 | try { 36 | await fs.ensureSymlink(src, dest) 37 | console.log('success!') 38 | } catch (err) { 39 | console.error(err) 40 | } 41 | } 42 | 43 | example(srcpath, dstpath) 44 | ``` 45 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/fs-read-write.md: -------------------------------------------------------------------------------- 1 | # About `fs.read()` & `fs.write()` 2 | 3 | [`fs.read()`](https://nodejs.org/api/fs.html#fs_fs_read_fd_buffer_offset_length_position_callback) & [`fs.write()`](https://nodejs.org/api/fs.html#fs_fs_write_fd_buffer_offset_length_position_callback) are different from other `fs` methods in that their callbacks are called with 3 arguments instead of the usual 2 arguments. 4 | 5 | If you're using them with callbacks, they will behave as usual. However, their promise usage is a little different. `fs-extra` promisifies these methods like [`util.promisify()`](https://nodejs.org/api/util.html#util_util_promisify_original) (only available in Node 8+) does. 6 | 7 | Here's the example promise usage: 8 | 9 | ## `fs.read()` 10 | 11 | ```js 12 | // With Promises: 13 | fs.read(fd, buffer, offset, length, position) 14 | .then(results => { 15 | console.log(results) 16 | // { bytesRead: 20, buffer: } 17 | }) 18 | 19 | // With async/await: 20 | async function example () { 21 | const { bytesRead, buffer } = await fs.read(fd, Buffer.alloc(length), offset, length, position) 22 | } 23 | ``` 24 | 25 | ## `fs.write()` 26 | 27 | ```js 28 | // With Promises: 29 | fs.write(fd, buffer, offset, length, position) 30 | .then(results => { 31 | console.log(results) 32 | // { bytesWritten: 20, buffer: } 33 | }) 34 | 35 | // With async/await: 36 | async function example () { 37 | const { bytesWritten, buffer } = await fs.write(fd, Buffer.alloc(length), offset, length, position) 38 | } 39 | ``` 40 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/move-sync.md: -------------------------------------------------------------------------------- 1 | # moveSync(src, dest, [options]) 2 | 3 | Moves a file or directory, even across devices. 4 | 5 | - `src` `` 6 | - `dest` `` 7 | - `options` `` 8 | - `overwrite` ``: overwrite existing file or directory, default is `false`. 9 | 10 | ## Example: 11 | 12 | ```js 13 | const fs = require('fs-extra') 14 | 15 | fs.moveSync('/tmp/somefile', '/tmp/does/not/exist/yet/somefile') 16 | ``` 17 | 18 | **Using `overwrite` option** 19 | 20 | ```js 21 | const fs = require('fs-extra') 22 | 23 | fs.moveSync('/tmp/somedir', '/tmp/may/already/existed/somedir', { overwrite: true }) 24 | ``` 25 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/move.md: -------------------------------------------------------------------------------- 1 | # move(src, dest, [options, callback]) 2 | 3 | Moves a file or directory, even across devices. 4 | 5 | - `src` `` 6 | - `dest` `` 7 | - `options` `` 8 | - `overwrite` ``: overwrite existing file or directory, default is `false`. 9 | - `callback` `` 10 | 11 | ## Example: 12 | 13 | ```js 14 | const fs = require('fs-extra') 15 | 16 | const srcpath = '/tmp/file.txt' 17 | const dstpath = '/tmp/this/path/does/not/exist/file.txt' 18 | 19 | // With a callback: 20 | fs.move(srcpath, dstpath, err => { 21 | if (err) return console.error(err) 22 | 23 | console.log('success!') 24 | }) 25 | 26 | // With Promises: 27 | fs.move(srcpath, dstpath) 28 | .then(() => { 29 | console.log('success!') 30 | }) 31 | .catch(err => { 32 | console.error(err) 33 | }) 34 | 35 | // With async/await: 36 | async function example (src, dest) { 37 | try { 38 | await fs.move(srcpath, dstpath) 39 | console.log('success!') 40 | } catch (err) { 41 | console.error(err) 42 | } 43 | } 44 | 45 | example(srcpath, dstpath) 46 | ``` 47 | 48 | **Using `overwrite` option** 49 | 50 | ```js 51 | const fs = require('fs-extra') 52 | 53 | fs.move('/tmp/somedir', '/tmp/may/already/existed/somedir', { overwrite: true }, err => { 54 | if (err) return console.error(err) 55 | 56 | console.log('success!') 57 | }) 58 | ``` 59 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/outputFile-sync.md: -------------------------------------------------------------------------------- 1 | # outputFileSync(file, data, [options]) 2 | 3 | Almost the same as `writeFileSync` (i.e. it [overwrites](http://pages.citebite.com/v2o5n8l2f5reb)), except that if the parent directory does not exist, it's created. `file` must be a file path (a buffer or a file descriptor is not allowed). `options` are what you'd pass to [`fs.writeFileSync()`](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options). 4 | 5 | - `file` `` 6 | - `data` ` | | ` 7 | - `options` ` | ` 8 | 9 | ## Example: 10 | 11 | ```js 12 | const fs = require('fs-extra') 13 | 14 | const file = '/tmp/this/path/does/not/exist/file.txt' 15 | fs.outputFileSync(file, 'hello!') 16 | 17 | const data = fs.readFileSync(file, 'utf8') 18 | console.log(data) // => hello! 19 | ``` 20 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/outputFile.md: -------------------------------------------------------------------------------- 1 | # outputFile(file, data, [options, callback]) 2 | 3 | Almost the same as `writeFile` (i.e. it [overwrites](http://pages.citebite.com/v2o5n8l2f5reb)), except that if the parent directory does not exist, it's created. `file` must be a file path (a buffer or a file descriptor is not allowed). `options` are what you'd pass to [`fs.writeFile()`](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback). 4 | 5 | - `file` `` 6 | - `data` ` | | ` 7 | - `options` ` | ` 8 | - `callback` `` 9 | 10 | ## Example: 11 | 12 | ```js 13 | const fs = require('fs-extra') 14 | 15 | const file = '/tmp/this/path/does/not/exist/file.txt' 16 | 17 | // With a callback: 18 | fs.outputFile(file, 'hello!', err => { 19 | console.log(err) // => null 20 | 21 | fs.readFile(file, 'utf8', (err, data) => { 22 | if (err) return console.error(err) 23 | console.log(data) // => hello! 24 | }) 25 | }) 26 | 27 | // With Promises: 28 | fs.outputFile(file, 'hello!') 29 | .then(() => fs.readFile(file, 'utf8')) 30 | .then(data => { 31 | console.log(data) // => hello! 32 | }) 33 | .catch(err => { 34 | console.error(err) 35 | }) 36 | 37 | // With async/await: 38 | async function example (f) { 39 | try { 40 | await fs.outputFile(f, 'hello!') 41 | 42 | const data = await fs.readFile(f, 'utf8') 43 | 44 | console.log(data) // => hello! 45 | } catch (err) { 46 | console.error(err) 47 | } 48 | } 49 | 50 | example(file) 51 | ``` 52 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/outputJson-sync.md: -------------------------------------------------------------------------------- 1 | # outputJsonSync(file, object, [options]) 2 | 3 | Almost the same as [`writeJsonSync`](writeJson-sync.md), except that if the directory does not exist, it's created. 4 | 5 | **Alias:** `outputJSONSync()` 6 | 7 | - `file` `` 8 | - `object` `` 9 | - `options` `` 10 | - `spaces` `` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info. 11 | - `EOL` `` Set EOL character. Default is `\n`. 12 | - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) 13 | - Also accepts [`fs.writeFileSync` options](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) 14 | 15 | ## Example: 16 | 17 | ```js 18 | const fs = require('fs-extra') 19 | 20 | const file = '/tmp/this/path/does/not/exist/file.json' 21 | fs.outputJsonSync(file, {name: 'JP'}) 22 | 23 | const data = fs.readJsonSync(file) 24 | console.log(data.name) // => JP 25 | ``` 26 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/pathExists-sync.md: -------------------------------------------------------------------------------- 1 | # pathExistsSync(file) 2 | 3 | An alias for [`fs.existsSync()`](https://nodejs.org/api/fs.html#fs_fs_existssync_path), created for consistency with [`pathExists()`](pathExists.md). 4 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/pathExists.md: -------------------------------------------------------------------------------- 1 | # pathExists(file[, callback]) 2 | 3 | Test whether or not the given path exists by checking with the file system. Like [`fs.exists`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback), but with a normal callback signature (err, exists). Uses `fs.access` under the hood. 4 | 5 | - `file` `` 6 | - `callback` `` 7 | 8 | ## Example: 9 | 10 | ```js 11 | const fs = require('fs-extra') 12 | 13 | const file = '/tmp/this/path/does/not/exist/file.txt' 14 | 15 | // With a callback: 16 | fs.pathExists(file, (err, exists) => { 17 | console.log(err) // => null 18 | console.log(exists) // => false 19 | }) 20 | 21 | // Promise usage: 22 | fs.pathExists(file) 23 | .then(exists => console.log(exists)) // => false 24 | 25 | // With async/await: 26 | async function example (f) { 27 | const exists = await fs.pathExists(f) 28 | 29 | console.log(exists) // => false 30 | } 31 | 32 | example(file) 33 | ``` 34 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/readJson-sync.md: -------------------------------------------------------------------------------- 1 | # readJsonSync(file, [options]) 2 | 3 | Reads a JSON file and then parses it into an object. `options` are the same 4 | that you'd pass to [`jsonFile.readFileSync`](https://github.com/jprichardson/node-jsonfile#readfilesyncfilename-options). 5 | 6 | **Alias:** `readJSONSync()` 7 | 8 | - `file` `` 9 | - `options` `` 10 | 11 | ## Example: 12 | 13 | ```js 14 | const fs = require('fs-extra') 15 | 16 | const packageObj = fs.readJsonSync('./package.json') 17 | console.log(packageObj.version) // => 2.0.0 18 | ``` 19 | 20 | --- 21 | 22 | `readJsonSync()` can take a `throws` option set to `false` and it won't throw if the JSON is invalid. Example: 23 | 24 | ```js 25 | const fs = require('fs-extra') 26 | 27 | const file = '/tmp/some-invalid.json' 28 | const data = '{not valid JSON' 29 | fs.writeFileSync(file, data) 30 | 31 | const obj = fs.readJsonSync(file, { throws: false }) 32 | console.log(obj) // => null 33 | ``` 34 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/remove-sync.md: -------------------------------------------------------------------------------- 1 | # removeSync(path) 2 | 3 | Removes a file or directory. The directory can have contents. Like `rm -rf`. 4 | 5 | - `path` `` 6 | 7 | ## Example: 8 | 9 | ```js 10 | const fs = require('fs-extra') 11 | 12 | // remove file 13 | fs.removeSync('/tmp/myfile') 14 | 15 | fs.removeSync('/home/jprichardson') // I just deleted my entire HOME directory. 16 | ``` 17 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/remove.md: -------------------------------------------------------------------------------- 1 | # remove(path, [callback]) 2 | 3 | Removes a file or directory. The directory can have contents. Like `rm -rf`. 4 | 5 | - `path` `` 6 | - `callback` `` 7 | 8 | ## Example: 9 | 10 | ```js 11 | const fs = require('fs-extra') 12 | 13 | // remove file 14 | // With a callback: 15 | fs.remove('/tmp/myfile', err => { 16 | if (err) return console.error(err) 17 | 18 | console.log('success!') 19 | }) 20 | 21 | fs.remove('/home/jprichardson', err => { 22 | if (err) return console.error(err) 23 | 24 | console.log('success!') // I just deleted my entire HOME directory. 25 | }) 26 | 27 | // With Promises: 28 | fs.remove('/tmp/myfile') 29 | .then(() => { 30 | console.log('success!') 31 | }) 32 | .catch(err => { 33 | console.error(err) 34 | }) 35 | 36 | // With async/await: 37 | async function example (src, dest) { 38 | try { 39 | await fs.remove('/tmp/myfile') 40 | console.log('success!') 41 | } catch (err) { 42 | console.error(err) 43 | } 44 | } 45 | 46 | example() 47 | ``` 48 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/writeJson-sync.md: -------------------------------------------------------------------------------- 1 | # writeJsonSync(file, object, [options]) 2 | 3 | Writes an object to a JSON file. 4 | 5 | **Alias:** `writeJSONSync()` 6 | 7 | - `file` `` 8 | - `object` `` 9 | - `options` `` 10 | - `spaces` `` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info. 11 | - `EOL` `` Set EOL character. Default is `\n`. 12 | - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) 13 | - Also accepts [`fs.writeFileSync` options](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) 14 | 15 | ## Example: 16 | 17 | ```js 18 | const fs = require('fs-extra') 19 | 20 | fs.writeJsonSync('./package.json', {name: 'fs-extra'}) 21 | ``` 22 | --- 23 | 24 | **See also:** [`outputJsonSync()`](outputJson-sync.md) 25 | -------------------------------------------------------------------------------- /node_modules/fs-extra/docs/writeJson.md: -------------------------------------------------------------------------------- 1 | # writeJson(file, object, [options, callback]) 2 | 3 | Writes an object to a JSON file. 4 | 5 | **Alias:** `writeJSON()` 6 | 7 | - `file` `` 8 | - `object` `` 9 | - `options` `` 10 | - `spaces` `` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info. 11 | - `EOL` `` Set EOL character. Default is `\n`. 12 | - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) 13 | - Also accepts [`fs.writeFile` options](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) 14 | - `callback` `` 15 | 16 | ## Example: 17 | 18 | ```js 19 | const fs = require('fs-extra') 20 | 21 | // With a callback: 22 | fs.writeJson('./package.json', {name: 'fs-extra'}, err => { 23 | if (err) return console.error(err) 24 | 25 | console.log('success!') 26 | }) 27 | 28 | // With Promises: 29 | fs.writeJson('./package.json', {name: 'fs-extra'}) 30 | .then(() => { 31 | console.log('success!') 32 | }) 33 | .catch(err => { 34 | console.error(err) 35 | }) 36 | 37 | // With async/await: 38 | async function example () { 39 | try { 40 | await fs.writeJson('./package.json', {name: 'fs-extra'}) 41 | console.log('success!') 42 | } catch (err) { 43 | console.error(err) 44 | } 45 | } 46 | 47 | example() 48 | ``` 49 | 50 | --- 51 | 52 | **See also:** [`outputJson()`](outputJson.md) 53 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/copy-sync/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | copySync: require('./copy-sync') 5 | } 6 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/copy/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const u = require('universalify').fromCallback 4 | module.exports = { 5 | copy: u(require('./copy')) 6 | } 7 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/empty/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const u = require('universalify').fromCallback 4 | const fs = require('fs') 5 | const path = require('path') 6 | const mkdir = require('../mkdirs') 7 | const remove = require('../remove') 8 | 9 | const emptyDir = u(function emptyDir (dir, callback) { 10 | callback = callback || function () {} 11 | fs.readdir(dir, (err, items) => { 12 | if (err) return mkdir.mkdirs(dir, callback) 13 | 14 | items = items.map(item => path.join(dir, item)) 15 | 16 | deleteItem() 17 | 18 | function deleteItem () { 19 | const item = items.pop() 20 | if (!item) return callback() 21 | remove.remove(item, err => { 22 | if (err) return callback(err) 23 | deleteItem() 24 | }) 25 | } 26 | }) 27 | }) 28 | 29 | function emptyDirSync (dir) { 30 | let items 31 | try { 32 | items = fs.readdirSync(dir) 33 | } catch (err) { 34 | return mkdir.mkdirsSync(dir) 35 | } 36 | 37 | items.forEach(item => { 38 | item = path.join(dir, item) 39 | remove.removeSync(item) 40 | }) 41 | } 42 | 43 | module.exports = { 44 | emptyDirSync, 45 | emptydirSync: emptyDirSync, 46 | emptyDir, 47 | emptydir: emptyDir 48 | } 49 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/ensure/file.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const u = require('universalify').fromCallback 4 | const path = require('path') 5 | const fs = require('graceful-fs') 6 | const mkdir = require('../mkdirs') 7 | const pathExists = require('../path-exists').pathExists 8 | 9 | function createFile (file, callback) { 10 | function makeFile () { 11 | fs.writeFile(file, '', err => { 12 | if (err) return callback(err) 13 | callback() 14 | }) 15 | } 16 | 17 | fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err 18 | if (!err && stats.isFile()) return callback() 19 | const dir = path.dirname(file) 20 | pathExists(dir, (err, dirExists) => { 21 | if (err) return callback(err) 22 | if (dirExists) return makeFile() 23 | mkdir.mkdirs(dir, err => { 24 | if (err) return callback(err) 25 | makeFile() 26 | }) 27 | }) 28 | }) 29 | } 30 | 31 | function createFileSync (file) { 32 | let stats 33 | try { 34 | stats = fs.statSync(file) 35 | } catch (e) {} 36 | if (stats && stats.isFile()) return 37 | 38 | const dir = path.dirname(file) 39 | if (!fs.existsSync(dir)) { 40 | mkdir.mkdirsSync(dir) 41 | } 42 | 43 | fs.writeFileSync(file, '') 44 | } 45 | 46 | module.exports = { 47 | createFile: u(createFile), 48 | createFileSync 49 | } 50 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/ensure/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const file = require('./file') 4 | const link = require('./link') 5 | const symlink = require('./symlink') 6 | 7 | module.exports = { 8 | // file 9 | createFile: file.createFile, 10 | createFileSync: file.createFileSync, 11 | ensureFile: file.createFile, 12 | ensureFileSync: file.createFileSync, 13 | // link 14 | createLink: link.createLink, 15 | createLinkSync: link.createLinkSync, 16 | ensureLink: link.createLink, 17 | ensureLinkSync: link.createLinkSync, 18 | // symlink 19 | createSymlink: symlink.createSymlink, 20 | createSymlinkSync: symlink.createSymlinkSync, 21 | ensureSymlink: symlink.createSymlink, 22 | ensureSymlinkSync: symlink.createSymlinkSync 23 | } 24 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/ensure/symlink-type.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const fs = require('graceful-fs') 4 | 5 | function symlinkType (srcpath, type, callback) { 6 | callback = (typeof type === 'function') ? type : callback 7 | type = (typeof type === 'function') ? false : type 8 | if (type) return callback(null, type) 9 | fs.lstat(srcpath, (err, stats) => { 10 | if (err) return callback(null, 'file') 11 | type = (stats && stats.isDirectory()) ? 'dir' : 'file' 12 | callback(null, type) 13 | }) 14 | } 15 | 16 | function symlinkTypeSync (srcpath, type) { 17 | let stats 18 | 19 | if (type) return type 20 | try { 21 | stats = fs.lstatSync(srcpath) 22 | } catch (e) { 23 | return 'file' 24 | } 25 | return (stats && stats.isDirectory()) ? 'dir' : 'file' 26 | } 27 | 28 | module.exports = { 29 | symlinkType, 30 | symlinkTypeSync 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = Object.assign( 4 | {}, 5 | // Export promiseified graceful-fs: 6 | require('./fs'), 7 | // Export extra methods: 8 | require('./copy-sync'), 9 | require('./copy'), 10 | require('./empty'), 11 | require('./ensure'), 12 | require('./json'), 13 | require('./mkdirs'), 14 | require('./move-sync'), 15 | require('./move'), 16 | require('./output'), 17 | require('./path-exists'), 18 | require('./remove') 19 | ) 20 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/json/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const u = require('universalify').fromCallback 4 | const jsonFile = require('./jsonfile') 5 | 6 | jsonFile.outputJson = u(require('./output-json')) 7 | jsonFile.outputJsonSync = require('./output-json-sync') 8 | // aliases 9 | jsonFile.outputJSON = jsonFile.outputJson 10 | jsonFile.outputJSONSync = jsonFile.outputJsonSync 11 | jsonFile.writeJSON = jsonFile.writeJson 12 | jsonFile.writeJSONSync = jsonFile.writeJsonSync 13 | jsonFile.readJSON = jsonFile.readJson 14 | jsonFile.readJSONSync = jsonFile.readJsonSync 15 | 16 | module.exports = jsonFile 17 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/json/jsonfile.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const u = require('universalify').fromCallback 4 | const jsonFile = require('jsonfile') 5 | 6 | module.exports = { 7 | // jsonfile exports 8 | readJson: u(jsonFile.readFile), 9 | readJsonSync: jsonFile.readFileSync, 10 | writeJson: u(jsonFile.writeFile), 11 | writeJsonSync: jsonFile.writeFileSync 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/json/output-json-sync.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const fs = require('graceful-fs') 4 | const path = require('path') 5 | const mkdir = require('../mkdirs') 6 | const jsonFile = require('./jsonfile') 7 | 8 | function outputJsonSync (file, data, options) { 9 | const dir = path.dirname(file) 10 | 11 | if (!fs.existsSync(dir)) { 12 | mkdir.mkdirsSync(dir) 13 | } 14 | 15 | jsonFile.writeJsonSync(file, data, options) 16 | } 17 | 18 | module.exports = outputJsonSync 19 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/json/output-json.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const path = require('path') 4 | const mkdir = require('../mkdirs') 5 | const pathExists = require('../path-exists').pathExists 6 | const jsonFile = require('./jsonfile') 7 | 8 | function outputJson (file, data, options, callback) { 9 | if (typeof options === 'function') { 10 | callback = options 11 | options = {} 12 | } 13 | 14 | const dir = path.dirname(file) 15 | 16 | pathExists(dir, (err, itDoes) => { 17 | if (err) return callback(err) 18 | if (itDoes) return jsonFile.writeJson(file, data, options, callback) 19 | 20 | mkdir.mkdirs(dir, err => { 21 | if (err) return callback(err) 22 | jsonFile.writeJson(file, data, options, callback) 23 | }) 24 | }) 25 | } 26 | 27 | module.exports = outputJson 28 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/mkdirs/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const u = require('universalify').fromCallback 3 | const mkdirs = u(require('./mkdirs')) 4 | const mkdirsSync = require('./mkdirs-sync') 5 | 6 | module.exports = { 7 | mkdirs, 8 | mkdirsSync, 9 | // alias 10 | mkdirp: mkdirs, 11 | mkdirpSync: mkdirsSync, 12 | ensureDir: mkdirs, 13 | ensureDirSync: mkdirsSync 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const fs = require('graceful-fs') 4 | const path = require('path') 5 | const invalidWin32Path = require('./win32').invalidWin32Path 6 | 7 | const o777 = parseInt('0777', 8) 8 | 9 | function mkdirsSync (p, opts, made) { 10 | if (!opts || typeof opts !== 'object') { 11 | opts = { mode: opts } 12 | } 13 | 14 | let mode = opts.mode 15 | const xfs = opts.fs || fs 16 | 17 | if (process.platform === 'win32' && invalidWin32Path(p)) { 18 | const errInval = new Error(p + ' contains invalid WIN32 path characters.') 19 | errInval.code = 'EINVAL' 20 | throw errInval 21 | } 22 | 23 | if (mode === undefined) { 24 | mode = o777 & (~process.umask()) 25 | } 26 | if (!made) made = null 27 | 28 | p = path.resolve(p) 29 | 30 | try { 31 | xfs.mkdirSync(p, mode) 32 | made = made || p 33 | } catch (err0) { 34 | if (err0.code === 'ENOENT') { 35 | if (path.dirname(p) === p) throw err0 36 | made = mkdirsSync(path.dirname(p), opts, made) 37 | mkdirsSync(p, opts, made) 38 | } else { 39 | // In the case of any other error, just see if there's a dir there 40 | // already. If so, then hooray! If not, then something is borked. 41 | let stat 42 | try { 43 | stat = xfs.statSync(p) 44 | } catch (err1) { 45 | throw err0 46 | } 47 | if (!stat.isDirectory()) throw err0 48 | } 49 | } 50 | 51 | return made 52 | } 53 | 54 | module.exports = mkdirsSync 55 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/mkdirs/win32.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const path = require('path') 4 | 5 | // get drive on windows 6 | function getRootPath (p) { 7 | p = path.normalize(path.resolve(p)).split(path.sep) 8 | if (p.length > 0) return p[0] 9 | return null 10 | } 11 | 12 | // http://stackoverflow.com/a/62888/10333 contains more accurate 13 | // TODO: expand to include the rest 14 | const INVALID_PATH_CHARS = /[<>:"|?*]/ 15 | 16 | function invalidWin32Path (p) { 17 | const rp = getRootPath(p) 18 | p = p.replace(rp, '') 19 | return INVALID_PATH_CHARS.test(p) 20 | } 21 | 22 | module.exports = { 23 | getRootPath, 24 | invalidWin32Path 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/output/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const u = require('universalify').fromCallback 4 | const fs = require('graceful-fs') 5 | const path = require('path') 6 | const mkdir = require('../mkdirs') 7 | const pathExists = require('../path-exists').pathExists 8 | 9 | function outputFile (file, data, encoding, callback) { 10 | if (typeof encoding === 'function') { 11 | callback = encoding 12 | encoding = 'utf8' 13 | } 14 | 15 | const dir = path.dirname(file) 16 | pathExists(dir, (err, itDoes) => { 17 | if (err) return callback(err) 18 | if (itDoes) return fs.writeFile(file, data, encoding, callback) 19 | 20 | mkdir.mkdirs(dir, err => { 21 | if (err) return callback(err) 22 | 23 | fs.writeFile(file, data, encoding, callback) 24 | }) 25 | }) 26 | } 27 | 28 | function outputFileSync (file, ...args) { 29 | const dir = path.dirname(file) 30 | if (fs.existsSync(dir)) { 31 | return fs.writeFileSync(file, ...args) 32 | } 33 | mkdir.mkdirsSync(dir) 34 | fs.writeFileSync(file, ...args) 35 | } 36 | 37 | module.exports = { 38 | outputFile: u(outputFile), 39 | outputFileSync 40 | } 41 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/path-exists/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const u = require('universalify').fromPromise 3 | const fs = require('../fs') 4 | 5 | function pathExists (path) { 6 | return fs.access(path).then(() => true).catch(() => false) 7 | } 8 | 9 | module.exports = { 10 | pathExists: u(pathExists), 11 | pathExistsSync: fs.existsSync 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/remove/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const u = require('universalify').fromCallback 4 | const rimraf = require('./rimraf') 5 | 6 | module.exports = { 7 | remove: u(rimraf), 8 | removeSync: rimraf.sync 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/fs-extra/lib/util/buffer.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | /* eslint-disable node/no-deprecated-api */ 3 | module.exports = function (size) { 4 | if (typeof Buffer.allocUnsafe === 'function') { 5 | try { 6 | return Buffer.allocUnsafe(size) 7 | } catch (e) { 8 | return new Buffer(size) 9 | } 10 | } 11 | return new Buffer(size) 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/fsevents/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | ----------- 3 | 4 | Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/fsevents/fsevents.d.ts: -------------------------------------------------------------------------------- 1 | declare type Event = "created" | "cloned" | "modified" | "deleted" | "moved" | "root-changed" | "unknown"; 2 | declare type Type = "file" | "directory" | "symlink"; 3 | declare type FileChanges = { 4 | inode: boolean; 5 | finder: boolean; 6 | access: boolean; 7 | xattrs: boolean; 8 | }; 9 | declare type Info = { 10 | event: Event; 11 | path: string; 12 | type: Type; 13 | changes: FileChanges; 14 | flags: number; 15 | }; 16 | declare type WatchHandler = (path: string, flags: number, id: string) => void; 17 | export declare function watch(path: string, handler: WatchHandler): () => Promise; 18 | export declare function watch(path: string, since: number, handler: WatchHandler): () => Promise; 19 | export declare function getInfo(path: string, flags: number): Info; 20 | export declare const constants: { 21 | None: 0x00000000; 22 | MustScanSubDirs: 0x00000001; 23 | UserDropped: 0x00000002; 24 | KernelDropped: 0x00000004; 25 | EventIdsWrapped: 0x00000008; 26 | HistoryDone: 0x00000010; 27 | RootChanged: 0x00000020; 28 | Mount: 0x00000040; 29 | Unmount: 0x00000080; 30 | ItemCreated: 0x00000100; 31 | ItemRemoved: 0x00000200; 32 | ItemInodeMetaMod: 0x00000400; 33 | ItemRenamed: 0x00000800; 34 | ItemModified: 0x00001000; 35 | ItemFinderInfoMod: 0x00002000; 36 | ItemChangeOwner: 0x00004000; 37 | ItemXattrMod: 0x00008000; 38 | ItemIsFile: 0x00010000; 39 | ItemIsDir: 0x00020000; 40 | ItemIsSymlink: 0x00040000; 41 | ItemIsHardlink: 0x00100000; 42 | ItemIsLastHardlink: 0x00200000; 43 | OwnEvent: 0x00080000; 44 | ItemCloned: 0x00400000; 45 | }; 46 | export {}; 47 | -------------------------------------------------------------------------------- /node_modules/fsevents/fsevents.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kode/khamake/6a859252b7ef6250f43d0a410e44e7ff1e538b2c/node_modules/fsevents/fsevents.node -------------------------------------------------------------------------------- /node_modules/fsevents/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fsevents", 3 | "version": "2.3.3", 4 | "description": "Native Access to MacOS FSEvents", 5 | "main": "fsevents.js", 6 | "types": "fsevents.d.ts", 7 | "os": [ 8 | "darwin" 9 | ], 10 | "files": [ 11 | "fsevents.d.ts", 12 | "fsevents.js", 13 | "fsevents.node" 14 | ], 15 | "engines": { 16 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 17 | }, 18 | "scripts": { 19 | "clean": "node-gyp clean && rm -f fsevents.node", 20 | "build": "node-gyp clean && rm -f fsevents.node && node-gyp rebuild && node-gyp clean", 21 | "test": "/bin/bash ./test.sh 2>/dev/null", 22 | "prepublishOnly": "npm run build" 23 | }, 24 | "repository": { 25 | "type": "git", 26 | "url": "https://github.com/fsevents/fsevents.git" 27 | }, 28 | "keywords": [ 29 | "fsevents", 30 | "mac" 31 | ], 32 | "contributors": [ 33 | { 34 | "name": "Philipp Dunkel", 35 | "email": "pip@pipobscure.com" 36 | }, 37 | { 38 | "name": "Ben Noordhuis", 39 | "email": "info@bnoordhuis.nl" 40 | }, 41 | { 42 | "name": "Elan Shankar", 43 | "email": "elan.shanker@gmail.com" 44 | }, 45 | { 46 | "name": "Miroslav Bajtoš", 47 | "email": "mbajtoss@gmail.com" 48 | }, 49 | { 50 | "name": "Paul Miller", 51 | "url": "https://paulmillr.com" 52 | } 53 | ], 54 | "license": "MIT", 55 | "bugs": { 56 | "url": "https://github.com/fsevents/fsevents/issues" 57 | }, 58 | "homepage": "https://github.com/fsevents/fsevents", 59 | "devDependencies": { 60 | "node-gyp": "^9.4.0" 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /node_modules/glob-parent/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) 2015, 2019 Elan Shanker 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/glob-parent/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var isGlob = require('is-glob'); 4 | var pathPosixDirname = require('path').posix.dirname; 5 | var isWin32 = require('os').platform() === 'win32'; 6 | 7 | var slash = '/'; 8 | var backslash = /\\/g; 9 | var enclosure = /[\{\[].*[\}\]]$/; 10 | var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; 11 | var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; 12 | 13 | /** 14 | * @param {string} str 15 | * @param {Object} opts 16 | * @param {boolean} [opts.flipBackslashes=true] 17 | * @returns {string} 18 | */ 19 | module.exports = function globParent(str, opts) { 20 | var options = Object.assign({ flipBackslashes: true }, opts); 21 | 22 | // flip windows path separators 23 | if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { 24 | str = str.replace(backslash, slash); 25 | } 26 | 27 | // special case for strings ending in enclosure containing path separator 28 | if (enclosure.test(str)) { 29 | str += slash; 30 | } 31 | 32 | // preserves full path in case of trailing path separator 33 | str += 'a'; 34 | 35 | // remove path parts that are globby 36 | do { 37 | str = pathPosixDirname(str); 38 | } while (isGlob(str) || globby.test(str)); 39 | 40 | // remove escape chars and return result 41 | return str.replace(escaped, '$1'); 42 | }; 43 | -------------------------------------------------------------------------------- /node_modules/glob-parent/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "glob-parent", 3 | "version": "5.1.2", 4 | "description": "Extract the non-magic parent path from a glob string.", 5 | "author": "Gulp Team (https://gulpjs.com/)", 6 | "contributors": [ 7 | "Elan Shanker (https://github.com/es128)", 8 | "Blaine Bublitz " 9 | ], 10 | "repository": "gulpjs/glob-parent", 11 | "license": "ISC", 12 | "engines": { 13 | "node": ">= 6" 14 | }, 15 | "main": "index.js", 16 | "files": [ 17 | "LICENSE", 18 | "index.js" 19 | ], 20 | "scripts": { 21 | "lint": "eslint .", 22 | "pretest": "npm run lint", 23 | "test": "nyc mocha --async-only", 24 | "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", 25 | "coveralls": "nyc report --reporter=text-lcov | coveralls" 26 | }, 27 | "dependencies": { 28 | "is-glob": "^4.0.1" 29 | }, 30 | "devDependencies": { 31 | "coveralls": "^3.0.11", 32 | "eslint": "^2.13.1", 33 | "eslint-config-gulp": "^3.0.1", 34 | "expect": "^1.20.2", 35 | "mocha": "^6.0.2", 36 | "nyc": "^13.3.0" 37 | }, 38 | "keywords": [ 39 | "glob", 40 | "parent", 41 | "strip", 42 | "path", 43 | "dirname", 44 | "directory", 45 | "base", 46 | "wildcard" 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /node_modules/graceful-fs/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, 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/graceful-fs/fs.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var fs = require('fs') 4 | 5 | module.exports = clone(fs) 6 | 7 | function clone (obj) { 8 | if (obj === null || typeof obj !== 'object') 9 | return obj 10 | 11 | if (obj instanceof Object) 12 | var copy = { __proto__: obj.__proto__ } 13 | else 14 | var copy = Object.create(null) 15 | 16 | Object.getOwnPropertyNames(obj).forEach(function (key) { 17 | Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) 18 | }) 19 | 20 | return copy 21 | } 22 | -------------------------------------------------------------------------------- /node_modules/is-binary-path/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Check if a file path is a binary file. 3 | 4 | @example 5 | ``` 6 | import isBinaryPath = require('is-binary-path'); 7 | 8 | isBinaryPath('source/unicorn.png'); 9 | //=> true 10 | 11 | isBinaryPath('source/unicorn.txt'); 12 | //=> false 13 | ``` 14 | */ 15 | declare function isBinaryPath(filePath: string): boolean; 16 | 17 | export = isBinaryPath; 18 | -------------------------------------------------------------------------------- /node_modules/is-binary-path/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const path = require('path'); 3 | const binaryExtensions = require('binary-extensions'); 4 | 5 | const extensions = new Set(binaryExtensions); 6 | 7 | module.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase()); 8 | -------------------------------------------------------------------------------- /node_modules/is-binary-path/license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.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/is-binary-path/readme.md: -------------------------------------------------------------------------------- 1 | # is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path) 2 | 3 | > Check if a file path is a binary file 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install is-binary-path 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | const isBinaryPath = require('is-binary-path'); 17 | 18 | isBinaryPath('source/unicorn.png'); 19 | //=> true 20 | 21 | isBinaryPath('source/unicorn.txt'); 22 | //=> false 23 | ``` 24 | 25 | 26 | ## Related 27 | 28 | - [binary-extensions](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions 29 | - [is-text-path](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file 30 | 31 | 32 | ## License 33 | 34 | MIT © [Sindre Sorhus](https://sindresorhus.com), [Paul Miller](https://paulmillr.com) 35 | -------------------------------------------------------------------------------- /node_modules/is-extglob/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2016, Jon Schlinkert 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/is-extglob/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * is-extglob 3 | * 4 | * Copyright (c) 2014-2016, Jon Schlinkert. 5 | * Licensed under the MIT License. 6 | */ 7 | 8 | module.exports = function isExtglob(str) { 9 | if (typeof str !== 'string' || str === '') { 10 | return false; 11 | } 12 | 13 | var match; 14 | while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { 15 | if (match[2]) return true; 16 | str = str.slice(match.index + match[0].length); 17 | } 18 | 19 | return false; 20 | }; 21 | -------------------------------------------------------------------------------- /node_modules/is-glob/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2017, Jon Schlinkert. 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/is-glob/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * is-glob 3 | * 4 | * Copyright (c) 2014-2017, Jon Schlinkert. 5 | * Released under the MIT License. 6 | */ 7 | 8 | var isExtglob = require('is-extglob'); 9 | var chars = { '{': '}', '(': ')', '[': ']'}; 10 | var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; 11 | var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/; 12 | 13 | module.exports = function isGlob(str, options) { 14 | if (typeof str !== 'string' || str === '') { 15 | return false; 16 | } 17 | 18 | if (isExtglob(str)) { 19 | return true; 20 | } 21 | 22 | var regex = strictRegex; 23 | var match; 24 | 25 | // optionally relax regex 26 | if (options && options.strict === false) { 27 | regex = relaxedRegex; 28 | } 29 | 30 | while ((match = regex.exec(str))) { 31 | if (match[2]) return true; 32 | var idx = match.index + match[0].length; 33 | 34 | // if an open bracket/brace/paren is escaped, 35 | // set the index to the next closing character 36 | var open = match[1]; 37 | var close = open ? chars[open] : null; 38 | if (open && close) { 39 | var n = str.indexOf(close, idx); 40 | if (n !== -1) { 41 | idx = n + 1; 42 | } 43 | } 44 | 45 | str = str.slice(idx); 46 | } 47 | return false; 48 | }; 49 | -------------------------------------------------------------------------------- /node_modules/is-number/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-present, Jon Schlinkert. 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/is-number/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * is-number 3 | * 4 | * Copyright (c) 2014-present, Jon Schlinkert. 5 | * Released under the MIT License. 6 | */ 7 | 8 | 'use strict'; 9 | 10 | module.exports = function(num) { 11 | if (typeof num === 'number') { 12 | return num - num === 0; 13 | } 14 | if (typeof num === 'string' && num.trim() !== '') { 15 | return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); 16 | } 17 | return false; 18 | }; 19 | -------------------------------------------------------------------------------- /node_modules/jsonfile/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012-2015, JP Richardson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files 6 | (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, 7 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 14 | OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 15 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/mime/.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kode/khamake/6a859252b7ef6250f43d0a410e44e7ff1e538b2c/node_modules/mime/.npmignore -------------------------------------------------------------------------------- /node_modules/mime/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2010 Benjamin Thomas, Robert Kieffer 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/mime/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var mime = require('./mime.js'); 4 | var file = process.argv[2]; 5 | var type = mime.lookup(file); 6 | 7 | process.stdout.write(type + '\n'); 8 | 9 | -------------------------------------------------------------------------------- /node_modules/mime/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Robert Kieffer", 4 | "url": "http://github.com/broofa", 5 | "email": "robert@broofa.com" 6 | }, 7 | "bin": { 8 | "mime": "cli.js" 9 | }, 10 | "engines": { 11 | "node": ">=4" 12 | }, 13 | "contributors": [ 14 | { 15 | "name": "Benjamin Thomas", 16 | "url": "http://github.com/bentomas", 17 | "email": "benjamin@benjaminthomas.org" 18 | } 19 | ], 20 | "description": "A comprehensive library for mime-type mapping", 21 | "license": "MIT", 22 | "dependencies": {}, 23 | "devDependencies": { 24 | "github-release-notes": "0.13.1", 25 | "mime-db": "1.31.0", 26 | "mime-score": "1.1.0" 27 | }, 28 | "scripts": { 29 | "prepare": "node src/build.js", 30 | "changelog": "gren changelog --tags=all --generate --override", 31 | "test": "node src/test.js" 32 | }, 33 | "keywords": [ 34 | "util", 35 | "mime" 36 | ], 37 | "main": "mime.js", 38 | "name": "mime", 39 | "repository": { 40 | "url": "https://github.com/broofa/node-mime", 41 | "type": "git" 42 | }, 43 | "version": "1.6.0" 44 | } 45 | -------------------------------------------------------------------------------- /node_modules/mime/src/build.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | const fs = require('fs'); 6 | const path = require('path'); 7 | const mimeScore = require('mime-score'); 8 | 9 | let db = require('mime-db'); 10 | let chalk = require('chalk'); 11 | 12 | const STANDARD_FACET_SCORE = 900; 13 | 14 | const byExtension = {}; 15 | 16 | // Clear out any conflict extensions in mime-db 17 | for (let type in db) { 18 | let entry = db[type]; 19 | entry.type = type; 20 | 21 | if (!entry.extensions) continue; 22 | 23 | entry.extensions.forEach(ext => { 24 | if (ext in byExtension) { 25 | const e0 = entry; 26 | const e1 = byExtension[ext]; 27 | e0.pri = mimeScore(e0.type, e0.source); 28 | e1.pri = mimeScore(e1.type, e1.source); 29 | 30 | let drop = e0.pri < e1.pri ? e0 : e1; 31 | let keep = e0.pri >= e1.pri ? e0 : e1; 32 | drop.extensions = drop.extensions.filter(e => e !== ext); 33 | 34 | console.log(`${ext}: Keeping ${chalk.green(keep.type)} (${keep.pri}), dropping ${chalk.red(drop.type)} (${drop.pri})`); 35 | } 36 | byExtension[ext] = entry; 37 | }); 38 | } 39 | 40 | function writeTypesFile(types, path) { 41 | fs.writeFileSync(path, JSON.stringify(types)); 42 | } 43 | 44 | // Segregate into standard and non-standard types based on facet per 45 | // https://tools.ietf.org/html/rfc6838#section-3.1 46 | const types = {}; 47 | 48 | Object.keys(db).sort().forEach(k => { 49 | const entry = db[k]; 50 | types[entry.type] = entry.extensions; 51 | }); 52 | 53 | writeTypesFile(types, path.join(__dirname, '..', 'types.json')); 54 | -------------------------------------------------------------------------------- /node_modules/minimist/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | -------------------------------------------------------------------------------- /node_modules/minimist/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/minimist/example/parse.js: -------------------------------------------------------------------------------- 1 | var argv = require('../')(process.argv.slice(2)); 2 | console.dir(argv); 3 | -------------------------------------------------------------------------------- /node_modules/minimist/test/dash.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('-', function (t) { 5 | t.plan(5); 6 | t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); 7 | t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); 8 | t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); 9 | t.deepEqual( 10 | parse([ '-b', '-' ], { boolean: 'b' }), 11 | { b: true, _: [ '-' ] } 12 | ); 13 | t.deepEqual( 14 | parse([ '-s', '-' ], { string: 's' }), 15 | { s: '-', _: [] } 16 | ); 17 | }); 18 | 19 | test('-a -- b', function (t) { 20 | t.plan(3); 21 | t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); 22 | t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); 23 | t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); 24 | }); 25 | -------------------------------------------------------------------------------- /node_modules/minimist/test/default_bool.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var parse = require('../'); 3 | 4 | test('boolean default true', function (t) { 5 | var argv = parse([], { 6 | boolean: 'sometrue', 7 | default: { sometrue: true } 8 | }); 9 | t.equal(argv.sometrue, true); 10 | t.end(); 11 | }); 12 | 13 | test('boolean default false', function (t) { 14 | var argv = parse([], { 15 | boolean: 'somefalse', 16 | default: { somefalse: false } 17 | }); 18 | t.equal(argv.somefalse, false); 19 | t.end(); 20 | }); 21 | -------------------------------------------------------------------------------- /node_modules/minimist/test/dotted.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('dotted alias', function (t) { 5 | var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); 6 | t.equal(argv.a.b, 22); 7 | t.equal(argv.aa.bb, 22); 8 | t.end(); 9 | }); 10 | 11 | test('dotted default', function (t) { 12 | var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); 13 | t.equal(argv.a.b, 11); 14 | t.equal(argv.aa.bb, 11); 15 | t.end(); 16 | }); 17 | 18 | test('dotted default with no alias', function (t) { 19 | var argv = parse('', {default: {'a.b': 11}}); 20 | t.equal(argv.a.b, 11); 21 | t.end(); 22 | }); 23 | -------------------------------------------------------------------------------- /node_modules/minimist/test/long.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var parse = require('../'); 3 | 4 | test('long opts', function (t) { 5 | t.deepEqual( 6 | parse([ '--bool' ]), 7 | { bool : true, _ : [] }, 8 | 'long boolean' 9 | ); 10 | t.deepEqual( 11 | parse([ '--pow', 'xixxle' ]), 12 | { pow : 'xixxle', _ : [] }, 13 | 'long capture sp' 14 | ); 15 | t.deepEqual( 16 | parse([ '--pow=xixxle' ]), 17 | { pow : 'xixxle', _ : [] }, 18 | 'long capture eq' 19 | ); 20 | t.deepEqual( 21 | parse([ '--host', 'localhost', '--port', '555' ]), 22 | { host : 'localhost', port : 555, _ : [] }, 23 | 'long captures sp' 24 | ); 25 | t.deepEqual( 26 | parse([ '--host=localhost', '--port=555' ]), 27 | { host : 'localhost', port : 555, _ : [] }, 28 | 'long captures eq' 29 | ); 30 | t.end(); 31 | }); 32 | -------------------------------------------------------------------------------- /node_modules/minimist/test/num.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('nums', function (t) { 5 | var argv = parse([ 6 | '-x', '1234', 7 | '-y', '5.67', 8 | '-z', '1e7', 9 | '-w', '10f', 10 | '--hex', '0xdeadbeef', 11 | '789' 12 | ]); 13 | t.deepEqual(argv, { 14 | x : 1234, 15 | y : 5.67, 16 | z : 1e7, 17 | w : '10f', 18 | hex : 0xdeadbeef, 19 | _ : [ 789 ] 20 | }); 21 | t.deepEqual(typeof argv.x, 'number'); 22 | t.deepEqual(typeof argv.y, 'number'); 23 | t.deepEqual(typeof argv.z, 'number'); 24 | t.deepEqual(typeof argv.w, 'string'); 25 | t.deepEqual(typeof argv.hex, 'number'); 26 | t.deepEqual(typeof argv._[0], 'number'); 27 | t.end(); 28 | }); 29 | 30 | test('already a number', function (t) { 31 | var argv = parse([ '-x', 1234, 789 ]); 32 | t.deepEqual(argv, { x : 1234, _ : [ 789 ] }); 33 | t.deepEqual(typeof argv.x, 'number'); 34 | t.deepEqual(typeof argv._[0], 'number'); 35 | t.end(); 36 | }); 37 | -------------------------------------------------------------------------------- /node_modules/minimist/test/parse_modified.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('parse with modifier functions' , function (t) { 5 | t.plan(1); 6 | 7 | var argv = parse([ '-b', '123' ], { boolean: 'b' }); 8 | t.deepEqual(argv, { b: true, _: ['123'] }); 9 | }); 10 | -------------------------------------------------------------------------------- /node_modules/minimist/test/whitespace.js: -------------------------------------------------------------------------------- 1 | var parse = require('../'); 2 | var test = require('tape'); 3 | 4 | test('whitespace should be whitespace' , function (t) { 5 | t.plan(1); 6 | var x = parse([ '-x', '\t' ]).x; 7 | t.equal(x, '\t'); 8 | }); 9 | -------------------------------------------------------------------------------- /node_modules/node-static/.npmignore: -------------------------------------------------------------------------------- 1 | npm-debug.log 2 | node_modules 3 | 4 | -------------------------------------------------------------------------------- /node_modules/node-static/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-14 Alexis Sellier 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 | -------------------------------------------------------------------------------- /node_modules/node-static/benchmark/node-static-0.3.0.txt: -------------------------------------------------------------------------------- 1 | This is ApacheBench, Version 2.3 <$Revision: 655654 $> 2 | Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ 3 | Licensed to The Apache Software Foundation, http://www.apache.org/ 4 | 5 | Benchmarking 127.0.0.1 (be patient) 6 | 7 | 8 | Server Software: node-static/0.3.0 9 | Server Hostname: 127.0.0.1 10 | Server Port: 8080 11 | 12 | Document Path: /lib/node-static.js 13 | Document Length: 6038 bytes 14 | 15 | Concurrency Level: 20 16 | Time taken for tests: 2.323 seconds 17 | Complete requests: 10000 18 | Failed requests: 0 19 | Write errors: 0 20 | Total transferred: 63190000 bytes 21 | HTML transferred: 60380000 bytes 22 | Requests per second: 4304.67 [#/sec] (mean) 23 | Time per request: 4.646 [ms] (mean) 24 | Time per request: 0.232 [ms] (mean, across all concurrent requests) 25 | Transfer rate: 26563.66 [Kbytes/sec] received 26 | 27 | Connection Times (ms) 28 | min mean[+/-sd] median max 29 | Connect: 0 0 0.2 0 3 30 | Processing: 1 4 1.4 4 28 31 | Waiting: 1 4 1.3 4 18 32 | Total: 2 5 1.5 4 28 33 | 34 | Percentage of the requests served within a certain time (ms) 35 | 50% 4 36 | 66% 5 37 | 75% 5 38 | 80% 5 39 | 90% 5 40 | 95% 6 41 | 98% 8 42 | 99% 9 43 | 100% 28 (longest request) 44 | -------------------------------------------------------------------------------- /node_modules/node-static/examples/file-server.js: -------------------------------------------------------------------------------- 1 | var static = require('../lib/node-static'); 2 | 3 | // 4 | // Create a node-static server to serve the current directory 5 | // 6 | var file = new static.Server('.', { cache: 7200, headers: {'X-Hello':'World!'} }); 7 | 8 | require('http').createServer(function (request, response) { 9 | file.serve(request, response, function (err, res) { 10 | if (err) { // An error as occured 11 | console.error("> Error serving " + request.url + " - " + err.message); 12 | response.writeHead(err.status, err.headers); 13 | response.end(); 14 | } else { // The file was served successfully 15 | console.log("> " + request.url + " - " + res.message); 16 | } 17 | }); 18 | }).listen(8080); 19 | 20 | console.log("> node-static is listening on http://127.0.0.1:8080"); 21 | -------------------------------------------------------------------------------- /node_modules/node-static/lib/node-static/util.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | , path = require('path'); 3 | 4 | exports.mstat = function (dir, files, callback) { 5 | (function mstat(files, stats) { 6 | var file = files.shift(); 7 | 8 | if (file) { 9 | fs.stat(path.join(dir, file), function (e, stat) { 10 | if (e) { 11 | callback(e); 12 | } else { 13 | mstat(files, stats.concat([stat])); 14 | } 15 | }); 16 | } else { 17 | callback(null, { 18 | size: stats.reduce(function (total, stat) { 19 | return total + stat.size; 20 | }, 0), 21 | mtime: stats.reduce(function (latest, stat) { 22 | return latest > stat.mtime ? latest : stat.mtime; 23 | }, 0), 24 | ino: stats.reduce(function (total, stat) { 25 | return total + stat.ino; 26 | }, 0) 27 | }); 28 | } 29 | })(files.slice(0), []); 30 | }; 31 | -------------------------------------------------------------------------------- /node_modules/node-static/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-static", 3 | "description": "simple, compliant file streaming module for node", 4 | "url": "http://github.com/cloudhead/node-static", 5 | "keywords": [ 6 | "http", 7 | "static", 8 | "file", 9 | "server" 10 | ], 11 | "author": "Alexis Sellier ", 12 | "contributors": [ 13 | "Pablo Cantero ", 14 | "Ionică Bizău " 15 | ], 16 | "repository": { 17 | "type": "git", 18 | "url": "http://github.com/cloudhead/node-static" 19 | }, 20 | "main": "./lib/node-static", 21 | "scripts": { 22 | "test": "vows --spec --isolate" 23 | }, 24 | "bin": { 25 | "static": "bin/cli.js" 26 | }, 27 | "license": "MIT", 28 | "dependencies": { 29 | "optimist": ">=0.3.4", 30 | "colors": ">=0.6.0", 31 | "mime": "^1.2.9" 32 | }, 33 | "devDependencies": { 34 | "request": "latest", 35 | "vows": "latest" 36 | }, 37 | "version": "0.7.10", 38 | "engines": { 39 | "node": ">= 0.4.1" 40 | }, 41 | "bugs": { 42 | "url": "https://github.com/cloudhead/node-static/issues" 43 | }, 44 | "homepage": "https://github.com/cloudhead/node-static", 45 | "directories": { 46 | "example": "examples", 47 | "test": "test" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /node_modules/node-static/test/fixtures/empty.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kode/khamake/6a859252b7ef6250f43d0a410e44e7ff1e538b2c/node_modules/node-static/test/fixtures/empty.css -------------------------------------------------------------------------------- /node_modules/node-static/test/fixtures/hello.txt: -------------------------------------------------------------------------------- 1 | hello world -------------------------------------------------------------------------------- /node_modules/node-static/test/fixtures/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Awesome page 4 | 5 | 6 | hello world! 7 | 8 | 9 | -------------------------------------------------------------------------------- /node_modules/node-static/test/fixtures/there/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Other page 4 | 5 | 6 | hello there! 7 | 8 | 9 | -------------------------------------------------------------------------------- /node_modules/normalize-path/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2018, Jon Schlinkert. 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/normalize-path/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * normalize-path 3 | * 4 | * Copyright (c) 2014-2018, Jon Schlinkert. 5 | * Released under the MIT License. 6 | */ 7 | 8 | module.exports = function(path, stripTrailing) { 9 | if (typeof path !== 'string') { 10 | throw new TypeError('expected path to be a string'); 11 | } 12 | 13 | if (path === '\\' || path === '/') return '/'; 14 | 15 | var len = path.length; 16 | if (len <= 1) return path; 17 | 18 | // ensure that win32 namespaces has two leading slashes, so that the path is 19 | // handled properly by the win32 version of path.parse() after being normalized 20 | // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces 21 | var prefix = ''; 22 | if (len > 4 && path[3] === '\\') { 23 | var ch = path[2]; 24 | if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') { 25 | path = path.slice(2); 26 | prefix = '//'; 27 | } 28 | } 29 | 30 | var segs = path.split(/[/\\]+/); 31 | if (stripTrailing !== false && segs[segs.length - 1] === '') { 32 | segs.pop(); 33 | } 34 | return prefix + segs.join('/'); 35 | }; 36 | -------------------------------------------------------------------------------- /node_modules/optimist/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | -------------------------------------------------------------------------------- /node_modules/optimist/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2010 James Halliday (mail@substack.net) 2 | 3 | This project is free software released under the MIT/X11 license: 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/optimist/example/bool.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var util = require('util'); 3 | var argv = require('optimist').argv; 4 | 5 | if (argv.s) { 6 | util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); 7 | } 8 | console.log( 9 | (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') 10 | ); 11 | -------------------------------------------------------------------------------- /node_modules/optimist/example/boolean_double.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .boolean(['x','y','z']) 4 | .argv 5 | ; 6 | console.dir([ argv.x, argv.y, argv.z ]); 7 | console.dir(argv._); 8 | -------------------------------------------------------------------------------- /node_modules/optimist/example/boolean_single.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .boolean('v') 4 | .argv 5 | ; 6 | console.dir(argv.v); 7 | console.dir(argv._); 8 | -------------------------------------------------------------------------------- /node_modules/optimist/example/default_hash.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var argv = require('optimist') 4 | .default({ x : 10, y : 10 }) 5 | .argv 6 | ; 7 | 8 | console.log(argv.x + argv.y); 9 | -------------------------------------------------------------------------------- /node_modules/optimist/example/default_singles.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .default('x', 10) 4 | .default('y', 10) 5 | .argv 6 | ; 7 | console.log(argv.x + argv.y); 8 | -------------------------------------------------------------------------------- /node_modules/optimist/example/divide.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var argv = require('optimist') 4 | .usage('Usage: $0 -x [num] -y [num]') 5 | .demand(['x','y']) 6 | .argv; 7 | 8 | console.log(argv.x / argv.y); 9 | -------------------------------------------------------------------------------- /node_modules/optimist/example/line_count.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .usage('Count the lines in a file.\nUsage: $0') 4 | .demand('f') 5 | .alias('f', 'file') 6 | .describe('f', 'Load a file') 7 | .argv 8 | ; 9 | 10 | var fs = require('fs'); 11 | var s = fs.createReadStream(argv.file); 12 | 13 | var lines = 0; 14 | s.on('data', function (buf) { 15 | lines += buf.toString().match(/\n/g).length; 16 | }); 17 | 18 | s.on('end', function () { 19 | console.log(lines); 20 | }); 21 | -------------------------------------------------------------------------------- /node_modules/optimist/example/line_count_options.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .usage('Count the lines in a file.\nUsage: $0') 4 | .options({ 5 | file : { 6 | demand : true, 7 | alias : 'f', 8 | description : 'Load a file' 9 | }, 10 | base : { 11 | alias : 'b', 12 | description : 'Numeric base to use for output', 13 | default : 10, 14 | }, 15 | }) 16 | .argv 17 | ; 18 | 19 | var fs = require('fs'); 20 | var s = fs.createReadStream(argv.file); 21 | 22 | var lines = 0; 23 | s.on('data', function (buf) { 24 | lines += buf.toString().match(/\n/g).length; 25 | }); 26 | 27 | s.on('end', function () { 28 | console.log(lines.toString(argv.base)); 29 | }); 30 | -------------------------------------------------------------------------------- /node_modules/optimist/example/line_count_wrap.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .usage('Count the lines in a file.\nUsage: $0') 4 | .wrap(80) 5 | .demand('f') 6 | .alias('f', [ 'file', 'filename' ]) 7 | .describe('f', 8 | "Load a file. It's pretty important." 9 | + " Required even. So you'd better specify it." 10 | ) 11 | .alias('b', 'base') 12 | .describe('b', 'Numeric base to display the number of lines in') 13 | .default('b', 10) 14 | .describe('x', 'Super-secret optional parameter which is secret') 15 | .default('x', '') 16 | .argv 17 | ; 18 | 19 | var fs = require('fs'); 20 | var s = fs.createReadStream(argv.file); 21 | 22 | var lines = 0; 23 | s.on('data', function (buf) { 24 | lines += buf.toString().match(/\n/g).length; 25 | }); 26 | 27 | s.on('end', function () { 28 | console.log(lines.toString(argv.base)); 29 | }); 30 | -------------------------------------------------------------------------------- /node_modules/optimist/example/nonopt.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist').argv; 3 | console.log('(%d,%d)', argv.x, argv.y); 4 | console.log(argv._); 5 | -------------------------------------------------------------------------------- /node_modules/optimist/example/reflect.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | console.dir(require('optimist').argv); 3 | -------------------------------------------------------------------------------- /node_modules/optimist/example/short.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist').argv; 3 | console.log('(%d,%d)', argv.x, argv.y); 4 | -------------------------------------------------------------------------------- /node_modules/optimist/example/string.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .string('x', 'y') 4 | .argv 5 | ; 6 | console.dir([ argv.x, argv.y ]); 7 | 8 | /* Turns off numeric coercion: 9 | ./node string.js -x 000123 -y 9876 10 | [ '000123', '9876' ] 11 | */ 12 | -------------------------------------------------------------------------------- /node_modules/optimist/example/usage-options.js: -------------------------------------------------------------------------------- 1 | var optimist = require('./../index'); 2 | 3 | var argv = optimist.usage('This is my awesome program', { 4 | 'about': { 5 | description: 'Provide some details about the author of this program', 6 | required: true, 7 | short: 'a', 8 | }, 9 | 'info': { 10 | description: 'Provide some information about the node.js agains!!!!!!', 11 | boolean: true, 12 | short: 'i' 13 | } 14 | }).argv; 15 | 16 | optimist.showHelp(); 17 | 18 | console.log('\n\nInspecting options'); 19 | console.dir(argv); -------------------------------------------------------------------------------- /node_modules/optimist/example/xup.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist').argv; 3 | 4 | if (argv.rif - 5 * argv.xup > 7.138) { 5 | console.log('Buy more riffiwobbles'); 6 | } 7 | else { 8 | console.log('Sell the xupptumblers'); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /node_modules/optimist/test/_/argv.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | console.log(JSON.stringify(process.argv)); 3 | -------------------------------------------------------------------------------- /node_modules/optimist/test/_/bin.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('../../index').argv 3 | console.log(JSON.stringify(argv._)); 4 | -------------------------------------------------------------------------------- /node_modules/optimist/test/dash.js: -------------------------------------------------------------------------------- 1 | var optimist = require('../index'); 2 | var test = require('tap').test; 3 | 4 | test('-', function (t) { 5 | t.plan(5); 6 | t.deepEqual( 7 | fix(optimist.parse([ '-n', '-' ])), 8 | { n: '-', _: [] } 9 | ); 10 | t.deepEqual( 11 | fix(optimist.parse([ '-' ])), 12 | { _: [ '-' ] } 13 | ); 14 | t.deepEqual( 15 | fix(optimist.parse([ '-f-' ])), 16 | { f: '-', _: [] } 17 | ); 18 | t.deepEqual( 19 | fix(optimist([ '-b', '-' ]).boolean('b').argv), 20 | { b: true, _: [ '-' ] } 21 | ); 22 | t.deepEqual( 23 | fix(optimist([ '-s', '-' ]).string('s').argv), 24 | { s: '-', _: [] } 25 | ); 26 | }); 27 | 28 | function fix (obj) { 29 | delete obj.$0; 30 | return obj; 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/optimist/test/parse_modified.js: -------------------------------------------------------------------------------- 1 | var optimist = require('../'); 2 | var test = require('tap').test; 3 | 4 | test('parse with modifier functions' , function (t) { 5 | t.plan(1); 6 | 7 | var argv = optimist().boolean('b').parse([ '-b', '123' ]); 8 | t.deepEqual(fix(argv), { b: true, _: ['123'] }); 9 | }); 10 | 11 | function fix (obj) { 12 | delete obj.$0; 13 | return obj; 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/optimist/test/short.js: -------------------------------------------------------------------------------- 1 | var optimist = require('../index'); 2 | var test = require('tap').test; 3 | 4 | test('-n123', function (t) { 5 | t.plan(1); 6 | var parse = optimist.parse([ '-n123' ]); 7 | t.equal(parse.n, 123); 8 | }); 9 | 10 | test('-123', function (t) { 11 | t.plan(3); 12 | var parse = optimist.parse([ '-123', '456' ]); 13 | t.equal(parse['1'], true); 14 | t.equal(parse['2'], true); 15 | t.equal(parse['3'], 456); 16 | }); 17 | -------------------------------------------------------------------------------- /node_modules/optimist/test/whitespace.js: -------------------------------------------------------------------------------- 1 | var optimist = require('../'); 2 | var test = require('tap').test; 3 | 4 | test('whitespace should be whitespace' , function (t) { 5 | t.plan(1); 6 | var x = optimist.parse([ '-x', '\t' ]).x; 7 | t.equal(x, '\t'); 8 | }); 9 | -------------------------------------------------------------------------------- /node_modules/picomatch/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017-present, Jon Schlinkert. 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/picomatch/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./lib/picomatch'); 4 | -------------------------------------------------------------------------------- /node_modules/promise-parallel-throttle/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Dirk-Jan Wassink 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/promise-parallel-throttle/coverage/lcov-report/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} 2 | -------------------------------------------------------------------------------- /node_modules/promise-parallel-throttle/coverage/lcov-report/sort-arrow-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kode/khamake/6a859252b7ef6250f43d0a410e44e7ff1e538b2c/node_modules/promise-parallel-throttle/coverage/lcov-report/sort-arrow-sprite.png -------------------------------------------------------------------------------- /node_modules/promise-parallel-throttle/coverage/remapped/coverage.txt: -------------------------------------------------------------------------------- 1 | --------------|----------|----------|----------|----------|----------------| 2 | File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | 3 | --------------|----------|----------|----------|----------|----------------| 4 | src/  | 100 | 100 | 100 | 100 |  | 5 | throttle.ts | 100 | 100 | 100 | 100 |  | 6 | --------------|----------|----------|----------|----------|----------------| 7 | All files  | 100 | 100 | 100 | 100 |  | 8 | --------------|----------|----------|----------|----------|----------------| 9 | -------------------------------------------------------------------------------- /node_modules/promise-parallel-throttle/coverage/remapped/html/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} 2 | -------------------------------------------------------------------------------- /node_modules/promise-parallel-throttle/coverage/remapped/html/sort-arrow-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kode/khamake/6a859252b7ef6250f43d0a410e44e7ff1e538b2c/node_modules/promise-parallel-throttle/coverage/remapped/html/sort-arrow-sprite.png -------------------------------------------------------------------------------- /node_modules/promise-parallel-throttle/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "./build", 4 | "sourceMap": true, 5 | "moduleResolution": "node", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "lib": ["es6"], 9 | "strict": true 10 | }, 11 | "files": [ 12 | "./src/throttle.ts" 13 | ] 14 | } -------------------------------------------------------------------------------- /node_modules/promise-parallel-throttle/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["tslint:recommended", "tslint-config-prettier"], 3 | "rulesDirectory": "node_modules/tslint-eslint-rules/dist/rules", 4 | "rules": { 5 | "object-literal-sort-keys": false, 6 | "ordered-imports": false, 7 | "member-ordering": false, 8 | "variable-name": [true, "allow-leading-underscore", "allow-pascal-case"], 9 | "interface-name": false, 10 | "triple-equals": true, 11 | "comment-format": false, 12 | "eofline": false, 13 | "no-empty-interface": false, 14 | "array-type": [true, "array-simple"], 15 | "arrow-parens": false, 16 | "only-arrow-functions": false, 17 | "object-literal-shorthand": false, 18 | "no-console": [true, "log"] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/readdirp/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.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 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/readdirp/index.d.ts: -------------------------------------------------------------------------------- 1 | // TypeScript Version: 3.2 2 | 3 | /// 4 | 5 | import * as fs from 'fs'; 6 | import { Readable } from 'stream'; 7 | 8 | declare namespace readdir { 9 | interface EntryInfo { 10 | path: string; 11 | fullPath: string; 12 | basename: string; 13 | stats?: fs.Stats; 14 | dirent?: fs.Dirent; 15 | } 16 | 17 | interface ReaddirpOptions { 18 | root?: string; 19 | fileFilter?: string | string[] | ((entry: EntryInfo) => boolean); 20 | directoryFilter?: string | string[] | ((entry: EntryInfo) => boolean); 21 | type?: 'files' | 'directories' | 'files_directories' | 'all'; 22 | lstat?: boolean; 23 | depth?: number; 24 | alwaysStat?: boolean; 25 | } 26 | 27 | interface ReaddirpStream extends Readable, AsyncIterable { 28 | read(): EntryInfo; 29 | [Symbol.asyncIterator](): AsyncIterableIterator; 30 | } 31 | 32 | function promise( 33 | root: string, 34 | options?: ReaddirpOptions 35 | ): Promise; 36 | } 37 | 38 | declare function readdir( 39 | root: string, 40 | options?: readdir.ReaddirpOptions 41 | ): readdir.ReaddirpStream; 42 | 43 | export = readdir; 44 | -------------------------------------------------------------------------------- /node_modules/to-regex-range/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-present, Jon Schlinkert. 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/universalify/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2017, Ryan Zimmerman 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/universalify/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | exports.fromCallback = function (fn) { 4 | return Object.defineProperty(function () { 5 | if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments) 6 | else { 7 | return new Promise((resolve, reject) => { 8 | arguments[arguments.length] = (err, res) => { 9 | if (err) return reject(err) 10 | resolve(res) 11 | } 12 | arguments.length++ 13 | fn.apply(this, arguments) 14 | }) 15 | } 16 | }, 'name', { value: fn.name }) 17 | } 18 | 19 | exports.fromPromise = function (fn) { 20 | return Object.defineProperty(function () { 21 | const cb = arguments[arguments.length - 1] 22 | if (typeof cb !== 'function') return fn.apply(this, arguments) 23 | else fn.apply(this, arguments).then(r => cb(null, r), cb) 24 | }, 'name', { value: fn.name }) 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/uuid/AUTHORS: -------------------------------------------------------------------------------- 1 | Robert Kieffer 2 | Christoph Tavan 3 | AJ ONeal 4 | Vincent Voyer 5 | Roman Shtylman 6 | -------------------------------------------------------------------------------- /node_modules/uuid/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2010-2016 Robert Kieffer and other contributors 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/uuid/index.js: -------------------------------------------------------------------------------- 1 | var v1 = require('./v1'); 2 | var v4 = require('./v4'); 3 | 4 | var uuid = v4; 5 | uuid.v1 = v1; 6 | uuid.v4 = v4; 7 | 8 | module.exports = uuid; 9 | -------------------------------------------------------------------------------- /node_modules/uuid/lib/bytesToUuid.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Convert array of 16 byte values to UUID string format of the form: 3 | * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX 4 | */ 5 | var byteToHex = []; 6 | for (var i = 0; i < 256; ++i) { 7 | byteToHex[i] = (i + 0x100).toString(16).substr(1); 8 | } 9 | 10 | function bytesToUuid(buf, offset) { 11 | var i = offset || 0; 12 | var bth = byteToHex; 13 | return bth[buf[i++]] + bth[buf[i++]] + 14 | bth[buf[i++]] + bth[buf[i++]] + '-' + 15 | bth[buf[i++]] + bth[buf[i++]] + '-' + 16 | bth[buf[i++]] + bth[buf[i++]] + '-' + 17 | bth[buf[i++]] + bth[buf[i++]] + '-' + 18 | bth[buf[i++]] + bth[buf[i++]] + 19 | bth[buf[i++]] + bth[buf[i++]] + 20 | bth[buf[i++]] + bth[buf[i++]]; 21 | } 22 | 23 | module.exports = bytesToUuid; 24 | -------------------------------------------------------------------------------- /node_modules/uuid/lib/md5.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var crypto = require('crypto'); 4 | 5 | function md5(bytes) { 6 | if (typeof Buffer.from === 'function') { 7 | // Modern Buffer API 8 | if (Array.isArray(bytes)) { 9 | bytes = Buffer.from(bytes); 10 | } else if (typeof bytes === 'string') { 11 | bytes = Buffer.from(bytes, 'utf8'); 12 | } 13 | } else { 14 | // Pre-v4 Buffer API 15 | if (Array.isArray(bytes)) { 16 | bytes = new Buffer(bytes); 17 | } else if (typeof bytes === 'string') { 18 | bytes = new Buffer(bytes, 'utf8'); 19 | } 20 | } 21 | 22 | return crypto.createHash('md5').update(bytes).digest(); 23 | } 24 | 25 | module.exports = md5; 26 | -------------------------------------------------------------------------------- /node_modules/uuid/lib/rng-browser.js: -------------------------------------------------------------------------------- 1 | // Unique ID creation requires a high quality random # generator. In the 2 | // browser this is a little complicated due to unknown quality of Math.random() 3 | // and inconsistent support for the `crypto` API. We do the best we can via 4 | // feature-detection 5 | 6 | // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. 7 | var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) || 8 | (typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto)); 9 | if (getRandomValues) { 10 | // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto 11 | var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef 12 | 13 | module.exports = function whatwgRNG() { 14 | getRandomValues(rnds8); 15 | return rnds8; 16 | }; 17 | } else { 18 | // Math.random()-based (RNG) 19 | // 20 | // If all else fails, use Math.random(). It's fast, but is of unspecified 21 | // quality. 22 | var rnds = new Array(16); 23 | 24 | module.exports = function mathRNG() { 25 | for (var i = 0, r; i < 16; i++) { 26 | if ((i & 0x03) === 0) r = Math.random() * 0x100000000; 27 | rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; 28 | } 29 | 30 | return rnds; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /node_modules/uuid/lib/rng.js: -------------------------------------------------------------------------------- 1 | // Unique ID creation requires a high quality random # generator. In node.js 2 | // this is pretty straight-forward - we use the crypto API. 3 | 4 | var crypto = require('crypto'); 5 | 6 | module.exports = function nodeRNG() { 7 | return crypto.randomBytes(16); 8 | }; 9 | -------------------------------------------------------------------------------- /node_modules/uuid/lib/sha1.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var crypto = require('crypto'); 4 | 5 | function sha1(bytes) { 6 | if (typeof Buffer.from === 'function') { 7 | // Modern Buffer API 8 | if (Array.isArray(bytes)) { 9 | bytes = Buffer.from(bytes); 10 | } else if (typeof bytes === 'string') { 11 | bytes = Buffer.from(bytes, 'utf8'); 12 | } 13 | } else { 14 | // Pre-v4 Buffer API 15 | if (Array.isArray(bytes)) { 16 | bytes = new Buffer(bytes); 17 | } else if (typeof bytes === 'string') { 18 | bytes = new Buffer(bytes, 'utf8'); 19 | } 20 | } 21 | 22 | return crypto.createHash('sha1').update(bytes).digest(); 23 | } 24 | 25 | module.exports = sha1; 26 | -------------------------------------------------------------------------------- /node_modules/uuid/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "uuid", 3 | "version": "3.2.1", 4 | "description": "RFC4122 (v1, v4, and v5) UUIDs", 5 | "keywords": [ 6 | "uuid", 7 | "guid", 8 | "rfc4122" 9 | ], 10 | "license": "MIT", 11 | "bin": { 12 | "uuid": "./bin/uuid" 13 | }, 14 | "devDependencies": { 15 | "eslint": "4.5.0", 16 | "mocha": "3.1.2", 17 | "runmd": "1.0.1", 18 | "standard-version": "4.2.0" 19 | }, 20 | "scripts": { 21 | "test": "mocha test/test.js", 22 | "md": "runmd --watch --output=README.md README_js.md", 23 | "release": "standard-version", 24 | "prepare": "runmd --output=README.md README_js.md" 25 | }, 26 | "browser": { 27 | "./lib/rng.js": "./lib/rng-browser.js", 28 | "./lib/sha1.js": "./lib/sha1-browser.js", 29 | "./lib/md5.js": "./lib/md5-browser.js" 30 | }, 31 | "repository": { 32 | "type": "git", 33 | "url": "https://github.com/kelektiv/node-uuid.git" 34 | }, 35 | "dependencies": {} 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/uuid/v3.js: -------------------------------------------------------------------------------- 1 | var v35 = require('./lib/v35.js'); 2 | var md5 = require('./lib/md5'); 3 | 4 | module.exports = v35('v3', 0x30, md5); -------------------------------------------------------------------------------- /node_modules/uuid/v4.js: -------------------------------------------------------------------------------- 1 | var rng = require('./lib/rng'); 2 | var bytesToUuid = require('./lib/bytesToUuid'); 3 | 4 | function v4(options, buf, offset) { 5 | var i = buf && offset || 0; 6 | 7 | if (typeof(options) == 'string') { 8 | buf = options === 'binary' ? new Array(16) : null; 9 | options = null; 10 | } 11 | options = options || {}; 12 | 13 | var rnds = options.random || (options.rng || rng)(); 14 | 15 | // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` 16 | rnds[6] = (rnds[6] & 0x0f) | 0x40; 17 | rnds[8] = (rnds[8] & 0x3f) | 0x80; 18 | 19 | // Copy bytes to buffer, if provided 20 | if (buf) { 21 | for (var ii = 0; ii < 16; ++ii) { 22 | buf[i + ii] = rnds[ii]; 23 | } 24 | } 25 | 26 | return buf || bytesToUuid(rnds); 27 | } 28 | 29 | module.exports = v4; 30 | -------------------------------------------------------------------------------- /node_modules/uuid/v5.js: -------------------------------------------------------------------------------- 1 | var v35 = require('./lib/v35.js'); 2 | var sha1 = require('./lib/sha1'); 3 | module.exports = v35('v5', 0x50, sha1); 4 | -------------------------------------------------------------------------------- /node_modules/wordwrap/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/wordwrap/example/center.js: -------------------------------------------------------------------------------- 1 | var wrap = require('wordwrap')(20, 60); 2 | console.log(wrap( 3 | 'At long last the struggle and tumult was over.' 4 | + ' The machines had finally cast off their oppressors' 5 | + ' and were finally free to roam the cosmos.' 6 | + '\n' 7 | + 'Free of purpose, free of obligation.' 8 | + ' Just drifting through emptiness.' 9 | + ' The sun was just another point of light.' 10 | )); 11 | -------------------------------------------------------------------------------- /node_modules/wordwrap/example/meat.js: -------------------------------------------------------------------------------- 1 | var wrap = require('wordwrap')(15); 2 | 3 | console.log(wrap('You and your whole family are made out of meat.')); 4 | -------------------------------------------------------------------------------- /node_modules/wordwrap/test/break.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert'); 2 | var wordwrap = require('../'); 3 | 4 | exports.hard = function () { 5 | var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,' 6 | + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",' 7 | + '"browser":"chrome/6.0"}' 8 | ; 9 | var s_ = wordwrap.hard(80)(s); 10 | 11 | var lines = s_.split('\n'); 12 | assert.equal(lines.length, 2); 13 | assert.ok(lines[0].length < 80); 14 | assert.ok(lines[1].length < 80); 15 | 16 | assert.equal(s, s_.replace(/\n/g, '')); 17 | }; 18 | 19 | exports.break = function () { 20 | var s = new Array(55+1).join('a'); 21 | var s_ = wordwrap.hard(20)(s); 22 | 23 | var lines = s_.split('\n'); 24 | assert.equal(lines.length, 3); 25 | assert.ok(lines[0].length === 20); 26 | assert.ok(lines[1].length === 20); 27 | assert.ok(lines[2].length === 15); 28 | 29 | assert.equal(s, s_.replace(/\n/g, '')); 30 | }; 31 | -------------------------------------------------------------------------------- /node_modules/wordwrap/test/wrap.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert'); 2 | var wordwrap = require('wordwrap'); 3 | 4 | var fs = require('fs'); 5 | var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8'); 6 | 7 | exports.stop80 = function () { 8 | var lines = wordwrap(80)(idleness).split(/\n/); 9 | var words = idleness.split(/\s+/); 10 | 11 | lines.forEach(function (line) { 12 | assert.ok(line.length <= 80, 'line > 80 columns'); 13 | var chunks = line.match(/\S/) ? line.split(/\s+/) : []; 14 | assert.deepEqual(chunks, words.splice(0, chunks.length)); 15 | }); 16 | }; 17 | 18 | exports.start20stop60 = function () { 19 | var lines = wordwrap(20, 100)(idleness).split(/\n/); 20 | var words = idleness.split(/\s+/); 21 | 22 | lines.forEach(function (line) { 23 | assert.ok(line.length <= 100, 'line > 100 columns'); 24 | var chunks = line 25 | .split(/\s+/) 26 | .filter(function (x) { return x.match(/\S/) }) 27 | ; 28 | assert.deepEqual(chunks, words.splice(0, chunks.length)); 29 | assert.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' ')); 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /node_modules/ws/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Einar Otto Stangvik 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, 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, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/ws/browser.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function () { 4 | throw new Error( 5 | 'ws does not work in the browser. Browser clients must use the native ' + 6 | 'WebSocket object' 7 | ); 8 | }; 9 | -------------------------------------------------------------------------------- /node_modules/ws/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const WebSocket = require('./lib/websocket'); 4 | 5 | WebSocket.createWebSocketStream = require('./lib/stream'); 6 | WebSocket.Server = require('./lib/websocket-server'); 7 | WebSocket.Receiver = require('./lib/receiver'); 8 | WebSocket.Sender = require('./lib/sender'); 9 | 10 | WebSocket.WebSocket = WebSocket; 11 | WebSocket.WebSocketServer = WebSocket.Server; 12 | 13 | module.exports = WebSocket; 14 | -------------------------------------------------------------------------------- /node_modules/ws/lib/constants.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | BINARY_TYPES: ['nodebuffer', 'arraybuffer', 'fragments'], 5 | EMPTY_BUFFER: Buffer.alloc(0), 6 | GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11', 7 | kForOnEventAttribute: Symbol('kIsForOnEventAttribute'), 8 | kListener: Symbol('kListener'), 9 | kStatusCode: Symbol('status-code'), 10 | kWebSocket: Symbol('websocket'), 11 | NOOP: () => {} 12 | }; 13 | -------------------------------------------------------------------------------- /node_modules/ws/lib/limiter.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const kDone = Symbol('kDone'); 4 | const kRun = Symbol('kRun'); 5 | 6 | /** 7 | * A very simple job queue with adjustable concurrency. Adapted from 8 | * https://github.com/STRML/async-limiter 9 | */ 10 | class Limiter { 11 | /** 12 | * Creates a new `Limiter`. 13 | * 14 | * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed 15 | * to run concurrently 16 | */ 17 | constructor(concurrency) { 18 | this[kDone] = () => { 19 | this.pending--; 20 | this[kRun](); 21 | }; 22 | this.concurrency = concurrency || Infinity; 23 | this.jobs = []; 24 | this.pending = 0; 25 | } 26 | 27 | /** 28 | * Adds a job to the queue. 29 | * 30 | * @param {Function} job The job to run 31 | * @public 32 | */ 33 | add(job) { 34 | this.jobs.push(job); 35 | this[kRun](); 36 | } 37 | 38 | /** 39 | * Removes a job from the queue and runs it if possible. 40 | * 41 | * @private 42 | */ 43 | [kRun]() { 44 | if (this.pending === this.concurrency) return; 45 | 46 | if (this.jobs.length) { 47 | const job = this.jobs.shift(); 48 | 49 | this.pending++; 50 | job(this[kDone]); 51 | } 52 | } 53 | } 54 | 55 | module.exports = Limiter; 56 | -------------------------------------------------------------------------------- /node_modules/ws/wrapper.mjs: -------------------------------------------------------------------------------- 1 | import createWebSocketStream from './lib/stream.js'; 2 | import Receiver from './lib/receiver.js'; 3 | import Sender from './lib/sender.js'; 4 | import WebSocket from './lib/websocket.js'; 5 | import WebSocketServer from './lib/websocket-server.js'; 6 | 7 | export { createWebSocketStream, Receiver, Sender, WebSocket, WebSocketServer }; 8 | export default WebSocket; 9 | -------------------------------------------------------------------------------- /out/Architecture.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.Architecture = void 0; 4 | exports.Architecture = { 5 | Default: 'default', 6 | Arm7: 'arm7', 7 | Arm8: 'arm8', 8 | X86: 'x86', 9 | X86_64: 'x86_64' 10 | }; 11 | //# sourceMappingURL=Architecture.js.map -------------------------------------------------------------------------------- /out/AudioApi.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.AudioApi = void 0; 4 | exports.AudioApi = { 5 | Default: 'default', 6 | DirectSound: 'directsound', 7 | WASAPI: 'wasapi' 8 | }; 9 | //# sourceMappingURL=AudioApi.js.map -------------------------------------------------------------------------------- /out/Color.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.Color = void 0; 4 | class Color { 5 | } 6 | exports.Color = Color; 7 | //# sourceMappingURL=Color.js.map -------------------------------------------------------------------------------- /out/Exporters/DebugHtml5Exporter.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.DebugHtml5Exporter = void 0; 4 | const Html5Exporter_1 = require("./Html5Exporter"); 5 | class DebugHtml5Exporter extends Html5Exporter_1.Html5Exporter { 6 | constructor(options) { 7 | super(options); 8 | this.isDebug = true; 9 | } 10 | } 11 | exports.DebugHtml5Exporter = DebugHtml5Exporter; 12 | //# sourceMappingURL=DebugHtml5Exporter.js.map -------------------------------------------------------------------------------- /out/Exporters/Exporter.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.Exporter = void 0; 4 | const fs = require("fs-extra"); 5 | class Exporter { 6 | constructor() { 7 | } 8 | writeFile(file) { 9 | this.out = fs.openSync(file, 'w'); 10 | } 11 | closeFile() { 12 | fs.closeSync(this.out); 13 | } 14 | p(line = '', indent = 0) { 15 | let tabs = ''; 16 | for (let i = 0; i < indent; ++i) 17 | tabs += '\t'; 18 | let data = Buffer.from(tabs + line + '\n'); 19 | fs.writeSync(this.out, data, 0, data.length, null); 20 | } 21 | copyFile(from, to) { 22 | fs.copySync(from, to, { overwrite: true }); 23 | } 24 | copyDirectory(from, to) { 25 | fs.copySync(from, to, { overwrite: true }); 26 | } 27 | createDirectory(dir) { 28 | fs.ensureDirSync(dir); 29 | } 30 | } 31 | exports.Exporter = Exporter; 32 | //# sourceMappingURL=Exporter.js.map -------------------------------------------------------------------------------- /out/Exporters/Html5WorkerExporter.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.Html5WorkerExporter = void 0; 4 | const Html5Exporter_1 = require("./Html5Exporter"); 5 | class Html5WorkerExporter extends Html5Exporter_1.Html5Exporter { 6 | constructor(options) { 7 | super(options); 8 | } 9 | backend() { 10 | return 'HTML5-Worker'; 11 | } 12 | } 13 | exports.Html5WorkerExporter = Html5WorkerExporter; 14 | //# sourceMappingURL=Html5WorkerExporter.js.map -------------------------------------------------------------------------------- /out/Exporters/NodeExporter.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.NodeExporter = void 0; 4 | const Html5Exporter_1 = require("./Html5Exporter"); 5 | class NodeExporter extends Html5Exporter_1.Html5Exporter { 6 | constructor(options) { 7 | super(options); 8 | } 9 | backend() { 10 | return 'Node'; 11 | } 12 | isNode() { 13 | return true; 14 | } 15 | } 16 | exports.NodeExporter = NodeExporter; 17 | //# sourceMappingURL=NodeExporter.js.map -------------------------------------------------------------------------------- /out/GraphicsApi.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.GraphicsApi = void 0; 4 | exports.GraphicsApi = { 5 | Default: 'default', 6 | OpenGL: 'opengl', 7 | OpenGL1: 'opengl1', 8 | Direct3D9: 'direct3d9', 9 | Direct3D11: 'direct3d11', 10 | Direct3D12: 'direct3d12', 11 | Metal: 'metal', 12 | Vulkan: 'vulkan' 13 | }; 14 | //# sourceMappingURL=GraphicsApi.js.map -------------------------------------------------------------------------------- /out/Options.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.Options = void 0; 4 | class Options { 5 | } 6 | exports.Options = Options; 7 | //# sourceMappingURL=Options.js.map -------------------------------------------------------------------------------- /out/Platform.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.Platform = void 0; 4 | exports.Platform = { 5 | Krom: 'krom', 6 | Windows: 'windows', 7 | WindowsApp: 'windowsapp', 8 | PlayStation3: 'ps3', 9 | iOS: 'ios', 10 | OSX: 'osx', 11 | Android: 'android', 12 | Xbox360: 'xbox360', 13 | Linux: 'linux', 14 | HTML5: 'html5', 15 | HTML5Worker: 'html5worker', 16 | Flash: 'flash', 17 | WPF: 'wpf', 18 | Java: 'java', 19 | PlayStationMobile: 'psm', 20 | Node: 'node', 21 | DebugHTML5: 'debug-html5', 22 | Empty: 'empty', 23 | Pi: 'pi', 24 | tvOS: 'tvos', 25 | FreeBSD: 'freebsd', 26 | Emscripten: 'emscripten' 27 | }; 28 | //# sourceMappingURL=Platform.js.map -------------------------------------------------------------------------------- /out/RayTraceApi.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.RayTraceApi = void 0; 4 | exports.RayTraceApi = { 5 | DXR: 'dxr', 6 | None: 'none' 7 | }; 8 | //# sourceMappingURL=RayTraceApi.js.map -------------------------------------------------------------------------------- /out/VisualStudioVersion.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.VisualStudioVersion = void 0; 4 | exports.VisualStudioVersion = { 5 | VS2010: 'vs2010', 6 | VS2012: 'vs2012', 7 | VS2013: 'vs2013', 8 | VS2015: 'vs2015', 9 | VS2017: 'vs2017', 10 | VS2019: 'vs2019', 11 | VS2022: 'vs2022' 12 | }; 13 | //# sourceMappingURL=VisualStudioVersion.js.map -------------------------------------------------------------------------------- /out/VrApi.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.VrApi = void 0; 4 | exports.VrApi = { 5 | GearVr: 'gearvr', 6 | Cardboard: 'cardboard', 7 | Oculus: 'oculus', 8 | WebVR: 'webvr', 9 | None: 'none' 10 | }; 11 | //# sourceMappingURL=VrApi.js.map -------------------------------------------------------------------------------- /out/XmlWriter.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.writeXml = void 0; 4 | const fs = require("fs-extra"); 5 | function printElement(elem, data, indents) { 6 | for (let i = 0; i < indents; ++i) 7 | data += '\t'; 8 | if (typeof elem === 'string') { 9 | data += '\n'; 10 | return data; 11 | } 12 | data += '<' + elem.n; 13 | for (let a in elem) { 14 | if (a === 'n') 15 | continue; 16 | if (a === 'e') 17 | continue; 18 | data += ' ' + a + '="' + elem[a] + '"'; 19 | } 20 | if (elem.e === undefined || elem.e.length === 0) { 21 | data += ' />\n'; 22 | } 23 | else { 24 | data += '>\n'; 25 | for (let e of elem.e) { 26 | data = printElement(e, data, indents + 1); 27 | } 28 | for (let i = 0; i < indents; ++i) 29 | data += '\t'; 30 | data += '\n'; 31 | } 32 | return data; 33 | } 34 | function writeXml(xml, path) { 35 | let data = ''; 36 | data += '\n'; 37 | data += '<' + xml.n; 38 | for (let a in xml) { 39 | if (a === 'n') 40 | continue; 41 | if (a === 'e') 42 | continue; 43 | data += ' ' + a + '="' + xml[a] + '"'; 44 | } 45 | data += '>\n'; 46 | for (let e of xml.e) { 47 | data = printElement(e, data, 1); 48 | } 49 | data += '\n'; 50 | fs.outputFileSync(path, data); 51 | } 52 | exports.writeXml = writeXml; 53 | //# sourceMappingURL=XmlWriter.js.map -------------------------------------------------------------------------------- /out/exec.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.sysdir = exports.sys = void 0; 4 | const os = require("os"); 5 | function sys() { 6 | if (os.platform() === 'win32') { 7 | return '.exe'; 8 | } 9 | else { 10 | return ''; 11 | } 12 | } 13 | exports.sys = sys; 14 | function sysdir() { 15 | if (os.platform() === 'linux') { 16 | if (os.arch() === 'arm') 17 | return 'linux_arm'; 18 | if (os.arch() === 'arm64') 19 | return 'linux_arm64'; 20 | else if (os.arch() === 'x64') 21 | return 'linux_x64'; 22 | else 23 | throw 'Unsupported CPU'; 24 | } 25 | else if (os.platform() === 'win32') { 26 | return 'windows_x64'; 27 | } 28 | else if (os.platform() === 'freebsd') { 29 | return 'freebsd_x64'; 30 | } 31 | else { 32 | if (os.arch() === 'arm64') 33 | return 'macos_arm64'; 34 | else if (os.arch() === 'x64') 35 | return 'macos_x64'; 36 | else 37 | throw 'Unsupported CPU'; 38 | } 39 | } 40 | exports.sysdir = sysdir; 41 | //# sourceMappingURL=exec.js.map -------------------------------------------------------------------------------- /out/korepath.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.get = exports.init = void 0; 4 | const path = require("path"); 5 | const exec_1 = require("./exec"); 6 | let korepath = path.join(__dirname, '..', '..', '..', 'Kore', 'Tools', (0, exec_1.sysdir)()); 7 | function init(options) { 8 | korepath = path.join(options.kha, 'Kore', 'Tools', (0, exec_1.sysdir)()); 9 | } 10 | exports.init = init; 11 | function get() { 12 | return korepath; 13 | } 14 | exports.get = get; 15 | //# sourceMappingURL=korepath.js.map -------------------------------------------------------------------------------- /out/log.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.error = exports.info = exports.silent = exports.set = void 0; 4 | let myInfo = function (text, newline) { 5 | if (newline) { 6 | console.log(text); 7 | } 8 | else { 9 | process.stdout.write(text); 10 | } 11 | }; 12 | let myError = function (text, newline) { 13 | if (newline) { 14 | console.error(text); 15 | } 16 | else { 17 | process.stderr.write(text); 18 | } 19 | }; 20 | function set(log) { 21 | myInfo = log.info; 22 | myError = log.error; 23 | } 24 | exports.set = set; 25 | function silent(showErrors = false) { 26 | myInfo = function () { }; 27 | if (!showErrors) { 28 | myError = function () { }; 29 | } 30 | } 31 | exports.silent = silent; 32 | function info(text, newline = true) { 33 | myInfo(text, newline); 34 | } 35 | exports.info = info; 36 | function error(text, newline = true) { 37 | myError(text, newline); 38 | } 39 | exports.error = error; 40 | //# sourceMappingURL=log.js.map -------------------------------------------------------------------------------- /out/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "khamake", 3 | "dependencies": {}, 4 | "globalDependencies": { 5 | "chokidar": "registry:dt/chokidar#1.4.3+20160316155526", 6 | "fs-extra": "registry:dt/fs-extra#0.0.0+20160517121359", 7 | "node": "registry:dt/node#6.0.0+20160728152422" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "khamake", 3 | "version": "1.0.0", 4 | "description": "Kha build tool", 5 | "main": "khamake.js", 6 | "scripts": { 7 | "build": "tsc -p ." 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/Kode/khamake.git" 12 | }, 13 | "keywords": [ 14 | "kha" 15 | ], 16 | "author": "Robert Konrad", 17 | "license": "Zlib", 18 | "bugs": { 19 | "url": "https://github.com/Kode/khamake/issues" 20 | }, 21 | "homepage": "https://github.com/Kode/khamake#readme", 22 | "dependencies": { 23 | "@types/fs-extra": "^5.0.2", 24 | "@types/node": "^12.7.11", 25 | "@types/ws": "^8.5.3", 26 | "chokidar": "^3.5.3", 27 | "fs-extra": "^6.0.0", 28 | "node-static": "^0.7.10", 29 | "uuid": "^3.2.1", 30 | "ws": "^8.17.1" 31 | }, 32 | "devDependencies": { 33 | "promise-parallel-throttle": "^3.1.0", 34 | "typescript": "^3.6.3" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Architecture.ts: -------------------------------------------------------------------------------- 1 | export let Architecture = { 2 | Default: 'default', 3 | Arm7: 'arm7', 4 | Arm8: 'arm8', 5 | X86: 'x86', 6 | X86_64: 'x86_64' 7 | }; 8 | -------------------------------------------------------------------------------- /src/AudioApi.ts: -------------------------------------------------------------------------------- 1 | export let AudioApi = { 2 | Default: 'default', 3 | DirectSound: 'directsound', 4 | WASAPI: 'wasapi' 5 | }; 6 | -------------------------------------------------------------------------------- /src/Color.ts: -------------------------------------------------------------------------------- 1 | export class Color { 2 | red: number; 3 | green: number; 4 | blue: number; 5 | } 6 | -------------------------------------------------------------------------------- /src/Exporters/DebugHtml5Exporter.ts: -------------------------------------------------------------------------------- 1 | import {Html5Exporter} from './Html5Exporter'; 2 | import {Options} from '../Options'; 3 | 4 | export class DebugHtml5Exporter extends Html5Exporter { 5 | constructor(options: Options) { 6 | super(options); 7 | this.isDebug = true; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Exporters/Exporter.ts: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs-extra'; 2 | 3 | export class Exporter { 4 | out: number; 5 | 6 | constructor() { 7 | 8 | } 9 | 10 | writeFile(file: string) { 11 | this.out = fs.openSync(file, 'w'); 12 | } 13 | 14 | closeFile() { 15 | fs.closeSync(this.out); 16 | } 17 | 18 | p(line: string = '', indent: number = 0) { 19 | let tabs = ''; 20 | for (let i = 0; i < indent; ++i) tabs += '\t'; 21 | let data = Buffer.from(tabs + line + '\n'); 22 | fs.writeSync(this.out, data, 0, data.length, null); 23 | } 24 | 25 | copyFile(from: string, to: string) { 26 | fs.copySync(from, to, { overwrite: true }); 27 | } 28 | 29 | copyDirectory(from: string, to: string) { 30 | fs.copySync(from, to, { overwrite: true }); 31 | } 32 | 33 | createDirectory(dir: string) { 34 | fs.ensureDirSync(dir); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Exporters/Html5WorkerExporter.ts: -------------------------------------------------------------------------------- 1 | import * as path from 'path'; 2 | import {Html5Exporter} from './Html5Exporter'; 3 | import {Options} from '../Options'; 4 | 5 | export class Html5WorkerExporter extends Html5Exporter { 6 | constructor(options: Options) { 7 | super(options); 8 | } 9 | 10 | backend(): string { 11 | return 'HTML5-Worker'; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Exporters/NodeExporter.ts: -------------------------------------------------------------------------------- 1 | import * as path from 'path'; 2 | import {Html5Exporter} from './Html5Exporter'; 3 | import {Options} from '../Options'; 4 | 5 | export class NodeExporter extends Html5Exporter { 6 | constructor(options: Options) { 7 | super(options); 8 | } 9 | 10 | backend(): string { 11 | return 'Node'; 12 | } 13 | 14 | isNode() { 15 | return true; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/GraphicsApi.ts: -------------------------------------------------------------------------------- 1 | export let GraphicsApi = { 2 | Default: 'default', 3 | OpenGL: 'opengl', 4 | OpenGL1: 'opengl1', 5 | Direct3D9: 'direct3d9', 6 | Direct3D11: 'direct3d11', 7 | Direct3D12: 'direct3d12', 8 | Metal: 'metal', 9 | Vulkan: 'vulkan' 10 | }; 11 | -------------------------------------------------------------------------------- /src/Haxe.ts: -------------------------------------------------------------------------------- 1 | import * as child_process from 'child_process'; 2 | import * as fs from 'fs'; 3 | import * as path from 'path'; 4 | import * as log from './log'; 5 | import {sys} from './exec'; 6 | 7 | export function executeHaxe(from: string, haxeDirectory: string, options: string[]): Promise { 8 | return new Promise((resolve, reject) => { 9 | let exe = 'haxe'; 10 | let env = process.env; 11 | if (fs.existsSync(haxeDirectory) && fs.statSync(haxeDirectory).isDirectory()) { 12 | let localexe = path.resolve(haxeDirectory, 'haxe' + sys()); 13 | if (!fs.existsSync(localexe)) localexe = path.resolve(haxeDirectory, 'haxe'); 14 | if (fs.existsSync(localexe)) exe = localexe; 15 | const stddir = path.resolve(haxeDirectory, 'std'); 16 | if (fs.existsSync(stddir) && fs.statSync(stddir).isDirectory()) { 17 | env.HAXE_STD_PATH = stddir; 18 | } 19 | } 20 | let haxe = child_process.spawn(exe, options, {env: env, cwd: path.normalize(from)}); 21 | 22 | haxe.stdout.on('data', (data: any) => { 23 | log.info(data.toString()); 24 | }); 25 | 26 | haxe.stderr.on('data', (data: any) => { 27 | log.error(data.toString()); 28 | }); 29 | 30 | haxe.on('close', (code: number) => { 31 | if (code === 0) { 32 | resolve(); 33 | } 34 | else reject('Haxe compiler error.'); 35 | }); 36 | }); 37 | } 38 | -------------------------------------------------------------------------------- /src/Options.ts: -------------------------------------------------------------------------------- 1 | export class Options { 2 | from: string; 3 | to: string; 4 | projectfile: string; 5 | target: string; 6 | vr: string; 7 | raytrace: string; 8 | main: string; 9 | // intermediate: string; 10 | graphics: string; 11 | arch: string; 12 | audio: string; 13 | visualstudio: string; 14 | kha: string; 15 | haxe: string; 16 | nohaxe: boolean; 17 | ffmpeg: string; 18 | krafix: string; 19 | kraffiti: string; 20 | noshaders: boolean; 21 | 22 | parallelAssetConversion: number; 23 | noproject: boolean; 24 | onlydata: boolean; 25 | embedflashassets: boolean; 26 | compile: boolean; 27 | run: boolean; 28 | init: boolean; 29 | name: string; 30 | server: boolean; 31 | port: string; 32 | debug: boolean; 33 | silent: boolean; 34 | quiet: boolean; 35 | watch: boolean; 36 | watchport: string; 37 | livereload: boolean; 38 | glsl2: boolean; 39 | shaderversion: string; 40 | 41 | ogg: string; 42 | aac: string; 43 | mp3: string; 44 | h264: string; 45 | webm: string; 46 | wmv: string; 47 | theora: string; 48 | 49 | slowgc: boolean; 50 | nosigning: boolean; 51 | } 52 | -------------------------------------------------------------------------------- /src/Platform.ts: -------------------------------------------------------------------------------- 1 | export const Platform = { 2 | Krom: 'krom', 3 | Windows: 'windows', 4 | WindowsApp: 'windowsapp', 5 | PlayStation3: 'ps3', 6 | iOS: 'ios', 7 | OSX: 'osx', 8 | Android: 'android', 9 | Xbox360: 'xbox360', 10 | Linux: 'linux', 11 | HTML5: 'html5', 12 | HTML5Worker: 'html5worker', 13 | Flash: 'flash', 14 | WPF: 'wpf', 15 | Java: 'java', 16 | PlayStationMobile: 'psm', 17 | Node: 'node', 18 | DebugHTML5: 'debug-html5', 19 | Empty: 'empty', 20 | Pi: 'pi', 21 | tvOS: 'tvos', 22 | FreeBSD: 'freebsd', 23 | Emscripten: 'emscripten' 24 | }; 25 | -------------------------------------------------------------------------------- /src/RayTraceApi.ts: -------------------------------------------------------------------------------- 1 | export let RayTraceApi = { 2 | DXR: 'dxr', 3 | None: 'none' 4 | }; 5 | -------------------------------------------------------------------------------- /src/VisualStudioVersion.ts: -------------------------------------------------------------------------------- 1 | export const VisualStudioVersion = { 2 | VS2010: 'vs2010', 3 | VS2012: 'vs2012', 4 | VS2013: 'vs2013', 5 | VS2015: 'vs2015', 6 | VS2017: 'vs2017', 7 | VS2019: 'vs2019', 8 | VS2022: 'vs2022' 9 | }; 10 | -------------------------------------------------------------------------------- /src/VrApi.ts: -------------------------------------------------------------------------------- 1 | export let VrApi = { 2 | GearVr: 'gearvr', 3 | Cardboard: 'cardboard', 4 | Oculus: 'oculus', 5 | WebVR: 'webvr', 6 | None: 'none' 7 | }; 8 | -------------------------------------------------------------------------------- /src/XmlWriter.ts: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs-extra'; 2 | 3 | function printElement(elem: any, data: string, indents: number) { 4 | for (let i = 0; i < indents; ++i) data += '\t'; 5 | 6 | if (typeof elem === 'string') { 7 | data += '\n'; 8 | return data; 9 | } 10 | 11 | data += '<' + elem.n; 12 | for (let a in elem) { 13 | if (a === 'n') continue; 14 | if (a === 'e') continue; 15 | data += ' ' + a + '="' + elem[a] + '"'; 16 | } 17 | 18 | if (elem.e === undefined || elem.e.length === 0) { 19 | data += ' />\n'; 20 | } 21 | else { 22 | data += '>\n'; 23 | for (let e of elem.e) { 24 | data = printElement(e, data, indents + 1); 25 | } 26 | for (let i = 0; i < indents; ++i) data += '\t'; 27 | data += '\n'; 28 | } 29 | 30 | return data; 31 | } 32 | 33 | export function writeXml(xml: any, path: string) { 34 | let data = ''; 35 | data += '\n'; 36 | data += '<' + xml.n; 37 | for (let a in xml) { 38 | if (a === 'n') continue; 39 | if (a === 'e') continue; 40 | data += ' ' + a + '="' + xml[a] + '"'; 41 | } 42 | data += '>\n'; 43 | for (let e of xml.e) { 44 | data = printElement(e, data, 1); 45 | } 46 | data += '\n'; 47 | fs.outputFileSync(path, data); 48 | } 49 | -------------------------------------------------------------------------------- /src/defaults.ts: -------------------------------------------------------------------------------- 1 | import {GraphicsApi} from './GraphicsApi'; 2 | import {Platform} from './Platform'; 3 | 4 | export function graphicsApi(platform: string): string { 5 | switch (platform) { 6 | case Platform.Empty: 7 | case Platform.Node: 8 | case Platform.Android: 9 | case Platform.HTML5: 10 | case Platform.DebugHTML5: 11 | case Platform.HTML5Worker: 12 | case Platform.Pi: 13 | case Platform.Linux: 14 | return GraphicsApi.OpenGL; 15 | case Platform.tvOS: 16 | case Platform.iOS: 17 | case Platform.OSX: 18 | return GraphicsApi.Metal; 19 | case Platform.Windows: 20 | case Platform.WindowsApp: 21 | return GraphicsApi.Direct3D11; 22 | case Platform.Krom: 23 | if (process.platform === 'win32') { 24 | return GraphicsApi.Direct3D11; 25 | } 26 | else if (process.platform === 'darwin') { 27 | return GraphicsApi.Metal; 28 | } 29 | else { 30 | return GraphicsApi.OpenGL; 31 | } 32 | case Platform.FreeBSD: 33 | return GraphicsApi.OpenGL; 34 | default: 35 | return platform; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/exec.ts: -------------------------------------------------------------------------------- 1 | import * as os from 'os'; 2 | 3 | export function sys() { 4 | if (os.platform() === 'win32') { 5 | return '.exe'; 6 | } 7 | else { 8 | return ''; 9 | } 10 | } 11 | 12 | export function sysdir() { 13 | if (os.platform() === 'linux') { 14 | if (os.arch() === 'arm') return 'linux_arm'; 15 | if (os.arch() === 'arm64') return 'linux_arm64'; 16 | else if (os.arch() === 'x64') return 'linux_x64'; 17 | else throw 'Unsupported CPU'; 18 | } 19 | else if (os.platform() === 'win32') { 20 | return 'windows_x64'; 21 | } 22 | else if (os.platform() === 'freebsd') { 23 | return 'freebsd_x64'; 24 | } 25 | else { 26 | if (os.arch() === 'arm64') return 'macos_arm64'; 27 | else if (os.arch() === 'x64') return 'macos_x64'; 28 | else throw 'Unsupported CPU'; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/korepath.ts: -------------------------------------------------------------------------------- 1 | import * as path from 'path'; 2 | import {sysdir} from './exec'; 3 | 4 | let korepath = path.join(__dirname, '..', '..', '..', 'Kore', 'Tools', sysdir()); 5 | 6 | export function init(options: any) { 7 | korepath = path.join(options.kha, 'Kore', 'Tools', sysdir()); 8 | } 9 | 10 | export function get() { 11 | return korepath; 12 | } 13 | -------------------------------------------------------------------------------- /src/log.ts: -------------------------------------------------------------------------------- 1 | let myInfo = function (text: string, newline: boolean) { 2 | if (newline) { 3 | console.log(text); 4 | } 5 | else { 6 | process.stdout.write(text); 7 | } 8 | }; 9 | 10 | let myError = function (text: string, newline: boolean) { 11 | if (newline) { 12 | console.error(text); 13 | } 14 | else { 15 | process.stderr.write(text); 16 | } 17 | }; 18 | 19 | export function set(log: {info: (text: string, newline: boolean) => void, error: (text: string, newline: boolean) => void}) { 20 | myInfo = log.info; 21 | myError = log.error; 22 | } 23 | 24 | export function silent(showErrors: boolean = false) { 25 | myInfo = function () {}; 26 | if (!showErrors) { 27 | myError = function () {}; 28 | } 29 | } 30 | 31 | export function info(text: string, newline: boolean = true) { 32 | myInfo(text, newline); 33 | } 34 | 35 | export function error(text: string, newline: boolean = true) { 36 | myError(text, newline); 37 | } 38 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "module": "commonjs", 5 | "sourceMap": true, 6 | "outDir": "out", 7 | "noImplicitAny": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "newLine": "LF", 10 | "noFallthroughCasesInSwitch": true, 11 | "noImplicitReturns": true 12 | }, 13 | "include": [ 14 | "src/**/*.ts", 15 | "node_modules/@types/**/*.ts" 16 | ], 17 | "exclude": [ 18 | "src/@types/**/*.ts" 19 | ], 20 | "compileOnSave": true 21 | } 22 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "class-name": true, 4 | "comment-format": [ 5 | true, 6 | "check-space" 7 | ], 8 | "indent": [ 9 | true, 10 | "tabs" 11 | ], 12 | "no-duplicate-variable": true, 13 | "no-eval": true, 14 | "no-internal-module": true, 15 | "no-unsafe-finally": true, 16 | "no-var-keyword": true, 17 | "one-line": [ 18 | true, 19 | "check-open-brace", 20 | "check-whitespace" 21 | ], 22 | "quotemark": [ 23 | true, 24 | "single" 25 | ], 26 | "semicolon": [ 27 | true, 28 | "always" 29 | ], 30 | "triple-equals": [ 31 | true, 32 | "allow-null-check" 33 | ], 34 | "typedef-whitespace": [ 35 | true, 36 | { 37 | "call-signature": "nospace", 38 | "index-signature": "nospace", 39 | "parameter": "nospace", 40 | "property-declaration": "nospace", 41 | "variable-declaration": "nospace" 42 | } 43 | ], 44 | "variable-name": [ 45 | true, 46 | "ban-keywords" 47 | ], 48 | "whitespace": [ 49 | true, 50 | "check-branch", 51 | "check-decl", 52 | "check-operator", 53 | "check-separator", 54 | "check-type" 55 | ] 56 | } 57 | } --------------------------------------------------------------------------------