jass 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +47 -0
- data/README.md +45 -0
- data/lib/jass.rb +55 -0
- data/lib/jass/base.rb +141 -0
- data/lib/jass/bundle_processor.rb +28 -0
- data/lib/jass/compiler.rb +112 -0
- data/lib/jass/dependency.rb +14 -0
- data/lib/jass/errors.rb +29 -0
- data/lib/jass/es6_processor.rb +17 -0
- data/lib/jass/function.rb +13 -0
- data/lib/jass/global_directive_processor.rb +12 -0
- data/lib/jass/plugin.rb +13 -0
- data/lib/jass/railtie.rb +12 -0
- data/lib/jass/version.rb +3 -0
- data/vendor/node_modules/@types/acorn/index.d.ts +256 -0
- data/vendor/node_modules/@types/acorn/package.json +29 -0
- data/vendor/node_modules/@types/estree/index.d.ts +546 -0
- data/vendor/node_modules/@types/estree/package.json +22 -0
- data/vendor/node_modules/acorn-dynamic-import/lib/index.js +17 -0
- data/vendor/node_modules/acorn-dynamic-import/lib/inject.js +72 -0
- data/vendor/node_modules/acorn-dynamic-import/lib/walk.js +22 -0
- data/vendor/node_modules/acorn-dynamic-import/package.json +45 -0
- data/vendor/node_modules/acorn-dynamic-import/src/index.js +4 -0
- data/vendor/node_modules/acorn-dynamic-import/src/inject.js +52 -0
- data/vendor/node_modules/acorn-dynamic-import/src/walk.js +12 -0
- data/vendor/node_modules/acorn-es7-plugin/acorn-es7-plugin.js +17 -0
- data/vendor/node_modules/acorn-es7-plugin/acorn-v3.js +333 -0
- data/vendor/node_modules/acorn-es7-plugin/acorn-v4.js +194 -0
- data/vendor/node_modules/acorn-es7-plugin/package.json +29 -0
- data/vendor/node_modules/acorn-jsx/index.js +3 -0
- data/vendor/node_modules/acorn-jsx/inject.js +449 -0
- data/vendor/node_modules/acorn-jsx/package.json +28 -0
- data/vendor/node_modules/acorn-jsx/xhtml.js +255 -0
- data/vendor/node_modules/acorn/bin/_acorn.js +69 -0
- data/vendor/node_modules/acorn/bin/acorn +4 -0
- data/vendor/node_modules/acorn/bin/run_test262.js +22 -0
- data/vendor/node_modules/acorn/bin/test262.whitelist +409 -0
- data/vendor/node_modules/acorn/dist/acorn.es.js +5305 -0
- data/vendor/node_modules/acorn/dist/acorn.js +5336 -0
- data/vendor/node_modules/acorn/dist/acorn_loose.es.js +1412 -0
- data/vendor/node_modules/acorn/dist/acorn_loose.js +1422 -0
- data/vendor/node_modules/acorn/dist/walk.es.js +419 -0
- data/vendor/node_modules/acorn/dist/walk.js +439 -0
- data/vendor/node_modules/acorn/package.json +56 -0
- data/vendor/node_modules/ansi-styles/index.js +165 -0
- data/vendor/node_modules/ansi-styles/package.json +56 -0
- data/vendor/node_modules/arr-diff/index.js +58 -0
- data/vendor/node_modules/arr-diff/package.json +49 -0
- data/vendor/node_modules/arr-flatten/index.js +22 -0
- data/vendor/node_modules/arr-flatten/package.json +76 -0
- data/vendor/node_modules/array-unique/index.js +28 -0
- data/vendor/node_modules/array-unique/package.json +37 -0
- data/vendor/node_modules/braces/index.js +399 -0
- data/vendor/node_modules/braces/package.json +83 -0
- data/vendor/node_modules/buble/bin/buble +24 -0
- data/vendor/node_modules/buble/bin/handleError.js +58 -0
- data/vendor/node_modules/buble/bin/runBuble.js +150 -0
- data/vendor/node_modules/buble/bin/showHelp.js +16 -0
- data/vendor/node_modules/buble/dist/buble-browser-deps.umd.js +14857 -0
- data/vendor/node_modules/buble/dist/buble-browser.cjs.js +9941 -0
- data/vendor/node_modules/buble/dist/buble-browser.es.js +9933 -0
- data/vendor/node_modules/buble/dist/buble.cjs.js +9433 -0
- data/vendor/node_modules/buble/dist/buble.es.js +9425 -0
- data/vendor/node_modules/buble/package.json +74 -0
- data/vendor/node_modules/buble/register.js +90 -0
- data/vendor/node_modules/buble/src/index.js +98 -0
- data/vendor/node_modules/buble/src/program/BlockStatement.js +373 -0
- data/vendor/node_modules/buble/src/program/Node.js +112 -0
- data/vendor/node_modules/buble/src/program/Program.js +74 -0
- data/vendor/node_modules/buble/src/program/Scope.js +116 -0
- data/vendor/node_modules/buble/src/program/extractNames.js +35 -0
- data/vendor/node_modules/buble/src/program/keys.js +4 -0
- data/vendor/node_modules/buble/src/program/types/ArrayExpression.js +70 -0
- data/vendor/node_modules/buble/src/program/types/ArrowFunctionExpression.js +52 -0
- data/vendor/node_modules/buble/src/program/types/AssignmentExpression.js +185 -0
- data/vendor/node_modules/buble/src/program/types/BinaryExpression.js +12 -0
- data/vendor/node_modules/buble/src/program/types/BreakStatement.js +26 -0
- data/vendor/node_modules/buble/src/program/types/CallExpression.js +104 -0
- data/vendor/node_modules/buble/src/program/types/ClassBody.js +237 -0
- data/vendor/node_modules/buble/src/program/types/ClassDeclaration.js +79 -0
- data/vendor/node_modules/buble/src/program/types/ClassExpression.js +51 -0
- data/vendor/node_modules/buble/src/program/types/ContinueStatement.js +17 -0
- data/vendor/node_modules/buble/src/program/types/ExportDefaultDeclaration.js +10 -0
- data/vendor/node_modules/buble/src/program/types/ExportNamedDeclaration.js +10 -0
- data/vendor/node_modules/buble/src/program/types/ForInStatement.js +76 -0
- data/vendor/node_modules/buble/src/program/types/ForOfStatement.js +89 -0
- data/vendor/node_modules/buble/src/program/types/ForStatement.js +54 -0
- data/vendor/node_modules/buble/src/program/types/FunctionDeclaration.js +25 -0
- data/vendor/node_modules/buble/src/program/types/FunctionExpression.js +74 -0
- data/vendor/node_modules/buble/src/program/types/Identifier.js +54 -0
- data/vendor/node_modules/buble/src/program/types/IfStatement.js +29 -0
- data/vendor/node_modules/buble/src/program/types/ImportDeclaration.js +10 -0
- data/vendor/node_modules/buble/src/program/types/ImportDefaultSpecifier.js +8 -0
- data/vendor/node_modules/buble/src/program/types/ImportSpecifier.js +8 -0
- data/vendor/node_modules/buble/src/program/types/JSXAttribute.js +20 -0
- data/vendor/node_modules/buble/src/program/types/JSXClosingElement.js +27 -0
- data/vendor/node_modules/buble/src/program/types/JSXClosingFragment.js +22 -0
- data/vendor/node_modules/buble/src/program/types/JSXElement.js +57 -0
- data/vendor/node_modules/buble/src/program/types/JSXExpressionContainer.js +10 -0
- data/vendor/node_modules/buble/src/program/types/JSXFragment.js +4 -0
- data/vendor/node_modules/buble/src/program/types/JSXOpeningElement.js +93 -0
- data/vendor/node_modules/buble/src/program/types/JSXOpeningFragment.js +7 -0
- data/vendor/node_modules/buble/src/program/types/JSXSpreadAttribute.js +10 -0
- data/vendor/node_modules/buble/src/program/types/Literal.js +43 -0
- data/vendor/node_modules/buble/src/program/types/MemberExpression.js +13 -0
- data/vendor/node_modules/buble/src/program/types/NewExpression.js +55 -0
- data/vendor/node_modules/buble/src/program/types/ObjectExpression.js +250 -0
- data/vendor/node_modules/buble/src/program/types/Property.js +52 -0
- data/vendor/node_modules/buble/src/program/types/ReturnStatement.js +32 -0
- data/vendor/node_modules/buble/src/program/types/SpreadElement.js +12 -0
- data/vendor/node_modules/buble/src/program/types/Super.js +88 -0
- data/vendor/node_modules/buble/src/program/types/TaggedTemplateExpression.js +63 -0
- data/vendor/node_modules/buble/src/program/types/TemplateElement.js +7 -0
- data/vendor/node_modules/buble/src/program/types/TemplateLiteral.js +80 -0
- data/vendor/node_modules/buble/src/program/types/ThisExpression.js +31 -0
- data/vendor/node_modules/buble/src/program/types/UpdateExpression.js +32 -0
- data/vendor/node_modules/buble/src/program/types/VariableDeclaration.js +101 -0
- data/vendor/node_modules/buble/src/program/types/VariableDeclarator.js +43 -0
- data/vendor/node_modules/buble/src/program/types/index.js +98 -0
- data/vendor/node_modules/buble/src/program/types/shared/LoopStatement.js +105 -0
- data/vendor/node_modules/buble/src/program/types/shared/ModuleDeclaration.js +10 -0
- data/vendor/node_modules/buble/src/program/wrap.js +68 -0
- data/vendor/node_modules/buble/src/support.js +97 -0
- data/vendor/node_modules/buble/src/utils/CompileError.js +30 -0
- data/vendor/node_modules/buble/src/utils/array.js +11 -0
- data/vendor/node_modules/buble/src/utils/checkConst.js +8 -0
- data/vendor/node_modules/buble/src/utils/deindent.js +30 -0
- data/vendor/node_modules/buble/src/utils/destructure.js +377 -0
- data/vendor/node_modules/buble/src/utils/getSnippet.js +30 -0
- data/vendor/node_modules/buble/src/utils/isReference.js +41 -0
- data/vendor/node_modules/buble/src/utils/locate.js +20 -0
- data/vendor/node_modules/buble/src/utils/patterns.js +1 -0
- data/vendor/node_modules/buble/src/utils/removeTrailingComma.js +13 -0
- data/vendor/node_modules/buble/src/utils/reserved.js +6 -0
- data/vendor/node_modules/buble/src/utils/spread.js +70 -0
- data/vendor/node_modules/builtin-modules/builtin-modules.json +39 -0
- data/vendor/node_modules/builtin-modules/index.js +10 -0
- data/vendor/node_modules/builtin-modules/package.json +40 -0
- data/vendor/node_modules/builtin-modules/static.js +2 -0
- data/vendor/node_modules/chalk/index.js +228 -0
- data/vendor/node_modules/chalk/package.json +66 -0
- data/vendor/node_modules/chalk/templates.js +128 -0
- data/vendor/node_modules/chalk/types/index.d.ts +97 -0
- data/vendor/node_modules/color-convert/conversions.js +861 -0
- data/vendor/node_modules/color-convert/index.js +78 -0
- data/vendor/node_modules/color-convert/package.json +46 -0
- data/vendor/node_modules/color-convert/route.js +97 -0
- data/vendor/node_modules/color-name/index.js +152 -0
- data/vendor/node_modules/color-name/package.json +25 -0
- data/vendor/node_modules/color-name/test.js +7 -0
- data/vendor/node_modules/date-time/index.js +33 -0
- data/vendor/node_modules/date-time/package.json +39 -0
- data/vendor/node_modules/escape-string-regexp/index.js +11 -0
- data/vendor/node_modules/escape-string-regexp/package.json +41 -0
- data/vendor/node_modules/estree-walker/dist/estree-walker.es.js +57 -0
- data/vendor/node_modules/estree-walker/dist/estree-walker.umd.js +68 -0
- data/vendor/node_modules/estree-walker/package.json +34 -0
- data/vendor/node_modules/estree-walker/src/estree-walker.js +51 -0
- data/vendor/node_modules/expand-brackets/index.js +163 -0
- data/vendor/node_modules/expand-brackets/package.json +62 -0
- data/vendor/node_modules/expand-range/index.js +43 -0
- data/vendor/node_modules/expand-range/package.json +73 -0
- data/vendor/node_modules/extglob/index.js +178 -0
- data/vendor/node_modules/extglob/package.json +60 -0
- data/vendor/node_modules/filename-regex/index.js +10 -0
- data/vendor/node_modules/filename-regex/package.json +50 -0
- data/vendor/node_modules/fill-range/index.js +408 -0
- data/vendor/node_modules/fill-range/package.json +61 -0
- data/vendor/node_modules/for-in/index.js +16 -0
- data/vendor/node_modules/for-in/package.json +68 -0
- data/vendor/node_modules/for-own/index.js +19 -0
- data/vendor/node_modules/for-own/package.json +70 -0
- data/vendor/node_modules/glob-base/index.js +51 -0
- data/vendor/node_modules/glob-base/package.json +52 -0
- data/vendor/node_modules/glob-parent/index.js +10 -0
- data/vendor/node_modules/glob-parent/package.json +35 -0
- data/vendor/node_modules/glob-parent/test.js +28 -0
- data/vendor/node_modules/has-flag/index.js +8 -0
- data/vendor/node_modules/has-flag/package.json +44 -0
- data/vendor/node_modules/irregular-plurals/irregular-plurals.json +146 -0
- data/vendor/node_modules/irregular-plurals/package.json +39 -0
- data/vendor/node_modules/is-buffer/index.js +21 -0
- data/vendor/node_modules/is-buffer/package.json +51 -0
- data/vendor/node_modules/is-dotfile/index.js +14 -0
- data/vendor/node_modules/is-dotfile/package.json +69 -0
- data/vendor/node_modules/is-equal-shallow/index.js +27 -0
- data/vendor/node_modules/is-equal-shallow/package.json +54 -0
- data/vendor/node_modules/is-extendable/index.js +13 -0
- data/vendor/node_modules/is-extendable/package.json +51 -0
- data/vendor/node_modules/is-extglob/index.js +11 -0
- data/vendor/node_modules/is-extglob/package.json +48 -0
- data/vendor/node_modules/is-glob/index.js +14 -0
- data/vendor/node_modules/is-glob/package.json +60 -0
- data/vendor/node_modules/is-module/index.js +11 -0
- data/vendor/node_modules/is-module/package.json +20 -0
- data/vendor/node_modules/is-number/index.js +19 -0
- data/vendor/node_modules/is-number/package.json +59 -0
- data/vendor/node_modules/is-posix-bracket/index.js +10 -0
- data/vendor/node_modules/is-posix-bracket/package.json +64 -0
- data/vendor/node_modules/is-primitive/index.js +13 -0
- data/vendor/node_modules/is-primitive/package.json +46 -0
- data/vendor/node_modules/is-reference/dist/is-reference.es.js +26 -0
- data/vendor/node_modules/is-reference/dist/is-reference.js +34 -0
- data/vendor/node_modules/is-reference/dist/types/index.d.ts +2 -0
- data/vendor/node_modules/is-reference/package.json +47 -0
- data/vendor/node_modules/isarray/index.js +5 -0
- data/vendor/node_modules/isarray/package.json +45 -0
- data/vendor/node_modules/isarray/test.js +20 -0
- data/vendor/node_modules/isobject/index.js +14 -0
- data/vendor/node_modules/isobject/package.json +67 -0
- data/vendor/node_modules/kind-of/index.js +116 -0
- data/vendor/node_modules/kind-of/package.json +90 -0
- data/vendor/node_modules/locate-character/dist/locate-character.es.js +43 -0
- data/vendor/node_modules/locate-character/dist/locate-character.umd.js +54 -0
- data/vendor/node_modules/locate-character/dist/types/index.d.ts +17 -0
- data/vendor/node_modules/locate-character/package.json +41 -0
- data/vendor/node_modules/magic-string/dist/magic-string.cjs.js +1300 -0
- data/vendor/node_modules/magic-string/dist/magic-string.es.js +1296 -0
- data/vendor/node_modules/magic-string/dist/magic-string.umd.js +1352 -0
- data/vendor/node_modules/magic-string/index.d.ts +83 -0
- data/vendor/node_modules/magic-string/node_modules/vlq/dist/vlq.js +91 -0
- data/vendor/node_modules/magic-string/node_modules/vlq/package.json +27 -0
- data/vendor/node_modules/magic-string/node_modules/vlq/src/vlq.js +78 -0
- data/vendor/node_modules/magic-string/package.json +55 -0
- data/vendor/node_modules/micromatch/index.js +431 -0
- data/vendor/node_modules/micromatch/lib/chars.js +67 -0
- data/vendor/node_modules/micromatch/lib/expand.js +304 -0
- data/vendor/node_modules/micromatch/lib/glob.js +193 -0
- data/vendor/node_modules/micromatch/lib/utils.js +149 -0
- data/vendor/node_modules/micromatch/package.json +114 -0
- data/vendor/node_modules/minimist/index.js +236 -0
- data/vendor/node_modules/minimist/package.json +45 -0
- data/vendor/node_modules/nodent-compiler/compiler.js +171 -0
- data/vendor/node_modules/nodent-compiler/lib/arboriculture.js +2694 -0
- data/vendor/node_modules/nodent-compiler/lib/output.js +934 -0
- data/vendor/node_modules/nodent-compiler/lib/parser.js +291 -0
- data/vendor/node_modules/nodent-compiler/package.json +37 -0
- data/vendor/node_modules/normalize-path/index.js +19 -0
- data/vendor/node_modules/normalize-path/package.json +78 -0
- data/vendor/node_modules/object.omit/index.js +40 -0
- data/vendor/node_modules/object.omit/package.json +67 -0
- data/vendor/node_modules/os-homedir/index.js +24 -0
- data/vendor/node_modules/os-homedir/package.json +41 -0
- data/vendor/node_modules/parse-glob/index.js +156 -0
- data/vendor/node_modules/parse-glob/package.json +62 -0
- data/vendor/node_modules/parse-ms/index.js +16 -0
- data/vendor/node_modules/parse-ms/package.json +34 -0
- data/vendor/node_modules/path-parse/index.js +93 -0
- data/vendor/node_modules/path-parse/index.min.js +1 -0
- data/vendor/node_modules/path-parse/package.json +33 -0
- data/vendor/node_modules/path-parse/test.js +77 -0
- data/vendor/node_modules/path-parse/test.min.js +1 -0
- data/vendor/node_modules/plur/index.js +20 -0
- data/vendor/node_modules/plur/package.json +42 -0
- data/vendor/node_modules/preserve/index.js +54 -0
- data/vendor/node_modules/preserve/package.json +48 -0
- data/vendor/node_modules/preserve/test.js +48 -0
- data/vendor/node_modules/pretty-ms/index.js +48 -0
- data/vendor/node_modules/pretty-ms/package.json +48 -0
- data/vendor/node_modules/randomatic/index.js +82 -0
- data/vendor/node_modules/randomatic/node_modules/is-number/index.js +22 -0
- data/vendor/node_modules/randomatic/node_modules/is-number/node_modules/kind-of/index.js +116 -0
- data/vendor/node_modules/randomatic/node_modules/is-number/node_modules/kind-of/package.json +90 -0
- data/vendor/node_modules/randomatic/node_modules/is-number/package.json +83 -0
- data/vendor/node_modules/randomatic/node_modules/kind-of/index.js +119 -0
- data/vendor/node_modules/randomatic/node_modules/kind-of/package.json +90 -0
- data/vendor/node_modules/randomatic/package.json +78 -0
- data/vendor/node_modules/regex-cache/index.js +68 -0
- data/vendor/node_modules/regex-cache/package.json +64 -0
- data/vendor/node_modules/remove-trailing-separator/index.js +17 -0
- data/vendor/node_modules/remove-trailing-separator/package.json +37 -0
- data/vendor/node_modules/repeat-element/index.js +18 -0
- data/vendor/node_modules/repeat-element/package.json +44 -0
- data/vendor/node_modules/repeat-string/index.js +70 -0
- data/vendor/node_modules/repeat-string/package.json +77 -0
- data/vendor/node_modules/require-relative/index.js +33 -0
- data/vendor/node_modules/require-relative/package.json +22 -0
- data/vendor/node_modules/resolve/index.js +8 -0
- data/vendor/node_modules/resolve/lib/async.js +203 -0
- data/vendor/node_modules/resolve/lib/caller.js +8 -0
- data/vendor/node_modules/resolve/lib/core.js +53 -0
- data/vendor/node_modules/resolve/lib/core.json +69 -0
- data/vendor/node_modules/resolve/lib/node-modules-paths.js +45 -0
- data/vendor/node_modules/resolve/lib/sync.js +93 -0
- data/vendor/node_modules/resolve/package.json +40 -0
- data/vendor/node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs.js +804 -0
- data/vendor/node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.es.js +800 -0
- data/vendor/node_modules/rollup-plugin-commonjs/package.json +52 -0
- data/vendor/node_modules/rollup-plugin-commonjs/src/ast-utils.js +104 -0
- data/vendor/node_modules/rollup-plugin-commonjs/src/defaultResolver.js +39 -0
- data/vendor/node_modules/rollup-plugin-commonjs/src/helpers.js +19 -0
- data/vendor/node_modules/rollup-plugin-commonjs/src/index.js +198 -0
- data/vendor/node_modules/rollup-plugin-commonjs/src/transform.js +431 -0
- data/vendor/node_modules/rollup-plugin-commonjs/src/utils.js +13 -0
- data/vendor/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js +218 -0
- data/vendor/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.es.js +214 -0
- data/vendor/node_modules/rollup-plugin-node-resolve/package.json +51 -0
- data/vendor/node_modules/rollup-plugin-node-resolve/src/empty.js +1 -0
- data/vendor/node_modules/rollup-plugin-node-resolve/src/index.js +205 -0
- data/vendor/node_modules/rollup-pluginutils/dist/pluginutils.cjs.js +223 -0
- data/vendor/node_modules/rollup-pluginutils/dist/pluginutils.es.js +214 -0
- data/vendor/node_modules/rollup-pluginutils/dist/pluginutils.es6.js +217 -0
- data/vendor/node_modules/rollup-pluginutils/node_modules/estree-walker/dist/estree-walker.es.js +55 -0
- data/vendor/node_modules/rollup-pluginutils/node_modules/estree-walker/dist/estree-walker.es6.js +59 -0
- data/vendor/node_modules/rollup-pluginutils/node_modules/estree-walker/dist/estree-walker.umd.js +65 -0
- data/vendor/node_modules/rollup-pluginutils/node_modules/estree-walker/package.json +33 -0
- data/vendor/node_modules/rollup-pluginutils/node_modules/estree-walker/src/estree-walker.js +49 -0
- data/vendor/node_modules/rollup-pluginutils/package.json +40 -0
- data/vendor/node_modules/rollup-pluginutils/src/addExtension.js +6 -0
- data/vendor/node_modules/rollup-pluginutils/src/attachScopes.js +147 -0
- data/vendor/node_modules/rollup-pluginutils/src/createFilter.js +33 -0
- data/vendor/node_modules/rollup-pluginutils/src/index.js +4 -0
- data/vendor/node_modules/rollup-pluginutils/src/makeLegalIdentifier.js +15 -0
- data/vendor/node_modules/rollup-pluginutils/src/utils/ensureArray.js +5 -0
- data/vendor/node_modules/rollup/bin/rollup +4085 -0
- data/vendor/node_modules/rollup/dist/rollup.browser.js +19829 -0
- data/vendor/node_modules/rollup/dist/rollup.es.js +23586 -0
- data/vendor/node_modules/rollup/dist/rollup.js +23597 -0
- data/vendor/node_modules/rollup/dist/typings/Chunk.d.ts +85 -0
- data/vendor/node_modules/rollup/dist/typings/ExternalModule.d.ts +30 -0
- data/vendor/node_modules/rollup/dist/typings/Graph.d.ts +47 -0
- data/vendor/node_modules/rollup/dist/typings/Module.d.ts +130 -0
- data/vendor/node_modules/rollup/dist/typings/ast/CallOptions.d.ts +20 -0
- data/vendor/node_modules/rollup/dist/typings/ast/Entity.d.ts +16 -0
- data/vendor/node_modules/rollup/dist/typings/ast/ExecutionPathOptions.d.ts +57 -0
- data/vendor/node_modules/rollup/dist/typings/ast/clone.d.ts +1 -0
- data/vendor/node_modules/rollup/dist/typings/ast/enhance.d.ts +3 -0
- data/vendor/node_modules/rollup/dist/typings/ast/keys.d.ts +4 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ArrayExpression.d.ts +14 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ArrayPattern.d.ts +14 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ArrowFunctionExpression.d.ts +25 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/AssignmentExpression.d.ts +13 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/AssignmentPattern.d.ts +16 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/AssignmentProperty.d.ts +10 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/AwaitExpression.d.ts +8 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/BinaryExpression.d.ts +13 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/BlockStatement.d.ts +19 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/BreakStatement.d.ts +9 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/CallExpression.d.ts +22 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/CatchClause.d.ts +14 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ClassBody.d.ts +13 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ClassDeclaration.d.ts +14 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ClassExpression.d.ts +10 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ConditionalExpression.d.ts +28 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/DoWhileStatement.d.ts +9 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/EmptyStatement.d.ts +8 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ExportAllDeclaration.d.ts +12 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ExportDefaultDeclaration.d.ts +21 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ExportNamedDeclaration.d.ts +21 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ExportSpecifier.d.ts +8 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ExpressionStatement.d.ts +10 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ForInStatement.d.ts +20 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ForOfStatement.d.ts +21 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ForStatement.d.ts +19 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/FunctionDeclaration.d.ts +9 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/FunctionExpression.d.ts +6 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/Identifier.d.ts +29 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/IfStatement.d.ts +17 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/Import.d.ts +14 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ImportDeclaration.d.ts +17 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ImportDefaultSpecifier.d.ts +7 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ImportNamespaceSpecifier.d.ts +7 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ImportSpecifier.d.ts +8 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/LabeledStatement.d.ts +10 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/Literal.d.ts +22 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/LogicalExpression.d.ts +23 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/MemberExpression.d.ts +34 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/MethodDefinition.d.ts +16 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/NewExpression.d.ts +14 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/NodeType.d.ts +64 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ObjectExpression.d.ts +22 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ObjectPattern.d.ts +15 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/Program.d.ts +9 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/Property.d.ts +30 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/RestElement.d.ts +14 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ReturnStatement.d.ts +9 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/SequenceExpression.d.ts +13 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/SpreadElement.d.ts +6 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/SwitchCase.d.ts +11 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/SwitchStatement.d.ts +12 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/TaggedTemplateExpression.d.ts +13 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/TemplateElement.d.ts +12 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/TemplateLiteral.d.ts +12 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ThisExpression.d.ts +17 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/ThrowStatement.d.ts +8 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/UnaryExpression.d.ts +16 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/UnknownNode.d.ts +5 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/UpdateExpression.d.ts +13 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/VariableDeclaration.d.ts +21 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/VariableDeclarator.d.ts +13 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/WhileStatement.d.ts +9 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/YieldExpression.d.ts +9 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/index.d.ts +6 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/shared/ClassNode.d.ts +17 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/shared/Expression.d.ts +21 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/shared/FunctionNode.d.ts +25 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/shared/Node.d.ts +133 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/shared/Pattern.d.ts +4 -0
- data/vendor/node_modules/rollup/dist/typings/ast/nodes/shared/pureFunctions.d.ts +4 -0
- data/vendor/node_modules/rollup/dist/typings/ast/scopes/BlockScope.d.ts +9 -0
- data/vendor/node_modules/rollup/dist/typings/ast/scopes/CatchScope.d.ts +10 -0
- data/vendor/node_modules/rollup/dist/typings/ast/scopes/FunctionScope.d.ts +20 -0
- data/vendor/node_modules/rollup/dist/typings/ast/scopes/GlobalScope.d.ts +7 -0
- data/vendor/node_modules/rollup/dist/typings/ast/scopes/ModuleScope.d.ts +11 -0
- data/vendor/node_modules/rollup/dist/typings/ast/scopes/ParameterScope.d.ts +16 -0
- data/vendor/node_modules/rollup/dist/typings/ast/scopes/ReturnValueScope.d.ts +11 -0
- data/vendor/node_modules/rollup/dist/typings/ast/scopes/Scope.d.ts +42 -0
- data/vendor/node_modules/rollup/dist/typings/ast/utils/extractNames.d.ts +2 -0
- data/vendor/node_modules/rollup/dist/typings/ast/values.d.ts +31 -0
- data/vendor/node_modules/rollup/dist/typings/ast/variables/ArgumentsVariable.d.ts +15 -0
- data/vendor/node_modules/rollup/dist/typings/ast/variables/ExportDefaultVariable.d.ts +16 -0
- data/vendor/node_modules/rollup/dist/typings/ast/variables/ExternalVariable.d.ts +12 -0
- data/vendor/node_modules/rollup/dist/typings/ast/variables/GlobalVariable.d.ts +11 -0
- data/vendor/node_modules/rollup/dist/typings/ast/variables/LocalVariable.d.ts +21 -0
- data/vendor/node_modules/rollup/dist/typings/ast/variables/NamespaceVariable.d.ts +20 -0
- data/vendor/node_modules/rollup/dist/typings/ast/variables/ParameterVariable.d.ts +5 -0
- data/vendor/node_modules/rollup/dist/typings/ast/variables/ReplaceableInitializationVariable.d.ts +14 -0
- data/vendor/node_modules/rollup/dist/typings/ast/variables/ThisVariable.d.ts +4 -0
- data/vendor/node_modules/rollup/dist/typings/ast/variables/Variable.d.ts +43 -0
- data/vendor/node_modules/rollup/dist/typings/ast/variables/VariableReassignmentTracker.d.ts +11 -0
- data/vendor/node_modules/rollup/dist/typings/finalisers/amd.d.ts +11 -0
- data/vendor/node_modules/rollup/dist/typings/finalisers/cjs.d.ts +10 -0
- data/vendor/node_modules/rollup/dist/typings/finalisers/es.d.ts +9 -0
- data/vendor/node_modules/rollup/dist/typings/finalisers/iife.d.ts +10 -0
- data/vendor/node_modules/rollup/dist/typings/finalisers/index.d.ts +15 -0
- data/vendor/node_modules/rollup/dist/typings/finalisers/shared/esModuleExport.d.ts +2 -0
- data/vendor/node_modules/rollup/dist/typings/finalisers/shared/getExportBlock.d.ts +2 -0
- data/vendor/node_modules/rollup/dist/typings/finalisers/shared/getGlobalNameMaker.d.ts +4 -0
- data/vendor/node_modules/rollup/dist/typings/finalisers/shared/getInteropBlock.d.ts +3 -0
- data/vendor/node_modules/rollup/dist/typings/finalisers/shared/sanitize.d.ts +2 -0
- data/vendor/node_modules/rollup/dist/typings/finalisers/shared/setupNamespace.d.ts +2 -0
- data/vendor/node_modules/rollup/dist/typings/finalisers/shared/trimEmptyImports.d.ts +2 -0
- data/vendor/node_modules/rollup/dist/typings/finalisers/shared/warnOnBuiltins.d.ts +2 -0
- data/vendor/node_modules/rollup/dist/typings/finalisers/system.d.ts +8 -0
- data/vendor/node_modules/rollup/dist/typings/finalisers/umd.d.ts +10 -0
- data/vendor/node_modules/rollup/dist/typings/node-entry.d.ts +6 -0
- data/vendor/node_modules/rollup/dist/typings/rollup/index.d.ts +167 -0
- data/vendor/node_modules/rollup/dist/typings/utils/callIfFunction.d.ts +1 -0
- data/vendor/node_modules/rollup/dist/typings/utils/collapseSourcemaps.d.ts +5 -0
- data/vendor/node_modules/rollup/dist/typings/utils/commondir.d.ts +1 -0
- data/vendor/node_modules/rollup/dist/typings/utils/defaults.d.ts +6 -0
- data/vendor/node_modules/rollup/dist/typings/utils/deprecateOptions.d.ts +6 -0
- data/vendor/node_modules/rollup/dist/typings/utils/ensureArray.d.ts +2 -0
- data/vendor/node_modules/rollup/dist/typings/utils/entryHashing.d.ts +3 -0
- data/vendor/node_modules/rollup/dist/typings/utils/error.d.ts +18 -0
- data/vendor/node_modules/rollup/dist/typings/utils/first-sync.d.ts +1 -0
- data/vendor/node_modules/rollup/dist/typings/utils/first.d.ts +1 -0
- data/vendor/node_modules/rollup/dist/typings/utils/flushTime.d.ts +5 -0
- data/vendor/node_modules/rollup/dist/typings/utils/fs.d.ts +3 -0
- data/vendor/node_modules/rollup/dist/typings/utils/getCodeFrame.d.ts +1 -0
- data/vendor/node_modules/rollup/dist/typings/utils/getExportMode.d.ts +3 -0
- data/vendor/node_modules/rollup/dist/typings/utils/getIndentString.d.ts +4 -0
- data/vendor/node_modules/rollup/dist/typings/utils/identifierHelpers.d.ts +3 -0
- data/vendor/node_modules/rollup/dist/typings/utils/mergeOptions.d.ts +19 -0
- data/vendor/node_modules/rollup/dist/typings/utils/object.d.ts +7 -0
- data/vendor/node_modules/rollup/dist/typings/utils/path.d.ts +6 -0
- data/vendor/node_modules/rollup/dist/typings/utils/promise.d.ts +2 -0
- data/vendor/node_modules/rollup/dist/typings/utils/relativeId.d.ts +1 -0
- data/vendor/node_modules/rollup/dist/typings/utils/renderHelpers.d.ts +26 -0
- data/vendor/node_modules/rollup/dist/typings/utils/sourceMappingURL.d.ts +3 -0
- data/vendor/node_modules/rollup/dist/typings/utils/timers.d.ts +7 -0
- data/vendor/node_modules/rollup/dist/typings/utils/transform.d.ts +25 -0
- data/vendor/node_modules/rollup/dist/typings/utils/transformBundle.d.ts +3 -0
- data/vendor/node_modules/rollup/dist/typings/watch/chokidar.d.ts +3 -0
- data/vendor/node_modules/rollup/dist/typings/watch/fileWatchers.d.ts +14 -0
- data/vendor/node_modules/rollup/dist/typings/watch/index.d.ts +47 -0
- data/vendor/node_modules/rollup/package.json +122 -0
- data/vendor/node_modules/rollup/typings/package.json.d.ts +3 -0
- data/vendor/node_modules/signal-exit/index.js +157 -0
- data/vendor/node_modules/signal-exit/package.json +38 -0
- data/vendor/node_modules/signal-exit/signals.js +53 -0
- data/vendor/node_modules/source-map/dist/source-map.debug.js +3091 -0
- data/vendor/node_modules/source-map/dist/source-map.js +3090 -0
- data/vendor/node_modules/source-map/dist/source-map.min.js +2 -0
- data/vendor/node_modules/source-map/lib/array-set.js +121 -0
- data/vendor/node_modules/source-map/lib/base64-vlq.js +140 -0
- data/vendor/node_modules/source-map/lib/base64.js +67 -0
- data/vendor/node_modules/source-map/lib/binary-search.js +111 -0
- data/vendor/node_modules/source-map/lib/mapping-list.js +79 -0
- data/vendor/node_modules/source-map/lib/quick-sort.js +114 -0
- data/vendor/node_modules/source-map/lib/source-map-consumer.js +1082 -0
- data/vendor/node_modules/source-map/lib/source-map-generator.js +416 -0
- data/vendor/node_modules/source-map/lib/source-node.js +413 -0
- data/vendor/node_modules/source-map/lib/util.js +417 -0
- data/vendor/node_modules/source-map/package.json +72 -0
- data/vendor/node_modules/source-map/source-map.js +8 -0
- data/vendor/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js +129 -0
- data/vendor/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js +140 -0
- data/vendor/node_modules/sourcemap-codec/dist/types/sourcemap-codec.d.ts +5 -0
- data/vendor/node_modules/sourcemap-codec/package.json +52 -0
- data/vendor/node_modules/supports-color/browser.js +5 -0
- data/vendor/node_modules/supports-color/index.js +135 -0
- data/vendor/node_modules/supports-color/package.json +53 -0
- data/vendor/node_modules/time-zone/index.js +10 -0
- data/vendor/node_modules/time-zone/package.json +35 -0
- data/vendor/node_modules/vlq/dist/types/vlq.d.ts +2 -0
- data/vendor/node_modules/vlq/dist/vlq.es.js +64 -0
- data/vendor/node_modules/vlq/dist/vlq.js +75 -0
- data/vendor/node_modules/vlq/package.json +30 -0
- data/vendor/package.json +15 -0
- data/vendor/yarn.lock +453 -0
- metadata +641 -0
@@ -0,0 +1,417 @@
|
|
1
|
+
/* -*- Mode: js; js-indent-level: 2; -*- */
|
2
|
+
/*
|
3
|
+
* Copyright 2011 Mozilla Foundation and contributors
|
4
|
+
* Licensed under the New BSD license. See LICENSE or:
|
5
|
+
* http://opensource.org/licenses/BSD-3-Clause
|
6
|
+
*/
|
7
|
+
|
8
|
+
/**
|
9
|
+
* This is a helper function for getting values from parameter/options
|
10
|
+
* objects.
|
11
|
+
*
|
12
|
+
* @param args The object we are extracting values from
|
13
|
+
* @param name The name of the property we are getting.
|
14
|
+
* @param defaultValue An optional value to return if the property is missing
|
15
|
+
* from the object. If this is not specified and the property is missing, an
|
16
|
+
* error will be thrown.
|
17
|
+
*/
|
18
|
+
function getArg(aArgs, aName, aDefaultValue) {
|
19
|
+
if (aName in aArgs) {
|
20
|
+
return aArgs[aName];
|
21
|
+
} else if (arguments.length === 3) {
|
22
|
+
return aDefaultValue;
|
23
|
+
} else {
|
24
|
+
throw new Error('"' + aName + '" is a required argument.');
|
25
|
+
}
|
26
|
+
}
|
27
|
+
exports.getArg = getArg;
|
28
|
+
|
29
|
+
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
|
30
|
+
var dataUrlRegexp = /^data:.+\,.+$/;
|
31
|
+
|
32
|
+
function urlParse(aUrl) {
|
33
|
+
var match = aUrl.match(urlRegexp);
|
34
|
+
if (!match) {
|
35
|
+
return null;
|
36
|
+
}
|
37
|
+
return {
|
38
|
+
scheme: match[1],
|
39
|
+
auth: match[2],
|
40
|
+
host: match[3],
|
41
|
+
port: match[4],
|
42
|
+
path: match[5]
|
43
|
+
};
|
44
|
+
}
|
45
|
+
exports.urlParse = urlParse;
|
46
|
+
|
47
|
+
function urlGenerate(aParsedUrl) {
|
48
|
+
var url = '';
|
49
|
+
if (aParsedUrl.scheme) {
|
50
|
+
url += aParsedUrl.scheme + ':';
|
51
|
+
}
|
52
|
+
url += '//';
|
53
|
+
if (aParsedUrl.auth) {
|
54
|
+
url += aParsedUrl.auth + '@';
|
55
|
+
}
|
56
|
+
if (aParsedUrl.host) {
|
57
|
+
url += aParsedUrl.host;
|
58
|
+
}
|
59
|
+
if (aParsedUrl.port) {
|
60
|
+
url += ":" + aParsedUrl.port
|
61
|
+
}
|
62
|
+
if (aParsedUrl.path) {
|
63
|
+
url += aParsedUrl.path;
|
64
|
+
}
|
65
|
+
return url;
|
66
|
+
}
|
67
|
+
exports.urlGenerate = urlGenerate;
|
68
|
+
|
69
|
+
/**
|
70
|
+
* Normalizes a path, or the path portion of a URL:
|
71
|
+
*
|
72
|
+
* - Replaces consecutive slashes with one slash.
|
73
|
+
* - Removes unnecessary '.' parts.
|
74
|
+
* - Removes unnecessary '<dir>/..' parts.
|
75
|
+
*
|
76
|
+
* Based on code in the Node.js 'path' core module.
|
77
|
+
*
|
78
|
+
* @param aPath The path or url to normalize.
|
79
|
+
*/
|
80
|
+
function normalize(aPath) {
|
81
|
+
var path = aPath;
|
82
|
+
var url = urlParse(aPath);
|
83
|
+
if (url) {
|
84
|
+
if (!url.path) {
|
85
|
+
return aPath;
|
86
|
+
}
|
87
|
+
path = url.path;
|
88
|
+
}
|
89
|
+
var isAbsolute = exports.isAbsolute(path);
|
90
|
+
|
91
|
+
var parts = path.split(/\/+/);
|
92
|
+
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
|
93
|
+
part = parts[i];
|
94
|
+
if (part === '.') {
|
95
|
+
parts.splice(i, 1);
|
96
|
+
} else if (part === '..') {
|
97
|
+
up++;
|
98
|
+
} else if (up > 0) {
|
99
|
+
if (part === '') {
|
100
|
+
// The first part is blank if the path is absolute. Trying to go
|
101
|
+
// above the root is a no-op. Therefore we can remove all '..' parts
|
102
|
+
// directly after the root.
|
103
|
+
parts.splice(i + 1, up);
|
104
|
+
up = 0;
|
105
|
+
} else {
|
106
|
+
parts.splice(i, 2);
|
107
|
+
up--;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
path = parts.join('/');
|
112
|
+
|
113
|
+
if (path === '') {
|
114
|
+
path = isAbsolute ? '/' : '.';
|
115
|
+
}
|
116
|
+
|
117
|
+
if (url) {
|
118
|
+
url.path = path;
|
119
|
+
return urlGenerate(url);
|
120
|
+
}
|
121
|
+
return path;
|
122
|
+
}
|
123
|
+
exports.normalize = normalize;
|
124
|
+
|
125
|
+
/**
|
126
|
+
* Joins two paths/URLs.
|
127
|
+
*
|
128
|
+
* @param aRoot The root path or URL.
|
129
|
+
* @param aPath The path or URL to be joined with the root.
|
130
|
+
*
|
131
|
+
* - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
|
132
|
+
* scheme-relative URL: Then the scheme of aRoot, if any, is prepended
|
133
|
+
* first.
|
134
|
+
* - Otherwise aPath is a path. If aRoot is a URL, then its path portion
|
135
|
+
* is updated with the result and aRoot is returned. Otherwise the result
|
136
|
+
* is returned.
|
137
|
+
* - If aPath is absolute, the result is aPath.
|
138
|
+
* - Otherwise the two paths are joined with a slash.
|
139
|
+
* - Joining for example 'http://' and 'www.example.com' is also supported.
|
140
|
+
*/
|
141
|
+
function join(aRoot, aPath) {
|
142
|
+
if (aRoot === "") {
|
143
|
+
aRoot = ".";
|
144
|
+
}
|
145
|
+
if (aPath === "") {
|
146
|
+
aPath = ".";
|
147
|
+
}
|
148
|
+
var aPathUrl = urlParse(aPath);
|
149
|
+
var aRootUrl = urlParse(aRoot);
|
150
|
+
if (aRootUrl) {
|
151
|
+
aRoot = aRootUrl.path || '/';
|
152
|
+
}
|
153
|
+
|
154
|
+
// `join(foo, '//www.example.org')`
|
155
|
+
if (aPathUrl && !aPathUrl.scheme) {
|
156
|
+
if (aRootUrl) {
|
157
|
+
aPathUrl.scheme = aRootUrl.scheme;
|
158
|
+
}
|
159
|
+
return urlGenerate(aPathUrl);
|
160
|
+
}
|
161
|
+
|
162
|
+
if (aPathUrl || aPath.match(dataUrlRegexp)) {
|
163
|
+
return aPath;
|
164
|
+
}
|
165
|
+
|
166
|
+
// `join('http://', 'www.example.com')`
|
167
|
+
if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
|
168
|
+
aRootUrl.host = aPath;
|
169
|
+
return urlGenerate(aRootUrl);
|
170
|
+
}
|
171
|
+
|
172
|
+
var joined = aPath.charAt(0) === '/'
|
173
|
+
? aPath
|
174
|
+
: normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
|
175
|
+
|
176
|
+
if (aRootUrl) {
|
177
|
+
aRootUrl.path = joined;
|
178
|
+
return urlGenerate(aRootUrl);
|
179
|
+
}
|
180
|
+
return joined;
|
181
|
+
}
|
182
|
+
exports.join = join;
|
183
|
+
|
184
|
+
exports.isAbsolute = function (aPath) {
|
185
|
+
return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
|
186
|
+
};
|
187
|
+
|
188
|
+
/**
|
189
|
+
* Make a path relative to a URL or another path.
|
190
|
+
*
|
191
|
+
* @param aRoot The root path or URL.
|
192
|
+
* @param aPath The path or URL to be made relative to aRoot.
|
193
|
+
*/
|
194
|
+
function relative(aRoot, aPath) {
|
195
|
+
if (aRoot === "") {
|
196
|
+
aRoot = ".";
|
197
|
+
}
|
198
|
+
|
199
|
+
aRoot = aRoot.replace(/\/$/, '');
|
200
|
+
|
201
|
+
// It is possible for the path to be above the root. In this case, simply
|
202
|
+
// checking whether the root is a prefix of the path won't work. Instead, we
|
203
|
+
// need to remove components from the root one by one, until either we find
|
204
|
+
// a prefix that fits, or we run out of components to remove.
|
205
|
+
var level = 0;
|
206
|
+
while (aPath.indexOf(aRoot + '/') !== 0) {
|
207
|
+
var index = aRoot.lastIndexOf("/");
|
208
|
+
if (index < 0) {
|
209
|
+
return aPath;
|
210
|
+
}
|
211
|
+
|
212
|
+
// If the only part of the root that is left is the scheme (i.e. http://,
|
213
|
+
// file:///, etc.), one or more slashes (/), or simply nothing at all, we
|
214
|
+
// have exhausted all components, so the path is not relative to the root.
|
215
|
+
aRoot = aRoot.slice(0, index);
|
216
|
+
if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
|
217
|
+
return aPath;
|
218
|
+
}
|
219
|
+
|
220
|
+
++level;
|
221
|
+
}
|
222
|
+
|
223
|
+
// Make sure we add a "../" for each component we removed from the root.
|
224
|
+
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
225
|
+
}
|
226
|
+
exports.relative = relative;
|
227
|
+
|
228
|
+
var supportsNullProto = (function () {
|
229
|
+
var obj = Object.create(null);
|
230
|
+
return !('__proto__' in obj);
|
231
|
+
}());
|
232
|
+
|
233
|
+
function identity (s) {
|
234
|
+
return s;
|
235
|
+
}
|
236
|
+
|
237
|
+
/**
|
238
|
+
* Because behavior goes wacky when you set `__proto__` on objects, we
|
239
|
+
* have to prefix all the strings in our set with an arbitrary character.
|
240
|
+
*
|
241
|
+
* See https://github.com/mozilla/source-map/pull/31 and
|
242
|
+
* https://github.com/mozilla/source-map/issues/30
|
243
|
+
*
|
244
|
+
* @param String aStr
|
245
|
+
*/
|
246
|
+
function toSetString(aStr) {
|
247
|
+
if (isProtoString(aStr)) {
|
248
|
+
return '$' + aStr;
|
249
|
+
}
|
250
|
+
|
251
|
+
return aStr;
|
252
|
+
}
|
253
|
+
exports.toSetString = supportsNullProto ? identity : toSetString;
|
254
|
+
|
255
|
+
function fromSetString(aStr) {
|
256
|
+
if (isProtoString(aStr)) {
|
257
|
+
return aStr.slice(1);
|
258
|
+
}
|
259
|
+
|
260
|
+
return aStr;
|
261
|
+
}
|
262
|
+
exports.fromSetString = supportsNullProto ? identity : fromSetString;
|
263
|
+
|
264
|
+
function isProtoString(s) {
|
265
|
+
if (!s) {
|
266
|
+
return false;
|
267
|
+
}
|
268
|
+
|
269
|
+
var length = s.length;
|
270
|
+
|
271
|
+
if (length < 9 /* "__proto__".length */) {
|
272
|
+
return false;
|
273
|
+
}
|
274
|
+
|
275
|
+
if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
|
276
|
+
s.charCodeAt(length - 2) !== 95 /* '_' */ ||
|
277
|
+
s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
|
278
|
+
s.charCodeAt(length - 4) !== 116 /* 't' */ ||
|
279
|
+
s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
|
280
|
+
s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
|
281
|
+
s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
|
282
|
+
s.charCodeAt(length - 8) !== 95 /* '_' */ ||
|
283
|
+
s.charCodeAt(length - 9) !== 95 /* '_' */) {
|
284
|
+
return false;
|
285
|
+
}
|
286
|
+
|
287
|
+
for (var i = length - 10; i >= 0; i--) {
|
288
|
+
if (s.charCodeAt(i) !== 36 /* '$' */) {
|
289
|
+
return false;
|
290
|
+
}
|
291
|
+
}
|
292
|
+
|
293
|
+
return true;
|
294
|
+
}
|
295
|
+
|
296
|
+
/**
|
297
|
+
* Comparator between two mappings where the original positions are compared.
|
298
|
+
*
|
299
|
+
* Optionally pass in `true` as `onlyCompareGenerated` to consider two
|
300
|
+
* mappings with the same original source/line/column, but different generated
|
301
|
+
* line and column the same. Useful when searching for a mapping with a
|
302
|
+
* stubbed out mapping.
|
303
|
+
*/
|
304
|
+
function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
|
305
|
+
var cmp = mappingA.source - mappingB.source;
|
306
|
+
if (cmp !== 0) {
|
307
|
+
return cmp;
|
308
|
+
}
|
309
|
+
|
310
|
+
cmp = mappingA.originalLine - mappingB.originalLine;
|
311
|
+
if (cmp !== 0) {
|
312
|
+
return cmp;
|
313
|
+
}
|
314
|
+
|
315
|
+
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
316
|
+
if (cmp !== 0 || onlyCompareOriginal) {
|
317
|
+
return cmp;
|
318
|
+
}
|
319
|
+
|
320
|
+
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
321
|
+
if (cmp !== 0) {
|
322
|
+
return cmp;
|
323
|
+
}
|
324
|
+
|
325
|
+
cmp = mappingA.generatedLine - mappingB.generatedLine;
|
326
|
+
if (cmp !== 0) {
|
327
|
+
return cmp;
|
328
|
+
}
|
329
|
+
|
330
|
+
return mappingA.name - mappingB.name;
|
331
|
+
}
|
332
|
+
exports.compareByOriginalPositions = compareByOriginalPositions;
|
333
|
+
|
334
|
+
/**
|
335
|
+
* Comparator between two mappings with deflated source and name indices where
|
336
|
+
* the generated positions are compared.
|
337
|
+
*
|
338
|
+
* Optionally pass in `true` as `onlyCompareGenerated` to consider two
|
339
|
+
* mappings with the same generated line and column, but different
|
340
|
+
* source/name/original line and column the same. Useful when searching for a
|
341
|
+
* mapping with a stubbed out mapping.
|
342
|
+
*/
|
343
|
+
function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
|
344
|
+
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
345
|
+
if (cmp !== 0) {
|
346
|
+
return cmp;
|
347
|
+
}
|
348
|
+
|
349
|
+
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
350
|
+
if (cmp !== 0 || onlyCompareGenerated) {
|
351
|
+
return cmp;
|
352
|
+
}
|
353
|
+
|
354
|
+
cmp = mappingA.source - mappingB.source;
|
355
|
+
if (cmp !== 0) {
|
356
|
+
return cmp;
|
357
|
+
}
|
358
|
+
|
359
|
+
cmp = mappingA.originalLine - mappingB.originalLine;
|
360
|
+
if (cmp !== 0) {
|
361
|
+
return cmp;
|
362
|
+
}
|
363
|
+
|
364
|
+
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
365
|
+
if (cmp !== 0) {
|
366
|
+
return cmp;
|
367
|
+
}
|
368
|
+
|
369
|
+
return mappingA.name - mappingB.name;
|
370
|
+
}
|
371
|
+
exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
|
372
|
+
|
373
|
+
function strcmp(aStr1, aStr2) {
|
374
|
+
if (aStr1 === aStr2) {
|
375
|
+
return 0;
|
376
|
+
}
|
377
|
+
|
378
|
+
if (aStr1 > aStr2) {
|
379
|
+
return 1;
|
380
|
+
}
|
381
|
+
|
382
|
+
return -1;
|
383
|
+
}
|
384
|
+
|
385
|
+
/**
|
386
|
+
* Comparator between two mappings with inflated source and name strings where
|
387
|
+
* the generated positions are compared.
|
388
|
+
*/
|
389
|
+
function compareByGeneratedPositionsInflated(mappingA, mappingB) {
|
390
|
+
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
391
|
+
if (cmp !== 0) {
|
392
|
+
return cmp;
|
393
|
+
}
|
394
|
+
|
395
|
+
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
396
|
+
if (cmp !== 0) {
|
397
|
+
return cmp;
|
398
|
+
}
|
399
|
+
|
400
|
+
cmp = strcmp(mappingA.source, mappingB.source);
|
401
|
+
if (cmp !== 0) {
|
402
|
+
return cmp;
|
403
|
+
}
|
404
|
+
|
405
|
+
cmp = mappingA.originalLine - mappingB.originalLine;
|
406
|
+
if (cmp !== 0) {
|
407
|
+
return cmp;
|
408
|
+
}
|
409
|
+
|
410
|
+
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
411
|
+
if (cmp !== 0) {
|
412
|
+
return cmp;
|
413
|
+
}
|
414
|
+
|
415
|
+
return strcmp(mappingA.name, mappingB.name);
|
416
|
+
}
|
417
|
+
exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
|
@@ -0,0 +1,72 @@
|
|
1
|
+
{
|
2
|
+
"name": "source-map",
|
3
|
+
"description": "Generates and consumes source maps",
|
4
|
+
"version": "0.5.7",
|
5
|
+
"homepage": "https://github.com/mozilla/source-map",
|
6
|
+
"author": "Nick Fitzgerald <nfitzgerald@mozilla.com>",
|
7
|
+
"contributors": [
|
8
|
+
"Tobias Koppers <tobias.koppers@googlemail.com>",
|
9
|
+
"Duncan Beevers <duncan@dweebd.com>",
|
10
|
+
"Stephen Crane <scrane@mozilla.com>",
|
11
|
+
"Ryan Seddon <seddon.ryan@gmail.com>",
|
12
|
+
"Miles Elam <miles.elam@deem.com>",
|
13
|
+
"Mihai Bazon <mihai.bazon@gmail.com>",
|
14
|
+
"Michael Ficarra <github.public.email@michael.ficarra.me>",
|
15
|
+
"Todd Wolfson <todd@twolfson.com>",
|
16
|
+
"Alexander Solovyov <alexander@solovyov.net>",
|
17
|
+
"Felix Gnass <fgnass@gmail.com>",
|
18
|
+
"Conrad Irwin <conrad.irwin@gmail.com>",
|
19
|
+
"usrbincc <usrbincc@yahoo.com>",
|
20
|
+
"David Glasser <glasser@davidglasser.net>",
|
21
|
+
"Chase Douglas <chase@newrelic.com>",
|
22
|
+
"Evan Wallace <evan.exe@gmail.com>",
|
23
|
+
"Heather Arthur <fayearthur@gmail.com>",
|
24
|
+
"Hugh Kennedy <hughskennedy@gmail.com>",
|
25
|
+
"David Glasser <glasser@davidglasser.net>",
|
26
|
+
"Simon Lydell <simon.lydell@gmail.com>",
|
27
|
+
"Jmeas Smith <jellyes2@gmail.com>",
|
28
|
+
"Michael Z Goddard <mzgoddard@gmail.com>",
|
29
|
+
"azu <azu@users.noreply.github.com>",
|
30
|
+
"John Gozde <john@gozde.ca>",
|
31
|
+
"Adam Kirkton <akirkton@truefitinnovation.com>",
|
32
|
+
"Chris Montgomery <christopher.montgomery@dowjones.com>",
|
33
|
+
"J. Ryan Stinnett <jryans@gmail.com>",
|
34
|
+
"Jack Herrington <jherrington@walmartlabs.com>",
|
35
|
+
"Chris Truter <jeffpalentine@gmail.com>",
|
36
|
+
"Daniel Espeset <daniel@danielespeset.com>",
|
37
|
+
"Jamie Wong <jamie.lf.wong@gmail.com>",
|
38
|
+
"Eddy Bruël <ejpbruel@mozilla.com>",
|
39
|
+
"Hawken Rives <hawkrives@gmail.com>",
|
40
|
+
"Gilad Peleg <giladp007@gmail.com>",
|
41
|
+
"djchie <djchie.dev@gmail.com>",
|
42
|
+
"Gary Ye <garysye@gmail.com>",
|
43
|
+
"Nicolas Lalevée <nicolas.lalevee@hibnet.org>"
|
44
|
+
],
|
45
|
+
"repository": {
|
46
|
+
"type": "git",
|
47
|
+
"url": "http://github.com/mozilla/source-map.git"
|
48
|
+
},
|
49
|
+
"main": "./source-map.js",
|
50
|
+
"files": [
|
51
|
+
"source-map.js",
|
52
|
+
"lib/",
|
53
|
+
"dist/source-map.debug.js",
|
54
|
+
"dist/source-map.js",
|
55
|
+
"dist/source-map.min.js",
|
56
|
+
"dist/source-map.min.js.map"
|
57
|
+
],
|
58
|
+
"engines": {
|
59
|
+
"node": ">=0.10.0"
|
60
|
+
},
|
61
|
+
"license": "BSD-3-Clause",
|
62
|
+
"scripts": {
|
63
|
+
"test": "npm run build && node test/run-tests.js",
|
64
|
+
"build": "webpack --color",
|
65
|
+
"toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md"
|
66
|
+
},
|
67
|
+
"devDependencies": {
|
68
|
+
"doctoc": "^0.15.0",
|
69
|
+
"webpack": "^1.12.0"
|
70
|
+
},
|
71
|
+
"typings": "source-map"
|
72
|
+
}
|