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,85 @@
|
|
1
|
+
import { SourceMap } from 'magic-string';
|
2
|
+
import Module, { ModuleJSON } from './Module';
|
3
|
+
import { OutputOptions } from './rollup/index';
|
4
|
+
import Graph from './Graph';
|
5
|
+
import ExternalModule from './ExternalModule';
|
6
|
+
import Variable from './ast/variables/Variable';
|
7
|
+
export interface ModuleDeclarations {
|
8
|
+
exports: ChunkExports;
|
9
|
+
dependencies: ModuleDeclarationDependency[];
|
10
|
+
}
|
11
|
+
export interface ModuleDeclarationDependency {
|
12
|
+
id: string;
|
13
|
+
name: string;
|
14
|
+
isChunk: boolean;
|
15
|
+
exportsDefault: boolean;
|
16
|
+
exportsNames: boolean;
|
17
|
+
exportsNamespace: boolean;
|
18
|
+
reexports?: ReexportSpecifier[];
|
19
|
+
imports?: ImportSpecifier[];
|
20
|
+
}
|
21
|
+
export declare type ChunkDependencies = ModuleDeclarationDependency[];
|
22
|
+
export declare type ChunkExports = {
|
23
|
+
local: string;
|
24
|
+
exported: string;
|
25
|
+
hoisted: boolean;
|
26
|
+
}[];
|
27
|
+
export interface ReexportSpecifier {
|
28
|
+
reexported: string;
|
29
|
+
imported: string;
|
30
|
+
}
|
31
|
+
export interface ImportSpecifier {
|
32
|
+
local: string;
|
33
|
+
imported: string;
|
34
|
+
}
|
35
|
+
export interface DynamicImportMechanism {
|
36
|
+
left: string;
|
37
|
+
right: string;
|
38
|
+
interopLeft?: string;
|
39
|
+
interopRight?: string;
|
40
|
+
}
|
41
|
+
export default class Chunk {
|
42
|
+
id: string;
|
43
|
+
name: string;
|
44
|
+
graph: Graph;
|
45
|
+
private orderedModules;
|
46
|
+
private exportedVariableNames;
|
47
|
+
private imports;
|
48
|
+
private exports;
|
49
|
+
private dependencies;
|
50
|
+
entryModule: Module;
|
51
|
+
isEntryModuleFacade: boolean;
|
52
|
+
constructor(graph: Graph, orderedModules: Module[]);
|
53
|
+
setId(id: string): void;
|
54
|
+
ensureExport(module: Module | ExternalModule, variable: Variable, exportName: string): string;
|
55
|
+
generateEntryExports(entryModule: Module, onlyIncluded?: boolean): void;
|
56
|
+
collectDependencies(entryFacade?: Module): void;
|
57
|
+
generateImports(): void;
|
58
|
+
populateImport(variable: Variable, tracedExport: {
|
59
|
+
name: string;
|
60
|
+
module: Module | ExternalModule;
|
61
|
+
}): void;
|
62
|
+
getImportIds(): string[];
|
63
|
+
getExportNames(): string[];
|
64
|
+
getJsonModules(): ModuleJSON[];
|
65
|
+
traceImport(module: Module | ExternalModule, exportName: string): {
|
66
|
+
name: string;
|
67
|
+
module: ExternalModule | Module;
|
68
|
+
};
|
69
|
+
traceExport(module: Module | ExternalModule, name: string): {
|
70
|
+
name: string;
|
71
|
+
module: Module | ExternalModule;
|
72
|
+
};
|
73
|
+
collectAddon(initialAddon: string, addonName: 'banner' | 'footer' | 'intro' | 'outro', sep?: string): Promise<string>;
|
74
|
+
private setDynamicImportResolutions({format});
|
75
|
+
private setIdentifierRenderResolutions(options);
|
76
|
+
private getCheckReexportDeclarations();
|
77
|
+
private getChunkDependencyDeclarations();
|
78
|
+
private getChunkExportDeclarations();
|
79
|
+
getModuleDeclarations(): ModuleDeclarations;
|
80
|
+
render(options: OutputOptions): Promise<{
|
81
|
+
code: string;
|
82
|
+
map: SourceMap;
|
83
|
+
}>;
|
84
|
+
private createGetPath(options);
|
85
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import ExternalVariable from './ast/variables/ExternalVariable';
|
2
|
+
import Graph from './Graph';
|
3
|
+
import Variable from './ast/variables/Variable';
|
4
|
+
export default class ExternalModule {
|
5
|
+
private graph;
|
6
|
+
chunk: void;
|
7
|
+
declarations: {
|
8
|
+
[name: string]: ExternalVariable;
|
9
|
+
};
|
10
|
+
exportsNames: boolean;
|
11
|
+
exportsNamespace: boolean;
|
12
|
+
id: string;
|
13
|
+
isExternal: true;
|
14
|
+
isEntryPoint: false;
|
15
|
+
name: string;
|
16
|
+
mostCommonSuggestion: number;
|
17
|
+
nameSuggestions: {
|
18
|
+
[name: string]: number;
|
19
|
+
};
|
20
|
+
reexported: boolean;
|
21
|
+
used: boolean;
|
22
|
+
execIndex: number;
|
23
|
+
constructor({graph, id}: {
|
24
|
+
graph: Graph;
|
25
|
+
id: string;
|
26
|
+
});
|
27
|
+
suggestName(name: string): void;
|
28
|
+
warnUnusedImports(): void;
|
29
|
+
traceExport(name: string): Variable;
|
30
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/// <reference types="acorn" />
|
2
|
+
import * as acorn from 'acorn';
|
3
|
+
import Module, { ModuleJSON } from './Module';
|
4
|
+
import ExternalModule from './ExternalModule';
|
5
|
+
import { InputOptions, IsExternalHook, Plugin, RollupWarning, SourceDescription, TreeshakingOptions, WarningHandler } from './rollup/index';
|
6
|
+
import { Node } from './ast/nodes/shared/Node';
|
7
|
+
import Chunk from './Chunk';
|
8
|
+
import GlobalScope from './ast/scopes/GlobalScope';
|
9
|
+
export declare type ResolveDynamicImportHandler = (specifier: string | Node, parentId: string) => Promise<string | void>;
|
10
|
+
export default class Graph {
|
11
|
+
acornOptions: acorn.Options;
|
12
|
+
acornParse: acorn.IParse;
|
13
|
+
cachedModules: Map<string, ModuleJSON>;
|
14
|
+
context: string;
|
15
|
+
dynamicImport: boolean;
|
16
|
+
externalModules: ExternalModule[];
|
17
|
+
getModuleContext: (id: string) => string;
|
18
|
+
hasLoaders: boolean;
|
19
|
+
isExternal: IsExternalHook;
|
20
|
+
isPureExternalModule: (id: string) => boolean;
|
21
|
+
load: (id: string) => Promise<SourceDescription | string | void>;
|
22
|
+
handleMissingExport: (exportName: string, importingModule: Module, importedModule: string, importerStart?: number) => void;
|
23
|
+
moduleById: Map<string, Module | ExternalModule>;
|
24
|
+
modules: Module[];
|
25
|
+
onwarn: WarningHandler;
|
26
|
+
plugins: Plugin[];
|
27
|
+
resolveDynamicImport: ResolveDynamicImportHandler;
|
28
|
+
resolveId: (id: string, parent: string) => Promise<string | boolean | void>;
|
29
|
+
scope: GlobalScope;
|
30
|
+
treeshakingOptions: TreeshakingOptions;
|
31
|
+
varOrConst: 'var' | 'const';
|
32
|
+
treeshake: boolean;
|
33
|
+
constructor(options: InputOptions);
|
34
|
+
getPathRelativeToBaseDirname(resolvedId: string, parentId: string): string;
|
35
|
+
private loadModule(entryName);
|
36
|
+
private link();
|
37
|
+
includeMarked(modules: Module[]): void;
|
38
|
+
buildSingle(entryModuleId: string): Promise<Chunk>;
|
39
|
+
buildChunks(entryModuleIds: string[], preserveModules: boolean): Promise<{
|
40
|
+
[name: string]: Chunk;
|
41
|
+
}>;
|
42
|
+
private analyseExecution(entryModules, graphColouring);
|
43
|
+
private warnCycle(id, parentId, parents);
|
44
|
+
private fetchModule(id, importer);
|
45
|
+
private fetchAllDependencies(module);
|
46
|
+
warn(warning: RollupWarning): void;
|
47
|
+
}
|
@@ -0,0 +1,130 @@
|
|
1
|
+
/// <reference types="acorn" />
|
2
|
+
import { Options as AcornOptions } from 'acorn';
|
3
|
+
import MagicString from 'magic-string';
|
4
|
+
import { RollupError } from './utils/error';
|
5
|
+
import NamespaceVariable from './ast/variables/NamespaceVariable';
|
6
|
+
import ModuleScope from './ast/scopes/ModuleScope';
|
7
|
+
import { RawSourceMap } from 'source-map';
|
8
|
+
import ImportSpecifier from './ast/nodes/ImportSpecifier';
|
9
|
+
import Graph from './Graph';
|
10
|
+
import Variable from './ast/variables/Variable';
|
11
|
+
import Program from './ast/nodes/Program';
|
12
|
+
import { Node } from './ast/nodes/shared/Node';
|
13
|
+
import ImportDefaultSpecifier from './ast/nodes/ImportDefaultSpecifier';
|
14
|
+
import ImportNamespaceSpecifier from './ast/nodes/ImportNamespaceSpecifier';
|
15
|
+
import { RollupWarning } from './rollup/index';
|
16
|
+
import ExternalModule from './ExternalModule';
|
17
|
+
import Import from './ast/nodes/Import';
|
18
|
+
import Chunk from './Chunk';
|
19
|
+
import { RenderOptions } from './utils/renderHelpers';
|
20
|
+
export interface IdMap {
|
21
|
+
[key: string]: string;
|
22
|
+
}
|
23
|
+
export interface CommentDescription {
|
24
|
+
block: boolean;
|
25
|
+
text: string;
|
26
|
+
start: number;
|
27
|
+
end: number;
|
28
|
+
}
|
29
|
+
export interface ImportDescription {
|
30
|
+
source: string;
|
31
|
+
specifier: ImportSpecifier | ImportNamespaceSpecifier | ImportDefaultSpecifier;
|
32
|
+
name: string;
|
33
|
+
module: Module | ExternalModule | null;
|
34
|
+
}
|
35
|
+
export interface ExportDescription {
|
36
|
+
localName: string;
|
37
|
+
identifier?: string;
|
38
|
+
}
|
39
|
+
export interface ReexportDescription {
|
40
|
+
localName: string;
|
41
|
+
start: number;
|
42
|
+
source: string;
|
43
|
+
module: Module;
|
44
|
+
}
|
45
|
+
export declare const defaultAcornOptions: AcornOptions;
|
46
|
+
export interface ModuleJSON {
|
47
|
+
id: string;
|
48
|
+
dependencies: string[];
|
49
|
+
code: string;
|
50
|
+
originalCode: string;
|
51
|
+
originalSourcemap: RawSourceMap | void;
|
52
|
+
ast: Program;
|
53
|
+
sourcemapChain: RawSourceMap[];
|
54
|
+
resolvedIds: IdMap;
|
55
|
+
}
|
56
|
+
export default class Module {
|
57
|
+
type: 'Module';
|
58
|
+
graph: Graph;
|
59
|
+
code: string;
|
60
|
+
comments: CommentDescription[];
|
61
|
+
context: string;
|
62
|
+
dependencies: (Module | ExternalModule)[];
|
63
|
+
excludeFromSourcemap: boolean;
|
64
|
+
exports: {
|
65
|
+
[name: string]: ExportDescription;
|
66
|
+
};
|
67
|
+
exportsAll: {
|
68
|
+
[name: string]: string;
|
69
|
+
};
|
70
|
+
exportAllSources: string[];
|
71
|
+
id: string;
|
72
|
+
imports: {
|
73
|
+
[name: string]: ImportDescription;
|
74
|
+
};
|
75
|
+
isExternal: false;
|
76
|
+
magicString: MagicString;
|
77
|
+
originalCode: string;
|
78
|
+
originalSourcemap: RawSourceMap | void;
|
79
|
+
reexports: {
|
80
|
+
[name: string]: ReexportDescription;
|
81
|
+
};
|
82
|
+
resolvedIds: IdMap;
|
83
|
+
scope: ModuleScope;
|
84
|
+
sourcemapChain: RawSourceMap[];
|
85
|
+
sources: string[];
|
86
|
+
dynamicImports: Import[];
|
87
|
+
dynamicImportResolutions: (Module | ExternalModule | string | void)[];
|
88
|
+
execIndex: number;
|
89
|
+
isEntryPoint: boolean;
|
90
|
+
entryPointsHash: Uint8Array;
|
91
|
+
chunk: Chunk;
|
92
|
+
ast: Program;
|
93
|
+
private astClone;
|
94
|
+
declarations: {
|
95
|
+
'*'?: NamespaceVariable;
|
96
|
+
[name: string]: Variable | undefined;
|
97
|
+
};
|
98
|
+
exportAllModules: (Module | ExternalModule)[];
|
99
|
+
constructor(graph: Graph, id: string);
|
100
|
+
setSource({code, originalCode, originalSourcemap, ast, sourcemapChain, resolvedIds}: {
|
101
|
+
code: string;
|
102
|
+
originalCode: string;
|
103
|
+
originalSourcemap: RawSourceMap;
|
104
|
+
ast: Program;
|
105
|
+
sourcemapChain: RawSourceMap[];
|
106
|
+
resolvedIds?: IdMap;
|
107
|
+
}): void;
|
108
|
+
private removeExistingSourceMap();
|
109
|
+
private addExport(node);
|
110
|
+
private addImport(node);
|
111
|
+
private analyse();
|
112
|
+
basename(): string;
|
113
|
+
markExports(): void;
|
114
|
+
linkDependencies(): void;
|
115
|
+
bindReferences(): void;
|
116
|
+
getDynamicImportExpressions(): (string | Node)[];
|
117
|
+
private getOriginalLocation(sourcemapChain, location);
|
118
|
+
error(props: RollupError, pos: number): void;
|
119
|
+
getAllExports(): string[];
|
120
|
+
getExports(): string[];
|
121
|
+
getReexports(): string[];
|
122
|
+
includeAllInBundle(): void;
|
123
|
+
includeInBundle(): boolean;
|
124
|
+
namespace(): NamespaceVariable;
|
125
|
+
render(options: RenderOptions): MagicString;
|
126
|
+
toJSON(): ModuleJSON;
|
127
|
+
trace(name: string): Variable;
|
128
|
+
traceExport(name: string): Variable;
|
129
|
+
warn(warning: RollupWarning, pos: number): void;
|
130
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { ExpressionEntity } from './nodes/shared/Expression';
|
2
|
+
import SpreadElement from './nodes/SpreadElement';
|
3
|
+
import TaggedTemplateExpression from './nodes/TaggedTemplateExpression';
|
4
|
+
import NewExpression from './nodes/NewExpression';
|
5
|
+
import Property from './nodes/Property';
|
6
|
+
import CallExpression from './nodes/CallExpression';
|
7
|
+
export declare type CallExpressionType = TaggedTemplateExpression | CallExpression | NewExpression | Property;
|
8
|
+
export interface CallCreateOptions {
|
9
|
+
withNew: boolean;
|
10
|
+
args?: (ExpressionEntity | SpreadElement)[];
|
11
|
+
callIdentifier: Object;
|
12
|
+
}
|
13
|
+
export default class CallOptions implements CallCreateOptions {
|
14
|
+
withNew: boolean;
|
15
|
+
args: (ExpressionEntity | SpreadElement)[];
|
16
|
+
callIdentifier: Object;
|
17
|
+
static create(callOptions: CallCreateOptions): CallOptions;
|
18
|
+
constructor({withNew, args, callIdentifier}?: CallCreateOptions);
|
19
|
+
equals(callOptions: CallOptions): boolean;
|
20
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import ExecutionPathOptions from './ExecutionPathOptions';
|
2
|
+
import { ObjectPath } from './values';
|
3
|
+
export interface Entity {
|
4
|
+
toString: () => string;
|
5
|
+
}
|
6
|
+
export interface WritableEntity extends Entity {
|
7
|
+
hasEffectsWhenAssignedAtPath(path: ObjectPath, options: ExecutionPathOptions): boolean;
|
8
|
+
/**
|
9
|
+
* Reassign a given path of an object.
|
10
|
+
* E.g., node.reassignPath(['x', 'y']) is called when something
|
11
|
+
* is assigned to node.x.y.
|
12
|
+
* The default noop implementation is ok as long as hasEffectsWhenAssignedAtPath
|
13
|
+
* always returns true for this node. Otherwise it should be overridden.
|
14
|
+
*/
|
15
|
+
reassignPath(path: ObjectPath, options: ExecutionPathOptions): void;
|
16
|
+
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import CallExpression from './nodes/CallExpression';
|
2
|
+
import CallOptions from './CallOptions';
|
3
|
+
import ThisVariable from './variables/ThisVariable';
|
4
|
+
import ParameterVariable from './variables/ParameterVariable';
|
5
|
+
import { Entity, WritableEntity } from './Entity';
|
6
|
+
import Property from './nodes/Property';
|
7
|
+
import { ExpressionEntity } from './nodes/shared/Expression';
|
8
|
+
import { ObjectPath } from './values';
|
9
|
+
export declare enum OptionTypes {
|
10
|
+
IGNORED_LABELS = 0,
|
11
|
+
ACCESSED_NODES = 1,
|
12
|
+
ARGUMENTS_VARIABLES = 2,
|
13
|
+
ASSIGNED_NODES = 3,
|
14
|
+
IGNORE_BREAK_STATEMENTS = 4,
|
15
|
+
IGNORE_RETURN_AWAIT_YIELD = 5,
|
16
|
+
NODES_CALLED_AT_PATH_WITH_OPTIONS = 6,
|
17
|
+
REPLACED_VARIABLE_INITS = 7,
|
18
|
+
RETURN_EXPRESSIONS_ACCESSED_AT_PATH = 8,
|
19
|
+
RETURN_EXPRESSIONS_ASSIGNED_AT_PATH = 9,
|
20
|
+
RETURN_EXPRESSIONS_CALLED_AT_PATH = 10,
|
21
|
+
}
|
22
|
+
export declare type RESULT_KEY = {};
|
23
|
+
export declare const RESULT_KEY: RESULT_KEY;
|
24
|
+
export declare type KeyTypes = OptionTypes | Entity | RESULT_KEY;
|
25
|
+
export default class ExecutionPathOptions {
|
26
|
+
private optionValues;
|
27
|
+
static create(): ExecutionPathOptions;
|
28
|
+
private constructor();
|
29
|
+
private get(option);
|
30
|
+
private remove(option);
|
31
|
+
private set(option, value);
|
32
|
+
private setIn(optionPath, value);
|
33
|
+
addAccessedNodeAtPath(path: ObjectPath, node: ExpressionEntity): ExecutionPathOptions;
|
34
|
+
addAccessedReturnExpressionAtPath(path: ObjectPath, callExpression: CallExpression | Property): ExecutionPathOptions;
|
35
|
+
addAssignedNodeAtPath(path: ObjectPath, node: WritableEntity): ExecutionPathOptions;
|
36
|
+
addAssignedReturnExpressionAtPath(path: ObjectPath, callExpression: CallExpression | Property): ExecutionPathOptions;
|
37
|
+
addCalledNodeAtPathWithOptions(path: ObjectPath, node: ExpressionEntity, callOptions: CallOptions): ExecutionPathOptions;
|
38
|
+
addCalledReturnExpressionAtPath(path: ObjectPath, callExpression: CallExpression | Property): ExecutionPathOptions;
|
39
|
+
getArgumentsVariables(): ExpressionEntity[];
|
40
|
+
getHasEffectsWhenCalledOptions(): ExecutionPathOptions;
|
41
|
+
getReplacedVariableInit(variable: ThisVariable | ParameterVariable): ExpressionEntity;
|
42
|
+
hasNodeBeenAccessedAtPath(path: ObjectPath, node: ExpressionEntity): boolean;
|
43
|
+
hasNodeBeenAssignedAtPath(path: ObjectPath, node: WritableEntity): boolean;
|
44
|
+
hasNodeBeenCalledAtPathWithOptions(path: ObjectPath, node: ExpressionEntity, callOptions: CallOptions): boolean;
|
45
|
+
hasReturnExpressionBeenAccessedAtPath(path: ObjectPath, callExpression: CallExpression | Property): boolean;
|
46
|
+
hasReturnExpressionBeenAssignedAtPath(path: ObjectPath, callExpression: CallExpression | Property): boolean;
|
47
|
+
hasReturnExpressionBeenCalledAtPath(path: ObjectPath, callExpression: CallExpression | Property): boolean;
|
48
|
+
ignoreBreakStatements(): boolean | Entity | ExpressionEntity[];
|
49
|
+
ignoreLabel(labelName: string): any;
|
50
|
+
ignoreReturnAwaitYield(): boolean | Entity | ExpressionEntity[];
|
51
|
+
replaceVariableInit(variable: ThisVariable | ParameterVariable, init: ExpressionEntity): ExecutionPathOptions;
|
52
|
+
setArgumentsVariables(variables: ExpressionEntity[]): ExecutionPathOptions;
|
53
|
+
setIgnoreBreakStatements(value?: boolean): ExecutionPathOptions;
|
54
|
+
setIgnoreLabel(labelName: string): ExecutionPathOptions;
|
55
|
+
setIgnoreNoLabels(): ExecutionPathOptions;
|
56
|
+
setIgnoreReturnAwaitYield(value?: boolean): ExecutionPathOptions;
|
57
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function clone<T>(node: T): T;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import SpreadElement from './SpreadElement';
|
2
|
+
import { SomeReturnExpressionCallback } from './shared/Expression';
|
3
|
+
import { ExpressionNode, NodeBase } from './shared/Node';
|
4
|
+
import { NodeType } from './NodeType';
|
5
|
+
import CallOptions from '../CallOptions';
|
6
|
+
import ExecutionPathOptions from '../ExecutionPathOptions';
|
7
|
+
import { ObjectPath } from '../values';
|
8
|
+
export default class ArrayExpression extends NodeBase {
|
9
|
+
type: NodeType.ArrayExpression;
|
10
|
+
elements: (ExpressionNode | SpreadElement | null)[];
|
11
|
+
hasEffectsWhenAccessedAtPath(path: ObjectPath): boolean;
|
12
|
+
hasEffectsWhenCalledAtPath(path: ObjectPath, callOptions: CallOptions, options: ExecutionPathOptions): boolean;
|
13
|
+
someReturnExpressionWhenCalledAtPath(path: ObjectPath, callOptions: CallOptions, predicateFunction: SomeReturnExpressionCallback, options: ExecutionPathOptions): boolean;
|
14
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { ObjectPath } from '../values';
|
2
|
+
import Scope from '../scopes/Scope';
|
3
|
+
import ExecutionPathOptions from '../ExecutionPathOptions';
|
4
|
+
import { PatternNode } from './shared/Pattern';
|
5
|
+
import { ExpressionEntity } from './shared/Expression';
|
6
|
+
import { NodeBase } from './shared/Node';
|
7
|
+
import { NodeType } from './NodeType';
|
8
|
+
export default class ArrayPattern extends NodeBase implements PatternNode {
|
9
|
+
type: NodeType.ArrayPattern;
|
10
|
+
elements: (PatternNode | null)[];
|
11
|
+
reassignPath(path: ObjectPath, options: ExecutionPathOptions): void;
|
12
|
+
hasEffectsWhenAssignedAtPath(path: ObjectPath, options: ExecutionPathOptions): boolean;
|
13
|
+
initialiseAndDeclare(parentScope: Scope, kind: string, _init: ExpressionEntity | null): void;
|
14
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import Scope from '../scopes/Scope';
|
2
|
+
import ReturnValueScope from '../scopes/ReturnValueScope';
|
3
|
+
import BlockStatement from './BlockStatement';
|
4
|
+
import CallOptions from '../CallOptions';
|
5
|
+
import ExecutionPathOptions from '../ExecutionPathOptions';
|
6
|
+
import { ForEachReturnExpressionCallback, SomeReturnExpressionCallback } from './shared/Expression';
|
7
|
+
import { PatternNode } from './shared/Pattern';
|
8
|
+
import { NodeType } from './NodeType';
|
9
|
+
import { ExpressionNode, NodeBase } from './shared/Node';
|
10
|
+
import { ObjectPath } from '../values';
|
11
|
+
export default class ArrowFunctionExpression extends NodeBase {
|
12
|
+
type: NodeType.ArrowFunctionExpression;
|
13
|
+
body: BlockStatement | ExpressionNode;
|
14
|
+
params: PatternNode[];
|
15
|
+
scope: ReturnValueScope;
|
16
|
+
bindNode(): void;
|
17
|
+
forEachReturnExpressionWhenCalledAtPath(path: ObjectPath, callOptions: CallOptions, callback: ForEachReturnExpressionCallback, options: ExecutionPathOptions): void;
|
18
|
+
hasEffects(_options: ExecutionPathOptions): boolean;
|
19
|
+
hasEffectsWhenAccessedAtPath(path: ObjectPath, _options: ExecutionPathOptions): boolean;
|
20
|
+
hasEffectsWhenAssignedAtPath(path: ObjectPath, _options: ExecutionPathOptions): boolean;
|
21
|
+
hasEffectsWhenCalledAtPath(path: ObjectPath, _callOptions: CallOptions, options: ExecutionPathOptions): boolean;
|
22
|
+
initialiseChildren(): void;
|
23
|
+
initialiseScope(parentScope: Scope): void;
|
24
|
+
someReturnExpressionWhenCalledAtPath(path: ObjectPath, callOptions: CallOptions, predicateFunction: SomeReturnExpressionCallback, options: ExecutionPathOptions): boolean;
|
25
|
+
}
|