traceur-rb 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +2 -2
- data/lib/js/compile.js +7 -15
- data/lib/traceur.rb +2 -1
- data/lib/traceur/compilation_error.rb +27 -0
- data/lib/traceur/compiler.rb +4 -1
- data/lib/traceur/configuration.rb +1 -1
- data/lib/traceur/node/runner.rb +1 -1
- data/lib/traceur/version.rb +1 -1
- data/spec/examples/syntax_error.js +3 -0
- data/spec/integration/examples_spec.rb +6 -0
- data/vendor/node_modules/traceur/LICENSE +202 -0
- data/vendor/node_modules/traceur/README.md +5 -5
- data/vendor/node_modules/traceur/bin/traceur-runtime.js +1392 -623
- data/vendor/node_modules/traceur/bin/traceur.js +24749 -17990
- data/vendor/node_modules/traceur/node_modules/.bin/semver +2 -2
- data/vendor/node_modules/traceur/node_modules/commander/History.md +222 -0
- data/vendor/node_modules/traceur/node_modules/commander/Readme.md +127 -35
- data/vendor/node_modules/traceur/node_modules/commander/index.js +261 -93
- data/vendor/node_modules/traceur/node_modules/commander/package.json +41 -9
- data/vendor/node_modules/traceur/node_modules/glob/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/README.md +357 -0
- data/vendor/node_modules/traceur/node_modules/glob/common.js +177 -0
- data/vendor/node_modules/traceur/node_modules/glob/glob.js +649 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/.eslintrc +17 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/README.md +37 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/inflight.js +44 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +36 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +34 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js +51 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +33 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/package.json +61 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/test.js +97 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/LICENSE +16 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/README.md +42 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/inherits.js +1 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/package.json +33 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/test.js +25 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/.npmignore +1 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/.travis.yml +4 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/LICENSE +23 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/README.md +216 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/benchmark.js +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/browser.js +1181 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/minimatch.js +845 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +2 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml +3 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +121 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
- data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/collections → glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.travis.yml +0 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +80 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +38 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +73 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +56 -0
- data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/url2 → glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/.travis.yml +1 -1
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +83 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +75 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js +32 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt +1075 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt +182 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js +9 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js +10 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh +24 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js +16 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js +10 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js +13 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js +7 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js +50 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/package.json +60 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/basic.js +399 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/brace-expand.js +45 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/defaults.js +274 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/LICENSE +27 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/README.md +51 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +34 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/once.js +21 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/package.json +42 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/test/once.js +23 -0
- data/vendor/node_modules/traceur/node_modules/glob/package.json +72 -0
- data/vendor/node_modules/traceur/node_modules/glob/sync.js +409 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/.release.json +17 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/CHANGELOG.md +165 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/LICENSE +19 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/README.md +364 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/dist/rsvp.js +1671 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/dist/rsvp.min.js +9 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp.js +66 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp.umd.js +50 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/-internal.js +265 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/all-settled.js +71 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/all.js +15 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/asap.js +109 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/config.js +28 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/defer.js +45 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/enumerator.js +125 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/events.js +201 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/filter.js +120 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/hash-settled.js +124 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/hash.js +94 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/instrument.js +41 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/map.js +99 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/node.js +281 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise-hash.js +51 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise.js +496 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/all.js +52 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/race.js +105 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/reject.js +47 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/resolve.js +49 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/race.js +15 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/reject.js +16 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/resolve.js +17 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/rethrow.js +46 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/utils.js +39 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/package.json +100 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/README.md +9 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/bower.json +22 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/composer.json +18 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/package.json +52 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.amd.js +1607 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.js +1566 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.min.js +26 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/vertx.js +1 -0
- data/vendor/node_modules/traceur/node_modules/semver/bin/semver +2 -2
- data/vendor/node_modules/traceur/node_modules/semver/package.json +4 -3
- data/vendor/node_modules/traceur/node_modules/semver/semver.browser.js +7 -0
- data/vendor/node_modules/traceur/node_modules/semver/semver.browser.js.gz +0 -0
- data/vendor/node_modules/traceur/node_modules/semver/semver.js +7 -0
- data/vendor/node_modules/traceur/node_modules/semver/semver.min.js +1 -1
- data/vendor/node_modules/traceur/node_modules/semver/semver.min.js.gz +0 -0
- data/vendor/node_modules/traceur/node_modules/semver/test/index.js +8 -4
- data/vendor/node_modules/traceur/node_modules/semver/test/ltr.js +2 -1
- data/vendor/node_modules/traceur/node_modules/source-map-support/.npmignore +1 -0
- data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/mime/LICENSE → source-map-support/LICENSE.md} +7 -5
- data/vendor/node_modules/traceur/node_modules/source-map-support/README.md +165 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/browser-source-map-support.js +89 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/index.html +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/require.js +36 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.coffee +13 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.js +24 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.map +10 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-source-map-support.js +89 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/index.html +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.coffee +12 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.js +25 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.map +10 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/build.js +69 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/index.html +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.coffee +12 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.js +25 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.map +10 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/server.js +45 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/.npmignore +2 -0
- data/vendor/node_modules/traceur/node_modules/{q-io → source-map-support/node_modules/source-map}/.travis.yml +1 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/CHANGELOG.md +121 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/LICENSE +28 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/Makefile.dryice.js +166 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/README.md +434 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/assert-shim.js +56 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/mini-require.js +152 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-browser.js +8 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/test-prefix.js +8 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/test-suffix.js +3 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map.js +8 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/array-set.js +97 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/binary-search.js +81 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-consumer.js +478 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-generator.js +380 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-node.js +371 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/util.js +205 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/README.md +171 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/package.json +37 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/package.json +142 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/run-tests.js +62 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-array-set.js +104 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-map-consumer.js +451 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-map-generator.js +417 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-node.js +365 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/util.js +161 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/package.json +52 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/source-map-support.js +381 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/test.js +359 -0
- data/vendor/node_modules/traceur/package.json +234 -20
- data/vendor/node_modules/traceur/src/node/NodeCompiler.js +78 -0
- data/vendor/node_modules/traceur/src/node/System.js +32 -5
- data/vendor/node_modules/traceur/src/node/api.js +28 -93
- data/vendor/node_modules/traceur/src/node/command.js +84 -19
- data/vendor/node_modules/traceur/src/node/compileAllJsFilesInDir.js +40 -0
- data/vendor/node_modules/traceur/src/node/interpreter.js +11 -8
- data/vendor/node_modules/traceur/src/node/recursiveModuleCompile.js +171 -0
- data/vendor/node_modules/traceur/src/node/require.js +7 -21
- data/vendor/node_modules/traceur/src/node/to-amd-compiler.js +2 -7
- data/vendor/node_modules/traceur/src/node/to-closure-compiler.js +28 -0
- data/vendor/node_modules/traceur/src/node/to-commonjs-compiler.js +3 -7
- data/vendor/node_modules/traceur/src/node/traceur.js +1 -1
- metadata +196 -190
- data/vendor/node_modules/traceur/node_modules/q-io/.npmignore +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/CHANGES.md +0 -122
- data/vendor/node_modules/traceur/node_modules/q-io/LICENSE +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/README.md +0 -928
- data/vendor/node_modules/traceur/node_modules/q-io/buffer-stream.js +0 -59
- data/vendor/node_modules/traceur/node_modules/q-io/coverage-report.js +0 -44
- data/vendor/node_modules/traceur/node_modules/q-io/deprecate.js +0 -51
- data/vendor/node_modules/traceur/node_modules/q-io/fs-boot.js +0 -307
- data/vendor/node_modules/traceur/node_modules/q-io/fs-common.js +0 -499
- data/vendor/node_modules/traceur/node_modules/q-io/fs-mock.js +0 -547
- data/vendor/node_modules/traceur/node_modules/q-io/fs-root.js +0 -105
- data/vendor/node_modules/traceur/node_modules/q-io/fs.js +0 -355
- data/vendor/node_modules/traceur/node_modules/q-io/fs2http.js +0 -65
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps.js +0 -152
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/chain.js +0 -24
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/content.js +0 -93
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/cookie.js +0 -154
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/decorators.js +0 -178
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/fs.js +0 -417
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/html.js +0 -58
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/json.js +0 -78
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/negotiate.js +0 -120
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/proxy.js +0 -27
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/redirect.js +0 -209
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/route.js +0 -125
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/status.js +0 -175
- data/vendor/node_modules/traceur/node_modules/q-io/http-cookie.js +0 -75
- data/vendor/node_modules/traceur/node_modules/q-io/http.js +0 -378
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/.npmignore +0 -11
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/CHANGES.md +0 -78
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/LICENSE.md +0 -21
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/README.md +0 -1285
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/collections.js +0 -22
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/dict.js +0 -142
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/fast-map.js +0 -57
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/fast-set.js +0 -183
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-collection.js +0 -261
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-map.js +0 -186
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-order.js +0 -55
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-set.js +0 -59
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/heap.js +0 -236
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/iterator.js +0 -371
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/list.js +0 -435
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/array-changes.js +0 -247
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/map-changes.js +0 -147
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/property-changes.js +0 -448
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/range-changes.js +0 -139
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/lru-map.js +0 -79
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/lru-set.js +0 -142
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/map.js +0 -60
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/multi-map.js +0 -41
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/package.json +0 -12
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/sync +0 -7
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/sync.patch +0 -48
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/weak-map.js +0 -590
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/package.json +0 -49
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/set.js +0 -173
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-array.js +0 -274
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-function.js +0 -59
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-object.js +0 -538
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-regexp.js +0 -14
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim.js +0 -6
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array-map.js +0 -49
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array-set.js +0 -51
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array.js +0 -269
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-map.js +0 -61
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-set.js +0 -736
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/tree-log.js +0 -40
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/weak-map.js +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/README.md +0 -66
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/mime.js +0 -114
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/package.json +0 -35
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/test.js +0 -84
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/types/mime.types +0 -1588
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/types/node.types +0 -77
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/CHANGES +0 -15
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/LICENSE +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/README +0 -96
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/lib/mimeparse.js +0 -166
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/package.json +0 -43
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/CONTRIBUTING.md +0 -40
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/LICENSE +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/README.md +0 -813
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/benchmark/compare-with-callbacks.js +0 -71
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/benchmark/scenarios.js +0 -36
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/package.json +0 -93
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/q.js +0 -1937
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/queue.js +0 -35
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/.gitmodules +0 -6
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/History.md +0 -36
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/Makefile +0 -7
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/Readme.md +0 -38
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/benchmark.js +0 -32
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/examples.js +0 -39
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/index.js +0 -2
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/lib/querystring.js +0 -123
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/package.json +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/.gitmodules +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/.npmignore +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/History.md +0 -128
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/Makefile +0 -53
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/Readme.md +0 -61
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/bin/expresso +0 -856
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/api.html +0 -1080
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/index.html +0 -377
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/index.md +0 -290
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/layout/foot.html +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/layout/head.html +0 -42
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/lib/bar.js +0 -4
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/lib/foo.js +0 -16
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/package.json +0 -12
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/assert.test.js +0 -91
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/async.test.js +0 -12
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/bar.test.js +0 -13
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/foo.test.js +0 -14
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/http.test.js +0 -146
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/serial/async.test.js +0 -39
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/serial/http.test.js +0 -48
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/.gitmodules +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/History.md +0 -22
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/Makefile +0 -6
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/Readme.md +0 -248
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/examples/runner.js +0 -53
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/index.js +0 -2
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/lib/eql.js +0 -91
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/lib/should.js +0 -548
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/package.json +0 -8
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/test/should.test.js +0 -358
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/test/querystring.test.js +0 -133
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/.npmignore +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/LICENSE.md +0 -20
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/README.md +0 -33
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/package.json +0 -37
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/test/url2-spec.js +0 -125
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/url2.js +0 -151
- data/vendor/node_modules/traceur/node_modules/q-io/package.json +0 -51
- data/vendor/node_modules/traceur/node_modules/q-io/reader.js +0 -133
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/boot-directory-spec.js +0 -47
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/contains-spec.js +0 -11
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/fixtures/hello.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/issues/1-spec.js +0 -33
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/make-tree-spec.js +0 -92
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/append-spec.js +0 -41
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/copy-tree-spec.js +0 -57
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/fixture/hello.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/link-spec.js +0 -70
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/make-tree-spec.js +0 -109
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/merge-spec.js +0 -67
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/move-spec.js +0 -219
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/object-spec.js +0 -20
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/range-spec.js +0 -26
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/read-spec.js +0 -40
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/remove-directory-spec.js +0 -37
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/remove-tree-spec.js +0 -39
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/root-spec.js +0 -32
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/stat-spec.js +0 -26
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/symbolic-link-spec.js +0 -86
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/working-directory-spec.js +0 -31
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/write-spec.js +0 -73
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/range-spec.js +0 -23
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/range-spec.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/read-spec.js +0 -22
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/relative-spec.js +0 -25
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/reroot-spec.js +0 -45
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/write-spec.js +0 -38
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/cookie-spec.js +0 -52
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/directory-list-spec.js +0 -86
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/01234.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/1234.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/5678.txt +0 -0
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/9012/3456.txt +0 -0
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/hosts-spec.js +0 -49
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/interpret-range-spec.js +0 -47
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/partial-range-spec.js +0 -186
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/proxy-spec.js +0 -82
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/symbolic-link-spec.js +0 -110
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http/agent-spec.js +0 -96
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http/basic-spec.js +0 -96
- data/vendor/node_modules/traceur/node_modules/q-io/spec/lib/jasmine-promise.js +0 -42
- data/vendor/node_modules/traceur/node_modules/q-io/writer.js +0 -111
- data/vendor/node_modules/traceur/src/node/compile-single-file.js +0 -69
- data/vendor/node_modules/traceur/src/node/compiler.js +0 -116
- data/vendor/node_modules/traceur/src/node/inline-module.js +0 -149
@@ -0,0 +1,42 @@
|
|
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
|
+
if (typeof define !== 'function') {
|
8
|
+
var define = require('amdefine')(module, require);
|
9
|
+
}
|
10
|
+
define(function (require, exports, module) {
|
11
|
+
|
12
|
+
var charToIntMap = {};
|
13
|
+
var intToCharMap = {};
|
14
|
+
|
15
|
+
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
|
16
|
+
.split('')
|
17
|
+
.forEach(function (ch, index) {
|
18
|
+
charToIntMap[ch] = index;
|
19
|
+
intToCharMap[index] = ch;
|
20
|
+
});
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Encode an integer in the range of 0 to 63 to a single base 64 digit.
|
24
|
+
*/
|
25
|
+
exports.encode = function base64_encode(aNumber) {
|
26
|
+
if (aNumber in intToCharMap) {
|
27
|
+
return intToCharMap[aNumber];
|
28
|
+
}
|
29
|
+
throw new TypeError("Must be between 0 and 63: " + aNumber);
|
30
|
+
};
|
31
|
+
|
32
|
+
/**
|
33
|
+
* Decode a single base 64 digit to an integer.
|
34
|
+
*/
|
35
|
+
exports.decode = function base64_decode(aChar) {
|
36
|
+
if (aChar in charToIntMap) {
|
37
|
+
return charToIntMap[aChar];
|
38
|
+
}
|
39
|
+
throw new TypeError("Not a valid base 64 digit: " + aChar);
|
40
|
+
};
|
41
|
+
|
42
|
+
});
|
@@ -0,0 +1,81 @@
|
|
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
|
+
if (typeof define !== 'function') {
|
8
|
+
var define = require('amdefine')(module, require);
|
9
|
+
}
|
10
|
+
define(function (require, exports, module) {
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Recursive implementation of binary search.
|
14
|
+
*
|
15
|
+
* @param aLow Indices here and lower do not contain the needle.
|
16
|
+
* @param aHigh Indices here and higher do not contain the needle.
|
17
|
+
* @param aNeedle The element being searched for.
|
18
|
+
* @param aHaystack The non-empty array being searched.
|
19
|
+
* @param aCompare Function which takes two elements and returns -1, 0, or 1.
|
20
|
+
*/
|
21
|
+
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare) {
|
22
|
+
// This function terminates when one of the following is true:
|
23
|
+
//
|
24
|
+
// 1. We find the exact element we are looking for.
|
25
|
+
//
|
26
|
+
// 2. We did not find the exact element, but we can return the next
|
27
|
+
// closest element that is less than that element.
|
28
|
+
//
|
29
|
+
// 3. We did not find the exact element, and there is no next-closest
|
30
|
+
// element which is less than the one we are searching for, so we
|
31
|
+
// return null.
|
32
|
+
var mid = Math.floor((aHigh - aLow) / 2) + aLow;
|
33
|
+
var cmp = aCompare(aNeedle, aHaystack[mid], true);
|
34
|
+
if (cmp === 0) {
|
35
|
+
// Found the element we are looking for.
|
36
|
+
return aHaystack[mid];
|
37
|
+
}
|
38
|
+
else if (cmp > 0) {
|
39
|
+
// aHaystack[mid] is greater than our needle.
|
40
|
+
if (aHigh - mid > 1) {
|
41
|
+
// The element is in the upper half.
|
42
|
+
return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare);
|
43
|
+
}
|
44
|
+
// We did not find an exact match, return the next closest one
|
45
|
+
// (termination case 2).
|
46
|
+
return aHaystack[mid];
|
47
|
+
}
|
48
|
+
else {
|
49
|
+
// aHaystack[mid] is less than our needle.
|
50
|
+
if (mid - aLow > 1) {
|
51
|
+
// The element is in the lower half.
|
52
|
+
return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare);
|
53
|
+
}
|
54
|
+
// The exact needle element was not found in this haystack. Determine if
|
55
|
+
// we are in termination case (2) or (3) and return the appropriate thing.
|
56
|
+
return aLow < 0
|
57
|
+
? null
|
58
|
+
: aHaystack[aLow];
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
/**
|
63
|
+
* This is an implementation of binary search which will always try and return
|
64
|
+
* the next lowest value checked if there is no exact hit. This is because
|
65
|
+
* mappings between original and generated line/col pairs are single points,
|
66
|
+
* and there is an implicit region between each of them, so a miss just means
|
67
|
+
* that you aren't on the very start of a region.
|
68
|
+
*
|
69
|
+
* @param aNeedle The element you are looking for.
|
70
|
+
* @param aHaystack The array that is being searched.
|
71
|
+
* @param aCompare A function which takes the needle and an element in the
|
72
|
+
* array and returns -1, 0, or 1 depending on whether the needle is less
|
73
|
+
* than, equal to, or greater than the element, respectively.
|
74
|
+
*/
|
75
|
+
exports.search = function search(aNeedle, aHaystack, aCompare) {
|
76
|
+
return aHaystack.length > 0
|
77
|
+
? recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare)
|
78
|
+
: null;
|
79
|
+
};
|
80
|
+
|
81
|
+
});
|
@@ -0,0 +1,478 @@
|
|
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
|
+
if (typeof define !== 'function') {
|
8
|
+
var define = require('amdefine')(module, require);
|
9
|
+
}
|
10
|
+
define(function (require, exports, module) {
|
11
|
+
|
12
|
+
var util = require('./util');
|
13
|
+
var binarySearch = require('./binary-search');
|
14
|
+
var ArraySet = require('./array-set').ArraySet;
|
15
|
+
var base64VLQ = require('./base64-vlq');
|
16
|
+
|
17
|
+
/**
|
18
|
+
* A SourceMapConsumer instance represents a parsed source map which we can
|
19
|
+
* query for information about the original file positions by giving it a file
|
20
|
+
* position in the generated source.
|
21
|
+
*
|
22
|
+
* The only parameter is the raw source map (either as a JSON string, or
|
23
|
+
* already parsed to an object). According to the spec, source maps have the
|
24
|
+
* following attributes:
|
25
|
+
*
|
26
|
+
* - version: Which version of the source map spec this map is following.
|
27
|
+
* - sources: An array of URLs to the original source files.
|
28
|
+
* - names: An array of identifiers which can be referrenced by individual mappings.
|
29
|
+
* - sourceRoot: Optional. The URL root from which all sources are relative.
|
30
|
+
* - sourcesContent: Optional. An array of contents of the original source files.
|
31
|
+
* - mappings: A string of base64 VLQs which contain the actual mappings.
|
32
|
+
* - file: The generated file this source map is associated with.
|
33
|
+
*
|
34
|
+
* Here is an example source map, taken from the source map spec[0]:
|
35
|
+
*
|
36
|
+
* {
|
37
|
+
* version : 3,
|
38
|
+
* file: "out.js",
|
39
|
+
* sourceRoot : "",
|
40
|
+
* sources: ["foo.js", "bar.js"],
|
41
|
+
* names: ["src", "maps", "are", "fun"],
|
42
|
+
* mappings: "AA,AB;;ABCDE;"
|
43
|
+
* }
|
44
|
+
*
|
45
|
+
* [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
|
46
|
+
*/
|
47
|
+
function SourceMapConsumer(aSourceMap) {
|
48
|
+
var sourceMap = aSourceMap;
|
49
|
+
if (typeof aSourceMap === 'string') {
|
50
|
+
sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
|
51
|
+
}
|
52
|
+
|
53
|
+
var version = util.getArg(sourceMap, 'version');
|
54
|
+
var sources = util.getArg(sourceMap, 'sources');
|
55
|
+
// Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
|
56
|
+
// requires the array) to play nice here.
|
57
|
+
var names = util.getArg(sourceMap, 'names', []);
|
58
|
+
var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
|
59
|
+
var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
|
60
|
+
var mappings = util.getArg(sourceMap, 'mappings');
|
61
|
+
var file = util.getArg(sourceMap, 'file', null);
|
62
|
+
|
63
|
+
// Once again, Sass deviates from the spec and supplies the version as a
|
64
|
+
// string rather than a number, so we use loose equality checking here.
|
65
|
+
if (version != this._version) {
|
66
|
+
throw new Error('Unsupported version: ' + version);
|
67
|
+
}
|
68
|
+
|
69
|
+
// Pass `true` below to allow duplicate names and sources. While source maps
|
70
|
+
// are intended to be compressed and deduplicated, the TypeScript compiler
|
71
|
+
// sometimes generates source maps with duplicates in them. See Github issue
|
72
|
+
// #72 and bugzil.la/889492.
|
73
|
+
this._names = ArraySet.fromArray(names, true);
|
74
|
+
this._sources = ArraySet.fromArray(sources, true);
|
75
|
+
|
76
|
+
this.sourceRoot = sourceRoot;
|
77
|
+
this.sourcesContent = sourcesContent;
|
78
|
+
this._mappings = mappings;
|
79
|
+
this.file = file;
|
80
|
+
}
|
81
|
+
|
82
|
+
/**
|
83
|
+
* Create a SourceMapConsumer from a SourceMapGenerator.
|
84
|
+
*
|
85
|
+
* @param SourceMapGenerator aSourceMap
|
86
|
+
* The source map that will be consumed.
|
87
|
+
* @returns SourceMapConsumer
|
88
|
+
*/
|
89
|
+
SourceMapConsumer.fromSourceMap =
|
90
|
+
function SourceMapConsumer_fromSourceMap(aSourceMap) {
|
91
|
+
var smc = Object.create(SourceMapConsumer.prototype);
|
92
|
+
|
93
|
+
smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
|
94
|
+
smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
|
95
|
+
smc.sourceRoot = aSourceMap._sourceRoot;
|
96
|
+
smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
|
97
|
+
smc.sourceRoot);
|
98
|
+
smc.file = aSourceMap._file;
|
99
|
+
|
100
|
+
smc.__generatedMappings = aSourceMap._mappings.slice()
|
101
|
+
.sort(util.compareByGeneratedPositions);
|
102
|
+
smc.__originalMappings = aSourceMap._mappings.slice()
|
103
|
+
.sort(util.compareByOriginalPositions);
|
104
|
+
|
105
|
+
return smc;
|
106
|
+
};
|
107
|
+
|
108
|
+
/**
|
109
|
+
* The version of the source mapping spec that we are consuming.
|
110
|
+
*/
|
111
|
+
SourceMapConsumer.prototype._version = 3;
|
112
|
+
|
113
|
+
/**
|
114
|
+
* The list of original sources.
|
115
|
+
*/
|
116
|
+
Object.defineProperty(SourceMapConsumer.prototype, 'sources', {
|
117
|
+
get: function () {
|
118
|
+
return this._sources.toArray().map(function (s) {
|
119
|
+
return this.sourceRoot ? util.join(this.sourceRoot, s) : s;
|
120
|
+
}, this);
|
121
|
+
}
|
122
|
+
});
|
123
|
+
|
124
|
+
// `__generatedMappings` and `__originalMappings` are arrays that hold the
|
125
|
+
// parsed mapping coordinates from the source map's "mappings" attribute. They
|
126
|
+
// are lazily instantiated, accessed via the `_generatedMappings` and
|
127
|
+
// `_originalMappings` getters respectively, and we only parse the mappings
|
128
|
+
// and create these arrays once queried for a source location. We jump through
|
129
|
+
// these hoops because there can be many thousands of mappings, and parsing
|
130
|
+
// them is expensive, so we only want to do it if we must.
|
131
|
+
//
|
132
|
+
// Each object in the arrays is of the form:
|
133
|
+
//
|
134
|
+
// {
|
135
|
+
// generatedLine: The line number in the generated code,
|
136
|
+
// generatedColumn: The column number in the generated code,
|
137
|
+
// source: The path to the original source file that generated this
|
138
|
+
// chunk of code,
|
139
|
+
// originalLine: The line number in the original source that
|
140
|
+
// corresponds to this chunk of generated code,
|
141
|
+
// originalColumn: The column number in the original source that
|
142
|
+
// corresponds to this chunk of generated code,
|
143
|
+
// name: The name of the original symbol which generated this chunk of
|
144
|
+
// code.
|
145
|
+
// }
|
146
|
+
//
|
147
|
+
// All properties except for `generatedLine` and `generatedColumn` can be
|
148
|
+
// `null`.
|
149
|
+
//
|
150
|
+
// `_generatedMappings` is ordered by the generated positions.
|
151
|
+
//
|
152
|
+
// `_originalMappings` is ordered by the original positions.
|
153
|
+
|
154
|
+
SourceMapConsumer.prototype.__generatedMappings = null;
|
155
|
+
Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
|
156
|
+
get: function () {
|
157
|
+
if (!this.__generatedMappings) {
|
158
|
+
this.__generatedMappings = [];
|
159
|
+
this.__originalMappings = [];
|
160
|
+
this._parseMappings(this._mappings, this.sourceRoot);
|
161
|
+
}
|
162
|
+
|
163
|
+
return this.__generatedMappings;
|
164
|
+
}
|
165
|
+
});
|
166
|
+
|
167
|
+
SourceMapConsumer.prototype.__originalMappings = null;
|
168
|
+
Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
|
169
|
+
get: function () {
|
170
|
+
if (!this.__originalMappings) {
|
171
|
+
this.__generatedMappings = [];
|
172
|
+
this.__originalMappings = [];
|
173
|
+
this._parseMappings(this._mappings, this.sourceRoot);
|
174
|
+
}
|
175
|
+
|
176
|
+
return this.__originalMappings;
|
177
|
+
}
|
178
|
+
});
|
179
|
+
|
180
|
+
/**
|
181
|
+
* Parse the mappings in a string in to a data structure which we can easily
|
182
|
+
* query (the ordered arrays in the `this.__generatedMappings` and
|
183
|
+
* `this.__originalMappings` properties).
|
184
|
+
*/
|
185
|
+
SourceMapConsumer.prototype._parseMappings =
|
186
|
+
function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
187
|
+
var generatedLine = 1;
|
188
|
+
var previousGeneratedColumn = 0;
|
189
|
+
var previousOriginalLine = 0;
|
190
|
+
var previousOriginalColumn = 0;
|
191
|
+
var previousSource = 0;
|
192
|
+
var previousName = 0;
|
193
|
+
var mappingSeparator = /^[,;]/;
|
194
|
+
var str = aStr;
|
195
|
+
var mapping;
|
196
|
+
var temp;
|
197
|
+
|
198
|
+
while (str.length > 0) {
|
199
|
+
if (str.charAt(0) === ';') {
|
200
|
+
generatedLine++;
|
201
|
+
str = str.slice(1);
|
202
|
+
previousGeneratedColumn = 0;
|
203
|
+
}
|
204
|
+
else if (str.charAt(0) === ',') {
|
205
|
+
str = str.slice(1);
|
206
|
+
}
|
207
|
+
else {
|
208
|
+
mapping = {};
|
209
|
+
mapping.generatedLine = generatedLine;
|
210
|
+
|
211
|
+
// Generated column.
|
212
|
+
temp = base64VLQ.decode(str);
|
213
|
+
mapping.generatedColumn = previousGeneratedColumn + temp.value;
|
214
|
+
previousGeneratedColumn = mapping.generatedColumn;
|
215
|
+
str = temp.rest;
|
216
|
+
|
217
|
+
if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) {
|
218
|
+
// Original source.
|
219
|
+
temp = base64VLQ.decode(str);
|
220
|
+
mapping.source = this._sources.at(previousSource + temp.value);
|
221
|
+
previousSource += temp.value;
|
222
|
+
str = temp.rest;
|
223
|
+
if (str.length === 0 || mappingSeparator.test(str.charAt(0))) {
|
224
|
+
throw new Error('Found a source, but no line and column');
|
225
|
+
}
|
226
|
+
|
227
|
+
// Original line.
|
228
|
+
temp = base64VLQ.decode(str);
|
229
|
+
mapping.originalLine = previousOriginalLine + temp.value;
|
230
|
+
previousOriginalLine = mapping.originalLine;
|
231
|
+
// Lines are stored 0-based
|
232
|
+
mapping.originalLine += 1;
|
233
|
+
str = temp.rest;
|
234
|
+
if (str.length === 0 || mappingSeparator.test(str.charAt(0))) {
|
235
|
+
throw new Error('Found a source and line, but no column');
|
236
|
+
}
|
237
|
+
|
238
|
+
// Original column.
|
239
|
+
temp = base64VLQ.decode(str);
|
240
|
+
mapping.originalColumn = previousOriginalColumn + temp.value;
|
241
|
+
previousOriginalColumn = mapping.originalColumn;
|
242
|
+
str = temp.rest;
|
243
|
+
|
244
|
+
if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) {
|
245
|
+
// Original name.
|
246
|
+
temp = base64VLQ.decode(str);
|
247
|
+
mapping.name = this._names.at(previousName + temp.value);
|
248
|
+
previousName += temp.value;
|
249
|
+
str = temp.rest;
|
250
|
+
}
|
251
|
+
}
|
252
|
+
|
253
|
+
this.__generatedMappings.push(mapping);
|
254
|
+
if (typeof mapping.originalLine === 'number') {
|
255
|
+
this.__originalMappings.push(mapping);
|
256
|
+
}
|
257
|
+
}
|
258
|
+
}
|
259
|
+
|
260
|
+
this.__generatedMappings.sort(util.compareByGeneratedPositions);
|
261
|
+
this.__originalMappings.sort(util.compareByOriginalPositions);
|
262
|
+
};
|
263
|
+
|
264
|
+
/**
|
265
|
+
* Find the mapping that best matches the hypothetical "needle" mapping that
|
266
|
+
* we are searching for in the given "haystack" of mappings.
|
267
|
+
*/
|
268
|
+
SourceMapConsumer.prototype._findMapping =
|
269
|
+
function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
|
270
|
+
aColumnName, aComparator) {
|
271
|
+
// To return the position we are searching for, we must first find the
|
272
|
+
// mapping for the given position and then return the opposite position it
|
273
|
+
// points to. Because the mappings are sorted, we can use binary search to
|
274
|
+
// find the best mapping.
|
275
|
+
|
276
|
+
if (aNeedle[aLineName] <= 0) {
|
277
|
+
throw new TypeError('Line must be greater than or equal to 1, got '
|
278
|
+
+ aNeedle[aLineName]);
|
279
|
+
}
|
280
|
+
if (aNeedle[aColumnName] < 0) {
|
281
|
+
throw new TypeError('Column must be greater than or equal to 0, got '
|
282
|
+
+ aNeedle[aColumnName]);
|
283
|
+
}
|
284
|
+
|
285
|
+
return binarySearch.search(aNeedle, aMappings, aComparator);
|
286
|
+
};
|
287
|
+
|
288
|
+
/**
|
289
|
+
* Returns the original source, line, and column information for the generated
|
290
|
+
* source's line and column positions provided. The only argument is an object
|
291
|
+
* with the following properties:
|
292
|
+
*
|
293
|
+
* - line: The line number in the generated source.
|
294
|
+
* - column: The column number in the generated source.
|
295
|
+
*
|
296
|
+
* and an object is returned with the following properties:
|
297
|
+
*
|
298
|
+
* - source: The original source file, or null.
|
299
|
+
* - line: The line number in the original source, or null.
|
300
|
+
* - column: The column number in the original source, or null.
|
301
|
+
* - name: The original identifier, or null.
|
302
|
+
*/
|
303
|
+
SourceMapConsumer.prototype.originalPositionFor =
|
304
|
+
function SourceMapConsumer_originalPositionFor(aArgs) {
|
305
|
+
var needle = {
|
306
|
+
generatedLine: util.getArg(aArgs, 'line'),
|
307
|
+
generatedColumn: util.getArg(aArgs, 'column')
|
308
|
+
};
|
309
|
+
|
310
|
+
var mapping = this._findMapping(needle,
|
311
|
+
this._generatedMappings,
|
312
|
+
"generatedLine",
|
313
|
+
"generatedColumn",
|
314
|
+
util.compareByGeneratedPositions);
|
315
|
+
|
316
|
+
if (mapping) {
|
317
|
+
var source = util.getArg(mapping, 'source', null);
|
318
|
+
if (source && this.sourceRoot) {
|
319
|
+
source = util.join(this.sourceRoot, source);
|
320
|
+
}
|
321
|
+
return {
|
322
|
+
source: source,
|
323
|
+
line: util.getArg(mapping, 'originalLine', null),
|
324
|
+
column: util.getArg(mapping, 'originalColumn', null),
|
325
|
+
name: util.getArg(mapping, 'name', null)
|
326
|
+
};
|
327
|
+
}
|
328
|
+
|
329
|
+
return {
|
330
|
+
source: null,
|
331
|
+
line: null,
|
332
|
+
column: null,
|
333
|
+
name: null
|
334
|
+
};
|
335
|
+
};
|
336
|
+
|
337
|
+
/**
|
338
|
+
* Returns the original source content. The only argument is the url of the
|
339
|
+
* original source file. Returns null if no original source content is
|
340
|
+
* availible.
|
341
|
+
*/
|
342
|
+
SourceMapConsumer.prototype.sourceContentFor =
|
343
|
+
function SourceMapConsumer_sourceContentFor(aSource) {
|
344
|
+
if (!this.sourcesContent) {
|
345
|
+
return null;
|
346
|
+
}
|
347
|
+
|
348
|
+
if (this.sourceRoot) {
|
349
|
+
aSource = util.relative(this.sourceRoot, aSource);
|
350
|
+
}
|
351
|
+
|
352
|
+
if (this._sources.has(aSource)) {
|
353
|
+
return this.sourcesContent[this._sources.indexOf(aSource)];
|
354
|
+
}
|
355
|
+
|
356
|
+
var url;
|
357
|
+
if (this.sourceRoot
|
358
|
+
&& (url = util.urlParse(this.sourceRoot))) {
|
359
|
+
// XXX: file:// URIs and absolute paths lead to unexpected behavior for
|
360
|
+
// many users. We can help them out when they expect file:// URIs to
|
361
|
+
// behave like it would if they were running a local HTTP server. See
|
362
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
|
363
|
+
var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
|
364
|
+
if (url.scheme == "file"
|
365
|
+
&& this._sources.has(fileUriAbsPath)) {
|
366
|
+
return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
|
367
|
+
}
|
368
|
+
|
369
|
+
if ((!url.path || url.path == "/")
|
370
|
+
&& this._sources.has("/" + aSource)) {
|
371
|
+
return this.sourcesContent[this._sources.indexOf("/" + aSource)];
|
372
|
+
}
|
373
|
+
}
|
374
|
+
|
375
|
+
throw new Error('"' + aSource + '" is not in the SourceMap.');
|
376
|
+
};
|
377
|
+
|
378
|
+
/**
|
379
|
+
* Returns the generated line and column information for the original source,
|
380
|
+
* line, and column positions provided. The only argument is an object with
|
381
|
+
* the following properties:
|
382
|
+
*
|
383
|
+
* - source: The filename of the original source.
|
384
|
+
* - line: The line number in the original source.
|
385
|
+
* - column: The column number in the original source.
|
386
|
+
*
|
387
|
+
* and an object is returned with the following properties:
|
388
|
+
*
|
389
|
+
* - line: The line number in the generated source, or null.
|
390
|
+
* - column: The column number in the generated source, or null.
|
391
|
+
*/
|
392
|
+
SourceMapConsumer.prototype.generatedPositionFor =
|
393
|
+
function SourceMapConsumer_generatedPositionFor(aArgs) {
|
394
|
+
var needle = {
|
395
|
+
source: util.getArg(aArgs, 'source'),
|
396
|
+
originalLine: util.getArg(aArgs, 'line'),
|
397
|
+
originalColumn: util.getArg(aArgs, 'column')
|
398
|
+
};
|
399
|
+
|
400
|
+
if (this.sourceRoot) {
|
401
|
+
needle.source = util.relative(this.sourceRoot, needle.source);
|
402
|
+
}
|
403
|
+
|
404
|
+
var mapping = this._findMapping(needle,
|
405
|
+
this._originalMappings,
|
406
|
+
"originalLine",
|
407
|
+
"originalColumn",
|
408
|
+
util.compareByOriginalPositions);
|
409
|
+
|
410
|
+
if (mapping) {
|
411
|
+
return {
|
412
|
+
line: util.getArg(mapping, 'generatedLine', null),
|
413
|
+
column: util.getArg(mapping, 'generatedColumn', null)
|
414
|
+
};
|
415
|
+
}
|
416
|
+
|
417
|
+
return {
|
418
|
+
line: null,
|
419
|
+
column: null
|
420
|
+
};
|
421
|
+
};
|
422
|
+
|
423
|
+
SourceMapConsumer.GENERATED_ORDER = 1;
|
424
|
+
SourceMapConsumer.ORIGINAL_ORDER = 2;
|
425
|
+
|
426
|
+
/**
|
427
|
+
* Iterate over each mapping between an original source/line/column and a
|
428
|
+
* generated line/column in this source map.
|
429
|
+
*
|
430
|
+
* @param Function aCallback
|
431
|
+
* The function that is called with each mapping.
|
432
|
+
* @param Object aContext
|
433
|
+
* Optional. If specified, this object will be the value of `this` every
|
434
|
+
* time that `aCallback` is called.
|
435
|
+
* @param aOrder
|
436
|
+
* Either `SourceMapConsumer.GENERATED_ORDER` or
|
437
|
+
* `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
|
438
|
+
* iterate over the mappings sorted by the generated file's line/column
|
439
|
+
* order or the original's source/line/column order, respectively. Defaults to
|
440
|
+
* `SourceMapConsumer.GENERATED_ORDER`.
|
441
|
+
*/
|
442
|
+
SourceMapConsumer.prototype.eachMapping =
|
443
|
+
function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
|
444
|
+
var context = aContext || null;
|
445
|
+
var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
|
446
|
+
|
447
|
+
var mappings;
|
448
|
+
switch (order) {
|
449
|
+
case SourceMapConsumer.GENERATED_ORDER:
|
450
|
+
mappings = this._generatedMappings;
|
451
|
+
break;
|
452
|
+
case SourceMapConsumer.ORIGINAL_ORDER:
|
453
|
+
mappings = this._originalMappings;
|
454
|
+
break;
|
455
|
+
default:
|
456
|
+
throw new Error("Unknown order of iteration.");
|
457
|
+
}
|
458
|
+
|
459
|
+
var sourceRoot = this.sourceRoot;
|
460
|
+
mappings.map(function (mapping) {
|
461
|
+
var source = mapping.source;
|
462
|
+
if (source && sourceRoot) {
|
463
|
+
source = util.join(sourceRoot, source);
|
464
|
+
}
|
465
|
+
return {
|
466
|
+
source: source,
|
467
|
+
generatedLine: mapping.generatedLine,
|
468
|
+
generatedColumn: mapping.generatedColumn,
|
469
|
+
originalLine: mapping.originalLine,
|
470
|
+
originalColumn: mapping.originalColumn,
|
471
|
+
name: mapping.name
|
472
|
+
};
|
473
|
+
}).forEach(aCallback, context);
|
474
|
+
};
|
475
|
+
|
476
|
+
exports.SourceMapConsumer = SourceMapConsumer;
|
477
|
+
|
478
|
+
});
|