appmap 0.62.0 → 0.62.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/appmap/version.rb +1 -1
- data/node_modules/@appland/cli/CHANGELOG.md +96 -0
- data/node_modules/@appland/cli/package.json +49 -0
- data/node_modules/@appland/cli/src/appMapCatalog.js +39 -0
- data/node_modules/@appland/cli/src/appland/getAppMap.js +55 -0
- data/node_modules/@appland/cli/src/appland/listAppMaps.js +58 -0
- data/node_modules/@appland/cli/src/appland/settings.js +62 -0
- data/node_modules/@appland/cli/src/appland/types.d.ts +16 -0
- data/node_modules/@appland/cli/src/cli.js +576 -0
- data/node_modules/@appland/cli/src/database.js +197 -0
- data/node_modules/@appland/cli/src/depends.js +157 -0
- data/node_modules/@appland/cli/src/fingerprint/algorithms.js +71 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize.js +70 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize/base.js +58 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize/classDependencies.js +36 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize/classes.js +14 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize/eventTree.js +19 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize/httpClientRequests.js +18 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize/httpServerRequests.js +18 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize/info.js +55 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize/labels.js +10 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize/packageDependencies.js +36 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize/packages.js +14 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize/sqlNormalized.js +19 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize/sqlTables.js +24 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize/trace.js +57 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize/unique.js +8 -0
- data/node_modules/@appland/cli/src/fingerprint/canonicalize/update.js +85 -0
- data/node_modules/@appland/cli/src/fingerprint/fingerprintDirectoryCommand.js +30 -0
- data/node_modules/@appland/cli/src/fingerprint/fingerprintQueue.js +30 -0
- data/node_modules/@appland/cli/src/fingerprint/fingerprintWatchCommand.js +64 -0
- data/node_modules/@appland/cli/src/fingerprint/fingerprinter.js +186 -0
- data/node_modules/@appland/cli/src/fingerprint/index.js +24 -0
- data/node_modules/@appland/cli/src/functionStats.js +168 -0
- data/node_modules/@appland/cli/src/inspect.js +7 -0
- data/node_modules/@appland/cli/src/inspect/fields.js +66 -0
- data/node_modules/@appland/cli/src/inspect/filter.js +105 -0
- data/node_modules/@appland/cli/src/inspect/home.js +64 -0
- data/node_modules/@appland/cli/src/inspect/print.js +231 -0
- data/node_modules/@appland/cli/src/inspect/reset.js +10 -0
- data/node_modules/@appland/cli/src/inspect/types.d.ts +11 -0
- data/node_modules/@appland/cli/src/inspect/undoFilter.js +10 -0
- data/node_modules/@appland/cli/src/inventoryCommand.js +59 -0
- data/node_modules/@appland/cli/src/search/codeObjectMatcher.js +75 -0
- data/node_modules/@appland/cli/src/search/constants.js +5 -0
- data/node_modules/@appland/cli/src/search/findCodeObjects.js +293 -0
- data/node_modules/@appland/cli/src/search/findEvents.js +184 -0
- data/node_modules/@appland/cli/src/search/matchFilter.js +65 -0
- data/node_modules/@appland/cli/src/search/matchSpec.js +198 -0
- data/node_modules/@appland/cli/src/search/trigram.js +107 -0
- data/node_modules/@appland/cli/src/search/types.d.ts +107 -0
- data/node_modules/@appland/cli/src/search/utils.js +4 -0
- data/node_modules/@appland/cli/src/swagger/README.md +75 -0
- data/node_modules/@appland/cli/src/swagger/command.js +42 -0
- data/node_modules/@appland/cli/src/swagger/method.js +173 -0
- data/node_modules/@appland/cli/src/swagger/model.js +54 -0
- data/node_modules/@appland/cli/src/swagger/path.js +38 -0
- data/node_modules/@appland/cli/src/swagger/response.js +34 -0
- data/node_modules/@appland/cli/src/swagger/schema.js +38 -0
- data/node_modules/@appland/cli/src/swagger/securitySchemes.js +60 -0
- data/node_modules/@appland/cli/src/swagger/settings.js +9 -0
- data/node_modules/@appland/cli/src/swagger/util.js +79 -0
- data/node_modules/@appland/cli/src/utils.js +164 -0
- data/node_modules/@appland/cli/tests/unit/depends.spec.js +55 -0
- data/node_modules/@appland/cli/tests/unit/fingerprint/canonicalize.spec.js +42 -0
- data/node_modules/@appland/cli/tests/unit/fingerprint/sql.spec.js +40 -0
- data/node_modules/@appland/cli/tests/unit/fixtures/app/controllers/organizations_controller.rb +1 -0
- data/node_modules/@appland/cli/tests/unit/fixtures/app/models/configuration.rb +1 -0
- data/node_modules/@appland/cli/tests/unit/fixtures/app/models/show.rb +1 -0
- data/node_modules/@appland/cli/tests/unit/fixtures/app/models/user.rb +1 -0
- data/node_modules/@appland/cli/tests/unit/fixtures/canonicalize/revoke_api_key.info.json +246 -0
- data/node_modules/@appland/cli/tests/unit/fixtures/canonicalize/revoke_api_key.trace.json +289 -0
- data/node_modules/@appland/cli/tests/unit/fixtures/canonicalize/revoke_api_key.update.json +78 -0
- data/node_modules/@appland/cli/tests/unit/fixtures/revoke_api_key.appmap.json +899 -0
- data/node_modules/@appland/cli/tests/unit/fixtures/user_page_scenario.appmap.json +1774 -0
- data/node_modules/@appland/cli/tests/unit/inspect.spec.js +94 -0
- data/node_modules/@appland/models/CHANGELOG.md +83 -0
- data/node_modules/@appland/models/README.md +8 -0
- data/node_modules/@appland/models/dist/index.cjs +4250 -0
- data/node_modules/@appland/models/dist/index.js +4193 -0
- data/node_modules/@appland/models/package.json +50 -0
- data/node_modules/@rollup/plugin-alias/CHANGELOG.md +92 -0
- data/node_modules/@rollup/plugin-alias/LICENSE +21 -0
- data/node_modules/@rollup/plugin-alias/README.md +174 -0
- data/node_modules/@rollup/plugin-alias/dist/index.es.js +95 -0
- data/node_modules/@rollup/plugin-alias/dist/index.js +101 -0
- data/node_modules/@rollup/plugin-alias/package.json +78 -0
- data/node_modules/@rollup/plugin-alias/types/index.d.ts +36 -0
- data/node_modules/ansi-regex/index.d.ts +37 -0
- data/node_modules/ansi-regex/index.js +10 -0
- data/node_modules/ansi-regex/license +9 -0
- data/node_modules/ansi-regex/package.json +55 -0
- data/node_modules/ansi-regex/readme.md +78 -0
- data/node_modules/ansi-styles/index.d.ts +345 -0
- data/node_modules/ansi-styles/index.js +163 -0
- data/node_modules/ansi-styles/license +9 -0
- data/node_modules/ansi-styles/package.json +56 -0
- data/node_modules/ansi-styles/readme.md +152 -0
- data/node_modules/anymatch/LICENSE +15 -0
- data/node_modules/anymatch/README.md +87 -0
- data/node_modules/anymatch/index.d.ts +19 -0
- data/node_modules/anymatch/index.js +104 -0
- data/node_modules/anymatch/package.json +48 -0
- data/node_modules/argparse/CHANGELOG.md +185 -0
- data/node_modules/argparse/LICENSE +21 -0
- data/node_modules/argparse/README.md +257 -0
- data/node_modules/argparse/index.js +3 -0
- data/node_modules/argparse/lib/action.js +146 -0
- data/node_modules/argparse/lib/action/append.js +53 -0
- data/node_modules/argparse/lib/action/append/constant.js +47 -0
- data/node_modules/argparse/lib/action/count.js +40 -0
- data/node_modules/argparse/lib/action/help.js +47 -0
- data/node_modules/argparse/lib/action/store.js +50 -0
- data/node_modules/argparse/lib/action/store/constant.js +43 -0
- data/node_modules/argparse/lib/action/store/false.js +27 -0
- data/node_modules/argparse/lib/action/store/true.js +26 -0
- data/node_modules/argparse/lib/action/subparsers.js +149 -0
- data/node_modules/argparse/lib/action/version.js +47 -0
- data/node_modules/argparse/lib/action_container.js +482 -0
- data/node_modules/argparse/lib/argparse.js +14 -0
- data/node_modules/argparse/lib/argument/error.js +50 -0
- data/node_modules/argparse/lib/argument/exclusive.js +54 -0
- data/node_modules/argparse/lib/argument/group.js +75 -0
- data/node_modules/argparse/lib/argument_parser.js +1161 -0
- data/node_modules/argparse/lib/const.js +21 -0
- data/node_modules/argparse/lib/help/added_formatters.js +87 -0
- data/node_modules/argparse/lib/help/formatter.js +795 -0
- data/node_modules/argparse/lib/namespace.js +76 -0
- data/node_modules/argparse/lib/utils.js +57 -0
- data/node_modules/argparse/package.json +34 -0
- data/node_modules/async/CHANGELOG.md +331 -0
- data/node_modules/async/LICENSE +19 -0
- data/node_modules/async/README.md +60 -0
- data/node_modules/async/all.js +54 -0
- data/node_modules/async/allLimit.js +46 -0
- data/node_modules/async/allSeries.js +45 -0
- data/node_modules/async/any.js +56 -0
- data/node_modules/async/anyLimit.js +47 -0
- data/node_modules/async/anySeries.js +46 -0
- data/node_modules/async/apply.js +55 -0
- data/node_modules/async/applyEach.js +57 -0
- data/node_modules/async/applyEachSeries.js +37 -0
- data/node_modules/async/asyncify.js +118 -0
- data/node_modules/async/auto.js +267 -0
- data/node_modules/async/autoInject.js +156 -0
- data/node_modules/async/bower.json +17 -0
- data/node_modules/async/cargo.js +63 -0
- data/node_modules/async/cargoQueue.js +71 -0
- data/node_modules/async/compose.js +55 -0
- data/node_modules/async/concat.js +47 -0
- data/node_modules/async/concatLimit.js +60 -0
- data/node_modules/async/concatSeries.js +41 -0
- data/node_modules/async/constant.js +55 -0
- data/node_modules/async/detect.js +61 -0
- data/node_modules/async/detectLimit.js +48 -0
- data/node_modules/async/detectSeries.js +47 -0
- data/node_modules/async/dir.js +43 -0
- data/node_modules/async/dist/async.js +4846 -0
- data/node_modules/async/dist/async.min.js +1 -0
- data/node_modules/async/dist/async.mjs +4734 -0
- data/node_modules/async/doDuring.js +68 -0
- data/node_modules/async/doUntil.js +46 -0
- data/node_modules/async/doWhilst.js +68 -0
- data/node_modules/async/during.js +78 -0
- data/node_modules/async/each.js +88 -0
- data/node_modules/async/eachLimit.js +50 -0
- data/node_modules/async/eachOf.js +116 -0
- data/node_modules/async/eachOfLimit.js +47 -0
- data/node_modules/async/eachOfSeries.js +39 -0
- data/node_modules/async/eachSeries.js +44 -0
- data/node_modules/async/ensureAsync.js +67 -0
- data/node_modules/async/every.js +54 -0
- data/node_modules/async/everyLimit.js +46 -0
- data/node_modules/async/everySeries.js +45 -0
- data/node_modules/async/filter.js +53 -0
- data/node_modules/async/filterLimit.js +45 -0
- data/node_modules/async/filterSeries.js +43 -0
- data/node_modules/async/find.js +61 -0
- data/node_modules/async/findLimit.js +48 -0
- data/node_modules/async/findSeries.js +47 -0
- data/node_modules/async/flatMap.js +47 -0
- data/node_modules/async/flatMapLimit.js +60 -0
- data/node_modules/async/flatMapSeries.js +41 -0
- data/node_modules/async/foldl.js +77 -0
- data/node_modules/async/foldr.js +41 -0
- data/node_modules/async/forEach.js +88 -0
- data/node_modules/async/forEachLimit.js +50 -0
- data/node_modules/async/forEachOf.js +116 -0
- data/node_modules/async/forEachOfLimit.js +47 -0
- data/node_modules/async/forEachOfSeries.js +39 -0
- data/node_modules/async/forEachSeries.js +44 -0
- data/node_modules/async/forever.js +68 -0
- data/node_modules/async/groupBy.js +54 -0
- data/node_modules/async/groupByLimit.js +71 -0
- data/node_modules/async/groupBySeries.js +36 -0
- data/node_modules/async/index.js +588 -0
- data/node_modules/async/inject.js +77 -0
- data/node_modules/async/internal/DoublyLinkedList.js +92 -0
- data/node_modules/async/internal/Heap.js +120 -0
- data/node_modules/async/internal/applyEach.js +29 -0
- data/node_modules/async/internal/asyncEachOfLimit.js +75 -0
- data/node_modules/async/internal/awaitify.js +27 -0
- data/node_modules/async/internal/breakLoop.js +10 -0
- data/node_modules/async/internal/consoleFunc.js +27 -0
- data/node_modules/async/internal/createTester.js +40 -0
- data/node_modules/async/internal/eachOfLimit.js +90 -0
- data/node_modules/async/internal/filter.js +55 -0
- data/node_modules/async/internal/getIterator.js +11 -0
- data/node_modules/async/internal/initialParams.js +14 -0
- data/node_modules/async/internal/isArrayLike.js +10 -0
- data/node_modules/async/internal/iterator.js +54 -0
- data/node_modules/async/internal/map.js +30 -0
- data/node_modules/async/internal/once.js +17 -0
- data/node_modules/async/internal/onlyOnce.js +15 -0
- data/node_modules/async/internal/parallel.js +34 -0
- data/node_modules/async/internal/promiseCallback.js +23 -0
- data/node_modules/async/internal/queue.js +291 -0
- data/node_modules/async/internal/range.js +14 -0
- data/node_modules/async/internal/reject.js +26 -0
- data/node_modules/async/internal/setImmediate.js +30 -0
- data/node_modules/async/internal/withoutIndex.js +10 -0
- data/node_modules/async/internal/wrapAsync.js +34 -0
- data/node_modules/async/log.js +41 -0
- data/node_modules/async/map.js +62 -0
- data/node_modules/async/mapLimit.js +45 -0
- data/node_modules/async/mapSeries.js +44 -0
- data/node_modules/async/mapValues.js +62 -0
- data/node_modules/async/mapValuesLimit.js +61 -0
- data/node_modules/async/mapValuesSeries.js +37 -0
- data/node_modules/async/memoize.js +91 -0
- data/node_modules/async/nextTick.js +52 -0
- data/node_modules/async/package.json +82 -0
- data/node_modules/async/parallel.js +91 -0
- data/node_modules/async/parallelLimit.js +41 -0
- data/node_modules/async/priorityQueue.js +84 -0
- data/node_modules/async/queue.js +167 -0
- data/node_modules/async/race.js +67 -0
- data/node_modules/async/reduce.js +77 -0
- data/node_modules/async/reduceRight.js +41 -0
- data/node_modules/async/reflect.js +78 -0
- data/node_modules/async/reflectAll.js +93 -0
- data/node_modules/async/reject.js +53 -0
- data/node_modules/async/rejectLimit.js +45 -0
- data/node_modules/async/rejectSeries.js +43 -0
- data/node_modules/async/retry.js +159 -0
- data/node_modules/async/retryable.js +77 -0
- data/node_modules/async/select.js +53 -0
- data/node_modules/async/selectLimit.js +45 -0
- data/node_modules/async/selectSeries.js +43 -0
- data/node_modules/async/seq.js +79 -0
- data/node_modules/async/series.js +86 -0
- data/node_modules/async/setImmediate.js +45 -0
- data/node_modules/async/some.js +56 -0
- data/node_modules/async/someLimit.js +47 -0
- data/node_modules/async/someSeries.js +46 -0
- data/node_modules/async/sortBy.js +88 -0
- data/node_modules/async/timeout.js +89 -0
- data/node_modules/async/times.js +50 -0
- data/node_modules/async/timesLimit.js +43 -0
- data/node_modules/async/timesSeries.js +32 -0
- data/node_modules/async/transform.js +81 -0
- data/node_modules/async/tryEach.js +78 -0
- data/node_modules/async/unmemoize.js +25 -0
- data/node_modules/async/until.js +61 -0
- data/node_modules/async/waterfall.js +105 -0
- data/node_modules/async/whilst.js +78 -0
- data/node_modules/async/wrapSync.js +118 -0
- data/node_modules/at-least-node/LICENSE +6 -0
- data/node_modules/at-least-node/README.md +25 -0
- data/node_modules/at-least-node/index.js +5 -0
- data/node_modules/at-least-node/package.json +32 -0
- data/node_modules/balanced-match/LICENSE.md +21 -0
- data/node_modules/balanced-match/README.md +97 -0
- data/node_modules/balanced-match/index.js +62 -0
- data/node_modules/balanced-match/package.json +48 -0
- data/node_modules/binary-extensions/binary-extensions.json +260 -0
- data/node_modules/binary-extensions/binary-extensions.json.d.ts +3 -0
- data/node_modules/binary-extensions/index.d.ts +14 -0
- data/node_modules/binary-extensions/index.js +1 -0
- data/node_modules/binary-extensions/license +9 -0
- data/node_modules/binary-extensions/package.json +38 -0
- data/node_modules/binary-extensions/readme.md +41 -0
- data/node_modules/brace-expansion/LICENSE +21 -0
- data/node_modules/brace-expansion/README.md +129 -0
- data/node_modules/brace-expansion/index.js +201 -0
- data/node_modules/brace-expansion/package.json +47 -0
- data/node_modules/braces/CHANGELOG.md +184 -0
- data/node_modules/braces/LICENSE +21 -0
- data/node_modules/braces/README.md +593 -0
- data/node_modules/braces/index.js +170 -0
- data/node_modules/braces/lib/compile.js +57 -0
- data/node_modules/braces/lib/constants.js +57 -0
- data/node_modules/braces/lib/expand.js +113 -0
- data/node_modules/braces/lib/parse.js +333 -0
- data/node_modules/braces/lib/stringify.js +32 -0
- data/node_modules/braces/lib/utils.js +112 -0
- data/node_modules/braces/package.json +77 -0
- data/node_modules/chokidar/LICENSE +21 -0
- data/node_modules/chokidar/README.md +308 -0
- data/node_modules/chokidar/index.js +973 -0
- data/node_modules/chokidar/lib/constants.js +65 -0
- data/node_modules/chokidar/lib/fsevents-handler.js +524 -0
- data/node_modules/chokidar/lib/nodefs-handler.js +646 -0
- data/node_modules/chokidar/package.json +78 -0
- data/node_modules/chokidar/types/index.d.ts +187 -0
- data/node_modules/cli-progress/CHANGES.md +169 -0
- data/node_modules/cli-progress/LICENSE.md +24 -0
- data/node_modules/cli-progress/README.md +446 -0
- data/node_modules/cli-progress/cli-progress.js +21 -0
- data/node_modules/cli-progress/lib/eta.js +73 -0
- data/node_modules/cli-progress/lib/format-bar.js +11 -0
- data/node_modules/cli-progress/lib/format-time.js +34 -0
- data/node_modules/cli-progress/lib/format-value.js +22 -0
- data/node_modules/cli-progress/lib/formatter.js +80 -0
- data/node_modules/cli-progress/lib/generic-bar.js +212 -0
- data/node_modules/cli-progress/lib/multi-bar.js +201 -0
- data/node_modules/cli-progress/lib/options.js +95 -0
- data/node_modules/cli-progress/lib/single-bar.js +124 -0
- data/node_modules/cli-progress/lib/terminal.js +159 -0
- data/node_modules/cli-progress/package.json +46 -0
- data/node_modules/cli-progress/presets/index.js +11 -0
- data/node_modules/cli-progress/presets/legacy.js +6 -0
- data/node_modules/cli-progress/presets/rect.js +5 -0
- data/node_modules/cli-progress/presets/shades-classic.js +6 -0
- data/node_modules/cli-progress/presets/shades-grey.js +8 -0
- data/node_modules/cliui/CHANGELOG.md +121 -0
- data/node_modules/cliui/LICENSE.txt +14 -0
- data/node_modules/cliui/README.md +141 -0
- data/node_modules/cliui/build/index.cjs +302 -0
- data/node_modules/cliui/build/lib/index.js +287 -0
- data/node_modules/cliui/build/lib/string-utils.js +27 -0
- data/node_modules/cliui/index.mjs +13 -0
- data/node_modules/cliui/package.json +83 -0
- data/node_modules/color-convert/CHANGELOG.md +54 -0
- data/node_modules/color-convert/LICENSE +21 -0
- data/node_modules/color-convert/README.md +68 -0
- data/node_modules/color-convert/conversions.js +839 -0
- data/node_modules/color-convert/index.js +81 -0
- data/node_modules/color-convert/package.json +48 -0
- data/node_modules/color-convert/route.js +97 -0
- data/node_modules/color-name/LICENSE +8 -0
- data/node_modules/color-name/README.md +11 -0
- data/node_modules/color-name/index.js +152 -0
- data/node_modules/color-name/package.json +28 -0
- data/node_modules/colors/LICENSE +25 -0
- data/node_modules/colors/README.md +221 -0
- data/node_modules/colors/examples/normal-usage.js +82 -0
- data/node_modules/colors/examples/safe-string.js +79 -0
- data/node_modules/colors/index.d.ts +136 -0
- data/node_modules/colors/lib/colors.js +211 -0
- data/node_modules/colors/lib/custom/trap.js +46 -0
- data/node_modules/colors/lib/custom/zalgo.js +110 -0
- data/node_modules/colors/lib/extendStringPrototype.js +110 -0
- data/node_modules/colors/lib/index.js +13 -0
- data/node_modules/colors/lib/maps/america.js +10 -0
- data/node_modules/colors/lib/maps/rainbow.js +12 -0
- data/node_modules/colors/lib/maps/random.js +11 -0
- data/node_modules/colors/lib/maps/zebra.js +5 -0
- data/node_modules/colors/lib/styles.js +95 -0
- data/node_modules/colors/lib/system/has-flag.js +35 -0
- data/node_modules/colors/lib/system/supports-colors.js +151 -0
- data/node_modules/colors/package.json +45 -0
- data/node_modules/colors/safe.d.ts +48 -0
- data/node_modules/colors/safe.js +10 -0
- data/node_modules/colors/themes/generic-logging.js +12 -0
- data/node_modules/concat-map/LICENSE +18 -0
- data/node_modules/concat-map/README.markdown +62 -0
- data/node_modules/concat-map/example/map.js +6 -0
- data/node_modules/concat-map/index.js +13 -0
- data/node_modules/concat-map/package.json +43 -0
- data/node_modules/concat-map/test/map.js +39 -0
- data/node_modules/console-table-printer/CHANGELOG.md +96 -0
- data/node_modules/console-table-printer/LICENSE +21 -0
- data/node_modules/console-table-printer/README.md +180 -0
- data/node_modules/console-table-printer/dist/index.d.ts +4 -0
- data/node_modules/console-table-printer/dist/index.js +10 -0
- data/node_modules/console-table-printer/dist/src/console-table-printer.d.ts +14 -0
- data/node_modules/console-table-printer/dist/src/console-table-printer.js +32 -0
- data/node_modules/console-table-printer/dist/src/internalTable/input-converter.d.ts +6 -0
- data/node_modules/console-table-printer/dist/src/internalTable/input-converter.js +15 -0
- data/node_modules/console-table-printer/dist/src/internalTable/internal-table-printer.d.ts +4 -0
- data/node_modules/console-table-printer/dist/src/internalTable/internal-table-printer.js +115 -0
- data/node_modules/console-table-printer/dist/src/internalTable/internal-table.d.ts +25 -0
- data/node_modules/console-table-printer/dist/src/internalTable/internal-table.js +80 -0
- data/node_modules/console-table-printer/dist/src/internalTable/table-pre-processors.d.ts +3 -0
- data/node_modules/console-table-printer/dist/src/internalTable/table-pre-processors.js +43 -0
- data/node_modules/console-table-printer/dist/src/models/common.d.ts +10 -0
- data/node_modules/console-table-printer/dist/src/models/common.js +2 -0
- data/node_modules/console-table-printer/dist/src/models/external-table.d.ts +26 -0
- data/node_modules/console-table-printer/dist/src/models/external-table.js +2 -0
- data/node_modules/console-table-printer/dist/src/models/internal-table.d.ts +21 -0
- data/node_modules/console-table-printer/dist/src/models/internal-table.js +2 -0
- data/node_modules/console-table-printer/dist/src/utils/colored-console-line.d.ts +8 -0
- data/node_modules/console-table-printer/dist/src/utils/colored-console-line.js +29 -0
- data/node_modules/console-table-printer/dist/src/utils/console-utils.d.ts +2 -0
- data/node_modules/console-table-printer/dist/src/utils/console-utils.js +8 -0
- data/node_modules/console-table-printer/dist/src/utils/string-utils.d.ts +4 -0
- data/node_modules/console-table-printer/dist/src/utils/string-utils.js +54 -0
- data/node_modules/console-table-printer/dist/src/utils/table-constants.d.ts +10 -0
- data/node_modules/console-table-printer/dist/src/utils/table-constants.js +49 -0
- data/node_modules/console-table-printer/dist/src/utils/table-helpers.d.ts +26 -0
- data/node_modules/console-table-printer/dist/src/utils/table-helpers.js +91 -0
- data/node_modules/console-table-printer/package.json +51 -0
- data/node_modules/cross-env/CHANGELOG.md +5 -0
- data/node_modules/cross-env/LICENSE +20 -0
- data/node_modules/cross-env/README.md +291 -0
- data/node_modules/cross-env/package.json +54 -0
- data/node_modules/cross-env/src/bin/cross-env-shell.js +5 -0
- data/node_modules/cross-env/src/bin/cross-env.js +5 -0
- data/node_modules/cross-env/src/command.js +32 -0
- data/node_modules/cross-env/src/index.js +95 -0
- data/node_modules/cross-env/src/is-windows.js +2 -0
- data/node_modules/cross-env/src/variable.js +69 -0
- data/node_modules/cross-spawn/CHANGELOG.md +130 -0
- data/node_modules/cross-spawn/LICENSE +21 -0
- data/node_modules/cross-spawn/README.md +96 -0
- data/node_modules/cross-spawn/index.js +39 -0
- data/node_modules/cross-spawn/lib/enoent.js +59 -0
- data/node_modules/cross-spawn/lib/parse.js +91 -0
- data/node_modules/cross-spawn/lib/util/escape.js +45 -0
- data/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
- data/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
- data/node_modules/cross-spawn/package.json +73 -0
- data/node_modules/crypto-js/CONTRIBUTING.md +28 -0
- data/node_modules/crypto-js/LICENSE +24 -0
- data/node_modules/crypto-js/README.md +249 -0
- data/node_modules/crypto-js/aes.js +234 -0
- data/node_modules/crypto-js/bower.json +35 -0
- data/node_modules/crypto-js/cipher-core.js +890 -0
- data/node_modules/crypto-js/core.js +797 -0
- data/node_modules/crypto-js/crypto-js.js +6059 -0
- data/node_modules/crypto-js/docs/QuickStartGuide.wiki +470 -0
- data/node_modules/crypto-js/enc-base64.js +136 -0
- data/node_modules/crypto-js/enc-hex.js +18 -0
- data/node_modules/crypto-js/enc-latin1.js +18 -0
- data/node_modules/crypto-js/enc-utf16.js +149 -0
- data/node_modules/crypto-js/enc-utf8.js +18 -0
- data/node_modules/crypto-js/evpkdf.js +134 -0
- data/node_modules/crypto-js/format-hex.js +66 -0
- data/node_modules/crypto-js/format-openssl.js +18 -0
- data/node_modules/crypto-js/hmac-md5.js +18 -0
- data/node_modules/crypto-js/hmac-ripemd160.js +18 -0
- data/node_modules/crypto-js/hmac-sha1.js +18 -0
- data/node_modules/crypto-js/hmac-sha224.js +18 -0
- data/node_modules/crypto-js/hmac-sha256.js +18 -0
- data/node_modules/crypto-js/hmac-sha3.js +18 -0
- data/node_modules/crypto-js/hmac-sha384.js +18 -0
- data/node_modules/crypto-js/hmac-sha512.js +18 -0
- data/node_modules/crypto-js/hmac.js +143 -0
- data/node_modules/crypto-js/index.js +18 -0
- data/node_modules/crypto-js/lib-typedarrays.js +76 -0
- data/node_modules/crypto-js/md5.js +268 -0
- data/node_modules/crypto-js/mode-cfb.js +80 -0
- data/node_modules/crypto-js/mode-ctr-gladman.js +116 -0
- data/node_modules/crypto-js/mode-ctr.js +58 -0
- data/node_modules/crypto-js/mode-ecb.js +40 -0
- data/node_modules/crypto-js/mode-ofb.js +54 -0
- data/node_modules/crypto-js/package.json +38 -0
- data/node_modules/crypto-js/pad-ansix923.js +49 -0
- data/node_modules/crypto-js/pad-iso10126.js +44 -0
- data/node_modules/crypto-js/pad-iso97971.js +40 -0
- data/node_modules/crypto-js/pad-nopadding.js +30 -0
- data/node_modules/crypto-js/pad-pkcs7.js +18 -0
- data/node_modules/crypto-js/pad-zeropadding.js +47 -0
- data/node_modules/crypto-js/pbkdf2.js +145 -0
- data/node_modules/crypto-js/rabbit-legacy.js +190 -0
- data/node_modules/crypto-js/rabbit.js +192 -0
- data/node_modules/crypto-js/rc4.js +139 -0
- data/node_modules/crypto-js/ripemd160.js +267 -0
- data/node_modules/crypto-js/sha1.js +150 -0
- data/node_modules/crypto-js/sha224.js +80 -0
- data/node_modules/crypto-js/sha256.js +199 -0
- data/node_modules/crypto-js/sha3.js +326 -0
- data/node_modules/crypto-js/sha384.js +83 -0
- data/node_modules/crypto-js/sha512.js +326 -0
- data/node_modules/crypto-js/tripledes.js +779 -0
- data/node_modules/crypto-js/x64-core.js +304 -0
- data/node_modules/diff/CONTRIBUTING.md +39 -0
- data/node_modules/diff/LICENSE +31 -0
- data/node_modules/diff/README.md +208 -0
- data/node_modules/diff/dist/diff.js +1582 -0
- data/node_modules/diff/lib/convert/dmp.js +32 -0
- data/node_modules/diff/lib/convert/xml.js +42 -0
- data/node_modules/diff/lib/diff/array.js +45 -0
- data/node_modules/diff/lib/diff/base.js +304 -0
- data/node_modules/diff/lib/diff/character.js +37 -0
- data/node_modules/diff/lib/diff/css.js +41 -0
- data/node_modules/diff/lib/diff/json.js +163 -0
- data/node_modules/diff/lib/diff/line.js +89 -0
- data/node_modules/diff/lib/diff/sentence.js +41 -0
- data/node_modules/diff/lib/diff/word.js +108 -0
- data/node_modules/diff/lib/index.es6.js +1553 -0
- data/node_modules/diff/lib/index.js +216 -0
- data/node_modules/diff/lib/index.mjs +1553 -0
- data/node_modules/diff/lib/patch/apply.js +238 -0
- data/node_modules/diff/lib/patch/create.js +267 -0
- data/node_modules/diff/lib/patch/merge.js +613 -0
- data/node_modules/diff/lib/patch/parse.js +167 -0
- data/node_modules/diff/lib/util/array.js +32 -0
- data/node_modules/diff/lib/util/distance-iterator.js +57 -0
- data/node_modules/diff/lib/util/params.js +24 -0
- data/node_modules/diff/package.json +87 -0
- data/node_modules/diff/release-notes.md +303 -0
- data/node_modules/diff/runtime.js +3 -0
- data/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
- data/node_modules/emoji-regex/README.md +73 -0
- data/node_modules/emoji-regex/es2015/index.js +6 -0
- data/node_modules/emoji-regex/es2015/text.js +6 -0
- data/node_modules/emoji-regex/index.d.ts +23 -0
- data/node_modules/emoji-regex/index.js +6 -0
- data/node_modules/emoji-regex/package.json +50 -0
- data/node_modules/emoji-regex/text.js +6 -0
- data/node_modules/escalade/dist/index.js +22 -0
- data/node_modules/escalade/dist/index.mjs +22 -0
- data/node_modules/escalade/index.d.ts +3 -0
- data/node_modules/escalade/license +9 -0
- data/node_modules/escalade/package.json +61 -0
- data/node_modules/escalade/readme.md +211 -0
- data/node_modules/escalade/sync/index.d.ts +2 -0
- data/node_modules/escalade/sync/index.js +18 -0
- data/node_modules/escalade/sync/index.mjs +18 -0
- data/node_modules/esprima/ChangeLog +235 -0
- data/node_modules/esprima/LICENSE.BSD +21 -0
- data/node_modules/esprima/README.md +46 -0
- data/node_modules/esprima/bin/esparse.js +139 -0
- data/node_modules/esprima/bin/esvalidate.js +236 -0
- data/node_modules/esprima/dist/esprima.js +6709 -0
- data/node_modules/esprima/package.json +112 -0
- data/node_modules/fill-range/LICENSE +21 -0
- data/node_modules/fill-range/README.md +237 -0
- data/node_modules/fill-range/index.js +249 -0
- data/node_modules/fill-range/package.json +69 -0
- data/node_modules/fs-extra/CHANGELOG.md +902 -0
- data/node_modules/fs-extra/LICENSE +15 -0
- data/node_modules/fs-extra/README.md +264 -0
- data/node_modules/fs-extra/lib/copy-sync/copy-sync.js +166 -0
- data/node_modules/fs-extra/lib/copy-sync/index.js +5 -0
- data/node_modules/fs-extra/lib/copy/copy.js +232 -0
- data/node_modules/fs-extra/lib/copy/index.js +6 -0
- data/node_modules/fs-extra/lib/empty/index.js +48 -0
- data/node_modules/fs-extra/lib/ensure/file.js +69 -0
- data/node_modules/fs-extra/lib/ensure/index.js +23 -0
- data/node_modules/fs-extra/lib/ensure/link.js +61 -0
- data/node_modules/fs-extra/lib/ensure/symlink-paths.js +99 -0
- data/node_modules/fs-extra/lib/ensure/symlink-type.js +31 -0
- data/node_modules/fs-extra/lib/ensure/symlink.js +63 -0
- data/node_modules/fs-extra/lib/fs/index.js +130 -0
- data/node_modules/fs-extra/lib/index.js +27 -0
- data/node_modules/fs-extra/lib/json/index.js +16 -0
- data/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
- data/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
- data/node_modules/fs-extra/lib/json/output-json.js +12 -0
- data/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
- data/node_modules/fs-extra/lib/mkdirs/make-dir.js +141 -0
- data/node_modules/fs-extra/lib/move-sync/index.js +5 -0
- data/node_modules/fs-extra/lib/move-sync/move-sync.js +47 -0
- data/node_modules/fs-extra/lib/move/index.js +6 -0
- data/node_modules/fs-extra/lib/move/move.js +65 -0
- data/node_modules/fs-extra/lib/output/index.js +40 -0
- data/node_modules/fs-extra/lib/path-exists/index.js +12 -0
- data/node_modules/fs-extra/lib/remove/index.js +9 -0
- data/node_modules/fs-extra/lib/remove/rimraf.js +302 -0
- data/node_modules/fs-extra/lib/util/stat.js +139 -0
- data/node_modules/fs-extra/lib/util/utimes.js +26 -0
- data/node_modules/fs-extra/package.json +70 -0
- data/node_modules/fs.realpath/LICENSE +43 -0
- data/node_modules/fs.realpath/README.md +33 -0
- data/node_modules/fs.realpath/index.js +66 -0
- data/node_modules/fs.realpath/old.js +303 -0
- data/node_modules/fs.realpath/package.json +26 -0
- data/node_modules/fsevents/LICENSE +22 -0
- data/node_modules/fsevents/README.md +83 -0
- data/node_modules/fsevents/fsevents.d.ts +46 -0
- data/node_modules/fsevents/fsevents.js +82 -0
- data/node_modules/fsevents/fsevents.node +0 -0
- data/node_modules/fsevents/package.json +62 -0
- data/node_modules/get-caller-file/LICENSE.md +6 -0
- data/node_modules/get-caller-file/README.md +41 -0
- data/node_modules/get-caller-file/index.d.ts +2 -0
- data/node_modules/get-caller-file/index.js +22 -0
- data/node_modules/get-caller-file/index.js.map +1 -0
- data/node_modules/get-caller-file/package.json +42 -0
- data/node_modules/glob-parent/CHANGELOG.md +110 -0
- data/node_modules/glob-parent/LICENSE +15 -0
- data/node_modules/glob-parent/README.md +137 -0
- data/node_modules/glob-parent/index.js +42 -0
- data/node_modules/glob-parent/package.json +48 -0
- data/node_modules/glob/LICENSE +21 -0
- data/node_modules/glob/README.md +375 -0
- data/node_modules/glob/changelog.md +67 -0
- data/node_modules/glob/common.js +234 -0
- data/node_modules/glob/glob.js +788 -0
- data/node_modules/glob/package.json +51 -0
- data/node_modules/glob/sync.js +484 -0
- data/node_modules/graceful-fs/LICENSE +15 -0
- data/node_modules/graceful-fs/README.md +133 -0
- data/node_modules/graceful-fs/clone.js +23 -0
- data/node_modules/graceful-fs/graceful-fs.js +373 -0
- data/node_modules/graceful-fs/legacy-streams.js +118 -0
- data/node_modules/graceful-fs/package.json +50 -0
- data/node_modules/graceful-fs/polyfills.js +346 -0
- data/node_modules/inflight/LICENSE +15 -0
- data/node_modules/inflight/README.md +37 -0
- data/node_modules/inflight/inflight.js +54 -0
- data/node_modules/inflight/package.json +29 -0
- data/node_modules/inherits/LICENSE +16 -0
- data/node_modules/inherits/README.md +42 -0
- data/node_modules/inherits/inherits.js +9 -0
- data/node_modules/inherits/inherits_browser.js +27 -0
- data/node_modules/inherits/package.json +29 -0
- data/node_modules/is-binary-path/index.d.ts +17 -0
- data/node_modules/is-binary-path/index.js +7 -0
- data/node_modules/is-binary-path/license +9 -0
- data/node_modules/is-binary-path/package.json +40 -0
- data/node_modules/is-binary-path/readme.md +34 -0
- data/node_modules/is-extglob/LICENSE +21 -0
- data/node_modules/is-extglob/README.md +107 -0
- data/node_modules/is-extglob/index.js +20 -0
- data/node_modules/is-extglob/package.json +69 -0
- data/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- data/node_modules/is-fullwidth-code-point/index.js +50 -0
- data/node_modules/is-fullwidth-code-point/license +9 -0
- data/node_modules/is-fullwidth-code-point/package.json +42 -0
- data/node_modules/is-fullwidth-code-point/readme.md +39 -0
- data/node_modules/is-glob/LICENSE +21 -0
- data/node_modules/is-glob/README.md +206 -0
- data/node_modules/is-glob/index.js +48 -0
- data/node_modules/is-glob/package.json +81 -0
- data/node_modules/is-number/LICENSE +21 -0
- data/node_modules/is-number/README.md +187 -0
- data/node_modules/is-number/index.js +18 -0
- data/node_modules/is-number/package.json +82 -0
- data/node_modules/isexe/LICENSE +15 -0
- data/node_modules/isexe/README.md +51 -0
- data/node_modules/isexe/index.js +57 -0
- data/node_modules/isexe/mode.js +41 -0
- data/node_modules/isexe/package.json +31 -0
- data/node_modules/isexe/test/basic.js +221 -0
- data/node_modules/isexe/windows.js +42 -0
- data/node_modules/js-yaml/CHANGELOG.md +557 -0
- data/node_modules/js-yaml/LICENSE +21 -0
- data/node_modules/js-yaml/README.md +299 -0
- data/node_modules/js-yaml/bin/js-yaml.js +132 -0
- data/node_modules/js-yaml/dist/js-yaml.js +3989 -0
- data/node_modules/js-yaml/dist/js-yaml.min.js +1 -0
- data/node_modules/js-yaml/index.js +7 -0
- data/node_modules/js-yaml/lib/js-yaml.js +39 -0
- data/node_modules/js-yaml/lib/js-yaml/common.js +59 -0
- data/node_modules/js-yaml/lib/js-yaml/dumper.js +850 -0
- data/node_modules/js-yaml/lib/js-yaml/exception.js +43 -0
- data/node_modules/js-yaml/lib/js-yaml/loader.js +1644 -0
- data/node_modules/js-yaml/lib/js-yaml/mark.js +76 -0
- data/node_modules/js-yaml/lib/js-yaml/schema.js +108 -0
- data/node_modules/js-yaml/lib/js-yaml/schema/core.js +18 -0
- data/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +25 -0
- data/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +28 -0
- data/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +17 -0
- data/node_modules/js-yaml/lib/js-yaml/schema/json.js +25 -0
- data/node_modules/js-yaml/lib/js-yaml/type.js +61 -0
- data/node_modules/js-yaml/lib/js-yaml/type/binary.js +138 -0
- data/node_modules/js-yaml/lib/js-yaml/type/bool.js +35 -0
- data/node_modules/js-yaml/lib/js-yaml/type/float.js +116 -0
- data/node_modules/js-yaml/lib/js-yaml/type/int.js +173 -0
- data/node_modules/js-yaml/lib/js-yaml/type/js/function.js +93 -0
- data/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +60 -0
- data/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +28 -0
- data/node_modules/js-yaml/lib/js-yaml/type/map.js +8 -0
- data/node_modules/js-yaml/lib/js-yaml/type/merge.js +12 -0
- data/node_modules/js-yaml/lib/js-yaml/type/null.js +34 -0
- data/node_modules/js-yaml/lib/js-yaml/type/omap.js +44 -0
- data/node_modules/js-yaml/lib/js-yaml/type/pairs.js +53 -0
- data/node_modules/js-yaml/lib/js-yaml/type/seq.js +8 -0
- data/node_modules/js-yaml/lib/js-yaml/type/set.js +29 -0
- data/node_modules/js-yaml/lib/js-yaml/type/str.js +8 -0
- data/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +88 -0
- data/node_modules/js-yaml/package.json +49 -0
- data/node_modules/jsonfile/CHANGELOG.md +171 -0
- data/node_modules/jsonfile/LICENSE +15 -0
- data/node_modules/jsonfile/README.md +230 -0
- data/node_modules/jsonfile/index.js +88 -0
- data/node_modules/jsonfile/package.json +40 -0
- data/node_modules/jsonfile/utils.js +14 -0
- data/node_modules/lru-cache/LICENSE +15 -0
- data/node_modules/lru-cache/README.md +166 -0
- data/node_modules/lru-cache/index.js +334 -0
- data/node_modules/lru-cache/package.json +34 -0
- data/node_modules/minimatch/LICENSE +15 -0
- data/node_modules/minimatch/README.md +209 -0
- data/node_modules/minimatch/minimatch.js +923 -0
- data/node_modules/minimatch/package.json +30 -0
- data/node_modules/normalize-path/LICENSE +21 -0
- data/node_modules/normalize-path/README.md +127 -0
- data/node_modules/normalize-path/index.js +35 -0
- data/node_modules/normalize-path/package.json +77 -0
- data/node_modules/once/LICENSE +15 -0
- data/node_modules/once/README.md +79 -0
- data/node_modules/once/once.js +42 -0
- data/node_modules/once/package.json +33 -0
- data/node_modules/path-is-absolute/index.js +20 -0
- data/node_modules/path-is-absolute/license +21 -0
- data/node_modules/path-is-absolute/package.json +43 -0
- data/node_modules/path-is-absolute/readme.md +59 -0
- data/node_modules/path-key/index.d.ts +40 -0
- data/node_modules/path-key/index.js +16 -0
- data/node_modules/path-key/license +9 -0
- data/node_modules/path-key/package.json +39 -0
- data/node_modules/path-key/readme.md +61 -0
- data/node_modules/picomatch/CHANGELOG.md +126 -0
- data/node_modules/picomatch/LICENSE +21 -0
- data/node_modules/picomatch/README.md +707 -0
- data/node_modules/picomatch/index.js +3 -0
- data/node_modules/picomatch/lib/constants.js +179 -0
- data/node_modules/picomatch/lib/parse.js +1084 -0
- data/node_modules/picomatch/lib/picomatch.js +342 -0
- data/node_modules/picomatch/lib/scan.js +391 -0
- data/node_modules/picomatch/lib/utils.js +64 -0
- data/node_modules/picomatch/package.json +81 -0
- data/node_modules/readdirp/LICENSE +21 -0
- data/node_modules/readdirp/README.md +122 -0
- data/node_modules/readdirp/index.d.ts +43 -0
- data/node_modules/readdirp/index.js +287 -0
- data/node_modules/readdirp/package.json +122 -0
- data/node_modules/require-directory/LICENSE +22 -0
- data/node_modules/require-directory/README.markdown +184 -0
- data/node_modules/require-directory/index.js +86 -0
- data/node_modules/require-directory/package.json +40 -0
- data/node_modules/semver/CHANGELOG.md +111 -0
- data/node_modules/semver/LICENSE +15 -0
- data/node_modules/semver/README.md +566 -0
- data/node_modules/semver/bin/semver.js +173 -0
- data/node_modules/semver/classes/comparator.js +135 -0
- data/node_modules/semver/classes/index.js +5 -0
- data/node_modules/semver/classes/range.js +510 -0
- data/node_modules/semver/classes/semver.js +287 -0
- data/node_modules/semver/functions/clean.js +6 -0
- data/node_modules/semver/functions/cmp.js +48 -0
- data/node_modules/semver/functions/coerce.js +51 -0
- data/node_modules/semver/functions/compare-build.js +7 -0
- data/node_modules/semver/functions/compare-loose.js +3 -0
- data/node_modules/semver/functions/compare.js +5 -0
- data/node_modules/semver/functions/diff.js +23 -0
- data/node_modules/semver/functions/eq.js +3 -0
- data/node_modules/semver/functions/gt.js +3 -0
- data/node_modules/semver/functions/gte.js +3 -0
- data/node_modules/semver/functions/inc.js +15 -0
- data/node_modules/semver/functions/lt.js +3 -0
- data/node_modules/semver/functions/lte.js +3 -0
- data/node_modules/semver/functions/major.js +3 -0
- data/node_modules/semver/functions/minor.js +3 -0
- data/node_modules/semver/functions/neq.js +3 -0
- data/node_modules/semver/functions/parse.js +33 -0
- data/node_modules/semver/functions/patch.js +3 -0
- data/node_modules/semver/functions/prerelease.js +6 -0
- data/node_modules/semver/functions/rcompare.js +3 -0
- data/node_modules/semver/functions/rsort.js +3 -0
- data/node_modules/semver/functions/satisfies.js +10 -0
- data/node_modules/semver/functions/sort.js +3 -0
- data/node_modules/semver/functions/valid.js +6 -0
- data/node_modules/semver/index.js +48 -0
- data/node_modules/semver/internal/constants.js +17 -0
- data/node_modules/semver/internal/debug.js +9 -0
- data/node_modules/semver/internal/identifiers.js +23 -0
- data/node_modules/semver/internal/parse-options.js +11 -0
- data/node_modules/semver/internal/re.js +182 -0
- data/node_modules/semver/package.json +41 -0
- data/node_modules/semver/preload.js +2 -0
- data/node_modules/semver/range.bnf +16 -0
- data/node_modules/semver/ranges/gtr.js +4 -0
- data/node_modules/semver/ranges/intersects.js +7 -0
- data/node_modules/semver/ranges/ltr.js +4 -0
- data/node_modules/semver/ranges/max-satisfying.js +25 -0
- data/node_modules/semver/ranges/min-satisfying.js +24 -0
- data/node_modules/semver/ranges/min-version.js +60 -0
- data/node_modules/semver/ranges/outside.js +80 -0
- data/node_modules/semver/ranges/simplify.js +44 -0
- data/node_modules/semver/ranges/subset.js +222 -0
- data/node_modules/semver/ranges/to-comparators.js +8 -0
- data/node_modules/semver/ranges/valid.js +11 -0
- data/node_modules/shebang-command/index.js +19 -0
- data/node_modules/shebang-command/license +9 -0
- data/node_modules/shebang-command/package.json +34 -0
- data/node_modules/shebang-command/readme.md +34 -0
- data/node_modules/shebang-regex/index.d.ts +22 -0
- data/node_modules/shebang-regex/index.js +2 -0
- data/node_modules/shebang-regex/license +9 -0
- data/node_modules/shebang-regex/package.json +35 -0
- data/node_modules/shebang-regex/readme.md +33 -0
- data/node_modules/simple-wcswidth/CHANGELOG.md +13 -0
- data/node_modules/simple-wcswidth/LICENSE +21 -0
- data/node_modules/simple-wcswidth/README.md +100 -0
- data/node_modules/simple-wcswidth/dist/index.d.ts +3 -0
- data/node_modules/simple-wcswidth/dist/index.js +10 -0
- data/node_modules/simple-wcswidth/dist/src/binary-search.d.ts +3 -0
- data/node_modules/simple-wcswidth/dist/src/binary-search.js +24 -0
- data/node_modules/simple-wcswidth/dist/src/models.d.ts +4 -0
- data/node_modules/simple-wcswidth/dist/src/models.js +2 -0
- data/node_modules/simple-wcswidth/dist/src/non-spacing-chars.d.ts +3 -0
- data/node_modules/simple-wcswidth/dist/src/non-spacing-chars.js +149 -0
- data/node_modules/simple-wcswidth/dist/src/wcswidth.d.ts +2 -0
- data/node_modules/simple-wcswidth/dist/src/wcswidth.js +20 -0
- data/node_modules/simple-wcswidth/dist/src/wcwidth.d.ts +2 -0
- data/node_modules/simple-wcswidth/dist/src/wcwidth.js +67 -0
- data/node_modules/simple-wcswidth/package.json +44 -0
- data/node_modules/slash/index.d.ts +25 -0
- data/node_modules/slash/index.js +11 -0
- data/node_modules/slash/license +9 -0
- data/node_modules/slash/package.json +35 -0
- data/node_modules/slash/readme.md +44 -0
- data/node_modules/sprintf-js/LICENSE +24 -0
- data/node_modules/sprintf-js/README.md +88 -0
- data/node_modules/sprintf-js/bower.json +14 -0
- data/node_modules/sprintf-js/demo/angular.html +20 -0
- data/node_modules/sprintf-js/dist/angular-sprintf.min.js +4 -0
- data/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +1 -0
- data/node_modules/sprintf-js/dist/angular-sprintf.min.map +1 -0
- data/node_modules/sprintf-js/dist/sprintf.min.js +4 -0
- data/node_modules/sprintf-js/dist/sprintf.min.js.map +1 -0
- data/node_modules/sprintf-js/dist/sprintf.min.map +1 -0
- data/node_modules/sprintf-js/gruntfile.js +36 -0
- data/node_modules/sprintf-js/package.json +22 -0
- data/node_modules/sprintf-js/src/angular-sprintf.js +18 -0
- data/node_modules/sprintf-js/src/sprintf.js +208 -0
- data/node_modules/sprintf-js/test/test.js +82 -0
- data/node_modules/sqlite-parser/CHANGELOG.md +1263 -0
- data/node_modules/sqlite-parser/LICENSE +22 -0
- data/node_modules/sqlite-parser/README.md +187 -0
- data/node_modules/sqlite-parser/bin/sqlite-parser +7 -0
- data/node_modules/sqlite-parser/dist/sqlite-parser.js +19 -0
- data/node_modules/sqlite-parser/lib/index.js +6 -0
- data/node_modules/sqlite-parser/lib/parser.js +6 -0
- data/node_modules/sqlite-parser/lib/streaming-shim.js +6 -0
- data/node_modules/sqlite-parser/lib/streaming.js +6 -0
- data/node_modules/sqlite-parser/lib/tracer.js +6 -0
- data/node_modules/sqlite-parser/package.json +75 -0
- data/node_modules/string-width/index.d.ts +29 -0
- data/node_modules/string-width/index.js +47 -0
- data/node_modules/string-width/license +9 -0
- data/node_modules/string-width/package.json +56 -0
- data/node_modules/string-width/readme.md +50 -0
- data/node_modules/strip-ansi/index.d.ts +17 -0
- data/node_modules/strip-ansi/index.js +4 -0
- data/node_modules/strip-ansi/license +9 -0
- data/node_modules/strip-ansi/package.json +54 -0
- data/node_modules/strip-ansi/readme.md +46 -0
- data/node_modules/to-regex-range/LICENSE +21 -0
- data/node_modules/to-regex-range/README.md +305 -0
- data/node_modules/to-regex-range/index.js +288 -0
- data/node_modules/to-regex-range/package.json +88 -0
- data/node_modules/universalify/LICENSE +20 -0
- data/node_modules/universalify/README.md +76 -0
- data/node_modules/universalify/index.js +24 -0
- data/node_modules/universalify/package.json +34 -0
- data/node_modules/which/CHANGELOG.md +166 -0
- data/node_modules/which/LICENSE +15 -0
- data/node_modules/which/README.md +54 -0
- data/node_modules/which/bin/node-which +52 -0
- data/node_modules/which/package.json +43 -0
- data/node_modules/which/which.js +125 -0
- data/node_modules/wrap-ansi/index.js +216 -0
- data/node_modules/wrap-ansi/license +9 -0
- data/node_modules/wrap-ansi/package.json +62 -0
- data/node_modules/wrap-ansi/readme.md +91 -0
- data/node_modules/wrappy/LICENSE +15 -0
- data/node_modules/wrappy/README.md +36 -0
- data/node_modules/wrappy/package.json +29 -0
- data/node_modules/wrappy/wrappy.js +33 -0
- data/node_modules/y18n/CHANGELOG.md +100 -0
- data/node_modules/y18n/LICENSE +13 -0
- data/node_modules/y18n/README.md +127 -0
- data/node_modules/y18n/build/index.cjs +203 -0
- data/node_modules/y18n/build/lib/cjs.js +6 -0
- data/node_modules/y18n/build/lib/index.js +174 -0
- data/node_modules/y18n/build/lib/platform-shims/node.js +19 -0
- data/node_modules/y18n/index.mjs +8 -0
- data/node_modules/y18n/package.json +70 -0
- data/node_modules/yallist/LICENSE +15 -0
- data/node_modules/yallist/README.md +204 -0
- data/node_modules/yallist/iterator.js +8 -0
- data/node_modules/yallist/package.json +29 -0
- data/node_modules/yallist/yallist.js +426 -0
- data/node_modules/yargs-parser/CHANGELOG.md +263 -0
- data/node_modules/yargs-parser/LICENSE.txt +14 -0
- data/node_modules/yargs-parser/README.md +518 -0
- data/node_modules/yargs-parser/browser.js +29 -0
- data/node_modules/yargs-parser/build/index.cjs +1042 -0
- data/node_modules/yargs-parser/build/lib/index.js +59 -0
- data/node_modules/yargs-parser/build/lib/string-utils.js +65 -0
- data/node_modules/yargs-parser/build/lib/tokenize-arg-string.js +40 -0
- data/node_modules/yargs-parser/build/lib/yargs-parser-types.js +12 -0
- data/node_modules/yargs-parser/build/lib/yargs-parser.js +1037 -0
- data/node_modules/yargs-parser/package.json +87 -0
- data/node_modules/yargs/CHANGELOG.md +151 -0
- data/node_modules/yargs/LICENSE +21 -0
- data/node_modules/yargs/README.md +204 -0
- data/node_modules/yargs/browser.mjs +7 -0
- data/node_modules/yargs/build/index.cjs +1 -0
- data/node_modules/yargs/build/lib/argsert.js +62 -0
- data/node_modules/yargs/build/lib/command.js +436 -0
- data/node_modules/yargs/build/lib/completion-templates.js +48 -0
- data/node_modules/yargs/build/lib/completion.js +166 -0
- data/node_modules/yargs/build/lib/middleware.js +85 -0
- data/node_modules/yargs/build/lib/parse-command.js +32 -0
- data/node_modules/yargs/build/lib/typings/common-types.js +9 -0
- data/node_modules/yargs/build/lib/typings/yargs-parser-types.js +1 -0
- data/node_modules/yargs/build/lib/usage.js +567 -0
- data/node_modules/yargs/build/lib/utils/apply-extends.js +59 -0
- data/node_modules/yargs/build/lib/utils/is-promise.js +5 -0
- data/node_modules/yargs/build/lib/utils/levenshtein.js +26 -0
- data/node_modules/yargs/build/lib/utils/maybe-async-result.js +17 -0
- data/node_modules/yargs/build/lib/utils/obj-filter.js +10 -0
- data/node_modules/yargs/build/lib/utils/process-argv.js +17 -0
- data/node_modules/yargs/build/lib/utils/set-blocking.js +12 -0
- data/node_modules/yargs/build/lib/utils/which-module.js +10 -0
- data/node_modules/yargs/build/lib/validation.js +279 -0
- data/node_modules/yargs/build/lib/yargs-factory.js +1452 -0
- data/node_modules/yargs/build/lib/yerror.js +7 -0
- data/node_modules/yargs/helpers/helpers.mjs +10 -0
- data/node_modules/yargs/helpers/index.js +14 -0
- data/node_modules/yargs/helpers/package.json +3 -0
- data/node_modules/yargs/index.cjs +43 -0
- data/node_modules/yargs/index.mjs +8 -0
- data/node_modules/yargs/lib/platform-shims/browser.mjs +94 -0
- data/node_modules/yargs/lib/platform-shims/esm.mjs +67 -0
- data/node_modules/yargs/locales/be.json +46 -0
- data/node_modules/yargs/locales/de.json +46 -0
- data/node_modules/yargs/locales/en.json +51 -0
- data/node_modules/yargs/locales/es.json +46 -0
- data/node_modules/yargs/locales/fi.json +49 -0
- data/node_modules/yargs/locales/fr.json +53 -0
- data/node_modules/yargs/locales/hi.json +49 -0
- data/node_modules/yargs/locales/hu.json +46 -0
- data/node_modules/yargs/locales/id.json +50 -0
- data/node_modules/yargs/locales/it.json +46 -0
- data/node_modules/yargs/locales/ja.json +51 -0
- data/node_modules/yargs/locales/ko.json +49 -0
- data/node_modules/yargs/locales/nb.json +44 -0
- data/node_modules/yargs/locales/nl.json +49 -0
- data/node_modules/yargs/locales/nn.json +44 -0
- data/node_modules/yargs/locales/pirate.json +13 -0
- data/node_modules/yargs/locales/pl.json +49 -0
- data/node_modules/yargs/locales/pt.json +45 -0
- data/node_modules/yargs/locales/pt_BR.json +48 -0
- data/node_modules/yargs/locales/ru.json +46 -0
- data/node_modules/yargs/locales/th.json +46 -0
- data/node_modules/yargs/locales/tr.json +48 -0
- data/node_modules/yargs/locales/uk_UA.json +51 -0
- data/node_modules/yargs/locales/zh_CN.json +48 -0
- data/node_modules/yargs/locales/zh_TW.json +47 -0
- data/node_modules/yargs/package.json +116 -0
- data/node_modules/yargs/yargs +9 -0
- data/spec/fixtures/depends/revoke_api_key.appmap.json +3 -3
- data/spec/fixtures/depends/user_page_scenario.appmap.json +3 -3
- metadata +956 -7
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sprintf.min.js","sources":["../src/sprintf.js"],"names":["window","sprintf","key","arguments","cache","hasOwnProperty","parse","format","call","get_type","variable","Object","prototype","toString","slice","toLowerCase","str_repeat","input","multiplier","Array","join","re","not_string","number","json","not_json","text","modulo","placeholder","key_access","index_access","sign","parse_tree","argv","arg","i","k","match","pad","pad_character","pad_length","cursor","tree_length","length","node_type","output","is_positive","Error","test","isNaN","TypeError","String","fromCharCode","parseInt","JSON","stringify","toExponential","parseFloat","toFixed","substring","toUpperCase","replace","charAt","fmt","_fmt","arg_names","exec","SyntaxError","field_list","replacement_field","field_match","vsprintf","_argv","splice","apply","exports","define","amd","this"],"mappings":"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"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sprintf.min.js","sources":["../src/sprintf.js"],"names":["window","sprintf","key","arguments","cache","hasOwnProperty","parse","format","call","get_type","variable","Object","prototype","toString","slice","toLowerCase","str_repeat","input","multiplier","Array","join","re","not_string","number","json","not_json","text","modulo","placeholder","key_access","index_access","sign","parse_tree","argv","arg","i","k","match","pad","pad_character","pad_length","cursor","tree_length","length","node_type","output","is_positive","Error","test","isNaN","TypeError","String","fromCharCode","parseInt","JSON","stringify","toExponential","parseFloat","toFixed","toPrecision","substring","toUpperCase","replace","charAt","fmt","_fmt","arg_names","exec","SyntaxError","field_list","replacement_field","field_match","vsprintf","_argv","splice","apply","exports","define","amd","this"],"mappings":"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"}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module.exports = function(grunt) {
|
2
|
+
grunt.initConfig({
|
3
|
+
pkg: grunt.file.readJSON("package.json"),
|
4
|
+
|
5
|
+
uglify: {
|
6
|
+
options: {
|
7
|
+
banner: "/*! <%= pkg.name %> | <%= pkg.author %> | <%= pkg.license %> */\n",
|
8
|
+
sourceMap: true
|
9
|
+
},
|
10
|
+
build: {
|
11
|
+
files: [
|
12
|
+
{
|
13
|
+
src: "src/sprintf.js",
|
14
|
+
dest: "dist/sprintf.min.js"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
src: "src/angular-sprintf.js",
|
18
|
+
dest: "dist/angular-sprintf.min.js"
|
19
|
+
}
|
20
|
+
]
|
21
|
+
}
|
22
|
+
},
|
23
|
+
|
24
|
+
watch: {
|
25
|
+
js: {
|
26
|
+
files: "src/*.js",
|
27
|
+
tasks: ["uglify"]
|
28
|
+
}
|
29
|
+
}
|
30
|
+
})
|
31
|
+
|
32
|
+
grunt.loadNpmTasks("grunt-contrib-uglify")
|
33
|
+
grunt.loadNpmTasks("grunt-contrib-watch")
|
34
|
+
|
35
|
+
grunt.registerTask("default", ["uglify", "watch"])
|
36
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"name": "sprintf-js",
|
3
|
+
"version": "1.0.3",
|
4
|
+
"description": "JavaScript sprintf implementation",
|
5
|
+
"author": "Alexandru Marasteanu <hello@alexei.ro> (http://alexei.ro/)",
|
6
|
+
"main": "src/sprintf.js",
|
7
|
+
"scripts": {
|
8
|
+
"test": "mocha test/test.js"
|
9
|
+
},
|
10
|
+
"repository": {
|
11
|
+
"type": "git",
|
12
|
+
"url": "https://github.com/alexei/sprintf.js.git"
|
13
|
+
},
|
14
|
+
"license": "BSD-3-Clause",
|
15
|
+
"readmeFilename": "README.md",
|
16
|
+
"devDependencies": {
|
17
|
+
"mocha": "*",
|
18
|
+
"grunt": "*",
|
19
|
+
"grunt-contrib-watch": "*",
|
20
|
+
"grunt-contrib-uglify": "*"
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
angular.
|
2
|
+
module("sprintf", []).
|
3
|
+
filter("sprintf", function() {
|
4
|
+
return function() {
|
5
|
+
return sprintf.apply(null, arguments)
|
6
|
+
}
|
7
|
+
}).
|
8
|
+
filter("fmt", ["$filter", function($filter) {
|
9
|
+
return $filter("sprintf")
|
10
|
+
}]).
|
11
|
+
filter("vsprintf", function() {
|
12
|
+
return function(format, argv) {
|
13
|
+
return vsprintf(format, argv)
|
14
|
+
}
|
15
|
+
}).
|
16
|
+
filter("vfmt", ["$filter", function($filter) {
|
17
|
+
return $filter("vsprintf")
|
18
|
+
}])
|
@@ -0,0 +1,208 @@
|
|
1
|
+
(function(window) {
|
2
|
+
var re = {
|
3
|
+
not_string: /[^s]/,
|
4
|
+
number: /[diefg]/,
|
5
|
+
json: /[j]/,
|
6
|
+
not_json: /[^j]/,
|
7
|
+
text: /^[^\x25]+/,
|
8
|
+
modulo: /^\x25{2}/,
|
9
|
+
placeholder: /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,
|
10
|
+
key: /^([a-z_][a-z_\d]*)/i,
|
11
|
+
key_access: /^\.([a-z_][a-z_\d]*)/i,
|
12
|
+
index_access: /^\[(\d+)\]/,
|
13
|
+
sign: /^[\+\-]/
|
14
|
+
}
|
15
|
+
|
16
|
+
function sprintf() {
|
17
|
+
var key = arguments[0], cache = sprintf.cache
|
18
|
+
if (!(cache[key] && cache.hasOwnProperty(key))) {
|
19
|
+
cache[key] = sprintf.parse(key)
|
20
|
+
}
|
21
|
+
return sprintf.format.call(null, cache[key], arguments)
|
22
|
+
}
|
23
|
+
|
24
|
+
sprintf.format = function(parse_tree, argv) {
|
25
|
+
var cursor = 1, tree_length = parse_tree.length, node_type = "", arg, output = [], i, k, match, pad, pad_character, pad_length, is_positive = true, sign = ""
|
26
|
+
for (i = 0; i < tree_length; i++) {
|
27
|
+
node_type = get_type(parse_tree[i])
|
28
|
+
if (node_type === "string") {
|
29
|
+
output[output.length] = parse_tree[i]
|
30
|
+
}
|
31
|
+
else if (node_type === "array") {
|
32
|
+
match = parse_tree[i] // convenience purposes only
|
33
|
+
if (match[2]) { // keyword argument
|
34
|
+
arg = argv[cursor]
|
35
|
+
for (k = 0; k < match[2].length; k++) {
|
36
|
+
if (!arg.hasOwnProperty(match[2][k])) {
|
37
|
+
throw new Error(sprintf("[sprintf] property '%s' does not exist", match[2][k]))
|
38
|
+
}
|
39
|
+
arg = arg[match[2][k]]
|
40
|
+
}
|
41
|
+
}
|
42
|
+
else if (match[1]) { // positional argument (explicit)
|
43
|
+
arg = argv[match[1]]
|
44
|
+
}
|
45
|
+
else { // positional argument (implicit)
|
46
|
+
arg = argv[cursor++]
|
47
|
+
}
|
48
|
+
|
49
|
+
if (get_type(arg) == "function") {
|
50
|
+
arg = arg()
|
51
|
+
}
|
52
|
+
|
53
|
+
if (re.not_string.test(match[8]) && re.not_json.test(match[8]) && (get_type(arg) != "number" && isNaN(arg))) {
|
54
|
+
throw new TypeError(sprintf("[sprintf] expecting number but found %s", get_type(arg)))
|
55
|
+
}
|
56
|
+
|
57
|
+
if (re.number.test(match[8])) {
|
58
|
+
is_positive = arg >= 0
|
59
|
+
}
|
60
|
+
|
61
|
+
switch (match[8]) {
|
62
|
+
case "b":
|
63
|
+
arg = arg.toString(2)
|
64
|
+
break
|
65
|
+
case "c":
|
66
|
+
arg = String.fromCharCode(arg)
|
67
|
+
break
|
68
|
+
case "d":
|
69
|
+
case "i":
|
70
|
+
arg = parseInt(arg, 10)
|
71
|
+
break
|
72
|
+
case "j":
|
73
|
+
arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0)
|
74
|
+
break
|
75
|
+
case "e":
|
76
|
+
arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential()
|
77
|
+
break
|
78
|
+
case "f":
|
79
|
+
arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg)
|
80
|
+
break
|
81
|
+
case "g":
|
82
|
+
arg = match[7] ? parseFloat(arg).toPrecision(match[7]) : parseFloat(arg)
|
83
|
+
break
|
84
|
+
case "o":
|
85
|
+
arg = arg.toString(8)
|
86
|
+
break
|
87
|
+
case "s":
|
88
|
+
arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg)
|
89
|
+
break
|
90
|
+
case "u":
|
91
|
+
arg = arg >>> 0
|
92
|
+
break
|
93
|
+
case "x":
|
94
|
+
arg = arg.toString(16)
|
95
|
+
break
|
96
|
+
case "X":
|
97
|
+
arg = arg.toString(16).toUpperCase()
|
98
|
+
break
|
99
|
+
}
|
100
|
+
if (re.json.test(match[8])) {
|
101
|
+
output[output.length] = arg
|
102
|
+
}
|
103
|
+
else {
|
104
|
+
if (re.number.test(match[8]) && (!is_positive || match[3])) {
|
105
|
+
sign = is_positive ? "+" : "-"
|
106
|
+
arg = arg.toString().replace(re.sign, "")
|
107
|
+
}
|
108
|
+
else {
|
109
|
+
sign = ""
|
110
|
+
}
|
111
|
+
pad_character = match[4] ? match[4] === "0" ? "0" : match[4].charAt(1) : " "
|
112
|
+
pad_length = match[6] - (sign + arg).length
|
113
|
+
pad = match[6] ? (pad_length > 0 ? str_repeat(pad_character, pad_length) : "") : ""
|
114
|
+
output[output.length] = match[5] ? sign + arg + pad : (pad_character === "0" ? sign + pad + arg : pad + sign + arg)
|
115
|
+
}
|
116
|
+
}
|
117
|
+
}
|
118
|
+
return output.join("")
|
119
|
+
}
|
120
|
+
|
121
|
+
sprintf.cache = {}
|
122
|
+
|
123
|
+
sprintf.parse = function(fmt) {
|
124
|
+
var _fmt = fmt, match = [], parse_tree = [], arg_names = 0
|
125
|
+
while (_fmt) {
|
126
|
+
if ((match = re.text.exec(_fmt)) !== null) {
|
127
|
+
parse_tree[parse_tree.length] = match[0]
|
128
|
+
}
|
129
|
+
else if ((match = re.modulo.exec(_fmt)) !== null) {
|
130
|
+
parse_tree[parse_tree.length] = "%"
|
131
|
+
}
|
132
|
+
else if ((match = re.placeholder.exec(_fmt)) !== null) {
|
133
|
+
if (match[2]) {
|
134
|
+
arg_names |= 1
|
135
|
+
var field_list = [], replacement_field = match[2], field_match = []
|
136
|
+
if ((field_match = re.key.exec(replacement_field)) !== null) {
|
137
|
+
field_list[field_list.length] = field_match[1]
|
138
|
+
while ((replacement_field = replacement_field.substring(field_match[0].length)) !== "") {
|
139
|
+
if ((field_match = re.key_access.exec(replacement_field)) !== null) {
|
140
|
+
field_list[field_list.length] = field_match[1]
|
141
|
+
}
|
142
|
+
else if ((field_match = re.index_access.exec(replacement_field)) !== null) {
|
143
|
+
field_list[field_list.length] = field_match[1]
|
144
|
+
}
|
145
|
+
else {
|
146
|
+
throw new SyntaxError("[sprintf] failed to parse named argument key")
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
150
|
+
else {
|
151
|
+
throw new SyntaxError("[sprintf] failed to parse named argument key")
|
152
|
+
}
|
153
|
+
match[2] = field_list
|
154
|
+
}
|
155
|
+
else {
|
156
|
+
arg_names |= 2
|
157
|
+
}
|
158
|
+
if (arg_names === 3) {
|
159
|
+
throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported")
|
160
|
+
}
|
161
|
+
parse_tree[parse_tree.length] = match
|
162
|
+
}
|
163
|
+
else {
|
164
|
+
throw new SyntaxError("[sprintf] unexpected placeholder")
|
165
|
+
}
|
166
|
+
_fmt = _fmt.substring(match[0].length)
|
167
|
+
}
|
168
|
+
return parse_tree
|
169
|
+
}
|
170
|
+
|
171
|
+
var vsprintf = function(fmt, argv, _argv) {
|
172
|
+
_argv = (argv || []).slice(0)
|
173
|
+
_argv.splice(0, 0, fmt)
|
174
|
+
return sprintf.apply(null, _argv)
|
175
|
+
}
|
176
|
+
|
177
|
+
/**
|
178
|
+
* helpers
|
179
|
+
*/
|
180
|
+
function get_type(variable) {
|
181
|
+
return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase()
|
182
|
+
}
|
183
|
+
|
184
|
+
function str_repeat(input, multiplier) {
|
185
|
+
return Array(multiplier + 1).join(input)
|
186
|
+
}
|
187
|
+
|
188
|
+
/**
|
189
|
+
* export to either browser or node.js
|
190
|
+
*/
|
191
|
+
if (typeof exports !== "undefined") {
|
192
|
+
exports.sprintf = sprintf
|
193
|
+
exports.vsprintf = vsprintf
|
194
|
+
}
|
195
|
+
else {
|
196
|
+
window.sprintf = sprintf
|
197
|
+
window.vsprintf = vsprintf
|
198
|
+
|
199
|
+
if (typeof define === "function" && define.amd) {
|
200
|
+
define(function() {
|
201
|
+
return {
|
202
|
+
sprintf: sprintf,
|
203
|
+
vsprintf: vsprintf
|
204
|
+
}
|
205
|
+
})
|
206
|
+
}
|
207
|
+
}
|
208
|
+
})(typeof window === "undefined" ? this : window);
|
@@ -0,0 +1,82 @@
|
|
1
|
+
var assert = require("assert"),
|
2
|
+
sprintfjs = require("../src/sprintf.js"),
|
3
|
+
sprintf = sprintfjs.sprintf,
|
4
|
+
vsprintf = sprintfjs.vsprintf
|
5
|
+
|
6
|
+
describe("sprintfjs", function() {
|
7
|
+
var pi = 3.141592653589793
|
8
|
+
|
9
|
+
it("should return formated strings for simple placeholders", function() {
|
10
|
+
assert.equal("%", sprintf("%%"))
|
11
|
+
assert.equal("10", sprintf("%b", 2))
|
12
|
+
assert.equal("A", sprintf("%c", 65))
|
13
|
+
assert.equal("2", sprintf("%d", 2))
|
14
|
+
assert.equal("2", sprintf("%i", 2))
|
15
|
+
assert.equal("2", sprintf("%d", "2"))
|
16
|
+
assert.equal("2", sprintf("%i", "2"))
|
17
|
+
assert.equal('{"foo":"bar"}', sprintf("%j", {foo: "bar"}))
|
18
|
+
assert.equal('["foo","bar"]', sprintf("%j", ["foo", "bar"]))
|
19
|
+
assert.equal("2e+0", sprintf("%e", 2))
|
20
|
+
assert.equal("2", sprintf("%u", 2))
|
21
|
+
assert.equal("4294967294", sprintf("%u", -2))
|
22
|
+
assert.equal("2.2", sprintf("%f", 2.2))
|
23
|
+
assert.equal("3.141592653589793", sprintf("%g", pi))
|
24
|
+
assert.equal("10", sprintf("%o", 8))
|
25
|
+
assert.equal("%s", sprintf("%s", "%s"))
|
26
|
+
assert.equal("ff", sprintf("%x", 255))
|
27
|
+
assert.equal("FF", sprintf("%X", 255))
|
28
|
+
assert.equal("Polly wants a cracker", sprintf("%2$s %3$s a %1$s", "cracker", "Polly", "wants"))
|
29
|
+
assert.equal("Hello world!", sprintf("Hello %(who)s!", {"who": "world"}))
|
30
|
+
})
|
31
|
+
|
32
|
+
it("should return formated strings for complex placeholders", function() {
|
33
|
+
// sign
|
34
|
+
assert.equal("2", sprintf("%d", 2))
|
35
|
+
assert.equal("-2", sprintf("%d", -2))
|
36
|
+
assert.equal("+2", sprintf("%+d", 2))
|
37
|
+
assert.equal("-2", sprintf("%+d", -2))
|
38
|
+
assert.equal("2", sprintf("%i", 2))
|
39
|
+
assert.equal("-2", sprintf("%i", -2))
|
40
|
+
assert.equal("+2", sprintf("%+i", 2))
|
41
|
+
assert.equal("-2", sprintf("%+i", -2))
|
42
|
+
assert.equal("2.2", sprintf("%f", 2.2))
|
43
|
+
assert.equal("-2.2", sprintf("%f", -2.2))
|
44
|
+
assert.equal("+2.2", sprintf("%+f", 2.2))
|
45
|
+
assert.equal("-2.2", sprintf("%+f", -2.2))
|
46
|
+
assert.equal("-2.3", sprintf("%+.1f", -2.34))
|
47
|
+
assert.equal("-0.0", sprintf("%+.1f", -0.01))
|
48
|
+
assert.equal("3.14159", sprintf("%.6g", pi))
|
49
|
+
assert.equal("3.14", sprintf("%.3g", pi))
|
50
|
+
assert.equal("3", sprintf("%.1g", pi))
|
51
|
+
assert.equal("-000000123", sprintf("%+010d", -123))
|
52
|
+
assert.equal("______-123", sprintf("%+'_10d", -123))
|
53
|
+
assert.equal("-234.34 123.2", sprintf("%f %f", -234.34, 123.2))
|
54
|
+
|
55
|
+
// padding
|
56
|
+
assert.equal("-0002", sprintf("%05d", -2))
|
57
|
+
assert.equal("-0002", sprintf("%05i", -2))
|
58
|
+
assert.equal(" <", sprintf("%5s", "<"))
|
59
|
+
assert.equal("0000<", sprintf("%05s", "<"))
|
60
|
+
assert.equal("____<", sprintf("%'_5s", "<"))
|
61
|
+
assert.equal("> ", sprintf("%-5s", ">"))
|
62
|
+
assert.equal(">0000", sprintf("%0-5s", ">"))
|
63
|
+
assert.equal(">____", sprintf("%'_-5s", ">"))
|
64
|
+
assert.equal("xxxxxx", sprintf("%5s", "xxxxxx"))
|
65
|
+
assert.equal("1234", sprintf("%02u", 1234))
|
66
|
+
assert.equal(" -10.235", sprintf("%8.3f", -10.23456))
|
67
|
+
assert.equal("-12.34 xxx", sprintf("%f %s", -12.34, "xxx"))
|
68
|
+
assert.equal('{\n "foo": "bar"\n}', sprintf("%2j", {foo: "bar"}))
|
69
|
+
assert.equal('[\n "foo",\n "bar"\n]', sprintf("%2j", ["foo", "bar"]))
|
70
|
+
|
71
|
+
// precision
|
72
|
+
assert.equal("2.3", sprintf("%.1f", 2.345))
|
73
|
+
assert.equal("xxxxx", sprintf("%5.5s", "xxxxxx"))
|
74
|
+
assert.equal(" x", sprintf("%5.1s", "xxxxxx"))
|
75
|
+
|
76
|
+
})
|
77
|
+
|
78
|
+
it("should return formated strings for callbacks", function() {
|
79
|
+
assert.equal("foobar", sprintf("%s", function() { return "foobar" }))
|
80
|
+
assert.equal(Date.now(), sprintf("%s", Date.now)) // should pass...
|
81
|
+
})
|
82
|
+
})
|
@@ -0,0 +1,1263 @@
|
|
1
|
+
# Change Log
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
## [Unreleased][unreleased]
|
5
|
+
|
6
|
+
## [v1.0.1] - 2017-06-15
|
7
|
+
### Fixed
|
8
|
+
- The `AND` / `OR` operator composition order now matches the official SQLite 3 implementation so that `AND` has a higher precedence than `OR`
|
9
|
+
|
10
|
+
## [v1.0.0] - 2017-01-21
|
11
|
+
### Added
|
12
|
+
- The root node of the AST now has `type` and `variant` properties:
|
13
|
+
|
14
|
+
``` json
|
15
|
+
{
|
16
|
+
"type": "statement",
|
17
|
+
"variant": "list",
|
18
|
+
"statement": [{
|
19
|
+
"type": "statement",
|
20
|
+
"variant": "select",
|
21
|
+
"statement": {}
|
22
|
+
}]
|
23
|
+
}
|
24
|
+
```
|
25
|
+
|
26
|
+
- There is now a command line version of the parser when it is installed as a global module (e.g., `npm i -g sqlite-parser`). The `sqlite-parser` command is then available to use to parse input SQL files and write the results to stdout or a JSON file. Additional usage instructions and options available through `sqlite-parser --help`.
|
27
|
+
|
28
|
+
```
|
29
|
+
sqlite-parser input.sql --output foo.json
|
30
|
+
```
|
31
|
+
|
32
|
+
- To allow users to parse arbitrarily long SQL files or other readable stream sources, there is now a stream transform that can accept a readable stream and then push (write) out JSON strings of the ASTs for individual statements.
|
33
|
+
- The AST for each statement is pushed down the stream as soon as it is read and parsed instead of reading the entire file into memory before parsing begins.
|
34
|
+
|
35
|
+
``` javascript
|
36
|
+
var parserTransform = require('sqlite-parser').createParser();
|
37
|
+
var readStream = require('fs').createReadStream('./large-input-file.sql');
|
38
|
+
|
39
|
+
readStream.pipe(parserTransform);
|
40
|
+
parserTransform.pipe(process.stdout);
|
41
|
+
|
42
|
+
parserTransform.on('error', function (err) {
|
43
|
+
console.error(err);
|
44
|
+
process.exit(1);
|
45
|
+
});
|
46
|
+
|
47
|
+
parserTransform.on('finish', function () {
|
48
|
+
process.exit(0);
|
49
|
+
});
|
50
|
+
```
|
51
|
+
|
52
|
+
- To pipe the output into a file that contains a single valid JSON structure, the output of the parser steam transform needs to be wrapped in statement list node where every statement is separated by a comma.
|
53
|
+
|
54
|
+
``` javascript
|
55
|
+
var fs = require('fs');
|
56
|
+
var sqliteParser = require('sqlite-parser');
|
57
|
+
var parserTransform = sqliteParser.createParser();
|
58
|
+
var singleNodeTransform = sqliteParser.createStitcher();
|
59
|
+
var readStream = fs.createReadStream('./large-input-file.sql');
|
60
|
+
var writeStream = fs.createWriteStream('./large-output-file.json');
|
61
|
+
|
62
|
+
readStream.pipe(parserTransform);
|
63
|
+
parserTransform.pipe(singleNodeTransform);
|
64
|
+
singleNodeTransform.pipe(writeStream);
|
65
|
+
|
66
|
+
parserTransform.on('error', function (err) {
|
67
|
+
console.error(err);
|
68
|
+
process.exit(1);
|
69
|
+
});
|
70
|
+
|
71
|
+
writeStream.on('finish', function () {
|
72
|
+
process.exit(0);
|
73
|
+
});
|
74
|
+
```
|
75
|
+
|
76
|
+
- Added missing `ATTACH DATABASE` statement. It will pair nicely with the existing `DETACH DATABASE` statement.
|
77
|
+
|
78
|
+
``` sql
|
79
|
+
ATTACH DATABASE 'bees2.db' AS more_bees
|
80
|
+
```
|
81
|
+
|
82
|
+
- SQLite allows you to enter basically anything you want for a datatype, such as the datatype for a column in a `CREATE TABLE` statement, because it doesn't enforce types you provide. So, the parser will accept almost any unquoted string in place of a datatype. [ref1](http://stackoverflow.com/a/8417411) [ref2](http://www.sqlite.org/datatype3.html)
|
83
|
+
|
84
|
+
``` sql
|
85
|
+
CREATE TABLE t1(x DINOSAUR, y BIRD_PERSON);
|
86
|
+
```
|
87
|
+
|
88
|
+
- Run parser against entire SQLite test corpus using `grunt testall` command.
|
89
|
+
- **Warning**: This command will parse ~49,000 of queries, across almost 900 different files, representing the entire SQLite test corpus at the time it was processed.
|
90
|
+
|
91
|
+
- Allow multi-byte UTF-8 characters (e.g., `\u1234`) in identifier names.
|
92
|
+
|
93
|
+
- Add support for table functions in the `FROM` clause of a `SELECT` statement.
|
94
|
+
|
95
|
+
``` sql
|
96
|
+
SELECT
|
97
|
+
j2.rowid, jx.rowid
|
98
|
+
FROM
|
99
|
+
j2, json_tree(j2.json) AS jx
|
100
|
+
```
|
101
|
+
|
102
|
+
### Changed
|
103
|
+
- **BREAKING CHANGE** Instead of publishing this module on npm as a browserified and minified bundle, The transpiled ES2015 code in `lib/` is now published and I have left it up to the end user to decide if they want to browserify or minify the library. The combined unminified file sizes for the published version of the parser is now ~127kB.
|
104
|
+
- There is still a `dist/` folder containing the minified browserified bundle that comes in at ~81kB (7% reduction from `v0.14.5`). This is defined in the `package.json` as the browser version of the module, which is recognized by tools such as [jspm](http://jspm.io/) and [browserify](http://browserify.org/).
|
105
|
+
|
106
|
+
- **BREAKING CHANGE** The `on` property of a `CREATE INDEX` statement is now treated as a table expression identifier, and has the corresponding `type` and `variant`:
|
107
|
+
|
108
|
+
``` json
|
109
|
+
{
|
110
|
+
"type": "statement",
|
111
|
+
"variant": "create",
|
112
|
+
"format": "index",
|
113
|
+
"target": {
|
114
|
+
"type": "identifier",
|
115
|
+
"variant": "index",
|
116
|
+
"name": "bees.hive_state"
|
117
|
+
},
|
118
|
+
"on": {
|
119
|
+
"type": "identifier",
|
120
|
+
"variant": "expression",
|
121
|
+
"format": "table",
|
122
|
+
"name": {
|
123
|
+
"type": "identifier",
|
124
|
+
"variant": "table",
|
125
|
+
"name": "hive"
|
126
|
+
},
|
127
|
+
"columns": []
|
128
|
+
}
|
129
|
+
}
|
130
|
+
```
|
131
|
+
|
132
|
+
- **BREAKING CHANGE** Indexed columns (e.g., the column list in the `ON` part of a `CREATE INDEX` statement) and ordering expressions (e.g., the `ORDER BY` part of a `SELECT` statement) now have the following format:
|
133
|
+
- When they are proceeded by an ordering term (e.g., `ASC`, `DESC`) and/or `COLLATE`, such as `ORDER BY nick ASC`
|
134
|
+
|
135
|
+
``` json
|
136
|
+
{
|
137
|
+
"order": [{
|
138
|
+
"type": "expression",
|
139
|
+
"variant": "order",
|
140
|
+
"expression": {
|
141
|
+
"type": "identifier",
|
142
|
+
"variant": "column",
|
143
|
+
"name": "nick"
|
144
|
+
},
|
145
|
+
"direction": "asc"
|
146
|
+
}]
|
147
|
+
}
|
148
|
+
```
|
149
|
+
|
150
|
+
- But, when it is only an expression or column name without any ordering term or `COLLATE` then it will only be the expression itself, and the implicit `"direction": "asc"` will not be added to the AST, such as `ORDER BY nick`:
|
151
|
+
|
152
|
+
``` sql
|
153
|
+
{
|
154
|
+
"order": [{
|
155
|
+
"type": "identifier",
|
156
|
+
"variant": "column",
|
157
|
+
"name": "nick"
|
158
|
+
}]
|
159
|
+
}
|
160
|
+
```
|
161
|
+
|
162
|
+
- **BREAKING CHANGE** Because of changes to how binary expressions are parsed, the order that expressions are composed may be different then the previous release. For example, ASTs may change such as those for queries that contain multiple binary expressions:
|
163
|
+
|
164
|
+
``` sql
|
165
|
+
SELECT *
|
166
|
+
FROM hats
|
167
|
+
WHERE x != 2 OR x == 3 AND y > 5
|
168
|
+
```
|
169
|
+
|
170
|
+
- **BREAKING CHANGE** Expressions such as `x NOT NULL` were previously treated as a unary expressions but are now considered binary expressions.
|
171
|
+
|
172
|
+
``` sql
|
173
|
+
{
|
174
|
+
"type": "expression",
|
175
|
+
"format": "binary",
|
176
|
+
"variant": "operation",
|
177
|
+
"operation": "not",
|
178
|
+
"left": {
|
179
|
+
"type": "identifier",
|
180
|
+
"variant": "column",
|
181
|
+
"name": "x"
|
182
|
+
},
|
183
|
+
"right": {
|
184
|
+
"type": "literal",
|
185
|
+
"variant": "null",
|
186
|
+
"value": "null"
|
187
|
+
}
|
188
|
+
}
|
189
|
+
```
|
190
|
+
- **BREAKING CHANGE** Now, instead of transaction statements being parsed as a single statement of type `transaction` to be considered valid, each statement that makes up a the transaction (e.g., `BEGIN`, `END`) is considered its own distinct statement that can exist independent of the others. Because a single transaction can be spread across multiple input strings given to the parser, it is no longer treated as a single, large, _transaction_ statement.
|
191
|
+
|
192
|
+
``` sql
|
193
|
+
BEGIN;
|
194
|
+
DROP TABLE t1;
|
195
|
+
END;
|
196
|
+
```
|
197
|
+
|
198
|
+
``` json
|
199
|
+
{
|
200
|
+
"type": "statement",
|
201
|
+
"variant": "list",
|
202
|
+
"statement": [
|
203
|
+
{
|
204
|
+
"type": "statement",
|
205
|
+
"variant": "transaction",
|
206
|
+
"action": "begin"
|
207
|
+
},
|
208
|
+
{
|
209
|
+
"type": "statement",
|
210
|
+
"target": {
|
211
|
+
"type": "identifier",
|
212
|
+
"variant": "table",
|
213
|
+
"name": "t1"
|
214
|
+
},
|
215
|
+
"variant": "drop",
|
216
|
+
"format": "table",
|
217
|
+
"condition": []
|
218
|
+
},
|
219
|
+
{
|
220
|
+
"type": "statement",
|
221
|
+
"variant": "transaction",
|
222
|
+
"action": "commit"
|
223
|
+
}
|
224
|
+
]
|
225
|
+
}
|
226
|
+
```
|
227
|
+
|
228
|
+
- **BREAKING CHANGE** `COLLATE` can now appear multiple times in a row wherever it would previously be allowed to appear, and as a result, the `collate` property of the AST will contain an array.
|
229
|
+
|
230
|
+
``` sql
|
231
|
+
SELECT 'cats'
|
232
|
+
ORDER BY 1 COLLATE nocase COLLATE nocase
|
233
|
+
```
|
234
|
+
|
235
|
+
- **BREAKING CHANGE** `CONSTRAINT` names can now appear multiple times before or after a column or table constraint in a `CREATE TABLE` statement. Having a `CONSTRAINT` name *after* the constraint is an undocumented SQLite feature. However, while it will not give an error, any constraint name appearing after the constraint is ignored.
|
236
|
+
|
237
|
+
``` sql
|
238
|
+
CREATE TABLE t2c(
|
239
|
+
-- Two leading and two trailing CONSTRAINT clauses
|
240
|
+
-- Name used: x_two
|
241
|
+
x INTEGER CONSTRAINT x_one CONSTRAINT x_two
|
242
|
+
CHECK( typeof( coalesce(x,0) ) == 'integer' )
|
243
|
+
CONSTRAINT x_two CONSTRAINT x_three,
|
244
|
+
y INTEGER,
|
245
|
+
z INTEGER,
|
246
|
+
-- Two trailing CONSTRAINT clauses
|
247
|
+
-- Name used: (none)
|
248
|
+
UNIQUE(x, y, z) CONSTRAINT u_one CONSTRAINT u_two
|
249
|
+
)
|
250
|
+
```
|
251
|
+
|
252
|
+
- **BREAKING CHANGE** `JOIN` clauses and table lists can now occur in the same `FROM` clause of a single `SELECT` statement. Tables separated by a comma will be included in the `JOIN` map as a cross join.
|
253
|
+
|
254
|
+
``` sql
|
255
|
+
SELECT *
|
256
|
+
FROM aa LEFT JOIN bb, cc
|
257
|
+
WHERE cc.c = aa.a;
|
258
|
+
```
|
259
|
+
|
260
|
+
- **BREAKING CHANGE** A comma-separated list of table or subquery names in the `FROM` clause of a `SELECT` statement are now treated as a join map of cross joins. Also, each pair of comma-separated tables or subqueries can include a join constraint expression (e.g., `ON t.col1 = b.col2`).
|
261
|
+
|
262
|
+
``` sql
|
263
|
+
SELECT t1.rowid, t2.rowid
|
264
|
+
FROM t1, t2 ON t1.a = t2.b;
|
265
|
+
```
|
266
|
+
|
267
|
+
``` json
|
268
|
+
{
|
269
|
+
"type": "statement",
|
270
|
+
"variant": "list",
|
271
|
+
"statement": [
|
272
|
+
{
|
273
|
+
"type": "statement",
|
274
|
+
"variant": "select",
|
275
|
+
"result": [
|
276
|
+
{
|
277
|
+
"type": "identifier",
|
278
|
+
"variant": "column",
|
279
|
+
"name": "t1.rowid"
|
280
|
+
},
|
281
|
+
{
|
282
|
+
"type": "identifier",
|
283
|
+
"variant": "column",
|
284
|
+
"name": "t2.rowid"
|
285
|
+
}
|
286
|
+
],
|
287
|
+
"from": {
|
288
|
+
"type": "map",
|
289
|
+
"variant": "join",
|
290
|
+
"source": {
|
291
|
+
"type": "identifier",
|
292
|
+
"variant": "table",
|
293
|
+
"name": "t1"
|
294
|
+
},
|
295
|
+
"map": [
|
296
|
+
{
|
297
|
+
"type": "join",
|
298
|
+
"variant": "cross join",
|
299
|
+
"source": {
|
300
|
+
"type": "identifier",
|
301
|
+
"variant": "table",
|
302
|
+
"name": "t2"
|
303
|
+
},
|
304
|
+
"constraint": {
|
305
|
+
"type": "constraint",
|
306
|
+
"variant": "join",
|
307
|
+
"format": "on",
|
308
|
+
"on": {
|
309
|
+
"type": "expression",
|
310
|
+
"format": "binary",
|
311
|
+
"variant": "operation",
|
312
|
+
"operation": "=",
|
313
|
+
"left": {
|
314
|
+
"type": "identifier",
|
315
|
+
"variant": "column",
|
316
|
+
"name": "t1.a"
|
317
|
+
},
|
318
|
+
"right": {
|
319
|
+
"type": "identifier",
|
320
|
+
"variant": "column",
|
321
|
+
"name": "t2.b"
|
322
|
+
}
|
323
|
+
}
|
324
|
+
}
|
325
|
+
}
|
326
|
+
]
|
327
|
+
}
|
328
|
+
}
|
329
|
+
]
|
330
|
+
}
|
331
|
+
```
|
332
|
+
|
333
|
+
- **BREAKING CHANGE** Instead of an array, for the `args` property of an AST node, it will now contain an expression list node containing the arguments on the `expression` property.
|
334
|
+
|
335
|
+
``` json
|
336
|
+
{
|
337
|
+
"type": "expression",
|
338
|
+
"variant": "list",
|
339
|
+
"expression": []
|
340
|
+
}
|
341
|
+
```
|
342
|
+
|
343
|
+
- **BREAKING CHANGE** All named values for properties such as `variant`, `format`, and `type` should always be lowercase, even when uppercase in the input SQL (e.g., `variant` is now `natural join` instead of `NATURAL JOIN` in the AST).
|
344
|
+
|
345
|
+
- **BREAKING CHANGE** New format for `CASE` expression AST nodes:
|
346
|
+
- `variant` `when` has a `condition` and a `consequent`
|
347
|
+
- `variant` `else` has just a `consequent`
|
348
|
+
- the outer `expression` is now `variant` `case` instead of `binary`
|
349
|
+
- instead of taking whatever is provided between `CASE` and `WHEN` (e.g., `CASE foo WHEN ...`) and calling that the expression, it is now added as the `discriminant`
|
350
|
+
|
351
|
+
``` sql
|
352
|
+
select
|
353
|
+
case acc
|
354
|
+
when a = 0 then a1
|
355
|
+
when a = 1 then b1
|
356
|
+
else c1
|
357
|
+
end
|
358
|
+
```
|
359
|
+
|
360
|
+
``` json
|
361
|
+
{
|
362
|
+
"type": "expression",
|
363
|
+
"variant": "case",
|
364
|
+
"expression": [
|
365
|
+
{
|
366
|
+
"type": "condition",
|
367
|
+
"variant": "when",
|
368
|
+
"condition": {
|
369
|
+
"type": "expression",
|
370
|
+
"format": "binary",
|
371
|
+
"variant": "operation",
|
372
|
+
"operation": "=",
|
373
|
+
"left": {
|
374
|
+
"type": "identifier",
|
375
|
+
"variant": "column",
|
376
|
+
"name": "a"
|
377
|
+
},
|
378
|
+
"right": {
|
379
|
+
"type": "literal",
|
380
|
+
"variant": "decimal",
|
381
|
+
"value": "0"
|
382
|
+
}
|
383
|
+
},
|
384
|
+
"consequent": {
|
385
|
+
"type": "identifier",
|
386
|
+
"variant": "column",
|
387
|
+
"name": "a1"
|
388
|
+
}
|
389
|
+
},
|
390
|
+
{
|
391
|
+
"type": "condition",
|
392
|
+
"variant": "when",
|
393
|
+
"condition": {
|
394
|
+
"type": "expression",
|
395
|
+
"format": "binary",
|
396
|
+
"variant": "operation",
|
397
|
+
"operation": "=",
|
398
|
+
"left": {
|
399
|
+
"type": "identifier",
|
400
|
+
"variant": "column",
|
401
|
+
"name": "a"
|
402
|
+
},
|
403
|
+
"right": {
|
404
|
+
"type": "literal",
|
405
|
+
"variant": "decimal",
|
406
|
+
"value": "1"
|
407
|
+
}
|
408
|
+
},
|
409
|
+
"consequent": {
|
410
|
+
"type": "identifier",
|
411
|
+
"variant": "column",
|
412
|
+
"name": "b1"
|
413
|
+
}
|
414
|
+
},
|
415
|
+
{
|
416
|
+
"type": "condition",
|
417
|
+
"variant": "else",
|
418
|
+
"consequent": {
|
419
|
+
"type": "identifier",
|
420
|
+
"variant": "column",
|
421
|
+
"name": "c1"
|
422
|
+
}
|
423
|
+
}
|
424
|
+
],
|
425
|
+
"discriminant": {
|
426
|
+
"type": "identifier",
|
427
|
+
"variant": "column",
|
428
|
+
"name": "acc"
|
429
|
+
}
|
430
|
+
}
|
431
|
+
```
|
432
|
+
|
433
|
+
- **BREAKING CHANGE** New format for `EXISTS` expression nodes. Use `expression` node in `condition` for `IF NOT EXISTS`. `NOT EXISTS`, and `EXISTS` modifiers instead of a string value.
|
434
|
+
- `CREATE TABLE` statement
|
435
|
+
|
436
|
+
``` sql
|
437
|
+
create table if not exists foo(id int)
|
438
|
+
```
|
439
|
+
|
440
|
+
``` json
|
441
|
+
{
|
442
|
+
"type": "statement",
|
443
|
+
"name": {
|
444
|
+
"type": "identifier",
|
445
|
+
"variant": "table",
|
446
|
+
"name": "foo"
|
447
|
+
},
|
448
|
+
"variant": "create",
|
449
|
+
"format": "table",
|
450
|
+
"definition": [
|
451
|
+
{
|
452
|
+
"type": "definition",
|
453
|
+
"variant": "column",
|
454
|
+
"name": "id",
|
455
|
+
"definition": [],
|
456
|
+
"datatype": {
|
457
|
+
"type": "datatype",
|
458
|
+
"variant": "int",
|
459
|
+
"affinity": "integer"
|
460
|
+
}
|
461
|
+
}
|
462
|
+
],
|
463
|
+
"condition": [
|
464
|
+
{
|
465
|
+
"type": "condition",
|
466
|
+
"variant": "if",
|
467
|
+
"condition": {
|
468
|
+
"type": "expression",
|
469
|
+
"variant": "exists",
|
470
|
+
"operator": "not exists"
|
471
|
+
}
|
472
|
+
}
|
473
|
+
]
|
474
|
+
}
|
475
|
+
```
|
476
|
+
|
477
|
+
- `DROP TABLE` statement
|
478
|
+
|
479
|
+
``` sql
|
480
|
+
drop table if exists foo
|
481
|
+
```
|
482
|
+
|
483
|
+
``` json
|
484
|
+
{
|
485
|
+
"type": "statement",
|
486
|
+
"target": {
|
487
|
+
"type": "identifier",
|
488
|
+
"variant": "table",
|
489
|
+
"name": "foo"
|
490
|
+
},
|
491
|
+
"variant": "drop",
|
492
|
+
"format": "table",
|
493
|
+
"condition": [
|
494
|
+
{
|
495
|
+
"type": "condition",
|
496
|
+
"variant": "if",
|
497
|
+
"condition": {
|
498
|
+
"type": "expression",
|
499
|
+
"variant": "exists",
|
500
|
+
"operator": "exists"
|
501
|
+
}
|
502
|
+
}
|
503
|
+
]
|
504
|
+
}
|
505
|
+
```
|
506
|
+
|
507
|
+
- `NOT EXISTS` expression
|
508
|
+
|
509
|
+
``` sql
|
510
|
+
select a
|
511
|
+
where not exists (select b)
|
512
|
+
```
|
513
|
+
|
514
|
+
``` json
|
515
|
+
{
|
516
|
+
"type": "statement",
|
517
|
+
"variant": "select",
|
518
|
+
"result": [
|
519
|
+
{
|
520
|
+
"type": "identifier",
|
521
|
+
"variant": "column",
|
522
|
+
"name": "a"
|
523
|
+
}
|
524
|
+
],
|
525
|
+
"where": [
|
526
|
+
{
|
527
|
+
"type": "expression",
|
528
|
+
"format": "unary",
|
529
|
+
"variant": "exists",
|
530
|
+
"expression": {
|
531
|
+
"type": "statement",
|
532
|
+
"variant": "select",
|
533
|
+
"result": [
|
534
|
+
{
|
535
|
+
"type": "identifier",
|
536
|
+
"variant": "column",
|
537
|
+
"name": "b"
|
538
|
+
}
|
539
|
+
]
|
540
|
+
},
|
541
|
+
"operator": "not exists"
|
542
|
+
}
|
543
|
+
]
|
544
|
+
}
|
545
|
+
```
|
546
|
+
|
547
|
+
- `RangeError: Maximum call stack size exceeded` generated when running the uglified bundle (`dist/sqlite-parser.js`) in the browser, so I am skipping the minification step and only publishing the browserified bundle.
|
548
|
+
|
549
|
+
### Fixed
|
550
|
+
- Fixed binary expression parsing logic so that it can handle expressions such as:
|
551
|
+
|
552
|
+
``` sql
|
553
|
+
SELECT * FROM t where -1 * (2 + 3);
|
554
|
+
SELECT * FROM t where 3 + 4 * 5 > 20;
|
555
|
+
SELECT * FROM t where v1 = ((v2 * 5) - v3);
|
556
|
+
```
|
557
|
+
|
558
|
+
- Allow qualified table name in `ON` clause of `CREATE TRIGGER` statement (e.g., `ON dbName.tableName`).
|
559
|
+
|
560
|
+
- Allow _literal boolean values_ `on` and `off` in `PRAGMA` statements:
|
561
|
+
|
562
|
+
``` sql
|
563
|
+
PRAGMA legacy_file_format = ON;
|
564
|
+
```
|
565
|
+
|
566
|
+
- Do not treat `TEMP` or `ROWID` as reserved words, since the official parser allows `temp` or `rowid`, when used as an identifier (e.g., a table named `temp` or the `rowid` column of a table).
|
567
|
+
|
568
|
+
``` sql
|
569
|
+
CREATE TABLE temp.t1(a, b);
|
570
|
+
SELECT rowid AS "Internal Row ID" FROM bees;
|
571
|
+
```
|
572
|
+
|
573
|
+
- Require semicolons to delineate `BEGIN` and `END` statements for transactions while also allowing unnecessary semicolons to be omitted:
|
574
|
+
|
575
|
+
``` sql
|
576
|
+
BEGIN;CREATE TABLE nick(a, b);END
|
577
|
+
```
|
578
|
+
|
579
|
+
- Only allow CRUD operations inside of the body of a `CREATE TRIGGER` statement.
|
580
|
+
|
581
|
+
- Allow empty strings or `NULL` to be used as aliases, to match behavior of the native SQLite parser, such as in an `ATTACH DATABASE` statement:
|
582
|
+
|
583
|
+
``` sql
|
584
|
+
ATTACH DATABASE '' AS ''
|
585
|
+
```
|
586
|
+
|
587
|
+
- Allow datatype names to be provided to `COLLATE` to match the behavior of the official SQLite parser:
|
588
|
+
|
589
|
+
``` sql
|
590
|
+
SELECT c1
|
591
|
+
FROM t
|
592
|
+
ORDER BY 1 COLLATE numeric
|
593
|
+
```
|
594
|
+
|
595
|
+
- Some `CREATE TRIGGER` statements were previously parsed as a binary expressions instead of create trigger statements.
|
596
|
+
|
597
|
+
- Allow indexed columns to be parsed when they include a `COLLATE` and/or a ordering direction (e.g., `ASC`, `DESC`) when part of a table constraint in a `CREATE TABLE` statement or a `ON` part of a `CREATE INDEX` statement:
|
598
|
+
|
599
|
+
``` sql
|
600
|
+
CREATE TABLE t1(id int, PRIMARY KEY(x COLLATE binary ASC, y COLLATE hex, z DESC))
|
601
|
+
```
|
602
|
+
|
603
|
+
- Allow `UNIQUE` column constraint type to be correctly parsed.
|
604
|
+
|
605
|
+
``` sql
|
606
|
+
CREATE TABLE bees(
|
607
|
+
a INTEGER UNIQUE ON CONFLICT IGNORE
|
608
|
+
)
|
609
|
+
```
|
610
|
+
|
611
|
+
- Allow nested unary expressions while preserving also the correct order of precedence.
|
612
|
+
|
613
|
+
``` sql
|
614
|
+
SELECT not not foo
|
615
|
+
FROM bees
|
616
|
+
```
|
617
|
+
|
618
|
+
- The action (e.g., `ADD COLUMN`) and target (e.g., the table name) of a `ALTER TABLE` statement was not being added to the AST.
|
619
|
+
|
620
|
+
- Allow `AUTOINCREMENT` in the column list of a `PRIMARY KEY` **table** constraint.
|
621
|
+
|
622
|
+
``` sql
|
623
|
+
CREATE TABLE t7(
|
624
|
+
x INTEGER,
|
625
|
+
y REAL,
|
626
|
+
PRIMARY KEY(x AUTOINCREMENT)
|
627
|
+
);
|
628
|
+
```
|
629
|
+
|
630
|
+
- Now supporting custom datatypes with affinity inference where possible. See [this page](https://www.sqlite.org/datatype3.html) for explanation for choosing type affinity for custom types.
|
631
|
+
|
632
|
+
``` sql
|
633
|
+
CREATE TABLE t3(
|
634
|
+
-- Affinity: NUMERIC
|
635
|
+
d STRING,
|
636
|
+
-- Affinity: INTEGER
|
637
|
+
e FLOATING POINT(5,10),
|
638
|
+
-- Affinity: TEXT
|
639
|
+
f NATIONAL CHARACTER(15) COLLATE RTRIM,
|
640
|
+
-- Affinity: INTEGER
|
641
|
+
g LONG INTEGER DEFAULT( 3600*12 )
|
642
|
+
);
|
643
|
+
```
|
644
|
+
|
645
|
+
- Allow trailing `.` in decimal value (e.g., `SELECT 1. + 1`).
|
646
|
+
|
647
|
+
- Allow functions to have datatype names such as `date(arg)` or `time(now)`.
|
648
|
+
|
649
|
+
- Allow reserved words in the a `VIRTUAL TABLE` statement `USING` clause CTE columns (e.g., `from`, `to`).
|
650
|
+
|
651
|
+
- Better nested expression parsing when unnecessary parenthesis are used within a complex expression.
|
652
|
+
|
653
|
+
``` sql
|
654
|
+
SELECT
|
655
|
+
SUM(
|
656
|
+
CASE
|
657
|
+
WHEN ( t.color != 'yellow' ) THEN 1
|
658
|
+
ELSE 0
|
659
|
+
END
|
660
|
+
) AS imposter_bee_count
|
661
|
+
FROM
|
662
|
+
bees t;
|
663
|
+
```
|
664
|
+
|
665
|
+
- Allow a reserved word to be used as a column name in a `CREATE TABLE` statement as long as it can be safely implied that it is meant to be a column name.
|
666
|
+
|
667
|
+
``` sql
|
668
|
+
CREATE TABLE changelog(
|
669
|
+
desc TEXT
|
670
|
+
);
|
671
|
+
```
|
672
|
+
|
673
|
+
- Allow `WITH` clause before a `SELECT` statement wherever a `SELECT` statement can be found in a complex query, such as in a _insert into select_ query.
|
674
|
+
|
675
|
+
``` sql
|
676
|
+
INSERT INTO t6
|
677
|
+
WITH s(x) AS ( VALUES (2) UNION ALL SELECT x + 2 FROM s WHERE x < 49 )
|
678
|
+
SELECT * FROM s;
|
679
|
+
```
|
680
|
+
|
681
|
+
- A view expression can now be used in a `CREATE VIEW` statement.
|
682
|
+
|
683
|
+
``` sql
|
684
|
+
CREATE VIEW v1(a, b) AS VALUES(1, 2), (3, 4);
|
685
|
+
```
|
686
|
+
|
687
|
+
## [v0.14.5] - 2016-07-11
|
688
|
+
### Fixed
|
689
|
+
- Fix alternate not equal operator `<>`
|
690
|
+
|
691
|
+
``` sql
|
692
|
+
SELECT *
|
693
|
+
FROM hats
|
694
|
+
WHERE quantity <> 1
|
695
|
+
```
|
696
|
+
|
697
|
+
## [v0.14.4] - 2016-05-31
|
698
|
+
### Fixed
|
699
|
+
- Allow spaces between a function name and the argument list
|
700
|
+
|
701
|
+
``` sql
|
702
|
+
SELECT COUNT (*)
|
703
|
+
FROM hats;
|
704
|
+
```
|
705
|
+
|
706
|
+
## [v0.14.3] - 2016-03-28
|
707
|
+
### Fixed
|
708
|
+
- Do not run grunt tasks on `npm install`. Did not realize that `prepublish` is run on a regular `npm install` command.
|
709
|
+
|
710
|
+
## [v0.14.2] - 2016-03-24
|
711
|
+
### Fixed
|
712
|
+
- Minified bundle was missing from `dist/` folder after running `grunt release`
|
713
|
+
- This would have caused the parser to not work as an installed npm module since the `package.json` `main` property points to the minified bundle
|
714
|
+
|
715
|
+
## [v0.14.1] - 2016-03-23
|
716
|
+
### Fixed
|
717
|
+
- Fixed broken Grunt tasks (e.g. `grunt release`) in Windows
|
718
|
+
|
719
|
+
## [v0.14.0] - 2016-03-11
|
720
|
+
### Added
|
721
|
+
- Latest version includes smart error functionality from the tracer branch that was not included in the last few versions. The latest release includes the smart syntax functionality now that it is as performant as the previous release that did not include smart errors.
|
722
|
+
- Parser can now be invoke synchronously or asynchronously:
|
723
|
+
``` javascript
|
724
|
+
var sqliteParser = require('sqlite-parser');
|
725
|
+
var query = 'select pants from laundry;';
|
726
|
+
// sync
|
727
|
+
var ast = sqliteParser(query);
|
728
|
+
console.log(ast);
|
729
|
+
|
730
|
+
// async
|
731
|
+
sqliteParser(query, function (err, ast) {
|
732
|
+
if (err) {
|
733
|
+
console.log(err);
|
734
|
+
return;
|
735
|
+
}
|
736
|
+
console.log(ast);
|
737
|
+
});
|
738
|
+
```
|
739
|
+
|
740
|
+
### Changed
|
741
|
+
- Upgrade sqlite-parser to ES2015
|
742
|
+
|
743
|
+
``` javascript
|
744
|
+
import sqliteParser from 'sqlite-parser';
|
745
|
+
const query = 'select name, color from cats;';
|
746
|
+
const ast = JSON.stringify(sqliteParser(query), null, 2);
|
747
|
+
console.log(ast);
|
748
|
+
```
|
749
|
+
|
750
|
+
- Process is not complete, but as of now most of the parser, tests, and demo are now in ES2015.
|
751
|
+
- Publish the browserified bundle in the [sqlite-parser npm package](https://www.npmjs.com/package/sqlite-parser) under `dist/` folder
|
752
|
+
- This includes the un-minified `sqlite-parser.js` with sourcemaps and the minified `sqlite-parser-min.js` without sourcemaps (the default file as defined in the `package.json`).
|
753
|
+
- Do not publish the intermediate files from the build process to github
|
754
|
+
- The `lib/` and `dist/` folders are no longer in version control as a part of this github repository.
|
755
|
+
- The `demo/` folder is also removed from the master branch as well and must be built using `grunt demo` to use it (or `grunt live` to build the demo and serve it locally with livereload).
|
756
|
+
|
757
|
+
### Fixed
|
758
|
+
- Add `--cache` flag to pegjs compiler and reduce total rule count to increase performance of tracing parser and smart error functionality.
|
759
|
+
- Early results show that `--cache` makes the tracer parser just as fast as the non-tracer branch for a moderate (`~150kB`) increase in file size.
|
760
|
+
- Removing the number of whitespace rules reduced the chance of the process running out of memory while parsing larger queries.
|
761
|
+
- Massive reduction in bundled parser size
|
762
|
+
- To help combat the extra size added from the `--cache` option of pegjs, I reduced the size of the parser from `416.89 kB` to `86.7 kB` (~20% of the original size). I did this by switching pegjs option `--optimize` from `speed` to `size` and modifying [my fork of pegjs)(http://github.com/nwronski/pegjs) to allow rule descriptions to be looked up by rule index instead of by rule name as the `optimize` `size` mode required.
|
763
|
+
|
764
|
+
## [v0.11.3] - 2016-02-02
|
765
|
+
### Fixed
|
766
|
+
- Added missing binary division operator so that things like this will now correctly parse.
|
767
|
+
|
768
|
+
``` sql
|
769
|
+
select CAST(4 / 9 AS DECIMAL(5,2)) as hat
|
770
|
+
from pants;
|
771
|
+
```
|
772
|
+
- Fixed `BETWEEN` expression grammar to remove bad recursion.
|
773
|
+
|
774
|
+
``` sql
|
775
|
+
select num
|
776
|
+
from nums n
|
777
|
+
where num between 100 AND 200;
|
778
|
+
```
|
779
|
+
- Fixed `ORDER BY` grammar to allow more than two ordering expressions.
|
780
|
+
|
781
|
+
``` sql
|
782
|
+
select color, size, shape, name
|
783
|
+
from eggs
|
784
|
+
order by color asc, size desc, shape asc
|
785
|
+
```
|
786
|
+
|
787
|
+
## [v0.11.2] - 2016-01-29
|
788
|
+
### Fixed
|
789
|
+
- Refactor to solve the different issues that come from trying to use unquoted reserved words as
|
790
|
+
part of table names, column names, aliases, etc... This also addresses issues that came from certain SQLite keywords being fully contained within other keywords (e.g.: `IN` is contained in `INT` which is contained in `INTERSECT`).
|
791
|
+
|
792
|
+
``` sql
|
793
|
+
select intersects inid, innot notin
|
794
|
+
from fromson nots
|
795
|
+
where colorwhere IN nots.pon
|
796
|
+
INTERSECT
|
797
|
+
select suit, tie from pants;
|
798
|
+
```
|
799
|
+
- Whoops! `order` property of `SELECT` statements contained an object with a `result` key that contained the ordering list instead of just containing the ordering list. It should actually look like this instead:
|
800
|
+
|
801
|
+
``` json
|
802
|
+
{
|
803
|
+
"order": [
|
804
|
+
{
|
805
|
+
"type": "expression",
|
806
|
+
"variant": "order",
|
807
|
+
"expression": {
|
808
|
+
"type": "identifier",
|
809
|
+
"variant": "column",
|
810
|
+
"name": "hats"
|
811
|
+
},
|
812
|
+
"direction": "asc"
|
813
|
+
}
|
814
|
+
]
|
815
|
+
}
|
816
|
+
```
|
817
|
+
|
818
|
+
## [v0.11.0] - 2015-09-29
|
819
|
+
### Changed
|
820
|
+
- Created a `tracer` branch to continue developing the `Tracer` class into something viable.
|
821
|
+
- `all` keys removed in all places as it has no effect on query results
|
822
|
+
- function `args` property now always contains an array. when `DISTINCT` is used in function arguments, then a `distinct: true` property is added to the function node.
|
823
|
+
- any property that was previously attached to a node with a value of `null` is no longer included in the AST. this should reduce the size of the AST considerably with useless information. for example, the `with` property of a `SELECT` statement node.
|
824
|
+
- all `false` values that were included by default (e.g.: `temporary`, `autoIncrement`, etc...) are only included in the AST when the value is `true`
|
825
|
+
- expected AST for each spec is located in its own `.json` file instead of keeping it inside of the JS file.
|
826
|
+
|
827
|
+
## [v0.10.2] - 2015-07-09
|
828
|
+
### Changed
|
829
|
+
- lots of clean up to organize tests by category, split out tests to different files and directories by type, and created `mocha.opts` to run tests directory recursively.
|
830
|
+
- force update README for npm website
|
831
|
+
|
832
|
+
## [v0.10.1] - 2015-07-09
|
833
|
+
### Changed
|
834
|
+
- the following things no longer have an `identifier` node in the `name` property, as it is too redundant: column constraints, table constrains, column definitions. the parent node provides plenty of context itself for what you will find in its `name` property.
|
835
|
+
|
836
|
+
## [v0.10.0] - 2015-07-09
|
837
|
+
### Added
|
838
|
+
- rules and AST for missing transaction-related statement types: `RELEASE` and `SAVEPOINT`
|
839
|
+
- rules and AST for missing SQLite-specific statement types: `PRAGMA`, `DETACH`, `VACUUM`, `ANALYZE`, and `REINDEX`
|
840
|
+
- new specs for SQLite-specific statement types
|
841
|
+
- new specs for missing transaction-related statement types
|
842
|
+
- new specs for `WITH` clause with recursive table expressions
|
843
|
+
- added new methods in `parser-util.js` to reduce repeated code: `keyify()`, `textMerge()`, and `listify()`
|
844
|
+
|
845
|
+
### Changed
|
846
|
+
- **removing Tracer class from sqlite-parser until a faster solution is developed**
|
847
|
+
- Tracer is causing a **14x performance hit** to the sqlite-parser specs when it is enabled
|
848
|
+
- might consider having two different builds: one _smart error_ build with Tracer and another _performance_ build for speed
|
849
|
+
- fixed rules for `WITH` clause prepended to CRUD-type statements to make sure the `with` property is added to the correct nodes
|
850
|
+
- changed the AST for `WITH` clause to no longer have a node of `type` `"with"`
|
851
|
+
|
852
|
+
``` json
|
853
|
+
"with": [
|
854
|
+
{
|
855
|
+
"type": "expression",
|
856
|
+
"format": "table",
|
857
|
+
"name": "bees",
|
858
|
+
"expression": {
|
859
|
+
"type": "statement",
|
860
|
+
"variant": "select",
|
861
|
+
"from": [],
|
862
|
+
"where": null,
|
863
|
+
"group": null,
|
864
|
+
"result": [],
|
865
|
+
"distinct": false,
|
866
|
+
"all": false,
|
867
|
+
"order": null,
|
868
|
+
"limit": null
|
869
|
+
},
|
870
|
+
"columns": null,
|
871
|
+
"recursive": false
|
872
|
+
}
|
873
|
+
]
|
874
|
+
```
|
875
|
+
|
876
|
+
- `DROP` statement now gives correct `variant` to the `type:'identifier'` node in the `target` property
|
877
|
+
- now, in a `ROLLBACK` statement, the savepoint exists on the `to` property
|
878
|
+
- fixed bind parameter rules and AST so that a named tcl parameter can still have an alias
|
879
|
+
- changed the format for `INSERT`, `WITH`, and `FOREIGN KEY` when using a table name versus a table expression name with a column list. for example, `INSERT INTO cats (a, b, c)` versus `INSERT INTO cats` now have the following differences in formats
|
880
|
+
|
881
|
+
``` json
|
882
|
+
{
|
883
|
+
"into": {
|
884
|
+
"type": "identifier",
|
885
|
+
"variant": "expression",
|
886
|
+
"format": "table",
|
887
|
+
"name": "cats",
|
888
|
+
"columns": [
|
889
|
+
{
|
890
|
+
"type": "identifier",
|
891
|
+
"variant": "column",
|
892
|
+
"name": "a"
|
893
|
+
},
|
894
|
+
{
|
895
|
+
"type": "identifier",
|
896
|
+
"variant": "column",
|
897
|
+
"name": "b"
|
898
|
+
},
|
899
|
+
{
|
900
|
+
"type": "identifier",
|
901
|
+
"variant": "column",
|
902
|
+
"name": "c"
|
903
|
+
}
|
904
|
+
]
|
905
|
+
}
|
906
|
+
}
|
907
|
+
```
|
908
|
+
|
909
|
+
``` json
|
910
|
+
{
|
911
|
+
"into": {
|
912
|
+
"type": "identifier",
|
913
|
+
"variant": "table",
|
914
|
+
"name": "cats",
|
915
|
+
}
|
916
|
+
}
|
917
|
+
```
|
918
|
+
|
919
|
+
- `JOIN` rules so that `USING` clause can be followed by column names enclosed in parenthesis as the previous rule was not the correct behavior
|
920
|
+
- `JOIN` AST modified to have a `constraint` property, instead of `on` and `using`, as a join can only have one of these constraints at a time.
|
921
|
+
- many places in the AST that previously had a string value in the `name` property, such as the `into` property of an `INSERT` statement, now instead have a node of `type` `'identifier'`
|
922
|
+
- `FOREIGN KEY` constraints now have a `references` property that contains an `'expression'` identifier or a `'table'` identifier depending on the query instead of the `target`, `columns`, and `name` properties.
|
923
|
+
- several property values are now being normalized to lowercased strings instead of being passed unmodified to the AST. for example, the `action` property of `action` node now contains a lowercased value.
|
924
|
+
- removed redundant rules that pointed to `name` rule, such as `name_function`, `name_view`, and `name_trigger`.
|
925
|
+
- unquoted identifiers are now normalized to lowercased strings as per the SQL-92 standard. quoted identifiers are not normalized.
|
926
|
+
- SQLite functions are now normalized to lowercase strings in the output AST.
|
927
|
+
- now preventing FOUC when first loading the demo page. also allowing cursor focus on "Syntax Tree" editor so that the contents can be selected and copied to the clipboard.
|
928
|
+
|
929
|
+
## [v0.9.8] - 2015-07-06
|
930
|
+
### Added
|
931
|
+
- new specs for `CREATE TRIGGER` and datatypes
|
932
|
+
|
933
|
+
### Changed
|
934
|
+
- added a bunch of missing descriptions for grammar rules in `grammar.pegjs`
|
935
|
+
- make sure that a `description` is not repeated in smart error message
|
936
|
+
- `comment` rules no longer allow you to put a space between the two symbols at the start and/or end of a comment.
|
937
|
+
|
938
|
+
```
|
939
|
+
SELECT * - - not valid but is being accepted
|
940
|
+
```
|
941
|
+
|
942
|
+
- added some extra helper rules to `CREATE` statement rules to help the tracer avoid traversing the wrong create statement type
|
943
|
+
- allowed characters in identifiers now includes dollar sign `$` and no longer includes dash `-` for unquoted values
|
944
|
+
- Since `SQLite` itself is tolerant of this behavior, although it is non-standard, parser allows single-quoted string literals to be interpreted as aliases.
|
945
|
+
|
946
|
+
``` sql
|
947
|
+
select
|
948
|
+
'hat'.*,
|
949
|
+
COUNT(*) as 'pants'
|
950
|
+
from
|
951
|
+
hats 'hat'
|
952
|
+
```
|
953
|
+
|
954
|
+
- removed `grunt-string-replace` from `devDependencies`
|
955
|
+
- no longer building demo on top of source in `demo/` folder. `grunt live` now puts assets for interactive demo into `.tmp/` folder and then `grunt demo` creates a min bundle in the `demo/` folder
|
956
|
+
- raw source for interactive demo now exists in `src/demo/` folder
|
957
|
+
- now using `grunt-contrib-cssmin` to create single css bundle file for demo
|
958
|
+
|
959
|
+
### Notes
|
960
|
+
- there is way too much magic/nonsense in the `smartError()` method of `Tracer`. need to come up with an alternative approach to getting the right information for syntax errors.
|
961
|
+
|
962
|
+
## [v0.9.1] - 2015-07-05
|
963
|
+
### Changed
|
964
|
+
- removed `private` flag in `package.json` ahead of first published release
|
965
|
+
- pulled out last remnants of `promise` from core `sqlite-parser` lib
|
966
|
+
|
967
|
+
## [v0.9.0] - 2015-07-05
|
968
|
+
### Changed
|
969
|
+
- `sqlite-parser` is now completely **free of runtime dependencies** as `promise` has been removed as a dependency. you can still use the library as a promise-based module, but you have to include and `require('promise')` manually.
|
970
|
+
|
971
|
+
``` javascript
|
972
|
+
// Promise-based usage
|
973
|
+
var Promise = require('promise'),
|
974
|
+
sqliteParser = Promise.denodeify(require('sqlite-parser'));
|
975
|
+
sqliteParser("SELECT * FROM bees")
|
976
|
+
.then(function (res) {
|
977
|
+
// Result AST
|
978
|
+
console.log(res);
|
979
|
+
}, function (err) {
|
980
|
+
// Error
|
981
|
+
console.log(err);
|
982
|
+
});
|
983
|
+
```
|
984
|
+
|
985
|
+
``` javascript
|
986
|
+
// Standard usage
|
987
|
+
var sqliteParser = require('sqlite-parser');
|
988
|
+
sqliteParser("SELECT * FROM bees", function (err, res) {
|
989
|
+
if (err) {
|
990
|
+
// Error
|
991
|
+
console.log(err);
|
992
|
+
} else {
|
993
|
+
// Result AST
|
994
|
+
console.log(res);
|
995
|
+
}
|
996
|
+
});
|
997
|
+
```
|
998
|
+
|
999
|
+
- forked `pegjs` repository as `nwronski/pegjs` to get the changes into `pegjs` core into version control so they are not accidentally overwritten
|
1000
|
+
- getting closer to displaying correct error location when there are multiple statements in the input SQL
|
1001
|
+
|
1002
|
+
### Notes
|
1003
|
+
- Even though the `Tracer` is now pretty good at pinpointing where a SyntaxError occurred, it is still removing `CREATE TABLE` node when there is a failure in the statement, even though that information should be part of the error message.
|
1004
|
+
|
1005
|
+
## [v0.8.0] - 2015-07-04
|
1006
|
+
### Added
|
1007
|
+
- added several array methods (e.g.: `findLast()`, `takeRight()`, `pluck()`) so that I could remove `lodash` as a dependency of the "smart error" `Tracer` class
|
1008
|
+
|
1009
|
+
### Changed
|
1010
|
+
- removed `lodash` dependency in core `Tracer`. `lodash` is now only a `devDependency` again!
|
1011
|
+
|
1012
|
+
### Notes
|
1013
|
+
- considering removing the `promise` dependency from the core `sqlite-parser` library before `v1.0.0`, as well, so that the parser can be dependency free as a standalone library. people could choose to "promisify" the parser or just use it synchronously instead of being forced to bundle the `promise` dependency when bundling this package for use in the browser. It actually looks like all the evergreen browsers except IE currently support a native `Promise` implementation, so having a non-native `Promise` implementation as a dependency will probably be obsolete pretty soon.
|
1014
|
+
|
1015
|
+
## [v0.7.0] - 2015-07-02
|
1016
|
+
### Added
|
1017
|
+
- additional rule descriptions in `grammar.pegjs`
|
1018
|
+
|
1019
|
+
### Fixed
|
1020
|
+
- fixed error reporting when there is more than one statement in the input SQL.
|
1021
|
+
- still need to make sure previous tree is not used if a subsequent statement has an error at the highest level
|
1022
|
+
|
1023
|
+
``` sql
|
1024
|
+
SELECT *
|
1025
|
+
FROM cats;
|
1026
|
+
SELECT * d
|
1027
|
+
```
|
1028
|
+
|
1029
|
+
- fixed rules for double-quoted, backticked, and bracketed identifiers to allow for escapes, leading or trailing spaces, and the full character set that is legal for quoted identifiers, where allowed.
|
1030
|
+
- fixed datatype names that did not display correctly in generated AST. fixed string literal definition to allow all possible input
|
1031
|
+
- fixed value format for direction key in `PRIMARY KEY` table conatrainsts
|
1032
|
+
- do not show parenthesis in error message for syntax error when there is nothing to put inside them.
|
1033
|
+
- fixes for css in demo. for example, demo layout off by 1px when at smallest resolution, did a lot of cleanup on demo styles, responsive layout, error notification. also, changed error message format for smart errors.
|
1034
|
+
|
1035
|
+
### Notes
|
1036
|
+
- to support the "smart errors" changes were made to the `pegjs` library code in `lib/compiler/passes/generate-javascript.js`. this was done to allow `Tracer` to get the `description` names for the rules that are referenced in the error messages. will need to fork `pegjs` to get the changes to `pegjs` core into version control so they are not accidentally overwritten.
|
1037
|
+
|
1038
|
+
## [v0.6.0] - 2015-07-01
|
1039
|
+
### Changed
|
1040
|
+
- updated grammar to remove all dependence on `modifier` clause as it was being used as a catch-all clause for stray parts of statements
|
1041
|
+
- created `defer` clause
|
1042
|
+
- normalized format for common clauses and nodes across different statement types
|
1043
|
+
- removed `range` variant that was part of `BETWEEN` expressions
|
1044
|
+
- renamed several clauses to match the SQL keywords and/or SQLite manual descriptions used to define them
|
1045
|
+
- for `WITHOUT ROWID` in `CREATE TABLE`: `modifier` -> `optimization`
|
1046
|
+
- for `IF NOT EXISTS` in all places: `modifier`: `condition`
|
1047
|
+
|
1048
|
+
## [v0.5.1] - 2015-06-30
|
1049
|
+
### Fixed
|
1050
|
+
- accidentally repeating first `description` in the error thrown from the `smartError()` method of `Tracer`
|
1051
|
+
|
1052
|
+
> There is a syntax error near **FROM Clause** [**FROM Clause**, Table Identifier]
|
1053
|
+
|
1054
|
+
## [v0.5.0] - 2015-06-30
|
1055
|
+
### Added
|
1056
|
+
- turned tracer/smart error code into a `Tracer` class located at `tracer.js` in `src/`
|
1057
|
+
|
1058
|
+
``` javascript
|
1059
|
+
var t = Tracer();
|
1060
|
+
return new Promise(function(resolve, reject) {
|
1061
|
+
resolve(parser.parse(source, {
|
1062
|
+
'tracer': t
|
1063
|
+
}));
|
1064
|
+
})
|
1065
|
+
.catch(function (err) {
|
1066
|
+
t.smartError(err);
|
1067
|
+
});
|
1068
|
+
```
|
1069
|
+
|
1070
|
+
### Changed
|
1071
|
+
- cleaned up smart error code to follow the most relevant error path of the `pegjs` trace output
|
1072
|
+
|
1073
|
+
### Notes
|
1074
|
+
- need to remove the `lodash` dependency from `Tracer` before v1.0.0
|
1075
|
+
|
1076
|
+
## [v0.4.1] - 2015-06-30
|
1077
|
+
### Added
|
1078
|
+
- smarter error messages using rule descriptions and tracer functionality in newest `pegjs`
|
1079
|
+
|
1080
|
+
### Changed
|
1081
|
+
- `parseError1.sql` spec updated for new smarter error syntax
|
1082
|
+
|
1083
|
+
## [v0.4.0] - 2015-06-27
|
1084
|
+
### Added
|
1085
|
+
- `sqlite-parser` demo
|
1086
|
+
- `demo/` folder containing interactive demo of parser. demo JavaScript is all in a self-contained, browserified package
|
1087
|
+
- `browserify` task added to `Gruntfile.js` for creating `sqlite-parser-demo.js` in `demo/` as `grunt demo` and a watcher/livereload version as `grunt interactive`
|
1088
|
+
- `CodeMirror` dependency into `devDependencies`
|
1089
|
+
- updated `TODO.md` and `.npmignore` for new Interactive demo
|
1090
|
+
- `sqlite-parser` distributable
|
1091
|
+
- `browserify` task added to `Gruntfile.js` for creating `sqlite-parser-dist.js` in `dist/` as `grunt dist`
|
1092
|
+
- attaches a single function to `window` as `sqliteParser`
|
1093
|
+
- some missing names for grammar rules
|
1094
|
+
|
1095
|
+
### Changed
|
1096
|
+
- renamed `parse.jsr` and `util.js` files in `src/` and `lib/` folders
|
1097
|
+
- pointing to latest `pegjs` master to get latest `SyntaxError` format
|
1098
|
+
|
1099
|
+
## [v0.3.1] - 2015-06-25
|
1100
|
+
### Added
|
1101
|
+
- `LICENSE` file added
|
1102
|
+
- `.npmignore` file added
|
1103
|
+
|
1104
|
+
### Changed
|
1105
|
+
- updated package dependencies
|
1106
|
+
- `index.js` file moved to file root, duplicate copies in `lib/` and `src/` removed
|
1107
|
+
- going to try and keep (most significant) version numbers synchronized between `sqlite-parser` and `sqlite-tree` to avoid confusion going forward
|
1108
|
+
|
1109
|
+
## [v0.3.0] - 2015-06-25
|
1110
|
+
### Added
|
1111
|
+
- allow subquery in parenthesis within `FROM` clause
|
1112
|
+
- New specs: Basic Drop Table, Basic Drop Trigger, Basic Function, Basic Subquery, Basic Union, Create Check 1, Create Check 2, Create Foreign Key 1, Create Foreign Key 2, Create Primary Key 1, Create Table Alt Syntax, Expression Like, Expression Table 1, Expression Unary 1, Function Mixed Args, Insert Into Default, Join Types 1, Join Types 2, Select Parts 1, Select Qualified Table 1, Transaction Rollback
|
1113
|
+
|
1114
|
+
### Changed
|
1115
|
+
- allow multiple expressions for `GROUP BY` clause
|
1116
|
+
|
1117
|
+
``` sql
|
1118
|
+
SELECT color, type, name
|
1119
|
+
FROM hats
|
1120
|
+
GROUP BY type, color
|
1121
|
+
```
|
1122
|
+
|
1123
|
+
- changed AST for create table, constraints, joins, select parts, transactions, unions, triggers to pass new specs
|
1124
|
+
- `INSERT` statement `VALUES` clause AST normalized for value lists and `DEFAULT VALUES`
|
1125
|
+
|
1126
|
+
``` json
|
1127
|
+
{
|
1128
|
+
"type": "values",
|
1129
|
+
"variant": "list",
|
1130
|
+
"values": []
|
1131
|
+
},
|
1132
|
+
{
|
1133
|
+
"type": "values",
|
1134
|
+
"variant": "default",
|
1135
|
+
"values": null
|
1136
|
+
}
|
1137
|
+
```
|
1138
|
+
|
1139
|
+
- normalized AST across all column constraints and table constraints. all table constraints are `{"type": "definition", "variant": "constraint"}` and contain a `definition` array that contains the constraint. the constraint in `definitions` has the same format as the column constraint definition.
|
1140
|
+
|
1141
|
+
## [v0.2.3] - 2015-06-24
|
1142
|
+
### Fixed
|
1143
|
+
- allow for nested parenthesis
|
1144
|
+
- allow multiple binary expressions and concatenation operators within parenthesis
|
1145
|
+
|
1146
|
+
``` sql
|
1147
|
+
SELECT *
|
1148
|
+
FROM hats
|
1149
|
+
WHERE
|
1150
|
+
hat OR (shirt AND (shoes OR wig) AND pants)
|
1151
|
+
```
|
1152
|
+
|
1153
|
+
## [v0.2.2] - 2015-06-24
|
1154
|
+
### Fixed
|
1155
|
+
- The `CREATE VIRTUAL TABLE` statement previously only worked with expression arguments. Fixed by checking for a column name followed by a type definition or column constraint before assuming the type is an expression list, if these things are found, then treat the arguments as a set of source definitions as in a creation statement for a table.
|
1156
|
+
|
1157
|
+
``` sql
|
1158
|
+
CREATE VIRTUAL TABLE happy_table
|
1159
|
+
USING happy_module(...);
|
1160
|
+
|
1161
|
+
id int -- treat as definitions for CREATE TABLE
|
1162
|
+
x != 2 -- treat as an expression list
|
1163
|
+
```
|
1164
|
+
|
1165
|
+
## [v0.2.1] - 2015-06-23
|
1166
|
+
### Added
|
1167
|
+
- `CREATE VIEW` syntax and AST
|
1168
|
+
- specs for `CREATE VIEW` statement
|
1169
|
+
- `CREATE VIRTUAL TABLE` syntax and AST
|
1170
|
+
- specs for `CREATE VIRTUAL TABLE` statement
|
1171
|
+
|
1172
|
+
### Notes
|
1173
|
+
- `CREATE VIRTUAL TABLE` currently only works with expression arguments and does not support passing column definitions and/or table constraint definitions as is allowed in the SQLite spec for virtual table module arguments.
|
1174
|
+
|
1175
|
+
``` sql
|
1176
|
+
CREATE VIRTUAL TABLE vtrl_ads
|
1177
|
+
USING tbl_creator(
|
1178
|
+
id int PRIMARY KEY,
|
1179
|
+
name varchar(50),
|
1180
|
+
category varchar(15),
|
1181
|
+
cost int);
|
1182
|
+
```
|
1183
|
+
|
1184
|
+
## [v0.2.0] - 2015-06-23
|
1185
|
+
### Added
|
1186
|
+
- `CREATE TRIGGER` syntax and AST
|
1187
|
+
- specs for `CREATE TRIGGER` statement
|
1188
|
+
- specs for some expression grouping issues that were experienced when using binary and unary expressions along with `AND`, `OR`
|
1189
|
+
|
1190
|
+
``` sql
|
1191
|
+
CREATE INDEX `bees`.`hive_state`
|
1192
|
+
ON `hive` (`happiness` ASC, `anger` DESC)
|
1193
|
+
WHERE
|
1194
|
+
`happiness` ISNULL AND `anger` > 0
|
1195
|
+
```
|
1196
|
+
|
1197
|
+
### Changed
|
1198
|
+
- updated rules and specs to remove use of `modifier` property in AST
|
1199
|
+
|
1200
|
+
## [v0.1.1] - 2015-06-22
|
1201
|
+
### Added
|
1202
|
+
- rules for `CREATE INDEX`
|
1203
|
+
- specs for `CREATE INDEX` statement
|
1204
|
+
|
1205
|
+
### Fixed
|
1206
|
+
- some grouping errors for unary operators, unary null and binary concatenation
|
1207
|
+
|
1208
|
+
## [v0.1.0] - 2015-06-19
|
1209
|
+
### Added
|
1210
|
+
- rules line and block comments
|
1211
|
+
- specs for comment types
|
1212
|
+
|
1213
|
+
``` sql
|
1214
|
+
-- Line comment
|
1215
|
+
/*
|
1216
|
+
* Block comment /* nested comment */
|
1217
|
+
*/
|
1218
|
+
```
|
1219
|
+
|
1220
|
+
## [v0.0.9] - 2015-06-18
|
1221
|
+
### Added
|
1222
|
+
- rules and AST for `RAISE`, compound queries `UNION` types, `ESCAPE`
|
1223
|
+
|
1224
|
+
### Fixed
|
1225
|
+
- failing specs for missing columns key and incorrect AST for `SELECT` statements
|
1226
|
+
|
1227
|
+
## [v0.0.8] - 2015-06-17
|
1228
|
+
### Added
|
1229
|
+
- massive cleanup of parser rules
|
1230
|
+
- allow select statement as expression
|
1231
|
+
|
1232
|
+
### Changed
|
1233
|
+
- `FOREIGN KEY` column constraint rules
|
1234
|
+
- definition for AST and rules for `FOREIGN KEY` and `PRIMARY KEY` table constraints
|
1235
|
+
|
1236
|
+
### Fixed
|
1237
|
+
- `ORDER BY` as binary concat operation bug
|
1238
|
+
- needed missing type attribute on `CHECK` and `FOREIGN KEY`
|
1239
|
+
- missing index key in table `FROM` sources
|
1240
|
+
|
1241
|
+
## [v0.0.7] - 2015-06-15
|
1242
|
+
### Added
|
1243
|
+
- First working version of sqlite-parser
|
1244
|
+
|
1245
|
+
[unreleased]: https://github.com/codeschool/sqlite-parser/compare/v1.0.1...HEAD
|
1246
|
+
[v1.0.1]: https://github.com/codeschool/sqlite-parser/compare/v1.0.0...v1.0.1
|
1247
|
+
[v1.0.0]: https://github.com/codeschool/sqlite-parser/compare/v0.14.5...v1.0.0
|
1248
|
+
[v0.14.5]: https://github.com/codeschool/sqlite-parser/compare/v0.14.4...v0.14.5
|
1249
|
+
[v0.14.4]: https://github.com/codeschool/sqlite-parser/compare/v0.14.3...v0.14.4
|
1250
|
+
[v0.14.3]: https://github.com/codeschool/sqlite-parser/compare/v0.14.2...v0.14.3
|
1251
|
+
[v0.14.2]: https://github.com/codeschool/sqlite-parser/compare/v0.14.1...v0.14.2
|
1252
|
+
[v0.14.1]: https://github.com/codeschool/sqlite-parser/compare/v0.14.0...v0.14.1
|
1253
|
+
[v0.14.0]: https://github.com/codeschool/sqlite-parser/compare/v0.11.3...v0.14.0
|
1254
|
+
[v0.11.3]: https://github.com/codeschool/sqlite-parser/compare/v0.11.2...v0.11.3
|
1255
|
+
[v0.11.2]: https://github.com/codeschool/sqlite-parser/compare/v0.11.0...v0.11.2
|
1256
|
+
[v0.11.0]: https://github.com/codeschool/sqlite-parser/compare/v0.10.2...v0.11.0
|
1257
|
+
[v0.10.2]: https://github.com/codeschool/sqlite-parser/compare/v0.9.8...v0.10.2
|
1258
|
+
[v0.9.8]: https://github.com/codeschool/sqlite-parser/compare/v0.9.1...v0.9.8
|
1259
|
+
[v0.9.1]: https://github.com/codeschool/sqlite-parser/compare/v0.8.0...v0.9.1
|
1260
|
+
[v0.8.0]: https://github.com/codeschool/sqlite-parser/compare/v0.6.0...v0.8.0
|
1261
|
+
[v0.6.0]: https://github.com/codeschool/sqlite-parser/compare/v0.3.1...v0.6.0
|
1262
|
+
[v0.3.1]: https://github.com/codeschool/sqlite-parser/compare/6388118d601a89d011ecd6f5c215bbc9763444db...v0.3.1
|
1263
|
+
[v0.1.1]: https://github.com/codeschool/sqlite-parser/commit/6388118d601a89d011ecd6f5c215bbc9763444db
|