From 1c3d9f694cb04e8cfb09170f9e7f5aae1044104c Mon Sep 17 00:00:00 2001 From: directlx Date: Sat, 24 Jan 2026 18:58:24 -0500 Subject: [PATCH] Initial commit --- .env.example | 8 + README.md | 195 + __pycache__/config.cpython-312.pyc | Bin 0 -> 1771 bytes __pycache__/models.cpython-312.pyc | Bin 0 -> 9066 bytes app.py | 318 + config.py | 32 + deploy.sh | 60 + directlx.service | 16 + instance/directlx.db | Bin 0 -> 45056 bytes models.py | 120 + nginx.conf | 22 + node_modules/.bin/cssesc | 1 + node_modules/.bin/jiti | 1 + node_modules/.bin/nanoid | 1 + node_modules/.bin/resolve | 1 + node_modules/.bin/sucrase | 1 + node_modules/.bin/sucrase-node | 1 + node_modules/.bin/tailwind | 1 + node_modules/.bin/tailwindcss | 1 + node_modules/.package-lock.json | 998 + node_modules/@alloc/quick-lru/index.d.ts | 128 + node_modules/@alloc/quick-lru/index.js | 263 + node_modules/@alloc/quick-lru/license | 9 + node_modules/@alloc/quick-lru/package.json | 43 + node_modules/@alloc/quick-lru/readme.md | 139 + node_modules/@jridgewell/gen-mapping/LICENSE | 19 + .../@jridgewell/gen-mapping/README.md | 227 + .../gen-mapping/dist/gen-mapping.mjs | 292 + .../gen-mapping/dist/gen-mapping.mjs.map | 6 + .../gen-mapping/dist/gen-mapping.umd.js | 358 + .../gen-mapping/dist/gen-mapping.umd.js.map | 6 + .../gen-mapping/dist/types/gen-mapping.d.ts | 88 + .../gen-mapping/dist/types/set-array.d.ts | 32 + .../dist/types/sourcemap-segment.d.ts | 12 + .../gen-mapping/dist/types/types.d.ts | 43 + .../@jridgewell/gen-mapping/package.json | 67 + .../gen-mapping/src/gen-mapping.ts | 614 + .../@jridgewell/gen-mapping/src/set-array.ts | 82 + .../gen-mapping/src/sourcemap-segment.ts | 16 + .../@jridgewell/gen-mapping/src/types.ts | 61 + .../gen-mapping/types/gen-mapping.d.cts | 89 + .../gen-mapping/types/gen-mapping.d.cts.map | 1 + .../gen-mapping/types/gen-mapping.d.mts | 89 + .../gen-mapping/types/gen-mapping.d.mts.map | 1 + .../gen-mapping/types/set-array.d.cts | 33 + .../gen-mapping/types/set-array.d.cts.map | 1 + .../gen-mapping/types/set-array.d.mts | 33 + .../gen-mapping/types/set-array.d.mts.map | 1 + .../gen-mapping/types/sourcemap-segment.d.cts | 13 + .../types/sourcemap-segment.d.cts.map | 1 + .../gen-mapping/types/sourcemap-segment.d.mts | 13 + .../types/sourcemap-segment.d.mts.map | 1 + .../@jridgewell/gen-mapping/types/types.d.cts | 44 + .../gen-mapping/types/types.d.cts.map | 1 + .../@jridgewell/gen-mapping/types/types.d.mts | 44 + .../gen-mapping/types/types.d.mts.map | 1 + node_modules/@jridgewell/resolve-uri/LICENSE | 19 + .../@jridgewell/resolve-uri/README.md | 40 + .../resolve-uri/dist/resolve-uri.mjs | 232 + .../resolve-uri/dist/resolve-uri.mjs.map | 1 + .../resolve-uri/dist/resolve-uri.umd.js | 240 + .../resolve-uri/dist/resolve-uri.umd.js.map | 1 + .../resolve-uri/dist/types/resolve-uri.d.ts | 4 + .../@jridgewell/resolve-uri/package.json | 69 + .../@jridgewell/sourcemap-codec/LICENSE | 19 + .../@jridgewell/sourcemap-codec/README.md | 264 + .../sourcemap-codec/dist/sourcemap-codec.mjs | 423 + .../dist/sourcemap-codec.mjs.map | 6 + .../dist/sourcemap-codec.umd.js | 464 + .../dist/sourcemap-codec.umd.js.map | 6 + .../@jridgewell/sourcemap-codec/package.json | 63 + .../@jridgewell/sourcemap-codec/src/scopes.ts | 345 + .../sourcemap-codec/src/sourcemap-codec.ts | 111 + .../sourcemap-codec/src/strings.ts | 65 + .../@jridgewell/sourcemap-codec/src/vlq.ts | 55 + .../sourcemap-codec/types/scopes.d.cts | 50 + .../sourcemap-codec/types/scopes.d.cts.map | 1 + .../sourcemap-codec/types/scopes.d.mts | 50 + .../sourcemap-codec/types/scopes.d.mts.map | 1 + .../types/sourcemap-codec.d.cts | 9 + .../types/sourcemap-codec.d.cts.map | 1 + .../types/sourcemap-codec.d.mts | 9 + .../types/sourcemap-codec.d.mts.map | 1 + .../sourcemap-codec/types/strings.d.cts | 16 + .../sourcemap-codec/types/strings.d.cts.map | 1 + .../sourcemap-codec/types/strings.d.mts | 16 + .../sourcemap-codec/types/strings.d.mts.map | 1 + .../sourcemap-codec/types/vlq.d.cts | 7 + .../sourcemap-codec/types/vlq.d.cts.map | 1 + .../sourcemap-codec/types/vlq.d.mts | 7 + .../sourcemap-codec/types/vlq.d.mts.map | 1 + .../@jridgewell/trace-mapping/LICENSE | 19 + .../@jridgewell/trace-mapping/README.md | 348 + .../trace-mapping/dist/trace-mapping.mjs | 493 + .../trace-mapping/dist/trace-mapping.mjs.map | 6 + .../trace-mapping/dist/trace-mapping.umd.js | 559 + .../dist/trace-mapping.umd.js.map | 6 + .../@jridgewell/trace-mapping/package.json | 67 + .../trace-mapping/src/binary-search.ts | 115 + .../trace-mapping/src/by-source.ts | 41 + .../trace-mapping/src/flatten-map.ts | 192 + .../@jridgewell/trace-mapping/src/resolve.ts | 16 + .../@jridgewell/trace-mapping/src/sort.ts | 45 + .../trace-mapping/src/sourcemap-segment.ts | 23 + .../trace-mapping/src/strip-filename.ts | 8 + .../trace-mapping/src/trace-mapping.ts | 502 + .../@jridgewell/trace-mapping/src/types.ts | 114 + .../trace-mapping/types/binary-search.d.cts | 33 + .../types/binary-search.d.cts.map | 1 + .../trace-mapping/types/binary-search.d.mts | 33 + .../types/binary-search.d.mts.map | 1 + .../trace-mapping/types/by-source.d.cts | 4 + .../trace-mapping/types/by-source.d.cts.map | 1 + .../trace-mapping/types/by-source.d.mts | 4 + .../trace-mapping/types/by-source.d.mts.map | 1 + .../trace-mapping/types/flatten-map.d.cts | 9 + .../trace-mapping/types/flatten-map.d.cts.map | 1 + .../trace-mapping/types/flatten-map.d.mts | 9 + .../trace-mapping/types/flatten-map.d.mts.map | 1 + .../trace-mapping/types/resolve.d.cts | 4 + .../trace-mapping/types/resolve.d.cts.map | 1 + .../trace-mapping/types/resolve.d.mts | 4 + .../trace-mapping/types/resolve.d.mts.map | 1 + .../trace-mapping/types/sort.d.cts | 4 + .../trace-mapping/types/sort.d.cts.map | 1 + .../trace-mapping/types/sort.d.mts | 4 + .../trace-mapping/types/sort.d.mts.map | 1 + .../types/sourcemap-segment.d.cts | 17 + .../types/sourcemap-segment.d.cts.map | 1 + .../types/sourcemap-segment.d.mts | 17 + .../types/sourcemap-segment.d.mts.map | 1 + .../trace-mapping/types/strip-filename.d.cts | 5 + .../types/strip-filename.d.cts.map | 1 + .../trace-mapping/types/strip-filename.d.mts | 5 + .../types/strip-filename.d.mts.map | 1 + .../trace-mapping/types/trace-mapping.d.cts | 80 + .../types/trace-mapping.d.cts.map | 1 + .../trace-mapping/types/trace-mapping.d.mts | 80 + .../types/trace-mapping.d.mts.map | 1 + .../trace-mapping/types/types.d.cts | 107 + .../trace-mapping/types/types.d.cts.map | 1 + .../trace-mapping/types/types.d.mts | 107 + .../trace-mapping/types/types.d.mts.map | 1 + node_modules/@nodelib/fs.scandir/LICENSE | 21 + node_modules/@nodelib/fs.scandir/README.md | 171 + .../@nodelib/fs.scandir/out/adapters/fs.d.ts | 20 + .../@nodelib/fs.scandir/out/adapters/fs.js | 19 + .../@nodelib/fs.scandir/out/constants.d.ts | 4 + .../@nodelib/fs.scandir/out/constants.js | 17 + .../@nodelib/fs.scandir/out/index.d.ts | 12 + node_modules/@nodelib/fs.scandir/out/index.js | 26 + .../fs.scandir/out/providers/async.d.ts | 7 + .../fs.scandir/out/providers/async.js | 104 + .../fs.scandir/out/providers/common.d.ts | 1 + .../fs.scandir/out/providers/common.js | 13 + .../fs.scandir/out/providers/sync.d.ts | 5 + .../@nodelib/fs.scandir/out/providers/sync.js | 54 + .../@nodelib/fs.scandir/out/settings.d.ts | 20 + .../@nodelib/fs.scandir/out/settings.js | 24 + .../@nodelib/fs.scandir/out/types/index.d.ts | 20 + .../@nodelib/fs.scandir/out/types/index.js | 2 + .../@nodelib/fs.scandir/out/utils/fs.d.ts | 2 + .../@nodelib/fs.scandir/out/utils/fs.js | 19 + .../@nodelib/fs.scandir/out/utils/index.d.ts | 2 + .../@nodelib/fs.scandir/out/utils/index.js | 5 + node_modules/@nodelib/fs.scandir/package.json | 44 + node_modules/@nodelib/fs.stat/LICENSE | 21 + node_modules/@nodelib/fs.stat/README.md | 126 + .../@nodelib/fs.stat/out/adapters/fs.d.ts | 13 + .../@nodelib/fs.stat/out/adapters/fs.js | 17 + node_modules/@nodelib/fs.stat/out/index.d.ts | 12 + node_modules/@nodelib/fs.stat/out/index.js | 26 + .../@nodelib/fs.stat/out/providers/async.d.ts | 4 + .../@nodelib/fs.stat/out/providers/async.js | 36 + .../@nodelib/fs.stat/out/providers/sync.d.ts | 3 + .../@nodelib/fs.stat/out/providers/sync.js | 23 + .../@nodelib/fs.stat/out/settings.d.ts | 16 + node_modules/@nodelib/fs.stat/out/settings.js | 16 + .../@nodelib/fs.stat/out/types/index.d.ts | 4 + .../@nodelib/fs.stat/out/types/index.js | 2 + node_modules/@nodelib/fs.stat/package.json | 37 + node_modules/@nodelib/fs.walk/LICENSE | 21 + node_modules/@nodelib/fs.walk/README.md | 215 + node_modules/@nodelib/fs.walk/out/index.d.ts | 14 + node_modules/@nodelib/fs.walk/out/index.js | 34 + .../@nodelib/fs.walk/out/providers/async.d.ts | 12 + .../@nodelib/fs.walk/out/providers/async.js | 30 + .../@nodelib/fs.walk/out/providers/index.d.ts | 4 + .../@nodelib/fs.walk/out/providers/index.js | 9 + .../fs.walk/out/providers/stream.d.ts | 12 + .../@nodelib/fs.walk/out/providers/stream.js | 34 + .../@nodelib/fs.walk/out/providers/sync.d.ts | 10 + .../@nodelib/fs.walk/out/providers/sync.js | 14 + .../@nodelib/fs.walk/out/readers/async.d.ts | 30 + .../@nodelib/fs.walk/out/readers/async.js | 97 + .../@nodelib/fs.walk/out/readers/common.d.ts | 7 + .../@nodelib/fs.walk/out/readers/common.js | 31 + .../@nodelib/fs.walk/out/readers/reader.d.ts | 6 + .../@nodelib/fs.walk/out/readers/reader.js | 11 + .../@nodelib/fs.walk/out/readers/sync.d.ts | 15 + .../@nodelib/fs.walk/out/readers/sync.js | 59 + .../@nodelib/fs.walk/out/settings.d.ts | 30 + node_modules/@nodelib/fs.walk/out/settings.js | 26 + .../@nodelib/fs.walk/out/types/index.d.ts | 8 + .../@nodelib/fs.walk/out/types/index.js | 2 + node_modules/@nodelib/fs.walk/package.json | 44 + node_modules/any-promise/.jshintrc | 4 + node_modules/any-promise/.npmignore | 7 + node_modules/any-promise/LICENSE | 19 + node_modules/any-promise/README.md | 161 + node_modules/any-promise/implementation.d.ts | 3 + node_modules/any-promise/implementation.js | 1 + node_modules/any-promise/index.d.ts | 73 + node_modules/any-promise/index.js | 1 + node_modules/any-promise/loader.js | 78 + node_modules/any-promise/optional.js | 6 + node_modules/any-promise/package.json | 45 + node_modules/any-promise/register-shim.js | 18 + node_modules/any-promise/register.d.ts | 17 + node_modules/any-promise/register.js | 94 + .../any-promise/register/bluebird.d.ts | 1 + node_modules/any-promise/register/bluebird.js | 2 + .../any-promise/register/es6-promise.d.ts | 1 + .../any-promise/register/es6-promise.js | 2 + node_modules/any-promise/register/lie.d.ts | 1 + node_modules/any-promise/register/lie.js | 2 + .../register/native-promise-only.d.ts | 1 + .../register/native-promise-only.js | 2 + node_modules/any-promise/register/pinkie.d.ts | 1 + node_modules/any-promise/register/pinkie.js | 2 + .../any-promise/register/promise.d.ts | 1 + node_modules/any-promise/register/promise.js | 2 + node_modules/any-promise/register/q.d.ts | 1 + node_modules/any-promise/register/q.js | 2 + node_modules/any-promise/register/rsvp.d.ts | 1 + node_modules/any-promise/register/rsvp.js | 2 + node_modules/any-promise/register/vow.d.ts | 1 + node_modules/any-promise/register/vow.js | 2 + node_modules/any-promise/register/when.d.ts | 1 + node_modules/any-promise/register/when.js | 2 + node_modules/anymatch/LICENSE | 15 + node_modules/anymatch/README.md | 87 + node_modules/anymatch/index.d.ts | 20 + node_modules/anymatch/index.js | 104 + node_modules/anymatch/package.json | 48 + node_modules/arg/LICENSE.md | 21 + node_modules/arg/README.md | 317 + node_modules/arg/index.d.ts | 44 + node_modules/arg/index.js | 195 + node_modules/arg/package.json | 28 + .../binary-extensions/binary-extensions.json | 263 + .../binary-extensions.json.d.ts | 3 + node_modules/binary-extensions/index.d.ts | 14 + node_modules/binary-extensions/index.js | 1 + node_modules/binary-extensions/license | 10 + node_modules/binary-extensions/package.json | 40 + node_modules/binary-extensions/readme.md | 25 + node_modules/braces/LICENSE | 21 + node_modules/braces/README.md | 586 + node_modules/braces/index.js | 170 + node_modules/braces/lib/compile.js | 60 + node_modules/braces/lib/constants.js | 57 + node_modules/braces/lib/expand.js | 113 + node_modules/braces/lib/parse.js | 331 + node_modules/braces/lib/stringify.js | 32 + node_modules/braces/lib/utils.js | 122 + node_modules/braces/package.json | 77 + node_modules/camelcase-css/README.md | 27 + node_modules/camelcase-css/index-es5.js | 24 + node_modules/camelcase-css/index.js | 30 + node_modules/camelcase-css/license | 21 + node_modules/camelcase-css/package.json | 34 + node_modules/chokidar/LICENSE | 21 + node_modules/chokidar/README.md | 308 + node_modules/chokidar/index.js | 973 + node_modules/chokidar/lib/constants.js | 66 + node_modules/chokidar/lib/fsevents-handler.js | 526 + node_modules/chokidar/lib/nodefs-handler.js | 654 + .../node_modules/glob-parent/CHANGELOG.md | 110 + .../chokidar/node_modules/glob-parent/LICENSE | 15 + .../node_modules/glob-parent/README.md | 137 + .../node_modules/glob-parent/index.js | 42 + .../node_modules/glob-parent/package.json | 48 + node_modules/chokidar/package.json | 70 + node_modules/chokidar/types/index.d.ts | 192 + node_modules/commander/CHANGELOG.md | 436 + node_modules/commander/LICENSE | 22 + node_modules/commander/Readme.md | 713 + node_modules/commander/index.js | 1649 + node_modules/commander/package.json | 41 + node_modules/commander/typings/index.d.ts | 311 + node_modules/cssesc/LICENSE-MIT.txt | 20 + node_modules/cssesc/README.md | 201 + node_modules/cssesc/bin/cssesc | 116 + node_modules/cssesc/cssesc.js | 110 + node_modules/cssesc/man/cssesc.1 | 70 + node_modules/cssesc/package.json | 51 + node_modules/didyoumean/LICENSE | 14 + node_modules/didyoumean/README.md | 134 + node_modules/didyoumean/didYouMean-1.2.1.js | 274 + .../didyoumean/didYouMean-1.2.1.min.js | 17 + node_modules/didyoumean/package.json | 27 + node_modules/dlv/README.md | 76 + node_modules/dlv/dist/dlv.es.js | 2 + node_modules/dlv/dist/dlv.es.js.map | 1 + node_modules/dlv/dist/dlv.js | 2 + node_modules/dlv/dist/dlv.js.map | 1 + node_modules/dlv/dist/dlv.umd.js | 2 + node_modules/dlv/dist/dlv.umd.js.map | 1 + node_modules/dlv/index.js | 7 + node_modules/dlv/package.json | 30 + node_modules/fast-glob/LICENSE | 21 + node_modules/fast-glob/README.md | 830 + .../node_modules/glob-parent/CHANGELOG.md | 110 + .../node_modules/glob-parent/LICENSE | 15 + .../node_modules/glob-parent/README.md | 137 + .../node_modules/glob-parent/index.js | 42 + .../node_modules/glob-parent/package.json | 48 + node_modules/fast-glob/out/index.d.ts | 40 + node_modules/fast-glob/out/index.js | 102 + .../fast-glob/out/managers/tasks.d.ts | 22 + node_modules/fast-glob/out/managers/tasks.js | 110 + .../fast-glob/out/providers/async.d.ts | 9 + node_modules/fast-glob/out/providers/async.js | 23 + .../fast-glob/out/providers/filters/deep.d.ts | 16 + .../fast-glob/out/providers/filters/deep.js | 62 + .../out/providers/filters/entry.d.ts | 17 + .../fast-glob/out/providers/filters/entry.js | 85 + .../out/providers/filters/error.d.ts | 8 + .../fast-glob/out/providers/filters/error.js | 15 + .../out/providers/matchers/matcher.d.ts | 33 + .../out/providers/matchers/matcher.js | 45 + .../out/providers/matchers/partial.d.ts | 4 + .../out/providers/matchers/partial.js | 38 + .../fast-glob/out/providers/provider.d.ts | 19 + .../fast-glob/out/providers/provider.js | 48 + .../fast-glob/out/providers/stream.d.ts | 11 + .../fast-glob/out/providers/stream.js | 31 + .../fast-glob/out/providers/sync.d.ts | 9 + node_modules/fast-glob/out/providers/sync.js | 23 + .../out/providers/transformers/entry.d.ts | 8 + .../out/providers/transformers/entry.js | 26 + node_modules/fast-glob/out/readers/async.d.ts | 10 + node_modules/fast-glob/out/readers/async.js | 35 + .../fast-glob/out/readers/reader.d.ts | 15 + node_modules/fast-glob/out/readers/reader.js | 33 + .../fast-glob/out/readers/stream.d.ts | 14 + node_modules/fast-glob/out/readers/stream.js | 55 + node_modules/fast-glob/out/readers/sync.d.ts | 12 + node_modules/fast-glob/out/readers/sync.js | 43 + node_modules/fast-glob/out/settings.d.ts | 164 + node_modules/fast-glob/out/settings.js | 59 + node_modules/fast-glob/out/types/index.d.ts | 31 + node_modules/fast-glob/out/types/index.js | 2 + node_modules/fast-glob/out/utils/array.d.ts | 2 + node_modules/fast-glob/out/utils/array.js | 22 + node_modules/fast-glob/out/utils/errno.d.ts | 2 + node_modules/fast-glob/out/utils/errno.js | 7 + node_modules/fast-glob/out/utils/fs.d.ts | 4 + node_modules/fast-glob/out/utils/fs.js | 19 + node_modules/fast-glob/out/utils/index.d.ts | 8 + node_modules/fast-glob/out/utils/index.js | 17 + node_modules/fast-glob/out/utils/path.d.ts | 13 + node_modules/fast-glob/out/utils/path.js | 68 + node_modules/fast-glob/out/utils/pattern.d.ts | 49 + node_modules/fast-glob/out/utils/pattern.js | 206 + node_modules/fast-glob/out/utils/stream.d.ts | 4 + node_modules/fast-glob/out/utils/stream.js | 17 + node_modules/fast-glob/out/utils/string.d.ts | 2 + node_modules/fast-glob/out/utils/string.js | 11 + node_modules/fast-glob/package.json | 81 + node_modules/fastq/LICENSE | 13 + node_modules/fastq/README.md | 310 + node_modules/fastq/SECURITY.md | 15 + node_modules/fastq/bench.js | 66 + node_modules/fastq/eslint.config.js | 11 + node_modules/fastq/example.js | 14 + node_modules/fastq/example.mjs | 9 + node_modules/fastq/index.d.ts | 59 + node_modules/fastq/package.json | 49 + node_modules/fastq/queue.js | 346 + node_modules/fastq/test/example.ts | 83 + node_modules/fastq/test/promise.js | 325 + node_modules/fastq/test/test.js | 733 + node_modules/fastq/test/tsconfig.json | 11 + node_modules/fill-range/LICENSE | 21 + node_modules/fill-range/README.md | 237 + node_modules/fill-range/index.js | 248 + node_modules/fill-range/package.json | 74 + node_modules/function-bind/.eslintrc | 21 + .../function-bind/.github/FUNDING.yml | 12 + .../function-bind/.github/SECURITY.md | 3 + node_modules/function-bind/.nycrc | 13 + node_modules/function-bind/CHANGELOG.md | 136 + node_modules/function-bind/LICENSE | 20 + node_modules/function-bind/README.md | 46 + node_modules/function-bind/implementation.js | 84 + node_modules/function-bind/index.js | 5 + node_modules/function-bind/package.json | 87 + node_modules/function-bind/test/.eslintrc | 9 + node_modules/function-bind/test/index.js | 252 + node_modules/glob-parent/LICENSE | 15 + node_modules/glob-parent/README.md | 134 + node_modules/glob-parent/index.js | 75 + node_modules/glob-parent/package.json | 54 + node_modules/hasown/.eslintrc | 5 + node_modules/hasown/.github/FUNDING.yml | 12 + node_modules/hasown/.nycrc | 13 + node_modules/hasown/CHANGELOG.md | 40 + node_modules/hasown/LICENSE | 21 + node_modules/hasown/README.md | 40 + node_modules/hasown/index.d.ts | 3 + node_modules/hasown/index.js | 8 + node_modules/hasown/package.json | 92 + node_modules/hasown/tsconfig.json | 6 + node_modules/is-binary-path/index.d.ts | 17 + node_modules/is-binary-path/index.js | 7 + node_modules/is-binary-path/license | 9 + node_modules/is-binary-path/package.json | 40 + node_modules/is-binary-path/readme.md | 34 + node_modules/is-core-module/.eslintrc | 18 + node_modules/is-core-module/.nycrc | 9 + node_modules/is-core-module/CHANGELOG.md | 218 + node_modules/is-core-module/LICENSE | 20 + node_modules/is-core-module/README.md | 40 + node_modules/is-core-module/core.json | 162 + node_modules/is-core-module/index.js | 69 + node_modules/is-core-module/package.json | 76 + node_modules/is-core-module/test/index.js | 157 + node_modules/is-extglob/LICENSE | 21 + node_modules/is-extglob/README.md | 107 + node_modules/is-extglob/index.js | 20 + node_modules/is-extglob/package.json | 69 + node_modules/is-glob/LICENSE | 21 + node_modules/is-glob/README.md | 206 + node_modules/is-glob/index.js | 150 + node_modules/is-glob/package.json | 81 + node_modules/is-number/LICENSE | 21 + node_modules/is-number/README.md | 187 + node_modules/is-number/index.js | 18 + node_modules/is-number/package.json | 82 + node_modules/jiti/LICENSE | 21 + node_modules/jiti/README.md | 164 + node_modules/jiti/bin/jiti.js | 16 + node_modules/jiti/dist/babel.d.ts | 2 + node_modules/jiti/dist/babel.js | 227 + node_modules/jiti/dist/jiti.d.ts | 20 + node_modules/jiti/dist/jiti.js | 1 + .../babel-plugin-transform-import-meta.d.ts | 4 + .../jiti/dist/plugins/import-meta-env.d.ts | 5 + node_modules/jiti/dist/types.d.ts | 35 + node_modules/jiti/dist/utils.d.ts | 8 + node_modules/jiti/lib/index.js | 15 + node_modules/jiti/package.json | 81 + node_modules/jiti/register.js | 3 + node_modules/lilconfig/LICENSE | 21 + node_modules/lilconfig/package.json | 42 + node_modules/lilconfig/readme.md | 98 + node_modules/lilconfig/src/index.d.ts | 54 + node_modules/lilconfig/src/index.js | 460 + node_modules/lines-and-columns/LICENSE | 21 + node_modules/lines-and-columns/README.md | 33 + .../lines-and-columns/build/index.d.ts | 13 + node_modules/lines-and-columns/build/index.js | 62 + node_modules/lines-and-columns/package.json | 49 + node_modules/merge2/LICENSE | 21 + node_modules/merge2/README.md | 144 + node_modules/merge2/index.js | 144 + node_modules/merge2/package.json | 43 + node_modules/micromatch/LICENSE | 21 + node_modules/micromatch/README.md | 1024 + node_modules/micromatch/index.js | 474 + node_modules/micromatch/package.json | 119 + node_modules/mz/HISTORY.md | 66 + node_modules/mz/LICENSE | 22 + node_modules/mz/README.md | 106 + node_modules/mz/child_process.js | 8 + node_modules/mz/crypto.js | 9 + node_modules/mz/dns.js | 16 + node_modules/mz/fs.js | 62 + node_modules/mz/index.js | 8 + node_modules/mz/package.json | 44 + node_modules/mz/readline.js | 64 + node_modules/mz/zlib.js | 13 + node_modules/nanoid/LICENSE | 20 + node_modules/nanoid/README.md | 39 + node_modules/nanoid/async/index.browser.cjs | 69 + node_modules/nanoid/async/index.browser.js | 34 + node_modules/nanoid/async/index.cjs | 71 + node_modules/nanoid/async/index.d.ts | 56 + node_modules/nanoid/async/index.js | 35 + node_modules/nanoid/async/index.native.js | 26 + node_modules/nanoid/async/package.json | 12 + node_modules/nanoid/bin/nanoid.cjs | 55 + node_modules/nanoid/index.browser.cjs | 72 + node_modules/nanoid/index.browser.js | 34 + node_modules/nanoid/index.cjs | 85 + node_modules/nanoid/index.d.cts | 91 + node_modules/nanoid/index.d.ts | 91 + node_modules/nanoid/index.js | 45 + node_modules/nanoid/nanoid.js | 1 + node_modules/nanoid/non-secure/index.cjs | 34 + node_modules/nanoid/non-secure/index.d.ts | 33 + node_modules/nanoid/non-secure/index.js | 21 + node_modules/nanoid/non-secure/package.json | 6 + node_modules/nanoid/package.json | 89 + node_modules/nanoid/url-alphabet/index.cjs | 7 + node_modules/nanoid/url-alphabet/index.js | 3 + node_modules/nanoid/url-alphabet/package.json | 6 + node_modules/normalize-path/LICENSE | 21 + node_modules/normalize-path/README.md | 127 + node_modules/normalize-path/index.js | 35 + node_modules/normalize-path/package.json | 77 + node_modules/object-assign/index.js | 90 + node_modules/object-assign/license | 21 + node_modules/object-assign/package.json | 42 + node_modules/object-assign/readme.md | 61 + node_modules/object-hash/LICENSE | 22 + node_modules/object-hash/dist/object_hash.js | 1 + node_modules/object-hash/index.js | 453 + node_modules/object-hash/package.json | 53 + node_modules/object-hash/readme.markdown | 198 + node_modules/path-parse/LICENSE | 21 + node_modules/path-parse/README.md | 42 + node_modules/path-parse/index.js | 75 + node_modules/path-parse/package.json | 33 + node_modules/picocolors/LICENSE | 15 + node_modules/picocolors/README.md | 21 + node_modules/picocolors/package.json | 25 + node_modules/picocolors/picocolors.browser.js | 4 + node_modules/picocolors/picocolors.d.ts | 5 + node_modules/picocolors/picocolors.js | 75 + node_modules/picocolors/types.d.ts | 51 + node_modules/picomatch/CHANGELOG.md | 136 + node_modules/picomatch/LICENSE | 21 + node_modules/picomatch/README.md | 708 + node_modules/picomatch/index.js | 3 + node_modules/picomatch/lib/constants.js | 179 + node_modules/picomatch/lib/parse.js | 1091 + node_modules/picomatch/lib/picomatch.js | 342 + node_modules/picomatch/lib/scan.js | 391 + node_modules/picomatch/lib/utils.js | 64 + node_modules/picomatch/package.json | 81 + node_modules/pify/index.js | 68 + node_modules/pify/license | 21 + node_modules/pify/package.json | 48 + node_modules/pify/readme.md | 119 + node_modules/pirates/LICENSE | 21 + node_modules/pirates/README.md | 73 + node_modules/pirates/index.d.ts | 82 + node_modules/pirates/lib/index.js | 155 + node_modules/pirates/package.json | 43 + node_modules/postcss-import/LICENSE | 20 + node_modules/postcss-import/README.md | 244 + node_modules/postcss-import/index.js | 420 + .../postcss-import/lib/assign-layer-names.js | 17 + node_modules/postcss-import/lib/data-url.js | 17 + node_modules/postcss-import/lib/join-layer.js | 9 + node_modules/postcss-import/lib/join-media.js | 28 + .../postcss-import/lib/load-content.js | 12 + .../postcss-import/lib/parse-statements.js | 172 + .../postcss-import/lib/process-content.js | 59 + node_modules/postcss-import/lib/resolve-id.js | 42 + node_modules/postcss-import/package.json | 65 + node_modules/postcss-js/LICENSE | 20 + node_modules/postcss-js/README.md | 22 + node_modules/postcss-js/async.js | 15 + node_modules/postcss-js/index.js | 11 + node_modules/postcss-js/index.mjs | 8 + node_modules/postcss-js/objectifier.js | 93 + node_modules/postcss-js/package.json | 48 + node_modules/postcss-js/parser.js | 104 + node_modules/postcss-js/process-result.js | 11 + node_modules/postcss-js/sync.js | 12 + node_modules/postcss-load-config/LICENSE | 20 + node_modules/postcss-load-config/README.md | 474 + node_modules/postcss-load-config/package.json | 61 + .../postcss-load-config/src/index.d.ts | 65 + node_modules/postcss-load-config/src/index.js | 178 + .../postcss-load-config/src/options.js | 48 + .../postcss-load-config/src/plugins.js | 89 + node_modules/postcss-load-config/src/req.js | 62 + node_modules/postcss-nested/LICENSE | 20 + node_modules/postcss-nested/README.md | 85 + node_modules/postcss-nested/index.d.ts | 41 + node_modules/postcss-nested/index.js | 361 + node_modules/postcss-nested/package.json | 34 + node_modules/postcss-selector-parser/API.md | 872 + .../postcss-selector-parser/CHANGELOG.md | 549 + .../postcss-selector-parser/LICENSE-MIT | 22 + .../postcss-selector-parser/README.md | 49 + .../postcss-selector-parser/dist/index.js | 17 + .../postcss-selector-parser/dist/parser.js | 1015 + .../postcss-selector-parser/dist/processor.js | 170 + .../dist/selectors/attribute.js | 448 + .../dist/selectors/className.js | 50 + .../dist/selectors/combinator.js | 21 + .../dist/selectors/comment.js | 21 + .../dist/selectors/constructors.js | 65 + .../dist/selectors/container.js | 308 + .../dist/selectors/guards.js | 58 + .../dist/selectors/id.js | 25 + .../dist/selectors/index.js | 21 + .../dist/selectors/namespace.js | 80 + .../dist/selectors/nesting.js | 22 + .../dist/selectors/node.js | 192 + .../dist/selectors/pseudo.js | 26 + .../dist/selectors/root.js | 44 + .../dist/selectors/selector.js | 21 + .../dist/selectors/string.js | 21 + .../dist/selectors/tag.js | 21 + .../dist/selectors/types.js | 28 + .../dist/selectors/universal.js | 22 + .../dist/sortAscending.js | 11 + .../dist/tokenTypes.js | 70 + .../postcss-selector-parser/dist/tokenize.js | 239 + .../dist/util/ensureObject.js | 17 + .../dist/util/getProp.js | 18 + .../dist/util/index.js | 13 + .../dist/util/stripComments.js | 21 + .../dist/util/unesc.js | 76 + .../postcss-selector-parser/package.json | 80 + .../postcss-selector-parser.d.ts | 555 + node_modules/postcss-value-parser/LICENSE | 22 + node_modules/postcss-value-parser/README.md | 263 + .../postcss-value-parser/lib/index.d.ts | 177 + .../postcss-value-parser/lib/index.js | 28 + .../postcss-value-parser/lib/parse.js | 321 + .../postcss-value-parser/lib/stringify.js | 48 + node_modules/postcss-value-parser/lib/unit.js | 120 + node_modules/postcss-value-parser/lib/walk.js | 22 + .../postcss-value-parser/package.json | 58 + node_modules/postcss/LICENSE | 20 + node_modules/postcss/README.md | 29 + node_modules/postcss/lib/at-rule.d.ts | 140 + node_modules/postcss/lib/at-rule.js | 25 + node_modules/postcss/lib/comment.d.ts | 68 + node_modules/postcss/lib/comment.js | 13 + node_modules/postcss/lib/container.d.ts | 483 + node_modules/postcss/lib/container.js | 447 + .../postcss/lib/css-syntax-error.d.ts | 248 + node_modules/postcss/lib/css-syntax-error.js | 133 + node_modules/postcss/lib/declaration.d.ts | 151 + node_modules/postcss/lib/declaration.js | 24 + node_modules/postcss/lib/document.d.ts | 69 + node_modules/postcss/lib/document.js | 33 + node_modules/postcss/lib/fromJSON.d.ts | 9 + node_modules/postcss/lib/fromJSON.js | 54 + node_modules/postcss/lib/input.d.ts | 227 + node_modules/postcss/lib/input.js | 265 + node_modules/postcss/lib/lazy-result.d.ts | 190 + node_modules/postcss/lib/lazy-result.js | 550 + node_modules/postcss/lib/list.d.ts | 60 + node_modules/postcss/lib/list.js | 58 + node_modules/postcss/lib/map-generator.js | 368 + node_modules/postcss/lib/no-work-result.d.ts | 46 + node_modules/postcss/lib/no-work-result.js | 138 + node_modules/postcss/lib/node.d.ts | 556 + node_modules/postcss/lib/node.js | 449 + node_modules/postcss/lib/parse.d.ts | 9 + node_modules/postcss/lib/parse.js | 42 + node_modules/postcss/lib/parser.js | 611 + node_modules/postcss/lib/postcss.d.mts | 69 + node_modules/postcss/lib/postcss.d.ts | 458 + node_modules/postcss/lib/postcss.js | 101 + node_modules/postcss/lib/postcss.mjs | 30 + node_modules/postcss/lib/previous-map.d.ts | 81 + node_modules/postcss/lib/previous-map.js | 144 + node_modules/postcss/lib/processor.d.ts | 115 + node_modules/postcss/lib/processor.js | 67 + node_modules/postcss/lib/result.d.ts | 205 + node_modules/postcss/lib/result.js | 42 + node_modules/postcss/lib/root.d.ts | 87 + node_modules/postcss/lib/root.js | 61 + node_modules/postcss/lib/rule.d.ts | 126 + node_modules/postcss/lib/rule.js | 27 + node_modules/postcss/lib/stringifier.d.ts | 46 + node_modules/postcss/lib/stringifier.js | 353 + node_modules/postcss/lib/stringify.d.ts | 9 + node_modules/postcss/lib/stringify.js | 11 + node_modules/postcss/lib/symbols.js | 5 + .../postcss/lib/terminal-highlight.js | 70 + node_modules/postcss/lib/tokenize.js | 266 + node_modules/postcss/lib/warn-once.js | 13 + node_modules/postcss/lib/warning.d.ts | 147 + node_modules/postcss/lib/warning.js | 37 + node_modules/postcss/package.json | 88 + node_modules/queue-microtask/LICENSE | 20 + node_modules/queue-microtask/README.md | 90 + node_modules/queue-microtask/index.d.ts | 2 + node_modules/queue-microtask/index.js | 9 + node_modules/queue-microtask/package.json | 55 + node_modules/read-cache/LICENSE | 20 + node_modules/read-cache/README.md | 46 + node_modules/read-cache/index.js | 78 + node_modules/read-cache/package.json | 34 + node_modules/readdirp/LICENSE | 21 + node_modules/readdirp/README.md | 122 + node_modules/readdirp/index.d.ts | 43 + node_modules/readdirp/index.js | 287 + node_modules/readdirp/package.json | 122 + node_modules/resolve/.editorconfig | 37 + node_modules/resolve/.eslintrc | 65 + node_modules/resolve/.github/FUNDING.yml | 12 + .../.github/INCIDENT_RESPONSE_PROCESS.md | 119 + node_modules/resolve/.github/THREAT_MODEL.md | 74 + node_modules/resolve/LICENSE | 21 + node_modules/resolve/SECURITY.md | 11 + node_modules/resolve/async.js | 3 + node_modules/resolve/bin/resolve | 50 + node_modules/resolve/example/async.js | 5 + node_modules/resolve/example/sync.js | 3 + node_modules/resolve/index.js | 6 + node_modules/resolve/lib/async.js | 333 + node_modules/resolve/lib/caller.js | 8 + node_modules/resolve/lib/core.js | 12 + node_modules/resolve/lib/core.json | 162 + node_modules/resolve/lib/homedir.js | 24 + node_modules/resolve/lib/is-core.js | 5 + .../resolve/lib/node-modules-paths.js | 45 + node_modules/resolve/lib/normalize-options.js | 10 + node_modules/resolve/lib/sync.js | 212 + node_modules/resolve/package.json | 75 + node_modules/resolve/readme.markdown | 301 + node_modules/resolve/sync.js | 3 + node_modules/resolve/test/core.js | 88 + node_modules/resolve/test/dotdot.js | 29 + node_modules/resolve/test/dotdot/abc/index.js | 2 + node_modules/resolve/test/dotdot/index.js | 1 + node_modules/resolve/test/faulty_basedir.js | 29 + node_modules/resolve/test/filter.js | 34 + node_modules/resolve/test/filter_sync.js | 33 + node_modules/resolve/test/home_paths.js | 127 + node_modules/resolve/test/home_paths_sync.js | 114 + node_modules/resolve/test/mock.js | 315 + node_modules/resolve/test/mock_sync.js | 214 + node_modules/resolve/test/module_dir.js | 56 + .../test/module_dir/xmodules/aaa/index.js | 1 + .../test/module_dir/ymodules/aaa/index.js | 1 + .../test/module_dir/zmodules/bbb/main.js | 1 + .../test/module_dir/zmodules/bbb/package.json | 3 + .../resolve/test/node-modules-paths.js | 143 + node_modules/resolve/test/node_path.js | 70 + .../resolve/test/node_path/x/aaa/index.js | 1 + .../resolve/test/node_path/x/ccc/index.js | 1 + .../resolve/test/node_path/y/bbb/index.js | 1 + .../resolve/test/node_path/y/ccc/index.js | 1 + node_modules/resolve/test/nonstring.js | 9 + node_modules/resolve/test/pathfilter.js | 75 + .../resolve/test/pathfilter/deep_ref/main.js | 0 node_modules/resolve/test/precedence.js | 23 + node_modules/resolve/test/precedence/aaa.js | 1 + .../resolve/test/precedence/aaa/index.js | 1 + .../resolve/test/precedence/aaa/main.js | 1 + node_modules/resolve/test/precedence/bbb.js | 1 + .../resolve/test/precedence/bbb/main.js | 1 + node_modules/resolve/test/resolver.js | 597 + .../resolve/test/resolver/baz/doom.js | 0 .../resolve/test/resolver/baz/package.json | 4 + .../resolve/test/resolver/baz/quux.js | 1 + .../resolve/test/resolver/browser_field/a.js | 0 .../resolve/test/resolver/browser_field/b.js | 0 .../test/resolver/browser_field/package.json | 5 + node_modules/resolve/test/resolver/cup.coffee | 1 + .../resolve/test/resolver/dot_main/index.js | 1 + .../test/resolver/dot_main/package.json | 3 + .../test/resolver/dot_slash_main/index.js | 1 + .../test/resolver/dot_slash_main/package.json | 3 + .../resolve/test/resolver/false_main/index.js | 0 .../test/resolver/false_main/package.json | 4 + node_modules/resolve/test/resolver/foo.js | 1 + .../test/resolver/incorrect_main/index.js | 2 + .../test/resolver/incorrect_main/package.json | 3 + .../test/resolver/invalid_main/package.json | 7 + node_modules/resolve/test/resolver/mug.coffee | 0 node_modules/resolve/test/resolver/mug.js | 0 .../test/resolver/multirepo/lerna.json | 6 + .../test/resolver/multirepo/package.json | 20 + .../multirepo/packages/package-a/index.js | 35 + .../multirepo/packages/package-a/package.json | 14 + .../multirepo/packages/package-b/index.js | 0 .../multirepo/packages/package-b/package.json | 14 + .../resolver/nested_symlinks/mylib/async.js | 26 + .../nested_symlinks/mylib/package.json | 15 + .../resolver/nested_symlinks/mylib/sync.js | 12 + .../test/resolver/other_path/lib/other-lib.js | 0 .../resolve/test/resolver/other_path/root.js | 0 .../resolve/test/resolver/quux/foo/index.js | 1 + .../resolve/test/resolver/same_names/foo.js | 1 + .../test/resolver/same_names/foo/index.js | 1 + .../resolver/symlinked/_/node_modules/foo.js | 0 .../symlinked/_/symlink_target/.gitkeep | 0 .../test/resolver/symlinked/package/bar.js | 1 + .../resolver/symlinked/package/package.json | 3 + .../test/resolver/without_basedir/main.js | 5 + node_modules/resolve/test/resolver_sync.js | 730 + node_modules/resolve/test/shadowed_core.js | 54 + .../shadowed_core/node_modules/util/index.js | 0 node_modules/resolve/test/subdirs.js | 13 + node_modules/resolve/test/symlinks.js | 176 + node_modules/reusify/.github/dependabot.yml | 7 + node_modules/reusify/.github/workflows/ci.yml | 96 + node_modules/reusify/LICENSE | 22 + node_modules/reusify/README.md | 139 + node_modules/reusify/SECURITY.md | 15 + .../benchmarks/createNoCodeFunction.js | 30 + node_modules/reusify/benchmarks/fib.js | 13 + .../reusify/benchmarks/reuseNoCodeFunction.js | 38 + node_modules/reusify/eslint.config.js | 14 + node_modules/reusify/package.json | 50 + node_modules/reusify/reusify.d.ts | 14 + node_modules/reusify/reusify.js | 33 + node_modules/reusify/test.js | 66 + node_modules/reusify/tsconfig.json | 11 + node_modules/run-parallel/LICENSE | 20 + node_modules/run-parallel/README.md | 85 + node_modules/run-parallel/index.js | 51 + node_modules/run-parallel/package.json | 58 + node_modules/source-map-js/LICENSE | 28 + node_modules/source-map-js/README.md | 765 + node_modules/source-map-js/lib/array-set.js | 121 + node_modules/source-map-js/lib/base64-vlq.js | 140 + node_modules/source-map-js/lib/base64.js | 67 + .../source-map-js/lib/binary-search.js | 111 + .../source-map-js/lib/mapping-list.js | 79 + node_modules/source-map-js/lib/quick-sort.js | 132 + .../lib/source-map-consumer.d.ts | 1 + .../source-map-js/lib/source-map-consumer.js | 1188 + .../lib/source-map-generator.d.ts | 1 + .../source-map-js/lib/source-map-generator.js | 444 + .../source-map-js/lib/source-node.d.ts | 1 + node_modules/source-map-js/lib/source-node.js | 413 + node_modules/source-map-js/lib/util.js | 594 + node_modules/source-map-js/package.json | 71 + node_modules/source-map-js/source-map.d.ts | 104 + node_modules/source-map-js/source-map.js | 8 + node_modules/sucrase/LICENSE | 21 + node_modules/sucrase/README.md | 295 + node_modules/sucrase/bin/sucrase | 3 + node_modules/sucrase/bin/sucrase-node | 18 + .../sucrase/dist/CJSImportProcessor.js | 456 + node_modules/sucrase/dist/HelperManager.js | 176 + node_modules/sucrase/dist/NameManager.js | 27 + .../sucrase/dist/Options-gen-types.js | 42 + node_modules/sucrase/dist/Options.js | 101 + node_modules/sucrase/dist/TokenProcessor.js | 357 + node_modules/sucrase/dist/cli.js | 317 + node_modules/sucrase/dist/computeSourceMap.js | 89 + .../sucrase/dist/esm/CJSImportProcessor.js | 456 + .../sucrase/dist/esm/HelperManager.js | 176 + node_modules/sucrase/dist/esm/NameManager.js | 27 + .../sucrase/dist/esm/Options-gen-types.js | 42 + node_modules/sucrase/dist/esm/Options.js | 101 + .../sucrase/dist/esm/TokenProcessor.js | 357 + node_modules/sucrase/dist/esm/cli.js | 317 + .../sucrase/dist/esm/computeSourceMap.js | 89 + .../dist/esm/identifyShadowedGlobals.js | 98 + node_modules/sucrase/dist/esm/index.js | 133 + node_modules/sucrase/dist/esm/parser/index.js | 31 + .../sucrase/dist/esm/parser/plugins/flow.js | 1105 + .../dist/esm/parser/plugins/jsx/index.js | 367 + .../dist/esm/parser/plugins/jsx/xhtml.js | 256 + .../sucrase/dist/esm/parser/plugins/types.js | 37 + .../dist/esm/parser/plugins/typescript.js | 1632 + .../dist/esm/parser/tokenizer/index.js | 1004 + .../dist/esm/parser/tokenizer/keywords.js | 43 + .../dist/esm/parser/tokenizer/readWord.js | 64 + .../dist/esm/parser/tokenizer/readWordTree.js | 671 + .../dist/esm/parser/tokenizer/state.js | 106 + .../dist/esm/parser/tokenizer/types.js | 361 + .../sucrase/dist/esm/parser/traverser/base.js | 60 + .../dist/esm/parser/traverser/expression.js | 1022 + .../dist/esm/parser/traverser/index.js | 18 + .../sucrase/dist/esm/parser/traverser/lval.js | 159 + .../dist/esm/parser/traverser/statement.js | 1332 + .../sucrase/dist/esm/parser/traverser/util.js | 104 + .../sucrase/dist/esm/parser/util/charcodes.js | 115 + .../dist/esm/parser/util/identifier.js | 34 + .../dist/esm/parser/util/whitespace.js | 33 + node_modules/sucrase/dist/esm/register.js | 88 + .../esm/transformers/CJSImportTransformer.js | 916 + .../esm/transformers/ESMImportTransformer.js | 415 + .../dist/esm/transformers/FlowTransformer.js | 182 + .../dist/esm/transformers/JSXTransformer.js | 733 + .../esm/transformers/JestHoistTransformer.js | 111 + .../NumericSeparatorTransformer.js | 20 + .../OptionalCatchBindingTransformer.js | 19 + .../OptionalChainingNullishTransformer.js | 155 + .../ReactDisplayNameTransformer.js | 160 + .../transformers/ReactHotLoaderTransformer.js | 69 + .../dist/esm/transformers/RootTransformer.js | 462 + .../dist/esm/transformers/Transformer.js | 16 + .../esm/transformers/TypeScriptTransformer.js | 279 + .../dist/esm/util/elideImportEquals.js | 29 + .../sucrase/dist/esm/util/formatTokens.js | 74 + .../sucrase/dist/esm/util/getClassInfo.js | 352 + .../dist/esm/util/getDeclarationInfo.js | 40 + .../dist/esm/util/getIdentifierNames.js | 15 + .../esm/util/getImportExportSpecifierInfo.js | 92 + .../sucrase/dist/esm/util/getJSXPragmaInfo.js | 22 + .../dist/esm/util/getNonTypeIdentifiers.js | 43 + .../dist/esm/util/getTSImportedNames.js | 84 + .../sucrase/dist/esm/util/isAsyncOperation.js | 38 + .../sucrase/dist/esm/util/isExportFrom.js | 18 + .../sucrase/dist/esm/util/isIdentifier.js | 81 + .../esm/util/removeMaybeImportAttributes.js | 22 + .../dist/esm/util/shouldElideDefaultExport.js | 38 + .../sucrase/dist/identifyShadowedGlobals.js | 98 + node_modules/sucrase/dist/index.js | 133 + node_modules/sucrase/dist/parser/index.js | 31 + .../sucrase/dist/parser/plugins/flow.js | 1105 + .../sucrase/dist/parser/plugins/jsx/index.js | 367 + .../sucrase/dist/parser/plugins/jsx/xhtml.js | 256 + .../sucrase/dist/parser/plugins/types.js | 37 + .../sucrase/dist/parser/plugins/typescript.js | 1632 + .../sucrase/dist/parser/tokenizer/index.js | 1004 + .../sucrase/dist/parser/tokenizer/keywords.js | 43 + .../sucrase/dist/parser/tokenizer/readWord.js | 64 + .../dist/parser/tokenizer/readWordTree.js | 671 + .../sucrase/dist/parser/tokenizer/state.js | 106 + .../sucrase/dist/parser/tokenizer/types.js | 361 + .../sucrase/dist/parser/traverser/base.js | 60 + .../dist/parser/traverser/expression.js | 1022 + .../sucrase/dist/parser/traverser/index.js | 18 + .../sucrase/dist/parser/traverser/lval.js | 159 + .../dist/parser/traverser/statement.js | 1332 + .../sucrase/dist/parser/traverser/util.js | 104 + .../sucrase/dist/parser/util/charcodes.js | 115 + .../sucrase/dist/parser/util/identifier.js | 34 + .../sucrase/dist/parser/util/whitespace.js | 33 + node_modules/sucrase/dist/register.js | 88 + .../dist/transformers/CJSImportTransformer.js | 916 + .../dist/transformers/ESMImportTransformer.js | 415 + .../dist/transformers/FlowTransformer.js | 182 + .../dist/transformers/JSXTransformer.js | 733 + .../dist/transformers/JestHoistTransformer.js | 111 + .../NumericSeparatorTransformer.js | 20 + .../OptionalCatchBindingTransformer.js | 19 + .../OptionalChainingNullishTransformer.js | 155 + .../ReactDisplayNameTransformer.js | 160 + .../transformers/ReactHotLoaderTransformer.js | 69 + .../dist/transformers/RootTransformer.js | 462 + .../sucrase/dist/transformers/Transformer.js | 16 + .../transformers/TypeScriptTransformer.js | 279 + .../dist/types/CJSImportProcessor.d.ts | 67 + .../sucrase/dist/types/HelperManager.d.ts | 15 + .../sucrase/dist/types/NameManager.d.ts | 7 + .../sucrase/dist/types/Options-gen-types.d.ts | 9 + node_modules/sucrase/dist/types/Options.d.ts | 90 + .../sucrase/dist/types/TokenProcessor.d.ts | 87 + node_modules/sucrase/dist/types/cli.d.ts | 1 + .../sucrase/dist/types/computeSourceMap.d.ts | 17 + .../dist/types/identifyShadowedGlobals.d.ts | 12 + node_modules/sucrase/dist/types/index.d.ts | 26 + .../sucrase/dist/types/parser/index.d.ts | 8 + .../dist/types/parser/plugins/flow.d.ts | 27 + .../dist/types/parser/plugins/jsx/index.d.ts | 2 + .../dist/types/parser/plugins/jsx/xhtml.d.ts | 2 + .../dist/types/parser/plugins/types.d.ts | 5 + .../dist/types/parser/plugins/typescript.d.ts | 49 + .../dist/types/parser/tokenizer/index.d.ts | 93 + .../dist/types/parser/tokenizer/keywords.d.ts | 43 + .../dist/types/parser/tokenizer/readWord.d.ts | 7 + .../types/parser/tokenizer/readWordTree.d.ts | 1 + .../dist/types/parser/tokenizer/state.d.ts | 50 + .../dist/types/parser/tokenizer/types.d.ts | 126 + .../dist/types/parser/traverser/base.d.ts | 16 + .../types/parser/traverser/expression.d.ts | 34 + .../dist/types/parser/traverser/index.d.ts | 2 + .../dist/types/parser/traverser/lval.d.ts | 9 + .../types/parser/traverser/statement.d.ts | 20 + .../dist/types/parser/traverser/util.d.ts | 17 + .../dist/types/parser/util/charcodes.d.ts | 107 + .../dist/types/parser/util/identifier.d.ts | 2 + .../dist/types/parser/util/whitespace.d.ts | 3 + node_modules/sucrase/dist/types/register.d.ts | 14 + .../transformers/CJSImportTransformer.d.ts | 149 + .../transformers/ESMImportTransformer.d.ts | 52 + .../types/transformers/FlowTransformer.d.ts | 79 + .../types/transformers/JSXTransformer.d.ts | 144 + .../transformers/JestHoistTransformer.d.ts | 32 + .../NumericSeparatorTransformer.d.ts | 7 + .../OptionalCatchBindingTransformer.d.ts | 9 + .../OptionalChainingNullishTransformer.d.ts | 36 + .../ReactDisplayNameTransformer.d.ts | 29 + .../ReactHotLoaderTransformer.d.ts | 12 + .../types/transformers/RootTransformer.d.ts | 52 + .../dist/types/transformers/Transformer.d.ts | 6 + .../transformers/TypeScriptTransformer.d.ts | 104 + .../dist/types/util/elideImportEquals.d.ts | 2 + .../sucrase/dist/types/util/formatTokens.d.ts | 2 + .../sucrase/dist/types/util/getClassInfo.d.ts | 34 + .../dist/types/util/getDeclarationInfo.d.ts | 18 + .../dist/types/util/getIdentifierNames.d.ts | 5 + .../util/getImportExportSpecifierInfo.d.ts | 36 + .../dist/types/util/getJSXPragmaInfo.d.ts | 8 + .../types/util/getNonTypeIdentifiers.d.ts | 3 + .../dist/types/util/getTSImportedNames.d.ts | 9 + .../dist/types/util/isAsyncOperation.d.ts | 11 + .../sucrase/dist/types/util/isExportFrom.d.ts | 6 + .../sucrase/dist/types/util/isIdentifier.d.ts | 8 + .../util/removeMaybeImportAttributes.d.ts | 6 + .../types/util/shouldElideDefaultExport.d.ts | 6 + .../sucrase/dist/util/elideImportEquals.js | 29 + .../sucrase/dist/util/formatTokens.js | 74 + .../sucrase/dist/util/getClassInfo.js | 352 + .../sucrase/dist/util/getDeclarationInfo.js | 40 + .../sucrase/dist/util/getIdentifierNames.js | 15 + .../dist/util/getImportExportSpecifierInfo.js | 92 + .../sucrase/dist/util/getJSXPragmaInfo.js | 22 + .../dist/util/getNonTypeIdentifiers.js | 43 + .../sucrase/dist/util/getTSImportedNames.js | 84 + .../sucrase/dist/util/isAsyncOperation.js | 38 + .../sucrase/dist/util/isExportFrom.js | 18 + .../sucrase/dist/util/isIdentifier.js | 81 + .../dist/util/removeMaybeImportAttributes.js | 22 + .../dist/util/shouldElideDefaultExport.js | 38 + node_modules/sucrase/package.json | 88 + node_modules/sucrase/register/index.js | 1 + node_modules/sucrase/register/js.js | 1 + node_modules/sucrase/register/jsx.js | 1 + .../register/ts-legacy-module-interop.js | 1 + node_modules/sucrase/register/ts.js | 1 + .../register/tsx-legacy-module-interop.js | 1 + node_modules/sucrase/register/tsx.js | 1 + node_modules/sucrase/ts-node-plugin/index.js | 83 + .../supports-preserve-symlinks-flag/.eslintrc | 14 + .../.github/FUNDING.yml | 12 + .../supports-preserve-symlinks-flag/.nycrc | 9 + .../CHANGELOG.md | 22 + .../supports-preserve-symlinks-flag/LICENSE | 21 + .../supports-preserve-symlinks-flag/README.md | 42 + .../browser.js | 3 + .../supports-preserve-symlinks-flag/index.js | 9 + .../package.json | 70 + .../test/index.js | 29 + node_modules/tailwindcss/LICENSE | 21 + node_modules/tailwindcss/README.md | 40 + node_modules/tailwindcss/base.css | 1 + node_modules/tailwindcss/colors.d.ts | 3 + node_modules/tailwindcss/colors.js | 2 + node_modules/tailwindcss/components.css | 1 + node_modules/tailwindcss/defaultConfig.d.ts | 3 + node_modules/tailwindcss/defaultConfig.js | 2 + node_modules/tailwindcss/defaultTheme.d.ts | 4 + node_modules/tailwindcss/defaultTheme.js | 2 + .../tailwindcss/lib/cli-peer-dependencies.js | 36 + node_modules/tailwindcss/lib/cli.js | 3 + .../tailwindcss/lib/cli/build/deps.js | 62 + .../tailwindcss/lib/cli/build/index.js | 54 + .../tailwindcss/lib/cli/build/plugin.js | 376 + .../tailwindcss/lib/cli/build/utils.js | 88 + .../tailwindcss/lib/cli/build/watching.js | 182 + .../tailwindcss/lib/cli/help/index.js | 73 + node_modules/tailwindcss/lib/cli/index.js | 230 + .../tailwindcss/lib/cli/init/index.js | 63 + .../tailwindcss/lib/corePluginList.js | 191 + node_modules/tailwindcss/lib/corePlugins.js | 4339 + node_modules/tailwindcss/lib/css/LICENSE | 25 + .../tailwindcss/lib/css/preflight.css | 386 + node_modules/tailwindcss/lib/featureFlags.js | 79 + node_modules/tailwindcss/lib/index.js | 2 + .../tailwindcss/lib/lib/cacheInvalidation.js | 92 + .../lib/lib/collapseAdjacentRules.js | 61 + .../lib/lib/collapseDuplicateDeclarations.js | 85 + node_modules/tailwindcss/lib/lib/content.js | 247 + .../tailwindcss/lib/lib/defaultExtractor.js | 273 + .../lib/lib/evaluateTailwindFunctions.js | 238 + .../tailwindcss/lib/lib/expandApplyAtRules.js | 553 + .../lib/lib/expandTailwindAtRules.js | 279 + .../tailwindcss/lib/lib/findAtConfigPath.js | 46 + .../tailwindcss/lib/lib/generateRules.js | 912 + .../lib/lib/getModuleDependencies.js | 99 + .../tailwindcss/lib/lib/load-config.js | 58 + .../lib/lib/normalizeTailwindDirectives.js | 89 + node_modules/tailwindcss/lib/lib/offsets.js | 355 + .../lib/lib/partitionApplyAtRules.js | 58 + node_modules/tailwindcss/lib/lib/regex.js | 74 + .../tailwindcss/lib/lib/remap-bitfield.js | 89 + .../lib/lib/resolveDefaultsAtRules.js | 165 + .../tailwindcss/lib/lib/setupContextUtils.js | 1298 + .../lib/lib/setupTrackingContext.js | 169 + .../tailwindcss/lib/lib/sharedState.js | 79 + .../lib/lib/substituteScreenAtRules.js | 31 + node_modules/tailwindcss/lib/plugin.js | 48 + .../lib/postcss-plugins/nesting/README.md | 42 + .../lib/postcss-plugins/nesting/index.js | 21 + .../lib/postcss-plugins/nesting/plugin.js | 89 + .../lib/processTailwindFeatures.js | 62 + node_modules/tailwindcss/lib/public/colors.js | 355 + .../tailwindcss/lib/public/create-plugin.js | 17 + .../tailwindcss/lib/public/default-config.js | 18 + .../tailwindcss/lib/public/default-theme.js | 18 + .../tailwindcss/lib/public/load-config.js | 12 + .../tailwindcss/lib/public/resolve-config.js | 24 + .../lib/util/applyImportantSelector.js | 38 + node_modules/tailwindcss/lib/util/bigSign.js | 13 + .../tailwindcss/lib/util/buildMediaQuery.js | 27 + .../tailwindcss/lib/util/cloneDeep.js | 22 + .../tailwindcss/lib/util/cloneNodes.js | 54 + node_modules/tailwindcss/lib/util/color.js | 116 + .../tailwindcss/lib/util/colorNames.js | 752 + .../tailwindcss/lib/util/configurePlugins.js | 23 + .../tailwindcss/lib/util/createPlugin.js | 32 + .../lib/util/createUtilityPlugin.js | 53 + .../tailwindcss/lib/util/dataTypes.js | 338 + node_modules/tailwindcss/lib/util/defaults.js | 27 + .../tailwindcss/lib/util/escapeClassName.js | 24 + .../tailwindcss/lib/util/escapeCommas.js | 13 + .../lib/util/flattenColorPalette.js | 18 + .../lib/util/formatVariantSelector.js | 270 + .../tailwindcss/lib/util/getAllConfigs.js | 50 + .../tailwindcss/lib/util/hashConfig.js | 21 + .../tailwindcss/lib/util/isKeyframeRule.js | 13 + .../tailwindcss/lib/util/isPlainObject.js | 17 + .../util/isSyntacticallyValidPropertyValue.js | 74 + node_modules/tailwindcss/lib/util/log.js | 61 + .../tailwindcss/lib/util/math-operators.js | 152 + .../tailwindcss/lib/util/nameClass.js | 49 + .../tailwindcss/lib/util/negateValue.js | 36 + .../tailwindcss/lib/util/normalizeConfig.js | 281 + .../tailwindcss/lib/util/normalizeScreens.js | 178 + .../lib/util/parseAnimationValue.js | 93 + .../lib/util/parseBoxShadowValue.js | 88 + .../tailwindcss/lib/util/parseDependency.js | 47 + .../tailwindcss/lib/util/parseGlob.js | 35 + .../tailwindcss/lib/util/parseObjectStyles.js | 36 + .../tailwindcss/lib/util/pluginUtils.js | 289 + .../tailwindcss/lib/util/prefixSelector.js | 39 + .../tailwindcss/lib/util/pseudoElements.js | 212 + .../lib/util/removeAlphaVariables.js | 33 + .../tailwindcss/lib/util/resolveConfig.js | 256 + .../tailwindcss/lib/util/resolveConfigPath.js | 72 + .../tailwindcss/lib/util/responsive.js | 24 + .../lib/util/splitAtTopLevelOnly.js | 47 + node_modules/tailwindcss/lib/util/tap.js | 14 + .../tailwindcss/lib/util/toColorValue.js | 13 + node_modules/tailwindcss/lib/util/toPath.js | 32 + .../lib/util/transformThemeValue.js | 73 + .../tailwindcss/lib/util/validateConfig.js | 37 + .../lib/util/validateFormalSyntax.js | 26 + .../tailwindcss/lib/util/withAlphaVariable.js | 79 + .../tailwindcss/lib/value-parser/LICENSE | 22 + .../tailwindcss/lib/value-parser/README.md | 3 + .../tailwindcss/lib/value-parser/index.d.js | 2 + .../tailwindcss/lib/value-parser/index.js | 22 + .../tailwindcss/lib/value-parser/parse.js | 259 + .../tailwindcss/lib/value-parser/stringify.js | 38 + .../tailwindcss/lib/value-parser/unit.js | 86 + .../tailwindcss/lib/value-parser/walk.js | 16 + node_modules/tailwindcss/loadConfig.d.ts | 4 + node_modules/tailwindcss/loadConfig.js | 2 + node_modules/tailwindcss/nesting/index.d.ts | 4 + node_modules/tailwindcss/nesting/index.js | 2 + node_modules/tailwindcss/package.json | 124 + node_modules/tailwindcss/peers/index.js | 97871 ++++++++++++++++ node_modules/tailwindcss/plugin.d.ts | 11 + node_modules/tailwindcss/plugin.js | 2 + node_modules/tailwindcss/prettier.config.js | 19 + node_modules/tailwindcss/resolveConfig.d.ts | 31 + node_modules/tailwindcss/resolveConfig.js | 2 + node_modules/tailwindcss/screens.css | 1 + .../tailwindcss/scripts/create-plugin-list.js | 10 + .../tailwindcss/scripts/generate-types.js | 104 + .../tailwindcss/scripts/release-channel.js | 18 + .../tailwindcss/scripts/release-notes.js | 21 + .../tailwindcss/scripts/type-utils.js | 27 + .../tailwindcss/src/cli-peer-dependencies.js | 15 + node_modules/tailwindcss/src/cli.js | 3 + .../tailwindcss/src/cli/build/deps.js | 56 + .../tailwindcss/src/cli/build/index.js | 49 + .../tailwindcss/src/cli/build/plugin.js | 444 + .../tailwindcss/src/cli/build/utils.js | 76 + .../tailwindcss/src/cli/build/watching.js | 229 + .../tailwindcss/src/cli/help/index.js | 70 + node_modules/tailwindcss/src/cli/index.js | 216 + .../tailwindcss/src/cli/init/index.js | 79 + .../tailwindcss/src/corePluginList.js | 1 + node_modules/tailwindcss/src/corePlugins.js | 3007 + node_modules/tailwindcss/src/css/LICENSE | 25 + .../tailwindcss/src/css/preflight.css | 386 + node_modules/tailwindcss/src/featureFlags.js | 62 + node_modules/tailwindcss/src/index.js | 1 + .../tailwindcss/src/lib/cacheInvalidation.js | 52 + .../src/lib/collapseAdjacentRules.js | 58 + .../src/lib/collapseDuplicateDeclarations.js | 93 + node_modules/tailwindcss/src/lib/content.js | 295 + .../tailwindcss/src/lib/defaultExtractor.js | 255 + .../src/lib/evaluateTailwindFunctions.js | 272 + .../tailwindcss/src/lib/expandApplyAtRules.js | 637 + .../src/lib/expandTailwindAtRules.js | 282 + .../tailwindcss/src/lib/findAtConfigPath.js | 48 + .../tailwindcss/src/lib/generateRules.js | 958 + .../src/lib/getModuleDependencies.js | 79 + .../tailwindcss/src/lib/load-config.ts | 46 + .../src/lib/normalizeTailwindDirectives.js | 84 + node_modules/tailwindcss/src/lib/offsets.js | 432 + .../src/lib/partitionApplyAtRules.js | 52 + node_modules/tailwindcss/src/lib/regex.js | 74 + .../tailwindcss/src/lib/remap-bitfield.js | 82 + .../src/lib/resolveDefaultsAtRules.js | 165 + .../tailwindcss/src/lib/setupContextUtils.js | 1371 + .../src/lib/setupTrackingContext.js | 172 + .../tailwindcss/src/lib/sharedState.js | 57 + .../src/lib/substituteScreenAtRules.js | 19 + node_modules/tailwindcss/src/plugin.js | 47 + .../src/postcss-plugins/nesting/README.md | 42 + .../src/postcss-plugins/nesting/index.js | 13 + .../src/postcss-plugins/nesting/plugin.js | 80 + .../src/processTailwindFeatures.js | 56 + node_modules/tailwindcss/src/public/colors.js | 322 + .../tailwindcss/src/public/create-plugin.js | 2 + .../tailwindcss/src/public/default-config.js | 4 + .../tailwindcss/src/public/default-theme.js | 4 + .../tailwindcss/src/public/load-config.js | 2 + .../tailwindcss/src/public/resolve-config.js | 7 + .../src/util/applyImportantSelector.js | 26 + node_modules/tailwindcss/src/util/bigSign.js | 3 + .../tailwindcss/src/util/buildMediaQuery.js | 22 + .../tailwindcss/src/util/cloneDeep.js | 11 + .../tailwindcss/src/util/cloneNodes.js | 49 + node_modules/tailwindcss/src/util/color.js | 88 + .../tailwindcss/src/util/colorNames.js | 150 + .../tailwindcss/src/util/configurePlugins.js | 23 + .../tailwindcss/src/util/createPlugin.js | 27 + .../src/util/createUtilityPlugin.js | 37 + .../tailwindcss/src/util/dataTypes.js | 327 + node_modules/tailwindcss/src/util/defaults.js | 17 + .../tailwindcss/src/util/escapeClassName.js | 8 + .../tailwindcss/src/util/escapeCommas.js | 3 + .../src/util/flattenColorPalette.js | 13 + .../src/util/formatVariantSelector.js | 324 + .../tailwindcss/src/util/getAllConfigs.js | 38 + .../tailwindcss/src/util/hashConfig.js | 5 + .../tailwindcss/src/util/isKeyframeRule.js | 3 + .../tailwindcss/src/util/isPlainObject.js | 8 + .../util/isSyntacticallyValidPropertyValue.js | 61 + node_modules/tailwindcss/src/util/log.js | 29 + .../tailwindcss/src/util/math-operators.ts | 205 + .../tailwindcss/src/util/nameClass.js | 30 + .../tailwindcss/src/util/negateValue.js | 24 + .../tailwindcss/src/util/normalizeConfig.js | 299 + .../tailwindcss/src/util/normalizeScreens.js | 140 + .../src/util/parseAnimationValue.js | 68 + .../src/util/parseBoxShadowValue.js | 72 + .../tailwindcss/src/util/parseDependency.js | 44 + .../tailwindcss/src/util/parseGlob.js | 23 + .../tailwindcss/src/util/parseObjectStyles.js | 19 + .../tailwindcss/src/util/pluginUtils.js | 307 + .../tailwindcss/src/util/prefixSelector.js | 33 + .../tailwindcss/src/util/pseudoElements.js | 171 + .../src/util/removeAlphaVariables.js | 26 + .../tailwindcss/src/util/resolveConfig.js | 277 + .../tailwindcss/src/util/resolveConfigPath.js | 68 + .../tailwindcss/src/util/responsive.js | 10 + .../src/util/splitAtTopLevelOnly.js | 48 + node_modules/tailwindcss/src/util/tap.js | 4 + .../tailwindcss/src/util/toColorValue.js | 3 + node_modules/tailwindcss/src/util/toPath.js | 26 + .../src/util/transformThemeValue.js | 62 + .../tailwindcss/src/util/validateConfig.js | 26 + .../src/util/validateFormalSyntax.js | 34 + .../tailwindcss/src/util/withAlphaVariable.js | 49 + .../tailwindcss/src/value-parser/LICENSE | 22 + .../tailwindcss/src/value-parser/README.md | 3 + .../tailwindcss/src/value-parser/index.d.ts | 177 + .../tailwindcss/src/value-parser/index.js | 28 + .../tailwindcss/src/value-parser/parse.js | 303 + .../tailwindcss/src/value-parser/stringify.js | 41 + .../tailwindcss/src/value-parser/unit.js | 118 + .../tailwindcss/src/value-parser/walk.js | 18 + node_modules/tailwindcss/stubs/.npmignore | 1 + .../tailwindcss/stubs/.prettierrc.json | 6 + node_modules/tailwindcss/stubs/config.full.js | 1062 + .../tailwindcss/stubs/config.simple.js | 7 + .../tailwindcss/stubs/postcss.config.cjs | 6 + .../tailwindcss/stubs/postcss.config.js | 6 + .../tailwindcss/stubs/tailwind.config.cjs | 2 + .../tailwindcss/stubs/tailwind.config.js | 2 + .../tailwindcss/stubs/tailwind.config.ts | 3 + node_modules/tailwindcss/tailwind.css | 5 + node_modules/tailwindcss/types/config.d.ts | 379 + .../tailwindcss/types/generated/.gitkeep | 0 .../tailwindcss/types/generated/colors.d.ts | 298 + .../types/generated/corePluginList.d.ts | 1 + .../types/generated/default-theme.d.ts | 397 + node_modules/tailwindcss/types/index.d.ts | 11 + node_modules/tailwindcss/utilities.css | 1 + node_modules/tailwindcss/variants.css | 1 + node_modules/thenify-all/History.md | 11 + node_modules/thenify-all/LICENSE | 22 + node_modules/thenify-all/README.md | 66 + node_modules/thenify-all/index.js | 73 + node_modules/thenify-all/package.json | 34 + node_modules/thenify/History.md | 11 + node_modules/thenify/LICENSE | 22 + node_modules/thenify/README.md | 120 + node_modules/thenify/index.js | 77 + node_modules/thenify/package.json | 31 + node_modules/tinyglobby/LICENSE | 21 + node_modules/tinyglobby/README.md | 25 + node_modules/tinyglobby/dist/index.cjs | 350 + node_modules/tinyglobby/dist/index.d.cts | 147 + node_modules/tinyglobby/dist/index.d.mts | 147 + node_modules/tinyglobby/dist/index.mjs | 318 + .../tinyglobby/node_modules/fdir/LICENSE | 7 + .../tinyglobby/node_modules/fdir/README.md | 91 + .../node_modules/fdir/dist/index.cjs | 588 + .../node_modules/fdir/dist/index.d.cts | 155 + .../node_modules/fdir/dist/index.d.mts | 155 + .../node_modules/fdir/dist/index.mjs | 570 + .../tinyglobby/node_modules/fdir/package.json | 103 + .../tinyglobby/node_modules/picomatch/LICENSE | 21 + .../node_modules/picomatch/README.md | 738 + .../node_modules/picomatch/index.js | 17 + .../node_modules/picomatch/lib/constants.js | 180 + .../node_modules/picomatch/lib/parse.js | 1085 + .../node_modules/picomatch/lib/picomatch.js | 341 + .../node_modules/picomatch/lib/scan.js | 391 + .../node_modules/picomatch/lib/utils.js | 72 + .../node_modules/picomatch/package.json | 83 + .../node_modules/picomatch/posix.js | 3 + node_modules/tinyglobby/package.json | 73 + node_modules/to-regex-range/LICENSE | 21 + node_modules/to-regex-range/README.md | 305 + node_modules/to-regex-range/index.js | 288 + node_modules/to-regex-range/package.json | 88 + node_modules/ts-interface-checker/LICENSE | 201 + node_modules/ts-interface-checker/README.md | 185 + .../ts-interface-checker/dist/index.d.ts | 124 + .../ts-interface-checker/dist/index.js | 224 + .../ts-interface-checker/dist/types.d.ts | 181 + .../ts-interface-checker/dist/types.js | 566 + .../ts-interface-checker/dist/util.d.ts | 55 + .../ts-interface-checker/dist/util.js | 130 + .../ts-interface-checker/package.json | 60 + node_modules/util-deprecate/History.md | 16 + node_modules/util-deprecate/LICENSE | 24 + node_modules/util-deprecate/README.md | 53 + node_modules/util-deprecate/browser.js | 67 + node_modules/util-deprecate/node.js | 6 + node_modules/util-deprecate/package.json | 27 + package-lock.json | 1020 + package.json | 12 + requirements.txt | 5 + static/css/input.css | 63 + static/css/styles.css | 1665 + static/images/directLX_small.png | Bin 0 -> 4659 bytes static/js/htmx.min.js | 1 + tailwind.config.js | 38 + templates/about.html | 147 + templates/base.html | 118 + templates/blog/index.html | 66 + templates/blog/partials/post_list.html | 38 + templates/blog/post.html | 47 + templates/contact.html | 142 + templates/forum/category.html | 112 + templates/forum/index.html | 110 + templates/forum/partials/reply_form.html | 24 + templates/forum/partials/topic_list.html | 43 + templates/forum/topic.html | 99 + templates/index.html | 153 + templates/services.html | 218 + venv/bin/Activate.ps1 | 247 + venv/bin/activate | 70 + venv/bin/activate.csh | 27 + venv/bin/activate.fish | 69 + venv/bin/flask | 8 + venv/bin/pip | 8 + venv/bin/pip3 | 8 + venv/bin/pip3.12 | 8 + venv/bin/python | 1 + venv/bin/python3 | 1 + venv/bin/python3.12 | 1 + venv/bin/slugify | 8 + .../site/python3.12/greenlet/greenlet.h | 164 + .../typing_extensions.cpython-312.pyc | Bin 0 -> 163747 bytes .../blinker-1.9.0.dist-info/INSTALLER | 1 + .../blinker-1.9.0.dist-info/LICENSE.txt | 20 + .../blinker-1.9.0.dist-info/METADATA | 60 + .../blinker-1.9.0.dist-info/RECORD | 12 + .../blinker-1.9.0.dist-info/WHEEL | 4 + .../site-packages/blinker/__init__.py | 17 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 491 bytes .../__pycache__/_utilities.cpython-312.pyc | Bin 0 -> 2718 bytes .../blinker/__pycache__/base.cpython-312.pyc | Bin 0 -> 21995 bytes .../site-packages/blinker/_utilities.py | 64 + .../python3.12/site-packages/blinker/base.py | 512 + .../python3.12/site-packages/blinker/py.typed | 0 .../click-8.3.1.dist-info/INSTALLER | 1 + .../click-8.3.1.dist-info/METADATA | 84 + .../click-8.3.1.dist-info/RECORD | 40 + .../site-packages/click-8.3.1.dist-info/WHEEL | 4 + .../licenses/LICENSE.txt | 28 + .../site-packages/click/__init__.py | 123 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 4063 bytes .../click/__pycache__/_compat.cpython-312.pyc | Bin 0 -> 24185 bytes .../__pycache__/_termui_impl.cpython-312.pyc | Bin 0 -> 31607 bytes .../__pycache__/_textwrap.cpython-312.pyc | Bin 0 -> 2416 bytes .../click/__pycache__/_utils.cpython-312.pyc | Bin 0 -> 1191 bytes .../__pycache__/_winconsole.cpython-312.pyc | Bin 0 -> 11761 bytes .../click/__pycache__/core.cpython-312.pyc | Bin 0 -> 134657 bytes .../__pycache__/decorators.cpython-312.pyc | Bin 0 -> 22128 bytes .../__pycache__/exceptions.cpython-312.pyc | Bin 0 -> 14767 bytes .../__pycache__/formatting.cpython-312.pyc | Bin 0 -> 13663 bytes .../click/__pycache__/globals.cpython-312.pyc | Bin 0 -> 2956 bytes .../click/__pycache__/parser.cpython-312.pyc | Bin 0 -> 20433 bytes .../shell_completion.cpython-312.pyc | Bin 0 -> 23328 bytes .../click/__pycache__/termui.cpython-312.pyc | Bin 0 -> 34642 bytes .../click/__pycache__/testing.cpython-312.pyc | Bin 0 -> 27400 bytes .../click/__pycache__/types.cpython-312.pyc | Bin 0 -> 50029 bytes .../click/__pycache__/utils.cpython-312.pyc | Bin 0 -> 24870 bytes .../python3.12/site-packages/click/_compat.py | 622 + .../site-packages/click/_termui_impl.py | 852 + .../site-packages/click/_textwrap.py | 51 + .../python3.12/site-packages/click/_utils.py | 36 + .../site-packages/click/_winconsole.py | 296 + .../python3.12/site-packages/click/core.py | 3415 + .../site-packages/click/decorators.py | 551 + .../site-packages/click/exceptions.py | 308 + .../site-packages/click/formatting.py | 301 + .../python3.12/site-packages/click/globals.py | 67 + .../python3.12/site-packages/click/parser.py | 532 + .../python3.12/site-packages/click/py.typed | 0 .../site-packages/click/shell_completion.py | 667 + .../python3.12/site-packages/click/termui.py | 883 + .../python3.12/site-packages/click/testing.py | 577 + .../python3.12/site-packages/click/types.py | 1209 + .../python3.12/site-packages/click/utils.py | 627 + .../flask-3.0.0.dist-info/INSTALLER | 1 + .../flask-3.0.0.dist-info/LICENSE.rst | 28 + .../flask-3.0.0.dist-info/METADATA | 116 + .../flask-3.0.0.dist-info/RECORD | 58 + .../flask-3.0.0.dist-info/REQUESTED | 0 .../site-packages/flask-3.0.0.dist-info/WHEEL | 4 + .../flask-3.0.0.dist-info/entry_points.txt | 3 + .../site-packages/flask/__init__.py | 60 + .../site-packages/flask/__main__.py | 3 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 2470 bytes .../__pycache__/__main__.cpython-312.pyc | Bin 0 -> 231 bytes .../flask/__pycache__/app.cpython-312.pyc | Bin 0 -> 60708 bytes .../__pycache__/blueprints.cpython-312.pyc | Bin 0 -> 3917 bytes .../flask/__pycache__/cli.cpython-312.pyc | Bin 0 -> 39877 bytes .../flask/__pycache__/config.cpython-312.pyc | Bin 0 -> 15422 bytes .../flask/__pycache__/ctx.cpython-312.pyc | Bin 0 -> 19547 bytes .../__pycache__/debughelpers.cpython-312.pyc | Bin 0 -> 8552 bytes .../flask/__pycache__/globals.cpython-312.pyc | Bin 0 -> 1855 bytes .../flask/__pycache__/helpers.cpython-312.pyc | Bin 0 -> 24779 bytes .../flask/__pycache__/logging.cpython-312.pyc | Bin 0 -> 3257 bytes .../__pycache__/sessions.cpython-312.pyc | Bin 0 -> 15901 bytes .../flask/__pycache__/signals.cpython-312.pyc | Bin 0 -> 1212 bytes .../__pycache__/templating.cpython-312.pyc | Bin 0 -> 9951 bytes .../flask/__pycache__/testing.cpython-312.pyc | Bin 0 -> 13531 bytes .../flask/__pycache__/typing.cpython-312.pyc | Bin 0 -> 4135 bytes .../flask/__pycache__/views.cpython-312.pyc | Bin 0 -> 6834 bytes .../__pycache__/wrappers.cpython-312.pyc | Bin 0 -> 6072 bytes .../lib/python3.12/site-packages/flask/app.py | 1478 + .../site-packages/flask/blueprints.py | 91 + .../lib/python3.12/site-packages/flask/cli.py | 1068 + .../python3.12/site-packages/flask/config.py | 347 + .../lib/python3.12/site-packages/flask/ctx.py | 440 + .../site-packages/flask/debughelpers.py | 160 + .../python3.12/site-packages/flask/globals.py | 51 + .../python3.12/site-packages/flask/helpers.py | 623 + .../site-packages/flask/json/__init__.py | 170 + .../json/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 6683 bytes .../json/__pycache__/provider.cpython-312.pyc | Bin 0 -> 9239 bytes .../json/__pycache__/tag.cpython-312.pyc | Bin 0 -> 13332 bytes .../site-packages/flask/json/provider.py | 216 + .../site-packages/flask/json/tag.py | 314 + .../python3.12/site-packages/flask/logging.py | 76 + .../python3.12/site-packages/flask/py.typed | 0 .../site-packages/flask/sansio/README.md | 6 + .../sansio/__pycache__/app.cpython-312.pyc | Bin 0 -> 33543 bytes .../__pycache__/blueprints.cpython-312.pyc | Bin 0 -> 31016 bytes .../__pycache__/scaffold.cpython-312.pyc | Bin 0 -> 30278 bytes .../site-packages/flask/sansio/app.py | 964 + .../site-packages/flask/sansio/blueprints.py | 626 + .../site-packages/flask/sansio/scaffold.py | 802 + .../site-packages/flask/sessions.py | 367 + .../python3.12/site-packages/flask/signals.py | 17 + .../site-packages/flask/templating.py | 221 + .../python3.12/site-packages/flask/testing.py | 295 + .../python3.12/site-packages/flask/typing.py | 88 + .../python3.12/site-packages/flask/views.py | 190 + .../site-packages/flask/wrappers.py | 173 + .../INSTALLER | 1 + .../LICENSE.rst | 28 + .../flask_sqlalchemy-3.1.1.dist-info/METADATA | 109 + .../flask_sqlalchemy-3.1.1.dist-info/RECORD | 27 + .../REQUESTED | 0 .../flask_sqlalchemy-3.1.1.dist-info/WHEEL | 4 + .../flask_sqlalchemy/__init__.py | 26 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1039 bytes .../__pycache__/cli.cpython-312.pyc | Bin 0 -> 1017 bytes .../__pycache__/extension.cpython-312.pyc | Bin 0 -> 39946 bytes .../__pycache__/model.cpython-312.pyc | Bin 0 -> 13371 bytes .../__pycache__/pagination.cpython-312.pyc | Bin 0 -> 14273 bytes .../__pycache__/query.cpython-312.pyc | Bin 0 -> 4508 bytes .../record_queries.cpython-312.pyc | Bin 0 -> 4837 bytes .../__pycache__/session.cpython-312.pyc | Bin 0 -> 4541 bytes .../__pycache__/table.cpython-312.pyc | Bin 0 -> 1832 bytes .../track_modifications.cpython-312.pyc | Bin 0 -> 3614 bytes .../site-packages/flask_sqlalchemy/cli.py | 16 + .../flask_sqlalchemy/extension.py | 1008 + .../site-packages/flask_sqlalchemy/model.py | 330 + .../flask_sqlalchemy/pagination.py | 364 + .../site-packages/flask_sqlalchemy/py.typed | 0 .../site-packages/flask_sqlalchemy/query.py | 105 + .../flask_sqlalchemy/record_queries.py | 117 + .../site-packages/flask_sqlalchemy/session.py | 111 + .../site-packages/flask_sqlalchemy/table.py | 39 + .../flask_sqlalchemy/track_modifications.py | 88 + .../greenlet-3.3.1.dist-info/INSTALLER | 1 + .../greenlet-3.3.1.dist-info/METADATA | 98 + .../greenlet-3.3.1.dist-info/RECORD | 121 + .../greenlet-3.3.1.dist-info/WHEEL | 6 + .../greenlet-3.3.1.dist-info/licenses/LICENSE | 30 + .../licenses/LICENSE.PSF | 47 + .../greenlet-3.3.1.dist-info/top_level.txt | 1 + .../site-packages/greenlet/CObjects.cpp | 157 + .../site-packages/greenlet/PyGreenlet.cpp | 774 + .../site-packages/greenlet/PyGreenlet.hpp | 35 + .../greenlet/PyGreenletUnswitchable.cpp | 147 + .../site-packages/greenlet/PyModule.cpp | 292 + .../greenlet/TBrokenGreenlet.cpp | 45 + .../greenlet/TExceptionState.cpp | 62 + .../site-packages/greenlet/TGreenlet.cpp | 725 + .../site-packages/greenlet/TGreenlet.hpp | 837 + .../greenlet/TGreenletGlobals.cpp | 94 + .../site-packages/greenlet/TMainGreenlet.cpp | 160 + .../site-packages/greenlet/TPythonState.cpp | 439 + .../site-packages/greenlet/TStackState.cpp | 265 + .../site-packages/greenlet/TThreadState.hpp | 523 + .../greenlet/TThreadStateCreator.hpp | 102 + .../greenlet/TThreadStateDestroy.cpp | 223 + .../site-packages/greenlet/TUserGreenlet.cpp | 662 + .../site-packages/greenlet/__init__.py | 71 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1066 bytes .../_greenlet.cpython-312-x86_64-linux-gnu.so | Bin 0 -> 1448736 bytes .../site-packages/greenlet/greenlet.cpp | 323 + .../site-packages/greenlet/greenlet.h | 164 + .../greenlet/greenlet_allocator.hpp | 76 + .../greenlet/greenlet_compiler_compat.hpp | 98 + .../greenlet/greenlet_cpython_compat.hpp | 156 + .../greenlet/greenlet_exceptions.hpp | 171 + .../greenlet/greenlet_internal.hpp | 107 + .../greenlet/greenlet_msvc_compat.hpp | 100 + .../site-packages/greenlet/greenlet_refs.hpp | 1118 + .../greenlet/greenlet_slp_switch.hpp | 103 + .../greenlet/greenlet_thread_support.hpp | 31 + .../greenlet/platform/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 189 bytes .../platform/setup_switch_x64_masm.cmd | 2 + .../greenlet/platform/switch_aarch64_gcc.h | 124 + .../greenlet/platform/switch_alpha_unix.h | 30 + .../greenlet/platform/switch_amd64_unix.h | 87 + .../greenlet/platform/switch_arm32_gcc.h | 79 + .../greenlet/platform/switch_arm32_ios.h | 67 + .../greenlet/platform/switch_arm64_masm.asm | 53 + .../greenlet/platform/switch_arm64_masm.obj | Bin 0 -> 746 bytes .../greenlet/platform/switch_arm64_msvc.h | 17 + .../greenlet/platform/switch_csky_gcc.h | 48 + .../platform/switch_loongarch64_linux.h | 31 + .../greenlet/platform/switch_m68k_gcc.h | 38 + .../greenlet/platform/switch_mips_unix.h | 65 + .../greenlet/platform/switch_ppc64_aix.h | 103 + .../greenlet/platform/switch_ppc64_linux.h | 105 + .../greenlet/platform/switch_ppc_aix.h | 87 + .../greenlet/platform/switch_ppc_linux.h | 84 + .../greenlet/platform/switch_ppc_macosx.h | 82 + .../greenlet/platform/switch_ppc_unix.h | 82 + .../greenlet/platform/switch_riscv_unix.h | 41 + .../greenlet/platform/switch_s390_unix.h | 87 + .../greenlet/platform/switch_sh_gcc.h | 36 + .../greenlet/platform/switch_sparc_sun_gcc.h | 92 + .../greenlet/platform/switch_x32_unix.h | 63 + .../greenlet/platform/switch_x64_masm.asm | 111 + .../greenlet/platform/switch_x64_masm.obj | Bin 0 -> 1078 bytes .../greenlet/platform/switch_x64_msvc.h | 60 + .../greenlet/platform/switch_x86_msvc.h | 326 + .../greenlet/platform/switch_x86_unix.h | 105 + .../greenlet/slp_platformselect.h | 77 + .../site-packages/greenlet/tests/__init__.py | 248 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 9242 bytes ...fail_clearing_run_switches.cpython-312.pyc | Bin 0 -> 2074 bytes .../fail_cpp_exception.cpython-312.pyc | Bin 0 -> 1609 bytes ...nitialstub_already_started.cpython-312.pyc | Bin 0 -> 3477 bytes .../fail_slp_switch.cpython-312.pyc | Bin 0 -> 1302 bytes ...ail_switch_three_greenlets.cpython-312.pyc | Bin 0 -> 1718 bytes ...il_switch_three_greenlets2.cpython-312.pyc | Bin 0 -> 2572 bytes .../fail_switch_two_greenlets.cpython-312.pyc | Bin 0 -> 1689 bytes .../__pycache__/leakcheck.cpython-312.pyc | Bin 0 -> 11696 bytes .../test_contextvars.cpython-312.pyc | Bin 0 -> 15473 bytes .../__pycache__/test_cpp.cpython-312.pyc | Bin 0 -> 4103 bytes .../test_extension_interface.cpython-312.pyc | Bin 0 -> 7461 bytes .../tests/__pycache__/test_gc.cpython-312.pyc | Bin 0 -> 4912 bytes .../test_generator.cpython-312.pyc | Bin 0 -> 3077 bytes .../test_generator_nested.cpython-312.pyc | Bin 0 -> 7815 bytes .../__pycache__/test_greenlet.cpython-312.pyc | Bin 0 -> 76320 bytes .../test_greenlet_trash.cpython-312.pyc | Bin 0 -> 6774 bytes .../__pycache__/test_leaks.cpython-312.pyc | Bin 0 -> 19968 bytes .../test_stack_saved.cpython-312.pyc | Bin 0 -> 1341 bytes .../__pycache__/test_throw.cpython-312.pyc | Bin 0 -> 7377 bytes .../__pycache__/test_tracing.cpython-312.pyc | Bin 0 -> 13873 bytes .../__pycache__/test_version.cpython-312.pyc | Bin 0 -> 2560 bytes .../__pycache__/test_weakref.cpython-312.pyc | Bin 0 -> 2726 bytes .../greenlet/tests/_test_extension.c | 258 + ..._extension.cpython-312-x86_64-linux-gnu.so | Bin 0 -> 17256 bytes .../greenlet/tests/_test_extension_cpp.cpp | 229 + ...ension_cpp.cpython-312-x86_64-linux-gnu.so | Bin 0 -> 58384 bytes .../tests/fail_clearing_run_switches.py | 47 + .../greenlet/tests/fail_cpp_exception.py | 33 + .../tests/fail_initialstub_already_started.py | 78 + .../greenlet/tests/fail_slp_switch.py | 29 + .../tests/fail_switch_three_greenlets.py | 44 + .../tests/fail_switch_three_greenlets2.py | 55 + .../tests/fail_switch_two_greenlets.py | 41 + .../site-packages/greenlet/tests/leakcheck.py | 336 + .../greenlet/tests/test_contextvars.py | 312 + .../site-packages/greenlet/tests/test_cpp.py | 73 + .../tests/test_extension_interface.py | 115 + .../site-packages/greenlet/tests/test_gc.py | 86 + .../greenlet/tests/test_generator.py | 59 + .../greenlet/tests/test_generator_nested.py | 168 + .../greenlet/tests/test_greenlet.py | 1365 + .../greenlet/tests/test_greenlet_trash.py | 187 + .../greenlet/tests/test_leaks.py | 457 + .../greenlet/tests/test_stack_saved.py | 19 + .../greenlet/tests/test_throw.py | 128 + .../greenlet/tests/test_tracing.py | 299 + .../greenlet/tests/test_version.py | 41 + .../greenlet/tests/test_weakref.py | 35 + .../itsdangerous-2.2.0.dist-info/INSTALLER | 1 + .../itsdangerous-2.2.0.dist-info/LICENSE.txt | 28 + .../itsdangerous-2.2.0.dist-info/METADATA | 60 + .../itsdangerous-2.2.0.dist-info/RECORD | 22 + .../itsdangerous-2.2.0.dist-info/WHEEL | 4 + .../site-packages/itsdangerous/__init__.py | 38 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1622 bytes .../__pycache__/_json.cpython-312.pyc | Bin 0 -> 1176 bytes .../__pycache__/encoding.cpython-312.pyc | Bin 0 -> 2676 bytes .../__pycache__/exc.cpython-312.pyc | Bin 0 -> 3936 bytes .../__pycache__/serializer.cpython-312.pyc | Bin 0 -> 15417 bytes .../__pycache__/signer.cpython-312.pyc | Bin 0 -> 11282 bytes .../__pycache__/timed.cpython-312.pyc | Bin 0 -> 8730 bytes .../__pycache__/url_safe.cpython-312.pyc | Bin 0 -> 3526 bytes .../site-packages/itsdangerous/_json.py | 18 + .../site-packages/itsdangerous/encoding.py | 54 + .../site-packages/itsdangerous/exc.py | 106 + .../site-packages/itsdangerous/py.typed | 0 .../site-packages/itsdangerous/serializer.py | 406 + .../site-packages/itsdangerous/signer.py | 266 + .../site-packages/itsdangerous/timed.py | 228 + .../site-packages/itsdangerous/url_safe.py | 83 + .../jinja2-3.1.6.dist-info/INSTALLER | 1 + .../jinja2-3.1.6.dist-info/METADATA | 84 + .../jinja2-3.1.6.dist-info/RECORD | 57 + .../jinja2-3.1.6.dist-info/WHEEL | 4 + .../jinja2-3.1.6.dist-info/entry_points.txt | 3 + .../licenses/LICENSE.txt | 28 + .../site-packages/jinja2/__init__.py | 38 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1647 bytes .../__pycache__/_identifier.cpython-312.pyc | Bin 0 -> 2128 bytes .../__pycache__/async_utils.cpython-312.pyc | Bin 0 -> 4968 bytes .../__pycache__/bccache.cpython-312.pyc | Bin 0 -> 19339 bytes .../__pycache__/compiler.cpython-312.pyc | Bin 0 -> 104054 bytes .../__pycache__/constants.cpython-312.pyc | Bin 0 -> 1550 bytes .../jinja2/__pycache__/debug.cpython-312.pyc | Bin 0 -> 6575 bytes .../__pycache__/defaults.cpython-312.pyc | Bin 0 -> 1600 bytes .../__pycache__/environment.cpython-312.pyc | Bin 0 -> 76676 bytes .../__pycache__/exceptions.cpython-312.pyc | Bin 0 -> 7714 bytes .../jinja2/__pycache__/ext.cpython-312.pyc | Bin 0 -> 41907 bytes .../__pycache__/filters.cpython-312.pyc | Bin 0 -> 72324 bytes .../__pycache__/idtracking.cpython-312.pyc | Bin 0 -> 19189 bytes .../jinja2/__pycache__/lexer.cpython-312.pyc | Bin 0 -> 32070 bytes .../__pycache__/loaders.cpython-312.pyc | Bin 0 -> 32349 bytes .../jinja2/__pycache__/meta.cpython-312.pyc | Bin 0 -> 5484 bytes .../__pycache__/nativetypes.cpython-312.pyc | Bin 0 -> 7005 bytes .../jinja2/__pycache__/nodes.cpython-312.pyc | Bin 0 -> 58267 bytes .../__pycache__/optimizer.cpython-312.pyc | Bin 0 -> 2683 bytes .../jinja2/__pycache__/parser.cpython-312.pyc | Bin 0 -> 61197 bytes .../__pycache__/runtime.cpython-312.pyc | Bin 0 -> 48885 bytes .../__pycache__/sandbox.cpython-312.pyc | Bin 0 -> 18101 bytes .../jinja2/__pycache__/tests.cpython-312.pyc | Bin 0 -> 9044 bytes .../jinja2/__pycache__/utils.cpython-312.pyc | Bin 0 -> 34857 bytes .../__pycache__/visitor.cpython-312.pyc | Bin 0 -> 5359 bytes .../site-packages/jinja2/_identifier.py | 6 + .../site-packages/jinja2/async_utils.py | 99 + .../site-packages/jinja2/bccache.py | 408 + .../site-packages/jinja2/compiler.py | 1998 + .../site-packages/jinja2/constants.py | 20 + .../python3.12/site-packages/jinja2/debug.py | 191 + .../site-packages/jinja2/defaults.py | 48 + .../site-packages/jinja2/environment.py | 1672 + .../site-packages/jinja2/exceptions.py | 166 + .../python3.12/site-packages/jinja2/ext.py | 870 + .../site-packages/jinja2/filters.py | 1873 + .../site-packages/jinja2/idtracking.py | 318 + .../python3.12/site-packages/jinja2/lexer.py | 868 + .../site-packages/jinja2/loaders.py | 693 + .../python3.12/site-packages/jinja2/meta.py | 112 + .../site-packages/jinja2/nativetypes.py | 130 + .../python3.12/site-packages/jinja2/nodes.py | 1206 + .../site-packages/jinja2/optimizer.py | 48 + .../python3.12/site-packages/jinja2/parser.py | 1049 + .../python3.12/site-packages/jinja2/py.typed | 0 .../site-packages/jinja2/runtime.py | 1062 + .../site-packages/jinja2/sandbox.py | 436 + .../python3.12/site-packages/jinja2/tests.py | 256 + .../python3.12/site-packages/jinja2/utils.py | 766 + .../site-packages/jinja2/visitor.py | 92 + .../markupsafe-3.0.3.dist-info/INSTALLER | 1 + .../markupsafe-3.0.3.dist-info/METADATA | 74 + .../markupsafe-3.0.3.dist-info/RECORD | 14 + .../markupsafe-3.0.3.dist-info/WHEEL | 7 + .../licenses/LICENSE.txt | 28 + .../markupsafe-3.0.3.dist-info/top_level.txt | 1 + .../site-packages/markupsafe/__init__.py | 396 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 20957 bytes .../__pycache__/_native.cpython-312.pyc | Bin 0 -> 609 bytes .../site-packages/markupsafe/_native.py | 8 + .../site-packages/markupsafe/_speedups.c | 200 + .../_speedups.cpython-312-x86_64-linux-gnu.so | Bin 0 -> 44072 bytes .../site-packages/markupsafe/_speedups.pyi | 1 + .../site-packages/markupsafe/py.typed | 0 .../pip-24.0.dist-info/AUTHORS.txt | 760 + .../pip-24.0.dist-info/INSTALLER | 1 + .../pip-24.0.dist-info/LICENSE.txt | 20 + .../site-packages/pip-24.0.dist-info/METADATA | 88 + .../site-packages/pip-24.0.dist-info/RECORD | 1005 + .../pip-24.0.dist-info/REQUESTED | 0 .../site-packages/pip-24.0.dist-info/WHEEL | 5 + .../pip-24.0.dist-info/entry_points.txt | 4 + .../pip-24.0.dist-info/top_level.txt | 1 + .../python3.12/site-packages/pip/__init__.py | 13 + .../python3.12/site-packages/pip/__main__.py | 24 + .../site-packages/pip/__pip-runner__.py | 50 + .../pip/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 684 bytes .../pip/__pycache__/__main__.cpython-312.pyc | Bin 0 -> 840 bytes .../__pip-runner__.cpython-312.pyc | Bin 0 -> 2203 bytes .../site-packages/pip/_internal/__init__.py | 18 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 786 bytes .../__pycache__/build_env.cpython-312.pyc | Bin 0 -> 14293 bytes .../__pycache__/cache.cpython-312.pyc | Bin 0 -> 12664 bytes .../__pycache__/configuration.cpython-312.pyc | Bin 0 -> 17665 bytes .../__pycache__/exceptions.cpython-312.pyc | Bin 0 -> 33283 bytes .../__pycache__/main.cpython-312.pyc | Bin 0 -> 669 bytes .../__pycache__/pyproject.cpython-312.pyc | Bin 0 -> 4970 bytes .../self_outdated_check.cpython-312.pyc | Bin 0 -> 10551 bytes .../__pycache__/wheel_builder.cpython-312.pyc | Bin 0 -> 13648 bytes .../site-packages/pip/_internal/build_env.py | 311 + .../site-packages/pip/_internal/cache.py | 290 + .../pip/_internal/cli/__init__.py | 4 + .../cli/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 277 bytes .../autocompletion.cpython-312.pyc | Bin 0 -> 8464 bytes .../__pycache__/base_command.cpython-312.pyc | Bin 0 -> 10454 bytes .../__pycache__/cmdoptions.cpython-312.pyc | Bin 0 -> 30373 bytes .../command_context.cpython-312.pyc | Bin 0 -> 1780 bytes .../cli/__pycache__/main.cpython-312.pyc | Bin 0 -> 2297 bytes .../__pycache__/main_parser.cpython-312.pyc | Bin 0 -> 4904 bytes .../cli/__pycache__/parser.cpython-312.pyc | Bin 0 -> 15021 bytes .../__pycache__/progress_bars.cpython-312.pyc | Bin 0 -> 2619 bytes .../__pycache__/req_command.cpython-312.pyc | Bin 0 -> 18851 bytes .../cli/__pycache__/spinners.cpython-312.pyc | Bin 0 -> 7839 bytes .../__pycache__/status_codes.cpython-312.pyc | Bin 0 -> 374 bytes .../pip/_internal/cli/autocompletion.py | 172 + .../pip/_internal/cli/base_command.py | 236 + .../pip/_internal/cli/cmdoptions.py | 1074 + .../pip/_internal/cli/command_context.py | 27 + .../site-packages/pip/_internal/cli/main.py | 79 + .../pip/_internal/cli/main_parser.py | 134 + .../site-packages/pip/_internal/cli/parser.py | 294 + .../pip/_internal/cli/progress_bars.py | 68 + .../pip/_internal/cli/req_command.py | 505 + .../pip/_internal/cli/spinners.py | 159 + .../pip/_internal/cli/status_codes.py | 6 + .../pip/_internal/commands/__init__.py | 132 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 4001 bytes .../__pycache__/cache.cpython-312.pyc | Bin 0 -> 9710 bytes .../__pycache__/check.cpython-312.pyc | Bin 0 -> 2089 bytes .../__pycache__/completion.cpython-312.pyc | Bin 0 -> 5191 bytes .../__pycache__/configuration.cpython-312.pyc | Bin 0 -> 13211 bytes .../__pycache__/debug.cpython-312.pyc | Bin 0 -> 10160 bytes .../__pycache__/download.cpython-312.pyc | Bin 0 -> 7588 bytes .../__pycache__/freeze.cpython-312.pyc | Bin 0 -> 4415 bytes .../commands/__pycache__/hash.cpython-312.pyc | Bin 0 -> 2982 bytes .../commands/__pycache__/help.cpython-312.pyc | Bin 0 -> 1672 bytes .../__pycache__/index.cpython-312.pyc | Bin 0 -> 6719 bytes .../__pycache__/inspect.cpython-312.pyc | Bin 0 -> 3974 bytes .../__pycache__/install.cpython-312.pyc | Bin 0 -> 28912 bytes .../commands/__pycache__/list.cpython-312.pyc | Bin 0 -> 15655 bytes .../__pycache__/search.cpython-312.pyc | Bin 0 -> 7620 bytes .../commands/__pycache__/show.cpython-312.pyc | Bin 0 -> 9727 bytes .../__pycache__/uninstall.cpython-312.pyc | Bin 0 -> 4725 bytes .../__pycache__/wheel.cpython-312.pyc | Bin 0 -> 8955 bytes .../pip/_internal/commands/cache.py | 225 + .../pip/_internal/commands/check.py | 54 + .../pip/_internal/commands/completion.py | 130 + .../pip/_internal/commands/configuration.py | 280 + .../pip/_internal/commands/debug.py | 201 + .../pip/_internal/commands/download.py | 147 + .../pip/_internal/commands/freeze.py | 109 + .../pip/_internal/commands/hash.py | 59 + .../pip/_internal/commands/help.py | 41 + .../pip/_internal/commands/index.py | 139 + .../pip/_internal/commands/inspect.py | 92 + .../pip/_internal/commands/install.py | 774 + .../pip/_internal/commands/list.py | 370 + .../pip/_internal/commands/search.py | 174 + .../pip/_internal/commands/show.py | 189 + .../pip/_internal/commands/uninstall.py | 113 + .../pip/_internal/commands/wheel.py | 183 + .../pip/_internal/configuration.py | 383 + .../pip/_internal/distributions/__init__.py | 21 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 940 bytes .../__pycache__/base.cpython-312.pyc | Bin 0 -> 2861 bytes .../__pycache__/installed.cpython-312.pyc | Bin 0 -> 1699 bytes .../__pycache__/sdist.cpython-312.pyc | Bin 0 -> 8487 bytes .../__pycache__/wheel.cpython-312.pyc | Bin 0 -> 2247 bytes .../pip/_internal/distributions/base.py | 51 + .../pip/_internal/distributions/installed.py | 29 + .../pip/_internal/distributions/sdist.py | 156 + .../pip/_internal/distributions/wheel.py | 40 + .../site-packages/pip/_internal/exceptions.py | 728 + .../pip/_internal/index/__init__.py | 2 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 231 bytes .../__pycache__/collector.cpython-312.pyc | Bin 0 -> 21885 bytes .../package_finder.cpython-312.pyc | Bin 0 -> 40734 bytes .../index/__pycache__/sources.cpython-312.pyc | Bin 0 -> 12603 bytes .../pip/_internal/index/collector.py | 507 + .../pip/_internal/index/package_finder.py | 1027 + .../pip/_internal/index/sources.py | 285 + .../pip/_internal/locations/__init__.py | 467 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 16775 bytes .../__pycache__/_distutils.cpython-312.pyc | Bin 0 -> 6855 bytes .../__pycache__/_sysconfig.cpython-312.pyc | Bin 0 -> 8010 bytes .../__pycache__/base.cpython-312.pyc | Bin 0 -> 3780 bytes .../pip/_internal/locations/_distutils.py | 172 + .../pip/_internal/locations/_sysconfig.py | 213 + .../pip/_internal/locations/base.py | 81 + .../site-packages/pip/_internal/main.py | 12 + .../pip/_internal/metadata/__init__.py | 128 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 5881 bytes .../__pycache__/_json.cpython-312.pyc | Bin 0 -> 2874 bytes .../metadata/__pycache__/base.cpython-312.pyc | Bin 0 -> 35711 bytes .../__pycache__/pkg_resources.cpython-312.pyc | Bin 0 -> 15789 bytes .../pip/_internal/metadata/_json.py | 84 + .../pip/_internal/metadata/base.py | 702 + .../_internal/metadata/importlib/__init__.py | 6 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 357 bytes .../__pycache__/_compat.cpython-312.pyc | Bin 0 -> 3332 bytes .../__pycache__/_dists.cpython-312.pyc | Bin 0 -> 13424 bytes .../__pycache__/_envs.cpython-312.pyc | Bin 0 -> 11179 bytes .../_internal/metadata/importlib/_compat.py | 55 + .../_internal/metadata/importlib/_dists.py | 227 + .../pip/_internal/metadata/importlib/_envs.py | 189 + .../pip/_internal/metadata/pkg_resources.py | 278 + .../pip/_internal/models/__init__.py | 2 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 265 bytes .../__pycache__/candidate.cpython-312.pyc | Bin 0 -> 1904 bytes .../__pycache__/direct_url.cpython-312.pyc | Bin 0 -> 11198 bytes .../format_control.cpython-312.pyc | Bin 0 -> 4226 bytes .../models/__pycache__/index.cpython-312.pyc | Bin 0 -> 1693 bytes .../installation_report.cpython-312.pyc | Bin 0 -> 2271 bytes .../models/__pycache__/link.cpython-312.pyc | Bin 0 -> 26001 bytes .../models/__pycache__/scheme.cpython-312.pyc | Bin 0 -> 1168 bytes .../__pycache__/search_scope.cpython-312.pyc | Bin 0 -> 5087 bytes .../selection_prefs.cpython-312.pyc | Bin 0 -> 1850 bytes .../__pycache__/target_python.cpython-312.pyc | Bin 0 -> 4953 bytes .../models/__pycache__/wheel.cpython-312.pyc | Bin 0 -> 5779 bytes .../pip/_internal/models/candidate.py | 30 + .../pip/_internal/models/direct_url.py | 235 + .../pip/_internal/models/format_control.py | 78 + .../pip/_internal/models/index.py | 28 + .../_internal/models/installation_report.py | 56 + .../pip/_internal/models/link.py | 579 + .../pip/_internal/models/scheme.py | 31 + .../pip/_internal/models/search_scope.py | 132 + .../pip/_internal/models/selection_prefs.py | 51 + .../pip/_internal/models/target_python.py | 122 + .../pip/_internal/models/wheel.py | 92 + .../pip/_internal/network/__init__.py | 2 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 253 bytes .../network/__pycache__/auth.cpython-312.pyc | Bin 0 -> 21995 bytes .../network/__pycache__/cache.cpython-312.pyc | Bin 0 -> 6517 bytes .../__pycache__/download.cpython-312.pyc | Bin 0 -> 8552 bytes .../__pycache__/lazy_wheel.cpython-312.pyc | Bin 0 -> 11662 bytes .../__pycache__/session.cpython-312.pyc | Bin 0 -> 18773 bytes .../network/__pycache__/utils.cpython-312.pyc | Bin 0 -> 2252 bytes .../__pycache__/xmlrpc.cpython-312.pyc | Bin 0 -> 2948 bytes .../pip/_internal/network/auth.py | 561 + .../pip/_internal/network/cache.py | 106 + .../pip/_internal/network/download.py | 186 + .../pip/_internal/network/lazy_wheel.py | 210 + .../pip/_internal/network/session.py | 520 + .../pip/_internal/network/utils.py | 96 + .../pip/_internal/network/xmlrpc.py | 62 + .../pip/_internal/operations/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 196 bytes .../__pycache__/check.cpython-312.pyc | Bin 0 -> 7578 bytes .../__pycache__/freeze.cpython-312.pyc | Bin 0 -> 10116 bytes .../__pycache__/prepare.cpython-312.pyc | Bin 0 -> 25746 bytes .../_internal/operations/build/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 202 bytes .../__pycache__/build_tracker.cpython-312.pyc | Bin 0 -> 7822 bytes .../__pycache__/metadata.cpython-312.pyc | Bin 0 -> 1879 bytes .../metadata_editable.cpython-312.pyc | Bin 0 -> 1913 bytes .../metadata_legacy.cpython-312.pyc | Bin 0 -> 3064 bytes .../build/__pycache__/wheel.cpython-312.pyc | Bin 0 -> 1683 bytes .../wheel_editable.cpython-312.pyc | Bin 0 -> 2024 bytes .../__pycache__/wheel_legacy.cpython-312.pyc | Bin 0 -> 3928 bytes .../operations/build/build_tracker.py | 139 + .../_internal/operations/build/metadata.py | 39 + .../operations/build/metadata_editable.py | 41 + .../operations/build/metadata_legacy.py | 74 + .../pip/_internal/operations/build/wheel.py | 37 + .../operations/build/wheel_editable.py | 46 + .../operations/build/wheel_legacy.py | 102 + .../pip/_internal/operations/check.py | 187 + .../pip/_internal/operations/freeze.py | 255 + .../_internal/operations/install/__init__.py | 2 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 265 bytes .../editable_legacy.cpython-312.pyc | Bin 0 -> 1816 bytes .../install/__pycache__/wheel.cpython-312.pyc | Bin 0 -> 33858 bytes .../operations/install/editable_legacy.py | 46 + .../pip/_internal/operations/install/wheel.py | 734 + .../pip/_internal/operations/prepare.py | 730 + .../site-packages/pip/_internal/pyproject.py | 179 + .../pip/_internal/req/__init__.py | 92 + .../req/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 3742 bytes .../__pycache__/constructors.cpython-312.pyc | Bin 0 -> 21581 bytes .../req/__pycache__/req_file.cpython-312.pyc | Bin 0 -> 21460 bytes .../__pycache__/req_install.cpython-312.pyc | Bin 0 -> 38413 bytes .../req/__pycache__/req_set.cpython-312.pyc | Bin 0 -> 7217 bytes .../__pycache__/req_uninstall.cpython-312.pyc | Bin 0 -> 32976 bytes .../pip/_internal/req/constructors.py | 576 + .../pip/_internal/req/req_file.py | 554 + .../pip/_internal/req/req_install.py | 923 + .../pip/_internal/req/req_set.py | 119 + .../pip/_internal/req/req_uninstall.py | 649 + .../pip/_internal/resolution/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 196 bytes .../__pycache__/base.cpython-312.pyc | Bin 0 -> 1184 bytes .../pip/_internal/resolution/base.py | 20 + .../_internal/resolution/legacy/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 203 bytes .../__pycache__/resolver.cpython-312.pyc | Bin 0 -> 22438 bytes .../_internal/resolution/legacy/resolver.py | 598 + .../resolution/resolvelib/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 207 bytes .../__pycache__/base.cpython-312.pyc | Bin 0 -> 8336 bytes .../__pycache__/candidates.cpython-312.pyc | Bin 0 -> 30397 bytes .../__pycache__/factory.cpython-312.pyc | Bin 0 -> 32113 bytes .../found_candidates.cpython-312.pyc | Bin 0 -> 6207 bytes .../__pycache__/provider.cpython-312.pyc | Bin 0 -> 10377 bytes .../__pycache__/reporter.cpython-312.pyc | Bin 0 -> 4934 bytes .../__pycache__/requirements.cpython-312.pyc | Bin 0 -> 11428 bytes .../__pycache__/resolver.cpython-312.pyc | Bin 0 -> 12350 bytes .../_internal/resolution/resolvelib/base.py | 141 + .../resolution/resolvelib/candidates.py | 597 + .../resolution/resolvelib/factory.py | 812 + .../resolution/resolvelib/found_candidates.py | 155 + .../resolution/resolvelib/provider.py | 255 + .../resolution/resolvelib/reporter.py | 80 + .../resolution/resolvelib/requirements.py | 166 + .../resolution/resolvelib/resolver.py | 317 + .../pip/_internal/self_outdated_check.py | 248 + .../pip/_internal/utils/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 191 bytes .../__pycache__/_jaraco_text.cpython-312.pyc | Bin 0 -> 4532 bytes .../utils/__pycache__/_log.cpython-312.pyc | Bin 0 -> 1862 bytes .../utils/__pycache__/appdirs.cpython-312.pyc | Bin 0 -> 2406 bytes .../utils/__pycache__/compat.cpython-312.pyc | Bin 0 -> 2209 bytes .../compatibility_tags.cpython-312.pyc | Bin 0 -> 5557 bytes .../__pycache__/datetime.cpython-312.pyc | Bin 0 -> 680 bytes .../__pycache__/deprecation.cpython-312.pyc | Bin 0 -> 4182 bytes .../direct_url_helpers.cpython-312.pyc | Bin 0 -> 3559 bytes .../__pycache__/egg_link.cpython-312.pyc | Bin 0 -> 3222 bytes .../__pycache__/encoding.cpython-312.pyc | Bin 0 -> 2154 bytes .../__pycache__/entrypoints.cpython-312.pyc | Bin 0 -> 3989 bytes .../__pycache__/filesystem.cpython-312.pyc | Bin 0 -> 7454 bytes .../__pycache__/filetypes.cpython-312.pyc | Bin 0 -> 1160 bytes .../utils/__pycache__/glibc.cpython-312.pyc | Bin 0 -> 2338 bytes .../utils/__pycache__/hashes.cpython-312.pyc | Bin 0 -> 7550 bytes .../utils/__pycache__/logging.cpython-312.pyc | Bin 0 -> 13553 bytes .../utils/__pycache__/misc.cpython-312.pyc | Bin 0 -> 34117 bytes .../utils/__pycache__/models.cpython-312.pyc | Bin 0 -> 2708 bytes .../__pycache__/packaging.cpython-312.pyc | Bin 0 -> 2579 bytes .../setuptools_build.cpython-312.pyc | Bin 0 -> 4546 bytes .../__pycache__/subprocess.cpython-312.pyc | Bin 0 -> 8714 bytes .../__pycache__/temp_dir.cpython-312.pyc | Bin 0 -> 12058 bytes .../__pycache__/unpacking.cpython-312.pyc | Bin 0 -> 11104 bytes .../utils/__pycache__/urls.cpython-312.pyc | Bin 0 -> 2401 bytes .../__pycache__/virtualenv.cpython-312.pyc | Bin 0 -> 4476 bytes .../utils/__pycache__/wheel.cpython-312.pyc | Bin 0 -> 5922 bytes .../pip/_internal/utils/_jaraco_text.py | 109 + .../site-packages/pip/_internal/utils/_log.py | 38 + .../pip/_internal/utils/appdirs.py | 52 + .../pip/_internal/utils/compat.py | 63 + .../pip/_internal/utils/compatibility_tags.py | 165 + .../pip/_internal/utils/datetime.py | 11 + .../pip/_internal/utils/deprecation.py | 120 + .../pip/_internal/utils/direct_url_helpers.py | 87 + .../pip/_internal/utils/egg_link.py | 80 + .../pip/_internal/utils/encoding.py | 36 + .../pip/_internal/utils/entrypoints.py | 84 + .../pip/_internal/utils/filesystem.py | 153 + .../pip/_internal/utils/filetypes.py | 27 + .../pip/_internal/utils/glibc.py | 88 + .../pip/_internal/utils/hashes.py | 151 + .../pip/_internal/utils/logging.py | 348 + .../site-packages/pip/_internal/utils/misc.py | 783 + .../pip/_internal/utils/models.py | 39 + .../pip/_internal/utils/packaging.py | 57 + .../pip/_internal/utils/setuptools_build.py | 146 + .../pip/_internal/utils/subprocess.py | 260 + .../pip/_internal/utils/temp_dir.py | 296 + .../pip/_internal/utils/unpacking.py | 257 + .../site-packages/pip/_internal/utils/urls.py | 62 + .../pip/_internal/utils/virtualenv.py | 104 + .../pip/_internal/utils/wheel.py | 134 + .../pip/_internal/vcs/__init__.py | 15 + .../vcs/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 530 bytes .../vcs/__pycache__/bazaar.cpython-312.pyc | Bin 0 -> 5022 bytes .../vcs/__pycache__/git.cpython-312.pyc | Bin 0 -> 18991 bytes .../vcs/__pycache__/mercurial.cpython-312.pyc | Bin 0 -> 7611 bytes .../__pycache__/subversion.cpython-312.pyc | Bin 0 -> 12483 bytes .../versioncontrol.cpython-312.pyc | Bin 0 -> 29009 bytes .../site-packages/pip/_internal/vcs/bazaar.py | 112 + .../site-packages/pip/_internal/vcs/git.py | 526 + .../pip/_internal/vcs/mercurial.py | 163 + .../pip/_internal/vcs/subversion.py | 324 + .../pip/_internal/vcs/versioncontrol.py | 705 + .../pip/_internal/wheel_builder.py | 354 + .../site-packages/pip/_vendor/__init__.py | 121 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 4692 bytes .../_vendor/__pycache__/six.cpython-312.pyc | Bin 0 -> 41269 bytes .../typing_extensions.cpython-312.pyc | Bin 0 -> 122049 bytes .../pip/_vendor/cachecontrol/__init__.py | 28 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 902 bytes .../__pycache__/_cmd.cpython-312.pyc | Bin 0 -> 2646 bytes .../__pycache__/adapter.cpython-312.pyc | Bin 0 -> 6464 bytes .../__pycache__/cache.cpython-312.pyc | Bin 0 -> 3809 bytes .../__pycache__/controller.cpython-312.pyc | Bin 0 -> 16167 bytes .../__pycache__/filewrapper.cpython-312.pyc | Bin 0 -> 4347 bytes .../__pycache__/heuristics.cpython-312.pyc | Bin 0 -> 6694 bytes .../__pycache__/serialize.cpython-312.pyc | Bin 0 -> 6405 bytes .../__pycache__/wrapper.cpython-312.pyc | Bin 0 -> 1674 bytes .../pip/_vendor/cachecontrol/_cmd.py | 70 + .../pip/_vendor/cachecontrol/adapter.py | 161 + .../pip/_vendor/cachecontrol/cache.py | 74 + .../_vendor/cachecontrol/caches/__init__.py | 8 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 435 bytes .../__pycache__/file_cache.cpython-312.pyc | Bin 0 -> 7710 bytes .../__pycache__/redis_cache.cpython-312.pyc | Bin 0 -> 2738 bytes .../_vendor/cachecontrol/caches/file_cache.py | 181 + .../cachecontrol/caches/redis_cache.py | 48 + .../pip/_vendor/cachecontrol/controller.py | 494 + .../pip/_vendor/cachecontrol/filewrapper.py | 119 + .../pip/_vendor/cachecontrol/heuristics.py | 154 + .../pip/_vendor/cachecontrol/serialize.py | 206 + .../pip/_vendor/cachecontrol/wrapper.py | 43 + .../pip/_vendor/certifi/__init__.py | 4 + .../pip/_vendor/certifi/__main__.py | 12 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 318 bytes .../__pycache__/__main__.cpython-312.pyc | Bin 0 -> 645 bytes .../certifi/__pycache__/core.cpython-312.pyc | Bin 0 -> 3327 bytes .../pip/_vendor/certifi/cacert.pem | 4635 + .../site-packages/pip/_vendor/certifi/core.py | 119 + .../pip/_vendor/chardet/__init__.py | 115 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 4568 bytes .../__pycache__/big5freq.cpython-312.pyc | Bin 0 -> 27199 bytes .../__pycache__/big5prober.cpython-312.pyc | Bin 0 -> 1387 bytes .../chardistribution.cpython-312.pyc | Bin 0 -> 9638 bytes .../charsetgroupprober.cpython-312.pyc | Bin 0 -> 4122 bytes .../__pycache__/charsetprober.cpython-312.pyc | Bin 0 -> 5018 bytes .../codingstatemachine.cpython-312.pyc | Bin 0 -> 3878 bytes .../codingstatemachinedict.cpython-312.pyc | Bin 0 -> 789 bytes .../__pycache__/cp949prober.cpython-312.pyc | Bin 0 -> 1396 bytes .../chardet/__pycache__/enums.cpython-312.pyc | Bin 0 -> 2996 bytes .../__pycache__/escprober.cpython-312.pyc | Bin 0 -> 4566 bytes .../chardet/__pycache__/escsm.cpython-312.pyc | Bin 0 -> 15310 bytes .../__pycache__/eucjpprober.cpython-312.pyc | Bin 0 -> 4383 bytes .../__pycache__/euckrfreq.cpython-312.pyc | Bin 0 -> 12082 bytes .../__pycache__/euckrprober.cpython-312.pyc | Bin 0 -> 1390 bytes .../__pycache__/euctwfreq.cpython-312.pyc | Bin 0 -> 27204 bytes .../__pycache__/euctwprober.cpython-312.pyc | Bin 0 -> 1390 bytes .../__pycache__/gb2312freq.cpython-312.pyc | Bin 0 -> 19126 bytes .../__pycache__/gb2312prober.cpython-312.pyc | Bin 0 -> 1403 bytes .../__pycache__/hebrewprober.cpython-312.pyc | Bin 0 -> 5822 bytes .../__pycache__/jisfreq.cpython-312.pyc | Bin 0 -> 22155 bytes .../__pycache__/johabfreq.cpython-312.pyc | Bin 0 -> 83003 bytes .../__pycache__/johabprober.cpython-312.pyc | Bin 0 -> 1394 bytes .../__pycache__/jpcntx.cpython-312.pyc | Bin 0 -> 39549 bytes .../langbulgarianmodel.cpython-312.pyc | Bin 0 -> 83122 bytes .../langgreekmodel.cpython-312.pyc | Bin 0 -> 76988 bytes .../langhebrewmodel.cpython-312.pyc | Bin 0 -> 77499 bytes .../langhungarianmodel.cpython-312.pyc | Bin 0 -> 83076 bytes .../langrussianmodel.cpython-312.pyc | Bin 0 -> 105251 bytes .../__pycache__/langthaimodel.cpython-312.pyc | Bin 0 -> 77677 bytes .../langturkishmodel.cpython-312.pyc | Bin 0 -> 77516 bytes .../__pycache__/latin1prober.cpython-312.pyc | Bin 0 -> 7002 bytes .../macromanprober.cpython-312.pyc | Bin 0 -> 7182 bytes .../mbcharsetprober.cpython-312.pyc | Bin 0 -> 3903 bytes .../mbcsgroupprober.cpython-312.pyc | Bin 0 -> 1588 bytes .../__pycache__/mbcssm.cpython-312.pyc | Bin 0 -> 38645 bytes .../__pycache__/resultdict.cpython-312.pyc | Bin 0 -> 632 bytes .../sbcharsetprober.cpython-312.pyc | Bin 0 -> 6387 bytes .../sbcsgroupprober.cpython-312.pyc | Bin 0 -> 2357 bytes .../__pycache__/sjisprober.cpython-312.pyc | Bin 0 -> 4495 bytes .../universaldetector.cpython-312.pyc | Bin 0 -> 12269 bytes .../__pycache__/utf1632prober.cpython-312.pyc | Bin 0 -> 9979 bytes .../__pycache__/utf8prober.cpython-312.pyc | Bin 0 -> 3175 bytes .../__pycache__/version.cpython-312.pyc | Bin 0 -> 488 bytes .../pip/_vendor/chardet/big5freq.py | 386 + .../pip/_vendor/chardet/big5prober.py | 47 + .../pip/_vendor/chardet/chardistribution.py | 261 + .../pip/_vendor/chardet/charsetgroupprober.py | 106 + .../pip/_vendor/chardet/charsetprober.py | 147 + .../pip/_vendor/chardet/cli/__init__.py | 0 .../cli/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 195 bytes .../__pycache__/chardetect.cpython-312.pyc | Bin 0 -> 4012 bytes .../pip/_vendor/chardet/cli/chardetect.py | 112 + .../pip/_vendor/chardet/codingstatemachine.py | 90 + .../_vendor/chardet/codingstatemachinedict.py | 19 + .../pip/_vendor/chardet/cp949prober.py | 49 + .../pip/_vendor/chardet/enums.py | 85 + .../pip/_vendor/chardet/escprober.py | 102 + .../pip/_vendor/chardet/escsm.py | 261 + .../pip/_vendor/chardet/eucjpprober.py | 102 + .../pip/_vendor/chardet/euckrfreq.py | 196 + .../pip/_vendor/chardet/euckrprober.py | 47 + .../pip/_vendor/chardet/euctwfreq.py | 388 + .../pip/_vendor/chardet/euctwprober.py | 47 + .../pip/_vendor/chardet/gb2312freq.py | 284 + .../pip/_vendor/chardet/gb2312prober.py | 47 + .../pip/_vendor/chardet/hebrewprober.py | 316 + .../pip/_vendor/chardet/jisfreq.py | 325 + .../pip/_vendor/chardet/johabfreq.py | 2382 + .../pip/_vendor/chardet/johabprober.py | 47 + .../pip/_vendor/chardet/jpcntx.py | 238 + .../pip/_vendor/chardet/langbulgarianmodel.py | 4649 + .../pip/_vendor/chardet/langgreekmodel.py | 4397 + .../pip/_vendor/chardet/langhebrewmodel.py | 4380 + .../pip/_vendor/chardet/langhungarianmodel.py | 4649 + .../pip/_vendor/chardet/langrussianmodel.py | 5725 + .../pip/_vendor/chardet/langthaimodel.py | 4380 + .../pip/_vendor/chardet/langturkishmodel.py | 4380 + .../pip/_vendor/chardet/latin1prober.py | 147 + .../pip/_vendor/chardet/macromanprober.py | 162 + .../pip/_vendor/chardet/mbcharsetprober.py | 95 + .../pip/_vendor/chardet/mbcsgroupprober.py | 57 + .../pip/_vendor/chardet/mbcssm.py | 661 + .../pip/_vendor/chardet/metadata/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 200 bytes .../__pycache__/languages.cpython-312.pyc | Bin 0 -> 9755 bytes .../pip/_vendor/chardet/metadata/languages.py | 352 + .../pip/_vendor/chardet/resultdict.py | 16 + .../pip/_vendor/chardet/sbcharsetprober.py | 162 + .../pip/_vendor/chardet/sbcsgroupprober.py | 88 + .../pip/_vendor/chardet/sjisprober.py | 105 + .../pip/_vendor/chardet/universaldetector.py | 362 + .../pip/_vendor/chardet/utf1632prober.py | 225 + .../pip/_vendor/chardet/utf8prober.py | 82 + .../pip/_vendor/chardet/version.py | 9 + .../pip/_vendor/colorama/__init__.py | 7 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 492 bytes .../colorama/__pycache__/ansi.cpython-312.pyc | Bin 0 -> 3950 bytes .../__pycache__/ansitowin32.cpython-312.pyc | Bin 0 -> 16421 bytes .../__pycache__/initialise.cpython-312.pyc | Bin 0 -> 3550 bytes .../__pycache__/win32.cpython-312.pyc | Bin 0 -> 8126 bytes .../__pycache__/winterm.cpython-312.pyc | Bin 0 -> 9088 bytes .../pip/_vendor/colorama/ansi.py | 102 + .../pip/_vendor/colorama/ansitowin32.py | 277 + .../pip/_vendor/colorama/initialise.py | 121 + .../pip/_vendor/colorama/tests/__init__.py | 1 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 198 bytes .../__pycache__/ansi_test.cpython-312.pyc | Bin 0 -> 5467 bytes .../ansitowin32_test.cpython-312.pyc | Bin 0 -> 18103 bytes .../initialise_test.cpython-312.pyc | Bin 0 -> 11748 bytes .../__pycache__/isatty_test.cpython-312.pyc | Bin 0 -> 4904 bytes .../tests/__pycache__/utils.cpython-312.pyc | Bin 0 -> 2488 bytes .../__pycache__/winterm_test.cpython-312.pyc | Bin 0 -> 6612 bytes .../pip/_vendor/colorama/tests/ansi_test.py | 76 + .../colorama/tests/ansitowin32_test.py | 294 + .../_vendor/colorama/tests/initialise_test.py | 189 + .../pip/_vendor/colorama/tests/isatty_test.py | 57 + .../pip/_vendor/colorama/tests/utils.py | 49 + .../_vendor/colorama/tests/winterm_test.py | 131 + .../pip/_vendor/colorama/win32.py | 180 + .../pip/_vendor/colorama/winterm.py | 195 + .../pip/_vendor/distlib/__init__.py | 33 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1269 bytes .../__pycache__/compat.cpython-312.pyc | Bin 0 -> 45605 bytes .../__pycache__/database.cpython-312.pyc | Bin 0 -> 66027 bytes .../distlib/__pycache__/index.cpython-312.pyc | Bin 0 -> 24366 bytes .../__pycache__/locators.cpython-312.pyc | Bin 0 -> 60158 bytes .../__pycache__/manifest.cpython-312.pyc | Bin 0 -> 15125 bytes .../__pycache__/markers.cpython-312.pyc | Bin 0 -> 7682 bytes .../__pycache__/metadata.cpython-312.pyc | Bin 0 -> 41799 bytes .../__pycache__/resources.cpython-312.pyc | Bin 0 -> 17325 bytes .../__pycache__/scripts.cpython-312.pyc | Bin 0 -> 19580 bytes .../distlib/__pycache__/util.cpython-312.pyc | Bin 0 -> 88256 bytes .../__pycache__/version.cpython-312.pyc | Bin 0 -> 30366 bytes .../distlib/__pycache__/wheel.cpython-312.pyc | Bin 0 -> 51861 bytes .../pip/_vendor/distlib/compat.py | 1138 + .../pip/_vendor/distlib/database.py | 1359 + .../pip/_vendor/distlib/index.py | 508 + .../pip/_vendor/distlib/locators.py | 1303 + .../pip/_vendor/distlib/manifest.py | 384 + .../pip/_vendor/distlib/markers.py | 167 + .../pip/_vendor/distlib/metadata.py | 1068 + .../pip/_vendor/distlib/resources.py | 358 + .../pip/_vendor/distlib/scripts.py | 452 + .../site-packages/pip/_vendor/distlib/util.py | 2025 + .../pip/_vendor/distlib/version.py | 751 + .../pip/_vendor/distlib/wheel.py | 1099 + .../pip/_vendor/distro/__init__.py | 54 + .../pip/_vendor/distro/__main__.py | 4 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 960 bytes .../__pycache__/__main__.cpython-312.pyc | Bin 0 -> 292 bytes .../distro/__pycache__/distro.cpython-312.pyc | Bin 0 -> 53754 bytes .../pip/_vendor/distro/distro.py | 1399 + .../pip/_vendor/idna/__init__.py | 44 + .../idna/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 881 bytes .../idna/__pycache__/codec.cpython-312.pyc | Bin 0 -> 4633 bytes .../idna/__pycache__/compat.cpython-312.pyc | Bin 0 -> 887 bytes .../idna/__pycache__/core.cpython-312.pyc | Bin 0 -> 16023 bytes .../idna/__pycache__/idnadata.cpython-312.pyc | Bin 0 -> 99497 bytes .../__pycache__/intranges.cpython-312.pyc | Bin 0 -> 2638 bytes .../__pycache__/package_data.cpython-312.pyc | Bin 0 -> 216 bytes .../__pycache__/uts46data.cpython-312.pyc | Bin 0 -> 158870 bytes .../site-packages/pip/_vendor/idna/codec.py | 112 + .../site-packages/pip/_vendor/idna/compat.py | 13 + .../site-packages/pip/_vendor/idna/core.py | 400 + .../pip/_vendor/idna/idnadata.py | 4246 + .../pip/_vendor/idna/intranges.py | 54 + .../pip/_vendor/idna/package_data.py | 2 + .../pip/_vendor/idna/uts46data.py | 8600 ++ .../pip/_vendor/msgpack/__init__.py | 57 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1831 bytes .../__pycache__/exceptions.cpython-312.pyc | Bin 0 -> 2025 bytes .../msgpack/__pycache__/ext.cpython-312.pyc | Bin 0 -> 8668 bytes .../__pycache__/fallback.cpython-312.pyc | Bin 0 -> 43576 bytes .../pip/_vendor/msgpack/exceptions.py | 48 + .../site-packages/pip/_vendor/msgpack/ext.py | 193 + .../pip/_vendor/msgpack/fallback.py | 1010 + .../pip/_vendor/packaging/__about__.py | 26 + .../pip/_vendor/packaging/__init__.py | 25 + .../__pycache__/__about__.cpython-312.pyc | Bin 0 -> 630 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 466 bytes .../__pycache__/_manylinux.cpython-312.pyc | Bin 0 -> 12076 bytes .../__pycache__/_musllinux.cpython-312.pyc | Bin 0 -> 6910 bytes .../__pycache__/_structures.cpython-312.pyc | Bin 0 -> 3241 bytes .../__pycache__/markers.cpython-312.pyc | Bin 0 -> 14058 bytes .../__pycache__/requirements.cpython-312.pyc | Bin 0 -> 6946 bytes .../__pycache__/specifiers.cpython-312.pyc | Bin 0 -> 31247 bytes .../__pycache__/tags.cpython-312.pyc | Bin 0 -> 18956 bytes .../__pycache__/utils.cpython-312.pyc | Bin 0 -> 5868 bytes .../__pycache__/version.cpython-312.pyc | Bin 0 -> 19939 bytes .../pip/_vendor/packaging/_manylinux.py | 301 + .../pip/_vendor/packaging/_musllinux.py | 136 + .../pip/_vendor/packaging/_structures.py | 61 + .../pip/_vendor/packaging/markers.py | 304 + .../pip/_vendor/packaging/requirements.py | 146 + .../pip/_vendor/packaging/specifiers.py | 802 + .../pip/_vendor/packaging/tags.py | 487 + .../pip/_vendor/packaging/utils.py | 136 + .../pip/_vendor/packaging/version.py | 504 + .../pip/_vendor/pkg_resources/__init__.py | 3361 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 146474 bytes .../pip/_vendor/platformdirs/__init__.py | 566 + .../pip/_vendor/platformdirs/__main__.py | 53 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 18029 bytes .../__pycache__/__main__.cpython-312.pyc | Bin 0 -> 1946 bytes .../__pycache__/android.cpython-312.pyc | Bin 0 -> 9444 bytes .../__pycache__/api.cpython-312.pyc | Bin 0 -> 9672 bytes .../__pycache__/macos.cpython-312.pyc | Bin 0 -> 5637 bytes .../__pycache__/unix.cpython-312.pyc | Bin 0 -> 12441 bytes .../__pycache__/version.cpython-312.pyc | Bin 0 -> 311 bytes .../__pycache__/windows.cpython-312.pyc | Bin 0 -> 12999 bytes .../pip/_vendor/platformdirs/android.py | 210 + .../pip/_vendor/platformdirs/api.py | 223 + .../pip/_vendor/platformdirs/macos.py | 91 + .../pip/_vendor/platformdirs/unix.py | 223 + .../pip/_vendor/platformdirs/version.py | 4 + .../pip/_vendor/platformdirs/windows.py | 255 + .../pip/_vendor/pygments/__init__.py | 82 + .../pip/_vendor/pygments/__main__.py | 17 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 3489 bytes .../__pycache__/__main__.cpython-312.pyc | Bin 0 -> 735 bytes .../__pycache__/cmdline.cpython-312.pyc | Bin 0 -> 26606 bytes .../__pycache__/console.cpython-312.pyc | Bin 0 -> 2627 bytes .../__pycache__/filter.cpython-312.pyc | Bin 0 -> 3233 bytes .../__pycache__/formatter.cpython-312.pyc | Bin 0 -> 4570 bytes .../__pycache__/lexer.cpython-312.pyc | Bin 0 -> 38330 bytes .../__pycache__/modeline.cpython-312.pyc | Bin 0 -> 1569 bytes .../__pycache__/plugin.cpython-312.pyc | Bin 0 -> 3397 bytes .../__pycache__/regexopt.cpython-312.pyc | Bin 0 -> 4082 bytes .../__pycache__/scanner.cpython-312.pyc | Bin 0 -> 4757 bytes .../__pycache__/sphinxext.cpython-312.pyc | Bin 0 -> 11047 bytes .../__pycache__/style.cpython-312.pyc | Bin 0 -> 6675 bytes .../__pycache__/token.cpython-312.pyc | Bin 0 -> 8143 bytes .../__pycache__/unistring.cpython-312.pyc | Bin 0 -> 32989 bytes .../pygments/__pycache__/util.cpython-312.pyc | Bin 0 -> 13982 bytes .../pip/_vendor/pygments/cmdline.py | 668 + .../pip/_vendor/pygments/console.py | 70 + .../pip/_vendor/pygments/filter.py | 71 + .../pip/_vendor/pygments/filters/__init__.py | 940 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 37937 bytes .../pip/_vendor/pygments/formatter.py | 124 + .../_vendor/pygments/formatters/__init__.py | 158 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 6927 bytes .../__pycache__/_mapping.cpython-312.pyc | Bin 0 -> 4216 bytes .../__pycache__/bbcode.cpython-312.pyc | Bin 0 -> 4195 bytes .../__pycache__/groff.cpython-312.pyc | Bin 0 -> 7265 bytes .../__pycache__/html.cpython-312.pyc | Bin 0 -> 40573 bytes .../__pycache__/img.cpython-312.pyc | Bin 0 -> 27044 bytes .../__pycache__/irc.cpython-312.pyc | Bin 0 -> 6066 bytes .../__pycache__/latex.cpython-312.pyc | Bin 0 -> 19955 bytes .../__pycache__/other.cpython-312.pyc | Bin 0 -> 6885 bytes .../__pycache__/pangomarkup.cpython-312.pyc | Bin 0 -> 2931 bytes .../__pycache__/rtf.cpython-312.pyc | Bin 0 -> 6127 bytes .../__pycache__/svg.cpython-312.pyc | Bin 0 -> 9067 bytes .../__pycache__/terminal.cpython-312.pyc | Bin 0 -> 5830 bytes .../__pycache__/terminal256.cpython-312.pyc | Bin 0 -> 15158 bytes .../_vendor/pygments/formatters/_mapping.py | 23 + .../pip/_vendor/pygments/formatters/bbcode.py | 108 + .../pip/_vendor/pygments/formatters/groff.py | 170 + .../pip/_vendor/pygments/formatters/html.py | 989 + .../pip/_vendor/pygments/formatters/img.py | 645 + .../pip/_vendor/pygments/formatters/irc.py | 154 + .../pip/_vendor/pygments/formatters/latex.py | 521 + .../pip/_vendor/pygments/formatters/other.py | 161 + .../pygments/formatters/pangomarkup.py | 83 + .../pip/_vendor/pygments/formatters/rtf.py | 146 + .../pip/_vendor/pygments/formatters/svg.py | 188 + .../_vendor/pygments/formatters/terminal.py | 127 + .../pygments/formatters/terminal256.py | 338 + .../pip/_vendor/pygments/lexer.py | 943 + .../pip/_vendor/pygments/lexers/__init__.py | 362 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 14653 bytes .../__pycache__/_mapping.cpython-312.pyc | Bin 0 -> 64405 bytes .../lexers/__pycache__/python.cpython-312.pyc | Bin 0 -> 42640 bytes .../pip/_vendor/pygments/lexers/_mapping.py | 559 + .../pip/_vendor/pygments/lexers/python.py | 1198 + .../pip/_vendor/pygments/modeline.py | 43 + .../pip/_vendor/pygments/plugin.py | 88 + .../pip/_vendor/pygments/regexopt.py | 91 + .../pip/_vendor/pygments/scanner.py | 104 + .../pip/_vendor/pygments/sphinxext.py | 217 + .../pip/_vendor/pygments/style.py | 197 + .../pip/_vendor/pygments/styles/__init__.py | 103 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 4449 bytes .../pip/_vendor/pygments/token.py | 213 + .../pip/_vendor/pygments/unistring.py | 153 + .../pip/_vendor/pygments/util.py | 330 + .../pip/_vendor/pyparsing/__init__.py | 322 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 7912 bytes .../__pycache__/actions.cpython-312.pyc | Bin 0 -> 8396 bytes .../__pycache__/common.cpython-312.pyc | Bin 0 -> 13415 bytes .../__pycache__/core.cpython-312.pyc | Bin 0 -> 267709 bytes .../__pycache__/exceptions.cpython-312.pyc | Bin 0 -> 12995 bytes .../__pycache__/helpers.cpython-312.pyc | Bin 0 -> 48502 bytes .../__pycache__/results.cpython-312.pyc | Bin 0 -> 34111 bytes .../__pycache__/testing.cpython-312.pyc | Bin 0 -> 17189 bytes .../__pycache__/unicode.cpython-312.pyc | Bin 0 -> 13185 bytes .../__pycache__/util.cpython-312.pyc | Bin 0 -> 14905 bytes .../pip/_vendor/pyparsing/actions.py | 217 + .../pip/_vendor/pyparsing/common.py | 432 + .../pip/_vendor/pyparsing/core.py | 6115 + .../pip/_vendor/pyparsing/diagram/__init__.py | 656 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 26814 bytes .../pip/_vendor/pyparsing/exceptions.py | 299 + .../pip/_vendor/pyparsing/helpers.py | 1100 + .../pip/_vendor/pyparsing/results.py | 796 + .../pip/_vendor/pyparsing/testing.py | 331 + .../pip/_vendor/pyparsing/unicode.py | 361 + .../pip/_vendor/pyparsing/util.py | 284 + .../pip/_vendor/pyproject_hooks/__init__.py | 23 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 614 bytes .../__pycache__/_compat.cpython-312.pyc | Bin 0 -> 375 bytes .../__pycache__/_impl.cpython-312.pyc | Bin 0 -> 14726 bytes .../pip/_vendor/pyproject_hooks/_compat.py | 8 + .../pip/_vendor/pyproject_hooks/_impl.py | 330 + .../pyproject_hooks/_in_process/__init__.py | 18 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1081 bytes .../__pycache__/_in_process.cpython-312.pyc | Bin 0 -> 14398 bytes .../_in_process/_in_process.py | 353 + .../pip/_vendor/requests/__init__.py | 182 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 5454 bytes .../__pycache__/__version__.cpython-312.pyc | Bin 0 -> 585 bytes .../_internal_utils.cpython-312.pyc | Bin 0 -> 2025 bytes .../__pycache__/adapters.cpython-312.pyc | Bin 0 -> 21281 bytes .../requests/__pycache__/api.cpython-312.pyc | Bin 0 -> 7205 bytes .../requests/__pycache__/auth.cpython-312.pyc | Bin 0 -> 13924 bytes .../__pycache__/certs.cpython-312.pyc | Bin 0 -> 923 bytes .../__pycache__/compat.cpython-312.pyc | Bin 0 -> 1508 bytes .../__pycache__/cookies.cpython-312.pyc | Bin 0 -> 25247 bytes .../__pycache__/exceptions.cpython-312.pyc | Bin 0 -> 7048 bytes .../requests/__pycache__/help.cpython-312.pyc | Bin 0 -> 4313 bytes .../__pycache__/hooks.cpython-312.pyc | Bin 0 -> 1053 bytes .../__pycache__/models.cpython-312.pyc | Bin 0 -> 35449 bytes .../__pycache__/packages.cpython-312.pyc | Bin 0 -> 773 bytes .../__pycache__/sessions.cpython-312.pyc | Bin 0 -> 27758 bytes .../__pycache__/status_codes.cpython-312.pyc | Bin 0 -> 5960 bytes .../__pycache__/structures.cpython-312.pyc | Bin 0 -> 5618 bytes .../__pycache__/utils.cpython-312.pyc | Bin 0 -> 36076 bytes .../pip/_vendor/requests/__version__.py | 14 + .../pip/_vendor/requests/_internal_utils.py | 50 + .../pip/_vendor/requests/adapters.py | 538 + .../site-packages/pip/_vendor/requests/api.py | 157 + .../pip/_vendor/requests/auth.py | 315 + .../pip/_vendor/requests/certs.py | 24 + .../pip/_vendor/requests/compat.py | 67 + .../pip/_vendor/requests/cookies.py | 561 + .../pip/_vendor/requests/exceptions.py | 141 + .../pip/_vendor/requests/help.py | 131 + .../pip/_vendor/requests/hooks.py | 33 + .../pip/_vendor/requests/models.py | 1034 + .../pip/_vendor/requests/packages.py | 16 + .../pip/_vendor/requests/sessions.py | 833 + .../pip/_vendor/requests/status_codes.py | 128 + .../pip/_vendor/requests/structures.py | 99 + .../pip/_vendor/requests/utils.py | 1088 + .../pip/_vendor/resolvelib/__init__.py | 26 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 635 bytes .../__pycache__/providers.cpython-312.pyc | Bin 0 -> 6852 bytes .../__pycache__/reporters.cpython-312.pyc | Bin 0 -> 2655 bytes .../__pycache__/resolvers.cpython-312.pyc | Bin 0 -> 25898 bytes .../__pycache__/structs.cpython-312.pyc | Bin 0 -> 10507 bytes .../pip/_vendor/resolvelib/compat/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 201 bytes .../collections_abc.cpython-312.pyc | Bin 0 -> 421 bytes .../resolvelib/compat/collections_abc.py | 6 + .../pip/_vendor/resolvelib/providers.py | 133 + .../pip/_vendor/resolvelib/reporters.py | 43 + .../pip/_vendor/resolvelib/resolvers.py | 547 + .../pip/_vendor/resolvelib/structs.py | 170 + .../pip/_vendor/rich/__init__.py | 177 + .../pip/_vendor/rich/__main__.py | 274 + .../rich/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 7016 bytes .../rich/__pycache__/__main__.cpython-312.pyc | Bin 0 -> 10305 bytes .../__pycache__/_cell_widths.cpython-312.pyc | Bin 0 -> 7822 bytes .../__pycache__/_emoji_codes.cpython-312.pyc | Bin 0 -> 205977 bytes .../_emoji_replace.cpython-312.pyc | Bin 0 -> 1730 bytes .../_export_format.cpython-312.pyc | Bin 0 -> 2322 bytes .../__pycache__/_extension.cpython-312.pyc | Bin 0 -> 538 bytes .../rich/__pycache__/_fileno.cpython-312.pyc | Bin 0 -> 856 bytes .../rich/__pycache__/_inspect.cpython-312.pyc | Bin 0 -> 12078 bytes .../__pycache__/_log_render.cpython-312.pyc | Bin 0 -> 4148 bytes .../rich/__pycache__/_loop.cpython-312.pyc | Bin 0 -> 1886 bytes .../__pycache__/_null_file.cpython-312.pyc | Bin 0 -> 3621 bytes .../__pycache__/_palettes.cpython-312.pyc | Bin 0 -> 5161 bytes .../rich/__pycache__/_pick.cpython-312.pyc | Bin 0 -> 727 bytes .../rich/__pycache__/_ratio.cpython-312.pyc | Bin 0 -> 6580 bytes .../__pycache__/_spinners.cpython-312.pyc | Bin 0 -> 13180 bytes .../rich/__pycache__/_stack.cpython-312.pyc | Bin 0 -> 966 bytes .../rich/__pycache__/_timer.cpython-312.pyc | Bin 0 -> 866 bytes .../_win32_console.cpython-312.pyc | Bin 0 -> 28977 bytes .../rich/__pycache__/_windows.cpython-312.pyc | Bin 0 -> 2491 bytes .../_windows_renderer.cpython-312.pyc | Bin 0 -> 3574 bytes .../rich/__pycache__/_wrap.cpython-312.pyc | Bin 0 -> 2361 bytes .../rich/__pycache__/abc.cpython-312.pyc | Bin 0 -> 1609 bytes .../rich/__pycache__/align.cpython-312.pyc | Bin 0 -> 12323 bytes .../rich/__pycache__/ansi.cpython-312.pyc | Bin 0 -> 9107 bytes .../rich/__pycache__/bar.cpython-312.pyc | Bin 0 -> 4273 bytes .../rich/__pycache__/box.cpython-312.pyc | Bin 0 -> 11859 bytes .../rich/__pycache__/cells.cpython-312.pyc | Bin 0 -> 5619 bytes .../rich/__pycache__/color.cpython-312.pyc | Bin 0 -> 26571 bytes .../__pycache__/color_triplet.cpython-312.pyc | Bin 0 -> 1702 bytes .../rich/__pycache__/columns.cpython-312.pyc | Bin 0 -> 8588 bytes .../rich/__pycache__/console.cpython-312.pyc | Bin 0 -> 113794 bytes .../__pycache__/constrain.cpython-312.pyc | Bin 0 -> 2259 bytes .../__pycache__/containers.cpython-312.pyc | Bin 0 -> 9227 bytes .../rich/__pycache__/control.cpython-312.pyc | Bin 0 -> 10930 bytes .../default_styles.cpython-312.pyc | Bin 0 -> 10374 bytes .../rich/__pycache__/diagnose.cpython-312.pyc | Bin 0 -> 1488 bytes .../rich/__pycache__/emoji.cpython-312.pyc | Bin 0 -> 4210 bytes .../rich/__pycache__/errors.cpython-312.pyc | Bin 0 -> 1846 bytes .../__pycache__/file_proxy.cpython-312.pyc | Bin 0 -> 3578 bytes .../rich/__pycache__/filesize.cpython-312.pyc | Bin 0 -> 3083 bytes .../__pycache__/highlighter.cpython-312.pyc | Bin 0 -> 9899 bytes .../rich/__pycache__/json.cpython-312.pyc | Bin 0 -> 6036 bytes .../rich/__pycache__/jupyter.cpython-312.pyc | Bin 0 -> 5210 bytes .../rich/__pycache__/layout.cpython-312.pyc | Bin 0 -> 20221 bytes .../rich/__pycache__/live.cpython-312.pyc | Bin 0 -> 19144 bytes .../__pycache__/live_render.cpython-312.pyc | Bin 0 -> 4895 bytes .../rich/__pycache__/logging.cpython-312.pyc | Bin 0 -> 13555 bytes .../rich/__pycache__/markup.cpython-312.pyc | Bin 0 -> 9299 bytes .../rich/__pycache__/measure.cpython-312.pyc | Bin 0 -> 6377 bytes .../rich/__pycache__/padding.cpython-312.pyc | Bin 0 -> 7135 bytes .../rich/__pycache__/pager.cpython-312.pyc | Bin 0 -> 1821 bytes .../rich/__pycache__/palette.cpython-312.pyc | Bin 0 -> 5315 bytes .../rich/__pycache__/panel.cpython-312.pyc | Bin 0 -> 12098 bytes .../rich/__pycache__/pretty.cpython-312.pyc | Bin 0 -> 40057 bytes .../rich/__pycache__/progress.cpython-312.pyc | Bin 0 -> 75079 bytes .../__pycache__/progress_bar.cpython-312.pyc | Bin 0 -> 10390 bytes .../rich/__pycache__/prompt.cpython-312.pyc | Bin 0 -> 14782 bytes .../rich/__pycache__/protocol.cpython-312.pyc | Bin 0 -> 1793 bytes .../rich/__pycache__/region.cpython-312.pyc | Bin 0 -> 568 bytes .../rich/__pycache__/repr.cpython-312.pyc | Bin 0 -> 6627 bytes .../rich/__pycache__/rule.cpython-312.pyc | Bin 0 -> 6569 bytes .../rich/__pycache__/scope.cpython-312.pyc | Bin 0 -> 3831 bytes .../rich/__pycache__/screen.cpython-312.pyc | Bin 0 -> 2485 bytes .../rich/__pycache__/segment.cpython-312.pyc | Bin 0 -> 28162 bytes .../rich/__pycache__/spinner.cpython-312.pyc | Bin 0 -> 6065 bytes .../rich/__pycache__/status.cpython-312.pyc | Bin 0 -> 6069 bytes .../rich/__pycache__/style.cpython-312.pyc | Bin 0 -> 33515 bytes .../rich/__pycache__/styled.cpython-312.pyc | Bin 0 -> 2140 bytes .../rich/__pycache__/syntax.cpython-312.pyc | Bin 0 -> 39613 bytes .../rich/__pycache__/table.cpython-312.pyc | Bin 0 -> 43585 bytes .../terminal_theme.cpython-312.pyc | Bin 0 -> 3349 bytes .../rich/__pycache__/text.cpython-312.pyc | Bin 0 -> 58964 bytes .../rich/__pycache__/theme.cpython-312.pyc | Bin 0 -> 6341 bytes .../rich/__pycache__/themes.cpython-312.pyc | Bin 0 -> 315 bytes .../__pycache__/traceback.cpython-312.pyc | Bin 0 -> 31549 bytes .../rich/__pycache__/tree.cpython-312.pyc | Bin 0 -> 11440 bytes .../pip/_vendor/rich/_cell_widths.py | 451 + .../pip/_vendor/rich/_emoji_codes.py | 3610 + .../pip/_vendor/rich/_emoji_replace.py | 32 + .../pip/_vendor/rich/_export_format.py | 76 + .../pip/_vendor/rich/_extension.py | 10 + .../site-packages/pip/_vendor/rich/_fileno.py | 24 + .../pip/_vendor/rich/_inspect.py | 270 + .../pip/_vendor/rich/_log_render.py | 94 + .../site-packages/pip/_vendor/rich/_loop.py | 43 + .../pip/_vendor/rich/_null_file.py | 69 + .../pip/_vendor/rich/_palettes.py | 309 + .../site-packages/pip/_vendor/rich/_pick.py | 17 + .../site-packages/pip/_vendor/rich/_ratio.py | 160 + .../pip/_vendor/rich/_spinners.py | 482 + .../site-packages/pip/_vendor/rich/_stack.py | 16 + .../site-packages/pip/_vendor/rich/_timer.py | 19 + .../pip/_vendor/rich/_win32_console.py | 662 + .../pip/_vendor/rich/_windows.py | 72 + .../pip/_vendor/rich/_windows_renderer.py | 56 + .../site-packages/pip/_vendor/rich/_wrap.py | 56 + .../site-packages/pip/_vendor/rich/abc.py | 33 + .../site-packages/pip/_vendor/rich/align.py | 311 + .../site-packages/pip/_vendor/rich/ansi.py | 240 + .../site-packages/pip/_vendor/rich/bar.py | 94 + .../site-packages/pip/_vendor/rich/box.py | 517 + .../site-packages/pip/_vendor/rich/cells.py | 154 + .../site-packages/pip/_vendor/rich/color.py | 622 + .../pip/_vendor/rich/color_triplet.py | 38 + .../site-packages/pip/_vendor/rich/columns.py | 187 + .../site-packages/pip/_vendor/rich/console.py | 2633 + .../pip/_vendor/rich/constrain.py | 37 + .../pip/_vendor/rich/containers.py | 167 + .../site-packages/pip/_vendor/rich/control.py | 225 + .../pip/_vendor/rich/default_styles.py | 190 + .../pip/_vendor/rich/diagnose.py | 37 + .../site-packages/pip/_vendor/rich/emoji.py | 96 + .../site-packages/pip/_vendor/rich/errors.py | 34 + .../pip/_vendor/rich/file_proxy.py | 57 + .../pip/_vendor/rich/filesize.py | 89 + .../pip/_vendor/rich/highlighter.py | 232 + .../site-packages/pip/_vendor/rich/json.py | 140 + .../site-packages/pip/_vendor/rich/jupyter.py | 101 + .../site-packages/pip/_vendor/rich/layout.py | 443 + .../site-packages/pip/_vendor/rich/live.py | 375 + .../pip/_vendor/rich/live_render.py | 113 + .../site-packages/pip/_vendor/rich/logging.py | 289 + .../site-packages/pip/_vendor/rich/markup.py | 246 + .../site-packages/pip/_vendor/rich/measure.py | 151 + .../site-packages/pip/_vendor/rich/padding.py | 141 + .../site-packages/pip/_vendor/rich/pager.py | 34 + .../site-packages/pip/_vendor/rich/palette.py | 100 + .../site-packages/pip/_vendor/rich/panel.py | 308 + .../site-packages/pip/_vendor/rich/pretty.py | 994 + .../pip/_vendor/rich/progress.py | 1702 + .../pip/_vendor/rich/progress_bar.py | 224 + .../site-packages/pip/_vendor/rich/prompt.py | 376 + .../pip/_vendor/rich/protocol.py | 42 + .../site-packages/pip/_vendor/rich/region.py | 10 + .../site-packages/pip/_vendor/rich/repr.py | 149 + .../site-packages/pip/_vendor/rich/rule.py | 130 + .../site-packages/pip/_vendor/rich/scope.py | 86 + .../site-packages/pip/_vendor/rich/screen.py | 54 + .../site-packages/pip/_vendor/rich/segment.py | 739 + .../site-packages/pip/_vendor/rich/spinner.py | 137 + .../site-packages/pip/_vendor/rich/status.py | 132 + .../site-packages/pip/_vendor/rich/style.py | 796 + .../site-packages/pip/_vendor/rich/styled.py | 42 + .../site-packages/pip/_vendor/rich/syntax.py | 948 + .../site-packages/pip/_vendor/rich/table.py | 1002 + .../pip/_vendor/rich/terminal_theme.py | 153 + .../site-packages/pip/_vendor/rich/text.py | 1307 + .../site-packages/pip/_vendor/rich/theme.py | 115 + .../site-packages/pip/_vendor/rich/themes.py | 5 + .../pip/_vendor/rich/traceback.py | 756 + .../site-packages/pip/_vendor/rich/tree.py | 251 + .../site-packages/pip/_vendor/six.py | 998 + .../pip/_vendor/tenacity/__init__.py | 608 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 27087 bytes .../__pycache__/_asyncio.cpython-312.pyc | Bin 0 -> 4807 bytes .../__pycache__/_utils.cpython-312.pyc | Bin 0 -> 2316 bytes .../__pycache__/after.cpython-312.pyc | Bin 0 -> 1625 bytes .../__pycache__/before.cpython-312.pyc | Bin 0 -> 1465 bytes .../__pycache__/before_sleep.cpython-312.pyc | Bin 0 -> 2303 bytes .../tenacity/__pycache__/nap.cpython-312.pyc | Bin 0 -> 1413 bytes .../__pycache__/retry.cpython-312.pyc | Bin 0 -> 14282 bytes .../tenacity/__pycache__/stop.cpython-312.pyc | Bin 0 -> 5569 bytes .../__pycache__/tornadoweb.cpython-312.pyc | Bin 0 -> 2587 bytes .../tenacity/__pycache__/wait.cpython-312.pyc | Bin 0 -> 12414 bytes .../pip/_vendor/tenacity/_asyncio.py | 94 + .../pip/_vendor/tenacity/_utils.py | 76 + .../pip/_vendor/tenacity/after.py | 51 + .../pip/_vendor/tenacity/before.py | 46 + .../pip/_vendor/tenacity/before_sleep.py | 71 + .../site-packages/pip/_vendor/tenacity/nap.py | 43 + .../pip/_vendor/tenacity/retry.py | 272 + .../pip/_vendor/tenacity/stop.py | 103 + .../pip/_vendor/tenacity/tornadoweb.py | 59 + .../pip/_vendor/tenacity/wait.py | 228 + .../pip/_vendor/tomli/__init__.py | 11 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 385 bytes .../tomli/__pycache__/_parser.cpython-312.pyc | Bin 0 -> 26928 bytes .../tomli/__pycache__/_re.cpython-312.pyc | Bin 0 -> 3909 bytes .../tomli/__pycache__/_types.cpython-312.pyc | Bin 0 -> 367 bytes .../pip/_vendor/tomli/_parser.py | 691 + .../site-packages/pip/_vendor/tomli/_re.py | 107 + .../site-packages/pip/_vendor/tomli/_types.py | 10 + .../pip/_vendor/truststore/__init__.py | 13 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 619 bytes .../__pycache__/_api.cpython-312.pyc | Bin 0 -> 15798 bytes .../__pycache__/_macos.cpython-312.pyc | Bin 0 -> 16663 bytes .../__pycache__/_openssl.cpython-312.pyc | Bin 0 -> 2216 bytes .../_ssl_constants.cpython-312.pyc | Bin 0 -> 1100 bytes .../__pycache__/_windows.cpython-312.pyc | Bin 0 -> 15507 bytes .../pip/_vendor/truststore/_api.py | 302 + .../pip/_vendor/truststore/_macos.py | 501 + .../pip/_vendor/truststore/_openssl.py | 66 + .../pip/_vendor/truststore/_ssl_constants.py | 31 + .../pip/_vendor/truststore/_windows.py | 554 + .../pip/_vendor/typing_extensions.py | 3072 + .../pip/_vendor/urllib3/__init__.py | 102 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 3406 bytes .../__pycache__/_collections.cpython-312.pyc | Bin 0 -> 16489 bytes .../__pycache__/_version.cpython-312.pyc | Bin 0 -> 219 bytes .../__pycache__/connection.cpython-312.pyc | Bin 0 -> 20408 bytes .../connectionpool.cpython-312.pyc | Bin 0 -> 36443 bytes .../__pycache__/exceptions.cpython-312.pyc | Bin 0 -> 13494 bytes .../__pycache__/fields.cpython-312.pyc | Bin 0 -> 10414 bytes .../__pycache__/filepost.cpython-312.pyc | Bin 0 -> 4019 bytes .../__pycache__/poolmanager.cpython-312.pyc | Bin 0 -> 20801 bytes .../__pycache__/request.cpython-312.pyc | Bin 0 -> 7295 bytes .../__pycache__/response.cpython-312.pyc | Bin 0 -> 33969 bytes .../pip/_vendor/urllib3/_collections.py | 355 + .../pip/_vendor/urllib3/_version.py | 2 + .../pip/_vendor/urllib3/connection.py | 572 + .../pip/_vendor/urllib3/connectionpool.py | 1137 + .../pip/_vendor/urllib3/contrib/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 199 bytes .../_appengine_environ.cpython-312.pyc | Bin 0 -> 1849 bytes .../__pycache__/appengine.cpython-312.pyc | Bin 0 -> 11565 bytes .../__pycache__/ntlmpool.cpython-312.pyc | Bin 0 -> 5720 bytes .../__pycache__/pyopenssl.cpython-312.pyc | Bin 0 -> 24451 bytes .../securetransport.cpython-312.pyc | Bin 0 -> 35557 bytes .../contrib/__pycache__/socks.cpython-312.pyc | Bin 0 -> 7512 bytes .../urllib3/contrib/_appengine_environ.py | 36 + .../contrib/_securetransport/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 216 bytes .../__pycache__/bindings.cpython-312.pyc | Bin 0 -> 17428 bytes .../__pycache__/low_level.cpython-312.pyc | Bin 0 -> 14802 bytes .../contrib/_securetransport/bindings.py | 519 + .../contrib/_securetransport/low_level.py | 397 + .../pip/_vendor/urllib3/contrib/appengine.py | 314 + .../pip/_vendor/urllib3/contrib/ntlmpool.py | 130 + .../pip/_vendor/urllib3/contrib/pyopenssl.py | 518 + .../urllib3/contrib/securetransport.py | 921 + .../pip/_vendor/urllib3/contrib/socks.py | 216 + .../pip/_vendor/urllib3/exceptions.py | 323 + .../pip/_vendor/urllib3/fields.py | 274 + .../pip/_vendor/urllib3/filepost.py | 98 + .../pip/_vendor/urllib3/packages/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 200 bytes .../packages/__pycache__/six.cpython-312.pyc | Bin 0 -> 41320 bytes .../urllib3/packages/backports/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 210 bytes .../__pycache__/makefile.cpython-312.pyc | Bin 0 -> 1826 bytes .../weakref_finalize.cpython-312.pyc | Bin 0 -> 7332 bytes .../urllib3/packages/backports/makefile.py | 51 + .../packages/backports/weakref_finalize.py | 155 + .../pip/_vendor/urllib3/packages/six.py | 1076 + .../pip/_vendor/urllib3/poolmanager.py | 556 + .../pip/_vendor/urllib3/request.py | 191 + .../pip/_vendor/urllib3/response.py | 879 + .../pip/_vendor/urllib3/util/__init__.py | 49 + .../util/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1147 bytes .../__pycache__/connection.cpython-312.pyc | Bin 0 -> 4757 bytes .../util/__pycache__/proxy.cpython-312.pyc | Bin 0 -> 1553 bytes .../util/__pycache__/queue.cpython-312.pyc | Bin 0 -> 1353 bytes .../util/__pycache__/request.cpython-312.pyc | Bin 0 -> 4184 bytes .../util/__pycache__/response.cpython-312.pyc | Bin 0 -> 2990 bytes .../util/__pycache__/retry.cpython-312.pyc | Bin 0 -> 21719 bytes .../util/__pycache__/ssl_.cpython-312.pyc | Bin 0 -> 15104 bytes .../ssl_match_hostname.cpython-312.pyc | Bin 0 -> 5072 bytes .../__pycache__/ssltransport.cpython-312.pyc | Bin 0 -> 10773 bytes .../util/__pycache__/timeout.cpython-312.pyc | Bin 0 -> 11140 bytes .../util/__pycache__/url.cpython-312.pyc | Bin 0 -> 15796 bytes .../util/__pycache__/wait.cpython-312.pyc | Bin 0 -> 4404 bytes .../pip/_vendor/urllib3/util/connection.py | 149 + .../pip/_vendor/urllib3/util/proxy.py | 57 + .../pip/_vendor/urllib3/util/queue.py | 22 + .../pip/_vendor/urllib3/util/request.py | 137 + .../pip/_vendor/urllib3/util/response.py | 107 + .../pip/_vendor/urllib3/util/retry.py | 622 + .../pip/_vendor/urllib3/util/ssl_.py | 495 + .../urllib3/util/ssl_match_hostname.py | 159 + .../pip/_vendor/urllib3/util/ssltransport.py | 221 + .../pip/_vendor/urllib3/util/timeout.py | 271 + .../pip/_vendor/urllib3/util/url.py | 435 + .../pip/_vendor/urllib3/util/wait.py | 152 + .../site-packages/pip/_vendor/vendor.txt | 24 + .../pip/_vendor/webencodings/__init__.py | 342 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 12002 bytes .../__pycache__/labels.cpython-312.pyc | Bin 0 -> 7133 bytes .../__pycache__/mklabels.cpython-312.pyc | Bin 0 -> 2700 bytes .../__pycache__/tests.cpython-312.pyc | Bin 0 -> 9252 bytes .../x_user_defined.cpython-312.pyc | Bin 0 -> 3296 bytes .../pip/_vendor/webencodings/labels.py | 231 + .../pip/_vendor/webencodings/mklabels.py | 59 + .../pip/_vendor/webencodings/tests.py | 153 + .../_vendor/webencodings/x_user_defined.py | 325 + .../lib/python3.12/site-packages/pip/py.typed | 4 + .../python_slugify-8.0.1.dist-info/INSTALLER | 1 + .../python_slugify-8.0.1.dist-info/LICENSE | 21 + .../python_slugify-8.0.1.dist-info/METADATA | 247 + .../python_slugify-8.0.1.dist-info/RECORD | 19 + .../python_slugify-8.0.1.dist-info/REQUESTED | 0 .../python_slugify-8.0.1.dist-info/WHEEL | 6 + .../entry_points.txt | 3 + .../top_level.txt | 1 + .../site-packages/slugify/__init__.py | 10 + .../site-packages/slugify/__main__.py | 96 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 514 bytes .../__pycache__/__main__.cpython-312.pyc | Bin 0 -> 5114 bytes .../__pycache__/__version__.cpython-312.pyc | Bin 0 -> 561 bytes .../__pycache__/slugify.cpython-312.pyc | Bin 0 -> 6802 bytes .../__pycache__/special.cpython-312.pyc | Bin 0 -> 1123 bytes .../site-packages/slugify/__version__.py | 8 + .../site-packages/slugify/slugify.py | 177 + .../site-packages/slugify/special.py | 47 + .../sqlalchemy-2.0.46.dist-info/INSTALLER | 1 + .../sqlalchemy-2.0.46.dist-info/METADATA | 243 + .../sqlalchemy-2.0.46.dist-info/RECORD | 531 + .../sqlalchemy-2.0.46.dist-info/WHEEL | 7 + .../licenses/LICENSE | 19 + .../sqlalchemy-2.0.46.dist-info/top_level.txt | 1 + .../site-packages/sqlalchemy/__init__.py | 283 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 9418 bytes .../__pycache__/events.cpython-312.pyc | Bin 0 -> 555 bytes .../__pycache__/exc.cpython-312.pyc | Bin 0 -> 31226 bytes .../__pycache__/inspection.cpython-312.pyc | Bin 0 -> 6658 bytes .../__pycache__/log.cpython-312.pyc | Bin 0 -> 11616 bytes .../__pycache__/schema.cpython-312.pyc | Bin 0 -> 2370 bytes .../__pycache__/types.cpython-312.pyc | Bin 0 -> 2280 bytes .../sqlalchemy/connectors/__init__.py | 18 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 594 bytes .../__pycache__/aioodbc.cpython-312.pyc | Bin 0 -> 7841 bytes .../__pycache__/asyncio.cpython-312.pyc | Bin 0 -> 21657 bytes .../__pycache__/pyodbc.cpython-312.pyc | Bin 0 -> 9626 bytes .../sqlalchemy/connectors/aioodbc.py | 184 + .../sqlalchemy/connectors/asyncio.py | 429 + .../sqlalchemy/connectors/pyodbc.py | 250 + .../sqlalchemy/cyextension/__init__.py | 6 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 194 bytes ...ollections.cpython-312-x86_64-linux-gnu.so | Bin 0 -> 2017984 bytes .../sqlalchemy/cyextension/collections.pyx | 409 + ...utabledict.cpython-312-x86_64-linux-gnu.so | Bin 0 -> 819064 bytes .../sqlalchemy/cyextension/immutabledict.pxd | 8 + .../sqlalchemy/cyextension/immutabledict.pyx | 133 + ...processors.cpython-312-x86_64-linux-gnu.so | Bin 0 -> 630736 bytes .../sqlalchemy/cyextension/processors.pyx | 68 + ...esultproxy.cpython-312-x86_64-linux-gnu.so | Bin 0 -> 611072 bytes .../sqlalchemy/cyextension/resultproxy.pyx | 102 + .../util.cpython-312-x86_64-linux-gnu.so | Bin 0 -> 958336 bytes .../sqlalchemy/cyextension/util.pyx | 90 + .../sqlalchemy/dialects/__init__.py | 62 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1910 bytes .../__pycache__/_typing.cpython-312.pyc | Bin 0 -> 1084 bytes .../sqlalchemy/dialects/_typing.py | 30 + .../sqlalchemy/dialects/mssql/__init__.py | 88 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1662 bytes .../mssql/__pycache__/aioodbc.cpython-312.pyc | Bin 0 -> 2403 bytes .../mssql/__pycache__/base.cpython-312.pyc | Bin 0 -> 153640 bytes .../information_schema.cpython-312.pyc | Bin 0 -> 8938 bytes .../mssql/__pycache__/json.cpython-312.pyc | Bin 0 -> 5219 bytes .../__pycache__/provision.cpython-312.pyc | Bin 0 -> 8255 bytes .../mssql/__pycache__/pymssql.cpython-312.pyc | Bin 0 -> 5951 bytes .../mssql/__pycache__/pyodbc.cpython-312.pyc | Bin 0 -> 30615 bytes .../sqlalchemy/dialects/mssql/aioodbc.py | 63 + .../sqlalchemy/dialects/mssql/base.py | 4093 + .../dialects/mssql/information_schema.py | 285 + .../sqlalchemy/dialects/mssql/json.py | 129 + .../sqlalchemy/dialects/mssql/provision.py | 185 + .../sqlalchemy/dialects/mssql/pymssql.py | 126 + .../sqlalchemy/dialects/mssql/pyodbc.py | 760 + .../sqlalchemy/dialects/mysql/__init__.py | 104 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1991 bytes .../__pycache__/aiomysql.cpython-312.pyc | Bin 0 -> 11744 bytes .../mysql/__pycache__/asyncmy.cpython-312.pyc | Bin 0 -> 11221 bytes .../mysql/__pycache__/base.cpython-312.pyc | Bin 0 -> 155066 bytes .../mysql/__pycache__/cymysql.cpython-312.pyc | Bin 0 -> 4098 bytes .../mysql/__pycache__/dml.cpython-312.pyc | Bin 0 -> 8349 bytes .../__pycache__/enumerated.cpython-312.pyc | Bin 0 -> 11527 bytes .../__pycache__/expression.cpython-312.pyc | Bin 0 -> 5225 bytes .../mysql/__pycache__/json.cpython-312.pyc | Bin 0 -> 3939 bytes .../mysql/__pycache__/mariadb.cpython-312.pyc | Bin 0 -> 2659 bytes .../mariadbconnector.cpython-312.pyc | Bin 0 -> 13785 bytes .../mysqlconnector.cpython-312.pyc | Bin 0 -> 14203 bytes .../mysql/__pycache__/mysqldb.cpython-312.pyc | Bin 0 -> 12376 bytes .../__pycache__/provision.cpython-312.pyc | Bin 0 -> 6403 bytes .../mysql/__pycache__/pymysql.cpython-312.pyc | Bin 0 -> 6215 bytes .../mysql/__pycache__/pyodbc.cpython-312.pyc | Bin 0 -> 6101 bytes .../__pycache__/reflection.cpython-312.pyc | Bin 0 -> 25898 bytes .../reserved_words.cpython-312.pyc | Bin 0 -> 4391 bytes .../mysql/__pycache__/types.cpython-312.pyc | Bin 0 -> 33060 bytes .../sqlalchemy/dialects/mysql/aiomysql.py | 250 + .../sqlalchemy/dialects/mysql/asyncmy.py | 231 + .../sqlalchemy/dialects/mysql/base.py | 3943 + .../sqlalchemy/dialects/mysql/cymysql.py | 106 + .../sqlalchemy/dialects/mysql/dml.py | 225 + .../sqlalchemy/dialects/mysql/enumerated.py | 282 + .../sqlalchemy/dialects/mysql/expression.py | 146 + .../sqlalchemy/dialects/mysql/json.py | 91 + .../sqlalchemy/dialects/mysql/mariadb.py | 72 + .../dialects/mysql/mariadbconnector.py | 322 + .../dialects/mysql/mysqlconnector.py | 302 + .../sqlalchemy/dialects/mysql/mysqldb.py | 314 + .../sqlalchemy/dialects/mysql/provision.py | 147 + .../sqlalchemy/dialects/mysql/pymysql.py | 158 + .../sqlalchemy/dialects/mysql/pyodbc.py | 157 + .../sqlalchemy/dialects/mysql/reflection.py | 727 + .../dialects/mysql/reserved_words.py | 570 + .../sqlalchemy/dialects/mysql/types.py | 835 + .../sqlalchemy/dialects/oracle/__init__.py | 81 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1663 bytes .../oracle/__pycache__/base.cpython-312.pyc | Bin 0 -> 153951 bytes .../__pycache__/cx_oracle.cpython-312.pyc | Bin 0 -> 61005 bytes .../__pycache__/dictionary.cpython-312.pyc | Bin 0 -> 24598 bytes .../__pycache__/oracledb.cpython-312.pyc | Bin 0 -> 41079 bytes .../__pycache__/provision.cpython-312.pyc | Bin 0 -> 13292 bytes .../oracle/__pycache__/types.cpython-312.pyc | Bin 0 -> 13212 bytes .../oracle/__pycache__/vector.cpython-312.pyc | Bin 0 -> 12226 bytes .../sqlalchemy/dialects/oracle/base.py | 3802 + .../sqlalchemy/dialects/oracle/cx_oracle.py | 1555 + .../sqlalchemy/dialects/oracle/dictionary.py | 507 + .../sqlalchemy/dialects/oracle/oracledb.py | 941 + .../sqlalchemy/dialects/oracle/provision.py | 297 + .../sqlalchemy/dialects/oracle/types.py | 316 + .../sqlalchemy/dialects/oracle/vector.py | 365 + .../dialects/postgresql/__init__.py | 167 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 3432 bytes .../_psycopg_common.cpython-312.pyc | Bin 0 -> 7924 bytes .../__pycache__/array.cpython-312.pyc | Bin 0 -> 19552 bytes .../__pycache__/asyncpg.cpython-312.pyc | Bin 0 -> 58826 bytes .../__pycache__/base.cpython-312.pyc | Bin 0 -> 216452 bytes .../__pycache__/dml.cpython-312.pyc | Bin 0 -> 12586 bytes .../__pycache__/ext.cpython-312.pyc | Bin 0 -> 20619 bytes .../__pycache__/hstore.cpython-312.pyc | Bin 0 -> 15368 bytes .../__pycache__/json.cpython-312.pyc | Bin 0 -> 17138 bytes .../__pycache__/named_types.cpython-312.pyc | Bin 0 -> 23069 bytes .../__pycache__/operators.cpython-312.pyc | Bin 0 -> 2155 bytes .../__pycache__/pg8000.cpython-312.pyc | Bin 0 -> 30517 bytes .../__pycache__/pg_catalog.cpython-312.pyc | Bin 0 -> 11868 bytes .../__pycache__/provision.cpython-312.pyc | Bin 0 -> 7778 bytes .../__pycache__/psycopg.cpython-312.pyc | Bin 0 -> 40789 bytes .../__pycache__/psycopg2.cpython-312.pyc | Bin 0 -> 35986 bytes .../__pycache__/psycopg2cffi.cpython-312.pyc | Bin 0 -> 2162 bytes .../__pycache__/ranges.cpython-312.pyc | Bin 0 -> 34766 bytes .../__pycache__/types.cpython-312.pyc | Bin 0 -> 11513 bytes .../dialects/postgresql/_psycopg_common.py | 189 + .../sqlalchemy/dialects/postgresql/array.py | 519 + .../sqlalchemy/dialects/postgresql/asyncpg.py | 1284 + .../sqlalchemy/dialects/postgresql/base.py | 5333 + .../sqlalchemy/dialects/postgresql/dml.py | 339 + .../sqlalchemy/dialects/postgresql/ext.py | 540 + .../sqlalchemy/dialects/postgresql/hstore.py | 406 + .../sqlalchemy/dialects/postgresql/json.py | 404 + .../dialects/postgresql/named_types.py | 524 + .../dialects/postgresql/operators.py | 129 + .../sqlalchemy/dialects/postgresql/pg8000.py | 669 + .../dialects/postgresql/pg_catalog.py | 326 + .../dialects/postgresql/provision.py | 175 + .../sqlalchemy/dialects/postgresql/psycopg.py | 862 + .../dialects/postgresql/psycopg2.py | 892 + .../dialects/postgresql/psycopg2cffi.py | 61 + .../sqlalchemy/dialects/postgresql/ranges.py | 1031 + .../sqlalchemy/dialects/postgresql/types.py | 313 + .../sqlalchemy/dialects/sqlite/__init__.py | 57 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1058 bytes .../__pycache__/aiosqlite.cpython-312.pyc | Bin 0 -> 22001 bytes .../sqlite/__pycache__/base.cpython-312.pyc | Bin 0 -> 109133 bytes .../sqlite/__pycache__/dml.cpython-312.pyc | Bin 0 -> 10041 bytes .../sqlite/__pycache__/json.cpython-312.pyc | Bin 0 -> 3770 bytes .../__pycache__/provision.cpython-312.pyc | Bin 0 -> 8750 bytes .../__pycache__/pysqlcipher.cpython-312.pyc | Bin 0 -> 6217 bytes .../__pycache__/pysqlite.cpython-312.pyc | Bin 0 -> 31221 bytes .../sqlalchemy/dialects/sqlite/aiosqlite.py | 482 + .../sqlalchemy/dialects/sqlite/base.py | 3045 + .../sqlalchemy/dialects/sqlite/dml.py | 263 + .../sqlalchemy/dialects/sqlite/json.py | 92 + .../sqlalchemy/dialects/sqlite/provision.py | 223 + .../sqlalchemy/dialects/sqlite/pysqlcipher.py | 157 + .../sqlalchemy/dialects/sqlite/pysqlite.py | 756 + .../dialects/type_migration_guidelines.txt | 145 + .../sqlalchemy/engine/__init__.py | 62 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 2273 bytes .../_py_processors.cpython-312.pyc | Bin 0 -> 4496 bytes .../__pycache__/_py_row.cpython-312.pyc | Bin 0 -> 5765 bytes .../__pycache__/_py_util.cpython-312.pyc | Bin 0 -> 2204 bytes .../engine/__pycache__/base.cpython-312.pyc | Bin 0 -> 130333 bytes .../characteristics.cpython-312.pyc | Bin 0 -> 6842 bytes .../engine/__pycache__/create.cpython-312.pyc | Bin 0 -> 34999 bytes .../engine/__pycache__/cursor.cpython-312.pyc | Bin 0 -> 83020 bytes .../__pycache__/default.cpython-312.pyc | Bin 0 -> 89159 bytes .../engine/__pycache__/events.cpython-312.pyc | Bin 0 -> 39925 bytes .../__pycache__/interfaces.cpython-312.pyc | Bin 0 -> 102560 bytes .../engine/__pycache__/mock.cpython-312.pyc | Bin 0 -> 5679 bytes .../__pycache__/processors.cpython-312.pyc | Bin 0 -> 1287 bytes .../__pycache__/reflection.cpython-312.pyc | Bin 0 -> 80802 bytes .../engine/__pycache__/result.cpython-312.pyc | Bin 0 -> 91742 bytes .../engine/__pycache__/row.cpython-312.pyc | Bin 0 -> 17416 bytes .../__pycache__/strategies.cpython-312.pyc | Bin 0 -> 551 bytes .../engine/__pycache__/url.cpython-312.pyc | Bin 0 -> 34408 bytes .../engine/__pycache__/util.cpython-312.pyc | Bin 0 -> 6641 bytes .../sqlalchemy/engine/_py_processors.py | 136 + .../sqlalchemy/engine/_py_row.py | 128 + .../sqlalchemy/engine/_py_util.py | 74 + .../site-packages/sqlalchemy/engine/base.py | 3382 + .../sqlalchemy/engine/characteristics.py | 155 + .../site-packages/sqlalchemy/engine/create.py | 893 + .../site-packages/sqlalchemy/engine/cursor.py | 2298 + .../sqlalchemy/engine/default.py | 2394 + .../site-packages/sqlalchemy/engine/events.py | 965 + .../sqlalchemy/engine/interfaces.py | 3471 + .../site-packages/sqlalchemy/engine/mock.py | 134 + .../sqlalchemy/engine/processors.py | 61 + .../sqlalchemy/engine/reflection.py | 2102 + .../site-packages/sqlalchemy/engine/result.py | 2399 + .../site-packages/sqlalchemy/engine/row.py | 400 + .../sqlalchemy/engine/strategies.py | 16 + .../site-packages/sqlalchemy/engine/url.py | 924 + .../site-packages/sqlalchemy/engine/util.py | 167 + .../sqlalchemy/event/__init__.py | 26 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 882 bytes .../event/__pycache__/api.cpython-312.pyc | Bin 0 -> 9074 bytes .../event/__pycache__/attr.cpython-312.pyc | Bin 0 -> 31099 bytes .../event/__pycache__/base.cpython-312.pyc | Bin 0 -> 19995 bytes .../event/__pycache__/legacy.cpython-312.pyc | Bin 0 -> 9695 bytes .../__pycache__/registry.cpython-312.pyc | Bin 0 -> 12615 bytes .../site-packages/sqlalchemy/event/api.py | 220 + .../site-packages/sqlalchemy/event/attr.py | 676 + .../site-packages/sqlalchemy/event/base.py | 472 + .../site-packages/sqlalchemy/event/legacy.py | 258 + .../sqlalchemy/event/registry.py | 390 + .../site-packages/sqlalchemy/events.py | 17 + .../site-packages/sqlalchemy/exc.py | 832 + .../site-packages/sqlalchemy/ext/__init__.py | 11 + .../ext/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 349 bytes .../associationproxy.cpython-312.pyc | Bin 0 -> 87325 bytes .../ext/__pycache__/automap.cpython-312.pyc | Bin 0 -> 57405 bytes .../ext/__pycache__/baked.cpython-312.pyc | Bin 0 -> 23397 bytes .../ext/__pycache__/compiler.cpython-312.pyc | Bin 0 -> 21247 bytes .../horizontal_shard.cpython-312.pyc | Bin 0 -> 17665 bytes .../ext/__pycache__/hybrid.cpython-312.pyc | Bin 0 -> 59983 bytes .../ext/__pycache__/indexable.cpython-312.pyc | Bin 0 -> 13079 bytes .../instrumentation.cpython-312.pyc | Bin 0 -> 19884 bytes .../ext/__pycache__/mutable.cpython-312.pyc | Bin 0 -> 45872 bytes .../__pycache__/orderinglist.cpython-312.pyc | Bin 0 -> 18093 bytes .../__pycache__/serializer.cpython-312.pyc | Bin 0 -> 8044 bytes .../sqlalchemy/ext/associationproxy.py | 2027 + .../sqlalchemy/ext/asyncio/__init__.py | 25 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 972 bytes .../asyncio/__pycache__/base.cpython-312.pyc | Bin 0 -> 11350 bytes .../__pycache__/engine.cpython-312.pyc | Bin 0 -> 57557 bytes .../asyncio/__pycache__/exc.cpython-312.pyc | Bin 0 -> 1032 bytes .../__pycache__/result.cpython-312.pyc | Bin 0 -> 37671 bytes .../__pycache__/scoping.cpython-312.pyc | Bin 0 -> 56492 bytes .../__pycache__/session.cpython-312.pyc | Bin 0 -> 71602 bytes .../sqlalchemy/ext/asyncio/base.py | 281 + .../sqlalchemy/ext/asyncio/engine.py | 1471 + .../sqlalchemy/ext/asyncio/exc.py | 21 + .../sqlalchemy/ext/asyncio/result.py | 965 + .../sqlalchemy/ext/asyncio/scoping.py | 1599 + .../sqlalchemy/ext/asyncio/session.py | 1947 + .../site-packages/sqlalchemy/ext/automap.py | 1701 + .../site-packages/sqlalchemy/ext/baked.py | 570 + .../site-packages/sqlalchemy/ext/compiler.py | 600 + .../sqlalchemy/ext/declarative/__init__.py | 65 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 2008 bytes .../__pycache__/extensions.cpython-312.pyc | Bin 0 -> 21276 bytes .../sqlalchemy/ext/declarative/extensions.py | 564 + .../sqlalchemy/ext/horizontal_shard.py | 478 + .../site-packages/sqlalchemy/ext/hybrid.py | 1535 + .../site-packages/sqlalchemy/ext/indexable.py | 364 + .../sqlalchemy/ext/instrumentation.py | 450 + .../site-packages/sqlalchemy/ext/mutable.py | 1085 + .../sqlalchemy/ext/mypy/__init__.py | 6 + .../mypy/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 191 bytes .../mypy/__pycache__/apply.cpython-312.pyc | Bin 0 -> 10538 bytes .../__pycache__/decl_class.cpython-312.pyc | Bin 0 -> 15842 bytes .../mypy/__pycache__/infer.cpython-312.pyc | Bin 0 -> 15631 bytes .../mypy/__pycache__/names.cpython-312.pyc | Bin 0 -> 11044 bytes .../mypy/__pycache__/plugin.cpython-312.pyc | Bin 0 -> 12515 bytes .../ext/mypy/__pycache__/util.cpython-312.pyc | Bin 0 -> 14001 bytes .../sqlalchemy/ext/mypy/apply.py | 324 + .../sqlalchemy/ext/mypy/decl_class.py | 515 + .../sqlalchemy/ext/mypy/infer.py | 590 + .../sqlalchemy/ext/mypy/names.py | 335 + .../sqlalchemy/ext/mypy/plugin.py | 303 + .../site-packages/sqlalchemy/ext/mypy/util.py | 357 + .../sqlalchemy/ext/orderinglist.py | 439 + .../sqlalchemy/ext/serializer.py | 185 + .../sqlalchemy/future/__init__.py | 16 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 459 bytes .../future/__pycache__/engine.cpython-312.pyc | Bin 0 -> 392 bytes .../site-packages/sqlalchemy/future/engine.py | 15 + .../site-packages/sqlalchemy/inspection.py | 174 + .../site-packages/sqlalchemy/log.py | 288 + .../site-packages/sqlalchemy/orm/__init__.py | 171 + .../orm/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 6383 bytes .../_orm_constructors.cpython-312.pyc | Bin 0 -> 107027 bytes .../orm/__pycache__/_typing.cpython-312.pyc | Bin 0 -> 6799 bytes .../__pycache__/attributes.cpython-312.pyc | Bin 0 -> 100596 bytes .../orm/__pycache__/base.cpython-312.pyc | Bin 0 -> 30333 bytes .../bulk_persistence.cpython-312.pyc | Bin 0 -> 64713 bytes .../__pycache__/clsregistry.cpython-312.pyc | Bin 0 -> 23764 bytes .../__pycache__/collections.cpython-312.pyc | Bin 0 -> 61940 bytes .../orm/__pycache__/context.cpython-312.pyc | Bin 0 -> 103224 bytes .../orm/__pycache__/decl_api.cpython-312.pyc | Bin 0 -> 69701 bytes .../orm/__pycache__/decl_base.cpython-312.pyc | Bin 0 -> 68984 bytes .../__pycache__/dependency.cpython-312.pyc | Bin 0 -> 43336 bytes .../descriptor_props.cpython-312.pyc | Bin 0 -> 49634 bytes .../orm/__pycache__/dynamic.cpython-312.pyc | Bin 0 -> 12936 bytes .../orm/__pycache__/evaluator.cpython-312.pyc | Bin 0 -> 16756 bytes .../orm/__pycache__/events.cpython-312.pyc | Bin 0 -> 136514 bytes .../orm/__pycache__/exc.cpython-312.pyc | Bin 0 -> 10214 bytes .../orm/__pycache__/identity.cpython-312.pyc | Bin 0 -> 12622 bytes .../instrumentation.cpython-312.pyc | Bin 0 -> 31214 bytes .../__pycache__/interfaces.cpython-312.pyc | Bin 0 -> 54591 bytes .../orm/__pycache__/loading.cpython-312.pyc | Bin 0 -> 47118 bytes .../mapped_collection.cpython-312.pyc | Bin 0 -> 21881 bytes .../orm/__pycache__/mapper.cpython-312.pyc | Bin 0 -> 169062 bytes .../__pycache__/path_registry.cpython-312.pyc | Bin 0 -> 31485 bytes .../__pycache__/persistence.cpython-312.pyc | Bin 0 -> 48477 bytes .../__pycache__/properties.cpython-312.pyc | Bin 0 -> 34647 bytes .../orm/__pycache__/query.cpython-312.pyc | Bin 0 -> 128816 bytes .../__pycache__/relationships.cpython-312.pyc | Bin 0 -> 130394 bytes .../orm/__pycache__/scoping.cpython-312.pyc | Bin 0 -> 83103 bytes .../orm/__pycache__/session.cpython-312.pyc | Bin 0 -> 202960 bytes .../orm/__pycache__/state.cpython-312.pyc | Bin 0 -> 45876 bytes .../__pycache__/state_changes.cpython-312.pyc | Bin 0 -> 7002 bytes .../__pycache__/strategies.cpython-312.pyc | Bin 0 -> 105117 bytes .../strategy_options.cpython-312.pyc | Bin 0 -> 87541 bytes .../orm/__pycache__/sync.cpython-312.pyc | Bin 0 -> 6604 bytes .../__pycache__/unitofwork.cpython-312.pyc | Bin 0 -> 34093 bytes .../orm/__pycache__/util.cpython-312.pyc | Bin 0 -> 84980 bytes .../orm/__pycache__/writeonly.cpython-312.pyc | Bin 0 -> 28803 bytes .../sqlalchemy/orm/_orm_constructors.py | 2661 + .../site-packages/sqlalchemy/orm/_typing.py | 179 + .../sqlalchemy/orm/attributes.py | 2845 + .../site-packages/sqlalchemy/orm/base.py | 971 + .../sqlalchemy/orm/bulk_persistence.py | 2135 + .../sqlalchemy/orm/clsregistry.py | 571 + .../sqlalchemy/orm/collections.py | 1627 + .../site-packages/sqlalchemy/orm/context.py | 3334 + .../site-packages/sqlalchemy/orm/decl_api.py | 2004 + .../site-packages/sqlalchemy/orm/decl_base.py | 2192 + .../sqlalchemy/orm/dependency.py | 1302 + .../sqlalchemy/orm/descriptor_props.py | 1092 + .../site-packages/sqlalchemy/orm/dynamic.py | 300 + .../site-packages/sqlalchemy/orm/evaluator.py | 379 + .../site-packages/sqlalchemy/orm/events.py | 3252 + .../site-packages/sqlalchemy/orm/exc.py | 237 + .../site-packages/sqlalchemy/orm/identity.py | 302 + .../sqlalchemy/orm/instrumentation.py | 754 + .../sqlalchemy/orm/interfaces.py | 1496 + .../site-packages/sqlalchemy/orm/loading.py | 1686 + .../sqlalchemy/orm/mapped_collection.py | 557 + .../site-packages/sqlalchemy/orm/mapper.py | 4444 + .../sqlalchemy/orm/path_registry.py | 809 + .../sqlalchemy/orm/persistence.py | 1788 + .../sqlalchemy/orm/properties.py | 935 + .../site-packages/sqlalchemy/orm/query.py | 3459 + .../sqlalchemy/orm/relationships.py | 3508 + .../site-packages/sqlalchemy/orm/scoping.py | 2148 + .../site-packages/sqlalchemy/orm/session.py | 5280 + .../site-packages/sqlalchemy/orm/state.py | 1168 + .../sqlalchemy/orm/state_changes.py | 196 + .../sqlalchemy/orm/strategies.py | 3470 + .../sqlalchemy/orm/strategy_options.py | 2568 + .../site-packages/sqlalchemy/orm/sync.py | 164 + .../sqlalchemy/orm/unitofwork.py | 796 + .../site-packages/sqlalchemy/orm/util.py | 2403 + .../site-packages/sqlalchemy/orm/writeonly.py | 674 + .../site-packages/sqlalchemy/pool/__init__.py | 44 + .../pool/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1510 bytes .../pool/__pycache__/base.cpython-312.pyc | Bin 0 -> 56414 bytes .../pool/__pycache__/events.cpython-312.pyc | Bin 0 -> 14323 bytes .../pool/__pycache__/impl.cpython-312.pyc | Bin 0 -> 26314 bytes .../site-packages/sqlalchemy/pool/base.py | 1516 + .../site-packages/sqlalchemy/pool/events.py | 372 + .../site-packages/sqlalchemy/pool/impl.py | 588 + .../site-packages/sqlalchemy/py.typed | 0 .../site-packages/sqlalchemy/schema.py | 69 + .../site-packages/sqlalchemy/sql/__init__.py | 145 + .../sql/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 4683 bytes .../_dml_constructors.cpython-312.pyc | Bin 0 -> 3991 bytes .../_elements_constructors.cpython-312.pyc | Bin 0 -> 66011 bytes .../__pycache__/_orm_types.cpython-312.pyc | Bin 0 -> 623 bytes .../sql/__pycache__/_py_util.cpython-312.pyc | Bin 0 -> 2962 bytes .../_selectable_constructors.cpython-312.pyc | Bin 0 -> 25146 bytes .../sql/__pycache__/_typing.cpython-312.pyc | Bin 0 -> 15199 bytes .../__pycache__/annotation.cpython-312.pyc | Bin 0 -> 21389 bytes .../sql/__pycache__/base.cpython-312.pyc | Bin 0 -> 100137 bytes .../sql/__pycache__/cache_key.cpython-312.pyc | Bin 0 -> 35592 bytes .../sql/__pycache__/coercions.cpython-312.pyc | Bin 0 -> 49075 bytes .../sql/__pycache__/compiler.cpython-312.pyc | Bin 0 -> 280126 bytes .../sql/__pycache__/crud.cpython-312.pyc | Bin 0 -> 48074 bytes .../sql/__pycache__/ddl.cpython-312.pyc | Bin 0 -> 58682 bytes .../default_comparator.cpython-312.pyc | Bin 0 -> 19476 bytes .../sql/__pycache__/dml.cpython-312.pyc | Bin 0 -> 74278 bytes .../sql/__pycache__/elements.cpython-312.pyc | Bin 0 -> 214173 bytes .../sql/__pycache__/events.cpython-312.pyc | Bin 0 -> 19218 bytes .../__pycache__/expression.cpython-312.pyc | Bin 0 -> 5143 bytes .../sql/__pycache__/functions.cpython-312.pyc | Bin 0 -> 79644 bytes .../sql/__pycache__/lambdas.cpython-312.pyc | Bin 0 -> 54780 bytes .../sql/__pycache__/naming.cpython-312.pyc | Bin 0 -> 8467 bytes .../sql/__pycache__/operators.cpython-312.pyc | Bin 0 -> 89866 bytes .../sql/__pycache__/roles.cpython-312.pyc | Bin 0 -> 12242 bytes .../sql/__pycache__/schema.cpython-312.pyc | Bin 0 -> 246030 bytes .../__pycache__/selectable.cpython-312.pyc | Bin 0 -> 264514 bytes .../sql/__pycache__/sqltypes.cpython-312.pyc | Bin 0 -> 155268 bytes .../__pycache__/traversals.cpython-312.pyc | Bin 0 -> 42413 bytes .../sql/__pycache__/type_api.cpython-312.pyc | Bin 0 -> 87815 bytes .../sql/__pycache__/util.cpython-312.pyc | Bin 0 -> 54433 bytes .../sql/__pycache__/visitors.cpython-312.pyc | Bin 0 -> 36061 bytes .../sqlalchemy/sql/_dml_constructors.py | 132 + .../sqlalchemy/sql/_elements_constructors.py | 1872 + .../sqlalchemy/sql/_orm_types.py | 20 + .../site-packages/sqlalchemy/sql/_py_util.py | 75 + .../sql/_selectable_constructors.py | 763 + .../site-packages/sqlalchemy/sql/_typing.py | 482 + .../sqlalchemy/sql/annotation.py | 587 + .../site-packages/sqlalchemy/sql/base.py | 2219 + .../site-packages/sqlalchemy/sql/cache_key.py | 1057 + .../site-packages/sqlalchemy/sql/coercions.py | 1404 + .../site-packages/sqlalchemy/sql/compiler.py | 8035 ++ .../site-packages/sqlalchemy/sql/crud.py | 1744 + .../site-packages/sqlalchemy/sql/ddl.py | 1444 + .../sqlalchemy/sql/default_comparator.py | 551 + .../site-packages/sqlalchemy/sql/dml.py | 1850 + .../site-packages/sqlalchemy/sql/elements.py | 5589 + .../site-packages/sqlalchemy/sql/events.py | 458 + .../sqlalchemy/sql/expression.py | 159 + .../site-packages/sqlalchemy/sql/functions.py | 2158 + .../site-packages/sqlalchemy/sql/lambdas.py | 1442 + .../site-packages/sqlalchemy/sql/naming.py | 209 + .../site-packages/sqlalchemy/sql/operators.py | 2623 + .../site-packages/sqlalchemy/sql/roles.py | 323 + .../site-packages/sqlalchemy/sql/schema.py | 6222 + .../sqlalchemy/sql/selectable.py | 7265 ++ .../site-packages/sqlalchemy/sql/sqltypes.py | 3930 + .../sqlalchemy/sql/traversals.py | 1024 + .../site-packages/sqlalchemy/sql/type_api.py | 2368 + .../site-packages/sqlalchemy/sql/util.py | 1485 + .../site-packages/sqlalchemy/sql/visitors.py | 1164 + .../sqlalchemy/testing/__init__.py | 96 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 3327 bytes .../__pycache__/assertions.cpython-312.pyc | Bin 0 -> 42156 bytes .../__pycache__/assertsql.cpython-312.pyc | Bin 0 -> 20296 bytes .../__pycache__/asyncio.cpython-312.pyc | Bin 0 -> 4147 bytes .../__pycache__/config.cpython-312.pyc | Bin 0 -> 18177 bytes .../__pycache__/engines.cpython-312.pyc | Bin 0 -> 21243 bytes .../__pycache__/entities.cpython-312.pyc | Bin 0 -> 4986 bytes .../__pycache__/exclusions.cpython-312.pyc | Bin 0 -> 23458 bytes .../__pycache__/pickleable.cpython-312.pyc | Bin 0 -> 6686 bytes .../__pycache__/profiling.cpython-312.pyc | Bin 0 -> 13219 bytes .../__pycache__/provision.cpython-312.pyc | Bin 0 -> 25148 bytes .../__pycache__/requirements.cpython-312.pyc | Bin 0 -> 92357 bytes .../__pycache__/schema.cpython-312.pyc | Bin 0 -> 8365 bytes .../testing/__pycache__/util.cpython-312.pyc | Bin 0 -> 21829 bytes .../__pycache__/warnings.cpython-312.pyc | Bin 0 -> 2006 bytes .../sqlalchemy/testing/assertions.py | 994 + .../sqlalchemy/testing/assertsql.py | 520 + .../sqlalchemy/testing/asyncio.py | 135 + .../sqlalchemy/testing/config.py | 434 + .../sqlalchemy/testing/engines.py | 478 + .../sqlalchemy/testing/entities.py | 117 + .../sqlalchemy/testing/exclusions.py | 476 + .../sqlalchemy/testing/fixtures/__init__.py | 28 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 908 bytes .../fixtures/__pycache__/base.cpython-312.pyc | Bin 0 -> 13545 bytes .../fixtures/__pycache__/mypy.cpython-312.pyc | Bin 0 -> 13725 bytes .../fixtures/__pycache__/orm.cpython-312.pyc | Bin 0 -> 11447 bytes .../fixtures/__pycache__/sql.cpython-312.pyc | Bin 0 -> 21494 bytes .../sqlalchemy/testing/fixtures/base.py | 366 + .../sqlalchemy/testing/fixtures/mypy.py | 332 + .../sqlalchemy/testing/fixtures/orm.py | 227 + .../sqlalchemy/testing/fixtures/sql.py | 482 + .../sqlalchemy/testing/pickleable.py | 155 + .../sqlalchemy/testing/plugin/__init__.py | 6 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 197 bytes .../__pycache__/bootstrap.cpython-312.pyc | Bin 0 -> 2148 bytes .../__pycache__/plugin_base.cpython-312.pyc | Bin 0 -> 29332 bytes .../__pycache__/pytestplugin.cpython-312.pyc | Bin 0 -> 33685 bytes .../sqlalchemy/testing/plugin/bootstrap.py | 51 + .../sqlalchemy/testing/plugin/plugin_base.py | 828 + .../sqlalchemy/testing/plugin/pytestplugin.py | 892 + .../sqlalchemy/testing/profiling.py | 329 + .../sqlalchemy/testing/provision.py | 597 + .../sqlalchemy/testing/requirements.py | 1940 + .../sqlalchemy/testing/schema.py | 198 + .../sqlalchemy/testing/suite/__init__.py | 19 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 564 bytes .../__pycache__/test_cte.cpython-312.pyc | Bin 0 -> 11079 bytes .../__pycache__/test_ddl.cpython-312.pyc | Bin 0 -> 18751 bytes .../test_deprecations.cpython-312.pyc | Bin 0 -> 9035 bytes .../__pycache__/test_dialect.cpython-312.pyc | Bin 0 -> 36398 bytes .../__pycache__/test_insert.cpython-312.pyc | Bin 0 -> 25244 bytes .../test_reflection.cpython-312.pyc | Bin 0 -> 155679 bytes .../__pycache__/test_results.cpython-312.pyc | Bin 0 -> 25581 bytes .../__pycache__/test_rowcount.cpython-312.pyc | Bin 0 -> 10348 bytes .../__pycache__/test_select.cpython-312.pyc | Bin 0 -> 115211 bytes .../__pycache__/test_sequence.cpython-312.pyc | Bin 0 -> 14998 bytes .../__pycache__/test_types.cpython-312.pyc | Bin 0 -> 99157 bytes .../test_unicode_ddl.cpython-312.pyc | Bin 0 -> 7618 bytes .../test_update_delete.cpython-312.pyc | Bin 0 -> 7397 bytes .../sqlalchemy/testing/suite/test_cte.py | 237 + .../sqlalchemy/testing/suite/test_ddl.py | 389 + .../testing/suite/test_deprecations.py | 153 + .../sqlalchemy/testing/suite/test_dialect.py | 776 + .../sqlalchemy/testing/suite/test_insert.py | 630 + .../testing/suite/test_reflection.py | 3557 + .../sqlalchemy/testing/suite/test_results.py | 504 + .../sqlalchemy/testing/suite/test_rowcount.py | 258 + .../sqlalchemy/testing/suite/test_select.py | 2010 + .../sqlalchemy/testing/suite/test_sequence.py | 317 + .../sqlalchemy/testing/suite/test_types.py | 2147 + .../testing/suite/test_unicode_ddl.py | 189 + .../testing/suite/test_update_delete.py | 139 + .../site-packages/sqlalchemy/testing/util.py | 535 + .../sqlalchemy/testing/warnings.py | 52 + .../site-packages/sqlalchemy/types.py | 74 + .../site-packages/sqlalchemy/util/__init__.py | 162 + .../util/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 5736 bytes .../__pycache__/_collections.cpython-312.pyc | Bin 0 -> 31782 bytes .../_concurrency_py3k.cpython-312.pyc | Bin 0 -> 10837 bytes .../util/__pycache__/_has_cy.cpython-312.pyc | Bin 0 -> 1088 bytes .../_py_collections.cpython-312.pyc | Bin 0 -> 29202 bytes .../util/__pycache__/compat.cpython-312.pyc | Bin 0 -> 12953 bytes .../__pycache__/concurrency.cpython-312.pyc | Bin 0 -> 4092 bytes .../__pycache__/deprecations.cpython-312.pyc | Bin 0 -> 13658 bytes .../__pycache__/langhelpers.cpython-312.pyc | Bin 0 -> 86781 bytes .../__pycache__/preloaded.cpython-312.pyc | Bin 0 -> 5889 bytes .../util/__pycache__/queue.cpython-312.pyc | Bin 0 -> 14621 bytes .../__pycache__/tool_support.cpython-312.pyc | Bin 0 -> 8723 bytes .../__pycache__/topological.cpython-312.pyc | Bin 0 -> 3933 bytes .../util/__pycache__/typing.cpython-312.pyc | Bin 0 -> 26096 bytes .../sqlalchemy/util/_collections.py | 717 + .../sqlalchemy/util/_concurrency_py3k.py | 288 + .../site-packages/sqlalchemy/util/_has_cy.py | 40 + .../sqlalchemy/util/_py_collections.py | 541 + .../site-packages/sqlalchemy/util/compat.py | 316 + .../sqlalchemy/util/concurrency.py | 110 + .../sqlalchemy/util/deprecations.py | 401 + .../sqlalchemy/util/langhelpers.py | 2306 + .../sqlalchemy/util/preloaded.py | 150 + .../site-packages/sqlalchemy/util/queue.py | 322 + .../sqlalchemy/util/tool_support.py | 201 + .../sqlalchemy/util/topological.py | 120 + .../site-packages/sqlalchemy/util/typing.py | 734 + .../DESCRIPTION.rst | 46 + .../text_unidecode-1.3.dist-info/INSTALLER | 1 + .../text_unidecode-1.3.dist-info/LICENSE.txt | 134 + .../text_unidecode-1.3.dist-info/METADATA | 73 + .../text_unidecode-1.3.dist-info/RECORD | 11 + .../text_unidecode-1.3.dist-info/WHEEL | 6 + .../metadata.json | 1 + .../top_level.txt | 1 + .../site-packages/text_unidecode/__init__.py | 21 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1004 bytes .../site-packages/text_unidecode/data.bin | Bin 0 -> 311077 bytes .../INSTALLER | 1 + .../METADATA | 72 + .../typing_extensions-4.15.0.dist-info/RECORD | 7 + .../typing_extensions-4.15.0.dist-info/WHEEL | 4 + .../licenses/LICENSE | 279 + .../site-packages/typing_extensions.py | 4317 + .../werkzeug-3.0.1.dist-info/INSTALLER | 1 + .../werkzeug-3.0.1.dist-info/LICENSE.rst | 28 + .../werkzeug-3.0.1.dist-info/METADATA | 118 + .../werkzeug-3.0.1.dist-info/RECORD | 126 + .../werkzeug-3.0.1.dist-info/REQUESTED | 0 .../werkzeug-3.0.1.dist-info/WHEEL | 4 + .../site-packages/werkzeug/__init__.py | 25 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1081 bytes .../__pycache__/_internal.cpython-312.pyc | Bin 0 -> 9761 bytes .../__pycache__/_reloader.cpython-312.pyc | Bin 0 -> 20251 bytes .../__pycache__/exceptions.cpython-312.pyc | Bin 0 -> 32925 bytes .../__pycache__/formparser.cpython-312.pyc | Bin 0 -> 16687 bytes .../werkzeug/__pycache__/http.cpython-312.pyc | Bin 0 -> 49362 bytes .../__pycache__/local.cpython-312.pyc | Bin 0 -> 28201 bytes .../__pycache__/security.cpython-312.pyc | Bin 0 -> 6958 bytes .../__pycache__/serving.cpython-312.pyc | Bin 0 -> 45751 bytes .../werkzeug/__pycache__/test.cpython-312.pyc | Bin 0 -> 59768 bytes .../__pycache__/testapp.cpython-312.pyc | Bin 0 -> 8571 bytes .../werkzeug/__pycache__/urls.cpython-312.pyc | Bin 0 -> 8939 bytes .../__pycache__/user_agent.cpython-312.pyc | Bin 0 -> 2147 bytes .../__pycache__/utils.cpython-312.pyc | Bin 0 -> 28189 bytes .../werkzeug/__pycache__/wsgi.cpython-312.pyc | Bin 0 -> 25210 bytes .../site-packages/werkzeug/_internal.py | 214 + .../site-packages/werkzeug/_reloader.py | 458 + .../werkzeug/datastructures/__init__.py | 34 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 1596 bytes .../__pycache__/accept.cpython-312.pyc | Bin 0 -> 13813 bytes .../__pycache__/auth.cpython-312.pyc | Bin 0 -> 14414 bytes .../__pycache__/cache_control.cpython-312.pyc | Bin 0 -> 7883 bytes .../__pycache__/csp.cpython-312.pyc | Bin 0 -> 5254 bytes .../__pycache__/etag.cpython-312.pyc | Bin 0 -> 5038 bytes .../__pycache__/file_storage.cpython-312.pyc | Bin 0 -> 7914 bytes .../__pycache__/headers.cpython-312.pyc | Bin 0 -> 23260 bytes .../__pycache__/mixins.cpython-312.pyc | Bin 0 -> 11387 bytes .../__pycache__/range.cpython-312.pyc | Bin 0 -> 8244 bytes .../__pycache__/structures.cpython-312.pyc | Bin 0 -> 48339 bytes .../werkzeug/datastructures/accept.py | 326 + .../werkzeug/datastructures/accept.pyi | 54 + .../werkzeug/datastructures/auth.py | 318 + .../werkzeug/datastructures/cache_control.py | 175 + .../werkzeug/datastructures/cache_control.pyi | 109 + .../werkzeug/datastructures/csp.py | 94 + .../werkzeug/datastructures/csp.pyi | 169 + .../werkzeug/datastructures/etag.py | 95 + .../werkzeug/datastructures/etag.pyi | 30 + .../werkzeug/datastructures/file_storage.py | 196 + .../werkzeug/datastructures/file_storage.pyi | 47 + .../werkzeug/datastructures/headers.py | 515 + .../werkzeug/datastructures/headers.pyi | 109 + .../werkzeug/datastructures/mixins.py | 242 + .../werkzeug/datastructures/mixins.pyi | 97 + .../werkzeug/datastructures/range.py | 180 + .../werkzeug/datastructures/range.pyi | 57 + .../werkzeug/datastructures/structures.py | 1006 + .../werkzeug/datastructures/structures.pyi | 208 + .../site-packages/werkzeug/debug/__init__.py | 534 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 22161 bytes .../debug/__pycache__/console.cpython-312.pyc | Bin 0 -> 11602 bytes .../debug/__pycache__/repr.cpython-312.pyc | Bin 0 -> 13877 bytes .../debug/__pycache__/tbtools.cpython-312.pyc | Bin 0 -> 16655 bytes .../site-packages/werkzeug/debug/console.py | 219 + .../site-packages/werkzeug/debug/repr.py | 283 + .../werkzeug/debug/shared/ICON_LICENSE.md | 6 + .../werkzeug/debug/shared/console.png | Bin 0 -> 507 bytes .../werkzeug/debug/shared/debugger.js | 360 + .../werkzeug/debug/shared/less.png | Bin 0 -> 191 bytes .../werkzeug/debug/shared/more.png | Bin 0 -> 200 bytes .../werkzeug/debug/shared/style.css | 150 + .../site-packages/werkzeug/debug/tbtools.py | 437 + .../site-packages/werkzeug/exceptions.py | 879 + .../site-packages/werkzeug/formparser.py | 421 + .../python3.12/site-packages/werkzeug/http.py | 1372 + .../site-packages/werkzeug/local.py | 643 + .../werkzeug/middleware/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 191 bytes .../__pycache__/dispatcher.cpython-312.pyc | Bin 0 -> 3309 bytes .../__pycache__/http_proxy.cpython-312.pyc | Bin 0 -> 9401 bytes .../__pycache__/lint.cpython-312.pyc | Bin 0 -> 17698 bytes .../__pycache__/profiler.cpython-312.pyc | Bin 0 -> 7195 bytes .../__pycache__/proxy_fix.cpython-312.pyc | Bin 0 -> 7192 bytes .../__pycache__/shared_data.cpython-312.pyc | Bin 0 -> 12706 bytes .../werkzeug/middleware/dispatcher.py | 80 + .../werkzeug/middleware/http_proxy.py | 235 + .../site-packages/werkzeug/middleware/lint.py | 420 + .../werkzeug/middleware/profiler.py | 154 + .../werkzeug/middleware/proxy_fix.py | 182 + .../werkzeug/middleware/shared_data.py | 282 + .../site-packages/werkzeug/py.typed | 0 .../werkzeug/routing/__init__.py | 133 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 4664 bytes .../__pycache__/converters.cpython-312.pyc | Bin 0 -> 10847 bytes .../__pycache__/exceptions.cpython-312.pyc | Bin 0 -> 7838 bytes .../routing/__pycache__/map.cpython-312.pyc | Bin 0 -> 39359 bytes .../__pycache__/matcher.cpython-312.pyc | Bin 0 -> 8219 bytes .../routing/__pycache__/rules.cpython-312.pyc | Bin 0 -> 38300 bytes .../werkzeug/routing/converters.py | 261 + .../werkzeug/routing/exceptions.py | 148 + .../site-packages/werkzeug/routing/map.py | 946 + .../site-packages/werkzeug/routing/matcher.py | 202 + .../site-packages/werkzeug/routing/rules.py | 909 + .../site-packages/werkzeug/sansio/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 187 bytes .../sansio/__pycache__/http.cpython-312.pyc | Bin 0 -> 5614 bytes .../__pycache__/multipart.cpython-312.pyc | Bin 0 -> 14044 bytes .../__pycache__/request.cpython-312.pyc | Bin 0 -> 21859 bytes .../__pycache__/response.cpython-312.pyc | Bin 0 -> 31327 bytes .../sansio/__pycache__/utils.cpython-312.pyc | Bin 0 -> 6011 bytes .../site-packages/werkzeug/sansio/http.py | 171 + .../werkzeug/sansio/multipart.py | 321 + .../site-packages/werkzeug/sansio/request.py | 536 + .../site-packages/werkzeug/sansio/response.py | 751 + .../site-packages/werkzeug/sansio/utils.py | 159 + .../site-packages/werkzeug/security.py | 157 + .../site-packages/werkzeug/serving.py | 1109 + .../python3.12/site-packages/werkzeug/test.py | 1462 + .../site-packages/werkzeug/testapp.py | 181 + .../python3.12/site-packages/werkzeug/urls.py | 216 + .../site-packages/werkzeug/user_agent.py | 47 + .../site-packages/werkzeug/utils.py | 690 + .../werkzeug/wrappers/__init__.py | 3 + .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 311 bytes .../__pycache__/request.cpython-312.pyc | Bin 0 -> 25968 bytes .../__pycache__/response.cpython-312.pyc | Bin 0 -> 34658 bytes .../werkzeug/wrappers/request.py | 650 + .../werkzeug/wrappers/response.py | 835 + .../python3.12/site-packages/werkzeug/wsgi.py | 595 + venv/lib64 | 1 + venv/pyvenv.cfg | 5 + wsgi.py | 6 + 3423 files changed, 763764 insertions(+) create mode 100644 .env.example create mode 100644 README.md create mode 100644 __pycache__/config.cpython-312.pyc create mode 100644 __pycache__/models.cpython-312.pyc create mode 100644 app.py create mode 100644 config.py create mode 100755 deploy.sh create mode 100644 directlx.service create mode 100644 instance/directlx.db create mode 100644 models.py create mode 100644 nginx.conf create mode 120000 node_modules/.bin/cssesc create mode 120000 node_modules/.bin/jiti create mode 120000 node_modules/.bin/nanoid create mode 120000 node_modules/.bin/resolve create mode 120000 node_modules/.bin/sucrase create mode 120000 node_modules/.bin/sucrase-node create mode 120000 node_modules/.bin/tailwind create mode 120000 node_modules/.bin/tailwindcss create mode 100644 node_modules/.package-lock.json create mode 100644 node_modules/@alloc/quick-lru/index.d.ts create mode 100644 node_modules/@alloc/quick-lru/index.js create mode 100644 node_modules/@alloc/quick-lru/license create mode 100644 node_modules/@alloc/quick-lru/package.json create mode 100644 node_modules/@alloc/quick-lru/readme.md create mode 100644 node_modules/@jridgewell/gen-mapping/LICENSE create mode 100644 node_modules/@jridgewell/gen-mapping/README.md create mode 100644 node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs create mode 100644 node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map create mode 100644 node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js create mode 100644 node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map create mode 100644 node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts create mode 100644 node_modules/@jridgewell/gen-mapping/dist/types/set-array.d.ts create mode 100644 node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts create mode 100644 node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts create mode 100644 node_modules/@jridgewell/gen-mapping/package.json create mode 100644 node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts create mode 100644 node_modules/@jridgewell/gen-mapping/src/set-array.ts create mode 100644 node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts create mode 100644 node_modules/@jridgewell/gen-mapping/src/types.ts create mode 100644 node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts create mode 100644 node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map create mode 100644 node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts create mode 100644 node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map create mode 100644 node_modules/@jridgewell/gen-mapping/types/set-array.d.cts create mode 100644 node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map create mode 100644 node_modules/@jridgewell/gen-mapping/types/set-array.d.mts create mode 100644 node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map create mode 100644 node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts create mode 100644 node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map create mode 100644 node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts create mode 100644 node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map create mode 100644 node_modules/@jridgewell/gen-mapping/types/types.d.cts create mode 100644 node_modules/@jridgewell/gen-mapping/types/types.d.cts.map create mode 100644 node_modules/@jridgewell/gen-mapping/types/types.d.mts create mode 100644 node_modules/@jridgewell/gen-mapping/types/types.d.mts.map create mode 100644 node_modules/@jridgewell/resolve-uri/LICENSE create mode 100644 node_modules/@jridgewell/resolve-uri/README.md create mode 100644 node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs create mode 100644 node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map create mode 100644 node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js create mode 100644 node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map create mode 100644 node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts create mode 100644 node_modules/@jridgewell/resolve-uri/package.json create mode 100644 node_modules/@jridgewell/sourcemap-codec/LICENSE create mode 100644 node_modules/@jridgewell/sourcemap-codec/README.md create mode 100644 node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs create mode 100644 node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map create mode 100644 node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js create mode 100644 node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map create mode 100644 node_modules/@jridgewell/sourcemap-codec/package.json create mode 100644 node_modules/@jridgewell/sourcemap-codec/src/scopes.ts create mode 100644 node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts create mode 100644 node_modules/@jridgewell/sourcemap-codec/src/strings.ts create mode 100644 node_modules/@jridgewell/sourcemap-codec/src/vlq.ts create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts create mode 100644 node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map create mode 100644 node_modules/@jridgewell/trace-mapping/LICENSE create mode 100644 node_modules/@jridgewell/trace-mapping/README.md create mode 100644 node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs create mode 100644 node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map create mode 100644 node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js create mode 100644 node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map create mode 100644 node_modules/@jridgewell/trace-mapping/package.json create mode 100644 node_modules/@jridgewell/trace-mapping/src/binary-search.ts create mode 100644 node_modules/@jridgewell/trace-mapping/src/by-source.ts create mode 100644 node_modules/@jridgewell/trace-mapping/src/flatten-map.ts create mode 100644 node_modules/@jridgewell/trace-mapping/src/resolve.ts create mode 100644 node_modules/@jridgewell/trace-mapping/src/sort.ts create mode 100644 node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts create mode 100644 node_modules/@jridgewell/trace-mapping/src/strip-filename.ts create mode 100644 node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts create mode 100644 node_modules/@jridgewell/trace-mapping/src/types.ts create mode 100644 node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts create mode 100644 node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts create mode 100644 node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/by-source.d.cts create mode 100644 node_modules/@jridgewell/trace-mapping/types/by-source.d.cts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/by-source.d.mts create mode 100644 node_modules/@jridgewell/trace-mapping/types/by-source.d.mts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts create mode 100644 node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts create mode 100644 node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/resolve.d.cts create mode 100644 node_modules/@jridgewell/trace-mapping/types/resolve.d.cts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/resolve.d.mts create mode 100644 node_modules/@jridgewell/trace-mapping/types/resolve.d.mts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/sort.d.cts create mode 100644 node_modules/@jridgewell/trace-mapping/types/sort.d.cts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/sort.d.mts create mode 100644 node_modules/@jridgewell/trace-mapping/types/sort.d.mts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts create mode 100644 node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts create mode 100644 node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts create mode 100644 node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts create mode 100644 node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts create mode 100644 node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts create mode 100644 node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/types.d.cts create mode 100644 node_modules/@jridgewell/trace-mapping/types/types.d.cts.map create mode 100644 node_modules/@jridgewell/trace-mapping/types/types.d.mts create mode 100644 node_modules/@jridgewell/trace-mapping/types/types.d.mts.map create mode 100644 node_modules/@nodelib/fs.scandir/LICENSE create mode 100644 node_modules/@nodelib/fs.scandir/README.md create mode 100644 node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/adapters/fs.js create mode 100644 node_modules/@nodelib/fs.scandir/out/constants.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/constants.js create mode 100644 node_modules/@nodelib/fs.scandir/out/index.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/index.js create mode 100644 node_modules/@nodelib/fs.scandir/out/providers/async.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/providers/async.js create mode 100644 node_modules/@nodelib/fs.scandir/out/providers/common.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/providers/common.js create mode 100644 node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/providers/sync.js create mode 100644 node_modules/@nodelib/fs.scandir/out/settings.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/settings.js create mode 100644 node_modules/@nodelib/fs.scandir/out/types/index.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/types/index.js create mode 100644 node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/utils/fs.js create mode 100644 node_modules/@nodelib/fs.scandir/out/utils/index.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/utils/index.js create mode 100644 node_modules/@nodelib/fs.scandir/package.json create mode 100644 node_modules/@nodelib/fs.stat/LICENSE create mode 100644 node_modules/@nodelib/fs.stat/README.md create mode 100644 node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts create mode 100644 node_modules/@nodelib/fs.stat/out/adapters/fs.js create mode 100644 node_modules/@nodelib/fs.stat/out/index.d.ts create mode 100644 node_modules/@nodelib/fs.stat/out/index.js create mode 100644 node_modules/@nodelib/fs.stat/out/providers/async.d.ts create mode 100644 node_modules/@nodelib/fs.stat/out/providers/async.js create mode 100644 node_modules/@nodelib/fs.stat/out/providers/sync.d.ts create mode 100644 node_modules/@nodelib/fs.stat/out/providers/sync.js create mode 100644 node_modules/@nodelib/fs.stat/out/settings.d.ts create mode 100644 node_modules/@nodelib/fs.stat/out/settings.js create mode 100644 node_modules/@nodelib/fs.stat/out/types/index.d.ts create mode 100644 node_modules/@nodelib/fs.stat/out/types/index.js create mode 100644 node_modules/@nodelib/fs.stat/package.json create mode 100644 node_modules/@nodelib/fs.walk/LICENSE create mode 100644 node_modules/@nodelib/fs.walk/README.md create mode 100644 node_modules/@nodelib/fs.walk/out/index.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/index.js create mode 100644 node_modules/@nodelib/fs.walk/out/providers/async.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/providers/async.js create mode 100644 node_modules/@nodelib/fs.walk/out/providers/index.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/providers/index.js create mode 100644 node_modules/@nodelib/fs.walk/out/providers/stream.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/providers/stream.js create mode 100644 node_modules/@nodelib/fs.walk/out/providers/sync.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/providers/sync.js create mode 100644 node_modules/@nodelib/fs.walk/out/readers/async.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/readers/async.js create mode 100644 node_modules/@nodelib/fs.walk/out/readers/common.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/readers/common.js create mode 100644 node_modules/@nodelib/fs.walk/out/readers/reader.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/readers/reader.js create mode 100644 node_modules/@nodelib/fs.walk/out/readers/sync.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/readers/sync.js create mode 100644 node_modules/@nodelib/fs.walk/out/settings.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/settings.js create mode 100644 node_modules/@nodelib/fs.walk/out/types/index.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/types/index.js create mode 100644 node_modules/@nodelib/fs.walk/package.json create mode 100644 node_modules/any-promise/.jshintrc create mode 100644 node_modules/any-promise/.npmignore create mode 100644 node_modules/any-promise/LICENSE create mode 100644 node_modules/any-promise/README.md create mode 100644 node_modules/any-promise/implementation.d.ts create mode 100644 node_modules/any-promise/implementation.js create mode 100644 node_modules/any-promise/index.d.ts create mode 100644 node_modules/any-promise/index.js create mode 100644 node_modules/any-promise/loader.js create mode 100644 node_modules/any-promise/optional.js create mode 100644 node_modules/any-promise/package.json create mode 100644 node_modules/any-promise/register-shim.js create mode 100644 node_modules/any-promise/register.d.ts create mode 100644 node_modules/any-promise/register.js create mode 100644 node_modules/any-promise/register/bluebird.d.ts create mode 100644 node_modules/any-promise/register/bluebird.js create mode 100644 node_modules/any-promise/register/es6-promise.d.ts create mode 100644 node_modules/any-promise/register/es6-promise.js create mode 100644 node_modules/any-promise/register/lie.d.ts create mode 100644 node_modules/any-promise/register/lie.js create mode 100644 node_modules/any-promise/register/native-promise-only.d.ts create mode 100644 node_modules/any-promise/register/native-promise-only.js create mode 100644 node_modules/any-promise/register/pinkie.d.ts create mode 100644 node_modules/any-promise/register/pinkie.js create mode 100644 node_modules/any-promise/register/promise.d.ts create mode 100644 node_modules/any-promise/register/promise.js create mode 100644 node_modules/any-promise/register/q.d.ts create mode 100644 node_modules/any-promise/register/q.js create mode 100644 node_modules/any-promise/register/rsvp.d.ts create mode 100644 node_modules/any-promise/register/rsvp.js create mode 100644 node_modules/any-promise/register/vow.d.ts create mode 100644 node_modules/any-promise/register/vow.js create mode 100644 node_modules/any-promise/register/when.d.ts create mode 100644 node_modules/any-promise/register/when.js create mode 100644 node_modules/anymatch/LICENSE create mode 100644 node_modules/anymatch/README.md create mode 100644 node_modules/anymatch/index.d.ts create mode 100644 node_modules/anymatch/index.js create mode 100644 node_modules/anymatch/package.json create mode 100644 node_modules/arg/LICENSE.md create mode 100644 node_modules/arg/README.md create mode 100644 node_modules/arg/index.d.ts create mode 100644 node_modules/arg/index.js create mode 100644 node_modules/arg/package.json create mode 100644 node_modules/binary-extensions/binary-extensions.json create mode 100644 node_modules/binary-extensions/binary-extensions.json.d.ts create mode 100644 node_modules/binary-extensions/index.d.ts create mode 100644 node_modules/binary-extensions/index.js create mode 100644 node_modules/binary-extensions/license create mode 100644 node_modules/binary-extensions/package.json create mode 100644 node_modules/binary-extensions/readme.md create mode 100644 node_modules/braces/LICENSE create mode 100644 node_modules/braces/README.md create mode 100644 node_modules/braces/index.js create mode 100644 node_modules/braces/lib/compile.js create mode 100644 node_modules/braces/lib/constants.js create mode 100644 node_modules/braces/lib/expand.js create mode 100644 node_modules/braces/lib/parse.js create mode 100644 node_modules/braces/lib/stringify.js create mode 100644 node_modules/braces/lib/utils.js create mode 100644 node_modules/braces/package.json create mode 100644 node_modules/camelcase-css/README.md create mode 100644 node_modules/camelcase-css/index-es5.js create mode 100644 node_modules/camelcase-css/index.js create mode 100644 node_modules/camelcase-css/license create mode 100644 node_modules/camelcase-css/package.json create mode 100644 node_modules/chokidar/LICENSE create mode 100644 node_modules/chokidar/README.md create mode 100644 node_modules/chokidar/index.js create mode 100644 node_modules/chokidar/lib/constants.js create mode 100644 node_modules/chokidar/lib/fsevents-handler.js create mode 100644 node_modules/chokidar/lib/nodefs-handler.js create mode 100644 node_modules/chokidar/node_modules/glob-parent/CHANGELOG.md create mode 100644 node_modules/chokidar/node_modules/glob-parent/LICENSE create mode 100644 node_modules/chokidar/node_modules/glob-parent/README.md create mode 100644 node_modules/chokidar/node_modules/glob-parent/index.js create mode 100644 node_modules/chokidar/node_modules/glob-parent/package.json create mode 100644 node_modules/chokidar/package.json create mode 100644 node_modules/chokidar/types/index.d.ts create mode 100644 node_modules/commander/CHANGELOG.md create mode 100644 node_modules/commander/LICENSE create mode 100644 node_modules/commander/Readme.md create mode 100644 node_modules/commander/index.js create mode 100644 node_modules/commander/package.json create mode 100644 node_modules/commander/typings/index.d.ts create mode 100644 node_modules/cssesc/LICENSE-MIT.txt create mode 100644 node_modules/cssesc/README.md create mode 100755 node_modules/cssesc/bin/cssesc create mode 100644 node_modules/cssesc/cssesc.js create mode 100644 node_modules/cssesc/man/cssesc.1 create mode 100644 node_modules/cssesc/package.json create mode 100644 node_modules/didyoumean/LICENSE create mode 100644 node_modules/didyoumean/README.md create mode 100644 node_modules/didyoumean/didYouMean-1.2.1.js create mode 100644 node_modules/didyoumean/didYouMean-1.2.1.min.js create mode 100755 node_modules/didyoumean/package.json create mode 100644 node_modules/dlv/README.md create mode 100644 node_modules/dlv/dist/dlv.es.js create mode 100644 node_modules/dlv/dist/dlv.es.js.map create mode 100644 node_modules/dlv/dist/dlv.js create mode 100644 node_modules/dlv/dist/dlv.js.map create mode 100644 node_modules/dlv/dist/dlv.umd.js create mode 100644 node_modules/dlv/dist/dlv.umd.js.map create mode 100644 node_modules/dlv/index.js create mode 100644 node_modules/dlv/package.json create mode 100644 node_modules/fast-glob/LICENSE create mode 100644 node_modules/fast-glob/README.md create mode 100644 node_modules/fast-glob/node_modules/glob-parent/CHANGELOG.md create mode 100644 node_modules/fast-glob/node_modules/glob-parent/LICENSE create mode 100644 node_modules/fast-glob/node_modules/glob-parent/README.md create mode 100644 node_modules/fast-glob/node_modules/glob-parent/index.js create mode 100644 node_modules/fast-glob/node_modules/glob-parent/package.json create mode 100644 node_modules/fast-glob/out/index.d.ts create mode 100644 node_modules/fast-glob/out/index.js create mode 100644 node_modules/fast-glob/out/managers/tasks.d.ts create mode 100644 node_modules/fast-glob/out/managers/tasks.js create mode 100644 node_modules/fast-glob/out/providers/async.d.ts create mode 100644 node_modules/fast-glob/out/providers/async.js create mode 100644 node_modules/fast-glob/out/providers/filters/deep.d.ts create mode 100644 node_modules/fast-glob/out/providers/filters/deep.js create mode 100644 node_modules/fast-glob/out/providers/filters/entry.d.ts create mode 100644 node_modules/fast-glob/out/providers/filters/entry.js create mode 100644 node_modules/fast-glob/out/providers/filters/error.d.ts create mode 100644 node_modules/fast-glob/out/providers/filters/error.js create mode 100644 node_modules/fast-glob/out/providers/matchers/matcher.d.ts create mode 100644 node_modules/fast-glob/out/providers/matchers/matcher.js create mode 100644 node_modules/fast-glob/out/providers/matchers/partial.d.ts create mode 100644 node_modules/fast-glob/out/providers/matchers/partial.js create mode 100644 node_modules/fast-glob/out/providers/provider.d.ts create mode 100644 node_modules/fast-glob/out/providers/provider.js create mode 100644 node_modules/fast-glob/out/providers/stream.d.ts create mode 100644 node_modules/fast-glob/out/providers/stream.js create mode 100644 node_modules/fast-glob/out/providers/sync.d.ts create mode 100644 node_modules/fast-glob/out/providers/sync.js create mode 100644 node_modules/fast-glob/out/providers/transformers/entry.d.ts create mode 100644 node_modules/fast-glob/out/providers/transformers/entry.js create mode 100644 node_modules/fast-glob/out/readers/async.d.ts create mode 100644 node_modules/fast-glob/out/readers/async.js create mode 100644 node_modules/fast-glob/out/readers/reader.d.ts create mode 100644 node_modules/fast-glob/out/readers/reader.js create mode 100644 node_modules/fast-glob/out/readers/stream.d.ts create mode 100644 node_modules/fast-glob/out/readers/stream.js create mode 100644 node_modules/fast-glob/out/readers/sync.d.ts create mode 100644 node_modules/fast-glob/out/readers/sync.js create mode 100644 node_modules/fast-glob/out/settings.d.ts create mode 100644 node_modules/fast-glob/out/settings.js create mode 100644 node_modules/fast-glob/out/types/index.d.ts create mode 100644 node_modules/fast-glob/out/types/index.js create mode 100644 node_modules/fast-glob/out/utils/array.d.ts create mode 100644 node_modules/fast-glob/out/utils/array.js create mode 100644 node_modules/fast-glob/out/utils/errno.d.ts create mode 100644 node_modules/fast-glob/out/utils/errno.js create mode 100644 node_modules/fast-glob/out/utils/fs.d.ts create mode 100644 node_modules/fast-glob/out/utils/fs.js create mode 100644 node_modules/fast-glob/out/utils/index.d.ts create mode 100644 node_modules/fast-glob/out/utils/index.js create mode 100644 node_modules/fast-glob/out/utils/path.d.ts create mode 100644 node_modules/fast-glob/out/utils/path.js create mode 100644 node_modules/fast-glob/out/utils/pattern.d.ts create mode 100644 node_modules/fast-glob/out/utils/pattern.js create mode 100644 node_modules/fast-glob/out/utils/stream.d.ts create mode 100644 node_modules/fast-glob/out/utils/stream.js create mode 100644 node_modules/fast-glob/out/utils/string.d.ts create mode 100644 node_modules/fast-glob/out/utils/string.js create mode 100644 node_modules/fast-glob/package.json create mode 100644 node_modules/fastq/LICENSE create mode 100644 node_modules/fastq/README.md create mode 100644 node_modules/fastq/SECURITY.md create mode 100644 node_modules/fastq/bench.js create mode 100644 node_modules/fastq/eslint.config.js create mode 100644 node_modules/fastq/example.js create mode 100644 node_modules/fastq/example.mjs create mode 100644 node_modules/fastq/index.d.ts create mode 100644 node_modules/fastq/package.json create mode 100644 node_modules/fastq/queue.js create mode 100644 node_modules/fastq/test/example.ts create mode 100644 node_modules/fastq/test/promise.js create mode 100644 node_modules/fastq/test/test.js create mode 100644 node_modules/fastq/test/tsconfig.json create mode 100644 node_modules/fill-range/LICENSE create mode 100644 node_modules/fill-range/README.md create mode 100644 node_modules/fill-range/index.js create mode 100644 node_modules/fill-range/package.json create mode 100644 node_modules/function-bind/.eslintrc create mode 100644 node_modules/function-bind/.github/FUNDING.yml create mode 100644 node_modules/function-bind/.github/SECURITY.md create mode 100644 node_modules/function-bind/.nycrc create mode 100644 node_modules/function-bind/CHANGELOG.md create mode 100644 node_modules/function-bind/LICENSE create mode 100644 node_modules/function-bind/README.md create mode 100644 node_modules/function-bind/implementation.js create mode 100644 node_modules/function-bind/index.js create mode 100644 node_modules/function-bind/package.json create mode 100644 node_modules/function-bind/test/.eslintrc create mode 100644 node_modules/function-bind/test/index.js create mode 100644 node_modules/glob-parent/LICENSE create mode 100644 node_modules/glob-parent/README.md create mode 100644 node_modules/glob-parent/index.js create mode 100644 node_modules/glob-parent/package.json create mode 100644 node_modules/hasown/.eslintrc create mode 100644 node_modules/hasown/.github/FUNDING.yml create mode 100644 node_modules/hasown/.nycrc create mode 100644 node_modules/hasown/CHANGELOG.md create mode 100644 node_modules/hasown/LICENSE create mode 100644 node_modules/hasown/README.md create mode 100644 node_modules/hasown/index.d.ts create mode 100644 node_modules/hasown/index.js create mode 100644 node_modules/hasown/package.json create mode 100644 node_modules/hasown/tsconfig.json create mode 100644 node_modules/is-binary-path/index.d.ts create mode 100644 node_modules/is-binary-path/index.js create mode 100644 node_modules/is-binary-path/license create mode 100644 node_modules/is-binary-path/package.json create mode 100644 node_modules/is-binary-path/readme.md create mode 100644 node_modules/is-core-module/.eslintrc create mode 100644 node_modules/is-core-module/.nycrc create mode 100644 node_modules/is-core-module/CHANGELOG.md create mode 100644 node_modules/is-core-module/LICENSE create mode 100644 node_modules/is-core-module/README.md create mode 100644 node_modules/is-core-module/core.json create mode 100644 node_modules/is-core-module/index.js create mode 100644 node_modules/is-core-module/package.json create mode 100644 node_modules/is-core-module/test/index.js create mode 100644 node_modules/is-extglob/LICENSE create mode 100644 node_modules/is-extglob/README.md create mode 100644 node_modules/is-extglob/index.js create mode 100644 node_modules/is-extglob/package.json create mode 100644 node_modules/is-glob/LICENSE create mode 100644 node_modules/is-glob/README.md create mode 100644 node_modules/is-glob/index.js create mode 100644 node_modules/is-glob/package.json create mode 100644 node_modules/is-number/LICENSE create mode 100644 node_modules/is-number/README.md create mode 100644 node_modules/is-number/index.js create mode 100644 node_modules/is-number/package.json create mode 100644 node_modules/jiti/LICENSE create mode 100644 node_modules/jiti/README.md create mode 100755 node_modules/jiti/bin/jiti.js create mode 100644 node_modules/jiti/dist/babel.d.ts create mode 100644 node_modules/jiti/dist/babel.js create mode 100644 node_modules/jiti/dist/jiti.d.ts create mode 100644 node_modules/jiti/dist/jiti.js create mode 100644 node_modules/jiti/dist/plugins/babel-plugin-transform-import-meta.d.ts create mode 100644 node_modules/jiti/dist/plugins/import-meta-env.d.ts create mode 100644 node_modules/jiti/dist/types.d.ts create mode 100644 node_modules/jiti/dist/utils.d.ts create mode 100644 node_modules/jiti/lib/index.js create mode 100644 node_modules/jiti/package.json create mode 100644 node_modules/jiti/register.js create mode 100644 node_modules/lilconfig/LICENSE create mode 100644 node_modules/lilconfig/package.json create mode 100644 node_modules/lilconfig/readme.md create mode 100644 node_modules/lilconfig/src/index.d.ts create mode 100644 node_modules/lilconfig/src/index.js create mode 100644 node_modules/lines-and-columns/LICENSE create mode 100644 node_modules/lines-and-columns/README.md create mode 100644 node_modules/lines-and-columns/build/index.d.ts create mode 100644 node_modules/lines-and-columns/build/index.js create mode 100644 node_modules/lines-and-columns/package.json create mode 100644 node_modules/merge2/LICENSE create mode 100644 node_modules/merge2/README.md create mode 100644 node_modules/merge2/index.js create mode 100644 node_modules/merge2/package.json create mode 100755 node_modules/micromatch/LICENSE create mode 100644 node_modules/micromatch/README.md create mode 100644 node_modules/micromatch/index.js create mode 100644 node_modules/micromatch/package.json create mode 100644 node_modules/mz/HISTORY.md create mode 100644 node_modules/mz/LICENSE create mode 100644 node_modules/mz/README.md create mode 100644 node_modules/mz/child_process.js create mode 100644 node_modules/mz/crypto.js create mode 100644 node_modules/mz/dns.js create mode 100644 node_modules/mz/fs.js create mode 100644 node_modules/mz/index.js create mode 100644 node_modules/mz/package.json create mode 100644 node_modules/mz/readline.js create mode 100644 node_modules/mz/zlib.js create mode 100644 node_modules/nanoid/LICENSE create mode 100644 node_modules/nanoid/README.md create mode 100644 node_modules/nanoid/async/index.browser.cjs create mode 100644 node_modules/nanoid/async/index.browser.js create mode 100644 node_modules/nanoid/async/index.cjs create mode 100644 node_modules/nanoid/async/index.d.ts create mode 100644 node_modules/nanoid/async/index.js create mode 100644 node_modules/nanoid/async/index.native.js create mode 100644 node_modules/nanoid/async/package.json create mode 100755 node_modules/nanoid/bin/nanoid.cjs create mode 100644 node_modules/nanoid/index.browser.cjs create mode 100644 node_modules/nanoid/index.browser.js create mode 100644 node_modules/nanoid/index.cjs create mode 100644 node_modules/nanoid/index.d.cts create mode 100644 node_modules/nanoid/index.d.ts create mode 100644 node_modules/nanoid/index.js create mode 100644 node_modules/nanoid/nanoid.js create mode 100644 node_modules/nanoid/non-secure/index.cjs create mode 100644 node_modules/nanoid/non-secure/index.d.ts create mode 100644 node_modules/nanoid/non-secure/index.js create mode 100644 node_modules/nanoid/non-secure/package.json create mode 100644 node_modules/nanoid/package.json create mode 100644 node_modules/nanoid/url-alphabet/index.cjs create mode 100644 node_modules/nanoid/url-alphabet/index.js create mode 100644 node_modules/nanoid/url-alphabet/package.json create mode 100644 node_modules/normalize-path/LICENSE create mode 100644 node_modules/normalize-path/README.md create mode 100644 node_modules/normalize-path/index.js create mode 100644 node_modules/normalize-path/package.json create mode 100644 node_modules/object-assign/index.js create mode 100644 node_modules/object-assign/license create mode 100644 node_modules/object-assign/package.json create mode 100644 node_modules/object-assign/readme.md create mode 100644 node_modules/object-hash/LICENSE create mode 100644 node_modules/object-hash/dist/object_hash.js create mode 100644 node_modules/object-hash/index.js create mode 100644 node_modules/object-hash/package.json create mode 100644 node_modules/object-hash/readme.markdown create mode 100644 node_modules/path-parse/LICENSE create mode 100644 node_modules/path-parse/README.md create mode 100644 node_modules/path-parse/index.js create mode 100644 node_modules/path-parse/package.json create mode 100644 node_modules/picocolors/LICENSE create mode 100644 node_modules/picocolors/README.md create mode 100644 node_modules/picocolors/package.json create mode 100644 node_modules/picocolors/picocolors.browser.js create mode 100644 node_modules/picocolors/picocolors.d.ts create mode 100644 node_modules/picocolors/picocolors.js create mode 100644 node_modules/picocolors/types.d.ts create mode 100644 node_modules/picomatch/CHANGELOG.md create mode 100644 node_modules/picomatch/LICENSE create mode 100644 node_modules/picomatch/README.md create mode 100644 node_modules/picomatch/index.js create mode 100644 node_modules/picomatch/lib/constants.js create mode 100644 node_modules/picomatch/lib/parse.js create mode 100644 node_modules/picomatch/lib/picomatch.js create mode 100644 node_modules/picomatch/lib/scan.js create mode 100644 node_modules/picomatch/lib/utils.js create mode 100644 node_modules/picomatch/package.json create mode 100644 node_modules/pify/index.js create mode 100644 node_modules/pify/license create mode 100644 node_modules/pify/package.json create mode 100644 node_modules/pify/readme.md create mode 100644 node_modules/pirates/LICENSE create mode 100644 node_modules/pirates/README.md create mode 100644 node_modules/pirates/index.d.ts create mode 100644 node_modules/pirates/lib/index.js create mode 100644 node_modules/pirates/package.json create mode 100755 node_modules/postcss-import/LICENSE create mode 100644 node_modules/postcss-import/README.md create mode 100755 node_modules/postcss-import/index.js create mode 100644 node_modules/postcss-import/lib/assign-layer-names.js create mode 100644 node_modules/postcss-import/lib/data-url.js create mode 100644 node_modules/postcss-import/lib/join-layer.js create mode 100644 node_modules/postcss-import/lib/join-media.js create mode 100644 node_modules/postcss-import/lib/load-content.js create mode 100644 node_modules/postcss-import/lib/parse-statements.js create mode 100644 node_modules/postcss-import/lib/process-content.js create mode 100644 node_modules/postcss-import/lib/resolve-id.js create mode 100644 node_modules/postcss-import/package.json create mode 100644 node_modules/postcss-js/LICENSE create mode 100644 node_modules/postcss-js/README.md create mode 100644 node_modules/postcss-js/async.js create mode 100644 node_modules/postcss-js/index.js create mode 100644 node_modules/postcss-js/index.mjs create mode 100644 node_modules/postcss-js/objectifier.js create mode 100644 node_modules/postcss-js/package.json create mode 100644 node_modules/postcss-js/parser.js create mode 100644 node_modules/postcss-js/process-result.js create mode 100644 node_modules/postcss-js/sync.js create mode 100644 node_modules/postcss-load-config/LICENSE create mode 100644 node_modules/postcss-load-config/README.md create mode 100644 node_modules/postcss-load-config/package.json create mode 100644 node_modules/postcss-load-config/src/index.d.ts create mode 100644 node_modules/postcss-load-config/src/index.js create mode 100644 node_modules/postcss-load-config/src/options.js create mode 100644 node_modules/postcss-load-config/src/plugins.js create mode 100644 node_modules/postcss-load-config/src/req.js create mode 100644 node_modules/postcss-nested/LICENSE create mode 100644 node_modules/postcss-nested/README.md create mode 100644 node_modules/postcss-nested/index.d.ts create mode 100644 node_modules/postcss-nested/index.js create mode 100644 node_modules/postcss-nested/package.json create mode 100644 node_modules/postcss-selector-parser/API.md create mode 100644 node_modules/postcss-selector-parser/CHANGELOG.md create mode 100644 node_modules/postcss-selector-parser/LICENSE-MIT create mode 100644 node_modules/postcss-selector-parser/README.md create mode 100644 node_modules/postcss-selector-parser/dist/index.js create mode 100644 node_modules/postcss-selector-parser/dist/parser.js create mode 100644 node_modules/postcss-selector-parser/dist/processor.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/attribute.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/className.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/combinator.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/comment.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/constructors.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/container.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/guards.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/id.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/index.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/namespace.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/nesting.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/node.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/pseudo.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/root.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/selector.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/string.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/tag.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/types.js create mode 100644 node_modules/postcss-selector-parser/dist/selectors/universal.js create mode 100644 node_modules/postcss-selector-parser/dist/sortAscending.js create mode 100644 node_modules/postcss-selector-parser/dist/tokenTypes.js create mode 100644 node_modules/postcss-selector-parser/dist/tokenize.js create mode 100644 node_modules/postcss-selector-parser/dist/util/ensureObject.js create mode 100644 node_modules/postcss-selector-parser/dist/util/getProp.js create mode 100644 node_modules/postcss-selector-parser/dist/util/index.js create mode 100644 node_modules/postcss-selector-parser/dist/util/stripComments.js create mode 100644 node_modules/postcss-selector-parser/dist/util/unesc.js create mode 100644 node_modules/postcss-selector-parser/package.json create mode 100644 node_modules/postcss-selector-parser/postcss-selector-parser.d.ts create mode 100644 node_modules/postcss-value-parser/LICENSE create mode 100644 node_modules/postcss-value-parser/README.md create mode 100644 node_modules/postcss-value-parser/lib/index.d.ts create mode 100644 node_modules/postcss-value-parser/lib/index.js create mode 100644 node_modules/postcss-value-parser/lib/parse.js create mode 100644 node_modules/postcss-value-parser/lib/stringify.js create mode 100644 node_modules/postcss-value-parser/lib/unit.js create mode 100644 node_modules/postcss-value-parser/lib/walk.js create mode 100644 node_modules/postcss-value-parser/package.json create mode 100644 node_modules/postcss/LICENSE create mode 100644 node_modules/postcss/README.md create mode 100644 node_modules/postcss/lib/at-rule.d.ts create mode 100644 node_modules/postcss/lib/at-rule.js create mode 100644 node_modules/postcss/lib/comment.d.ts create mode 100644 node_modules/postcss/lib/comment.js create mode 100644 node_modules/postcss/lib/container.d.ts create mode 100644 node_modules/postcss/lib/container.js create mode 100644 node_modules/postcss/lib/css-syntax-error.d.ts create mode 100644 node_modules/postcss/lib/css-syntax-error.js create mode 100644 node_modules/postcss/lib/declaration.d.ts create mode 100644 node_modules/postcss/lib/declaration.js create mode 100644 node_modules/postcss/lib/document.d.ts create mode 100644 node_modules/postcss/lib/document.js create mode 100644 node_modules/postcss/lib/fromJSON.d.ts create mode 100644 node_modules/postcss/lib/fromJSON.js create mode 100644 node_modules/postcss/lib/input.d.ts create mode 100644 node_modules/postcss/lib/input.js create mode 100644 node_modules/postcss/lib/lazy-result.d.ts create mode 100644 node_modules/postcss/lib/lazy-result.js create mode 100644 node_modules/postcss/lib/list.d.ts create mode 100644 node_modules/postcss/lib/list.js create mode 100644 node_modules/postcss/lib/map-generator.js create mode 100644 node_modules/postcss/lib/no-work-result.d.ts create mode 100644 node_modules/postcss/lib/no-work-result.js create mode 100644 node_modules/postcss/lib/node.d.ts create mode 100644 node_modules/postcss/lib/node.js create mode 100644 node_modules/postcss/lib/parse.d.ts create mode 100644 node_modules/postcss/lib/parse.js create mode 100644 node_modules/postcss/lib/parser.js create mode 100644 node_modules/postcss/lib/postcss.d.mts create mode 100644 node_modules/postcss/lib/postcss.d.ts create mode 100644 node_modules/postcss/lib/postcss.js create mode 100644 node_modules/postcss/lib/postcss.mjs create mode 100644 node_modules/postcss/lib/previous-map.d.ts create mode 100644 node_modules/postcss/lib/previous-map.js create mode 100644 node_modules/postcss/lib/processor.d.ts create mode 100644 node_modules/postcss/lib/processor.js create mode 100644 node_modules/postcss/lib/result.d.ts create mode 100644 node_modules/postcss/lib/result.js create mode 100644 node_modules/postcss/lib/root.d.ts create mode 100644 node_modules/postcss/lib/root.js create mode 100644 node_modules/postcss/lib/rule.d.ts create mode 100644 node_modules/postcss/lib/rule.js create mode 100644 node_modules/postcss/lib/stringifier.d.ts create mode 100644 node_modules/postcss/lib/stringifier.js create mode 100644 node_modules/postcss/lib/stringify.d.ts create mode 100644 node_modules/postcss/lib/stringify.js create mode 100644 node_modules/postcss/lib/symbols.js create mode 100644 node_modules/postcss/lib/terminal-highlight.js create mode 100644 node_modules/postcss/lib/tokenize.js create mode 100644 node_modules/postcss/lib/warn-once.js create mode 100644 node_modules/postcss/lib/warning.d.ts create mode 100644 node_modules/postcss/lib/warning.js create mode 100644 node_modules/postcss/package.json create mode 100755 node_modules/queue-microtask/LICENSE create mode 100644 node_modules/queue-microtask/README.md create mode 100644 node_modules/queue-microtask/index.d.ts create mode 100644 node_modules/queue-microtask/index.js create mode 100644 node_modules/queue-microtask/package.json create mode 100644 node_modules/read-cache/LICENSE create mode 100644 node_modules/read-cache/README.md create mode 100644 node_modules/read-cache/index.js create mode 100644 node_modules/read-cache/package.json create mode 100644 node_modules/readdirp/LICENSE create mode 100644 node_modules/readdirp/README.md create mode 100644 node_modules/readdirp/index.d.ts create mode 100644 node_modules/readdirp/index.js create mode 100644 node_modules/readdirp/package.json create mode 100644 node_modules/resolve/.editorconfig create mode 100644 node_modules/resolve/.eslintrc create mode 100644 node_modules/resolve/.github/FUNDING.yml create mode 100644 node_modules/resolve/.github/INCIDENT_RESPONSE_PROCESS.md create mode 100644 node_modules/resolve/.github/THREAT_MODEL.md create mode 100644 node_modules/resolve/LICENSE create mode 100644 node_modules/resolve/SECURITY.md create mode 100644 node_modules/resolve/async.js create mode 100755 node_modules/resolve/bin/resolve create mode 100644 node_modules/resolve/example/async.js create mode 100644 node_modules/resolve/example/sync.js create mode 100644 node_modules/resolve/index.js create mode 100644 node_modules/resolve/lib/async.js create mode 100644 node_modules/resolve/lib/caller.js create mode 100644 node_modules/resolve/lib/core.js create mode 100644 node_modules/resolve/lib/core.json create mode 100644 node_modules/resolve/lib/homedir.js create mode 100644 node_modules/resolve/lib/is-core.js create mode 100644 node_modules/resolve/lib/node-modules-paths.js create mode 100644 node_modules/resolve/lib/normalize-options.js create mode 100644 node_modules/resolve/lib/sync.js create mode 100644 node_modules/resolve/package.json create mode 100644 node_modules/resolve/readme.markdown create mode 100644 node_modules/resolve/sync.js create mode 100644 node_modules/resolve/test/core.js create mode 100644 node_modules/resolve/test/dotdot.js create mode 100644 node_modules/resolve/test/dotdot/abc/index.js create mode 100644 node_modules/resolve/test/dotdot/index.js create mode 100644 node_modules/resolve/test/faulty_basedir.js create mode 100644 node_modules/resolve/test/filter.js create mode 100644 node_modules/resolve/test/filter_sync.js create mode 100644 node_modules/resolve/test/home_paths.js create mode 100644 node_modules/resolve/test/home_paths_sync.js create mode 100644 node_modules/resolve/test/mock.js create mode 100644 node_modules/resolve/test/mock_sync.js create mode 100644 node_modules/resolve/test/module_dir.js create mode 100644 node_modules/resolve/test/module_dir/xmodules/aaa/index.js create mode 100644 node_modules/resolve/test/module_dir/ymodules/aaa/index.js create mode 100644 node_modules/resolve/test/module_dir/zmodules/bbb/main.js create mode 100644 node_modules/resolve/test/module_dir/zmodules/bbb/package.json create mode 100644 node_modules/resolve/test/node-modules-paths.js create mode 100644 node_modules/resolve/test/node_path.js create mode 100644 node_modules/resolve/test/node_path/x/aaa/index.js create mode 100644 node_modules/resolve/test/node_path/x/ccc/index.js create mode 100644 node_modules/resolve/test/node_path/y/bbb/index.js create mode 100644 node_modules/resolve/test/node_path/y/ccc/index.js create mode 100644 node_modules/resolve/test/nonstring.js create mode 100644 node_modules/resolve/test/pathfilter.js create mode 100644 node_modules/resolve/test/pathfilter/deep_ref/main.js create mode 100644 node_modules/resolve/test/precedence.js create mode 100644 node_modules/resolve/test/precedence/aaa.js create mode 100644 node_modules/resolve/test/precedence/aaa/index.js create mode 100644 node_modules/resolve/test/precedence/aaa/main.js create mode 100644 node_modules/resolve/test/precedence/bbb.js create mode 100644 node_modules/resolve/test/precedence/bbb/main.js create mode 100644 node_modules/resolve/test/resolver.js create mode 100644 node_modules/resolve/test/resolver/baz/doom.js create mode 100644 node_modules/resolve/test/resolver/baz/package.json create mode 100644 node_modules/resolve/test/resolver/baz/quux.js create mode 100644 node_modules/resolve/test/resolver/browser_field/a.js create mode 100644 node_modules/resolve/test/resolver/browser_field/b.js create mode 100644 node_modules/resolve/test/resolver/browser_field/package.json create mode 100644 node_modules/resolve/test/resolver/cup.coffee create mode 100644 node_modules/resolve/test/resolver/dot_main/index.js create mode 100644 node_modules/resolve/test/resolver/dot_main/package.json create mode 100644 node_modules/resolve/test/resolver/dot_slash_main/index.js create mode 100644 node_modules/resolve/test/resolver/dot_slash_main/package.json create mode 100644 node_modules/resolve/test/resolver/false_main/index.js create mode 100644 node_modules/resolve/test/resolver/false_main/package.json create mode 100644 node_modules/resolve/test/resolver/foo.js create mode 100644 node_modules/resolve/test/resolver/incorrect_main/index.js create mode 100644 node_modules/resolve/test/resolver/incorrect_main/package.json create mode 100644 node_modules/resolve/test/resolver/invalid_main/package.json create mode 100644 node_modules/resolve/test/resolver/mug.coffee create mode 100644 node_modules/resolve/test/resolver/mug.js create mode 100644 node_modules/resolve/test/resolver/multirepo/lerna.json create mode 100644 node_modules/resolve/test/resolver/multirepo/package.json create mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js create mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json create mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js create mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json create mode 100644 node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js create mode 100644 node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json create mode 100644 node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js create mode 100644 node_modules/resolve/test/resolver/other_path/lib/other-lib.js create mode 100644 node_modules/resolve/test/resolver/other_path/root.js create mode 100644 node_modules/resolve/test/resolver/quux/foo/index.js create mode 100644 node_modules/resolve/test/resolver/same_names/foo.js create mode 100644 node_modules/resolve/test/resolver/same_names/foo/index.js create mode 100644 node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js create mode 100644 node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep create mode 100644 node_modules/resolve/test/resolver/symlinked/package/bar.js create mode 100644 node_modules/resolve/test/resolver/symlinked/package/package.json create mode 100644 node_modules/resolve/test/resolver/without_basedir/main.js create mode 100644 node_modules/resolve/test/resolver_sync.js create mode 100644 node_modules/resolve/test/shadowed_core.js create mode 100644 node_modules/resolve/test/shadowed_core/node_modules/util/index.js create mode 100644 node_modules/resolve/test/subdirs.js create mode 100644 node_modules/resolve/test/symlinks.js create mode 100644 node_modules/reusify/.github/dependabot.yml create mode 100644 node_modules/reusify/.github/workflows/ci.yml create mode 100644 node_modules/reusify/LICENSE create mode 100644 node_modules/reusify/README.md create mode 100644 node_modules/reusify/SECURITY.md create mode 100644 node_modules/reusify/benchmarks/createNoCodeFunction.js create mode 100644 node_modules/reusify/benchmarks/fib.js create mode 100644 node_modules/reusify/benchmarks/reuseNoCodeFunction.js create mode 100644 node_modules/reusify/eslint.config.js create mode 100644 node_modules/reusify/package.json create mode 100644 node_modules/reusify/reusify.d.ts create mode 100644 node_modules/reusify/reusify.js create mode 100644 node_modules/reusify/test.js create mode 100644 node_modules/reusify/tsconfig.json create mode 100644 node_modules/run-parallel/LICENSE create mode 100644 node_modules/run-parallel/README.md create mode 100644 node_modules/run-parallel/index.js create mode 100644 node_modules/run-parallel/package.json create mode 100644 node_modules/source-map-js/LICENSE create mode 100644 node_modules/source-map-js/README.md create mode 100644 node_modules/source-map-js/lib/array-set.js create mode 100644 node_modules/source-map-js/lib/base64-vlq.js create mode 100644 node_modules/source-map-js/lib/base64.js create mode 100644 node_modules/source-map-js/lib/binary-search.js create mode 100644 node_modules/source-map-js/lib/mapping-list.js create mode 100644 node_modules/source-map-js/lib/quick-sort.js create mode 100644 node_modules/source-map-js/lib/source-map-consumer.d.ts create mode 100644 node_modules/source-map-js/lib/source-map-consumer.js create mode 100644 node_modules/source-map-js/lib/source-map-generator.d.ts create mode 100644 node_modules/source-map-js/lib/source-map-generator.js create mode 100644 node_modules/source-map-js/lib/source-node.d.ts create mode 100644 node_modules/source-map-js/lib/source-node.js create mode 100644 node_modules/source-map-js/lib/util.js create mode 100644 node_modules/source-map-js/package.json create mode 100644 node_modules/source-map-js/source-map.d.ts create mode 100644 node_modules/source-map-js/source-map.js create mode 100644 node_modules/sucrase/LICENSE create mode 100644 node_modules/sucrase/README.md create mode 100755 node_modules/sucrase/bin/sucrase create mode 100755 node_modules/sucrase/bin/sucrase-node create mode 100644 node_modules/sucrase/dist/CJSImportProcessor.js create mode 100644 node_modules/sucrase/dist/HelperManager.js create mode 100644 node_modules/sucrase/dist/NameManager.js create mode 100644 node_modules/sucrase/dist/Options-gen-types.js create mode 100644 node_modules/sucrase/dist/Options.js create mode 100644 node_modules/sucrase/dist/TokenProcessor.js create mode 100644 node_modules/sucrase/dist/cli.js create mode 100644 node_modules/sucrase/dist/computeSourceMap.js create mode 100644 node_modules/sucrase/dist/esm/CJSImportProcessor.js create mode 100644 node_modules/sucrase/dist/esm/HelperManager.js create mode 100644 node_modules/sucrase/dist/esm/NameManager.js create mode 100644 node_modules/sucrase/dist/esm/Options-gen-types.js create mode 100644 node_modules/sucrase/dist/esm/Options.js create mode 100644 node_modules/sucrase/dist/esm/TokenProcessor.js create mode 100644 node_modules/sucrase/dist/esm/cli.js create mode 100644 node_modules/sucrase/dist/esm/computeSourceMap.js create mode 100644 node_modules/sucrase/dist/esm/identifyShadowedGlobals.js create mode 100644 node_modules/sucrase/dist/esm/index.js create mode 100644 node_modules/sucrase/dist/esm/parser/index.js create mode 100644 node_modules/sucrase/dist/esm/parser/plugins/flow.js create mode 100644 node_modules/sucrase/dist/esm/parser/plugins/jsx/index.js create mode 100644 node_modules/sucrase/dist/esm/parser/plugins/jsx/xhtml.js create mode 100644 node_modules/sucrase/dist/esm/parser/plugins/types.js create mode 100644 node_modules/sucrase/dist/esm/parser/plugins/typescript.js create mode 100644 node_modules/sucrase/dist/esm/parser/tokenizer/index.js create mode 100644 node_modules/sucrase/dist/esm/parser/tokenizer/keywords.js create mode 100644 node_modules/sucrase/dist/esm/parser/tokenizer/readWord.js create mode 100644 node_modules/sucrase/dist/esm/parser/tokenizer/readWordTree.js create mode 100644 node_modules/sucrase/dist/esm/parser/tokenizer/state.js create mode 100644 node_modules/sucrase/dist/esm/parser/tokenizer/types.js create mode 100644 node_modules/sucrase/dist/esm/parser/traverser/base.js create mode 100644 node_modules/sucrase/dist/esm/parser/traverser/expression.js create mode 100644 node_modules/sucrase/dist/esm/parser/traverser/index.js create mode 100644 node_modules/sucrase/dist/esm/parser/traverser/lval.js create mode 100644 node_modules/sucrase/dist/esm/parser/traverser/statement.js create mode 100644 node_modules/sucrase/dist/esm/parser/traverser/util.js create mode 100644 node_modules/sucrase/dist/esm/parser/util/charcodes.js create mode 100644 node_modules/sucrase/dist/esm/parser/util/identifier.js create mode 100644 node_modules/sucrase/dist/esm/parser/util/whitespace.js create mode 100644 node_modules/sucrase/dist/esm/register.js create mode 100644 node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js create mode 100644 node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js create mode 100644 node_modules/sucrase/dist/esm/transformers/FlowTransformer.js create mode 100644 node_modules/sucrase/dist/esm/transformers/JSXTransformer.js create mode 100644 node_modules/sucrase/dist/esm/transformers/JestHoistTransformer.js create mode 100644 node_modules/sucrase/dist/esm/transformers/NumericSeparatorTransformer.js create mode 100644 node_modules/sucrase/dist/esm/transformers/OptionalCatchBindingTransformer.js create mode 100644 node_modules/sucrase/dist/esm/transformers/OptionalChainingNullishTransformer.js create mode 100644 node_modules/sucrase/dist/esm/transformers/ReactDisplayNameTransformer.js create mode 100644 node_modules/sucrase/dist/esm/transformers/ReactHotLoaderTransformer.js create mode 100644 node_modules/sucrase/dist/esm/transformers/RootTransformer.js create mode 100644 node_modules/sucrase/dist/esm/transformers/Transformer.js create mode 100644 node_modules/sucrase/dist/esm/transformers/TypeScriptTransformer.js create mode 100644 node_modules/sucrase/dist/esm/util/elideImportEquals.js create mode 100644 node_modules/sucrase/dist/esm/util/formatTokens.js create mode 100644 node_modules/sucrase/dist/esm/util/getClassInfo.js create mode 100644 node_modules/sucrase/dist/esm/util/getDeclarationInfo.js create mode 100644 node_modules/sucrase/dist/esm/util/getIdentifierNames.js create mode 100644 node_modules/sucrase/dist/esm/util/getImportExportSpecifierInfo.js create mode 100644 node_modules/sucrase/dist/esm/util/getJSXPragmaInfo.js create mode 100644 node_modules/sucrase/dist/esm/util/getNonTypeIdentifiers.js create mode 100644 node_modules/sucrase/dist/esm/util/getTSImportedNames.js create mode 100644 node_modules/sucrase/dist/esm/util/isAsyncOperation.js create mode 100644 node_modules/sucrase/dist/esm/util/isExportFrom.js create mode 100644 node_modules/sucrase/dist/esm/util/isIdentifier.js create mode 100644 node_modules/sucrase/dist/esm/util/removeMaybeImportAttributes.js create mode 100644 node_modules/sucrase/dist/esm/util/shouldElideDefaultExport.js create mode 100644 node_modules/sucrase/dist/identifyShadowedGlobals.js create mode 100644 node_modules/sucrase/dist/index.js create mode 100644 node_modules/sucrase/dist/parser/index.js create mode 100644 node_modules/sucrase/dist/parser/plugins/flow.js create mode 100644 node_modules/sucrase/dist/parser/plugins/jsx/index.js create mode 100644 node_modules/sucrase/dist/parser/plugins/jsx/xhtml.js create mode 100644 node_modules/sucrase/dist/parser/plugins/types.js create mode 100644 node_modules/sucrase/dist/parser/plugins/typescript.js create mode 100644 node_modules/sucrase/dist/parser/tokenizer/index.js create mode 100644 node_modules/sucrase/dist/parser/tokenizer/keywords.js create mode 100644 node_modules/sucrase/dist/parser/tokenizer/readWord.js create mode 100644 node_modules/sucrase/dist/parser/tokenizer/readWordTree.js create mode 100644 node_modules/sucrase/dist/parser/tokenizer/state.js create mode 100644 node_modules/sucrase/dist/parser/tokenizer/types.js create mode 100644 node_modules/sucrase/dist/parser/traverser/base.js create mode 100644 node_modules/sucrase/dist/parser/traverser/expression.js create mode 100644 node_modules/sucrase/dist/parser/traverser/index.js create mode 100644 node_modules/sucrase/dist/parser/traverser/lval.js create mode 100644 node_modules/sucrase/dist/parser/traverser/statement.js create mode 100644 node_modules/sucrase/dist/parser/traverser/util.js create mode 100644 node_modules/sucrase/dist/parser/util/charcodes.js create mode 100644 node_modules/sucrase/dist/parser/util/identifier.js create mode 100644 node_modules/sucrase/dist/parser/util/whitespace.js create mode 100644 node_modules/sucrase/dist/register.js create mode 100644 node_modules/sucrase/dist/transformers/CJSImportTransformer.js create mode 100644 node_modules/sucrase/dist/transformers/ESMImportTransformer.js create mode 100644 node_modules/sucrase/dist/transformers/FlowTransformer.js create mode 100644 node_modules/sucrase/dist/transformers/JSXTransformer.js create mode 100644 node_modules/sucrase/dist/transformers/JestHoistTransformer.js create mode 100644 node_modules/sucrase/dist/transformers/NumericSeparatorTransformer.js create mode 100644 node_modules/sucrase/dist/transformers/OptionalCatchBindingTransformer.js create mode 100644 node_modules/sucrase/dist/transformers/OptionalChainingNullishTransformer.js create mode 100644 node_modules/sucrase/dist/transformers/ReactDisplayNameTransformer.js create mode 100644 node_modules/sucrase/dist/transformers/ReactHotLoaderTransformer.js create mode 100644 node_modules/sucrase/dist/transformers/RootTransformer.js create mode 100644 node_modules/sucrase/dist/transformers/Transformer.js create mode 100644 node_modules/sucrase/dist/transformers/TypeScriptTransformer.js create mode 100644 node_modules/sucrase/dist/types/CJSImportProcessor.d.ts create mode 100644 node_modules/sucrase/dist/types/HelperManager.d.ts create mode 100644 node_modules/sucrase/dist/types/NameManager.d.ts create mode 100644 node_modules/sucrase/dist/types/Options-gen-types.d.ts create mode 100644 node_modules/sucrase/dist/types/Options.d.ts create mode 100644 node_modules/sucrase/dist/types/TokenProcessor.d.ts create mode 100644 node_modules/sucrase/dist/types/cli.d.ts create mode 100644 node_modules/sucrase/dist/types/computeSourceMap.d.ts create mode 100644 node_modules/sucrase/dist/types/identifyShadowedGlobals.d.ts create mode 100644 node_modules/sucrase/dist/types/index.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/index.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/plugins/flow.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/plugins/jsx/index.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/plugins/jsx/xhtml.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/plugins/types.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/plugins/typescript.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/tokenizer/index.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/tokenizer/keywords.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/tokenizer/readWord.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/tokenizer/readWordTree.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/tokenizer/state.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/tokenizer/types.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/traverser/base.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/traverser/expression.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/traverser/index.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/traverser/lval.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/traverser/statement.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/traverser/util.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/util/charcodes.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/util/identifier.d.ts create mode 100644 node_modules/sucrase/dist/types/parser/util/whitespace.d.ts create mode 100644 node_modules/sucrase/dist/types/register.d.ts create mode 100644 node_modules/sucrase/dist/types/transformers/CJSImportTransformer.d.ts create mode 100644 node_modules/sucrase/dist/types/transformers/ESMImportTransformer.d.ts create mode 100644 node_modules/sucrase/dist/types/transformers/FlowTransformer.d.ts create mode 100644 node_modules/sucrase/dist/types/transformers/JSXTransformer.d.ts create mode 100644 node_modules/sucrase/dist/types/transformers/JestHoistTransformer.d.ts create mode 100644 node_modules/sucrase/dist/types/transformers/NumericSeparatorTransformer.d.ts create mode 100644 node_modules/sucrase/dist/types/transformers/OptionalCatchBindingTransformer.d.ts create mode 100644 node_modules/sucrase/dist/types/transformers/OptionalChainingNullishTransformer.d.ts create mode 100644 node_modules/sucrase/dist/types/transformers/ReactDisplayNameTransformer.d.ts create mode 100644 node_modules/sucrase/dist/types/transformers/ReactHotLoaderTransformer.d.ts create mode 100644 node_modules/sucrase/dist/types/transformers/RootTransformer.d.ts create mode 100644 node_modules/sucrase/dist/types/transformers/Transformer.d.ts create mode 100644 node_modules/sucrase/dist/types/transformers/TypeScriptTransformer.d.ts create mode 100644 node_modules/sucrase/dist/types/util/elideImportEquals.d.ts create mode 100644 node_modules/sucrase/dist/types/util/formatTokens.d.ts create mode 100644 node_modules/sucrase/dist/types/util/getClassInfo.d.ts create mode 100644 node_modules/sucrase/dist/types/util/getDeclarationInfo.d.ts create mode 100644 node_modules/sucrase/dist/types/util/getIdentifierNames.d.ts create mode 100644 node_modules/sucrase/dist/types/util/getImportExportSpecifierInfo.d.ts create mode 100644 node_modules/sucrase/dist/types/util/getJSXPragmaInfo.d.ts create mode 100644 node_modules/sucrase/dist/types/util/getNonTypeIdentifiers.d.ts create mode 100644 node_modules/sucrase/dist/types/util/getTSImportedNames.d.ts create mode 100644 node_modules/sucrase/dist/types/util/isAsyncOperation.d.ts create mode 100644 node_modules/sucrase/dist/types/util/isExportFrom.d.ts create mode 100644 node_modules/sucrase/dist/types/util/isIdentifier.d.ts create mode 100644 node_modules/sucrase/dist/types/util/removeMaybeImportAttributes.d.ts create mode 100644 node_modules/sucrase/dist/types/util/shouldElideDefaultExport.d.ts create mode 100644 node_modules/sucrase/dist/util/elideImportEquals.js create mode 100644 node_modules/sucrase/dist/util/formatTokens.js create mode 100644 node_modules/sucrase/dist/util/getClassInfo.js create mode 100644 node_modules/sucrase/dist/util/getDeclarationInfo.js create mode 100644 node_modules/sucrase/dist/util/getIdentifierNames.js create mode 100644 node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js create mode 100644 node_modules/sucrase/dist/util/getJSXPragmaInfo.js create mode 100644 node_modules/sucrase/dist/util/getNonTypeIdentifiers.js create mode 100644 node_modules/sucrase/dist/util/getTSImportedNames.js create mode 100644 node_modules/sucrase/dist/util/isAsyncOperation.js create mode 100644 node_modules/sucrase/dist/util/isExportFrom.js create mode 100644 node_modules/sucrase/dist/util/isIdentifier.js create mode 100644 node_modules/sucrase/dist/util/removeMaybeImportAttributes.js create mode 100644 node_modules/sucrase/dist/util/shouldElideDefaultExport.js create mode 100644 node_modules/sucrase/package.json create mode 100644 node_modules/sucrase/register/index.js create mode 100644 node_modules/sucrase/register/js.js create mode 100644 node_modules/sucrase/register/jsx.js create mode 100644 node_modules/sucrase/register/ts-legacy-module-interop.js create mode 100644 node_modules/sucrase/register/ts.js create mode 100644 node_modules/sucrase/register/tsx-legacy-module-interop.js create mode 100644 node_modules/sucrase/register/tsx.js create mode 100644 node_modules/sucrase/ts-node-plugin/index.js create mode 100644 node_modules/supports-preserve-symlinks-flag/.eslintrc create mode 100644 node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml create mode 100644 node_modules/supports-preserve-symlinks-flag/.nycrc create mode 100644 node_modules/supports-preserve-symlinks-flag/CHANGELOG.md create mode 100644 node_modules/supports-preserve-symlinks-flag/LICENSE create mode 100644 node_modules/supports-preserve-symlinks-flag/README.md create mode 100644 node_modules/supports-preserve-symlinks-flag/browser.js create mode 100644 node_modules/supports-preserve-symlinks-flag/index.js create mode 100644 node_modules/supports-preserve-symlinks-flag/package.json create mode 100644 node_modules/supports-preserve-symlinks-flag/test/index.js create mode 100644 node_modules/tailwindcss/LICENSE create mode 100644 node_modules/tailwindcss/README.md create mode 100644 node_modules/tailwindcss/base.css create mode 100644 node_modules/tailwindcss/colors.d.ts create mode 100644 node_modules/tailwindcss/colors.js create mode 100644 node_modules/tailwindcss/components.css create mode 100644 node_modules/tailwindcss/defaultConfig.d.ts create mode 100644 node_modules/tailwindcss/defaultConfig.js create mode 100644 node_modules/tailwindcss/defaultTheme.d.ts create mode 100644 node_modules/tailwindcss/defaultTheme.js create mode 100644 node_modules/tailwindcss/lib/cli-peer-dependencies.js create mode 100755 node_modules/tailwindcss/lib/cli.js create mode 100644 node_modules/tailwindcss/lib/cli/build/deps.js create mode 100644 node_modules/tailwindcss/lib/cli/build/index.js create mode 100644 node_modules/tailwindcss/lib/cli/build/plugin.js create mode 100644 node_modules/tailwindcss/lib/cli/build/utils.js create mode 100644 node_modules/tailwindcss/lib/cli/build/watching.js create mode 100644 node_modules/tailwindcss/lib/cli/help/index.js create mode 100644 node_modules/tailwindcss/lib/cli/index.js create mode 100644 node_modules/tailwindcss/lib/cli/init/index.js create mode 100644 node_modules/tailwindcss/lib/corePluginList.js create mode 100644 node_modules/tailwindcss/lib/corePlugins.js create mode 100644 node_modules/tailwindcss/lib/css/LICENSE create mode 100644 node_modules/tailwindcss/lib/css/preflight.css create mode 100644 node_modules/tailwindcss/lib/featureFlags.js create mode 100644 node_modules/tailwindcss/lib/index.js create mode 100644 node_modules/tailwindcss/lib/lib/cacheInvalidation.js create mode 100644 node_modules/tailwindcss/lib/lib/collapseAdjacentRules.js create mode 100644 node_modules/tailwindcss/lib/lib/collapseDuplicateDeclarations.js create mode 100644 node_modules/tailwindcss/lib/lib/content.js create mode 100644 node_modules/tailwindcss/lib/lib/defaultExtractor.js create mode 100644 node_modules/tailwindcss/lib/lib/evaluateTailwindFunctions.js create mode 100644 node_modules/tailwindcss/lib/lib/expandApplyAtRules.js create mode 100644 node_modules/tailwindcss/lib/lib/expandTailwindAtRules.js create mode 100644 node_modules/tailwindcss/lib/lib/findAtConfigPath.js create mode 100644 node_modules/tailwindcss/lib/lib/generateRules.js create mode 100644 node_modules/tailwindcss/lib/lib/getModuleDependencies.js create mode 100644 node_modules/tailwindcss/lib/lib/load-config.js create mode 100644 node_modules/tailwindcss/lib/lib/normalizeTailwindDirectives.js create mode 100644 node_modules/tailwindcss/lib/lib/offsets.js create mode 100644 node_modules/tailwindcss/lib/lib/partitionApplyAtRules.js create mode 100644 node_modules/tailwindcss/lib/lib/regex.js create mode 100644 node_modules/tailwindcss/lib/lib/remap-bitfield.js create mode 100644 node_modules/tailwindcss/lib/lib/resolveDefaultsAtRules.js create mode 100644 node_modules/tailwindcss/lib/lib/setupContextUtils.js create mode 100644 node_modules/tailwindcss/lib/lib/setupTrackingContext.js create mode 100644 node_modules/tailwindcss/lib/lib/sharedState.js create mode 100644 node_modules/tailwindcss/lib/lib/substituteScreenAtRules.js create mode 100644 node_modules/tailwindcss/lib/plugin.js create mode 100644 node_modules/tailwindcss/lib/postcss-plugins/nesting/README.md create mode 100644 node_modules/tailwindcss/lib/postcss-plugins/nesting/index.js create mode 100644 node_modules/tailwindcss/lib/postcss-plugins/nesting/plugin.js create mode 100644 node_modules/tailwindcss/lib/processTailwindFeatures.js create mode 100644 node_modules/tailwindcss/lib/public/colors.js create mode 100644 node_modules/tailwindcss/lib/public/create-plugin.js create mode 100644 node_modules/tailwindcss/lib/public/default-config.js create mode 100644 node_modules/tailwindcss/lib/public/default-theme.js create mode 100644 node_modules/tailwindcss/lib/public/load-config.js create mode 100644 node_modules/tailwindcss/lib/public/resolve-config.js create mode 100644 node_modules/tailwindcss/lib/util/applyImportantSelector.js create mode 100644 node_modules/tailwindcss/lib/util/bigSign.js create mode 100644 node_modules/tailwindcss/lib/util/buildMediaQuery.js create mode 100644 node_modules/tailwindcss/lib/util/cloneDeep.js create mode 100644 node_modules/tailwindcss/lib/util/cloneNodes.js create mode 100644 node_modules/tailwindcss/lib/util/color.js create mode 100644 node_modules/tailwindcss/lib/util/colorNames.js create mode 100644 node_modules/tailwindcss/lib/util/configurePlugins.js create mode 100644 node_modules/tailwindcss/lib/util/createPlugin.js create mode 100644 node_modules/tailwindcss/lib/util/createUtilityPlugin.js create mode 100644 node_modules/tailwindcss/lib/util/dataTypes.js create mode 100644 node_modules/tailwindcss/lib/util/defaults.js create mode 100644 node_modules/tailwindcss/lib/util/escapeClassName.js create mode 100644 node_modules/tailwindcss/lib/util/escapeCommas.js create mode 100644 node_modules/tailwindcss/lib/util/flattenColorPalette.js create mode 100644 node_modules/tailwindcss/lib/util/formatVariantSelector.js create mode 100644 node_modules/tailwindcss/lib/util/getAllConfigs.js create mode 100644 node_modules/tailwindcss/lib/util/hashConfig.js create mode 100644 node_modules/tailwindcss/lib/util/isKeyframeRule.js create mode 100644 node_modules/tailwindcss/lib/util/isPlainObject.js create mode 100644 node_modules/tailwindcss/lib/util/isSyntacticallyValidPropertyValue.js create mode 100644 node_modules/tailwindcss/lib/util/log.js create mode 100644 node_modules/tailwindcss/lib/util/math-operators.js create mode 100644 node_modules/tailwindcss/lib/util/nameClass.js create mode 100644 node_modules/tailwindcss/lib/util/negateValue.js create mode 100644 node_modules/tailwindcss/lib/util/normalizeConfig.js create mode 100644 node_modules/tailwindcss/lib/util/normalizeScreens.js create mode 100644 node_modules/tailwindcss/lib/util/parseAnimationValue.js create mode 100644 node_modules/tailwindcss/lib/util/parseBoxShadowValue.js create mode 100644 node_modules/tailwindcss/lib/util/parseDependency.js create mode 100644 node_modules/tailwindcss/lib/util/parseGlob.js create mode 100644 node_modules/tailwindcss/lib/util/parseObjectStyles.js create mode 100644 node_modules/tailwindcss/lib/util/pluginUtils.js create mode 100644 node_modules/tailwindcss/lib/util/prefixSelector.js create mode 100644 node_modules/tailwindcss/lib/util/pseudoElements.js create mode 100644 node_modules/tailwindcss/lib/util/removeAlphaVariables.js create mode 100644 node_modules/tailwindcss/lib/util/resolveConfig.js create mode 100644 node_modules/tailwindcss/lib/util/resolveConfigPath.js create mode 100644 node_modules/tailwindcss/lib/util/responsive.js create mode 100644 node_modules/tailwindcss/lib/util/splitAtTopLevelOnly.js create mode 100644 node_modules/tailwindcss/lib/util/tap.js create mode 100644 node_modules/tailwindcss/lib/util/toColorValue.js create mode 100644 node_modules/tailwindcss/lib/util/toPath.js create mode 100644 node_modules/tailwindcss/lib/util/transformThemeValue.js create mode 100644 node_modules/tailwindcss/lib/util/validateConfig.js create mode 100644 node_modules/tailwindcss/lib/util/validateFormalSyntax.js create mode 100644 node_modules/tailwindcss/lib/util/withAlphaVariable.js create mode 100644 node_modules/tailwindcss/lib/value-parser/LICENSE create mode 100644 node_modules/tailwindcss/lib/value-parser/README.md create mode 100644 node_modules/tailwindcss/lib/value-parser/index.d.js create mode 100644 node_modules/tailwindcss/lib/value-parser/index.js create mode 100644 node_modules/tailwindcss/lib/value-parser/parse.js create mode 100644 node_modules/tailwindcss/lib/value-parser/stringify.js create mode 100644 node_modules/tailwindcss/lib/value-parser/unit.js create mode 100644 node_modules/tailwindcss/lib/value-parser/walk.js create mode 100644 node_modules/tailwindcss/loadConfig.d.ts create mode 100644 node_modules/tailwindcss/loadConfig.js create mode 100644 node_modules/tailwindcss/nesting/index.d.ts create mode 100644 node_modules/tailwindcss/nesting/index.js create mode 100644 node_modules/tailwindcss/package.json create mode 100644 node_modules/tailwindcss/peers/index.js create mode 100644 node_modules/tailwindcss/plugin.d.ts create mode 100644 node_modules/tailwindcss/plugin.js create mode 100644 node_modules/tailwindcss/prettier.config.js create mode 100644 node_modules/tailwindcss/resolveConfig.d.ts create mode 100644 node_modules/tailwindcss/resolveConfig.js create mode 100644 node_modules/tailwindcss/screens.css create mode 100644 node_modules/tailwindcss/scripts/create-plugin-list.js create mode 100644 node_modules/tailwindcss/scripts/generate-types.js create mode 100644 node_modules/tailwindcss/scripts/release-channel.js create mode 100644 node_modules/tailwindcss/scripts/release-notes.js create mode 100644 node_modules/tailwindcss/scripts/type-utils.js create mode 100644 node_modules/tailwindcss/src/cli-peer-dependencies.js create mode 100644 node_modules/tailwindcss/src/cli.js create mode 100644 node_modules/tailwindcss/src/cli/build/deps.js create mode 100644 node_modules/tailwindcss/src/cli/build/index.js create mode 100644 node_modules/tailwindcss/src/cli/build/plugin.js create mode 100644 node_modules/tailwindcss/src/cli/build/utils.js create mode 100644 node_modules/tailwindcss/src/cli/build/watching.js create mode 100644 node_modules/tailwindcss/src/cli/help/index.js create mode 100644 node_modules/tailwindcss/src/cli/index.js create mode 100644 node_modules/tailwindcss/src/cli/init/index.js create mode 100644 node_modules/tailwindcss/src/corePluginList.js create mode 100644 node_modules/tailwindcss/src/corePlugins.js create mode 100644 node_modules/tailwindcss/src/css/LICENSE create mode 100644 node_modules/tailwindcss/src/css/preflight.css create mode 100644 node_modules/tailwindcss/src/featureFlags.js create mode 100644 node_modules/tailwindcss/src/index.js create mode 100644 node_modules/tailwindcss/src/lib/cacheInvalidation.js create mode 100644 node_modules/tailwindcss/src/lib/collapseAdjacentRules.js create mode 100644 node_modules/tailwindcss/src/lib/collapseDuplicateDeclarations.js create mode 100644 node_modules/tailwindcss/src/lib/content.js create mode 100644 node_modules/tailwindcss/src/lib/defaultExtractor.js create mode 100644 node_modules/tailwindcss/src/lib/evaluateTailwindFunctions.js create mode 100644 node_modules/tailwindcss/src/lib/expandApplyAtRules.js create mode 100644 node_modules/tailwindcss/src/lib/expandTailwindAtRules.js create mode 100644 node_modules/tailwindcss/src/lib/findAtConfigPath.js create mode 100644 node_modules/tailwindcss/src/lib/generateRules.js create mode 100644 node_modules/tailwindcss/src/lib/getModuleDependencies.js create mode 100644 node_modules/tailwindcss/src/lib/load-config.ts create mode 100644 node_modules/tailwindcss/src/lib/normalizeTailwindDirectives.js create mode 100644 node_modules/tailwindcss/src/lib/offsets.js create mode 100644 node_modules/tailwindcss/src/lib/partitionApplyAtRules.js create mode 100644 node_modules/tailwindcss/src/lib/regex.js create mode 100644 node_modules/tailwindcss/src/lib/remap-bitfield.js create mode 100644 node_modules/tailwindcss/src/lib/resolveDefaultsAtRules.js create mode 100644 node_modules/tailwindcss/src/lib/setupContextUtils.js create mode 100644 node_modules/tailwindcss/src/lib/setupTrackingContext.js create mode 100644 node_modules/tailwindcss/src/lib/sharedState.js create mode 100644 node_modules/tailwindcss/src/lib/substituteScreenAtRules.js create mode 100644 node_modules/tailwindcss/src/plugin.js create mode 100644 node_modules/tailwindcss/src/postcss-plugins/nesting/README.md create mode 100644 node_modules/tailwindcss/src/postcss-plugins/nesting/index.js create mode 100644 node_modules/tailwindcss/src/postcss-plugins/nesting/plugin.js create mode 100644 node_modules/tailwindcss/src/processTailwindFeatures.js create mode 100644 node_modules/tailwindcss/src/public/colors.js create mode 100644 node_modules/tailwindcss/src/public/create-plugin.js create mode 100644 node_modules/tailwindcss/src/public/default-config.js create mode 100644 node_modules/tailwindcss/src/public/default-theme.js create mode 100644 node_modules/tailwindcss/src/public/load-config.js create mode 100644 node_modules/tailwindcss/src/public/resolve-config.js create mode 100644 node_modules/tailwindcss/src/util/applyImportantSelector.js create mode 100644 node_modules/tailwindcss/src/util/bigSign.js create mode 100644 node_modules/tailwindcss/src/util/buildMediaQuery.js create mode 100644 node_modules/tailwindcss/src/util/cloneDeep.js create mode 100644 node_modules/tailwindcss/src/util/cloneNodes.js create mode 100644 node_modules/tailwindcss/src/util/color.js create mode 100644 node_modules/tailwindcss/src/util/colorNames.js create mode 100644 node_modules/tailwindcss/src/util/configurePlugins.js create mode 100644 node_modules/tailwindcss/src/util/createPlugin.js create mode 100644 node_modules/tailwindcss/src/util/createUtilityPlugin.js create mode 100644 node_modules/tailwindcss/src/util/dataTypes.js create mode 100644 node_modules/tailwindcss/src/util/defaults.js create mode 100644 node_modules/tailwindcss/src/util/escapeClassName.js create mode 100644 node_modules/tailwindcss/src/util/escapeCommas.js create mode 100644 node_modules/tailwindcss/src/util/flattenColorPalette.js create mode 100644 node_modules/tailwindcss/src/util/formatVariantSelector.js create mode 100644 node_modules/tailwindcss/src/util/getAllConfigs.js create mode 100644 node_modules/tailwindcss/src/util/hashConfig.js create mode 100644 node_modules/tailwindcss/src/util/isKeyframeRule.js create mode 100644 node_modules/tailwindcss/src/util/isPlainObject.js create mode 100644 node_modules/tailwindcss/src/util/isSyntacticallyValidPropertyValue.js create mode 100644 node_modules/tailwindcss/src/util/log.js create mode 100644 node_modules/tailwindcss/src/util/math-operators.ts create mode 100644 node_modules/tailwindcss/src/util/nameClass.js create mode 100644 node_modules/tailwindcss/src/util/negateValue.js create mode 100644 node_modules/tailwindcss/src/util/normalizeConfig.js create mode 100644 node_modules/tailwindcss/src/util/normalizeScreens.js create mode 100644 node_modules/tailwindcss/src/util/parseAnimationValue.js create mode 100644 node_modules/tailwindcss/src/util/parseBoxShadowValue.js create mode 100644 node_modules/tailwindcss/src/util/parseDependency.js create mode 100644 node_modules/tailwindcss/src/util/parseGlob.js create mode 100644 node_modules/tailwindcss/src/util/parseObjectStyles.js create mode 100644 node_modules/tailwindcss/src/util/pluginUtils.js create mode 100644 node_modules/tailwindcss/src/util/prefixSelector.js create mode 100644 node_modules/tailwindcss/src/util/pseudoElements.js create mode 100644 node_modules/tailwindcss/src/util/removeAlphaVariables.js create mode 100644 node_modules/tailwindcss/src/util/resolveConfig.js create mode 100644 node_modules/tailwindcss/src/util/resolveConfigPath.js create mode 100644 node_modules/tailwindcss/src/util/responsive.js create mode 100644 node_modules/tailwindcss/src/util/splitAtTopLevelOnly.js create mode 100644 node_modules/tailwindcss/src/util/tap.js create mode 100644 node_modules/tailwindcss/src/util/toColorValue.js create mode 100644 node_modules/tailwindcss/src/util/toPath.js create mode 100644 node_modules/tailwindcss/src/util/transformThemeValue.js create mode 100644 node_modules/tailwindcss/src/util/validateConfig.js create mode 100644 node_modules/tailwindcss/src/util/validateFormalSyntax.js create mode 100644 node_modules/tailwindcss/src/util/withAlphaVariable.js create mode 100644 node_modules/tailwindcss/src/value-parser/LICENSE create mode 100644 node_modules/tailwindcss/src/value-parser/README.md create mode 100644 node_modules/tailwindcss/src/value-parser/index.d.ts create mode 100644 node_modules/tailwindcss/src/value-parser/index.js create mode 100644 node_modules/tailwindcss/src/value-parser/parse.js create mode 100644 node_modules/tailwindcss/src/value-parser/stringify.js create mode 100644 node_modules/tailwindcss/src/value-parser/unit.js create mode 100644 node_modules/tailwindcss/src/value-parser/walk.js create mode 100644 node_modules/tailwindcss/stubs/.npmignore create mode 100644 node_modules/tailwindcss/stubs/.prettierrc.json create mode 100644 node_modules/tailwindcss/stubs/config.full.js create mode 100644 node_modules/tailwindcss/stubs/config.simple.js create mode 100644 node_modules/tailwindcss/stubs/postcss.config.cjs create mode 100644 node_modules/tailwindcss/stubs/postcss.config.js create mode 100644 node_modules/tailwindcss/stubs/tailwind.config.cjs create mode 100644 node_modules/tailwindcss/stubs/tailwind.config.js create mode 100644 node_modules/tailwindcss/stubs/tailwind.config.ts create mode 100644 node_modules/tailwindcss/tailwind.css create mode 100644 node_modules/tailwindcss/types/config.d.ts create mode 100644 node_modules/tailwindcss/types/generated/.gitkeep create mode 100644 node_modules/tailwindcss/types/generated/colors.d.ts create mode 100644 node_modules/tailwindcss/types/generated/corePluginList.d.ts create mode 100644 node_modules/tailwindcss/types/generated/default-theme.d.ts create mode 100644 node_modules/tailwindcss/types/index.d.ts create mode 100644 node_modules/tailwindcss/utilities.css create mode 100644 node_modules/tailwindcss/variants.css create mode 100644 node_modules/thenify-all/History.md create mode 100644 node_modules/thenify-all/LICENSE create mode 100644 node_modules/thenify-all/README.md create mode 100644 node_modules/thenify-all/index.js create mode 100644 node_modules/thenify-all/package.json create mode 100644 node_modules/thenify/History.md create mode 100644 node_modules/thenify/LICENSE create mode 100644 node_modules/thenify/README.md create mode 100644 node_modules/thenify/index.js create mode 100644 node_modules/thenify/package.json create mode 100644 node_modules/tinyglobby/LICENSE create mode 100644 node_modules/tinyglobby/README.md create mode 100644 node_modules/tinyglobby/dist/index.cjs create mode 100644 node_modules/tinyglobby/dist/index.d.cts create mode 100644 node_modules/tinyglobby/dist/index.d.mts create mode 100644 node_modules/tinyglobby/dist/index.mjs create mode 100644 node_modules/tinyglobby/node_modules/fdir/LICENSE create mode 100644 node_modules/tinyglobby/node_modules/fdir/README.md create mode 100644 node_modules/tinyglobby/node_modules/fdir/dist/index.cjs create mode 100644 node_modules/tinyglobby/node_modules/fdir/dist/index.d.cts create mode 100644 node_modules/tinyglobby/node_modules/fdir/dist/index.d.mts create mode 100644 node_modules/tinyglobby/node_modules/fdir/dist/index.mjs create mode 100644 node_modules/tinyglobby/node_modules/fdir/package.json create mode 100644 node_modules/tinyglobby/node_modules/picomatch/LICENSE create mode 100644 node_modules/tinyglobby/node_modules/picomatch/README.md create mode 100644 node_modules/tinyglobby/node_modules/picomatch/index.js create mode 100644 node_modules/tinyglobby/node_modules/picomatch/lib/constants.js create mode 100644 node_modules/tinyglobby/node_modules/picomatch/lib/parse.js create mode 100644 node_modules/tinyglobby/node_modules/picomatch/lib/picomatch.js create mode 100644 node_modules/tinyglobby/node_modules/picomatch/lib/scan.js create mode 100644 node_modules/tinyglobby/node_modules/picomatch/lib/utils.js create mode 100644 node_modules/tinyglobby/node_modules/picomatch/package.json create mode 100644 node_modules/tinyglobby/node_modules/picomatch/posix.js create mode 100644 node_modules/tinyglobby/package.json create mode 100644 node_modules/to-regex-range/LICENSE create mode 100644 node_modules/to-regex-range/README.md create mode 100644 node_modules/to-regex-range/index.js create mode 100644 node_modules/to-regex-range/package.json create mode 100644 node_modules/ts-interface-checker/LICENSE create mode 100644 node_modules/ts-interface-checker/README.md create mode 100644 node_modules/ts-interface-checker/dist/index.d.ts create mode 100644 node_modules/ts-interface-checker/dist/index.js create mode 100644 node_modules/ts-interface-checker/dist/types.d.ts create mode 100644 node_modules/ts-interface-checker/dist/types.js create mode 100644 node_modules/ts-interface-checker/dist/util.d.ts create mode 100644 node_modules/ts-interface-checker/dist/util.js create mode 100644 node_modules/ts-interface-checker/package.json create mode 100644 node_modules/util-deprecate/History.md create mode 100644 node_modules/util-deprecate/LICENSE create mode 100644 node_modules/util-deprecate/README.md create mode 100644 node_modules/util-deprecate/browser.js create mode 100644 node_modules/util-deprecate/node.js create mode 100644 node_modules/util-deprecate/package.json create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 requirements.txt create mode 100644 static/css/input.css create mode 100644 static/css/styles.css create mode 100644 static/images/directLX_small.png create mode 100644 static/js/htmx.min.js create mode 100644 tailwind.config.js create mode 100644 templates/about.html create mode 100644 templates/base.html create mode 100644 templates/blog/index.html create mode 100644 templates/blog/partials/post_list.html create mode 100644 templates/blog/post.html create mode 100644 templates/contact.html create mode 100644 templates/forum/category.html create mode 100644 templates/forum/index.html create mode 100644 templates/forum/partials/reply_form.html create mode 100644 templates/forum/partials/topic_list.html create mode 100644 templates/forum/topic.html create mode 100644 templates/index.html create mode 100644 templates/services.html create mode 100644 venv/bin/Activate.ps1 create mode 100644 venv/bin/activate create mode 100644 venv/bin/activate.csh create mode 100644 venv/bin/activate.fish create mode 100755 venv/bin/flask create mode 100755 venv/bin/pip create mode 100755 venv/bin/pip3 create mode 100755 venv/bin/pip3.12 create mode 120000 venv/bin/python create mode 120000 venv/bin/python3 create mode 120000 venv/bin/python3.12 create mode 100755 venv/bin/slugify create mode 100644 venv/include/site/python3.12/greenlet/greenlet.h create mode 100644 venv/lib/python3.12/site-packages/__pycache__/typing_extensions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/INSTALLER create mode 100644 venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/LICENSE.txt create mode 100644 venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/METADATA create mode 100644 venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/RECORD create mode 100644 venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/WHEEL create mode 100644 venv/lib/python3.12/site-packages/blinker/__init__.py create mode 100644 venv/lib/python3.12/site-packages/blinker/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/blinker/__pycache__/_utilities.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/blinker/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/blinker/_utilities.py create mode 100644 venv/lib/python3.12/site-packages/blinker/base.py create mode 100644 venv/lib/python3.12/site-packages/blinker/py.typed create mode 100644 venv/lib/python3.12/site-packages/click-8.3.1.dist-info/INSTALLER create mode 100644 venv/lib/python3.12/site-packages/click-8.3.1.dist-info/METADATA create mode 100644 venv/lib/python3.12/site-packages/click-8.3.1.dist-info/RECORD create mode 100644 venv/lib/python3.12/site-packages/click-8.3.1.dist-info/WHEEL create mode 100644 venv/lib/python3.12/site-packages/click-8.3.1.dist-info/licenses/LICENSE.txt create mode 100644 venv/lib/python3.12/site-packages/click/__init__.py create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/_compat.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/_termui_impl.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/_textwrap.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/_utils.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/_winconsole.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/core.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/decorators.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/exceptions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/formatting.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/globals.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/parser.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/shell_completion.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/termui.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/testing.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/types.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/__pycache__/utils.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/click/_compat.py create mode 100644 venv/lib/python3.12/site-packages/click/_termui_impl.py create mode 100644 venv/lib/python3.12/site-packages/click/_textwrap.py create mode 100644 venv/lib/python3.12/site-packages/click/_utils.py create mode 100644 venv/lib/python3.12/site-packages/click/_winconsole.py create mode 100644 venv/lib/python3.12/site-packages/click/core.py create mode 100644 venv/lib/python3.12/site-packages/click/decorators.py create mode 100644 venv/lib/python3.12/site-packages/click/exceptions.py create mode 100644 venv/lib/python3.12/site-packages/click/formatting.py create mode 100644 venv/lib/python3.12/site-packages/click/globals.py create mode 100644 venv/lib/python3.12/site-packages/click/parser.py create mode 100644 venv/lib/python3.12/site-packages/click/py.typed create mode 100644 venv/lib/python3.12/site-packages/click/shell_completion.py create mode 100644 venv/lib/python3.12/site-packages/click/termui.py create mode 100644 venv/lib/python3.12/site-packages/click/testing.py create mode 100644 venv/lib/python3.12/site-packages/click/types.py create mode 100644 venv/lib/python3.12/site-packages/click/utils.py create mode 100644 venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/INSTALLER create mode 100644 venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/LICENSE.rst create mode 100644 venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/METADATA create mode 100644 venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/RECORD create mode 100644 venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/REQUESTED create mode 100644 venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/WHEEL create mode 100644 venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/entry_points.txt create mode 100644 venv/lib/python3.12/site-packages/flask/__init__.py create mode 100644 venv/lib/python3.12/site-packages/flask/__main__.py create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/__main__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/app.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/blueprints.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/cli.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/config.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/ctx.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/debughelpers.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/globals.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/helpers.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/logging.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/sessions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/signals.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/templating.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/testing.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/typing.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/views.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/__pycache__/wrappers.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/app.py create mode 100644 venv/lib/python3.12/site-packages/flask/blueprints.py create mode 100644 venv/lib/python3.12/site-packages/flask/cli.py create mode 100644 venv/lib/python3.12/site-packages/flask/config.py create mode 100644 venv/lib/python3.12/site-packages/flask/ctx.py create mode 100644 venv/lib/python3.12/site-packages/flask/debughelpers.py create mode 100644 venv/lib/python3.12/site-packages/flask/globals.py create mode 100644 venv/lib/python3.12/site-packages/flask/helpers.py create mode 100644 venv/lib/python3.12/site-packages/flask/json/__init__.py create mode 100644 venv/lib/python3.12/site-packages/flask/json/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/json/__pycache__/provider.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/json/__pycache__/tag.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/json/provider.py create mode 100644 venv/lib/python3.12/site-packages/flask/json/tag.py create mode 100644 venv/lib/python3.12/site-packages/flask/logging.py create mode 100644 venv/lib/python3.12/site-packages/flask/py.typed create mode 100644 venv/lib/python3.12/site-packages/flask/sansio/README.md create mode 100644 venv/lib/python3.12/site-packages/flask/sansio/__pycache__/app.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/sansio/__pycache__/blueprints.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/sansio/__pycache__/scaffold.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask/sansio/app.py create mode 100644 venv/lib/python3.12/site-packages/flask/sansio/blueprints.py create mode 100644 venv/lib/python3.12/site-packages/flask/sansio/scaffold.py create mode 100644 venv/lib/python3.12/site-packages/flask/sessions.py create mode 100644 venv/lib/python3.12/site-packages/flask/signals.py create mode 100644 venv/lib/python3.12/site-packages/flask/templating.py create mode 100644 venv/lib/python3.12/site-packages/flask/testing.py create mode 100644 venv/lib/python3.12/site-packages/flask/typing.py create mode 100644 venv/lib/python3.12/site-packages/flask/views.py create mode 100644 venv/lib/python3.12/site-packages/flask/wrappers.py create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/INSTALLER create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/LICENSE.rst create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/METADATA create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/RECORD create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/REQUESTED create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/WHEEL create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/__init__.py create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/cli.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/extension.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/model.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/pagination.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/query.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/record_queries.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/session.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/table.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/track_modifications.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/cli.py create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/extension.py create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/model.py create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/pagination.py create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/py.typed create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/query.py create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/record_queries.py create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/session.py create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/table.py create mode 100644 venv/lib/python3.12/site-packages/flask_sqlalchemy/track_modifications.py create mode 100644 venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/INSTALLER create mode 100644 venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/METADATA create mode 100644 venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/RECORD create mode 100644 venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/WHEEL create mode 100644 venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/licenses/LICENSE create mode 100644 venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/licenses/LICENSE.PSF create mode 100644 venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/top_level.txt create mode 100644 venv/lib/python3.12/site-packages/greenlet/CObjects.cpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/PyGreenlet.cpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/PyGreenlet.hpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/PyGreenletUnswitchable.cpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/PyModule.cpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/TBrokenGreenlet.cpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/TExceptionState.cpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/TGreenlet.cpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/TGreenlet.hpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/TGreenletGlobals.cpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/TMainGreenlet.cpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/TPythonState.cpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/TStackState.cpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/TThreadState.hpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/TThreadStateCreator.hpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/TThreadStateDestroy.cpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/TUserGreenlet.cpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/__init__.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/__pycache__/__init__.cpython-312.pyc create mode 100755 venv/lib/python3.12/site-packages/greenlet/_greenlet.cpython-312-x86_64-linux-gnu.so create mode 100644 venv/lib/python3.12/site-packages/greenlet/greenlet.cpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/greenlet.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/greenlet_allocator.hpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/greenlet_compiler_compat.hpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/greenlet_cpython_compat.hpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/greenlet_exceptions.hpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/greenlet_internal.hpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/greenlet_msvc_compat.hpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/greenlet_refs.hpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/greenlet_slp_switch.hpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/greenlet_thread_support.hpp create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/__init__.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/setup_switch_x64_masm.cmd create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_aarch64_gcc.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_alpha_unix.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_amd64_unix.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_arm32_gcc.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_arm32_ios.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_arm64_masm.asm create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_arm64_masm.obj create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_arm64_msvc.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_csky_gcc.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_loongarch64_linux.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_m68k_gcc.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_mips_unix.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_ppc64_aix.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_ppc64_linux.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_ppc_aix.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_ppc_linux.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_ppc_macosx.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_ppc_unix.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_riscv_unix.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_s390_unix.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_sh_gcc.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_sparc_sun_gcc.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_x32_unix.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_x64_masm.asm create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_x64_masm.obj create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_x64_msvc.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_x86_msvc.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/platform/switch_x86_unix.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/slp_platformselect.h create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__init__.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/fail_clearing_run_switches.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/fail_cpp_exception.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/fail_initialstub_already_started.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/fail_slp_switch.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/fail_switch_three_greenlets.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/fail_switch_three_greenlets2.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/fail_switch_two_greenlets.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/leakcheck.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/test_contextvars.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/test_cpp.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/test_extension_interface.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/test_gc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/test_generator.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/test_generator_nested.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/test_greenlet.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/test_greenlet_trash.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/test_leaks.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/test_stack_saved.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/test_throw.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/test_tracing.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/test_version.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/__pycache__/test_weakref.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/_test_extension.c create mode 100755 venv/lib/python3.12/site-packages/greenlet/tests/_test_extension.cpython-312-x86_64-linux-gnu.so create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/_test_extension_cpp.cpp create mode 100755 venv/lib/python3.12/site-packages/greenlet/tests/_test_extension_cpp.cpython-312-x86_64-linux-gnu.so create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/fail_clearing_run_switches.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/fail_cpp_exception.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/fail_initialstub_already_started.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/fail_slp_switch.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/fail_switch_three_greenlets.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/fail_switch_three_greenlets2.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/fail_switch_two_greenlets.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/leakcheck.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/test_contextvars.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/test_cpp.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/test_extension_interface.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/test_gc.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/test_generator.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/test_generator_nested.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/test_greenlet.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/test_greenlet_trash.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/test_leaks.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/test_stack_saved.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/test_throw.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/test_tracing.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/test_version.py create mode 100644 venv/lib/python3.12/site-packages/greenlet/tests/test_weakref.py create mode 100644 venv/lib/python3.12/site-packages/itsdangerous-2.2.0.dist-info/INSTALLER create mode 100644 venv/lib/python3.12/site-packages/itsdangerous-2.2.0.dist-info/LICENSE.txt create mode 100644 venv/lib/python3.12/site-packages/itsdangerous-2.2.0.dist-info/METADATA create mode 100644 venv/lib/python3.12/site-packages/itsdangerous-2.2.0.dist-info/RECORD create mode 100644 venv/lib/python3.12/site-packages/itsdangerous-2.2.0.dist-info/WHEEL create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/__init__.py create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/__pycache__/_json.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/__pycache__/encoding.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/__pycache__/exc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/__pycache__/serializer.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/__pycache__/signer.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/__pycache__/timed.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/__pycache__/url_safe.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/_json.py create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/encoding.py create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/exc.py create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/py.typed create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/serializer.py create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/signer.py create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/timed.py create mode 100644 venv/lib/python3.12/site-packages/itsdangerous/url_safe.py create mode 100644 venv/lib/python3.12/site-packages/jinja2-3.1.6.dist-info/INSTALLER create mode 100644 venv/lib/python3.12/site-packages/jinja2-3.1.6.dist-info/METADATA create mode 100644 venv/lib/python3.12/site-packages/jinja2-3.1.6.dist-info/RECORD create mode 100644 venv/lib/python3.12/site-packages/jinja2-3.1.6.dist-info/WHEEL create mode 100644 venv/lib/python3.12/site-packages/jinja2-3.1.6.dist-info/entry_points.txt create mode 100644 venv/lib/python3.12/site-packages/jinja2-3.1.6.dist-info/licenses/LICENSE.txt create mode 100644 venv/lib/python3.12/site-packages/jinja2/__init__.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/_identifier.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/async_utils.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/bccache.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/compiler.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/constants.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/debug.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/defaults.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/environment.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/exceptions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/ext.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/filters.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/idtracking.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/lexer.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/loaders.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/meta.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/nativetypes.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/nodes.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/optimizer.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/parser.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/runtime.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/sandbox.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/tests.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/utils.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/__pycache__/visitor.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/jinja2/_identifier.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/async_utils.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/bccache.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/compiler.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/constants.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/debug.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/defaults.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/environment.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/exceptions.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/ext.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/filters.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/idtracking.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/lexer.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/loaders.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/meta.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/nativetypes.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/nodes.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/optimizer.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/parser.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/py.typed create mode 100644 venv/lib/python3.12/site-packages/jinja2/runtime.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/sandbox.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/tests.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/utils.py create mode 100644 venv/lib/python3.12/site-packages/jinja2/visitor.py create mode 100644 venv/lib/python3.12/site-packages/markupsafe-3.0.3.dist-info/INSTALLER create mode 100644 venv/lib/python3.12/site-packages/markupsafe-3.0.3.dist-info/METADATA create mode 100644 venv/lib/python3.12/site-packages/markupsafe-3.0.3.dist-info/RECORD create mode 100644 venv/lib/python3.12/site-packages/markupsafe-3.0.3.dist-info/WHEEL create mode 100644 venv/lib/python3.12/site-packages/markupsafe-3.0.3.dist-info/licenses/LICENSE.txt create mode 100644 venv/lib/python3.12/site-packages/markupsafe-3.0.3.dist-info/top_level.txt create mode 100644 venv/lib/python3.12/site-packages/markupsafe/__init__.py create mode 100644 venv/lib/python3.12/site-packages/markupsafe/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/markupsafe/__pycache__/_native.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/markupsafe/_native.py create mode 100644 venv/lib/python3.12/site-packages/markupsafe/_speedups.c create mode 100755 venv/lib/python3.12/site-packages/markupsafe/_speedups.cpython-312-x86_64-linux-gnu.so create mode 100644 venv/lib/python3.12/site-packages/markupsafe/_speedups.pyi create mode 100644 venv/lib/python3.12/site-packages/markupsafe/py.typed create mode 100644 venv/lib/python3.12/site-packages/pip-24.0.dist-info/AUTHORS.txt create mode 100644 venv/lib/python3.12/site-packages/pip-24.0.dist-info/INSTALLER create mode 100644 venv/lib/python3.12/site-packages/pip-24.0.dist-info/LICENSE.txt create mode 100644 venv/lib/python3.12/site-packages/pip-24.0.dist-info/METADATA create mode 100644 venv/lib/python3.12/site-packages/pip-24.0.dist-info/RECORD create mode 100644 venv/lib/python3.12/site-packages/pip-24.0.dist-info/REQUESTED create mode 100644 venv/lib/python3.12/site-packages/pip-24.0.dist-info/WHEEL create mode 100644 venv/lib/python3.12/site-packages/pip-24.0.dist-info/entry_points.txt create mode 100644 venv/lib/python3.12/site-packages/pip-24.0.dist-info/top_level.txt create mode 100644 venv/lib/python3.12/site-packages/pip/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/__main__.py create mode 100644 venv/lib/python3.12/site-packages/pip/__pip-runner__.py create mode 100644 venv/lib/python3.12/site-packages/pip/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/__pycache__/__main__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/__pycache__/__pip-runner__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/__pycache__/build_env.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/__pycache__/cache.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/__pycache__/configuration.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/__pycache__/exceptions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/__pycache__/main.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/__pycache__/pyproject.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/__pycache__/self_outdated_check.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/__pycache__/wheel_builder.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/build_env.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cache.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/autocompletion.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/base_command.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/cmdoptions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/command_context.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/main.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/main_parser.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/parser.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/progress_bars.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/req_command.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/spinners.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/status_codes.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/autocompletion.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/base_command.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/cmdoptions.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/command_context.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/main.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/main_parser.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/parser.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/progress_bars.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/req_command.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/spinners.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/cli/status_codes.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/cache.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/check.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/completion.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/configuration.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/debug.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/download.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/freeze.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/hash.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/help.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/index.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/inspect.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/install.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/list.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/search.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/show.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/uninstall.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/wheel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/cache.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/check.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/completion.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/configuration.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/debug.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/download.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/freeze.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/hash.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/help.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/index.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/inspect.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/install.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/list.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/search.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/show.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/uninstall.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/commands/wheel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/configuration.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/distributions/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/installed.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/sdist.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/wheel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/distributions/base.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/distributions/installed.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/distributions/sdist.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/distributions/wheel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/exceptions.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/index/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/index/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/index/__pycache__/collector.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/index/__pycache__/package_finder.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/index/__pycache__/sources.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/index/collector.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/index/package_finder.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/index/sources.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/locations/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/_distutils.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/_sysconfig.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/locations/_distutils.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/locations/_sysconfig.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/locations/base.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/main.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/_json.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/pkg_resources.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/_json.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/base.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_compat.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_dists.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_envs.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_compat.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/metadata/pkg_resources.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/candidate.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/direct_url.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/format_control.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/index.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/installation_report.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/link.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/scheme.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/search_scope.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/selection_prefs.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/target_python.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/wheel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/candidate.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/direct_url.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/format_control.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/index.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/installation_report.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/link.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/scheme.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/search_scope.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/selection_prefs.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/target_python.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/models/wheel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/auth.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/cache.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/download.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/lazy_wheel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/session.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/utils.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/xmlrpc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/auth.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/cache.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/download.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/lazy_wheel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/session.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/utils.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/network/xmlrpc.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/check.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/freeze.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/prepare.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/build_tracker.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata_editable.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata_legacy.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel_editable.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel_legacy.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/build_tracker.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/metadata.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/metadata_editable.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/metadata_legacy.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/wheel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/wheel_editable.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/build/wheel_legacy.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/check.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/freeze.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/install/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/install/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/install/__pycache__/editable_legacy.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/install/__pycache__/wheel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/install/editable_legacy.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/install/wheel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/operations/prepare.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/pyproject.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/req/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/req/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/req/__pycache__/constructors.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_file.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_install.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_set.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_uninstall.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/req/constructors.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/req/req_file.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/req/req_install.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/req/req_set.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/req/req_uninstall.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/base.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__pycache__/resolver.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/legacy/resolver.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/candidates.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/factory.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/found_candidates.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/provider.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/reporter.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/requirements.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/resolver.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/base.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/factory.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/provider.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/reporter.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/requirements.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/self_outdated_check.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/_jaraco_text.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/_log.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/appdirs.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/compat.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/compatibility_tags.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/datetime.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/deprecation.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/direct_url_helpers.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/egg_link.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/encoding.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/entrypoints.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/filesystem.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/filetypes.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/glibc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/hashes.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/logging.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/misc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/models.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/packaging.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/setuptools_build.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/subprocess.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/temp_dir.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/unpacking.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/urls.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/virtualenv.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/wheel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/_jaraco_text.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/_log.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/appdirs.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/compat.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/compatibility_tags.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/datetime.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/deprecation.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/direct_url_helpers.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/egg_link.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/encoding.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/entrypoints.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/filesystem.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/filetypes.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/glibc.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/hashes.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/logging.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/misc.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/models.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/packaging.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/setuptools_build.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/subprocess.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/temp_dir.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/unpacking.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/urls.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/virtualenv.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/utils/wheel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/vcs/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/bazaar.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/git.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/mercurial.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/subversion.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/versioncontrol.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/vcs/bazaar.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/vcs/git.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/vcs/mercurial.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/vcs/subversion.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/vcs/versioncontrol.py create mode 100644 venv/lib/python3.12/site-packages/pip/_internal/wheel_builder.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/__pycache__/six.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/__pycache__/typing_extensions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/_cmd.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/adapter.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/cache.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/controller.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/filewrapper.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/heuristics.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/serialize.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/wrapper.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/_cmd.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/adapter.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/cache.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/file_cache.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/redis_cache.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/controller.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/filewrapper.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/heuristics.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/serialize.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/wrapper.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/certifi/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/certifi/__main__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/certifi/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/certifi/__pycache__/__main__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/certifi/__pycache__/core.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/certifi/cacert.pem create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/certifi/core.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/big5freq.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/big5prober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/chardistribution.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/charsetgroupprober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/charsetprober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/codingstatemachine.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/codingstatemachinedict.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/cp949prober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/enums.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/escprober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/escsm.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/eucjpprober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/euckrfreq.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/euckrprober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/euctwfreq.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/euctwprober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/gb2312freq.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/gb2312prober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/hebrewprober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/jisfreq.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/johabfreq.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/johabprober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/jpcntx.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/langbulgarianmodel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/langgreekmodel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/langhebrewmodel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/langhungarianmodel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/langrussianmodel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/langthaimodel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/langturkishmodel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/latin1prober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/macromanprober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/mbcharsetprober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/mbcsgroupprober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/mbcssm.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/resultdict.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/sbcharsetprober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/sbcsgroupprober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/sjisprober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/universaldetector.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/utf1632prober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/utf8prober.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/__pycache__/version.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/big5freq.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/big5prober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/chardistribution.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/charsetgroupprober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/charsetprober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/cli/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/cli/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/cli/__pycache__/chardetect.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/cli/chardetect.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/codingstatemachine.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/codingstatemachinedict.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/cp949prober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/enums.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/escprober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/escsm.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/eucjpprober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/euckrfreq.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/euckrprober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/euctwfreq.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/euctwprober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/gb2312freq.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/gb2312prober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/hebrewprober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/jisfreq.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/johabfreq.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/johabprober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/jpcntx.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/langbulgarianmodel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/langgreekmodel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/langhebrewmodel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/langhungarianmodel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/langrussianmodel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/langthaimodel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/langturkishmodel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/latin1prober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/macromanprober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/mbcharsetprober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/mbcsgroupprober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/mbcssm.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/metadata/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/metadata/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/metadata/__pycache__/languages.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/metadata/languages.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/resultdict.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/sbcharsetprober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/sbcsgroupprober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/sjisprober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/universaldetector.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/utf1632prober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/utf8prober.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/chardet/version.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/__pycache__/ansi.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/__pycache__/ansitowin32.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/__pycache__/initialise.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/__pycache__/win32.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/__pycache__/winterm.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/ansi.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/ansitowin32.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/initialise.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/__pycache__/ansi_test.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/__pycache__/ansitowin32_test.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/__pycache__/initialise_test.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/__pycache__/isatty_test.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/__pycache__/utils.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/__pycache__/winterm_test.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/ansi_test.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/ansitowin32_test.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/initialise_test.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/isatty_test.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/utils.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/winterm_test.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/win32.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/colorama/winterm.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/compat.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/database.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/index.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/locators.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/manifest.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/markers.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/metadata.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/resources.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/scripts.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/util.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/version.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/wheel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/compat.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/database.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/index.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/locators.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/manifest.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/markers.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/metadata.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/resources.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/scripts.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/util.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/version.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distlib/wheel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distro/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distro/__main__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distro/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distro/__pycache__/__main__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distro/__pycache__/distro.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/distro/distro.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/codec.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/compat.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/core.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/idnadata.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/intranges.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/package_data.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/uts46data.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/codec.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/compat.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/core.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/idnadata.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/intranges.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/package_data.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/idna/uts46data.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/msgpack/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/exceptions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/ext.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/fallback.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/msgpack/exceptions.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/msgpack/ext.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/msgpack/fallback.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/__about__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/__about__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_manylinux.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_musllinux.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_structures.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/markers.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/requirements.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/specifiers.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/tags.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/utils.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/version.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/_manylinux.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/_musllinux.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/_structures.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/markers.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/requirements.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/specifiers.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/tags.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/utils.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/packaging/version.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__main__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/__main__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/android.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/api.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/macos.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/unix.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/version.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/windows.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/android.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/api.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/macos.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/unix.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/version.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/windows.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__main__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/__main__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/cmdline.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/console.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/filter.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/formatter.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/lexer.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/modeline.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/plugin.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/regexopt.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/scanner.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/sphinxext.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/style.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/token.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/unistring.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/util.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/cmdline.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/console.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/filter.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/filters/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/filters/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatter.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/_mapping.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/bbcode.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/groff.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/html.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/img.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/irc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/latex.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/other.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/pangomarkup.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/rtf.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/svg.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/terminal.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/terminal256.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/_mapping.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/bbcode.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/groff.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/html.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/img.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/irc.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/latex.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/other.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/pangomarkup.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/rtf.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/svg.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/terminal.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/terminal256.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/lexer.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/__pycache__/_mapping.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/__pycache__/python.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/_mapping.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/python.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/modeline.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/plugin.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/regexopt.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/scanner.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/sphinxext.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/style.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/styles/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/styles/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/token.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/unistring.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pygments/util.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/__pycache__/actions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/__pycache__/common.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/__pycache__/core.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/__pycache__/exceptions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/__pycache__/helpers.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/__pycache__/results.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/__pycache__/testing.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/__pycache__/unicode.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/__pycache__/util.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/actions.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/common.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/core.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/diagram/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/diagram/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/exceptions.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/helpers.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/results.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/testing.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/unicode.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyparsing/util.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/__pycache__/_compat.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/__pycache__/_impl.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_compat.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_impl.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/_in_process.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/__version__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/_internal_utils.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/adapters.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/api.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/auth.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/certs.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/compat.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/cookies.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/exceptions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/help.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/hooks.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/models.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/packages.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/sessions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/status_codes.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/structures.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/utils.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/__version__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/_internal_utils.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/adapters.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/api.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/auth.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/certs.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/compat.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/cookies.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/exceptions.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/help.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/hooks.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/models.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/packages.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/sessions.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/status_codes.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/structures.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/requests/utils.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/__pycache__/providers.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/__pycache__/reporters.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/__pycache__/resolvers.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/__pycache__/structs.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/compat/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/compat/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/compat/__pycache__/collections_abc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/compat/collections_abc.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/providers.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/reporters.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/structs.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__main__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/__main__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_cell_widths.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_emoji_codes.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_emoji_replace.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_export_format.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_extension.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_fileno.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_inspect.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_log_render.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_loop.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_null_file.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_palettes.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_pick.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_ratio.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_spinners.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_stack.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_timer.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_win32_console.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_windows.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_windows_renderer.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_wrap.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/abc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/align.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/ansi.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/bar.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/box.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/cells.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/color.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/color_triplet.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/columns.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/console.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/constrain.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/containers.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/control.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/default_styles.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/diagnose.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/emoji.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/errors.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/file_proxy.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/filesize.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/highlighter.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/json.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/jupyter.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/layout.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/live.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/live_render.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/logging.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/markup.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/measure.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/padding.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/pager.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/palette.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/panel.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/pretty.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/progress.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/progress_bar.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/prompt.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/protocol.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/region.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/repr.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/rule.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/scope.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/screen.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/segment.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/spinner.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/status.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/style.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/styled.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/syntax.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/table.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/terminal_theme.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/text.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/theme.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/themes.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/traceback.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/tree.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_cell_widths.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_emoji_codes.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_emoji_replace.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_export_format.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_extension.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_fileno.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_inspect.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_log_render.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_loop.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_null_file.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_palettes.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_pick.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_ratio.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_spinners.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_stack.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_timer.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_win32_console.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_windows.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_windows_renderer.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/_wrap.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/abc.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/align.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/ansi.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/bar.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/box.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/cells.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/color.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/color_triplet.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/columns.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/console.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/constrain.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/containers.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/control.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/default_styles.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/diagnose.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/emoji.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/errors.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/file_proxy.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/filesize.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/highlighter.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/json.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/jupyter.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/layout.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/live.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/live_render.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/logging.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/markup.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/measure.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/padding.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/pager.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/palette.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/panel.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/pretty.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/progress.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/progress_bar.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/prompt.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/protocol.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/region.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/repr.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/rule.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/scope.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/screen.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/segment.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/spinner.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/status.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/style.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/styled.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/syntax.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/table.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/terminal_theme.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/text.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/theme.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/themes.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/traceback.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/rich/tree.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/six.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/__pycache__/_asyncio.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/__pycache__/_utils.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/__pycache__/after.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/__pycache__/before.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/__pycache__/before_sleep.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/__pycache__/nap.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/__pycache__/retry.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/__pycache__/stop.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/__pycache__/tornadoweb.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/__pycache__/wait.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/_asyncio.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/_utils.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/after.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/before.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/before_sleep.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/nap.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/retry.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/stop.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/tornadoweb.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tenacity/wait.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tomli/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tomli/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tomli/__pycache__/_parser.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tomli/__pycache__/_re.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tomli/__pycache__/_types.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tomli/_parser.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tomli/_re.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/tomli/_types.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/truststore/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/truststore/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/truststore/__pycache__/_api.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/truststore/__pycache__/_macos.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/truststore/__pycache__/_openssl.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/truststore/__pycache__/_ssl_constants.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/truststore/__pycache__/_windows.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/truststore/_api.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/truststore/_macos.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/truststore/_openssl.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/truststore/_ssl_constants.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/truststore/_windows.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/typing_extensions.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/_collections.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/_version.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/connection.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/connectionpool.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/exceptions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/fields.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/filepost.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/poolmanager.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/request.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/response.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/_collections.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/_version.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/connection.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/connectionpool.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/_appengine_environ.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/appengine.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/ntlmpool.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/pyopenssl.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/securetransport.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/socks.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/bindings.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/low_level.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/appengine.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/securetransport.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/socks.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/exceptions.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/fields.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/filepost.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/__pycache__/six.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/makefile.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/weakref_finalize.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/weakref_finalize.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/six.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/poolmanager.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/request.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/response.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/connection.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/proxy.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/queue.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/request.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/response.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/retry.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_match_hostname.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/ssltransport.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/timeout.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/url.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/wait.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/connection.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/proxy.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/queue.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/request.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/response.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/retry.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/ssl_.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/ssltransport.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/timeout.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/url.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/wait.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/vendor.txt create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/webencodings/__init__.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/webencodings/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/webencodings/__pycache__/labels.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/webencodings/__pycache__/mklabels.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/webencodings/__pycache__/tests.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/webencodings/__pycache__/x_user_defined.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/webencodings/labels.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/webencodings/mklabels.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/webencodings/tests.py create mode 100644 venv/lib/python3.12/site-packages/pip/_vendor/webencodings/x_user_defined.py create mode 100644 venv/lib/python3.12/site-packages/pip/py.typed create mode 100644 venv/lib/python3.12/site-packages/python_slugify-8.0.1.dist-info/INSTALLER create mode 100644 venv/lib/python3.12/site-packages/python_slugify-8.0.1.dist-info/LICENSE create mode 100644 venv/lib/python3.12/site-packages/python_slugify-8.0.1.dist-info/METADATA create mode 100644 venv/lib/python3.12/site-packages/python_slugify-8.0.1.dist-info/RECORD create mode 100644 venv/lib/python3.12/site-packages/python_slugify-8.0.1.dist-info/REQUESTED create mode 100644 venv/lib/python3.12/site-packages/python_slugify-8.0.1.dist-info/WHEEL create mode 100644 venv/lib/python3.12/site-packages/python_slugify-8.0.1.dist-info/entry_points.txt create mode 100644 venv/lib/python3.12/site-packages/python_slugify-8.0.1.dist-info/top_level.txt create mode 100644 venv/lib/python3.12/site-packages/slugify/__init__.py create mode 100644 venv/lib/python3.12/site-packages/slugify/__main__.py create mode 100644 venv/lib/python3.12/site-packages/slugify/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/slugify/__pycache__/__main__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/slugify/__pycache__/__version__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/slugify/__pycache__/slugify.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/slugify/__pycache__/special.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/slugify/__version__.py create mode 100644 venv/lib/python3.12/site-packages/slugify/slugify.py create mode 100644 venv/lib/python3.12/site-packages/slugify/special.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy-2.0.46.dist-info/INSTALLER create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy-2.0.46.dist-info/METADATA create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy-2.0.46.dist-info/RECORD create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy-2.0.46.dist-info/WHEEL create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy-2.0.46.dist-info/licenses/LICENSE create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy-2.0.46.dist-info/top_level.txt create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/__pycache__/events.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/__pycache__/exc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/__pycache__/inspection.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/__pycache__/log.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/__pycache__/schema.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/__pycache__/types.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/connectors/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/connectors/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/connectors/__pycache__/aioodbc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/connectors/__pycache__/asyncio.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/connectors/__pycache__/pyodbc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/connectors/aioodbc.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/connectors/asyncio.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/connectors/pyodbc.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/cyextension/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/cyextension/__pycache__/__init__.cpython-312.pyc create mode 100755 venv/lib/python3.12/site-packages/sqlalchemy/cyextension/collections.cpython-312-x86_64-linux-gnu.so create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/cyextension/collections.pyx create mode 100755 venv/lib/python3.12/site-packages/sqlalchemy/cyextension/immutabledict.cpython-312-x86_64-linux-gnu.so create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/cyextension/immutabledict.pxd create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/cyextension/immutabledict.pyx create mode 100755 venv/lib/python3.12/site-packages/sqlalchemy/cyextension/processors.cpython-312-x86_64-linux-gnu.so create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/cyextension/processors.pyx create mode 100755 venv/lib/python3.12/site-packages/sqlalchemy/cyextension/resultproxy.cpython-312-x86_64-linux-gnu.so create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/cyextension/resultproxy.pyx create mode 100755 venv/lib/python3.12/site-packages/sqlalchemy/cyextension/util.cpython-312-x86_64-linux-gnu.so create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/cyextension/util.pyx create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/__pycache__/_typing.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/_typing.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/__pycache__/aioodbc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/__pycache__/information_schema.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/__pycache__/json.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/__pycache__/provision.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/__pycache__/pymssql.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/__pycache__/pyodbc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/aioodbc.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/base.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/information_schema.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/json.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/provision.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/pymssql.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mssql/pyodbc.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/aiomysql.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/asyncmy.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/cymysql.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/dml.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/enumerated.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/expression.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/json.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/mariadb.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/mariadbconnector.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/mysqlconnector.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/mysqldb.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/provision.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/pymysql.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/pyodbc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/reflection.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/reserved_words.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/__pycache__/types.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/aiomysql.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/asyncmy.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/base.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/cymysql.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/dml.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/enumerated.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/expression.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/json.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/mariadb.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/mariadbconnector.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/mysqlconnector.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/mysqldb.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/provision.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/pymysql.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/pyodbc.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/reflection.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/reserved_words.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/types.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/__pycache__/cx_oracle.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/__pycache__/dictionary.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/__pycache__/oracledb.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/__pycache__/provision.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/__pycache__/types.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/__pycache__/vector.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/base.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/cx_oracle.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/dictionary.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/oracledb.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/provision.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/types.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/oracle/vector.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/_psycopg_common.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/array.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/asyncpg.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/dml.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/ext.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/hstore.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/json.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/named_types.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/operators.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/pg8000.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/pg_catalog.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/provision.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/psycopg.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/psycopg2.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/psycopg2cffi.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/ranges.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/__pycache__/types.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/_psycopg_common.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/array.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/base.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/dml.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/ext.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/hstore.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/json.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/named_types.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/operators.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/pg8000.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/pg_catalog.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/provision.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/psycopg.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/psycopg2cffi.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/ranges.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/types.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/__pycache__/aiosqlite.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/__pycache__/dml.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/__pycache__/json.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/__pycache__/provision.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/__pycache__/pysqlcipher.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/__pycache__/pysqlite.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/base.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/dml.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/json.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/provision.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/pysqlcipher.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/dialects/type_migration_guidelines.txt create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/_py_processors.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/_py_row.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/_py_util.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/characteristics.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/create.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/cursor.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/default.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/events.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/interfaces.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/mock.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/processors.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/reflection.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/result.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/row.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/strategies.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/url.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/__pycache__/util.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/_py_processors.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/_py_row.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/_py_util.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/characteristics.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/cursor.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/events.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/interfaces.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/mock.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/processors.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/reflection.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/result.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/row.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/strategies.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/url.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/engine/util.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/event/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/event/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/event/__pycache__/api.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/event/__pycache__/attr.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/event/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/event/__pycache__/legacy.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/event/__pycache__/registry.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/event/api.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/event/attr.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/event/base.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/event/legacy.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/event/registry.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/events.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/exc.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/__pycache__/associationproxy.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/__pycache__/automap.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/__pycache__/baked.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/__pycache__/compiler.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/__pycache__/horizontal_shard.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/__pycache__/hybrid.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/__pycache__/indexable.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/__pycache__/instrumentation.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/__pycache__/mutable.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/__pycache__/orderinglist.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/__pycache__/serializer.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/associationproxy.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/__pycache__/engine.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/__pycache__/exc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/__pycache__/result.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/__pycache__/scoping.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/__pycache__/session.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/base.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/engine.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/exc.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/result.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/scoping.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/session.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/automap.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/baked.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/compiler.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/declarative/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/declarative/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/declarative/__pycache__/extensions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/declarative/extensions.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/horizontal_shard.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/hybrid.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/indexable.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/instrumentation.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/mutable.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/mypy/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/mypy/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/mypy/__pycache__/apply.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/mypy/__pycache__/decl_class.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/mypy/__pycache__/infer.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/mypy/__pycache__/names.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/mypy/__pycache__/plugin.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/mypy/__pycache__/util.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/mypy/apply.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/mypy/decl_class.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/mypy/infer.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/mypy/names.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/mypy/plugin.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/mypy/util.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/orderinglist.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/ext/serializer.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/future/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/future/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/future/__pycache__/engine.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/future/engine.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/inspection.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/log.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/_orm_constructors.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/_typing.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/attributes.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/bulk_persistence.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/clsregistry.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/collections.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/context.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/decl_api.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/decl_base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/dependency.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/descriptor_props.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/dynamic.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/evaluator.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/events.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/exc.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/identity.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/instrumentation.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/interfaces.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/loading.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/mapped_collection.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/mapper.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/path_registry.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/persistence.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/properties.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/query.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/relationships.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/scoping.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/session.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/state.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/state_changes.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/strategies.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/strategy_options.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/sync.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/unitofwork.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/util.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/__pycache__/writeonly.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/_orm_constructors.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/_typing.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/attributes.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/base.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/bulk_persistence.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/clsregistry.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/collections.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/context.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/decl_api.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/decl_base.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/dependency.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/descriptor_props.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/dynamic.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/evaluator.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/events.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/exc.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/identity.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/instrumentation.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/interfaces.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/loading.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/mapped_collection.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/mapper.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/path_registry.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/persistence.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/properties.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/relationships.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/scoping.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/state.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/strategies.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/strategy_options.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/sync.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/unitofwork.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/util.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/orm/writeonly.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/pool/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/pool/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/pool/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/pool/__pycache__/events.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/pool/__pycache__/impl.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/pool/events.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/py.typed create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/schema.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/_dml_constructors.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/_elements_constructors.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/_orm_types.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/_py_util.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/_selectable_constructors.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/_typing.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/annotation.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/cache_key.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/coercions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/compiler.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/crud.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/ddl.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/default_comparator.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/dml.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/elements.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/events.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/expression.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/functions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/lambdas.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/naming.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/operators.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/roles.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/schema.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/selectable.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/sqltypes.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/traversals.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/type_api.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/util.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/__pycache__/visitors.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/_dml_constructors.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/_elements_constructors.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/_orm_types.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/_py_util.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/_selectable_constructors.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/_typing.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/annotation.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/base.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/cache_key.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/coercions.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/crud.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/ddl.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/default_comparator.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/dml.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/elements.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/events.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/expression.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/functions.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/lambdas.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/naming.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/operators.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/roles.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/schema.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/selectable.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/sqltypes.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/traversals.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/type_api.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/util.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/sql/visitors.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__pycache__/assertions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__pycache__/assertsql.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__pycache__/asyncio.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__pycache__/config.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__pycache__/engines.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__pycache__/entities.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__pycache__/exclusions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__pycache__/pickleable.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__pycache__/profiling.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__pycache__/provision.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__pycache__/requirements.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__pycache__/schema.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__pycache__/util.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/__pycache__/warnings.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/assertions.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/assertsql.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/asyncio.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/config.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/engines.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/entities.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/exclusions.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/fixtures/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/fixtures/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/fixtures/__pycache__/base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/fixtures/__pycache__/mypy.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/fixtures/__pycache__/orm.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/fixtures/__pycache__/sql.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/fixtures/base.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/fixtures/mypy.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/fixtures/orm.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/fixtures/sql.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/pickleable.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/plugin/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/plugin/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/plugin/__pycache__/bootstrap.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/plugin/__pycache__/plugin_base.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/plugin/__pycache__/pytestplugin.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/plugin/bootstrap.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/plugin/plugin_base.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/plugin/pytestplugin.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/profiling.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/provision.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/requirements.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/schema.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/__pycache__/test_cte.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/__pycache__/test_ddl.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/__pycache__/test_deprecations.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/__pycache__/test_dialect.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/__pycache__/test_insert.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/__pycache__/test_reflection.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/__pycache__/test_results.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/__pycache__/test_rowcount.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/__pycache__/test_select.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/__pycache__/test_sequence.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/__pycache__/test_types.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/__pycache__/test_unicode_ddl.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/__pycache__/test_update_delete.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/test_cte.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/test_ddl.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/test_deprecations.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/test_dialect.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/test_insert.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/test_reflection.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/test_results.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/test_rowcount.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/test_select.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/test_sequence.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/test_types.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/test_unicode_ddl.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/suite/test_update_delete.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/util.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/testing/warnings.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/types.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/__init__.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/_collections.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/_concurrency_py3k.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/_has_cy.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/_py_collections.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/compat.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/concurrency.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/deprecations.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/langhelpers.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/preloaded.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/queue.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/tool_support.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/topological.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/typing.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/_collections.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/_concurrency_py3k.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/_has_cy.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/_py_collections.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/compat.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/concurrency.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/deprecations.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/preloaded.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/queue.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/tool_support.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/topological.py create mode 100644 venv/lib/python3.12/site-packages/sqlalchemy/util/typing.py create mode 100644 venv/lib/python3.12/site-packages/text_unidecode-1.3.dist-info/DESCRIPTION.rst create mode 100644 venv/lib/python3.12/site-packages/text_unidecode-1.3.dist-info/INSTALLER create mode 100644 venv/lib/python3.12/site-packages/text_unidecode-1.3.dist-info/LICENSE.txt create mode 100644 venv/lib/python3.12/site-packages/text_unidecode-1.3.dist-info/METADATA create mode 100644 venv/lib/python3.12/site-packages/text_unidecode-1.3.dist-info/RECORD create mode 100644 venv/lib/python3.12/site-packages/text_unidecode-1.3.dist-info/WHEEL create mode 100644 venv/lib/python3.12/site-packages/text_unidecode-1.3.dist-info/metadata.json create mode 100644 venv/lib/python3.12/site-packages/text_unidecode-1.3.dist-info/top_level.txt create mode 100644 venv/lib/python3.12/site-packages/text_unidecode/__init__.py create mode 100644 venv/lib/python3.12/site-packages/text_unidecode/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/text_unidecode/data.bin create mode 100644 venv/lib/python3.12/site-packages/typing_extensions-4.15.0.dist-info/INSTALLER create mode 100644 venv/lib/python3.12/site-packages/typing_extensions-4.15.0.dist-info/METADATA create mode 100644 venv/lib/python3.12/site-packages/typing_extensions-4.15.0.dist-info/RECORD create mode 100644 venv/lib/python3.12/site-packages/typing_extensions-4.15.0.dist-info/WHEEL create mode 100644 venv/lib/python3.12/site-packages/typing_extensions-4.15.0.dist-info/licenses/LICENSE create mode 100644 venv/lib/python3.12/site-packages/typing_extensions.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug-3.0.1.dist-info/INSTALLER create mode 100644 venv/lib/python3.12/site-packages/werkzeug-3.0.1.dist-info/LICENSE.rst create mode 100644 venv/lib/python3.12/site-packages/werkzeug-3.0.1.dist-info/METADATA create mode 100644 venv/lib/python3.12/site-packages/werkzeug-3.0.1.dist-info/RECORD create mode 100644 venv/lib/python3.12/site-packages/werkzeug-3.0.1.dist-info/REQUESTED create mode 100644 venv/lib/python3.12/site-packages/werkzeug-3.0.1.dist-info/WHEEL create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__init__.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__pycache__/_internal.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__pycache__/_reloader.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__pycache__/exceptions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__pycache__/formparser.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__pycache__/http.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__pycache__/local.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__pycache__/security.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__pycache__/serving.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__pycache__/test.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__pycache__/testapp.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__pycache__/urls.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__pycache__/user_agent.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__pycache__/utils.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/__pycache__/wsgi.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/_internal.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/_reloader.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/__init__.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/__pycache__/accept.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/__pycache__/auth.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/__pycache__/cache_control.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/__pycache__/csp.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/__pycache__/etag.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/__pycache__/file_storage.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/__pycache__/headers.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/__pycache__/mixins.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/__pycache__/range.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/__pycache__/structures.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/accept.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/accept.pyi create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/auth.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/cache_control.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/cache_control.pyi create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/csp.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/csp.pyi create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/etag.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/etag.pyi create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/file_storage.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/file_storage.pyi create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/headers.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/headers.pyi create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/mixins.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/mixins.pyi create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/range.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/range.pyi create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/structures.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/datastructures/structures.pyi create mode 100644 venv/lib/python3.12/site-packages/werkzeug/debug/__init__.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/debug/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/debug/__pycache__/console.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/debug/__pycache__/repr.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/debug/__pycache__/tbtools.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/debug/console.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/debug/repr.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/debug/shared/ICON_LICENSE.md create mode 100644 venv/lib/python3.12/site-packages/werkzeug/debug/shared/console.png create mode 100644 venv/lib/python3.12/site-packages/werkzeug/debug/shared/debugger.js create mode 100644 venv/lib/python3.12/site-packages/werkzeug/debug/shared/less.png create mode 100644 venv/lib/python3.12/site-packages/werkzeug/debug/shared/more.png create mode 100644 venv/lib/python3.12/site-packages/werkzeug/debug/shared/style.css create mode 100644 venv/lib/python3.12/site-packages/werkzeug/debug/tbtools.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/exceptions.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/formparser.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/http.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/local.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/middleware/__init__.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/middleware/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/middleware/__pycache__/dispatcher.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/middleware/__pycache__/http_proxy.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/middleware/__pycache__/lint.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/middleware/__pycache__/profiler.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/middleware/__pycache__/proxy_fix.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/middleware/__pycache__/shared_data.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/middleware/dispatcher.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/middleware/http_proxy.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/middleware/lint.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/middleware/profiler.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/middleware/proxy_fix.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/middleware/shared_data.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/py.typed create mode 100644 venv/lib/python3.12/site-packages/werkzeug/routing/__init__.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/routing/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/routing/__pycache__/converters.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/routing/__pycache__/exceptions.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/routing/__pycache__/map.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/routing/__pycache__/matcher.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/routing/__pycache__/rules.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/routing/converters.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/routing/exceptions.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/routing/map.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/routing/matcher.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/routing/rules.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/sansio/__init__.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/sansio/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/sansio/__pycache__/http.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/sansio/__pycache__/multipart.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/sansio/__pycache__/request.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/sansio/__pycache__/response.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/sansio/__pycache__/utils.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/sansio/http.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/sansio/multipart.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/sansio/request.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/sansio/response.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/sansio/utils.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/security.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/serving.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/test.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/testapp.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/urls.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/user_agent.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/utils.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/wrappers/__init__.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/wrappers/__pycache__/__init__.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/wrappers/__pycache__/request.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/wrappers/__pycache__/response.cpython-312.pyc create mode 100644 venv/lib/python3.12/site-packages/werkzeug/wrappers/request.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/wrappers/response.py create mode 100644 venv/lib/python3.12/site-packages/werkzeug/wsgi.py create mode 120000 venv/lib64 create mode 100644 venv/pyvenv.cfg create mode 100644 wsgi.py diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..823dd1b --- /dev/null +++ b/.env.example @@ -0,0 +1,8 @@ +# DirectLX.dev Environment Configuration +# Copy this to .env and update values for production + +# Generate a secure key with: python -c "import secrets; print(secrets.token_hex(32))" +SECRET_KEY=your-secret-key-here + +# Optional: Custom database URL (defaults to SQLite in instance folder) +# DATABASE_URL=sqlite:///instance/directlx.db diff --git a/README.md b/README.md new file mode 100644 index 0000000..60964f7 --- /dev/null +++ b/README.md @@ -0,0 +1,195 @@ +# DirectLX.dev + +Company website for DirectLX built with Flask, HTMX, and Tailwind CSS. + +## Tech Stack + +- **Backend**: Python Flask with Flask-SQLAlchemy +- **Database**: SQLite +- **Frontend**: HTMX for dynamic interactions, Tailwind CSS for styling +- **Templating**: Jinja2 +- **Production**: Gunicorn + Nginx + +## Features + +- Company pages (Home, About, Services, Contact) +- Blog with search and pagination +- Community forum with categories, topics, and replies +- HTMX-powered forms and dynamic content loading +- Responsive design + +## Project Structure + +``` +directlx.dev/ +├── app.py # Flask application & routes +├── config.py # Configuration settings +├── models.py # SQLAlchemy models +├── wsgi.py # WSGI entry point +├── requirements.txt # Python dependencies +├── package.json # Node dependencies (Tailwind) +├── tailwind.config.js # Tailwind configuration +├── templates/ +│ ├── base.html # Base layout +│ ├── index.html # Home page +│ ├── about.html # About page +│ ├── services.html # Services page +│ ├── contact.html # Contact page +│ ├── blog/ # Blog templates +│ └── forum/ # Forum templates +├── static/ +│ ├── css/ +│ │ ├── input.css # Tailwind source +│ │ └── styles.css # Compiled CSS +│ ├── js/ +│ │ └── htmx.min.js # HTMX library +│ └── images/ +│ └── directLX_small.png +├── instance/ +│ └── directlx.db # SQLite database +├── nginx.conf # Nginx configuration +├── directlx.service # Systemd service +└── deploy.sh # Deployment script +``` + +## Local Development + +### Prerequisites + +- Python 3.10+ +- Node.js (for Tailwind CSS) + +### Setup + +```bash +# Clone and enter directory +cd directlx.dev + +# Create Python virtual environment +python3 -m venv venv +source venv/bin/activate + +# Install Python dependencies +pip install -r requirements.txt + +# Install Node dependencies and build CSS +npm install +npm run build:css + +# Run development server +python app.py +``` + +Open http://localhost:5000 + +### Tailwind CSS + +Watch for changes during development: + +```bash +npm run watch:css +``` + +Rebuild CSS after template changes: + +```bash +npm run build:css +``` + +## Production Deployment + +### Automated Deployment + +```bash +sudo ./deploy.sh +``` + +### Manual Deployment + +1. **Copy files to server:** + ```bash + sudo mkdir -p /var/www/html/directlx.dev + sudo cp -r app.py config.py models.py wsgi.py requirements.txt templates static /var/www/html/directlx.dev/ + ``` + +2. **Set up Python environment:** + ```bash + cd /var/www/html/directlx.dev + sudo python3 -m venv venv + sudo venv/bin/pip install -r requirements.txt + ``` + +3. **Create environment file:** + ```bash + echo "SECRET_KEY=$(python3 -c 'import secrets; print(secrets.token_hex(32))')" | sudo tee .env + ``` + +4. **Set permissions:** + ```bash + sudo chown -R www-data:www-data /var/www/html/directlx.dev + sudo chmod -R 755 /var/www/html/directlx.dev + ``` + +5. **Install systemd service:** + ```bash + sudo cp directlx.service /etc/systemd/system/ + sudo systemctl daemon-reload + sudo systemctl enable --now directlx + ``` + +6. **Configure Nginx:** + ```bash + sudo cp nginx.conf /etc/nginx/sites-available/directlx.dev + sudo ln -sf /etc/nginx/sites-available/directlx.dev /etc/nginx/sites-enabled/ + sudo nginx -t && sudo systemctl reload nginx + ``` + +### Useful Commands + +```bash +# Check application status +sudo systemctl status directlx + +# View application logs +sudo journalctl -u directlx -f + +# Restart application +sudo systemctl restart directlx + +# Reload Nginx +sudo systemctl reload nginx +``` + +## Environment Variables + +| Variable | Description | Required | +|----------|-------------|----------| +| `SECRET_KEY` | Flask secret key for sessions | Yes (production) | +| `DATABASE_URL` | Database connection string | No (defaults to SQLite) | + +## Database Models + +- **User** - User accounts with authentication +- **BlogPost** - Blog articles with slugs +- **ForumCategory** - Forum category organization +- **ForumTopic** - Discussion topics +- **ForumReply** - Topic replies +- **ContactMessage** - Contact form submissions + +## API Routes + +| Route | Description | +|-------|-------------| +| `/` | Home page | +| `/about` | About page | +| `/services` | Services page | +| `/contact` | Contact page | +| `/blog` | Blog listing | +| `/blog/` | Single blog post | +| `/forum` | Forum categories | +| `/forum/` | Category topics | +| `/forum//` | Topic with replies | + +## License + +All rights reserved. diff --git a/__pycache__/config.cpython-312.pyc b/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2521ff0acc26b74919f5221d499e8537f4d52414 GIT binary patch literal 1771 zcmb7E&rcgi6rTOz-SuLA*rp<-30+Yo#Hq}xYA>y#N)8x8L!1^IRJK)Ci+3RFE^9Ko zcCbZNQsod%gp)z4M2=Ma13C6ssTWdT+-VO;?WH%Ukt*fXnYEV%q)P2b`{vs>Z)V=S z`M&w7yITgNeRHjBB{=|or$0f9bU^C|0_wm7CSwB)Ku~0ZkgzWX(V^?#BE>Ty9SHe- zrVWE$i?Co4nCw$va{HbAG{N`r#210WKFOChP4vA2@rq}>5)>i%OzAsLi&mLb^iLX` zD^MFWp#xe!5>O}kYK#dq7IH-?2nqXQSBL{-GC{tpjLR}4UrqQQv$->~6*8MAb9;id z!@d{~ae!ddjF_i2s1dg&o1)fLl~PeGjFp^4YYEG<*|C{yUcZx_uf1c!O4@}51ikcE zu$nGBG@K=vww&||Dw*YiXO$cr8_(o3w=%O?{r=2!O?DsImIpslRTWE?<9dcufVD2u zLa^Z3tE1+^L@pJ>lCC?(GSqb}>-sWT%ceM{>yOHY-5Fs^E*7Cvu@KpXTY?^uulp3mA92w8vx<84M)Zy>*21Nsb=_bIXaw7+e^*zb9W9aa?Tmm__6f$x?7syiy z?h`+4TBORQc-;5tDP!8HO%#IT&?u@)`n4VqQwJWg?e<^ajZjrzGi!|7<(u|3Vvkv~~>Dw%B6gQm>XZy=W z&y8o?FTIK15|u67aN&;8C9(#VNWv=+c~$?o7cYE}gdl3@ zL*c$j488F9diF5Vea!NaWQzkrkB{0Eps|ExUF1y&NQULGCRjA#qEWWJl-w>3eUz|h zEV#a2MItDwYpVQ3i>e(_7PkfElaH>Cg|^f#B>P&r*?uEFMk6GO636|5m?Ms1m|sEk zP>yYmY>aHG8|wD(?#Rx_uDYY{U2hD&-;h687ylM`=G|jJ%t;T!#J7bLK)Mr2Vv^4* aCxCQEmq7p3W@5P6s~n5G%svtPGyenI1A52+ literal 0 HcmV?d00001 diff --git a/__pycache__/models.cpython-312.pyc b/__pycache__/models.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cac10dda6b34b111fd6d4136c6c071c24d4c4f32 GIT binary patch literal 9066 zcmd^FT~Hg>72Xw+(7zBu7}+7l#&#^g5Mw*B9byv2!K$bh!8Kx##}v{mysK@+Y&|KtX!2FUs}WDC%EW$R|xMv;GcEQS%f-F*HvFDGxqApO3`aZ>ISZ%?ZyWqXO!bJ3!X@kQ7O z7i1xC82<3`2fTlb4aQt5v2m0Qu>_ua$9;luFH9Kkm`@lJ?V#YlQ(EaSEF48C`_rMq z{b4B&%}^c{Lwjmib--AxD(9irw7Hg1E!8{$3z$5$Ra?T_QJxs}6L>Q)F)Bv0q*eA( zzauNPRje3xWJRY~(Jbke`53F(Xp%=>ELn5ljpDMLUot4xtW~YGY;FfDQfO&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%PY)*s@C$gN~Ia3bCpt7M{7D{N`Q;zho6%2CvW}Lk3sJ1lzx>Aqh8W%BVtm4OoJ1` zyGmJNw0T65EaQQL51cDgx#YnA=2LCC-+X)70mF;v7&ic@Pg1h&zI(c~v((P8_xfvpVAbkfYf6U(ka-xYC5a#ASJ zWeL9pfwQO z#fkXgrz9mB@b@1BFe=@_3xU$_A8aigs@QOfRB@(O(i(BKWbES214s^2(p z6Uq{64YZV1L9vM4mc$iszLD?~>E@SUzQ7ur?YN`Z}gFgOJ^_N5Ly z>Uh|ZdNU2N%cB|H(HtLgY#TOC;9RA+0^S!$1O-BgSesj)>NH3VpN=X=Bk!UW6g>PC z0Qo+FhHX%uT-0&df$_+9i{p_cQOeDLk^k(Y1T#DdPuhVYj;?q=0!X*aIB+6E5c)|i&Z>Brv`sN1{gBuiNH(H!@$6WnPlease fill in all fields.' + + contact_message = ContactMessage( + name=name, + email=email, + subject=subject, + message=message + ) + db.session.add(contact_message) + db.session.commit() + + return '''
+ Thank you! Your message has been sent. We'll get back to you soon. +
''' + + # ==================== Blog ==================== + + @app.route('/blog') + def blog_index(): + page = request.args.get('page', 1, type=int) + posts = BlogPost.query.filter_by(published=True)\ + .order_by(BlogPost.created_at.desc())\ + .paginate(page=page, per_page=10, error_out=False) + return render_template('blog/index.html', posts=posts.items) + + @app.route('/blog/search') + def blog_search(): + query = request.args.get('search', '') + if query: + posts = BlogPost.query.filter_by(published=True)\ + .filter(BlogPost.title.ilike(f'%{query}%') | BlogPost.content.ilike(f'%{query}%'))\ + .order_by(BlogPost.created_at.desc())\ + .limit(10).all() + else: + posts = BlogPost.query.filter_by(published=True)\ + .order_by(BlogPost.created_at.desc())\ + .limit(10).all() + return render_template('blog/partials/post_list.html', posts=posts) + + @app.route('/blog/load-more/') + def blog_load_more(page): + posts = BlogPost.query.filter_by(published=True)\ + .order_by(BlogPost.created_at.desc())\ + .paginate(page=page, per_page=10, error_out=False) + return render_template('blog/partials/post_list.html', posts=posts.items) + + @app.route('/blog/') + def blog_post(slug): + post = BlogPost.query.filter_by(slug=slug, published=True).first_or_404() + return render_template('blog/post.html', post=post) + + # ==================== Forum ==================== + + @app.route('/forum') + def forum_index(): + categories = ForumCategory.query.order_by(ForumCategory.order).all() + recent_topics = ForumTopic.query\ + .order_by(ForumTopic.created_at.desc())\ + .limit(5).all() + return render_template('forum/index.html', categories=categories, recent_topics=recent_topics) + + @app.route('/forum/search') + def forum_search(): + query = request.args.get('q', '') + if query: + topics = ForumTopic.query\ + .filter(ForumTopic.title.ilike(f'%{query}%') | ForumTopic.content.ilike(f'%{query}%'))\ + .order_by(ForumTopic.created_at.desc())\ + .limit(10).all() + + if topics: + html = '

Search Results

' + for topic in topics: + html += f''' +
{topic.title}
+
in {topic.category.name}
+
''' + html += '
' + return html + else: + return '
No topics found matching your search.
' + return '' + + @app.route('/forum/') + def forum_category(slug): + category = ForumCategory.query.filter_by(slug=slug).first_or_404() + page = request.args.get('page', 1, type=int) + topics = ForumTopic.query.filter_by(category_id=category.id)\ + .order_by(ForumTopic.is_pinned.desc(), ForumTopic.created_at.desc())\ + .paginate(page=page, per_page=20, error_out=False) + return render_template('forum/category.html', category=category, topics=topics) + + @app.route('/forum//new', methods=['POST']) + def forum_create_topic(category_slug): + category = ForumCategory.query.filter_by(slug=category_slug).first_or_404() + + title = request.form.get('title') + content = request.form.get('content') + + if not title or not content: + return '
Please fill in all fields.
' + + # Get or create a default user for demo purposes + user = User.query.first() + if not user: + user = User(username='Guest', email='guest@example.com') + user.set_password('guest') + db.session.add(user) + db.session.commit() + + topic = ForumTopic( + title=title, + content=content, + category_id=category.id, + author_id=user.id + ) + db.session.add(topic) + db.session.commit() + + # Return updated topic list + topics = ForumTopic.query.filter_by(category_id=category.id)\ + .order_by(ForumTopic.is_pinned.desc(), ForumTopic.created_at.desc())\ + .paginate(page=1, per_page=20, error_out=False) + return render_template('forum/partials/topic_list.html', category=category, topics=topics) + + @app.route('/forum//') + def forum_topic(category_slug, topic_id): + topic = ForumTopic.query.get_or_404(topic_id) + replies = topic.replies.order_by(ForumReply.created_at.asc()).all() + return render_template('forum/topic.html', topic=topic, replies=replies) + + @app.route('/forum///reply', methods=['POST']) + def forum_add_reply(category_slug, topic_id): + topic = ForumTopic.query.get_or_404(topic_id) + + if topic.is_locked: + return '
This topic is locked.
' + + content = request.form.get('content') + if not content: + return '
Please enter a reply.
' + + # Get or create a default user for demo purposes + user = User.query.first() + if not user: + user = User(username='Guest', email='guest@example.com') + user.set_password('guest') + db.session.add(user) + db.session.commit() + + reply = ForumReply( + content=content, + topic_id=topic.id, + author_id=user.id + ) + db.session.add(reply) + db.session.commit() + + # Return the new reply as HTML + return f'''
+
+
+ {reply.author.username[0].upper()} +
+
+
+
{reply.author.username}
+
{reply.created_at.strftime('%B %d, %Y at %H:%M')}
+
+
+ {reply.content} +
+
+
+
''' + + return app + + +def seed_data(): + """Seed the database with sample data if empty.""" + if User.query.first() is None: + # Create admin user + admin = User(username='admin', email='admin@directlx.dev', is_admin=True) + admin.set_password('admin123') + db.session.add(admin) + + # Create sample blog posts + posts = [ + { + 'title': 'Getting Started with Flask and HTMX', + 'slug': 'getting-started-flask-htmx', + 'excerpt': 'Learn how to build modern, interactive web applications using Flask and HTMX.', + 'content': '''

Flask and HTMX make a powerful combination for building interactive web applications without the complexity of a JavaScript framework.

+

Why HTMX?

+

HTMX allows you to access modern browser features directly from HTML, making it easy to build dynamic user interfaces with minimal JavaScript.

+

Getting Started

+

First, create a new Flask project and install the required dependencies. Then, add HTMX to your templates and start building interactive features.

''', + 'published': True + }, + { + 'title': 'Building Scalable APIs with Python', + 'slug': 'building-scalable-apis-python', + 'excerpt': 'Best practices for designing and building scalable REST APIs using Python.', + 'content': '''

Building scalable APIs requires careful planning and adherence to best practices.

+

Design Principles

+

Follow REST principles, use proper HTTP methods, and design your endpoints to be intuitive and consistent.

+

Performance Considerations

+

Implement caching, pagination, and rate limiting to ensure your API can handle high traffic.

''', + 'published': True + }, + { + 'title': 'The Future of Web Development', + 'slug': 'future-web-development', + 'excerpt': 'Exploring emerging trends and technologies shaping the future of web development.', + 'content': '''

The web development landscape is constantly evolving. Let's explore what's next.

+

Emerging Trends

+

From WebAssembly to edge computing, new technologies are changing how we build web applications.

+

What This Means for Developers

+

Staying current with these trends will help you build better applications and advance your career.

''', + 'published': True + } + ] + + for post_data in posts: + post = BlogPost(author_id=1, **post_data) + db.session.add(post) + + # Create forum categories + categories = [ + {'name': 'General Discussion', 'slug': 'general', 'description': 'General topics and discussions about software development.', 'order': 1}, + {'name': 'Help & Support', 'slug': 'help', 'description': 'Get help with technical problems and questions.', 'order': 2}, + {'name': 'Showcase', 'slug': 'showcase', 'description': 'Share your projects and get feedback from the community.', 'order': 3}, + {'name': 'Off Topic', 'slug': 'off-topic', 'description': 'Everything else that doesn\'t fit elsewhere.', 'order': 4} + ] + + for cat_data in categories: + category = ForumCategory(**cat_data) + db.session.add(category) + + db.session.commit() + + # Create sample forum topics + general = ForumCategory.query.filter_by(slug='general').first() + if general: + topic = ForumTopic( + title='Welcome to the DirectLX Community!', + content='Welcome everyone! This is a place to discuss software development, share knowledge, and connect with other developers. Feel free to introduce yourself!', + category_id=general.id, + author_id=1, + is_pinned=True + ) + db.session.add(topic) + db.session.commit() + + +# Create the application instance +app = create_app() + +if __name__ == '__main__': + app.run(debug=True, port=5000) diff --git a/config.py b/config.py new file mode 100644 index 0000000..ab0b656 --- /dev/null +++ b/config.py @@ -0,0 +1,32 @@ +import os + +basedir = os.path.abspath(os.path.dirname(__file__)) + + +class Config: + SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-secret-key-change-in-production' + SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \ + 'sqlite:///' + os.path.join(basedir, 'instance', 'directlx.db') + SQLALCHEMY_TRACK_MODIFICATIONS = False + + +class DevelopmentConfig(Config): + DEBUG = True + + +class ProductionConfig(Config): + DEBUG = False + + @property + def SECRET_KEY(self): + key = os.environ.get('SECRET_KEY') + if not key: + raise ValueError('SECRET_KEY environment variable must be set in production') + return key + + +config = { + 'development': DevelopmentConfig, + 'production': ProductionConfig, + 'default': DevelopmentConfig +} diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..5b74176 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,60 @@ +#!/bin/bash +set -e + +# DirectLX.dev Deployment Script +# Run as root or with sudo + +DEPLOY_DIR="/var/www/html/directlx.dev" +SOURCE_DIR="$(cd "$(dirname "$0")" && pwd)" + +echo "=== Deploying DirectLX.dev ===" + +# Create deployment directory +mkdir -p "$DEPLOY_DIR" + +# Copy application files +echo "Copying application files..." +cp -r "$SOURCE_DIR"/{app.py,config.py,models.py,wsgi.py,requirements.txt,templates,static} "$DEPLOY_DIR/" +mkdir -p "$DEPLOY_DIR/instance" + +# Create .env file if it doesn't exist +if [ ! -f "$DEPLOY_DIR/.env" ]; then + echo "Creating .env file with generated secret key..." + SECRET_KEY=$(python3 -c "import secrets; print(secrets.token_hex(32))") + echo "SECRET_KEY=$SECRET_KEY" > "$DEPLOY_DIR/.env" +fi + +# Set up Python virtual environment +echo "Setting up Python virtual environment..." +cd "$DEPLOY_DIR" +python3 -m venv venv +source venv/bin/activate +pip install -r requirements.txt + +# Set permissions +echo "Setting permissions..." +chown -R www-data:www-data "$DEPLOY_DIR" +chmod -R 755 "$DEPLOY_DIR" + +# Install systemd service +echo "Installing systemd service..." +cp "$SOURCE_DIR/directlx.service" /etc/systemd/system/ +systemctl daemon-reload +systemctl enable directlx +systemctl restart directlx + +# Install nginx configuration +echo "Installing nginx configuration..." +cp "$SOURCE_DIR/nginx.conf" /etc/nginx/sites-available/directlx.dev +ln -sf /etc/nginx/sites-available/directlx.dev /etc/nginx/sites-enabled/ + +# Test and reload nginx +nginx -t && systemctl reload nginx + +echo "=== Deployment complete ===" +echo "Site should be available at http://directlx.dev" +echo "" +echo "Useful commands:" +echo " systemctl status directlx - Check app status" +echo " journalctl -u directlx -f - View app logs" +echo " systemctl restart directlx - Restart app" diff --git a/directlx.service b/directlx.service new file mode 100644 index 0000000..0efbcba --- /dev/null +++ b/directlx.service @@ -0,0 +1,16 @@ +[Unit] +Description=DirectLX.dev Gunicorn Service +After=network.target + +[Service] +User=www-data +Group=www-data +WorkingDirectory=/var/www/html/directlx.dev +Environment="PATH=/var/www/html/directlx.dev/venv/bin" +EnvironmentFile=/var/www/html/directlx.dev/.env +ExecStart=/var/www/html/directlx.dev/venv/bin/gunicorn --workers 3 --bind 127.0.0.1:8000 wsgi:app +Restart=always +RestartSec=5 + +[Install] +WantedBy=multi-user.target diff --git a/instance/directlx.db b/instance/directlx.db new file mode 100644 index 0000000000000000000000000000000000000000..6cb193413c9c62c29c3187f378b7943a27265ecb GIT binary patch literal 45056 zcmeI5&u`nv6~{@-Yg<|;>Ln1`MUZi@+t`4mh>|7QX_{RnmL0c_?O4jMEf&Iv97?Py zlHrh+b=ZTQWYOMQpnpNpJ@mgQ&~p#_7c9`@qSvB5_RUa|CB;mDT)IdeAz9SSa5(St z-V7z`>zVq)T`OS3bp0+3NKyHTqN>UlgeZ!#0MC!%Io#%8XLk4oUe&SvxZMRMcl`TH z>HjLJ`M)Zc|B(Ji`p=i1UEW`;rv9|Jn4Ez`+>ihgKmter2_S)Z0%wm?^O+kr)R#vA zZP^Si*kQNnGtagdpLp}}y~A3yQ6r7&-QAkFu%DMB%c-Pgke$6oZM$|z_VycO@6qn= zDoG`E*9n*tkVfq(B#vbSu4n1Zn4@SIbX-3!SN9nWn9+m}7Mswb#?FJ9I92Ew7bPDY z?mVa-J|n-bJtNDOu_B6Y?H|^5w)aHZ@~|N*+rm>R0Aup8F^eiym!BPxLnBRS0>oTLe~LM z+x7c#WJgwA?8}R}TfFI6j>8OccYlAkR^1bXA<=gAqshd#xnit&6Idf&gItKqcl5|v zI6t3RT2fz?q(@q|+irR;5BT}s!h|=@)87!`Z}A1U!}dFPik;}p_kz)pCGfG}`c58- z=^0+wvMt_uyN@32?L2%`Bg?{;*ZR+>MH4O??+L|)xy<&Gs#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jWDt>J6xPSbUYh+FU{f?19(rHyQ_|%fLc|ugW&T zYHgx=DMg0p_F!E;&?3wB5!el_z&d8Kr07l-7wdV(H}-(}5PV%32=_#JSnVx}-q4H&0H4Myjp{iab9);c@4~yCeRWM>(U1*Dl4(L@57lVatG8{)Y=;11CS zLh;ssoHTS~8h8>M0ig!I6#Z$U_X@$dka7>C=HQMK(3*>`N6D|~F|Etx{6LNlizUMH zbw}~;f70ngh&_1vd91fZE} zmgVzcl|<_~0xmJUM?MGBB z!iLcQC(_?4>A$7FP5%==@E`#sfCP{L5MLu!JAKwwkq9d@6Rd&61(mWCxj6zBI{hb={7FVK5|_QM8+ zgZQ0)Fg4$W6Y{MRkXC_U=E!k-wvePnx*AaQI572KB#&_6' + + +class BlogPost(db.Model): + __tablename__ = 'blog_posts' + + id = db.Column(db.Integer, primary_key=True) + title = db.Column(db.String(200), nullable=False) + slug = db.Column(db.String(200), unique=True, nullable=False) + content = db.Column(db.Text, nullable=False) + excerpt = db.Column(db.String(500)) + author_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False) + created_at = db.Column(db.DateTime, default=datetime.utcnow) + updated_at = db.Column(db.DateTime, default=datetime.utcnow, onupdate=datetime.utcnow) + published = db.Column(db.Boolean, default=False) + + def __repr__(self): + return f'' + + +class ForumCategory(db.Model): + __tablename__ = 'forum_categories' + + id = db.Column(db.Integer, primary_key=True) + name = db.Column(db.String(100), nullable=False) + slug = db.Column(db.String(100), unique=True, nullable=False) + description = db.Column(db.String(500)) + order = db.Column(db.Integer, default=0) + + # Relationships + topics = db.relationship('ForumTopic', backref='category', lazy='dynamic') + + def __repr__(self): + return f'' + + +class ForumTopic(db.Model): + __tablename__ = 'forum_topics' + + id = db.Column(db.Integer, primary_key=True) + title = db.Column(db.String(200), nullable=False) + content = db.Column(db.Text, nullable=False) + category_id = db.Column(db.Integer, db.ForeignKey('forum_categories.id'), nullable=False) + author_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False) + created_at = db.Column(db.DateTime, default=datetime.utcnow) + is_pinned = db.Column(db.Boolean, default=False) + is_locked = db.Column(db.Boolean, default=False) + + # Relationships + replies = db.relationship('ForumReply', backref='topic', lazy='dynamic', order_by='ForumReply.created_at') + + @property + def reply_count(self): + return self.replies.count() + + @property + def last_activity(self): + last_reply = self.replies.order_by(ForumReply.created_at.desc()).first() + return last_reply.created_at if last_reply else self.created_at + + def __repr__(self): + return f'' + + +class ForumReply(db.Model): + __tablename__ = 'forum_replies' + + id = db.Column(db.Integer, primary_key=True) + content = db.Column(db.Text, nullable=False) + topic_id = db.Column(db.Integer, db.ForeignKey('forum_topics.id'), nullable=False) + author_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False) + created_at = db.Column(db.DateTime, default=datetime.utcnow) + updated_at = db.Column(db.DateTime, default=datetime.utcnow, onupdate=datetime.utcnow) + + def __repr__(self): + return f'' + + +class ContactMessage(db.Model): + __tablename__ = 'contact_messages' + + id = db.Column(db.Integer, primary_key=True) + name = db.Column(db.String(100), nullable=False) + email = db.Column(db.String(120), nullable=False) + subject = db.Column(db.String(200), nullable=False) + message = db.Column(db.Text, nullable=False) + created_at = db.Column(db.DateTime, default=datetime.utcnow) + read = db.Column(db.Boolean, default=False) + + def __repr__(self): + return f'' diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..579a252 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,22 @@ +server { + listen 80; + server_name directlx.dev www.directlx.dev; + + # Static files served directly by nginx + location /static { + alias /var/www/html/directlx.dev/static; + expires 30d; + add_header Cache-Control "public, immutable"; + } + + # Proxy all other requests to gunicorn + location / { + proxy_pass http://127.0.0.1:8000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_connect_timeout 300s; + proxy_read_timeout 300s; + } +} diff --git a/node_modules/.bin/cssesc b/node_modules/.bin/cssesc new file mode 120000 index 0000000..487b689 --- /dev/null +++ b/node_modules/.bin/cssesc @@ -0,0 +1 @@ +../cssesc/bin/cssesc \ No newline at end of file diff --git a/node_modules/.bin/jiti b/node_modules/.bin/jiti new file mode 120000 index 0000000..031ee3f --- /dev/null +++ b/node_modules/.bin/jiti @@ -0,0 +1 @@ +../jiti/bin/jiti.js \ No newline at end of file diff --git a/node_modules/.bin/nanoid b/node_modules/.bin/nanoid new file mode 120000 index 0000000..e2be547 --- /dev/null +++ b/node_modules/.bin/nanoid @@ -0,0 +1 @@ +../nanoid/bin/nanoid.cjs \ No newline at end of file diff --git a/node_modules/.bin/resolve b/node_modules/.bin/resolve new file mode 120000 index 0000000..b6afda6 --- /dev/null +++ b/node_modules/.bin/resolve @@ -0,0 +1 @@ +../resolve/bin/resolve \ No newline at end of file diff --git a/node_modules/.bin/sucrase b/node_modules/.bin/sucrase new file mode 120000 index 0000000..0ac7e77 --- /dev/null +++ b/node_modules/.bin/sucrase @@ -0,0 +1 @@ +../sucrase/bin/sucrase \ No newline at end of file diff --git a/node_modules/.bin/sucrase-node b/node_modules/.bin/sucrase-node new file mode 120000 index 0000000..8b96fae --- /dev/null +++ b/node_modules/.bin/sucrase-node @@ -0,0 +1 @@ +../sucrase/bin/sucrase-node \ No newline at end of file diff --git a/node_modules/.bin/tailwind b/node_modules/.bin/tailwind new file mode 120000 index 0000000..d497797 --- /dev/null +++ b/node_modules/.bin/tailwind @@ -0,0 +1 @@ +../tailwindcss/lib/cli.js \ No newline at end of file diff --git a/node_modules/.bin/tailwindcss b/node_modules/.bin/tailwindcss new file mode 120000 index 0000000..d497797 --- /dev/null +++ b/node_modules/.bin/tailwindcss @@ -0,0 +1 @@ +../tailwindcss/lib/cli.js \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..73d3a4b --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,998 @@ +{ + "name": "directlx-dev", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jiti": { + "version": "1.21.7", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz", + "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-import": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", + "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-js": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.1.0.tgz", + "integrity": "sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, + "node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.1.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/postcss-nested": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", + "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sucrase": { + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", + "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tailwindcss": { + "version": "3.4.19", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.19.tgz", + "integrity": "sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "arg": "^5.0.2", + "chokidar": "^3.6.0", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.3.2", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "jiti": "^1.21.7", + "lilconfig": "^3.1.3", + "micromatch": "^4.0.8", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.1.1", + "postcss": "^8.4.47", + "postcss-import": "^15.1.0", + "postcss-js": "^4.0.1", + "postcss-load-config": "^4.0.2 || ^5.0 || ^6.0", + "postcss-nested": "^6.2.0", + "postcss-selector-parser": "^6.1.2", + "resolve": "^1.22.8", + "sucrase": "^3.35.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/node_modules/@alloc/quick-lru/index.d.ts b/node_modules/@alloc/quick-lru/index.d.ts new file mode 100644 index 0000000..eb819ba --- /dev/null +++ b/node_modules/@alloc/quick-lru/index.d.ts @@ -0,0 +1,128 @@ +declare namespace QuickLRU { + interface Options { + /** + The maximum number of milliseconds an item should remain in the cache. + + @default Infinity + + By default, `maxAge` will be `Infinity`, which means that items will never expire. + Lazy expiration upon the next write or read call. + + Individual expiration of an item can be specified by the `set(key, value, maxAge)` method. + */ + readonly maxAge?: number; + + /** + The maximum number of items before evicting the least recently used items. + */ + readonly maxSize: number; + + /** + Called right before an item is evicted from the cache. + + Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`). + */ + onEviction?: (key: KeyType, value: ValueType) => void; + } +} + +declare class QuickLRU + implements Iterable<[KeyType, ValueType]> { + /** + The stored item count. + */ + readonly size: number; + + /** + Simple ["Least Recently Used" (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29). + + The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop. + + @example + ``` + import QuickLRU = require('quick-lru'); + + const lru = new QuickLRU({maxSize: 1000}); + + lru.set('🦄', '🌈'); + + lru.has('🦄'); + //=> true + + lru.get('🦄'); + //=> '🌈' + ``` + */ + constructor(options: QuickLRU.Options); + + [Symbol.iterator](): IterableIterator<[KeyType, ValueType]>; + + /** + Set an item. Returns the instance. + + Individual expiration of an item can be specified with the `maxAge` option. If not specified, the global `maxAge` value will be used in case it is specified in the constructor, otherwise the item will never expire. + + @returns The list instance. + */ + set(key: KeyType, value: ValueType, options?: {maxAge?: number}): this; + + /** + Get an item. + + @returns The stored item or `undefined`. + */ + get(key: KeyType): ValueType | undefined; + + /** + Check if an item exists. + */ + has(key: KeyType): boolean; + + /** + Get an item without marking it as recently used. + + @returns The stored item or `undefined`. + */ + peek(key: KeyType): ValueType | undefined; + + /** + Delete an item. + + @returns `true` if the item is removed or `false` if the item doesn't exist. + */ + delete(key: KeyType): boolean; + + /** + Delete all items. + */ + clear(): void; + + /** + Update the `maxSize` in-place, discarding items as necessary. Insertion order is mostly preserved, though this is not a strong guarantee. + + Useful for on-the-fly tuning of cache sizes in live systems. + */ + resize(maxSize: number): void; + + /** + Iterable for all the keys. + */ + keys(): IterableIterator; + + /** + Iterable for all the values. + */ + values(): IterableIterator; + + /** + Iterable for all entries, starting with the oldest (ascending in recency). + */ + entriesAscending(): IterableIterator<[KeyType, ValueType]>; + + /** + Iterable for all entries, starting with the newest (descending in recency). + */ + entriesDescending(): IterableIterator<[KeyType, ValueType]>; +} + +export = QuickLRU; diff --git a/node_modules/@alloc/quick-lru/index.js b/node_modules/@alloc/quick-lru/index.js new file mode 100644 index 0000000..7eeced2 --- /dev/null +++ b/node_modules/@alloc/quick-lru/index.js @@ -0,0 +1,263 @@ +'use strict'; + +class QuickLRU { + constructor(options = {}) { + if (!(options.maxSize && options.maxSize > 0)) { + throw new TypeError('`maxSize` must be a number greater than 0'); + } + + if (typeof options.maxAge === 'number' && options.maxAge === 0) { + throw new TypeError('`maxAge` must be a number greater than 0'); + } + + this.maxSize = options.maxSize; + this.maxAge = options.maxAge || Infinity; + this.onEviction = options.onEviction; + this.cache = new Map(); + this.oldCache = new Map(); + this._size = 0; + } + + _emitEvictions(cache) { + if (typeof this.onEviction !== 'function') { + return; + } + + for (const [key, item] of cache) { + this.onEviction(key, item.value); + } + } + + _deleteIfExpired(key, item) { + if (typeof item.expiry === 'number' && item.expiry <= Date.now()) { + if (typeof this.onEviction === 'function') { + this.onEviction(key, item.value); + } + + return this.delete(key); + } + + return false; + } + + _getOrDeleteIfExpired(key, item) { + const deleted = this._deleteIfExpired(key, item); + if (deleted === false) { + return item.value; + } + } + + _getItemValue(key, item) { + return item.expiry ? this._getOrDeleteIfExpired(key, item) : item.value; + } + + _peek(key, cache) { + const item = cache.get(key); + + return this._getItemValue(key, item); + } + + _set(key, value) { + this.cache.set(key, value); + this._size++; + + if (this._size >= this.maxSize) { + this._size = 0; + this._emitEvictions(this.oldCache); + this.oldCache = this.cache; + this.cache = new Map(); + } + } + + _moveToRecent(key, item) { + this.oldCache.delete(key); + this._set(key, item); + } + + * _entriesAscending() { + for (const item of this.oldCache) { + const [key, value] = item; + if (!this.cache.has(key)) { + const deleted = this._deleteIfExpired(key, value); + if (deleted === false) { + yield item; + } + } + } + + for (const item of this.cache) { + const [key, value] = item; + const deleted = this._deleteIfExpired(key, value); + if (deleted === false) { + yield item; + } + } + } + + get(key) { + if (this.cache.has(key)) { + const item = this.cache.get(key); + + return this._getItemValue(key, item); + } + + if (this.oldCache.has(key)) { + const item = this.oldCache.get(key); + if (this._deleteIfExpired(key, item) === false) { + this._moveToRecent(key, item); + return item.value; + } + } + } + + set(key, value, {maxAge = this.maxAge === Infinity ? undefined : Date.now() + this.maxAge} = {}) { + if (this.cache.has(key)) { + this.cache.set(key, { + value, + maxAge + }); + } else { + this._set(key, {value, expiry: maxAge}); + } + } + + has(key) { + if (this.cache.has(key)) { + return !this._deleteIfExpired(key, this.cache.get(key)); + } + + if (this.oldCache.has(key)) { + return !this._deleteIfExpired(key, this.oldCache.get(key)); + } + + return false; + } + + peek(key) { + if (this.cache.has(key)) { + return this._peek(key, this.cache); + } + + if (this.oldCache.has(key)) { + return this._peek(key, this.oldCache); + } + } + + delete(key) { + const deleted = this.cache.delete(key); + if (deleted) { + this._size--; + } + + return this.oldCache.delete(key) || deleted; + } + + clear() { + this.cache.clear(); + this.oldCache.clear(); + this._size = 0; + } + + resize(newSize) { + if (!(newSize && newSize > 0)) { + throw new TypeError('`maxSize` must be a number greater than 0'); + } + + const items = [...this._entriesAscending()]; + const removeCount = items.length - newSize; + if (removeCount < 0) { + this.cache = new Map(items); + this.oldCache = new Map(); + this._size = items.length; + } else { + if (removeCount > 0) { + this._emitEvictions(items.slice(0, removeCount)); + } + + this.oldCache = new Map(items.slice(removeCount)); + this.cache = new Map(); + this._size = 0; + } + + this.maxSize = newSize; + } + + * keys() { + for (const [key] of this) { + yield key; + } + } + + * values() { + for (const [, value] of this) { + yield value; + } + } + + * [Symbol.iterator]() { + for (const item of this.cache) { + const [key, value] = item; + const deleted = this._deleteIfExpired(key, value); + if (deleted === false) { + yield [key, value.value]; + } + } + + for (const item of this.oldCache) { + const [key, value] = item; + if (!this.cache.has(key)) { + const deleted = this._deleteIfExpired(key, value); + if (deleted === false) { + yield [key, value.value]; + } + } + } + } + + * entriesDescending() { + let items = [...this.cache]; + for (let i = items.length - 1; i >= 0; --i) { + const item = items[i]; + const [key, value] = item; + const deleted = this._deleteIfExpired(key, value); + if (deleted === false) { + yield [key, value.value]; + } + } + + items = [...this.oldCache]; + for (let i = items.length - 1; i >= 0; --i) { + const item = items[i]; + const [key, value] = item; + if (!this.cache.has(key)) { + const deleted = this._deleteIfExpired(key, value); + if (deleted === false) { + yield [key, value.value]; + } + } + } + } + + * entriesAscending() { + for (const [key, value] of this._entriesAscending()) { + yield [key, value.value]; + } + } + + get size() { + if (!this._size) { + return this.oldCache.size; + } + + let oldCacheSize = 0; + for (const key of this.oldCache.keys()) { + if (!this.cache.has(key)) { + oldCacheSize++; + } + } + + return Math.min(this._size + oldCacheSize, this.maxSize); + } +} + +module.exports = QuickLRU; diff --git a/node_modules/@alloc/quick-lru/license b/node_modules/@alloc/quick-lru/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/@alloc/quick-lru/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@alloc/quick-lru/package.json b/node_modules/@alloc/quick-lru/package.json new file mode 100644 index 0000000..21f1072 --- /dev/null +++ b/node_modules/@alloc/quick-lru/package.json @@ -0,0 +1,43 @@ +{ + "name": "@alloc/quick-lru", + "version": "5.2.0", + "description": "Simple “Least Recently Used” (LRU) cache", + "license": "MIT", + "repository": "sindresorhus/quick-lru", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "xo && nyc ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "lru", + "quick", + "cache", + "caching", + "least", + "recently", + "used", + "fast", + "map", + "hash", + "buffer" + ], + "devDependencies": { + "ava": "^2.0.0", + "coveralls": "^3.0.3", + "nyc": "^15.0.0", + "tsd": "^0.11.0", + "xo": "^0.26.0" + } +} diff --git a/node_modules/@alloc/quick-lru/readme.md b/node_modules/@alloc/quick-lru/readme.md new file mode 100644 index 0000000..7187ba5 --- /dev/null +++ b/node_modules/@alloc/quick-lru/readme.md @@ -0,0 +1,139 @@ +# quick-lru [![Build Status](https://travis-ci.org/sindresorhus/quick-lru.svg?branch=master)](https://travis-ci.org/sindresorhus/quick-lru) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/quick-lru/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/quick-lru?branch=master) + +> Simple [“Least Recently Used” (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29) + +Useful when you need to cache something and limit memory usage. + +Inspired by the [`hashlru` algorithm](https://github.com/dominictarr/hashlru#algorithm), but instead uses [`Map`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map) to support keys of any type, not just strings, and values can be `undefined`. + +## Install + +``` +$ npm install quick-lru +``` + +## Usage + +```js +const QuickLRU = require('quick-lru'); + +const lru = new QuickLRU({maxSize: 1000}); + +lru.set('🦄', '🌈'); + +lru.has('🦄'); +//=> true + +lru.get('🦄'); +//=> '🌈' +``` + +## API + +### new QuickLRU(options?) + +Returns a new instance. + +### options + +Type: `object` + +#### maxSize + +*Required*\ +Type: `number` + +The maximum number of items before evicting the least recently used items. + +#### maxAge + +Type: `number`\ +Default: `Infinity` + +The maximum number of milliseconds an item should remain in cache. +By default maxAge will be Infinity, which means that items will never expire. + +Lazy expiration happens upon the next `write` or `read` call. + +Individual expiration of an item can be specified by the `set(key, value, options)` method. + +#### onEviction + +*Optional*\ +Type: `(key, value) => void` + +Called right before an item is evicted from the cache. + +Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`). + +### Instance + +The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop. + +Both `key` and `value` can be of any type. + +#### .set(key, value, options?) + +Set an item. Returns the instance. + +Individual expiration of an item can be specified with the `maxAge` option. If not specified, the global `maxAge` value will be used in case it is specified on the constructor, otherwise the item will never expire. + +#### .get(key) + +Get an item. + +#### .has(key) + +Check if an item exists. + +#### .peek(key) + +Get an item without marking it as recently used. + +#### .delete(key) + +Delete an item. + +Returns `true` if the item is removed or `false` if the item doesn't exist. + +#### .clear() + +Delete all items. + +#### .resize(maxSize) + +Update the `maxSize`, discarding items as necessary. Insertion order is mostly preserved, though this is not a strong guarantee. + +Useful for on-the-fly tuning of cache sizes in live systems. + +#### .keys() + +Iterable for all the keys. + +#### .values() + +Iterable for all the values. + +#### .entriesAscending() + +Iterable for all entries, starting with the oldest (ascending in recency). + +#### .entriesDescending() + +Iterable for all entries, starting with the newest (descending in recency). + +#### .size + +The stored item count. + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/@jridgewell/gen-mapping/LICENSE b/node_modules/@jridgewell/gen-mapping/LICENSE new file mode 100644 index 0000000..1f6ce94 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/LICENSE @@ -0,0 +1,19 @@ +Copyright 2024 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@jridgewell/gen-mapping/README.md b/node_modules/@jridgewell/gen-mapping/README.md new file mode 100644 index 0000000..93692b1 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/README.md @@ -0,0 +1,227 @@ +# @jridgewell/gen-mapping + +> Generate source maps + +`gen-mapping` allows you to generate a source map during transpilation or minification. +With a source map, you're able to trace the original location in the source file, either in Chrome's +DevTools or using a library like [`@jridgewell/trace-mapping`][trace-mapping]. + +You may already be familiar with the [`source-map`][source-map] package's `SourceMapGenerator`. This +provides the same `addMapping` and `setSourceContent` API. + +## Installation + +```sh +npm install @jridgewell/gen-mapping +``` + +## Usage + +```typescript +import { GenMapping, addMapping, setSourceContent, toEncodedMap, toDecodedMap } from '@jridgewell/gen-mapping'; + +const map = new GenMapping({ + file: 'output.js', + sourceRoot: 'https://example.com/', +}); + +setSourceContent(map, 'input.js', `function foo() {}`); + +addMapping(map, { + // Lines start at line 1, columns at column 0. + generated: { line: 1, column: 0 }, + source: 'input.js', + original: { line: 1, column: 0 }, +}); + +addMapping(map, { + generated: { line: 1, column: 9 }, + source: 'input.js', + original: { line: 1, column: 9 }, + name: 'foo', +}); + +assert.deepEqual(toDecodedMap(map), { + version: 3, + file: 'output.js', + names: ['foo'], + sourceRoot: 'https://example.com/', + sources: ['input.js'], + sourcesContent: ['function foo() {}'], + mappings: [ + [ [0, 0, 0, 0], [9, 0, 0, 9, 0] ] + ], +}); + +assert.deepEqual(toEncodedMap(map), { + version: 3, + file: 'output.js', + names: ['foo'], + sourceRoot: 'https://example.com/', + sources: ['input.js'], + sourcesContent: ['function foo() {}'], + mappings: 'AAAA,SAASA', +}); +``` + +### Smaller Sourcemaps + +Not everything needs to be added to a sourcemap, and needless markings can cause signficantly +larger file sizes. `gen-mapping` exposes `maybeAddSegment`/`maybeAddMapping` APIs that will +intelligently determine if this marking adds useful information. If not, the marking will be +skipped. + +```typescript +import { maybeAddMapping } from '@jridgewell/gen-mapping'; + +const map = new GenMapping(); + +// Adding a sourceless marking at the beginning of a line isn't useful. +maybeAddMapping(map, { + generated: { line: 1, column: 0 }, +}); + +// Adding a new source marking is useful. +maybeAddMapping(map, { + generated: { line: 1, column: 0 }, + source: 'input.js', + original: { line: 1, column: 0 }, +}); + +// But adding another marking pointing to the exact same original location isn't, even if the +// generated column changed. +maybeAddMapping(map, { + generated: { line: 1, column: 9 }, + source: 'input.js', + original: { line: 1, column: 0 }, +}); + +assert.deepEqual(toEncodedMap(map), { + version: 3, + names: [], + sources: ['input.js'], + sourcesContent: [null], + mappings: 'AAAA', +}); +``` + +## Benchmarks + +``` +node v18.0.0 + +amp.js.map +Memory Usage: +gen-mapping: addSegment 5852872 bytes +gen-mapping: addMapping 7716042 bytes +source-map-js 6143250 bytes +source-map-0.6.1 6124102 bytes +source-map-0.8.0 6121173 bytes +Smallest memory usage is gen-mapping: addSegment + +Adding speed: +gen-mapping: addSegment x 441 ops/sec ±2.07% (90 runs sampled) +gen-mapping: addMapping x 350 ops/sec ±2.40% (86 runs sampled) +source-map-js: addMapping x 169 ops/sec ±2.42% (80 runs sampled) +source-map-0.6.1: addMapping x 167 ops/sec ±2.56% (80 runs sampled) +source-map-0.8.0: addMapping x 168 ops/sec ±2.52% (80 runs sampled) +Fastest is gen-mapping: addSegment + +Generate speed: +gen-mapping: decoded output x 150,824,370 ops/sec ±0.07% (102 runs sampled) +gen-mapping: encoded output x 663 ops/sec ±0.22% (98 runs sampled) +source-map-js: encoded output x 197 ops/sec ±0.45% (84 runs sampled) +source-map-0.6.1: encoded output x 198 ops/sec ±0.33% (85 runs sampled) +source-map-0.8.0: encoded output x 197 ops/sec ±0.06% (93 runs sampled) +Fastest is gen-mapping: decoded output + + +*** + + +babel.min.js.map +Memory Usage: +gen-mapping: addSegment 37578063 bytes +gen-mapping: addMapping 37212897 bytes +source-map-js 47638527 bytes +source-map-0.6.1 47690503 bytes +source-map-0.8.0 47470188 bytes +Smallest memory usage is gen-mapping: addMapping + +Adding speed: +gen-mapping: addSegment x 31.05 ops/sec ±8.31% (43 runs sampled) +gen-mapping: addMapping x 29.83 ops/sec ±7.36% (51 runs sampled) +source-map-js: addMapping x 20.73 ops/sec ±6.22% (38 runs sampled) +source-map-0.6.1: addMapping x 20.03 ops/sec ±10.51% (38 runs sampled) +source-map-0.8.0: addMapping x 19.30 ops/sec ±8.27% (37 runs sampled) +Fastest is gen-mapping: addSegment + +Generate speed: +gen-mapping: decoded output x 381,379,234 ops/sec ±0.29% (96 runs sampled) +gen-mapping: encoded output x 95.15 ops/sec ±2.98% (72 runs sampled) +source-map-js: encoded output x 15.20 ops/sec ±7.41% (33 runs sampled) +source-map-0.6.1: encoded output x 16.36 ops/sec ±10.46% (31 runs sampled) +source-map-0.8.0: encoded output x 16.06 ops/sec ±6.45% (31 runs sampled) +Fastest is gen-mapping: decoded output + + +*** + + +preact.js.map +Memory Usage: +gen-mapping: addSegment 416247 bytes +gen-mapping: addMapping 419824 bytes +source-map-js 1024619 bytes +source-map-0.6.1 1146004 bytes +source-map-0.8.0 1113250 bytes +Smallest memory usage is gen-mapping: addSegment + +Adding speed: +gen-mapping: addSegment x 13,755 ops/sec ±0.15% (98 runs sampled) +gen-mapping: addMapping x 13,013 ops/sec ±0.11% (101 runs sampled) +source-map-js: addMapping x 4,564 ops/sec ±0.21% (98 runs sampled) +source-map-0.6.1: addMapping x 4,562 ops/sec ±0.11% (99 runs sampled) +source-map-0.8.0: addMapping x 4,593 ops/sec ±0.11% (100 runs sampled) +Fastest is gen-mapping: addSegment + +Generate speed: +gen-mapping: decoded output x 379,864,020 ops/sec ±0.23% (93 runs sampled) +gen-mapping: encoded output x 14,368 ops/sec ±4.07% (82 runs sampled) +source-map-js: encoded output x 5,261 ops/sec ±0.21% (99 runs sampled) +source-map-0.6.1: encoded output x 5,124 ops/sec ±0.58% (99 runs sampled) +source-map-0.8.0: encoded output x 5,434 ops/sec ±0.33% (96 runs sampled) +Fastest is gen-mapping: decoded output + + +*** + + +react.js.map +Memory Usage: +gen-mapping: addSegment 975096 bytes +gen-mapping: addMapping 1102981 bytes +source-map-js 2918836 bytes +source-map-0.6.1 2885435 bytes +source-map-0.8.0 2874336 bytes +Smallest memory usage is gen-mapping: addSegment + +Adding speed: +gen-mapping: addSegment x 4,772 ops/sec ±0.15% (100 runs sampled) +gen-mapping: addMapping x 4,456 ops/sec ±0.13% (97 runs sampled) +source-map-js: addMapping x 1,618 ops/sec ±0.24% (97 runs sampled) +source-map-0.6.1: addMapping x 1,622 ops/sec ±0.12% (99 runs sampled) +source-map-0.8.0: addMapping x 1,631 ops/sec ±0.12% (100 runs sampled) +Fastest is gen-mapping: addSegment + +Generate speed: +gen-mapping: decoded output x 379,107,695 ops/sec ±0.07% (99 runs sampled) +gen-mapping: encoded output x 5,421 ops/sec ±1.60% (89 runs sampled) +source-map-js: encoded output x 2,113 ops/sec ±1.81% (98 runs sampled) +source-map-0.6.1: encoded output x 2,126 ops/sec ±0.10% (100 runs sampled) +source-map-0.8.0: encoded output x 2,176 ops/sec ±0.39% (98 runs sampled) +Fastest is gen-mapping: decoded output +``` + +[source-map]: https://www.npmjs.com/package/source-map +[trace-mapping]: https://github.com/jridgewell/sourcemaps/tree/main/packages/trace-mapping diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs new file mode 100644 index 0000000..bbb0cac --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs @@ -0,0 +1,292 @@ +// src/set-array.ts +var SetArray = class { + constructor() { + this._indexes = { __proto__: null }; + this.array = []; + } +}; +function cast(set) { + return set; +} +function get(setarr, key) { + return cast(setarr)._indexes[key]; +} +function put(setarr, key) { + const index = get(setarr, key); + if (index !== void 0) return index; + const { array, _indexes: indexes } = cast(setarr); + const length = array.push(key); + return indexes[key] = length - 1; +} +function remove(setarr, key) { + const index = get(setarr, key); + if (index === void 0) return; + const { array, _indexes: indexes } = cast(setarr); + for (let i = index + 1; i < array.length; i++) { + const k = array[i]; + array[i - 1] = k; + indexes[k]--; + } + indexes[key] = void 0; + array.pop(); +} + +// src/gen-mapping.ts +import { + encode +} from "@jridgewell/sourcemap-codec"; +import { TraceMap, decodedMappings } from "@jridgewell/trace-mapping"; + +// src/sourcemap-segment.ts +var COLUMN = 0; +var SOURCES_INDEX = 1; +var SOURCE_LINE = 2; +var SOURCE_COLUMN = 3; +var NAMES_INDEX = 4; + +// src/gen-mapping.ts +var NO_NAME = -1; +var GenMapping = class { + constructor({ file, sourceRoot } = {}) { + this._names = new SetArray(); + this._sources = new SetArray(); + this._sourcesContent = []; + this._mappings = []; + this.file = file; + this.sourceRoot = sourceRoot; + this._ignoreList = new SetArray(); + } +}; +function cast2(map) { + return map; +} +function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { + return addSegmentInternal( + false, + map, + genLine, + genColumn, + source, + sourceLine, + sourceColumn, + name, + content + ); +} +function addMapping(map, mapping) { + return addMappingInternal(false, map, mapping); +} +var maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { + return addSegmentInternal( + true, + map, + genLine, + genColumn, + source, + sourceLine, + sourceColumn, + name, + content + ); +}; +var maybeAddMapping = (map, mapping) => { + return addMappingInternal(true, map, mapping); +}; +function setSourceContent(map, source, content) { + const { + _sources: sources, + _sourcesContent: sourcesContent + // _originalScopes: originalScopes, + } = cast2(map); + const index = put(sources, source); + sourcesContent[index] = content; +} +function setIgnore(map, source, ignore = true) { + const { + _sources: sources, + _sourcesContent: sourcesContent, + _ignoreList: ignoreList + // _originalScopes: originalScopes, + } = cast2(map); + const index = put(sources, source); + if (index === sourcesContent.length) sourcesContent[index] = null; + if (ignore) put(ignoreList, index); + else remove(ignoreList, index); +} +function toDecodedMap(map) { + const { + _mappings: mappings, + _sources: sources, + _sourcesContent: sourcesContent, + _names: names, + _ignoreList: ignoreList + // _originalScopes: originalScopes, + // _generatedRanges: generatedRanges, + } = cast2(map); + removeEmptyFinalLines(mappings); + return { + version: 3, + file: map.file || void 0, + names: names.array, + sourceRoot: map.sourceRoot || void 0, + sources: sources.array, + sourcesContent, + mappings, + // originalScopes, + // generatedRanges, + ignoreList: ignoreList.array + }; +} +function toEncodedMap(map) { + const decoded = toDecodedMap(map); + return Object.assign({}, decoded, { + // originalScopes: decoded.originalScopes.map((os) => encodeOriginalScopes(os)), + // generatedRanges: encodeGeneratedRanges(decoded.generatedRanges as GeneratedRange[]), + mappings: encode(decoded.mappings) + }); +} +function fromMap(input) { + const map = new TraceMap(input); + const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); + putAll(cast2(gen)._names, map.names); + putAll(cast2(gen)._sources, map.sources); + cast2(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null); + cast2(gen)._mappings = decodedMappings(map); + if (map.ignoreList) putAll(cast2(gen)._ignoreList, map.ignoreList); + return gen; +} +function allMappings(map) { + const out = []; + const { _mappings: mappings, _sources: sources, _names: names } = cast2(map); + for (let i = 0; i < mappings.length; i++) { + const line = mappings[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generated = { line: i + 1, column: seg[COLUMN] }; + let source = void 0; + let original = void 0; + let name = void 0; + if (seg.length !== 1) { + source = sources.array[seg[SOURCES_INDEX]]; + original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; + if (seg.length === 5) name = names.array[seg[NAMES_INDEX]]; + } + out.push({ generated, source, original, name }); + } + } + return out; +} +function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { + const { + _mappings: mappings, + _sources: sources, + _sourcesContent: sourcesContent, + _names: names + // _originalScopes: originalScopes, + } = cast2(map); + const line = getIndex(mappings, genLine); + const index = getColumnIndex(line, genColumn); + if (!source) { + if (skipable && skipSourceless(line, index)) return; + return insert(line, index, [genColumn]); + } + assert(sourceLine); + assert(sourceColumn); + const sourcesIndex = put(sources, source); + const namesIndex = name ? put(names, name) : NO_NAME; + if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null; + if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { + return; + } + return insert( + line, + index, + name ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] : [genColumn, sourcesIndex, sourceLine, sourceColumn] + ); +} +function assert(_val) { +} +function getIndex(arr, index) { + for (let i = arr.length; i <= index; i++) { + arr[i] = []; + } + return arr[index]; +} +function getColumnIndex(line, genColumn) { + let index = line.length; + for (let i = index - 1; i >= 0; index = i--) { + const current = line[i]; + if (genColumn >= current[COLUMN]) break; + } + return index; +} +function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; +} +function removeEmptyFinalLines(mappings) { + const { length } = mappings; + let len = length; + for (let i = len - 1; i >= 0; len = i, i--) { + if (mappings[i].length > 0) break; + } + if (len < length) mappings.length = len; +} +function putAll(setarr, array) { + for (let i = 0; i < array.length; i++) put(setarr, array[i]); +} +function skipSourceless(line, index) { + if (index === 0) return true; + const prev = line[index - 1]; + return prev.length === 1; +} +function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { + if (index === 0) return false; + const prev = line[index - 1]; + if (prev.length === 1) return false; + return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME); +} +function addMappingInternal(skipable, map, mapping) { + const { generated, source, original, name, content } = mapping; + if (!source) { + return addSegmentInternal( + skipable, + map, + generated.line - 1, + generated.column, + null, + null, + null, + null, + null + ); + } + assert(original); + return addSegmentInternal( + skipable, + map, + generated.line - 1, + generated.column, + source, + original.line - 1, + original.column, + name, + content + ); +} +export { + GenMapping, + addMapping, + addSegment, + allMappings, + fromMap, + maybeAddMapping, + maybeAddSegment, + setIgnore, + setSourceContent, + toDecodedMap, + toEncodedMap +}; +//# sourceMappingURL=gen-mapping.mjs.map diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map new file mode 100644 index 0000000..4e37e45 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../src/set-array.ts", "../src/gen-mapping.ts", "../src/sourcemap-segment.ts"], + "mappings": ";AAUO,IAAM,WAAN,MAAoC;AAAA,EAIzC,cAAc;AACZ,SAAK,WAAW,EAAE,WAAW,KAAK;AAClC,SAAK,QAAQ,CAAC;AAAA,EAChB;AACF;AAWA,SAAS,KAAoB,KAAgC;AAC3D,SAAO;AACT;AAKO,SAAS,IAAmB,QAAqB,KAA4B;AAClF,SAAO,KAAK,MAAM,EAAE,SAAS,GAAG;AAClC;AAMO,SAAS,IAAmB,QAAqB,KAAgB;AAEtE,QAAM,QAAQ,IAAI,QAAQ,GAAG;AAC7B,MAAI,UAAU,OAAW,QAAO;AAEhC,QAAM,EAAE,OAAO,UAAU,QAAQ,IAAI,KAAK,MAAM;AAEhD,QAAM,SAAS,MAAM,KAAK,GAAG;AAC7B,SAAQ,QAAQ,GAAG,IAAI,SAAS;AAClC;AAgBO,SAAS,OAAsB,QAAqB,KAAc;AACvE,QAAM,QAAQ,IAAI,QAAQ,GAAG;AAC7B,MAAI,UAAU,OAAW;AAEzB,QAAM,EAAE,OAAO,UAAU,QAAQ,IAAI,KAAK,MAAM;AAChD,WAAS,IAAI,QAAQ,GAAG,IAAI,MAAM,QAAQ,KAAK;AAC7C,UAAM,IAAI,MAAM,CAAC;AACjB,UAAM,IAAI,CAAC,IAAI;AACf,YAAQ,CAAC;AAAA,EACX;AACA,UAAQ,GAAG,IAAI;AACf,QAAM,IAAI;AACZ;;;AChFA;AAAA,EACE;AAAA,OAGK;AACP,SAAS,UAAU,uBAAuB;;;ACKnC,IAAM,SAAS;AACf,IAAM,gBAAgB;AACtB,I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CAAC;AAC7D;AAEA,SAAS,eAAe,MAA0B,OAAwB;AAGxE,MAAI,UAAU,EAAG,QAAO;AAExB,QAAM,OAAO,KAAK,QAAQ,CAAC;AAI3B,SAAO,KAAK,WAAW;AACzB;AAEA,SAAS,WACP,MACA,OACA,cACA,YACA,cACA,YACS;AAET,MAAI,UAAU,EAAG,QAAO;AAExB,QAAM,OAAO,KAAK,QAAQ,CAAC;AAG3B,MAAI,KAAK,WAAW,EAAG,QAAO;AAI9B,SACE,iBAAiB,KAAK,aAAa,KACnC,eAAe,KAAK,WAAW,KAC/B,iBAAiB,KAAK,aAAa,KACnC,gBAAgB,KAAK,WAAW,IAAI,KAAK,WAAW,IAAI;AAE5D;AAEA,SAAS,mBACP,UACA,KACA,SAOA;AACA,QAAM,EAAE,WAAW,QAAQ,UAAU,MAAM,QAAQ,IAAI;AACvD,MAAI,CAAC,QAAQ;AACX,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,UAAU,OAAO;AAAA,MACjB,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,SAAY,QAAQ;AACpB,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,UAAU,OAAO;AAAA,IACjB,UAAU;AAAA,IACV;AAAA,IACA,SAAS,OAAO;AAAA,IAChB,SAAS;AAAA,IACT;AAAA,IACA;AAAA,EACF;AACF;", + "names": ["cast"] +} diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js new file mode 100644 index 0000000..cb84af5 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js @@ -0,0 +1,358 @@ +(function (global, factory) { + if (typeof exports === 'object' && typeof module !== 'undefined') { + factory(module, require('@jridgewell/sourcemap-codec'), require('@jridgewell/trace-mapping')); + module.exports = def(module); + } else if (typeof define === 'function' && define.amd) { + define(['module', '@jridgewell/sourcemap-codec', '@jridgewell/trace-mapping'], function(mod) { + factory.apply(this, arguments); + mod.exports = def(mod); + }); + } else { + const mod = { exports: {} }; + factory(mod, global.sourcemapCodec, global.traceMapping); + global = typeof globalThis !== 'undefined' ? globalThis : global || self; + global.genMapping = def(mod); + } + function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; } +})(this, (function (module, require_sourcemapCodec, require_traceMapping) { +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// umd:@jridgewell/sourcemap-codec +var require_sourcemap_codec = __commonJS({ + "umd:@jridgewell/sourcemap-codec"(exports, module2) { + module2.exports = require_sourcemapCodec; + } +}); + +// umd:@jridgewell/trace-mapping +var require_trace_mapping = __commonJS({ + "umd:@jridgewell/trace-mapping"(exports, module2) { + module2.exports = require_traceMapping; + } +}); + +// src/gen-mapping.ts +var gen_mapping_exports = {}; +__export(gen_mapping_exports, { + GenMapping: () => GenMapping, + addMapping: () => addMapping, + addSegment: () => addSegment, + allMappings: () => allMappings, + fromMap: () => fromMap, + maybeAddMapping: () => maybeAddMapping, + maybeAddSegment: () => maybeAddSegment, + setIgnore: () => setIgnore, + setSourceContent: () => setSourceContent, + toDecodedMap: () => toDecodedMap, + toEncodedMap: () => toEncodedMap +}); +module.exports = __toCommonJS(gen_mapping_exports); + +// src/set-array.ts +var SetArray = class { + constructor() { + this._indexes = { __proto__: null }; + this.array = []; + } +}; +function cast(set) { + return set; +} +function get(setarr, key) { + return cast(setarr)._indexes[key]; +} +function put(setarr, key) { + const index = get(setarr, key); + if (index !== void 0) return index; + const { array, _indexes: indexes } = cast(setarr); + const length = array.push(key); + return indexes[key] = length - 1; +} +function remove(setarr, key) { + const index = get(setarr, key); + if (index === void 0) return; + const { array, _indexes: indexes } = cast(setarr); + for (let i = index + 1; i < array.length; i++) { + const k = array[i]; + array[i - 1] = k; + indexes[k]--; + } + indexes[key] = void 0; + array.pop(); +} + +// src/gen-mapping.ts +var import_sourcemap_codec = __toESM(require_sourcemap_codec()); +var import_trace_mapping = __toESM(require_trace_mapping()); + +// src/sourcemap-segment.ts +var COLUMN = 0; +var SOURCES_INDEX = 1; +var SOURCE_LINE = 2; +var SOURCE_COLUMN = 3; +var NAMES_INDEX = 4; + +// src/gen-mapping.ts +var NO_NAME = -1; +var GenMapping = class { + constructor({ file, sourceRoot } = {}) { + this._names = new SetArray(); + this._sources = new SetArray(); + this._sourcesContent = []; + this._mappings = []; + this.file = file; + this.sourceRoot = sourceRoot; + this._ignoreList = new SetArray(); + } +}; +function cast2(map) { + return map; +} +function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { + return addSegmentInternal( + false, + map, + genLine, + genColumn, + source, + sourceLine, + sourceColumn, + name, + content + ); +} +function addMapping(map, mapping) { + return addMappingInternal(false, map, mapping); +} +var maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { + return addSegmentInternal( + true, + map, + genLine, + genColumn, + source, + sourceLine, + sourceColumn, + name, + content + ); +}; +var maybeAddMapping = (map, mapping) => { + return addMappingInternal(true, map, mapping); +}; +function setSourceContent(map, source, content) { + const { + _sources: sources, + _sourcesContent: sourcesContent + // _originalScopes: originalScopes, + } = cast2(map); + const index = put(sources, source); + sourcesContent[index] = content; +} +function setIgnore(map, source, ignore = true) { + const { + _sources: sources, + _sourcesContent: sourcesContent, + _ignoreList: ignoreList + // _originalScopes: originalScopes, + } = cast2(map); + const index = put(sources, source); + if (index === sourcesContent.length) sourcesContent[index] = null; + if (ignore) put(ignoreList, index); + else remove(ignoreList, index); +} +function toDecodedMap(map) { + const { + _mappings: mappings, + _sources: sources, + _sourcesContent: sourcesContent, + _names: names, + _ignoreList: ignoreList + // _originalScopes: originalScopes, + // _generatedRanges: generatedRanges, + } = cast2(map); + removeEmptyFinalLines(mappings); + return { + version: 3, + file: map.file || void 0, + names: names.array, + sourceRoot: map.sourceRoot || void 0, + sources: sources.array, + sourcesContent, + mappings, + // originalScopes, + // generatedRanges, + ignoreList: ignoreList.array + }; +} +function toEncodedMap(map) { + const decoded = toDecodedMap(map); + return Object.assign({}, decoded, { + // originalScopes: decoded.originalScopes.map((os) => encodeOriginalScopes(os)), + // generatedRanges: encodeGeneratedRanges(decoded.generatedRanges as GeneratedRange[]), + mappings: (0, import_sourcemap_codec.encode)(decoded.mappings) + }); +} +function fromMap(input) { + const map = new import_trace_mapping.TraceMap(input); + const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); + putAll(cast2(gen)._names, map.names); + putAll(cast2(gen)._sources, map.sources); + cast2(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null); + cast2(gen)._mappings = (0, import_trace_mapping.decodedMappings)(map); + if (map.ignoreList) putAll(cast2(gen)._ignoreList, map.ignoreList); + return gen; +} +function allMappings(map) { + const out = []; + const { _mappings: mappings, _sources: sources, _names: names } = cast2(map); + for (let i = 0; i < mappings.length; i++) { + const line = mappings[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generated = { line: i + 1, column: seg[COLUMN] }; + let source = void 0; + let original = void 0; + let name = void 0; + if (seg.length !== 1) { + source = sources.array[seg[SOURCES_INDEX]]; + original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; + if (seg.length === 5) name = names.array[seg[NAMES_INDEX]]; + } + out.push({ generated, source, original, name }); + } + } + return out; +} +function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { + const { + _mappings: mappings, + _sources: sources, + _sourcesContent: sourcesContent, + _names: names + // _originalScopes: originalScopes, + } = cast2(map); + const line = getIndex(mappings, genLine); + const index = getColumnIndex(line, genColumn); + if (!source) { + if (skipable && skipSourceless(line, index)) return; + return insert(line, index, [genColumn]); + } + assert(sourceLine); + assert(sourceColumn); + const sourcesIndex = put(sources, source); + const namesIndex = name ? put(names, name) : NO_NAME; + if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null; + if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { + return; + } + return insert( + line, + index, + name ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] : [genColumn, sourcesIndex, sourceLine, sourceColumn] + ); +} +function assert(_val) { +} +function getIndex(arr, index) { + for (let i = arr.length; i <= index; i++) { + arr[i] = []; + } + return arr[index]; +} +function getColumnIndex(line, genColumn) { + let index = line.length; + for (let i = index - 1; i >= 0; index = i--) { + const current = line[i]; + if (genColumn >= current[COLUMN]) break; + } + return index; +} +function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; +} +function removeEmptyFinalLines(mappings) { + const { length } = mappings; + let len = length; + for (let i = len - 1; i >= 0; len = i, i--) { + if (mappings[i].length > 0) break; + } + if (len < length) mappings.length = len; +} +function putAll(setarr, array) { + for (let i = 0; i < array.length; i++) put(setarr, array[i]); +} +function skipSourceless(line, index) { + if (index === 0) return true; + const prev = line[index - 1]; + return prev.length === 1; +} +function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { + if (index === 0) return false; + const prev = line[index - 1]; + if (prev.length === 1) return false; + return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME); +} +function addMappingInternal(skipable, map, mapping) { + const { generated, source, original, name, content } = mapping; + if (!source) { + return addSegmentInternal( + skipable, + map, + generated.line - 1, + generated.column, + null, + null, + null, + null, + null + ); + } + assert(original); + return addSegmentInternal( + skipable, + map, + generated.line - 1, + generated.column, + source, + original.line - 1, + original.column, + name, + content + ); +} +})); +//# sourceMappingURL=gen-mapping.umd.js.map diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map new file mode 100644 index 0000000..b13750b --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["umd:@jridgewell/sourcemap-codec", "umd:@jridgewell/trace-mapping", "../src/gen-mapping.ts", "../src/set-array.ts", "../src/sourcemap-segment.ts"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,6CAAAA,SAAA;AAAA,IAAAA,QAAO,UAAU;AAAA;AAAA;;;ACAjB;AAAA,2CAAAC,SAAA;AAAA,IAAAA,QAAO,UAAU;AAAA;AAAA;;;ACAjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACUO,IAAM,WAAN,MAAoC;AAAA,EAIzC,cAAc;AACZ,SAAK,WAAW,EAA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Aa,KACnC,gBAAgB,KAAK,WAAW,IAAI,KAAK,WAAW,IAAI;AAE5D;AAEA,SAAS,mBACP,UACA,KACA,SAOA;AACA,QAAM,EAAE,WAAW,QAAQ,UAAU,MAAM,QAAQ,IAAI;AACvD,MAAI,CAAC,QAAQ;AACX,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,UAAU,OAAO;AAAA,MACjB,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,SAAY,QAAQ;AACpB,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,UAAU,OAAO;AAAA,IACjB,UAAU;AAAA,IACV;AAAA,IACA,SAAS,OAAO;AAAA,IAChB,SAAS;AAAA,IACT;AAAA,IACA;AAAA,EACF;AACF;", + "names": ["module", "module", "cast"] +} diff --git a/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts b/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts new file mode 100644 index 0000000..9ba936e --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts @@ -0,0 +1,88 @@ +import type { SourceMapInput } from '@jridgewell/trace-mapping'; +import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types'; +export type { DecodedSourceMap, EncodedSourceMap, Mapping }; +export type Options = { + file?: string | null; + sourceRoot?: string | null; +}; +/** + * Provides the state to generate a sourcemap. + */ +export declare class GenMapping { + private _names; + private _sources; + private _sourcesContent; + private _mappings; + private _ignoreList; + file: string | null | undefined; + sourceRoot: string | null | undefined; + constructor({ file, sourceRoot }?: Options); +} +/** + * A low-level API to associate a generated position with an original source position. Line and + * column here are 0-based, unlike `addMapping`. + */ +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void; +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void; +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void; +/** + * A high-level API to associate a generated position with an original source position. Line is + * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. + */ +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source?: null; + original?: null; + name?: null; + content?: null; +}): void; +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source: string; + original: Pos; + name?: null; + content?: string | null; +}): void; +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source: string; + original: Pos; + name: string; + content?: string | null; +}): void; +/** + * Same as `addSegment`, but will only add the segment if it generates useful information in the + * resulting map. This only works correctly if segments are added **in order**, meaning you should + * not add a segment with a lower generated line/column than one that came before. + */ +export declare const maybeAddSegment: typeof addSegment; +/** + * Same as `addMapping`, but will only add the mapping if it generates useful information in the + * resulting map. This only works correctly if mappings are added **in order**, meaning you should + * not add a mapping with a lower generated line/column than one that came before. + */ +export declare const maybeAddMapping: typeof addMapping; +/** + * Adds/removes the content of the source file to the source map. + */ +export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void; +export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function toDecodedMap(map: GenMapping): DecodedSourceMap; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function toEncodedMap(map: GenMapping): EncodedSourceMap; +/** + * Constructs a new GenMapping, using the already present mappings of the input. + */ +export declare function fromMap(input: SourceMapInput): GenMapping; +/** + * Returns an array of high-level mapping objects for every recorded segment, which could then be + * passed to the `source-map` library. + */ +export declare function allMappings(map: GenMapping): Mapping[]; diff --git a/node_modules/@jridgewell/gen-mapping/dist/types/set-array.d.ts b/node_modules/@jridgewell/gen-mapping/dist/types/set-array.d.ts new file mode 100644 index 0000000..6ed4354 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/types/set-array.d.ts @@ -0,0 +1,32 @@ +type Key = string | number | symbol; +/** + * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the + * index of the `key` in the backing array. + * + * This is designed to allow synchronizing a second array with the contents of the backing array, + * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, + * and there are never duplicates. + */ +export declare class SetArray { + private _indexes; + array: readonly T[]; + constructor(); +} +/** + * Gets the index associated with `key` in the backing array, if it is already present. + */ +export declare function get(setarr: SetArray, key: T): number | undefined; +/** + * Puts `key` into the backing array, if it is not already present. Returns + * the index of the `key` in the backing array. + */ +export declare function put(setarr: SetArray, key: T): number; +/** + * Pops the last added item out of the SetArray. + */ +export declare function pop(setarr: SetArray): void; +/** + * Removes the key, if it exists in the set. + */ +export declare function remove(setarr: SetArray, key: T): void; +export {}; diff --git a/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts b/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts new file mode 100644 index 0000000..aa19fb5 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts @@ -0,0 +1,12 @@ +type GeneratedColumn = number; +type SourcesIndex = number; +type SourceLine = number; +type SourceColumn = number; +type NamesIndex = number; +export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export declare const COLUMN = 0; +export declare const SOURCES_INDEX = 1; +export declare const SOURCE_LINE = 2; +export declare const SOURCE_COLUMN = 3; +export declare const NAMES_INDEX = 4; +export {}; diff --git a/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts b/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts new file mode 100644 index 0000000..8eb90fb --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts @@ -0,0 +1,43 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +export interface SourceMapV3 { + file?: string | null; + names: readonly string[]; + sourceRoot?: string; + sources: readonly (string | null)[]; + sourcesContent?: readonly (string | null)[]; + version: 3; + ignoreList?: readonly number[]; +} +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { + mappings: readonly SourceMapSegment[][]; +} +export interface Pos { + line: number; + column: number; +} +export interface OriginalPos extends Pos { + source: string; +} +export interface BindingExpressionRange { + start: Pos; + expression: string; +} +export type Mapping = { + generated: Pos; + source: undefined; + original: undefined; + name: undefined; +} | { + generated: Pos; + source: string; + original: Pos; + name: string; +} | { + generated: Pos; + source: string; + original: Pos; + name: undefined; +}; diff --git a/node_modules/@jridgewell/gen-mapping/package.json b/node_modules/@jridgewell/gen-mapping/package.json new file mode 100644 index 0000000..036f9b7 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/package.json @@ -0,0 +1,67 @@ +{ + "name": "@jridgewell/gen-mapping", + "version": "0.3.13", + "description": "Generate source maps", + "keywords": [ + "source", + "map" + ], + "main": "dist/gen-mapping.umd.js", + "module": "dist/gen-mapping.mjs", + "types": "types/gen-mapping.d.cts", + "files": [ + "dist", + "src", + "types" + ], + "exports": { + ".": [ + { + "import": { + "types": "./types/gen-mapping.d.mts", + "default": "./dist/gen-mapping.mjs" + }, + "default": { + "types": "./types/gen-mapping.d.cts", + "default": "./dist/gen-mapping.umd.js" + } + }, + "./dist/gen-mapping.umd.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "benchmark": "run-s build:code benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node --expose-gc benchmark/index.js", + "build": "run-s -n build:code build:types", + "build:code": "node ../../esbuild.mjs gen-mapping.ts", + "build:types": "run-s build:types:force build:types:emit build:types:mts", + "build:types:force": "rimraf tsconfig.build.tsbuildinfo", + "build:types:emit": "tsc --project tsconfig.build.json", + "build:types:mts": "node ../../mts-types.mjs", + "clean": "run-s -n clean:code clean:types", + "clean:code": "tsc --build --clean tsconfig.build.json", + "clean:types": "rimraf dist types", + "test": "run-s -n test:types test:only test:format", + "test:format": "prettier --check '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:types": "eslint '{src,test}/**/*.ts'", + "lint": "run-s -n lint:types lint:format", + "lint:format": "npm run test:format -- --write", + "lint:types": "npm run test:types -- --fix", + "prepublishOnly": "npm run-s -n build test" + }, + "homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/gen-mapping", + "repository": { + "type": "git", + "url": "git+https://github.com/jridgewell/sourcemaps.git", + "directory": "packages/gen-mapping" + }, + "author": "Justin Ridgewell ", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } +} diff --git a/node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts b/node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts new file mode 100644 index 0000000..ecc878c --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts @@ -0,0 +1,614 @@ +import { SetArray, put, remove } from './set-array'; +import { + encode, + // encodeGeneratedRanges, + // encodeOriginalScopes +} from '@jridgewell/sourcemap-codec'; +import { TraceMap, decodedMappings } from '@jridgewell/trace-mapping'; + +import { + COLUMN, + SOURCES_INDEX, + SOURCE_LINE, + SOURCE_COLUMN, + NAMES_INDEX, +} from './sourcemap-segment'; + +import type { SourceMapInput } from '@jridgewell/trace-mapping'; +// import type { OriginalScope, GeneratedRange } from '@jridgewell/sourcemap-codec'; +import type { SourceMapSegment } from './sourcemap-segment'; +import type { + DecodedSourceMap, + EncodedSourceMap, + Pos, + Mapping, + // BindingExpressionRange, + // OriginalPos, + // OriginalScopeInfo, + // GeneratedRangeInfo, +} from './types'; + +export type { DecodedSourceMap, EncodedSourceMap, Mapping }; + +export type Options = { + file?: string | null; + sourceRoot?: string | null; +}; + +const NO_NAME = -1; + +/** + * Provides the state to generate a sourcemap. + */ +export class GenMapping { + declare private _names: SetArray; + declare private _sources: SetArray; + declare private _sourcesContent: (string | null)[]; + declare private _mappings: SourceMapSegment[][]; + // private declare _originalScopes: OriginalScope[][]; + // private declare _generatedRanges: GeneratedRange[]; + declare private _ignoreList: SetArray; + declare file: string | null | undefined; + declare sourceRoot: string | null | undefined; + + constructor({ file, sourceRoot }: Options = {}) { + this._names = new SetArray(); + this._sources = new SetArray(); + this._sourcesContent = []; + this._mappings = []; + // this._originalScopes = []; + // this._generatedRanges = []; + this.file = file; + this.sourceRoot = sourceRoot; + this._ignoreList = new SetArray(); + } +} + +interface PublicMap { + _names: GenMapping['_names']; + _sources: GenMapping['_sources']; + _sourcesContent: GenMapping['_sourcesContent']; + _mappings: GenMapping['_mappings']; + // _originalScopes: GenMapping['_originalScopes']; + // _generatedRanges: GenMapping['_generatedRanges']; + _ignoreList: GenMapping['_ignoreList']; +} + +/** + * Typescript doesn't allow friend access to private fields, so this just casts the map into a type + * with public access modifiers. + */ +function cast(map: unknown): PublicMap { + return map as any; +} + +/** + * A low-level API to associate a generated position with an original source position. Line and + * column here are 0-based, unlike `addMapping`. + */ +export function addSegment( + map: GenMapping, + genLine: number, + genColumn: number, + source?: null, + sourceLine?: null, + sourceColumn?: null, + name?: null, + content?: null, +): void; +export function addSegment( + map: GenMapping, + genLine: number, + genColumn: number, + source: string, + sourceLine: number, + sourceColumn: number, + name?: null, + content?: string | null, +): void; +export function addSegment( + map: GenMapping, + genLine: number, + genColumn: number, + source: string, + sourceLine: number, + sourceColumn: number, + name: string, + content?: string | null, +): void; +export function addSegment( + map: GenMapping, + genLine: number, + genColumn: number, + source?: string | null, + sourceLine?: number | null, + sourceColumn?: number | null, + name?: string | null, + content?: string | null, +): void { + return addSegmentInternal( + false, + map, + genLine, + genColumn, + source, + sourceLine, + sourceColumn, + name, + content, + ); +} + +/** + * A high-level API to associate a generated position with an original source position. Line is + * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. + */ +export function addMapping( + map: GenMapping, + mapping: { + generated: Pos; + source?: null; + original?: null; + name?: null; + content?: null; + }, +): void; +export function addMapping( + map: GenMapping, + mapping: { + generated: Pos; + source: string; + original: Pos; + name?: null; + content?: string | null; + }, +): void; +export function addMapping( + map: GenMapping, + mapping: { + generated: Pos; + source: string; + original: Pos; + name: string; + content?: string | null; + }, +): void; +export function addMapping( + map: GenMapping, + mapping: { + generated: Pos; + source?: string | null; + original?: Pos | null; + name?: string | null; + content?: string | null; + }, +): void { + return addMappingInternal(false, map, mapping as Parameters[2]); +} + +/** + * Same as `addSegment`, but will only add the segment if it generates useful information in the + * resulting map. This only works correctly if segments are added **in order**, meaning you should + * not add a segment with a lower generated line/column than one that came before. + */ +export const maybeAddSegment: typeof addSegment = ( + map, + genLine, + genColumn, + source, + sourceLine, + sourceColumn, + name, + content, +) => { + return addSegmentInternal( + true, + map, + genLine, + genColumn, + source, + sourceLine, + sourceColumn, + name, + content, + ); +}; + +/** + * Same as `addMapping`, but will only add the mapping if it generates useful information in the + * resulting map. This only works correctly if mappings are added **in order**, meaning you should + * not add a mapping with a lower generated line/column than one that came before. + */ +export const maybeAddMapping: typeof addMapping = (map, mapping) => { + return addMappingInternal(true, map, mapping as Parameters[2]); +}; + +/** + * Adds/removes the content of the source file to the source map. + */ +export function setSourceContent(map: GenMapping, source: string, content: string | null): void { + const { + _sources: sources, + _sourcesContent: sourcesContent, + // _originalScopes: originalScopes, + } = cast(map); + const index = put(sources, source); + sourcesContent[index] = content; + // if (index === originalScopes.length) originalScopes[index] = []; +} + +export function setIgnore(map: GenMapping, source: string, ignore = true) { + const { + _sources: sources, + _sourcesContent: sourcesContent, + _ignoreList: ignoreList, + // _originalScopes: originalScopes, + } = cast(map); + const index = put(sources, source); + if (index === sourcesContent.length) sourcesContent[index] = null; + // if (index === originalScopes.length) originalScopes[index] = []; + if (ignore) put(ignoreList, index); + else remove(ignoreList, index); +} + +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export function toDecodedMap(map: GenMapping): DecodedSourceMap { + const { + _mappings: mappings, + _sources: sources, + _sourcesContent: sourcesContent, + _names: names, + _ignoreList: ignoreList, + // _originalScopes: originalScopes, + // _generatedRanges: generatedRanges, + } = cast(map); + removeEmptyFinalLines(mappings); + + return { + version: 3, + file: map.file || undefined, + names: names.array, + sourceRoot: map.sourceRoot || undefined, + sources: sources.array, + sourcesContent, + mappings, + // originalScopes, + // generatedRanges, + ignoreList: ignoreList.array, + }; +} + +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export function toEncodedMap(map: GenMapping): EncodedSourceMap { + const decoded = toDecodedMap(map); + return Object.assign({}, decoded, { + // originalScopes: decoded.originalScopes.map((os) => encodeOriginalScopes(os)), + // generatedRanges: encodeGeneratedRanges(decoded.generatedRanges as GeneratedRange[]), + mappings: encode(decoded.mappings as SourceMapSegment[][]), + }); +} + +/** + * Constructs a new GenMapping, using the already present mappings of the input. + */ +export function fromMap(input: SourceMapInput): GenMapping { + const map = new TraceMap(input); + const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); + + putAll(cast(gen)._names, map.names); + putAll(cast(gen)._sources, map.sources as string[]); + cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null); + cast(gen)._mappings = decodedMappings(map) as GenMapping['_mappings']; + // TODO: implement originalScopes/generatedRanges + if (map.ignoreList) putAll(cast(gen)._ignoreList, map.ignoreList); + + return gen; +} + +/** + * Returns an array of high-level mapping objects for every recorded segment, which could then be + * passed to the `source-map` library. + */ +export function allMappings(map: GenMapping): Mapping[] { + const out: Mapping[] = []; + const { _mappings: mappings, _sources: sources, _names: names } = cast(map); + + for (let i = 0; i < mappings.length; i++) { + const line = mappings[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + + const generated = { line: i + 1, column: seg[COLUMN] }; + let source: string | undefined = undefined; + let original: Pos | undefined = undefined; + let name: string | undefined = undefined; + + if (seg.length !== 1) { + source = sources.array[seg[SOURCES_INDEX]]; + original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; + + if (seg.length === 5) name = names.array[seg[NAMES_INDEX]]; + } + + out.push({ generated, source, original, name } as Mapping); + } + } + + return out; +} + +// This split declaration is only so that terser can elminiate the static initialization block. +function addSegmentInternal( + skipable: boolean, + map: GenMapping, + genLine: number, + genColumn: number, + source: S, + sourceLine: S extends string ? number : null | undefined, + sourceColumn: S extends string ? number : null | undefined, + name: S extends string ? string | null | undefined : null | undefined, + content: S extends string ? string | null | undefined : null | undefined, +): void { + const { + _mappings: mappings, + _sources: sources, + _sourcesContent: sourcesContent, + _names: names, + // _originalScopes: originalScopes, + } = cast(map); + const line = getIndex(mappings, genLine); + const index = getColumnIndex(line, genColumn); + + if (!source) { + if (skipable && skipSourceless(line, index)) return; + return insert(line, index, [genColumn]); + } + + // Sigh, TypeScript can't figure out sourceLine and sourceColumn aren't nullish if source + // isn't nullish. + assert(sourceLine); + assert(sourceColumn); + + const sourcesIndex = put(sources, source); + const namesIndex = name ? put(names, name) : NO_NAME; + if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content ?? null; + // if (sourcesIndex === originalScopes.length) originalScopes[sourcesIndex] = []; + + if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { + return; + } + + return insert( + line, + index, + name + ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] + : [genColumn, sourcesIndex, sourceLine, sourceColumn], + ); +} + +function assert(_val: unknown): asserts _val is T { + // noop. +} + +function getIndex(arr: T[][], index: number): T[] { + for (let i = arr.length; i <= index; i++) { + arr[i] = []; + } + return arr[index]; +} + +function getColumnIndex(line: SourceMapSegment[], genColumn: number): number { + let index = line.length; + for (let i = index - 1; i >= 0; index = i--) { + const current = line[i]; + if (genColumn >= current[COLUMN]) break; + } + return index; +} + +function insert(array: T[], index: number, value: T) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; +} + +function removeEmptyFinalLines(mappings: SourceMapSegment[][]) { + const { length } = mappings; + let len = length; + for (let i = len - 1; i >= 0; len = i, i--) { + if (mappings[i].length > 0) break; + } + if (len < length) mappings.length = len; +} + +function putAll(setarr: SetArray, array: T[]) { + for (let i = 0; i < array.length; i++) put(setarr, array[i]); +} + +function skipSourceless(line: SourceMapSegment[], index: number): boolean { + // The start of a line is already sourceless, so adding a sourceless segment to the beginning + // doesn't generate any useful information. + if (index === 0) return true; + + const prev = line[index - 1]; + // If the previous segment is also sourceless, then adding another sourceless segment doesn't + // genrate any new information. Else, this segment will end the source/named segment and point to + // a sourceless position, which is useful. + return prev.length === 1; +} + +function skipSource( + line: SourceMapSegment[], + index: number, + sourcesIndex: number, + sourceLine: number, + sourceColumn: number, + namesIndex: number, +): boolean { + // A source/named segment at the start of a line gives position at that genColumn + if (index === 0) return false; + + const prev = line[index - 1]; + + // If the previous segment is sourceless, then we're transitioning to a source. + if (prev.length === 1) return false; + + // If the previous segment maps to the exact same source position, then this segment doesn't + // provide any new position information. + return ( + sourcesIndex === prev[SOURCES_INDEX] && + sourceLine === prev[SOURCE_LINE] && + sourceColumn === prev[SOURCE_COLUMN] && + namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME) + ); +} + +function addMappingInternal( + skipable: boolean, + map: GenMapping, + mapping: { + generated: Pos; + source: S; + original: S extends string ? Pos : null | undefined; + name: S extends string ? string | null | undefined : null | undefined; + content: S extends string ? string | null | undefined : null | undefined; + }, +) { + const { generated, source, original, name, content } = mapping; + if (!source) { + return addSegmentInternal( + skipable, + map, + generated.line - 1, + generated.column, + null, + null, + null, + null, + null, + ); + } + assert(original); + return addSegmentInternal( + skipable, + map, + generated.line - 1, + generated.column, + source as string, + original.line - 1, + original.column, + name, + content, + ); +} + +/* +export function addOriginalScope( + map: GenMapping, + data: { + start: Pos; + end: Pos; + source: string; + kind: string; + name?: string; + variables?: string[]; + }, +): OriginalScopeInfo { + const { start, end, source, kind, name, variables } = data; + const { + _sources: sources, + _sourcesContent: sourcesContent, + _originalScopes: originalScopes, + _names: names, + } = cast(map); + const index = put(sources, source); + if (index === sourcesContent.length) sourcesContent[index] = null; + if (index === originalScopes.length) originalScopes[index] = []; + + const kindIndex = put(names, kind); + const scope: OriginalScope = name + ? [start.line - 1, start.column, end.line - 1, end.column, kindIndex, put(names, name)] + : [start.line - 1, start.column, end.line - 1, end.column, kindIndex]; + if (variables) { + scope.vars = variables.map((v) => put(names, v)); + } + const len = originalScopes[index].push(scope); + return [index, len - 1, variables]; +} +*/ + +// Generated Ranges +/* +export function addGeneratedRange( + map: GenMapping, + data: { + start: Pos; + isScope: boolean; + originalScope?: OriginalScopeInfo; + callsite?: OriginalPos; + }, +): GeneratedRangeInfo { + const { start, isScope, originalScope, callsite } = data; + const { + _originalScopes: originalScopes, + _sources: sources, + _sourcesContent: sourcesContent, + _generatedRanges: generatedRanges, + } = cast(map); + + const range: GeneratedRange = [ + start.line - 1, + start.column, + 0, + 0, + originalScope ? originalScope[0] : -1, + originalScope ? originalScope[1] : -1, + ]; + if (originalScope?.[2]) { + range.bindings = originalScope[2].map(() => [[-1]]); + } + if (callsite) { + const index = put(sources, callsite.source); + if (index === sourcesContent.length) sourcesContent[index] = null; + if (index === originalScopes.length) originalScopes[index] = []; + range.callsite = [index, callsite.line - 1, callsite.column]; + } + if (isScope) range.isScope = true; + generatedRanges.push(range); + + return [range, originalScope?.[2]]; +} + +export function setEndPosition(range: GeneratedRangeInfo, pos: Pos) { + range[0][2] = pos.line - 1; + range[0][3] = pos.column; +} + +export function addBinding( + map: GenMapping, + range: GeneratedRangeInfo, + variable: string, + expression: string | BindingExpressionRange, +) { + const { _names: names } = cast(map); + const bindings = (range[0].bindings ||= []); + const vars = range[1]; + + const index = vars!.indexOf(variable); + const binding = getIndex(bindings, index); + + if (typeof expression === 'string') binding[0] = [put(names, expression)]; + else { + const { start } = expression; + binding.push([put(names, expression.expression), start.line - 1, start.column]); + } +} +*/ diff --git a/node_modules/@jridgewell/gen-mapping/src/set-array.ts b/node_modules/@jridgewell/gen-mapping/src/set-array.ts new file mode 100644 index 0000000..a2a73a5 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/src/set-array.ts @@ -0,0 +1,82 @@ +type Key = string | number | symbol; + +/** + * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the + * index of the `key` in the backing array. + * + * This is designed to allow synchronizing a second array with the contents of the backing array, + * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, + * and there are never duplicates. + */ +export class SetArray { + declare private _indexes: Record; + declare array: readonly T[]; + + constructor() { + this._indexes = { __proto__: null } as any; + this.array = []; + } +} + +interface PublicSet { + array: T[]; + _indexes: SetArray['_indexes']; +} + +/** + * Typescript doesn't allow friend access to private fields, so this just casts the set into a type + * with public access modifiers. + */ +function cast(set: SetArray): PublicSet { + return set as any; +} + +/** + * Gets the index associated with `key` in the backing array, if it is already present. + */ +export function get(setarr: SetArray, key: T): number | undefined { + return cast(setarr)._indexes[key]; +} + +/** + * Puts `key` into the backing array, if it is not already present. Returns + * the index of the `key` in the backing array. + */ +export function put(setarr: SetArray, key: T): number { + // The key may or may not be present. If it is present, it's a number. + const index = get(setarr, key); + if (index !== undefined) return index; + + const { array, _indexes: indexes } = cast(setarr); + + const length = array.push(key); + return (indexes[key] = length - 1); +} + +/** + * Pops the last added item out of the SetArray. + */ +export function pop(setarr: SetArray): void { + const { array, _indexes: indexes } = cast(setarr); + if (array.length === 0) return; + + const last = array.pop()!; + indexes[last] = undefined; +} + +/** + * Removes the key, if it exists in the set. + */ +export function remove(setarr: SetArray, key: T): void { + const index = get(setarr, key); + if (index === undefined) return; + + const { array, _indexes: indexes } = cast(setarr); + for (let i = index + 1; i < array.length; i++) { + const k = array[i]; + array[i - 1] = k; + indexes[k]!--; + } + indexes[key] = undefined; + array.pop(); +} diff --git a/node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts b/node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts new file mode 100644 index 0000000..fb296dd --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts @@ -0,0 +1,16 @@ +type GeneratedColumn = number; +type SourcesIndex = number; +type SourceLine = number; +type SourceColumn = number; +type NamesIndex = number; + +export type SourceMapSegment = + | [GeneratedColumn] + | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] + | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; + +export const COLUMN = 0; +export const SOURCES_INDEX = 1; +export const SOURCE_LINE = 2; +export const SOURCE_COLUMN = 3; +export const NAMES_INDEX = 4; diff --git a/node_modules/@jridgewell/gen-mapping/src/types.ts b/node_modules/@jridgewell/gen-mapping/src/types.ts new file mode 100644 index 0000000..b087f70 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/src/types.ts @@ -0,0 +1,61 @@ +// import type { GeneratedRange, OriginalScope } from '@jridgewell/sourcemap-codec'; +import type { SourceMapSegment } from './sourcemap-segment'; + +export interface SourceMapV3 { + file?: string | null; + names: readonly string[]; + sourceRoot?: string; + sources: readonly (string | null)[]; + sourcesContent?: readonly (string | null)[]; + version: 3; + ignoreList?: readonly number[]; +} + +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; + // originalScopes: string[]; + // generatedRanges: string; +} + +export interface DecodedSourceMap extends SourceMapV3 { + mappings: readonly SourceMapSegment[][]; + // originalScopes: readonly OriginalScope[][]; + // generatedRanges: readonly GeneratedRange[]; +} + +export interface Pos { + line: number; // 1-based + column: number; // 0-based +} + +export interface OriginalPos extends Pos { + source: string; +} + +export interface BindingExpressionRange { + start: Pos; + expression: string; +} + +// export type OriginalScopeInfo = [number, number, string[] | undefined]; +// export type GeneratedRangeInfo = [GeneratedRange, string[] | undefined]; + +export type Mapping = + | { + generated: Pos; + source: undefined; + original: undefined; + name: undefined; + } + | { + generated: Pos; + source: string; + original: Pos; + name: string; + } + | { + generated: Pos; + source: string; + original: Pos; + name: undefined; + }; diff --git a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts new file mode 100644 index 0000000..7618d85 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts @@ -0,0 +1,89 @@ +import type { SourceMapInput } from '@jridgewell/trace-mapping'; +import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types.cts'; +export type { DecodedSourceMap, EncodedSourceMap, Mapping }; +export type Options = { + file?: string | null; + sourceRoot?: string | null; +}; +/** + * Provides the state to generate a sourcemap. + */ +export declare class GenMapping { + private _names; + private _sources; + private _sourcesContent; + private _mappings; + private _ignoreList; + file: string | null | undefined; + sourceRoot: string | null | undefined; + constructor({ file, sourceRoot }?: Options); +} +/** + * A low-level API to associate a generated position with an original source position. Line and + * column here are 0-based, unlike `addMapping`. + */ +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void; +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void; +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void; +/** + * A high-level API to associate a generated position with an original source position. Line is + * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. + */ +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source?: null; + original?: null; + name?: null; + content?: null; +}): void; +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source: string; + original: Pos; + name?: null; + content?: string | null; +}): void; +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source: string; + original: Pos; + name: string; + content?: string | null; +}): void; +/** + * Same as `addSegment`, but will only add the segment if it generates useful information in the + * resulting map. This only works correctly if segments are added **in order**, meaning you should + * not add a segment with a lower generated line/column than one that came before. + */ +export declare const maybeAddSegment: typeof addSegment; +/** + * Same as `addMapping`, but will only add the mapping if it generates useful information in the + * resulting map. This only works correctly if mappings are added **in order**, meaning you should + * not add a mapping with a lower generated line/column than one that came before. + */ +export declare const maybeAddMapping: typeof addMapping; +/** + * Adds/removes the content of the source file to the source map. + */ +export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void; +export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function toDecodedMap(map: GenMapping): DecodedSourceMap; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function toEncodedMap(map: GenMapping): EncodedSourceMap; +/** + * Constructs a new GenMapping, using the already present mappings of the input. + */ +export declare function fromMap(input: SourceMapInput): GenMapping; +/** + * Returns an array of high-level mapping objects for every recorded segment, which could then be + * passed to the `source-map` library. + */ +export declare function allMappings(map: GenMapping): Mapping[]; +//# sourceMappingURL=gen-mapping.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map new file mode 100644 index 0000000..8a2b183 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"gen-mapping.d.ts","sourceRoot":"","sources":["../src/gen-mapping.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,GAAG,EACH,OAAO,EAKR,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC;AAE5D,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAIF;;GAEG;A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AAgB,WAAW,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,EAAE,CA0BtD"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts new file mode 100644 index 0000000..bbc0d89 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts @@ -0,0 +1,89 @@ +import type { SourceMapInput } from '@jridgewell/trace-mapping'; +import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types.mts'; +export type { DecodedSourceMap, EncodedSourceMap, Mapping }; +export type Options = { + file?: string | null; + sourceRoot?: string | null; +}; +/** + * Provides the state to generate a sourcemap. + */ +export declare class GenMapping { + private _names; + private _sources; + private _sourcesContent; + private _mappings; + private _ignoreList; + file: string | null | undefined; + sourceRoot: string | null | undefined; + constructor({ file, sourceRoot }?: Options); +} +/** + * A low-level API to associate a generated position with an original source position. Line and + * column here are 0-based, unlike `addMapping`. + */ +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void; +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void; +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void; +/** + * A high-level API to associate a generated position with an original source position. Line is + * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. + */ +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source?: null; + original?: null; + name?: null; + content?: null; +}): void; +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source: string; + original: Pos; + name?: null; + content?: string | null; +}): void; +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source: string; + original: Pos; + name: string; + content?: string | null; +}): void; +/** + * Same as `addSegment`, but will only add the segment if it generates useful information in the + * resulting map. This only works correctly if segments are added **in order**, meaning you should + * not add a segment with a lower generated line/column than one that came before. + */ +export declare const maybeAddSegment: typeof addSegment; +/** + * Same as `addMapping`, but will only add the mapping if it generates useful information in the + * resulting map. This only works correctly if mappings are added **in order**, meaning you should + * not add a mapping with a lower generated line/column than one that came before. + */ +export declare const maybeAddMapping: typeof addMapping; +/** + * Adds/removes the content of the source file to the source map. + */ +export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void; +export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function toDecodedMap(map: GenMapping): DecodedSourceMap; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function toEncodedMap(map: GenMapping): EncodedSourceMap; +/** + * Constructs a new GenMapping, using the already present mappings of the input. + */ +export declare function fromMap(input: SourceMapInput): GenMapping; +/** + * Returns an array of high-level mapping objects for every recorded segment, which could then be + * passed to the `source-map` library. + */ +export declare function allMappings(map: GenMapping): Mapping[]; +//# sourceMappingURL=gen-mapping.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map new file mode 100644 index 0000000..8a2b183 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"gen-mapping.d.ts","sourceRoot":"","sources":["../src/gen-mapping.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,GAAG,EACH,OAAO,EAKR,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC;AAE5D,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,CAAC,EAAE,M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9D;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,cAAc,GAAG,UAAU,CAYzD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,EAAE,CA0BtD"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts b/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts new file mode 100644 index 0000000..5d8cda3 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts @@ -0,0 +1,33 @@ +type Key = string | number | symbol; +/** + * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the + * index of the `key` in the backing array. + * + * This is designed to allow synchronizing a second array with the contents of the backing array, + * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, + * and there are never duplicates. + */ +export declare class SetArray { + private _indexes; + array: readonly T[]; + constructor(); +} +/** + * Gets the index associated with `key` in the backing array, if it is already present. + */ +export declare function get(setarr: SetArray, key: T): number | undefined; +/** + * Puts `key` into the backing array, if it is not already present. Returns + * the index of the `key` in the backing array. + */ +export declare function put(setarr: SetArray, key: T): number; +/** + * Pops the last added item out of the SetArray. + */ +export declare function pop(setarr: SetArray): void; +/** + * Removes the key, if it exists in the set. + */ +export declare function remove(setarr: SetArray, key: T): void; +export {}; +//# sourceMappingURL=set-array.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map b/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map new file mode 100644 index 0000000..c52b8bc --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"set-array.d.ts","sourceRoot":"","sources":["../src/set-array.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpC;;;;;;;GAOG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,GAAG,GAAG,GAAG;IACvC,QAAgB,QAAQ,CAAgC;IAChD,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;;CAM7B;AAeD;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,GAAG,SAAS,CAElF;AAED;;;GAGG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,CAStE;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAM5D;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAYvE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts b/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts new file mode 100644 index 0000000..5d8cda3 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts @@ -0,0 +1,33 @@ +type Key = string | number | symbol; +/** + * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the + * index of the `key` in the backing array. + * + * This is designed to allow synchronizing a second array with the contents of the backing array, + * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, + * and there are never duplicates. + */ +export declare class SetArray { + private _indexes; + array: readonly T[]; + constructor(); +} +/** + * Gets the index associated with `key` in the backing array, if it is already present. + */ +export declare function get(setarr: SetArray, key: T): number | undefined; +/** + * Puts `key` into the backing array, if it is not already present. Returns + * the index of the `key` in the backing array. + */ +export declare function put(setarr: SetArray, key: T): number; +/** + * Pops the last added item out of the SetArray. + */ +export declare function pop(setarr: SetArray): void; +/** + * Removes the key, if it exists in the set. + */ +export declare function remove(setarr: SetArray, key: T): void; +export {}; +//# sourceMappingURL=set-array.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map b/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map new file mode 100644 index 0000000..c52b8bc --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"set-array.d.ts","sourceRoot":"","sources":["../src/set-array.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpC;;;;;;;GAOG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,GAAG,GAAG,GAAG;IACvC,QAAgB,QAAQ,CAAgC;IAChD,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;;CAM7B;AAeD;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,GAAG,SAAS,CAElF;AAED;;;GAGG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,CAStE;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAM5D;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAYvE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts new file mode 100644 index 0000000..6886295 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts @@ -0,0 +1,13 @@ +type GeneratedColumn = number; +type SourcesIndex = number; +type SourceLine = number; +type SourceColumn = number; +type NamesIndex = number; +export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export declare const COLUMN = 0; +export declare const SOURCES_INDEX = 1; +export declare const SOURCE_LINE = 2; +export declare const SOURCE_COLUMN = 3; +export declare const NAMES_INDEX = 4; +export {}; +//# sourceMappingURL=sourcemap-segment.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map new file mode 100644 index 0000000..23cdc45 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts new file mode 100644 index 0000000..6886295 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts @@ -0,0 +1,13 @@ +type GeneratedColumn = number; +type SourcesIndex = number; +type SourceLine = number; +type SourceColumn = number; +type NamesIndex = number; +export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export declare const COLUMN = 0; +export declare const SOURCES_INDEX = 1; +export declare const SOURCE_LINE = 2; +export declare const SOURCE_COLUMN = 3; +export declare const NAMES_INDEX = 4; +export {}; +//# sourceMappingURL=sourcemap-segment.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map new file mode 100644 index 0000000..23cdc45 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/types.d.cts b/node_modules/@jridgewell/gen-mapping/types/types.d.cts new file mode 100644 index 0000000..58da00a --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/types.d.cts @@ -0,0 +1,44 @@ +import type { SourceMapSegment } from './sourcemap-segment.cts'; +export interface SourceMapV3 { + file?: string | null; + names: readonly string[]; + sourceRoot?: string; + sources: readonly (string | null)[]; + sourcesContent?: readonly (string | null)[]; + version: 3; + ignoreList?: readonly number[]; +} +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { + mappings: readonly SourceMapSegment[][]; +} +export interface Pos { + line: number; + column: number; +} +export interface OriginalPos extends Pos { + source: string; +} +export interface BindingExpressionRange { + start: Pos; + expression: string; +} +export type Mapping = { + generated: Pos; + source: undefined; + original: undefined; + name: undefined; +} | { + generated: Pos; + source: string; + original: Pos; + name: string; +} | { + generated: Pos; + source: string; + original: Pos; + name: undefined; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/types.d.cts.map b/node_modules/@jridgewell/gen-mapping/types/types.d.cts.map new file mode 100644 index 0000000..159e734 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/types.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACpC,cAAc,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC;IACX,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,MAAM,CAAC;CAGlB;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EAAE,CAAC;CAGzC;AAED,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAY,SAAQ,GAAG;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;CACpB;AAKD,MAAM,MAAM,OAAO,GACf;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/types.d.mts b/node_modules/@jridgewell/gen-mapping/types/types.d.mts new file mode 100644 index 0000000..e9837eb --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/types.d.mts @@ -0,0 +1,44 @@ +import type { SourceMapSegment } from './sourcemap-segment.mts'; +export interface SourceMapV3 { + file?: string | null; + names: readonly string[]; + sourceRoot?: string; + sources: readonly (string | null)[]; + sourcesContent?: readonly (string | null)[]; + version: 3; + ignoreList?: readonly number[]; +} +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { + mappings: readonly SourceMapSegment[][]; +} +export interface Pos { + line: number; + column: number; +} +export interface OriginalPos extends Pos { + source: string; +} +export interface BindingExpressionRange { + start: Pos; + expression: string; +} +export type Mapping = { + generated: Pos; + source: undefined; + original: undefined; + name: undefined; +} | { + generated: Pos; + source: string; + original: Pos; + name: string; +} | { + generated: Pos; + source: string; + original: Pos; + name: undefined; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/types.d.mts.map b/node_modules/@jridgewell/gen-mapping/types/types.d.mts.map new file mode 100644 index 0000000..159e734 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/types.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACpC,cAAc,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC;IACX,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,MAAM,CAAC;CAGlB;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EAAE,CAAC;CAGzC;AAED,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAY,SAAQ,GAAG;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;CACpB;AAKD,MAAM,MAAM,OAAO,GACf;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/LICENSE b/node_modules/@jridgewell/resolve-uri/LICENSE new file mode 100644 index 0000000..0a81b2a --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/LICENSE @@ -0,0 +1,19 @@ +Copyright 2019 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/README.md b/node_modules/@jridgewell/resolve-uri/README.md new file mode 100644 index 0000000..2fe70df --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/README.md @@ -0,0 +1,40 @@ +# @jridgewell/resolve-uri + +> Resolve a URI relative to an optional base URI + +Resolve any combination of absolute URIs, protocol-realtive URIs, absolute paths, or relative paths. + +## Installation + +```sh +npm install @jridgewell/resolve-uri +``` + +## Usage + +```typescript +function resolve(input: string, base?: string): string; +``` + +```js +import resolve from '@jridgewell/resolve-uri'; + +resolve('foo', 'https://example.com'); // => 'https://example.com/foo' +``` + +| Input | Base | Resolution | Explanation | +|-----------------------|-------------------------|--------------------------------|--------------------------------------------------------------| +| `https://example.com` | _any_ | `https://example.com/` | Input is normalized only | +| `//example.com` | `https://base.com/` | `https://example.com/` | Input inherits the base's protocol | +| `//example.com` | _rest_ | `//example.com/` | Input is normalized only | +| `/example` | `https://base.com/` | `https://base.com/example` | Input inherits the base's origin | +| `/example` | `//base.com/` | `//base.com/example` | Input inherits the base's host and remains protocol relative | +| `/example` | _rest_ | `/example` | Input is normalized only | +| `example` | `https://base.com/dir/` | `https://base.com/dir/example` | Input is joined with the base | +| `example` | `https://base.com/file` | `https://base.com/example` | Input is joined with the base without its file | +| `example` | `//base.com/dir/` | `//base.com/dir/example` | Input is joined with the base's last directory | +| `example` | `//base.com/file` | `//base.com/example` | Input is joined with the base without its file | +| `example` | `/base/dir/` | `/base/dir/example` | Input is joined with the base's last directory | +| `example` | `/base/file` | `/base/example` | Input is joined with the base without its file | +| `example` | `base/dir/` | `base/dir/example` | Input is joined with the base's last directory | +| `example` | `base/file` | `base/example` | Input is joined with the base without its file | diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs new file mode 100644 index 0000000..e958e88 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs @@ -0,0 +1,232 @@ +// Matches the scheme of a URL, eg "http://" +const schemeRegex = /^[\w+.-]+:\/\//; +/** + * Matches the parts of a URL: + * 1. Scheme, including ":", guaranteed. + * 2. User/password, including "@", optional. + * 3. Host, guaranteed. + * 4. Port, including ":", optional. + * 5. Path, including "/", optional. + * 6. Query, including "?", optional. + * 7. Hash, including "#", optional. + */ +const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; +/** + * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start + * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). + * + * 1. Host, optional. + * 2. Path, which may include "/", guaranteed. + * 3. Query, including "?", optional. + * 4. Hash, including "#", optional. + */ +const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; +function isAbsoluteUrl(input) { + return schemeRegex.test(input); +} +function isSchemeRelativeUrl(input) { + return input.startsWith('//'); +} +function isAbsolutePath(input) { + return input.startsWith('/'); +} +function isFileUrl(input) { + return input.startsWith('file:'); +} +function isRelative(input) { + return /^[.?#]/.test(input); +} +function parseAbsoluteUrl(input) { + const match = urlRegex.exec(input); + return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); +} +function parseFileUrl(input) { + const match = fileRegex.exec(input); + const path = match[2]; + return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); +} +function makeUrl(scheme, user, host, port, path, query, hash) { + return { + scheme, + user, + host, + port, + path, + query, + hash, + type: 7 /* Absolute */, + }; +} +function parseUrl(input) { + if (isSchemeRelativeUrl(input)) { + const url = parseAbsoluteUrl('http:' + input); + url.scheme = ''; + url.type = 6 /* SchemeRelative */; + return url; + } + if (isAbsolutePath(input)) { + const url = parseAbsoluteUrl('http://foo.com' + input); + url.scheme = ''; + url.host = ''; + url.type = 5 /* AbsolutePath */; + return url; + } + if (isFileUrl(input)) + return parseFileUrl(input); + if (isAbsoluteUrl(input)) + return parseAbsoluteUrl(input); + const url = parseAbsoluteUrl('http://foo.com/' + input); + url.scheme = ''; + url.host = ''; + url.type = input + ? input.startsWith('?') + ? 3 /* Query */ + : input.startsWith('#') + ? 2 /* Hash */ + : 4 /* RelativePath */ + : 1 /* Empty */; + return url; +} +function stripPathFilename(path) { + // If a path ends with a parent directory "..", then it's a relative path with excess parent + // paths. It's not a file, so we can't strip it. + if (path.endsWith('/..')) + return path; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); +} +function mergePaths(url, base) { + normalizePath(base, base.type); + // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative + // path). + if (url.path === '/') { + url.path = base.path; + } + else { + // Resolution happens relative to the base path's directory, not the file. + url.path = stripPathFilename(base.path) + url.path; + } +} +/** + * The path can have empty directories "//", unneeded parents "foo/..", or current directory + * "foo/.". We need to normalize to a standard representation. + */ +function normalizePath(url, type) { + const rel = type <= 4 /* RelativePath */; + const pieces = url.path.split('/'); + // We need to preserve the first piece always, so that we output a leading slash. The item at + // pieces[0] is an empty string. + let pointer = 1; + // Positive is the number of real directories we've output, used for popping a parent directory. + // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". + let positive = 0; + // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will + // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a + // real directory, we won't need to append, unless the other conditions happen again. + let addTrailingSlash = false; + for (let i = 1; i < pieces.length; i++) { + const piece = pieces[i]; + // An empty directory, could be a trailing slash, or just a double "//" in the path. + if (!piece) { + addTrailingSlash = true; + continue; + } + // If we encounter a real directory, then we don't need to append anymore. + addTrailingSlash = false; + // A current directory, which we can always drop. + if (piece === '.') + continue; + // A parent directory, we need to see if there are any real directories we can pop. Else, we + // have an excess of parents, and we'll need to keep the "..". + if (piece === '..') { + if (positive) { + addTrailingSlash = true; + positive--; + pointer--; + } + else if (rel) { + // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute + // URL, protocol relative URL, or an absolute path, we don't need to keep excess. + pieces[pointer++] = piece; + } + continue; + } + // We've encountered a real directory. Move it to the next insertion pointer, which accounts for + // any popped or dropped directories. + pieces[pointer++] = piece; + positive++; + } + let path = ''; + for (let i = 1; i < pointer; i++) { + path += '/' + pieces[i]; + } + if (!path || (addTrailingSlash && !path.endsWith('/..'))) { + path += '/'; + } + url.path = path; +} +/** + * Attempts to resolve `input` URL/path relative to `base`. + */ +function resolve(input, base) { + if (!input && !base) + return ''; + const url = parseUrl(input); + let inputType = url.type; + if (base && inputType !== 7 /* Absolute */) { + const baseUrl = parseUrl(base); + const baseType = baseUrl.type; + switch (inputType) { + case 1 /* Empty */: + url.hash = baseUrl.hash; + // fall through + case 2 /* Hash */: + url.query = baseUrl.query; + // fall through + case 3 /* Query */: + case 4 /* RelativePath */: + mergePaths(url, baseUrl); + // fall through + case 5 /* AbsolutePath */: + // The host, user, and port are joined, you can't copy one without the others. + url.user = baseUrl.user; + url.host = baseUrl.host; + url.port = baseUrl.port; + // fall through + case 6 /* SchemeRelative */: + // The input doesn't have a schema at least, so we need to copy at least that over. + url.scheme = baseUrl.scheme; + } + if (baseType > inputType) + inputType = baseType; + } + normalizePath(url, inputType); + const queryHash = url.query + url.hash; + switch (inputType) { + // This is impossible, because of the empty checks at the start of the function. + // case UrlType.Empty: + case 2 /* Hash */: + case 3 /* Query */: + return queryHash; + case 4 /* RelativePath */: { + // The first char is always a "/", and we need it to be relative. + const path = url.path.slice(1); + if (!path) + return queryHash || '.'; + if (isRelative(base || input) && !isRelative(path)) { + // If base started with a leading ".", or there is no base and input started with a ".", + // then we need to ensure that the relative path starts with a ".". We don't know if + // relative starts with a "..", though, so check before prepending. + return './' + path + queryHash; + } + return path + queryHash; + } + case 5 /* AbsolutePath */: + return url.path + queryHash; + default: + return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; + } +} + +export { resolve as default }; +//# sourceMappingURL=resolve-uri.mjs.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map new file mode 100644 index 0000000..1de97d0 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-uri.mjs","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":"AAAA;AACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC;;;;;;;;;;AAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;AAE5F;;;;;;;;;AASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;AAuBpF,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;IACpC,OAAO,OAAO,CACZ,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,EACf,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CACf,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,MAAM,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CAAC;SACzB;QAED;YACE,OAAO,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;QAE9B;YACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;KACpF;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js new file mode 100644 index 0000000..a783049 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js @@ -0,0 +1,240 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory()); +})(this, (function () { 'use strict'; + + // Matches the scheme of a URL, eg "http://" + const schemeRegex = /^[\w+.-]+:\/\//; + /** + * Matches the parts of a URL: + * 1. Scheme, including ":", guaranteed. + * 2. User/password, including "@", optional. + * 3. Host, guaranteed. + * 4. Port, including ":", optional. + * 5. Path, including "/", optional. + * 6. Query, including "?", optional. + * 7. Hash, including "#", optional. + */ + const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; + /** + * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start + * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). + * + * 1. Host, optional. + * 2. Path, which may include "/", guaranteed. + * 3. Query, including "?", optional. + * 4. Hash, including "#", optional. + */ + const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; + function isAbsoluteUrl(input) { + return schemeRegex.test(input); + } + function isSchemeRelativeUrl(input) { + return input.startsWith('//'); + } + function isAbsolutePath(input) { + return input.startsWith('/'); + } + function isFileUrl(input) { + return input.startsWith('file:'); + } + function isRelative(input) { + return /^[.?#]/.test(input); + } + function parseAbsoluteUrl(input) { + const match = urlRegex.exec(input); + return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); + } + function parseFileUrl(input) { + const match = fileRegex.exec(input); + const path = match[2]; + return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); + } + function makeUrl(scheme, user, host, port, path, query, hash) { + return { + scheme, + user, + host, + port, + path, + query, + hash, + type: 7 /* Absolute */, + }; + } + function parseUrl(input) { + if (isSchemeRelativeUrl(input)) { + const url = parseAbsoluteUrl('http:' + input); + url.scheme = ''; + url.type = 6 /* SchemeRelative */; + return url; + } + if (isAbsolutePath(input)) { + const url = parseAbsoluteUrl('http://foo.com' + input); + url.scheme = ''; + url.host = ''; + url.type = 5 /* AbsolutePath */; + return url; + } + if (isFileUrl(input)) + return parseFileUrl(input); + if (isAbsoluteUrl(input)) + return parseAbsoluteUrl(input); + const url = parseAbsoluteUrl('http://foo.com/' + input); + url.scheme = ''; + url.host = ''; + url.type = input + ? input.startsWith('?') + ? 3 /* Query */ + : input.startsWith('#') + ? 2 /* Hash */ + : 4 /* RelativePath */ + : 1 /* Empty */; + return url; + } + function stripPathFilename(path) { + // If a path ends with a parent directory "..", then it's a relative path with excess parent + // paths. It's not a file, so we can't strip it. + if (path.endsWith('/..')) + return path; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); + } + function mergePaths(url, base) { + normalizePath(base, base.type); + // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative + // path). + if (url.path === '/') { + url.path = base.path; + } + else { + // Resolution happens relative to the base path's directory, not the file. + url.path = stripPathFilename(base.path) + url.path; + } + } + /** + * The path can have empty directories "//", unneeded parents "foo/..", or current directory + * "foo/.". We need to normalize to a standard representation. + */ + function normalizePath(url, type) { + const rel = type <= 4 /* RelativePath */; + const pieces = url.path.split('/'); + // We need to preserve the first piece always, so that we output a leading slash. The item at + // pieces[0] is an empty string. + let pointer = 1; + // Positive is the number of real directories we've output, used for popping a parent directory. + // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". + let positive = 0; + // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will + // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a + // real directory, we won't need to append, unless the other conditions happen again. + let addTrailingSlash = false; + for (let i = 1; i < pieces.length; i++) { + const piece = pieces[i]; + // An empty directory, could be a trailing slash, or just a double "//" in the path. + if (!piece) { + addTrailingSlash = true; + continue; + } + // If we encounter a real directory, then we don't need to append anymore. + addTrailingSlash = false; + // A current directory, which we can always drop. + if (piece === '.') + continue; + // A parent directory, we need to see if there are any real directories we can pop. Else, we + // have an excess of parents, and we'll need to keep the "..". + if (piece === '..') { + if (positive) { + addTrailingSlash = true; + positive--; + pointer--; + } + else if (rel) { + // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute + // URL, protocol relative URL, or an absolute path, we don't need to keep excess. + pieces[pointer++] = piece; + } + continue; + } + // We've encountered a real directory. Move it to the next insertion pointer, which accounts for + // any popped or dropped directories. + pieces[pointer++] = piece; + positive++; + } + let path = ''; + for (let i = 1; i < pointer; i++) { + path += '/' + pieces[i]; + } + if (!path || (addTrailingSlash && !path.endsWith('/..'))) { + path += '/'; + } + url.path = path; + } + /** + * Attempts to resolve `input` URL/path relative to `base`. + */ + function resolve(input, base) { + if (!input && !base) + return ''; + const url = parseUrl(input); + let inputType = url.type; + if (base && inputType !== 7 /* Absolute */) { + const baseUrl = parseUrl(base); + const baseType = baseUrl.type; + switch (inputType) { + case 1 /* Empty */: + url.hash = baseUrl.hash; + // fall through + case 2 /* Hash */: + url.query = baseUrl.query; + // fall through + case 3 /* Query */: + case 4 /* RelativePath */: + mergePaths(url, baseUrl); + // fall through + case 5 /* AbsolutePath */: + // The host, user, and port are joined, you can't copy one without the others. + url.user = baseUrl.user; + url.host = baseUrl.host; + url.port = baseUrl.port; + // fall through + case 6 /* SchemeRelative */: + // The input doesn't have a schema at least, so we need to copy at least that over. + url.scheme = baseUrl.scheme; + } + if (baseType > inputType) + inputType = baseType; + } + normalizePath(url, inputType); + const queryHash = url.query + url.hash; + switch (inputType) { + // This is impossible, because of the empty checks at the start of the function. + // case UrlType.Empty: + case 2 /* Hash */: + case 3 /* Query */: + return queryHash; + case 4 /* RelativePath */: { + // The first char is always a "/", and we need it to be relative. + const path = url.path.slice(1); + if (!path) + return queryHash || '.'; + if (isRelative(base || input) && !isRelative(path)) { + // If base started with a leading ".", or there is no base and input started with a ".", + // then we need to ensure that the relative path starts with a ".". We don't know if + // relative starts with a "..", though, so check before prepending. + return './' + path + queryHash; + } + return path + queryHash; + } + case 5 /* AbsolutePath */: + return url.path + queryHash; + default: + return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; + } + } + + return resolve; + +})); +//# sourceMappingURL=resolve-uri.umd.js.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map new file mode 100644 index 0000000..70a37f2 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-uri.umd.js","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":";;;;;;IAAA;IACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;IAErC;;;;;;;;;;IAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;IAE5F;;;;;;;;;IASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;IAuBpF,SAAS,aAAa,CAAC,KAAa;QAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,mBAAmB,CAAC,KAAa;QACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,SAAS,cAAc,CAAC,KAAa;QACnC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,SAAS,SAAS,CAAC,KAAa;QAC9B,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,SAAS,UAAU,CAAC,KAAa;QAC/B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,gBAAgB,CAAC,KAAa;QACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;QACpC,OAAO,OAAO,CACZ,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd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KAAK,CAAC,CAAC,CAAC,CAAC;gBAE/B,IAAI,CAAC,IAAI;oBAAE,OAAO,SAAS,IAAI,GAAG,CAAC;gBAEnC,IAAI,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;;;;oBAIlD,OAAO,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;iBAChC;gBAED,OAAO,IAAI,GAAG,SAAS,CAAC;aACzB;YAED;gBACE,OAAO,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;YAE9B;gBACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;SACpF;IACH;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts new file mode 100644 index 0000000..b7f0b3b --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts @@ -0,0 +1,4 @@ +/** + * Attempts to resolve `input` URL/path relative to `base`. + */ +export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/resolve-uri/package.json b/node_modules/@jridgewell/resolve-uri/package.json new file mode 100644 index 0000000..02a4c51 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/package.json @@ -0,0 +1,69 @@ +{ + "name": "@jridgewell/resolve-uri", + "version": "3.1.2", + "description": "Resolve a URI relative to an optional base URI", + "keywords": [ + "resolve", + "uri", + "url", + "path" + ], + "author": "Justin Ridgewell ", + "license": "MIT", + "repository": "https://github.com/jridgewell/resolve-uri", + "main": "dist/resolve-uri.umd.js", + "module": "dist/resolve-uri.mjs", + "types": "dist/types/resolve-uri.d.ts", + "exports": { + ".": [ + { + "types": "./dist/types/resolve-uri.d.ts", + "browser": "./dist/resolve-uri.umd.js", + "require": "./dist/resolve-uri.umd.js", + "import": "./dist/resolve-uri.mjs" + }, + "./dist/resolve-uri.umd.js" + ], + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "engines": { + "node": ">=6.0.0" + }, + "scripts": { + "prebuild": "rm -rf dist", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "pretest": "run-s build:rollup", + "test": "run-s -n test:lint test:only", + "test:debug": "mocha --inspect-brk", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:coverage": "c8 mocha", + "test:watch": "mocha --watch", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build" + }, + "devDependencies": { + "@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*", + "@rollup/plugin-typescript": "8.3.0", + "@typescript-eslint/eslint-plugin": "5.10.0", + "@typescript-eslint/parser": "5.10.0", + "c8": "7.11.0", + "eslint": "8.7.0", + "eslint-config-prettier": "8.3.0", + "mocha": "9.2.0", + "npm-run-all": "4.1.5", + "prettier": "2.5.1", + "rollup": "2.66.0", + "typescript": "4.5.5" + } +} diff --git a/node_modules/@jridgewell/sourcemap-codec/LICENSE b/node_modules/@jridgewell/sourcemap-codec/LICENSE new file mode 100644 index 0000000..1f6ce94 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/LICENSE @@ -0,0 +1,19 @@ +Copyright 2024 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@jridgewell/sourcemap-codec/README.md b/node_modules/@jridgewell/sourcemap-codec/README.md new file mode 100644 index 0000000..b3e0708 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/README.md @@ -0,0 +1,264 @@ +# @jridgewell/sourcemap-codec + +Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). + + +## Why? + +Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap. + +This package makes the process slightly easier. + + +## Installation + +```bash +npm install @jridgewell/sourcemap-codec +``` + + +## Usage + +```js +import { encode, decode } from '@jridgewell/sourcemap-codec'; + +var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); + +assert.deepEqual( decoded, [ + // the first line (of the generated code) has no mappings, + // as shown by the starting semi-colon (which separates lines) + [], + + // the second line contains four (comma-separated) segments + [ + // segments are encoded as you'd expect: + // [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ] + + // i.e. the first segment begins at column 2, and maps back to the second column + // of the second line (both zero-based) of the 0th source, and uses the 0th + // name in the `map.names` array + [ 2, 0, 2, 2, 0 ], + + // the remaining segments are 4-length rather than 5-length, + // because they don't map a name + [ 4, 0, 2, 4 ], + [ 6, 0, 2, 5 ], + [ 7, 0, 2, 7 ] + ], + + // the final line contains two segments + [ + [ 2, 1, 10, 19 ], + [ 12, 1, 11, 20 ] + ] +]); + +var encoded = encode( decoded ); +assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); +``` + +## Benchmarks + +``` +node v20.10.0 + +amp.js.map - 45120 segments + +Decode Memory Usage: +local code 5815135 bytes +@jridgewell/sourcemap-codec 1.4.15 5868160 bytes +sourcemap-codec 5492584 bytes +source-map-0.6.1 13569984 bytes +source-map-0.8.0 6390584 bytes +chrome dev tools 8011136 bytes +Smallest memory usage is sourcemap-codec + +Decode speed: +decode: local code x 492 ops/sec ±1.22% (90 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 499 ops/sec ±1.16% (89 runs sampled) +decode: sourcemap-codec x 376 ops/sec ±1.66% (89 runs sampled) +decode: source-map-0.6.1 x 34.99 ops/sec ±0.94% (48 runs sampled) +decode: source-map-0.8.0 x 351 ops/sec ±0.07% (95 runs sampled) +chrome dev tools x 165 ops/sec ±0.91% (86 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 444248 bytes +@jridgewell/sourcemap-codec 1.4.15 623024 bytes +sourcemap-codec 8696280 bytes +source-map-0.6.1 8745176 bytes +source-map-0.8.0 8736624 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 796 ops/sec ±0.11% (97 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 795 ops/sec ±0.25% (98 runs sampled) +encode: sourcemap-codec x 231 ops/sec ±0.83% (86 runs sampled) +encode: source-map-0.6.1 x 166 ops/sec ±0.57% (86 runs sampled) +encode: source-map-0.8.0 x 203 ops/sec ±0.45% (88 runs sampled) +Fastest is encode: local code,encode: @jridgewell/sourcemap-codec 1.4.15 + + +*** + + +babel.min.js.map - 347793 segments + +Decode Memory Usage: +local code 35424960 bytes +@jridgewell/sourcemap-codec 1.4.15 35424696 bytes +sourcemap-codec 36033464 bytes +source-map-0.6.1 62253704 bytes +source-map-0.8.0 43843920 bytes +chrome dev tools 45111400 bytes +Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 + +Decode speed: +decode: local code x 38.18 ops/sec ±5.44% (52 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 38.36 ops/sec ±5.02% (52 runs sampled) +decode: sourcemap-codec x 34.05 ops/sec ±4.45% (47 runs sampled) +decode: source-map-0.6.1 x 4.31 ops/sec ±2.76% (15 runs sampled) +decode: source-map-0.8.0 x 55.60 ops/sec ±0.13% (73 runs sampled) +chrome dev tools x 16.94 ops/sec ±3.78% (46 runs sampled) +Fastest is decode: source-map-0.8.0 + +Encode Memory Usage: +local code 2606016 bytes +@jridgewell/sourcemap-codec 1.4.15 2626440 bytes +sourcemap-codec 21152576 bytes +source-map-0.6.1 25023928 bytes +source-map-0.8.0 25256448 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 127 ops/sec ±0.18% (83 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 128 ops/sec ±0.26% (83 runs sampled) +encode: sourcemap-codec x 29.31 ops/sec ±2.55% (53 runs sampled) +encode: source-map-0.6.1 x 18.85 ops/sec ±3.19% (36 runs sampled) +encode: source-map-0.8.0 x 19.34 ops/sec ±1.97% (36 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 + + +*** + + +preact.js.map - 1992 segments + +Decode Memory Usage: +local code 261696 bytes +@jridgewell/sourcemap-codec 1.4.15 244296 bytes +sourcemap-codec 302816 bytes +source-map-0.6.1 939176 bytes +source-map-0.8.0 336 bytes +chrome dev tools 587368 bytes +Smallest memory usage is source-map-0.8.0 + +Decode speed: +decode: local code x 17,782 ops/sec ±0.32% (97 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 17,863 ops/sec ±0.40% (100 runs sampled) +decode: sourcemap-codec x 12,453 ops/sec ±0.27% (101 runs sampled) +decode: source-map-0.6.1 x 1,288 ops/sec ±1.05% (96 runs sampled) +decode: source-map-0.8.0 x 9,289 ops/sec ±0.27% (101 runs sampled) +chrome dev tools x 4,769 ops/sec ±0.18% (100 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 262944 bytes +@jridgewell/sourcemap-codec 1.4.15 25544 bytes +sourcemap-codec 323048 bytes +source-map-0.6.1 507808 bytes +source-map-0.8.0 507480 bytes +Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 + +Encode speed: +encode: local code x 24,207 ops/sec ±0.79% (95 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 24,288 ops/sec ±0.48% (96 runs sampled) +encode: sourcemap-codec x 6,761 ops/sec ±0.21% (100 runs sampled) +encode: source-map-0.6.1 x 5,374 ops/sec ±0.17% (99 runs sampled) +encode: source-map-0.8.0 x 5,633 ops/sec ±0.32% (99 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15,encode: local code + + +*** + + +react.js.map - 5726 segments + +Decode Memory Usage: +local code 678816 bytes +@jridgewell/sourcemap-codec 1.4.15 678816 bytes +sourcemap-codec 816400 bytes +source-map-0.6.1 2288864 bytes +source-map-0.8.0 721360 bytes +chrome dev tools 1012512 bytes +Smallest memory usage is local code + +Decode speed: +decode: local code x 6,178 ops/sec ±0.19% (98 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 6,261 ops/sec ±0.22% (100 runs sampled) +decode: sourcemap-codec x 4,472 ops/sec ±0.90% (99 runs sampled) +decode: source-map-0.6.1 x 449 ops/sec ±0.31% (95 runs sampled) +decode: source-map-0.8.0 x 3,219 ops/sec ±0.13% (100 runs sampled) +chrome dev tools x 1,743 ops/sec ±0.20% (99 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 140960 bytes +@jridgewell/sourcemap-codec 1.4.15 159808 bytes +sourcemap-codec 969304 bytes +source-map-0.6.1 930520 bytes +source-map-0.8.0 930248 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 8,013 ops/sec ±0.19% (100 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 7,989 ops/sec ±0.20% (101 runs sampled) +encode: sourcemap-codec x 2,472 ops/sec ±0.21% (99 runs sampled) +encode: source-map-0.6.1 x 2,200 ops/sec ±0.17% (99 runs sampled) +encode: source-map-0.8.0 x 2,220 ops/sec ±0.37% (99 runs sampled) +Fastest is encode: local code + + +*** + + +vscode.map - 2141001 segments + +Decode Memory Usage: +local code 198955264 bytes +@jridgewell/sourcemap-codec 1.4.15 199175352 bytes +sourcemap-codec 199102688 bytes +source-map-0.6.1 386323432 bytes +source-map-0.8.0 244116432 bytes +chrome dev tools 293734280 bytes +Smallest memory usage is local code + +Decode speed: +decode: local code x 3.90 ops/sec ±22.21% (15 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 3.95 ops/sec ±23.53% (15 runs sampled) +decode: sourcemap-codec x 3.82 ops/sec ±17.94% (14 runs sampled) +decode: source-map-0.6.1 x 0.61 ops/sec ±7.81% (6 runs sampled) +decode: source-map-0.8.0 x 9.54 ops/sec ±0.28% (28 runs sampled) +chrome dev tools x 2.18 ops/sec ±10.58% (10 runs sampled) +Fastest is decode: source-map-0.8.0 + +Encode Memory Usage: +local code 13509880 bytes +@jridgewell/sourcemap-codec 1.4.15 13537648 bytes +sourcemap-codec 32540104 bytes +source-map-0.6.1 127531040 bytes +source-map-0.8.0 127535312 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 20.10 ops/sec ±0.19% (38 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 20.26 ops/sec ±0.32% (38 runs sampled) +encode: sourcemap-codec x 5.44 ops/sec ±1.64% (18 runs sampled) +encode: source-map-0.6.1 x 2.30 ops/sec ±4.79% (10 runs sampled) +encode: source-map-0.8.0 x 2.46 ops/sec ±6.53% (10 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 +``` + +# License + +MIT diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs new file mode 100644 index 0000000..532bab3 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs @@ -0,0 +1,423 @@ +// src/vlq.ts +var comma = ",".charCodeAt(0); +var semicolon = ";".charCodeAt(0); +var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +var intToChar = new Uint8Array(64); +var charToInt = new Uint8Array(128); +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} +function decodeInteger(reader, relative) { + let value = 0; + let shift = 0; + let integer = 0; + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + const shouldNegate = value & 1; + value >>>= 1; + if (shouldNegate) { + value = -2147483648 | -value; + } + return relative + value; +} +function encodeInteger(builder, num, relative) { + let delta = num - relative; + delta = delta < 0 ? -delta << 1 | 1 : delta << 1; + do { + let clamped = delta & 31; + delta >>>= 5; + if (delta > 0) clamped |= 32; + builder.write(intToChar[clamped]); + } while (delta > 0); + return num; +} +function hasMoreVlq(reader, max) { + if (reader.pos >= max) return false; + return reader.peek() !== comma; +} + +// src/strings.ts +var bufLength = 1024 * 16; +var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + } +} : { + decode(buf) { + let out = ""; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + } +}; +var StringWriter = class { + constructor() { + this.pos = 0; + this.out = ""; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } +}; +var StringReader = class { + constructor(buffer) { + this.pos = 0; + this.buffer = buffer; + } + next() { + return this.buffer.charCodeAt(this.pos++); + } + peek() { + return this.buffer.charCodeAt(this.pos); + } + indexOf(char) { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } +}; + +// src/scopes.ts +var EMPTY = []; +function decodeOriginalScopes(input) { + const { length } = input; + const reader = new StringReader(input); + const scopes = []; + const stack = []; + let line = 0; + for (; reader.pos < length; reader.pos++) { + line = decodeInteger(reader, line); + const column = decodeInteger(reader, 0); + if (!hasMoreVlq(reader, length)) { + const last = stack.pop(); + last[2] = line; + last[3] = column; + continue; + } + const kind = decodeInteger(reader, 0); + const fields = decodeInteger(reader, 0); + const hasName = fields & 1; + const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]; + let vars = EMPTY; + if (hasMoreVlq(reader, length)) { + vars = []; + do { + const varsIndex = decodeInteger(reader, 0); + vars.push(varsIndex); + } while (hasMoreVlq(reader, length)); + } + scope.vars = vars; + scopes.push(scope); + stack.push(scope); + } + return scopes; +} +function encodeOriginalScopes(scopes) { + const writer = new StringWriter(); + for (let i = 0; i < scopes.length; ) { + i = _encodeOriginalScopes(scopes, i, writer, [0]); + } + return writer.flush(); +} +function _encodeOriginalScopes(scopes, index, writer, state) { + const scope = scopes[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; + if (index > 0) writer.write(comma); + state[0] = encodeInteger(writer, startLine, state[0]); + encodeInteger(writer, startColumn, 0); + encodeInteger(writer, kind, 0); + const fields = scope.length === 6 ? 1 : 0; + encodeInteger(writer, fields, 0); + if (scope.length === 6) encodeInteger(writer, scope[5], 0); + for (const v of vars) { + encodeInteger(writer, v, 0); + } + for (index++; index < scopes.length; ) { + const next = scopes[index]; + const { 0: l, 1: c } = next; + if (l > endLine || l === endLine && c >= endColumn) { + break; + } + index = _encodeOriginalScopes(scopes, index, writer, state); + } + writer.write(comma); + state[0] = encodeInteger(writer, endLine, state[0]); + encodeInteger(writer, endColumn, 0); + return index; +} +function decodeGeneratedRanges(input) { + const { length } = input; + const reader = new StringReader(input); + const ranges = []; + const stack = []; + let genLine = 0; + let definitionSourcesIndex = 0; + let definitionScopeIndex = 0; + let callsiteSourcesIndex = 0; + let callsiteLine = 0; + let callsiteColumn = 0; + let bindingLine = 0; + let bindingColumn = 0; + do { + const semi = reader.indexOf(";"); + let genColumn = 0; + for (; reader.pos < semi; reader.pos++) { + genColumn = decodeInteger(reader, genColumn); + if (!hasMoreVlq(reader, semi)) { + const last = stack.pop(); + last[2] = genLine; + last[3] = genColumn; + continue; + } + const fields = decodeInteger(reader, 0); + const hasDefinition = fields & 1; + const hasCallsite = fields & 2; + const hasScope = fields & 4; + let callsite = null; + let bindings = EMPTY; + let range; + if (hasDefinition) { + const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); + definitionScopeIndex = decodeInteger( + reader, + definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0 + ); + definitionSourcesIndex = defSourcesIndex; + range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; + } else { + range = [genLine, genColumn, 0, 0]; + } + range.isScope = !!hasScope; + if (hasCallsite) { + const prevCsi = callsiteSourcesIndex; + const prevLine = callsiteLine; + callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); + const sameSource = prevCsi === callsiteSourcesIndex; + callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); + callsiteColumn = decodeInteger( + reader, + sameSource && prevLine === callsiteLine ? callsiteColumn : 0 + ); + callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; + } + range.callsite = callsite; + if (hasMoreVlq(reader, semi)) { + bindings = []; + do { + bindingLine = genLine; + bindingColumn = genColumn; + const expressionsCount = decodeInteger(reader, 0); + let expressionRanges; + if (expressionsCount < -1) { + expressionRanges = [[decodeInteger(reader, 0)]]; + for (let i = -1; i > expressionsCount; i--) { + const prevBl = bindingLine; + bindingLine = decodeInteger(reader, bindingLine); + bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); + const expression = decodeInteger(reader, 0); + expressionRanges.push([expression, bindingLine, bindingColumn]); + } + } else { + expressionRanges = [[expressionsCount]]; + } + bindings.push(expressionRanges); + } while (hasMoreVlq(reader, semi)); + } + range.bindings = bindings; + ranges.push(range); + stack.push(range); + } + genLine++; + reader.pos = semi + 1; + } while (reader.pos < length); + return ranges; +} +function encodeGeneratedRanges(ranges) { + if (ranges.length === 0) return ""; + const writer = new StringWriter(); + for (let i = 0; i < ranges.length; ) { + i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); + } + return writer.flush(); +} +function _encodeGeneratedRanges(ranges, index, writer, state) { + const range = ranges[index]; + const { + 0: startLine, + 1: startColumn, + 2: endLine, + 3: endColumn, + isScope, + callsite, + bindings + } = range; + if (state[0] < startLine) { + catchupLine(writer, state[0], startLine); + state[0] = startLine; + state[1] = 0; + } else if (index > 0) { + writer.write(comma); + } + state[1] = encodeInteger(writer, range[1], state[1]); + const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0); + encodeInteger(writer, fields, 0); + if (range.length === 6) { + const { 4: sourcesIndex, 5: scopesIndex } = range; + if (sourcesIndex !== state[2]) { + state[3] = 0; + } + state[2] = encodeInteger(writer, sourcesIndex, state[2]); + state[3] = encodeInteger(writer, scopesIndex, state[3]); + } + if (callsite) { + const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; + if (sourcesIndex !== state[4]) { + state[5] = 0; + state[6] = 0; + } else if (callLine !== state[5]) { + state[6] = 0; + } + state[4] = encodeInteger(writer, sourcesIndex, state[4]); + state[5] = encodeInteger(writer, callLine, state[5]); + state[6] = encodeInteger(writer, callColumn, state[6]); + } + if (bindings) { + for (const binding of bindings) { + if (binding.length > 1) encodeInteger(writer, -binding.length, 0); + const expression = binding[0][0]; + encodeInteger(writer, expression, 0); + let bindingStartLine = startLine; + let bindingStartColumn = startColumn; + for (let i = 1; i < binding.length; i++) { + const expRange = binding[i]; + bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); + bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); + encodeInteger(writer, expRange[0], 0); + } + } + } + for (index++; index < ranges.length; ) { + const next = ranges[index]; + const { 0: l, 1: c } = next; + if (l > endLine || l === endLine && c >= endColumn) { + break; + } + index = _encodeGeneratedRanges(ranges, index, writer, state); + } + if (state[0] < endLine) { + catchupLine(writer, state[0], endLine); + state[0] = endLine; + state[1] = 0; + } else { + writer.write(comma); + } + state[1] = encodeInteger(writer, endColumn, state[1]); + return index; +} +function catchupLine(writer, lastLine, line) { + do { + writer.write(semicolon); + } while (++lastLine < line); +} + +// src/sourcemap-codec.ts +function decode(mappings) { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + do { + const semi = reader.indexOf(";"); + const line = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + while (reader.pos < semi) { + let seg; + genColumn = decodeInteger(reader, genColumn); + if (genColumn < lastCol) sorted = false; + lastCol = genColumn; + if (hasMoreVlq(reader, semi)) { + sourcesIndex = decodeInteger(reader, sourcesIndex); + sourceLine = decodeInteger(reader, sourceLine); + sourceColumn = decodeInteger(reader, sourceColumn); + if (hasMoreVlq(reader, semi)) { + namesIndex = decodeInteger(reader, namesIndex); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } else { + seg = [genColumn]; + } + line.push(seg); + reader.pos++; + } + if (!sorted) sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + return decoded; +} +function sort(line) { + line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[0] - b[0]; +} +function encode(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) writer.write(semicolon); + if (line.length === 0) continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) writer.write(comma); + genColumn = encodeInteger(writer, segment[0], genColumn); + if (segment.length === 1) continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + if (segment.length === 4) continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + return writer.flush(); +} +export { + decode, + decodeGeneratedRanges, + decodeOriginalScopes, + encode, + encodeGeneratedRanges, + encodeOriginalScopes +}; +//# sourceMappingURL=sourcemap-codec.mjs.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map new file mode 100644 index 0000000..c276844 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../src/vlq.ts", "../src/strings.ts", "../src/scopes.ts", "../src/sourcemap-codec.ts"], + "mappings": ";AAEO,IAAM,QAAQ,IAAI,WAAW,CAAC;AAC9B,IAAM,YAAY,IAAI,WAAW,CAAC;AAEzC,IAAM,QAAQ;AACd,IAAM,YAAY,IAAI,WAAW,EAAE;AACnC,IAAM,YAAY,IAAI,WAAW,GAAG;AAEpC,SAAS,IAAI,GAAG,IAAI,MAAM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js b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js new file mode 100644 index 0000000..2d8e459 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js @@ -0,0 +1,464 @@ +(function (global, factory) { + if (typeof exports === 'object' && typeof module !== 'undefined') { + factory(module); + module.exports = def(module); + } else if (typeof define === 'function' && define.amd) { + define(['module'], function(mod) { + factory.apply(this, arguments); + mod.exports = def(mod); + }); + } else { + const mod = { exports: {} }; + factory(mod); + global = typeof globalThis !== 'undefined' ? globalThis : global || self; + global.sourcemapCodec = def(mod); + } + function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; } +})(this, (function (module) { +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/sourcemap-codec.ts +var sourcemap_codec_exports = {}; +__export(sourcemap_codec_exports, { + decode: () => decode, + decodeGeneratedRanges: () => decodeGeneratedRanges, + decodeOriginalScopes: () => decodeOriginalScopes, + encode: () => encode, + encodeGeneratedRanges: () => encodeGeneratedRanges, + encodeOriginalScopes: () => encodeOriginalScopes +}); +module.exports = __toCommonJS(sourcemap_codec_exports); + +// src/vlq.ts +var comma = ",".charCodeAt(0); +var semicolon = ";".charCodeAt(0); +var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +var intToChar = new Uint8Array(64); +var charToInt = new Uint8Array(128); +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} +function decodeInteger(reader, relative) { + let value = 0; + let shift = 0; + let integer = 0; + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + const shouldNegate = value & 1; + value >>>= 1; + if (shouldNegate) { + value = -2147483648 | -value; + } + return relative + value; +} +function encodeInteger(builder, num, relative) { + let delta = num - relative; + delta = delta < 0 ? -delta << 1 | 1 : delta << 1; + do { + let clamped = delta & 31; + delta >>>= 5; + if (delta > 0) clamped |= 32; + builder.write(intToChar[clamped]); + } while (delta > 0); + return num; +} +function hasMoreVlq(reader, max) { + if (reader.pos >= max) return false; + return reader.peek() !== comma; +} + +// src/strings.ts +var bufLength = 1024 * 16; +var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + } +} : { + decode(buf) { + let out = ""; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + } +}; +var StringWriter = class { + constructor() { + this.pos = 0; + this.out = ""; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } +}; +var StringReader = class { + constructor(buffer) { + this.pos = 0; + this.buffer = buffer; + } + next() { + return this.buffer.charCodeAt(this.pos++); + } + peek() { + return this.buffer.charCodeAt(this.pos); + } + indexOf(char) { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } +}; + +// src/scopes.ts +var EMPTY = []; +function decodeOriginalScopes(input) { + const { length } = input; + const reader = new StringReader(input); + const scopes = []; + const stack = []; + let line = 0; + for (; reader.pos < length; reader.pos++) { + line = decodeInteger(reader, line); + const column = decodeInteger(reader, 0); + if (!hasMoreVlq(reader, length)) { + const last = stack.pop(); + last[2] = line; + last[3] = column; + continue; + } + const kind = decodeInteger(reader, 0); + const fields = decodeInteger(reader, 0); + const hasName = fields & 1; + const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]; + let vars = EMPTY; + if (hasMoreVlq(reader, length)) { + vars = []; + do { + const varsIndex = decodeInteger(reader, 0); + vars.push(varsIndex); + } while (hasMoreVlq(reader, length)); + } + scope.vars = vars; + scopes.push(scope); + stack.push(scope); + } + return scopes; +} +function encodeOriginalScopes(scopes) { + const writer = new StringWriter(); + for (let i = 0; i < scopes.length; ) { + i = _encodeOriginalScopes(scopes, i, writer, [0]); + } + return writer.flush(); +} +function _encodeOriginalScopes(scopes, index, writer, state) { + const scope = scopes[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; + if (index > 0) writer.write(comma); + state[0] = encodeInteger(writer, startLine, state[0]); + encodeInteger(writer, startColumn, 0); + encodeInteger(writer, kind, 0); + const fields = scope.length === 6 ? 1 : 0; + encodeInteger(writer, fields, 0); + if (scope.length === 6) encodeInteger(writer, scope[5], 0); + for (const v of vars) { + encodeInteger(writer, v, 0); + } + for (index++; index < scopes.length; ) { + const next = scopes[index]; + const { 0: l, 1: c } = next; + if (l > endLine || l === endLine && c >= endColumn) { + break; + } + index = _encodeOriginalScopes(scopes, index, writer, state); + } + writer.write(comma); + state[0] = encodeInteger(writer, endLine, state[0]); + encodeInteger(writer, endColumn, 0); + return index; +} +function decodeGeneratedRanges(input) { + const { length } = input; + const reader = new StringReader(input); + const ranges = []; + const stack = []; + let genLine = 0; + let definitionSourcesIndex = 0; + let definitionScopeIndex = 0; + let callsiteSourcesIndex = 0; + let callsiteLine = 0; + let callsiteColumn = 0; + let bindingLine = 0; + let bindingColumn = 0; + do { + const semi = reader.indexOf(";"); + let genColumn = 0; + for (; reader.pos < semi; reader.pos++) { + genColumn = decodeInteger(reader, genColumn); + if (!hasMoreVlq(reader, semi)) { + const last = stack.pop(); + last[2] = genLine; + last[3] = genColumn; + continue; + } + const fields = decodeInteger(reader, 0); + const hasDefinition = fields & 1; + const hasCallsite = fields & 2; + const hasScope = fields & 4; + let callsite = null; + let bindings = EMPTY; + let range; + if (hasDefinition) { + const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); + definitionScopeIndex = decodeInteger( + reader, + definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0 + ); + definitionSourcesIndex = defSourcesIndex; + range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; + } else { + range = [genLine, genColumn, 0, 0]; + } + range.isScope = !!hasScope; + if (hasCallsite) { + const prevCsi = callsiteSourcesIndex; + const prevLine = callsiteLine; + callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); + const sameSource = prevCsi === callsiteSourcesIndex; + callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); + callsiteColumn = decodeInteger( + reader, + sameSource && prevLine === callsiteLine ? callsiteColumn : 0 + ); + callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; + } + range.callsite = callsite; + if (hasMoreVlq(reader, semi)) { + bindings = []; + do { + bindingLine = genLine; + bindingColumn = genColumn; + const expressionsCount = decodeInteger(reader, 0); + let expressionRanges; + if (expressionsCount < -1) { + expressionRanges = [[decodeInteger(reader, 0)]]; + for (let i = -1; i > expressionsCount; i--) { + const prevBl = bindingLine; + bindingLine = decodeInteger(reader, bindingLine); + bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); + const expression = decodeInteger(reader, 0); + expressionRanges.push([expression, bindingLine, bindingColumn]); + } + } else { + expressionRanges = [[expressionsCount]]; + } + bindings.push(expressionRanges); + } while (hasMoreVlq(reader, semi)); + } + range.bindings = bindings; + ranges.push(range); + stack.push(range); + } + genLine++; + reader.pos = semi + 1; + } while (reader.pos < length); + return ranges; +} +function encodeGeneratedRanges(ranges) { + if (ranges.length === 0) return ""; + const writer = new StringWriter(); + for (let i = 0; i < ranges.length; ) { + i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); + } + return writer.flush(); +} +function _encodeGeneratedRanges(ranges, index, writer, state) { + const range = ranges[index]; + const { + 0: startLine, + 1: startColumn, + 2: endLine, + 3: endColumn, + isScope, + callsite, + bindings + } = range; + if (state[0] < startLine) { + catchupLine(writer, state[0], startLine); + state[0] = startLine; + state[1] = 0; + } else if (index > 0) { + writer.write(comma); + } + state[1] = encodeInteger(writer, range[1], state[1]); + const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0); + encodeInteger(writer, fields, 0); + if (range.length === 6) { + const { 4: sourcesIndex, 5: scopesIndex } = range; + if (sourcesIndex !== state[2]) { + state[3] = 0; + } + state[2] = encodeInteger(writer, sourcesIndex, state[2]); + state[3] = encodeInteger(writer, scopesIndex, state[3]); + } + if (callsite) { + const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; + if (sourcesIndex !== state[4]) { + state[5] = 0; + state[6] = 0; + } else if (callLine !== state[5]) { + state[6] = 0; + } + state[4] = encodeInteger(writer, sourcesIndex, state[4]); + state[5] = encodeInteger(writer, callLine, state[5]); + state[6] = encodeInteger(writer, callColumn, state[6]); + } + if (bindings) { + for (const binding of bindings) { + if (binding.length > 1) encodeInteger(writer, -binding.length, 0); + const expression = binding[0][0]; + encodeInteger(writer, expression, 0); + let bindingStartLine = startLine; + let bindingStartColumn = startColumn; + for (let i = 1; i < binding.length; i++) { + const expRange = binding[i]; + bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); + bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); + encodeInteger(writer, expRange[0], 0); + } + } + } + for (index++; index < ranges.length; ) { + const next = ranges[index]; + const { 0: l, 1: c } = next; + if (l > endLine || l === endLine && c >= endColumn) { + break; + } + index = _encodeGeneratedRanges(ranges, index, writer, state); + } + if (state[0] < endLine) { + catchupLine(writer, state[0], endLine); + state[0] = endLine; + state[1] = 0; + } else { + writer.write(comma); + } + state[1] = encodeInteger(writer, endColumn, state[1]); + return index; +} +function catchupLine(writer, lastLine, line) { + do { + writer.write(semicolon); + } while (++lastLine < line); +} + +// src/sourcemap-codec.ts +function decode(mappings) { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + do { + const semi = reader.indexOf(";"); + const line = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + while (reader.pos < semi) { + let seg; + genColumn = decodeInteger(reader, genColumn); + if (genColumn < lastCol) sorted = false; + lastCol = genColumn; + if (hasMoreVlq(reader, semi)) { + sourcesIndex = decodeInteger(reader, sourcesIndex); + sourceLine = decodeInteger(reader, sourceLine); + sourceColumn = decodeInteger(reader, sourceColumn); + if (hasMoreVlq(reader, semi)) { + namesIndex = decodeInteger(reader, namesIndex); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } else { + seg = [genColumn]; + } + line.push(seg); + reader.pos++; + } + if (!sorted) sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + return decoded; +} +function sort(line) { + line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[0] - b[0]; +} +function encode(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) writer.write(semicolon); + if (line.length === 0) continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) writer.write(comma); + genColumn = encodeInteger(writer, segment[0], genColumn); + if (segment.length === 1) continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + if (segment.length === 4) continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + return writer.flush(); +} +})); +//# sourceMappingURL=sourcemap-codec.umd.js.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map new file mode 100644 index 0000000..abc18d2 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../src/sourcemap-codec.ts", "../src/vlq.ts", "../src/strings.ts", "../src/scopes.ts"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,IAAM,QAAQ,IAAI,WAAW,CAAC;AAC9B,IAAM,YAAY,IAAI,WAAW,CAAC;AAEzC,IAAM,QAAQ;AACd,IAAM,YAAY,IAAI,WAAW,EAAE;AACnC,IAAM,YAAY,IAAI,WAAW,GAAG;AAEpC,SAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,QAAM,IAAI,MAAM,WAAW,CAAC;AAC5B,YAAU,CAAC,IAAI;AACf,YAAU,CAAC,IAAI;AACjB;AAEO,SAAS,cAAc,QAAsB,UAA0B;AAC5E,MAAI,QAAQ;AACZ,MAAI,QAAQ;AACZ,MAAI,UAAU;AAEd,KAAG;AACD,UAAM,IAAI,OAAO,KAAK;AACtB,cAAU,UAAU,CAAC;AACrB,cAAU,UAAU,OAAO;AAC3B,aAAS;AAAA,EACX,SAAS,UAAU;AAEnB,QAAM,eAAe,QAAQ;AAC7B,aAAW;AAEX,MAAI,cAAc;AAChB,YAAQ,cAAc,CAAC;AAAA,EACzB;AAEA,SAAO,WAA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eAAe;AACnB,MAAI,aAAa;AACjB,MAAI,eAAe;AACnB,MAAI,aAAa;AAEjB,WAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACvC,UAAM,OAAO,QAAQ,CAAC;AACtB,QAAI,IAAI,EAAG,QAAO,MAAM,SAAS;AACjC,QAAI,KAAK,WAAW,EAAG;AAEvB,QAAI,YAAY;AAEhB,aAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,YAAM,UAAU,KAAK,CAAC;AACtB,UAAI,IAAI,EAAG,QAAO,MAAM,KAAK;AAE7B,kBAAY,cAAc,QAAQ,QAAQ,CAAC,GAAG,SAAS;AAEvD,UAAI,QAAQ,WAAW,EAAG;AAC1B,qBAAe,cAAc,QAAQ,QAAQ,CAAC,GAAG,YAAY;AAC7D,mBAAa,cAAc,QAAQ,QAAQ,CAAC,GAAG,UAAU;AACzD,qBAAe,cAAc,QAAQ,QAAQ,CAAC,GAAG,YAAY;AAE7D,UAAI,QAAQ,WAAW,EAAG;AAC1B,mBAAa,cAAc,QAAQ,QAAQ,CAAC,GAAG,UAAU;AAAA,IAC3D;AAAA,EACF;AAEA,SAAO,OAAO,MAAM;AACtB;", + "names": [] +} diff --git a/node_modules/@jridgewell/sourcemap-codec/package.json b/node_modules/@jridgewell/sourcemap-codec/package.json new file mode 100644 index 0000000..da55137 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/package.json @@ -0,0 +1,63 @@ +{ + "name": "@jridgewell/sourcemap-codec", + "version": "1.5.5", + "description": "Encode/decode sourcemap mappings", + "keywords": [ + "sourcemap", + "vlq" + ], + "main": "dist/sourcemap-codec.umd.js", + "module": "dist/sourcemap-codec.mjs", + "types": "types/sourcemap-codec.d.cts", + "files": [ + "dist", + "src", + "types" + ], + "exports": { + ".": [ + { + "import": { + "types": "./types/sourcemap-codec.d.mts", + "default": "./dist/sourcemap-codec.mjs" + }, + "default": { + "types": "./types/sourcemap-codec.d.cts", + "default": "./dist/sourcemap-codec.umd.js" + } + }, + "./dist/sourcemap-codec.umd.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "benchmark": "run-s build:code benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node --expose-gc benchmark/index.js", + "build": "run-s -n build:code build:types", + "build:code": "node ../../esbuild.mjs sourcemap-codec.ts", + "build:types": "run-s build:types:force build:types:emit build:types:mts", + "build:types:force": "rimraf tsconfig.build.tsbuildinfo", + "build:types:emit": "tsc --project tsconfig.build.json", + "build:types:mts": "node ../../mts-types.mjs", + "clean": "run-s -n clean:code clean:types", + "clean:code": "tsc --build --clean tsconfig.build.json", + "clean:types": "rimraf dist types", + "test": "run-s -n test:types test:only test:format", + "test:format": "prettier --check '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:types": "eslint '{src,test}/**/*.ts'", + "lint": "run-s -n lint:types lint:format", + "lint:format": "npm run test:format -- --write", + "lint:types": "npm run test:types -- --fix", + "prepublishOnly": "npm run-s -n build test" + }, + "homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/sourcemap-codec", + "repository": { + "type": "git", + "url": "git+https://github.com/jridgewell/sourcemaps.git", + "directory": "packages/sourcemap-codec" + }, + "author": "Justin Ridgewell ", + "license": "MIT" +} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts b/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts new file mode 100644 index 0000000..d194c2f --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts @@ -0,0 +1,345 @@ +import { StringReader, StringWriter } from './strings'; +import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq'; + +const EMPTY: any[] = []; + +type Line = number; +type Column = number; +type Kind = number; +type Name = number; +type Var = number; +type SourcesIndex = number; +type ScopesIndex = number; + +type Mix = (A & O) | (B & O); + +export type OriginalScope = Mix< + [Line, Column, Line, Column, Kind], + [Line, Column, Line, Column, Kind, Name], + { vars: Var[] } +>; + +export type GeneratedRange = Mix< + [Line, Column, Line, Column], + [Line, Column, Line, Column, SourcesIndex, ScopesIndex], + { + callsite: CallSite | null; + bindings: Binding[]; + isScope: boolean; + } +>; +export type CallSite = [SourcesIndex, Line, Column]; +type Binding = BindingExpressionRange[]; +export type BindingExpressionRange = [Name] | [Name, Line, Column]; + +export function decodeOriginalScopes(input: string): OriginalScope[] { + const { length } = input; + const reader = new StringReader(input); + const scopes: OriginalScope[] = []; + const stack: OriginalScope[] = []; + let line = 0; + + for (; reader.pos < length; reader.pos++) { + line = decodeInteger(reader, line); + const column = decodeInteger(reader, 0); + + if (!hasMoreVlq(reader, length)) { + const last = stack.pop()!; + last[2] = line; + last[3] = column; + continue; + } + + const kind = decodeInteger(reader, 0); + const fields = decodeInteger(reader, 0); + const hasName = fields & 0b0001; + + const scope: OriginalScope = ( + hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind] + ) as OriginalScope; + + let vars: Var[] = EMPTY; + if (hasMoreVlq(reader, length)) { + vars = []; + do { + const varsIndex = decodeInteger(reader, 0); + vars.push(varsIndex); + } while (hasMoreVlq(reader, length)); + } + scope.vars = vars; + + scopes.push(scope); + stack.push(scope); + } + + return scopes; +} + +export function encodeOriginalScopes(scopes: OriginalScope[]): string { + const writer = new StringWriter(); + + for (let i = 0; i < scopes.length; ) { + i = _encodeOriginalScopes(scopes, i, writer, [0]); + } + + return writer.flush(); +} + +function _encodeOriginalScopes( + scopes: OriginalScope[], + index: number, + writer: StringWriter, + state: [ + number, // GenColumn + ], +): number { + const scope = scopes[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; + + if (index > 0) writer.write(comma); + + state[0] = encodeInteger(writer, startLine, state[0]); + encodeInteger(writer, startColumn, 0); + encodeInteger(writer, kind, 0); + + const fields = scope.length === 6 ? 0b0001 : 0; + encodeInteger(writer, fields, 0); + if (scope.length === 6) encodeInteger(writer, scope[5], 0); + + for (const v of vars) { + encodeInteger(writer, v, 0); + } + + for (index++; index < scopes.length; ) { + const next = scopes[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeOriginalScopes(scopes, index, writer, state); + } + + writer.write(comma); + state[0] = encodeInteger(writer, endLine, state[0]); + encodeInteger(writer, endColumn, 0); + + return index; +} + +export function decodeGeneratedRanges(input: string): GeneratedRange[] { + const { length } = input; + const reader = new StringReader(input); + const ranges: GeneratedRange[] = []; + const stack: GeneratedRange[] = []; + + let genLine = 0; + let definitionSourcesIndex = 0; + let definitionScopeIndex = 0; + let callsiteSourcesIndex = 0; + let callsiteLine = 0; + let callsiteColumn = 0; + let bindingLine = 0; + let bindingColumn = 0; + + do { + const semi = reader.indexOf(';'); + let genColumn = 0; + + for (; reader.pos < semi; reader.pos++) { + genColumn = decodeInteger(reader, genColumn); + + if (!hasMoreVlq(reader, semi)) { + const last = stack.pop()!; + last[2] = genLine; + last[3] = genColumn; + continue; + } + + const fields = decodeInteger(reader, 0); + const hasDefinition = fields & 0b0001; + const hasCallsite = fields & 0b0010; + const hasScope = fields & 0b0100; + + let callsite: CallSite | null = null; + let bindings: Binding[] = EMPTY; + let range: GeneratedRange; + if (hasDefinition) { + const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); + definitionScopeIndex = decodeInteger( + reader, + definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0, + ); + + definitionSourcesIndex = defSourcesIndex; + range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange; + } else { + range = [genLine, genColumn, 0, 0] as GeneratedRange; + } + + range.isScope = !!hasScope; + + if (hasCallsite) { + const prevCsi = callsiteSourcesIndex; + const prevLine = callsiteLine; + callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); + const sameSource = prevCsi === callsiteSourcesIndex; + callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); + callsiteColumn = decodeInteger( + reader, + sameSource && prevLine === callsiteLine ? callsiteColumn : 0, + ); + + callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; + } + range.callsite = callsite; + + if (hasMoreVlq(reader, semi)) { + bindings = []; + do { + bindingLine = genLine; + bindingColumn = genColumn; + const expressionsCount = decodeInteger(reader, 0); + let expressionRanges: BindingExpressionRange[]; + if (expressionsCount < -1) { + expressionRanges = [[decodeInteger(reader, 0)]]; + for (let i = -1; i > expressionsCount; i--) { + const prevBl = bindingLine; + bindingLine = decodeInteger(reader, bindingLine); + bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); + const expression = decodeInteger(reader, 0); + expressionRanges.push([expression, bindingLine, bindingColumn]); + } + } else { + expressionRanges = [[expressionsCount]]; + } + bindings.push(expressionRanges); + } while (hasMoreVlq(reader, semi)); + } + range.bindings = bindings; + + ranges.push(range); + stack.push(range); + } + + genLine++; + reader.pos = semi + 1; + } while (reader.pos < length); + + return ranges; +} + +export function encodeGeneratedRanges(ranges: GeneratedRange[]): string { + if (ranges.length === 0) return ''; + + const writer = new StringWriter(); + + for (let i = 0; i < ranges.length; ) { + i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); + } + + return writer.flush(); +} + +function _encodeGeneratedRanges( + ranges: GeneratedRange[], + index: number, + writer: StringWriter, + state: [ + number, // GenLine + number, // GenColumn + number, // DefSourcesIndex + number, // DefScopesIndex + number, // CallSourcesIndex + number, // CallLine + number, // CallColumn + ], +): number { + const range = ranges[index]; + const { + 0: startLine, + 1: startColumn, + 2: endLine, + 3: endColumn, + isScope, + callsite, + bindings, + } = range; + + if (state[0] < startLine) { + catchupLine(writer, state[0], startLine); + state[0] = startLine; + state[1] = 0; + } else if (index > 0) { + writer.write(comma); + } + + state[1] = encodeInteger(writer, range[1], state[1]); + + const fields = + (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0); + encodeInteger(writer, fields, 0); + + if (range.length === 6) { + const { 4: sourcesIndex, 5: scopesIndex } = range; + if (sourcesIndex !== state[2]) { + state[3] = 0; + } + state[2] = encodeInteger(writer, sourcesIndex, state[2]); + state[3] = encodeInteger(writer, scopesIndex, state[3]); + } + + if (callsite) { + const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!; + if (sourcesIndex !== state[4]) { + state[5] = 0; + state[6] = 0; + } else if (callLine !== state[5]) { + state[6] = 0; + } + state[4] = encodeInteger(writer, sourcesIndex, state[4]); + state[5] = encodeInteger(writer, callLine, state[5]); + state[6] = encodeInteger(writer, callColumn, state[6]); + } + + if (bindings) { + for (const binding of bindings) { + if (binding.length > 1) encodeInteger(writer, -binding.length, 0); + const expression = binding[0][0]; + encodeInteger(writer, expression, 0); + let bindingStartLine = startLine; + let bindingStartColumn = startColumn; + for (let i = 1; i < binding.length; i++) { + const expRange = binding[i]; + bindingStartLine = encodeInteger(writer, expRange[1]!, bindingStartLine); + bindingStartColumn = encodeInteger(writer, expRange[2]!, bindingStartColumn); + encodeInteger(writer, expRange[0]!, 0); + } + } + } + + for (index++; index < ranges.length; ) { + const next = ranges[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeGeneratedRanges(ranges, index, writer, state); + } + + if (state[0] < endLine) { + catchupLine(writer, state[0], endLine); + state[0] = endLine; + state[1] = 0; + } else { + writer.write(comma); + } + state[1] = encodeInteger(writer, endColumn, state[1]); + + return index; +} + +function catchupLine(writer: StringWriter, lastLine: number, line: number) { + do { + writer.write(semicolon); + } while (++lastLine < line); +} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts b/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts new file mode 100644 index 0000000..a81f894 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts @@ -0,0 +1,111 @@ +import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq'; +import { StringWriter, StringReader } from './strings'; + +export { + decodeOriginalScopes, + encodeOriginalScopes, + decodeGeneratedRanges, + encodeGeneratedRanges, +} from './scopes'; +export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes'; + +export type SourceMapSegment = + | [number] + | [number, number, number, number] + | [number, number, number, number, number]; +export type SourceMapLine = SourceMapSegment[]; +export type SourceMapMappings = SourceMapLine[]; + +export function decode(mappings: string): SourceMapMappings { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded: SourceMapMappings = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + + do { + const semi = reader.indexOf(';'); + const line: SourceMapLine = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + + while (reader.pos < semi) { + let seg: SourceMapSegment; + + genColumn = decodeInteger(reader, genColumn); + if (genColumn < lastCol) sorted = false; + lastCol = genColumn; + + if (hasMoreVlq(reader, semi)) { + sourcesIndex = decodeInteger(reader, sourcesIndex); + sourceLine = decodeInteger(reader, sourceLine); + sourceColumn = decodeInteger(reader, sourceColumn); + + if (hasMoreVlq(reader, semi)) { + namesIndex = decodeInteger(reader, namesIndex); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } else { + seg = [genColumn]; + } + + line.push(seg); + reader.pos++; + } + + if (!sorted) sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + + return decoded; +} + +function sort(line: SourceMapSegment[]) { + line.sort(sortComparator); +} + +function sortComparator(a: SourceMapSegment, b: SourceMapSegment): number { + return a[0] - b[0]; +} + +export function encode(decoded: SourceMapMappings): string; +export function encode(decoded: Readonly): string; +export function encode(decoded: Readonly): string { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) writer.write(semicolon); + if (line.length === 0) continue; + + let genColumn = 0; + + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) writer.write(comma); + + genColumn = encodeInteger(writer, segment[0], genColumn); + + if (segment.length === 1) continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + + if (segment.length === 4) continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + + return writer.flush(); +} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/strings.ts b/node_modules/@jridgewell/sourcemap-codec/src/strings.ts new file mode 100644 index 0000000..d161965 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/src/strings.ts @@ -0,0 +1,65 @@ +const bufLength = 1024 * 16; + +// Provide a fallback for older environments. +const td = + typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf: Uint8Array): string { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf: Uint8Array): string { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; + +export class StringWriter { + pos = 0; + private out = ''; + private buffer = new Uint8Array(bufLength); + + write(v: number): void { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + + flush(): string { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } +} + +export class StringReader { + pos = 0; + declare private buffer: string; + + constructor(buffer: string) { + this.buffer = buffer; + } + + next(): number { + return this.buffer.charCodeAt(this.pos++); + } + + peek(): number { + return this.buffer.charCodeAt(this.pos); + } + + indexOf(char: string): number { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } +} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts b/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts new file mode 100644 index 0000000..a42c681 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts @@ -0,0 +1,55 @@ +import type { StringReader, StringWriter } from './strings'; + +export const comma = ','.charCodeAt(0); +export const semicolon = ';'.charCodeAt(0); + +const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const intToChar = new Uint8Array(64); // 64 possible chars. +const charToInt = new Uint8Array(128); // z is 122 in ASCII + +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} + +export function decodeInteger(reader: StringReader, relative: number): number { + let value = 0; + let shift = 0; + let integer = 0; + + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + + const shouldNegate = value & 1; + value >>>= 1; + + if (shouldNegate) { + value = -0x80000000 | -value; + } + + return relative + value; +} + +export function encodeInteger(builder: StringWriter, num: number, relative: number): number { + let delta = num - relative; + + delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; + do { + let clamped = delta & 0b011111; + delta >>>= 5; + if (delta > 0) clamped |= 0b100000; + builder.write(intToChar[clamped]); + } while (delta > 0); + + return num; +} + +export function hasMoreVlq(reader: StringReader, max: number) { + if (reader.pos >= max) return false; + return reader.peek() !== comma; +} diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts new file mode 100644 index 0000000..c583c75 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts @@ -0,0 +1,50 @@ +type Line = number; +type Column = number; +type Kind = number; +type Name = number; +type Var = number; +type SourcesIndex = number; +type ScopesIndex = number; +type Mix = (A & O) | (B & O); +export type OriginalScope = Mix<[ + Line, + Column, + Line, + Column, + Kind +], [ + Line, + Column, + Line, + Column, + Kind, + Name +], { + vars: Var[]; +}>; +export type GeneratedRange = Mix<[ + Line, + Column, + Line, + Column +], [ + Line, + Column, + Line, + Column, + SourcesIndex, + ScopesIndex +], { + callsite: CallSite | null; + bindings: Binding[]; + isScope: boolean; +}>; +export type CallSite = [SourcesIndex, Line, Column]; +type Binding = BindingExpressionRange[]; +export type BindingExpressionRange = [Name] | [Name, Line, Column]; +export declare function decodeOriginalScopes(input: string): OriginalScope[]; +export declare function encodeOriginalScopes(scopes: OriginalScope[]): string; +export declare function decodeGeneratedRanges(input: string): GeneratedRange[]; +export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string; +export {}; +//# sourceMappingURL=scopes.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map new file mode 100644 index 0000000..630e647 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAKA,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,MAAM,GAAG,MAAM,CAAC;AACrB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,GAAG,GAAG,MAAM,CAAC;AAClB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,WAAW,GAAG,MAAM,CAAC;AAE1B,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAEtC,MAAM,MAAM,aAAa,GAAG,GAAG,CAC7B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;CAAC,EAClC;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,IAAI;CAAC,EACxC;IAAE,IAAI,EAAE,GAAG,EAAE,CAAA;CAAE,CAChB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,GAAG,CAC9B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;CAAC,EAC5B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,YAAY;IAAE,WAAW;CAAC,EACvD;IACE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,CACF,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACpD,KAAK,OAAO,GAAG,sBAAsB,EAAE,CAAC;AACxC,MAAM,MAAM,sBAAsB,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAEnE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CAyCnE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAQpE;AA2CD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE,CAoGrE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAUtE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts new file mode 100644 index 0000000..c583c75 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts @@ -0,0 +1,50 @@ +type Line = number; +type Column = number; +type Kind = number; +type Name = number; +type Var = number; +type SourcesIndex = number; +type ScopesIndex = number; +type Mix = (A & O) | (B & O); +export type OriginalScope = Mix<[ + Line, + Column, + Line, + Column, + Kind +], [ + Line, + Column, + Line, + Column, + Kind, + Name +], { + vars: Var[]; +}>; +export type GeneratedRange = Mix<[ + Line, + Column, + Line, + Column +], [ + Line, + Column, + Line, + Column, + SourcesIndex, + ScopesIndex +], { + callsite: CallSite | null; + bindings: Binding[]; + isScope: boolean; +}>; +export type CallSite = [SourcesIndex, Line, Column]; +type Binding = BindingExpressionRange[]; +export type BindingExpressionRange = [Name] | [Name, Line, Column]; +export declare function decodeOriginalScopes(input: string): OriginalScope[]; +export declare function encodeOriginalScopes(scopes: OriginalScope[]): string; +export declare function decodeGeneratedRanges(input: string): GeneratedRange[]; +export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string; +export {}; +//# sourceMappingURL=scopes.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map new file mode 100644 index 0000000..630e647 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAKA,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,MAAM,GAAG,MAAM,CAAC;AACrB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,GAAG,GAAG,MAAM,CAAC;AAClB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,WAAW,GAAG,MAAM,CAAC;AAE1B,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAEtC,MAAM,MAAM,aAAa,GAAG,GAAG,CAC7B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;CAAC,EAClC;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,IAAI;CAAC,EACxC;IAAE,IAAI,EAAE,GAAG,EAAE,CAAA;CAAE,CAChB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,GAAG,CAC9B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;CAAC,EAC5B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,YAAY;IAAE,WAAW;CAAC,EACvD;IACE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,CACF,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACpD,KAAK,OAAO,GAAG,sBAAsB,EAAE,CAAC;AACxC,MAAM,MAAM,sBAAsB,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAEnE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CAyCnE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAQpE;AA2CD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE,CAoGrE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAUtE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts new file mode 100644 index 0000000..5f35e22 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts @@ -0,0 +1,9 @@ +export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes.cts'; +export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes.cts'; +export type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number]; +export type SourceMapLine = SourceMapSegment[]; +export type SourceMapMappings = SourceMapLine[]; +export declare function decode(mappings: string): SourceMapMappings; +export declare function encode(decoded: SourceMapMappings): string; +export declare function encode(decoded: Readonly): string; +//# sourceMappingURL=sourcemap-codec.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map new file mode 100644 index 0000000..7123d52 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.d.ts","sourceRoot":"","sources":["../src/sourcemap-codec.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,MAAM,gBAAgB,GACxB,CAAC,MAAM,CAAC,GACR,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAChC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,MAAM,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAC/C,MAAM,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AAEhD,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAiD1D;AAUD,wBAAgB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC;AAC3D,wBAAgB,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts new file mode 100644 index 0000000..199fb9f --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts @@ -0,0 +1,9 @@ +export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes.mts'; +export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes.mts'; +export type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number]; +export type SourceMapLine = SourceMapSegment[]; +export type SourceMapMappings = SourceMapLine[]; +export declare function decode(mappings: string): SourceMapMappings; +export declare function encode(decoded: SourceMapMappings): string; +export declare function encode(decoded: Readonly): string; +//# sourceMappingURL=sourcemap-codec.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map new file mode 100644 index 0000000..7123d52 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.d.ts","sourceRoot":"","sources":["../src/sourcemap-codec.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,MAAM,gBAAgB,GACxB,CAAC,MAAM,CAAC,GACR,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAChC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,MAAM,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAC/C,MAAM,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AAEhD,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAiD1D;AAUD,wBAAgB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC;AAC3D,wBAAgB,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts new file mode 100644 index 0000000..62faceb --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts @@ -0,0 +1,16 @@ +export declare class StringWriter { + pos: number; + private out; + private buffer; + write(v: number): void; + flush(): string; +} +export declare class StringReader { + pos: number; + private buffer; + constructor(buffer: string); + next(): number; + peek(): number; + indexOf(char: string): number; +} +//# sourceMappingURL=strings.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map new file mode 100644 index 0000000..d3602da --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src/strings.ts"],"names":[],"mappings":"AAuBA,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,MAAM,CAA6B;IAE3C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAStB,KAAK,IAAI,MAAM;CAIhB;AAED,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,QAAgB,MAAM,CAAS;gBAEnB,MAAM,EAAE,MAAM;IAI1B,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,MAAM;IAId,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAK9B"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts new file mode 100644 index 0000000..62faceb --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts @@ -0,0 +1,16 @@ +export declare class StringWriter { + pos: number; + private out; + private buffer; + write(v: number): void; + flush(): string; +} +export declare class StringReader { + pos: number; + private buffer; + constructor(buffer: string); + next(): number; + peek(): number; + indexOf(char: string): number; +} +//# sourceMappingURL=strings.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map new file mode 100644 index 0000000..d3602da --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src/strings.ts"],"names":[],"mappings":"AAuBA,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,MAAM,CAA6B;IAE3C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAStB,KAAK,IAAI,MAAM;CAIhB;AAED,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,QAAgB,MAAM,CAAS;gBAEnB,MAAM,EAAE,MAAM;IAI1B,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,MAAM;IAId,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAK9B"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts new file mode 100644 index 0000000..dbd6602 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts @@ -0,0 +1,7 @@ +import type { StringReader, StringWriter } from './strings.cts'; +export declare const comma: number; +export declare const semicolon: number; +export declare function decodeInteger(reader: StringReader, relative: number): number; +export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number; +export declare function hasMoreVlq(reader: StringReader, max: number): boolean; +//# sourceMappingURL=vlq.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map new file mode 100644 index 0000000..6fdc356 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"vlq.d.ts","sourceRoot":"","sources":["../src/vlq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,eAAO,MAAM,KAAK,QAAoB,CAAC;AACvC,eAAO,MAAM,SAAS,QAAoB,CAAC;AAY3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoB5E;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY1F;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,WAG3D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts new file mode 100644 index 0000000..2c739bc --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts @@ -0,0 +1,7 @@ +import type { StringReader, StringWriter } from './strings.mts'; +export declare const comma: number; +export declare const semicolon: number; +export declare function decodeInteger(reader: StringReader, relative: number): number; +export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number; +export declare function hasMoreVlq(reader: StringReader, max: number): boolean; +//# sourceMappingURL=vlq.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map new file mode 100644 index 0000000..6fdc356 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"vlq.d.ts","sourceRoot":"","sources":["../src/vlq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,eAAO,MAAM,KAAK,QAAoB,CAAC;AACvC,eAAO,MAAM,SAAS,QAAoB,CAAC;AAY3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoB5E;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY1F;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,WAG3D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/LICENSE b/node_modules/@jridgewell/trace-mapping/LICENSE new file mode 100644 index 0000000..1f6ce94 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/LICENSE @@ -0,0 +1,19 @@ +Copyright 2024 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@jridgewell/trace-mapping/README.md b/node_modules/@jridgewell/trace-mapping/README.md new file mode 100644 index 0000000..9fc0ed0 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/README.md @@ -0,0 +1,348 @@ +# @jridgewell/trace-mapping + +> Trace the original position through a source map + +`trace-mapping` allows you to take the line and column of an output file and trace it to the +original location in the source file through a source map. + +You may already be familiar with the [`source-map`][source-map] package's `SourceMapConsumer`. This +provides the same `originalPositionFor` and `generatedPositionFor` API, without requiring WASM. + +## Installation + +```sh +npm install @jridgewell/trace-mapping +``` + +## Usage + +```typescript +import { + TraceMap, + originalPositionFor, + generatedPositionFor, + sourceContentFor, + isIgnored, +} from '@jridgewell/trace-mapping'; + +const tracer = new TraceMap({ + version: 3, + sources: ['input.js'], + sourcesContent: ['content of input.js'], + names: ['foo'], + mappings: 'KAyCIA', + ignoreList: [], +}); + +// Lines start at line 1, columns at column 0. +const traced = originalPositionFor(tracer, { line: 1, column: 5 }); +assert.deepEqual(traced, { + source: 'input.js', + line: 42, + column: 4, + name: 'foo', +}); + +const content = sourceContentFor(tracer, traced.source); +assert.strictEqual(content, 'content for input.js'); + +const generated = generatedPositionFor(tracer, { + source: 'input.js', + line: 42, + column: 4, +}); +assert.deepEqual(generated, { + line: 1, + column: 5, +}); + +const ignored = isIgnored(tracer, 'input.js'); +assert.equal(ignored, false); +``` + +We also provide a lower level API to get the actual segment that matches our line and column. Unlike +`originalPositionFor`, `traceSegment` uses a 0-base for `line`: + +```typescript +import { traceSegment } from '@jridgewell/trace-mapping'; + +// line is 0-base. +const traced = traceSegment(tracer, /* line */ 0, /* column */ 5); + +// Segments are [outputColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] +// Again, line is 0-base and so is sourceLine +assert.deepEqual(traced, [5, 0, 41, 4, 0]); +``` + +### SectionedSourceMaps + +The sourcemap spec defines a special `sections` field that's designed to handle concatenation of +output code with associated sourcemaps. This type of sourcemap is rarely used (no major build tool +produces it), but if you are hand coding a concatenation you may need it. We provide an `AnyMap` +helper that can receive either a regular sourcemap or a `SectionedSourceMap` and returns a +`TraceMap` instance: + +```typescript +import { AnyMap } from '@jridgewell/trace-mapping'; +const fooOutput = 'foo'; +const barOutput = 'bar'; +const output = [fooOutput, barOutput].join('\n'); + +const sectioned = new AnyMap({ + version: 3, + sections: [ + { + // 0-base line and column + offset: { line: 0, column: 0 }, + // fooOutput's sourcemap + map: { + version: 3, + sources: ['foo.js'], + names: ['foo'], + mappings: 'AAAAA', + }, + }, + { + // barOutput's sourcemap will not affect the first line, only the second + offset: { line: 1, column: 0 }, + map: { + version: 3, + sources: ['bar.js'], + names: ['bar'], + mappings: 'AAAAA', + }, + }, + ], +}); + +const traced = originalPositionFor(sectioned, { + line: 2, + column: 0, +}); + +assert.deepEqual(traced, { + source: 'bar.js', + line: 1, + column: 0, + name: 'bar', +}); +``` + +## Benchmarks + +``` +node v20.10.0 + +amp.js.map - 45120 segments + +Memory Usage: +trace-mapping decoded 414164 bytes +trace-mapping encoded 6274352 bytes +source-map-js 10968904 bytes +source-map-0.6.1 17587160 bytes +source-map-0.8.0 8812155 bytes +Chrome dev tools 8672912 bytes +Smallest memory usage is trace-mapping decoded + +Init speed: +trace-mapping: decoded JSON input x 205 ops/sec ±0.19% (88 runs sampled) +trace-mapping: encoded JSON input x 405 ops/sec ±1.47% (88 runs sampled) +trace-mapping: decoded Object input x 4,645 ops/sec ±0.15% (98 runs sampled) +trace-mapping: encoded Object input x 458 ops/sec ±1.63% (91 runs sampled) +source-map-js: encoded Object input x 75.48 ops/sec ±1.64% (67 runs sampled) +source-map-0.6.1: encoded Object input x 39.37 ops/sec ±1.44% (53 runs sampled) +Chrome dev tools: encoded Object input x 150 ops/sec ±1.76% (79 runs sampled) +Fastest is trace-mapping: decoded Object input + +Trace speed (random): +trace-mapping: decoded originalPositionFor x 44,946 ops/sec ±0.16% (99 runs sampled) +trace-mapping: encoded originalPositionFor x 37,995 ops/sec ±1.81% (89 runs sampled) +source-map-js: encoded originalPositionFor x 9,230 ops/sec ±1.36% (93 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 8,057 ops/sec ±0.84% (96 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 28,198 ops/sec ±1.12% (91 runs sampled) +Chrome dev tools: encoded originalPositionFor x 46,276 ops/sec ±1.35% (95 runs sampled) +Fastest is Chrome dev tools: encoded originalPositionFor + +Trace speed (ascending): +trace-mapping: decoded originalPositionFor x 204,406 ops/sec ±0.19% (97 runs sampled) +trace-mapping: encoded originalPositionFor x 196,695 ops/sec ±0.24% (99 runs sampled) +source-map-js: encoded originalPositionFor x 11,948 ops/sec ±0.94% (99 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 10,730 ops/sec ±0.36% (100 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 51,427 ops/sec ±0.21% (98 runs sampled) +Chrome dev tools: encoded originalPositionFor x 162,615 ops/sec ±0.18% (98 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + + +*** + + +babel.min.js.map - 347793 segments + +Memory Usage: +trace-mapping decoded 18504 bytes +trace-mapping encoded 35428008 bytes +source-map-js 51676808 bytes +source-map-0.6.1 63367136 bytes +source-map-0.8.0 43158400 bytes +Chrome dev tools 50721552 bytes +Smallest memory usage is trace-mapping decoded + +Init speed: +trace-mapping: decoded JSON input x 17.82 ops/sec ±6.35% (35 runs sampled) +trace-mapping: encoded JSON input x 31.57 ops/sec ±7.50% (43 runs sampled) +trace-mapping: decoded Object input x 867 ops/sec ±0.74% (94 runs sampled) +trace-mapping: encoded Object input x 33.83 ops/sec ±7.66% (46 runs sampled) +source-map-js: encoded Object input x 6.58 ops/sec ±3.31% (20 runs sampled) +source-map-0.6.1: encoded Object input x 4.23 ops/sec ±3.43% (15 runs sampled) +Chrome dev tools: encoded Object input x 22.14 ops/sec ±3.79% (41 runs sampled) +Fastest is trace-mapping: decoded Object input + +Trace speed (random): +trace-mapping: decoded originalPositionFor x 78,234 ops/sec ±1.48% (29 runs sampled) +trace-mapping: encoded originalPositionFor x 60,761 ops/sec ±1.35% (21 runs sampled) +source-map-js: encoded originalPositionFor x 51,448 ops/sec ±2.17% (89 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 47,221 ops/sec ±1.99% (15 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 84,002 ops/sec ±1.45% (27 runs sampled) +Chrome dev tools: encoded originalPositionFor x 106,457 ops/sec ±1.38% (37 runs sampled) +Fastest is Chrome dev tools: encoded originalPositionFor + +Trace speed (ascending): +trace-mapping: decoded originalPositionFor x 930,943 ops/sec ±0.25% (99 runs sampled) +trace-mapping: encoded originalPositionFor x 843,545 ops/sec ±0.34% (97 runs sampled) +source-map-js: encoded originalPositionFor x 114,510 ops/sec ±1.37% (36 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 87,412 ops/sec ±0.72% (92 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 197,709 ops/sec ±0.89% (59 runs sampled) +Chrome dev tools: encoded originalPositionFor x 688,983 ops/sec ±0.33% (98 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + + +*** + + +preact.js.map - 1992 segments + +Memory Usage: +trace-mapping decoded 33136 bytes +trace-mapping encoded 254240 bytes +source-map-js 837488 bytes +source-map-0.6.1 961928 bytes +source-map-0.8.0 54384 bytes +Chrome dev tools 709680 bytes +Smallest memory usage is trace-mapping decoded + +Init speed: +trace-mapping: decoded JSON input x 3,709 ops/sec ±0.13% (99 runs sampled) +trace-mapping: encoded JSON input x 6,447 ops/sec ±0.22% (101 runs sampled) +trace-mapping: decoded Object input x 83,062 ops/sec ±0.23% (100 runs sampled) +trace-mapping: encoded Object input x 14,980 ops/sec ±0.28% (100 runs sampled) +source-map-js: encoded Object input x 2,544 ops/sec ±0.16% (99 runs sampled) +source-map-0.6.1: encoded Object input x 1,221 ops/sec ±0.37% (97 runs sampled) +Chrome dev tools: encoded Object input x 4,241 ops/sec ±0.39% (93 runs sampled) +Fastest is trace-mapping: decoded Object input + +Trace speed (random): +trace-mapping: decoded originalPositionFor x 91,028 ops/sec ±0.14% (94 runs sampled) +trace-mapping: encoded originalPositionFor x 84,348 ops/sec ±0.26% (98 runs sampled) +source-map-js: encoded originalPositionFor x 26,998 ops/sec ±0.23% (98 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 18,049 ops/sec ±0.26% (100 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 41,916 ops/sec ±0.28% (98 runs sampled) +Chrome dev tools: encoded originalPositionFor x 88,616 ops/sec ±0.14% (98 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + +Trace speed (ascending): +trace-mapping: decoded originalPositionFor x 319,960 ops/sec ±0.16% (100 runs sampled) +trace-mapping: encoded originalPositionFor x 302,153 ops/sec ±0.18% (100 runs sampled) +source-map-js: encoded originalPositionFor x 35,574 ops/sec ±0.19% (100 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 19,943 ops/sec ±0.12% (101 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 54,648 ops/sec ±0.20% (99 runs sampled) +Chrome dev tools: encoded originalPositionFor x 278,319 ops/sec ±0.17% (102 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + + +*** + + +react.js.map - 5726 segments + +Memory Usage: +trace-mapping decoded 10872 bytes +trace-mapping encoded 681512 bytes +source-map-js 2563944 bytes +source-map-0.6.1 2150864 bytes +source-map-0.8.0 88680 bytes +Chrome dev tools 1149576 bytes +Smallest memory usage is trace-mapping decoded + +Init speed: +trace-mapping: decoded JSON input x 1,887 ops/sec ±0.28% (99 runs sampled) +trace-mapping: encoded JSON input x 4,749 ops/sec ±0.48% (97 runs sampled) +trace-mapping: decoded Object input x 74,236 ops/sec ±0.11% (99 runs sampled) +trace-mapping: encoded Object input x 5,752 ops/sec ±0.38% (100 runs sampled) +source-map-js: encoded Object input x 806 ops/sec ±0.19% (97 runs sampled) +source-map-0.6.1: encoded Object input x 418 ops/sec ±0.33% (94 runs sampled) +Chrome dev tools: encoded Object input x 1,524 ops/sec ±0.57% (92 runs sampled) +Fastest is trace-mapping: decoded Object input + +Trace speed (random): +trace-mapping: decoded originalPositionFor x 620,201 ops/sec ±0.33% (96 runs sampled) +trace-mapping: encoded originalPositionFor x 579,548 ops/sec ±0.35% (97 runs sampled) +source-map-js: encoded originalPositionFor x 230,983 ops/sec ±0.62% (54 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 158,145 ops/sec ±0.80% (46 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 343,801 ops/sec ±0.55% (96 runs sampled) +Chrome dev tools: encoded originalPositionFor x 659,649 ops/sec ±0.49% (98 runs sampled) +Fastest is Chrome dev tools: encoded originalPositionFor + +Trace speed (ascending): +trace-mapping: decoded originalPositionFor x 2,368,079 ops/sec ±0.32% (98 runs sampled) +trace-mapping: encoded originalPositionFor x 2,134,039 ops/sec ±2.72% (87 runs sampled) +source-map-js: encoded originalPositionFor x 290,120 ops/sec ±2.49% (82 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 187,613 ops/sec ±0.86% (49 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 479,569 ops/sec ±0.65% (96 runs sampled) +Chrome dev tools: encoded originalPositionFor x 2,048,414 ops/sec ±0.24% (98 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + + +*** + + +vscode.map - 2141001 segments + +Memory Usage: +trace-mapping decoded 5206584 bytes +trace-mapping encoded 208370336 bytes +source-map-js 278493008 bytes +source-map-0.6.1 391564048 bytes +source-map-0.8.0 257508787 bytes +Chrome dev tools 291053000 bytes +Smallest memory usage is trace-mapping decoded + +Init speed: +trace-mapping: decoded JSON input x 1.63 ops/sec ±33.88% (9 runs sampled) +trace-mapping: encoded JSON input x 3.29 ops/sec ±36.13% (13 runs sampled) +trace-mapping: decoded Object input x 103 ops/sec ±0.93% (77 runs sampled) +trace-mapping: encoded Object input x 5.42 ops/sec ±28.54% (19 runs sampled) +source-map-js: encoded Object input x 1.07 ops/sec ±13.84% (7 runs sampled) +source-map-0.6.1: encoded Object input x 0.60 ops/sec ±2.43% (6 runs sampled) +Chrome dev tools: encoded Object input x 2.61 ops/sec ±22.00% (11 runs sampled) +Fastest is trace-mapping: decoded Object input + +Trace speed (random): +trace-mapping: decoded originalPositionFor x 257,019 ops/sec ±0.97% (93 runs sampled) +trace-mapping: encoded originalPositionFor x 179,163 ops/sec ±0.83% (92 runs sampled) +source-map-js: encoded originalPositionFor x 73,337 ops/sec ±1.35% (87 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 38,797 ops/sec ±1.66% (88 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 107,758 ops/sec ±1.94% (45 runs sampled) +Chrome dev tools: encoded originalPositionFor x 188,550 ops/sec ±1.85% (79 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + +Trace speed (ascending): +trace-mapping: decoded originalPositionFor x 447,621 ops/sec ±3.64% (94 runs sampled) +trace-mapping: encoded originalPositionFor x 323,698 ops/sec ±5.20% (88 runs sampled) +source-map-js: encoded originalPositionFor x 78,387 ops/sec ±1.69% (89 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 41,016 ops/sec ±3.01% (25 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 124,204 ops/sec ±0.90% (92 runs sampled) +Chrome dev tools: encoded originalPositionFor x 230,087 ops/sec ±2.61% (93 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor +``` + +[source-map]: https://www.npmjs.com/package/source-map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs new file mode 100644 index 0000000..73a95c7 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs @@ -0,0 +1,493 @@ +// src/trace-mapping.ts +import { encode, decode } from "@jridgewell/sourcemap-codec"; + +// src/resolve.ts +import resolveUri from "@jridgewell/resolve-uri"; + +// src/strip-filename.ts +function stripFilename(path) { + if (!path) return ""; + const index = path.lastIndexOf("/"); + return path.slice(0, index + 1); +} + +// src/resolve.ts +function resolver(mapUrl, sourceRoot) { + const from = stripFilename(mapUrl); + const prefix = sourceRoot ? sourceRoot + "/" : ""; + return (source) => resolveUri(prefix + (source || ""), from); +} + +// src/sourcemap-segment.ts +var COLUMN = 0; +var SOURCES_INDEX = 1; +var SOURCE_LINE = 2; +var SOURCE_COLUMN = 3; +var NAMES_INDEX = 4; +var REV_GENERATED_LINE = 1; +var REV_GENERATED_COLUMN = 2; + +// src/sort.ts +function maybeSort(mappings, owned) { + const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); + if (unsortedIndex === mappings.length) return mappings; + if (!owned) mappings = mappings.slice(); + for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { + mappings[i] = sortSegments(mappings[i], owned); + } + return mappings; +} +function nextUnsortedSegmentLine(mappings, start) { + for (let i = start; i < mappings.length; i++) { + if (!isSorted(mappings[i])) return i; + } + return mappings.length; +} +function isSorted(line) { + for (let j = 1; j < line.length; j++) { + if (line[j][COLUMN] < line[j - 1][COLUMN]) { + return false; + } + } + return true; +} +function sortSegments(line, owned) { + if (!owned) line = line.slice(); + return line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[COLUMN] - b[COLUMN]; +} + +// src/by-source.ts +function buildBySources(decoded, memos) { + const sources = memos.map(() => []); + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + if (seg.length === 1) continue; + const sourceIndex2 = seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + const source = sources[sourceIndex2]; + const segs = source[sourceLine] || (source[sourceLine] = []); + segs.push([sourceColumn, i, seg[COLUMN]]); + } + } + for (let i = 0; i < sources.length; i++) { + const source = sources[i]; + for (let j = 0; j < source.length; j++) { + const line = source[j]; + if (line) line.sort(sortComparator); + } + } + return sources; +} + +// src/binary-search.ts +var found = false; +function binarySearch(haystack, needle, low, high) { + while (low <= high) { + const mid = low + (high - low >> 1); + const cmp = haystack[mid][COLUMN] - needle; + if (cmp === 0) { + found = true; + return mid; + } + if (cmp < 0) { + low = mid + 1; + } else { + high = mid - 1; + } + } + found = false; + return low - 1; +} +function upperBound(haystack, needle, index) { + for (let i = index + 1; i < haystack.length; index = i++) { + if (haystack[i][COLUMN] !== needle) break; + } + return index; +} +function lowerBound(haystack, needle, index) { + for (let i = index - 1; i >= 0; index = i--) { + if (haystack[i][COLUMN] !== needle) break; + } + return index; +} +function memoizedState() { + return { + lastKey: -1, + lastNeedle: -1, + lastIndex: -1 + }; +} +function memoizedBinarySearch(haystack, needle, state, key) { + const { lastKey, lastNeedle, lastIndex } = state; + let low = 0; + let high = haystack.length - 1; + if (key === lastKey) { + if (needle === lastNeedle) { + found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; + return lastIndex; + } + if (needle >= lastNeedle) { + low = lastIndex === -1 ? 0 : lastIndex; + } else { + high = lastIndex; + } + } + state.lastKey = key; + state.lastNeedle = needle; + return state.lastIndex = binarySearch(haystack, needle, low, high); +} + +// src/types.ts +function parse(map) { + return typeof map === "string" ? JSON.parse(map) : map; +} + +// src/flatten-map.ts +var FlattenMap = function(map, mapUrl) { + const parsed = parse(map); + if (!("sections" in parsed)) { + return new TraceMap(parsed, mapUrl); + } + const mappings = []; + const sources = []; + const sourcesContent = []; + const names = []; + const ignoreList = []; + recurse( + parsed, + mapUrl, + mappings, + sources, + sourcesContent, + names, + ignoreList, + 0, + 0, + Infinity, + Infinity + ); + const joined = { + version: 3, + file: parsed.file, + names, + sources, + sourcesContent, + mappings, + ignoreList + }; + return presortedDecodedMap(joined); +}; +function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { + const { sections } = input; + for (let i = 0; i < sections.length; i++) { + const { map, offset } = sections[i]; + let sl = stopLine; + let sc = stopColumn; + if (i + 1 < sections.length) { + const nextOffset = sections[i + 1].offset; + sl = Math.min(stopLine, lineOffset + nextOffset.line); + if (sl === stopLine) { + sc = Math.min(stopColumn, columnOffset + nextOffset.column); + } else if (sl < stopLine) { + sc = columnOffset + nextOffset.column; + } + } + addSection( + map, + mapUrl, + mappings, + sources, + sourcesContent, + names, + ignoreList, + lineOffset + offset.line, + columnOffset + offset.column, + sl, + sc + ); + } +} +function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { + const parsed = parse(input); + if ("sections" in parsed) return recurse(...arguments); + const map = new TraceMap(parsed, mapUrl); + const sourcesOffset = sources.length; + const namesOffset = names.length; + const decoded = decodedMappings(map); + const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map; + append(sources, resolvedSources); + append(names, map.names); + if (contents) append(sourcesContent, contents); + else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null); + if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset); + for (let i = 0; i < decoded.length; i++) { + const lineI = lineOffset + i; + if (lineI > stopLine) return; + const out = getLine(mappings, lineI); + const cOffset = i === 0 ? columnOffset : 0; + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const column = cOffset + seg[COLUMN]; + if (lineI === stopLine && column >= stopColumn) return; + if (seg.length === 1) { + out.push([column]); + continue; + } + const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + out.push( + seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]] + ); + } + } +} +function append(arr, other) { + for (let i = 0; i < other.length; i++) arr.push(other[i]); +} +function getLine(arr, index) { + for (let i = arr.length; i <= index; i++) arr[i] = []; + return arr[index]; +} + +// src/trace-mapping.ts +var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)"; +var COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)"; +var LEAST_UPPER_BOUND = -1; +var GREATEST_LOWER_BOUND = 1; +var TraceMap = class { + constructor(map, mapUrl) { + const isString = typeof map === "string"; + if (!isString && map._decodedMemo) return map; + const parsed = parse(map); + const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; + this.version = version; + this.file = file; + this.names = names || []; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0; + const resolve = resolver(mapUrl, sourceRoot); + this.resolvedSources = sources.map(resolve); + const { mappings } = parsed; + if (typeof mappings === "string") { + this._encoded = mappings; + this._decoded = void 0; + } else if (Array.isArray(mappings)) { + this._encoded = void 0; + this._decoded = maybeSort(mappings, isString); + } else if (parsed.sections) { + throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`); + } else { + throw new Error(`invalid source map: ${JSON.stringify(parsed)}`); + } + this._decodedMemo = memoizedState(); + this._bySources = void 0; + this._bySourceMemos = void 0; + } +}; +function cast(map) { + return map; +} +function encodedMappings(map) { + var _a, _b; + return (_b = (_a = cast(map))._encoded) != null ? _b : _a._encoded = encode(cast(map)._decoded); +} +function decodedMappings(map) { + var _a; + return (_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded)); +} +function traceSegment(map, line, column) { + const decoded = decodedMappings(map); + if (line >= decoded.length) return null; + const segments = decoded[line]; + const index = traceSegmentInternal( + segments, + cast(map)._decodedMemo, + line, + column, + GREATEST_LOWER_BOUND + ); + return index === -1 ? null : segments[index]; +} +function originalPositionFor(map, needle) { + let { line, column, bias } = needle; + line--; + if (line < 0) throw new Error(LINE_GTR_ZERO); + if (column < 0) throw new Error(COL_GTR_EQ_ZERO); + const decoded = decodedMappings(map); + if (line >= decoded.length) return OMapping(null, null, null, null); + const segments = decoded[line]; + const index = traceSegmentInternal( + segments, + cast(map)._decodedMemo, + line, + column, + bias || GREATEST_LOWER_BOUND + ); + if (index === -1) return OMapping(null, null, null, null); + const segment = segments[index]; + if (segment.length === 1) return OMapping(null, null, null, null); + const { names, resolvedSources } = map; + return OMapping( + resolvedSources[segment[SOURCES_INDEX]], + segment[SOURCE_LINE] + 1, + segment[SOURCE_COLUMN], + segment.length === 5 ? names[segment[NAMES_INDEX]] : null + ); +} +function generatedPositionFor(map, needle) { + const { source, line, column, bias } = needle; + return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false); +} +function allGeneratedPositionsFor(map, needle) { + const { source, line, column, bias } = needle; + return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true); +} +function eachMapping(map, cb) { + const decoded = decodedMappings(map); + const { names, resolvedSources } = map; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generatedLine = i + 1; + const generatedColumn = seg[0]; + let source = null; + let originalLine = null; + let originalColumn = null; + let name = null; + if (seg.length !== 1) { + source = resolvedSources[seg[1]]; + originalLine = seg[2] + 1; + originalColumn = seg[3]; + } + if (seg.length === 5) name = names[seg[4]]; + cb({ + generatedLine, + generatedColumn, + source, + originalLine, + originalColumn, + name + }); + } + } +} +function sourceIndex(map, source) { + const { sources, resolvedSources } = map; + let index = sources.indexOf(source); + if (index === -1) index = resolvedSources.indexOf(source); + return index; +} +function sourceContentFor(map, source) { + const { sourcesContent } = map; + if (sourcesContent == null) return null; + const index = sourceIndex(map, source); + return index === -1 ? null : sourcesContent[index]; +} +function isIgnored(map, source) { + const { ignoreList } = map; + if (ignoreList == null) return false; + const index = sourceIndex(map, source); + return index === -1 ? false : ignoreList.includes(index); +} +function presortedDecodedMap(map, mapUrl) { + const tracer = new TraceMap(clone(map, []), mapUrl); + cast(tracer)._decoded = map.mappings; + return tracer; +} +function decodedMap(map) { + return clone(map, decodedMappings(map)); +} +function encodedMap(map) { + return clone(map, encodedMappings(map)); +} +function clone(map, mappings) { + return { + version: map.version, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings, + ignoreList: map.ignoreList || map.x_google_ignoreList + }; +} +function OMapping(source, line, column, name) { + return { source, line, column, name }; +} +function GMapping(line, column) { + return { line, column }; +} +function traceSegmentInternal(segments, memo, line, column, bias) { + let index = memoizedBinarySearch(segments, column, memo, line); + if (found) { + index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); + } else if (bias === LEAST_UPPER_BOUND) index++; + if (index === -1 || index === segments.length) return -1; + return index; +} +function sliceGeneratedPositions(segments, memo, line, column, bias) { + let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND); + if (!found && bias === LEAST_UPPER_BOUND) min++; + if (min === -1 || min === segments.length) return []; + const matchedColumn = found ? column : segments[min][COLUMN]; + if (!found) min = lowerBound(segments, matchedColumn, min); + const max = upperBound(segments, matchedColumn, min); + const result = []; + for (; min <= max; min++) { + const segment = segments[min]; + result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN])); + } + return result; +} +function generatedPosition(map, source, line, column, bias, all) { + var _a, _b; + line--; + if (line < 0) throw new Error(LINE_GTR_ZERO); + if (column < 0) throw new Error(COL_GTR_EQ_ZERO); + const { sources, resolvedSources } = map; + let sourceIndex2 = sources.indexOf(source); + if (sourceIndex2 === -1) sourceIndex2 = resolvedSources.indexOf(source); + if (sourceIndex2 === -1) return all ? [] : GMapping(null, null); + const bySourceMemos = (_a = cast(map))._bySourceMemos || (_a._bySourceMemos = sources.map(memoizedState)); + const generated = (_b = cast(map))._bySources || (_b._bySources = buildBySources(decodedMappings(map), bySourceMemos)); + const segments = generated[sourceIndex2][line]; + if (segments == null) return all ? [] : GMapping(null, null); + const memo = bySourceMemos[sourceIndex2]; + if (all) return sliceGeneratedPositions(segments, memo, line, column, bias); + const index = traceSegmentInternal(segments, memo, line, column, bias); + if (index === -1) return GMapping(null, null); + const segment = segments[index]; + return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]); +} +export { + FlattenMap as AnyMap, + FlattenMap, + GREATEST_LOWER_BOUND, + LEAST_UPPER_BOUND, + TraceMap, + allGeneratedPositionsFor, + decodedMap, + decodedMappings, + eachMapping, + encodedMap, + encodedMappings, + generatedPositionFor, + isIgnored, + originalPositionFor, + presortedDecodedMap, + sourceContentFor, + traceSegment +}; +//# sourceMappingURL=trace-mapping.mjs.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map new file mode 100644 index 0000000..a789581 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../src/trace-mapping.ts", "../src/resolve.ts", "../src/strip-filename.ts", "../src/sourcemap-segment.ts", "../src/sort.ts", "../src/by-source.ts", "../src/binary-search.ts", "../src/types.ts", "../src/flatten-map.ts"], + "mappings": ";AAAA,SAAS,QAAQ,cAAc;;;ACA/B,OAAO,gBAAgB;;;ACGR,SAAR,cAA+B,MAAyC;AAC7E,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,QAAQ,KAAK,YAAY,GAAG;AAClC,SAAO,KAAK,MAAM,GAAG,QAAQ,CAAC;AAChC;;;ADHe,SAAR,SACL,QACA,YACS;AACT,QAAM,OAAO,cAAc,MAAM;AAIjC,QAAM,SAAS,aAAa,aAAa,MAAM;AAE/C,SAAO,CAAC,WAAW,WAAW,UAAU,UAAU,KAAK,IAAI;AAC7D;;;AEAO,IAAM,SAAS;AACf,IAAM,gBAAgB;AACtB,IAAM,cAAc;AACpB,IAAM,gBAAgB;AACtB,IAAM,cAAc;AAEpB,IAAM,qBAAqB;AAC3B,IAAM,uBAAu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B,CAAC;AAChF;", + "names": ["sourceIndex", "sourceIndex"] +} diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js new file mode 100644 index 0000000..0387ae3 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js @@ -0,0 +1,559 @@ +(function (global, factory) { + if (typeof exports === 'object' && typeof module !== 'undefined') { + factory(module, require('@jridgewell/resolve-uri'), require('@jridgewell/sourcemap-codec')); + module.exports = def(module); + } else if (typeof define === 'function' && define.amd) { + define(['module', '@jridgewell/resolve-uri', '@jridgewell/sourcemap-codec'], function(mod) { + factory.apply(this, arguments); + mod.exports = def(mod); + }); + } else { + const mod = { exports: {} }; + factory(mod, global.resolveURI, global.sourcemapCodec); + global = typeof globalThis !== 'undefined' ? globalThis : global || self; + global.traceMapping = def(mod); + } + function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; } +})(this, (function (module, require_resolveURI, require_sourcemapCodec) { +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// umd:@jridgewell/sourcemap-codec +var require_sourcemap_codec = __commonJS({ + "umd:@jridgewell/sourcemap-codec"(exports, module2) { + module2.exports = require_sourcemapCodec; + } +}); + +// umd:@jridgewell/resolve-uri +var require_resolve_uri = __commonJS({ + "umd:@jridgewell/resolve-uri"(exports, module2) { + module2.exports = require_resolveURI; + } +}); + +// src/trace-mapping.ts +var trace_mapping_exports = {}; +__export(trace_mapping_exports, { + AnyMap: () => FlattenMap, + FlattenMap: () => FlattenMap, + GREATEST_LOWER_BOUND: () => GREATEST_LOWER_BOUND, + LEAST_UPPER_BOUND: () => LEAST_UPPER_BOUND, + TraceMap: () => TraceMap, + allGeneratedPositionsFor: () => allGeneratedPositionsFor, + decodedMap: () => decodedMap, + decodedMappings: () => decodedMappings, + eachMapping: () => eachMapping, + encodedMap: () => encodedMap, + encodedMappings: () => encodedMappings, + generatedPositionFor: () => generatedPositionFor, + isIgnored: () => isIgnored, + originalPositionFor: () => originalPositionFor, + presortedDecodedMap: () => presortedDecodedMap, + sourceContentFor: () => sourceContentFor, + traceSegment: () => traceSegment +}); +module.exports = __toCommonJS(trace_mapping_exports); +var import_sourcemap_codec = __toESM(require_sourcemap_codec()); + +// src/resolve.ts +var import_resolve_uri = __toESM(require_resolve_uri()); + +// src/strip-filename.ts +function stripFilename(path) { + if (!path) return ""; + const index = path.lastIndexOf("/"); + return path.slice(0, index + 1); +} + +// src/resolve.ts +function resolver(mapUrl, sourceRoot) { + const from = stripFilename(mapUrl); + const prefix = sourceRoot ? sourceRoot + "/" : ""; + return (source) => (0, import_resolve_uri.default)(prefix + (source || ""), from); +} + +// src/sourcemap-segment.ts +var COLUMN = 0; +var SOURCES_INDEX = 1; +var SOURCE_LINE = 2; +var SOURCE_COLUMN = 3; +var NAMES_INDEX = 4; +var REV_GENERATED_LINE = 1; +var REV_GENERATED_COLUMN = 2; + +// src/sort.ts +function maybeSort(mappings, owned) { + const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); + if (unsortedIndex === mappings.length) return mappings; + if (!owned) mappings = mappings.slice(); + for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { + mappings[i] = sortSegments(mappings[i], owned); + } + return mappings; +} +function nextUnsortedSegmentLine(mappings, start) { + for (let i = start; i < mappings.length; i++) { + if (!isSorted(mappings[i])) return i; + } + return mappings.length; +} +function isSorted(line) { + for (let j = 1; j < line.length; j++) { + if (line[j][COLUMN] < line[j - 1][COLUMN]) { + return false; + } + } + return true; +} +function sortSegments(line, owned) { + if (!owned) line = line.slice(); + return line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[COLUMN] - b[COLUMN]; +} + +// src/by-source.ts +function buildBySources(decoded, memos) { + const sources = memos.map(() => []); + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + if (seg.length === 1) continue; + const sourceIndex2 = seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + const source = sources[sourceIndex2]; + const segs = source[sourceLine] || (source[sourceLine] = []); + segs.push([sourceColumn, i, seg[COLUMN]]); + } + } + for (let i = 0; i < sources.length; i++) { + const source = sources[i]; + for (let j = 0; j < source.length; j++) { + const line = source[j]; + if (line) line.sort(sortComparator); + } + } + return sources; +} + +// src/binary-search.ts +var found = false; +function binarySearch(haystack, needle, low, high) { + while (low <= high) { + const mid = low + (high - low >> 1); + const cmp = haystack[mid][COLUMN] - needle; + if (cmp === 0) { + found = true; + return mid; + } + if (cmp < 0) { + low = mid + 1; + } else { + high = mid - 1; + } + } + found = false; + return low - 1; +} +function upperBound(haystack, needle, index) { + for (let i = index + 1; i < haystack.length; index = i++) { + if (haystack[i][COLUMN] !== needle) break; + } + return index; +} +function lowerBound(haystack, needle, index) { + for (let i = index - 1; i >= 0; index = i--) { + if (haystack[i][COLUMN] !== needle) break; + } + return index; +} +function memoizedState() { + return { + lastKey: -1, + lastNeedle: -1, + lastIndex: -1 + }; +} +function memoizedBinarySearch(haystack, needle, state, key) { + const { lastKey, lastNeedle, lastIndex } = state; + let low = 0; + let high = haystack.length - 1; + if (key === lastKey) { + if (needle === lastNeedle) { + found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; + return lastIndex; + } + if (needle >= lastNeedle) { + low = lastIndex === -1 ? 0 : lastIndex; + } else { + high = lastIndex; + } + } + state.lastKey = key; + state.lastNeedle = needle; + return state.lastIndex = binarySearch(haystack, needle, low, high); +} + +// src/types.ts +function parse(map) { + return typeof map === "string" ? JSON.parse(map) : map; +} + +// src/flatten-map.ts +var FlattenMap = function(map, mapUrl) { + const parsed = parse(map); + if (!("sections" in parsed)) { + return new TraceMap(parsed, mapUrl); + } + const mappings = []; + const sources = []; + const sourcesContent = []; + const names = []; + const ignoreList = []; + recurse( + parsed, + mapUrl, + mappings, + sources, + sourcesContent, + names, + ignoreList, + 0, + 0, + Infinity, + Infinity + ); + const joined = { + version: 3, + file: parsed.file, + names, + sources, + sourcesContent, + mappings, + ignoreList + }; + return presortedDecodedMap(joined); +}; +function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { + const { sections } = input; + for (let i = 0; i < sections.length; i++) { + const { map, offset } = sections[i]; + let sl = stopLine; + let sc = stopColumn; + if (i + 1 < sections.length) { + const nextOffset = sections[i + 1].offset; + sl = Math.min(stopLine, lineOffset + nextOffset.line); + if (sl === stopLine) { + sc = Math.min(stopColumn, columnOffset + nextOffset.column); + } else if (sl < stopLine) { + sc = columnOffset + nextOffset.column; + } + } + addSection( + map, + mapUrl, + mappings, + sources, + sourcesContent, + names, + ignoreList, + lineOffset + offset.line, + columnOffset + offset.column, + sl, + sc + ); + } +} +function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { + const parsed = parse(input); + if ("sections" in parsed) return recurse(...arguments); + const map = new TraceMap(parsed, mapUrl); + const sourcesOffset = sources.length; + const namesOffset = names.length; + const decoded = decodedMappings(map); + const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map; + append(sources, resolvedSources); + append(names, map.names); + if (contents) append(sourcesContent, contents); + else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null); + if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset); + for (let i = 0; i < decoded.length; i++) { + const lineI = lineOffset + i; + if (lineI > stopLine) return; + const out = getLine(mappings, lineI); + const cOffset = i === 0 ? columnOffset : 0; + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const column = cOffset + seg[COLUMN]; + if (lineI === stopLine && column >= stopColumn) return; + if (seg.length === 1) { + out.push([column]); + continue; + } + const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + out.push( + seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]] + ); + } + } +} +function append(arr, other) { + for (let i = 0; i < other.length; i++) arr.push(other[i]); +} +function getLine(arr, index) { + for (let i = arr.length; i <= index; i++) arr[i] = []; + return arr[index]; +} + +// src/trace-mapping.ts +var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)"; +var COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)"; +var LEAST_UPPER_BOUND = -1; +var GREATEST_LOWER_BOUND = 1; +var TraceMap = class { + constructor(map, mapUrl) { + const isString = typeof map === "string"; + if (!isString && map._decodedMemo) return map; + const parsed = parse(map); + const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; + this.version = version; + this.file = file; + this.names = names || []; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0; + const resolve = resolver(mapUrl, sourceRoot); + this.resolvedSources = sources.map(resolve); + const { mappings } = parsed; + if (typeof mappings === "string") { + this._encoded = mappings; + this._decoded = void 0; + } else if (Array.isArray(mappings)) { + this._encoded = void 0; + this._decoded = maybeSort(mappings, isString); + } else if (parsed.sections) { + throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`); + } else { + throw new Error(`invalid source map: ${JSON.stringify(parsed)}`); + } + this._decodedMemo = memoizedState(); + this._bySources = void 0; + this._bySourceMemos = void 0; + } +}; +function cast(map) { + return map; +} +function encodedMappings(map) { + var _a, _b; + return (_b = (_a = cast(map))._encoded) != null ? _b : _a._encoded = (0, import_sourcemap_codec.encode)(cast(map)._decoded); +} +function decodedMappings(map) { + var _a; + return (_a = cast(map))._decoded || (_a._decoded = (0, import_sourcemap_codec.decode)(cast(map)._encoded)); +} +function traceSegment(map, line, column) { + const decoded = decodedMappings(map); + if (line >= decoded.length) return null; + const segments = decoded[line]; + const index = traceSegmentInternal( + segments, + cast(map)._decodedMemo, + line, + column, + GREATEST_LOWER_BOUND + ); + return index === -1 ? null : segments[index]; +} +function originalPositionFor(map, needle) { + let { line, column, bias } = needle; + line--; + if (line < 0) throw new Error(LINE_GTR_ZERO); + if (column < 0) throw new Error(COL_GTR_EQ_ZERO); + const decoded = decodedMappings(map); + if (line >= decoded.length) return OMapping(null, null, null, null); + const segments = decoded[line]; + const index = traceSegmentInternal( + segments, + cast(map)._decodedMemo, + line, + column, + bias || GREATEST_LOWER_BOUND + ); + if (index === -1) return OMapping(null, null, null, null); + const segment = segments[index]; + if (segment.length === 1) return OMapping(null, null, null, null); + const { names, resolvedSources } = map; + return OMapping( + resolvedSources[segment[SOURCES_INDEX]], + segment[SOURCE_LINE] + 1, + segment[SOURCE_COLUMN], + segment.length === 5 ? names[segment[NAMES_INDEX]] : null + ); +} +function generatedPositionFor(map, needle) { + const { source, line, column, bias } = needle; + return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false); +} +function allGeneratedPositionsFor(map, needle) { + const { source, line, column, bias } = needle; + return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true); +} +function eachMapping(map, cb) { + const decoded = decodedMappings(map); + const { names, resolvedSources } = map; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generatedLine = i + 1; + const generatedColumn = seg[0]; + let source = null; + let originalLine = null; + let originalColumn = null; + let name = null; + if (seg.length !== 1) { + source = resolvedSources[seg[1]]; + originalLine = seg[2] + 1; + originalColumn = seg[3]; + } + if (seg.length === 5) name = names[seg[4]]; + cb({ + generatedLine, + generatedColumn, + source, + originalLine, + originalColumn, + name + }); + } + } +} +function sourceIndex(map, source) { + const { sources, resolvedSources } = map; + let index = sources.indexOf(source); + if (index === -1) index = resolvedSources.indexOf(source); + return index; +} +function sourceContentFor(map, source) { + const { sourcesContent } = map; + if (sourcesContent == null) return null; + const index = sourceIndex(map, source); + return index === -1 ? null : sourcesContent[index]; +} +function isIgnored(map, source) { + const { ignoreList } = map; + if (ignoreList == null) return false; + const index = sourceIndex(map, source); + return index === -1 ? false : ignoreList.includes(index); +} +function presortedDecodedMap(map, mapUrl) { + const tracer = new TraceMap(clone(map, []), mapUrl); + cast(tracer)._decoded = map.mappings; + return tracer; +} +function decodedMap(map) { + return clone(map, decodedMappings(map)); +} +function encodedMap(map) { + return clone(map, encodedMappings(map)); +} +function clone(map, mappings) { + return { + version: map.version, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings, + ignoreList: map.ignoreList || map.x_google_ignoreList + }; +} +function OMapping(source, line, column, name) { + return { source, line, column, name }; +} +function GMapping(line, column) { + return { line, column }; +} +function traceSegmentInternal(segments, memo, line, column, bias) { + let index = memoizedBinarySearch(segments, column, memo, line); + if (found) { + index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); + } else if (bias === LEAST_UPPER_BOUND) index++; + if (index === -1 || index === segments.length) return -1; + return index; +} +function sliceGeneratedPositions(segments, memo, line, column, bias) { + let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND); + if (!found && bias === LEAST_UPPER_BOUND) min++; + if (min === -1 || min === segments.length) return []; + const matchedColumn = found ? column : segments[min][COLUMN]; + if (!found) min = lowerBound(segments, matchedColumn, min); + const max = upperBound(segments, matchedColumn, min); + const result = []; + for (; min <= max; min++) { + const segment = segments[min]; + result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN])); + } + return result; +} +function generatedPosition(map, source, line, column, bias, all) { + var _a, _b; + line--; + if (line < 0) throw new Error(LINE_GTR_ZERO); + if (column < 0) throw new Error(COL_GTR_EQ_ZERO); + const { sources, resolvedSources } = map; + let sourceIndex2 = sources.indexOf(source); + if (sourceIndex2 === -1) sourceIndex2 = resolvedSources.indexOf(source); + if (sourceIndex2 === -1) return all ? [] : GMapping(null, null); + const bySourceMemos = (_a = cast(map))._bySourceMemos || (_a._bySourceMemos = sources.map(memoizedState)); + const generated = (_b = cast(map))._bySources || (_b._bySources = buildBySources(decodedMappings(map), bySourceMemos)); + const segments = generated[sourceIndex2][line]; + if (segments == null) return all ? [] : GMapping(null, null); + const memo = bySourceMemos[sourceIndex2]; + if (all) return sliceGeneratedPositions(segments, memo, line, column, bias); + const index = traceSegmentInternal(segments, memo, line, column, bias); + if (index === -1) return GMapping(null, null); + const segment = segments[index]; + return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]); +} +})); +//# sourceMappingURL=trace-mapping.umd.js.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map new file mode 100644 index 0000000..68b0c77 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["umd:@jridgewell/sourcemap-codec", "umd:@jridgewell/resolve-uri", "../src/trace-mapping.ts", "../src/resolve.ts", "../src/strip-filename.ts", "../src/sourcemap-segment.ts", "../src/sort.ts", "../src/by-source.ts", "../src/binary-search.ts", "../src/types.ts", "../src/flatten-map.ts"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,6CAAAA,SAAA;AAAA,IAAAA,QAAO,UAAU;AAAA;AAAA;;;ACAjB;AAAA,yCAAAC,SAAA;AAAA,IAAAA,QAAO,UAAU;AAAA;AAAA;;;ACAjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAA+B;;;ACA/B,yBAAuB;;;ACGR,SAAR,cAA+B,MAAyC;AAC7E,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,QAAQ,KAAK,YAAY,GAAG;AAClC,SAAO,KAAK,MAAM,GAAG,QAAQ,CAAC;AAChC;;;ADHe,SAAR,SACL,QACA,YACS;AACT,QAAM,OAAO,cAAc,MAAM;AAIjC,QAAM,SAAS,aAAa,aAAa,MAAM;AAE/C,SAAO,CAAC,eAAW,mBAAAC,SAAW,UAAU,UAAU,KAAK,IAAI;AAC7D;;;AEAO,IAAM,SAAS;AACf,IAAM,gBAAgB;AACtB,IAAM,cAAc;AACpB,IAAM,gBAAgB;AACtB,IAAM,cAAc;AAEpB,IAAM,qBAAqB;AAC3B,IAAM,uBAAuB;;;AClBrB,SAAR,UACL,UACA,OACsB;AACtB,QAAM,gBAAgB,wBAAwB,UAAU,CAAC;AACzD,MAAI,kBAAkB,SAAS,OAAQ,QAA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/trace-mapping/package.json new file mode 100644 index 0000000..9d3a1c0 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/package.json @@ -0,0 +1,67 @@ +{ + "name": "@jridgewell/trace-mapping", + "version": "0.3.31", + "description": "Trace the original position through a source map", + "keywords": [ + "source", + "map" + ], + "main": "dist/trace-mapping.umd.js", + "module": "dist/trace-mapping.mjs", + "types": "types/trace-mapping.d.cts", + "files": [ + "dist", + "src", + "types" + ], + "exports": { + ".": [ + { + "import": { + "types": "./types/trace-mapping.d.mts", + "default": "./dist/trace-mapping.mjs" + }, + "default": { + "types": "./types/trace-mapping.d.cts", + "default": "./dist/trace-mapping.umd.js" + } + }, + "./dist/trace-mapping.umd.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "benchmark": "run-s build:code benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node --expose-gc benchmark/index.mjs", + "build": "run-s -n build:code build:types", + "build:code": "node ../../esbuild.mjs trace-mapping.ts", + "build:types": "run-s build:types:force build:types:emit build:types:mts", + "build:types:force": "rimraf tsconfig.build.tsbuildinfo", + "build:types:emit": "tsc --project tsconfig.build.json", + "build:types:mts": "node ../../mts-types.mjs", + "clean": "run-s -n clean:code clean:types", + "clean:code": "tsc --build --clean tsconfig.build.json", + "clean:types": "rimraf dist types", + "test": "run-s -n test:types test:only test:format", + "test:format": "prettier --check '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:types": "eslint '{src,test}/**/*.ts'", + "lint": "run-s -n lint:types lint:format", + "lint:format": "npm run test:format -- --write", + "lint:types": "npm run test:types -- --fix", + "prepublishOnly": "npm run-s -n build test" + }, + "homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/trace-mapping", + "repository": { + "type": "git", + "url": "git+https://github.com/jridgewell/sourcemaps.git", + "directory": "packages/trace-mapping" + }, + "author": "Justin Ridgewell ", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } +} diff --git a/node_modules/@jridgewell/trace-mapping/src/binary-search.ts b/node_modules/@jridgewell/trace-mapping/src/binary-search.ts new file mode 100644 index 0000000..c1144ad --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/binary-search.ts @@ -0,0 +1,115 @@ +import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment'; +import { COLUMN } from './sourcemap-segment'; + +export type MemoState = { + lastKey: number; + lastNeedle: number; + lastIndex: number; +}; + +export let found = false; + +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +export function binarySearch( + haystack: SourceMapSegment[] | ReverseSegment[], + needle: number, + low: number, + high: number, +): number { + while (low <= high) { + const mid = low + ((high - low) >> 1); + const cmp = haystack[mid][COLUMN] - needle; + + if (cmp === 0) { + found = true; + return mid; + } + + if (cmp < 0) { + low = mid + 1; + } else { + high = mid - 1; + } + } + + found = false; + return low - 1; +} + +export function upperBound( + haystack: SourceMapSegment[] | ReverseSegment[], + needle: number, + index: number, +): number { + for (let i = index + 1; i < haystack.length; index = i++) { + if (haystack[i][COLUMN] !== needle) break; + } + return index; +} + +export function lowerBound( + haystack: SourceMapSegment[] | ReverseSegment[], + needle: number, + index: number, +): number { + for (let i = index - 1; i >= 0; index = i--) { + if (haystack[i][COLUMN] !== needle) break; + } + return index; +} + +export function memoizedState(): MemoState { + return { + lastKey: -1, + lastNeedle: -1, + lastIndex: -1, + }; +} + +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +export function memoizedBinarySearch( + haystack: SourceMapSegment[] | ReverseSegment[], + needle: number, + state: MemoState, + key: number, +): number { + const { lastKey, lastNeedle, lastIndex } = state; + + let low = 0; + let high = haystack.length - 1; + if (key === lastKey) { + if (needle === lastNeedle) { + found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; + return lastIndex; + } + + if (needle >= lastNeedle) { + // lastIndex may be -1 if the previous needle was not found. + low = lastIndex === -1 ? 0 : lastIndex; + } else { + high = lastIndex; + } + } + state.lastKey = key; + state.lastNeedle = needle; + + return (state.lastIndex = binarySearch(haystack, needle, low, high)); +} diff --git a/node_modules/@jridgewell/trace-mapping/src/by-source.ts b/node_modules/@jridgewell/trace-mapping/src/by-source.ts new file mode 100644 index 0000000..1da6af0 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/by-source.ts @@ -0,0 +1,41 @@ +import { COLUMN, SOURCES_INDEX, SOURCE_LINE, SOURCE_COLUMN } from './sourcemap-segment'; +import { sortComparator } from './sort'; + +import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment'; + +export type Source = ReverseSegment[][]; + +// Rebuilds the original source files, with mappings that are ordered by source line/column instead +// of generated line/column. +export default function buildBySources( + decoded: readonly SourceMapSegment[][], + memos: unknown[], +): Source[] { + const sources: Source[] = memos.map(() => []); + + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + if (seg.length === 1) continue; + + const sourceIndex = seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + + const source = sources[sourceIndex]; + const segs = (source[sourceLine] ||= []); + segs.push([sourceColumn, i, seg[COLUMN]]); + } + } + + for (let i = 0; i < sources.length; i++) { + const source = sources[i]; + for (let j = 0; j < source.length; j++) { + const line = source[j]; + if (line) line.sort(sortComparator); + } + } + + return sources; +} diff --git a/node_modules/@jridgewell/trace-mapping/src/flatten-map.ts b/node_modules/@jridgewell/trace-mapping/src/flatten-map.ts new file mode 100644 index 0000000..61ac40c --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/flatten-map.ts @@ -0,0 +1,192 @@ +import { TraceMap, presortedDecodedMap, decodedMappings } from './trace-mapping'; +import { + COLUMN, + SOURCES_INDEX, + SOURCE_LINE, + SOURCE_COLUMN, + NAMES_INDEX, +} from './sourcemap-segment'; +import { parse } from './types'; + +import type { + DecodedSourceMap, + DecodedSourceMapXInput, + EncodedSourceMapXInput, + SectionedSourceMapXInput, + SectionedSourceMapInput, + SectionXInput, + Ro, +} from './types'; +import type { SourceMapSegment } from './sourcemap-segment'; + +type FlattenMap = { + new (map: Ro, mapUrl?: string | null): TraceMap; + (map: Ro, mapUrl?: string | null): TraceMap; +}; + +export const FlattenMap: FlattenMap = function (map, mapUrl) { + const parsed = parse(map as SectionedSourceMapInput); + + if (!('sections' in parsed)) { + return new TraceMap(parsed as DecodedSourceMapXInput | EncodedSourceMapXInput, mapUrl); + } + + const mappings: SourceMapSegment[][] = []; + const sources: string[] = []; + const sourcesContent: (string | null)[] = []; + const names: string[] = []; + const ignoreList: number[] = []; + + recurse( + parsed, + mapUrl, + mappings, + sources, + sourcesContent, + names, + ignoreList, + 0, + 0, + Infinity, + Infinity, + ); + + const joined: DecodedSourceMap = { + version: 3, + file: parsed.file, + names, + sources, + sourcesContent, + mappings, + ignoreList, + }; + + return presortedDecodedMap(joined); +} as FlattenMap; + +function recurse( + input: SectionedSourceMapXInput, + mapUrl: string | null | undefined, + mappings: SourceMapSegment[][], + sources: string[], + sourcesContent: (string | null)[], + names: string[], + ignoreList: number[], + lineOffset: number, + columnOffset: number, + stopLine: number, + stopColumn: number, +) { + const { sections } = input; + for (let i = 0; i < sections.length; i++) { + const { map, offset } = sections[i]; + + let sl = stopLine; + let sc = stopColumn; + if (i + 1 < sections.length) { + const nextOffset = sections[i + 1].offset; + sl = Math.min(stopLine, lineOffset + nextOffset.line); + + if (sl === stopLine) { + sc = Math.min(stopColumn, columnOffset + nextOffset.column); + } else if (sl < stopLine) { + sc = columnOffset + nextOffset.column; + } + } + + addSection( + map, + mapUrl, + mappings, + sources, + sourcesContent, + names, + ignoreList, + lineOffset + offset.line, + columnOffset + offset.column, + sl, + sc, + ); + } +} + +function addSection( + input: SectionXInput['map'], + mapUrl: string | null | undefined, + mappings: SourceMapSegment[][], + sources: string[], + sourcesContent: (string | null)[], + names: string[], + ignoreList: number[], + lineOffset: number, + columnOffset: number, + stopLine: number, + stopColumn: number, +) { + const parsed = parse(input); + if ('sections' in parsed) return recurse(...(arguments as unknown as Parameters)); + + const map = new TraceMap(parsed, mapUrl); + const sourcesOffset = sources.length; + const namesOffset = names.length; + const decoded = decodedMappings(map); + const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map; + + append(sources, resolvedSources); + append(names, map.names); + + if (contents) append(sourcesContent, contents); + else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null); + + if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset); + + for (let i = 0; i < decoded.length; i++) { + const lineI = lineOffset + i; + + // We can only add so many lines before we step into the range that the next section's map + // controls. When we get to the last line, then we'll start checking the segments to see if + // they've crossed into the column range. But it may not have any columns that overstep, so we + // still need to check that we don't overstep lines, too. + if (lineI > stopLine) return; + + // The out line may already exist in mappings (if we're continuing the line started by a + // previous section). Or, we may have jumped ahead several lines to start this section. + const out = getLine(mappings, lineI); + // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the + // map can be multiple lines), it doesn't. + const cOffset = i === 0 ? columnOffset : 0; + + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const column = cOffset + seg[COLUMN]; + + // If this segment steps into the column range that the next section's map controls, we need + // to stop early. + if (lineI === stopLine && column >= stopColumn) return; + + if (seg.length === 1) { + out.push([column]); + continue; + } + + const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + out.push( + seg.length === 4 + ? [column, sourcesIndex, sourceLine, sourceColumn] + : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]], + ); + } + } +} + +function append(arr: T[], other: T[]) { + for (let i = 0; i < other.length; i++) arr.push(other[i]); +} + +function getLine(arr: T[][], index: number): T[] { + for (let i = arr.length; i <= index; i++) arr[i] = []; + return arr[index]; +} diff --git a/node_modules/@jridgewell/trace-mapping/src/resolve.ts b/node_modules/@jridgewell/trace-mapping/src/resolve.ts new file mode 100644 index 0000000..30bfa3b --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/resolve.ts @@ -0,0 +1,16 @@ +import resolveUri from '@jridgewell/resolve-uri'; +import stripFilename from './strip-filename'; + +type Resolve = (source: string | null) => string; +export default function resolver( + mapUrl: string | null | undefined, + sourceRoot: string | undefined, +): Resolve { + const from = stripFilename(mapUrl); + // The sourceRoot is always treated as a directory, if it's not empty. + // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 + // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 + const prefix = sourceRoot ? sourceRoot + '/' : ''; + + return (source) => resolveUri(prefix + (source || ''), from); +} diff --git a/node_modules/@jridgewell/trace-mapping/src/sort.ts b/node_modules/@jridgewell/trace-mapping/src/sort.ts new file mode 100644 index 0000000..5d016cb --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/sort.ts @@ -0,0 +1,45 @@ +import { COLUMN } from './sourcemap-segment'; + +import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment'; + +export default function maybeSort( + mappings: SourceMapSegment[][], + owned: boolean, +): SourceMapSegment[][] { + const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); + if (unsortedIndex === mappings.length) return mappings; + + // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If + // not, we do not want to modify the consumer's input array. + if (!owned) mappings = mappings.slice(); + + for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { + mappings[i] = sortSegments(mappings[i], owned); + } + return mappings; +} + +function nextUnsortedSegmentLine(mappings: SourceMapSegment[][], start: number): number { + for (let i = start; i < mappings.length; i++) { + if (!isSorted(mappings[i])) return i; + } + return mappings.length; +} + +function isSorted(line: SourceMapSegment[]): boolean { + for (let j = 1; j < line.length; j++) { + if (line[j][COLUMN] < line[j - 1][COLUMN]) { + return false; + } + } + return true; +} + +function sortSegments(line: SourceMapSegment[], owned: boolean): SourceMapSegment[] { + if (!owned) line = line.slice(); + return line.sort(sortComparator); +} + +export function sortComparator(a: T, b: T): number { + return a[COLUMN] - b[COLUMN]; +} diff --git a/node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts b/node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts new file mode 100644 index 0000000..94f1b6a --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts @@ -0,0 +1,23 @@ +type GeneratedColumn = number; +type SourcesIndex = number; +type SourceLine = number; +type SourceColumn = number; +type NamesIndex = number; + +type GeneratedLine = number; + +export type SourceMapSegment = + | [GeneratedColumn] + | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] + | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; + +export type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; + +export const COLUMN = 0; +export const SOURCES_INDEX = 1; +export const SOURCE_LINE = 2; +export const SOURCE_COLUMN = 3; +export const NAMES_INDEX = 4; + +export const REV_GENERATED_LINE = 1; +export const REV_GENERATED_COLUMN = 2; diff --git a/node_modules/@jridgewell/trace-mapping/src/strip-filename.ts b/node_modules/@jridgewell/trace-mapping/src/strip-filename.ts new file mode 100644 index 0000000..2c88980 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/strip-filename.ts @@ -0,0 +1,8 @@ +/** + * Removes everything after the last "/", but leaves the slash. + */ +export default function stripFilename(path: string | undefined | null): string { + if (!path) return ''; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); +} diff --git a/node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts b/node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts new file mode 100644 index 0000000..0b793d5 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts @@ -0,0 +1,502 @@ +import { encode, decode } from '@jridgewell/sourcemap-codec'; + +import resolver from './resolve'; +import maybeSort from './sort'; +import buildBySources from './by-source'; +import { + memoizedState, + memoizedBinarySearch, + upperBound, + lowerBound, + found as bsFound, +} from './binary-search'; +import { + COLUMN, + SOURCES_INDEX, + SOURCE_LINE, + SOURCE_COLUMN, + NAMES_INDEX, + REV_GENERATED_LINE, + REV_GENERATED_COLUMN, +} from './sourcemap-segment'; +import { parse } from './types'; + +import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment'; +import type { + SourceMapV3, + DecodedSourceMap, + EncodedSourceMap, + InvalidOriginalMapping, + OriginalMapping, + InvalidGeneratedMapping, + GeneratedMapping, + SourceMapInput, + Needle, + SourceNeedle, + SourceMap, + EachMapping, + Bias, + XInput, + SectionedSourceMap, + Ro, +} from './types'; +import type { Source } from './by-source'; +import type { MemoState } from './binary-search'; + +export type { SourceMapSegment } from './sourcemap-segment'; +export type { + SourceMap, + DecodedSourceMap, + EncodedSourceMap, + Section, + SectionedSourceMap, + SourceMapV3, + Bias, + EachMapping, + GeneratedMapping, + InvalidGeneratedMapping, + InvalidOriginalMapping, + Needle, + OriginalMapping, + OriginalMapping as Mapping, + SectionedSourceMapInput, + SourceMapInput, + SourceNeedle, + XInput, + EncodedSourceMapXInput, + DecodedSourceMapXInput, + SectionedSourceMapXInput, + SectionXInput, +} from './types'; + +interface PublicMap { + _encoded: TraceMap['_encoded']; + _decoded: TraceMap['_decoded']; + _decodedMemo: TraceMap['_decodedMemo']; + _bySources: TraceMap['_bySources']; + _bySourceMemos: TraceMap['_bySourceMemos']; +} + +const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; +const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; + +export const LEAST_UPPER_BOUND = -1; +export const GREATEST_LOWER_BOUND = 1; + +export { FlattenMap, FlattenMap as AnyMap } from './flatten-map'; + +export class TraceMap implements SourceMap { + declare version: SourceMapV3['version']; + declare file: SourceMapV3['file']; + declare names: SourceMapV3['names']; + declare sourceRoot: SourceMapV3['sourceRoot']; + declare sources: SourceMapV3['sources']; + declare sourcesContent: SourceMapV3['sourcesContent']; + declare ignoreList: SourceMapV3['ignoreList']; + + declare resolvedSources: string[]; + declare private _encoded: string | undefined; + + declare private _decoded: SourceMapSegment[][] | undefined; + declare private _decodedMemo: MemoState; + + declare private _bySources: Source[] | undefined; + declare private _bySourceMemos: MemoState[] | undefined; + + constructor(map: Ro, mapUrl?: string | null) { + const isString = typeof map === 'string'; + if (!isString && (map as unknown as { _decodedMemo: any })._decodedMemo) return map as TraceMap; + + const parsed = parse(map as Exclude); + + const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; + this.version = version; + this.file = file; + this.names = names || []; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + this.ignoreList = parsed.ignoreList || (parsed as XInput).x_google_ignoreList || undefined; + + const resolve = resolver(mapUrl, sourceRoot); + this.resolvedSources = sources.map(resolve); + + const { mappings } = parsed; + if (typeof mappings === 'string') { + this._encoded = mappings; + this._decoded = undefined; + } else if (Array.isArray(mappings)) { + this._encoded = undefined; + this._decoded = maybeSort(mappings, isString); + } else if ((parsed as unknown as SectionedSourceMap).sections) { + throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`); + } else { + throw new Error(`invalid source map: ${JSON.stringify(parsed)}`); + } + + this._decodedMemo = memoizedState(); + this._bySources = undefined; + this._bySourceMemos = undefined; + } +} + +/** + * Typescript doesn't allow friend access to private fields, so this just casts the map into a type + * with public access modifiers. + */ +function cast(map: unknown): PublicMap { + return map as any; +} + +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +export function encodedMappings(map: TraceMap): EncodedSourceMap['mappings'] { + return (cast(map)._encoded ??= encode(cast(map)._decoded!)); +} + +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +export function decodedMappings(map: TraceMap): Readonly { + return (cast(map)._decoded ||= decode(cast(map)._encoded!)); +} + +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +export function traceSegment( + map: TraceMap, + line: number, + column: number, +): Readonly | null { + const decoded = decodedMappings(map); + + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) return null; + + const segments = decoded[line]; + const index = traceSegmentInternal( + segments, + cast(map)._decodedMemo, + line, + column, + GREATEST_LOWER_BOUND, + ); + + return index === -1 ? null : segments[index]; +} + +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +export function originalPositionFor( + map: TraceMap, + needle: Needle, +): OriginalMapping | InvalidOriginalMapping { + let { line, column, bias } = needle; + line--; + if (line < 0) throw new Error(LINE_GTR_ZERO); + if (column < 0) throw new Error(COL_GTR_EQ_ZERO); + + const decoded = decodedMappings(map); + + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) return OMapping(null, null, null, null); + + const segments = decoded[line]; + const index = traceSegmentInternal( + segments, + cast(map)._decodedMemo, + line, + column, + bias || GREATEST_LOWER_BOUND, + ); + + if (index === -1) return OMapping(null, null, null, null); + + const segment = segments[index]; + if (segment.length === 1) return OMapping(null, null, null, null); + + const { names, resolvedSources } = map; + return OMapping( + resolvedSources[segment[SOURCES_INDEX]], + segment[SOURCE_LINE] + 1, + segment[SOURCE_COLUMN], + segment.length === 5 ? names[segment[NAMES_INDEX]] : null, + ); +} + +/** + * Finds the generated line/column position of the provided source/line/column source position. + */ +export function generatedPositionFor( + map: TraceMap, + needle: SourceNeedle, +): GeneratedMapping | InvalidGeneratedMapping { + const { source, line, column, bias } = needle; + return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false); +} + +/** + * Finds all generated line/column positions of the provided source/line/column source position. + */ +export function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[] { + const { source, line, column, bias } = needle; + // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit. + return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true); +} + +/** + * Iterates each mapping in generated position order. + */ +export function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void { + const decoded = decodedMappings(map); + const { names, resolvedSources } = map; + + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + + const generatedLine = i + 1; + const generatedColumn = seg[0]; + let source = null; + let originalLine = null; + let originalColumn = null; + let name = null; + if (seg.length !== 1) { + source = resolvedSources[seg[1]]; + originalLine = seg[2] + 1; + originalColumn = seg[3]; + } + if (seg.length === 5) name = names[seg[4]]; + + cb({ + generatedLine, + generatedColumn, + source, + originalLine, + originalColumn, + name, + } as EachMapping); + } + } +} + +function sourceIndex(map: TraceMap, source: string): number { + const { sources, resolvedSources } = map; + let index = sources.indexOf(source); + if (index === -1) index = resolvedSources.indexOf(source); + return index; +} + +/** + * Retrieves the source content for a particular source, if its found. Returns null if not. + */ +export function sourceContentFor(map: TraceMap, source: string): string | null { + const { sourcesContent } = map; + if (sourcesContent == null) return null; + const index = sourceIndex(map, source); + return index === -1 ? null : sourcesContent[index]; +} + +/** + * Determines if the source is marked to ignore by the source map. + */ +export function isIgnored(map: TraceMap, source: string): boolean { + const { ignoreList } = map; + if (ignoreList == null) return false; + const index = sourceIndex(map, source); + return index === -1 ? false : ignoreList.includes(index); +} + +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +export function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap { + const tracer = new TraceMap(clone(map, []), mapUrl); + cast(tracer)._decoded = map.mappings; + return tracer; +} + +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export function decodedMap( + map: TraceMap, +): Omit & { mappings: readonly SourceMapSegment[][] } { + return clone(map, decodedMappings(map)); +} + +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export function encodedMap(map: TraceMap): EncodedSourceMap { + return clone(map, encodedMappings(map)); +} + +function clone( + map: TraceMap | DecodedSourceMap, + mappings: T, +): T extends string ? EncodedSourceMap : DecodedSourceMap { + return { + version: map.version, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings, + ignoreList: map.ignoreList || (map as XInput).x_google_ignoreList, + } as any; +} + +function OMapping(source: null, line: null, column: null, name: null): InvalidOriginalMapping; +function OMapping( + source: string, + line: number, + column: number, + name: string | null, +): OriginalMapping; +function OMapping( + source: string | null, + line: number | null, + column: number | null, + name: string | null, +): OriginalMapping | InvalidOriginalMapping { + return { source, line, column, name } as any; +} + +function GMapping(line: null, column: null): InvalidGeneratedMapping; +function GMapping(line: number, column: number): GeneratedMapping; +function GMapping( + line: number | null, + column: number | null, +): GeneratedMapping | InvalidGeneratedMapping { + return { line, column } as any; +} + +function traceSegmentInternal( + segments: SourceMapSegment[], + memo: MemoState, + line: number, + column: number, + bias: Bias, +): number; +function traceSegmentInternal( + segments: ReverseSegment[], + memo: MemoState, + line: number, + column: number, + bias: Bias, +): number; +function traceSegmentInternal( + segments: SourceMapSegment[] | ReverseSegment[], + memo: MemoState, + line: number, + column: number, + bias: Bias, +): number { + let index = memoizedBinarySearch(segments, column, memo, line); + if (bsFound) { + index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); + } else if (bias === LEAST_UPPER_BOUND) index++; + + if (index === -1 || index === segments.length) return -1; + return index; +} + +function sliceGeneratedPositions( + segments: ReverseSegment[], + memo: MemoState, + line: number, + column: number, + bias: Bias, +): GeneratedMapping[] { + let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND); + + // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in + // insertion order) segment that matched. Even if we did respect the bias when tracing, we would + // still need to call `lowerBound()` to find the first segment, which is slower than just looking + // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the + // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to + // match LEAST_UPPER_BOUND. + if (!bsFound && bias === LEAST_UPPER_BOUND) min++; + + if (min === -1 || min === segments.length) return []; + + // We may have found the segment that started at an earlier column. If this is the case, then we + // need to slice all generated segments that match _that_ column, because all such segments span + // to our desired column. + const matchedColumn = bsFound ? column : segments[min][COLUMN]; + + // The binary search is not guaranteed to find the lower bound when a match wasn't found. + if (!bsFound) min = lowerBound(segments, matchedColumn, min); + const max = upperBound(segments, matchedColumn, min); + + const result = []; + for (; min <= max; min++) { + const segment = segments[min]; + result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN])); + } + return result; +} + +function generatedPosition( + map: TraceMap, + source: string, + line: number, + column: number, + bias: Bias, + all: false, +): GeneratedMapping | InvalidGeneratedMapping; +function generatedPosition( + map: TraceMap, + source: string, + line: number, + column: number, + bias: Bias, + all: true, +): GeneratedMapping[]; +function generatedPosition( + map: TraceMap, + source: string, + line: number, + column: number, + bias: Bias, + all: boolean, +): GeneratedMapping | InvalidGeneratedMapping | GeneratedMapping[] { + line--; + if (line < 0) throw new Error(LINE_GTR_ZERO); + if (column < 0) throw new Error(COL_GTR_EQ_ZERO); + + const { sources, resolvedSources } = map; + let sourceIndex = sources.indexOf(source); + if (sourceIndex === -1) sourceIndex = resolvedSources.indexOf(source); + if (sourceIndex === -1) return all ? [] : GMapping(null, null); + + const bySourceMemos = (cast(map)._bySourceMemos ||= sources.map(memoizedState)); + const generated = (cast(map)._bySources ||= buildBySources(decodedMappings(map), bySourceMemos)); + + const segments = generated[sourceIndex][line]; + if (segments == null) return all ? [] : GMapping(null, null); + + const memo = bySourceMemos[sourceIndex]; + + if (all) return sliceGeneratedPositions(segments, memo, line, column, bias); + + const index = traceSegmentInternal(segments, memo, line, column, bias); + if (index === -1) return GMapping(null, null); + + const segment = segments[index]; + return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]); +} diff --git a/node_modules/@jridgewell/trace-mapping/src/types.ts b/node_modules/@jridgewell/trace-mapping/src/types.ts new file mode 100644 index 0000000..730a61f --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/types.ts @@ -0,0 +1,114 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping'; + +export interface SourceMapV3 { + file?: string | null; + names: string[]; + sourceRoot?: string; + sources: (string | null)[]; + sourcesContent?: (string | null)[]; + version: 3; + ignoreList?: number[]; +} + +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} + +export interface DecodedSourceMap extends SourceMapV3 { + mappings: SourceMapSegment[][]; +} + +export interface Section { + offset: { line: number; column: number }; + map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; +} + +export interface SectionedSourceMap { + file?: string | null; + sections: Section[]; + version: 3; +} + +export type OriginalMapping = { + source: string | null; + line: number; + column: number; + name: string | null; +}; + +export type InvalidOriginalMapping = { + source: null; + line: null; + column: null; + name: null; +}; + +export type GeneratedMapping = { + line: number; + column: number; +}; +export type InvalidGeneratedMapping = { + line: null; + column: null; +}; + +export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND; + +export type XInput = { x_google_ignoreList?: SourceMapV3['ignoreList'] }; +export type EncodedSourceMapXInput = EncodedSourceMap & XInput; +export type DecodedSourceMapXInput = DecodedSourceMap & XInput; +export type SectionedSourceMapXInput = Omit & { + sections: SectionXInput[]; +}; +export type SectionXInput = Omit & { + map: SectionedSourceMapInput; +}; + +export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap; +export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput; + +export type Needle = { line: number; column: number; bias?: Bias }; +export type SourceNeedle = { source: string; line: number; column: number; bias?: Bias }; + +export type EachMapping = + | { + generatedLine: number; + generatedColumn: number; + source: null; + originalLine: null; + originalColumn: null; + name: null; + } + | { + generatedLine: number; + generatedColumn: number; + source: string | null; + originalLine: number; + originalColumn: number; + name: string | null; + }; + +export abstract class SourceMap { + declare version: SourceMapV3['version']; + declare file: SourceMapV3['file']; + declare names: SourceMapV3['names']; + declare sourceRoot: SourceMapV3['sourceRoot']; + declare sources: SourceMapV3['sources']; + declare sourcesContent: SourceMapV3['sourcesContent']; + declare resolvedSources: SourceMapV3['sources']; + declare ignoreList: SourceMapV3['ignoreList']; +} + +export type Ro = + T extends Array + ? V[] | Readonly | RoArray | Readonly> + : T extends object + ? T | Readonly | RoObject | Readonly> + : T; +type RoArray = Ro[]; +type RoObject = { [K in keyof T]: T[K] | Ro }; + +export function parse(map: T): Exclude { + return typeof map === 'string' ? JSON.parse(map) : (map as Exclude); +} diff --git a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts new file mode 100644 index 0000000..b7bb85c --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts @@ -0,0 +1,33 @@ +import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment.cts'; +export type MemoState = { + lastKey: number; + lastNeedle: number; + lastIndex: number; +}; +export declare let found: boolean; +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number; +export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function memoizedState(): MemoState; +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number; +//# sourceMappingURL=binary-search.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts.map new file mode 100644 index 0000000..648e84c --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"binary-search.d.ts","sourceRoot":"","sources":["../src/binary-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG5E,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,IAAI,KAAK,SAAQ,CAAC;AAEzB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,MAAM,CAmBR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,aAAa,IAAI,SAAS,CAMzC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,MAAM,GACV,MAAM,CAsBR"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts new file mode 100644 index 0000000..19e1e6b --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts @@ -0,0 +1,33 @@ +import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment.mts'; +export type MemoState = { + lastKey: number; + lastNeedle: number; + lastIndex: number; +}; +export declare let found: boolean; +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number; +export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function memoizedState(): MemoState; +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number; +//# sourceMappingURL=binary-search.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts.map new file mode 100644 index 0000000..648e84c --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"binary-search.d.ts","sourceRoot":"","sources":["../src/binary-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG5E,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,IAAI,KAAK,SAAQ,CAAC;AAEzB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,MAAM,CAmBR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,aAAa,IAAI,SAAS,CAMzC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,MAAM,GACV,MAAM,CAsBR"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts b/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts new file mode 100644 index 0000000..da49693 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts @@ -0,0 +1,4 @@ +import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.cts'; +export type Source = ReverseSegment[][]; +export = function buildBySources(decoded: readonly SourceMapSegment[][], memos: unknown[]): Source[]; +//# sourceMappingURL=by-source.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts.map new file mode 100644 index 0000000..32d2a7a --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"by-source.d.ts","sourceRoot":"","sources":["../src/by-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,MAAM,MAAM,GAAG,cAAc,EAAE,EAAE,CAAC;AAIxC,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EAAE,EACtC,KAAK,EAAE,OAAO,EAAE,GACf,MAAM,EAAE,CA4BV"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts b/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts new file mode 100644 index 0000000..f361049 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts @@ -0,0 +1,4 @@ +import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.mts'; +export type Source = ReverseSegment[][]; +export default function buildBySources(decoded: readonly SourceMapSegment[][], memos: unknown[]): Source[]; +//# sourceMappingURL=by-source.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts.map new file mode 100644 index 0000000..32d2a7a --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"by-source.d.ts","sourceRoot":"","sources":["../src/by-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,MAAM,MAAM,GAAG,cAAc,EAAE,EAAE,CAAC;AAIxC,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EAAE,EACtC,KAAK,EAAE,OAAO,EAAE,GACf,MAAM,EAAE,CA4BV"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts new file mode 100644 index 0000000..433d849 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts @@ -0,0 +1,9 @@ +import { TraceMap } from './trace-mapping.cts'; +import type { SectionedSourceMapInput, Ro } from './types.cts'; +type FlattenMap = { + new (map: Ro, mapUrl?: string | null): TraceMap; + (map: Ro, mapUrl?: string | null): TraceMap; +}; +export declare const FlattenMap: FlattenMap; +export {}; +//# sourceMappingURL=flatten-map.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts.map new file mode 100644 index 0000000..994b208 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"flatten-map.d.ts","sourceRoot":"","sources":["../src/flatten-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAwC,MAAM,iBAAiB,CAAC;AAUjF,OAAO,KAAK,EAKV,uBAAuB,EAEvB,EAAE,EACH,MAAM,SAAS,CAAC;AAGjB,KAAK,UAAU,GAAG;IAChB,KAAK,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;IACzE,CAAC,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;CACtE,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAsCV,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts new file mode 100644 index 0000000..444a1be --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts @@ -0,0 +1,9 @@ +import { TraceMap } from './trace-mapping.mts'; +import type { SectionedSourceMapInput, Ro } from './types.mts'; +type FlattenMap = { + new (map: Ro, mapUrl?: string | null): TraceMap; + (map: Ro, mapUrl?: string | null): TraceMap; +}; +export declare const FlattenMap: FlattenMap; +export {}; +//# sourceMappingURL=flatten-map.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts.map new file mode 100644 index 0000000..994b208 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"flatten-map.d.ts","sourceRoot":"","sources":["../src/flatten-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAwC,MAAM,iBAAiB,CAAC;AAUjF,OAAO,KAAK,EAKV,uBAAuB,EAEvB,EAAE,EACH,MAAM,SAAS,CAAC;AAGjB,KAAK,UAAU,GAAG;IAChB,KAAK,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;IACzE,CAAC,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;CACtE,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAsCV,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts b/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts new file mode 100644 index 0000000..62aeedb --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts @@ -0,0 +1,4 @@ +type Resolve = (source: string | null) => string; +export = function resolver(mapUrl: string | null | undefined, sourceRoot: string | undefined): Resolve; +export {}; +//# sourceMappingURL=resolve.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts.map new file mode 100644 index 0000000..9f155ac --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAGA,KAAK,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;AACjD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,OAAO,CAQT"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts b/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts new file mode 100644 index 0000000..e2798a1 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts @@ -0,0 +1,4 @@ +type Resolve = (source: string | null) => string; +export default function resolver(mapUrl: string | null | undefined, sourceRoot: string | undefined): Resolve; +export {}; +//# sourceMappingURL=resolve.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts.map new file mode 100644 index 0000000..9f155ac --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAGA,KAAK,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;AACjD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,OAAO,CAQT"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sort.d.cts b/node_modules/@jridgewell/trace-mapping/types/sort.d.cts new file mode 100644 index 0000000..aa14c12 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sort.d.cts @@ -0,0 +1,4 @@ +import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.cts'; +export = function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][]; +export declare function sortComparator(a: T, b: T): number; +//# sourceMappingURL=sort.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sort.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/sort.d.cts.map new file mode 100644 index 0000000..48b8e67 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sort.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../src/sort.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,QAAQ,EAAE,gBAAgB,EAAE,EAAE,EAC9B,KAAK,EAAE,OAAO,GACb,gBAAgB,EAAE,EAAE,CAYtB;AAuBD,wBAAgB,cAAc,CAAC,CAAC,SAAS,gBAAgB,GAAG,cAAc,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,CAE9F"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sort.d.mts b/node_modules/@jridgewell/trace-mapping/types/sort.d.mts new file mode 100644 index 0000000..c5b94e6 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sort.d.mts @@ -0,0 +1,4 @@ +import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.mts'; +export default function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][]; +export declare function sortComparator(a: T, b: T): number; +//# sourceMappingURL=sort.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sort.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/sort.d.mts.map new file mode 100644 index 0000000..48b8e67 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sort.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../src/sort.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,QAAQ,EAAE,gBAAgB,EAAE,EAAE,EAC9B,KAAK,EAAE,OAAO,GACb,gBAAgB,EAAE,EAAE,CAYtB;AAuBD,wBAAgB,cAAc,CAAC,CAAC,SAAS,gBAAgB,GAAG,cAAc,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,CAE9F"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts new file mode 100644 index 0000000..8d3cabc --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts @@ -0,0 +1,17 @@ +type GeneratedColumn = number; +type SourcesIndex = number; +type SourceLine = number; +type SourceColumn = number; +type NamesIndex = number; +type GeneratedLine = number; +export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; +export declare const COLUMN = 0; +export declare const SOURCES_INDEX = 1; +export declare const SOURCE_LINE = 2; +export declare const SOURCE_COLUMN = 3; +export declare const NAMES_INDEX = 4; +export declare const REV_GENERATED_LINE = 1; +export declare const REV_GENERATED_COLUMN = 2; +export {}; +//# sourceMappingURL=sourcemap-segment.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts.map new file mode 100644 index 0000000..0c94a46 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,KAAK,aAAa,GAAG,MAAM,CAAC;AAE5B,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,MAAM,MAAM,cAAc,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;AAE5E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,oBAAoB,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts new file mode 100644 index 0000000..8d3cabc --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts @@ -0,0 +1,17 @@ +type GeneratedColumn = number; +type SourcesIndex = number; +type SourceLine = number; +type SourceColumn = number; +type NamesIndex = number; +type GeneratedLine = number; +export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; +export declare const COLUMN = 0; +export declare const SOURCES_INDEX = 1; +export declare const SOURCE_LINE = 2; +export declare const SOURCE_COLUMN = 3; +export declare const NAMES_INDEX = 4; +export declare const REV_GENERATED_LINE = 1; +export declare const REV_GENERATED_COLUMN = 2; +export {}; +//# sourceMappingURL=sourcemap-segment.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts.map new file mode 100644 index 0000000..0c94a46 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,KAAK,aAAa,GAAG,MAAM,CAAC;AAE5B,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,MAAM,MAAM,cAAc,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;AAE5E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,oBAAoB,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts new file mode 100644 index 0000000..8b3c0e9 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts @@ -0,0 +1,5 @@ +/** + * Removes everything after the last "/", but leaves the slash. + */ +export = function stripFilename(path: string | undefined | null): string; +//# sourceMappingURL=strip-filename.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts.map new file mode 100644 index 0000000..17a25da --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-filename.d.ts","sourceRoot":"","sources":["../src/strip-filename.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAI7E"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts new file mode 100644 index 0000000..cbbaee0 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts @@ -0,0 +1,5 @@ +/** + * Removes everything after the last "/", but leaves the slash. + */ +export default function stripFilename(path: string | undefined | null): string; +//# sourceMappingURL=strip-filename.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts.map new file mode 100644 index 0000000..17a25da --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-filename.d.ts","sourceRoot":"","sources":["../src/strip-filename.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAI7E"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts new file mode 100644 index 0000000..a40f305 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts @@ -0,0 +1,80 @@ +import type { SourceMapSegment } from './sourcemap-segment.cts'; +import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping, Ro } from './types.cts'; +export type { SourceMapSegment } from './sourcemap-segment.cts'; +export type { SourceMap, DecodedSourceMap, EncodedSourceMap, Section, SectionedSourceMap, SourceMapV3, Bias, EachMapping, GeneratedMapping, InvalidGeneratedMapping, InvalidOriginalMapping, Needle, OriginalMapping, OriginalMapping as Mapping, SectionedSourceMapInput, SourceMapInput, SourceNeedle, XInput, EncodedSourceMapXInput, DecodedSourceMapXInput, SectionedSourceMapXInput, SectionXInput, } from './types.cts'; +export declare const LEAST_UPPER_BOUND = -1; +export declare const GREATEST_LOWER_BOUND = 1; +export { FlattenMap, FlattenMap as AnyMap } from './flatten-map.cts'; +export declare class TraceMap implements SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + ignoreList: SourceMapV3['ignoreList']; + resolvedSources: string[]; + private _encoded; + private _decoded; + private _decodedMemo; + private _bySources; + private _bySourceMemos; + constructor(map: Ro, mapUrl?: string | null); +} +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +export declare function encodedMappings(map: TraceMap): EncodedSourceMap['mappings']; +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +export declare function decodedMappings(map: TraceMap): Readonly; +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +export declare function traceSegment(map: TraceMap, line: number, column: number): Readonly | null; +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +export declare function originalPositionFor(map: TraceMap, needle: Needle): OriginalMapping | InvalidOriginalMapping; +/** + * Finds the generated line/column position of the provided source/line/column source position. + */ +export declare function generatedPositionFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping | InvalidGeneratedMapping; +/** + * Finds all generated line/column positions of the provided source/line/column source position. + */ +export declare function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[]; +/** + * Iterates each mapping in generated position order. + */ +export declare function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void; +/** + * Retrieves the source content for a particular source, if its found. Returns null if not. + */ +export declare function sourceContentFor(map: TraceMap, source: string): string | null; +/** + * Determines if the source is marked to ignore by the source map. + */ +export declare function isIgnored(map: TraceMap, source: string): boolean; +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +export declare function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function decodedMap(map: TraceMap): Omit & { + mappings: readonly SourceMapSegment[][]; +}; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function encodedMap(map: TraceMap): EncodedSourceMap; +//# sourceMappingURL=trace-mapping.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts.map new file mode 100644 index 0000000..b5a874c --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"trace-mapping.d.ts","sourceRoot":"","sources":["../src/trace-mapping.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,gBAAgB,EAAkB,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,uBAAuB,EACvB,gBAAgB,EAChB,cAAc,EACd,MAAM,EACN,YAAY,EACZ,SAAS,EACT,WAAW,EAIX,EAAE,EACH,MAAM,SAAS,CAAC;AAIjB,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,YAAY,EACV,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,WAAW,EACX,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,MAAM,EACN,eAAe,EACf,eAAe,IAAI,OAAO,EAC1B,uBAAuB,EACvB,cAAc,EACd,YAA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AC,GAAG,IAAI,CAiBnC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,MAAM,GACb,eAAe,GAAG,sBAAsB,CAiC1C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,YAAY,GACnB,gBAAgB,GAAG,uBAAuB,CAG5C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,GAAG,gBAAgB,EAAE,CAIhG;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,GAAG,IAAI,CAgCnF;AASD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK7E;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAKhE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAIpF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,QAAQ,GACZ,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG;IAAE,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EAAE,CAAA;CAAE,CAElF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,QAAQ,GAAG,gBAAgB,CAE1D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts new file mode 100644 index 0000000..bc2ff0f --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts @@ -0,0 +1,80 @@ +import type { SourceMapSegment } from './sourcemap-segment.mts'; +import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping, Ro } from './types.mts'; +export type { SourceMapSegment } from './sourcemap-segment.mts'; +export type { SourceMap, DecodedSourceMap, EncodedSourceMap, Section, SectionedSourceMap, SourceMapV3, Bias, EachMapping, GeneratedMapping, InvalidGeneratedMapping, InvalidOriginalMapping, Needle, OriginalMapping, OriginalMapping as Mapping, SectionedSourceMapInput, SourceMapInput, SourceNeedle, XInput, EncodedSourceMapXInput, DecodedSourceMapXInput, SectionedSourceMapXInput, SectionXInput, } from './types.mts'; +export declare const LEAST_UPPER_BOUND = -1; +export declare const GREATEST_LOWER_BOUND = 1; +export { FlattenMap, FlattenMap as AnyMap } from './flatten-map.mts'; +export declare class TraceMap implements SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + ignoreList: SourceMapV3['ignoreList']; + resolvedSources: string[]; + private _encoded; + private _decoded; + private _decodedMemo; + private _bySources; + private _bySourceMemos; + constructor(map: Ro, mapUrl?: string | null); +} +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +export declare function encodedMappings(map: TraceMap): EncodedSourceMap['mappings']; +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +export declare function decodedMappings(map: TraceMap): Readonly; +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +export declare function traceSegment(map: TraceMap, line: number, column: number): Readonly | null; +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +export declare function originalPositionFor(map: TraceMap, needle: Needle): OriginalMapping | InvalidOriginalMapping; +/** + * Finds the generated line/column position of the provided source/line/column source position. + */ +export declare function generatedPositionFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping | InvalidGeneratedMapping; +/** + * Finds all generated line/column positions of the provided source/line/column source position. + */ +export declare function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[]; +/** + * Iterates each mapping in generated position order. + */ +export declare function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void; +/** + * Retrieves the source content for a particular source, if its found. Returns null if not. + */ +export declare function sourceContentFor(map: TraceMap, source: string): string | null; +/** + * Determines if the source is marked to ignore by the source map. + */ +export declare function isIgnored(map: TraceMap, source: string): boolean; +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +export declare function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function decodedMap(map: TraceMap): Omit & { + mappings: readonly SourceMapSegment[][]; +}; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function encodedMap(map: TraceMap): EncodedSourceMap; +//# sourceMappingURL=trace-mapping.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts.map new file mode 100644 index 0000000..b5a874c --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"trace-mapping.d.ts","sourceRoot":"","sources":["../src/trace-mapping.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,gBAAgB,EAAkB,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,s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AM,GAAG,QAAQ,CAIpF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,QAAQ,GACZ,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG;IAAE,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EAAE,CAAA;CAAE,CAElF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,QAAQ,GAAG,gBAAgB,CAE1D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/types.d.cts b/node_modules/@jridgewell/trace-mapping/types/types.d.cts new file mode 100644 index 0000000..729c2c3 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/types.d.cts @@ -0,0 +1,107 @@ +import type { SourceMapSegment } from './sourcemap-segment.cts'; +import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping.cts'; +export interface SourceMapV3 { + file?: string | null; + names: string[]; + sourceRoot?: string; + sources: (string | null)[]; + sourcesContent?: (string | null)[]; + version: 3; + ignoreList?: number[]; +} +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { + mappings: SourceMapSegment[][]; +} +export interface Section { + offset: { + line: number; + column: number; + }; + map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; +} +export interface SectionedSourceMap { + file?: string | null; + sections: Section[]; + version: 3; +} +export type OriginalMapping = { + source: string | null; + line: number; + column: number; + name: string | null; +}; +export type InvalidOriginalMapping = { + source: null; + line: null; + column: null; + name: null; +}; +export type GeneratedMapping = { + line: number; + column: number; +}; +export type InvalidGeneratedMapping = { + line: null; + column: null; +}; +export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND; +export type XInput = { + x_google_ignoreList?: SourceMapV3['ignoreList']; +}; +export type EncodedSourceMapXInput = EncodedSourceMap & XInput; +export type DecodedSourceMapXInput = DecodedSourceMap & XInput; +export type SectionedSourceMapXInput = Omit & { + sections: SectionXInput[]; +}; +export type SectionXInput = Omit & { + map: SectionedSourceMapInput; +}; +export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap; +export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput; +export type Needle = { + line: number; + column: number; + bias?: Bias; +}; +export type SourceNeedle = { + source: string; + line: number; + column: number; + bias?: Bias; +}; +export type EachMapping = { + generatedLine: number; + generatedColumn: number; + source: null; + originalLine: null; + originalColumn: null; + name: null; +} | { + generatedLine: number; + generatedColumn: number; + source: string | null; + originalLine: number; + originalColumn: number; + name: string | null; +}; +export declare abstract class SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + resolvedSources: SourceMapV3['sources']; + ignoreList: SourceMapV3['ignoreList']; +} +export type Ro = T extends Array ? V[] | Readonly | RoArray | Readonly> : T extends object ? T | Readonly | RoObject | Readonly> : T; +type RoArray = Ro[]; +type RoObject = { + [K in keyof T]: T[K] | Ro; +}; +export declare function parse(map: T): Exclude; +export {}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/types.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/types.d.cts.map new file mode 100644 index 0000000..9224783 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/types.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEzF,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,C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,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAEvD,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAEnD"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/types.d.mts b/node_modules/@jridgewell/trace-mapping/types/types.d.mts new file mode 100644 index 0000000..a26d186 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/types.d.mts @@ -0,0 +1,107 @@ +import type { SourceMapSegment } from './sourcemap-segment.mts'; +import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping.mts'; +export interface SourceMapV3 { + file?: string | null; + names: string[]; + sourceRoot?: string; + sources: (string | null)[]; + sourcesContent?: (string | null)[]; + version: 3; + ignoreList?: number[]; +} +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { + mappings: SourceMapSegment[][]; +} +export interface Section { + offset: { + line: number; + column: number; + }; + map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; +} +export interface SectionedSourceMap { + file?: string | null; + sections: Section[]; + version: 3; +} +export type OriginalMapping = { + source: string | null; + line: number; + column: number; + name: string | null; +}; +export type InvalidOriginalMapping = { + source: null; + line: null; + column: null; + name: null; +}; +export type GeneratedMapping = { + line: number; + column: number; +}; +export type InvalidGeneratedMapping = { + line: null; + column: null; +}; +export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND; +export type XInput = { + x_google_ignoreList?: SourceMapV3['ignoreList']; +}; +export type EncodedSourceMapXInput = EncodedSourceMap & XInput; +export type DecodedSourceMapXInput = DecodedSourceMap & XInput; +export type SectionedSourceMapXInput = Omit & { + sections: SectionXInput[]; +}; +export type SectionXInput = Omit & { + map: SectionedSourceMapInput; +}; +export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap; +export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput; +export type Needle = { + line: number; + column: number; + bias?: Bias; +}; +export type SourceNeedle = { + source: string; + line: number; + column: number; + bias?: Bias; +}; +export type EachMapping = { + generatedLine: number; + generatedColumn: number; + source: null; + originalLine: null; + originalColumn: null; + name: null; +} | { + generatedLine: number; + generatedColumn: number; + source: string | null; + originalLine: number; + originalColumn: number; + name: string | null; +}; +export declare abstract class SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + resolvedSources: SourceMapV3['sources']; + ignoreList: SourceMapV3['ignoreList']; +} +export type Ro = T extends Array ? V[] | Readonly | RoArray | Readonly> : T extends object ? T | Readonly | RoObject | Readonly> : T; +type RoArray = Ro[]; +type RoObject = { + [K in keyof T]: T[K] | Ro; +}; +export declare function parse(map: T): Exclude; +export {}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/types.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/types.d.mts.map new file mode 100644 index 0000000..9224783 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/types.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEzF,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC3B,cAAc,CAAC,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AAC,CAAC,EAAE,MAAM,CAAC,CAEnD"} \ No newline at end of file diff --git a/node_modules/@nodelib/fs.scandir/LICENSE b/node_modules/@nodelib/fs.scandir/LICENSE new file mode 100644 index 0000000..65a9994 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Denis Malinochkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@nodelib/fs.scandir/README.md b/node_modules/@nodelib/fs.scandir/README.md new file mode 100644 index 0000000..e0b218b --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/README.md @@ -0,0 +1,171 @@ +# @nodelib/fs.scandir + +> List files and directories inside the specified directory. + +## :bulb: Highlights + +The package is aimed at obtaining information about entries in the directory. + +* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional). +* :gear: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type. See [`old` and `modern` mode](#old-and-modern-mode). +* :link: Can safely work with broken symbolic links. + +## Install + +```console +npm install @nodelib/fs.scandir +``` + +## Usage + +```ts +import * as fsScandir from '@nodelib/fs.scandir'; + +fsScandir.scandir('path', (error, stats) => { /* … */ }); +``` + +## API + +### .scandir(path, [optionsOrSettings], callback) + +Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path with standard callback-style. + +```ts +fsScandir.scandir('path', (error, entries) => { /* … */ }); +fsScandir.scandir('path', {}, (error, entries) => { /* … */ }); +fsScandir.scandir('path', new fsScandir.Settings(), (error, entries) => { /* … */ }); +``` + +### .scandirSync(path, [optionsOrSettings]) + +Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path. + +```ts +const entries = fsScandir.scandirSync('path'); +const entries = fsScandir.scandirSync('path', {}); +const entries = fsScandir.scandirSync(('path', new fsScandir.Settings()); +``` + +#### path + +* Required: `true` +* Type: `string | Buffer | URL` + +A path to a file. If a URL is provided, it must use the `file:` protocol. + +#### optionsOrSettings + +* Required: `false` +* Type: `Options | Settings` +* Default: An instance of `Settings` class + +An [`Options`](#options) object or an instance of [`Settings`](#settingsoptions) class. + +> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class. + +### Settings([options]) + +A class of full settings of the package. + +```ts +const settings = new fsScandir.Settings({ followSymbolicLinks: false }); + +const entries = fsScandir.scandirSync('path', settings); +``` + +## Entry + +* `name` — The name of the entry (`unknown.txt`). +* `path` — The path of the entry relative to call directory (`root/unknown.txt`). +* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. On Node.js below 10.10 will be emulated by [`DirentFromStats`](./src/utils/fs.ts) class. +* `stats` (optional) — An instance of `fs.Stats` class. + +For example, the `scandir` call for `tools` directory with one directory inside: + +```ts +{ + dirent: Dirent { name: 'typedoc', /* … */ }, + name: 'typedoc', + path: 'tools/typedoc' +} +``` + +## Options + +### stats + +* Type: `boolean` +* Default: `false` + +Adds an instance of `fs.Stats` class to the [`Entry`](#entry). + +> :book: Always use `fs.readdir` without the `withFileTypes` option. ??TODO?? + +### followSymbolicLinks + +* Type: `boolean` +* Default: `false` + +Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`. + +### `throwErrorOnBrokenSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Throw an error when symbolic link is broken if `true` or safely use `lstat` call if `false`. + +### `pathSegmentSeparator` + +* Type: `string` +* Default: `path.sep` + +By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead. + +### `fs` + +* Type: [`FileSystemAdapter`](./src/adapters/fs.ts) +* Default: A default FS methods + +By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own. + +```ts +interface FileSystemAdapter { + lstat?: typeof fs.lstat; + stat?: typeof fs.stat; + lstatSync?: typeof fs.lstatSync; + statSync?: typeof fs.statSync; + readdir?: typeof fs.readdir; + readdirSync?: typeof fs.readdirSync; +} + +const settings = new fsScandir.Settings({ + fs: { lstat: fakeLstat } +}); +``` + +## `old` and `modern` mode + +This package has two modes that are used depending on the environment and parameters of use. + +### old + +* Node.js below `10.10` or when the `stats` option is enabled + +When working in the old mode, the directory is read first (`fs.readdir`), then the type of entries is determined (`fs.lstat` and/or `fs.stat` for symbolic links). + +### modern + +* Node.js 10.10+ and the `stats` option is disabled + +In the modern mode, reading the directory (`fs.readdir` with the `withFileTypes` option) is combined with obtaining information about its entries. An additional call for symbolic links (`fs.stat`) is still present. + +This mode makes fewer calls to the file system. It's faster. + +## Changelog + +See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version. + +## License + +This software is released under the terms of the MIT license. diff --git a/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts b/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts new file mode 100644 index 0000000..827f1db --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts @@ -0,0 +1,20 @@ +import type * as fsStat from '@nodelib/fs.stat'; +import type { Dirent, ErrnoException } from '../types'; +export interface ReaddirAsynchronousMethod { + (filepath: string, options: { + withFileTypes: true; + }, callback: (error: ErrnoException | null, files: Dirent[]) => void): void; + (filepath: string, callback: (error: ErrnoException | null, files: string[]) => void): void; +} +export interface ReaddirSynchronousMethod { + (filepath: string, options: { + withFileTypes: true; + }): Dirent[]; + (filepath: string): string[]; +} +export declare type FileSystemAdapter = fsStat.FileSystemAdapter & { + readdir: ReaddirAsynchronousMethod; + readdirSync: ReaddirSynchronousMethod; +}; +export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter; +export declare function createFileSystemAdapter(fsMethods?: Partial): FileSystemAdapter; diff --git a/node_modules/@nodelib/fs.scandir/out/adapters/fs.js b/node_modules/@nodelib/fs.scandir/out/adapters/fs.js new file mode 100644 index 0000000..f0fe022 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/adapters/fs.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; +const fs = require("fs"); +exports.FILE_SYSTEM_ADAPTER = { + lstat: fs.lstat, + stat: fs.stat, + lstatSync: fs.lstatSync, + statSync: fs.statSync, + readdir: fs.readdir, + readdirSync: fs.readdirSync +}; +function createFileSystemAdapter(fsMethods) { + if (fsMethods === undefined) { + return exports.FILE_SYSTEM_ADAPTER; + } + return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); +} +exports.createFileSystemAdapter = createFileSystemAdapter; diff --git a/node_modules/@nodelib/fs.scandir/out/constants.d.ts b/node_modules/@nodelib/fs.scandir/out/constants.d.ts new file mode 100644 index 0000000..33f1749 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/constants.d.ts @@ -0,0 +1,4 @@ +/** + * IS `true` for Node.js 10.10 and greater. + */ +export declare const IS_SUPPORT_READDIR_WITH_FILE_TYPES: boolean; diff --git a/node_modules/@nodelib/fs.scandir/out/constants.js b/node_modules/@nodelib/fs.scandir/out/constants.js new file mode 100644 index 0000000..7e3d441 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/constants.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; +const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.'); +if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) { + throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); +} +const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); +const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); +const SUPPORTED_MAJOR_VERSION = 10; +const SUPPORTED_MINOR_VERSION = 10; +const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; +const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; +/** + * IS `true` for Node.js 10.10 and greater. + */ +exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; diff --git a/node_modules/@nodelib/fs.scandir/out/index.d.ts b/node_modules/@nodelib/fs.scandir/out/index.d.ts new file mode 100644 index 0000000..b9da83e --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/index.d.ts @@ -0,0 +1,12 @@ +import type { FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod } from './adapters/fs'; +import * as async from './providers/async'; +import Settings, { Options } from './settings'; +import type { Dirent, Entry } from './types'; +declare type AsyncCallback = async.AsyncCallback; +declare function scandir(path: string, callback: AsyncCallback): void; +declare function scandir(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void; +declare namespace scandir { + function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise; +} +declare function scandirSync(path: string, optionsOrSettings?: Options | Settings): Entry[]; +export { scandir, scandirSync, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod, Options }; diff --git a/node_modules/@nodelib/fs.scandir/out/index.js b/node_modules/@nodelib/fs.scandir/out/index.js new file mode 100644 index 0000000..99c70d3 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/index.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Settings = exports.scandirSync = exports.scandir = void 0; +const async = require("./providers/async"); +const sync = require("./providers/sync"); +const settings_1 = require("./settings"); +exports.Settings = settings_1.default; +function scandir(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === 'function') { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); +} +exports.scandir = scandir; +function scandirSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); +} +exports.scandirSync = scandirSync; +function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); +} diff --git a/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts b/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts new file mode 100644 index 0000000..5829676 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts @@ -0,0 +1,7 @@ +/// +import type Settings from '../settings'; +import type { Entry } from '../types'; +export declare type AsyncCallback = (error: NodeJS.ErrnoException, entries: Entry[]) => void; +export declare function read(directory: string, settings: Settings, callback: AsyncCallback): void; +export declare function readdirWithFileTypes(directory: string, settings: Settings, callback: AsyncCallback): void; +export declare function readdir(directory: string, settings: Settings, callback: AsyncCallback): void; diff --git a/node_modules/@nodelib/fs.scandir/out/providers/async.js b/node_modules/@nodelib/fs.scandir/out/providers/async.js new file mode 100644 index 0000000..e8e2f0a --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/async.js @@ -0,0 +1,104 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; +const fsStat = require("@nodelib/fs.stat"); +const rpl = require("run-parallel"); +const constants_1 = require("../constants"); +const utils = require("../utils"); +const common = require("./common"); +function read(directory, settings, callback) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { + readdirWithFileTypes(directory, settings, callback); + return; + } + readdir(directory, settings, callback); +} +exports.read = read; +function readdirWithFileTypes(directory, settings, callback) { + settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + const entries = dirents.map((dirent) => ({ + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + })); + if (!settings.followSymbolicLinks) { + callSuccessCallback(callback, entries); + return; + } + const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); + rpl(tasks, (rplError, rplEntries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, rplEntries); + }); + }); +} +exports.readdirWithFileTypes = readdirWithFileTypes; +function makeRplTaskEntry(entry, settings) { + return (done) => { + if (!entry.dirent.isSymbolicLink()) { + done(null, entry); + return; + } + settings.fs.stat(entry.path, (statError, stats) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + done(statError); + return; + } + done(null, entry); + return; + } + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + done(null, entry); + }); + }; +} +function readdir(directory, settings, callback) { + settings.fs.readdir(directory, (readdirError, names) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + const tasks = names.map((name) => { + const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + return (done) => { + fsStat.stat(path, settings.fsStatSettings, (error, stats) => { + if (error !== null) { + done(error); + return; + } + const entry = { + name, + path, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) { + entry.stats = stats; + } + done(null, entry); + }); + }; + }); + rpl(tasks, (rplError, entries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, entries); + }); + }); +} +exports.readdir = readdir; +function callFailureCallback(callback, error) { + callback(error); +} +function callSuccessCallback(callback, result) { + callback(null, result); +} diff --git a/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts b/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts new file mode 100644 index 0000000..2b4d08b --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts @@ -0,0 +1 @@ +export declare function joinPathSegments(a: string, b: string, separator: string): string; diff --git a/node_modules/@nodelib/fs.scandir/out/providers/common.js b/node_modules/@nodelib/fs.scandir/out/providers/common.js new file mode 100644 index 0000000..8724cb5 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/common.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.joinPathSegments = void 0; +function joinPathSegments(a, b, separator) { + /** + * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). + */ + if (a.endsWith(separator)) { + return a + b; + } + return a + separator + b; +} +exports.joinPathSegments = joinPathSegments; diff --git a/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts b/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts new file mode 100644 index 0000000..e05c8f0 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts @@ -0,0 +1,5 @@ +import type Settings from '../settings'; +import type { Entry } from '../types'; +export declare function read(directory: string, settings: Settings): Entry[]; +export declare function readdirWithFileTypes(directory: string, settings: Settings): Entry[]; +export declare function readdir(directory: string, settings: Settings): Entry[]; diff --git a/node_modules/@nodelib/fs.scandir/out/providers/sync.js b/node_modules/@nodelib/fs.scandir/out/providers/sync.js new file mode 100644 index 0000000..146db34 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/sync.js @@ -0,0 +1,54 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; +const fsStat = require("@nodelib/fs.stat"); +const constants_1 = require("../constants"); +const utils = require("../utils"); +const common = require("./common"); +function read(directory, settings) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { + return readdirWithFileTypes(directory, settings); + } + return readdir(directory, settings); +} +exports.read = read; +function readdirWithFileTypes(directory, settings) { + const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); + return dirents.map((dirent) => { + const entry = { + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + }; + if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { + try { + const stats = settings.fs.statSync(entry.path); + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + } + catch (error) { + if (settings.throwErrorOnBrokenSymbolicLink) { + throw error; + } + } + } + return entry; + }); +} +exports.readdirWithFileTypes = readdirWithFileTypes; +function readdir(directory, settings) { + const names = settings.fs.readdirSync(directory); + return names.map((name) => { + const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const stats = fsStat.statSync(entryPath, settings.fsStatSettings); + const entry = { + name, + path: entryPath, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) { + entry.stats = stats; + } + return entry; + }); +} +exports.readdir = readdir; diff --git a/node_modules/@nodelib/fs.scandir/out/settings.d.ts b/node_modules/@nodelib/fs.scandir/out/settings.d.ts new file mode 100644 index 0000000..a0db115 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/settings.d.ts @@ -0,0 +1,20 @@ +import * as fsStat from '@nodelib/fs.stat'; +import * as fs from './adapters/fs'; +export interface Options { + followSymbolicLinks?: boolean; + fs?: Partial; + pathSegmentSeparator?: string; + stats?: boolean; + throwErrorOnBrokenSymbolicLink?: boolean; +} +export default class Settings { + private readonly _options; + readonly followSymbolicLinks: boolean; + readonly fs: fs.FileSystemAdapter; + readonly pathSegmentSeparator: string; + readonly stats: boolean; + readonly throwErrorOnBrokenSymbolicLink: boolean; + readonly fsStatSettings: fsStat.Settings; + constructor(_options?: Options); + private _getValue; +} diff --git a/node_modules/@nodelib/fs.scandir/out/settings.js b/node_modules/@nodelib/fs.scandir/out/settings.js new file mode 100644 index 0000000..15a3e8c --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/settings.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const fsStat = require("@nodelib/fs.stat"); +const fs = require("./adapters/fs"); +class Settings { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); + this.stats = this._getValue(this._options.stats, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + this.fsStatSettings = new fsStat.Settings({ + followSymbolicLink: this.followSymbolicLinks, + fs: this.fs, + throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } +} +exports.default = Settings; diff --git a/node_modules/@nodelib/fs.scandir/out/types/index.d.ts b/node_modules/@nodelib/fs.scandir/out/types/index.d.ts new file mode 100644 index 0000000..f326c5e --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/types/index.d.ts @@ -0,0 +1,20 @@ +/// +import type * as fs from 'fs'; +export interface Entry { + dirent: Dirent; + name: string; + path: string; + stats?: Stats; +} +export declare type Stats = fs.Stats; +export declare type ErrnoException = NodeJS.ErrnoException; +export interface Dirent { + isBlockDevice: () => boolean; + isCharacterDevice: () => boolean; + isDirectory: () => boolean; + isFIFO: () => boolean; + isFile: () => boolean; + isSocket: () => boolean; + isSymbolicLink: () => boolean; + name: string; +} diff --git a/node_modules/@nodelib/fs.scandir/out/types/index.js b/node_modules/@nodelib/fs.scandir/out/types/index.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/types/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts b/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts new file mode 100644 index 0000000..bb863f1 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts @@ -0,0 +1,2 @@ +import type { Dirent, Stats } from '../types'; +export declare function createDirentFromStats(name: string, stats: Stats): Dirent; diff --git a/node_modules/@nodelib/fs.scandir/out/utils/fs.js b/node_modules/@nodelib/fs.scandir/out/utils/fs.js new file mode 100644 index 0000000..ace7c74 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/utils/fs.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDirentFromStats = void 0; +class DirentFromStats { + constructor(name, stats) { + this.name = name; + this.isBlockDevice = stats.isBlockDevice.bind(stats); + this.isCharacterDevice = stats.isCharacterDevice.bind(stats); + this.isDirectory = stats.isDirectory.bind(stats); + this.isFIFO = stats.isFIFO.bind(stats); + this.isFile = stats.isFile.bind(stats); + this.isSocket = stats.isSocket.bind(stats); + this.isSymbolicLink = stats.isSymbolicLink.bind(stats); + } +} +function createDirentFromStats(name, stats) { + return new DirentFromStats(name, stats); +} +exports.createDirentFromStats = createDirentFromStats; diff --git a/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts b/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts new file mode 100644 index 0000000..1b41954 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts @@ -0,0 +1,2 @@ +import * as fs from './fs'; +export { fs }; diff --git a/node_modules/@nodelib/fs.scandir/out/utils/index.js b/node_modules/@nodelib/fs.scandir/out/utils/index.js new file mode 100644 index 0000000..f5de129 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/utils/index.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fs = void 0; +const fs = require("./fs"); +exports.fs = fs; diff --git a/node_modules/@nodelib/fs.scandir/package.json b/node_modules/@nodelib/fs.scandir/package.json new file mode 100644 index 0000000..d3a8924 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/package.json @@ -0,0 +1,44 @@ +{ + "name": "@nodelib/fs.scandir", + "version": "2.1.5", + "description": "List files and directories inside the specified directory", + "license": "MIT", + "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir", + "keywords": [ + "NodeLib", + "fs", + "FileSystem", + "file system", + "scandir", + "readdir", + "dirent" + ], + "engines": { + "node": ">= 8" + }, + "files": [ + "out/**", + "!out/**/*.map", + "!out/**/*.spec.*" + ], + "main": "out/index.js", + "typings": "out/index.d.ts", + "scripts": { + "clean": "rimraf {tsconfig.tsbuildinfo,out}", + "lint": "eslint \"src/**/*.ts\" --cache", + "compile": "tsc -b .", + "compile:watch": "tsc -p . --watch --sourceMap", + "test": "mocha \"out/**/*.spec.js\" -s 0", + "build": "npm run clean && npm run compile && npm run lint && npm test", + "watch": "npm run clean && npm run compile:watch" + }, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "devDependencies": { + "@nodelib/fs.macchiato": "1.0.4", + "@types/run-parallel": "^1.1.0" + }, + "gitHead": "d6a7960d5281d3dd5f8e2efba49bb552d090f562" +} diff --git a/node_modules/@nodelib/fs.stat/LICENSE b/node_modules/@nodelib/fs.stat/LICENSE new file mode 100644 index 0000000..65a9994 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Denis Malinochkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@nodelib/fs.stat/README.md b/node_modules/@nodelib/fs.stat/README.md new file mode 100644 index 0000000..686f047 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/README.md @@ -0,0 +1,126 @@ +# @nodelib/fs.stat + +> Get the status of a file with some features. + +## :bulb: Highlights + +Wrapper around standard method `fs.lstat` and `fs.stat` with some features. + +* :beginner: Normally follows symbolic link. +* :gear: Can safely work with broken symbolic link. + +## Install + +```console +npm install @nodelib/fs.stat +``` + +## Usage + +```ts +import * as fsStat from '@nodelib/fs.stat'; + +fsStat.stat('path', (error, stats) => { /* … */ }); +``` + +## API + +### .stat(path, [optionsOrSettings], callback) + +Returns an instance of `fs.Stats` class for provided path with standard callback-style. + +```ts +fsStat.stat('path', (error, stats) => { /* … */ }); +fsStat.stat('path', {}, (error, stats) => { /* … */ }); +fsStat.stat('path', new fsStat.Settings(), (error, stats) => { /* … */ }); +``` + +### .statSync(path, [optionsOrSettings]) + +Returns an instance of `fs.Stats` class for provided path. + +```ts +const stats = fsStat.stat('path'); +const stats = fsStat.stat('path', {}); +const stats = fsStat.stat('path', new fsStat.Settings()); +``` + +#### path + +* Required: `true` +* Type: `string | Buffer | URL` + +A path to a file. If a URL is provided, it must use the `file:` protocol. + +#### optionsOrSettings + +* Required: `false` +* Type: `Options | Settings` +* Default: An instance of `Settings` class + +An [`Options`](#options) object or an instance of [`Settings`](#settings) class. + +> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class. + +### Settings([options]) + +A class of full settings of the package. + +```ts +const settings = new fsStat.Settings({ followSymbolicLink: false }); + +const stats = fsStat.stat('path', settings); +``` + +## Options + +### `followSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Follow symbolic link or not. Call `fs.stat` on symbolic link if `true`. + +### `markSymbolicLink` + +* Type: `boolean` +* Default: `false` + +Mark symbolic link by setting the return value of `isSymbolicLink` function to always `true` (even after `fs.stat`). + +> :book: Can be used if you want to know what is hidden behind a symbolic link, but still continue to know that it is a symbolic link. + +### `throwErrorOnBrokenSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`. + +### `fs` + +* Type: [`FileSystemAdapter`](./src/adapters/fs.ts) +* Default: A default FS methods + +By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own. + +```ts +interface FileSystemAdapter { + lstat?: typeof fs.lstat; + stat?: typeof fs.stat; + lstatSync?: typeof fs.lstatSync; + statSync?: typeof fs.statSync; +} + +const settings = new fsStat.Settings({ + fs: { lstat: fakeLstat } +}); +``` + +## Changelog + +See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version. + +## License + +This software is released under the terms of the MIT license. diff --git a/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts b/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts new file mode 100644 index 0000000..3af759c --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts @@ -0,0 +1,13 @@ +/// +import * as fs from 'fs'; +import type { ErrnoException } from '../types'; +export declare type StatAsynchronousMethod = (path: string, callback: (error: ErrnoException | null, stats: fs.Stats) => void) => void; +export declare type StatSynchronousMethod = (path: string) => fs.Stats; +export interface FileSystemAdapter { + lstat: StatAsynchronousMethod; + stat: StatAsynchronousMethod; + lstatSync: StatSynchronousMethod; + statSync: StatSynchronousMethod; +} +export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter; +export declare function createFileSystemAdapter(fsMethods?: Partial): FileSystemAdapter; diff --git a/node_modules/@nodelib/fs.stat/out/adapters/fs.js b/node_modules/@nodelib/fs.stat/out/adapters/fs.js new file mode 100644 index 0000000..8dc08c8 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/adapters/fs.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; +const fs = require("fs"); +exports.FILE_SYSTEM_ADAPTER = { + lstat: fs.lstat, + stat: fs.stat, + lstatSync: fs.lstatSync, + statSync: fs.statSync +}; +function createFileSystemAdapter(fsMethods) { + if (fsMethods === undefined) { + return exports.FILE_SYSTEM_ADAPTER; + } + return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); +} +exports.createFileSystemAdapter = createFileSystemAdapter; diff --git a/node_modules/@nodelib/fs.stat/out/index.d.ts b/node_modules/@nodelib/fs.stat/out/index.d.ts new file mode 100644 index 0000000..f95db99 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/index.d.ts @@ -0,0 +1,12 @@ +import type { FileSystemAdapter, StatAsynchronousMethod, StatSynchronousMethod } from './adapters/fs'; +import * as async from './providers/async'; +import Settings, { Options } from './settings'; +import type { Stats } from './types'; +declare type AsyncCallback = async.AsyncCallback; +declare function stat(path: string, callback: AsyncCallback): void; +declare function stat(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void; +declare namespace stat { + function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise; +} +declare function statSync(path: string, optionsOrSettings?: Options | Settings): Stats; +export { Settings, stat, statSync, AsyncCallback, FileSystemAdapter, StatAsynchronousMethod, StatSynchronousMethod, Options, Stats }; diff --git a/node_modules/@nodelib/fs.stat/out/index.js b/node_modules/@nodelib/fs.stat/out/index.js new file mode 100644 index 0000000..b23f751 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/index.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.statSync = exports.stat = exports.Settings = void 0; +const async = require("./providers/async"); +const sync = require("./providers/sync"); +const settings_1 = require("./settings"); +exports.Settings = settings_1.default; +function stat(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === 'function') { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); +} +exports.stat = stat; +function statSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); +} +exports.statSync = statSync; +function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); +} diff --git a/node_modules/@nodelib/fs.stat/out/providers/async.d.ts b/node_modules/@nodelib/fs.stat/out/providers/async.d.ts new file mode 100644 index 0000000..85423ce --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/async.d.ts @@ -0,0 +1,4 @@ +import type Settings from '../settings'; +import type { ErrnoException, Stats } from '../types'; +export declare type AsyncCallback = (error: ErrnoException, stats: Stats) => void; +export declare function read(path: string, settings: Settings, callback: AsyncCallback): void; diff --git a/node_modules/@nodelib/fs.stat/out/providers/async.js b/node_modules/@nodelib/fs.stat/out/providers/async.js new file mode 100644 index 0000000..983ff0e --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/async.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.read = void 0; +function read(path, settings, callback) { + settings.fs.lstat(path, (lstatError, lstat) => { + if (lstatError !== null) { + callFailureCallback(callback, lstatError); + return; + } + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { + callSuccessCallback(callback, lstat); + return; + } + settings.fs.stat(path, (statError, stat) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + callFailureCallback(callback, statError); + return; + } + callSuccessCallback(callback, lstat); + return; + } + if (settings.markSymbolicLink) { + stat.isSymbolicLink = () => true; + } + callSuccessCallback(callback, stat); + }); + }); +} +exports.read = read; +function callFailureCallback(callback, error) { + callback(error); +} +function callSuccessCallback(callback, result) { + callback(null, result); +} diff --git a/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts b/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts new file mode 100644 index 0000000..428c3d7 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts @@ -0,0 +1,3 @@ +import type Settings from '../settings'; +import type { Stats } from '../types'; +export declare function read(path: string, settings: Settings): Stats; diff --git a/node_modules/@nodelib/fs.stat/out/providers/sync.js b/node_modules/@nodelib/fs.stat/out/providers/sync.js new file mode 100644 index 0000000..1521c36 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/sync.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.read = void 0; +function read(path, settings) { + const lstat = settings.fs.lstatSync(path); + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { + return lstat; + } + try { + const stat = settings.fs.statSync(path); + if (settings.markSymbolicLink) { + stat.isSymbolicLink = () => true; + } + return stat; + } + catch (error) { + if (!settings.throwErrorOnBrokenSymbolicLink) { + return lstat; + } + throw error; + } +} +exports.read = read; diff --git a/node_modules/@nodelib/fs.stat/out/settings.d.ts b/node_modules/@nodelib/fs.stat/out/settings.d.ts new file mode 100644 index 0000000..f4b3d44 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/settings.d.ts @@ -0,0 +1,16 @@ +import * as fs from './adapters/fs'; +export interface Options { + followSymbolicLink?: boolean; + fs?: Partial; + markSymbolicLink?: boolean; + throwErrorOnBrokenSymbolicLink?: boolean; +} +export default class Settings { + private readonly _options; + readonly followSymbolicLink: boolean; + readonly fs: fs.FileSystemAdapter; + readonly markSymbolicLink: boolean; + readonly throwErrorOnBrokenSymbolicLink: boolean; + constructor(_options?: Options); + private _getValue; +} diff --git a/node_modules/@nodelib/fs.stat/out/settings.js b/node_modules/@nodelib/fs.stat/out/settings.js new file mode 100644 index 0000000..111ec09 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/settings.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = require("./adapters/fs"); +class Settings { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } +} +exports.default = Settings; diff --git a/node_modules/@nodelib/fs.stat/out/types/index.d.ts b/node_modules/@nodelib/fs.stat/out/types/index.d.ts new file mode 100644 index 0000000..74c08ed --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/types/index.d.ts @@ -0,0 +1,4 @@ +/// +import type * as fs from 'fs'; +export declare type Stats = fs.Stats; +export declare type ErrnoException = NodeJS.ErrnoException; diff --git a/node_modules/@nodelib/fs.stat/out/types/index.js b/node_modules/@nodelib/fs.stat/out/types/index.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/types/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nodelib/fs.stat/package.json b/node_modules/@nodelib/fs.stat/package.json new file mode 100644 index 0000000..f2540c2 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/package.json @@ -0,0 +1,37 @@ +{ + "name": "@nodelib/fs.stat", + "version": "2.0.5", + "description": "Get the status of a file with some features", + "license": "MIT", + "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat", + "keywords": [ + "NodeLib", + "fs", + "FileSystem", + "file system", + "stat" + ], + "engines": { + "node": ">= 8" + }, + "files": [ + "out/**", + "!out/**/*.map", + "!out/**/*.spec.*" + ], + "main": "out/index.js", + "typings": "out/index.d.ts", + "scripts": { + "clean": "rimraf {tsconfig.tsbuildinfo,out}", + "lint": "eslint \"src/**/*.ts\" --cache", + "compile": "tsc -b .", + "compile:watch": "tsc -p . --watch --sourceMap", + "test": "mocha \"out/**/*.spec.js\" -s 0", + "build": "npm run clean && npm run compile && npm run lint && npm test", + "watch": "npm run clean && npm run compile:watch" + }, + "devDependencies": { + "@nodelib/fs.macchiato": "1.0.4" + }, + "gitHead": "d6a7960d5281d3dd5f8e2efba49bb552d090f562" +} diff --git a/node_modules/@nodelib/fs.walk/LICENSE b/node_modules/@nodelib/fs.walk/LICENSE new file mode 100644 index 0000000..65a9994 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Denis Malinochkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@nodelib/fs.walk/README.md b/node_modules/@nodelib/fs.walk/README.md new file mode 100644 index 0000000..6ccc08d --- /dev/null +++ b/node_modules/@nodelib/fs.walk/README.md @@ -0,0 +1,215 @@ +# @nodelib/fs.walk + +> A library for efficiently walking a directory recursively. + +## :bulb: Highlights + +* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional). +* :rocket: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type for performance reasons. See [`old` and `modern` mode](https://github.com/nodelib/nodelib/blob/master/packages/fs/fs.scandir/README.md#old-and-modern-mode). +* :gear: Built-in directories/files and error filtering system. +* :link: Can safely work with broken symbolic links. + +## Install + +```console +npm install @nodelib/fs.walk +``` + +## Usage + +```ts +import * as fsWalk from '@nodelib/fs.walk'; + +fsWalk.walk('path', (error, entries) => { /* … */ }); +``` + +## API + +### .walk(path, [optionsOrSettings], callback) + +Reads the directory recursively and asynchronously. Requires a callback function. + +> :book: If you want to use the Promise API, use `util.promisify`. + +```ts +fsWalk.walk('path', (error, entries) => { /* … */ }); +fsWalk.walk('path', {}, (error, entries) => { /* … */ }); +fsWalk.walk('path', new fsWalk.Settings(), (error, entries) => { /* … */ }); +``` + +### .walkStream(path, [optionsOrSettings]) + +Reads the directory recursively and asynchronously. [Readable Stream](https://nodejs.org/dist/latest-v12.x/docs/api/stream.html#stream_readable_streams) is used as a provider. + +```ts +const stream = fsWalk.walkStream('path'); +const stream = fsWalk.walkStream('path', {}); +const stream = fsWalk.walkStream('path', new fsWalk.Settings()); +``` + +### .walkSync(path, [optionsOrSettings]) + +Reads the directory recursively and synchronously. Returns an array of entries. + +```ts +const entries = fsWalk.walkSync('path'); +const entries = fsWalk.walkSync('path', {}); +const entries = fsWalk.walkSync('path', new fsWalk.Settings()); +``` + +#### path + +* Required: `true` +* Type: `string | Buffer | URL` + +A path to a file. If a URL is provided, it must use the `file:` protocol. + +#### optionsOrSettings + +* Required: `false` +* Type: `Options | Settings` +* Default: An instance of `Settings` class + +An [`Options`](#options) object or an instance of [`Settings`](#settings) class. + +> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class. + +### Settings([options]) + +A class of full settings of the package. + +```ts +const settings = new fsWalk.Settings({ followSymbolicLinks: true }); + +const entries = fsWalk.walkSync('path', settings); +``` + +## Entry + +* `name` — The name of the entry (`unknown.txt`). +* `path` — The path of the entry relative to call directory (`root/unknown.txt`). +* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. +* [`stats`] — An instance of `fs.Stats` class. + +## Options + +### basePath + +* Type: `string` +* Default: `undefined` + +By default, all paths are built relative to the root path. You can use this option to set custom root path. + +In the example below we read the files from the `root` directory, but in the results the root path will be `custom`. + +```ts +fsWalk.walkSync('root'); // → ['root/file.txt'] +fsWalk.walkSync('root', { basePath: 'custom' }); // → ['custom/file.txt'] +``` + +### concurrency + +* Type: `number` +* Default: `Infinity` + +The maximum number of concurrent calls to `fs.readdir`. + +> :book: The higher the number, the higher performance and the load on the File System. If you want to read in quiet mode, set the value to `4 * os.cpus().length` (4 is default size of [thread pool work scheduling](http://docs.libuv.org/en/v1.x/threadpool.html#thread-pool-work-scheduling)). + +### deepFilter + +* Type: [`DeepFilterFunction`](./src/settings.ts) +* Default: `undefined` + +A function that indicates whether the directory will be read deep or not. + +```ts +// Skip all directories that starts with `node_modules` +const filter: DeepFilterFunction = (entry) => !entry.path.startsWith('node_modules'); +``` + +### entryFilter + +* Type: [`EntryFilterFunction`](./src/settings.ts) +* Default: `undefined` + +A function that indicates whether the entry will be included to results or not. + +```ts +// Exclude all `.js` files from results +const filter: EntryFilterFunction = (entry) => !entry.name.endsWith('.js'); +``` + +### errorFilter + +* Type: [`ErrorFilterFunction`](./src/settings.ts) +* Default: `undefined` + +A function that allows you to skip errors that occur when reading directories. + +For example, you can skip `ENOENT` errors if required: + +```ts +// Skip all ENOENT errors +const filter: ErrorFilterFunction = (error) => error.code == 'ENOENT'; +``` + +### stats + +* Type: `boolean` +* Default: `false` + +Adds an instance of `fs.Stats` class to the [`Entry`](#entry). + +> :book: Always use `fs.readdir` with additional `fs.lstat/fs.stat` calls to determine the entry type. + +### followSymbolicLinks + +* Type: `boolean` +* Default: `false` + +Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`. + +### `throwErrorOnBrokenSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`. + +### `pathSegmentSeparator` + +* Type: `string` +* Default: `path.sep` + +By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead. + +### `fs` + +* Type: `FileSystemAdapter` +* Default: A default FS methods + +By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own. + +```ts +interface FileSystemAdapter { + lstat: typeof fs.lstat; + stat: typeof fs.stat; + lstatSync: typeof fs.lstatSync; + statSync: typeof fs.statSync; + readdir: typeof fs.readdir; + readdirSync: typeof fs.readdirSync; +} + +const settings = new fsWalk.Settings({ + fs: { lstat: fakeLstat } +}); +``` + +## Changelog + +See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version. + +## License + +This software is released under the terms of the MIT license. diff --git a/node_modules/@nodelib/fs.walk/out/index.d.ts b/node_modules/@nodelib/fs.walk/out/index.d.ts new file mode 100644 index 0000000..8864c7b --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/index.d.ts @@ -0,0 +1,14 @@ +/// +import type { Readable } from 'stream'; +import type { Dirent, FileSystemAdapter } from '@nodelib/fs.scandir'; +import { AsyncCallback } from './providers/async'; +import Settings, { DeepFilterFunction, EntryFilterFunction, ErrorFilterFunction, Options } from './settings'; +import type { Entry } from './types'; +declare function walk(directory: string, callback: AsyncCallback): void; +declare function walk(directory: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void; +declare namespace walk { + function __promisify__(directory: string, optionsOrSettings?: Options | Settings): Promise; +} +declare function walkSync(directory: string, optionsOrSettings?: Options | Settings): Entry[]; +declare function walkStream(directory: string, optionsOrSettings?: Options | Settings): Readable; +export { walk, walkSync, walkStream, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, Options, DeepFilterFunction, EntryFilterFunction, ErrorFilterFunction }; diff --git a/node_modules/@nodelib/fs.walk/out/index.js b/node_modules/@nodelib/fs.walk/out/index.js new file mode 100644 index 0000000..1520787 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/index.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0; +const async_1 = require("./providers/async"); +const stream_1 = require("./providers/stream"); +const sync_1 = require("./providers/sync"); +const settings_1 = require("./settings"); +exports.Settings = settings_1.default; +function walk(directory, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === 'function') { + new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); + return; + } + new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); +} +exports.walk = walk; +function walkSync(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + const provider = new sync_1.default(directory, settings); + return provider.read(); +} +exports.walkSync = walkSync; +function walkStream(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + const provider = new stream_1.default(directory, settings); + return provider.read(); +} +exports.walkStream = walkStream; +function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); +} diff --git a/node_modules/@nodelib/fs.walk/out/providers/async.d.ts b/node_modules/@nodelib/fs.walk/out/providers/async.d.ts new file mode 100644 index 0000000..0f6717d --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/async.d.ts @@ -0,0 +1,12 @@ +import AsyncReader from '../readers/async'; +import type Settings from '../settings'; +import type { Entry, Errno } from '../types'; +export declare type AsyncCallback = (error: Errno, entries: Entry[]) => void; +export default class AsyncProvider { + private readonly _root; + private readonly _settings; + protected readonly _reader: AsyncReader; + private readonly _storage; + constructor(_root: string, _settings: Settings); + read(callback: AsyncCallback): void; +} diff --git a/node_modules/@nodelib/fs.walk/out/providers/async.js b/node_modules/@nodelib/fs.walk/out/providers/async.js new file mode 100644 index 0000000..51d3be5 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/async.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const async_1 = require("../readers/async"); +class AsyncProvider { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._storage = []; + } + read(callback) { + this._reader.onError((error) => { + callFailureCallback(callback, error); + }); + this._reader.onEntry((entry) => { + this._storage.push(entry); + }); + this._reader.onEnd(() => { + callSuccessCallback(callback, this._storage); + }); + this._reader.read(); + } +} +exports.default = AsyncProvider; +function callFailureCallback(callback, error) { + callback(error); +} +function callSuccessCallback(callback, entries) { + callback(null, entries); +} diff --git a/node_modules/@nodelib/fs.walk/out/providers/index.d.ts b/node_modules/@nodelib/fs.walk/out/providers/index.d.ts new file mode 100644 index 0000000..874f60c --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/index.d.ts @@ -0,0 +1,4 @@ +import AsyncProvider from './async'; +import StreamProvider from './stream'; +import SyncProvider from './sync'; +export { AsyncProvider, StreamProvider, SyncProvider }; diff --git a/node_modules/@nodelib/fs.walk/out/providers/index.js b/node_modules/@nodelib/fs.walk/out/providers/index.js new file mode 100644 index 0000000..4c2529c --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/index.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SyncProvider = exports.StreamProvider = exports.AsyncProvider = void 0; +const async_1 = require("./async"); +exports.AsyncProvider = async_1.default; +const stream_1 = require("./stream"); +exports.StreamProvider = stream_1.default; +const sync_1 = require("./sync"); +exports.SyncProvider = sync_1.default; diff --git a/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts b/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts new file mode 100644 index 0000000..294185f --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts @@ -0,0 +1,12 @@ +/// +import { Readable } from 'stream'; +import AsyncReader from '../readers/async'; +import type Settings from '../settings'; +export default class StreamProvider { + private readonly _root; + private readonly _settings; + protected readonly _reader: AsyncReader; + protected readonly _stream: Readable; + constructor(_root: string, _settings: Settings); + read(): Readable; +} diff --git a/node_modules/@nodelib/fs.walk/out/providers/stream.js b/node_modules/@nodelib/fs.walk/out/providers/stream.js new file mode 100644 index 0000000..51298b0 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/stream.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const stream_1 = require("stream"); +const async_1 = require("../readers/async"); +class StreamProvider { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._stream = new stream_1.Readable({ + objectMode: true, + read: () => { }, + destroy: () => { + if (!this._reader.isDestroyed) { + this._reader.destroy(); + } + } + }); + } + read() { + this._reader.onError((error) => { + this._stream.emit('error', error); + }); + this._reader.onEntry((entry) => { + this._stream.push(entry); + }); + this._reader.onEnd(() => { + this._stream.push(null); + }); + this._reader.read(); + return this._stream; + } +} +exports.default = StreamProvider; diff --git a/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts b/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts new file mode 100644 index 0000000..551c42e --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts @@ -0,0 +1,10 @@ +import SyncReader from '../readers/sync'; +import type Settings from '../settings'; +import type { Entry } from '../types'; +export default class SyncProvider { + private readonly _root; + private readonly _settings; + protected readonly _reader: SyncReader; + constructor(_root: string, _settings: Settings); + read(): Entry[]; +} diff --git a/node_modules/@nodelib/fs.walk/out/providers/sync.js b/node_modules/@nodelib/fs.walk/out/providers/sync.js new file mode 100644 index 0000000..faab6ca --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/sync.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const sync_1 = require("../readers/sync"); +class SyncProvider { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new sync_1.default(this._root, this._settings); + } + read() { + return this._reader.read(); + } +} +exports.default = SyncProvider; diff --git a/node_modules/@nodelib/fs.walk/out/readers/async.d.ts b/node_modules/@nodelib/fs.walk/out/readers/async.d.ts new file mode 100644 index 0000000..9acf4e6 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/async.d.ts @@ -0,0 +1,30 @@ +/// +import { EventEmitter } from 'events'; +import * as fsScandir from '@nodelib/fs.scandir'; +import type Settings from '../settings'; +import type { Entry, Errno } from '../types'; +import Reader from './reader'; +declare type EntryEventCallback = (entry: Entry) => void; +declare type ErrorEventCallback = (error: Errno) => void; +declare type EndEventCallback = () => void; +export default class AsyncReader extends Reader { + protected readonly _settings: Settings; + protected readonly _scandir: typeof fsScandir.scandir; + protected readonly _emitter: EventEmitter; + private readonly _queue; + private _isFatalError; + private _isDestroyed; + constructor(_root: string, _settings: Settings); + read(): EventEmitter; + get isDestroyed(): boolean; + destroy(): void; + onEntry(callback: EntryEventCallback): void; + onError(callback: ErrorEventCallback): void; + onEnd(callback: EndEventCallback): void; + private _pushToQueue; + private _worker; + private _handleError; + private _handleEntry; + private _emitEntry; +} +export {}; diff --git a/node_modules/@nodelib/fs.walk/out/readers/async.js b/node_modules/@nodelib/fs.walk/out/readers/async.js new file mode 100644 index 0000000..ebe8dd5 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/async.js @@ -0,0 +1,97 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const events_1 = require("events"); +const fsScandir = require("@nodelib/fs.scandir"); +const fastq = require("fastq"); +const common = require("./common"); +const reader_1 = require("./reader"); +class AsyncReader extends reader_1.default { + constructor(_root, _settings) { + super(_root, _settings); + this._settings = _settings; + this._scandir = fsScandir.scandir; + this._emitter = new events_1.EventEmitter(); + this._queue = fastq(this._worker.bind(this), this._settings.concurrency); + this._isFatalError = false; + this._isDestroyed = false; + this._queue.drain = () => { + if (!this._isFatalError) { + this._emitter.emit('end'); + } + }; + } + read() { + this._isFatalError = false; + this._isDestroyed = false; + setImmediate(() => { + this._pushToQueue(this._root, this._settings.basePath); + }); + return this._emitter; + } + get isDestroyed() { + return this._isDestroyed; + } + destroy() { + if (this._isDestroyed) { + throw new Error('The reader is already destroyed'); + } + this._isDestroyed = true; + this._queue.killAndDrain(); + } + onEntry(callback) { + this._emitter.on('entry', callback); + } + onError(callback) { + this._emitter.once('error', callback); + } + onEnd(callback) { + this._emitter.once('end', callback); + } + _pushToQueue(directory, base) { + const queueItem = { directory, base }; + this._queue.push(queueItem, (error) => { + if (error !== null) { + this._handleError(error); + } + }); + } + _worker(item, done) { + this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { + if (error !== null) { + done(error, undefined); + return; + } + for (const entry of entries) { + this._handleEntry(entry, item.base); + } + done(null, undefined); + }); + } + _handleError(error) { + if (this._isDestroyed || !common.isFatalError(this._settings, error)) { + return; + } + this._isFatalError = true; + this._isDestroyed = true; + this._emitter.emit('error', error); + } + _handleEntry(entry, base) { + if (this._isDestroyed || this._isFatalError) { + return; + } + const fullpath = entry.path; + if (base !== undefined) { + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + } + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { + this._emitEntry(entry); + } + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { + this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); + } + } + _emitEntry(entry) { + this._emitter.emit('entry', entry); + } +} +exports.default = AsyncReader; diff --git a/node_modules/@nodelib/fs.walk/out/readers/common.d.ts b/node_modules/@nodelib/fs.walk/out/readers/common.d.ts new file mode 100644 index 0000000..5985f97 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/common.d.ts @@ -0,0 +1,7 @@ +import type { FilterFunction } from '../settings'; +import type Settings from '../settings'; +import type { Errno } from '../types'; +export declare function isFatalError(settings: Settings, error: Errno): boolean; +export declare function isAppliedFilter(filter: FilterFunction | null, value: T): boolean; +export declare function replacePathSegmentSeparator(filepath: string, separator: string): string; +export declare function joinPathSegments(a: string, b: string, separator: string): string; diff --git a/node_modules/@nodelib/fs.walk/out/readers/common.js b/node_modules/@nodelib/fs.walk/out/readers/common.js new file mode 100644 index 0000000..a93572f --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/common.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0; +function isFatalError(settings, error) { + if (settings.errorFilter === null) { + return true; + } + return !settings.errorFilter(error); +} +exports.isFatalError = isFatalError; +function isAppliedFilter(filter, value) { + return filter === null || filter(value); +} +exports.isAppliedFilter = isAppliedFilter; +function replacePathSegmentSeparator(filepath, separator) { + return filepath.split(/[/\\]/).join(separator); +} +exports.replacePathSegmentSeparator = replacePathSegmentSeparator; +function joinPathSegments(a, b, separator) { + if (a === '') { + return b; + } + /** + * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). + */ + if (a.endsWith(separator)) { + return a + b; + } + return a + separator + b; +} +exports.joinPathSegments = joinPathSegments; diff --git a/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts b/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts new file mode 100644 index 0000000..e1f383b --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts @@ -0,0 +1,6 @@ +import type Settings from '../settings'; +export default class Reader { + protected readonly _root: string; + protected readonly _settings: Settings; + constructor(_root: string, _settings: Settings); +} diff --git a/node_modules/@nodelib/fs.walk/out/readers/reader.js b/node_modules/@nodelib/fs.walk/out/readers/reader.js new file mode 100644 index 0000000..782f07c --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/reader.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const common = require("./common"); +class Reader { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); + } +} +exports.default = Reader; diff --git a/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts b/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts new file mode 100644 index 0000000..af41033 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts @@ -0,0 +1,15 @@ +import * as fsScandir from '@nodelib/fs.scandir'; +import type { Entry } from '../types'; +import Reader from './reader'; +export default class SyncReader extends Reader { + protected readonly _scandir: typeof fsScandir.scandirSync; + private readonly _storage; + private readonly _queue; + read(): Entry[]; + private _pushToQueue; + private _handleQueue; + private _handleDirectory; + private _handleError; + private _handleEntry; + private _pushToStorage; +} diff --git a/node_modules/@nodelib/fs.walk/out/readers/sync.js b/node_modules/@nodelib/fs.walk/out/readers/sync.js new file mode 100644 index 0000000..9a8d5a6 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/sync.js @@ -0,0 +1,59 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fsScandir = require("@nodelib/fs.scandir"); +const common = require("./common"); +const reader_1 = require("./reader"); +class SyncReader extends reader_1.default { + constructor() { + super(...arguments); + this._scandir = fsScandir.scandirSync; + this._storage = []; + this._queue = new Set(); + } + read() { + this._pushToQueue(this._root, this._settings.basePath); + this._handleQueue(); + return this._storage; + } + _pushToQueue(directory, base) { + this._queue.add({ directory, base }); + } + _handleQueue() { + for (const item of this._queue.values()) { + this._handleDirectory(item.directory, item.base); + } + } + _handleDirectory(directory, base) { + try { + const entries = this._scandir(directory, this._settings.fsScandirSettings); + for (const entry of entries) { + this._handleEntry(entry, base); + } + } + catch (error) { + this._handleError(error); + } + } + _handleError(error) { + if (!common.isFatalError(this._settings, error)) { + return; + } + throw error; + } + _handleEntry(entry, base) { + const fullpath = entry.path; + if (base !== undefined) { + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + } + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { + this._pushToStorage(entry); + } + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { + this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); + } + } + _pushToStorage(entry) { + this._storage.push(entry); + } +} +exports.default = SyncReader; diff --git a/node_modules/@nodelib/fs.walk/out/settings.d.ts b/node_modules/@nodelib/fs.walk/out/settings.d.ts new file mode 100644 index 0000000..d1c4b45 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/settings.d.ts @@ -0,0 +1,30 @@ +import * as fsScandir from '@nodelib/fs.scandir'; +import type { Entry, Errno } from './types'; +export declare type FilterFunction = (value: T) => boolean; +export declare type DeepFilterFunction = FilterFunction; +export declare type EntryFilterFunction = FilterFunction; +export declare type ErrorFilterFunction = FilterFunction; +export interface Options { + basePath?: string; + concurrency?: number; + deepFilter?: DeepFilterFunction; + entryFilter?: EntryFilterFunction; + errorFilter?: ErrorFilterFunction; + followSymbolicLinks?: boolean; + fs?: Partial; + pathSegmentSeparator?: string; + stats?: boolean; + throwErrorOnBrokenSymbolicLink?: boolean; +} +export default class Settings { + private readonly _options; + readonly basePath?: string; + readonly concurrency: number; + readonly deepFilter: DeepFilterFunction | null; + readonly entryFilter: EntryFilterFunction | null; + readonly errorFilter: ErrorFilterFunction | null; + readonly pathSegmentSeparator: string; + readonly fsScandirSettings: fsScandir.Settings; + constructor(_options?: Options); + private _getValue; +} diff --git a/node_modules/@nodelib/fs.walk/out/settings.js b/node_modules/@nodelib/fs.walk/out/settings.js new file mode 100644 index 0000000..d7a85c8 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/settings.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const fsScandir = require("@nodelib/fs.scandir"); +class Settings { + constructor(_options = {}) { + this._options = _options; + this.basePath = this._getValue(this._options.basePath, undefined); + this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); + this.deepFilter = this._getValue(this._options.deepFilter, null); + this.entryFilter = this._getValue(this._options.entryFilter, null); + this.errorFilter = this._getValue(this._options.errorFilter, null); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); + this.fsScandirSettings = new fsScandir.Settings({ + followSymbolicLinks: this._options.followSymbolicLinks, + fs: this._options.fs, + pathSegmentSeparator: this._options.pathSegmentSeparator, + stats: this._options.stats, + throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } +} +exports.default = Settings; diff --git a/node_modules/@nodelib/fs.walk/out/types/index.d.ts b/node_modules/@nodelib/fs.walk/out/types/index.d.ts new file mode 100644 index 0000000..6ee9bd3 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/types/index.d.ts @@ -0,0 +1,8 @@ +/// +import type * as scandir from '@nodelib/fs.scandir'; +export declare type Entry = scandir.Entry; +export declare type Errno = NodeJS.ErrnoException; +export interface QueueItem { + directory: string; + base?: string; +} diff --git a/node_modules/@nodelib/fs.walk/out/types/index.js b/node_modules/@nodelib/fs.walk/out/types/index.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/types/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nodelib/fs.walk/package.json b/node_modules/@nodelib/fs.walk/package.json new file mode 100644 index 0000000..86bfce4 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/package.json @@ -0,0 +1,44 @@ +{ + "name": "@nodelib/fs.walk", + "version": "1.2.8", + "description": "A library for efficiently walking a directory recursively", + "license": "MIT", + "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk", + "keywords": [ + "NodeLib", + "fs", + "FileSystem", + "file system", + "walk", + "scanner", + "crawler" + ], + "engines": { + "node": ">= 8" + }, + "files": [ + "out/**", + "!out/**/*.map", + "!out/**/*.spec.*", + "!out/**/tests/**" + ], + "main": "out/index.js", + "typings": "out/index.d.ts", + "scripts": { + "clean": "rimraf {tsconfig.tsbuildinfo,out}", + "lint": "eslint \"src/**/*.ts\" --cache", + "compile": "tsc -b .", + "compile:watch": "tsc -p . --watch --sourceMap", + "test": "mocha \"out/**/*.spec.js\" -s 0", + "build": "npm run clean && npm run compile && npm run lint && npm test", + "watch": "npm run clean && npm run compile:watch" + }, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "devDependencies": { + "@nodelib/fs.macchiato": "1.0.4" + }, + "gitHead": "1e5bad48565da2b06b8600e744324ea240bf49d8" +} diff --git a/node_modules/any-promise/.jshintrc b/node_modules/any-promise/.jshintrc new file mode 100644 index 0000000..979105e --- /dev/null +++ b/node_modules/any-promise/.jshintrc @@ -0,0 +1,4 @@ +{ + "node":true, + "strict":true +} diff --git a/node_modules/any-promise/.npmignore b/node_modules/any-promise/.npmignore new file mode 100644 index 0000000..1354abc --- /dev/null +++ b/node_modules/any-promise/.npmignore @@ -0,0 +1,7 @@ +.git* +test/ +test-browser/ +build/ +.travis.yml +*.swp +Makefile diff --git a/node_modules/any-promise/LICENSE b/node_modules/any-promise/LICENSE new file mode 100644 index 0000000..9187fe5 --- /dev/null +++ b/node_modules/any-promise/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2014-2016 Kevin Beaty + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/any-promise/README.md b/node_modules/any-promise/README.md new file mode 100644 index 0000000..174bea4 --- /dev/null +++ b/node_modules/any-promise/README.md @@ -0,0 +1,161 @@ +## Any Promise + +[![Build Status](https://secure.travis-ci.org/kevinbeaty/any-promise.svg)](http://travis-ci.org/kevinbeaty/any-promise) + +Let your library support any ES 2015 (ES6) compatible `Promise` and leave the choice to application authors. The application can *optionally* register its preferred `Promise` implementation and it will be exported when requiring `any-promise` from library code. + +If no preference is registered, defaults to the global `Promise` for newer Node.js versions. The browser version defaults to the window `Promise`, so polyfill or register as necessary. + +### Usage with global Promise: + +Assuming the global `Promise` is the desired implementation: + +```bash +# Install any libraries depending on any-promise +$ npm install mz +``` + +The installed libraries will use global Promise by default. + +```js +// in library +var Promise = require('any-promise') // the global Promise + +function promiseReturningFunction(){ + return new Promise(function(resolve, reject){...}) +} +``` + +### Usage with registration: + +Assuming `bluebird` is the desired Promise implementation: + +```bash +# Install preferred promise library +$ npm install bluebird +# Install any-promise to allow registration +$ npm install any-promise +# Install any libraries you would like to use depending on any-promise +$ npm install mz +``` + +Register your preference in the application entry point before any other `require` of packages that load `any-promise`: + +```javascript +// top of application index.js or other entry point +require('any-promise/register/bluebird') + +// -or- Equivalent to above, but allows customization of Promise library +require('any-promise/register')('bluebird', {Promise: require('bluebird')}) +``` + +Now that the implementation is registered, you can use any package depending on `any-promise`: + + +```javascript +var fsp = require('mz/fs') // mz/fs will use registered bluebird promises +var Promise = require('any-promise') // the registered bluebird promise +``` + +It is safe to call `register` multiple times, but it must always be with the same implementation. + +Again, registration is *optional*. It should only be called by the application user if overriding the global `Promise` implementation is desired. + +### Optional Application Registration + +As an application author, you can *optionally* register a preferred `Promise` implementation on application startup (before any call to `require('any-promise')`: + +You must register your preference before any call to `require('any-promise')` (by you or required packages), and only one implementation can be registered. Typically, this registration would occur at the top of the application entry point. + + +#### Registration shortcuts + +If you are using a known `Promise` implementation, you can register your preference with a shortcut: + + +```js +require('any-promise/register/bluebird') +// -or- +import 'any-promise/register/q'; +``` + +Shortcut registration is the preferred registration method as it works in the browser and Node.js. It is also convenient for using with `import` and many test runners, that offer a `--require` flag: + +``` +$ ava --require=any-promise/register/bluebird test.js +``` + +Current known implementations include `bluebird`, `q`, `when`, `rsvp`, `es6-promise`, `promise`, `native-promise-only`, `pinkie`, `vow` and `lie`. If you are not using a known implementation, you can use another registration method described below. + + +#### Basic Registration + +As an alternative to registration shortcuts, you can call the `register` function with the preferred `Promise` implementation. The benefit of this approach is that a `Promise` library can be required by name without being a known implementation. This approach does NOT work in the browser. To use `any-promise` in the browser use either registration shortcuts or specify the `Promise` constructor using advanced registration (see below). + +```javascript +require('any-promise/register')('when') +// -or- require('any-promise/register')('any other ES6 compatible library (known or otherwise)') +``` + +This registration method will try to detect the `Promise` constructor from requiring the specified implementation. If you would like to specify your own constructor, see advanced registration. + + +#### Advanced Registration + +To use the browser version, you should either install a polyfill or explicitly register the `Promise` constructor: + +```javascript +require('any-promise/register')('bluebird', {Promise: require('bluebird')}) +``` + +This could also be used for registering a custom `Promise` implementation or subclass. + +Your preference will be registered globally, allowing a single registration even if multiple versions of `any-promise` are installed in the NPM dependency tree or are using multiple bundled JavaScript files in the browser. You can bypass this global registration in options: + + +```javascript +require('../register')('es6-promise', {Promise: require('es6-promise').Promise, global: false}) +``` + +### Library Usage + +To use any `Promise` constructor, simply require it: + +```javascript +var Promise = require('any-promise'); + +return Promise + .all([xf, f, init, coll]) + .then(fn); + + +return new Promise(function(resolve, reject){ + try { + resolve(item); + } catch(e){ + reject(e); + } +}); + +``` + +Except noted below, libraries using `any-promise` should only use [documented](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) functions as there is no guarantee which implementation will be chosen by the application author. Libraries should never call `register`, only the application user should call if desired. + + +#### Advanced Library Usage + +If your library needs to branch code based on the registered implementation, you can retrieve it using `var impl = require('any-promise/implementation')`, where `impl` will be the package name (`"bluebird"`, `"when"`, etc.) if registered, `"global.Promise"` if using the global version on Node.js, or `"window.Promise"` if using the browser version. You should always include a default case, as there is no guarantee what package may be registered. + + +### Support for old Node.js versions + +Node.js versions prior to `v0.12` may have contained buggy versions of the global `Promise`. For this reason, the global `Promise` is not loaded automatically for these old versions. If using `any-promise` in Node.js versions versions `<= v0.12`, the user should register a desired implementation. + +If an implementation is not registered, `any-promise` will attempt to discover an installed `Promise` implementation. If no implementation can be found, an error will be thrown on `require('any-promise')`. While the auto-discovery usually avoids errors, it is non-deterministic. It is recommended that the user always register a preferred implementation for older Node.js versions. + +This auto-discovery is only available for Node.jS versions prior to `v0.12`. Any newer versions will always default to the global `Promise` implementation. + +### Related + +- [any-observable](https://github.com/sindresorhus/any-observable) - `any-promise` for Observables. + diff --git a/node_modules/any-promise/implementation.d.ts b/node_modules/any-promise/implementation.d.ts new file mode 100644 index 0000000..c331a56 --- /dev/null +++ b/node_modules/any-promise/implementation.d.ts @@ -0,0 +1,3 @@ +declare var implementation: string; + +export = implementation; diff --git a/node_modules/any-promise/implementation.js b/node_modules/any-promise/implementation.js new file mode 100644 index 0000000..a45ae94 --- /dev/null +++ b/node_modules/any-promise/implementation.js @@ -0,0 +1 @@ +module.exports = require('./register')().implementation diff --git a/node_modules/any-promise/index.d.ts b/node_modules/any-promise/index.d.ts new file mode 100644 index 0000000..9f646c5 --- /dev/null +++ b/node_modules/any-promise/index.d.ts @@ -0,0 +1,73 @@ +declare class Promise implements Promise.Thenable { + /** + * If you call resolve in the body of the callback passed to the constructor, + * your promise is fulfilled with result object passed to resolve. + * If you call reject your promise is rejected with the object passed to resolve. + * For consistency and debugging (eg stack traces), obj should be an instanceof Error. + * Any errors thrown in the constructor callback will be implicitly passed to reject(). + */ + constructor (callback: (resolve : (value?: R | Promise.Thenable) => void, reject: (error?: any) => void) => void); + + /** + * onFulfilled is called when/if "promise" resolves. onRejected is called when/if "promise" rejects. + * Both are optional, if either/both are omitted the next onFulfilled/onRejected in the chain is called. + * Both callbacks have a single parameter , the fulfillment value or rejection reason. + * "then" returns a new promise equivalent to the value you return from onFulfilled/onRejected after being passed through Promise.resolve. + * If an error is thrown in the callback, the returned promise rejects with that error. + * + * @param onFulfilled called when/if "promise" resolves + * @param onRejected called when/if "promise" rejects + */ + then (onFulfilled?: (value: R) => U | Promise.Thenable, onRejected?: (error: any) => U | Promise.Thenable): Promise; + then (onFulfilled?: (value: R) => U | Promise.Thenable, onRejected?: (error: any) => void): Promise; + + /** + * Sugar for promise.then(undefined, onRejected) + * + * @param onRejected called when/if "promise" rejects + */ + catch (onRejected?: (error: any) => U | Promise.Thenable): Promise; + + /** + * Make a new promise from the thenable. + * A thenable is promise-like in as far as it has a "then" method. + */ + static resolve (): Promise; + static resolve (value: R | Promise.Thenable): Promise; + + /** + * Make a promise that rejects to obj. For consistency and debugging (eg stack traces), obj should be an instanceof Error + */ + static reject (error: any): Promise; + + /** + * Make a promise that fulfills when every item in the array fulfills, and rejects if (and when) any item rejects. + * the array passed to all can be a mixture of promise-like objects and other objects. + * The fulfillment value is an array (in order) of fulfillment values. The rejection value is the first rejection value. + */ + static all (values: [T1 | Promise.Thenable, T2 | Promise.Thenable, T3 | Promise.Thenable, T4 | Promise.Thenable , T5 | Promise.Thenable, T6 | Promise.Thenable, T7 | Promise.Thenable, T8 | Promise.Thenable, T9 | Promise.Thenable, T10 | Promise.Thenable]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; + static all (values: [T1 | Promise.Thenable, T2 | Promise.Thenable, T3 | Promise.Thenable, T4 | Promise.Thenable , T5 | Promise.Thenable, T6 | Promise.Thenable, T7 | Promise.Thenable, T8 | Promise.Thenable, T9 | Promise.Thenable]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; + static all (values: [T1 | Promise.Thenable, T2 | Promise.Thenable, T3 | Promise.Thenable, T4 | Promise.Thenable , T5 | Promise.Thenable, T6 | Promise.Thenable, T7 | Promise.Thenable, T8 | Promise.Thenable]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; + static all (values: [T1 | Promise.Thenable, T2 | Promise.Thenable, T3 | Promise.Thenable, T4 | Promise.Thenable , T5 | Promise.Thenable, T6 | Promise.Thenable, T7 | Promise.Thenable]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; + static all (values: [T1 | Promise.Thenable, T2 | Promise.Thenable, T3 | Promise.Thenable, T4 | Promise.Thenable , T5 | Promise.Thenable, T6 | Promise.Thenable]): Promise<[T1, T2, T3, T4, T5, T6]>; + static all (values: [T1 | Promise.Thenable, T2 | Promise.Thenable, T3 | Promise.Thenable, T4 | Promise.Thenable , T5 | Promise.Thenable]): Promise<[T1, T2, T3, T4, T5]>; + static all (values: [T1 | Promise.Thenable, T2 | Promise.Thenable, T3 | Promise.Thenable, T4 | Promise.Thenable ]): Promise<[T1, T2, T3, T4]>; + static all (values: [T1 | Promise.Thenable, T2 | Promise.Thenable, T3 | Promise.Thenable]): Promise<[T1, T2, T3]>; + static all (values: [T1 | Promise.Thenable, T2 | Promise.Thenable]): Promise<[T1, T2]>; + static all (values: [T1 | Promise.Thenable]): Promise<[T1]>; + static all (values: Array>): Promise; + + /** + * Make a Promise that fulfills when any item fulfills, and rejects if any item rejects. + */ + static race (promises: (R | Promise.Thenable)[]): Promise; +} + +declare namespace Promise { + export interface Thenable { + then (onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => U | Thenable): Thenable; + then (onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => void): Thenable; + } +} + +export = Promise; diff --git a/node_modules/any-promise/index.js b/node_modules/any-promise/index.js new file mode 100644 index 0000000..74b8548 --- /dev/null +++ b/node_modules/any-promise/index.js @@ -0,0 +1 @@ +module.exports = require('./register')().Promise diff --git a/node_modules/any-promise/loader.js b/node_modules/any-promise/loader.js new file mode 100644 index 0000000..e164914 --- /dev/null +++ b/node_modules/any-promise/loader.js @@ -0,0 +1,78 @@ +"use strict" + // global key for user preferred registration +var REGISTRATION_KEY = '@@any-promise/REGISTRATION', + // Prior registration (preferred or detected) + registered = null + +/** + * Registers the given implementation. An implementation must + * be registered prior to any call to `require("any-promise")`, + * typically on application load. + * + * If called with no arguments, will return registration in + * following priority: + * + * For Node.js: + * + * 1. Previous registration + * 2. global.Promise if node.js version >= 0.12 + * 3. Auto detected promise based on first sucessful require of + * known promise libraries. Note this is a last resort, as the + * loaded library is non-deterministic. node.js >= 0.12 will + * always use global.Promise over this priority list. + * 4. Throws error. + * + * For Browser: + * + * 1. Previous registration + * 2. window.Promise + * 3. Throws error. + * + * Options: + * + * Promise: Desired Promise constructor + * global: Boolean - Should the registration be cached in a global variable to + * allow cross dependency/bundle registration? (default true) + */ +module.exports = function(root, loadImplementation){ + return function register(implementation, opts){ + implementation = implementation || null + opts = opts || {} + // global registration unless explicitly {global: false} in options (default true) + var registerGlobal = opts.global !== false; + + // load any previous global registration + if(registered === null && registerGlobal){ + registered = root[REGISTRATION_KEY] || null + } + + if(registered !== null + && implementation !== null + && registered.implementation !== implementation){ + // Throw error if attempting to redefine implementation + throw new Error('any-promise already defined as "'+registered.implementation+ + '". You can only register an implementation before the first '+ + ' call to require("any-promise") and an implementation cannot be changed') + } + + if(registered === null){ + // use provided implementation + if(implementation !== null && typeof opts.Promise !== 'undefined'){ + registered = { + Promise: opts.Promise, + implementation: implementation + } + } else { + // require implementation if implementation is specified but not provided + registered = loadImplementation(implementation) + } + + if(registerGlobal){ + // register preference globally in case multiple installations + root[REGISTRATION_KEY] = registered + } + } + + return registered + } +} diff --git a/node_modules/any-promise/optional.js b/node_modules/any-promise/optional.js new file mode 100644 index 0000000..f388942 --- /dev/null +++ b/node_modules/any-promise/optional.js @@ -0,0 +1,6 @@ +"use strict"; +try { + module.exports = require('./register')().Promise || null +} catch(e) { + module.exports = null +} diff --git a/node_modules/any-promise/package.json b/node_modules/any-promise/package.json new file mode 100644 index 0000000..5baf14c --- /dev/null +++ b/node_modules/any-promise/package.json @@ -0,0 +1,45 @@ +{ + "name": "any-promise", + "version": "1.3.0", + "description": "Resolve any installed ES6 compatible promise", + "main": "index.js", + "typings": "index.d.ts", + "browser": { + "./register.js": "./register-shim.js" + }, + "scripts": { + "test": "ava" + }, + "repository": { + "type": "git", + "url": "https://github.com/kevinbeaty/any-promise" + }, + "keywords": [ + "promise", + "es6" + ], + "author": "Kevin Beaty", + "license": "MIT", + "bugs": { + "url": "https://github.com/kevinbeaty/any-promise/issues" + }, + "homepage": "http://github.com/kevinbeaty/any-promise", + "dependencies": {}, + "devDependencies": { + "ava": "^0.14.0", + "bluebird": "^3.0.0", + "es6-promise": "^3.0.0", + "is-promise": "^2.0.0", + "lie": "^3.0.0", + "mocha": "^2.0.0", + "native-promise-only": "^0.8.0", + "phantomjs-prebuilt": "^2.0.0", + "pinkie": "^2.0.0", + "promise": "^7.0.0", + "q": "^1.0.0", + "rsvp": "^3.0.0", + "vow": "^0.4.0", + "when": "^3.0.0", + "zuul": "^3.0.0" + } +} diff --git a/node_modules/any-promise/register-shim.js b/node_modules/any-promise/register-shim.js new file mode 100644 index 0000000..9049405 --- /dev/null +++ b/node_modules/any-promise/register-shim.js @@ -0,0 +1,18 @@ +"use strict"; +module.exports = require('./loader')(window, loadImplementation) + +/** + * Browser specific loadImplementation. Always uses `window.Promise` + * + * To register a custom implementation, must register with `Promise` option. + */ +function loadImplementation(){ + if(typeof window.Promise === 'undefined'){ + throw new Error("any-promise browser requires a polyfill or explicit registration"+ + " e.g: require('any-promise/register/bluebird')") + } + return { + Promise: window.Promise, + implementation: 'window.Promise' + } +} diff --git a/node_modules/any-promise/register.d.ts b/node_modules/any-promise/register.d.ts new file mode 100644 index 0000000..97f2fc0 --- /dev/null +++ b/node_modules/any-promise/register.d.ts @@ -0,0 +1,17 @@ +import Promise = require('./index'); + +declare function register (module?: string, options?: register.Options): register.Register; + +declare namespace register { + export interface Register { + Promise: typeof Promise; + implementation: string; + } + + export interface Options { + Promise?: typeof Promise; + global?: boolean + } +} + +export = register; diff --git a/node_modules/any-promise/register.js b/node_modules/any-promise/register.js new file mode 100644 index 0000000..255c6e2 --- /dev/null +++ b/node_modules/any-promise/register.js @@ -0,0 +1,94 @@ +"use strict" +module.exports = require('./loader')(global, loadImplementation); + +/** + * Node.js version of loadImplementation. + * + * Requires the given implementation and returns the registration + * containing {Promise, implementation} + * + * If implementation is undefined or global.Promise, loads it + * Otherwise uses require + */ +function loadImplementation(implementation){ + var impl = null + + if(shouldPreferGlobalPromise(implementation)){ + // if no implementation or env specified use global.Promise + impl = { + Promise: global.Promise, + implementation: 'global.Promise' + } + } else if(implementation){ + // if implementation specified, require it + var lib = require(implementation) + impl = { + Promise: lib.Promise || lib, + implementation: implementation + } + } else { + // try to auto detect implementation. This is non-deterministic + // and should prefer other branches, but this is our last chance + // to load something without throwing error + impl = tryAutoDetect() + } + + if(impl === null){ + throw new Error('Cannot find any-promise implementation nor'+ + ' global.Promise. You must install polyfill or call'+ + ' require("any-promise/register") with your preferred'+ + ' implementation, e.g. require("any-promise/register/bluebird")'+ + ' on application load prior to any require("any-promise").') + } + + return impl +} + +/** + * Determines if the global.Promise should be preferred if an implementation + * has not been registered. + */ +function shouldPreferGlobalPromise(implementation){ + if(implementation){ + return implementation === 'global.Promise' + } else if(typeof global.Promise !== 'undefined'){ + // Load global promise if implementation not specified + // Versions < 0.11 did not have global Promise + // Do not use for version < 0.12 as version 0.11 contained buggy versions + var version = (/v(\d+)\.(\d+)\.(\d+)/).exec(process.version) + return !(version && +version[1] == 0 && +version[2] < 12) + } + + // do not have global.Promise or another implementation was specified + return false +} + +/** + * Look for common libs as last resort there is no guarantee that + * this will return a desired implementation or even be deterministic. + * The priority is also nearly arbitrary. We are only doing this + * for older versions of Node.js <0.12 that do not have a reasonable + * global.Promise implementation and we the user has not registered + * the preference. This preserves the behavior of any-promise <= 0.1 + * and may be deprecated or removed in the future + */ +function tryAutoDetect(){ + var libs = [ + "es6-promise", + "promise", + "native-promise-only", + "bluebird", + "rsvp", + "when", + "q", + "pinkie", + "lie", + "vow"] + var i = 0, len = libs.length + for(; i < len; i++){ + try { + return loadImplementation(libs[i]) + } catch(e){} + } + return null +} diff --git a/node_modules/any-promise/register/bluebird.d.ts b/node_modules/any-promise/register/bluebird.d.ts new file mode 100644 index 0000000..336ce12 --- /dev/null +++ b/node_modules/any-promise/register/bluebird.d.ts @@ -0,0 +1 @@ +export {} diff --git a/node_modules/any-promise/register/bluebird.js b/node_modules/any-promise/register/bluebird.js new file mode 100644 index 0000000..de0f87e --- /dev/null +++ b/node_modules/any-promise/register/bluebird.js @@ -0,0 +1,2 @@ +'use strict'; +require('../register')('bluebird', {Promise: require('bluebird')}) diff --git a/node_modules/any-promise/register/es6-promise.d.ts b/node_modules/any-promise/register/es6-promise.d.ts new file mode 100644 index 0000000..336ce12 --- /dev/null +++ b/node_modules/any-promise/register/es6-promise.d.ts @@ -0,0 +1 @@ +export {} diff --git a/node_modules/any-promise/register/es6-promise.js b/node_modules/any-promise/register/es6-promise.js new file mode 100644 index 0000000..59bd55b --- /dev/null +++ b/node_modules/any-promise/register/es6-promise.js @@ -0,0 +1,2 @@ +'use strict'; +require('../register')('es6-promise', {Promise: require('es6-promise').Promise}) diff --git a/node_modules/any-promise/register/lie.d.ts b/node_modules/any-promise/register/lie.d.ts new file mode 100644 index 0000000..336ce12 --- /dev/null +++ b/node_modules/any-promise/register/lie.d.ts @@ -0,0 +1 @@ +export {} diff --git a/node_modules/any-promise/register/lie.js b/node_modules/any-promise/register/lie.js new file mode 100644 index 0000000..7d305ca --- /dev/null +++ b/node_modules/any-promise/register/lie.js @@ -0,0 +1,2 @@ +'use strict'; +require('../register')('lie', {Promise: require('lie')}) diff --git a/node_modules/any-promise/register/native-promise-only.d.ts b/node_modules/any-promise/register/native-promise-only.d.ts new file mode 100644 index 0000000..336ce12 --- /dev/null +++ b/node_modules/any-promise/register/native-promise-only.d.ts @@ -0,0 +1 @@ +export {} diff --git a/node_modules/any-promise/register/native-promise-only.js b/node_modules/any-promise/register/native-promise-only.js new file mode 100644 index 0000000..70a5a5e --- /dev/null +++ b/node_modules/any-promise/register/native-promise-only.js @@ -0,0 +1,2 @@ +'use strict'; +require('../register')('native-promise-only', {Promise: require('native-promise-only')}) diff --git a/node_modules/any-promise/register/pinkie.d.ts b/node_modules/any-promise/register/pinkie.d.ts new file mode 100644 index 0000000..336ce12 --- /dev/null +++ b/node_modules/any-promise/register/pinkie.d.ts @@ -0,0 +1 @@ +export {} diff --git a/node_modules/any-promise/register/pinkie.js b/node_modules/any-promise/register/pinkie.js new file mode 100644 index 0000000..caaf98a --- /dev/null +++ b/node_modules/any-promise/register/pinkie.js @@ -0,0 +1,2 @@ +'use strict'; +require('../register')('pinkie', {Promise: require('pinkie')}) diff --git a/node_modules/any-promise/register/promise.d.ts b/node_modules/any-promise/register/promise.d.ts new file mode 100644 index 0000000..336ce12 --- /dev/null +++ b/node_modules/any-promise/register/promise.d.ts @@ -0,0 +1 @@ +export {} diff --git a/node_modules/any-promise/register/promise.js b/node_modules/any-promise/register/promise.js new file mode 100644 index 0000000..746620d --- /dev/null +++ b/node_modules/any-promise/register/promise.js @@ -0,0 +1,2 @@ +'use strict'; +require('../register')('promise', {Promise: require('promise')}) diff --git a/node_modules/any-promise/register/q.d.ts b/node_modules/any-promise/register/q.d.ts new file mode 100644 index 0000000..336ce12 --- /dev/null +++ b/node_modules/any-promise/register/q.d.ts @@ -0,0 +1 @@ +export {} diff --git a/node_modules/any-promise/register/q.js b/node_modules/any-promise/register/q.js new file mode 100644 index 0000000..0fc633a --- /dev/null +++ b/node_modules/any-promise/register/q.js @@ -0,0 +1,2 @@ +'use strict'; +require('../register')('q', {Promise: require('q').Promise}) diff --git a/node_modules/any-promise/register/rsvp.d.ts b/node_modules/any-promise/register/rsvp.d.ts new file mode 100644 index 0000000..336ce12 --- /dev/null +++ b/node_modules/any-promise/register/rsvp.d.ts @@ -0,0 +1 @@ +export {} diff --git a/node_modules/any-promise/register/rsvp.js b/node_modules/any-promise/register/rsvp.js new file mode 100644 index 0000000..02b1318 --- /dev/null +++ b/node_modules/any-promise/register/rsvp.js @@ -0,0 +1,2 @@ +'use strict'; +require('../register')('rsvp', {Promise: require('rsvp').Promise}) diff --git a/node_modules/any-promise/register/vow.d.ts b/node_modules/any-promise/register/vow.d.ts new file mode 100644 index 0000000..336ce12 --- /dev/null +++ b/node_modules/any-promise/register/vow.d.ts @@ -0,0 +1 @@ +export {} diff --git a/node_modules/any-promise/register/vow.js b/node_modules/any-promise/register/vow.js new file mode 100644 index 0000000..5b6868c --- /dev/null +++ b/node_modules/any-promise/register/vow.js @@ -0,0 +1,2 @@ +'use strict'; +require('../register')('vow', {Promise: require('vow').Promise}) diff --git a/node_modules/any-promise/register/when.d.ts b/node_modules/any-promise/register/when.d.ts new file mode 100644 index 0000000..336ce12 --- /dev/null +++ b/node_modules/any-promise/register/when.d.ts @@ -0,0 +1 @@ +export {} diff --git a/node_modules/any-promise/register/when.js b/node_modules/any-promise/register/when.js new file mode 100644 index 0000000..d91c13d --- /dev/null +++ b/node_modules/any-promise/register/when.js @@ -0,0 +1,2 @@ +'use strict'; +require('../register')('when', {Promise: require('when').Promise}) diff --git a/node_modules/anymatch/LICENSE b/node_modules/anymatch/LICENSE new file mode 100644 index 0000000..491766c --- /dev/null +++ b/node_modules/anymatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/anymatch/README.md b/node_modules/anymatch/README.md new file mode 100644 index 0000000..1dd67f5 --- /dev/null +++ b/node_modules/anymatch/README.md @@ -0,0 +1,87 @@ +anymatch [![Build Status](https://travis-ci.org/micromatch/anymatch.svg?branch=master)](https://travis-ci.org/micromatch/anymatch) [![Coverage Status](https://img.shields.io/coveralls/micromatch/anymatch.svg?branch=master)](https://coveralls.io/r/micromatch/anymatch?branch=master) +====== +Javascript module to match a string against a regular expression, glob, string, +or function that takes the string as an argument and returns a truthy or falsy +value. The matcher can also be an array of any or all of these. Useful for +allowing a very flexible user-defined config to define things like file paths. + +__Note: This module has Bash-parity, please be aware that Windows-style backslashes are not supported as separators. See https://github.com/micromatch/micromatch#backslashes for more information.__ + + +Usage +----- +```sh +npm install anymatch +``` + +#### anymatch(matchers, testString, [returnIndex], [options]) +* __matchers__: (_Array|String|RegExp|Function_) +String to be directly matched, string with glob patterns, regular expression +test, function that takes the testString as an argument and returns a truthy +value if it should be matched, or an array of any number and mix of these types. +* __testString__: (_String|Array_) The string to test against the matchers. If +passed as an array, the first element of the array will be used as the +`testString` for non-function matchers, while the entire array will be applied +as the arguments for function matchers. +* __options__: (_Object_ [optional]_) Any of the [picomatch](https://github.com/micromatch/picomatch#options) options. + * __returnIndex__: (_Boolean [optional]_) If true, return the array index of +the first matcher that that testString matched, or -1 if no match, instead of a +boolean result. + +```js +const anymatch = require('anymatch'); + +const matchers = [ 'path/to/file.js', 'path/anyjs/**/*.js', /foo.js$/, string => string.includes('bar') && string.length > 10 ] ; + +anymatch(matchers, 'path/to/file.js'); // true +anymatch(matchers, 'path/anyjs/baz.js'); // true +anymatch(matchers, 'path/to/foo.js'); // true +anymatch(matchers, 'path/to/bar.js'); // true +anymatch(matchers, 'bar.js'); // false + +// returnIndex = true +anymatch(matchers, 'foo.js', {returnIndex: true}); // 2 +anymatch(matchers, 'path/anyjs/foo.js', {returnIndex: true}); // 1 + +// any picomatc + +// using globs to match directories and their children +anymatch('node_modules', 'node_modules'); // true +anymatch('node_modules', 'node_modules/somelib/index.js'); // false +anymatch('node_modules/**', 'node_modules/somelib/index.js'); // true +anymatch('node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // false +anymatch('**/node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // true + +const matcher = anymatch(matchers); +['foo.js', 'bar.js'].filter(matcher); // [ 'foo.js' ] +anymatch master* ❯ + +``` + +#### anymatch(matchers) +You can also pass in only your matcher(s) to get a curried function that has +already been bound to the provided matching criteria. This can be used as an +`Array#filter` callback. + +```js +var matcher = anymatch(matchers); + +matcher('path/to/file.js'); // true +matcher('path/anyjs/baz.js', true); // 1 + +['foo.js', 'bar.js'].filter(matcher); // ['foo.js'] +``` + +Changelog +---------- +[See release notes page on GitHub](https://github.com/micromatch/anymatch/releases) + +- **v3.0:** Removed `startIndex` and `endIndex` arguments. Node 8.x-only. +- **v2.0:** [micromatch](https://github.com/jonschlinkert/micromatch) moves away from minimatch-parity and inline with Bash. This includes handling backslashes differently (see https://github.com/micromatch/micromatch#backslashes for more information). +- **v1.2:** anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch) +for glob pattern matching. Issues with glob pattern matching should be +reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues). + +License +------- +[ISC](https://raw.github.com/micromatch/anymatch/master/LICENSE) diff --git a/node_modules/anymatch/index.d.ts b/node_modules/anymatch/index.d.ts new file mode 100644 index 0000000..3ef7eaa --- /dev/null +++ b/node_modules/anymatch/index.d.ts @@ -0,0 +1,20 @@ +type AnymatchFn = (testString: string) => boolean; +type AnymatchPattern = string|RegExp|AnymatchFn; +type AnymatchMatcher = AnymatchPattern|AnymatchPattern[] +type AnymatchTester = { + (testString: string|any[], returnIndex: true): number; + (testString: string|any[]): boolean; +} + +type PicomatchOptions = {dot: boolean}; + +declare const anymatch: { + (matchers: AnymatchMatcher): AnymatchTester; + (matchers: AnymatchMatcher, testString: null, returnIndex: true | PicomatchOptions): AnymatchTester; + (matchers: AnymatchMatcher, testString: string|any[], returnIndex: true | PicomatchOptions): number; + (matchers: AnymatchMatcher, testString: string|any[]): boolean; +} + +export {AnymatchMatcher as Matcher} +export {AnymatchTester as Tester} +export default anymatch diff --git a/node_modules/anymatch/index.js b/node_modules/anymatch/index.js new file mode 100644 index 0000000..8eb73e9 --- /dev/null +++ b/node_modules/anymatch/index.js @@ -0,0 +1,104 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { value: true }); + +const picomatch = require('picomatch'); +const normalizePath = require('normalize-path'); + +/** + * @typedef {(testString: string) => boolean} AnymatchFn + * @typedef {string|RegExp|AnymatchFn} AnymatchPattern + * @typedef {AnymatchPattern|AnymatchPattern[]} AnymatchMatcher + */ +const BANG = '!'; +const DEFAULT_OPTIONS = {returnIndex: false}; +const arrify = (item) => Array.isArray(item) ? item : [item]; + +/** + * @param {AnymatchPattern} matcher + * @param {object} options + * @returns {AnymatchFn} + */ +const createPattern = (matcher, options) => { + if (typeof matcher === 'function') { + return matcher; + } + if (typeof matcher === 'string') { + const glob = picomatch(matcher, options); + return (string) => matcher === string || glob(string); + } + if (matcher instanceof RegExp) { + return (string) => matcher.test(string); + } + return (string) => false; +}; + +/** + * @param {Array} patterns + * @param {Array} negPatterns + * @param {String|Array} args + * @param {Boolean} returnIndex + * @returns {boolean|number} + */ +const matchPatterns = (patterns, negPatterns, args, returnIndex) => { + const isList = Array.isArray(args); + const _path = isList ? args[0] : args; + if (!isList && typeof _path !== 'string') { + throw new TypeError('anymatch: second argument must be a string: got ' + + Object.prototype.toString.call(_path)) + } + const path = normalizePath(_path, false); + + for (let index = 0; index < negPatterns.length; index++) { + const nglob = negPatterns[index]; + if (nglob(path)) { + return returnIndex ? -1 : false; + } + } + + const applied = isList && [path].concat(args.slice(1)); + for (let index = 0; index < patterns.length; index++) { + const pattern = patterns[index]; + if (isList ? pattern(...applied) : pattern(path)) { + return returnIndex ? index : true; + } + } + + return returnIndex ? -1 : false; +}; + +/** + * @param {AnymatchMatcher} matchers + * @param {Array|string} testString + * @param {object} options + * @returns {boolean|number|Function} + */ +const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => { + if (matchers == null) { + throw new TypeError('anymatch: specify first argument'); + } + const opts = typeof options === 'boolean' ? {returnIndex: options} : options; + const returnIndex = opts.returnIndex || false; + + // Early cache for matchers. + const mtchers = arrify(matchers); + const negatedGlobs = mtchers + .filter(item => typeof item === 'string' && item.charAt(0) === BANG) + .map(item => item.slice(1)) + .map(item => picomatch(item, opts)); + const patterns = mtchers + .filter(item => typeof item !== 'string' || (typeof item === 'string' && item.charAt(0) !== BANG)) + .map(matcher => createPattern(matcher, opts)); + + if (testString == null) { + return (testString, ri = false) => { + const returnIndex = typeof ri === 'boolean' ? ri : false; + return matchPatterns(patterns, negatedGlobs, testString, returnIndex); + } + } + + return matchPatterns(patterns, negatedGlobs, testString, returnIndex); +}; + +anymatch.default = anymatch; +module.exports = anymatch; diff --git a/node_modules/anymatch/package.json b/node_modules/anymatch/package.json new file mode 100644 index 0000000..2cb2307 --- /dev/null +++ b/node_modules/anymatch/package.json @@ -0,0 +1,48 @@ +{ + "name": "anymatch", + "version": "3.1.3", + "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", + "files": [ + "index.js", + "index.d.ts" + ], + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "author": { + "name": "Elan Shanker", + "url": "https://github.com/es128" + }, + "license": "ISC", + "homepage": "https://github.com/micromatch/anymatch", + "repository": { + "type": "git", + "url": "https://github.com/micromatch/anymatch" + }, + "keywords": [ + "match", + "any", + "string", + "file", + "fs", + "list", + "glob", + "regex", + "regexp", + "regular", + "expression", + "function" + ], + "scripts": { + "test": "nyc mocha", + "mocha": "mocha" + }, + "devDependencies": { + "mocha": "^6.1.3", + "nyc": "^14.0.0" + }, + "engines": { + "node": ">= 8" + } +} diff --git a/node_modules/arg/LICENSE.md b/node_modules/arg/LICENSE.md new file mode 100644 index 0000000..b708f87 --- /dev/null +++ b/node_modules/arg/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Vercel, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/arg/README.md b/node_modules/arg/README.md new file mode 100644 index 0000000..6501df5 --- /dev/null +++ b/node_modules/arg/README.md @@ -0,0 +1,317 @@ +# Arg + +`arg` is an unopinionated, no-frills CLI argument parser. + +## Installation + +```bash +npm install arg +``` + +## Usage + +`arg()` takes either 1 or 2 arguments: + +1. Command line specification object (see below) +2. Parse options (_Optional_, defaults to `{permissive: false, argv: process.argv.slice(2), stopAtPositional: false}`) + +It returns an object with any values present on the command-line (missing options are thus +missing from the resulting object). Arg performs no validation/requirement checking - we +leave that up to the application. + +All parameters that aren't consumed by options (commonly referred to as "extra" parameters) +are added to `result._`, which is _always_ an array (even if no extra parameters are passed, +in which case an empty array is returned). + +```javascript +const arg = require('arg'); + +// `options` is an optional parameter +const args = arg( + spec, + (options = { permissive: false, argv: process.argv.slice(2) }) +); +``` + +For example: + +```console +$ node ./hello.js --verbose -vvv --port=1234 -n 'My name' foo bar --tag qux --tag=qix -- --foobar +``` + +```javascript +// hello.js +const arg = require('arg'); + +const args = arg({ + // Types + '--help': Boolean, + '--version': Boolean, + '--verbose': arg.COUNT, // Counts the number of times --verbose is passed + '--port': Number, // --port or --port= + '--name': String, // --name or --name= + '--tag': [String], // --tag or --tag= + + // Aliases + '-v': '--verbose', + '-n': '--name', // -n ; result is stored in --name + '--label': '--name' // --label or --label=; + // result is stored in --name +}); + +console.log(args); +/* +{ + _: ["foo", "bar", "--foobar"], + '--port': 1234, + '--verbose': 4, + '--name': "My name", + '--tag': ["qux", "qix"] +} +*/ +``` + +The values for each key=>value pair is either a type (function or [function]) or a string (indicating an alias). + +- In the case of a function, the string value of the argument's value is passed to it, + and the return value is used as the ultimate value. + +- In the case of an array, the only element _must_ be a type function. Array types indicate + that the argument may be passed multiple times, and as such the resulting value in the returned + object is an array with all of the values that were passed using the specified flag. + +- In the case of a string, an alias is established. If a flag is passed that matches the _key_, + then the _value_ is substituted in its place. + +Type functions are passed three arguments: + +1. The parameter value (always a string) +2. The parameter name (e.g. `--label`) +3. The previous value for the destination (useful for reduce-like operations or for supporting `-v` multiple times, etc.) + +This means the built-in `String`, `Number`, and `Boolean` type constructors "just work" as type functions. + +Note that `Boolean` and `[Boolean]` have special treatment - an option argument is _not_ consumed or passed, but instead `true` is +returned. These options are called "flags". + +For custom handlers that wish to behave as flags, you may pass the function through `arg.flag()`: + +```javascript +const arg = require('arg'); + +const argv = [ + '--foo', + 'bar', + '-ff', + 'baz', + '--foo', + '--foo', + 'qux', + '-fff', + 'qix' +]; + +function myHandler(value, argName, previousValue) { + /* `value` is always `true` */ + return 'na ' + (previousValue || 'batman!'); +} + +const args = arg( + { + '--foo': arg.flag(myHandler), + '-f': '--foo' + }, + { + argv + } +); + +console.log(args); +/* +{ + _: ['bar', 'baz', 'qux', 'qix'], + '--foo': 'na na na na na na na na batman!' +} +*/ +``` + +As well, `arg` supplies a helper argument handler called `arg.COUNT`, which equivalent to a `[Boolean]` argument's `.length` +property - effectively counting the number of times the boolean flag, denoted by the key, is passed on the command line.. +For example, this is how you could implement `ssh`'s multiple levels of verbosity (`-vvvv` being the most verbose). + +```javascript +const arg = require('arg'); + +const argv = ['-AAAA', '-BBBB']; + +const args = arg( + { + '-A': arg.COUNT, + '-B': [Boolean] + }, + { + argv + } +); + +console.log(args); +/* +{ + _: [], + '-A': 4, + '-B': [true, true, true, true] +} +*/ +``` + +### Options + +If a second parameter is specified and is an object, it specifies parsing options to modify the behavior of `arg()`. + +#### `argv` + +If you have already sliced or generated a number of raw arguments to be parsed (as opposed to letting `arg` +slice them from `process.argv`) you may specify them in the `argv` option. + +For example: + +```javascript +const args = arg( + { + '--foo': String + }, + { + argv: ['hello', '--foo', 'world'] + } +); +``` + +results in: + +```javascript +const args = { + _: ['hello'], + '--foo': 'world' +}; +``` + +#### `permissive` + +When `permissive` set to `true`, `arg` will push any unknown arguments +onto the "extra" argument array (`result._`) instead of throwing an error about +an unknown flag. + +For example: + +```javascript +const arg = require('arg'); + +const argv = [ + '--foo', + 'hello', + '--qux', + 'qix', + '--bar', + '12345', + 'hello again' +]; + +const args = arg( + { + '--foo': String, + '--bar': Number + }, + { + argv, + permissive: true + } +); +``` + +results in: + +```javascript +const args = { + _: ['--qux', 'qix', 'hello again'], + '--foo': 'hello', + '--bar': 12345 +}; +``` + +#### `stopAtPositional` + +When `stopAtPositional` is set to `true`, `arg` will halt parsing at the first +positional argument. + +For example: + +```javascript +const arg = require('arg'); + +const argv = ['--foo', 'hello', '--bar']; + +const args = arg( + { + '--foo': Boolean, + '--bar': Boolean + }, + { + argv, + stopAtPositional: true + } +); +``` + +results in: + +```javascript +const args = { + _: ['hello', '--bar'], + '--foo': true +}; +``` + +### Errors + +Some errors that `arg` throws provide a `.code` property in order to aid in recovering from user error, or to +differentiate between user error and developer error (bug). + +##### ARG_UNKNOWN_OPTION + +If an unknown option (not defined in the spec object) is passed, an error with code `ARG_UNKNOWN_OPTION` will be thrown: + +```js +// cli.js +try { + require('arg')({ '--hi': String }); +} catch (err) { + if (err.code === 'ARG_UNKNOWN_OPTION') { + console.log(err.message); + } else { + throw err; + } +} +``` + +```shell +node cli.js --extraneous true +Unknown or unexpected option: --extraneous +``` + +# FAQ + +A few questions and answers that have been asked before: + +### How do I require an argument with `arg`? + +Do the assertion yourself, such as: + +```javascript +const args = arg({ '--name': String }); + +if (!args['--name']) throw new Error('missing required argument: --name'); +``` + +# License + +Released under the [MIT License](LICENSE.md). diff --git a/node_modules/arg/index.d.ts b/node_modules/arg/index.d.ts new file mode 100644 index 0000000..44f9f35 --- /dev/null +++ b/node_modules/arg/index.d.ts @@ -0,0 +1,44 @@ +declare function arg( + spec: T, + options?: arg.Options +): arg.Result; + +declare namespace arg { + export const flagSymbol: unique symbol; + + export function flag(fn: T): T & { [arg.flagSymbol]: true }; + + export const COUNT: Handler & { [arg.flagSymbol]: true }; + + export type Handler = ( + value: string, + name: string, + previousValue?: T + ) => T; + + export class ArgError extends Error { + constructor(message: string, code: string); + + code: string; + } + + export interface Spec { + [key: string]: string | Handler | [Handler]; + } + + export type Result = { _: string[] } & { + [K in keyof T]?: T[K] extends Handler + ? ReturnType + : T[K] extends [Handler] + ? Array> + : never; + }; + + export interface Options { + argv?: string[]; + permissive?: boolean; + stopAtPositional?: boolean; + } +} + +export = arg; diff --git a/node_modules/arg/index.js b/node_modules/arg/index.js new file mode 100644 index 0000000..3f60f4c --- /dev/null +++ b/node_modules/arg/index.js @@ -0,0 +1,195 @@ +const flagSymbol = Symbol('arg flag'); + +class ArgError extends Error { + constructor(msg, code) { + super(msg); + this.name = 'ArgError'; + this.code = code; + + Object.setPrototypeOf(this, ArgError.prototype); + } +} + +function arg( + opts, + { + argv = process.argv.slice(2), + permissive = false, + stopAtPositional = false + } = {} +) { + if (!opts) { + throw new ArgError( + 'argument specification object is required', + 'ARG_CONFIG_NO_SPEC' + ); + } + + const result = { _: [] }; + + const aliases = {}; + const handlers = {}; + + for (const key of Object.keys(opts)) { + if (!key) { + throw new ArgError( + 'argument key cannot be an empty string', + 'ARG_CONFIG_EMPTY_KEY' + ); + } + + if (key[0] !== '-') { + throw new ArgError( + `argument key must start with '-' but found: '${key}'`, + 'ARG_CONFIG_NONOPT_KEY' + ); + } + + if (key.length === 1) { + throw new ArgError( + `argument key must have a name; singular '-' keys are not allowed: ${key}`, + 'ARG_CONFIG_NONAME_KEY' + ); + } + + if (typeof opts[key] === 'string') { + aliases[key] = opts[key]; + continue; + } + + let type = opts[key]; + let isFlag = false; + + if ( + Array.isArray(type) && + type.length === 1 && + typeof type[0] === 'function' + ) { + const [fn] = type; + type = (value, name, prev = []) => { + prev.push(fn(value, name, prev[prev.length - 1])); + return prev; + }; + isFlag = fn === Boolean || fn[flagSymbol] === true; + } else if (typeof type === 'function') { + isFlag = type === Boolean || type[flagSymbol] === true; + } else { + throw new ArgError( + `type missing or not a function or valid array type: ${key}`, + 'ARG_CONFIG_VAD_TYPE' + ); + } + + if (key[1] !== '-' && key.length > 2) { + throw new ArgError( + `short argument keys (with a single hyphen) must have only one character: ${key}`, + 'ARG_CONFIG_SHORTOPT_TOOLONG' + ); + } + + handlers[key] = [type, isFlag]; + } + + for (let i = 0, len = argv.length; i < len; i++) { + const wholeArg = argv[i]; + + if (stopAtPositional && result._.length > 0) { + result._ = result._.concat(argv.slice(i)); + break; + } + + if (wholeArg === '--') { + result._ = result._.concat(argv.slice(i + 1)); + break; + } + + if (wholeArg.length > 1 && wholeArg[0] === '-') { + /* eslint-disable operator-linebreak */ + const separatedArguments = + wholeArg[1] === '-' || wholeArg.length === 2 + ? [wholeArg] + : wholeArg + .slice(1) + .split('') + .map((a) => `-${a}`); + /* eslint-enable operator-linebreak */ + + for (let j = 0; j < separatedArguments.length; j++) { + const arg = separatedArguments[j]; + const [originalArgName, argStr] = + arg[1] === '-' ? arg.split(/=(.*)/, 2) : [arg, undefined]; + + let argName = originalArgName; + while (argName in aliases) { + argName = aliases[argName]; + } + + if (!(argName in handlers)) { + if (permissive) { + result._.push(arg); + continue; + } else { + throw new ArgError( + `unknown or unexpected option: ${originalArgName}`, + 'ARG_UNKNOWN_OPTION' + ); + } + } + + const [type, isFlag] = handlers[argName]; + + if (!isFlag && j + 1 < separatedArguments.length) { + throw new ArgError( + `option requires argument (but was followed by another short argument): ${originalArgName}`, + 'ARG_MISSING_REQUIRED_SHORTARG' + ); + } + + if (isFlag) { + result[argName] = type(true, argName, result[argName]); + } else if (argStr === undefined) { + if ( + argv.length < i + 2 || + (argv[i + 1].length > 1 && + argv[i + 1][0] === '-' && + !( + argv[i + 1].match(/^-?\d*(\.(?=\d))?\d*$/) && + (type === Number || + // eslint-disable-next-line no-undef + (typeof BigInt !== 'undefined' && type === BigInt)) + )) + ) { + const extended = + originalArgName === argName ? '' : ` (alias for ${argName})`; + throw new ArgError( + `option requires argument: ${originalArgName}${extended}`, + 'ARG_MISSING_REQUIRED_LONGARG' + ); + } + + result[argName] = type(argv[i + 1], argName, result[argName]); + ++i; + } else { + result[argName] = type(argStr, argName, result[argName]); + } + } + } else { + result._.push(wholeArg); + } + } + + return result; +} + +arg.flag = (fn) => { + fn[flagSymbol] = true; + return fn; +}; + +// Utility types +arg.COUNT = arg.flag((v, name, existingCount) => (existingCount || 0) + 1); + +// Expose error class +arg.ArgError = ArgError; + +module.exports = arg; diff --git a/node_modules/arg/package.json b/node_modules/arg/package.json new file mode 100644 index 0000000..47368d7 --- /dev/null +++ b/node_modules/arg/package.json @@ -0,0 +1,28 @@ +{ + "name": "arg", + "version": "5.0.2", + "description": "Unopinionated, no-frills CLI argument parser", + "main": "index.js", + "types": "index.d.ts", + "repository": "vercel/arg", + "author": "Josh Junon ", + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "scripts": { + "test": "WARN_EXIT=1 jest --coverage -w 2" + }, + "devDependencies": { + "chai": "^4.1.1", + "jest": "^27.0.6", + "prettier": "^2.3.2" + }, + "prettier": { + "arrowParens": "always", + "singleQuote": true, + "tabWidth": 2, + "trailingComma": "none" + } +} diff --git a/node_modules/binary-extensions/binary-extensions.json b/node_modules/binary-extensions/binary-extensions.json new file mode 100644 index 0000000..ac08048 --- /dev/null +++ b/node_modules/binary-extensions/binary-extensions.json @@ -0,0 +1,263 @@ +[ + "3dm", + "3ds", + "3g2", + "3gp", + "7z", + "a", + "aac", + "adp", + "afdesign", + "afphoto", + "afpub", + "ai", + "aif", + "aiff", + "alz", + "ape", + "apk", + "appimage", + "ar", + "arj", + "asf", + "au", + "avi", + "bak", + "baml", + "bh", + "bin", + "bk", + "bmp", + "btif", + "bz2", + "bzip2", + "cab", + "caf", + "cgm", + "class", + "cmx", + "cpio", + "cr2", + "cur", + "dat", + "dcm", + "deb", + "dex", + "djvu", + "dll", + "dmg", + "dng", + "doc", + "docm", + "docx", + "dot", + "dotm", + "dra", + "DS_Store", + "dsk", + "dts", + "dtshd", + "dvb", + "dwg", + "dxf", + "ecelp4800", + "ecelp7470", + "ecelp9600", + "egg", + "eol", + "eot", + "epub", + "exe", + "f4v", + "fbs", + "fh", + "fla", + "flac", + "flatpak", + "fli", + "flv", + "fpx", + "fst", + "fvt", + "g3", + "gh", + "gif", + "graffle", + "gz", + "gzip", + "h261", + "h263", + "h264", + "icns", + "ico", + "ief", + "img", + "ipa", + "iso", + "jar", + "jpeg", + "jpg", + "jpgv", + "jpm", + "jxr", + "key", + "ktx", + "lha", + "lib", + "lvp", + "lz", + "lzh", + "lzma", + "lzo", + "m3u", + "m4a", + "m4v", + "mar", + "mdi", + "mht", + "mid", + "midi", + "mj2", + "mka", + "mkv", + "mmr", + "mng", + "mobi", + "mov", + "movie", + "mp3", + "mp4", + "mp4a", + "mpeg", + "mpg", + "mpga", + "mxu", + "nef", + "npx", + "numbers", + "nupkg", + "o", + "odp", + "ods", + "odt", + "oga", + "ogg", + "ogv", + "otf", + "ott", + "pages", + "pbm", + "pcx", + "pdb", + "pdf", + "pea", + "pgm", + "pic", + "png", + "pnm", + "pot", + "potm", + "potx", + "ppa", + "ppam", + "ppm", + "pps", + "ppsm", + "ppsx", + "ppt", + "pptm", + "pptx", + "psd", + "pya", + "pyc", + "pyo", + "pyv", + "qt", + "rar", + "ras", + "raw", + "resources", + "rgb", + "rip", + "rlc", + "rmf", + "rmvb", + "rpm", + "rtf", + "rz", + "s3m", + "s7z", + "scpt", + "sgi", + "shar", + "snap", + "sil", + "sketch", + "slk", + "smv", + "snk", + "so", + "stl", + "suo", + "sub", + "swf", + "tar", + "tbz", + "tbz2", + "tga", + "tgz", + "thmx", + "tif", + "tiff", + "tlz", + "ttc", + "ttf", + "txz", + "udf", + "uvh", + "uvi", + "uvm", + "uvp", + "uvs", + "uvu", + "viv", + "vob", + "war", + "wav", + "wax", + "wbmp", + "wdp", + "weba", + "webm", + "webp", + "whl", + "wim", + "wm", + "wma", + "wmv", + "wmx", + "woff", + "woff2", + "wrm", + "wvx", + "xbm", + "xif", + "xla", + "xlam", + "xls", + "xlsb", + "xlsm", + "xlsx", + "xlt", + "xltm", + "xltx", + "xm", + "xmind", + "xpi", + "xpm", + "xwd", + "xz", + "z", + "zip", + "zipx" +] diff --git a/node_modules/binary-extensions/binary-extensions.json.d.ts b/node_modules/binary-extensions/binary-extensions.json.d.ts new file mode 100644 index 0000000..94a248c --- /dev/null +++ b/node_modules/binary-extensions/binary-extensions.json.d.ts @@ -0,0 +1,3 @@ +declare const binaryExtensionsJson: readonly string[]; + +export = binaryExtensionsJson; diff --git a/node_modules/binary-extensions/index.d.ts b/node_modules/binary-extensions/index.d.ts new file mode 100644 index 0000000..f469ac5 --- /dev/null +++ b/node_modules/binary-extensions/index.d.ts @@ -0,0 +1,14 @@ +/** +List of binary file extensions. + +@example +``` +import binaryExtensions = require('binary-extensions'); + +console.log(binaryExtensions); +//=> ['3ds', '3g2', …] +``` +*/ +declare const binaryExtensions: readonly string[]; + +export = binaryExtensions; diff --git a/node_modules/binary-extensions/index.js b/node_modules/binary-extensions/index.js new file mode 100644 index 0000000..d46e468 --- /dev/null +++ b/node_modules/binary-extensions/index.js @@ -0,0 +1 @@ +module.exports = require('./binary-extensions.json'); diff --git a/node_modules/binary-extensions/license b/node_modules/binary-extensions/license new file mode 100644 index 0000000..5493a1a --- /dev/null +++ b/node_modules/binary-extensions/license @@ -0,0 +1,10 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) +Copyright (c) Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/binary-extensions/package.json b/node_modules/binary-extensions/package.json new file mode 100644 index 0000000..4710c33 --- /dev/null +++ b/node_modules/binary-extensions/package.json @@ -0,0 +1,40 @@ +{ + "name": "binary-extensions", + "version": "2.3.0", + "description": "List of binary file extensions", + "license": "MIT", + "repository": "sindresorhus/binary-extensions", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "sideEffects": false, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts", + "binary-extensions.json", + "binary-extensions.json.d.ts" + ], + "keywords": [ + "binary", + "extensions", + "extension", + "file", + "json", + "list", + "array" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/binary-extensions/readme.md b/node_modules/binary-extensions/readme.md new file mode 100644 index 0000000..88519b3 --- /dev/null +++ b/node_modules/binary-extensions/readme.md @@ -0,0 +1,25 @@ +# binary-extensions + +> List of binary file extensions + +The list is just a [JSON file](binary-extensions.json) and can be used anywhere. + +## Install + +```sh +npm install binary-extensions +``` + +## Usage + +```js +const binaryExtensions = require('binary-extensions'); + +console.log(binaryExtensions); +//=> ['3ds', '3g2', …] +``` + +## Related + +- [is-binary-path](https://github.com/sindresorhus/is-binary-path) - Check if a filepath is a binary file +- [text-extensions](https://github.com/sindresorhus/text-extensions) - List of text file extensions diff --git a/node_modules/braces/LICENSE b/node_modules/braces/LICENSE new file mode 100644 index 0000000..9af4a67 --- /dev/null +++ b/node_modules/braces/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/braces/README.md b/node_modules/braces/README.md new file mode 100644 index 0000000..f59dd60 --- /dev/null +++ b/node_modules/braces/README.md @@ -0,0 +1,586 @@ +# braces [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM monthly downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![NPM total downloads](https://img.shields.io/npm/dt/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Linux Build Status](https://img.shields.io/travis/micromatch/braces.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/braces) + +> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save braces +``` + +## v3.0.0 Released!! + +See the [changelog](CHANGELOG.md) for details. + +## Why use braces? + +Brace patterns make globs more powerful by adding the ability to match specific ranges and sequences of characters. + +- **Accurate** - complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests) +- **[fast and performant](#benchmarks)** - Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity. +- **Organized code base** - The parser and compiler are easy to maintain and update when edge cases crop up. +- **Well-tested** - Thousands of test assertions, and passes all of the Bash, minimatch, and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests (as of the date this was written). +- **Safer** - You shouldn't have to worry about users defining aggressive or malicious brace patterns that can break your application. Braces takes measures to prevent malicious regex that can be used for DDoS attacks (see [catastrophic backtracking](https://www.regular-expressions.info/catastrophic.html)). +- [Supports lists](#lists) - (aka "sets") `a/{b,c}/d` => `['a/b/d', 'a/c/d']` +- [Supports sequences](#sequences) - (aka "ranges") `{01..03}` => `['01', '02', '03']` +- [Supports steps](#steps) - (aka "increments") `{2..10..2}` => `['2', '4', '6', '8', '10']` +- [Supports escaping](#escaping) - To prevent evaluation of special characters. + +## Usage + +The main export is a function that takes one or more brace `patterns` and `options`. + +```js +const braces = require('braces'); +// braces(patterns[, options]); + +console.log(braces(['{01..05}', '{a..e}'])); +//=> ['(0[1-5])', '([a-e])'] + +console.log(braces(['{01..05}', '{a..e}'], { expand: true })); +//=> ['01', '02', '03', '04', '05', 'a', 'b', 'c', 'd', 'e'] +``` + +### Brace Expansion vs. Compilation + +By default, brace patterns are compiled into strings that are optimized for creating regular expressions and matching. + +**Compiled** + +```js +console.log(braces('a/{x,y,z}/b')); +//=> ['a/(x|y|z)/b'] +console.log(braces(['a/{01..20}/b', 'a/{1..5}/b'])); +//=> [ 'a/(0[1-9]|1[0-9]|20)/b', 'a/([1-5])/b' ] +``` + +**Expanded** + +Enable brace expansion by setting the `expand` option to true, or by using [braces.expand()](#expand) (returns an array similar to what you'd expect from Bash, or `echo {1..5}`, or [minimatch](https://github.com/isaacs/minimatch)): + +```js +console.log(braces('a/{x,y,z}/b', { expand: true })); +//=> ['a/x/b', 'a/y/b', 'a/z/b'] + +console.log(braces.expand('{01..10}')); +//=> ['01','02','03','04','05','06','07','08','09','10'] +``` + +### Lists + +Expand lists (like Bash "sets"): + +```js +console.log(braces('a/{foo,bar,baz}/*.js')); +//=> ['a/(foo|bar|baz)/*.js'] + +console.log(braces.expand('a/{foo,bar,baz}/*.js')); +//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js'] +``` + +### Sequences + +Expand ranges of characters (like Bash "sequences"): + +```js +console.log(braces.expand('{1..3}')); // ['1', '2', '3'] +console.log(braces.expand('a/{1..3}/b')); // ['a/1/b', 'a/2/b', 'a/3/b'] +console.log(braces('{a..c}', { expand: true })); // ['a', 'b', 'c'] +console.log(braces('foo/{a..c}', { expand: true })); // ['foo/a', 'foo/b', 'foo/c'] + +// supports zero-padded ranges +console.log(braces('a/{01..03}/b')); //=> ['a/(0[1-3])/b'] +console.log(braces('a/{001..300}/b')); //=> ['a/(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)/b'] +``` + +See [fill-range](https://github.com/jonschlinkert/fill-range) for all available range-expansion options. + +### Steppped ranges + +Steps, or increments, may be used with ranges: + +```js +console.log(braces.expand('{2..10..2}')); +//=> ['2', '4', '6', '8', '10'] + +console.log(braces('{2..10..2}')); +//=> ['(2|4|6|8|10)'] +``` + +When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion. + +### Nesting + +Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved. + +**"Expanded" braces** + +```js +console.log(braces.expand('a{b,c,/{x,y}}/e')); +//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e'] + +console.log(braces.expand('a/{x,{1..5},y}/c')); +//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c'] +``` + +**"Optimized" braces** + +```js +console.log(braces('a{b,c,/{x,y}}/e')); +//=> ['a(b|c|/(x|y))/e'] + +console.log(braces('a/{x,{1..5},y}/c')); +//=> ['a/(x|([1-5])|y)/c'] +``` + +### Escaping + +**Escaping braces** + +A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_: + +```js +console.log(braces.expand('a\\{d,c,b}e')); +//=> ['a{d,c,b}e'] + +console.log(braces.expand('a{d,c,b\\}e')); +//=> ['a{d,c,b}e'] +``` + +**Escaping commas** + +Commas inside braces may also be escaped: + +```js +console.log(braces.expand('a{b\\,c}d')); +//=> ['a{b,c}d'] + +console.log(braces.expand('a{d\\,c,b}e')); +//=> ['ad,ce', 'abe'] +``` + +**Single items** + +Following bash conventions, a brace pattern is also not expanded when it contains a single character: + +```js +console.log(braces.expand('a{b}c')); +//=> ['a{b}c'] +``` + +## Options + +### options.maxLength + +**Type**: `Number` + +**Default**: `10,000` + +**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera. + +```js +console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error +``` + +### options.expand + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Generate an "expanded" brace pattern (alternatively you can use the `braces.expand()` method, which does the same thing). + +```js +console.log(braces('a/{b,c}/d', { expand: true })); +//=> [ 'a/b/d', 'a/c/d' ] +``` + +### options.nodupes + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Remove duplicates from the returned array. + +### options.rangeLimit + +**Type**: `Number` + +**Default**: `1000` + +**Description**: To prevent malicious patterns from being passed by users, an error is thrown when `braces.expand()` is used or `options.expand` is true and the generated range will exceed the `rangeLimit`. + +You can customize `options.rangeLimit` or set it to `Inifinity` to disable this altogether. + +**Examples** + +```js +// pattern exceeds the "rangeLimit", so it's optimized automatically +console.log(braces.expand('{1..1000}')); +//=> ['([1-9]|[1-9][0-9]{1,2}|1000)'] + +// pattern does not exceed "rangeLimit", so it's NOT optimized +console.log(braces.expand('{1..100}')); +//=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100'] +``` + +### options.transform + +**Type**: `Function` + +**Default**: `undefined` + +**Description**: Customize range expansion. + +**Example: Transforming non-numeric values** + +```js +const alpha = braces.expand('x/{a..e}/y', { + transform(value, index) { + // When non-numeric values are passed, "value" is a character code. + return 'foo/' + String.fromCharCode(value) + '-' + index; + }, +}); +console.log(alpha); +//=> [ 'x/foo/a-0/y', 'x/foo/b-1/y', 'x/foo/c-2/y', 'x/foo/d-3/y', 'x/foo/e-4/y' ] +``` + +**Example: Transforming numeric values** + +```js +const numeric = braces.expand('{1..5}', { + transform(value) { + // when numeric values are passed, "value" is a number + return 'foo/' + value * 2; + }, +}); +console.log(numeric); +//=> [ 'foo/2', 'foo/4', 'foo/6', 'foo/8', 'foo/10' ] +``` + +### options.quantifiers + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times. + +Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists) + +The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists. + +**Examples** + +```js +const braces = require('braces'); +console.log(braces('a/b{1,3}/{x,y,z}')); +//=> [ 'a/b(1|3)/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', { quantifiers: true })); +//=> [ 'a/b{1,3}/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', { quantifiers: true, expand: true })); +//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ] +``` + +### options.keepEscaping + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Do not strip backslashes that were used for escaping from the result. + +## What is "brace expansion"? + +Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs). + +In addition to "expansion", braces are also used for matching. In other words: + +- [brace expansion](#brace-expansion) is for generating new lists +- [brace matching](#brace-matching) is for filtering existing lists + +
+More about brace expansion (click to expand) + +There are two main types of brace expansion: + +1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}` +2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges". + +Here are some example brace patterns to illustrate how they work: + +**Sets** + +``` +{a,b,c} => a b c +{a,b,c}{1,2} => a1 a2 b1 b2 c1 c2 +``` + +**Sequences** + +``` +{1..9} => 1 2 3 4 5 6 7 8 9 +{4..-4} => 4 3 2 1 0 -1 -2 -3 -4 +{1..20..3} => 1 4 7 10 13 16 19 +{a..j} => a b c d e f g h i j +{j..a} => j i h g f e d c b a +{a..z..3} => a d g j m p s v y +``` + +**Combination** + +Sets and sequences can be mixed together or used along with any other strings. + +``` +{a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3 +foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar +``` + +The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases. + +## Brace matching + +In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching. + +For example, the pattern `foo/{1..3}/bar` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +``` + +But not: + +``` +baz/1/qux +baz/2/qux +baz/3/qux +``` + +Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +baz/1/qux +baz/2/qux +baz/3/qux +``` + +## Brace matching pitfalls + +Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of. + +### tldr + +**"brace bombs"** + +- brace expansion can eat up a huge amount of processing resources +- as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially +- users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!) + +For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section. + +### The solution + +Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries. + +### Geometric complexity + +At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`. + +For example, the following sets demonstrate quadratic (`O(n^2)`) complexity: + +``` +{1,2}{3,4} => (2X2) => 13 14 23 24 +{1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246 +``` + +But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity: + +``` +{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248 + 249 257 258 259 267 268 269 347 348 349 357 + 358 359 367 368 369 +``` + +Now, imagine how this complexity grows given that each element is a n-tuple: + +``` +{1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB) +{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB) +``` + +Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control. + +**More information** + +Interested in learning more about brace expansion? + +- [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion) +- [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion) +- [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) + +
+ +## Performance + +Braces is not only screaming fast, it's also more accurate the other brace expansion libraries. + +### Better algorithms + +Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_. + +Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently. + +**The proof is in the numbers** + +Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively. + +| **Pattern** | **braces** | **[minimatch][]** | +| --------------------------- | ------------------- | ---------------------------- | +| `{1..9007199254740991}`[^1] | `298 B` (5ms 459μs) | N/A (freezes) | +| `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) | +| `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) | +| `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) | +| `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) | +| `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) | +| `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) | +| `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) | +| `{1..100000000}` | `33 B` (733μs) | N/A (freezes) | +| `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) | +| `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) | +| `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) | +| `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) | +| `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) | +| `{1..100}` | `22 B` (345μs) | `291 B` (196μs) | +| `{1..10}` | `10 B` (533μs) | `20 B` (37μs) | +| `{1..3}` | `7 B` (190μs) | `5 B` (27μs) | + +### Faster algorithms + +When you need expansion, braces is still much faster. + +_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_ + +| **Pattern** | **braces** | **[minimatch][]** | +| --------------- | --------------------------- | ---------------------------- | +| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) | +| `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) | +| `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) | +| `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) | +| `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) | +| `{1..100}` | `291 B` (424μs) | `291 B` (211μs) | +| `{1..10}` | `20 B` (487μs) | `20 B` (72μs) | +| `{1..3}` | `5 B` (166μs) | `5 B` (27μs) | + +If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js). + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm benchmark +``` + +### Latest results + +Braces is more accurate, without sacrificing performance. + +```bash +● expand - range (expanded) + braces x 53,167 ops/sec ±0.12% (102 runs sampled) + minimatch x 11,378 ops/sec ±0.10% (102 runs sampled) +● expand - range (optimized for regex) + braces x 373,442 ops/sec ±0.04% (100 runs sampled) + minimatch x 3,262 ops/sec ±0.18% (100 runs sampled) +● expand - nested ranges (expanded) + braces x 33,921 ops/sec ±0.09% (99 runs sampled) + minimatch x 10,855 ops/sec ±0.28% (100 runs sampled) +● expand - nested ranges (optimized for regex) + braces x 287,479 ops/sec ±0.52% (98 runs sampled) + minimatch x 3,219 ops/sec ±0.28% (101 runs sampled) +● expand - set (expanded) + braces x 238,243 ops/sec ±0.19% (97 runs sampled) + minimatch x 538,268 ops/sec ±0.31% (96 runs sampled) +● expand - set (optimized for regex) + braces x 321,844 ops/sec ±0.10% (97 runs sampled) + minimatch x 140,600 ops/sec ±0.15% (100 runs sampled) +● expand - nested sets (expanded) + braces x 165,371 ops/sec ±0.42% (96 runs sampled) + minimatch x 337,720 ops/sec ±0.28% (100 runs sampled) +● expand - nested sets (optimized for regex) + braces x 242,948 ops/sec ±0.12% (99 runs sampled) + minimatch x 87,403 ops/sec ±0.79% (96 runs sampled) +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Contributors + +| **Commits** | **Contributor** | +| ----------- | ------------------------------------------------------------- | +| 197 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [es128](https://github.com/es128) | +| 1 | [eush77](https://github.com/eush77) | +| 1 | [hemanth](https://github.com/hemanth) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +- [GitHub Profile](https://github.com/jonschlinkert) +- [Twitter Profile](https://twitter.com/jonschlinkert) +- [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +--- + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._ diff --git a/node_modules/braces/index.js b/node_modules/braces/index.js new file mode 100644 index 0000000..d222c13 --- /dev/null +++ b/node_modules/braces/index.js @@ -0,0 +1,170 @@ +'use strict'; + +const stringify = require('./lib/stringify'); +const compile = require('./lib/compile'); +const expand = require('./lib/expand'); +const parse = require('./lib/parse'); + +/** + * Expand the given pattern or create a regex-compatible string. + * + * ```js + * const braces = require('braces'); + * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] + * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + +const braces = (input, options = {}) => { + let output = []; + + if (Array.isArray(input)) { + for (const pattern of input) { + const result = braces.create(pattern, options); + if (Array.isArray(result)) { + output.push(...result); + } else { + output.push(result); + } + } + } else { + output = [].concat(braces.create(input, options)); + } + + if (options && options.expand === true && options.nodupes === true) { + output = [...new Set(output)]; + } + return output; +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * // braces.parse(pattern, [, options]); + * const ast = braces.parse('a/{b,c}/d'); + * console.log(ast); + * ``` + * @param {String} pattern Brace pattern to parse + * @param {Object} options + * @return {Object} Returns an AST + * @api public + */ + +braces.parse = (input, options = {}) => parse(input, options); + +/** + * Creates a braces string from an AST, or an AST node. + * + * ```js + * const braces = require('braces'); + * let ast = braces.parse('foo/{a,b}/bar'); + * console.log(stringify(ast.nodes[2])); //=> '{a,b}' + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.stringify = (input, options = {}) => { + if (typeof input === 'string') { + return stringify(braces.parse(input, options), options); + } + return stringify(input, options); +}; + +/** + * Compiles a brace pattern into a regex-compatible, optimized string. + * This method is called by the main [braces](#braces) function by default. + * + * ```js + * const braces = require('braces'); + * console.log(braces.compile('a/{b,c}/d')); + * //=> ['a/(b|c)/d'] + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.compile = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + return compile(input, options); +}; + +/** + * Expands a brace pattern into an array. This method is called by the + * main [braces](#braces) function when `options.expand` is true. Before + * using this method it's recommended that you read the [performance notes](#performance)) + * and advantages of using [.compile](#compile) instead. + * + * ```js + * const braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/b/d', 'a/c/d']; + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.expand = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + + let result = expand(input, options); + + // filter out empty strings if specified + if (options.noempty === true) { + result = result.filter(Boolean); + } + + // filter out duplicates if specified + if (options.nodupes === true) { + result = [...new Set(result)]; + } + + return result; +}; + +/** + * Processes a brace pattern and returns either an expanded array + * (if `options.expand` is true), a highly optimized regex-compatible string. + * This method is called by the main [braces](#braces) function. + * + * ```js + * const braces = require('braces'); + * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) + * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.create = (input, options = {}) => { + if (input === '' || input.length < 3) { + return [input]; + } + + return options.expand !== true + ? braces.compile(input, options) + : braces.expand(input, options); +}; + +/** + * Expose "braces" + */ + +module.exports = braces; diff --git a/node_modules/braces/lib/compile.js b/node_modules/braces/lib/compile.js new file mode 100644 index 0000000..dce69be --- /dev/null +++ b/node_modules/braces/lib/compile.js @@ -0,0 +1,60 @@ +'use strict'; + +const fill = require('fill-range'); +const utils = require('./utils'); + +const compile = (ast, options = {}) => { + const walk = (node, parent = {}) => { + const invalidBlock = utils.isInvalidBrace(parent); + const invalidNode = node.invalid === true && options.escapeInvalid === true; + const invalid = invalidBlock === true || invalidNode === true; + const prefix = options.escapeInvalid === true ? '\\' : ''; + let output = ''; + + if (node.isOpen === true) { + return prefix + node.value; + } + + if (node.isClose === true) { + console.log('node.isClose', prefix, node.value); + return prefix + node.value; + } + + if (node.type === 'open') { + return invalid ? prefix + node.value : '('; + } + + if (node.type === 'close') { + return invalid ? prefix + node.value : ')'; + } + + if (node.type === 'comma') { + return node.prev.type === 'comma' ? '' : invalid ? node.value : '|'; + } + + if (node.value) { + return node.value; + } + + if (node.nodes && node.ranges > 0) { + const args = utils.reduce(node.nodes); + const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true }); + + if (range.length !== 0) { + return args.length > 1 && range.length > 1 ? `(${range})` : range; + } + } + + if (node.nodes) { + for (const child of node.nodes) { + output += walk(child, node); + } + } + + return output; + }; + + return walk(ast); +}; + +module.exports = compile; diff --git a/node_modules/braces/lib/constants.js b/node_modules/braces/lib/constants.js new file mode 100644 index 0000000..2bb3b88 --- /dev/null +++ b/node_modules/braces/lib/constants.js @@ -0,0 +1,57 @@ +'use strict'; + +module.exports = { + MAX_LENGTH: 10000, + + // Digits + CHAR_0: '0', /* 0 */ + CHAR_9: '9', /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 'A', /* A */ + CHAR_LOWERCASE_A: 'a', /* a */ + CHAR_UPPERCASE_Z: 'Z', /* Z */ + CHAR_LOWERCASE_Z: 'z', /* z */ + + CHAR_LEFT_PARENTHESES: '(', /* ( */ + CHAR_RIGHT_PARENTHESES: ')', /* ) */ + + CHAR_ASTERISK: '*', /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: '&', /* & */ + CHAR_AT: '@', /* @ */ + CHAR_BACKSLASH: '\\', /* \ */ + CHAR_BACKTICK: '`', /* ` */ + CHAR_CARRIAGE_RETURN: '\r', /* \r */ + CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ + CHAR_COLON: ':', /* : */ + CHAR_COMMA: ',', /* , */ + CHAR_DOLLAR: '$', /* . */ + CHAR_DOT: '.', /* . */ + CHAR_DOUBLE_QUOTE: '"', /* " */ + CHAR_EQUAL: '=', /* = */ + CHAR_EXCLAMATION_MARK: '!', /* ! */ + CHAR_FORM_FEED: '\f', /* \f */ + CHAR_FORWARD_SLASH: '/', /* / */ + CHAR_HASH: '#', /* # */ + CHAR_HYPHEN_MINUS: '-', /* - */ + CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ + CHAR_LEFT_CURLY_BRACE: '{', /* { */ + CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ + CHAR_LINE_FEED: '\n', /* \n */ + CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ + CHAR_PERCENT: '%', /* % */ + CHAR_PLUS: '+', /* + */ + CHAR_QUESTION_MARK: '?', /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ + CHAR_RIGHT_CURLY_BRACE: '}', /* } */ + CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ + CHAR_SEMICOLON: ';', /* ; */ + CHAR_SINGLE_QUOTE: '\'', /* ' */ + CHAR_SPACE: ' ', /* */ + CHAR_TAB: '\t', /* \t */ + CHAR_UNDERSCORE: '_', /* _ */ + CHAR_VERTICAL_LINE: '|', /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ +}; diff --git a/node_modules/braces/lib/expand.js b/node_modules/braces/lib/expand.js new file mode 100644 index 0000000..35b2c41 --- /dev/null +++ b/node_modules/braces/lib/expand.js @@ -0,0 +1,113 @@ +'use strict'; + +const fill = require('fill-range'); +const stringify = require('./stringify'); +const utils = require('./utils'); + +const append = (queue = '', stash = '', enclose = false) => { + const result = []; + + queue = [].concat(queue); + stash = [].concat(stash); + + if (!stash.length) return queue; + if (!queue.length) { + return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; + } + + for (const item of queue) { + if (Array.isArray(item)) { + for (const value of item) { + result.push(append(value, stash, enclose)); + } + } else { + for (let ele of stash) { + if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; + result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); + } + } + } + return utils.flatten(result); +}; + +const expand = (ast, options = {}) => { + const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit; + + const walk = (node, parent = {}) => { + node.queue = []; + + let p = parent; + let q = parent.queue; + + while (p.type !== 'brace' && p.type !== 'root' && p.parent) { + p = p.parent; + q = p.queue; + } + + if (node.invalid || node.dollar) { + q.push(append(q.pop(), stringify(node, options))); + return; + } + + if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { + q.push(append(q.pop(), ['{}'])); + return; + } + + if (node.nodes && node.ranges > 0) { + const args = utils.reduce(node.nodes); + + if (utils.exceedsLimit(...args, options.step, rangeLimit)) { + throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); + } + + let range = fill(...args, options); + if (range.length === 0) { + range = stringify(node, options); + } + + q.push(append(q.pop(), range)); + node.nodes = []; + return; + } + + const enclose = utils.encloseBrace(node); + let queue = node.queue; + let block = node; + + while (block.type !== 'brace' && block.type !== 'root' && block.parent) { + block = block.parent; + queue = block.queue; + } + + for (let i = 0; i < node.nodes.length; i++) { + const child = node.nodes[i]; + + if (child.type === 'comma' && node.type === 'brace') { + if (i === 1) queue.push(''); + queue.push(''); + continue; + } + + if (child.type === 'close') { + q.push(append(q.pop(), queue, enclose)); + continue; + } + + if (child.value && child.type !== 'open') { + queue.push(append(queue.pop(), child.value)); + continue; + } + + if (child.nodes) { + walk(child, node); + } + } + + return queue; + }; + + return utils.flatten(walk(ast)); +}; + +module.exports = expand; diff --git a/node_modules/braces/lib/parse.js b/node_modules/braces/lib/parse.js new file mode 100644 index 0000000..3a6988e --- /dev/null +++ b/node_modules/braces/lib/parse.js @@ -0,0 +1,331 @@ +'use strict'; + +const stringify = require('./stringify'); + +/** + * Constants + */ + +const { + MAX_LENGTH, + CHAR_BACKSLASH, /* \ */ + CHAR_BACKTICK, /* ` */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_RIGHT_SQUARE_BRACKET, /* ] */ + CHAR_DOUBLE_QUOTE, /* " */ + CHAR_SINGLE_QUOTE, /* ' */ + CHAR_NO_BREAK_SPACE, + CHAR_ZERO_WIDTH_NOBREAK_SPACE +} = require('./constants'); + +/** + * parse + */ + +const parse = (input, options = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + const opts = options || {}; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + if (input.length > max) { + throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); + } + + const ast = { type: 'root', input, nodes: [] }; + const stack = [ast]; + let block = ast; + let prev = ast; + let brackets = 0; + const length = input.length; + let index = 0; + let depth = 0; + let value; + + /** + * Helpers + */ + + const advance = () => input[index++]; + const push = node => { + if (node.type === 'text' && prev.type === 'dot') { + prev.type = 'text'; + } + + if (prev && prev.type === 'text' && node.type === 'text') { + prev.value += node.value; + return; + } + + block.nodes.push(node); + node.parent = block; + node.prev = prev; + prev = node; + return node; + }; + + push({ type: 'bos' }); + + while (index < length) { + block = stack[stack.length - 1]; + value = advance(); + + /** + * Invalid chars + */ + + if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { + continue; + } + + /** + * Escaped chars + */ + + if (value === CHAR_BACKSLASH) { + push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); + continue; + } + + /** + * Right square bracket (literal): ']' + */ + + if (value === CHAR_RIGHT_SQUARE_BRACKET) { + push({ type: 'text', value: '\\' + value }); + continue; + } + + /** + * Left square bracket: '[' + */ + + if (value === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + + let next; + + while (index < length && (next = advance())) { + value += next; + + if (next === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + continue; + } + + if (next === CHAR_BACKSLASH) { + value += advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + brackets--; + + if (brackets === 0) { + break; + } + } + } + + push({ type: 'text', value }); + continue; + } + + /** + * Parentheses + */ + + if (value === CHAR_LEFT_PARENTHESES) { + block = push({ type: 'paren', nodes: [] }); + stack.push(block); + push({ type: 'text', value }); + continue; + } + + if (value === CHAR_RIGHT_PARENTHESES) { + if (block.type !== 'paren') { + push({ type: 'text', value }); + continue; + } + block = stack.pop(); + push({ type: 'text', value }); + block = stack[stack.length - 1]; + continue; + } + + /** + * Quotes: '|"|` + */ + + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { + const open = value; + let next; + + if (options.keepQuotes !== true) { + value = ''; + } + + while (index < length && (next = advance())) { + if (next === CHAR_BACKSLASH) { + value += next + advance(); + continue; + } + + if (next === open) { + if (options.keepQuotes === true) value += next; + break; + } + + value += next; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Left curly brace: '{' + */ + + if (value === CHAR_LEFT_CURLY_BRACE) { + depth++; + + const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; + const brace = { + type: 'brace', + open: true, + close: false, + dollar, + depth, + commas: 0, + ranges: 0, + nodes: [] + }; + + block = push(brace); + stack.push(block); + push({ type: 'open', value }); + continue; + } + + /** + * Right curly brace: '}' + */ + + if (value === CHAR_RIGHT_CURLY_BRACE) { + if (block.type !== 'brace') { + push({ type: 'text', value }); + continue; + } + + const type = 'close'; + block = stack.pop(); + block.close = true; + + push({ type, value }); + depth--; + + block = stack[stack.length - 1]; + continue; + } + + /** + * Comma: ',' + */ + + if (value === CHAR_COMMA && depth > 0) { + if (block.ranges > 0) { + block.ranges = 0; + const open = block.nodes.shift(); + block.nodes = [open, { type: 'text', value: stringify(block) }]; + } + + push({ type: 'comma', value }); + block.commas++; + continue; + } + + /** + * Dot: '.' + */ + + if (value === CHAR_DOT && depth > 0 && block.commas === 0) { + const siblings = block.nodes; + + if (depth === 0 || siblings.length === 0) { + push({ type: 'text', value }); + continue; + } + + if (prev.type === 'dot') { + block.range = []; + prev.value += value; + prev.type = 'range'; + + if (block.nodes.length !== 3 && block.nodes.length !== 5) { + block.invalid = true; + block.ranges = 0; + prev.type = 'text'; + continue; + } + + block.ranges++; + block.args = []; + continue; + } + + if (prev.type === 'range') { + siblings.pop(); + + const before = siblings[siblings.length - 1]; + before.value += prev.value + value; + prev = before; + block.ranges--; + continue; + } + + push({ type: 'dot', value }); + continue; + } + + /** + * Text + */ + + push({ type: 'text', value }); + } + + // Mark imbalanced braces and brackets as invalid + do { + block = stack.pop(); + + if (block.type !== 'root') { + block.nodes.forEach(node => { + if (!node.nodes) { + if (node.type === 'open') node.isOpen = true; + if (node.type === 'close') node.isClose = true; + if (!node.nodes) node.type = 'text'; + node.invalid = true; + } + }); + + // get the location of the block on parent.nodes (block's siblings) + const parent = stack[stack.length - 1]; + const index = parent.nodes.indexOf(block); + // replace the (invalid) block with it's nodes + parent.nodes.splice(index, 1, ...block.nodes); + } + } while (stack.length > 0); + + push({ type: 'eos' }); + return ast; +}; + +module.exports = parse; diff --git a/node_modules/braces/lib/stringify.js b/node_modules/braces/lib/stringify.js new file mode 100644 index 0000000..8bcf872 --- /dev/null +++ b/node_modules/braces/lib/stringify.js @@ -0,0 +1,32 @@ +'use strict'; + +const utils = require('./utils'); + +module.exports = (ast, options = {}) => { + const stringify = (node, parent = {}) => { + const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); + const invalidNode = node.invalid === true && options.escapeInvalid === true; + let output = ''; + + if (node.value) { + if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { + return '\\' + node.value; + } + return node.value; + } + + if (node.value) { + return node.value; + } + + if (node.nodes) { + for (const child of node.nodes) { + output += stringify(child); + } + } + return output; + }; + + return stringify(ast); +}; + diff --git a/node_modules/braces/lib/utils.js b/node_modules/braces/lib/utils.js new file mode 100644 index 0000000..d19311f --- /dev/null +++ b/node_modules/braces/lib/utils.js @@ -0,0 +1,122 @@ +'use strict'; + +exports.isInteger = num => { + if (typeof num === 'number') { + return Number.isInteger(num); + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isInteger(Number(num)); + } + return false; +}; + +/** + * Find a node of the given type + */ + +exports.find = (node, type) => node.nodes.find(node => node.type === type); + +/** + * Find a node of the given type + */ + +exports.exceedsLimit = (min, max, step = 1, limit) => { + if (limit === false) return false; + if (!exports.isInteger(min) || !exports.isInteger(max)) return false; + return ((Number(max) - Number(min)) / Number(step)) >= limit; +}; + +/** + * Escape the given node with '\\' before node.value + */ + +exports.escapeNode = (block, n = 0, type) => { + const node = block.nodes[n]; + if (!node) return; + + if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { + if (node.escaped !== true) { + node.value = '\\' + node.value; + node.escaped = true; + } + } +}; + +/** + * Returns true if the given brace node should be enclosed in literal braces + */ + +exports.encloseBrace = node => { + if (node.type !== 'brace') return false; + if ((node.commas >> 0 + node.ranges >> 0) === 0) { + node.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a brace node is invalid. + */ + +exports.isInvalidBrace = block => { + if (block.type !== 'brace') return false; + if (block.invalid === true || block.dollar) return true; + if ((block.commas >> 0 + block.ranges >> 0) === 0) { + block.invalid = true; + return true; + } + if (block.open !== true || block.close !== true) { + block.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a node is an open or close node + */ + +exports.isOpenOrClose = node => { + if (node.type === 'open' || node.type === 'close') { + return true; + } + return node.open === true || node.close === true; +}; + +/** + * Reduce an array of text nodes. + */ + +exports.reduce = nodes => nodes.reduce((acc, node) => { + if (node.type === 'text') acc.push(node.value); + if (node.type === 'range') node.type = 'text'; + return acc; +}, []); + +/** + * Flatten an array + */ + +exports.flatten = (...args) => { + const result = []; + + const flat = arr => { + for (let i = 0; i < arr.length; i++) { + const ele = arr[i]; + + if (Array.isArray(ele)) { + flat(ele); + continue; + } + + if (ele !== undefined) { + result.push(ele); + } + } + return result; + }; + + flat(args); + return result; +}; diff --git a/node_modules/braces/package.json b/node_modules/braces/package.json new file mode 100644 index 0000000..c3c056e --- /dev/null +++ b/node_modules/braces/package.json @@ -0,0 +1,77 @@ +{ + "name": "braces", + "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", + "version": "3.0.3", + "homepage": "https://github.com/micromatch/braces", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Elan Shanker (https://github.com/es128)", + "Eugene Sharygin (https://github.com/eush77)", + "hemanth.hm (http://h3manth.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/braces", + "bugs": { + "url": "https://github.com/micromatch/braces/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "mocha", + "benchmark": "node benchmark" + }, + "dependencies": { + "fill-range": "^7.1.1" + }, + "devDependencies": { + "ansi-colors": "^3.2.4", + "bash-path": "^2.0.1", + "gulp-format-md": "^2.0.0", + "mocha": "^6.1.1" + }, + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "braces", + "expand", + "expansion", + "filepath", + "fill", + "fs", + "glob", + "globbing", + "letter", + "match", + "matches", + "matching", + "number", + "numerical", + "path", + "range", + "ranges", + "sh" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + }, + "plugins": [ + "gulp-format-md" + ] + } +} diff --git a/node_modules/camelcase-css/README.md b/node_modules/camelcase-css/README.md new file mode 100644 index 0000000..caaa817 --- /dev/null +++ b/node_modules/camelcase-css/README.md @@ -0,0 +1,27 @@ +# camelcase-css [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] + +> Convert a kebab-cased CSS property into a camelCased DOM property. + + +## Installation +[Node.js](http://nodejs.org/) `>= 6` is required. Type this at the command line: +```shell +npm install camelcase-css +``` + + +## Usage +```js +const camelCaseCSS = require('camelcase-css'); + +camelCaseCSS('-webkit-border-radius'); //-> WebkitBorderRadius +camelCaseCSS('-moz-border-radius'); //-> MozBorderRadius +camelCaseCSS('-ms-border-radius'); //-> msBorderRadius +camelCaseCSS('border-radius'); //-> borderRadius +``` + + +[npm-image]: https://img.shields.io/npm/v/camelcase-css.svg +[npm-url]: https://npmjs.org/package/camelcase-css +[travis-image]: https://img.shields.io/travis/stevenvachon/camelcase-css.svg +[travis-url]: https://travis-ci.org/stevenvachon/camelcase-css diff --git a/node_modules/camelcase-css/index-es5.js b/node_modules/camelcase-css/index-es5.js new file mode 100644 index 0000000..48ef078 --- /dev/null +++ b/node_modules/camelcase-css/index-es5.js @@ -0,0 +1,24 @@ +"use strict"; + +var pattern = /-(\w|$)/g; + +var callback = function callback(dashChar, char) { + return char.toUpperCase(); +}; + +var camelCaseCSS = function camelCaseCSS(property) { + property = property.toLowerCase(); + + // NOTE :: IE8's "styleFloat" is intentionally not supported + if (property === "float") { + return "cssFloat"; + } + // Microsoft vendor-prefixes are uniquely cased + else if (property.charCodeAt(0) === 45&& property.charCodeAt(1) === 109&& property.charCodeAt(2) === 115&& property.charCodeAt(3) === 45) { + return property.substr(1).replace(pattern, callback); + } else { + return property.replace(pattern, callback); + } +}; + +module.exports = camelCaseCSS; diff --git a/node_modules/camelcase-css/index.js b/node_modules/camelcase-css/index.js new file mode 100644 index 0000000..c9d1f1b --- /dev/null +++ b/node_modules/camelcase-css/index.js @@ -0,0 +1,30 @@ +"use strict"; +const pattern = /-(\w|$)/g; + +const callback = (dashChar, char) => char.toUpperCase(); + + + +const camelCaseCSS = property => +{ + property = property.toLowerCase(); + + // NOTE :: IE8's "styleFloat" is intentionally not supported + if (property === "float") + { + return "cssFloat"; + } + // Microsoft vendor-prefixes are uniquely cased + else if (property.startsWith("-ms-")) + { + return property.substr(1).replace(pattern, callback); + } + else + { + return property.replace(pattern, callback); + } +}; + + + +module.exports = camelCaseCSS; diff --git a/node_modules/camelcase-css/license b/node_modules/camelcase-css/license new file mode 100644 index 0000000..b760007 --- /dev/null +++ b/node_modules/camelcase-css/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Steven Vachon (svachon.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/camelcase-css/package.json b/node_modules/camelcase-css/package.json new file mode 100644 index 0000000..61dc51a --- /dev/null +++ b/node_modules/camelcase-css/package.json @@ -0,0 +1,34 @@ +{ + "name": "camelcase-css", + "description": "Convert a kebab-cased CSS property into a camelCased DOM property.", + "version": "2.0.1", + "license": "MIT", + "author": "Steven Vachon (https://www.svachon.com/)", + "repository": "stevenvachon/camelcase-css", + "browser": "index-es5.js", + "devDependencies": { + "babel-cli": "^6.26.0", + "babel-core": "^6.26.3", + "babel-plugin-optimize-starts-with": "^1.0.1", + "babel-preset-env": "^1.7.0", + "chai": "^4.1.2", + "mocha": "^5.2.0" + }, + "engines": { + "node": ">= 6" + }, + "scripts": { + "pretest": "babel index.js --out-file=index-es5.js --presets=env --plugins=optimize-starts-with", + "test": "mocha test.js --check-leaks --bail" + }, + "files": [ + "index.js", + "index-es5.js" + ], + "keywords": [ + "camelcase", + "case", + "css", + "dom" + ] +} diff --git a/node_modules/chokidar/LICENSE b/node_modules/chokidar/LICENSE new file mode 100644 index 0000000..fa9162b --- /dev/null +++ b/node_modules/chokidar/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/chokidar/README.md b/node_modules/chokidar/README.md new file mode 100644 index 0000000..8e25dec --- /dev/null +++ b/node_modules/chokidar/README.md @@ -0,0 +1,308 @@ +# Chokidar [![Weekly downloads](https://img.shields.io/npm/dw/chokidar.svg)](https://github.com/paulmillr/chokidar) [![Yearly downloads](https://img.shields.io/npm/dy/chokidar.svg)](https://github.com/paulmillr/chokidar) + +> Minimal and efficient cross-platform file watching library + +[![NPM](https://nodei.co/npm/chokidar.png)](https://www.npmjs.com/package/chokidar) + +## Why? + +Node.js `fs.watch`: + +* Doesn't report filenames on MacOS. +* Doesn't report events at all when using editors like Sublime on MacOS. +* Often reports events twice. +* Emits most changes as `rename`. +* Does not provide an easy way to recursively watch file trees. +* Does not support recursive watching on Linux. + +Node.js `fs.watchFile`: + +* Almost as bad at event handling. +* Also does not provide any recursive watching. +* Results in high CPU utilization. + +Chokidar resolves these problems. + +Initially made for **[Brunch](https://brunch.io/)** (an ultra-swift web app build tool), it is now used in +[Microsoft's Visual Studio Code](https://github.com/microsoft/vscode), +[gulp](https://github.com/gulpjs/gulp/), +[karma](https://karma-runner.github.io/), +[PM2](https://github.com/Unitech/PM2), +[browserify](http://browserify.org/), +[webpack](https://webpack.github.io/), +[BrowserSync](https://www.browsersync.io/), +and [many others](https://www.npmjs.com/browse/depended/chokidar). +It has proven itself in production environments. + +Version 3 is out! Check out our blog post about it: [Chokidar 3: How to save 32TB of traffic every week](https://paulmillr.com/posts/chokidar-3-save-32tb-of-traffic/) + +## How? + +Chokidar does still rely on the Node.js core `fs` module, but when using +`fs.watch` and `fs.watchFile` for watching, it normalizes the events it +receives, often checking for truth by getting file stats and/or dir contents. + +On MacOS, chokidar by default uses a native extension exposing the Darwin +`FSEvents` API. This provides very efficient recursive watching compared with +implementations like `kqueue` available on most \*nix platforms. Chokidar still +does have to do some work to normalize the events received that way as well. + +On most other platforms, the `fs.watch`-based implementation is the default, which +avoids polling and keeps CPU usage down. Be advised that chokidar will initiate +watchers recursively for everything within scope of the paths that have been +specified, so be judicious about not wasting system resources by watching much +more than needed. + +## Getting started + +Install with npm: + +```sh +npm install chokidar +``` + +Then `require` and use it in your code: + +```javascript +const chokidar = require('chokidar'); + +// One-liner for current directory +chokidar.watch('.').on('all', (event, path) => { + console.log(event, path); +}); +``` + +## API + +```javascript +// Example of a more typical implementation structure + +// Initialize watcher. +const watcher = chokidar.watch('file, dir, glob, or array', { + ignored: /(^|[\/\\])\../, // ignore dotfiles + persistent: true +}); + +// Something to use when events are received. +const log = console.log.bind(console); +// Add event listeners. +watcher + .on('add', path => log(`File ${path} has been added`)) + .on('change', path => log(`File ${path} has been changed`)) + .on('unlink', path => log(`File ${path} has been removed`)); + +// More possible events. +watcher + .on('addDir', path => log(`Directory ${path} has been added`)) + .on('unlinkDir', path => log(`Directory ${path} has been removed`)) + .on('error', error => log(`Watcher error: ${error}`)) + .on('ready', () => log('Initial scan complete. Ready for changes')) + .on('raw', (event, path, details) => { // internal + log('Raw event info:', event, path, details); + }); + +// 'add', 'addDir' and 'change' events also receive stat() results as second +// argument when available: https://nodejs.org/api/fs.html#fs_class_fs_stats +watcher.on('change', (path, stats) => { + if (stats) console.log(`File ${path} changed size to ${stats.size}`); +}); + +// Watch new files. +watcher.add('new-file'); +watcher.add(['new-file-2', 'new-file-3', '**/other-file*']); + +// Get list of actual paths being watched on the filesystem +var watchedPaths = watcher.getWatched(); + +// Un-watch some files. +await watcher.unwatch('new-file*'); + +// Stop watching. +// The method is async! +watcher.close().then(() => console.log('closed')); + +// Full list of options. See below for descriptions. +// Do not use this example! +chokidar.watch('file', { + persistent: true, + + ignored: '*.txt', + ignoreInitial: false, + followSymlinks: true, + cwd: '.', + disableGlobbing: false, + + usePolling: false, + interval: 100, + binaryInterval: 300, + alwaysStat: false, + depth: 99, + awaitWriteFinish: { + stabilityThreshold: 2000, + pollInterval: 100 + }, + + ignorePermissionErrors: false, + atomic: true // or a custom 'atomicity delay', in milliseconds (default 100) +}); + +``` + +`chokidar.watch(paths, [options])` + +* `paths` (string or array of strings). Paths to files, dirs to be watched +recursively, or glob patterns. + - Note: globs must not contain windows separators (`\`), + because that's how they work by the standard — + you'll need to replace them with forward slashes (`/`). + - Note 2: for additional glob documentation, check out low-level + library: [picomatch](https://github.com/micromatch/picomatch). +* `options` (object) Options object as defined below: + +#### Persistence + +* `persistent` (default: `true`). Indicates whether the process +should continue to run as long as files are being watched. If set to +`false` when using `fsevents` to watch, no more events will be emitted +after `ready`, even if the process continues to run. + +#### Path filtering + +* `ignored` ([anymatch](https://github.com/es128/anymatch)-compatible definition) +Defines files/paths to be ignored. The whole relative or absolute path is +tested, not just filename. If a function with two arguments is provided, it +gets called twice per path - once with a single argument (the path), second +time with two arguments (the path and the +[`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) +object of that path). +* `ignoreInitial` (default: `false`). If set to `false` then `add`/`addDir` events are also emitted for matching paths while +instantiating the watching as chokidar discovers these file paths (before the `ready` event). +* `followSymlinks` (default: `true`). When `false`, only the +symlinks themselves will be watched for changes instead of following +the link references and bubbling events through the link's path. +* `cwd` (no default). The base directory from which watch `paths` are to be +derived. Paths emitted with events will be relative to this. +* `disableGlobbing` (default: `false`). If set to `true` then the strings passed to `.watch()` and `.add()` are treated as +literal path names, even if they look like globs. + +#### Performance + +* `usePolling` (default: `false`). +Whether to use fs.watchFile (backed by polling), or fs.watch. If polling +leads to high CPU utilization, consider setting this to `false`. It is +typically necessary to **set this to `true` to successfully watch files over +a network**, and it may be necessary to successfully watch files in other +non-standard situations. Setting to `true` explicitly on MacOS overrides the +`useFsEvents` default. You may also set the CHOKIDAR_USEPOLLING env variable +to true (1) or false (0) in order to override this option. +* _Polling-specific settings_ (effective when `usePolling: true`) + * `interval` (default: `100`). Interval of file system polling, in milliseconds. You may also + set the CHOKIDAR_INTERVAL env variable to override this option. + * `binaryInterval` (default: `300`). Interval of file system + polling for binary files. + ([see list of binary extensions](https://github.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json)) +* `useFsEvents` (default: `true` on MacOS). Whether to use the +`fsevents` watching interface if available. When set to `true` explicitly +and `fsevents` is available this supercedes the `usePolling` setting. When +set to `false` on MacOS, `usePolling: true` becomes the default. +* `alwaysStat` (default: `false`). If relying upon the +[`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) +object that may get passed with `add`, `addDir`, and `change` events, set +this to `true` to ensure it is provided even in cases where it wasn't +already available from the underlying watch events. +* `depth` (default: `undefined`). If set, limits how many levels of +subdirectories will be traversed. +* `awaitWriteFinish` (default: `false`). +By default, the `add` event will fire when a file first appears on disk, before +the entire file has been written. Furthermore, in some cases some `change` +events will be emitted while the file is being written. In some cases, +especially when watching for large files there will be a need to wait for the +write operation to finish before responding to a file creation or modification. +Setting `awaitWriteFinish` to `true` (or a truthy value) will poll file size, +holding its `add` and `change` events until the size does not change for a +configurable amount of time. The appropriate duration setting is heavily +dependent on the OS and hardware. For accurate detection this parameter should +be relatively high, making file watching much less responsive. +Use with caution. + * *`options.awaitWriteFinish` can be set to an object in order to adjust + timing params:* + * `awaitWriteFinish.stabilityThreshold` (default: 2000). Amount of time in + milliseconds for a file size to remain constant before emitting its event. + * `awaitWriteFinish.pollInterval` (default: 100). File size polling interval, in milliseconds. + +#### Errors + +* `ignorePermissionErrors` (default: `false`). Indicates whether to watch files +that don't have read permissions if possible. If watching fails due to `EPERM` +or `EACCES` with this set to `true`, the errors will be suppressed silently. +* `atomic` (default: `true` if `useFsEvents` and `usePolling` are `false`). +Automatically filters out artifacts that occur when using editors that use +"atomic writes" instead of writing directly to the source file. If a file is +re-added within 100 ms of being deleted, Chokidar emits a `change` event +rather than `unlink` then `add`. If the default of 100 ms does not work well +for you, you can override it by setting `atomic` to a custom value, in +milliseconds. + +### Methods & Events + +`chokidar.watch()` produces an instance of `FSWatcher`. Methods of `FSWatcher`: + +* `.add(path / paths)`: Add files, directories, or glob patterns for tracking. +Takes an array of strings or just one string. +* `.on(event, callback)`: Listen for an FS event. +Available events: `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `ready`, +`raw`, `error`. +Additionally `all` is available which gets emitted with the underlying event +name and path for every event other than `ready`, `raw`, and `error`. `raw` is internal, use it carefully. +* `.unwatch(path / paths)`: Stop watching files, directories, or glob patterns. +Takes an array of strings or just one string. +* `.close()`: **async** Removes all listeners from watched files. Asynchronous, returns Promise. Use with `await` to ensure bugs don't happen. +* `.getWatched()`: Returns an object representing all the paths on the file +system being watched by this `FSWatcher` instance. The object's keys are all the +directories (using absolute paths unless the `cwd` option was used), and the +values are arrays of the names of the items contained in each directory. + +## CLI + +If you need a CLI interface for your file watching, check out +[chokidar-cli](https://github.com/open-cli-tools/chokidar-cli), allowing you to +execute a command on each change, or get a stdio stream of change events. + +## Install Troubleshooting + +* `npm WARN optional dep failed, continuing fsevents@n.n.n` + * This message is normal part of how `npm` handles optional dependencies and is + not indicative of a problem. Even if accompanied by other related error messages, + Chokidar should function properly. + +* `TypeError: fsevents is not a constructor` + * Update chokidar by doing `rm -rf node_modules package-lock.json yarn.lock && npm install`, or update your dependency that uses chokidar. + +* Chokidar is producing `ENOSP` error on Linux, like this: + * `bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell` + `Error: watch /home/ ENOSPC` + * This means Chokidar ran out of file handles and you'll need to increase their count by executing the following command in Terminal: + `echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p` + +## Changelog + +For more detailed changelog, see [`full_changelog.md`](.github/full_changelog.md). +- **v3.5 (Jan 6, 2021):** Support for ARM Macs with Apple Silicon. Fixes for deleted symlinks. +- **v3.4 (Apr 26, 2020):** Support for directory-based symlinks. Fixes for macos file replacement. +- **v3.3 (Nov 2, 2019):** `FSWatcher#close()` method became async. That fixes IO race conditions related to close method. +- **v3.2 (Oct 1, 2019):** Improve Linux RAM usage by 50%. Race condition fixes. Windows glob fixes. Improve stability by using tight range of dependency versions. +- **v3.1 (Sep 16, 2019):** dotfiles are no longer filtered out by default. Use `ignored` option if needed. Improve initial Linux scan time by 50%. +- **v3 (Apr 30, 2019):** massive CPU & RAM consumption improvements; reduces deps / package size by a factor of 17x and bumps Node.js requirement to v8.16 and higher. +- **v2 (Dec 29, 2017):** Globs are now posix-style-only; without windows support. Tons of bugfixes. +- **v1 (Apr 7, 2015):** Glob support, symlink support, tons of bugfixes. Node 0.8+ is supported +- **v0.1 (Apr 20, 2012):** Initial release, extracted from [Brunch](https://github.com/brunch/brunch/blob/9847a065aea300da99bd0753f90354cde9de1261/src/helpers.coffee#L66) + +## Also + +Why was chokidar named this way? What's the meaning behind it? + +>Chowkidar is a transliteration of a Hindi word meaning 'watchman, gatekeeper', चौकीदार. This ultimately comes from Sanskrit _ चतुष्क_ (crossway, quadrangle, consisting-of-four). This word is also used in other languages like Urdu as (چوکیدار) which is widely used in Pakistan and India. + +## License + +MIT (c) Paul Miller (), see [LICENSE](LICENSE) file. diff --git a/node_modules/chokidar/index.js b/node_modules/chokidar/index.js new file mode 100644 index 0000000..8752893 --- /dev/null +++ b/node_modules/chokidar/index.js @@ -0,0 +1,973 @@ +'use strict'; + +const { EventEmitter } = require('events'); +const fs = require('fs'); +const sysPath = require('path'); +const { promisify } = require('util'); +const readdirp = require('readdirp'); +const anymatch = require('anymatch').default; +const globParent = require('glob-parent'); +const isGlob = require('is-glob'); +const braces = require('braces'); +const normalizePath = require('normalize-path'); + +const NodeFsHandler = require('./lib/nodefs-handler'); +const FsEventsHandler = require('./lib/fsevents-handler'); +const { + EV_ALL, + EV_READY, + EV_ADD, + EV_CHANGE, + EV_UNLINK, + EV_ADD_DIR, + EV_UNLINK_DIR, + EV_RAW, + EV_ERROR, + + STR_CLOSE, + STR_END, + + BACK_SLASH_RE, + DOUBLE_SLASH_RE, + SLASH_OR_BACK_SLASH_RE, + DOT_RE, + REPLACER_RE, + + SLASH, + SLASH_SLASH, + BRACE_START, + BANG, + ONE_DOT, + TWO_DOTS, + GLOBSTAR, + SLASH_GLOBSTAR, + ANYMATCH_OPTS, + STRING_TYPE, + FUNCTION_TYPE, + EMPTY_STR, + EMPTY_FN, + + isWindows, + isMacos, + isIBMi +} = require('./lib/constants'); + +const stat = promisify(fs.stat); +const readdir = promisify(fs.readdir); + +/** + * @typedef {String} Path + * @typedef {'all'|'add'|'addDir'|'change'|'unlink'|'unlinkDir'|'raw'|'error'|'ready'} EventName + * @typedef {'readdir'|'watch'|'add'|'remove'|'change'} ThrottleType + */ + +/** + * + * @typedef {Object} WatchHelpers + * @property {Boolean} followSymlinks + * @property {'stat'|'lstat'} statMethod + * @property {Path} path + * @property {Path} watchPath + * @property {Function} entryPath + * @property {Boolean} hasGlob + * @property {Object} globFilter + * @property {Function} filterPath + * @property {Function} filterDir + */ + +const arrify = (value = []) => Array.isArray(value) ? value : [value]; +const flatten = (list, result = []) => { + list.forEach(item => { + if (Array.isArray(item)) { + flatten(item, result); + } else { + result.push(item); + } + }); + return result; +}; + +const unifyPaths = (paths_) => { + /** + * @type {Array} + */ + const paths = flatten(arrify(paths_)); + if (!paths.every(p => typeof p === STRING_TYPE)) { + throw new TypeError(`Non-string provided as watch path: ${paths}`); + } + return paths.map(normalizePathToUnix); +}; + +// If SLASH_SLASH occurs at the beginning of path, it is not replaced +// because "//StoragePC/DrivePool/Movies" is a valid network path +const toUnix = (string) => { + let str = string.replace(BACK_SLASH_RE, SLASH); + let prepend = false; + if (str.startsWith(SLASH_SLASH)) { + prepend = true; + } + while (str.match(DOUBLE_SLASH_RE)) { + str = str.replace(DOUBLE_SLASH_RE, SLASH); + } + if (prepend) { + str = SLASH + str; + } + return str; +}; + +// Our version of upath.normalize +// TODO: this is not equal to path-normalize module - investigate why +const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path))); + +const normalizeIgnored = (cwd = EMPTY_STR) => (path) => { + if (typeof path !== STRING_TYPE) return path; + return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path)); +}; + +const getAbsolutePath = (path, cwd) => { + if (sysPath.isAbsolute(path)) { + return path; + } + if (path.startsWith(BANG)) { + return BANG + sysPath.join(cwd, path.slice(1)); + } + return sysPath.join(cwd, path); +}; + +const undef = (opts, key) => opts[key] === undefined; + +/** + * Directory entry. + * @property {Path} path + * @property {Set} items + */ +class DirEntry { + /** + * @param {Path} dir + * @param {Function} removeWatcher + */ + constructor(dir, removeWatcher) { + this.path = dir; + this._removeWatcher = removeWatcher; + /** @type {Set} */ + this.items = new Set(); + } + + add(item) { + const {items} = this; + if (!items) return; + if (item !== ONE_DOT && item !== TWO_DOTS) items.add(item); + } + + async remove(item) { + const {items} = this; + if (!items) return; + items.delete(item); + if (items.size > 0) return; + + const dir = this.path; + try { + await readdir(dir); + } catch (err) { + if (this._removeWatcher) { + this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir)); + } + } + } + + has(item) { + const {items} = this; + if (!items) return; + return items.has(item); + } + + /** + * @returns {Array} + */ + getChildren() { + const {items} = this; + if (!items) return; + return [...items.values()]; + } + + dispose() { + this.items.clear(); + delete this.path; + delete this._removeWatcher; + delete this.items; + Object.freeze(this); + } +} + +const STAT_METHOD_F = 'stat'; +const STAT_METHOD_L = 'lstat'; +class WatchHelper { + constructor(path, watchPath, follow, fsw) { + this.fsw = fsw; + this.path = path = path.replace(REPLACER_RE, EMPTY_STR); + this.watchPath = watchPath; + this.fullWatchPath = sysPath.resolve(watchPath); + this.hasGlob = watchPath !== path; + /** @type {object|boolean} */ + if (path === EMPTY_STR) this.hasGlob = false; + this.globSymlink = this.hasGlob && follow ? undefined : false; + this.globFilter = this.hasGlob ? anymatch(path, undefined, ANYMATCH_OPTS) : false; + this.dirParts = this.getDirParts(path); + this.dirParts.forEach((parts) => { + if (parts.length > 1) parts.pop(); + }); + this.followSymlinks = follow; + this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L; + } + + checkGlobSymlink(entry) { + // only need to resolve once + // first entry should always have entry.parentDir === EMPTY_STR + if (this.globSymlink === undefined) { + this.globSymlink = entry.fullParentDir === this.fullWatchPath ? + false : {realPath: entry.fullParentDir, linkPath: this.fullWatchPath}; + } + + if (this.globSymlink) { + return entry.fullPath.replace(this.globSymlink.realPath, this.globSymlink.linkPath); + } + + return entry.fullPath; + } + + entryPath(entry) { + return sysPath.join(this.watchPath, + sysPath.relative(this.watchPath, this.checkGlobSymlink(entry)) + ); + } + + filterPath(entry) { + const {stats} = entry; + if (stats && stats.isSymbolicLink()) return this.filterDir(entry); + const resolvedPath = this.entryPath(entry); + const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ? + this.globFilter(resolvedPath) : true; + return matchesGlob && + this.fsw._isntIgnored(resolvedPath, stats) && + this.fsw._hasReadPermissions(stats); + } + + getDirParts(path) { + if (!this.hasGlob) return []; + const parts = []; + const expandedPath = path.includes(BRACE_START) ? braces.expand(path) : [path]; + expandedPath.forEach((path) => { + parts.push(sysPath.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE)); + }); + return parts; + } + + filterDir(entry) { + if (this.hasGlob) { + const entryParts = this.getDirParts(this.checkGlobSymlink(entry)); + let globstar = false; + this.unmatchedGlob = !this.dirParts.some((parts) => { + return parts.every((part, i) => { + if (part === GLOBSTAR) globstar = true; + return globstar || !entryParts[0][i] || anymatch(part, entryParts[0][i], ANYMATCH_OPTS); + }); + }); + } + return !this.unmatchedGlob && this.fsw._isntIgnored(this.entryPath(entry), entry.stats); + } +} + +/** + * Watches files & directories for changes. Emitted events: + * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error` + * + * new FSWatcher() + * .add(directories) + * .on('add', path => log('File', path, 'was added')) + */ +class FSWatcher extends EventEmitter { +// Not indenting methods for history sake; for now. +constructor(_opts) { + super(); + + const opts = {}; + if (_opts) Object.assign(opts, _opts); // for frozen objects + + /** @type {Map} */ + this._watched = new Map(); + /** @type {Map} */ + this._closers = new Map(); + /** @type {Set} */ + this._ignoredPaths = new Set(); + + /** @type {Map} */ + this._throttled = new Map(); + + /** @type {Map} */ + this._symlinkPaths = new Map(); + + this._streams = new Set(); + this.closed = false; + + // Set up default options. + if (undef(opts, 'persistent')) opts.persistent = true; + if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false; + if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false; + if (undef(opts, 'interval')) opts.interval = 100; + if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300; + if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false; + opts.enableBinaryInterval = opts.binaryInterval !== opts.interval; + + // Enable fsevents on OS X when polling isn't explicitly enabled. + if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling; + + // If we can't use fsevents, ensure the options reflect it's disabled. + const canUseFsEvents = FsEventsHandler.canUse(); + if (!canUseFsEvents) opts.useFsEvents = false; + + // Use polling on Mac if not using fsevents. + // Other platforms use non-polling fs_watch. + if (undef(opts, 'usePolling') && !opts.useFsEvents) { + opts.usePolling = isMacos; + } + + // Always default to polling on IBM i because fs.watch() is not available on IBM i. + if(isIBMi) { + opts.usePolling = true; + } + + // Global override (useful for end-developers that need to force polling for all + // instances of chokidar, regardless of usage/dependency depth) + const envPoll = process.env.CHOKIDAR_USEPOLLING; + if (envPoll !== undefined) { + const envLower = envPoll.toLowerCase(); + + if (envLower === 'false' || envLower === '0') { + opts.usePolling = false; + } else if (envLower === 'true' || envLower === '1') { + opts.usePolling = true; + } else { + opts.usePolling = !!envLower; + } + } + const envInterval = process.env.CHOKIDAR_INTERVAL; + if (envInterval) { + opts.interval = Number.parseInt(envInterval, 10); + } + + // Editor atomic write normalization enabled by default with fs.watch + if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents; + if (opts.atomic) this._pendingUnlinks = new Map(); + + if (undef(opts, 'followSymlinks')) opts.followSymlinks = true; + + if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false; + if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {}; + const awf = opts.awaitWriteFinish; + if (awf) { + if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000; + if (!awf.pollInterval) awf.pollInterval = 100; + this._pendingWrites = new Map(); + } + if (opts.ignored) opts.ignored = arrify(opts.ignored); + + let readyCalls = 0; + this._emitReady = () => { + readyCalls++; + if (readyCalls >= this._readyCount) { + this._emitReady = EMPTY_FN; + this._readyEmitted = true; + // use process.nextTick to allow time for listener to be bound + process.nextTick(() => this.emit(EV_READY)); + } + }; + this._emitRaw = (...args) => this.emit(EV_RAW, ...args); + this._readyEmitted = false; + this.options = opts; + + // Initialize with proper watcher. + if (opts.useFsEvents) { + this._fsEventsHandler = new FsEventsHandler(this); + } else { + this._nodeFsHandler = new NodeFsHandler(this); + } + + // You’re frozen when your heart’s not open. + Object.freeze(opts); +} + +// Public methods + +/** + * Adds paths to be watched on an existing FSWatcher instance + * @param {Path|Array} paths_ + * @param {String=} _origAdd private; for handling non-existent paths to be watched + * @param {Boolean=} _internal private; indicates a non-user add + * @returns {FSWatcher} for chaining + */ +add(paths_, _origAdd, _internal) { + const {cwd, disableGlobbing} = this.options; + this.closed = false; + let paths = unifyPaths(paths_); + if (cwd) { + paths = paths.map((path) => { + const absPath = getAbsolutePath(path, cwd); + + // Check `path` instead of `absPath` because the cwd portion can't be a glob + if (disableGlobbing || !isGlob(path)) { + return absPath; + } + return normalizePath(absPath); + }); + } + + // set aside negated glob strings + paths = paths.filter((path) => { + if (path.startsWith(BANG)) { + this._ignoredPaths.add(path.slice(1)); + return false; + } + + // if a path is being added that was previously ignored, stop ignoring it + this._ignoredPaths.delete(path); + this._ignoredPaths.delete(path + SLASH_GLOBSTAR); + + // reset the cached userIgnored anymatch fn + // to make ignoredPaths changes effective + this._userIgnored = undefined; + + return true; + }); + + if (this.options.useFsEvents && this._fsEventsHandler) { + if (!this._readyCount) this._readyCount = paths.length; + if (this.options.persistent) this._readyCount += paths.length; + paths.forEach((path) => this._fsEventsHandler._addToFsEvents(path)); + } else { + if (!this._readyCount) this._readyCount = 0; + this._readyCount += paths.length; + Promise.all( + paths.map(async path => { + const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, 0, 0, _origAdd); + if (res) this._emitReady(); + return res; + }) + ).then(results => { + if (this.closed) return; + results.filter(item => item).forEach(item => { + this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item)); + }); + }); + } + + return this; +} + +/** + * Close watchers or start ignoring events from specified paths. + * @param {Path|Array} paths_ - string or array of strings, file/directory paths and/or globs + * @returns {FSWatcher} for chaining +*/ +unwatch(paths_) { + if (this.closed) return this; + const paths = unifyPaths(paths_); + const {cwd} = this.options; + + paths.forEach((path) => { + // convert to absolute path unless relative path already matches + if (!sysPath.isAbsolute(path) && !this._closers.has(path)) { + if (cwd) path = sysPath.join(cwd, path); + path = sysPath.resolve(path); + } + + this._closePath(path); + + this._ignoredPaths.add(path); + if (this._watched.has(path)) { + this._ignoredPaths.add(path + SLASH_GLOBSTAR); + } + + // reset the cached userIgnored anymatch fn + // to make ignoredPaths changes effective + this._userIgnored = undefined; + }); + + return this; +} + +/** + * Close watchers and remove all listeners from watched paths. + * @returns {Promise}. +*/ +close() { + if (this.closed) return this._closePromise; + this.closed = true; + + // Memory management. + this.removeAllListeners(); + const closers = []; + this._closers.forEach(closerList => closerList.forEach(closer => { + const promise = closer(); + if (promise instanceof Promise) closers.push(promise); + })); + this._streams.forEach(stream => stream.destroy()); + this._userIgnored = undefined; + this._readyCount = 0; + this._readyEmitted = false; + this._watched.forEach(dirent => dirent.dispose()); + ['closers', 'watched', 'streams', 'symlinkPaths', 'throttled'].forEach(key => { + this[`_${key}`].clear(); + }); + + this._closePromise = closers.length ? Promise.all(closers).then(() => undefined) : Promise.resolve(); + return this._closePromise; +} + +/** + * Expose list of watched paths + * @returns {Object} for chaining +*/ +getWatched() { + const watchList = {}; + this._watched.forEach((entry, dir) => { + const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir; + watchList[key || ONE_DOT] = entry.getChildren().sort(); + }); + return watchList; +} + +emitWithAll(event, args) { + this.emit(...args); + if (event !== EV_ERROR) this.emit(EV_ALL, ...args); +} + +// Common helpers +// -------------- + +/** + * Normalize and emit events. + * Calling _emit DOES NOT MEAN emit() would be called! + * @param {EventName} event Type of event + * @param {Path} path File or directory path + * @param {*=} val1 arguments to be passed with event + * @param {*=} val2 + * @param {*=} val3 + * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag + */ +async _emit(event, path, val1, val2, val3) { + if (this.closed) return; + + const opts = this.options; + if (isWindows) path = sysPath.normalize(path); + if (opts.cwd) path = sysPath.relative(opts.cwd, path); + /** @type Array */ + const args = [event, path]; + if (val3 !== undefined) args.push(val1, val2, val3); + else if (val2 !== undefined) args.push(val1, val2); + else if (val1 !== undefined) args.push(val1); + + const awf = opts.awaitWriteFinish; + let pw; + if (awf && (pw = this._pendingWrites.get(path))) { + pw.lastChange = new Date(); + return this; + } + + if (opts.atomic) { + if (event === EV_UNLINK) { + this._pendingUnlinks.set(path, args); + setTimeout(() => { + this._pendingUnlinks.forEach((entry, path) => { + this.emit(...entry); + this.emit(EV_ALL, ...entry); + this._pendingUnlinks.delete(path); + }); + }, typeof opts.atomic === 'number' ? opts.atomic : 100); + return this; + } + if (event === EV_ADD && this._pendingUnlinks.has(path)) { + event = args[0] = EV_CHANGE; + this._pendingUnlinks.delete(path); + } + } + + if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) { + const awfEmit = (err, stats) => { + if (err) { + event = args[0] = EV_ERROR; + args[1] = err; + this.emitWithAll(event, args); + } else if (stats) { + // if stats doesn't exist the file must have been deleted + if (args.length > 2) { + args[2] = stats; + } else { + args.push(stats); + } + this.emitWithAll(event, args); + } + }; + + this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit); + return this; + } + + if (event === EV_CHANGE) { + const isThrottled = !this._throttle(EV_CHANGE, path, 50); + if (isThrottled) return this; + } + + if (opts.alwaysStat && val1 === undefined && + (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE) + ) { + const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path; + let stats; + try { + stats = await stat(fullPath); + } catch (err) {} + // Suppress event when fs_stat fails, to avoid sending undefined 'stat' + if (!stats || this.closed) return; + args.push(stats); + } + this.emitWithAll(event, args); + + return this; +} + +/** + * Common handler for errors + * @param {Error} error + * @returns {Error|Boolean} The error if defined, otherwise the value of the FSWatcher instance's `closed` flag + */ +_handleError(error) { + const code = error && error.code; + if (error && code !== 'ENOENT' && code !== 'ENOTDIR' && + (!this.options.ignorePermissionErrors || (code !== 'EPERM' && code !== 'EACCES')) + ) { + this.emit(EV_ERROR, error); + } + return error || this.closed; +} + +/** + * Helper utility for throttling + * @param {ThrottleType} actionType type being throttled + * @param {Path} path being acted upon + * @param {Number} timeout duration of time to suppress duplicate actions + * @returns {Object|false} tracking object or false if action should be suppressed + */ +_throttle(actionType, path, timeout) { + if (!this._throttled.has(actionType)) { + this._throttled.set(actionType, new Map()); + } + + /** @type {Map} */ + const action = this._throttled.get(actionType); + /** @type {Object} */ + const actionPath = action.get(path); + + if (actionPath) { + actionPath.count++; + return false; + } + + let timeoutObject; + const clear = () => { + const item = action.get(path); + const count = item ? item.count : 0; + action.delete(path); + clearTimeout(timeoutObject); + if (item) clearTimeout(item.timeoutObject); + return count; + }; + timeoutObject = setTimeout(clear, timeout); + const thr = {timeoutObject, clear, count: 0}; + action.set(path, thr); + return thr; +} + +_incrReadyCount() { + return this._readyCount++; +} + +/** + * Awaits write operation to finish. + * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback. + * @param {Path} path being acted upon + * @param {Number} threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished + * @param {EventName} event + * @param {Function} awfEmit Callback to be called when ready for event to be emitted. + */ +_awaitWriteFinish(path, threshold, event, awfEmit) { + let timeoutHandler; + + let fullPath = path; + if (this.options.cwd && !sysPath.isAbsolute(path)) { + fullPath = sysPath.join(this.options.cwd, path); + } + + const now = new Date(); + + const awaitWriteFinish = (prevStat) => { + fs.stat(fullPath, (err, curStat) => { + if (err || !this._pendingWrites.has(path)) { + if (err && err.code !== 'ENOENT') awfEmit(err); + return; + } + + const now = Number(new Date()); + + if (prevStat && curStat.size !== prevStat.size) { + this._pendingWrites.get(path).lastChange = now; + } + const pw = this._pendingWrites.get(path); + const df = now - pw.lastChange; + + if (df >= threshold) { + this._pendingWrites.delete(path); + awfEmit(undefined, curStat); + } else { + timeoutHandler = setTimeout( + awaitWriteFinish, + this.options.awaitWriteFinish.pollInterval, + curStat + ); + } + }); + }; + + if (!this._pendingWrites.has(path)) { + this._pendingWrites.set(path, { + lastChange: now, + cancelWait: () => { + this._pendingWrites.delete(path); + clearTimeout(timeoutHandler); + return event; + } + }); + timeoutHandler = setTimeout( + awaitWriteFinish, + this.options.awaitWriteFinish.pollInterval + ); + } +} + +_getGlobIgnored() { + return [...this._ignoredPaths.values()]; +} + +/** + * Determines whether user has asked to ignore this path. + * @param {Path} path filepath or dir + * @param {fs.Stats=} stats result of fs.stat + * @returns {Boolean} + */ +_isIgnored(path, stats) { + if (this.options.atomic && DOT_RE.test(path)) return true; + if (!this._userIgnored) { + const {cwd} = this.options; + const ign = this.options.ignored; + + const ignored = ign && ign.map(normalizeIgnored(cwd)); + const paths = arrify(ignored) + .filter((path) => typeof path === STRING_TYPE && !isGlob(path)) + .map((path) => path + SLASH_GLOBSTAR); + const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths); + this._userIgnored = anymatch(list, undefined, ANYMATCH_OPTS); + } + + return this._userIgnored([path, stats]); +} + +_isntIgnored(path, stat) { + return !this._isIgnored(path, stat); +} + +/** + * Provides a set of common helpers and properties relating to symlink and glob handling. + * @param {Path} path file, directory, or glob pattern being watched + * @param {Number=} depth at any depth > 0, this isn't a glob + * @returns {WatchHelper} object containing helpers for this path + */ +_getWatchHelpers(path, depth) { + const watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path); + const follow = this.options.followSymlinks; + + return new WatchHelper(path, watchPath, follow, this); +} + +// Directory helpers +// ----------------- + +/** + * Provides directory tracking objects + * @param {String} directory path of the directory + * @returns {DirEntry} the directory's tracking object + */ +_getWatchedDir(directory) { + if (!this._boundRemove) this._boundRemove = this._remove.bind(this); + const dir = sysPath.resolve(directory); + if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove)); + return this._watched.get(dir); +} + +// File helpers +// ------------ + +/** + * Check for read permissions. + * Based on this answer on SO: https://stackoverflow.com/a/11781404/1358405 + * @param {fs.Stats} stats - object, result of fs_stat + * @returns {Boolean} indicates whether the file can be read +*/ +_hasReadPermissions(stats) { + if (this.options.ignorePermissionErrors) return true; + + // stats.mode may be bigint + const md = stats && Number.parseInt(stats.mode, 10); + const st = md & 0o777; + const it = Number.parseInt(st.toString(8)[0], 10); + return Boolean(4 & it); +} + +/** + * Handles emitting unlink events for + * files and directories, and via recursion, for + * files and directories within directories that are unlinked + * @param {String} directory within which the following item is located + * @param {String} item base path of item/directory + * @returns {void} +*/ +_remove(directory, item, isDirectory) { + // if what is being deleted is a directory, get that directory's paths + // for recursive deleting and cleaning of watched object + // if it is not a directory, nestedDirectoryChildren will be empty array + const path = sysPath.join(directory, item); + const fullPath = sysPath.resolve(path); + isDirectory = isDirectory != null + ? isDirectory + : this._watched.has(path) || this._watched.has(fullPath); + + // prevent duplicate handling in case of arriving here nearly simultaneously + // via multiple paths (such as _handleFile and _handleDir) + if (!this._throttle('remove', path, 100)) return; + + // if the only watched file is removed, watch for its return + if (!isDirectory && !this.options.useFsEvents && this._watched.size === 1) { + this.add(directory, item, true); + } + + // This will create a new entry in the watched object in either case + // so we got to do the directory check beforehand + const wp = this._getWatchedDir(path); + const nestedDirectoryChildren = wp.getChildren(); + + // Recursively remove children directories / files. + nestedDirectoryChildren.forEach(nested => this._remove(path, nested)); + + // Check if item was on the watched list and remove it + const parent = this._getWatchedDir(directory); + const wasTracked = parent.has(item); + parent.remove(item); + + // Fixes issue #1042 -> Relative paths were detected and added as symlinks + // (https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L612), + // but never removed from the map in case the path was deleted. + // This leads to an incorrect state if the path was recreated: + // https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L553 + if (this._symlinkPaths.has(fullPath)) { + this._symlinkPaths.delete(fullPath); + } + + // If we wait for this file to be fully written, cancel the wait. + let relPath = path; + if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path); + if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) { + const event = this._pendingWrites.get(relPath).cancelWait(); + if (event === EV_ADD) return; + } + + // The Entry will either be a directory that just got removed + // or a bogus entry to a file, in either case we have to remove it + this._watched.delete(path); + this._watched.delete(fullPath); + const eventName = isDirectory ? EV_UNLINK_DIR : EV_UNLINK; + if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path); + + // Avoid conflicts if we later create another file with the same name + if (!this.options.useFsEvents) { + this._closePath(path); + } +} + +/** + * Closes all watchers for a path + * @param {Path} path + */ +_closePath(path) { + this._closeFile(path) + const dir = sysPath.dirname(path); + this._getWatchedDir(dir).remove(sysPath.basename(path)); +} + +/** + * Closes only file-specific watchers + * @param {Path} path + */ +_closeFile(path) { + const closers = this._closers.get(path); + if (!closers) return; + closers.forEach(closer => closer()); + this._closers.delete(path); +} + +/** + * + * @param {Path} path + * @param {Function} closer + */ +_addPathCloser(path, closer) { + if (!closer) return; + let list = this._closers.get(path); + if (!list) { + list = []; + this._closers.set(path, list); + } + list.push(closer); +} + +_readdirp(root, opts) { + if (this.closed) return; + const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts}; + let stream = readdirp(root, options); + this._streams.add(stream); + stream.once(STR_CLOSE, () => { + stream = undefined; + }); + stream.once(STR_END, () => { + if (stream) { + this._streams.delete(stream); + stream = undefined; + } + }); + return stream; +} + +} + +// Export FSWatcher class +exports.FSWatcher = FSWatcher; + +/** + * Instantiates watcher with paths to be tracked. + * @param {String|Array} paths file/directory paths and/or globs + * @param {Object=} options chokidar opts + * @returns an instance of FSWatcher for chaining. + */ +const watch = (paths, options) => { + const watcher = new FSWatcher(options); + watcher.add(paths); + return watcher; +}; + +exports.watch = watch; diff --git a/node_modules/chokidar/lib/constants.js b/node_modules/chokidar/lib/constants.js new file mode 100644 index 0000000..4743865 --- /dev/null +++ b/node_modules/chokidar/lib/constants.js @@ -0,0 +1,66 @@ +'use strict'; + +const {sep} = require('path'); +const {platform} = process; +const os = require('os'); + +exports.EV_ALL = 'all'; +exports.EV_READY = 'ready'; +exports.EV_ADD = 'add'; +exports.EV_CHANGE = 'change'; +exports.EV_ADD_DIR = 'addDir'; +exports.EV_UNLINK = 'unlink'; +exports.EV_UNLINK_DIR = 'unlinkDir'; +exports.EV_RAW = 'raw'; +exports.EV_ERROR = 'error'; + +exports.STR_DATA = 'data'; +exports.STR_END = 'end'; +exports.STR_CLOSE = 'close'; + +exports.FSEVENT_CREATED = 'created'; +exports.FSEVENT_MODIFIED = 'modified'; +exports.FSEVENT_DELETED = 'deleted'; +exports.FSEVENT_MOVED = 'moved'; +exports.FSEVENT_CLONED = 'cloned'; +exports.FSEVENT_UNKNOWN = 'unknown'; +exports.FSEVENT_FLAG_MUST_SCAN_SUBDIRS = 1; +exports.FSEVENT_TYPE_FILE = 'file'; +exports.FSEVENT_TYPE_DIRECTORY = 'directory'; +exports.FSEVENT_TYPE_SYMLINK = 'symlink'; + +exports.KEY_LISTENERS = 'listeners'; +exports.KEY_ERR = 'errHandlers'; +exports.KEY_RAW = 'rawEmitters'; +exports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW]; + +exports.DOT_SLASH = `.${sep}`; + +exports.BACK_SLASH_RE = /\\/g; +exports.DOUBLE_SLASH_RE = /\/\//; +exports.SLASH_OR_BACK_SLASH_RE = /[/\\]/; +exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/; +exports.REPLACER_RE = /^\.[/\\]/; + +exports.SLASH = '/'; +exports.SLASH_SLASH = '//'; +exports.BRACE_START = '{'; +exports.BANG = '!'; +exports.ONE_DOT = '.'; +exports.TWO_DOTS = '..'; +exports.STAR = '*'; +exports.GLOBSTAR = '**'; +exports.ROOT_GLOBSTAR = '/**/*'; +exports.SLASH_GLOBSTAR = '/**'; +exports.DIR_SUFFIX = 'Dir'; +exports.ANYMATCH_OPTS = {dot: true}; +exports.STRING_TYPE = 'string'; +exports.FUNCTION_TYPE = 'function'; +exports.EMPTY_STR = ''; +exports.EMPTY_FN = () => {}; +exports.IDENTITY_FN = val => val; + +exports.isWindows = platform === 'win32'; +exports.isMacos = platform === 'darwin'; +exports.isLinux = platform === 'linux'; +exports.isIBMi = os.type() === 'OS400'; diff --git a/node_modules/chokidar/lib/fsevents-handler.js b/node_modules/chokidar/lib/fsevents-handler.js new file mode 100644 index 0000000..fe29393 --- /dev/null +++ b/node_modules/chokidar/lib/fsevents-handler.js @@ -0,0 +1,526 @@ +'use strict'; + +const fs = require('fs'); +const sysPath = require('path'); +const { promisify } = require('util'); + +let fsevents; +try { + fsevents = require('fsevents'); +} catch (error) { + if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error); +} + +if (fsevents) { + // TODO: real check + const mtch = process.version.match(/v(\d+)\.(\d+)/); + if (mtch && mtch[1] && mtch[2]) { + const maj = Number.parseInt(mtch[1], 10); + const min = Number.parseInt(mtch[2], 10); + if (maj === 8 && min < 16) { + fsevents = undefined; + } + } +} + +const { + EV_ADD, + EV_CHANGE, + EV_ADD_DIR, + EV_UNLINK, + EV_ERROR, + STR_DATA, + STR_END, + FSEVENT_CREATED, + FSEVENT_MODIFIED, + FSEVENT_DELETED, + FSEVENT_MOVED, + // FSEVENT_CLONED, + FSEVENT_UNKNOWN, + FSEVENT_FLAG_MUST_SCAN_SUBDIRS, + FSEVENT_TYPE_FILE, + FSEVENT_TYPE_DIRECTORY, + FSEVENT_TYPE_SYMLINK, + + ROOT_GLOBSTAR, + DIR_SUFFIX, + DOT_SLASH, + FUNCTION_TYPE, + EMPTY_FN, + IDENTITY_FN +} = require('./constants'); + +const Depth = (value) => isNaN(value) ? {} : {depth: value}; + +const stat = promisify(fs.stat); +const lstat = promisify(fs.lstat); +const realpath = promisify(fs.realpath); + +const statMethods = { stat, lstat }; + +/** + * @typedef {String} Path + */ + +/** + * @typedef {Object} FsEventsWatchContainer + * @property {Set} listeners + * @property {Function} rawEmitter + * @property {{stop: Function}} watcher + */ + +// fsevents instance helper functions +/** + * Object to hold per-process fsevents instances (may be shared across chokidar FSWatcher instances) + * @type {Map} + */ +const FSEventsWatchers = new Map(); + +// Threshold of duplicate path prefixes at which to start +// consolidating going forward +const consolidateThreshhold = 10; + +const wrongEventFlags = new Set([ + 69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912 +]); + +/** + * Instantiates the fsevents interface + * @param {Path} path path to be watched + * @param {Function} callback called when fsevents is bound and ready + * @returns {{stop: Function}} new fsevents instance + */ +const createFSEventsInstance = (path, callback) => { + const stop = fsevents.watch(path, callback); + return {stop}; +}; + +/** + * Instantiates the fsevents interface or binds listeners to an existing one covering + * the same file tree. + * @param {Path} path - to be watched + * @param {Path} realPath - real path for symlinks + * @param {Function} listener - called when fsevents emits events + * @param {Function} rawEmitter - passes data to listeners of the 'raw' event + * @returns {Function} closer + */ +function setFSEventsListener(path, realPath, listener, rawEmitter) { + let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath; + + const parentPath = sysPath.dirname(watchPath); + let cont = FSEventsWatchers.get(watchPath); + + // If we've accumulated a substantial number of paths that + // could have been consolidated by watching one directory + // above the current one, create a watcher on the parent + // path instead, so that we do consolidate going forward. + if (couldConsolidate(parentPath)) { + watchPath = parentPath; + } + + const resolvedPath = sysPath.resolve(path); + const hasSymlink = resolvedPath !== realPath; + + const filteredListener = (fullPath, flags, info) => { + if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath); + if ( + fullPath === resolvedPath || + !fullPath.indexOf(resolvedPath + sysPath.sep) + ) listener(fullPath, flags, info); + }; + + // check if there is already a watcher on a parent path + // modifies `watchPath` to the parent path when it finds a match + let watchedParent = false; + for (const watchedPath of FSEventsWatchers.keys()) { + if (realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep) === 0) { + watchPath = watchedPath; + cont = FSEventsWatchers.get(watchPath); + watchedParent = true; + break; + } + } + + if (cont || watchedParent) { + cont.listeners.add(filteredListener); + } else { + cont = { + listeners: new Set([filteredListener]), + rawEmitter, + watcher: createFSEventsInstance(watchPath, (fullPath, flags) => { + if (!cont.listeners.size) return; + if (flags & FSEVENT_FLAG_MUST_SCAN_SUBDIRS) return; + const info = fsevents.getInfo(fullPath, flags); + cont.listeners.forEach(list => { + list(fullPath, flags, info); + }); + + cont.rawEmitter(info.event, fullPath, info); + }) + }; + FSEventsWatchers.set(watchPath, cont); + } + + // removes this instance's listeners and closes the underlying fsevents + // instance if there are no more listeners left + return () => { + const lst = cont.listeners; + + lst.delete(filteredListener); + if (!lst.size) { + FSEventsWatchers.delete(watchPath); + if (cont.watcher) return cont.watcher.stop().then(() => { + cont.rawEmitter = cont.watcher = undefined; + Object.freeze(cont); + }); + } + }; +} + +// Decide whether or not we should start a new higher-level +// parent watcher +const couldConsolidate = (path) => { + let count = 0; + for (const watchPath of FSEventsWatchers.keys()) { + if (watchPath.indexOf(path) === 0) { + count++; + if (count >= consolidateThreshhold) { + return true; + } + } + } + + return false; +}; + +// returns boolean indicating whether fsevents can be used +const canUse = () => fsevents && FSEventsWatchers.size < 128; + +// determines subdirectory traversal levels from root to path +const calcDepth = (path, root) => { + let i = 0; + while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++; + return i; +}; + +// returns boolean indicating whether the fsevents' event info has the same type +// as the one returned by fs.stat +const sameTypes = (info, stats) => ( + info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() || + info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() || + info.type === FSEVENT_TYPE_FILE && stats.isFile() +) + +/** + * @mixin + */ +class FsEventsHandler { + +/** + * @param {import('../index').FSWatcher} fsw + */ +constructor(fsw) { + this.fsw = fsw; +} +checkIgnored(path, stats) { + const ipaths = this.fsw._ignoredPaths; + if (this.fsw._isIgnored(path, stats)) { + ipaths.add(path); + if (stats && stats.isDirectory()) { + ipaths.add(path + ROOT_GLOBSTAR); + } + return true; + } + + ipaths.delete(path); + ipaths.delete(path + ROOT_GLOBSTAR); +} + +addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) { + const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD; + this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts); +} + +async checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts) { + try { + const stats = await stat(path) + if (this.fsw.closed) return; + if (sameTypes(info, stats)) { + this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } else { + this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } catch (error) { + if (error.code === 'EACCES') { + this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } else { + this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } +} + +handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts) { + if (this.fsw.closed || this.checkIgnored(path)) return; + + if (event === EV_UNLINK) { + const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY + // suppress unlink events on never before seen files + if (isDirectory || watchedDir.has(item)) { + this.fsw._remove(parent, item, isDirectory); + } + } else { + if (event === EV_ADD) { + // track new directories + if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path); + + if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) { + // push symlinks back to the top of the stack to get handled + const curDepth = opts.depth === undefined ? + undefined : calcDepth(fullPath, realPath) + 1; + return this._addToFsEvents(path, false, true, curDepth); + } + + // track new paths + // (other than symlinks being followed, which will be tracked soon) + this.fsw._getWatchedDir(parent).add(item); + } + /** + * @type {'add'|'addDir'|'unlink'|'unlinkDir'} + */ + const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event; + this.fsw._emit(eventName, path); + if (eventName === EV_ADD_DIR) this._addToFsEvents(path, false, true); + } +} + +/** + * Handle symlinks encountered during directory scan + * @param {String} watchPath - file/dir path to be watched with fsevents + * @param {String} realPath - real path (in case of symlinks) + * @param {Function} transform - path transformer + * @param {Function} globFilter - path filter in case a glob pattern was provided + * @returns {Function} closer for the watcher instance +*/ +_watchWithFsEvents(watchPath, realPath, transform, globFilter) { + if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return; + const opts = this.fsw.options; + const watchCallback = async (fullPath, flags, info) => { + if (this.fsw.closed) return; + if ( + opts.depth !== undefined && + calcDepth(fullPath, realPath) > opts.depth + ) return; + const path = transform(sysPath.join( + watchPath, sysPath.relative(watchPath, fullPath) + )); + if (globFilter && !globFilter(path)) return; + // ensure directories are tracked + const parent = sysPath.dirname(path); + const item = sysPath.basename(path); + const watchedDir = this.fsw._getWatchedDir( + info.type === FSEVENT_TYPE_DIRECTORY ? path : parent + ); + + // correct for wrong events emitted + if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) { + if (typeof opts.ignored === FUNCTION_TYPE) { + let stats; + try { + stats = await stat(path); + } catch (error) {} + if (this.fsw.closed) return; + if (this.checkIgnored(path, stats)) return; + if (sameTypes(info, stats)) { + this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } else { + this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } else { + this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } else { + switch (info.event) { + case FSEVENT_CREATED: + case FSEVENT_MODIFIED: + return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + case FSEVENT_DELETED: + case FSEVENT_MOVED: + return this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } + }; + + const closer = setFSEventsListener( + watchPath, + realPath, + watchCallback, + this.fsw._emitRaw + ); + + this.fsw._emitReady(); + return closer; +} + +/** + * Handle symlinks encountered during directory scan + * @param {String} linkPath path to symlink + * @param {String} fullPath absolute path to the symlink + * @param {Function} transform pre-existing path transformer + * @param {Number} curDepth level of subdirectories traversed to where symlink is + * @returns {Promise} + */ +async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) { + // don't follow the same symlink more than once + if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath)) return; + + this.fsw._symlinkPaths.set(fullPath, true); + this.fsw._incrReadyCount(); + + try { + const linkTarget = await realpath(linkPath); + if (this.fsw.closed) return; + if (this.fsw._isIgnored(linkTarget)) { + return this.fsw._emitReady(); + } + + this.fsw._incrReadyCount(); + + // add the linkTarget for watching with a wrapper for transform + // that causes emitted paths to incorporate the link's path + this._addToFsEvents(linkTarget || linkPath, (path) => { + let aliasedPath = linkPath; + if (linkTarget && linkTarget !== DOT_SLASH) { + aliasedPath = path.replace(linkTarget, linkPath); + } else if (path !== DOT_SLASH) { + aliasedPath = sysPath.join(linkPath, path); + } + return transform(aliasedPath); + }, false, curDepth); + } catch(error) { + if (this.fsw._handleError(error)) { + return this.fsw._emitReady(); + } + } +} + +/** + * + * @param {Path} newPath + * @param {fs.Stats} stats + */ +emitAdd(newPath, stats, processPath, opts, forceAdd) { + const pp = processPath(newPath); + const isDir = stats.isDirectory(); + const dirObj = this.fsw._getWatchedDir(sysPath.dirname(pp)); + const base = sysPath.basename(pp); + + // ensure empty dirs get tracked + if (isDir) this.fsw._getWatchedDir(pp); + if (dirObj.has(base)) return; + dirObj.add(base); + + if (!opts.ignoreInitial || forceAdd === true) { + this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats); + } +} + +initWatch(realPath, path, wh, processPath) { + if (this.fsw.closed) return; + const closer = this._watchWithFsEvents( + wh.watchPath, + sysPath.resolve(realPath || wh.watchPath), + processPath, + wh.globFilter + ); + this.fsw._addPathCloser(path, closer); +} + +/** + * Handle added path with fsevents + * @param {String} path file/dir path or glob pattern + * @param {Function|Boolean=} transform converts working path to what the user expects + * @param {Boolean=} forceAdd ensure add is emitted + * @param {Number=} priorDepth Level of subdirectories already traversed. + * @returns {Promise} + */ +async _addToFsEvents(path, transform, forceAdd, priorDepth) { + if (this.fsw.closed) { + return; + } + const opts = this.fsw.options; + const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN; + + const wh = this.fsw._getWatchHelpers(path); + + // evaluate what is at the path we're being asked to watch + try { + const stats = await statMethods[wh.statMethod](wh.watchPath); + if (this.fsw.closed) return; + if (this.fsw._isIgnored(wh.watchPath, stats)) { + throw null; + } + if (stats.isDirectory()) { + // emit addDir unless this is a glob parent + if (!wh.globFilter) this.emitAdd(processPath(path), stats, processPath, opts, forceAdd); + + // don't recurse further if it would exceed depth setting + if (priorDepth && priorDepth > opts.depth) return; + + // scan the contents of the dir + this.fsw._readdirp(wh.watchPath, { + fileFilter: entry => wh.filterPath(entry), + directoryFilter: entry => wh.filterDir(entry), + ...Depth(opts.depth - (priorDepth || 0)) + }).on(STR_DATA, (entry) => { + // need to check filterPath on dirs b/c filterDir is less restrictive + if (this.fsw.closed) { + return; + } + if (entry.stats.isDirectory() && !wh.filterPath(entry)) return; + + const joinedPath = sysPath.join(wh.watchPath, entry.path); + const {fullPath} = entry; + + if (wh.followSymlinks && entry.stats.isSymbolicLink()) { + // preserve the current depth here since it can't be derived from + // real paths past the symlink + const curDepth = opts.depth === undefined ? + undefined : calcDepth(joinedPath, sysPath.resolve(wh.watchPath)) + 1; + + this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth); + } else { + this.emitAdd(joinedPath, entry.stats, processPath, opts, forceAdd); + } + }).on(EV_ERROR, EMPTY_FN).on(STR_END, () => { + this.fsw._emitReady(); + }); + } else { + this.emitAdd(wh.watchPath, stats, processPath, opts, forceAdd); + this.fsw._emitReady(); + } + } catch (error) { + if (!error || this.fsw._handleError(error)) { + // TODO: Strange thing: "should not choke on an ignored watch path" will be failed without 2 ready calls -__- + this.fsw._emitReady(); + this.fsw._emitReady(); + } + } + + if (opts.persistent && forceAdd !== true) { + if (typeof transform === FUNCTION_TYPE) { + // realpath has already been resolved + this.initWatch(undefined, path, wh, processPath); + } else { + let realPath; + try { + realPath = await realpath(wh.watchPath); + } catch (e) {} + this.initWatch(realPath, path, wh, processPath); + } + } +} + +} + +module.exports = FsEventsHandler; +module.exports.canUse = canUse; diff --git a/node_modules/chokidar/lib/nodefs-handler.js b/node_modules/chokidar/lib/nodefs-handler.js new file mode 100644 index 0000000..199cfe9 --- /dev/null +++ b/node_modules/chokidar/lib/nodefs-handler.js @@ -0,0 +1,654 @@ +'use strict'; + +const fs = require('fs'); +const sysPath = require('path'); +const { promisify } = require('util'); +const isBinaryPath = require('is-binary-path'); +const { + isWindows, + isLinux, + EMPTY_FN, + EMPTY_STR, + KEY_LISTENERS, + KEY_ERR, + KEY_RAW, + HANDLER_KEYS, + EV_CHANGE, + EV_ADD, + EV_ADD_DIR, + EV_ERROR, + STR_DATA, + STR_END, + BRACE_START, + STAR +} = require('./constants'); + +const THROTTLE_MODE_WATCH = 'watch'; + +const open = promisify(fs.open); +const stat = promisify(fs.stat); +const lstat = promisify(fs.lstat); +const close = promisify(fs.close); +const fsrealpath = promisify(fs.realpath); + +const statMethods = { lstat, stat }; + +// TODO: emit errors properly. Example: EMFILE on Macos. +const foreach = (val, fn) => { + if (val instanceof Set) { + val.forEach(fn); + } else { + fn(val); + } +}; + +const addAndConvert = (main, prop, item) => { + let container = main[prop]; + if (!(container instanceof Set)) { + main[prop] = container = new Set([container]); + } + container.add(item); +}; + +const clearItem = cont => key => { + const set = cont[key]; + if (set instanceof Set) { + set.clear(); + } else { + delete cont[key]; + } +}; + +const delFromSet = (main, prop, item) => { + const container = main[prop]; + if (container instanceof Set) { + container.delete(item); + } else if (container === item) { + delete main[prop]; + } +}; + +const isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val; + +/** + * @typedef {String} Path + */ + +// fs_watch helpers + +// object to hold per-process fs_watch instances +// (may be shared across chokidar FSWatcher instances) + +/** + * @typedef {Object} FsWatchContainer + * @property {Set} listeners + * @property {Set} errHandlers + * @property {Set} rawEmitters + * @property {fs.FSWatcher=} watcher + * @property {Boolean=} watcherUnusable + */ + +/** + * @type {Map} + */ +const FsWatchInstances = new Map(); + +/** + * Instantiates the fs_watch interface + * @param {String} path to be watched + * @param {Object} options to be passed to fs_watch + * @param {Function} listener main event handler + * @param {Function} errHandler emits info about errors + * @param {Function} emitRaw emits raw event data + * @returns {fs.FSWatcher} new fsevents instance + */ +function createFsWatchInstance(path, options, listener, errHandler, emitRaw) { + const handleEvent = (rawEvent, evPath) => { + listener(path); + emitRaw(rawEvent, evPath, {watchedPath: path}); + + // emit based on events occurring for files from a directory's watcher in + // case the file's watcher misses it (and rely on throttling to de-dupe) + if (evPath && path !== evPath) { + fsWatchBroadcast( + sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath) + ); + } + }; + try { + return fs.watch(path, options, handleEvent); + } catch (error) { + errHandler(error); + } +} + +/** + * Helper for passing fs_watch event data to a collection of listeners + * @param {Path} fullPath absolute path bound to fs_watch instance + * @param {String} type listener type + * @param {*=} val1 arguments to be passed to listeners + * @param {*=} val2 + * @param {*=} val3 + */ +const fsWatchBroadcast = (fullPath, type, val1, val2, val3) => { + const cont = FsWatchInstances.get(fullPath); + if (!cont) return; + foreach(cont[type], (listener) => { + listener(val1, val2, val3); + }); +}; + +/** + * Instantiates the fs_watch interface or binds listeners + * to an existing one covering the same file system entry + * @param {String} path + * @param {String} fullPath absolute path + * @param {Object} options to be passed to fs_watch + * @param {Object} handlers container for event listener functions + */ +const setFsWatchListener = (path, fullPath, options, handlers) => { + const {listener, errHandler, rawEmitter} = handlers; + let cont = FsWatchInstances.get(fullPath); + + /** @type {fs.FSWatcher=} */ + let watcher; + if (!options.persistent) { + watcher = createFsWatchInstance( + path, options, listener, errHandler, rawEmitter + ); + return watcher.close.bind(watcher); + } + if (cont) { + addAndConvert(cont, KEY_LISTENERS, listener); + addAndConvert(cont, KEY_ERR, errHandler); + addAndConvert(cont, KEY_RAW, rawEmitter); + } else { + watcher = createFsWatchInstance( + path, + options, + fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), + errHandler, // no need to use broadcast here + fsWatchBroadcast.bind(null, fullPath, KEY_RAW) + ); + if (!watcher) return; + watcher.on(EV_ERROR, async (error) => { + const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR); + cont.watcherUnusable = true; // documented since Node 10.4.1 + // Workaround for https://github.com/joyent/node/issues/4337 + if (isWindows && error.code === 'EPERM') { + try { + const fd = await open(path, 'r'); + await close(fd); + broadcastErr(error); + } catch (err) {} + } else { + broadcastErr(error); + } + }); + cont = { + listeners: listener, + errHandlers: errHandler, + rawEmitters: rawEmitter, + watcher + }; + FsWatchInstances.set(fullPath, cont); + } + // const index = cont.listeners.indexOf(listener); + + // removes this instance's listeners and closes the underlying fs_watch + // instance if there are no more listeners left + return () => { + delFromSet(cont, KEY_LISTENERS, listener); + delFromSet(cont, KEY_ERR, errHandler); + delFromSet(cont, KEY_RAW, rawEmitter); + if (isEmptySet(cont.listeners)) { + // Check to protect against issue gh-730. + // if (cont.watcherUnusable) { + cont.watcher.close(); + // } + FsWatchInstances.delete(fullPath); + HANDLER_KEYS.forEach(clearItem(cont)); + cont.watcher = undefined; + Object.freeze(cont); + } + }; +}; + +// fs_watchFile helpers + +// object to hold per-process fs_watchFile instances +// (may be shared across chokidar FSWatcher instances) +const FsWatchFileInstances = new Map(); + +/** + * Instantiates the fs_watchFile interface or binds listeners + * to an existing one covering the same file system entry + * @param {String} path to be watched + * @param {String} fullPath absolute path + * @param {Object} options options to be passed to fs_watchFile + * @param {Object} handlers container for event listener functions + * @returns {Function} closer + */ +const setFsWatchFileListener = (path, fullPath, options, handlers) => { + const {listener, rawEmitter} = handlers; + let cont = FsWatchFileInstances.get(fullPath); + + /* eslint-disable no-unused-vars, prefer-destructuring */ + let listeners = new Set(); + let rawEmitters = new Set(); + + const copts = cont && cont.options; + if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) { + // "Upgrade" the watcher to persistence or a quicker interval. + // This creates some unlikely edge case issues if the user mixes + // settings in a very weird way, but solving for those cases + // doesn't seem worthwhile for the added complexity. + listeners = cont.listeners; + rawEmitters = cont.rawEmitters; + fs.unwatchFile(fullPath); + cont = undefined; + } + + /* eslint-enable no-unused-vars, prefer-destructuring */ + + if (cont) { + addAndConvert(cont, KEY_LISTENERS, listener); + addAndConvert(cont, KEY_RAW, rawEmitter); + } else { + // TODO + // listeners.add(listener); + // rawEmitters.add(rawEmitter); + cont = { + listeners: listener, + rawEmitters: rawEmitter, + options, + watcher: fs.watchFile(fullPath, options, (curr, prev) => { + foreach(cont.rawEmitters, (rawEmitter) => { + rawEmitter(EV_CHANGE, fullPath, {curr, prev}); + }); + const currmtime = curr.mtimeMs; + if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) { + foreach(cont.listeners, (listener) => listener(path, curr)); + } + }) + }; + FsWatchFileInstances.set(fullPath, cont); + } + // const index = cont.listeners.indexOf(listener); + + // Removes this instance's listeners and closes the underlying fs_watchFile + // instance if there are no more listeners left. + return () => { + delFromSet(cont, KEY_LISTENERS, listener); + delFromSet(cont, KEY_RAW, rawEmitter); + if (isEmptySet(cont.listeners)) { + FsWatchFileInstances.delete(fullPath); + fs.unwatchFile(fullPath); + cont.options = cont.watcher = undefined; + Object.freeze(cont); + } + }; +}; + +/** + * @mixin + */ +class NodeFsHandler { + +/** + * @param {import("../index").FSWatcher} fsW + */ +constructor(fsW) { + this.fsw = fsW; + this._boundHandleError = (error) => fsW._handleError(error); +} + +/** + * Watch file for changes with fs_watchFile or fs_watch. + * @param {String} path to file or dir + * @param {Function} listener on fs change + * @returns {Function} closer for the watcher instance + */ +_watchWithNodeFs(path, listener) { + const opts = this.fsw.options; + const directory = sysPath.dirname(path); + const basename = sysPath.basename(path); + const parent = this.fsw._getWatchedDir(directory); + parent.add(basename); + const absolutePath = sysPath.resolve(path); + const options = {persistent: opts.persistent}; + if (!listener) listener = EMPTY_FN; + + let closer; + if (opts.usePolling) { + options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ? + opts.binaryInterval : opts.interval; + closer = setFsWatchFileListener(path, absolutePath, options, { + listener, + rawEmitter: this.fsw._emitRaw + }); + } else { + closer = setFsWatchListener(path, absolutePath, options, { + listener, + errHandler: this._boundHandleError, + rawEmitter: this.fsw._emitRaw + }); + } + return closer; +} + +/** + * Watch a file and emit add event if warranted. + * @param {Path} file Path + * @param {fs.Stats} stats result of fs_stat + * @param {Boolean} initialAdd was the file added at watch instantiation? + * @returns {Function} closer for the watcher instance + */ +_handleFile(file, stats, initialAdd) { + if (this.fsw.closed) { + return; + } + const dirname = sysPath.dirname(file); + const basename = sysPath.basename(file); + const parent = this.fsw._getWatchedDir(dirname); + // stats is always present + let prevStats = stats; + + // if the file is already being watched, do nothing + if (parent.has(basename)) return; + + const listener = async (path, newStats) => { + if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return; + if (!newStats || newStats.mtimeMs === 0) { + try { + const newStats = await stat(file); + if (this.fsw.closed) return; + // Check that change event was not fired because of changed only accessTime. + const at = newStats.atimeMs; + const mt = newStats.mtimeMs; + if (!at || at <= mt || mt !== prevStats.mtimeMs) { + this.fsw._emit(EV_CHANGE, file, newStats); + } + if (isLinux && prevStats.ino !== newStats.ino) { + this.fsw._closeFile(path) + prevStats = newStats; + this.fsw._addPathCloser(path, this._watchWithNodeFs(file, listener)); + } else { + prevStats = newStats; + } + } catch (error) { + // Fix issues where mtime is null but file is still present + this.fsw._remove(dirname, basename); + } + // add is about to be emitted if file not already tracked in parent + } else if (parent.has(basename)) { + // Check that change event was not fired because of changed only accessTime. + const at = newStats.atimeMs; + const mt = newStats.mtimeMs; + if (!at || at <= mt || mt !== prevStats.mtimeMs) { + this.fsw._emit(EV_CHANGE, file, newStats); + } + prevStats = newStats; + } + } + // kick off the watcher + const closer = this._watchWithNodeFs(file, listener); + + // emit an add event if we're supposed to + if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) { + if (!this.fsw._throttle(EV_ADD, file, 0)) return; + this.fsw._emit(EV_ADD, file, stats); + } + + return closer; +} + +/** + * Handle symlinks encountered while reading a dir. + * @param {Object} entry returned by readdirp + * @param {String} directory path of dir being read + * @param {String} path of this item + * @param {String} item basename of this item + * @returns {Promise} true if no more processing is needed for this entry. + */ +async _handleSymlink(entry, directory, path, item) { + if (this.fsw.closed) { + return; + } + const full = entry.fullPath; + const dir = this.fsw._getWatchedDir(directory); + + if (!this.fsw.options.followSymlinks) { + // watch symlink directly (don't follow) and detect changes + this.fsw._incrReadyCount(); + + let linkPath; + try { + linkPath = await fsrealpath(path); + } catch (e) { + this.fsw._emitReady(); + return true; + } + + if (this.fsw.closed) return; + if (dir.has(item)) { + if (this.fsw._symlinkPaths.get(full) !== linkPath) { + this.fsw._symlinkPaths.set(full, linkPath); + this.fsw._emit(EV_CHANGE, path, entry.stats); + } + } else { + dir.add(item); + this.fsw._symlinkPaths.set(full, linkPath); + this.fsw._emit(EV_ADD, path, entry.stats); + } + this.fsw._emitReady(); + return true; + } + + // don't follow the same symlink more than once + if (this.fsw._symlinkPaths.has(full)) { + return true; + } + + this.fsw._symlinkPaths.set(full, true); +} + +_handleRead(directory, initialAdd, wh, target, dir, depth, throttler) { + // Normalize the directory name on Windows + directory = sysPath.join(directory, EMPTY_STR); + + if (!wh.hasGlob) { + throttler = this.fsw._throttle('readdir', directory, 1000); + if (!throttler) return; + } + + const previous = this.fsw._getWatchedDir(wh.path); + const current = new Set(); + + let stream = this.fsw._readdirp(directory, { + fileFilter: entry => wh.filterPath(entry), + directoryFilter: entry => wh.filterDir(entry), + depth: 0 + }).on(STR_DATA, async (entry) => { + if (this.fsw.closed) { + stream = undefined; + return; + } + const item = entry.path; + let path = sysPath.join(directory, item); + current.add(item); + + if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) { + return; + } + + if (this.fsw.closed) { + stream = undefined; + return; + } + // Files that present in current directory snapshot + // but absent in previous are added to watch list and + // emit `add` event. + if (item === target || !target && !previous.has(item)) { + this.fsw._incrReadyCount(); + + // ensure relativeness of path is preserved in case of watcher reuse + path = sysPath.join(dir, sysPath.relative(dir, path)); + + this._addToNodeFs(path, initialAdd, wh, depth + 1); + } + }).on(EV_ERROR, this._boundHandleError); + + return new Promise(resolve => + stream.once(STR_END, () => { + if (this.fsw.closed) { + stream = undefined; + return; + } + const wasThrottled = throttler ? throttler.clear() : false; + + resolve(); + + // Files that absent in current directory snapshot + // but present in previous emit `remove` event + // and are removed from @watched[directory]. + previous.getChildren().filter((item) => { + return item !== directory && + !current.has(item) && + // in case of intersecting globs; + // a path may have been filtered out of this readdir, but + // shouldn't be removed because it matches a different glob + (!wh.hasGlob || wh.filterPath({ + fullPath: sysPath.resolve(directory, item) + })); + }).forEach((item) => { + this.fsw._remove(directory, item); + }); + + stream = undefined; + + // one more time for any missed in case changes came in extremely quickly + if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler); + }) + ); +} + +/** + * Read directory to add / remove files from `@watched` list and re-read it on change. + * @param {String} dir fs path + * @param {fs.Stats} stats + * @param {Boolean} initialAdd + * @param {Number} depth relative to user-supplied path + * @param {String} target child path targeted for watch + * @param {Object} wh Common watch helpers for this path + * @param {String} realpath + * @returns {Promise} closer for the watcher instance. + */ +async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) { + const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir)); + const tracked = parentDir.has(sysPath.basename(dir)); + if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) { + if (!wh.hasGlob || wh.globFilter(dir)) this.fsw._emit(EV_ADD_DIR, dir, stats); + } + + // ensure dir is tracked (harmless if redundant) + parentDir.add(sysPath.basename(dir)); + this.fsw._getWatchedDir(dir); + let throttler; + let closer; + + const oDepth = this.fsw.options.depth; + if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath)) { + if (!target) { + await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler); + if (this.fsw.closed) return; + } + + closer = this._watchWithNodeFs(dir, (dirPath, stats) => { + // if current directory is removed, do nothing + if (stats && stats.mtimeMs === 0) return; + + this._handleRead(dirPath, false, wh, target, dir, depth, throttler); + }); + } + return closer; +} + +/** + * Handle added file, directory, or glob pattern. + * Delegates call to _handleFile / _handleDir after checks. + * @param {String} path to file or ir + * @param {Boolean} initialAdd was the file added at watch instantiation? + * @param {Object} priorWh depth relative to user-supplied path + * @param {Number} depth Child path actually targeted for watch + * @param {String=} target Child path actually targeted for watch + * @returns {Promise} + */ +async _addToNodeFs(path, initialAdd, priorWh, depth, target) { + const ready = this.fsw._emitReady; + if (this.fsw._isIgnored(path) || this.fsw.closed) { + ready(); + return false; + } + + const wh = this.fsw._getWatchHelpers(path, depth); + if (!wh.hasGlob && priorWh) { + wh.hasGlob = priorWh.hasGlob; + wh.globFilter = priorWh.globFilter; + wh.filterPath = entry => priorWh.filterPath(entry); + wh.filterDir = entry => priorWh.filterDir(entry); + } + + // evaluate what is at the path we're being asked to watch + try { + const stats = await statMethods[wh.statMethod](wh.watchPath); + if (this.fsw.closed) return; + if (this.fsw._isIgnored(wh.watchPath, stats)) { + ready(); + return false; + } + + const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START); + let closer; + if (stats.isDirectory()) { + const absPath = sysPath.resolve(path); + const targetPath = follow ? await fsrealpath(path) : path; + if (this.fsw.closed) return; + closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath); + if (this.fsw.closed) return; + // preserve this symlink's target path + if (absPath !== targetPath && targetPath !== undefined) { + this.fsw._symlinkPaths.set(absPath, targetPath); + } + } else if (stats.isSymbolicLink()) { + const targetPath = follow ? await fsrealpath(path) : path; + if (this.fsw.closed) return; + const parent = sysPath.dirname(wh.watchPath); + this.fsw._getWatchedDir(parent).add(wh.watchPath); + this.fsw._emit(EV_ADD, wh.watchPath, stats); + closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath); + if (this.fsw.closed) return; + + // preserve this symlink's target path + if (targetPath !== undefined) { + this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath); + } + } else { + closer = this._handleFile(wh.watchPath, stats, initialAdd); + } + ready(); + + this.fsw._addPathCloser(path, closer); + return false; + + } catch (error) { + if (this.fsw._handleError(error)) { + ready(); + return path; + } + } +} + +} + +module.exports = NodeFsHandler; diff --git a/node_modules/chokidar/node_modules/glob-parent/CHANGELOG.md b/node_modules/chokidar/node_modules/glob-parent/CHANGELOG.md new file mode 100644 index 0000000..fb9de96 --- /dev/null +++ b/node_modules/chokidar/node_modules/glob-parent/CHANGELOG.md @@ -0,0 +1,110 @@ +### [5.1.2](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2) (2021-03-06) + + +### Bug Fixes + +* eliminate ReDoS ([#36](https://github.com/gulpjs/glob-parent/issues/36)) ([f923116](https://github.com/gulpjs/glob-parent/commit/f9231168b0041fea3f8f954b3cceb56269fc6366)) + +### [5.1.1](https://github.com/gulpjs/glob-parent/compare/v5.1.0...v5.1.1) (2021-01-27) + + +### Bug Fixes + +* unescape exclamation mark ([#26](https://github.com/gulpjs/glob-parent/issues/26)) ([a98874f](https://github.com/gulpjs/glob-parent/commit/a98874f1a59e407f4fb1beb0db4efa8392da60bb)) + +## [5.1.0](https://github.com/gulpjs/glob-parent/compare/v5.0.0...v5.1.0) (2021-01-27) + + +### Features + +* add `flipBackslashes` option to disable auto conversion of slashes (closes [#24](https://github.com/gulpjs/glob-parent/issues/24)) ([#25](https://github.com/gulpjs/glob-parent/issues/25)) ([eecf91d](https://github.com/gulpjs/glob-parent/commit/eecf91d5e3834ed78aee39c4eaaae654d76b87b3)) + +## [5.0.0](https://github.com/gulpjs/glob-parent/compare/v4.0.0...v5.0.0) (2021-01-27) + + +### ⚠ BREAKING CHANGES + +* Drop support for node <6 & bump dependencies + +### Miscellaneous Chores + +* Drop support for node <6 & bump dependencies ([896c0c0](https://github.com/gulpjs/glob-parent/commit/896c0c00b4e7362f60b96e7fc295ae929245255a)) + +## [4.0.0](https://github.com/gulpjs/glob-parent/compare/v3.1.0...v4.0.0) (2021-01-27) + + +### ⚠ BREAKING CHANGES + +* question marks are valid path characters on Windows so avoid flagging as a glob when alone +* Update is-glob dependency + +### Features + +* hoist regexps and strings for performance gains ([4a80667](https://github.com/gulpjs/glob-parent/commit/4a80667c69355c76a572a5892b0f133c8e1f457e)) +* question marks are valid path characters on Windows so avoid flagging as a glob when alone ([2a551dd](https://github.com/gulpjs/glob-parent/commit/2a551dd0dc3235e78bf3c94843d4107072d17841)) +* Update is-glob dependency ([e41fcd8](https://github.com/gulpjs/glob-parent/commit/e41fcd895d1f7bc617dba45c9d935a7949b9c281)) + +## [3.1.0](https://github.com/gulpjs/glob-parent/compare/v3.0.1...v3.1.0) (2021-01-27) + + +### Features + +* allow basic win32 backslash use ([272afa5](https://github.com/gulpjs/glob-parent/commit/272afa5fd070fc0f796386a5993d4ee4a846988b)) +* handle extglobs (parentheses) containing separators ([7db1bdb](https://github.com/gulpjs/glob-parent/commit/7db1bdb0756e55fd14619e8ce31aa31b17b117fd)) +* new approach to braces/brackets handling ([8269bd8](https://github.com/gulpjs/glob-parent/commit/8269bd89290d99fac9395a354fb56fdcdb80f0be)) +* pre-process braces/brackets sections ([9ef8a87](https://github.com/gulpjs/glob-parent/commit/9ef8a87f66b1a43d0591e7a8e4fc5a18415ee388)) +* preserve escaped brace/bracket at end of string ([8cfb0ba](https://github.com/gulpjs/glob-parent/commit/8cfb0ba84202d51571340dcbaf61b79d16a26c76)) + + +### Bug Fixes + +* trailing escaped square brackets ([99ec9fe](https://github.com/gulpjs/glob-parent/commit/99ec9fecc60ee488ded20a94dd4f18b4f55c4ccf)) + +### [3.0.1](https://github.com/gulpjs/glob-parent/compare/v3.0.0...v3.0.1) (2021-01-27) + + +### Features + +* use path-dirname ponyfill ([cdbea5f](https://github.com/gulpjs/glob-parent/commit/cdbea5f32a58a54e001a75ddd7c0fccd4776aacc)) + + +### Bug Fixes + +* unescape glob-escaped dirnames on output ([598c533](https://github.com/gulpjs/glob-parent/commit/598c533bdf49c1428bc063aa9b8db40c5a86b030)) + +## [3.0.0](https://github.com/gulpjs/glob-parent/compare/v2.0.0...v3.0.0) (2021-01-27) + + +### ⚠ BREAKING CHANGES + +* update is-glob dependency + +### Features + +* update is-glob dependency ([5c5f8ef](https://github.com/gulpjs/glob-parent/commit/5c5f8efcee362a8e7638cf8220666acd8784f6bd)) + +## [2.0.0](https://github.com/gulpjs/glob-parent/compare/v1.3.0...v2.0.0) (2021-01-27) + + +### Features + +* move up to dirname regardless of glob characters ([f97fb83](https://github.com/gulpjs/glob-parent/commit/f97fb83be2e0a9fc8d3b760e789d2ecadd6aa0c2)) + +## [1.3.0](https://github.com/gulpjs/glob-parent/compare/v1.2.0...v1.3.0) (2021-01-27) + +## [1.2.0](https://github.com/gulpjs/glob-parent/compare/v1.1.0...v1.2.0) (2021-01-27) + + +### Reverts + +* feat: make regex test strings smaller ([dc80fa9](https://github.com/gulpjs/glob-parent/commit/dc80fa9658dca20549cfeba44bbd37d5246fcce0)) + +## [1.1.0](https://github.com/gulpjs/glob-parent/compare/v1.0.0...v1.1.0) (2021-01-27) + + +### Features + +* make regex test strings smaller ([cd83220](https://github.com/gulpjs/glob-parent/commit/cd832208638f45169f986d80fcf66e401f35d233)) + +## 1.0.0 (2021-01-27) + diff --git a/node_modules/chokidar/node_modules/glob-parent/LICENSE b/node_modules/chokidar/node_modules/glob-parent/LICENSE new file mode 100644 index 0000000..63222d7 --- /dev/null +++ b/node_modules/chokidar/node_modules/glob-parent/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2015, 2019 Elan Shanker + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/chokidar/node_modules/glob-parent/README.md b/node_modules/chokidar/node_modules/glob-parent/README.md new file mode 100644 index 0000000..36a2793 --- /dev/null +++ b/node_modules/chokidar/node_modules/glob-parent/README.md @@ -0,0 +1,137 @@ +

+ + + +

+ +# glob-parent + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Extract the non-magic parent path from a glob string. + +## Usage + +```js +var globParent = require('glob-parent'); + +globParent('path/to/*.js'); // 'path/to' +globParent('/root/path/to/*.js'); // '/root/path/to' +globParent('/*.js'); // '/' +globParent('*.js'); // '.' +globParent('**/*.js'); // '.' +globParent('path/{to,from}'); // 'path' +globParent('path/!(to|from)'); // 'path' +globParent('path/?(to|from)'); // 'path' +globParent('path/+(to|from)'); // 'path' +globParent('path/*(to|from)'); // 'path' +globParent('path/@(to|from)'); // 'path' +globParent('path/**/*'); // 'path' + +// if provided a non-glob path, returns the nearest dir +globParent('path/foo/bar.js'); // 'path/foo' +globParent('path/foo/'); // 'path/foo' +globParent('path/foo'); // 'path' (see issue #3 for details) +``` + +## API + +### `globParent(maybeGlobString, [options])` + +Takes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below. + +#### options + +```js +{ + // Disables the automatic conversion of slashes for Windows + flipBackslashes: true +} +``` + +## Escaping + +The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters: + +- `?` (question mark) unless used as a path segment alone +- `*` (asterisk) +- `|` (pipe) +- `(` (opening parenthesis) +- `)` (closing parenthesis) +- `{` (opening curly brace) +- `}` (closing curly brace) +- `[` (opening bracket) +- `]` (closing bracket) + +**Example** + +```js +globParent('foo/[bar]/') // 'foo' +globParent('foo/\\[bar]/') // 'foo/[bar]' +``` + +## Limitations + +### Braces & Brackets +This library attempts a quick and imperfect method of determining which path +parts have glob magic without fully parsing/lexing the pattern. There are some +advanced use cases that can trip it up, such as nested braces where the outer +pair is escaped and the inner one contains a path separator. If you find +yourself in the unlikely circumstance of being affected by this or need to +ensure higher-fidelity glob handling in your library, it is recommended that you +pre-process your input with [expand-braces] and/or [expand-brackets]. + +### Windows +Backslashes are not valid path separators for globs. If a path with backslashes +is provided anyway, for simple cases, glob-parent will replace the path +separator for you and return the non-glob parent path (now with +forward-slashes, which are still valid as Windows path separators). + +This cannot be used in conjunction with escape characters. + +```js +// BAD +globParent('C:\\Program Files \\(x86\\)\\*.ext') // 'C:/Program Files /(x86/)' + +// GOOD +globParent('C:/Program Files\\(x86\\)/*.ext') // 'C:/Program Files (x86)' +``` + +If you are using escape characters for a pattern without path parts (i.e. +relative to `cwd`), prefix with `./` to avoid confusing glob-parent. + +```js +// BAD +globParent('foo \\[bar]') // 'foo ' +globParent('foo \\[bar]*') // 'foo ' + +// GOOD +globParent('./foo \\[bar]') // 'foo [bar]' +globParent('./foo \\[bar]*') // '.' +``` + +## License + +ISC + +[expand-braces]: https://github.com/jonschlinkert/expand-braces +[expand-brackets]: https://github.com/jonschlinkert/expand-brackets + +[downloads-image]: https://img.shields.io/npm/dm/glob-parent.svg +[npm-url]: https://www.npmjs.com/package/glob-parent +[npm-image]: https://img.shields.io/npm/v/glob-parent.svg + +[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=2&branchName=master +[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/glob-parent?branchName=master + +[travis-url]: https://travis-ci.org/gulpjs/glob-parent +[travis-image]: https://img.shields.io/travis/gulpjs/glob-parent.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-parent +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-parent.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/glob-parent +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/chokidar/node_modules/glob-parent/index.js b/node_modules/chokidar/node_modules/glob-parent/index.js new file mode 100644 index 0000000..09e257e --- /dev/null +++ b/node_modules/chokidar/node_modules/glob-parent/index.js @@ -0,0 +1,42 @@ +'use strict'; + +var isGlob = require('is-glob'); +var pathPosixDirname = require('path').posix.dirname; +var isWin32 = require('os').platform() === 'win32'; + +var slash = '/'; +var backslash = /\\/g; +var enclosure = /[\{\[].*[\}\]]$/; +var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; +var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; + +/** + * @param {string} str + * @param {Object} opts + * @param {boolean} [opts.flipBackslashes=true] + * @returns {string} + */ +module.exports = function globParent(str, opts) { + var options = Object.assign({ flipBackslashes: true }, opts); + + // flip windows path separators + if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { + str = str.replace(backslash, slash); + } + + // special case for strings ending in enclosure containing path separator + if (enclosure.test(str)) { + str += slash; + } + + // preserves full path in case of trailing path separator + str += 'a'; + + // remove path parts that are globby + do { + str = pathPosixDirname(str); + } while (isGlob(str) || globby.test(str)); + + // remove escape chars and return result + return str.replace(escaped, '$1'); +}; diff --git a/node_modules/chokidar/node_modules/glob-parent/package.json b/node_modules/chokidar/node_modules/glob-parent/package.json new file mode 100644 index 0000000..125c971 --- /dev/null +++ b/node_modules/chokidar/node_modules/glob-parent/package.json @@ -0,0 +1,48 @@ +{ + "name": "glob-parent", + "version": "5.1.2", + "description": "Extract the non-magic parent path from a glob string.", + "author": "Gulp Team (https://gulpjs.com/)", + "contributors": [ + "Elan Shanker (https://github.com/es128)", + "Blaine Bublitz " + ], + "repository": "gulpjs/glob-parent", + "license": "ISC", + "engines": { + "node": ">= 6" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "nyc mocha --async-only", + "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", + "coveralls": "nyc report --reporter=text-lcov | coveralls" + }, + "dependencies": { + "is-glob": "^4.0.1" + }, + "devDependencies": { + "coveralls": "^3.0.11", + "eslint": "^2.13.1", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "mocha": "^6.0.2", + "nyc": "^13.3.0" + }, + "keywords": [ + "glob", + "parent", + "strip", + "path", + "dirname", + "directory", + "base", + "wildcard" + ] +} diff --git a/node_modules/chokidar/package.json b/node_modules/chokidar/package.json new file mode 100644 index 0000000..e8f8b3d --- /dev/null +++ b/node_modules/chokidar/package.json @@ -0,0 +1,70 @@ +{ + "name": "chokidar", + "description": "Minimal and efficient cross-platform file watching library", + "version": "3.6.0", + "homepage": "https://github.com/paulmillr/chokidar", + "author": "Paul Miller (https://paulmillr.com)", + "contributors": [ + "Paul Miller (https://paulmillr.com)", + "Elan Shanker" + ], + "engines": { + "node": ">= 8.10.0" + }, + "main": "index.js", + "types": "./types/index.d.ts", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "devDependencies": { + "@types/node": "^14", + "chai": "^4.3", + "dtslint": "^3.3.0", + "eslint": "^7.0.0", + "mocha": "^7.0.0", + "rimraf": "^3.0.0", + "sinon": "^9.0.1", + "sinon-chai": "^3.3.0", + "typescript": "^4.4.3", + "upath": "^1.2.0" + }, + "files": [ + "index.js", + "lib/*.js", + "types/index.d.ts" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/paulmillr/chokidar.git" + }, + "bugs": { + "url": "https://github.com/paulmillr/chokidar/issues" + }, + "license": "MIT", + "scripts": { + "dtslint": "dtslint types", + "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .", + "build": "npm ls", + "mocha": "mocha --exit --timeout 90000", + "test": "npm run lint && npm run mocha" + }, + "keywords": [ + "fs", + "watch", + "watchFile", + "watcher", + "watching", + "file", + "fsevents" + ], + "funding": "https://paulmillr.com/funding/" +} diff --git a/node_modules/chokidar/types/index.d.ts b/node_modules/chokidar/types/index.d.ts new file mode 100644 index 0000000..4558066 --- /dev/null +++ b/node_modules/chokidar/types/index.d.ts @@ -0,0 +1,192 @@ +// TypeScript Version: 3.0 + +/// + +import * as fs from "fs"; +import { EventEmitter } from "events"; +import { Matcher } from 'anymatch'; + +export class FSWatcher extends EventEmitter implements fs.FSWatcher { + options: WatchOptions; + + /** + * Constructs a new FSWatcher instance with optional WatchOptions parameter. + */ + constructor(options?: WatchOptions); + + /** + * Add files, directories, or glob patterns for tracking. Takes an array of strings or just one + * string. + */ + add(paths: string | ReadonlyArray): this; + + /** + * Stop watching files, directories, or glob patterns. Takes an array of strings or just one + * string. + */ + unwatch(paths: string | ReadonlyArray): this; + + /** + * Returns an object representing all the paths on the file system being watched by this + * `FSWatcher` instance. The object's keys are all the directories (using absolute paths unless + * the `cwd` option was used), and the values are arrays of the names of the items contained in + * each directory. + */ + getWatched(): { + [directory: string]: string[]; + }; + + /** + * Removes all listeners from watched files. + */ + close(): Promise; + + on(event: 'add'|'addDir'|'change', listener: (path: string, stats?: fs.Stats) => void): this; + + on(event: 'all', listener: (eventName: 'add'|'addDir'|'change'|'unlink'|'unlinkDir', path: string, stats?: fs.Stats) => void): this; + + /** + * Error occurred + */ + on(event: 'error', listener: (error: Error) => void): this; + + /** + * Exposes the native Node `fs.FSWatcher events` + */ + on(event: 'raw', listener: (eventName: string, path: string, details: any) => void): this; + + /** + * Fires when the initial scan is complete + */ + on(event: 'ready', listener: () => void): this; + + on(event: 'unlink'|'unlinkDir', listener: (path: string) => void): this; + + on(event: string, listener: (...args: any[]) => void): this; + + ref(): this; + + unref(): this; +} + +export interface WatchOptions { + /** + * Indicates whether the process should continue to run as long as files are being watched. If + * set to `false` when using `fsevents` to watch, no more events will be emitted after `ready`, + * even if the process continues to run. + */ + persistent?: boolean; + + /** + * ([anymatch](https://github.com/micromatch/anymatch)-compatible definition) Defines files/paths to + * be ignored. The whole relative or absolute path is tested, not just filename. If a function + * with two arguments is provided, it gets called twice per path - once with a single argument + * (the path), second time with two arguments (the path and the + * [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path). + */ + ignored?: Matcher; + + /** + * If set to `false` then `add`/`addDir` events are also emitted for matching paths while + * instantiating the watching as chokidar discovers these file paths (before the `ready` event). + */ + ignoreInitial?: boolean; + + /** + * When `false`, only the symlinks themselves will be watched for changes instead of following + * the link references and bubbling events through the link's path. + */ + followSymlinks?: boolean; + + /** + * The base directory from which watch `paths` are to be derived. Paths emitted with events will + * be relative to this. + */ + cwd?: string; + + /** + * If set to true then the strings passed to .watch() and .add() are treated as literal path + * names, even if they look like globs. Default: false. + */ + disableGlobbing?: boolean; + + /** + * Whether to use fs.watchFile (backed by polling), or fs.watch. If polling leads to high CPU + * utilization, consider setting this to `false`. It is typically necessary to **set this to + * `true` to successfully watch files over a network**, and it may be necessary to successfully + * watch files in other non-standard situations. Setting to `true` explicitly on OS X overrides + * the `useFsEvents` default. + */ + usePolling?: boolean; + + /** + * Whether to use the `fsevents` watching interface if available. When set to `true` explicitly + * and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on + * OS X, `usePolling: true` becomes the default. + */ + useFsEvents?: boolean; + + /** + * If relying upon the [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object that + * may get passed with `add`, `addDir`, and `change` events, set this to `true` to ensure it is + * provided even in cases where it wasn't already available from the underlying watch events. + */ + alwaysStat?: boolean; + + /** + * If set, limits how many levels of subdirectories will be traversed. + */ + depth?: number; + + /** + * Interval of file system polling. + */ + interval?: number; + + /** + * Interval of file system polling for binary files. ([see list of binary extensions](https://gi + * thub.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json)) + */ + binaryInterval?: number; + + /** + * Indicates whether to watch files that don't have read permissions if possible. If watching + * fails due to `EPERM` or `EACCES` with this set to `true`, the errors will be suppressed + * silently. + */ + ignorePermissionErrors?: boolean; + + /** + * `true` if `useFsEvents` and `usePolling` are `false`). Automatically filters out artifacts + * that occur when using editors that use "atomic writes" instead of writing directly to the + * source file. If a file is re-added within 100 ms of being deleted, Chokidar emits a `change` + * event rather than `unlink` then `add`. If the default of 100 ms does not work well for you, + * you can override it by setting `atomic` to a custom value, in milliseconds. + */ + atomic?: boolean | number; + + /** + * can be set to an object in order to adjust timing params: + */ + awaitWriteFinish?: AwaitWriteFinishOptions | boolean; +} + +export interface AwaitWriteFinishOptions { + /** + * Amount of time in milliseconds for a file size to remain constant before emitting its event. + */ + stabilityThreshold?: number; + + /** + * File size polling interval. + */ + pollInterval?: number; +} + +/** + * produces an instance of `FSWatcher`. + */ +export function watch( + paths: string | ReadonlyArray, + options?: WatchOptions +): FSWatcher; diff --git a/node_modules/commander/CHANGELOG.md b/node_modules/commander/CHANGELOG.md new file mode 100644 index 0000000..f00cb2b --- /dev/null +++ b/node_modules/commander/CHANGELOG.md @@ -0,0 +1,436 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). (Format adopted after v3.0.0.) + + + +## [4.1.1] (2020-02-02) + +### Fixed + +* TypeScript definition for `.action()` should include Promise for async ([#1157]) + +## [4.1.0] (2020-01-06) + +### Added + +* two routines to change how option values are handled, and eliminate name clashes with command properties ([#933] [#1102]) + * see storeOptionsAsProperties and passCommandToAction in README +* `.parseAsync` to use instead of `.parse` if supply async action handlers ([#806] [#1118]) + +### Fixed + +* Remove trailing blanks from wrapped help text ([#1096]) + +### Changed + +* update dependencies +* extend security coverage for Commander 2.x to 2020-02-03 +* improvements to README +* improvements to TypeScript definition documentation +* move old versions out of main CHANGELOG +* removed explicit use of `ts-node` in tests + +## [4.0.1] (2019-11-12) + +### Fixed + +* display help when requested, even if there are missing required options ([#1091]) + +## [4.0.0] (2019-11-02) + +### Added + +* automatically wrap and indent help descriptions for options and commands ([#1051]) +* `.exitOverride()` allows override of calls to `process.exit` for additional error handling and to keep program running ([#1040]) +* support for declaring required options with `.requiredOptions()` ([#1071]) +* GitHub Actions support ([#1027]) +* translation links in README + +### Changed + +* dev: switch tests from Sinon+Should to Jest with major rewrite of tests ([#1035]) +* call default subcommand even when there are unknown options ([#1047]) +* *Breaking* Commander is only officially supported on Node 8 and above, and requires Node 6 ([#1053]) + +### Fixed + +* *Breaking* keep command object out of program.args when action handler called ([#1048]) + * also, action handler now passed array of unknown arguments +* complain about unknown options when program argument supplied and action handler ([#1049]) + * this changes parameters to `command:*` event to include unknown arguments +* removed deprecated `customFds` option from call to `child_process.spawn` ([#1052]) +* rework TypeScript declarations to bring all types into imported namespace ([#1081]) + +### Migration Tips + +#### Testing for no arguments + +If you were previously using code like: + +```js +if (!program.args.length) ... +``` + +a partial replacement is: + +```js +if (program.rawArgs.length < 3) ... +``` + +## [4.0.0-1] Prerelease (2019-10-08) + +(Released in 4.0.0) + +## [4.0.0-0] Prerelease (2019-10-01) + +(Released in 4.0.0) + +## [2.20.1] (2019-09-29) + +### Fixed + +* Improve tracking of executable subcommands. + +### Changed + +* update development dependencies + +## [3.0.2] (2019-09-27) + +### Fixed + +* Improve tracking of executable subcommands. + +### Changed + +* update development dependencies + +## [3.0.1] (2019-08-30) + +### Added + +* .name and .usage to README ([#1010]) +* Table of Contents to README ([#1010]) +* TypeScript definition for `executableFile` in CommandOptions ([#1028]) + +### Changed + +* consistently use `const` rather than `var` in README ([#1026]) + +### Fixed + +* help for sub commands with custom executableFile ([#1018]) + +## [3.0.0] / 2019-08-08 + +* Add option to specify executable file name ([#999]) + * e.g. `.command('clone', 'clone description', { executableFile: 'myClone' })` +* Change docs for `.command` to contrast action handler vs git-style executable. ([#938] [#990]) +* **Breaking** Change TypeScript to use overloaded function for `.command`. ([#938] [#990]) +* Change to use straight quotes around strings in error messages (like 'this' instead of `this') ([#915]) +* Add TypeScript "reference types" for node ([#974]) +* Add support for hyphen as an option argument in subcommands ([#697]) +* Add support for a short option flag and its value to be concatenated for action handler subcommands ([#599]) + * e.g. `-p 80` can also be supplied as `-p80` +* Add executable arguments to spawn in win32, for git-style executables ([#611]) + * e.g. `node --harmony myCommand.js clone` +* Add parent command as prefix of subcommand in help ([#980]) +* Add optional custom description to `.version` ([#963]) + * e.g. `program.version('0.0.1', '-v, --vers', 'output the current version')` +* Add `.helpOption(flags, description)` routine to customise help flags and description ([#963]) + * e.g. `.helpOption('-e, --HELP', 'read more information')` +* Fix behavior of --no-* options ([#795]) + * can now define both `--foo` and `--no-foo` + * **Breaking** custom event listeners: `--no-foo` on cli now emits `option:no-foo` (previously `option:foo`) + * **Breaking** default value: defining `--no-foo` after defining `--foo` leaves the default value unchanged (previously set it to false) + * allow boolean default value, such as from environment ([#987]) +* Increment inspector port for spawned subcommands ([#991]) + * e.g. `node --inspect myCommand.js clone` + +### Migration Tips + +The custom event for a negated option like `--no-foo` is `option:no-foo` (previously `option:foo`). + +```js +program + .option('--no-foo') + .on('option:no-foo', () => { + console.log('removing foo'); + }); +``` + +When using TypeScript, adding a command does not allow an explicit `undefined` for an unwanted executable description (e.g +for a command with an action handler). + +```js +program + .command('action1', undefined, { noHelp: true }) // No longer valid + .command('action2', { noHelp: true }) // Correct +``` + +## 3.0.0-0 Prerelease / 2019-07-28 + +(Released as 3.0.0) + +## 2.20.0 / 2019-04-02 + +* fix: resolve symbolic links completely when hunting for subcommands (#935) +* Update index.d.ts (#930) +* Update Readme.md (#924) +* Remove --save option as it isn't required anymore (#918) +* Add link to the license file (#900) +* Added example of receiving args from options (#858) +* Added missing semicolon (#882) +* Add extension to .eslintrc (#876) + +## 2.19.0 / 2018-10-02 + +* Removed newline after Options and Commands headers (#864) +* Bugfix - Error output (#862) +* Fix to change default value to string (#856) + +## 2.18.0 / 2018-09-07 + +* Standardize help output (#853) +* chmod 644 travis.yml (#851) +* add support for execute typescript subcommand via ts-node (#849) + +## 2.17.1 / 2018-08-07 + +* Fix bug in command emit (#844) + +## 2.17.0 / 2018-08-03 + +* fixed newline output after help information (#833) +* Fix to emit the action even without command (#778) +* npm update (#823) + +## 2.16.0 / 2018-06-29 + +* Remove Makefile and `test/run` (#821) +* Make 'npm test' run on Windows (#820) +* Add badge to display install size (#807) +* chore: cache node_modules (#814) +* chore: remove Node.js 4 (EOL), add Node.js 10 (#813) +* fixed typo in readme (#812) +* Fix types (#804) +* Update eslint to resolve vulnerabilities in lodash (#799) +* updated readme with custom event listeners. (#791) +* fix tests (#794) + +## 2.15.0 / 2018-03-07 + +* Update downloads badge to point to graph of downloads over time instead of duplicating link to npm +* Arguments description + +## 2.14.1 / 2018-02-07 + +* Fix typing of help function + +## 2.14.0 / 2018-02-05 + +* only register the option:version event once +* Fixes issue #727: Passing empty string for option on command is set to undefined +* enable eqeqeq rule +* resolves #754 add linter configuration to project +* resolves #560 respect custom name for version option +* document how to override the version flag +* document using options per command + +## 2.13.0 / 2018-01-09 + +* Do not print default for --no- +* remove trailing spaces in command help +* Update CI's Node.js to LTS and latest version +* typedefs: Command and Option types added to commander namespace + +## 2.12.2 / 2017-11-28 + +* fix: typings are not shipped + +## 2.12.1 / 2017-11-23 + +* Move @types/node to dev dependency + +## 2.12.0 / 2017-11-22 + +* add attributeName() method to Option objects +* Documentation updated for options with --no prefix +* typings: `outputHelp` takes a string as the first parameter +* typings: use overloads +* feat(typings): update to match js api +* Print default value in option help +* Fix translation error +* Fail when using same command and alias (#491) +* feat(typings): add help callback +* fix bug when description is add after command with options (#662) +* Format js code +* Rename History.md to CHANGELOG.md (#668) +* feat(typings): add typings to support TypeScript (#646) +* use current node + +## 2.11.0 / 2017-07-03 + +* Fix help section order and padding (#652) +* feature: support for signals to subcommands (#632) +* Fixed #37, --help should not display first (#447) +* Fix translation errors. (#570) +* Add package-lock.json +* Remove engines +* Upgrade package version +* Prefix events to prevent conflicts between commands and options (#494) +* Removing dependency on graceful-readlink +* Support setting name in #name function and make it chainable +* Add .vscode directory to .gitignore (Visual Studio Code metadata) +* Updated link to ruby commander in readme files + +## 2.10.0 / 2017-06-19 + +* Update .travis.yml. drop support for older node.js versions. +* Fix require arguments in README.md +* On SemVer you do not start from 0.0.1 +* Add missing semi colon in readme +* Add save param to npm install +* node v6 travis test +* Update Readme_zh-CN.md +* Allow literal '--' to be passed-through as an argument +* Test subcommand alias help +* link build badge to master branch +* Support the alias of Git style sub-command +* added keyword commander for better search result on npm +* Fix Sub-Subcommands +* test node.js stable +* Fixes TypeError when a command has an option called `--description` +* Update README.md to make it beginner friendly and elaborate on the difference between angled and square brackets. +* Add chinese Readme file + +## 2.9.0 / 2015-10-13 + +* Add option `isDefault` to set default subcommand #415 @Qix- +* Add callback to allow filtering or post-processing of help text #434 @djulien +* Fix `undefined` text in help information close #414 #416 @zhiyelee + +## 2.8.1 / 2015-04-22 + +* Back out `support multiline description` Close #396 #397 + +## 2.8.0 / 2015-04-07 + +* Add `process.execArg` support, execution args like `--harmony` will be passed to sub-commands #387 @DigitalIO @zhiyelee +* Fix bug in Git-style sub-commands #372 @zhiyelee +* Allow commands to be hidden from help #383 @tonylukasavage +* When git-style sub-commands are in use, yet none are called, display help #382 @claylo +* Add ability to specify arguments syntax for top-level command #258 @rrthomas +* Support multiline descriptions #208 @zxqfox + +## 2.7.1 / 2015-03-11 + +* Revert #347 (fix collisions when option and first arg have same name) which causes a bug in #367. + +## 2.7.0 / 2015-03-09 + +* Fix git-style bug when installed globally. Close #335 #349 @zhiyelee +* Fix collisions when option and first arg have same name. Close #346 #347 @tonylukasavage +* Add support for camelCase on `opts()`. Close #353 @nkzawa +* Add node.js 0.12 and io.js to travis.yml +* Allow RegEx options. #337 @palanik +* Fixes exit code when sub-command failing. Close #260 #332 @pirelenito +* git-style `bin` files in $PATH make sense. Close #196 #327 @zhiyelee + +## 2.6.0 / 2014-12-30 + +* added `Command#allowUnknownOption` method. Close #138 #318 @doozr @zhiyelee +* Add application description to the help msg. Close #112 @dalssoft + +## 2.5.1 / 2014-12-15 + +* fixed two bugs incurred by variadic arguments. Close #291 @Quentin01 #302 @zhiyelee + +## 2.5.0 / 2014-10-24 + +* add support for variadic arguments. Closes #277 @whitlockjc + +## 2.4.0 / 2014-10-17 + +* fixed a bug on executing the coercion function of subcommands option. Closes #270 +* added `Command.prototype.name` to retrieve command name. Closes #264 #266 @tonylukasavage +* added `Command.prototype.opts` to retrieve all the options as a simple object of key-value pairs. Closes #262 @tonylukasavage +* fixed a bug on subcommand name. Closes #248 @jonathandelgado +* fixed function normalize doesn’t honor option terminator. Closes #216 @abbr + +## 2.3.0 / 2014-07-16 + +* add command alias'. Closes PR #210 +* fix: Typos. Closes #99 +* fix: Unused fs module. Closes #217 + +## 2.2.0 / 2014-03-29 + +* add passing of previous option value +* fix: support subcommands on windows. Closes #142 +* Now the defaultValue passed as the second argument of the coercion function. + +## 2.1.0 / 2013-11-21 + +* add: allow cflag style option params, unit test, fixes #174 + +## 2.0.0 / 2013-07-18 + +* remove input methods (.prompt, .confirm, etc) + +## Older versions + +* [1.x](./changelogs/CHANGELOG-1.md) +* [0.x](./changelogs/CHANGELOG-0.md) + +[#599]: https://github.com/tj/commander.js/issues/599 +[#611]: https://github.com/tj/commander.js/issues/611 +[#697]: https://github.com/tj/commander.js/issues/697 +[#795]: https://github.com/tj/commander.js/issues/795 +[#806]: https://github.com/tj/commander.js/issues/806 +[#915]: https://github.com/tj/commander.js/issues/915 +[#938]: https://github.com/tj/commander.js/issues/938 +[#963]: https://github.com/tj/commander.js/issues/963 +[#974]: https://github.com/tj/commander.js/issues/974 +[#980]: https://github.com/tj/commander.js/issues/980 +[#987]: https://github.com/tj/commander.js/issues/987 +[#990]: https://github.com/tj/commander.js/issues/990 +[#991]: https://github.com/tj/commander.js/issues/991 +[#993]: https://github.com/tj/commander.js/issues/993 +[#999]: https://github.com/tj/commander.js/issues/999 +[#1010]: https://github.com/tj/commander.js/pull/1010 +[#1018]: https://github.com/tj/commander.js/pull/1018 +[#1026]: https://github.com/tj/commander.js/pull/1026 +[#1027]: https://github.com/tj/commander.js/pull/1027 +[#1028]: https://github.com/tj/commander.js/pull/1028 +[#1035]: https://github.com/tj/commander.js/pull/1035 +[#1040]: https://github.com/tj/commander.js/pull/1040 +[#1047]: https://github.com/tj/commander.js/pull/1047 +[#1048]: https://github.com/tj/commander.js/pull/1048 +[#1049]: https://github.com/tj/commander.js/pull/1049 +[#1051]: https://github.com/tj/commander.js/pull/1051 +[#1052]: https://github.com/tj/commander.js/pull/1052 +[#1053]: https://github.com/tj/commander.js/pull/1053 +[#1071]: https://github.com/tj/commander.js/pull/1071 +[#1081]: https://github.com/tj/commander.js/pull/1081 +[#1091]: https://github.com/tj/commander.js/pull/1091 +[#1096]: https://github.com/tj/commander.js/pull/1096 +[#1102]: https://github.com/tj/commander.js/pull/1102 +[#1118]: https://github.com/tj/commander.js/pull/1118 +[#1157]: https://github.com/tj/commander.js/pull/1157 + +[Unreleased]: https://github.com/tj/commander.js/compare/master...develop +[4.1.1]: https://github.com/tj/commander.js/compare/v4.0.0..v4.1.1 +[4.1.0]: https://github.com/tj/commander.js/compare/v4.0.1..v4.1.0 +[4.0.1]: https://github.com/tj/commander.js/compare/v4.0.0..v4.0.1 +[4.0.0]: https://github.com/tj/commander.js/compare/v3.0.2..v4.0.0 +[4.0.0-1]: https://github.com/tj/commander.js/compare/v4.0.0-0..v4.0.0-1 +[4.0.0-0]: https://github.com/tj/commander.js/compare/v3.0.2...v4.0.0-0 +[3.0.2]: https://github.com/tj/commander.js/compare/v3.0.1...v3.0.2 +[3.0.1]: https://github.com/tj/commander.js/compare/v3.0.0...v3.0.1 +[3.0.0]: https://github.com/tj/commander.js/compare/v2.20.1...v3.0.0 +[2.20.1]: https://github.com/tj/commander.js/compare/v2.20.0...v2.20.1 diff --git a/node_modules/commander/LICENSE b/node_modules/commander/LICENSE new file mode 100644 index 0000000..10f997a --- /dev/null +++ b/node_modules/commander/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2011 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/commander/Readme.md b/node_modules/commander/Readme.md new file mode 100644 index 0000000..aa4f42b --- /dev/null +++ b/node_modules/commander/Readme.md @@ -0,0 +1,713 @@ +# Commander.js + +[![Build Status](https://api.travis-ci.org/tj/commander.js.svg?branch=master)](http://travis-ci.org/tj/commander.js) +[![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander) +[![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://npmcharts.com/compare/commander?minimal=true) +[![Install Size](https://packagephobia.now.sh/badge?p=commander)](https://packagephobia.now.sh/result?p=commander) + +The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/commander-rb/commander). + +Read this in other languages: English | [简体中文](./Readme_zh-CN.md) + +- [Commander.js](#commanderjs) + - [Installation](#installation) + - [Declaring program variable](#declaring-program-variable) + - [Options](#options) + - [Common option types, boolean and value](#common-option-types-boolean-and-value) + - [Default option value](#default-option-value) + - [Other option types, negatable boolean and flag|value](#other-option-types-negatable-boolean-and-flagvalue) + - [Custom option processing](#custom-option-processing) + - [Required option](#required-option) + - [Version option](#version-option) + - [Commands](#commands) + - [Specify the argument syntax](#specify-the-argument-syntax) + - [Action handler (sub)commands](#action-handler-subcommands) + - [Git-style executable (sub)commands](#git-style-executable-subcommands) + - [Automated --help](#automated---help) + - [Custom help](#custom-help) + - [.usage and .name](#usage-and-name) + - [.outputHelp(cb)](#outputhelpcb) + - [.helpOption(flags, description)](#helpoptionflags-description) + - [.help(cb)](#helpcb) + - [Custom event listeners](#custom-event-listeners) + - [Bits and pieces](#bits-and-pieces) + - [Avoiding option name clashes](#avoiding-option-name-clashes) + - [TypeScript](#typescript) + - [Node options such as --harmony](#node-options-such-as---harmony) + - [Node debugging](#node-debugging) + - [Override exit handling](#override-exit-handling) + - [Examples](#examples) + - [License](#license) + - [Support](#support) + - [Commander for enterprise](#commander-for-enterprise) + +## Installation + +```bash +npm install commander +``` + +## Declaring _program_ variable + +Commander exports a global object which is convenient for quick programs. +This is used in the examples in this README for brevity. + +```js +const program = require('commander'); +program.version('0.0.1'); +``` + +For larger programs which may use commander in multiple ways, including unit testing, it is better to create a local Command object to use. + + ```js + const commander = require('commander'); + const program = new commander.Command(); + program.version('0.0.1'); + ``` + +## Options + +Options are defined with the `.option()` method, also serving as documentation for the options. Each option can have a short flag (single character) and a long name, separated by a comma or space. + +The options can be accessed as properties on the Command object. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. Multiple short flags may be combined as a single arg, for example `-abc` is equivalent to `-a -b -c`. + +See also optional new behaviour to [avoid name clashes](#avoiding-option-name-clashes). + +### Common option types, boolean and value + +The two most used option types are a boolean flag, and an option which takes a value (declared using angle brackets). Both are `undefined` unless specified on command line. + +```js +const program = require('commander'); + +program + .option('-d, --debug', 'output extra debugging') + .option('-s, --small', 'small pizza size') + .option('-p, --pizza-type ', 'flavour of pizza'); + +program.parse(process.argv); + +if (program.debug) console.log(program.opts()); +console.log('pizza details:'); +if (program.small) console.log('- small pizza size'); +if (program.pizzaType) console.log(`- ${program.pizzaType}`); +``` + +```bash +$ pizza-options -d +{ debug: true, small: undefined, pizzaType: undefined } +pizza details: +$ pizza-options -p +error: option '-p, --pizza-type ' argument missing +$ pizza-options -ds -p vegetarian +{ debug: true, small: true, pizzaType: 'vegetarian' } +pizza details: +- small pizza size +- vegetarian +$ pizza-options --pizza-type=cheese +pizza details: +- cheese +``` + +`program.parse(arguments)` processes the arguments, leaving any args not consumed by the options as the `program.args` array. + +### Default option value + +You can specify a default value for an option which takes a value. + +```js +const program = require('commander'); + +program + .option('-c, --cheese ', 'add the specified type of cheese', 'blue'); + +program.parse(process.argv); + +console.log(`cheese: ${program.cheese}`); +``` + +```bash +$ pizza-options +cheese: blue +$ pizza-options --cheese stilton +cheese: stilton +``` + +### Other option types, negatable boolean and flag|value + +You can specify a boolean option long name with a leading `no-` to set the option value to false when used. +Defined alone this also makes the option true by default. + +If you define `--foo` first, adding `--no-foo` does not change the default value from what it would +otherwise be. You can specify a default boolean value for a boolean flag and it can be overridden on command line. + +```js +const program = require('commander'); + +program + .option('--no-sauce', 'Remove sauce') + .option('--cheese ', 'cheese flavour', 'mozzarella') + .option('--no-cheese', 'plain with no cheese') + .parse(process.argv); + +const sauceStr = program.sauce ? 'sauce' : 'no sauce'; +const cheeseStr = (program.cheese === false) ? 'no cheese' : `${program.cheese} cheese`; +console.log(`You ordered a pizza with ${sauceStr} and ${cheeseStr}`); +``` + +```bash +$ pizza-options +You ordered a pizza with sauce and mozzarella cheese +$ pizza-options --sauce +error: unknown option '--sauce' +$ pizza-options --cheese=blue +You ordered a pizza with sauce and blue cheese +$ pizza-options --no-sauce --no-cheese +You ordered a pizza with no sauce and no cheese +``` + +You can specify an option which functions as a flag but may also take a value (declared using square brackets). + +```js +const program = require('commander'); + +program + .option('-c, --cheese [type]', 'Add cheese with optional type'); + +program.parse(process.argv); + +if (program.cheese === undefined) console.log('no cheese'); +else if (program.cheese === true) console.log('add cheese'); +else console.log(`add cheese type ${program.cheese}`); +``` + +```bash +$ pizza-options +no cheese +$ pizza-options --cheese +add cheese +$ pizza-options --cheese mozzarella +add cheese type mozzarella +``` + +### Custom option processing + +You may specify a function to do custom processing of option values. The callback function receives two parameters, the user specified value and the +previous value for the option. It returns the new value for the option. + +This allows you to coerce the option value to the desired type, or accumulate values, or do entirely custom processing. + +You can optionally specify the default/starting value for the option after the function. + +```js +const program = require('commander'); + +function myParseInt(value, dummyPrevious) { + // parseInt takes a string and an optional radix + return parseInt(value); +} + +function increaseVerbosity(dummyValue, previous) { + return previous + 1; +} + +function collect(value, previous) { + return previous.concat([value]); +} + +function commaSeparatedList(value, dummyPrevious) { + return value.split(','); +} + +program + .option('-f, --float ', 'float argument', parseFloat) + .option('-i, --integer ', 'integer argument', myParseInt) + .option('-v, --verbose', 'verbosity that can be increased', increaseVerbosity, 0) + .option('-c, --collect ', 'repeatable value', collect, []) + .option('-l, --list ', 'comma separated list', commaSeparatedList) +; + +program.parse(process.argv); + +if (program.float !== undefined) console.log(`float: ${program.float}`); +if (program.integer !== undefined) console.log(`integer: ${program.integer}`); +if (program.verbose > 0) console.log(`verbosity: ${program.verbose}`); +if (program.collect.length > 0) console.log(program.collect); +if (program.list !== undefined) console.log(program.list); +``` + +```bash +$ custom -f 1e2 +float: 100 +$ custom --integer 2 +integer: 2 +$ custom -v -v -v +verbose: 3 +$ custom -c a -c b -c c +[ 'a', 'b', 'c' ] +$ custom --list x,y,z +[ 'x', 'y', 'z' ] +``` + +### Required option + +You may specify a required (mandatory) option using `.requiredOption`. The option must be specified on the command line, or by having a default value. The method is otherwise the same as `.option` in format, taking flags and description, and optional default value or custom processing. + +```js +const program = require('commander'); + +program + .requiredOption('-c, --cheese ', 'pizza must have cheese'); + +program.parse(process.argv); +``` + +``` +$ pizza +error: required option '-c, --cheese ' not specified +``` + +### Version option + +The optional `version` method adds handling for displaying the command version. The default option flags are `-V` and `--version`, and when present the command prints the version number and exits. + +```js +program.version('0.0.1'); +``` + +```bash +$ ./examples/pizza -V +0.0.1 +``` + +You may change the flags and description by passing additional parameters to the `version` method, using +the same syntax for flags as the `option` method. The version flags can be named anything, but a long name is required. + +```js +program.version('0.0.1', '-v, --vers', 'output the current version'); +``` + +## Commands + +You can specify (sub)commands for your top-level command using `.command`. There are two ways these can be implemented: using an action handler attached to the command, or as a separate executable file (described in more detail later). In the first parameter to `.command` you specify the command name and any command arguments. The arguments may be `` or `[optional]`, and the last argument may also be `variadic...`. + +For example: + +```js +// Command implemented using action handler (description is supplied separately to `.command`) +// Returns new command for configuring. +program + .command('clone [destination]') + .description('clone a repository into a newly created directory') + .action((source, destination) => { + console.log('clone command called'); + }); + +// Command implemented using separate executable file (description is second parameter to `.command`) +// Returns top-level command for adding more commands. +program + .command('start ', 'start named service') + .command('stop [service]', 'stop named service, or all if no name supplied'); +``` + +### Specify the argument syntax + +You use `.arguments` to specify the arguments for the top-level command, and for subcommands they are included in the `.command` call. Angled brackets (e.g. ``) indicate required input. Square brackets (e.g. `[optional]`) indicate optional input. + +```js +const program = require('commander'); + +program + .version('0.1.0') + .arguments(' [env]') + .action(function (cmd, env) { + cmdValue = cmd; + envValue = env; + }); + +program.parse(process.argv); + +if (typeof cmdValue === 'undefined') { + console.error('no command given!'); + process.exit(1); +} +console.log('command:', cmdValue); +console.log('environment:', envValue || "no environment given"); +``` + + The last argument of a command can be variadic, and only the last argument. To make an argument variadic you + append `...` to the argument name. For example: + +```js +const program = require('commander'); + +program + .version('0.1.0') + .command('rmdir [otherDirs...]') + .action(function (dir, otherDirs) { + console.log('rmdir %s', dir); + if (otherDirs) { + otherDirs.forEach(function (oDir) { + console.log('rmdir %s', oDir); + }); + } + }); + +program.parse(process.argv); +``` + +The variadic argument is passed to the action handler as an array. (And this also applies to `program.args`.) + +### Action handler (sub)commands + +You can add options to a command that uses an action handler. +The action handler gets passed a parameter for each argument you declared, and one additional argument which is the +command object itself. This command argument has the values for the command-specific options added as properties. + +```js +const program = require('commander'); + +program + .command('rm ') + .option('-r, --recursive', 'Remove recursively') + .action(function (dir, cmdObj) { + console.log('remove ' + dir + (cmdObj.recursive ? ' recursively' : '')) + }) + +program.parse(process.argv) +``` + +You may supply an `async` action handler, in which case you call `.parseAsync` rather than `.parse`. + +```js +async function run() { /* code goes here */ } + +async function main() { + program + .command('run') + .action(run); + await program.parseAsync(process.argv); +} +``` + +A command's options on the command line are validated when the command is used. Any unknown options will be reported as an error. However, if an action-based command does not define an action, then the options are not validated. + +Configuration options can be passed with the call to `.command()`. Specifying `true` for `opts.noHelp` will remove the command from the generated help output. + +### Git-style executable (sub)commands + +When `.command()` is invoked with a description argument, this tells commander that you're going to use separate executables for sub-commands, much like `git(1)` and other popular tools. +Commander will search the executables in the directory of the entry script (like `./examples/pm`) with the name `program-subcommand`, like `pm-install`, `pm-search`. +You can specify a custom name with the `executableFile` configuration option. + +You handle the options for an executable (sub)command in the executable, and don't declare them at the top-level. + +```js +// file: ./examples/pm +const program = require('commander'); + +program + .version('0.1.0') + .command('install [name]', 'install one or more packages') + .command('search [query]', 'search with optional query') + .command('update', 'update installed packages', {executableFile: 'myUpdateSubCommand'}) + .command('list', 'list packages installed', {isDefault: true}) + .parse(process.argv); +``` + +Configuration options can be passed with the call to `.command()`. Specifying `true` for `opts.noHelp` will remove the command from the generated help output. Specifying `true` for `opts.isDefault` will run the subcommand if no other subcommand is specified. +Specifying a name with `executableFile` will override the default constructed name. + +If the program is designed to be installed globally, make sure the executables have proper modes, like `755`. + +## Automated --help + + The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: + +```bash +$ ./examples/pizza --help +Usage: pizza [options] + +An application for pizzas ordering + +Options: + -V, --version output the version number + -p, --peppers Add peppers + -P, --pineapple Add pineapple + -b, --bbq Add bbq sauce + -c, --cheese Add the specified type of cheese (default: "marble") + -C, --no-cheese You do not want any cheese + -h, --help output usage information +``` + +### Custom help + + You can display arbitrary `-h, --help` information + by listening for "--help". Commander will automatically + exit once you are done so that the remainder of your program + does not execute causing undesired behaviors, for example + in the following executable "stuff" will not output when + `--help` is used. + +```js +#!/usr/bin/env node + +const program = require('commander'); + +program + .version('0.1.0') + .option('-f, --foo', 'enable some foo') + .option('-b, --bar', 'enable some bar') + .option('-B, --baz', 'enable some baz'); + +// must be before .parse() since +// node's emit() is immediate + +program.on('--help', function(){ + console.log('') + console.log('Examples:'); + console.log(' $ custom-help --help'); + console.log(' $ custom-help -h'); +}); + +program.parse(process.argv); + +console.log('stuff'); +``` + +Yields the following help output when `node script-name.js -h` or `node script-name.js --help` are run: + +```Text +Usage: custom-help [options] + +Options: + -h, --help output usage information + -V, --version output the version number + -f, --foo enable some foo + -b, --bar enable some bar + -B, --baz enable some baz + +Examples: + $ custom-help --help + $ custom-help -h +``` + +### .usage and .name + +These allow you to customise the usage description in the first line of the help. The name is otherwise +deduced from the (full) program arguments. Given: + +```js +program + .name("my-command") + .usage("[global options] command") +``` + +The help will start with: + +```Text +Usage: my-command [global options] command +``` + +### .outputHelp(cb) + +Output help information without exiting. +Optional callback cb allows post-processing of help text before it is displayed. + +If you want to display help by default (e.g. if no command was provided), you can use something like: + +```js +const program = require('commander'); +const colors = require('colors'); + +program + .version('0.1.0') + .command('getstream [url]', 'get stream URL') + .parse(process.argv); + +if (!process.argv.slice(2).length) { + program.outputHelp(make_red); +} + +function make_red(txt) { + return colors.red(txt); //display the help text in red on the console +} +``` + +### .helpOption(flags, description) + + Override the default help flags and description. + +```js +program + .helpOption('-e, --HELP', 'read more information'); +``` + +### .help(cb) + + Output help information and exit immediately. + Optional callback cb allows post-processing of help text before it is displayed. + +## Custom event listeners + + You can execute custom actions by listening to command and option events. + +```js +program.on('option:verbose', function () { + process.env.VERBOSE = this.verbose; +}); + +// error on unknown commands +program.on('command:*', function () { + console.error('Invalid command: %s\nSee --help for a list of available commands.', program.args.join(' ')); + process.exit(1); +}); +``` + +## Bits and pieces + +### Avoiding option name clashes + +The original and default behaviour is that the option values are stored +as properties on the program, and the action handler is passed a +command object with the options values stored as properties. +This is very convenient to code, but the downside is possible clashes with +existing properties of Command. + +There are two new routines to change the behaviour, and the default behaviour may change in the future: + +- `storeOptionsAsProperties`: whether to store option values as properties on command object, or store separately (specify false) and access using `.opts()` +- `passCommandToAction`: whether to pass command to action handler, +or just the options (specify false) + +```js +// file: ./examples/storeOptionsAsProperties.action.js +program + .storeOptionsAsProperties(false) + .passCommandToAction(false); + +program + .name('my-program-name') + .option('-n,--name '); + +program + .command('show') + .option('-a,--action ') + .action((options) => { + console.log(options.action); + }); + +program.parse(process.argv); + +const programOptions = program.opts(); +console.log(programOptions.name); +``` + +### TypeScript + +The Commander package includes its TypeScript Definition file, but also requires the node types which you need to install yourself. e.g. + +```bash +npm install commander +npm install --save-dev @types/node +``` + +If you use `ts-node` and git-style sub-commands written as `.ts` files, you need to call your program through node to get the sub-commands called correctly. e.g. + +```bash +node -r ts-node/register pm.ts +``` + +### Node options such as `--harmony` + +You can enable `--harmony` option in two ways: + +- Use `#! /usr/bin/env node --harmony` in the sub-commands scripts. (Note Windows does not support this pattern.) +- Use the `--harmony` option when call the command, like `node --harmony examples/pm publish`. The `--harmony` option will be preserved when spawning sub-command process. + +### Node debugging + +If you are using the node inspector for [debugging](https://nodejs.org/en/docs/guides/debugging-getting-started/) git-style executable (sub)commands using `node --inspect` et al, +the inspector port is incremented by 1 for the spawned subcommand. + +### Override exit handling + +By default Commander calls `process.exit` when it detects errors, or after displaying the help or version. You can override +this behaviour and optionally supply a callback. The default override throws a `CommanderError`. + +The override callback is passed a `CommanderError` with properties `exitCode` number, `code` string, and `message`. The default override behaviour is to throw the error, except for async handling of executable subcommand completion which carries on. The normal display of error messages or version or help +is not affected by the override which is called after the display. + +``` js +program.exitOverride(); + +try { + program.parse(process.argv); +} catch (err) { + // custom processing... +} +``` + +## Examples + +```js +const program = require('commander'); + +program + .version('0.1.0') + .option('-C, --chdir ', 'change the working directory') + .option('-c, --config ', 'set config path. defaults to ./deploy.conf') + .option('-T, --no-tests', 'ignore test hook'); + +program + .command('setup [env]') + .description('run setup commands for all envs') + .option("-s, --setup_mode [mode]", "Which setup mode to use") + .action(function(env, options){ + const mode = options.setup_mode || "normal"; + env = env || 'all'; + console.log('setup for %s env(s) with %s mode', env, mode); + }); + +program + .command('exec ') + .alias('ex') + .description('execute the given remote cmd') + .option("-e, --exec_mode ", "Which exec mode to use") + .action(function(cmd, options){ + console.log('exec "%s" using %s mode', cmd, options.exec_mode); + }).on('--help', function() { + console.log(''); + console.log('Examples:'); + console.log(''); + console.log(' $ deploy exec sequential'); + console.log(' $ deploy exec async'); + }); + +program + .command('*') + .action(function(env){ + console.log('deploying "%s"', env); + }); + +program.parse(process.argv); +``` + +More Demos can be found in the [examples](https://github.com/tj/commander.js/tree/master/examples) directory. + +## License + +[MIT](https://github.com/tj/commander.js/blob/master/LICENSE) + +## Support + +Commander 4.x is supported on Node 8 and above, and is likely to work with Node 6 but not tested. +(For versions of Node below Node 6, use Commander 3.x or 2.x.) + +The main forum for free and community support is the project [Issues](https://github.com/tj/commander.js/issues) on GitHub. + +### Commander for enterprise + +Available as part of the Tidelift Subscription + +The maintainers of Commander and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-commander?utm_source=npm-commander&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/commander/index.js b/node_modules/commander/index.js new file mode 100644 index 0000000..37d20cc --- /dev/null +++ b/node_modules/commander/index.js @@ -0,0 +1,1649 @@ +/** + * Module dependencies. + */ + +var EventEmitter = require('events').EventEmitter; +var spawn = require('child_process').spawn; +var path = require('path'); +var dirname = path.dirname; +var basename = path.basename; +var fs = require('fs'); + +/** + * Inherit `Command` from `EventEmitter.prototype`. + */ + +require('util').inherits(Command, EventEmitter); + +/** + * Expose the root command. + */ + +exports = module.exports = new Command(); + +/** + * Expose `Command`. + */ + +exports.Command = Command; + +/** + * Expose `Option`. + */ + +exports.Option = Option; + +/** + * Initialize a new `Option` with the given `flags` and `description`. + * + * @param {String} flags + * @param {String} description + * @api public + */ + +function Option(flags, description) { + this.flags = flags; + this.required = flags.indexOf('<') >= 0; // A value must be supplied when the option is specified. + this.optional = flags.indexOf('[') >= 0; // A value is optional when the option is specified. + this.mandatory = false; // The option must have a value after parsing, which usually means it must be specified on command line. + this.negate = flags.indexOf('-no-') !== -1; + flags = flags.split(/[ ,|]+/); + if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); + this.long = flags.shift(); + this.description = description || ''; +} + +/** + * Return option name. + * + * @return {String} + * @api private + */ + +Option.prototype.name = function() { + return this.long.replace(/^--/, ''); +}; + +/** + * Return option name, in a camelcase format that can be used + * as a object attribute key. + * + * @return {String} + * @api private + */ + +Option.prototype.attributeName = function() { + return camelcase(this.name().replace(/^no-/, '')); +}; + +/** + * Check if `arg` matches the short or long flag. + * + * @param {String} arg + * @return {Boolean} + * @api private + */ + +Option.prototype.is = function(arg) { + return this.short === arg || this.long === arg; +}; + +/** + * CommanderError class + * @class + */ +class CommanderError extends Error { + /** + * Constructs the CommanderError class + * @param {Number} exitCode suggested exit code which could be used with process.exit + * @param {String} code an id string representing the error + * @param {String} message human-readable description of the error + * @constructor + */ + constructor(exitCode, code, message) { + super(message); + // properly capture stack trace in Node.js + Error.captureStackTrace(this, this.constructor); + this.name = this.constructor.name; + this.code = code; + this.exitCode = exitCode; + } +} + +exports.CommanderError = CommanderError; + +/** + * Initialize a new `Command`. + * + * @param {String} [name] + * @api public + */ + +function Command(name) { + this.commands = []; + this.options = []; + this._execs = new Set(); + this._allowUnknownOption = false; + this._args = []; + this._name = name || ''; + this._optionValues = {}; + this._storeOptionsAsProperties = true; // backwards compatible by default + this._passCommandToAction = true; // backwards compatible by default + this._actionResults = []; + + this._helpFlags = '-h, --help'; + this._helpDescription = 'output usage information'; + this._helpShortFlag = '-h'; + this._helpLongFlag = '--help'; +} + +/** + * Define a command. + * + * There are two styles of command: pay attention to where to put the description. + * + * Examples: + * + * // Command implemented using action handler (description is supplied separately to `.command`) + * program + * .command('clone [destination]') + * .description('clone a repository into a newly created directory') + * .action((source, destination) => { + * console.log('clone command called'); + * }); + * + * // Command implemented using separate executable file (description is second parameter to `.command`) + * program + * .command('start ', 'start named service') + * .command('stop [service]', 'stop named service, or all if no name supplied'); + * + * @param {string} nameAndArgs - command name and arguments, args are `` or `[optional]` and last may also be `variadic...` + * @param {Object|string} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable) + * @param {Object} [execOpts] - configuration options (for executable) + * @return {Command} returns new command for action handler, or top-level command for executable command + * @api public + */ + +Command.prototype.command = function(nameAndArgs, actionOptsOrExecDesc, execOpts) { + var desc = actionOptsOrExecDesc; + var opts = execOpts; + if (typeof desc === 'object' && desc !== null) { + opts = desc; + desc = null; + } + opts = opts || {}; + var args = nameAndArgs.split(/ +/); + var cmd = new Command(args.shift()); + + if (desc) { + cmd.description(desc); + this.executables = true; + this._execs.add(cmd._name); + if (opts.isDefault) this.defaultExecutable = cmd._name; + } + cmd._noHelp = !!opts.noHelp; + cmd._helpFlags = this._helpFlags; + cmd._helpDescription = this._helpDescription; + cmd._helpShortFlag = this._helpShortFlag; + cmd._helpLongFlag = this._helpLongFlag; + cmd._exitCallback = this._exitCallback; + cmd._storeOptionsAsProperties = this._storeOptionsAsProperties; + cmd._passCommandToAction = this._passCommandToAction; + + cmd._executableFile = opts.executableFile; // Custom name for executable file + this.commands.push(cmd); + cmd.parseExpectedArgs(args); + cmd.parent = this; + + if (desc) return this; + return cmd; +}; + +/** + * Define argument syntax for the top-level command. + * + * @api public + */ + +Command.prototype.arguments = function(desc) { + return this.parseExpectedArgs(desc.split(/ +/)); +}; + +/** + * Add an implicit `help [cmd]` subcommand + * which invokes `--help` for the given command. + * + * @api private + */ + +Command.prototype.addImplicitHelpCommand = function() { + this.command('help [cmd]', 'display help for [cmd]'); +}; + +/** + * Parse expected `args`. + * + * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. + * + * @param {Array} args + * @return {Command} for chaining + * @api public + */ + +Command.prototype.parseExpectedArgs = function(args) { + if (!args.length) return; + var self = this; + args.forEach(function(arg) { + var argDetails = { + required: false, + name: '', + variadic: false + }; + + switch (arg[0]) { + case '<': + argDetails.required = true; + argDetails.name = arg.slice(1, -1); + break; + case '[': + argDetails.name = arg.slice(1, -1); + break; + } + + if (argDetails.name.length > 3 && argDetails.name.slice(-3) === '...') { + argDetails.variadic = true; + argDetails.name = argDetails.name.slice(0, -3); + } + if (argDetails.name) { + self._args.push(argDetails); + } + }); + return this; +}; + +/** + * Register callback to use as replacement for calling process.exit. + * + * @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing + * @return {Command} for chaining + * @api public + */ + +Command.prototype.exitOverride = function(fn) { + if (fn) { + this._exitCallback = fn; + } else { + this._exitCallback = function(err) { + if (err.code !== 'commander.executeSubCommandAsync') { + throw err; + } else { + // Async callback from spawn events, not useful to throw. + } + }; + } + return this; +}; + +/** + * Call process.exit, and _exitCallback if defined. + * + * @param {Number} exitCode exit code for using with process.exit + * @param {String} code an id string representing the error + * @param {String} message human-readable description of the error + * @return never + * @api private + */ + +Command.prototype._exit = function(exitCode, code, message) { + if (this._exitCallback) { + this._exitCallback(new CommanderError(exitCode, code, message)); + // Expecting this line is not reached. + } + process.exit(exitCode); +}; + +/** + * Register callback `fn` for the command. + * + * Examples: + * + * program + * .command('help') + * .description('display verbose help') + * .action(function() { + * // output help here + * }); + * + * @param {Function} fn + * @return {Command} for chaining + * @api public + */ + +Command.prototype.action = function(fn) { + var self = this; + var listener = function(args, unknown) { + // Parse any so-far unknown options + args = args || []; + unknown = unknown || []; + + var parsed = self.parseOptions(unknown); + + // Output help if necessary + outputHelpIfRequested(self, parsed.unknown); + self._checkForMissingMandatoryOptions(); + + // If there are still any unknown options, then we simply + // die, unless someone asked for help, in which case we give it + // to them, and then we die. + if (parsed.unknown.length > 0) { + self.unknownOption(parsed.unknown[0]); + } + + // Leftover arguments need to be pushed back. Fixes issue #56 + if (parsed.args.length) args = parsed.args.concat(args); + + self._args.forEach(function(arg, i) { + if (arg.required && args[i] == null) { + self.missingArgument(arg.name); + } else if (arg.variadic) { + if (i !== self._args.length - 1) { + self.variadicArgNotLast(arg.name); + } + + args[i] = args.splice(i); + } + }); + + // The .action callback takes an extra parameter which is the command itself. + var expectedArgsCount = self._args.length; + var actionArgs = args.slice(0, expectedArgsCount); + if (self._passCommandToAction) { + actionArgs[expectedArgsCount] = self; + } else { + actionArgs[expectedArgsCount] = self.opts(); + } + // Add the extra arguments so available too. + if (args.length > expectedArgsCount) { + actionArgs.push(args.slice(expectedArgsCount)); + } + + const actionResult = fn.apply(self, actionArgs); + // Remember result in case it is async. Assume parseAsync getting called on root. + let rootCommand = self; + while (rootCommand.parent) { + rootCommand = rootCommand.parent; + } + rootCommand._actionResults.push(actionResult); + }; + var parent = this.parent || this; + var name = parent === this ? '*' : this._name; + parent.on('command:' + name, listener); + if (this._alias) parent.on('command:' + this._alias, listener); + return this; +}; + +/** + * Internal implementation shared by .option() and .requiredOption() + * + * @param {Object} config + * @param {String} flags + * @param {String} description + * @param {Function|*} [fn] - custom option processing function or default vaue + * @param {*} [defaultValue] + * @return {Command} for chaining + * @api private + */ + +Command.prototype._optionEx = function(config, flags, description, fn, defaultValue) { + var self = this, + option = new Option(flags, description), + oname = option.name(), + name = option.attributeName(); + option.mandatory = !!config.mandatory; + + // default as 3rd arg + if (typeof fn !== 'function') { + if (fn instanceof RegExp) { + // This is a bit simplistic (especially no error messages), and probably better handled by caller using custom option processing. + // No longer documented in README, but still present for backwards compatibility. + var regex = fn; + fn = function(val, def) { + var m = regex.exec(val); + return m ? m[0] : def; + }; + } else { + defaultValue = fn; + fn = null; + } + } + + // preassign default value for --no-*, [optional], , or plain flag if boolean value + if (option.negate || option.optional || option.required || typeof defaultValue === 'boolean') { + // when --no-foo we make sure default is true, unless a --foo option is already defined + if (option.negate) { + const positiveLongFlag = option.long.replace(/^--no-/, '--'); + defaultValue = self.optionFor(positiveLongFlag) ? self._getOptionValue(name) : true; + } + // preassign only if we have a default + if (defaultValue !== undefined) { + self._setOptionValue(name, defaultValue); + option.defaultValue = defaultValue; + } + } + + // register the option + this.options.push(option); + + // when it's passed assign the value + // and conditionally invoke the callback + this.on('option:' + oname, function(val) { + // coercion + if (val !== null && fn) { + val = fn(val, self._getOptionValue(name) === undefined ? defaultValue : self._getOptionValue(name)); + } + + // unassigned or boolean value + if (typeof self._getOptionValue(name) === 'boolean' || typeof self._getOptionValue(name) === 'undefined') { + // if no value, negate false, and we have a default, then use it! + if (val == null) { + self._setOptionValue(name, option.negate + ? false + : defaultValue || true); + } else { + self._setOptionValue(name, val); + } + } else if (val !== null) { + // reassign + self._setOptionValue(name, option.negate ? false : val); + } + }); + + return this; +}; + +/** + * Define option with `flags`, `description` and optional + * coercion `fn`. + * + * The `flags` string should contain both the short and long flags, + * separated by comma, a pipe or space. The following are all valid + * all will output this way when `--help` is used. + * + * "-p, --pepper" + * "-p|--pepper" + * "-p --pepper" + * + * Examples: + * + * // simple boolean defaulting to undefined + * program.option('-p, --pepper', 'add pepper'); + * + * program.pepper + * // => undefined + * + * --pepper + * program.pepper + * // => true + * + * // simple boolean defaulting to true (unless non-negated option is also defined) + * program.option('-C, --no-cheese', 'remove cheese'); + * + * program.cheese + * // => true + * + * --no-cheese + * program.cheese + * // => false + * + * // required argument + * program.option('-C, --chdir ', 'change the working directory'); + * + * --chdir /tmp + * program.chdir + * // => "/tmp" + * + * // optional argument + * program.option('-c, --cheese [type]', 'add cheese [marble]'); + * + * @param {String} flags + * @param {String} description + * @param {Function|*} [fn] - custom option processing function or default vaue + * @param {*} [defaultValue] + * @return {Command} for chaining + * @api public + */ + +Command.prototype.option = function(flags, description, fn, defaultValue) { + return this._optionEx({}, flags, description, fn, defaultValue); +}; + +/* + * Add a required option which must have a value after parsing. This usually means + * the option must be specified on the command line. (Otherwise the same as .option().) + * + * The `flags` string should contain both the short and long flags, separated by comma, a pipe or space. + * + * @param {String} flags + * @param {String} description + * @param {Function|*} [fn] - custom option processing function or default vaue + * @param {*} [defaultValue] + * @return {Command} for chaining + * @api public + */ + +Command.prototype.requiredOption = function(flags, description, fn, defaultValue) { + return this._optionEx({ mandatory: true }, flags, description, fn, defaultValue); +}; + +/** + * Allow unknown options on the command line. + * + * @param {Boolean} arg if `true` or omitted, no error will be thrown + * for unknown options. + * @api public + */ +Command.prototype.allowUnknownOption = function(arg) { + this._allowUnknownOption = arguments.length === 0 || arg; + return this; +}; + +/** + * Whether to store option values as properties on command object, + * or store separately (specify false). In both cases the option values can be accessed using .opts(). + * + * @param {boolean} value + * @return {Command} Command for chaining + * @api public + */ + +Command.prototype.storeOptionsAsProperties = function(value) { + this._storeOptionsAsProperties = (value === undefined) || value; + if (this.options.length) { + // This is for programmer, not end user. + console.error('Commander usage error: call storeOptionsAsProperties before adding options'); + } + return this; +}; + +/** + * Whether to pass command to action handler, + * or just the options (specify false). + * + * @param {boolean} value + * @return {Command} Command for chaining + * @api public + */ + +Command.prototype.passCommandToAction = function(value) { + this._passCommandToAction = (value === undefined) || value; + return this; +}; + +/** + * Store option value + * + * @param {String} key + * @param {Object} value + * @api private + */ + +Command.prototype._setOptionValue = function(key, value) { + if (this._storeOptionsAsProperties) { + this[key] = value; + } else { + this._optionValues[key] = value; + } +}; + +/** + * Retrieve option value + * + * @param {String} key + * @return {Object} value + * @api private + */ + +Command.prototype._getOptionValue = function(key) { + if (this._storeOptionsAsProperties) { + return this[key]; + } + return this._optionValues[key]; +}; + +/** + * Parse `argv`, setting options and invoking commands when defined. + * + * @param {Array} argv + * @return {Command} for chaining + * @api public + */ + +Command.prototype.parse = function(argv) { + // implicit help + if (this.executables) this.addImplicitHelpCommand(); + + // store raw args + this.rawArgs = argv; + + // guess name + this._name = this._name || basename(argv[1], '.js'); + + // github-style sub-commands with no sub-command + if (this.executables && argv.length < 3 && !this.defaultExecutable) { + // this user needs help + argv.push(this._helpLongFlag); + } + + // process argv + var normalized = this.normalize(argv.slice(2)); + var parsed = this.parseOptions(normalized); + var args = this.args = parsed.args; + + var result = this.parseArgs(this.args, parsed.unknown); + + if (args[0] === 'help' && args.length === 1) this.help(); + + // Note for future: we could return early if we found an action handler in parseArgs, as none of following code needed? + + // --help + if (args[0] === 'help') { + args[0] = args[1]; + args[1] = this._helpLongFlag; + } else { + // If calling through to executable subcommand we could check for help flags before failing, + // but a somewhat unlikely case since program options not passed to executable subcommands. + // Wait for reports to see if check needed and what usage pattern is. + this._checkForMissingMandatoryOptions(); + } + + // executable sub-commands + // (Debugging note for future: args[0] is not right if an action has been called) + var name = result.args[0]; + var subCommand = null; + + // Look for subcommand + if (name) { + subCommand = this.commands.find(function(command) { + return command._name === name; + }); + } + + // Look for alias + if (!subCommand && name) { + subCommand = this.commands.find(function(command) { + return command.alias() === name; + }); + if (subCommand) { + name = subCommand._name; + args[0] = name; + } + } + + // Look for default subcommand + if (!subCommand && this.defaultExecutable) { + name = this.defaultExecutable; + args.unshift(name); + subCommand = this.commands.find(function(command) { + return command._name === name; + }); + } + + if (this._execs.has(name)) { + return this.executeSubCommand(argv, args, parsed.unknown, subCommand ? subCommand._executableFile : undefined); + } + + return result; +}; + +/** + * Parse `argv`, setting options and invoking commands when defined. + * + * Use parseAsync instead of parse if any of your action handlers are async. Returns a Promise. + * + * @param {Array} argv + * @return {Promise} + * @api public + */ +Command.prototype.parseAsync = function(argv) { + this.parse(argv); + return Promise.all(this._actionResults); +}; + +/** + * Execute a sub-command executable. + * + * @param {Array} argv + * @param {Array} args + * @param {Array} unknown + * @param {String} executableFile + * @api private + */ + +Command.prototype.executeSubCommand = function(argv, args, unknown, executableFile) { + args = args.concat(unknown); + + if (!args.length) this.help(); + + var isExplicitJS = false; // Whether to use node to launch "executable" + + // executable + var pm = argv[1]; + // name of the subcommand, like `pm-install` + var bin = basename(pm, path.extname(pm)) + '-' + args[0]; + if (executableFile != null) { + bin = executableFile; + // Check for same extensions as we scan for below so get consistent launch behaviour. + var executableExt = path.extname(executableFile); + isExplicitJS = executableExt === '.js' || executableExt === '.ts' || executableExt === '.mjs'; + } + + // In case of globally installed, get the base dir where executable + // subcommand file should be located at + var baseDir; + + var resolvedLink = fs.realpathSync(pm); + + baseDir = dirname(resolvedLink); + + // prefer local `./` to bin in the $PATH + var localBin = path.join(baseDir, bin); + + // whether bin file is a js script with explicit `.js` or `.ts` extension + if (exists(localBin + '.js')) { + bin = localBin + '.js'; + isExplicitJS = true; + } else if (exists(localBin + '.ts')) { + bin = localBin + '.ts'; + isExplicitJS = true; + } else if (exists(localBin + '.mjs')) { + bin = localBin + '.mjs'; + isExplicitJS = true; + } else if (exists(localBin)) { + bin = localBin; + } + + args = args.slice(1); + + var proc; + if (process.platform !== 'win32') { + if (isExplicitJS) { + args.unshift(bin); + // add executable arguments to spawn + args = incrementNodeInspectorPort(process.execArgv).concat(args); + + proc = spawn(process.argv[0], args, { stdio: 'inherit' }); + } else { + proc = spawn(bin, args, { stdio: 'inherit' }); + } + } else { + args.unshift(bin); + // add executable arguments to spawn + args = incrementNodeInspectorPort(process.execArgv).concat(args); + proc = spawn(process.execPath, args, { stdio: 'inherit' }); + } + + var signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP']; + signals.forEach(function(signal) { + process.on(signal, function() { + if (proc.killed === false && proc.exitCode === null) { + proc.kill(signal); + } + }); + }); + + // By default terminate process when spawned process terminates. + // Suppressing the exit if exitCallback defined is a bit messy and of limited use, but does allow process to stay running! + const exitCallback = this._exitCallback; + if (!exitCallback) { + proc.on('close', process.exit.bind(process)); + } else { + proc.on('close', () => { + exitCallback(new CommanderError(process.exitCode || 0, 'commander.executeSubCommandAsync', '(close)')); + }); + } + proc.on('error', function(err) { + if (err.code === 'ENOENT') { + console.error('error: %s(1) does not exist, try --help', bin); + } else if (err.code === 'EACCES') { + console.error('error: %s(1) not executable. try chmod or run with root', bin); + } + if (!exitCallback) { + process.exit(1); + } else { + const wrappedError = new CommanderError(1, 'commander.executeSubCommandAsync', '(error)'); + wrappedError.nestedError = err; + exitCallback(wrappedError); + } + }); + + // Store the reference to the child process + this.runningCommand = proc; +}; + +/** + * Normalize `args`, splitting joined short flags. For example + * the arg "-abc" is equivalent to "-a -b -c". + * This also normalizes equal sign and splits "--abc=def" into "--abc def". + * + * @param {Array} args + * @return {Array} + * @api private + */ + +Command.prototype.normalize = function(args) { + var ret = [], + arg, + lastOpt, + index, + short, + opt; + + for (var i = 0, len = args.length; i < len; ++i) { + arg = args[i]; + if (i > 0) { + lastOpt = this.optionFor(args[i - 1]); + } + + if (arg === '--') { + // Honor option terminator + ret = ret.concat(args.slice(i)); + break; + } else if (lastOpt && lastOpt.required) { + ret.push(arg); + } else if (arg.length > 2 && arg[0] === '-' && arg[1] !== '-') { + short = arg.slice(0, 2); + opt = this.optionFor(short); + if (opt && (opt.required || opt.optional)) { + ret.push(short); + ret.push(arg.slice(2)); + } else { + arg.slice(1).split('').forEach(function(c) { + ret.push('-' + c); + }); + } + } else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) { + ret.push(arg.slice(0, index), arg.slice(index + 1)); + } else { + ret.push(arg); + } + } + + return ret; +}; + +/** + * Parse command `args`. + * + * When listener(s) are available those + * callbacks are invoked, otherwise the "*" + * event is emitted and those actions are invoked. + * + * @param {Array} args + * @return {Command} for chaining + * @api private + */ + +Command.prototype.parseArgs = function(args, unknown) { + var name; + + if (args.length) { + name = args[0]; + if (this.listeners('command:' + name).length) { + this.emit('command:' + args.shift(), args, unknown); + } else { + this.emit('command:*', args, unknown); + } + } else { + outputHelpIfRequested(this, unknown); + + // If there were no args and we have unknown options, + // then they are extraneous and we need to error. + if (unknown.length > 0 && !this.defaultExecutable) { + this.unknownOption(unknown[0]); + } + if (this.commands.length === 0 && + this._args.filter(function(a) { return a.required; }).length === 0) { + this.emit('command:*'); + } + } + + return this; +}; + +/** + * Return an option matching `arg` if any. + * + * @param {String} arg + * @return {Option} + * @api private + */ + +Command.prototype.optionFor = function(arg) { + for (var i = 0, len = this.options.length; i < len; ++i) { + if (this.options[i].is(arg)) { + return this.options[i]; + } + } +}; + +/** + * Display an error message if a mandatory option does not have a value. + * + * @api private + */ + +Command.prototype._checkForMissingMandatoryOptions = function() { + // Walk up hierarchy so can call from action handler after checking for displaying help. + for (var cmd = this; cmd; cmd = cmd.parent) { + cmd.options.forEach((anOption) => { + if (anOption.mandatory && (cmd._getOptionValue(anOption.attributeName()) === undefined)) { + cmd.missingMandatoryOptionValue(anOption); + } + }); + } +}; + +/** + * Parse options from `argv` returning `argv` + * void of these options. + * + * @param {Array} argv + * @return {{args: Array, unknown: Array}} + * @api public + */ + +Command.prototype.parseOptions = function(argv) { + var args = [], + len = argv.length, + literal, + option, + arg; + + var unknownOptions = []; + + // parse options + for (var i = 0; i < len; ++i) { + arg = argv[i]; + + // literal args after -- + if (literal) { + args.push(arg); + continue; + } + + if (arg === '--') { + literal = true; + continue; + } + + // find matching Option + option = this.optionFor(arg); + + // option is defined + if (option) { + // requires arg + if (option.required) { + arg = argv[++i]; + if (arg == null) return this.optionMissingArgument(option); + this.emit('option:' + option.name(), arg); + // optional arg + } else if (option.optional) { + arg = argv[i + 1]; + if (arg == null || (arg[0] === '-' && arg !== '-')) { + arg = null; + } else { + ++i; + } + this.emit('option:' + option.name(), arg); + // flag + } else { + this.emit('option:' + option.name()); + } + continue; + } + + // looks like an option + if (arg.length > 1 && arg[0] === '-') { + unknownOptions.push(arg); + + // If the next argument looks like it might be + // an argument for this option, we pass it on. + // If it isn't, then it'll simply be ignored + if ((i + 1) < argv.length && (argv[i + 1][0] !== '-' || argv[i + 1] === '-')) { + unknownOptions.push(argv[++i]); + } + continue; + } + + // arg + args.push(arg); + } + + return { args: args, unknown: unknownOptions }; +}; + +/** + * Return an object containing options as key-value pairs + * + * @return {Object} + * @api public + */ +Command.prototype.opts = function() { + if (this._storeOptionsAsProperties) { + // Preserve original behaviour so backwards compatible when still using properties + var result = {}, + len = this.options.length; + + for (var i = 0; i < len; i++) { + var key = this.options[i].attributeName(); + result[key] = key === this._versionOptionName ? this._version : this[key]; + } + return result; + } + + return this._optionValues; +}; + +/** + * Argument `name` is missing. + * + * @param {String} name + * @api private + */ + +Command.prototype.missingArgument = function(name) { + const message = `error: missing required argument '${name}'`; + console.error(message); + this._exit(1, 'commander.missingArgument', message); +}; + +/** + * `Option` is missing an argument, but received `flag` or nothing. + * + * @param {Option} option + * @param {String} [flag] + * @api private + */ + +Command.prototype.optionMissingArgument = function(option, flag) { + let message; + if (flag) { + message = `error: option '${option.flags}' argument missing, got '${flag}'`; + } else { + message = `error: option '${option.flags}' argument missing`; + } + console.error(message); + this._exit(1, 'commander.optionMissingArgument', message); +}; + +/** + * `Option` does not have a value, and is a mandatory option. + * + * @param {Option} option + * @api private + */ + +Command.prototype.missingMandatoryOptionValue = function(option) { + const message = `error: required option '${option.flags}' not specified`; + console.error(message); + this._exit(1, 'commander.missingMandatoryOptionValue', message); +}; + +/** + * Unknown option `flag`. + * + * @param {String} flag + * @api private + */ + +Command.prototype.unknownOption = function(flag) { + if (this._allowUnknownOption) return; + const message = `error: unknown option '${flag}'`; + console.error(message); + this._exit(1, 'commander.unknownOption', message); +}; + +/** + * Variadic argument with `name` is not the last argument as required. + * + * @param {String} name + * @api private + */ + +Command.prototype.variadicArgNotLast = function(name) { + const message = `error: variadic arguments must be last '${name}'`; + console.error(message); + this._exit(1, 'commander.variadicArgNotLast', message); +}; + +/** + * Set the program version to `str`. + * + * This method auto-registers the "-V, --version" flag + * which will print the version number when passed. + * + * You can optionally supply the flags and description to override the defaults. + * + * @param {String} str + * @param {String} [flags] + * @param {String} [description] + * @return {Command} for chaining + * @api public + */ + +Command.prototype.version = function(str, flags, description) { + if (arguments.length === 0) return this._version; + this._version = str; + flags = flags || '-V, --version'; + description = description || 'output the version number'; + var versionOption = new Option(flags, description); + this._versionOptionName = versionOption.long.substr(2) || 'version'; + this.options.push(versionOption); + var self = this; + this.on('option:' + this._versionOptionName, function() { + process.stdout.write(str + '\n'); + self._exit(0, 'commander.version', str); + }); + return this; +}; + +/** + * Set the description to `str`. + * + * @param {String} str + * @param {Object} [argsDescription] + * @return {String|Command} + * @api public + */ + +Command.prototype.description = function(str, argsDescription) { + if (arguments.length === 0) return this._description; + this._description = str; + this._argsDescription = argsDescription; + return this; +}; + +/** + * Set an alias for the command + * + * @param {String} alias + * @return {String|Command} + * @api public + */ + +Command.prototype.alias = function(alias) { + var command = this; + if (this.commands.length !== 0) { + command = this.commands[this.commands.length - 1]; + } + + if (arguments.length === 0) return command._alias; + + if (alias === command._name) throw new Error('Command alias can\'t be the same as its name'); + + command._alias = alias; + return this; +}; + +/** + * Set / get the command usage `str`. + * + * @param {String} [str] + * @return {String|Command} + * @api public + */ + +Command.prototype.usage = function(str) { + var args = this._args.map(function(arg) { + return humanReadableArgName(arg); + }); + + var usage = '[options]' + + (this.commands.length ? ' [command]' : '') + + (this._args.length ? ' ' + args.join(' ') : ''); + + if (arguments.length === 0) return this._usage || usage; + this._usage = str; + + return this; +}; + +/** + * Get or set the name of the command + * + * @param {String} [str] + * @return {String|Command} + * @api public + */ + +Command.prototype.name = function(str) { + if (arguments.length === 0) return this._name; + this._name = str; + return this; +}; + +/** + * Return prepared commands. + * + * @return {Array} + * @api private + */ + +Command.prototype.prepareCommands = function() { + return this.commands.filter(function(cmd) { + return !cmd._noHelp; + }).map(function(cmd) { + var args = cmd._args.map(function(arg) { + return humanReadableArgName(arg); + }).join(' '); + + return [ + cmd._name + + (cmd._alias ? '|' + cmd._alias : '') + + (cmd.options.length ? ' [options]' : '') + + (args ? ' ' + args : ''), + cmd._description + ]; + }); +}; + +/** + * Return the largest command length. + * + * @return {Number} + * @api private + */ + +Command.prototype.largestCommandLength = function() { + var commands = this.prepareCommands(); + return commands.reduce(function(max, command) { + return Math.max(max, command[0].length); + }, 0); +}; + +/** + * Return the largest option length. + * + * @return {Number} + * @api private + */ + +Command.prototype.largestOptionLength = function() { + var options = [].slice.call(this.options); + options.push({ + flags: this._helpFlags + }); + + return options.reduce(function(max, option) { + return Math.max(max, option.flags.length); + }, 0); +}; + +/** + * Return the largest arg length. + * + * @return {Number} + * @api private + */ + +Command.prototype.largestArgLength = function() { + return this._args.reduce(function(max, arg) { + return Math.max(max, arg.name.length); + }, 0); +}; + +/** + * Return the pad width. + * + * @return {Number} + * @api private + */ + +Command.prototype.padWidth = function() { + var width = this.largestOptionLength(); + if (this._argsDescription && this._args.length) { + if (this.largestArgLength() > width) { + width = this.largestArgLength(); + } + } + + if (this.commands && this.commands.length) { + if (this.largestCommandLength() > width) { + width = this.largestCommandLength(); + } + } + + return width; +}; + +/** + * Return help for options. + * + * @return {String} + * @api private + */ + +Command.prototype.optionHelp = function() { + var width = this.padWidth(); + + var columns = process.stdout.columns || 80; + var descriptionWidth = columns - width - 4; + + // Append the help information + return this.options.map(function(option) { + const fullDesc = option.description + + ((!option.negate && option.defaultValue !== undefined) ? ' (default: ' + JSON.stringify(option.defaultValue) + ')' : ''); + return pad(option.flags, width) + ' ' + optionalWrap(fullDesc, descriptionWidth, width + 2); + }).concat([pad(this._helpFlags, width) + ' ' + optionalWrap(this._helpDescription, descriptionWidth, width + 2)]) + .join('\n'); +}; + +/** + * Return command help documentation. + * + * @return {String} + * @api private + */ + +Command.prototype.commandHelp = function() { + if (!this.commands.length) return ''; + + var commands = this.prepareCommands(); + var width = this.padWidth(); + + var columns = process.stdout.columns || 80; + var descriptionWidth = columns - width - 4; + + return [ + 'Commands:', + commands.map(function(cmd) { + var desc = cmd[1] ? ' ' + cmd[1] : ''; + return (desc ? pad(cmd[0], width) : cmd[0]) + optionalWrap(desc, descriptionWidth, width + 2); + }).join('\n').replace(/^/gm, ' '), + '' + ].join('\n'); +}; + +/** + * Return program help documentation. + * + * @return {String} + * @api private + */ + +Command.prototype.helpInformation = function() { + var desc = []; + if (this._description) { + desc = [ + this._description, + '' + ]; + + var argsDescription = this._argsDescription; + if (argsDescription && this._args.length) { + var width = this.padWidth(); + var columns = process.stdout.columns || 80; + var descriptionWidth = columns - width - 5; + desc.push('Arguments:'); + desc.push(''); + this._args.forEach(function(arg) { + desc.push(' ' + pad(arg.name, width) + ' ' + wrap(argsDescription[arg.name], descriptionWidth, width + 4)); + }); + desc.push(''); + } + } + + var cmdName = this._name; + if (this._alias) { + cmdName = cmdName + '|' + this._alias; + } + var parentCmdNames = ''; + for (var parentCmd = this.parent; parentCmd; parentCmd = parentCmd.parent) { + parentCmdNames = parentCmd.name() + ' ' + parentCmdNames; + } + var usage = [ + 'Usage: ' + parentCmdNames + cmdName + ' ' + this.usage(), + '' + ]; + + var cmds = []; + var commandHelp = this.commandHelp(); + if (commandHelp) cmds = [commandHelp]; + + var options = [ + 'Options:', + '' + this.optionHelp().replace(/^/gm, ' '), + '' + ]; + + return usage + .concat(desc) + .concat(options) + .concat(cmds) + .join('\n'); +}; + +/** + * Output help information for this command. + * + * When listener(s) are available for the helpLongFlag + * those callbacks are invoked. + * + * @api public + */ + +Command.prototype.outputHelp = function(cb) { + if (!cb) { + cb = function(passthru) { + return passthru; + }; + } + const cbOutput = cb(this.helpInformation()); + if (typeof cbOutput !== 'string' && !Buffer.isBuffer(cbOutput)) { + throw new Error('outputHelp callback must return a string or a Buffer'); + } + process.stdout.write(cbOutput); + this.emit(this._helpLongFlag); +}; + +/** + * You can pass in flags and a description to override the help + * flags and help description for your command. + * + * @param {String} [flags] + * @param {String} [description] + * @return {Command} + * @api public + */ + +Command.prototype.helpOption = function(flags, description) { + this._helpFlags = flags || this._helpFlags; + this._helpDescription = description || this._helpDescription; + + var splitFlags = this._helpFlags.split(/[ ,|]+/); + + if (splitFlags.length > 1) this._helpShortFlag = splitFlags.shift(); + + this._helpLongFlag = splitFlags.shift(); + + return this; +}; + +/** + * Output help information and exit. + * + * @param {Function} [cb] + * @api public + */ + +Command.prototype.help = function(cb) { + this.outputHelp(cb); + // exitCode: preserving original behaviour which was calling process.exit() + // message: do not have all displayed text available so only passing placeholder. + this._exit(process.exitCode || 0, 'commander.help', '(outputHelp)'); +}; + +/** + * Camel-case the given `flag` + * + * @param {String} flag + * @return {String} + * @api private + */ + +function camelcase(flag) { + return flag.split('-').reduce(function(str, word) { + return str + word[0].toUpperCase() + word.slice(1); + }); +} + +/** + * Pad `str` to `width`. + * + * @param {String} str + * @param {Number} width + * @return {String} + * @api private + */ + +function pad(str, width) { + var len = Math.max(0, width - str.length); + return str + Array(len + 1).join(' '); +} + +/** + * Wraps the given string with line breaks at the specified width while breaking + * words and indenting every but the first line on the left. + * + * @param {String} str + * @param {Number} width + * @param {Number} indent + * @return {String} + * @api private + */ +function wrap(str, width, indent) { + var regex = new RegExp('.{1,' + (width - 1) + '}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)', 'g'); + var lines = str.match(regex) || []; + return lines.map(function(line, i) { + if (line.slice(-1) === '\n') { + line = line.slice(0, line.length - 1); + } + return ((i > 0 && indent) ? Array(indent + 1).join(' ') : '') + line.trimRight(); + }).join('\n'); +} + +/** + * Optionally wrap the given str to a max width of width characters per line + * while indenting with indent spaces. Do not wrap if insufficient width or + * string is manually formatted. + * + * @param {String} str + * @param {Number} width + * @param {Number} indent + * @return {String} + * @api private + */ +function optionalWrap(str, width, indent) { + // Detect manually wrapped and indented strings by searching for line breaks + // followed by multiple spaces/tabs. + if (str.match(/[\n]\s+/)) return str; + // Do not wrap to narrow columns (or can end up with a word per line). + const minWidth = 40; + if (width < minWidth) return str; + + return wrap(str, width, indent); +} + +/** + * Output help information if help flags specified + * + * @param {Command} cmd - command to output help for + * @param {Array} options - array of options to search for -h or --help + * @api private + */ + +function outputHelpIfRequested(cmd, options) { + options = options || []; + + for (var i = 0; i < options.length; i++) { + if (options[i] === cmd._helpLongFlag || options[i] === cmd._helpShortFlag) { + cmd.outputHelp(); + // (Do not have all displayed text available so only passing placeholder.) + cmd._exit(0, 'commander.helpDisplayed', '(outputHelp)'); + } + } +} + +/** + * Takes an argument and returns its human readable equivalent for help usage. + * + * @param {Object} arg + * @return {String} + * @api private + */ + +function humanReadableArgName(arg) { + var nameOutput = arg.name + (arg.variadic === true ? '...' : ''); + + return arg.required + ? '<' + nameOutput + '>' + : '[' + nameOutput + ']'; +} + +// for versions before node v0.8 when there weren't `fs.existsSync` +function exists(file) { + try { + if (fs.statSync(file).isFile()) { + return true; + } + } catch (e) { + return false; + } +} + +/** + * Scan arguments and increment port number for inspect calls (to avoid conflicts when spawning new command). + * + * @param {string[]} args - array of arguments from node.execArgv + * @returns {string[]} + * @api private + */ + +function incrementNodeInspectorPort(args) { + // Testing for these options: + // --inspect[=[host:]port] + // --inspect-brk[=[host:]port] + // --inspect-port=[host:]port + return args.map((arg) => { + var result = arg; + if (arg.indexOf('--inspect') === 0) { + var debugOption; + var debugHost = '127.0.0.1'; + var debugPort = '9229'; + var match; + if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) { + // e.g. --inspect + debugOption = match[1]; + } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) { + debugOption = match[1]; + if (/^\d+$/.test(match[3])) { + // e.g. --inspect=1234 + debugPort = match[3]; + } else { + // e.g. --inspect=localhost + debugHost = match[3]; + } + } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) { + // e.g. --inspect=localhost:1234 + debugOption = match[1]; + debugHost = match[3]; + debugPort = match[4]; + } + + if (debugOption && debugPort !== '0') { + result = `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`; + } + } + return result; + }); +} diff --git a/node_modules/commander/package.json b/node_modules/commander/package.json new file mode 100644 index 0000000..e4781e5 --- /dev/null +++ b/node_modules/commander/package.json @@ -0,0 +1,41 @@ +{ + "name": "commander", + "version": "4.1.1", + "description": "the complete solution for node.js command-line programs", + "keywords": [ + "commander", + "command", + "option", + "parser" + ], + "author": "TJ Holowaychuk ", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/tj/commander.js.git" + }, + "scripts": { + "lint": "eslint index.js \"tests/**/*.js\"", + "test": "jest && npm run test-typings", + "test-typings": "tsc -p tsconfig.json" + }, + "main": "index", + "files": [ + "index.js", + "typings/index.d.ts" + ], + "dependencies": {}, + "devDependencies": { + "@types/jest": "^24.0.23", + "@types/node": "^12.12.11", + "eslint": "^6.7.0", + "eslint-plugin-jest": "^22.21.0", + "jest": "^24.8.0", + "standard": "^14.3.1", + "typescript": "^3.7.2" + }, + "typings": "typings/index.d.ts", + "engines": { + "node": ">= 6" + } +} diff --git a/node_modules/commander/typings/index.d.ts b/node_modules/commander/typings/index.d.ts new file mode 100644 index 0000000..082a3a3 --- /dev/null +++ b/node_modules/commander/typings/index.d.ts @@ -0,0 +1,311 @@ +// Type definitions for commander +// Original definitions by: Alan Agius , Marcelo Dezem , vvakame , Jules Randolph + +/// + +declare namespace commander { + + interface CommanderError extends Error { + code: string; + exitCode: number; + message: string; + nestedError?: string; + } + type CommanderErrorConstructor = { new (exitCode: number, code: string, message: string): CommanderError }; + + interface Option { + flags: string; + required: boolean; // A value must be supplied when the option is specified. + optional: boolean; // A value is optional when the option is specified. + mandatory: boolean; // The option must have a value after parsing, which usually means it must be specified on command line. + bool: boolean; + short?: string; + long: string; + description: string; + } + type OptionConstructor = { new (flags: string, description?: string): Option }; + + interface Command extends NodeJS.EventEmitter { + [key: string]: any; // options as properties + + args: string[]; + + /** + * Set the program version to `str`. + * + * This method auto-registers the "-V, --version" flag + * which will print the version number when passed. + * + * You can optionally supply the flags and description to override the defaults. + */ + version(str: string, flags?: string, description?: string): Command; + + /** + * Define a command, implemented using an action handler. + * + * @remarks + * The command description is supplied using `.description`, not as a parameter to `.command`. + * + * @example + * ```ts + * program + * .command('clone [destination]') + * .description('clone a repository into a newly created directory') + * .action((source, destination) => { + * console.log('clone command called'); + * }); + * ``` + * + * @param nameAndArgs - command name and arguments, args are `` or `[optional]` and last may also be `variadic...` + * @param opts - configuration options + * @returns new command + */ + command(nameAndArgs: string, opts?: CommandOptions): Command; + /** + * Define a command, implemented in a separate executable file. + * + * @remarks + * The command description is supplied as the second parameter to `.command`. + * + * @example + * ```ts + * program + * .command('start ', 'start named service') + * .command('stop [service]', 'stop named serice, or all if no name supplied'); + * ``` + * + * @param nameAndArgs - command name and arguments, args are `` or `[optional]` and last may also be `variadic...` + * @param description - description of executable command + * @param opts - configuration options + * @returns top level command for chaining more command definitions + */ + command(nameAndArgs: string, description: string, opts?: commander.CommandOptions): Command; + + /** + * Define argument syntax for the top-level command. + * + * @returns Command for chaining + */ + arguments(desc: string): Command; + + /** + * Parse expected `args`. + * + * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. + * + * @returns Command for chaining + */ + parseExpectedArgs(args: string[]): Command; + + /** + * Register callback to use as replacement for calling process.exit. + */ + exitOverride(callback?: (err: CommanderError) => never|void): Command; + + /** + * Register callback `fn` for the command. + * + * @example + * program + * .command('help') + * .description('display verbose help') + * .action(function() { + * // output help here + * }); + * + * @returns Command for chaining + */ + action(fn: (...args: any[]) => void | Promise): Command; + + /** + * Define option with `flags`, `description` and optional + * coercion `fn`. + * + * The `flags` string should contain both the short and long flags, + * separated by comma, a pipe or space. The following are all valid + * all will output this way when `--help` is used. + * + * "-p, --pepper" + * "-p|--pepper" + * "-p --pepper" + * + * @example + * // simple boolean defaulting to false + * program.option('-p, --pepper', 'add pepper'); + * + * --pepper + * program.pepper + * // => Boolean + * + * // simple boolean defaulting to true + * program.option('-C, --no-cheese', 'remove cheese'); + * + * program.cheese + * // => true + * + * --no-cheese + * program.cheese + * // => false + * + * // required argument + * program.option('-C, --chdir ', 'change the working directory'); + * + * --chdir /tmp + * program.chdir + * // => "/tmp" + * + * // optional argument + * program.option('-c, --cheese [type]', 'add cheese [marble]'); + * + * @returns Command for chaining + */ + option(flags: string, description?: string, fn?: ((arg1: any, arg2: any) => void) | RegExp, defaultValue?: any): Command; + option(flags: string, description?: string, defaultValue?: any): Command; + + /** + * Define a required option, which must have a value after parsing. This usually means + * the option must be specified on the command line. (Otherwise the same as .option().) + * + * The `flags` string should contain both the short and long flags, separated by comma, a pipe or space. + */ + requiredOption(flags: string, description?: string, fn?: ((arg1: any, arg2: any) => void) | RegExp, defaultValue?: any): Command; + requiredOption(flags: string, description?: string, defaultValue?: any): Command; + + + /** + * Whether to store option values as properties on command object, + * or store separately (specify false). In both cases the option values can be accessed using .opts(). + * + * @return Command for chaining + */ + storeOptionsAsProperties(value?: boolean): Command; + + /** + * Whether to pass command to action handler, + * or just the options (specify false). + * + * @return Command for chaining + */ + passCommandToAction(value?: boolean): Command; + + /** + * Allow unknown options on the command line. + * + * @param [arg] if `true` or omitted, no error will be thrown for unknown options. + * @returns Command for chaining + */ + allowUnknownOption(arg?: boolean): Command; + + /** + * Parse `argv`, setting options and invoking commands when defined. + * + * @returns Command for chaining + */ + parse(argv: string[]): Command; + + /** + * Parse `argv`, setting options and invoking commands when defined. + * + * Use parseAsync instead of parse if any of your action handlers are async. Returns a Promise. + * + * @returns Promise + */ + parseAsync(argv: string[]): Promise; + + /** + * Parse options from `argv` returning `argv` void of these options. + */ + parseOptions(argv: string[]): commander.ParseOptionsResult; + + /** + * Return an object containing options as key-value pairs + */ + opts(): { [key: string]: any }; + + /** + * Set the description. + * + * @returns Command for chaining + */ + description(str: string, argsDescription?: {[argName: string]: string}): Command; + /** + * Get the description. + */ + description(): string; + + /** + * Set an alias for the command. + * + * @returns Command for chaining + */ + alias(alias: string): Command; + /** + * Get alias for the command. + */ + alias(): string; + + /** + * Set the command usage. + * + * @returns Command for chaining + */ + usage(str: string): Command; + /** + * Get the command usage. + */ + usage(): string; + + /** + * Set the name of the command. + * + * @returns Command for chaining + */ + name(str: string): Command; + /** + * Get the name of the command. + */ + name(): string; + + /** + * Output help information for this command. + * + * When listener(s) are available for the helpLongFlag + * those callbacks are invoked. + */ + outputHelp(cb?: (str: string) => string): void; + + /** + * You can pass in flags and a description to override the help + * flags and help description for your command. + */ + helpOption(flags?: string, description?: string): Command; + + /** + * Output help information and exit. + */ + help(cb?: (str: string) => string): never; + } + type CommandConstructor = { new (name?: string): Command }; + + + interface CommandOptions { + noHelp?: boolean; + isDefault?: boolean; + executableFile?: string; + } + + interface ParseOptionsResult { + args: string[]; + unknown: string[]; + } + + interface CommanderStatic extends Command { + Command: CommandConstructor; + Option: OptionConstructor; + CommanderError:CommanderErrorConstructor; + } + +} + +declare const commander: commander.CommanderStatic; +export = commander; diff --git a/node_modules/cssesc/LICENSE-MIT.txt b/node_modules/cssesc/LICENSE-MIT.txt new file mode 100644 index 0000000..a41e0a7 --- /dev/null +++ b/node_modules/cssesc/LICENSE-MIT.txt @@ -0,0 +1,20 @@ +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cssesc/README.md b/node_modules/cssesc/README.md new file mode 100644 index 0000000..58fb8fe --- /dev/null +++ b/node_modules/cssesc/README.md @@ -0,0 +1,201 @@ +# cssesc [![Build status](https://travis-ci.org/mathiasbynens/cssesc.svg?branch=master)](https://travis-ci.org/mathiasbynens/cssesc) [![Code coverage status](https://img.shields.io/codecov/c/github/mathiasbynens/cssesc.svg)](https://codecov.io/gh/mathiasbynens/cssesc) + +A JavaScript library for escaping CSS strings and identifiers while generating the shortest possible ASCII-only output. + +This is a JavaScript library for [escaping text for use in CSS strings or identifiers](https://mathiasbynens.be/notes/css-escapes) while generating the shortest possible valid ASCII-only output. [Here’s an online demo.](https://mothereff.in/css-escapes) + +[A polyfill for the CSSOM `CSS.escape()` method is available in a separate repository.](https://mths.be/cssescape) (In comparison, _cssesc_ is much more powerful.) + +Feel free to fork if you see possible improvements! + +## Installation + +Via [npm](https://www.npmjs.com/): + +```bash +npm install cssesc +``` + +In a browser: + +```html + +``` + +In [Node.js](https://nodejs.org/): + +```js +const cssesc = require('cssesc'); +``` + +In Ruby using [the `ruby-cssesc` wrapper gem](https://github.com/borodean/ruby-cssesc): + +```bash +gem install ruby-cssesc +``` + +```ruby +require 'ruby-cssesc' +CSSEsc.escape('I ♥ Ruby', is_identifier: true) +``` + +In Sass using [`sassy-escape`](https://github.com/borodean/sassy-escape): + +```bash +gem install sassy-escape +``` + +```scss +body { + content: escape('I ♥ Sass', $is-identifier: true); +} +``` + +## API + +### `cssesc(value, options)` + +This function takes a value and returns an escaped version of the value where any characters that are not printable ASCII symbols are escaped using the shortest possible (but valid) [escape sequences for use in CSS strings or identifiers](https://mathiasbynens.be/notes/css-escapes). + +```js +cssesc('Ich ♥ Bücher'); +// → 'Ich \\2665 B\\FC cher' + +cssesc('foo 𝌆 bar'); +// → 'foo \\1D306 bar' +``` + +By default, `cssesc` returns a string that can be used as part of a CSS string. If the target is a CSS identifier rather than a CSS string, use the `isIdentifier: true` setting (see below). + +The optional `options` argument accepts an object with the following options: + +#### `isIdentifier` + +The default value for the `isIdentifier` option is `false`. This means that the input text will be escaped for use in a CSS string literal. If you want to use the result as a CSS identifier instead (in a selector, for example), set this option to `true`. + +```js +cssesc('123a2b'); +// → '123a2b' + +cssesc('123a2b', { + 'isIdentifier': true +}); +// → '\\31 23a2b' +``` + +#### `quotes` + +The default value for the `quotes` option is `'single'`. This means that any occurences of `'` in the input text will be escaped as `\'`, so that the output can be used in a CSS string literal wrapped in single quotes. + +```js +cssesc('Lorem ipsum "dolor" sit \'amet\' etc.'); +// → 'Lorem ipsum "dolor" sit \\\'amet\\\' etc.' +// → "Lorem ipsum \"dolor\" sit \\'amet\\' etc." + +cssesc('Lorem ipsum "dolor" sit \'amet\' etc.', { + 'quotes': 'single' +}); +// → 'Lorem ipsum "dolor" sit \\\'amet\\\' etc.' +// → "Lorem ipsum \"dolor\" sit \\'amet\\' etc." +``` + +If you want to use the output as part of a CSS string literal wrapped in double quotes, set the `quotes` option to `'double'`. + +```js +cssesc('Lorem ipsum "dolor" sit \'amet\' etc.', { + 'quotes': 'double' +}); +// → 'Lorem ipsum \\"dolor\\" sit \'amet\' etc.' +// → "Lorem ipsum \\\"dolor\\\" sit 'amet' etc." +``` + +#### `wrap` + +The `wrap` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, the output will be a valid CSS string literal wrapped in quotes. The type of quotes can be specified through the `quotes` setting. + +```js +cssesc('Lorem ipsum "dolor" sit \'amet\' etc.', { + 'quotes': 'single', + 'wrap': true +}); +// → '\'Lorem ipsum "dolor" sit \\\'amet\\\' etc.\'' +// → "\'Lorem ipsum \"dolor\" sit \\\'amet\\\' etc.\'" + +cssesc('Lorem ipsum "dolor" sit \'amet\' etc.', { + 'quotes': 'double', + 'wrap': true +}); +// → '"Lorem ipsum \\"dolor\\" sit \'amet\' etc."' +// → "\"Lorem ipsum \\\"dolor\\\" sit \'amet\' etc.\"" +``` + +#### `escapeEverything` + +The `escapeEverything` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, all the symbols in the output will be escaped, even printable ASCII symbols. + +```js +cssesc('lolwat"foo\'bar', { + 'escapeEverything': true +}); +// → '\\6C\\6F\\6C\\77\\61\\74\\"\\66\\6F\\6F\\\'\\62\\61\\72' +// → "\\6C\\6F\\6C\\77\\61\\74\\\"\\66\\6F\\6F\\'\\62\\61\\72" +``` + +#### Overriding the default options globally + +The global default settings can be overridden by modifying the `css.options` object. This saves you from passing in an `options` object for every call to `encode` if you want to use the non-default setting. + +```js +// Read the global default setting for `escapeEverything`: +cssesc.options.escapeEverything; +// → `false` by default + +// Override the global default setting for `escapeEverything`: +cssesc.options.escapeEverything = true; + +// Using the global default setting for `escapeEverything`, which is now `true`: +cssesc('foo © bar ≠ baz 𝌆 qux'); +// → '\\66\\6F\\6F\\ \\A9\\ \\62\\61\\72\\ \\2260\\ \\62\\61\\7A\\ \\1D306\\ \\71\\75\\78' +``` + +### `cssesc.version` + +A string representing the semantic version number. + +### Using the `cssesc` binary + +To use the `cssesc` binary in your shell, simply install cssesc globally using npm: + +```bash +npm install -g cssesc +``` + +After that you will be able to escape text for use in CSS strings or identifiers from the command line: + +```bash +$ cssesc 'föo ♥ bår 𝌆 baz' +f\F6o \2665 b\E5r \1D306 baz +``` + +If the output needs to be a CSS identifier rather than part of a string literal, use the `-i`/`--identifier` option: + +```bash +$ cssesc --identifier 'föo ♥ bår 𝌆 baz' +f\F6o\ \2665\ b\E5r\ \1D306\ baz +``` + +See `cssesc --help` for the full list of options. + +## Support + +This library supports the Node.js and browser versions mentioned in [`.babelrc`](https://github.com/mathiasbynens/cssesc/blob/master/.babelrc). For a version that supports a wider variety of legacy browsers and environments out-of-the-box, [see v0.1.0](https://github.com/mathiasbynens/cssesc/releases/tag/v0.1.0). + +## Author + +| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | +|---| +| [Mathias Bynens](https://mathiasbynens.be/) | + +## License + +This library is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/cssesc/bin/cssesc b/node_modules/cssesc/bin/cssesc new file mode 100755 index 0000000..188c034 --- /dev/null +++ b/node_modules/cssesc/bin/cssesc @@ -0,0 +1,116 @@ +#!/usr/bin/env node +const fs = require('fs'); +const cssesc = require('../cssesc.js'); +const strings = process.argv.splice(2); +const stdin = process.stdin; +const options = {}; +const log = console.log; + +const main = function() { + const option = strings[0]; + + if (/^(?:-h|--help|undefined)$/.test(option)) { + log( + 'cssesc v%s - https://mths.be/cssesc', + cssesc.version + ); + log([ + '\nUsage:\n', + '\tcssesc [string]', + '\tcssesc [-i | --identifier] [string]', + '\tcssesc [-s | --single-quotes] [string]', + '\tcssesc [-d | --double-quotes] [string]', + '\tcssesc [-w | --wrap] [string]', + '\tcssesc [-e | --escape-everything] [string]', + '\tcssesc [-v | --version]', + '\tcssesc [-h | --help]', + '\nExamples:\n', + '\tcssesc \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'', + '\tcssesc --identifier \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'', + '\tcssesc --escape-everything \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'', + '\tcssesc --double-quotes --wrap \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'', + '\techo \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\' | cssesc' + ].join('\n')); + return process.exit(1); + } + + if (/^(?:-v|--version)$/.test(option)) { + log('v%s', cssesc.version); + return process.exit(1); + } + + strings.forEach(function(string) { + // Process options + if (/^(?:-i|--identifier)$/.test(string)) { + options.isIdentifier = true; + return; + } + if (/^(?:-s|--single-quotes)$/.test(string)) { + options.quotes = 'single'; + return; + } + if (/^(?:-d|--double-quotes)$/.test(string)) { + options.quotes = 'double'; + return; + } + if (/^(?:-w|--wrap)$/.test(string)) { + options.wrap = true; + return; + } + if (/^(?:-e|--escape-everything)$/.test(string)) { + options.escapeEverything = true; + return; + } + + // Process string(s) + let result; + try { + result = cssesc(string, options); + log(result); + } catch (exception) { + log(exception.message + '\n'); + log('Error: failed to escape.'); + log('If you think this is a bug in cssesc, please report it:'); + log('https://github.com/mathiasbynens/cssesc/issues/new'); + log( + '\nStack trace using cssesc@%s:\n', + cssesc.version + ); + log(exception.stack); + return process.exit(1); + } + }); + // Return with exit status 0 outside of the `forEach` loop, in case + // multiple strings were passed in. + return process.exit(0); + +}; + +if (stdin.isTTY) { + // handle shell arguments + main(); +} else { + let timeout; + // Either the script is called from within a non-TTY context, or `stdin` + // content is being piped in. + if (!process.stdout.isTTY) { + // The script was called from a non-TTY context. This is a rather uncommon + // use case we don’t actively support. However, we don’t want the script + // to wait forever in such cases, so… + timeout = setTimeout(function() { + // …if no piped data arrived after a whole minute, handle shell + // arguments instead. + main(); + }, 60000); + } + let data = ''; + stdin.on('data', function(chunk) { + clearTimeout(timeout); + data += chunk; + }); + stdin.on('end', function() { + strings.push(data.trim()); + main(); + }); + stdin.resume(); +} diff --git a/node_modules/cssesc/cssesc.js b/node_modules/cssesc/cssesc.js new file mode 100644 index 0000000..1c0928e --- /dev/null +++ b/node_modules/cssesc/cssesc.js @@ -0,0 +1,110 @@ +/*! https://mths.be/cssesc v3.0.0 by @mathias */ +'use strict'; + +var object = {}; +var hasOwnProperty = object.hasOwnProperty; +var merge = function merge(options, defaults) { + if (!options) { + return defaults; + } + var result = {}; + for (var key in defaults) { + // `if (defaults.hasOwnProperty(key) { … }` is not needed here, since + // only recognized option names are used. + result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key]; + } + return result; +}; + +var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/; +var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/; +var regexAlwaysEscape = /['"\\]/; +var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g; + +// https://mathiasbynens.be/notes/css-escapes#css +var cssesc = function cssesc(string, options) { + options = merge(options, cssesc.options); + if (options.quotes != 'single' && options.quotes != 'double') { + options.quotes = 'single'; + } + var quote = options.quotes == 'double' ? '"' : '\''; + var isIdentifier = options.isIdentifier; + + var firstChar = string.charAt(0); + var output = ''; + var counter = 0; + var length = string.length; + while (counter < length) { + var character = string.charAt(counter++); + var codePoint = character.charCodeAt(); + var value = void 0; + // If it’s not a printable ASCII character… + if (codePoint < 0x20 || codePoint > 0x7E) { + if (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) { + // It’s a high surrogate, and there is a next character. + var extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { + // next character is low surrogate + codePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000; + } else { + // It’s an unmatched surrogate; only append this code unit, in case + // the next code unit is the high surrogate of a surrogate pair. + counter--; + } + } + value = '\\' + codePoint.toString(16).toUpperCase() + ' '; + } else { + if (options.escapeEverything) { + if (regexAnySingleEscape.test(character)) { + value = '\\' + character; + } else { + value = '\\' + codePoint.toString(16).toUpperCase() + ' '; + } + } else if (/[\t\n\f\r\x0B]/.test(character)) { + value = '\\' + codePoint.toString(16).toUpperCase() + ' '; + } else if (character == '\\' || !isIdentifier && (character == '"' && quote == character || character == '\'' && quote == character) || isIdentifier && regexSingleEscape.test(character)) { + value = '\\' + character; + } else { + value = character; + } + } + output += value; + } + + if (isIdentifier) { + if (/^-[-\d]/.test(output)) { + output = '\\-' + output.slice(1); + } else if (/\d/.test(firstChar)) { + output = '\\3' + firstChar + ' ' + output.slice(1); + } + } + + // Remove spaces after `\HEX` escapes that are not followed by a hex digit, + // since they’re redundant. Note that this is only possible if the escape + // sequence isn’t preceded by an odd number of backslashes. + output = output.replace(regexExcessiveSpaces, function ($0, $1, $2) { + if ($1 && $1.length % 2) { + // It’s not safe to remove the space, so don’t. + return $0; + } + // Strip the space. + return ($1 || '') + $2; + }); + + if (!isIdentifier && options.wrap) { + return quote + output + quote; + } + return output; +}; + +// Expose default options (so they can be overridden globally). +cssesc.options = { + 'escapeEverything': false, + 'isIdentifier': false, + 'quotes': 'single', + 'wrap': false +}; + +cssesc.version = '3.0.0'; + +module.exports = cssesc; diff --git a/node_modules/cssesc/man/cssesc.1 b/node_modules/cssesc/man/cssesc.1 new file mode 100644 index 0000000..eee4996 --- /dev/null +++ b/node_modules/cssesc/man/cssesc.1 @@ -0,0 +1,70 @@ +.Dd August 9, 2013 +.Dt cssesc 1 +.Sh NAME +.Nm cssesc +.Nd escape text for use in CSS string literals or identifiers +.Sh SYNOPSIS +.Nm +.Op Fl i | -identifier Ar string +.br +.Op Fl s | -single-quotes Ar string +.br +.Op Fl d | -double-quotes Ar string +.br +.Op Fl w | -wrap Ar string +.br +.Op Fl e | -escape-everything Ar string +.br +.Op Fl v | -version +.br +.Op Fl h | -help +.Sh DESCRIPTION +.Nm +escapes strings for use in CSS string literals or identifiers while generating the shortest possible valid ASCII-only output. +.Sh OPTIONS +.Bl -ohang -offset +.It Sy "-s, --single-quotes" +Escape any occurences of ' in the input string as \\', so that the output can be used in a CSS string literal wrapped in single quotes. +.It Sy "-d, --double-quotes" +Escape any occurences of " in the input string as \\", so that the output can be used in a CSS string literal wrapped in double quotes. +.It Sy "-w, --wrap" +Make sure the output is a valid CSS string literal wrapped in quotes. The type of quotes can be specified using the +.Ar -s | --single-quotes +or +.Ar -d | --double-quotes +settings. +.It Sy "-e, --escape-everything" +Escape all the symbols in the output, even printable ASCII symbols. +.It Sy "-v, --version" +Print cssesc's version. +.It Sy "-h, --help" +Show the help screen. +.El +.Sh EXIT STATUS +The +.Nm cssesc +utility exits with one of the following values: +.Pp +.Bl -tag -width flag -compact +.It Li 0 +.Nm +successfully escaped the given text and printed the result. +.It Li 1 +.Nm +wasn't instructed to escape anything (for example, the +.Ar --help +flag was set); or, an error occurred. +.El +.Sh EXAMPLES +.Bl -ohang -offset +.It Sy "cssesc 'foo bar baz'" +Print an escaped version of the given text. +.It Sy echo\ 'foo bar baz'\ |\ cssesc +Print an escaped version of the text that gets piped in. +.El +.Sh BUGS +cssesc's bug tracker is located at . +.Sh AUTHOR +Mathias Bynens +.Sh WWW + diff --git a/node_modules/cssesc/package.json b/node_modules/cssesc/package.json new file mode 100644 index 0000000..076c84d --- /dev/null +++ b/node_modules/cssesc/package.json @@ -0,0 +1,51 @@ +{ + "name": "cssesc", + "version": "3.0.0", + "description": "A JavaScript library for escaping CSS strings and identifiers while generating the shortest possible ASCII-only output.", + "homepage": "https://mths.be/cssesc", + "engines": { + "node": ">=4" + }, + "main": "cssesc.js", + "bin": "bin/cssesc", + "man": "man/cssesc.1", + "keywords": [ + "css", + "escape", + "identifier", + "string", + "tool" + ], + "license": "MIT", + "author": { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + "repository": { + "type": "git", + "url": "https://github.com/mathiasbynens/cssesc.git" + }, + "bugs": "https://github.com/mathiasbynens/cssesc/issues", + "files": [ + "LICENSE-MIT.txt", + "cssesc.js", + "bin/", + "man/" + ], + "scripts": { + "build": "grunt template && babel cssesc.js -o cssesc.js", + "test": "mocha tests", + "cover": "istanbul cover --report html node_modules/.bin/_mocha tests -- -u exports -R spec" + }, + "devDependencies": { + "babel-cli": "^6.26.0", + "babel-preset-env": "^1.6.1", + "codecov": "^1.0.1", + "grunt": "^1.0.1", + "grunt-template": "^1.0.0", + "istanbul": "^0.4.4", + "mocha": "^2.5.3", + "regenerate": "^1.2.1", + "requirejs": "^2.1.16" + } +} diff --git a/node_modules/didyoumean/LICENSE b/node_modules/didyoumean/LICENSE new file mode 100644 index 0000000..32c23db --- /dev/null +++ b/node_modules/didyoumean/LICENSE @@ -0,0 +1,14 @@ +## License + +didYouMean.js copyright (c) 2013 Dave Porter. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License +[here](http://www.apache.org/licenses/LICENSE-2.0). + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/node_modules/didyoumean/README.md b/node_modules/didyoumean/README.md new file mode 100644 index 0000000..cd16698 --- /dev/null +++ b/node_modules/didyoumean/README.md @@ -0,0 +1,134 @@ +didYouMean.js - A simple JavaScript matching engine +=================================================== + +[Available on GitHub](https://github.com/dcporter/didyoumean.js). + +A super-simple, highly optimized JS library for matching human-quality input to a list of potential +matches. You can use it to suggest a misspelled command-line utility option to a user, or to offer +links to nearby valid URLs on your 404 page. (The examples below are taken from a personal project, +my [HTML5 business card](http://dcporter.aws.af.cm/me), which uses didYouMean.js to suggest correct +URLs from misspelled ones, such as [dcporter.aws.af.cm/me/instagarm](http://dcporter.aws.af.cm/me/instagarm).) +Uses the [Levenshtein distance algorithm](https://en.wikipedia.org/wiki/Levenshtein_distance). + +didYouMean.js works in the browser as well as in node.js. To install it for use in node: + +``` +npm install didyoumean +``` + + +Examples +-------- + +Matching against a list of strings: +``` +var input = 'insargrm' +var list = ['facebook', 'twitter', 'instagram', 'linkedin']; +console.log(didYouMean(input, list)); +> 'instagram' +// The method matches 'insargrm' to 'instagram'. + +input = 'google plus'; +console.log(didYouMean(input, list)); +> null +// The method was unable to find 'google plus' in the list of options. +``` + +Matching against a list of objects: +``` +var input = 'insargrm'; +var list = [ { id: 'facebook' }, { id: 'twitter' }, { id: 'instagram' }, { id: 'linkedin' } ]; +var key = 'id'; +console.log(didYouMean(input, list, key)); +> 'instagram' +// The method returns the matching value. + +didYouMean.returnWinningObject = true; +console.log(didYouMean(input, list, key)); +> { id: 'instagram' } +// The method returns the matching object. +``` + + +didYouMean(str, list, [key]) +---------------------------- + +- str: The string input to match. +- list: An array of strings or objects to match against. +- key (OPTIONAL): If your list array contains objects, you must specify the key which contains the string + to match against. + +Returns: the closest matching string, or null if no strings exceed the threshold. + + +Options +------- + +Options are set on the didYouMean function object. You may change them at any time. + +### threshold + + By default, the method will only return strings whose edit distance is less than 40% (0.4x) of their length. + For example, if a ten-letter string is five edits away from its nearest match, the method will return null. + + You can control this by setting the "threshold" value on the didYouMean function. For example, to set the + edit distance threshold to 50% of the input string's length: + + ``` + didYouMean.threshold = 0.5; + ``` + + To return the nearest match no matter the threshold, set this value to null. + +### thresholdAbsolute + + This option behaves the same as threshold, but instead takes an integer number of edit steps. For example, + if thresholdAbsolute is set to 20 (the default), then the method will only return strings whose edit distance + is less than 20. Both options apply. + +### caseSensitive + + By default, the method will perform case-insensitive comparisons. If you wish to force case sensitivity, set + the "caseSensitive" value to true: + + ``` + didYouMean.caseSensitive = true; + ``` + +### nullResultValue + + By default, the method will return null if there is no sufficiently close match. You can change this value here. + +### returnWinningObject + + By default, the method will return the winning string value (if any). If your list contains objects rather + than strings, you may set returnWinningObject to true. + + ``` + didYouMean.returnWinningObject = true; + ``` + + This option has no effect on lists of strings. + +### returnFirstMatch + + By default, the method will search all values and return the closest match. If you're simply looking for a "good- + enough" match, you can set your thresholds appropriately and set returnFirstMatch to true to substantially speed + things up. + + +License +------- + +didYouMean copyright (c) 2013-2014 Dave Porter. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License +[here](http://www.apache.org/licenses/LICENSE-2.0). + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/node_modules/didyoumean/didYouMean-1.2.1.js b/node_modules/didyoumean/didYouMean-1.2.1.js new file mode 100644 index 0000000..febb30e --- /dev/null +++ b/node_modules/didyoumean/didYouMean-1.2.1.js @@ -0,0 +1,274 @@ +/* + +didYouMean.js - A simple JavaScript matching engine +=================================================== + +[Available on GitHub](https://github.com/dcporter/didyoumean.js). + +A super-simple, highly optimized JS library for matching human-quality input to a list of potential +matches. You can use it to suggest a misspelled command-line utility option to a user, or to offer +links to nearby valid URLs on your 404 page. (The examples below are taken from a personal project, +my [HTML5 business card](http://dcporter.aws.af.cm/me), which uses didYouMean.js to suggest correct +URLs from misspelled ones, such as [dcporter.aws.af.cm/me/instagarm](http://dcporter.aws.af.cm/me/instagarm).) +Uses the [Levenshtein distance algorithm](https://en.wikipedia.org/wiki/Levenshtein_distance). + +didYouMean.js works in the browser as well as in node.js. To install it for use in node: + +``` +npm install didyoumean +``` + + +Examples +-------- + +Matching against a list of strings: +``` +var input = 'insargrm' +var list = ['facebook', 'twitter', 'instagram', 'linkedin']; +console.log(didYouMean(input, list)); +> 'instagram' +// The method matches 'insargrm' to 'instagram'. + +input = 'google plus'; +console.log(didYouMean(input, list)); +> null +// The method was unable to find 'google plus' in the list of options. +``` + +Matching against a list of objects: +``` +var input = 'insargrm'; +var list = [ { id: 'facebook' }, { id: 'twitter' }, { id: 'instagram' }, { id: 'linkedin' } ]; +var key = 'id'; +console.log(didYouMean(input, list, key)); +> 'instagram' +// The method returns the matching value. + +didYouMean.returnWinningObject = true; +console.log(didYouMean(input, list, key)); +> { id: 'instagram' } +// The method returns the matching object. +``` + + +didYouMean(str, list, [key]) +---------------------------- + +- str: The string input to match. +- list: An array of strings or objects to match against. +- key (OPTIONAL): If your list array contains objects, you must specify the key which contains the string + to match against. + +Returns: the closest matching string, or null if no strings exceed the threshold. + + +Options +------- + +Options are set on the didYouMean function object. You may change them at any time. + +### threshold + + By default, the method will only return strings whose edit distance is less than 40% (0.4x) of their length. + For example, if a ten-letter string is five edits away from its nearest match, the method will return null. + + You can control this by setting the "threshold" value on the didYouMean function. For example, to set the + edit distance threshold to 50% of the input string's length: + + ``` + didYouMean.threshold = 0.5; + ``` + + To return the nearest match no matter the threshold, set this value to null. + +### thresholdAbsolute + + This option behaves the same as threshold, but instead takes an integer number of edit steps. For example, + if thresholdAbsolute is set to 20 (the default), then the method will only return strings whose edit distance + is less than 20. Both options apply. + +### caseSensitive + + By default, the method will perform case-insensitive comparisons. If you wish to force case sensitivity, set + the "caseSensitive" value to true: + + ``` + didYouMean.caseSensitive = true; + ``` + +### nullResultValue + + By default, the method will return null if there is no sufficiently close match. You can change this value here. + +### returnWinningObject + + By default, the method will return the winning string value (if any). If your list contains objects rather + than strings, you may set returnWinningObject to true. + + ``` + didYouMean.returnWinningObject = true; + ``` + + This option has no effect on lists of strings. + +### returnFirstMatch + + By default, the method will search all values and return the closest match. If you're simply looking for a "good- + enough" match, you can set your thresholds appropriately and set returnFirstMatch to true to substantially speed + things up. + + +License +------- + +didYouMean copyright (c) 2013-2014 Dave Porter. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License +[here](http://www.apache.org/licenses/LICENSE-2.0). + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ +(function() { + "use strict"; + + // The didYouMean method. + function didYouMean(str, list, key) { + if (!str) return null; + + // If we're running a case-insensitive search, smallify str. + if (!didYouMean.caseSensitive) { str = str.toLowerCase(); } + + // Calculate the initial value (the threshold) if present. + var thresholdRelative = didYouMean.threshold === null ? null : didYouMean.threshold * str.length, + thresholdAbsolute = didYouMean.thresholdAbsolute, + winningVal; + if (thresholdRelative !== null && thresholdAbsolute !== null) winningVal = Math.min(thresholdRelative, thresholdAbsolute); + else if (thresholdRelative !== null) winningVal = thresholdRelative; + else if (thresholdAbsolute !== null) winningVal = thresholdAbsolute; + else winningVal = null; + + // Get the edit distance to each option. If the closest one is less than 40% (by default) of str's length, + // then return it. + var winner, candidate, testCandidate, val, + i, len = list.length; + for (i = 0; i < len; i++) { + // Get item. + candidate = list[i]; + // If there's a key, get the candidate value out of the object. + if (key) { candidate = candidate[key]; } + // Gatekeep. + if (!candidate) { continue; } + // If we're running a case-insensitive search, smallify the candidate. + if (!didYouMean.caseSensitive) { testCandidate = candidate.toLowerCase(); } + else { testCandidate = candidate; } + // Get and compare edit distance. + val = getEditDistance(str, testCandidate, winningVal); + // If this value is smaller than our current winning value, OR if we have no winning val yet (i.e. the + // threshold option is set to null, meaning the caller wants a match back no matter how bad it is), then + // this is our new winner. + if (winningVal === null || val < winningVal) { + winningVal = val; + // Set the winner to either the value or its object, depending on the returnWinningObject option. + if (key && didYouMean.returnWinningObject) winner = list[i]; + else winner = candidate; + // If we're returning the first match, return it now. + if (didYouMean.returnFirstMatch) return winner; + } + } + + // If we have a winner, return it. + return winner || didYouMean.nullResultValue; + } + + // Set default options. + didYouMean.threshold = 0.4; + didYouMean.thresholdAbsolute = 20; + didYouMean.caseSensitive = false; + didYouMean.nullResultValue = null; + didYouMean.returnWinningObject = null; + didYouMean.returnFirstMatch = false; + + // Expose. + // In node... + if (typeof module !== 'undefined' && module.exports) { + module.exports = didYouMean; + } + // Otherwise... + else { + window.didYouMean = didYouMean; + } + + var MAX_INT = Math.pow(2,32) - 1; // We could probably go higher than this, but for practical reasons let's not. + function getEditDistance(a, b, max) { + // Handle null or undefined max. + max = max || max === 0 ? max : MAX_INT; + + var lena = a.length; + var lenb = b.length; + + // Fast path - no A or B. + if (lena === 0) return Math.min(max + 1, lenb); + if (lenb === 0) return Math.min(max + 1, lena); + + // Fast path - length diff larger than max. + if (Math.abs(lena - lenb) > max) return max + 1; + + // Slow path. + var matrix = [], + i, j, colMin, minJ, maxJ; + + // Set up the first row ([0, 1, 2, 3, etc]). + for (i = 0; i <= lenb; i++) { matrix[i] = [i]; } + + // Set up the first column (same). + for (j = 0; j <= lena; j++) { matrix[0][j] = j; } + + // Loop over the rest of the columns. + for (i = 1; i <= lenb; i++) { + colMin = MAX_INT; + minJ = 1; + if (i > max) minJ = i - max; + maxJ = lenb + 1; + if (maxJ > max + i) maxJ = max + i; + // Loop over the rest of the rows. + for (j = 1; j <= lena; j++) { + // If j is out of bounds, just put a large value in the slot. + if (j < minJ || j > maxJ) { + matrix[i][j] = max + 1; + } + + // Otherwise do the normal Levenshtein thing. + else { + // If the characters are the same, there's no change in edit distance. + if (b.charAt(i - 1) === a.charAt(j - 1)) { + matrix[i][j] = matrix[i - 1][j - 1]; + } + // Otherwise, see if we're substituting, inserting or deleting. + else { + matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // Substitute + Math.min(matrix[i][j - 1] + 1, // Insert + matrix[i - 1][j] + 1)); // Delete + } + } + + // Either way, update colMin. + if (matrix[i][j] < colMin) colMin = matrix[i][j]; + } + + // If this column's minimum is greater than the allowed maximum, there's no point + // in going on with life. + if (colMin > max) return max + 1; + } + // If we made it this far without running into the max, then return the final matrix value. + return matrix[lenb][lena]; + } + +})(); diff --git a/node_modules/didyoumean/didYouMean-1.2.1.min.js b/node_modules/didyoumean/didYouMean-1.2.1.min.js new file mode 100644 index 0000000..c41abd8 --- /dev/null +++ b/node_modules/didyoumean/didYouMean-1.2.1.min.js @@ -0,0 +1,17 @@ +/* + didYouMean.js copyright (c) 2013-2014 Dave Porter. + + [Available on GitHub](https://github.com/dcporter/didyoumean.js). + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License + [here](http://www.apache.org/licenses/LICENSE-2.0). + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +(function(){"use strict";function e(t,r,i){if(!t)return null;if(!e.caseSensitive){t=t.toLowerCase()}var s=e.threshold===null?null:e.threshold*t.length,o=e.thresholdAbsolute,u;if(s!==null&&o!==null)u=Math.min(s,o);else if(s!==null)u=s;else if(o!==null)u=o;else u=null;var a,f,l,c,h,p=r.length;for(h=0;hr)return r+1;var o=[],u,a,f,l,c;for(u=0;u<=s;u++){o[u]=[u]}for(a=0;a<=i;a++){o[0][a]=a}for(u=1;u<=s;u++){f=t;l=1;if(u>r)l=u-r;c=s+1;if(c>r+u)c=r+u;for(a=1;a<=i;a++){if(ac){o[u][a]=r+1}else{if(n.charAt(u-1)===e.charAt(a-1)){o[u][a]=o[u-1][a-1]}else{o[u][a]=Math.min(o[u-1][a-1]+1,Math.min(o[u][a-1]+1,o[u-1][a]+1))}}if(o[u][a]r)return r+1}return o[s][i]}e.threshold=.4;e.thresholdAbsolute=20;e.caseSensitive=false;e.nullResultValue=null;e.returnWinningObject=null;e.returnFirstMatch=false;if(typeof module!=="undefined"&&module.exports){module.exports=e}else{window.didYouMean=e}var t=Math.pow(2,32)-1})(); \ No newline at end of file diff --git a/node_modules/didyoumean/package.json b/node_modules/didyoumean/package.json new file mode 100755 index 0000000..1301d03 --- /dev/null +++ b/node_modules/didyoumean/package.json @@ -0,0 +1,27 @@ +{ + "name": "didyoumean", + "version": "1.2.2", + "description": "Match human-quality input to potential matches by edit distance.", + "homepage": "https://github.com/dcporter/didyoumean.js", + "author": { + "name": "Dave Porter", + "email": "dcporter@gmail.com", + "url": "http://dcporter.net/" + }, + "keywords": [ + "didyoumean", + "mean", + "edit", + "distance", + "levenshtein" + ], + "main": "./didYouMean-1.2.1.js", + "repository": { + "type": "git", + "url": "https://github.com/dcporter/didyoumean.js.git" + }, + "bugs": { + "url": "https://github.com/dcporter/didyoumean.js/issues" + }, + "license": "Apache-2.0" +} diff --git a/node_modules/dlv/README.md b/node_modules/dlv/README.md new file mode 100644 index 0000000..6a8429d --- /dev/null +++ b/node_modules/dlv/README.md @@ -0,0 +1,76 @@ +# `dlv(obj, keypath)` [![NPM](https://img.shields.io/npm/v/dlv.svg)](https://npmjs.com/package/dlv) [![Build](https://travis-ci.org/developit/dlv.svg?branch=master)](https://travis-ci.org/developit/dlv) + +> Safely get a dot-notated path within a nested object, with ability to return a default if the full key path does not exist or the value is undefined + + +### Why? + +Smallest possible implementation: only **130 bytes.** + +You could write this yourself, but then you'd have to write [tests]. + +Supports ES Modules, CommonJS and globals. + + +### Installation + +`npm install --save dlv` + + +### Usage + +`delve(object, keypath, [default])` + +```js +import delve from 'dlv'; + +let obj = { + a: { + b: { + c: 1, + d: undefined, + e: null + } + } +}; + +//use string dot notation for keys +delve(obj, 'a.b.c') === 1; + +//or use an array key +delve(obj, ['a', 'b', 'c']) === 1; + +delve(obj, 'a.b') === obj.a.b; + +//returns undefined if the full key path does not exist and no default is specified +delve(obj, 'a.b.f') === undefined; + +//optional third parameter for default if the full key in path is missing +delve(obj, 'a.b.f', 'foo') === 'foo'; + +//or if the key exists but the value is undefined +delve(obj, 'a.b.d', 'foo') === 'foo'; + +//Non-truthy defined values are still returned if they exist at the full keypath +delve(obj, 'a.b.e', 'foo') === null; + +//undefined obj or key returns undefined, unless a default is supplied +delve(undefined, 'a.b.c') === undefined; +delve(undefined, 'a.b.c', 'foo') === 'foo'; +delve(obj, undefined, 'foo') === 'foo'; +``` + + +### Setter Counterparts + +- [dset](https://github.com/lukeed/dset) by [@lukeed](https://github.com/lukeed) is the spiritual "set" counterpart of `dlv` and very fast. +- [bury](https://github.com/kalmbach/bury) by [@kalmbach](https://github.com/kalmbach) does the opposite of `dlv` and is implemented in a very similar manner. + + +### License + +[MIT](https://oss.ninja/mit/developit/) + + +[preact]: https://github.com/developit/preact +[tests]: https://github.com/developit/dlv/blob/master/test.js diff --git a/node_modules/dlv/dist/dlv.es.js b/node_modules/dlv/dist/dlv.es.js new file mode 100644 index 0000000..06b981b --- /dev/null +++ b/node_modules/dlv/dist/dlv.es.js @@ -0,0 +1,2 @@ +export default function(t,e,l,n,r){for(e=e.split?e.split("."):e,n=0;n (http://jasonformat.com)", + "repository": "developit/dlv", + "license": "MIT", + "devDependencies": { + "microbundle": "^0.11.0" + } +} diff --git a/node_modules/fast-glob/LICENSE b/node_modules/fast-glob/LICENSE new file mode 100644 index 0000000..65a9994 --- /dev/null +++ b/node_modules/fast-glob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Denis Malinochkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/fast-glob/README.md b/node_modules/fast-glob/README.md new file mode 100644 index 0000000..1d7843a --- /dev/null +++ b/node_modules/fast-glob/README.md @@ -0,0 +1,830 @@ +# fast-glob + +> It's a very fast and efficient [glob][glob_definition] library for [Node.js][node_js]. + +This package provides methods for traversing the file system and returning pathnames that matched a defined set of a specified pattern according to the rules used by the Unix Bash shell with some simplifications, meanwhile results are returned in **arbitrary order**. Quick, simple, effective. + +## Table of Contents + +
+Details + +* [Highlights](#highlights) +* [Old and modern mode](#old-and-modern-mode) +* [Pattern syntax](#pattern-syntax) + * [Basic syntax](#basic-syntax) + * [Advanced syntax](#advanced-syntax) +* [Installation](#installation) +* [API](#api) + * [Asynchronous](#asynchronous) + * [Synchronous](#synchronous) + * [Stream](#stream) + * [patterns](#patterns) + * [[options]](#options) + * [Helpers](#helpers) + * [generateTasks](#generatetaskspatterns-options) + * [isDynamicPattern](#isdynamicpatternpattern-options) + * [escapePath](#escapepathpath) + * [convertPathToPattern](#convertpathtopatternpath) +* [Options](#options-3) + * [Common](#common) + * [concurrency](#concurrency) + * [cwd](#cwd) + * [deep](#deep) + * [followSymbolicLinks](#followsymboliclinks) + * [fs](#fs) + * [ignore](#ignore) + * [suppressErrors](#suppresserrors) + * [throwErrorOnBrokenSymbolicLink](#throwerroronbrokensymboliclink) + * [Output control](#output-control) + * [absolute](#absolute) + * [markDirectories](#markdirectories) + * [objectMode](#objectmode) + * [onlyDirectories](#onlydirectories) + * [onlyFiles](#onlyfiles) + * [stats](#stats) + * [unique](#unique) + * [Matching control](#matching-control) + * [braceExpansion](#braceexpansion) + * [caseSensitiveMatch](#casesensitivematch) + * [dot](#dot) + * [extglob](#extglob) + * [globstar](#globstar) + * [baseNameMatch](#basenamematch) +* [FAQ](#faq) + * [What is a static or dynamic pattern?](#what-is-a-static-or-dynamic-pattern) + * [How to write patterns on Windows?](#how-to-write-patterns-on-windows) + * [Why are parentheses match wrong?](#why-are-parentheses-match-wrong) + * [How to exclude directory from reading?](#how-to-exclude-directory-from-reading) + * [How to use UNC path?](#how-to-use-unc-path) + * [Compatible with `node-glob`?](#compatible-with-node-glob) +* [Benchmarks](#benchmarks) + * [Server](#server) + * [Nettop](#nettop) +* [Changelog](#changelog) +* [License](#license) + +
+ +## Highlights + +* Fast. Probably the fastest. +* Supports multiple and negative patterns. +* Synchronous, Promise and Stream API. +* Object mode. Can return more than just strings. +* Error-tolerant. + +## Old and modern mode + +This package works in two modes, depending on the environment in which it is used. + +* **Old mode**. Node.js below 10.10 or when the [`stats`](#stats) option is *enabled*. +* **Modern mode**. Node.js 10.10+ and the [`stats`](#stats) option is *disabled*. + +The modern mode is faster. Learn more about the [internal mechanism][nodelib_fs_scandir_old_and_modern_modern]. + +## Pattern syntax + +> :warning: Always use forward-slashes in glob expressions (patterns and [`ignore`](#ignore) option). Use backslashes for escaping characters. + +There is more than one form of syntax: basic and advanced. Below is a brief overview of the supported features. Also pay attention to our [FAQ](#faq). + +> :book: This package uses [`micromatch`][micromatch] as a library for pattern matching. + +### Basic syntax + +* An asterisk (`*`) — matches everything except slashes (path separators), hidden files (names starting with `.`). +* A double star or globstar (`**`) — matches zero or more directories. +* Question mark (`?`) – matches any single character except slashes (path separators). +* Sequence (`[seq]`) — matches any character in sequence. + +> :book: A few additional words about the [basic matching behavior][picomatch_matching_behavior]. + +Some examples: + +* `src/**/*.js` — matches all files in the `src` directory (any level of nesting) that have the `.js` extension. +* `src/*.??` — matches all files in the `src` directory (only first level of nesting) that have a two-character extension. +* `file-[01].js` — matches files: `file-0.js`, `file-1.js`. + +### Advanced syntax + +* [Escapes characters][micromatch_backslashes] (`\\`) — matching special characters (`$^*+?()[]`) as literals. +* [POSIX character classes][picomatch_posix_brackets] (`[[:digit:]]`). +* [Extended globs][micromatch_extglobs] (`?(pattern-list)`). +* [Bash style brace expansions][micromatch_braces] (`{}`). +* [Regexp character classes][micromatch_regex_character_classes] (`[1-5]`). +* [Regex groups][regular_expressions_brackets] (`(a|b)`). + +> :book: A few additional words about the [advanced matching behavior][micromatch_extended_globbing]. + +Some examples: + +* `src/**/*.{css,scss}` — matches all files in the `src` directory (any level of nesting) that have the `.css` or `.scss` extension. +* `file-[[:digit:]].js` — matches files: `file-0.js`, `file-1.js`, …, `file-9.js`. +* `file-{1..3}.js` — matches files: `file-1.js`, `file-2.js`, `file-3.js`. +* `file-(1|2)` — matches files: `file-1.js`, `file-2.js`. + +## Installation + +```console +npm install fast-glob +``` + +## API + +### Asynchronous + +```js +fg(patterns, [options]) +fg.async(patterns, [options]) +fg.glob(patterns, [options]) +``` + +Returns a `Promise` with an array of matching entries. + +```js +const fg = require('fast-glob'); + +const entries = await fg(['.editorconfig', '**/index.js'], { dot: true }); + +// ['.editorconfig', 'services/index.js'] +``` + +### Synchronous + +```js +fg.sync(patterns, [options]) +fg.globSync(patterns, [options]) +``` + +Returns an array of matching entries. + +```js +const fg = require('fast-glob'); + +const entries = fg.sync(['.editorconfig', '**/index.js'], { dot: true }); + +// ['.editorconfig', 'services/index.js'] +``` + +### Stream + +```js +fg.stream(patterns, [options]) +fg.globStream(patterns, [options]) +``` + +Returns a [`ReadableStream`][node_js_stream_readable_streams] when the `data` event will be emitted with matching entry. + +```js +const fg = require('fast-glob'); + +const stream = fg.stream(['.editorconfig', '**/index.js'], { dot: true }); + +for await (const entry of stream) { + // .editorconfig + // services/index.js +} +``` + +#### patterns + +* Required: `true` +* Type: `string | string[]` + +Any correct pattern(s). + +> :1234: [Pattern syntax](#pattern-syntax) +> +> :warning: This package does not respect the order of patterns. First, all the negative patterns are applied, and only then the positive patterns. If you want to get a certain order of records, use sorting or split calls. + +#### [options] + +* Required: `false` +* Type: [`Options`](#options-3) + +See [Options](#options-3) section. + +### Helpers + +#### `generateTasks(patterns, [options])` + +Returns the internal representation of patterns ([`Task`](./src/managers/tasks.ts) is a combining patterns by base directory). + +```js +fg.generateTasks('*'); + +[{ + base: '.', // Parent directory for all patterns inside this task + dynamic: true, // Dynamic or static patterns are in this task + patterns: ['*'], + positive: ['*'], + negative: [] +}] +``` + +##### patterns + +* Required: `true` +* Type: `string | string[]` + +Any correct pattern(s). + +##### [options] + +* Required: `false` +* Type: [`Options`](#options-3) + +See [Options](#options-3) section. + +#### `isDynamicPattern(pattern, [options])` + +Returns `true` if the passed pattern is a dynamic pattern. + +> :1234: [What is a static or dynamic pattern?](#what-is-a-static-or-dynamic-pattern) + +```js +fg.isDynamicPattern('*'); // true +fg.isDynamicPattern('abc'); // false +``` + +##### pattern + +* Required: `true` +* Type: `string` + +Any correct pattern. + +##### [options] + +* Required: `false` +* Type: [`Options`](#options-3) + +See [Options](#options-3) section. + +#### `escapePath(path)` + +Returns the path with escaped special characters depending on the platform. + +* Posix: + * `*?|(){}[]`; + * `!` at the beginning of line; + * `@+!` before the opening parenthesis; + * `\\` before non-special characters; +* Windows: + * `(){}[]` + * `!` at the beginning of line; + * `@+!` before the opening parenthesis; + * Characters like `*?|` cannot be used in the path ([windows_naming_conventions][windows_naming_conventions]), so they will not be escaped; + +```js +fg.escapePath('!abc'); +// \\!abc +fg.escapePath('[OpenSource] mrmlnc – fast-glob (Deluxe Edition) 2014') + '/*.flac' +// \\[OpenSource\\] mrmlnc – fast-glob \\(Deluxe Edition\\) 2014/*.flac + +fg.posix.escapePath('C:\\Program Files (x86)\\**\\*'); +// C:\\\\Program Files \\(x86\\)\\*\\*\\* +fg.win32.escapePath('C:\\Program Files (x86)\\**\\*'); +// Windows: C:\\Program Files \\(x86\\)\\**\\* +``` + +#### `convertPathToPattern(path)` + +Converts a path to a pattern depending on the platform, including special character escaping. + +* Posix. Works similarly to the `fg.posix.escapePath` method. +* Windows. Works similarly to the `fg.win32.escapePath` method, additionally converting backslashes to forward slashes in cases where they are not escape characters (`!()+@{}[]`). + +```js +fg.convertPathToPattern('[OpenSource] mrmlnc – fast-glob (Deluxe Edition) 2014') + '/*.flac'; +// \\[OpenSource\\] mrmlnc – fast-glob \\(Deluxe Edition\\) 2014/*.flac + +fg.convertPathToPattern('C:/Program Files (x86)/**/*'); +// Posix: C:/Program Files \\(x86\\)/\\*\\*/\\* +// Windows: C:/Program Files \\(x86\\)/**/* + +fg.convertPathToPattern('C:\\Program Files (x86)\\**\\*'); +// Posix: C:\\\\Program Files \\(x86\\)\\*\\*\\* +// Windows: C:/Program Files \\(x86\\)/**/* + +fg.posix.convertPathToPattern('\\\\?\\c:\\Program Files (x86)') + '/**/*'; +// Posix: \\\\\\?\\\\c:\\\\Program Files \\(x86\\)/**/* (broken pattern) +fg.win32.convertPathToPattern('\\\\?\\c:\\Program Files (x86)') + '/**/*'; +// Windows: //?/c:/Program Files \\(x86\\)/**/* +``` + +## Options + +### Common options + +#### concurrency + +* Type: `number` +* Default: `os.cpus().length` + +Specifies the maximum number of concurrent requests from a reader to read directories. + +> :book: The higher the number, the higher the performance and load on the file system. If you want to read in quiet mode, set the value to a comfortable number or `1`. + +
+ +More details + +In Node, there are [two types of threads][nodejs_thread_pool]: Event Loop (code) and a Thread Pool (fs, dns, …). The thread pool size controlled by the `UV_THREADPOOL_SIZE` environment variable. Its default size is 4 ([documentation][libuv_thread_pool]). The pool is one for all tasks within a single Node process. + +Any code can make 4 real concurrent accesses to the file system. The rest of the FS requests will wait in the queue. + +> :book: Each new instance of FG in the same Node process will use the same Thread pool. + +But this package also has the `concurrency` option. This option allows you to control the number of concurrent accesses to the FS at the package level. By default, this package has a value equal to the number of cores available for the current Node process. This allows you to set a value smaller than the pool size (`concurrency: 1`) or, conversely, to prepare tasks for the pool queue more quickly (`concurrency: Number.POSITIVE_INFINITY`). + +So, in fact, this package can **only make 4 concurrent requests to the FS**. You can increase this value by using an environment variable (`UV_THREADPOOL_SIZE`), but in practice this does not give a multiple advantage. + +
+ +#### cwd + +* Type: `string` +* Default: `process.cwd()` + +The current working directory in which to search. + +#### deep + +* Type: `number` +* Default: `Infinity` + +Specifies the maximum depth of a read directory relative to the start directory. + +For example, you have the following tree: + +```js +dir/ +└── one/ // 1 + └── two/ // 2 + └── file.js // 3 +``` + +```js +// With base directory +fg.sync('dir/**', { onlyFiles: false, deep: 1 }); // ['dir/one'] +fg.sync('dir/**', { onlyFiles: false, deep: 2 }); // ['dir/one', 'dir/one/two'] + +// With cwd option +fg.sync('**', { onlyFiles: false, cwd: 'dir', deep: 1 }); // ['one'] +fg.sync('**', { onlyFiles: false, cwd: 'dir', deep: 2 }); // ['one', 'one/two'] +``` + +> :book: If you specify a pattern with some base directory, this directory will not participate in the calculation of the depth of the found directories. Think of it as a [`cwd`](#cwd) option. + +#### followSymbolicLinks + +* Type: `boolean` +* Default: `true` + +Indicates whether to traverse descendants of symbolic link directories when expanding `**` patterns. + +> :book: Note that this option does not affect the base directory of the pattern. For example, if `./a` is a symlink to directory `./b` and you specified `['./a**', './b/**']` patterns, then directory `./a` will still be read. + +> :book: If the [`stats`](#stats) option is specified, the information about the symbolic link (`fs.lstat`) will be replaced with information about the entry (`fs.stat`) behind it. + +#### fs + +* Type: `FileSystemAdapter` +* Default: `fs.*` + +Custom implementation of methods for working with the file system. Supports objects with enumerable properties only. + +```ts +export interface FileSystemAdapter { + lstat?: typeof fs.lstat; + stat?: typeof fs.stat; + lstatSync?: typeof fs.lstatSync; + statSync?: typeof fs.statSync; + readdir?: typeof fs.readdir; + readdirSync?: typeof fs.readdirSync; +} +``` + +#### ignore + +* Type: `string[]` +* Default: `[]` + +An array of glob patterns to exclude matches. This is an alternative way to use negative patterns. + +```js +dir/ +├── package-lock.json +└── package.json +``` + +```js +fg.sync(['*.json', '!package-lock.json']); // ['package.json'] +fg.sync('*.json', { ignore: ['package-lock.json'] }); // ['package.json'] +``` + +#### suppressErrors + +* Type: `boolean` +* Default: `false` + +By default this package suppress only `ENOENT` errors. Set to `true` to suppress any error. + +> :book: Can be useful when the directory has entries with a special level of access. + +#### throwErrorOnBrokenSymbolicLink + +* Type: `boolean` +* Default: `false` + +Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`. + +> :book: This option has no effect on errors when reading the symbolic link directory. + +### Output control + +#### absolute + +* Type: `boolean` +* Default: `false` + +Return the absolute path for entries. + +```js +fg.sync('*.js', { absolute: false }); // ['index.js'] +fg.sync('*.js', { absolute: true }); // ['/home/user/index.js'] +``` + +> :book: This option is required if you want to use negative patterns with absolute path, for example, `!${__dirname}/*.js`. + +#### markDirectories + +* Type: `boolean` +* Default: `false` + +Mark the directory path with the final slash. + +```js +fg.sync('*', { onlyFiles: false, markDirectories: false }); // ['index.js', 'controllers'] +fg.sync('*', { onlyFiles: false, markDirectories: true }); // ['index.js', 'controllers/'] +``` + +#### objectMode + +* Type: `boolean` +* Default: `false` + +Returns objects (instead of strings) describing entries. + +```js +fg.sync('*', { objectMode: false }); // ['src/index.js'] +fg.sync('*', { objectMode: true }); // [{ name: 'index.js', path: 'src/index.js', dirent: }] +``` + +The object has the following fields: + +* name (`string`) — the last part of the path (basename) +* path (`string`) — full path relative to the pattern base directory +* dirent ([`fs.Dirent`][node_js_fs_class_fs_dirent]) — instance of `fs.Dirent` + +> :book: An object is an internal representation of entry, so getting it does not affect performance. + +#### onlyDirectories + +* Type: `boolean` +* Default: `false` + +Return only directories. + +```js +fg.sync('*', { onlyDirectories: false }); // ['index.js', 'src'] +fg.sync('*', { onlyDirectories: true }); // ['src'] +``` + +> :book: If `true`, the [`onlyFiles`](#onlyfiles) option is automatically `false`. + +#### onlyFiles + +* Type: `boolean` +* Default: `true` + +Return only files. + +```js +fg.sync('*', { onlyFiles: false }); // ['index.js', 'src'] +fg.sync('*', { onlyFiles: true }); // ['index.js'] +``` + +#### stats + +* Type: `boolean` +* Default: `false` + +Enables an [object mode](#objectmode) with an additional field: + +* stats ([`fs.Stats`][node_js_fs_class_fs_stats]) — instance of `fs.Stats` + +```js +fg.sync('*', { stats: false }); // ['src/index.js'] +fg.sync('*', { stats: true }); // [{ name: 'index.js', path: 'src/index.js', dirent: , stats: }] +``` + +> :book: Returns `fs.stat` instead of `fs.lstat` for symbolic links when the [`followSymbolicLinks`](#followsymboliclinks) option is specified. +> +> :warning: Unlike [object mode](#objectmode) this mode requires additional calls to the file system. On average, this mode is slower at least twice. See [old and modern mode](#old-and-modern-mode) for more details. + +#### unique + +* Type: `boolean` +* Default: `true` + +Ensures that the returned entries are unique. + +```js +fg.sync(['*.json', 'package.json'], { unique: false }); // ['package.json', 'package.json'] +fg.sync(['*.json', 'package.json'], { unique: true }); // ['package.json'] +``` + +If `true` and similar entries are found, the result is the first found. + +### Matching control + +#### braceExpansion + +* Type: `boolean` +* Default: `true` + +Enables Bash-like brace expansion. + +> :1234: [Syntax description][bash_hackers_syntax_expansion_brace] or more [detailed description][micromatch_braces]. + +```js +dir/ +├── abd +├── acd +└── a{b,c}d +``` + +```js +fg.sync('a{b,c}d', { braceExpansion: false }); // ['a{b,c}d'] +fg.sync('a{b,c}d', { braceExpansion: true }); // ['abd', 'acd'] +``` + +#### caseSensitiveMatch + +* Type: `boolean` +* Default: `true` + +Enables a [case-sensitive][wikipedia_case_sensitivity] mode for matching files. + +```js +dir/ +├── file.txt +└── File.txt +``` + +```js +fg.sync('file.txt', { caseSensitiveMatch: false }); // ['file.txt', 'File.txt'] +fg.sync('file.txt', { caseSensitiveMatch: true }); // ['file.txt'] +``` + +#### dot + +* Type: `boolean` +* Default: `false` + +Allow patterns to match entries that begin with a period (`.`). + +> :book: Note that an explicit dot in a portion of the pattern will always match dot files. + +```js +dir/ +├── .editorconfig +└── package.json +``` + +```js +fg.sync('*', { dot: false }); // ['package.json'] +fg.sync('*', { dot: true }); // ['.editorconfig', 'package.json'] +``` + +#### extglob + +* Type: `boolean` +* Default: `true` + +Enables Bash-like `extglob` functionality. + +> :1234: [Syntax description][micromatch_extglobs]. + +```js +dir/ +├── README.md +└── package.json +``` + +```js +fg.sync('*.+(json|md)', { extglob: false }); // [] +fg.sync('*.+(json|md)', { extglob: true }); // ['README.md', 'package.json'] +``` + +#### globstar + +* Type: `boolean` +* Default: `true` + +Enables recursively repeats a pattern containing `**`. If `false`, `**` behaves exactly like `*`. + +```js +dir/ +└── a + └── b +``` + +```js +fg.sync('**', { onlyFiles: false, globstar: false }); // ['a'] +fg.sync('**', { onlyFiles: false, globstar: true }); // ['a', 'a/b'] +``` + +#### baseNameMatch + +* Type: `boolean` +* Default: `false` + +If set to `true`, then patterns without slashes will be matched against the basename of the path if it contains slashes. + +```js +dir/ +└── one/ + └── file.md +``` + +```js +fg.sync('*.md', { baseNameMatch: false }); // [] +fg.sync('*.md', { baseNameMatch: true }); // ['one/file.md'] +``` + +## FAQ + +## What is a static or dynamic pattern? + +All patterns can be divided into two types: + +* **static**. A pattern is considered static if it can be used to get an entry on the file system without using matching mechanisms. For example, the `file.js` pattern is a static pattern because we can just verify that it exists on the file system. +* **dynamic**. A pattern is considered dynamic if it cannot be used directly to find occurrences without using a matching mechanisms. For example, the `*` pattern is a dynamic pattern because we cannot use this pattern directly. + +A pattern is considered dynamic if it contains the following characters (`…` — any characters or their absence) or options: + +* The [`caseSensitiveMatch`](#casesensitivematch) option is disabled +* `\\` (the escape character) +* `*`, `?`, `!` (at the beginning of line) +* `[…]` +* `(…|…)` +* `@(…)`, `!(…)`, `*(…)`, `?(…)`, `+(…)` (respects the [`extglob`](#extglob) option) +* `{…,…}`, `{…..…}` (respects the [`braceExpansion`](#braceexpansion) option) + +## How to write patterns on Windows? + +Always use forward-slashes in glob expressions (patterns and [`ignore`](#ignore) option). Use backslashes for escaping characters. With the [`cwd`](#cwd) option use a convenient format. + +**Bad** + +```ts +[ + 'directory\\*', + path.join(process.cwd(), '**') +] +``` + +**Good** + +```ts +[ + 'directory/*', + fg.convertPathToPattern(process.cwd()) + '/**' +] +``` + +> :book: Use the [`.convertPathToPattern`](#convertpathtopatternpath) package to convert Windows-style path to a Unix-style path. + +Read more about [matching with backslashes][micromatch_backslashes]. + +## Why are parentheses match wrong? + +```js +dir/ +└── (special-*file).txt +``` + +```js +fg.sync(['(special-*file).txt']) // [] +``` + +Refers to Bash. You need to escape special characters: + +```js +fg.sync(['\\(special-*file\\).txt']) // ['(special-*file).txt'] +``` + +Read more about [matching special characters as literals][picomatch_matching_special_characters_as_literals]. Or use the [`.escapePath`](#escapepathpath). + +## How to exclude directory from reading? + +You can use a negative pattern like this: `!**/node_modules` or `!**/node_modules/**`. Also you can use [`ignore`](#ignore) option. Just look at the example below. + +```js +first/ +├── file.md +└── second/ + └── file.txt +``` + +If you don't want to read the `second` directory, you must write the following pattern: `!**/second` or `!**/second/**`. + +```js +fg.sync(['**/*.md', '!**/second']); // ['first/file.md'] +fg.sync(['**/*.md'], { ignore: ['**/second/**'] }); // ['first/file.md'] +``` + +> :warning: When you write `!**/second/**/*` it means that the directory will be **read**, but all the entries will not be included in the results. + +You have to understand that if you write the pattern to exclude directories, then the directory will not be read under any circumstances. + +## How to use UNC path? + +You cannot use [Uniform Naming Convention (UNC)][unc_path] paths as patterns (due to syntax) directly, but you can use them as [`cwd`](#cwd) directory or use the `fg.convertPathToPattern` method. + +```ts +// cwd +fg.sync('*', { cwd: '\\\\?\\C:\\Python27' /* or //?/C:/Python27 */ }); +fg.sync('Python27/*', { cwd: '\\\\?\\C:\\' /* or //?/C:/ */ }); + +// .convertPathToPattern +fg.sync(fg.convertPathToPattern('\\\\?\\c:\\Python27') + '/*'); +``` + +## Compatible with `node-glob`? + +| node-glob | fast-glob | +| :----------: | :-------: | +| `cwd` | [`cwd`](#cwd) | +| `root` | – | +| `dot` | [`dot`](#dot) | +| `nomount` | – | +| `mark` | [`markDirectories`](#markdirectories) | +| `nosort` | – | +| `nounique` | [`unique`](#unique) | +| `nobrace` | [`braceExpansion`](#braceexpansion) | +| `noglobstar` | [`globstar`](#globstar) | +| `noext` | [`extglob`](#extglob) | +| `nocase` | [`caseSensitiveMatch`](#casesensitivematch) | +| `matchBase` | [`baseNameMatch`](#basenamematch) | +| `nodir` | [`onlyFiles`](#onlyfiles) | +| `ignore` | [`ignore`](#ignore) | +| `follow` | [`followSymbolicLinks`](#followsymboliclinks) | +| `realpath` | – | +| `absolute` | [`absolute`](#absolute) | + +## Benchmarks + +You can see results [here](https://github.com/mrmlnc/fast-glob/actions/workflows/benchmark.yml?query=branch%3Amaster) for every commit into the `main` branch. + +* **Product benchmark** – comparison with the main competitors. +* **Regress benchmark** – regression between the current version and the version from the npm registry. + +## Changelog + +See the [Releases section of our GitHub project][github_releases] for changelog for each release version. + +## License + +This software is released under the terms of the MIT license. + +[bash_hackers_syntax_expansion_brace]: https://wiki.bash-hackers.org/syntax/expansion/brace +[github_releases]: https://github.com/mrmlnc/fast-glob/releases +[glob_definition]: https://en.wikipedia.org/wiki/Glob_(programming) +[glob_linux_man]: http://man7.org/linux/man-pages/man3/glob.3.html +[micromatch_backslashes]: https://github.com/micromatch/micromatch#backslashes +[micromatch_braces]: https://github.com/micromatch/braces +[micromatch_extended_globbing]: https://github.com/micromatch/micromatch#extended-globbing +[micromatch_extglobs]: https://github.com/micromatch/micromatch#extglobs +[micromatch_regex_character_classes]: https://github.com/micromatch/micromatch#regex-character-classes +[micromatch]: https://github.com/micromatch/micromatch +[node_js_fs_class_fs_dirent]: https://nodejs.org/api/fs.html#fs_class_fs_dirent +[node_js_fs_class_fs_stats]: https://nodejs.org/api/fs.html#fs_class_fs_stats +[node_js_stream_readable_streams]: https://nodejs.org/api/stream.html#stream_readable_streams +[node_js]: https://nodejs.org/en +[nodelib_fs_scandir_old_and_modern_modern]: https://github.com/nodelib/nodelib/blob/master/packages/fs/fs.scandir/README.md#old-and-modern-mode +[npm_normalize_path]: https://www.npmjs.com/package/normalize-path +[npm_unixify]: https://www.npmjs.com/package/unixify +[picomatch_matching_behavior]: https://github.com/micromatch/picomatch#matching-behavior-vs-bash +[picomatch_matching_special_characters_as_literals]: https://github.com/micromatch/picomatch#matching-special-characters-as-literals +[picomatch_posix_brackets]: https://github.com/micromatch/picomatch#posix-brackets +[regular_expressions_brackets]: https://www.regular-expressions.info/brackets.html +[unc_path]: https://learn.microsoft.com/openspecs/windows_protocols/ms-dtyp/62e862f4-2a51-452e-8eeb-dc4ff5ee33cc +[wikipedia_case_sensitivity]: https://en.wikipedia.org/wiki/Case_sensitivity +[nodejs_thread_pool]: https://nodejs.org/en/docs/guides/dont-block-the-event-loop +[libuv_thread_pool]: http://docs.libuv.org/en/v1.x/threadpool.html +[windows_naming_conventions]: https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions diff --git a/node_modules/fast-glob/node_modules/glob-parent/CHANGELOG.md b/node_modules/fast-glob/node_modules/glob-parent/CHANGELOG.md new file mode 100644 index 0000000..fb9de96 --- /dev/null +++ b/node_modules/fast-glob/node_modules/glob-parent/CHANGELOG.md @@ -0,0 +1,110 @@ +### [5.1.2](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2) (2021-03-06) + + +### Bug Fixes + +* eliminate ReDoS ([#36](https://github.com/gulpjs/glob-parent/issues/36)) ([f923116](https://github.com/gulpjs/glob-parent/commit/f9231168b0041fea3f8f954b3cceb56269fc6366)) + +### [5.1.1](https://github.com/gulpjs/glob-parent/compare/v5.1.0...v5.1.1) (2021-01-27) + + +### Bug Fixes + +* unescape exclamation mark ([#26](https://github.com/gulpjs/glob-parent/issues/26)) ([a98874f](https://github.com/gulpjs/glob-parent/commit/a98874f1a59e407f4fb1beb0db4efa8392da60bb)) + +## [5.1.0](https://github.com/gulpjs/glob-parent/compare/v5.0.0...v5.1.0) (2021-01-27) + + +### Features + +* add `flipBackslashes` option to disable auto conversion of slashes (closes [#24](https://github.com/gulpjs/glob-parent/issues/24)) ([#25](https://github.com/gulpjs/glob-parent/issues/25)) ([eecf91d](https://github.com/gulpjs/glob-parent/commit/eecf91d5e3834ed78aee39c4eaaae654d76b87b3)) + +## [5.0.0](https://github.com/gulpjs/glob-parent/compare/v4.0.0...v5.0.0) (2021-01-27) + + +### ⚠ BREAKING CHANGES + +* Drop support for node <6 & bump dependencies + +### Miscellaneous Chores + +* Drop support for node <6 & bump dependencies ([896c0c0](https://github.com/gulpjs/glob-parent/commit/896c0c00b4e7362f60b96e7fc295ae929245255a)) + +## [4.0.0](https://github.com/gulpjs/glob-parent/compare/v3.1.0...v4.0.0) (2021-01-27) + + +### ⚠ BREAKING CHANGES + +* question marks are valid path characters on Windows so avoid flagging as a glob when alone +* Update is-glob dependency + +### Features + +* hoist regexps and strings for performance gains ([4a80667](https://github.com/gulpjs/glob-parent/commit/4a80667c69355c76a572a5892b0f133c8e1f457e)) +* question marks are valid path characters on Windows so avoid flagging as a glob when alone ([2a551dd](https://github.com/gulpjs/glob-parent/commit/2a551dd0dc3235e78bf3c94843d4107072d17841)) +* Update is-glob dependency ([e41fcd8](https://github.com/gulpjs/glob-parent/commit/e41fcd895d1f7bc617dba45c9d935a7949b9c281)) + +## [3.1.0](https://github.com/gulpjs/glob-parent/compare/v3.0.1...v3.1.0) (2021-01-27) + + +### Features + +* allow basic win32 backslash use ([272afa5](https://github.com/gulpjs/glob-parent/commit/272afa5fd070fc0f796386a5993d4ee4a846988b)) +* handle extglobs (parentheses) containing separators ([7db1bdb](https://github.com/gulpjs/glob-parent/commit/7db1bdb0756e55fd14619e8ce31aa31b17b117fd)) +* new approach to braces/brackets handling ([8269bd8](https://github.com/gulpjs/glob-parent/commit/8269bd89290d99fac9395a354fb56fdcdb80f0be)) +* pre-process braces/brackets sections ([9ef8a87](https://github.com/gulpjs/glob-parent/commit/9ef8a87f66b1a43d0591e7a8e4fc5a18415ee388)) +* preserve escaped brace/bracket at end of string ([8cfb0ba](https://github.com/gulpjs/glob-parent/commit/8cfb0ba84202d51571340dcbaf61b79d16a26c76)) + + +### Bug Fixes + +* trailing escaped square brackets ([99ec9fe](https://github.com/gulpjs/glob-parent/commit/99ec9fecc60ee488ded20a94dd4f18b4f55c4ccf)) + +### [3.0.1](https://github.com/gulpjs/glob-parent/compare/v3.0.0...v3.0.1) (2021-01-27) + + +### Features + +* use path-dirname ponyfill ([cdbea5f](https://github.com/gulpjs/glob-parent/commit/cdbea5f32a58a54e001a75ddd7c0fccd4776aacc)) + + +### Bug Fixes + +* unescape glob-escaped dirnames on output ([598c533](https://github.com/gulpjs/glob-parent/commit/598c533bdf49c1428bc063aa9b8db40c5a86b030)) + +## [3.0.0](https://github.com/gulpjs/glob-parent/compare/v2.0.0...v3.0.0) (2021-01-27) + + +### ⚠ BREAKING CHANGES + +* update is-glob dependency + +### Features + +* update is-glob dependency ([5c5f8ef](https://github.com/gulpjs/glob-parent/commit/5c5f8efcee362a8e7638cf8220666acd8784f6bd)) + +## [2.0.0](https://github.com/gulpjs/glob-parent/compare/v1.3.0...v2.0.0) (2021-01-27) + + +### Features + +* move up to dirname regardless of glob characters ([f97fb83](https://github.com/gulpjs/glob-parent/commit/f97fb83be2e0a9fc8d3b760e789d2ecadd6aa0c2)) + +## [1.3.0](https://github.com/gulpjs/glob-parent/compare/v1.2.0...v1.3.0) (2021-01-27) + +## [1.2.0](https://github.com/gulpjs/glob-parent/compare/v1.1.0...v1.2.0) (2021-01-27) + + +### Reverts + +* feat: make regex test strings smaller ([dc80fa9](https://github.com/gulpjs/glob-parent/commit/dc80fa9658dca20549cfeba44bbd37d5246fcce0)) + +## [1.1.0](https://github.com/gulpjs/glob-parent/compare/v1.0.0...v1.1.0) (2021-01-27) + + +### Features + +* make regex test strings smaller ([cd83220](https://github.com/gulpjs/glob-parent/commit/cd832208638f45169f986d80fcf66e401f35d233)) + +## 1.0.0 (2021-01-27) + diff --git a/node_modules/fast-glob/node_modules/glob-parent/LICENSE b/node_modules/fast-glob/node_modules/glob-parent/LICENSE new file mode 100644 index 0000000..63222d7 --- /dev/null +++ b/node_modules/fast-glob/node_modules/glob-parent/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2015, 2019 Elan Shanker + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/fast-glob/node_modules/glob-parent/README.md b/node_modules/fast-glob/node_modules/glob-parent/README.md new file mode 100644 index 0000000..36a2793 --- /dev/null +++ b/node_modules/fast-glob/node_modules/glob-parent/README.md @@ -0,0 +1,137 @@ +

+ + + +

+ +# glob-parent + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Extract the non-magic parent path from a glob string. + +## Usage + +```js +var globParent = require('glob-parent'); + +globParent('path/to/*.js'); // 'path/to' +globParent('/root/path/to/*.js'); // '/root/path/to' +globParent('/*.js'); // '/' +globParent('*.js'); // '.' +globParent('**/*.js'); // '.' +globParent('path/{to,from}'); // 'path' +globParent('path/!(to|from)'); // 'path' +globParent('path/?(to|from)'); // 'path' +globParent('path/+(to|from)'); // 'path' +globParent('path/*(to|from)'); // 'path' +globParent('path/@(to|from)'); // 'path' +globParent('path/**/*'); // 'path' + +// if provided a non-glob path, returns the nearest dir +globParent('path/foo/bar.js'); // 'path/foo' +globParent('path/foo/'); // 'path/foo' +globParent('path/foo'); // 'path' (see issue #3 for details) +``` + +## API + +### `globParent(maybeGlobString, [options])` + +Takes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below. + +#### options + +```js +{ + // Disables the automatic conversion of slashes for Windows + flipBackslashes: true +} +``` + +## Escaping + +The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters: + +- `?` (question mark) unless used as a path segment alone +- `*` (asterisk) +- `|` (pipe) +- `(` (opening parenthesis) +- `)` (closing parenthesis) +- `{` (opening curly brace) +- `}` (closing curly brace) +- `[` (opening bracket) +- `]` (closing bracket) + +**Example** + +```js +globParent('foo/[bar]/') // 'foo' +globParent('foo/\\[bar]/') // 'foo/[bar]' +``` + +## Limitations + +### Braces & Brackets +This library attempts a quick and imperfect method of determining which path +parts have glob magic without fully parsing/lexing the pattern. There are some +advanced use cases that can trip it up, such as nested braces where the outer +pair is escaped and the inner one contains a path separator. If you find +yourself in the unlikely circumstance of being affected by this or need to +ensure higher-fidelity glob handling in your library, it is recommended that you +pre-process your input with [expand-braces] and/or [expand-brackets]. + +### Windows +Backslashes are not valid path separators for globs. If a path with backslashes +is provided anyway, for simple cases, glob-parent will replace the path +separator for you and return the non-glob parent path (now with +forward-slashes, which are still valid as Windows path separators). + +This cannot be used in conjunction with escape characters. + +```js +// BAD +globParent('C:\\Program Files \\(x86\\)\\*.ext') // 'C:/Program Files /(x86/)' + +// GOOD +globParent('C:/Program Files\\(x86\\)/*.ext') // 'C:/Program Files (x86)' +``` + +If you are using escape characters for a pattern without path parts (i.e. +relative to `cwd`), prefix with `./` to avoid confusing glob-parent. + +```js +// BAD +globParent('foo \\[bar]') // 'foo ' +globParent('foo \\[bar]*') // 'foo ' + +// GOOD +globParent('./foo \\[bar]') // 'foo [bar]' +globParent('./foo \\[bar]*') // '.' +``` + +## License + +ISC + +[expand-braces]: https://github.com/jonschlinkert/expand-braces +[expand-brackets]: https://github.com/jonschlinkert/expand-brackets + +[downloads-image]: https://img.shields.io/npm/dm/glob-parent.svg +[npm-url]: https://www.npmjs.com/package/glob-parent +[npm-image]: https://img.shields.io/npm/v/glob-parent.svg + +[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=2&branchName=master +[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/glob-parent?branchName=master + +[travis-url]: https://travis-ci.org/gulpjs/glob-parent +[travis-image]: https://img.shields.io/travis/gulpjs/glob-parent.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-parent +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-parent.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/glob-parent +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/fast-glob/node_modules/glob-parent/index.js b/node_modules/fast-glob/node_modules/glob-parent/index.js new file mode 100644 index 0000000..09e257e --- /dev/null +++ b/node_modules/fast-glob/node_modules/glob-parent/index.js @@ -0,0 +1,42 @@ +'use strict'; + +var isGlob = require('is-glob'); +var pathPosixDirname = require('path').posix.dirname; +var isWin32 = require('os').platform() === 'win32'; + +var slash = '/'; +var backslash = /\\/g; +var enclosure = /[\{\[].*[\}\]]$/; +var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; +var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; + +/** + * @param {string} str + * @param {Object} opts + * @param {boolean} [opts.flipBackslashes=true] + * @returns {string} + */ +module.exports = function globParent(str, opts) { + var options = Object.assign({ flipBackslashes: true }, opts); + + // flip windows path separators + if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { + str = str.replace(backslash, slash); + } + + // special case for strings ending in enclosure containing path separator + if (enclosure.test(str)) { + str += slash; + } + + // preserves full path in case of trailing path separator + str += 'a'; + + // remove path parts that are globby + do { + str = pathPosixDirname(str); + } while (isGlob(str) || globby.test(str)); + + // remove escape chars and return result + return str.replace(escaped, '$1'); +}; diff --git a/node_modules/fast-glob/node_modules/glob-parent/package.json b/node_modules/fast-glob/node_modules/glob-parent/package.json new file mode 100644 index 0000000..125c971 --- /dev/null +++ b/node_modules/fast-glob/node_modules/glob-parent/package.json @@ -0,0 +1,48 @@ +{ + "name": "glob-parent", + "version": "5.1.2", + "description": "Extract the non-magic parent path from a glob string.", + "author": "Gulp Team (https://gulpjs.com/)", + "contributors": [ + "Elan Shanker (https://github.com/es128)", + "Blaine Bublitz " + ], + "repository": "gulpjs/glob-parent", + "license": "ISC", + "engines": { + "node": ">= 6" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "nyc mocha --async-only", + "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", + "coveralls": "nyc report --reporter=text-lcov | coveralls" + }, + "dependencies": { + "is-glob": "^4.0.1" + }, + "devDependencies": { + "coveralls": "^3.0.11", + "eslint": "^2.13.1", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "mocha": "^6.0.2", + "nyc": "^13.3.0" + }, + "keywords": [ + "glob", + "parent", + "strip", + "path", + "dirname", + "directory", + "base", + "wildcard" + ] +} diff --git a/node_modules/fast-glob/out/index.d.ts b/node_modules/fast-glob/out/index.d.ts new file mode 100644 index 0000000..46823bb --- /dev/null +++ b/node_modules/fast-glob/out/index.d.ts @@ -0,0 +1,40 @@ +/// +import * as taskManager from './managers/tasks'; +import { Options as OptionsInternal } from './settings'; +import { Entry as EntryInternal, FileSystemAdapter as FileSystemAdapterInternal, Pattern as PatternInternal } from './types'; +type EntryObjectModePredicate = { + [TKey in keyof Pick]-?: true; +}; +type EntryStatsPredicate = { + [TKey in keyof Pick]-?: true; +}; +type EntryObjectPredicate = EntryObjectModePredicate | EntryStatsPredicate; +declare function FastGlob(source: PatternInternal | PatternInternal[], options: OptionsInternal & EntryObjectPredicate): Promise; +declare function FastGlob(source: PatternInternal | PatternInternal[], options?: OptionsInternal): Promise; +declare namespace FastGlob { + type Options = OptionsInternal; + type Entry = EntryInternal; + type Task = taskManager.Task; + type Pattern = PatternInternal; + type FileSystemAdapter = FileSystemAdapterInternal; + const glob: typeof FastGlob; + const globSync: typeof sync; + const globStream: typeof stream; + const async: typeof FastGlob; + function sync(source: PatternInternal | PatternInternal[], options: OptionsInternal & EntryObjectPredicate): EntryInternal[]; + function sync(source: PatternInternal | PatternInternal[], options?: OptionsInternal): string[]; + function stream(source: PatternInternal | PatternInternal[], options?: OptionsInternal): NodeJS.ReadableStream; + function generateTasks(source: PatternInternal | PatternInternal[], options?: OptionsInternal): Task[]; + function isDynamicPattern(source: PatternInternal, options?: OptionsInternal): boolean; + function escapePath(source: string): PatternInternal; + function convertPathToPattern(source: string): PatternInternal; + namespace posix { + function escapePath(source: string): PatternInternal; + function convertPathToPattern(source: string): PatternInternal; + } + namespace win32 { + function escapePath(source: string): PatternInternal; + function convertPathToPattern(source: string): PatternInternal; + } +} +export = FastGlob; diff --git a/node_modules/fast-glob/out/index.js b/node_modules/fast-glob/out/index.js new file mode 100644 index 0000000..90365d4 --- /dev/null +++ b/node_modules/fast-glob/out/index.js @@ -0,0 +1,102 @@ +"use strict"; +const taskManager = require("./managers/tasks"); +const async_1 = require("./providers/async"); +const stream_1 = require("./providers/stream"); +const sync_1 = require("./providers/sync"); +const settings_1 = require("./settings"); +const utils = require("./utils"); +async function FastGlob(source, options) { + assertPatternsInput(source); + const works = getWorks(source, async_1.default, options); + const result = await Promise.all(works); + return utils.array.flatten(result); +} +// https://github.com/typescript-eslint/typescript-eslint/issues/60 +// eslint-disable-next-line no-redeclare +(function (FastGlob) { + FastGlob.glob = FastGlob; + FastGlob.globSync = sync; + FastGlob.globStream = stream; + FastGlob.async = FastGlob; + function sync(source, options) { + assertPatternsInput(source); + const works = getWorks(source, sync_1.default, options); + return utils.array.flatten(works); + } + FastGlob.sync = sync; + function stream(source, options) { + assertPatternsInput(source); + const works = getWorks(source, stream_1.default, options); + /** + * The stream returned by the provider cannot work with an asynchronous iterator. + * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams. + * This affects performance (+25%). I don't see best solution right now. + */ + return utils.stream.merge(works); + } + FastGlob.stream = stream; + function generateTasks(source, options) { + assertPatternsInput(source); + const patterns = [].concat(source); + const settings = new settings_1.default(options); + return taskManager.generate(patterns, settings); + } + FastGlob.generateTasks = generateTasks; + function isDynamicPattern(source, options) { + assertPatternsInput(source); + const settings = new settings_1.default(options); + return utils.pattern.isDynamicPattern(source, settings); + } + FastGlob.isDynamicPattern = isDynamicPattern; + function escapePath(source) { + assertPatternsInput(source); + return utils.path.escape(source); + } + FastGlob.escapePath = escapePath; + function convertPathToPattern(source) { + assertPatternsInput(source); + return utils.path.convertPathToPattern(source); + } + FastGlob.convertPathToPattern = convertPathToPattern; + let posix; + (function (posix) { + function escapePath(source) { + assertPatternsInput(source); + return utils.path.escapePosixPath(source); + } + posix.escapePath = escapePath; + function convertPathToPattern(source) { + assertPatternsInput(source); + return utils.path.convertPosixPathToPattern(source); + } + posix.convertPathToPattern = convertPathToPattern; + })(posix = FastGlob.posix || (FastGlob.posix = {})); + let win32; + (function (win32) { + function escapePath(source) { + assertPatternsInput(source); + return utils.path.escapeWindowsPath(source); + } + win32.escapePath = escapePath; + function convertPathToPattern(source) { + assertPatternsInput(source); + return utils.path.convertWindowsPathToPattern(source); + } + win32.convertPathToPattern = convertPathToPattern; + })(win32 = FastGlob.win32 || (FastGlob.win32 = {})); +})(FastGlob || (FastGlob = {})); +function getWorks(source, _Provider, options) { + const patterns = [].concat(source); + const settings = new settings_1.default(options); + const tasks = taskManager.generate(patterns, settings); + const provider = new _Provider(settings); + return tasks.map(provider.read, provider); +} +function assertPatternsInput(input) { + const source = [].concat(input); + const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); + if (!isValidSource) { + throw new TypeError('Patterns must be a string (non empty) or an array of strings'); + } +} +module.exports = FastGlob; diff --git a/node_modules/fast-glob/out/managers/tasks.d.ts b/node_modules/fast-glob/out/managers/tasks.d.ts new file mode 100644 index 0000000..59d2c42 --- /dev/null +++ b/node_modules/fast-glob/out/managers/tasks.d.ts @@ -0,0 +1,22 @@ +import Settings from '../settings'; +import { Pattern, PatternsGroup } from '../types'; +export type Task = { + base: string; + dynamic: boolean; + patterns: Pattern[]; + positive: Pattern[]; + negative: Pattern[]; +}; +export declare function generate(input: Pattern[], settings: Settings): Task[]; +/** + * Returns tasks grouped by basic pattern directories. + * + * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately. + * This is necessary because directory traversal starts at the base directory and goes deeper. + */ +export declare function convertPatternsToTasks(positive: Pattern[], negative: Pattern[], dynamic: boolean): Task[]; +export declare function getPositivePatterns(patterns: Pattern[]): Pattern[]; +export declare function getNegativePatternsAsPositive(patterns: Pattern[], ignore: Pattern[]): Pattern[]; +export declare function groupPatternsByBaseDirectory(patterns: Pattern[]): PatternsGroup; +export declare function convertPatternGroupsToTasks(positive: PatternsGroup, negative: Pattern[], dynamic: boolean): Task[]; +export declare function convertPatternGroupToTask(base: string, positive: Pattern[], negative: Pattern[], dynamic: boolean): Task; diff --git a/node_modules/fast-glob/out/managers/tasks.js b/node_modules/fast-glob/out/managers/tasks.js new file mode 100644 index 0000000..335a765 --- /dev/null +++ b/node_modules/fast-glob/out/managers/tasks.js @@ -0,0 +1,110 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0; +const utils = require("../utils"); +function generate(input, settings) { + const patterns = processPatterns(input, settings); + const ignore = processPatterns(settings.ignore, settings); + const positivePatterns = getPositivePatterns(patterns); + const negativePatterns = getNegativePatternsAsPositive(patterns, ignore); + const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); + const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); + const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false); + const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true); + return staticTasks.concat(dynamicTasks); +} +exports.generate = generate; +function processPatterns(input, settings) { + let patterns = input; + /** + * The original pattern like `{,*,**,a/*}` can lead to problems checking the depth when matching entry + * and some problems with the micromatch package (see fast-glob issues: #365, #394). + * + * To solve this problem, we expand all patterns containing brace expansion. This can lead to a slight slowdown + * in matching in the case of a large set of patterns after expansion. + */ + if (settings.braceExpansion) { + patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns); + } + /** + * If the `baseNameMatch` option is enabled, we must add globstar to patterns, so that they can be used + * at any nesting level. + * + * We do this here, because otherwise we have to complicate the filtering logic. For example, we need to change + * the pattern in the filter before creating a regular expression. There is no need to change the patterns + * in the application. Only on the input. + */ + if (settings.baseNameMatch) { + patterns = patterns.map((pattern) => pattern.includes('/') ? pattern : `**/${pattern}`); + } + /** + * This method also removes duplicate slashes that may have been in the pattern or formed as a result of expansion. + */ + return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern)); +} +/** + * Returns tasks grouped by basic pattern directories. + * + * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately. + * This is necessary because directory traversal starts at the base directory and goes deeper. + */ +function convertPatternsToTasks(positive, negative, dynamic) { + const tasks = []; + const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); + const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); + const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); + const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); + tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); + /* + * For the sake of reducing future accesses to the file system, we merge all tasks within the current directory + * into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest. + */ + if ('.' in insideCurrentDirectoryGroup) { + tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic)); + } + else { + tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); + } + return tasks; +} +exports.convertPatternsToTasks = convertPatternsToTasks; +function getPositivePatterns(patterns) { + return utils.pattern.getPositivePatterns(patterns); +} +exports.getPositivePatterns = getPositivePatterns; +function getNegativePatternsAsPositive(patterns, ignore) { + const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); + const positive = negative.map(utils.pattern.convertToPositivePattern); + return positive; +} +exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive; +function groupPatternsByBaseDirectory(patterns) { + const group = {}; + return patterns.reduce((collection, pattern) => { + const base = utils.pattern.getBaseDirectory(pattern); + if (base in collection) { + collection[base].push(pattern); + } + else { + collection[base] = [pattern]; + } + return collection; + }, group); +} +exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; +function convertPatternGroupsToTasks(positive, negative, dynamic) { + return Object.keys(positive).map((base) => { + return convertPatternGroupToTask(base, positive[base], negative, dynamic); + }); +} +exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks; +function convertPatternGroupToTask(base, positive, negative, dynamic) { + return { + dynamic, + positive, + negative, + base, + patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) + }; +} +exports.convertPatternGroupToTask = convertPatternGroupToTask; diff --git a/node_modules/fast-glob/out/providers/async.d.ts b/node_modules/fast-glob/out/providers/async.d.ts new file mode 100644 index 0000000..2742616 --- /dev/null +++ b/node_modules/fast-glob/out/providers/async.d.ts @@ -0,0 +1,9 @@ +import { Task } from '../managers/tasks'; +import { Entry, EntryItem, ReaderOptions } from '../types'; +import ReaderAsync from '../readers/async'; +import Provider from './provider'; +export default class ProviderAsync extends Provider> { + protected _reader: ReaderAsync; + read(task: Task): Promise; + api(root: string, task: Task, options: ReaderOptions): Promise; +} diff --git a/node_modules/fast-glob/out/providers/async.js b/node_modules/fast-glob/out/providers/async.js new file mode 100644 index 0000000..0c5286e --- /dev/null +++ b/node_modules/fast-glob/out/providers/async.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const async_1 = require("../readers/async"); +const provider_1 = require("./provider"); +class ProviderAsync extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new async_1.default(this._settings); + } + async read(task) { + const root = this._getRootDirectory(task); + const options = this._getReaderOptions(task); + const entries = await this.api(root, task, options); + return entries.map((entry) => options.transform(entry)); + } + api(root, task, options) { + if (task.dynamic) { + return this._reader.dynamic(root, options); + } + return this._reader.static(task.patterns, options); + } +} +exports.default = ProviderAsync; diff --git a/node_modules/fast-glob/out/providers/filters/deep.d.ts b/node_modules/fast-glob/out/providers/filters/deep.d.ts new file mode 100644 index 0000000..377fab8 --- /dev/null +++ b/node_modules/fast-glob/out/providers/filters/deep.d.ts @@ -0,0 +1,16 @@ +import { MicromatchOptions, EntryFilterFunction, Pattern } from '../../types'; +import Settings from '../../settings'; +export default class DeepFilter { + private readonly _settings; + private readonly _micromatchOptions; + constructor(_settings: Settings, _micromatchOptions: MicromatchOptions); + getFilter(basePath: string, positive: Pattern[], negative: Pattern[]): EntryFilterFunction; + private _getMatcher; + private _getNegativePatternsRe; + private _filter; + private _isSkippedByDeep; + private _getEntryLevel; + private _isSkippedSymbolicLink; + private _isSkippedByPositivePatterns; + private _isSkippedByNegativePatterns; +} diff --git a/node_modules/fast-glob/out/providers/filters/deep.js b/node_modules/fast-glob/out/providers/filters/deep.js new file mode 100644 index 0000000..644bf41 --- /dev/null +++ b/node_modules/fast-glob/out/providers/filters/deep.js @@ -0,0 +1,62 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils = require("../../utils"); +const partial_1 = require("../matchers/partial"); +class DeepFilter { + constructor(_settings, _micromatchOptions) { + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + } + getFilter(basePath, positive, negative) { + const matcher = this._getMatcher(positive); + const negativeRe = this._getNegativePatternsRe(negative); + return (entry) => this._filter(basePath, entry, matcher, negativeRe); + } + _getMatcher(patterns) { + return new partial_1.default(patterns, this._settings, this._micromatchOptions); + } + _getNegativePatternsRe(patterns) { + const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); + return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); + } + _filter(basePath, entry, matcher, negativeRe) { + if (this._isSkippedByDeep(basePath, entry.path)) { + return false; + } + if (this._isSkippedSymbolicLink(entry)) { + return false; + } + const filepath = utils.path.removeLeadingDotSegment(entry.path); + if (this._isSkippedByPositivePatterns(filepath, matcher)) { + return false; + } + return this._isSkippedByNegativePatterns(filepath, negativeRe); + } + _isSkippedByDeep(basePath, entryPath) { + /** + * Avoid unnecessary depth calculations when it doesn't matter. + */ + if (this._settings.deep === Infinity) { + return false; + } + return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; + } + _getEntryLevel(basePath, entryPath) { + const entryPathDepth = entryPath.split('/').length; + if (basePath === '') { + return entryPathDepth; + } + const basePathDepth = basePath.split('/').length; + return entryPathDepth - basePathDepth; + } + _isSkippedSymbolicLink(entry) { + return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); + } + _isSkippedByPositivePatterns(entryPath, matcher) { + return !this._settings.baseNameMatch && !matcher.match(entryPath); + } + _isSkippedByNegativePatterns(entryPath, patternsRe) { + return !utils.pattern.matchAny(entryPath, patternsRe); + } +} +exports.default = DeepFilter; diff --git a/node_modules/fast-glob/out/providers/filters/entry.d.ts b/node_modules/fast-glob/out/providers/filters/entry.d.ts new file mode 100644 index 0000000..23db353 --- /dev/null +++ b/node_modules/fast-glob/out/providers/filters/entry.d.ts @@ -0,0 +1,17 @@ +import Settings from '../../settings'; +import { EntryFilterFunction, MicromatchOptions, Pattern } from '../../types'; +export default class EntryFilter { + private readonly _settings; + private readonly _micromatchOptions; + readonly index: Map; + constructor(_settings: Settings, _micromatchOptions: MicromatchOptions); + getFilter(positive: Pattern[], negative: Pattern[]): EntryFilterFunction; + private _filter; + private _isDuplicateEntry; + private _createIndexRecord; + private _onlyFileFilter; + private _onlyDirectoryFilter; + private _isMatchToPatternsSet; + private _isMatchToAbsoluteNegative; + private _isMatchToPatterns; +} diff --git a/node_modules/fast-glob/out/providers/filters/entry.js b/node_modules/fast-glob/out/providers/filters/entry.js new file mode 100644 index 0000000..0c9210c --- /dev/null +++ b/node_modules/fast-glob/out/providers/filters/entry.js @@ -0,0 +1,85 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils = require("../../utils"); +class EntryFilter { + constructor(_settings, _micromatchOptions) { + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + this.index = new Map(); + } + getFilter(positive, negative) { + const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative); + const patterns = { + positive: { + all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions) + }, + negative: { + absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })), + relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })) + } + }; + return (entry) => this._filter(entry, patterns); + } + _filter(entry, patterns) { + const filepath = utils.path.removeLeadingDotSegment(entry.path); + if (this._settings.unique && this._isDuplicateEntry(filepath)) { + return false; + } + if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { + return false; + } + const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory()); + if (this._settings.unique && isMatched) { + this._createIndexRecord(filepath); + } + return isMatched; + } + _isDuplicateEntry(filepath) { + return this.index.has(filepath); + } + _createIndexRecord(filepath) { + this.index.set(filepath, undefined); + } + _onlyFileFilter(entry) { + return this._settings.onlyFiles && !entry.dirent.isFile(); + } + _onlyDirectoryFilter(entry) { + return this._settings.onlyDirectories && !entry.dirent.isDirectory(); + } + _isMatchToPatternsSet(filepath, patterns, isDirectory) { + const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); + if (!isMatched) { + return false; + } + const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); + if (isMatchedByRelativeNegative) { + return false; + } + const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); + if (isMatchedByAbsoluteNegative) { + return false; + } + return true; + } + _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { + if (patternsRe.length === 0) { + return false; + } + const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); + return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); + } + _isMatchToPatterns(filepath, patternsRe, isDirectory) { + if (patternsRe.length === 0) { + return false; + } + // Trying to match files and directories by patterns. + const isMatched = utils.pattern.matchAny(filepath, patternsRe); + // A pattern with a trailling slash can be used for directory matching. + // To apply such pattern, we need to add a tralling slash to the path. + if (!isMatched && isDirectory) { + return utils.pattern.matchAny(filepath + '/', patternsRe); + } + return isMatched; + } +} +exports.default = EntryFilter; diff --git a/node_modules/fast-glob/out/providers/filters/error.d.ts b/node_modules/fast-glob/out/providers/filters/error.d.ts new file mode 100644 index 0000000..170eb25 --- /dev/null +++ b/node_modules/fast-glob/out/providers/filters/error.d.ts @@ -0,0 +1,8 @@ +import Settings from '../../settings'; +import { ErrorFilterFunction } from '../../types'; +export default class ErrorFilter { + private readonly _settings; + constructor(_settings: Settings); + getFilter(): ErrorFilterFunction; + private _isNonFatalError; +} diff --git a/node_modules/fast-glob/out/providers/filters/error.js b/node_modules/fast-glob/out/providers/filters/error.js new file mode 100644 index 0000000..1c6f241 --- /dev/null +++ b/node_modules/fast-glob/out/providers/filters/error.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils = require("../../utils"); +class ErrorFilter { + constructor(_settings) { + this._settings = _settings; + } + getFilter() { + return (error) => this._isNonFatalError(error); + } + _isNonFatalError(error) { + return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; + } +} +exports.default = ErrorFilter; diff --git a/node_modules/fast-glob/out/providers/matchers/matcher.d.ts b/node_modules/fast-glob/out/providers/matchers/matcher.d.ts new file mode 100644 index 0000000..d04c232 --- /dev/null +++ b/node_modules/fast-glob/out/providers/matchers/matcher.d.ts @@ -0,0 +1,33 @@ +import { Pattern, MicromatchOptions, PatternRe } from '../../types'; +import Settings from '../../settings'; +export type PatternSegment = StaticPatternSegment | DynamicPatternSegment; +type StaticPatternSegment = { + dynamic: false; + pattern: Pattern; +}; +type DynamicPatternSegment = { + dynamic: true; + pattern: Pattern; + patternRe: PatternRe; +}; +export type PatternSection = PatternSegment[]; +export type PatternInfo = { + /** + * Indicates that the pattern has a globstar (more than a single section). + */ + complete: boolean; + pattern: Pattern; + segments: PatternSegment[]; + sections: PatternSection[]; +}; +export default abstract class Matcher { + private readonly _patterns; + private readonly _settings; + private readonly _micromatchOptions; + protected readonly _storage: PatternInfo[]; + constructor(_patterns: Pattern[], _settings: Settings, _micromatchOptions: MicromatchOptions); + private _fillStorage; + private _getPatternSegments; + private _splitSegmentsIntoSections; +} +export {}; diff --git a/node_modules/fast-glob/out/providers/matchers/matcher.js b/node_modules/fast-glob/out/providers/matchers/matcher.js new file mode 100644 index 0000000..eae67c9 --- /dev/null +++ b/node_modules/fast-glob/out/providers/matchers/matcher.js @@ -0,0 +1,45 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils = require("../../utils"); +class Matcher { + constructor(_patterns, _settings, _micromatchOptions) { + this._patterns = _patterns; + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + this._storage = []; + this._fillStorage(); + } + _fillStorage() { + for (const pattern of this._patterns) { + const segments = this._getPatternSegments(pattern); + const sections = this._splitSegmentsIntoSections(segments); + this._storage.push({ + complete: sections.length <= 1, + pattern, + segments, + sections + }); + } + } + _getPatternSegments(pattern) { + const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); + return parts.map((part) => { + const dynamic = utils.pattern.isDynamicPattern(part, this._settings); + if (!dynamic) { + return { + dynamic: false, + pattern: part + }; + } + return { + dynamic: true, + pattern: part, + patternRe: utils.pattern.makeRe(part, this._micromatchOptions) + }; + }); + } + _splitSegmentsIntoSections(segments) { + return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); + } +} +exports.default = Matcher; diff --git a/node_modules/fast-glob/out/providers/matchers/partial.d.ts b/node_modules/fast-glob/out/providers/matchers/partial.d.ts new file mode 100644 index 0000000..91520f6 --- /dev/null +++ b/node_modules/fast-glob/out/providers/matchers/partial.d.ts @@ -0,0 +1,4 @@ +import Matcher from './matcher'; +export default class PartialMatcher extends Matcher { + match(filepath: string): boolean; +} diff --git a/node_modules/fast-glob/out/providers/matchers/partial.js b/node_modules/fast-glob/out/providers/matchers/partial.js new file mode 100644 index 0000000..1dfffeb --- /dev/null +++ b/node_modules/fast-glob/out/providers/matchers/partial.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const matcher_1 = require("./matcher"); +class PartialMatcher extends matcher_1.default { + match(filepath) { + const parts = filepath.split('/'); + const levels = parts.length; + const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels); + for (const pattern of patterns) { + const section = pattern.sections[0]; + /** + * In this case, the pattern has a globstar and we must read all directories unconditionally, + * but only if the level has reached the end of the first group. + * + * fixtures/{a,b}/** + * ^ true/false ^ always true + */ + if (!pattern.complete && levels > section.length) { + return true; + } + const match = parts.every((part, index) => { + const segment = pattern.segments[index]; + if (segment.dynamic && segment.patternRe.test(part)) { + return true; + } + if (!segment.dynamic && segment.pattern === part) { + return true; + } + return false; + }); + if (match) { + return true; + } + } + return false; + } +} +exports.default = PartialMatcher; diff --git a/node_modules/fast-glob/out/providers/provider.d.ts b/node_modules/fast-glob/out/providers/provider.d.ts new file mode 100644 index 0000000..1053460 --- /dev/null +++ b/node_modules/fast-glob/out/providers/provider.d.ts @@ -0,0 +1,19 @@ +import { Task } from '../managers/tasks'; +import Settings from '../settings'; +import { MicromatchOptions, ReaderOptions } from '../types'; +import DeepFilter from './filters/deep'; +import EntryFilter from './filters/entry'; +import ErrorFilter from './filters/error'; +import EntryTransformer from './transformers/entry'; +export default abstract class Provider { + protected readonly _settings: Settings; + readonly errorFilter: ErrorFilter; + readonly entryFilter: EntryFilter; + readonly deepFilter: DeepFilter; + readonly entryTransformer: EntryTransformer; + constructor(_settings: Settings); + abstract read(_task: Task): T; + protected _getRootDirectory(task: Task): string; + protected _getReaderOptions(task: Task): ReaderOptions; + protected _getMicromatchOptions(): MicromatchOptions; +} diff --git a/node_modules/fast-glob/out/providers/provider.js b/node_modules/fast-glob/out/providers/provider.js new file mode 100644 index 0000000..da88ee0 --- /dev/null +++ b/node_modules/fast-glob/out/providers/provider.js @@ -0,0 +1,48 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const deep_1 = require("./filters/deep"); +const entry_1 = require("./filters/entry"); +const error_1 = require("./filters/error"); +const entry_2 = require("./transformers/entry"); +class Provider { + constructor(_settings) { + this._settings = _settings; + this.errorFilter = new error_1.default(this._settings); + this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); + this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); + this.entryTransformer = new entry_2.default(this._settings); + } + _getRootDirectory(task) { + return path.resolve(this._settings.cwd, task.base); + } + _getReaderOptions(task) { + const basePath = task.base === '.' ? '' : task.base; + return { + basePath, + pathSegmentSeparator: '/', + concurrency: this._settings.concurrency, + deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), + entryFilter: this.entryFilter.getFilter(task.positive, task.negative), + errorFilter: this.errorFilter.getFilter(), + followSymbolicLinks: this._settings.followSymbolicLinks, + fs: this._settings.fs, + stats: this._settings.stats, + throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, + transform: this.entryTransformer.getTransformer() + }; + } + _getMicromatchOptions() { + return { + dot: this._settings.dot, + matchBase: this._settings.baseNameMatch, + nobrace: !this._settings.braceExpansion, + nocase: !this._settings.caseSensitiveMatch, + noext: !this._settings.extglob, + noglobstar: !this._settings.globstar, + posix: true, + strictSlashes: false + }; + } +} +exports.default = Provider; diff --git a/node_modules/fast-glob/out/providers/stream.d.ts b/node_modules/fast-glob/out/providers/stream.d.ts new file mode 100644 index 0000000..3d02a1f --- /dev/null +++ b/node_modules/fast-glob/out/providers/stream.d.ts @@ -0,0 +1,11 @@ +/// +import { Readable } from 'stream'; +import { Task } from '../managers/tasks'; +import ReaderStream from '../readers/stream'; +import { ReaderOptions } from '../types'; +import Provider from './provider'; +export default class ProviderStream extends Provider { + protected _reader: ReaderStream; + read(task: Task): Readable; + api(root: string, task: Task, options: ReaderOptions): Readable; +} diff --git a/node_modules/fast-glob/out/providers/stream.js b/node_modules/fast-glob/out/providers/stream.js new file mode 100644 index 0000000..85da62e --- /dev/null +++ b/node_modules/fast-glob/out/providers/stream.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const stream_1 = require("stream"); +const stream_2 = require("../readers/stream"); +const provider_1 = require("./provider"); +class ProviderStream extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new stream_2.default(this._settings); + } + read(task) { + const root = this._getRootDirectory(task); + const options = this._getReaderOptions(task); + const source = this.api(root, task, options); + const destination = new stream_1.Readable({ objectMode: true, read: () => { } }); + source + .once('error', (error) => destination.emit('error', error)) + .on('data', (entry) => destination.emit('data', options.transform(entry))) + .once('end', () => destination.emit('end')); + destination + .once('close', () => source.destroy()); + return destination; + } + api(root, task, options) { + if (task.dynamic) { + return this._reader.dynamic(root, options); + } + return this._reader.static(task.patterns, options); + } +} +exports.default = ProviderStream; diff --git a/node_modules/fast-glob/out/providers/sync.d.ts b/node_modules/fast-glob/out/providers/sync.d.ts new file mode 100644 index 0000000..9c0fe1e --- /dev/null +++ b/node_modules/fast-glob/out/providers/sync.d.ts @@ -0,0 +1,9 @@ +import { Task } from '../managers/tasks'; +import ReaderSync from '../readers/sync'; +import { Entry, EntryItem, ReaderOptions } from '../types'; +import Provider from './provider'; +export default class ProviderSync extends Provider { + protected _reader: ReaderSync; + read(task: Task): EntryItem[]; + api(root: string, task: Task, options: ReaderOptions): Entry[]; +} diff --git a/node_modules/fast-glob/out/providers/sync.js b/node_modules/fast-glob/out/providers/sync.js new file mode 100644 index 0000000..d70aa1b --- /dev/null +++ b/node_modules/fast-glob/out/providers/sync.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const sync_1 = require("../readers/sync"); +const provider_1 = require("./provider"); +class ProviderSync extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new sync_1.default(this._settings); + } + read(task) { + const root = this._getRootDirectory(task); + const options = this._getReaderOptions(task); + const entries = this.api(root, task, options); + return entries.map(options.transform); + } + api(root, task, options) { + if (task.dynamic) { + return this._reader.dynamic(root, options); + } + return this._reader.static(task.patterns, options); + } +} +exports.default = ProviderSync; diff --git a/node_modules/fast-glob/out/providers/transformers/entry.d.ts b/node_modules/fast-glob/out/providers/transformers/entry.d.ts new file mode 100644 index 0000000..e9b85fa --- /dev/null +++ b/node_modules/fast-glob/out/providers/transformers/entry.d.ts @@ -0,0 +1,8 @@ +import Settings from '../../settings'; +import { EntryTransformerFunction } from '../../types'; +export default class EntryTransformer { + private readonly _settings; + constructor(_settings: Settings); + getTransformer(): EntryTransformerFunction; + private _transform; +} diff --git a/node_modules/fast-glob/out/providers/transformers/entry.js b/node_modules/fast-glob/out/providers/transformers/entry.js new file mode 100644 index 0000000..d11903c --- /dev/null +++ b/node_modules/fast-glob/out/providers/transformers/entry.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils = require("../../utils"); +class EntryTransformer { + constructor(_settings) { + this._settings = _settings; + } + getTransformer() { + return (entry) => this._transform(entry); + } + _transform(entry) { + let filepath = entry.path; + if (this._settings.absolute) { + filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); + filepath = utils.path.unixify(filepath); + } + if (this._settings.markDirectories && entry.dirent.isDirectory()) { + filepath += '/'; + } + if (!this._settings.objectMode) { + return filepath; + } + return Object.assign(Object.assign({}, entry), { path: filepath }); + } +} +exports.default = EntryTransformer; diff --git a/node_modules/fast-glob/out/readers/async.d.ts b/node_modules/fast-glob/out/readers/async.d.ts new file mode 100644 index 0000000..fbca428 --- /dev/null +++ b/node_modules/fast-glob/out/readers/async.d.ts @@ -0,0 +1,10 @@ +import * as fsWalk from '@nodelib/fs.walk'; +import { Entry, ReaderOptions, Pattern } from '../types'; +import Reader from './reader'; +import ReaderStream from './stream'; +export default class ReaderAsync extends Reader> { + protected _walkAsync: typeof fsWalk.walk; + protected _readerStream: ReaderStream; + dynamic(root: string, options: ReaderOptions): Promise; + static(patterns: Pattern[], options: ReaderOptions): Promise; +} diff --git a/node_modules/fast-glob/out/readers/async.js b/node_modules/fast-glob/out/readers/async.js new file mode 100644 index 0000000..d024145 --- /dev/null +++ b/node_modules/fast-glob/out/readers/async.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fsWalk = require("@nodelib/fs.walk"); +const reader_1 = require("./reader"); +const stream_1 = require("./stream"); +class ReaderAsync extends reader_1.default { + constructor() { + super(...arguments); + this._walkAsync = fsWalk.walk; + this._readerStream = new stream_1.default(this._settings); + } + dynamic(root, options) { + return new Promise((resolve, reject) => { + this._walkAsync(root, options, (error, entries) => { + if (error === null) { + resolve(entries); + } + else { + reject(error); + } + }); + }); + } + async static(patterns, options) { + const entries = []; + const stream = this._readerStream.static(patterns, options); + // After #235, replace it with an asynchronous iterator. + return new Promise((resolve, reject) => { + stream.once('error', reject); + stream.on('data', (entry) => entries.push(entry)); + stream.once('end', () => resolve(entries)); + }); + } +} +exports.default = ReaderAsync; diff --git a/node_modules/fast-glob/out/readers/reader.d.ts b/node_modules/fast-glob/out/readers/reader.d.ts new file mode 100644 index 0000000..2af16b6 --- /dev/null +++ b/node_modules/fast-glob/out/readers/reader.d.ts @@ -0,0 +1,15 @@ +/// +import * as fs from 'fs'; +import * as fsStat from '@nodelib/fs.stat'; +import Settings from '../settings'; +import { Entry, ErrnoException, Pattern, ReaderOptions } from '../types'; +export default abstract class Reader { + protected readonly _settings: Settings; + protected readonly _fsStatSettings: fsStat.Settings; + constructor(_settings: Settings); + abstract dynamic(root: string, options: ReaderOptions): T; + abstract static(patterns: Pattern[], options: ReaderOptions): T; + protected _getFullEntryPath(filepath: string): string; + protected _makeEntry(stats: fs.Stats, pattern: Pattern): Entry; + protected _isFatalError(error: ErrnoException): boolean; +} diff --git a/node_modules/fast-glob/out/readers/reader.js b/node_modules/fast-glob/out/readers/reader.js new file mode 100644 index 0000000..7b40255 --- /dev/null +++ b/node_modules/fast-glob/out/readers/reader.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const fsStat = require("@nodelib/fs.stat"); +const utils = require("../utils"); +class Reader { + constructor(_settings) { + this._settings = _settings; + this._fsStatSettings = new fsStat.Settings({ + followSymbolicLink: this._settings.followSymbolicLinks, + fs: this._settings.fs, + throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks + }); + } + _getFullEntryPath(filepath) { + return path.resolve(this._settings.cwd, filepath); + } + _makeEntry(stats, pattern) { + const entry = { + name: pattern, + path: pattern, + dirent: utils.fs.createDirentFromStats(pattern, stats) + }; + if (this._settings.stats) { + entry.stats = stats; + } + return entry; + } + _isFatalError(error) { + return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; + } +} +exports.default = Reader; diff --git a/node_modules/fast-glob/out/readers/stream.d.ts b/node_modules/fast-glob/out/readers/stream.d.ts new file mode 100644 index 0000000..1c74cac --- /dev/null +++ b/node_modules/fast-glob/out/readers/stream.d.ts @@ -0,0 +1,14 @@ +/// +import { Readable } from 'stream'; +import * as fsStat from '@nodelib/fs.stat'; +import * as fsWalk from '@nodelib/fs.walk'; +import { Pattern, ReaderOptions } from '../types'; +import Reader from './reader'; +export default class ReaderStream extends Reader { + protected _walkStream: typeof fsWalk.walkStream; + protected _stat: typeof fsStat.stat; + dynamic(root: string, options: ReaderOptions): Readable; + static(patterns: Pattern[], options: ReaderOptions): Readable; + private _getEntry; + private _getStat; +} diff --git a/node_modules/fast-glob/out/readers/stream.js b/node_modules/fast-glob/out/readers/stream.js new file mode 100644 index 0000000..317c6d5 --- /dev/null +++ b/node_modules/fast-glob/out/readers/stream.js @@ -0,0 +1,55 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const stream_1 = require("stream"); +const fsStat = require("@nodelib/fs.stat"); +const fsWalk = require("@nodelib/fs.walk"); +const reader_1 = require("./reader"); +class ReaderStream extends reader_1.default { + constructor() { + super(...arguments); + this._walkStream = fsWalk.walkStream; + this._stat = fsStat.stat; + } + dynamic(root, options) { + return this._walkStream(root, options); + } + static(patterns, options) { + const filepaths = patterns.map(this._getFullEntryPath, this); + const stream = new stream_1.PassThrough({ objectMode: true }); + stream._write = (index, _enc, done) => { + return this._getEntry(filepaths[index], patterns[index], options) + .then((entry) => { + if (entry !== null && options.entryFilter(entry)) { + stream.push(entry); + } + if (index === filepaths.length - 1) { + stream.end(); + } + done(); + }) + .catch(done); + }; + for (let i = 0; i < filepaths.length; i++) { + stream.write(i); + } + return stream; + } + _getEntry(filepath, pattern, options) { + return this._getStat(filepath) + .then((stats) => this._makeEntry(stats, pattern)) + .catch((error) => { + if (options.errorFilter(error)) { + return null; + } + throw error; + }); + } + _getStat(filepath) { + return new Promise((resolve, reject) => { + this._stat(filepath, this._fsStatSettings, (error, stats) => { + return error === null ? resolve(stats) : reject(error); + }); + }); + } +} +exports.default = ReaderStream; diff --git a/node_modules/fast-glob/out/readers/sync.d.ts b/node_modules/fast-glob/out/readers/sync.d.ts new file mode 100644 index 0000000..c96ffee --- /dev/null +++ b/node_modules/fast-glob/out/readers/sync.d.ts @@ -0,0 +1,12 @@ +import * as fsStat from '@nodelib/fs.stat'; +import * as fsWalk from '@nodelib/fs.walk'; +import { Entry, Pattern, ReaderOptions } from '../types'; +import Reader from './reader'; +export default class ReaderSync extends Reader { + protected _walkSync: typeof fsWalk.walkSync; + protected _statSync: typeof fsStat.statSync; + dynamic(root: string, options: ReaderOptions): Entry[]; + static(patterns: Pattern[], options: ReaderOptions): Entry[]; + private _getEntry; + private _getStat; +} diff --git a/node_modules/fast-glob/out/readers/sync.js b/node_modules/fast-glob/out/readers/sync.js new file mode 100644 index 0000000..4704d65 --- /dev/null +++ b/node_modules/fast-glob/out/readers/sync.js @@ -0,0 +1,43 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fsStat = require("@nodelib/fs.stat"); +const fsWalk = require("@nodelib/fs.walk"); +const reader_1 = require("./reader"); +class ReaderSync extends reader_1.default { + constructor() { + super(...arguments); + this._walkSync = fsWalk.walkSync; + this._statSync = fsStat.statSync; + } + dynamic(root, options) { + return this._walkSync(root, options); + } + static(patterns, options) { + const entries = []; + for (const pattern of patterns) { + const filepath = this._getFullEntryPath(pattern); + const entry = this._getEntry(filepath, pattern, options); + if (entry === null || !options.entryFilter(entry)) { + continue; + } + entries.push(entry); + } + return entries; + } + _getEntry(filepath, pattern, options) { + try { + const stats = this._getStat(filepath); + return this._makeEntry(stats, pattern); + } + catch (error) { + if (options.errorFilter(error)) { + return null; + } + throw error; + } + } + _getStat(filepath) { + return this._statSync(filepath, this._fsStatSettings); + } +} +exports.default = ReaderSync; diff --git a/node_modules/fast-glob/out/settings.d.ts b/node_modules/fast-glob/out/settings.d.ts new file mode 100644 index 0000000..76a74f8 --- /dev/null +++ b/node_modules/fast-glob/out/settings.d.ts @@ -0,0 +1,164 @@ +import { FileSystemAdapter, Pattern } from './types'; +export declare const DEFAULT_FILE_SYSTEM_ADAPTER: FileSystemAdapter; +export type Options = { + /** + * Return the absolute path for entries. + * + * @default false + */ + absolute?: boolean; + /** + * If set to `true`, then patterns without slashes will be matched against + * the basename of the path if it contains slashes. + * + * @default false + */ + baseNameMatch?: boolean; + /** + * Enables Bash-like brace expansion. + * + * @default true + */ + braceExpansion?: boolean; + /** + * Enables a case-sensitive mode for matching files. + * + * @default true + */ + caseSensitiveMatch?: boolean; + /** + * Specifies the maximum number of concurrent requests from a reader to read + * directories. + * + * @default os.cpus().length + */ + concurrency?: number; + /** + * The current working directory in which to search. + * + * @default process.cwd() + */ + cwd?: string; + /** + * Specifies the maximum depth of a read directory relative to the start + * directory. + * + * @default Infinity + */ + deep?: number; + /** + * Allow patterns to match entries that begin with a period (`.`). + * + * @default false + */ + dot?: boolean; + /** + * Enables Bash-like `extglob` functionality. + * + * @default true + */ + extglob?: boolean; + /** + * Indicates whether to traverse descendants of symbolic link directories. + * + * @default true + */ + followSymbolicLinks?: boolean; + /** + * Custom implementation of methods for working with the file system. + * + * @default fs.* + */ + fs?: Partial; + /** + * Enables recursively repeats a pattern containing `**`. + * If `false`, `**` behaves exactly like `*`. + * + * @default true + */ + globstar?: boolean; + /** + * An array of glob patterns to exclude matches. + * This is an alternative way to use negative patterns. + * + * @default [] + */ + ignore?: Pattern[]; + /** + * Mark the directory path with the final slash. + * + * @default false + */ + markDirectories?: boolean; + /** + * Returns objects (instead of strings) describing entries. + * + * @default false + */ + objectMode?: boolean; + /** + * Return only directories. + * + * @default false + */ + onlyDirectories?: boolean; + /** + * Return only files. + * + * @default true + */ + onlyFiles?: boolean; + /** + * Enables an object mode (`objectMode`) with an additional `stats` field. + * + * @default false + */ + stats?: boolean; + /** + * By default this package suppress only `ENOENT` errors. + * Set to `true` to suppress any error. + * + * @default false + */ + suppressErrors?: boolean; + /** + * Throw an error when symbolic link is broken if `true` or safely + * return `lstat` call if `false`. + * + * @default false + */ + throwErrorOnBrokenSymbolicLink?: boolean; + /** + * Ensures that the returned entries are unique. + * + * @default true + */ + unique?: boolean; +}; +export default class Settings { + private readonly _options; + readonly absolute: boolean; + readonly baseNameMatch: boolean; + readonly braceExpansion: boolean; + readonly caseSensitiveMatch: boolean; + readonly concurrency: number; + readonly cwd: string; + readonly deep: number; + readonly dot: boolean; + readonly extglob: boolean; + readonly followSymbolicLinks: boolean; + readonly fs: FileSystemAdapter; + readonly globstar: boolean; + readonly ignore: Pattern[]; + readonly markDirectories: boolean; + readonly objectMode: boolean; + readonly onlyDirectories: boolean; + readonly onlyFiles: boolean; + readonly stats: boolean; + readonly suppressErrors: boolean; + readonly throwErrorOnBrokenSymbolicLink: boolean; + readonly unique: boolean; + constructor(_options?: Options); + private _getValue; + private _getFileSystemMethods; +} diff --git a/node_modules/fast-glob/out/settings.js b/node_modules/fast-glob/out/settings.js new file mode 100644 index 0000000..23f916c --- /dev/null +++ b/node_modules/fast-glob/out/settings.js @@ -0,0 +1,59 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; +const fs = require("fs"); +const os = require("os"); +/** + * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero. + * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107 + */ +const CPU_COUNT = Math.max(os.cpus().length, 1); +exports.DEFAULT_FILE_SYSTEM_ADAPTER = { + lstat: fs.lstat, + lstatSync: fs.lstatSync, + stat: fs.stat, + statSync: fs.statSync, + readdir: fs.readdir, + readdirSync: fs.readdirSync +}; +class Settings { + constructor(_options = {}) { + this._options = _options; + this.absolute = this._getValue(this._options.absolute, false); + this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); + this.braceExpansion = this._getValue(this._options.braceExpansion, true); + this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); + this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); + this.cwd = this._getValue(this._options.cwd, process.cwd()); + this.deep = this._getValue(this._options.deep, Infinity); + this.dot = this._getValue(this._options.dot, false); + this.extglob = this._getValue(this._options.extglob, true); + this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); + this.fs = this._getFileSystemMethods(this._options.fs); + this.globstar = this._getValue(this._options.globstar, true); + this.ignore = this._getValue(this._options.ignore, []); + this.markDirectories = this._getValue(this._options.markDirectories, false); + this.objectMode = this._getValue(this._options.objectMode, false); + this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); + this.onlyFiles = this._getValue(this._options.onlyFiles, true); + this.stats = this._getValue(this._options.stats, false); + this.suppressErrors = this._getValue(this._options.suppressErrors, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); + this.unique = this._getValue(this._options.unique, true); + if (this.onlyDirectories) { + this.onlyFiles = false; + } + if (this.stats) { + this.objectMode = true; + } + // Remove the cast to the array in the next major (#404). + this.ignore = [].concat(this.ignore); + } + _getValue(option, value) { + return option === undefined ? value : option; + } + _getFileSystemMethods(methods = {}) { + return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods); + } +} +exports.default = Settings; diff --git a/node_modules/fast-glob/out/types/index.d.ts b/node_modules/fast-glob/out/types/index.d.ts new file mode 100644 index 0000000..6506caf --- /dev/null +++ b/node_modules/fast-glob/out/types/index.d.ts @@ -0,0 +1,31 @@ +/// +import * as fsWalk from '@nodelib/fs.walk'; +export type ErrnoException = NodeJS.ErrnoException; +export type Entry = fsWalk.Entry; +export type EntryItem = string | Entry; +export type Pattern = string; +export type PatternRe = RegExp; +export type PatternsGroup = Record; +export type ReaderOptions = fsWalk.Options & { + transform(entry: Entry): EntryItem; + deepFilter: DeepFilterFunction; + entryFilter: EntryFilterFunction; + errorFilter: ErrorFilterFunction; + fs: FileSystemAdapter; + stats: boolean; +}; +export type ErrorFilterFunction = fsWalk.ErrorFilterFunction; +export type EntryFilterFunction = fsWalk.EntryFilterFunction; +export type DeepFilterFunction = fsWalk.DeepFilterFunction; +export type EntryTransformerFunction = (entry: Entry) => EntryItem; +export type MicromatchOptions = { + dot?: boolean; + matchBase?: boolean; + nobrace?: boolean; + nocase?: boolean; + noext?: boolean; + noglobstar?: boolean; + posix?: boolean; + strictSlashes?: boolean; +}; +export type FileSystemAdapter = fsWalk.FileSystemAdapter; diff --git a/node_modules/fast-glob/out/types/index.js b/node_modules/fast-glob/out/types/index.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/node_modules/fast-glob/out/types/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/fast-glob/out/utils/array.d.ts b/node_modules/fast-glob/out/utils/array.d.ts new file mode 100644 index 0000000..98e7325 --- /dev/null +++ b/node_modules/fast-glob/out/utils/array.d.ts @@ -0,0 +1,2 @@ +export declare function flatten(items: T[][]): T[]; +export declare function splitWhen(items: T[], predicate: (item: T) => boolean): T[][]; diff --git a/node_modules/fast-glob/out/utils/array.js b/node_modules/fast-glob/out/utils/array.js new file mode 100644 index 0000000..50c406e --- /dev/null +++ b/node_modules/fast-glob/out/utils/array.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.splitWhen = exports.flatten = void 0; +function flatten(items) { + return items.reduce((collection, item) => [].concat(collection, item), []); +} +exports.flatten = flatten; +function splitWhen(items, predicate) { + const result = [[]]; + let groupIndex = 0; + for (const item of items) { + if (predicate(item)) { + groupIndex++; + result[groupIndex] = []; + } + else { + result[groupIndex].push(item); + } + } + return result; +} +exports.splitWhen = splitWhen; diff --git a/node_modules/fast-glob/out/utils/errno.d.ts b/node_modules/fast-glob/out/utils/errno.d.ts new file mode 100644 index 0000000..1c08d3b --- /dev/null +++ b/node_modules/fast-glob/out/utils/errno.d.ts @@ -0,0 +1,2 @@ +import { ErrnoException } from '../types'; +export declare function isEnoentCodeError(error: ErrnoException): boolean; diff --git a/node_modules/fast-glob/out/utils/errno.js b/node_modules/fast-glob/out/utils/errno.js new file mode 100644 index 0000000..f0bd801 --- /dev/null +++ b/node_modules/fast-glob/out/utils/errno.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isEnoentCodeError = void 0; +function isEnoentCodeError(error) { + return error.code === 'ENOENT'; +} +exports.isEnoentCodeError = isEnoentCodeError; diff --git a/node_modules/fast-glob/out/utils/fs.d.ts b/node_modules/fast-glob/out/utils/fs.d.ts new file mode 100644 index 0000000..64c61ce --- /dev/null +++ b/node_modules/fast-glob/out/utils/fs.d.ts @@ -0,0 +1,4 @@ +/// +import * as fs from 'fs'; +import { Dirent } from '@nodelib/fs.walk'; +export declare function createDirentFromStats(name: string, stats: fs.Stats): Dirent; diff --git a/node_modules/fast-glob/out/utils/fs.js b/node_modules/fast-glob/out/utils/fs.js new file mode 100644 index 0000000..ace7c74 --- /dev/null +++ b/node_modules/fast-glob/out/utils/fs.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDirentFromStats = void 0; +class DirentFromStats { + constructor(name, stats) { + this.name = name; + this.isBlockDevice = stats.isBlockDevice.bind(stats); + this.isCharacterDevice = stats.isCharacterDevice.bind(stats); + this.isDirectory = stats.isDirectory.bind(stats); + this.isFIFO = stats.isFIFO.bind(stats); + this.isFile = stats.isFile.bind(stats); + this.isSocket = stats.isSocket.bind(stats); + this.isSymbolicLink = stats.isSymbolicLink.bind(stats); + } +} +function createDirentFromStats(name, stats) { + return new DirentFromStats(name, stats); +} +exports.createDirentFromStats = createDirentFromStats; diff --git a/node_modules/fast-glob/out/utils/index.d.ts b/node_modules/fast-glob/out/utils/index.d.ts new file mode 100644 index 0000000..f634cad --- /dev/null +++ b/node_modules/fast-glob/out/utils/index.d.ts @@ -0,0 +1,8 @@ +import * as array from './array'; +import * as errno from './errno'; +import * as fs from './fs'; +import * as path from './path'; +import * as pattern from './pattern'; +import * as stream from './stream'; +import * as string from './string'; +export { array, errno, fs, path, pattern, stream, string }; diff --git a/node_modules/fast-glob/out/utils/index.js b/node_modules/fast-glob/out/utils/index.js new file mode 100644 index 0000000..0f92c16 --- /dev/null +++ b/node_modules/fast-glob/out/utils/index.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0; +const array = require("./array"); +exports.array = array; +const errno = require("./errno"); +exports.errno = errno; +const fs = require("./fs"); +exports.fs = fs; +const path = require("./path"); +exports.path = path; +const pattern = require("./pattern"); +exports.pattern = pattern; +const stream = require("./stream"); +exports.stream = stream; +const string = require("./string"); +exports.string = string; diff --git a/node_modules/fast-glob/out/utils/path.d.ts b/node_modules/fast-glob/out/utils/path.d.ts new file mode 100644 index 0000000..0b13f4b --- /dev/null +++ b/node_modules/fast-glob/out/utils/path.d.ts @@ -0,0 +1,13 @@ +import { Pattern } from '../types'; +/** + * Designed to work only with simple paths: `dir\\file`. + */ +export declare function unixify(filepath: string): string; +export declare function makeAbsolute(cwd: string, filepath: string): string; +export declare function removeLeadingDotSegment(entry: string): string; +export declare const escape: typeof escapeWindowsPath; +export declare function escapeWindowsPath(pattern: Pattern): Pattern; +export declare function escapePosixPath(pattern: Pattern): Pattern; +export declare const convertPathToPattern: typeof convertWindowsPathToPattern; +export declare function convertWindowsPathToPattern(filepath: string): Pattern; +export declare function convertPosixPathToPattern(filepath: string): Pattern; diff --git a/node_modules/fast-glob/out/utils/path.js b/node_modules/fast-glob/out/utils/path.js new file mode 100644 index 0000000..7b53b39 --- /dev/null +++ b/node_modules/fast-glob/out/utils/path.js @@ -0,0 +1,68 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0; +const os = require("os"); +const path = require("path"); +const IS_WINDOWS_PLATFORM = os.platform() === 'win32'; +const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\ +/** + * All non-escaped special characters. + * Posix: ()*?[]{|}, !+@ before (, ! at the beginning, \\ before non-special characters. + * Windows: (){}[], !+@ before (, ! at the beginning. + */ +const POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; +const WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g; +/** + * The device path (\\.\ or \\?\). + * https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#dos-device-paths + */ +const DOS_DEVICE_PATH_RE = /^\\\\([.?])/; +/** + * All backslashes except those escaping special characters. + * Windows: !()+@{} + * https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions + */ +const WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g; +/** + * Designed to work only with simple paths: `dir\\file`. + */ +function unixify(filepath) { + return filepath.replace(/\\/g, '/'); +} +exports.unixify = unixify; +function makeAbsolute(cwd, filepath) { + return path.resolve(cwd, filepath); +} +exports.makeAbsolute = makeAbsolute; +function removeLeadingDotSegment(entry) { + // We do not use `startsWith` because this is 10x slower than current implementation for some cases. + // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with + if (entry.charAt(0) === '.') { + const secondCharactery = entry.charAt(1); + if (secondCharactery === '/' || secondCharactery === '\\') { + return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); + } + } + return entry; +} +exports.removeLeadingDotSegment = removeLeadingDotSegment; +exports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath; +function escapeWindowsPath(pattern) { + return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2'); +} +exports.escapeWindowsPath = escapeWindowsPath; +function escapePosixPath(pattern) { + return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2'); +} +exports.escapePosixPath = escapePosixPath; +exports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern; +function convertWindowsPathToPattern(filepath) { + return escapeWindowsPath(filepath) + .replace(DOS_DEVICE_PATH_RE, '//$1') + .replace(WINDOWS_BACKSLASHES_RE, '/'); +} +exports.convertWindowsPathToPattern = convertWindowsPathToPattern; +function convertPosixPathToPattern(filepath) { + return escapePosixPath(filepath); +} +exports.convertPosixPathToPattern = convertPosixPathToPattern; diff --git a/node_modules/fast-glob/out/utils/pattern.d.ts b/node_modules/fast-glob/out/utils/pattern.d.ts new file mode 100644 index 0000000..e3598a9 --- /dev/null +++ b/node_modules/fast-glob/out/utils/pattern.d.ts @@ -0,0 +1,49 @@ +import { MicromatchOptions, Pattern, PatternRe } from '../types'; +type PatternTypeOptions = { + braceExpansion?: boolean; + caseSensitiveMatch?: boolean; + extglob?: boolean; +}; +export declare function isStaticPattern(pattern: Pattern, options?: PatternTypeOptions): boolean; +export declare function isDynamicPattern(pattern: Pattern, options?: PatternTypeOptions): boolean; +export declare function convertToPositivePattern(pattern: Pattern): Pattern; +export declare function convertToNegativePattern(pattern: Pattern): Pattern; +export declare function isNegativePattern(pattern: Pattern): boolean; +export declare function isPositivePattern(pattern: Pattern): boolean; +export declare function getNegativePatterns(patterns: Pattern[]): Pattern[]; +export declare function getPositivePatterns(patterns: Pattern[]): Pattern[]; +/** + * Returns patterns that can be applied inside the current directory. + * + * @example + * // ['./*', '*', 'a/*'] + * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) + */ +export declare function getPatternsInsideCurrentDirectory(patterns: Pattern[]): Pattern[]; +/** + * Returns patterns to be expanded relative to (outside) the current directory. + * + * @example + * // ['../*', './../*'] + * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) + */ +export declare function getPatternsOutsideCurrentDirectory(patterns: Pattern[]): Pattern[]; +export declare function isPatternRelatedToParentDirectory(pattern: Pattern): boolean; +export declare function getBaseDirectory(pattern: Pattern): string; +export declare function hasGlobStar(pattern: Pattern): boolean; +export declare function endsWithSlashGlobStar(pattern: Pattern): boolean; +export declare function isAffectDepthOfReadingPattern(pattern: Pattern): boolean; +export declare function expandPatternsWithBraceExpansion(patterns: Pattern[]): Pattern[]; +export declare function expandBraceExpansion(pattern: Pattern): Pattern[]; +export declare function getPatternParts(pattern: Pattern, options: MicromatchOptions): Pattern[]; +export declare function makeRe(pattern: Pattern, options: MicromatchOptions): PatternRe; +export declare function convertPatternsToRe(patterns: Pattern[], options: MicromatchOptions): PatternRe[]; +export declare function matchAny(entry: string, patternsRe: PatternRe[]): boolean; +/** + * This package only works with forward slashes as a path separator. + * Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes. + */ +export declare function removeDuplicateSlashes(pattern: string): string; +export declare function partitionAbsoluteAndRelative(patterns: Pattern[]): Pattern[][]; +export declare function isAbsolute(pattern: string): boolean; +export {}; diff --git a/node_modules/fast-glob/out/utils/pattern.js b/node_modules/fast-glob/out/utils/pattern.js new file mode 100644 index 0000000..b2924e7 --- /dev/null +++ b/node_modules/fast-glob/out/utils/pattern.js @@ -0,0 +1,206 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; +const path = require("path"); +const globParent = require("glob-parent"); +const micromatch = require("micromatch"); +const GLOBSTAR = '**'; +const ESCAPE_SYMBOL = '\\'; +const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; +const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; +const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; +const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; +const BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; +/** + * Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string. + * The latter is due to the presence of the device path at the beginning of the UNC path. + */ +const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; +function isStaticPattern(pattern, options = {}) { + return !isDynamicPattern(pattern, options); +} +exports.isStaticPattern = isStaticPattern; +function isDynamicPattern(pattern, options = {}) { + /** + * A special case with an empty string is necessary for matching patterns that start with a forward slash. + * An empty string cannot be a dynamic pattern. + * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'. + */ + if (pattern === '') { + return false; + } + /** + * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check + * filepath directly (without read directory). + */ + if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { + return true; + } + if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { + return true; + } + if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { + return true; + } + if (options.braceExpansion !== false && hasBraceExpansion(pattern)) { + return true; + } + return false; +} +exports.isDynamicPattern = isDynamicPattern; +function hasBraceExpansion(pattern) { + const openingBraceIndex = pattern.indexOf('{'); + if (openingBraceIndex === -1) { + return false; + } + const closingBraceIndex = pattern.indexOf('}', openingBraceIndex + 1); + if (closingBraceIndex === -1) { + return false; + } + const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex); + return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); +} +function convertToPositivePattern(pattern) { + return isNegativePattern(pattern) ? pattern.slice(1) : pattern; +} +exports.convertToPositivePattern = convertToPositivePattern; +function convertToNegativePattern(pattern) { + return '!' + pattern; +} +exports.convertToNegativePattern = convertToNegativePattern; +function isNegativePattern(pattern) { + return pattern.startsWith('!') && pattern[1] !== '('; +} +exports.isNegativePattern = isNegativePattern; +function isPositivePattern(pattern) { + return !isNegativePattern(pattern); +} +exports.isPositivePattern = isPositivePattern; +function getNegativePatterns(patterns) { + return patterns.filter(isNegativePattern); +} +exports.getNegativePatterns = getNegativePatterns; +function getPositivePatterns(patterns) { + return patterns.filter(isPositivePattern); +} +exports.getPositivePatterns = getPositivePatterns; +/** + * Returns patterns that can be applied inside the current directory. + * + * @example + * // ['./*', '*', 'a/*'] + * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) + */ +function getPatternsInsideCurrentDirectory(patterns) { + return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); +} +exports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; +/** + * Returns patterns to be expanded relative to (outside) the current directory. + * + * @example + * // ['../*', './../*'] + * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) + */ +function getPatternsOutsideCurrentDirectory(patterns) { + return patterns.filter(isPatternRelatedToParentDirectory); +} +exports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; +function isPatternRelatedToParentDirectory(pattern) { + return pattern.startsWith('..') || pattern.startsWith('./..'); +} +exports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; +function getBaseDirectory(pattern) { + return globParent(pattern, { flipBackslashes: false }); +} +exports.getBaseDirectory = getBaseDirectory; +function hasGlobStar(pattern) { + return pattern.includes(GLOBSTAR); +} +exports.hasGlobStar = hasGlobStar; +function endsWithSlashGlobStar(pattern) { + return pattern.endsWith('/' + GLOBSTAR); +} +exports.endsWithSlashGlobStar = endsWithSlashGlobStar; +function isAffectDepthOfReadingPattern(pattern) { + const basename = path.basename(pattern); + return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); +} +exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; +function expandPatternsWithBraceExpansion(patterns) { + return patterns.reduce((collection, pattern) => { + return collection.concat(expandBraceExpansion(pattern)); + }, []); +} +exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; +function expandBraceExpansion(pattern) { + const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true }); + /** + * Sort the patterns by length so that the same depth patterns are processed side by side. + * `a/{b,}/{c,}/*` – `['a///*', 'a/b//*', 'a//c/*', 'a/b/c/*']` + */ + patterns.sort((a, b) => a.length - b.length); + /** + * Micromatch can return an empty string in the case of patterns like `{a,}`. + */ + return patterns.filter((pattern) => pattern !== ''); +} +exports.expandBraceExpansion = expandBraceExpansion; +function getPatternParts(pattern, options) { + let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); + /** + * The scan method returns an empty array in some cases. + * See micromatch/picomatch#58 for more details. + */ + if (parts.length === 0) { + parts = [pattern]; + } + /** + * The scan method does not return an empty part for the pattern with a forward slash. + * This is another part of micromatch/picomatch#58. + */ + if (parts[0].startsWith('/')) { + parts[0] = parts[0].slice(1); + parts.unshift(''); + } + return parts; +} +exports.getPatternParts = getPatternParts; +function makeRe(pattern, options) { + return micromatch.makeRe(pattern, options); +} +exports.makeRe = makeRe; +function convertPatternsToRe(patterns, options) { + return patterns.map((pattern) => makeRe(pattern, options)); +} +exports.convertPatternsToRe = convertPatternsToRe; +function matchAny(entry, patternsRe) { + return patternsRe.some((patternRe) => patternRe.test(entry)); +} +exports.matchAny = matchAny; +/** + * This package only works with forward slashes as a path separator. + * Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes. + */ +function removeDuplicateSlashes(pattern) { + return pattern.replace(DOUBLE_SLASH_RE, '/'); +} +exports.removeDuplicateSlashes = removeDuplicateSlashes; +function partitionAbsoluteAndRelative(patterns) { + const absolute = []; + const relative = []; + for (const pattern of patterns) { + if (isAbsolute(pattern)) { + absolute.push(pattern); + } + else { + relative.push(pattern); + } + } + return [absolute, relative]; +} +exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; +function isAbsolute(pattern) { + return path.isAbsolute(pattern); +} +exports.isAbsolute = isAbsolute; diff --git a/node_modules/fast-glob/out/utils/stream.d.ts b/node_modules/fast-glob/out/utils/stream.d.ts new file mode 100644 index 0000000..4daf913 --- /dev/null +++ b/node_modules/fast-glob/out/utils/stream.d.ts @@ -0,0 +1,4 @@ +/// +/// +import { Readable } from 'stream'; +export declare function merge(streams: Readable[]): NodeJS.ReadableStream; diff --git a/node_modules/fast-glob/out/utils/stream.js b/node_modules/fast-glob/out/utils/stream.js new file mode 100644 index 0000000..b32028c --- /dev/null +++ b/node_modules/fast-glob/out/utils/stream.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.merge = void 0; +const merge2 = require("merge2"); +function merge(streams) { + const mergedStream = merge2(streams); + streams.forEach((stream) => { + stream.once('error', (error) => mergedStream.emit('error', error)); + }); + mergedStream.once('close', () => propagateCloseEventToSources(streams)); + mergedStream.once('end', () => propagateCloseEventToSources(streams)); + return mergedStream; +} +exports.merge = merge; +function propagateCloseEventToSources(streams) { + streams.forEach((stream) => stream.emit('close')); +} diff --git a/node_modules/fast-glob/out/utils/string.d.ts b/node_modules/fast-glob/out/utils/string.d.ts new file mode 100644 index 0000000..c884735 --- /dev/null +++ b/node_modules/fast-glob/out/utils/string.d.ts @@ -0,0 +1,2 @@ +export declare function isString(input: unknown): input is string; +export declare function isEmpty(input: string): boolean; diff --git a/node_modules/fast-glob/out/utils/string.js b/node_modules/fast-glob/out/utils/string.js new file mode 100644 index 0000000..76e7ea5 --- /dev/null +++ b/node_modules/fast-glob/out/utils/string.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isEmpty = exports.isString = void 0; +function isString(input) { + return typeof input === 'string'; +} +exports.isString = isString; +function isEmpty(input) { + return input === ''; +} +exports.isEmpty = isEmpty; diff --git a/node_modules/fast-glob/package.json b/node_modules/fast-glob/package.json new file mode 100644 index 0000000..e910de9 --- /dev/null +++ b/node_modules/fast-glob/package.json @@ -0,0 +1,81 @@ +{ + "name": "fast-glob", + "version": "3.3.3", + "description": "It's a very fast and efficient glob library for Node.js", + "license": "MIT", + "repository": "mrmlnc/fast-glob", + "author": { + "name": "Denis Malinochkin", + "url": "https://mrmlnc.com" + }, + "engines": { + "node": ">=8.6.0" + }, + "main": "out/index.js", + "typings": "out/index.d.ts", + "files": [ + "out", + "!out/{benchmark,tests}", + "!out/**/*.map", + "!out/**/*.spec.*" + ], + "keywords": [ + "glob", + "patterns", + "fast", + "implementation" + ], + "devDependencies": { + "@nodelib/fs.macchiato": "^1.0.1", + "@types/glob-parent": "^5.1.0", + "@types/merge2": "^1.1.4", + "@types/micromatch": "^4.0.0", + "@types/mocha": "^5.2.7", + "@types/node": "^14.18.53", + "@types/picomatch": "^2.3.0", + "@types/sinon": "^7.5.0", + "bencho": "^0.1.1", + "eslint": "^6.5.1", + "eslint-config-mrmlnc": "^1.1.0", + "execa": "^7.1.1", + "fast-glob": "^3.0.4", + "fdir": "6.0.1", + "glob": "^10.0.0", + "hereby": "^1.8.1", + "mocha": "^6.2.1", + "rimraf": "^5.0.0", + "sinon": "^7.5.0", + "snap-shot-it": "^7.9.10", + "typescript": "^4.9.5" + }, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "scripts": { + "clean": "rimraf out", + "lint": "eslint \"src/**/*.ts\" --cache", + "compile": "tsc", + "test": "mocha \"out/**/*.spec.js\" -s 0", + "test:e2e": "mocha \"out/**/*.e2e.js\" -s 0", + "test:e2e:sync": "mocha \"out/**/*.e2e.js\" -s 0 --grep \"\\(sync\\)\"", + "test:e2e:async": "mocha \"out/**/*.e2e.js\" -s 0 --grep \"\\(async\\)\"", + "test:e2e:stream": "mocha \"out/**/*.e2e.js\" -s 0 --grep \"\\(stream\\)\"", + "build": "npm run clean && npm run compile && npm run lint && npm test", + "watch": "npm run clean && npm run compile -- -- --sourceMap --watch", + "bench:async": "npm run bench:product:async && npm run bench:regression:async", + "bench:stream": "npm run bench:product:stream && npm run bench:regression:stream", + "bench:sync": "npm run bench:product:sync && npm run bench:regression:sync", + "bench:product": "npm run bench:product:async && npm run bench:product:sync && npm run bench:product:stream", + "bench:product:async": "hereby bench:product:async", + "bench:product:sync": "hereby bench:product:sync", + "bench:product:stream": "hereby bench:product:stream", + "bench:regression": "npm run bench:regression:async && npm run bench:regression:sync && npm run bench:regression:stream", + "bench:regression:async": "hereby bench:regression:async", + "bench:regression:sync": "hereby bench:regression:sync", + "bench:regression:stream": "hereby bench:regression:stream" + } +} diff --git a/node_modules/fastq/LICENSE b/node_modules/fastq/LICENSE new file mode 100644 index 0000000..27c7bb4 --- /dev/null +++ b/node_modules/fastq/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015-2020, Matteo Collina + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/fastq/README.md b/node_modules/fastq/README.md new file mode 100644 index 0000000..b44cce3 --- /dev/null +++ b/node_modules/fastq/README.md @@ -0,0 +1,310 @@ +# fastq + +![ci][ci-url] +[![npm version][npm-badge]][npm-url] + +Fast, in memory work queue. + +Benchmarks (1 million tasks): + +* setImmediate: 812ms +* fastq: 854ms +* async.queue: 1298ms +* neoAsync.queue: 1249ms + +Obtained on node 12.16.1, on a dedicated server. + +If you need zero-overhead series function call, check out +[fastseries](http://npm.im/fastseries). For zero-overhead parallel +function call, check out [fastparallel](http://npm.im/fastparallel). + + * Installation + * Usage + * API + * Licence & copyright + +## Install + +`npm i fastq --save` + +## Usage (callback API) + +```js +'use strict' + +const queue = require('fastq')(worker, 1) + +queue.push(42, function (err, result) { + if (err) { throw err } + console.log('the result is', result) +}) + +function worker (arg, cb) { + cb(null, arg * 2) +} +``` + +## Usage (promise API) + +```js +const queue = require('fastq').promise(worker, 1) + +async function worker (arg) { + return arg * 2 +} + +async function run () { + const result = await queue.push(42) + console.log('the result is', result) +} + +run() +``` + +### Setting "this" + +```js +'use strict' + +const that = { hello: 'world' } +const queue = require('fastq')(that, worker, 1) + +queue.push(42, function (err, result) { + if (err) { throw err } + console.log(this) + console.log('the result is', result) +}) + +function worker (arg, cb) { + console.log(this) + cb(null, arg * 2) +} +``` + +### Using with TypeScript (callback API) + +```ts +'use strict' + +import * as fastq from "fastq"; +import type { queue, done } from "fastq"; + +type Task = { + id: number +} + +const q: queue = fastq(worker, 1) + +q.push({ id: 42}) + +function worker (arg: Task, cb: done) { + console.log(arg.id) + cb(null) +} +``` + +### Using with TypeScript (promise API) + +```ts +'use strict' + +import * as fastq from "fastq"; +import type { queueAsPromised } from "fastq"; + +type Task = { + id: number +} + +const q: queueAsPromised = fastq.promise(asyncWorker, 1) + +q.push({ id: 42}).catch((err) => console.error(err)) + +async function asyncWorker (arg: Task): Promise { + // No need for a try-catch block, fastq handles errors automatically + console.log(arg.id) +} +``` + +## API + +* fastqueue() +* queue#push() +* queue#unshift() +* queue#pause() +* queue#resume() +* queue#idle() +* queue#length() +* queue#getQueue() +* queue#kill() +* queue#killAndDrain() +* queue#error() +* queue#concurrency +* queue#drain +* queue#empty +* queue#saturated +* fastqueue.promise() + +------------------------------------------------------- + +### fastqueue([that], worker, concurrency) + +Creates a new queue. + +Arguments: + +* `that`, optional context of the `worker` function. +* `worker`, worker function, it would be called with `that` as `this`, + if that is specified. +* `concurrency`, number of concurrent tasks that could be executed in + parallel. + +------------------------------------------------------- + +### queue.push(task, done) + +Add a task at the end of the queue. `done(err, result)` will be called +when the task was processed. + +------------------------------------------------------- + +### queue.unshift(task, done) + +Add a task at the beginning of the queue. `done(err, result)` will be called +when the task was processed. + +------------------------------------------------------- + +### queue.pause() + +Pause the processing of tasks. Currently worked tasks are not +stopped. + +------------------------------------------------------- + +### queue.resume() + +Resume the processing of tasks. + +------------------------------------------------------- + +### queue.idle() + +Returns `false` if there are tasks being processed or waiting to be processed. +`true` otherwise. + +------------------------------------------------------- + +### queue.length() + +Returns the number of tasks waiting to be processed (in the queue). + +------------------------------------------------------- + +### queue.getQueue() + +Returns all the tasks be processed (in the queue). Returns empty array when there are no tasks + +------------------------------------------------------- + +### queue.kill() + +Removes all tasks waiting to be processed, and reset `drain` to an empty +function. + +------------------------------------------------------- + +### queue.killAndDrain() + +Same than `kill` but the `drain` function will be called before reset to empty. + +------------------------------------------------------- + +### queue.error(handler) + +Set a global error handler. `handler(err, task)` will be called +each time a task is completed, `err` will be not null if the task has thrown an error. + +------------------------------------------------------- + +### queue.concurrency + +Property that returns the number of concurrent tasks that could be executed in +parallel. It can be altered at runtime. + +------------------------------------------------------- + +### queue.paused + +Property (Read-Only) that returns `true` when the queue is in a paused state. + +------------------------------------------------------- + +### queue.drain + +Function that will be called when the last +item from the queue has been processed by a worker. +It can be altered at runtime. + +------------------------------------------------------- + +### queue.empty + +Function that will be called when the last +item from the queue has been assigned to a worker. +It can be altered at runtime. + +------------------------------------------------------- + +### queue.saturated + +Function that will be called when the queue hits the concurrency +limit. +It can be altered at runtime. + +------------------------------------------------------- + +### fastqueue.promise([that], worker(arg), concurrency) + +Creates a new queue with `Promise` apis. It also offers all the methods +and properties of the object returned by [`fastqueue`](#fastqueue) with the modified +[`push`](#pushPromise) and [`unshift`](#unshiftPromise) methods. + +Node v10+ is required to use the promisified version. + +Arguments: +* `that`, optional context of the `worker` function. +* `worker`, worker function, it would be called with `that` as `this`, + if that is specified. It MUST return a `Promise`. +* `concurrency`, number of concurrent tasks that could be executed in + parallel. + + +#### queue.push(task) => Promise + +Add a task at the end of the queue. The returned `Promise` will be fulfilled (rejected) +when the task is completed successfully (unsuccessfully). + +This promise could be ignored as it will not lead to a `'unhandledRejection'`. + + +#### queue.unshift(task) => Promise + +Add a task at the beginning of the queue. The returned `Promise` will be fulfilled (rejected) +when the task is completed successfully (unsuccessfully). + +This promise could be ignored as it will not lead to a `'unhandledRejection'`. + + +#### queue.drained() => Promise + +Wait for the queue to be drained. The returned `Promise` will be resolved when all tasks in the queue have been processed by a worker. + +This promise could be ignored as it will not lead to a `'unhandledRejection'`. + +## License + +ISC + +[ci-url]: https://github.com/mcollina/fastq/workflows/ci/badge.svg +[npm-badge]: https://badge.fury.io/js/fastq.svg +[npm-url]: https://badge.fury.io/js/fastq diff --git a/node_modules/fastq/SECURITY.md b/node_modules/fastq/SECURITY.md new file mode 100644 index 0000000..dd9f1d5 --- /dev/null +++ b/node_modules/fastq/SECURITY.md @@ -0,0 +1,15 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 1.x | :white_check_mark: | +| < 1.0 | :x: | + +## Reporting a Vulnerability + +Please report all vulnerabilities at [https://github.com/mcollina/fastq/security](https://github.com/mcollina/fastq/security). diff --git a/node_modules/fastq/bench.js b/node_modules/fastq/bench.js new file mode 100644 index 0000000..4eaa829 --- /dev/null +++ b/node_modules/fastq/bench.js @@ -0,0 +1,66 @@ +'use strict' + +const max = 1000000 +const fastqueue = require('./')(worker, 1) +const { promisify } = require('util') +const immediate = promisify(setImmediate) +const qPromise = require('./').promise(immediate, 1) +const async = require('async') +const neo = require('neo-async') +const asyncqueue = async.queue(worker, 1) +const neoqueue = neo.queue(worker, 1) + +function bench (func, done) { + const key = max + '*' + func.name + let count = -1 + + console.time(key) + end() + + function end () { + if (++count < max) { + func(end) + } else { + console.timeEnd(key) + if (done) { + done() + } + } + } +} + +function benchFastQ (done) { + fastqueue.push(42, done) +} + +function benchAsyncQueue (done) { + asyncqueue.push(42, done) +} + +function benchNeoQueue (done) { + neoqueue.push(42, done) +} + +function worker (arg, cb) { + setImmediate(cb) +} + +function benchSetImmediate (cb) { + worker(42, cb) +} + +function benchFastQPromise (done) { + qPromise.push(42).then(function () { done() }, done) +} + +function runBench (done) { + async.eachSeries([ + benchSetImmediate, + benchFastQ, + benchNeoQueue, + benchAsyncQueue, + benchFastQPromise + ], bench, done) +} + +runBench(runBench) diff --git a/node_modules/fastq/eslint.config.js b/node_modules/fastq/eslint.config.js new file mode 100644 index 0000000..57482db --- /dev/null +++ b/node_modules/fastq/eslint.config.js @@ -0,0 +1,11 @@ +const neostandard = require('neostandard') + +module.exports = [ + ...neostandard(), + { + name: 'node-0.10-compatibility', + rules: { + 'object-shorthand': 'off' // Disable ES6 object shorthand for Node.js 0.10 compatibility + } + } +] diff --git a/node_modules/fastq/example.js b/node_modules/fastq/example.js new file mode 100644 index 0000000..665fdc8 --- /dev/null +++ b/node_modules/fastq/example.js @@ -0,0 +1,14 @@ +'use strict' + +/* eslint-disable no-var */ + +var queue = require('./')(worker, 1) + +queue.push(42, function (err, result) { + if (err) { throw err } + console.log('the result is', result) +}) + +function worker (arg, cb) { + cb(null, 42 * 2) +} diff --git a/node_modules/fastq/example.mjs b/node_modules/fastq/example.mjs new file mode 100644 index 0000000..f31364a --- /dev/null +++ b/node_modules/fastq/example.mjs @@ -0,0 +1,9 @@ +import { promise as queueAsPromised } from './queue.js' + +const queue = queueAsPromised(worker, 1) + +console.log('the result is', await queue.push(42)) + +async function worker (arg) { + return 42 * 2 +} diff --git a/node_modules/fastq/index.d.ts b/node_modules/fastq/index.d.ts new file mode 100644 index 0000000..262dd04 --- /dev/null +++ b/node_modules/fastq/index.d.ts @@ -0,0 +1,59 @@ +declare function fastq(context: C, worker: fastq.worker, concurrency: number): fastq.queue +declare function fastq(worker: fastq.worker, concurrency: number): fastq.queue + +declare namespace fastq { + type worker = (this: C, task: T, cb: fastq.done) => void + type asyncWorker = (this: C, task: T) => Promise + type done = (err: Error | null, result?: R) => void + type errorHandler = (err: Error, task: T) => void + + interface queue { + /** Add a task at the end of the queue. `done(err, result)` will be called when the task was processed. */ + push(task: T, done?: done): void + /** Add a task at the beginning of the queue. `done(err, result)` will be called when the task was processed. */ + unshift(task: T, done?: done): void + /** Pause the processing of tasks. Currently worked tasks are not stopped. */ + pause(): any + /** Resume the processing of tasks. */ + resume(): any + running(): number + /** Returns `false` if there are tasks being processed or waiting to be processed. `true` otherwise. */ + idle(): boolean + /** Returns the number of tasks waiting to be processed (in the queue). */ + length(): number + /** Returns all the tasks be processed (in the queue). Returns empty array when there are no tasks */ + getQueue(): T[] + /** Removes all tasks waiting to be processed, and reset `drain` to an empty function. */ + kill(): any + /** Same than `kill` but the `drain` function will be called before reset to empty. */ + killAndDrain(): any + /** Removes all tasks waiting to be processed, calls each task's callback with an abort error (rejects promises for promise-based queues), and resets `drain` to an empty function. */ + abort(): any + /** Set a global error handler. `handler(err, task)` will be called each time a task is completed, `err` will be not null if the task has thrown an error. */ + error(handler: errorHandler): void + /** Property that returns the number of concurrent tasks that could be executed in parallel. It can be altered at runtime. */ + concurrency: number + /** Property (Read-Only) that returns `true` when the queue is in a paused state. */ + readonly paused: boolean + /** Function that will be called when the last item from the queue has been processed by a worker. It can be altered at runtime. */ + drain(): any + /** Function that will be called when the last item from the queue has been assigned to a worker. It can be altered at runtime. */ + empty: () => void + /** Function that will be called when the queue hits the concurrency limit. It can be altered at runtime. */ + saturated: () => void + } + + interface queueAsPromised extends queue { + /** Add a task at the end of the queue. The returned `Promise` will be fulfilled (rejected) when the task is completed successfully (unsuccessfully). */ + push(task: T): Promise + /** Add a task at the beginning of the queue. The returned `Promise` will be fulfilled (rejected) when the task is completed successfully (unsuccessfully). */ + unshift(task: T): Promise + /** Wait for the queue to be drained. The returned `Promise` will be resolved when all tasks in the queue have been processed by a worker. */ + drained(): Promise + } + + function promise(context: C, worker: fastq.asyncWorker, concurrency: number): fastq.queueAsPromised + function promise(worker: fastq.asyncWorker, concurrency: number): fastq.queueAsPromised +} + +export = fastq diff --git a/node_modules/fastq/package.json b/node_modules/fastq/package.json new file mode 100644 index 0000000..9e1d9dd --- /dev/null +++ b/node_modules/fastq/package.json @@ -0,0 +1,49 @@ +{ + "name": "fastq", + "version": "1.20.1", + "description": "Fast, in memory work queue", + "main": "queue.js", + "type": "commonjs", + "scripts": { + "lint": "eslint .", + "unit": "nyc --lines 100 --branches 100 --functions 100 --check-coverage --reporter=text tape test/test.js test/promise.js", + "coverage": "nyc --reporter=html --reporter=cobertura --reporter=text tape test/test.js test/promise.js", + "test:report": "npm run lint && npm run unit:report", + "test": "npm run lint && npm run unit", + "typescript": "tsc --project ./test/tsconfig.json", + "legacy": "tape test/test.js" + }, + "pre-commit": [ + "test", + "typescript" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/mcollina/fastq.git" + }, + "keywords": [ + "fast", + "queue", + "async", + "worker" + ], + "author": "Matteo Collina ", + "license": "ISC", + "bugs": { + "url": "https://github.com/mcollina/fastq/issues" + }, + "homepage": "https://github.com/mcollina/fastq#readme", + "devDependencies": { + "async": "^3.1.0", + "eslint": "^9.36.0", + "neo-async": "^2.6.1", + "neostandard": "^0.12.2", + "nyc": "^17.0.0", + "pre-commit": "^1.2.2", + "tape": "^5.0.0", + "typescript": "^5.0.4" + }, + "dependencies": { + "reusify": "^1.0.4" + } +} diff --git a/node_modules/fastq/queue.js b/node_modules/fastq/queue.js new file mode 100644 index 0000000..d0fbf20 --- /dev/null +++ b/node_modules/fastq/queue.js @@ -0,0 +1,346 @@ +'use strict' + +/* eslint-disable no-var */ + +var reusify = require('reusify') + +function fastqueue (context, worker, _concurrency) { + if (typeof context === 'function') { + _concurrency = worker + worker = context + context = null + } + + if (!(_concurrency >= 1)) { + throw new Error('fastqueue concurrency must be equal to or greater than 1') + } + + var cache = reusify(Task) + var queueHead = null + var queueTail = null + var _running = 0 + var errorHandler = null + + var self = { + push: push, + drain: noop, + saturated: noop, + pause: pause, + paused: false, + + get concurrency () { + return _concurrency + }, + set concurrency (value) { + if (!(value >= 1)) { + throw new Error('fastqueue concurrency must be equal to or greater than 1') + } + _concurrency = value + + if (self.paused) return + for (; queueHead && _running < _concurrency;) { + _running++ + release() + } + }, + + running: running, + resume: resume, + idle: idle, + length: length, + getQueue: getQueue, + unshift: unshift, + empty: noop, + kill: kill, + killAndDrain: killAndDrain, + error: error, + abort: abort + } + + return self + + function running () { + return _running + } + + function pause () { + self.paused = true + } + + function length () { + var current = queueHead + var counter = 0 + + while (current) { + current = current.next + counter++ + } + + return counter + } + + function getQueue () { + var current = queueHead + var tasks = [] + + while (current) { + tasks.push(current.value) + current = current.next + } + + return tasks + } + + function resume () { + if (!self.paused) return + self.paused = false + if (queueHead === null) { + _running++ + release() + return + } + for (; queueHead && _running < _concurrency;) { + _running++ + release() + } + } + + function idle () { + return _running === 0 && self.length() === 0 + } + + function push (value, done) { + var current = cache.get() + + current.context = context + current.release = release + current.value = value + current.callback = done || noop + current.errorHandler = errorHandler + + if (_running >= _concurrency || self.paused) { + if (queueTail) { + queueTail.next = current + queueTail = current + } else { + queueHead = current + queueTail = current + self.saturated() + } + } else { + _running++ + worker.call(context, current.value, current.worked) + } + } + + function unshift (value, done) { + var current = cache.get() + + current.context = context + current.release = release + current.value = value + current.callback = done || noop + current.errorHandler = errorHandler + + if (_running >= _concurrency || self.paused) { + if (queueHead) { + current.next = queueHead + queueHead = current + } else { + queueHead = current + queueTail = current + self.saturated() + } + } else { + _running++ + worker.call(context, current.value, current.worked) + } + } + + function release (holder) { + if (holder) { + cache.release(holder) + } + var next = queueHead + if (next && _running <= _concurrency) { + if (!self.paused) { + if (queueTail === queueHead) { + queueTail = null + } + queueHead = next.next + next.next = null + worker.call(context, next.value, next.worked) + if (queueTail === null) { + self.empty() + } + } else { + _running-- + } + } else if (--_running === 0) { + self.drain() + } + } + + function kill () { + queueHead = null + queueTail = null + self.drain = noop + } + + function killAndDrain () { + queueHead = null + queueTail = null + self.drain() + self.drain = noop + } + + function abort () { + var current = queueHead + queueHead = null + queueTail = null + + while (current) { + var next = current.next + var callback = current.callback + var errorHandler = current.errorHandler + var val = current.value + var context = current.context + + // Reset the task state + current.value = null + current.callback = noop + current.errorHandler = null + + // Call error handler if present + if (errorHandler) { + errorHandler(new Error('abort'), val) + } + + // Call callback with error + callback.call(context, new Error('abort')) + + // Release the task back to the pool + current.release(current) + + current = next + } + + self.drain = noop + } + + function error (handler) { + errorHandler = handler + } +} + +function noop () {} + +function Task () { + this.value = null + this.callback = noop + this.next = null + this.release = noop + this.context = null + this.errorHandler = null + + var self = this + + this.worked = function worked (err, result) { + var callback = self.callback + var errorHandler = self.errorHandler + var val = self.value + self.value = null + self.callback = noop + if (self.errorHandler) { + errorHandler(err, val) + } + callback.call(self.context, err, result) + self.release(self) + } +} + +function queueAsPromised (context, worker, _concurrency) { + if (typeof context === 'function') { + _concurrency = worker + worker = context + context = null + } + + function asyncWrapper (arg, cb) { + worker.call(this, arg) + .then(function (res) { + cb(null, res) + }, cb) + } + + var queue = fastqueue(context, asyncWrapper, _concurrency) + + var pushCb = queue.push + var unshiftCb = queue.unshift + + queue.push = push + queue.unshift = unshift + queue.drained = drained + + return queue + + function push (value) { + var p = new Promise(function (resolve, reject) { + pushCb(value, function (err, result) { + if (err) { + reject(err) + return + } + resolve(result) + }) + }) + + // Let's fork the promise chain to + // make the error bubble up to the user but + // not lead to a unhandledRejection + p.catch(noop) + + return p + } + + function unshift (value) { + var p = new Promise(function (resolve, reject) { + unshiftCb(value, function (err, result) { + if (err) { + reject(err) + return + } + resolve(result) + }) + }) + + // Let's fork the promise chain to + // make the error bubble up to the user but + // not lead to a unhandledRejection + p.catch(noop) + + return p + } + + function drained () { + var p = new Promise(function (resolve) { + process.nextTick(function () { + if (queue.idle()) { + resolve() + } else { + var previousDrain = queue.drain + queue.drain = function () { + if (typeof previousDrain === 'function') previousDrain() + resolve() + queue.drain = previousDrain + } + } + }) + }) + + return p + } +} + +module.exports = fastqueue +module.exports.promise = queueAsPromised diff --git a/node_modules/fastq/test/example.ts b/node_modules/fastq/test/example.ts new file mode 100644 index 0000000..a47d441 --- /dev/null +++ b/node_modules/fastq/test/example.ts @@ -0,0 +1,83 @@ +import * as fastq from '../' +import { promise as queueAsPromised } from '../' + +// Basic example + +const queue = fastq(worker, 1) + +queue.push('world', (err, result) => { + if (err) throw err + console.log('the result is', result) +}) + +queue.push('push without cb') + +queue.concurrency + +queue.drain() + +queue.empty = () => undefined + +console.log('the queue tasks are', queue.getQueue()) + +queue.idle() + +queue.kill() + +queue.killAndDrain() + +queue.length + +queue.pause() + +queue.resume() + +queue.running() + +queue.saturated = () => undefined + +queue.unshift('world', (err, result) => { + if (err) throw err + console.log('the result is', result) +}) + +queue.unshift('unshift without cb') + +function worker(task: any, cb: fastq.done) { + cb(null, 'hello ' + task) +} + +// Generics example + +interface GenericsContext { + base: number; +} + +const genericsQueue = fastq({ base: 6 }, genericsWorker, 1) + +genericsQueue.push(7, (err, done) => { + if (err) throw err + console.log('the result is', done) +}) + +genericsQueue.unshift(7, (err, done) => { + if (err) throw err + console.log('the result is', done) +}) + +function genericsWorker(this: GenericsContext, task: number, cb: fastq.done) { + cb(null, 'the meaning of life is ' + (this.base * task)) +} + +const queue2 = queueAsPromised(asyncWorker, 1) + +async function asyncWorker(task: any) { + return 'hello ' + task +} + +async function run () { + await queue.push(42) + await queue.unshift(42) +} + +run() diff --git a/node_modules/fastq/test/promise.js b/node_modules/fastq/test/promise.js new file mode 100644 index 0000000..b425fda --- /dev/null +++ b/node_modules/fastq/test/promise.js @@ -0,0 +1,325 @@ +'use strict' + +const test = require('tape') +const buildQueue = require('../').promise +const { promisify } = require('util') +const sleep = promisify(setTimeout) +const immediate = promisify(setImmediate) + +test('concurrency', function (t) { + t.plan(2) + t.throws(buildQueue.bind(null, worker, 0)) + t.doesNotThrow(buildQueue.bind(null, worker, 1)) + + async function worker (arg) { + return true + } +}) + +test('worker execution', async function (t) { + const queue = buildQueue(worker, 1) + + const result = await queue.push(42) + + t.equal(result, true, 'result matches') + + async function worker (arg) { + t.equal(arg, 42) + return true + } +}) + +test('limit', async function (t) { + const queue = buildQueue(worker, 1) + + const [res1, res2] = await Promise.all([queue.push(10), queue.push(0)]) + t.equal(res1, 10, 'the result matches') + t.equal(res2, 0, 'the result matches') + + async function worker (arg) { + await sleep(arg) + return arg + } +}) + +test('multiple executions', async function (t) { + const queue = buildQueue(worker, 1) + const toExec = [1, 2, 3, 4, 5] + const expected = ['a', 'b', 'c', 'd', 'e'] + let count = 0 + + await Promise.all(toExec.map(async function (task, i) { + const result = await queue.push(task) + t.equal(result, expected[i], 'the result matches') + })) + + async function worker (arg) { + t.equal(arg, toExec[count], 'arg matches') + return expected[count++] + } +}) + +test('drained', async function (t) { + const queue = buildQueue(worker, 2) + + const toExec = new Array(10).fill(10) + let count = 0 + + async function worker (arg) { + await sleep(arg) + count++ + } + + toExec.forEach(function (i) { + queue.push(i) + }) + + await queue.drained() + + t.equal(count, toExec.length) + + toExec.forEach(function (i) { + queue.push(i) + }) + + await queue.drained() + + t.equal(count, toExec.length * 2) +}) + +test('drained with exception should not throw', async function (t) { + const queue = buildQueue(worker, 2) + + const toExec = new Array(10).fill(10) + + async function worker () { + throw new Error('foo') + } + + toExec.forEach(function (i) { + queue.push(i) + }) + + await queue.drained() +}) + +test('drained with drain function', async function (t) { + let drainCalled = false + const queue = buildQueue(worker, 2) + + queue.drain = function () { + drainCalled = true + } + + const toExec = new Array(10).fill(10) + let count = 0 + + async function worker (arg) { + await sleep(arg) + count++ + } + + toExec.forEach(function () { + queue.push() + }) + + await queue.drained() + + t.equal(count, toExec.length) + t.equal(drainCalled, true) +}) + +test('drained while idle should resolve', async function (t) { + const queue = buildQueue(worker, 2) + + async function worker (arg) { + await sleep(arg) + } + + await queue.drained() +}) + +test('drained while idle should not call the drain function', async function (t) { + let drainCalled = false + const queue = buildQueue(worker, 2) + + queue.drain = function () { + drainCalled = true + } + + async function worker (arg) { + await sleep(arg) + } + + await queue.drained() + + t.equal(drainCalled, false) +}) + +test('set this', async function (t) { + t.plan(1) + const that = {} + const queue = buildQueue(that, worker, 1) + + await queue.push(42) + + async function worker (arg) { + t.equal(this, that, 'this matches') + } +}) + +test('unshift', async function (t) { + const queue = buildQueue(worker, 1) + const expected = [1, 2, 3, 4] + + await Promise.all([ + queue.push(1), + queue.push(4), + queue.unshift(3), + queue.unshift(2) + ]) + + t.is(expected.length, 0) + + async function worker (arg) { + t.equal(expected.shift(), arg, 'tasks come in order') + } +}) + +test('push with worker throwing error', async function (t) { + t.plan(5) + const q = buildQueue(async function (task, cb) { + throw new Error('test error') + }, 1) + q.error(function (err, task) { + t.ok(err instanceof Error, 'global error handler should catch the error') + t.match(err.message, /test error/, 'error message should be "test error"') + t.equal(task, 42, 'The task executed should be passed') + }) + try { + await q.push(42) + } catch (err) { + t.ok(err instanceof Error, 'push callback should catch the error') + t.match(err.message, /test error/, 'error message should be "test error"') + } +}) + +test('unshift with worker throwing error', async function (t) { + t.plan(2) + const q = buildQueue(async function (task, cb) { + throw new Error('test error') + }, 1) + try { + await q.unshift(42) + } catch (err) { + t.ok(err instanceof Error, 'push callback should catch the error') + t.match(err.message, /test error/, 'error message should be "test error"') + } +}) + +test('no unhandledRejection (push)', async function (t) { + function handleRejection () { + t.fail('unhandledRejection') + } + process.once('unhandledRejection', handleRejection) + const q = buildQueue(async function (task, cb) { + throw new Error('test error') + }, 1) + + q.push(42) + + await immediate() + process.removeListener('unhandledRejection', handleRejection) +}) + +test('no unhandledRejection (unshift)', async function (t) { + function handleRejection () { + t.fail('unhandledRejection') + } + process.once('unhandledRejection', handleRejection) + const q = buildQueue(async function (task, cb) { + throw new Error('test error') + }, 1) + + q.unshift(42) + + await immediate() + process.removeListener('unhandledRejection', handleRejection) +}) + +test('drained should resolve after async tasks complete', async function (t) { + const logs = [] + + async function processTask () { + await new Promise(resolve => setTimeout(resolve, 0)) + logs.push('processed') + } + + const queue = buildQueue(processTask, 1) + queue.drain = () => logs.push('called drain') + + queue.drained().then(() => logs.push('drained promise resolved')) + + await Promise.all([ + queue.push(), + queue.push(), + queue.push() + ]) + + t.deepEqual(logs, [ + 'processed', + 'processed', + 'processed', + 'called drain', + 'drained promise resolved' + ], 'events happened in correct order') +}) + +test('drained should handle undefined drain function', async function (t) { + const queue = buildQueue(worker, 1) + + async function worker (arg) { + await sleep(10) + return arg + } + + queue.drain = undefined + queue.push(1) + await queue.drained() + + t.pass('drained resolved successfully with undefined drain') +}) + +test('abort rejects all pending promises', async function (t) { + const queue = buildQueue(worker, 1) + const promises = [] + let rejectedCount = 0 + + // Pause queue to prevent tasks from starting + queue.pause() + + for (let i = 0; i < 10; i++) { + promises.push(queue.push(i)) + } + + queue.abort() + + // All promises should be rejected + for (const promise of promises) { + try { + await promise + t.fail('promise should have been rejected') + } catch (err) { + t.equal(err.message, 'abort', 'error message is abort') + rejectedCount++ + } + } + + t.equal(rejectedCount, 10, 'all promises were rejected') + t.equal(queue.length(), 0, 'queue is empty') + + async function worker (arg) { + await sleep(500) + return arg + } +}) diff --git a/node_modules/fastq/test/test.js b/node_modules/fastq/test/test.js new file mode 100644 index 0000000..37e211e --- /dev/null +++ b/node_modules/fastq/test/test.js @@ -0,0 +1,733 @@ +'use strict' + +/* eslint-disable no-var */ + +var test = require('tape') +var buildQueue = require('../') + +test('concurrency', function (t) { + t.plan(6) + t.throws(buildQueue.bind(null, worker, 0)) + t.throws(buildQueue.bind(null, worker, NaN)) + t.doesNotThrow(buildQueue.bind(null, worker, 1)) + + var queue = buildQueue(worker, 1) + t.throws(function () { + queue.concurrency = 0 + }) + t.throws(function () { + queue.concurrency = NaN + }) + t.doesNotThrow(function () { + queue.concurrency = 2 + }) + + function worker (arg, cb) { + cb(null, true) + } +}) + +test('worker execution', function (t) { + t.plan(3) + + var queue = buildQueue(worker, 1) + + queue.push(42, function (err, result) { + t.error(err, 'no error') + t.equal(result, true, 'result matches') + }) + + function worker (arg, cb) { + t.equal(arg, 42) + cb(null, true) + } +}) + +test('limit', function (t) { + t.plan(4) + + var expected = [10, 0] + var queue = buildQueue(worker, 1) + + queue.push(10, result) + queue.push(0, result) + + function result (err, arg) { + t.error(err, 'no error') + t.equal(arg, expected.shift(), 'the result matches') + } + + function worker (arg, cb) { + setTimeout(cb, arg, null, arg) + } +}) + +test('multiple executions', function (t) { + t.plan(15) + + var queue = buildQueue(worker, 1) + var toExec = [1, 2, 3, 4, 5] + var count = 0 + + toExec.forEach(function (task) { + queue.push(task, done) + }) + + function done (err, result) { + t.error(err, 'no error') + t.equal(result, toExec[count - 1], 'the result matches') + } + + function worker (arg, cb) { + t.equal(arg, toExec[count], 'arg matches') + count++ + setImmediate(cb, null, arg) + } +}) + +test('multiple executions, one after another', function (t) { + t.plan(15) + + var queue = buildQueue(worker, 1) + var toExec = [1, 2, 3, 4, 5] + var count = 0 + + queue.push(toExec[0], done) + + function done (err, result) { + t.error(err, 'no error') + t.equal(result, toExec[count - 1], 'the result matches') + if (count < toExec.length) { + queue.push(toExec[count], done) + } + } + + function worker (arg, cb) { + t.equal(arg, toExec[count], 'arg matches') + count++ + setImmediate(cb, null, arg) + } +}) + +test('set this', function (t) { + t.plan(3) + + var that = {} + var queue = buildQueue(that, worker, 1) + + queue.push(42, function (err, result) { + t.error(err, 'no error') + t.equal(this, that, 'this matches') + }) + + function worker (arg, cb) { + t.equal(this, that, 'this matches') + cb(null, true) + } +}) + +test('drain', function (t) { + t.plan(4) + + var queue = buildQueue(worker, 1) + var worked = false + + queue.push(42, function (err, result) { + t.error(err, 'no error') + t.equal(result, true, 'result matches') + }) + + queue.drain = function () { + t.equal(true, worked, 'drained') + } + + function worker (arg, cb) { + t.equal(arg, 42) + worked = true + setImmediate(cb, null, true) + } +}) + +test('pause && resume', function (t) { + t.plan(13) + + var queue = buildQueue(worker, 1) + var worked = false + var expected = [42, 24] + + t.notOk(queue.paused, 'it should not be paused') + + queue.pause() + + queue.push(42, function (err, result) { + t.error(err, 'no error') + t.equal(result, true, 'result matches') + }) + + queue.push(24, function (err, result) { + t.error(err, 'no error') + t.equal(result, true, 'result matches') + }) + + t.notOk(worked, 'it should be paused') + t.ok(queue.paused, 'it should be paused') + + queue.resume() + queue.pause() + queue.resume() + queue.resume() // second resume is a no-op + + function worker (arg, cb) { + t.notOk(queue.paused, 'it should not be paused') + t.ok(queue.running() <= queue.concurrency, 'should respect the concurrency') + t.equal(arg, expected.shift()) + worked = true + process.nextTick(function () { cb(null, true) }) + } +}) + +test('pause in flight && resume', function (t) { + t.plan(16) + + var queue = buildQueue(worker, 1) + var expected = [42, 24, 12] + + t.notOk(queue.paused, 'it should not be paused') + + queue.push(42, function (err, result) { + t.error(err, 'no error') + t.equal(result, true, 'result matches') + t.ok(queue.paused, 'it should be paused') + process.nextTick(function () { + queue.resume() + queue.pause() + queue.resume() + }) + }) + + queue.push(24, function (err, result) { + t.error(err, 'no error') + t.equal(result, true, 'result matches') + t.notOk(queue.paused, 'it should not be paused') + }) + + queue.push(12, function (err, result) { + t.error(err, 'no error') + t.equal(result, true, 'result matches') + t.notOk(queue.paused, 'it should not be paused') + }) + + queue.pause() + + function worker (arg, cb) { + t.ok(queue.running() <= queue.concurrency, 'should respect the concurrency') + t.equal(arg, expected.shift()) + process.nextTick(function () { cb(null, true) }) + } +}) + +test('altering concurrency', function (t) { + t.plan(24) + + var queue = buildQueue(worker, 1) + + queue.push(24, workDone) + queue.push(24, workDone) + queue.push(24, workDone) + + queue.pause() + + queue.concurrency = 3 // concurrency changes are ignored while paused + queue.concurrency = 2 + + queue.resume() + + t.equal(queue.running(), 2, '2 jobs running') + + queue.concurrency = 3 + + t.equal(queue.running(), 3, '3 jobs running') + + queue.concurrency = 1 + + t.equal(queue.running(), 3, '3 jobs running') // running jobs can't be killed + + queue.push(24, workDone) + queue.push(24, workDone) + queue.push(24, workDone) + queue.push(24, workDone) + + function workDone (err, result) { + t.error(err, 'no error') + t.equal(result, true, 'result matches') + } + + function worker (arg, cb) { + t.ok(queue.running() <= queue.concurrency, 'should respect the concurrency') + setImmediate(function () { + cb(null, true) + }) + } +}) + +test('idle()', function (t) { + t.plan(12) + + var queue = buildQueue(worker, 1) + + t.ok(queue.idle(), 'queue is idle') + + queue.push(42, function (err, result) { + t.error(err, 'no error') + t.equal(result, true, 'result matches') + t.notOk(queue.idle(), 'queue is not idle') + }) + + queue.push(42, function (err, result) { + t.error(err, 'no error') + t.equal(result, true, 'result matches') + // it will go idle after executing this function + setImmediate(function () { + t.ok(queue.idle(), 'queue is now idle') + }) + }) + + t.notOk(queue.idle(), 'queue is not idle') + + function worker (arg, cb) { + t.notOk(queue.idle(), 'queue is not idle') + t.equal(arg, 42) + setImmediate(cb, null, true) + } +}) + +test('saturated', function (t) { + t.plan(9) + + var queue = buildQueue(worker, 1) + var preworked = 0 + var worked = 0 + + queue.saturated = function () { + t.pass('saturated') + t.equal(preworked, 1, 'started 1 task') + t.equal(worked, 0, 'worked zero task') + } + + queue.push(42, done) + queue.push(42, done) + + function done (err, result) { + t.error(err, 'no error') + t.equal(result, true, 'result matches') + } + + function worker (arg, cb) { + t.equal(arg, 42) + preworked++ + setImmediate(function () { + worked++ + cb(null, true) + }) + } +}) + +test('length', function (t) { + t.plan(7) + + var queue = buildQueue(worker, 1) + + t.equal(queue.length(), 0, 'nothing waiting') + queue.push(42, done) + t.equal(queue.length(), 0, 'nothing waiting') + queue.push(42, done) + t.equal(queue.length(), 1, 'one task waiting') + queue.push(42, done) + t.equal(queue.length(), 2, 'two tasks waiting') + + function done (err, result) { + t.error(err, 'no error') + } + + function worker (arg, cb) { + setImmediate(function () { + cb(null, true) + }) + } +}) + +test('getQueue', function (t) { + t.plan(10) + + var queue = buildQueue(worker, 1) + + t.equal(queue.getQueue().length, 0, 'nothing waiting') + queue.push(42, done) + t.equal(queue.getQueue().length, 0, 'nothing waiting') + queue.push(42, done) + t.equal(queue.getQueue().length, 1, 'one task waiting') + t.equal(queue.getQueue()[0], 42, 'should be equal') + queue.push(43, done) + t.equal(queue.getQueue().length, 2, 'two tasks waiting') + t.equal(queue.getQueue()[0], 42, 'should be equal') + t.equal(queue.getQueue()[1], 43, 'should be equal') + + function done (err, result) { + t.error(err, 'no error') + } + + function worker (arg, cb) { + setImmediate(function () { + cb(null, true) + }) + } +}) + +test('unshift', function (t) { + t.plan(8) + + var queue = buildQueue(worker, 1) + var expected = [1, 2, 3, 4] + + queue.push(1, done) + queue.push(4, done) + queue.unshift(3, done) + queue.unshift(2, done) + + function done (err, result) { + t.error(err, 'no error') + } + + function worker (arg, cb) { + t.equal(expected.shift(), arg, 'tasks come in order') + setImmediate(function () { + cb(null, true) + }) + } +}) + +test('unshift && empty', function (t) { + t.plan(2) + + var queue = buildQueue(worker, 1) + var completed = false + + queue.pause() + + queue.empty = function () { + t.notOk(completed, 'the task has not completed yet') + } + + queue.unshift(1, done) + + queue.resume() + + function done (err, result) { + completed = true + t.error(err, 'no error') + } + + function worker (arg, cb) { + setImmediate(function () { + cb(null, true) + }) + } +}) + +test('push && empty', function (t) { + t.plan(2) + + var queue = buildQueue(worker, 1) + var completed = false + + queue.pause() + + queue.empty = function () { + t.notOk(completed, 'the task has not completed yet') + } + + queue.push(1, done) + + queue.resume() + + function done (err, result) { + completed = true + t.error(err, 'no error') + } + + function worker (arg, cb) { + setImmediate(function () { + cb(null, true) + }) + } +}) + +test('kill', function (t) { + t.plan(5) + + var queue = buildQueue(worker, 1) + var expected = [1] + + var predrain = queue.drain + + queue.drain = function drain () { + t.fail('drain should never be called') + } + + queue.push(1, done) + queue.push(4, done) + queue.unshift(3, done) + queue.unshift(2, done) + queue.kill() + + function done (err, result) { + t.error(err, 'no error') + setImmediate(function () { + t.equal(queue.length(), 0, 'no queued tasks') + t.equal(queue.running(), 0, 'no running tasks') + t.equal(queue.drain, predrain, 'drain is back to default') + }) + } + + function worker (arg, cb) { + t.equal(expected.shift(), arg, 'tasks come in order') + setImmediate(function () { + cb(null, true) + }) + } +}) + +test('killAndDrain', function (t) { + t.plan(6) + + var queue = buildQueue(worker, 1) + var expected = [1] + + var predrain = queue.drain + + queue.drain = function drain () { + t.pass('drain has been called') + } + + queue.push(1, done) + queue.push(4, done) + queue.unshift(3, done) + queue.unshift(2, done) + queue.killAndDrain() + + function done (err, result) { + t.error(err, 'no error') + setImmediate(function () { + t.equal(queue.length(), 0, 'no queued tasks') + t.equal(queue.running(), 0, 'no running tasks') + t.equal(queue.drain, predrain, 'drain is back to default') + }) + } + + function worker (arg, cb) { + t.equal(expected.shift(), arg, 'tasks come in order') + setImmediate(function () { + cb(null, true) + }) + } +}) + +test('pause && idle', function (t) { + t.plan(11) + + var queue = buildQueue(worker, 1) + var worked = false + + t.notOk(queue.paused, 'it should not be paused') + t.ok(queue.idle(), 'should be idle') + + queue.pause() + + queue.push(42, function (err, result) { + t.error(err, 'no error') + t.equal(result, true, 'result matches') + }) + + t.notOk(worked, 'it should be paused') + t.ok(queue.paused, 'it should be paused') + t.notOk(queue.idle(), 'should not be idle') + + queue.resume() + + t.notOk(queue.paused, 'it should not be paused') + t.notOk(queue.idle(), 'it should not be idle') + + function worker (arg, cb) { + t.equal(arg, 42) + worked = true + process.nextTick(cb.bind(null, null, true)) + process.nextTick(function () { + t.ok(queue.idle(), 'is should be idle') + }) + } +}) + +test('push without cb', function (t) { + t.plan(1) + + var queue = buildQueue(worker, 1) + + queue.push(42) + + function worker (arg, cb) { + t.equal(arg, 42) + cb() + } +}) + +test('unshift without cb', function (t) { + t.plan(1) + + var queue = buildQueue(worker, 1) + + queue.unshift(42) + + function worker (arg, cb) { + t.equal(arg, 42) + cb() + } +}) + +test('push with worker throwing error', function (t) { + t.plan(5) + var q = buildQueue(function (task, cb) { + cb(new Error('test error'), null) + }, 1) + q.error(function (err, task) { + t.ok(err instanceof Error, 'global error handler should catch the error') + t.match(err.message, /test error/, 'error message should be "test error"') + t.equal(task, 42, 'The task executed should be passed') + }) + q.push(42, function (err) { + t.ok(err instanceof Error, 'push callback should catch the error') + t.match(err.message, /test error/, 'error message should be "test error"') + }) +}) + +test('unshift with worker throwing error', function (t) { + t.plan(5) + var q = buildQueue(function (task, cb) { + cb(new Error('test error'), null) + }, 1) + q.error(function (err, task) { + t.ok(err instanceof Error, 'global error handler should catch the error') + t.match(err.message, /test error/, 'error message should be "test error"') + t.equal(task, 42, 'The task executed should be passed') + }) + q.unshift(42, function (err) { + t.ok(err instanceof Error, 'unshift callback should catch the error') + t.match(err.message, /test error/, 'error message should be "test error"') + }) +}) + +test('pause/resume should trigger drain event', function (t) { + t.plan(1) + + var queue = buildQueue(worker, 1) + queue.pause() + queue.drain = function () { + t.pass('drain should be called') + } + + function worker (arg, cb) { + cb(null, true) + } + + queue.resume() +}) + +test('paused flag', function (t) { + t.plan(2) + + var queue = buildQueue(function (arg, cb) { + cb(null) + }, 1) + t.equal(queue.paused, false) + queue.pause() + t.equal(queue.paused, true) +}) + +test('abort', function (t) { + t.plan(11) + + var queue = buildQueue(worker, 1) + var abortedTasks = 0 + + var predrain = queue.drain + + queue.drain = function drain () { + t.fail('drain should never be called') + } + + // Pause queue to prevent tasks from starting + queue.pause() + queue.push(1, doneAborted) + queue.push(4, doneAborted) + queue.unshift(3, doneAborted) + queue.unshift(2, doneAborted) + + // Abort all queued tasks + queue.abort() + + // Verify state after abort + t.equal(queue.length(), 0, 'no queued tasks after abort') + t.equal(queue.drain, predrain, 'drain is back to default') + + setImmediate(function () { + t.equal(abortedTasks, 4, 'all queued tasks were aborted') + }) + + function doneAborted (err) { + t.ok(err, 'error is present') + t.equal(err.message, 'abort', 'error message is abort') + abortedTasks++ + } + + function worker (arg, cb) { + t.fail('worker should not be called') + setImmediate(function () { + cb(null, true) + }) + } +}) + +test('abort with error handler', function (t) { + t.plan(7) + + var queue = buildQueue(worker, 1) + var errorHandlerCalled = 0 + + queue.error(function (err, task) { + t.equal(err.message, 'abort', 'error handler receives abort error') + t.ok(task !== null, 'error handler receives task value') + errorHandlerCalled++ + }) + + // Pause queue to prevent tasks from starting + queue.pause() + queue.push(1, doneAborted) + queue.push(2, doneAborted) + + // Abort all queued tasks + queue.abort() + + setImmediate(function () { + t.equal(errorHandlerCalled, 2, 'error handler called for all aborted tasks') + }) + + function doneAborted (err) { + t.ok(err, 'callback receives error') + } + + function worker (arg, cb) { + t.fail('worker should not be called') + setImmediate(function () { + cb(null, true) + }) + } +}) diff --git a/node_modules/fastq/test/tsconfig.json b/node_modules/fastq/test/tsconfig.json new file mode 100644 index 0000000..66e16e9 --- /dev/null +++ b/node_modules/fastq/test/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "noEmit": true, + "strict": true + }, + "files": [ + "./example.ts" + ] +} diff --git a/node_modules/fill-range/LICENSE b/node_modules/fill-range/LICENSE new file mode 100644 index 0000000..9af4a67 --- /dev/null +++ b/node_modules/fill-range/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/fill-range/README.md b/node_modules/fill-range/README.md new file mode 100644 index 0000000..8d756fe --- /dev/null +++ b/node_modules/fill-range/README.md @@ -0,0 +1,237 @@ +# fill-range [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/fill-range.svg?style=flat)](https://www.npmjs.com/package/fill-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![NPM total downloads](https://img.shields.io/npm/dt/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/fill-range.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/fill-range) + +> Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex` + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save fill-range +``` + +## Usage + +Expands numbers and letters, optionally using a `step` as the last argument. _(Numbers may be defined as JavaScript numbers or strings)_. + +```js +const fill = require('fill-range'); +// fill(from, to[, step, options]); + +console.log(fill('1', '10')); //=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] +console.log(fill('1', '10', { toRegex: true })); //=> [1-9]|10 +``` + +**Params** + +* `from`: **{String|Number}** the number or letter to start with +* `to`: **{String|Number}** the number or letter to end with +* `step`: **{String|Number|Object|Function}** Optionally pass a [step](#optionsstep) to use. +* `options`: **{Object|Function}**: See all available [options](#options) + +## Examples + +By default, an array of values is returned. + +**Alphabetical ranges** + +```js +console.log(fill('a', 'e')); //=> ['a', 'b', 'c', 'd', 'e'] +console.log(fill('A', 'E')); //=> [ 'A', 'B', 'C', 'D', 'E' ] +``` + +**Numerical ranges** + +Numbers can be defined as actual numbers or strings. + +```js +console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ] +console.log(fill('1', '5')); //=> [ 1, 2, 3, 4, 5 ] +``` + +**Negative ranges** + +Numbers can be defined as actual numbers or strings. + +```js +console.log(fill('-5', '-1')); //=> [ '-5', '-4', '-3', '-2', '-1' ] +console.log(fill('-5', '5')); //=> [ '-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5' ] +``` + +**Steps (increments)** + +```js +// numerical ranges with increments +console.log(fill('0', '25', 4)); //=> [ '0', '4', '8', '12', '16', '20', '24' ] +console.log(fill('0', '25', 5)); //=> [ '0', '5', '10', '15', '20', '25' ] +console.log(fill('0', '25', 6)); //=> [ '0', '6', '12', '18', '24' ] + +// alphabetical ranges with increments +console.log(fill('a', 'z', 4)); //=> [ 'a', 'e', 'i', 'm', 'q', 'u', 'y' ] +console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ] +console.log(fill('a', 'z', 6)); //=> [ 'a', 'g', 'm', 's', 'y' ] +``` + +## Options + +### options.step + +**Type**: `number` (formatted as a string or number) + +**Default**: `undefined` + +**Description**: The increment to use for the range. Can be used with letters or numbers. + +**Example(s)** + +```js +// numbers +console.log(fill('1', '10', 2)); //=> [ '1', '3', '5', '7', '9' ] +console.log(fill('1', '10', 3)); //=> [ '1', '4', '7', '10' ] +console.log(fill('1', '10', 4)); //=> [ '1', '5', '9' ] + +// letters +console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ] +console.log(fill('a', 'z', 7)); //=> [ 'a', 'h', 'o', 'v' ] +console.log(fill('a', 'z', 9)); //=> [ 'a', 'j', 's' ] +``` + +### options.strictRanges + +**Type**: `boolean` + +**Default**: `false` + +**Description**: By default, `null` is returned when an invalid range is passed. Enable this option to throw a `RangeError` on invalid ranges. + +**Example(s)** + +The following are all invalid: + +```js +fill('1.1', '2'); // decimals not supported in ranges +fill('a', '2'); // incompatible range values +fill(1, 10, 'foo'); // invalid "step" argument +``` + +### options.stringify + +**Type**: `boolean` + +**Default**: `undefined` + +**Description**: Cast all returned values to strings. By default, integers are returned as numbers. + +**Example(s)** + +```js +console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ] +console.log(fill(1, 5, { stringify: true })); //=> [ '1', '2', '3', '4', '5' ] +``` + +### options.toRegex + +**Type**: `boolean` + +**Default**: `undefined` + +**Description**: Create a regex-compatible source string, instead of expanding values to an array. + +**Example(s)** + +```js +// alphabetical range +console.log(fill('a', 'e', { toRegex: true })); //=> '[a-e]' +// alphabetical with step +console.log(fill('a', 'z', 3, { toRegex: true })); //=> 'a|d|g|j|m|p|s|v|y' +// numerical range +console.log(fill('1', '100', { toRegex: true })); //=> '[1-9]|[1-9][0-9]|100' +// numerical range with zero padding +console.log(fill('000001', '100000', { toRegex: true })); +//=> '0{5}[1-9]|0{4}[1-9][0-9]|0{3}[1-9][0-9]{2}|0{2}[1-9][0-9]{3}|0[1-9][0-9]{4}|100000' +``` + +### options.transform + +**Type**: `function` + +**Default**: `undefined` + +**Description**: Customize each value in the returned array (or [string](#optionstoRegex)). _(you can also pass this function as the last argument to `fill()`)_. + +**Example(s)** + +```js +// add zero padding +console.log(fill(1, 5, value => String(value).padStart(4, '0'))); +//=> ['0001', '0002', '0003', '0004', '0005'] +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 116 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [paulmillr](https://github.com/paulmillr) | +| 2 | [realityking](https://github.com/realityking) | +| 2 | [bluelovers](https://github.com/bluelovers) | +| 1 | [edorivai](https://github.com/edorivai) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)! + + + + + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._ \ No newline at end of file diff --git a/node_modules/fill-range/index.js b/node_modules/fill-range/index.js new file mode 100644 index 0000000..ddb212e --- /dev/null +++ b/node_modules/fill-range/index.js @@ -0,0 +1,248 @@ +/*! + * fill-range + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +const util = require('util'); +const toRegexRange = require('to-regex-range'); + +const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); + +const transform = toNumber => { + return value => toNumber === true ? Number(value) : String(value); +}; + +const isValidValue = value => { + return typeof value === 'number' || (typeof value === 'string' && value !== ''); +}; + +const isNumber = num => Number.isInteger(+num); + +const zeros = input => { + let value = `${input}`; + let index = -1; + if (value[0] === '-') value = value.slice(1); + if (value === '0') return false; + while (value[++index] === '0'); + return index > 0; +}; + +const stringify = (start, end, options) => { + if (typeof start === 'string' || typeof end === 'string') { + return true; + } + return options.stringify === true; +}; + +const pad = (input, maxLength, toNumber) => { + if (maxLength > 0) { + let dash = input[0] === '-' ? '-' : ''; + if (dash) input = input.slice(1); + input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); + } + if (toNumber === false) { + return String(input); + } + return input; +}; + +const toMaxLen = (input, maxLength) => { + let negative = input[0] === '-' ? '-' : ''; + if (negative) { + input = input.slice(1); + maxLength--; + } + while (input.length < maxLength) input = '0' + input; + return negative ? ('-' + input) : input; +}; + +const toSequence = (parts, options, maxLen) => { + parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + + let prefix = options.capture ? '' : '?:'; + let positives = ''; + let negatives = ''; + let result; + + if (parts.positives.length) { + positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|'); + } + + if (parts.negatives.length) { + negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`; + } + + if (positives && negatives) { + result = `${positives}|${negatives}`; + } else { + result = positives || negatives; + } + + if (options.wrap) { + return `(${prefix}${result})`; + } + + return result; +}; + +const toRange = (a, b, isNumbers, options) => { + if (isNumbers) { + return toRegexRange(a, b, { wrap: false, ...options }); + } + + let start = String.fromCharCode(a); + if (a === b) return start; + + let stop = String.fromCharCode(b); + return `[${start}-${stop}]`; +}; + +const toRegex = (start, end, options) => { + if (Array.isArray(start)) { + let wrap = options.wrap === true; + let prefix = options.capture ? '' : '?:'; + return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); + } + return toRegexRange(start, end, options); +}; + +const rangeError = (...args) => { + return new RangeError('Invalid range arguments: ' + util.inspect(...args)); +}; + +const invalidRange = (start, end, options) => { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; +}; + +const invalidStep = (step, options) => { + if (options.strictRanges === true) { + throw new TypeError(`Expected step "${step}" to be a number`); + } + return []; +}; + +const fillNumbers = (start, end, step = 1, options = {}) => { + let a = Number(start); + let b = Number(end); + + if (!Number.isInteger(a) || !Number.isInteger(b)) { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; + } + + // fix negative zero + if (a === 0) a = 0; + if (b === 0) b = 0; + + let descending = a > b; + let startString = String(start); + let endString = String(end); + let stepString = String(step); + step = Math.max(Math.abs(step), 1); + + let padded = zeros(startString) || zeros(endString) || zeros(stepString); + let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; + let toNumber = padded === false && stringify(start, end, options) === false; + let format = options.transform || transform(toNumber); + + if (options.toRegex && step === 1) { + return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); + } + + let parts = { negatives: [], positives: [] }; + let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); + let range = []; + let index = 0; + + while (descending ? a >= b : a <= b) { + if (options.toRegex === true && step > 1) { + push(a); + } else { + range.push(pad(format(a, index), maxLen, toNumber)); + } + a = descending ? a - step : a + step; + index++; + } + + if (options.toRegex === true) { + return step > 1 + ? toSequence(parts, options, maxLen) + : toRegex(range, null, { wrap: false, ...options }); + } + + return range; +}; + +const fillLetters = (start, end, step = 1, options = {}) => { + if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) { + return invalidRange(start, end, options); + } + + let format = options.transform || (val => String.fromCharCode(val)); + let a = `${start}`.charCodeAt(0); + let b = `${end}`.charCodeAt(0); + + let descending = a > b; + let min = Math.min(a, b); + let max = Math.max(a, b); + + if (options.toRegex && step === 1) { + return toRange(min, max, false, options); + } + + let range = []; + let index = 0; + + while (descending ? a >= b : a <= b) { + range.push(format(a, index)); + a = descending ? a - step : a + step; + index++; + } + + if (options.toRegex === true) { + return toRegex(range, null, { wrap: false, options }); + } + + return range; +}; + +const fill = (start, end, step, options = {}) => { + if (end == null && isValidValue(start)) { + return [start]; + } + + if (!isValidValue(start) || !isValidValue(end)) { + return invalidRange(start, end, options); + } + + if (typeof step === 'function') { + return fill(start, end, 1, { transform: step }); + } + + if (isObject(step)) { + return fill(start, end, 0, step); + } + + let opts = { ...options }; + if (opts.capture === true) opts.wrap = true; + step = step || opts.step || 1; + + if (!isNumber(step)) { + if (step != null && !isObject(step)) return invalidStep(step, opts); + return fill(start, end, 1, step); + } + + if (isNumber(start) && isNumber(end)) { + return fillNumbers(start, end, step, opts); + } + + return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); +}; + +module.exports = fill; diff --git a/node_modules/fill-range/package.json b/node_modules/fill-range/package.json new file mode 100644 index 0000000..582357f --- /dev/null +++ b/node_modules/fill-range/package.json @@ -0,0 +1,74 @@ +{ + "name": "fill-range", + "description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`", + "version": "7.1.1", + "homepage": "https://github.com/jonschlinkert/fill-range", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Edo Rivai (edo.rivai.nl)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Paul Miller (paulmillr.com)", + "Rouven Weßling (www.rouvenwessling.de)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/fill-range", + "bugs": { + "url": "https://github.com/jonschlinkert/fill-range/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=8" + }, + "scripts": { + "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .", + "mocha": "mocha --reporter dot", + "test": "npm run lint && npm run mocha", + "test:ci": "npm run test:cover", + "test:cover": "nyc npm run mocha" + }, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "devDependencies": { + "gulp-format-md": "^2.0.0", + "mocha": "^6.1.1", + "nyc": "^15.1.0" + }, + "keywords": [ + "alpha", + "alphabetical", + "array", + "bash", + "brace", + "expand", + "expansion", + "fill", + "glob", + "match", + "matches", + "matching", + "number", + "numerical", + "range", + "ranges", + "regex", + "sh" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/function-bind/.eslintrc b/node_modules/function-bind/.eslintrc new file mode 100644 index 0000000..71a054f --- /dev/null +++ b/node_modules/function-bind/.eslintrc @@ -0,0 +1,21 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "indent": [2, 4], + "no-new-func": [1], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "max-lines-per-function": 0, + "strict": [0] + }, + }, + ], +} diff --git a/node_modules/function-bind/.github/FUNDING.yml b/node_modules/function-bind/.github/FUNDING.yml new file mode 100644 index 0000000..7448219 --- /dev/null +++ b/node_modules/function-bind/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/function-bind +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/function-bind/.github/SECURITY.md b/node_modules/function-bind/.github/SECURITY.md new file mode 100644 index 0000000..82e4285 --- /dev/null +++ b/node_modules/function-bind/.github/SECURITY.md @@ -0,0 +1,3 @@ +# Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. diff --git a/node_modules/function-bind/.nycrc b/node_modules/function-bind/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/function-bind/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/function-bind/CHANGELOG.md b/node_modules/function-bind/CHANGELOG.md new file mode 100644 index 0000000..f9e6cc0 --- /dev/null +++ b/node_modules/function-bind/CHANGELOG.md @@ -0,0 +1,136 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.2](https://github.com/ljharb/function-bind/compare/v1.1.1...v1.1.2) - 2023-10-12 + +### Merged + +- Point to the correct file [`#16`](https://github.com/ljharb/function-bind/pull/16) + +### Commits + +- [Tests] migrate tests to Github Actions [`4f8b57c`](https://github.com/ljharb/function-bind/commit/4f8b57c02f2011fe9ae353d5e74e8745f0988af8) +- [Tests] remove `jscs` [`90eb2ed`](https://github.com/ljharb/function-bind/commit/90eb2edbeefd5b76cd6c3a482ea3454db169b31f) +- [meta] update `.gitignore` [`53fcdc3`](https://github.com/ljharb/function-bind/commit/53fcdc371cd66634d6e9b71c836a50f437e89fed) +- [Tests] up to `node` `v11.10`, `v10.15`, `v9.11`, `v8.15`, `v6.16`, `v4.9`; use `nvm install-latest-npm`; run audit script in tests [`1fe8f6e`](https://github.com/ljharb/function-bind/commit/1fe8f6e9aed0dfa8d8b3cdbd00c7f5ea0cd2b36e) +- [meta] add `auto-changelog` [`1921fcb`](https://github.com/ljharb/function-bind/commit/1921fcb5b416b63ffc4acad051b6aad5722f777d) +- [Robustness] remove runtime dependency on all builtins except `.apply` [`f743e61`](https://github.com/ljharb/function-bind/commit/f743e61aa6bb2360358c04d4884c9db853d118b7) +- Docs: enable badges; update wording [`503cb12`](https://github.com/ljharb/function-bind/commit/503cb12d998b5f91822776c73332c7adcd6355dd) +- [readme] update badges [`290c5db`](https://github.com/ljharb/function-bind/commit/290c5dbbbda7264efaeb886552a374b869a4bb48) +- [Tests] switch to nyc for coverage [`ea360ba`](https://github.com/ljharb/function-bind/commit/ea360ba907fc2601ed18d01a3827fa2d3533cdf8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`cae5e9e`](https://github.com/ljharb/function-bind/commit/cae5e9e07a5578dc6df26c03ee22851ce05b943c) +- [meta] add `funding` field; create FUNDING.yml [`c9f4274`](https://github.com/ljharb/function-bind/commit/c9f4274aa80ea3aae9657a3938fdba41a3b04ca6) +- [Tests] fix eslint errors from #15 [`f69aaa2`](https://github.com/ljharb/function-bind/commit/f69aaa2beb2fdab4415bfb885760a699d0b9c964) +- [actions] fix permissions [`99a0cd9`](https://github.com/ljharb/function-bind/commit/99a0cd9f3b5bac223a0d572f081834cd73314be7) +- [meta] use `npmignore` to autogenerate an npmignore file [`f03b524`](https://github.com/ljharb/function-bind/commit/f03b524ca91f75a109a5d062f029122c86ecd1ae) +- [Dev Deps] update `@ljharb/eslint‑config`, `eslint`, `tape` [`7af9300`](https://github.com/ljharb/function-bind/commit/7af930023ae2ce7645489532821e4fbbcd7a2280) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`64a9127`](https://github.com/ljharb/function-bind/commit/64a9127ab0bd331b93d6572eaf6e9971967fc08c) +- [Tests] use `aud` instead of `npm audit` [`e75069c`](https://github.com/ljharb/function-bind/commit/e75069c50010a8fcce2a9ce2324934c35fdb4386) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`d03555c`](https://github.com/ljharb/function-bind/commit/d03555ca59dea3b71ce710045e4303b9e2619e28) +- [meta] add `safe-publish-latest` [`9c8f809`](https://github.com/ljharb/function-bind/commit/9c8f8092aed027d7e80c94f517aa892385b64f09) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`baf6893`](https://github.com/ljharb/function-bind/commit/baf6893e27f5b59abe88bc1995e6f6ed1e527397) +- [meta] create SECURITY.md [`4db1779`](https://github.com/ljharb/function-bind/commit/4db17799f1f28ae294cb95e0081ca2b591c3911b) +- [Tests] add `npm run audit` [`c8b38ec`](https://github.com/ljharb/function-bind/commit/c8b38ec40ed3f85dabdee40ed4148f1748375bc2) +- Revert "Point to the correct file" [`05cdf0f`](https://github.com/ljharb/function-bind/commit/05cdf0fa205c6a3c5ba40bbedd1dfa9874f915c9) + +## [v1.1.1](https://github.com/ljharb/function-bind/compare/v1.1.0...v1.1.1) - 2017-08-28 + +### Commits + +- [Tests] up to `node` `v8`; newer npm breaks on older node; fix scripts [`817f7d2`](https://github.com/ljharb/function-bind/commit/817f7d28470fdbff8ef608d4d565dd4d1430bc5e) +- [Dev Deps] update `eslint`, `jscs`, `tape`, `@ljharb/eslint-config` [`854288b`](https://github.com/ljharb/function-bind/commit/854288b1b6f5c555f89aceb9eff1152510262084) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`83e639f`](https://github.com/ljharb/function-bind/commit/83e639ff74e6cd6921285bccec22c1bcf72311bd) +- Only apps should have lockfiles [`5ed97f5`](https://github.com/ljharb/function-bind/commit/5ed97f51235c17774e0832e122abda0f3229c908) +- Use a SPDX-compliant “license” field. [`5feefea`](https://github.com/ljharb/function-bind/commit/5feefea0dc0193993e83e5df01ded424403a5381) + +## [v1.1.0](https://github.com/ljharb/function-bind/compare/v1.0.2...v1.1.0) - 2016-02-14 + +### Commits + +- Update `eslint`, `tape`; use my personal shared `eslint` config [`9c9062a`](https://github.com/ljharb/function-bind/commit/9c9062abbe9dd70b59ea2c3a3c3a81f29b457097) +- Add `npm run eslint` [`dd96c56`](https://github.com/ljharb/function-bind/commit/dd96c56720034a3c1ffee10b8a59a6f7c53e24ad) +- [New] return the native `bind` when available. [`82186e0`](https://github.com/ljharb/function-bind/commit/82186e03d73e580f95ff167e03f3582bed90ed72) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`a3dd767`](https://github.com/ljharb/function-bind/commit/a3dd76720c795cb7f4586b0544efabf8aa107b8b) +- Update `eslint` [`3dae2f7`](https://github.com/ljharb/function-bind/commit/3dae2f7423de30a2d20313ddb1edc19660142fe9) +- Update `tape`, `covert`, `jscs` [`a181eee`](https://github.com/ljharb/function-bind/commit/a181eee0cfa24eb229c6e843a971f36e060a2f6a) +- [Tests] up to `node` `v5.6`, `v4.3` [`964929a`](https://github.com/ljharb/function-bind/commit/964929a6a4ddb36fb128de2bcc20af5e4f22e1ed) +- Test up to `io.js` `v2.1` [`2be7310`](https://github.com/ljharb/function-bind/commit/2be7310f2f74886a7124ca925be411117d41d5ea) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`45f3d68`](https://github.com/ljharb/function-bind/commit/45f3d6865c6ca93726abcef54febe009087af101) +- [Dev Deps] update `tape`, `jscs` [`6e1340d`](https://github.com/ljharb/function-bind/commit/6e1340d94642deaecad3e717825db641af4f8b1f) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`d9bad2b`](https://github.com/ljharb/function-bind/commit/d9bad2b778b1b3a6dd2876087b88b3acf319f8cc) +- Update `eslint` [`935590c`](https://github.com/ljharb/function-bind/commit/935590caa024ab356102e4858e8fc315b2ccc446) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`8c9a1ef`](https://github.com/ljharb/function-bind/commit/8c9a1efd848e5167887aa8501857a0940a480c57) +- Test on `io.js` `v2.2` [`9a3a38c`](https://github.com/ljharb/function-bind/commit/9a3a38c92013aed6e108666e7bd40969b84ac86e) +- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`69afc26`](https://github.com/ljharb/function-bind/commit/69afc2617405b147dd2a8d8ae73ca9e9283f18b4) +- [Dev Deps] Update `tape`, `eslint` [`36c1be0`](https://github.com/ljharb/function-bind/commit/36c1be0ab12b45fe5df6b0fdb01a5d5137fd0115) +- Update `tape`, `jscs` [`98d8303`](https://github.com/ljharb/function-bind/commit/98d8303cd5ca1c6b8f985469f86b0d44d7d45f6e) +- Update `jscs` [`9633a4e`](https://github.com/ljharb/function-bind/commit/9633a4e9fbf82051c240855166e468ba8ba0846f) +- Update `tape`, `jscs` [`c80ef0f`](https://github.com/ljharb/function-bind/commit/c80ef0f46efc9791e76fa50de4414092ac147831) +- Test up to `io.js` `v3.0` [`7e2c853`](https://github.com/ljharb/function-bind/commit/7e2c8537d52ab9cf5a655755561d8917684c0df4) +- Test on `io.js` `v2.4` [`5a199a2`](https://github.com/ljharb/function-bind/commit/5a199a27ba46795ba5eaf0845d07d4b8232895c9) +- Test on `io.js` `v2.3` [`a511b88`](https://github.com/ljharb/function-bind/commit/a511b8896de0bddf3b56862daa416c701f4d0453) +- Fixing a typo from 822b4e1938db02dc9584aa434fd3a45cb20caf43 [`732d6b6`](https://github.com/ljharb/function-bind/commit/732d6b63a9b33b45230e630dbcac7a10855d3266) +- Update `jscs` [`da52a48`](https://github.com/ljharb/function-bind/commit/da52a4886c06d6490f46ae30b15e4163ba08905d) +- Lock covert to v1.0.0. [`d6150fd`](https://github.com/ljharb/function-bind/commit/d6150fda1e6f486718ebdeff823333d9e48e7430) + +## [v1.0.2](https://github.com/ljharb/function-bind/compare/v1.0.1...v1.0.2) - 2014-10-04 + +## [v1.0.1](https://github.com/ljharb/function-bind/compare/v1.0.0...v1.0.1) - 2014-10-03 + +### Merged + +- make CI build faster [`#3`](https://github.com/ljharb/function-bind/pull/3) + +### Commits + +- Using my standard jscs.json [`d8ee94c`](https://github.com/ljharb/function-bind/commit/d8ee94c993eff0a84cf5744fe6a29627f5cffa1a) +- Adding `npm run lint` [`7571ab7`](https://github.com/ljharb/function-bind/commit/7571ab7dfdbd99b25a1dbb2d232622bd6f4f9c10) +- Using consistent indentation [`e91a1b1`](https://github.com/ljharb/function-bind/commit/e91a1b13a61e99ec1e530e299b55508f74218a95) +- Updating jscs [`7e17892`](https://github.com/ljharb/function-bind/commit/7e1789284bc629bc9c1547a61c9b227bbd8c7a65) +- Using consistent quotes [`c50b57f`](https://github.com/ljharb/function-bind/commit/c50b57fcd1c5ec38320979c837006069ebe02b77) +- Adding keywords [`cb94631`](https://github.com/ljharb/function-bind/commit/cb946314eed35f21186a25fb42fc118772f9ee00) +- Directly export a function expression instead of using a declaration, and relying on hoisting. [`5a33c5f`](https://github.com/ljharb/function-bind/commit/5a33c5f45642de180e0d207110bf7d1843ceb87c) +- Naming npm URL and badge in README; use SVG [`2aef8fc`](https://github.com/ljharb/function-bind/commit/2aef8fcb79d54e63a58ae557c4e60949e05d5e16) +- Naming deps URLs in README [`04228d7`](https://github.com/ljharb/function-bind/commit/04228d766670ee45ca24e98345c1f6a7621065b5) +- Naming travis-ci URLs in README; using SVG [`62c810c`](https://github.com/ljharb/function-bind/commit/62c810c2f54ced956cd4d4ab7b793055addfe36e) +- Make sure functions are invoked correctly (also passing coverage tests) [`2b289b4`](https://github.com/ljharb/function-bind/commit/2b289b4dfbf037ffcfa4dc95eb540f6165e9e43a) +- Removing the strict mode pragmas; they make tests fail. [`1aa701d`](https://github.com/ljharb/function-bind/commit/1aa701d199ddc3782476e8f7eef82679be97b845) +- Adding myself as a contributor [`85fd57b`](https://github.com/ljharb/function-bind/commit/85fd57b0860e5a7af42de9a287f3f265fc6d72fc) +- Adding strict mode pragmas [`915b08e`](https://github.com/ljharb/function-bind/commit/915b08e084c86a722eafe7245e21db74aa21ca4c) +- Adding devDeps URLs to README [`4ccc731`](https://github.com/ljharb/function-bind/commit/4ccc73112c1769859e4ca3076caf4086b3cba2cd) +- Fixing the description. [`a7a472c`](https://github.com/ljharb/function-bind/commit/a7a472cf649af515c635cf560fc478fbe48999c8) +- Using a function expression instead of a function declaration. [`b5d3e4e`](https://github.com/ljharb/function-bind/commit/b5d3e4ea6aaffc63888953eeb1fbc7ff45f1fa14) +- Updating tape [`f086be6`](https://github.com/ljharb/function-bind/commit/f086be6029fb56dde61a258c1340600fa174d1e0) +- Updating jscs [`5f9bdb3`](https://github.com/ljharb/function-bind/commit/5f9bdb375ab13ba48f30852aab94029520c54d71) +- Updating jscs [`9b409ba`](https://github.com/ljharb/function-bind/commit/9b409ba6118e23395a4e5d83ef39152aab9d3bfc) +- Run coverage as part of tests. [`8e1b6d4`](https://github.com/ljharb/function-bind/commit/8e1b6d459f047d1bd4fee814e01247c984c80bd0) +- Run linter as part of tests [`c1ca83f`](https://github.com/ljharb/function-bind/commit/c1ca83f832df94587d09e621beba682fabfaa987) +- Updating covert [`701e837`](https://github.com/ljharb/function-bind/commit/701e83774b57b4d3ef631e1948143f43a72f4bb9) + +## [v1.0.0](https://github.com/ljharb/function-bind/compare/v0.2.0...v1.0.0) - 2014-08-09 + +### Commits + +- Make sure old and unstable nodes don't fail Travis [`27adca3`](https://github.com/ljharb/function-bind/commit/27adca34a4ab6ad67b6dfde43942a1b103ce4d75) +- Fixing an issue when the bound function is called as a constructor in ES3. [`e20122d`](https://github.com/ljharb/function-bind/commit/e20122d267d92ce553859b280cbbea5d27c07731) +- Adding `npm run coverage` [`a2e29c4`](https://github.com/ljharb/function-bind/commit/a2e29c4ecaef9e2f6cd1603e868c139073375502) +- Updating tape [`b741168`](https://github.com/ljharb/function-bind/commit/b741168b12b235b1717ff696087645526b69213c) +- Upgrading tape [`63631a0`](https://github.com/ljharb/function-bind/commit/63631a04c7fbe97cc2fa61829cc27246d6986f74) +- Updating tape [`363cb46`](https://github.com/ljharb/function-bind/commit/363cb46dafb23cb3e347729a22f9448051d78464) + +## v0.2.0 - 2014-03-23 + +### Commits + +- Updating test coverage to match es5-shim. [`aa94d44`](https://github.com/ljharb/function-bind/commit/aa94d44b8f9d7f69f10e060db7709aa7a694e5d4) +- initial [`942ee07`](https://github.com/ljharb/function-bind/commit/942ee07e94e542d91798137bc4b80b926137e066) +- Setting the bound function's length properly. [`079f46a`](https://github.com/ljharb/function-bind/commit/079f46a2d3515b7c0b308c2c13fceb641f97ca25) +- Ensuring that some older browsers will throw when given a regex. [`36ac55b`](https://github.com/ljharb/function-bind/commit/36ac55b87f460d4330253c92870aa26fbfe8227f) +- Removing npm scripts that don't have dependencies [`9d2be60`](https://github.com/ljharb/function-bind/commit/9d2be600002cb8bc8606f8f3585ad3e05868c750) +- Updating tape [`297a4ac`](https://github.com/ljharb/function-bind/commit/297a4acc5464db381940aafb194d1c88f4e678f3) +- Skipping length tests for now. [`d9891ea`](https://github.com/ljharb/function-bind/commit/d9891ea4d2aaffa69f408339cdd61ff740f70565) +- don't take my tea [`dccd930`](https://github.com/ljharb/function-bind/commit/dccd930bfd60ea10cb178d28c97550c3bc8c1e07) diff --git a/node_modules/function-bind/LICENSE b/node_modules/function-bind/LICENSE new file mode 100644 index 0000000..62d6d23 --- /dev/null +++ b/node_modules/function-bind/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/node_modules/function-bind/README.md b/node_modules/function-bind/README.md new file mode 100644 index 0000000..814c20b --- /dev/null +++ b/node_modules/function-bind/README.md @@ -0,0 +1,46 @@ +# function-bind [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] + +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Implementation of function.prototype.bind + +Old versions of phantomjs, Internet Explorer < 9, and node < 0.6 don't support `Function.prototype.bind`. + +## Example + +```js +Function.prototype.bind = require("function-bind") +``` + +## Installation + +`npm install function-bind` + +## Contributors + + - Raynos + +## MIT Licenced + +[package-url]: https://npmjs.org/package/function-bind +[npm-version-svg]: https://versionbadg.es/Raynos/function-bind.svg +[deps-svg]: https://david-dm.org/Raynos/function-bind.svg +[deps-url]: https://david-dm.org/Raynos/function-bind +[dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg +[dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/function-bind.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/function-bind.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/function-bind.svg +[downloads-url]: https://npm-stat.com/charts.html?package=function-bind +[codecov-image]: https://codecov.io/gh/Raynos/function-bind/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/Raynos/function-bind/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/Raynos/function-bind +[actions-url]: https://github.com/Raynos/function-bind/actions diff --git a/node_modules/function-bind/implementation.js b/node_modules/function-bind/implementation.js new file mode 100644 index 0000000..fd4384c --- /dev/null +++ b/node_modules/function-bind/implementation.js @@ -0,0 +1,84 @@ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; diff --git a/node_modules/function-bind/index.js b/node_modules/function-bind/index.js new file mode 100644 index 0000000..3bb6b96 --- /dev/null +++ b/node_modules/function-bind/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json new file mode 100644 index 0000000..6185963 --- /dev/null +++ b/node_modules/function-bind/package.json @@ -0,0 +1,87 @@ +{ + "name": "function-bind", + "version": "1.1.2", + "description": "Implementation of Function.prototype.bind", + "keywords": [ + "function", + "bind", + "shim", + "es5" + ], + "author": "Raynos ", + "repository": { + "type": "git", + "url": "https://github.com/Raynos/function-bind.git" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "main": "index", + "homepage": "https://github.com/Raynos/function-bind", + "contributors": [ + { + "name": "Raynos" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "bugs": { + "url": "https://github.com/Raynos/function-bind/issues", + "email": "raynos2@gmail.com" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.1" + }, + "license": "MIT", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepack": "npmignore --auto --commentLines=autogenerated", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "ie/8..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/function-bind/test/.eslintrc b/node_modules/function-bind/test/.eslintrc new file mode 100644 index 0000000..8a56d5b --- /dev/null +++ b/node_modules/function-bind/test/.eslintrc @@ -0,0 +1,9 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "max-statements-per-line": [2, { "max": 2 }], + "no-invalid-this": 0, + "no-magic-numbers": 0, + } +} diff --git a/node_modules/function-bind/test/index.js b/node_modules/function-bind/test/index.js new file mode 100644 index 0000000..2edecce --- /dev/null +++ b/node_modules/function-bind/test/index.js @@ -0,0 +1,252 @@ +// jscs:disable requireUseStrict + +var test = require('tape'); + +var functionBind = require('../implementation'); +var getCurrentContext = function () { return this; }; + +test('functionBind is a function', function (t) { + t.equal(typeof functionBind, 'function'); + t.end(); +}); + +test('non-functions', function (t) { + var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; + t.plan(nonFunctions.length); + for (var i = 0; i < nonFunctions.length; ++i) { + try { functionBind.call(nonFunctions[i]); } catch (ex) { + t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); + } + } + t.end(); +}); + +test('without a context', function (t) { + t.test('binds properly', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }) + }; + namespace.func(1, 2, 3); + st.deepEqual(args, [1, 2, 3]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('binds properly, and still supplies bound arguments', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, undefined, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.deepEqual(args, [1, 2, 3, 4, 5, 6]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('returns properly', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('called as a constructor', function (st) { + var thunkify = function (value) { + return function () { return value; }; + }; + st.test('returns object value', function (sst) { + var expectedReturnValue = [1, 2, 3]; + var Constructor = functionBind.call(thunkify(expectedReturnValue), null); + var result = new Constructor(); + sst.equal(result, expectedReturnValue); + sst.end(); + }); + + st.test('does not return primitive value', function (sst) { + var Constructor = functionBind.call(thunkify(42), null); + var result = new Constructor(); + sst.notEqual(result, 42); + sst.end(); + }); + + st.test('object from bound constructor is instance of original and bound constructor', function (sst) { + var A = function (x) { + this.name = x || 'A'; + }; + var B = functionBind.call(A, null, 'B'); + + var result = new B(); + sst.ok(result instanceof B, 'result is instance of bound constructor'); + sst.ok(result instanceof A, 'result is instance of original constructor'); + sst.end(); + }); + + st.end(); + }); + + t.end(); +}); + +test('with a context', function (t) { + t.test('with no bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext) + }; + namespace.func(1, 2, 3); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); + st.end(); + }); + + t.test('with bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); + st.end(); + }); + + t.test('returns properly', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('passes the correct arguments when called as a constructor', function (st) { + var expected = { name: 'Correct' }; + var namespace = { + Func: functionBind.call(function (arg) { + return arg; + }, { name: 'Incorrect' }) + }; + var returned = new namespace.Func(expected); + st.equal(returned, expected, 'returns the right arg when called as a constructor'); + st.end(); + }); + + t.test('has the new instance\'s context when called as a constructor', function (st) { + var actualContext; + var expectedContext = { foo: 'bar' }; + var namespace = { + Func: functionBind.call(function () { + actualContext = this; + }, expectedContext) + }; + var result = new namespace.Func(); + st.equal(result instanceof namespace.Func, true); + st.notEqual(actualContext, expectedContext); + st.end(); + }); + + t.end(); +}); + +test('bound function length', function (t) { + t.test('sets a correct length without thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); +}); diff --git a/node_modules/glob-parent/LICENSE b/node_modules/glob-parent/LICENSE new file mode 100644 index 0000000..d701b08 --- /dev/null +++ b/node_modules/glob-parent/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2015, 2019 Elan Shanker, 2021 Blaine Bublitz , Eric Schoffstall and other contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/glob-parent/README.md b/node_modules/glob-parent/README.md new file mode 100644 index 0000000..6ae18a1 --- /dev/null +++ b/node_modules/glob-parent/README.md @@ -0,0 +1,134 @@ +

+ + + +

+ +# glob-parent + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url] + +Extract the non-magic parent path from a glob string. + +## Usage + +```js +var globParent = require('glob-parent'); + +globParent('path/to/*.js'); // 'path/to' +globParent('/root/path/to/*.js'); // '/root/path/to' +globParent('/*.js'); // '/' +globParent('*.js'); // '.' +globParent('**/*.js'); // '.' +globParent('path/{to,from}'); // 'path' +globParent('path/!(to|from)'); // 'path' +globParent('path/?(to|from)'); // 'path' +globParent('path/+(to|from)'); // 'path' +globParent('path/*(to|from)'); // 'path' +globParent('path/@(to|from)'); // 'path' +globParent('path/**/*'); // 'path' + +// if provided a non-glob path, returns the nearest dir +globParent('path/foo/bar.js'); // 'path/foo' +globParent('path/foo/'); // 'path/foo' +globParent('path/foo'); // 'path' (see issue #3 for details) +``` + +## API + +### `globParent(maybeGlobString, [options])` + +Takes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below. + +#### options + +```js +{ + // Disables the automatic conversion of slashes for Windows + flipBackslashes: true; +} +``` + +## Escaping + +The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters: + +- `?` (question mark) unless used as a path segment alone +- `*` (asterisk) +- `|` (pipe) +- `(` (opening parenthesis) +- `)` (closing parenthesis) +- `{` (opening curly brace) +- `}` (closing curly brace) +- `[` (opening bracket) +- `]` (closing bracket) + +**Example** + +```js +globParent('foo/[bar]/'); // 'foo' +globParent('foo/\\[bar]/'); // 'foo/[bar]' +``` + +## Limitations + +### Braces & Brackets + +This library attempts a quick and imperfect method of determining which path +parts have glob magic without fully parsing/lexing the pattern. There are some +advanced use cases that can trip it up, such as nested braces where the outer +pair is escaped and the inner one contains a path separator. If you find +yourself in the unlikely circumstance of being affected by this or need to +ensure higher-fidelity glob handling in your library, it is recommended that you +pre-process your input with [expand-braces] and/or [expand-brackets]. + +### Windows + +Backslashes are not valid path separators for globs. If a path with backslashes +is provided anyway, for simple cases, glob-parent will replace the path +separator for you and return the non-glob parent path (now with +forward-slashes, which are still valid as Windows path separators). + +This cannot be used in conjunction with escape characters. + +```js +// BAD +globParent('C:\\Program Files \\(x86\\)\\*.ext'); // 'C:/Program Files /(x86/)' + +// GOOD +globParent('C:/Program Files\\(x86\\)/*.ext'); // 'C:/Program Files (x86)' +``` + +If you are using escape characters for a pattern without path parts (i.e. +relative to `cwd`), prefix with `./` to avoid confusing glob-parent. + +```js +// BAD +globParent('foo \\[bar]'); // 'foo ' +globParent('foo \\[bar]*'); // 'foo ' + +// GOOD +globParent('./foo \\[bar]'); // 'foo [bar]' +globParent('./foo \\[bar]*'); // '.' +``` + +## License + +ISC + + +[downloads-image]: https://img.shields.io/npm/dm/glob-parent.svg?style=flat-square +[npm-url]: https://www.npmjs.com/package/glob-parent +[npm-image]: https://img.shields.io/npm/v/glob-parent.svg?style=flat-square + +[ci-url]: https://github.com/gulpjs/glob-parent/actions?query=workflow:dev +[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/glob-parent/dev?style=flat-square + +[coveralls-url]: https://coveralls.io/r/gulpjs/glob-parent +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg?style=flat-square + + + +[expand-braces]: https://github.com/jonschlinkert/expand-braces +[expand-brackets]: https://github.com/jonschlinkert/expand-brackets + diff --git a/node_modules/glob-parent/index.js b/node_modules/glob-parent/index.js new file mode 100644 index 0000000..09dde64 --- /dev/null +++ b/node_modules/glob-parent/index.js @@ -0,0 +1,75 @@ +'use strict'; + +var isGlob = require('is-glob'); +var pathPosixDirname = require('path').posix.dirname; +var isWin32 = require('os').platform() === 'win32'; + +var slash = '/'; +var backslash = /\\/g; +var escaped = /\\([!*?|[\](){}])/g; + +/** + * @param {string} str + * @param {Object} opts + * @param {boolean} [opts.flipBackslashes=true] + */ +module.exports = function globParent(str, opts) { + var options = Object.assign({ flipBackslashes: true }, opts); + + // flip windows path separators + if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { + str = str.replace(backslash, slash); + } + + // special case for strings ending in enclosure containing path separator + if (isEnclosure(str)) { + str += slash; + } + + // preserves full path in case of trailing path separator + str += 'a'; + + // remove path parts that are globby + do { + str = pathPosixDirname(str); + } while (isGlobby(str)); + + // remove escape chars and return result + return str.replace(escaped, '$1'); +}; + +function isEnclosure(str) { + var lastChar = str.slice(-1); + + var enclosureStart; + switch (lastChar) { + case '}': + enclosureStart = '{'; + break; + case ']': + enclosureStart = '['; + break; + default: + return false; + } + + var foundIndex = str.indexOf(enclosureStart); + if (foundIndex < 0) { + return false; + } + + return str.slice(foundIndex + 1, -1).includes(slash); +} + +function isGlobby(str) { + if (/\([^()]+$/.test(str)) { + return true; + } + if (str[0] === '{' || str[0] === '[') { + return true; + } + if (/[^\\][{[]/.test(str)) { + return true; + } + return isGlob(str); +} diff --git a/node_modules/glob-parent/package.json b/node_modules/glob-parent/package.json new file mode 100644 index 0000000..baeab42 --- /dev/null +++ b/node_modules/glob-parent/package.json @@ -0,0 +1,54 @@ +{ + "name": "glob-parent", + "version": "6.0.2", + "description": "Extract the non-magic parent path from a glob string.", + "author": "Gulp Team (https://gulpjs.com/)", + "contributors": [ + "Elan Shanker (https://github.com/es128)", + "Blaine Bublitz " + ], + "repository": "gulpjs/glob-parent", + "license": "ISC", + "engines": { + "node": ">=10.13.0" + }, + "main": "index.js", + "files": [ + "LICENSE", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "nyc mocha --async-only" + }, + "dependencies": { + "is-glob": "^4.0.3" + }, + "devDependencies": { + "eslint": "^7.0.0", + "eslint-config-gulp": "^5.0.0", + "expect": "^26.0.1", + "mocha": "^7.1.2", + "nyc": "^15.0.1" + }, + "nyc": { + "reporter": [ + "lcov", + "text-summary" + ] + }, + "prettier": { + "singleQuote": true + }, + "keywords": [ + "glob", + "parent", + "strip", + "path", + "dirname", + "directory", + "base", + "wildcard" + ] +} diff --git a/node_modules/hasown/.eslintrc b/node_modules/hasown/.eslintrc new file mode 100644 index 0000000..3b5d9e9 --- /dev/null +++ b/node_modules/hasown/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/hasown/.github/FUNDING.yml b/node_modules/hasown/.github/FUNDING.yml new file mode 100644 index 0000000..d68c8b7 --- /dev/null +++ b/node_modules/hasown/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/hasown +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/hasown/.nycrc b/node_modules/hasown/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/hasown/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/hasown/CHANGELOG.md b/node_modules/hasown/CHANGELOG.md new file mode 100644 index 0000000..2b0a980 --- /dev/null +++ b/node_modules/hasown/CHANGELOG.md @@ -0,0 +1,40 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.0.2](https://github.com/inspect-js/hasOwn/compare/v2.0.1...v2.0.2) - 2024-03-10 + +### Commits + +- [types] use shared config [`68e9d4d`](https://github.com/inspect-js/hasOwn/commit/68e9d4dab6facb4f05f02c6baea94a3f2a4e44b2) +- [actions] remove redundant finisher; use reusable workflow [`241a68e`](https://github.com/inspect-js/hasOwn/commit/241a68e13ea1fe52bec5ba7f74144befc31fae7b) +- [Tests] increase coverage [`4125c0d`](https://github.com/inspect-js/hasOwn/commit/4125c0d6121db56ae30e38346dfb0c000b04f0a7) +- [Tests] skip `npm ls` in old node due to TS [`01b9282`](https://github.com/inspect-js/hasOwn/commit/01b92822f9971dea031eafdd14767df41d61c202) +- [types] improve predicate type [`d340f85`](https://github.com/inspect-js/hasOwn/commit/d340f85ce02e286ef61096cbbb6697081d40a12b) +- [Dev Deps] update `tape` [`70089fc`](https://github.com/inspect-js/hasOwn/commit/70089fcf544e64acc024cbe60f5a9b00acad86de) +- [Tests] use `@arethetypeswrong/cli` [`50b272c`](https://github.com/inspect-js/hasOwn/commit/50b272c829f40d053a3dd91c9796e0ac0b2af084) + +## [v2.0.1](https://github.com/inspect-js/hasOwn/compare/v2.0.0...v2.0.1) - 2024-02-10 + +### Commits + +- [types] use a handwritten d.ts file; fix exported type [`012b989`](https://github.com/inspect-js/hasOwn/commit/012b9898ccf91dc441e2ebf594ff70270a5fda58) +- [Dev Deps] update `@types/function-bind`, `@types/mock-property`, `@types/tape`, `aud`, `mock-property`, `npmignore`, `tape`, `typescript` [`977a56f`](https://github.com/inspect-js/hasOwn/commit/977a56f51a1f8b20566f3c471612137894644025) +- [meta] add `sideEffects` flag [`3a60b7b`](https://github.com/inspect-js/hasOwn/commit/3a60b7bf42fccd8c605e5f145a6fcc83b13cb46f) + +## [v2.0.0](https://github.com/inspect-js/hasOwn/compare/v1.0.1...v2.0.0) - 2023-10-19 + +### Commits + +- revamped implementation, tests, readme [`72bf8b3`](https://github.com/inspect-js/hasOwn/commit/72bf8b338e77a638f0a290c63ffaed18339c36b4) +- [meta] revamp package.json [`079775f`](https://github.com/inspect-js/hasOwn/commit/079775fb1ec72c1c6334069593617a0be3847458) +- Only apps should have lockfiles [`6640e23`](https://github.com/inspect-js/hasOwn/commit/6640e233d1bb8b65260880f90787637db157d215) + +## v1.0.1 - 2023-10-10 + +### Commits + +- Initial commit [`8dbfde6`](https://github.com/inspect-js/hasOwn/commit/8dbfde6e8fb0ebb076fab38d138f2984eb340a62) diff --git a/node_modules/hasown/LICENSE b/node_modules/hasown/LICENSE new file mode 100644 index 0000000..0314929 --- /dev/null +++ b/node_modules/hasown/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Jordan Harband and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/hasown/README.md b/node_modules/hasown/README.md new file mode 100644 index 0000000..f759b8a --- /dev/null +++ b/node_modules/hasown/README.md @@ -0,0 +1,40 @@ +# hasown [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +A robust, ES3 compatible, "has own property" predicate. + +## Example + +```js +const assert = require('assert'); +const hasOwn = require('hasown'); + +assert.equal(hasOwn({}, 'toString'), false); +assert.equal(hasOwn([], 'length'), true); +assert.equal(hasOwn({ a: 42 }, 'a'), true); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/hasown +[npm-version-svg]: https://versionbadg.es/inspect-js/hasown.svg +[deps-svg]: https://david-dm.org/inspect-js/hasOwn.svg +[deps-url]: https://david-dm.org/inspect-js/hasOwn +[dev-deps-svg]: https://david-dm.org/inspect-js/hasOwn/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/hasOwn#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/hasown.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/hasown.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/hasown.svg +[downloads-url]: https://npm-stat.com/charts.html?package=hasown +[codecov-image]: https://codecov.io/gh/inspect-js/hasOwn/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/hasOwn/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/hasOwn +[actions-url]: https://github.com/inspect-js/hasOwn/actions diff --git a/node_modules/hasown/index.d.ts b/node_modules/hasown/index.d.ts new file mode 100644 index 0000000..aafdf3b --- /dev/null +++ b/node_modules/hasown/index.d.ts @@ -0,0 +1,3 @@ +declare function hasOwn(o: O, p: K): o is O & Record; + +export = hasOwn; diff --git a/node_modules/hasown/index.js b/node_modules/hasown/index.js new file mode 100644 index 0000000..34e6059 --- /dev/null +++ b/node_modules/hasown/index.js @@ -0,0 +1,8 @@ +'use strict'; + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = require('function-bind'); + +/** @type {import('.')} */ +module.exports = bind.call(call, $hasOwn); diff --git a/node_modules/hasown/package.json b/node_modules/hasown/package.json new file mode 100644 index 0000000..8502e13 --- /dev/null +++ b/node_modules/hasown/package.json @@ -0,0 +1,92 @@ +{ + "name": "hasown", + "version": "2.0.2", + "description": "A robust, ES3 compatible, \"has own property\" predicate.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "types": "index.d.ts", + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "npm run tsc", + "pretest": "npm run lint", + "tsc": "tsc -p .", + "posttsc": "attw -P", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/hasOwn.git" + }, + "keywords": [ + "has", + "hasOwnProperty", + "hasOwn", + "has-own", + "own", + "has", + "property", + "in", + "javascript", + "ecmascript" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/hasOwn/issues" + }, + "homepage": "https://github.com/inspect-js/hasOwn#readme", + "dependencies": { + "function-bind": "^1.1.2" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.15.1", + "@ljharb/eslint-config": "^21.1.0", + "@ljharb/tsconfig": "^0.2.0", + "@types/function-bind": "^1.1.10", + "@types/mock-property": "^1.0.2", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "mock-property": "^1.0.3", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "test" + ] + } +} diff --git a/node_modules/hasown/tsconfig.json b/node_modules/hasown/tsconfig.json new file mode 100644 index 0000000..0930c56 --- /dev/null +++ b/node_modules/hasown/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "@ljharb/tsconfig", + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/is-binary-path/index.d.ts b/node_modules/is-binary-path/index.d.ts new file mode 100644 index 0000000..19dcd43 --- /dev/null +++ b/node_modules/is-binary-path/index.d.ts @@ -0,0 +1,17 @@ +/** +Check if a file path is a binary file. + +@example +``` +import isBinaryPath = require('is-binary-path'); + +isBinaryPath('source/unicorn.png'); +//=> true + +isBinaryPath('source/unicorn.txt'); +//=> false +``` +*/ +declare function isBinaryPath(filePath: string): boolean; + +export = isBinaryPath; diff --git a/node_modules/is-binary-path/index.js b/node_modules/is-binary-path/index.js new file mode 100644 index 0000000..ef7548c --- /dev/null +++ b/node_modules/is-binary-path/index.js @@ -0,0 +1,7 @@ +'use strict'; +const path = require('path'); +const binaryExtensions = require('binary-extensions'); + +const extensions = new Set(binaryExtensions); + +module.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase()); diff --git a/node_modules/is-binary-path/license b/node_modules/is-binary-path/license new file mode 100644 index 0000000..401b1c7 --- /dev/null +++ b/node_modules/is-binary-path/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/is-binary-path/package.json b/node_modules/is-binary-path/package.json new file mode 100644 index 0000000..a8d005a --- /dev/null +++ b/node_modules/is-binary-path/package.json @@ -0,0 +1,40 @@ +{ + "name": "is-binary-path", + "version": "2.1.0", + "description": "Check if a file path is a binary file", + "license": "MIT", + "repository": "sindresorhus/is-binary-path", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "binary", + "extensions", + "extension", + "file", + "path", + "check", + "detect", + "is" + ], + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/is-binary-path/readme.md b/node_modules/is-binary-path/readme.md new file mode 100644 index 0000000..b4ab025 --- /dev/null +++ b/node_modules/is-binary-path/readme.md @@ -0,0 +1,34 @@ +# is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path) + +> Check if a file path is a binary file + + +## Install + +``` +$ npm install is-binary-path +``` + + +## Usage + +```js +const isBinaryPath = require('is-binary-path'); + +isBinaryPath('source/unicorn.png'); +//=> true + +isBinaryPath('source/unicorn.txt'); +//=> false +``` + + +## Related + +- [binary-extensions](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions +- [is-text-path](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com), [Paul Miller](https://paulmillr.com) diff --git a/node_modules/is-core-module/.eslintrc b/node_modules/is-core-module/.eslintrc new file mode 100644 index 0000000..f2e0726 --- /dev/null +++ b/node_modules/is-core-module/.eslintrc @@ -0,0 +1,18 @@ +{ + "extends": "@ljharb", + "root": true, + "rules": { + "func-style": 1, + }, + "overrides": [ + { + "files": "test/**", + "rules": { + "global-require": 0, + "max-depth": 0, + "max-lines-per-function": 0, + "no-negated-condition": 0, + }, + }, + ], +} diff --git a/node_modules/is-core-module/.nycrc b/node_modules/is-core-module/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/is-core-module/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-core-module/CHANGELOG.md b/node_modules/is-core-module/CHANGELOG.md new file mode 100644 index 0000000..0177c82 --- /dev/null +++ b/node_modules/is-core-module/CHANGELOG.md @@ -0,0 +1,218 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.16.1](https://github.com/inspect-js/is-core-module/compare/v2.16.0...v2.16.1) - 2024-12-21 + +### Fixed + +- [Fix] `node:sqlite` is available in node ^22.13 [`#17`](https://github.com/inspect-js/is-core-module/issues/17) + +## [v2.16.0](https://github.com/inspect-js/is-core-module/compare/v2.15.1...v2.16.0) - 2024-12-13 + +### Commits + +- [New] add `node:sqlite` [`1ee94d2`](https://github.com/inspect-js/is-core-module/commit/1ee94d20857e22cdb24e9b4bb1a2097f2e03e26f) +- [Dev Deps] update `auto-changelog`, `tape` [`aa84aa3`](https://github.com/inspect-js/is-core-module/commit/aa84aa34face677f14e08ec1c737f0c4bba27260) + +## [v2.15.1](https://github.com/inspect-js/is-core-module/compare/v2.15.0...v2.15.1) - 2024-08-21 + +### Commits + +- [Tests] add `process.getBuiltinModule` tests [`28c7791`](https://github.com/inspect-js/is-core-module/commit/28c7791c196d58c64cfdf638b7e68ed1b62a4da0) +- [Fix] `test/mock_loader` is no longer exposed as of v22.7 [`68b08b0`](https://github.com/inspect-js/is-core-module/commit/68b08b0d7963447dbffa5142e8810dca550383af) +- [Tests] replace `aud` with `npm audit` [`32f8060`](https://github.com/inspect-js/is-core-module/commit/32f806026dac14f9016be4401a643851240c76b9) +- [Dev Deps] update `mock-property` [`f7d3c8f`](https://github.com/inspect-js/is-core-module/commit/f7d3c8f01e922be49621683eb41477c4f50522e1) +- [Dev Deps] add missing peer dep [`eaee885`](https://github.com/inspect-js/is-core-module/commit/eaee885b67238819e9c8ed5bd2098766e1d05331) + +## [v2.15.0](https://github.com/inspect-js/is-core-module/compare/v2.14.0...v2.15.0) - 2024-07-17 + +### Commits + +- [New] add `node:sea` [`2819fb3`](https://github.com/inspect-js/is-core-module/commit/2819fb3eae312fa64643bc5430ebd06ec0f3fb88) + +## [v2.14.0](https://github.com/inspect-js/is-core-module/compare/v2.13.1...v2.14.0) - 2024-06-20 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `mock-property`, `npmignore`, `tape` [`0e43200`](https://github.com/inspect-js/is-core-module/commit/0e432006d97237cc082d41e6a593e87c81068364) +- [meta] add missing `engines.node` [`4ea3af8`](https://github.com/inspect-js/is-core-module/commit/4ea3af88891a1d4f96026f0ec0ef08c67cd1bd24) +- [New] add `test/mock_loader` [`e9fbd29`](https://github.com/inspect-js/is-core-module/commit/e9fbd2951383be070aeffb9ebbf3715237282610) +- [Deps] update `hasown` [`57f1940`](https://github.com/inspect-js/is-core-module/commit/57f1940947b3e368abdf529232d2f17d88909358) + +## [v2.13.1](https://github.com/inspect-js/is-core-module/compare/v2.13.0...v2.13.1) - 2023-10-20 + +### Commits + +- [Refactor] use `hasown` instead of `has` [`0e52096`](https://github.com/inspect-js/is-core-module/commit/0e520968b0a725276b67420ab4b877486b243ae0) +- [Dev Deps] update `mock-property`, `tape` [`8736b35`](https://github.com/inspect-js/is-core-module/commit/8736b35464d0f297b55da2c6b30deee04b8303c5) + +## [v2.13.0](https://github.com/inspect-js/is-core-module/compare/v2.12.1...v2.13.0) - 2023-08-05 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `semver`, `tape` [`c75b263`](https://github.com/inspect-js/is-core-module/commit/c75b263d047cb53430c3970107e5eb64d6cd6c0c) +- [New] `node:test/reporters` and `wasi`/`node:wasi` are in v18.17 [`d76cbf8`](https://github.com/inspect-js/is-core-module/commit/d76cbf8e9b208acfd98913fed5a5f45cb15fe5dc) + +## [v2.12.1](https://github.com/inspect-js/is-core-module/compare/v2.12.0...v2.12.1) - 2023-05-16 + +### Commits + +- [Fix] `test/reporters` now requires the `node:` prefix as of v20.2 [`12183d0`](https://github.com/inspect-js/is-core-module/commit/12183d0d8e4edf56b6ce18a1b3be54bfce10175b) + +## [v2.12.0](https://github.com/inspect-js/is-core-module/compare/v2.11.0...v2.12.0) - 2023-04-10 + +### Commits + +- [actions] update rebase action to use reusable workflow [`c0a7251`](https://github.com/inspect-js/is-core-module/commit/c0a7251f734f3c621932c5fcdfd1bf966b42ca32) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`9ae8b7f`](https://github.com/inspect-js/is-core-module/commit/9ae8b7fac03c369861d0991b4a2ce8d4848e6a7d) +- [New] `test/reporters` added in v19.9, `wasi` added in v20 [`9d5341a`](https://github.com/inspect-js/is-core-module/commit/9d5341ab32053f25b7fa7db3c0e18461db24a79c) +- [Dev Deps] add missing `in-publish` dep [`5980245`](https://github.com/inspect-js/is-core-module/commit/59802456e9ac919fa748f53be9d8fbf304a197df) + +## [v2.11.0](https://github.com/inspect-js/is-core-module/compare/v2.10.0...v2.11.0) - 2022-10-18 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`3360011`](https://github.com/inspect-js/is-core-module/commit/33600118857b46177178072fba2affcdeb009d12) +- [Dev Deps] update `aud`, `tape` [`651c6b0`](https://github.com/inspect-js/is-core-module/commit/651c6b0cc2799d4130866cf43ad333dcade3d26c) +- [New] `inspector/promises` and `node:inspector/promises` is now available in node 19 [`22d332f`](https://github.com/inspect-js/is-core-module/commit/22d332fe22ac050305444e0781ff85af819abcb0) + +## [v2.10.0](https://github.com/inspect-js/is-core-module/compare/v2.9.0...v2.10.0) - 2022-08-03 + +### Commits + +- [New] `node:test` is now available in node ^16.17 [`e8fd36e`](https://github.com/inspect-js/is-core-module/commit/e8fd36e9b86c917775a07cc473b62a3294f459f2) +- [Tests] improve skip message [`c014a4c`](https://github.com/inspect-js/is-core-module/commit/c014a4c0cd6eb15fff573ae4709191775e70cab4) + +## [v2.9.0](https://github.com/inspect-js/is-core-module/compare/v2.8.1...v2.9.0) - 2022-04-19 + +### Commits + +- [New] add `node:test`, in node 18+ [`f853eca`](https://github.com/inspect-js/is-core-module/commit/f853eca801d0a7d4e1dbb670f1b6d9837d9533c5) +- [Tests] use `mock-property` [`03b3644`](https://github.com/inspect-js/is-core-module/commit/03b3644dff4417f4ba5a7d0aa0138f5f6b3e5c46) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`7c0e2d0`](https://github.com/inspect-js/is-core-module/commit/7c0e2d06ed2a89acf53abe2ab34d703ed5b03455) +- [meta] simplify "exports" [`d6ed201`](https://github.com/inspect-js/is-core-module/commit/d6ed201eba7fbba0e59814a9050fc49a6e9878c8) + +## [v2.8.1](https://github.com/inspect-js/is-core-module/compare/v2.8.0...v2.8.1) - 2022-01-05 + +### Commits + +- [actions] reuse common workflows [`cd2cf9b`](https://github.com/inspect-js/is-core-module/commit/cd2cf9b3b66c8d328f65610efe41e9325db7716d) +- [Fix] update node 0.4 results [`062195d`](https://github.com/inspect-js/is-core-module/commit/062195d89f0876a88b95d378b43f7fcc1205bc5b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0790b62`](https://github.com/inspect-js/is-core-module/commit/0790b6222848c6167132f9f73acc3520fa8d1298) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`7d139a6`](https://github.com/inspect-js/is-core-module/commit/7d139a6d767709eabf0a0251e074ec1fb230c06e) +- [Tests] run `nyc` in `tests-only`, not `test` [`780e8a0`](https://github.com/inspect-js/is-core-module/commit/780e8a049951c71cf78b1707f0871c48a28bde14) + +## [v2.8.0](https://github.com/inspect-js/is-core-module/compare/v2.7.0...v2.8.0) - 2021-10-14 + +### Commits + +- [actions] update codecov uploader [`0cfe94e`](https://github.com/inspect-js/is-core-module/commit/0cfe94e106a7d005ea03e008c0a21dec13a77904) +- [New] add `readline/promises` to node v17+ [`4f78c30`](https://github.com/inspect-js/is-core-module/commit/4f78c3008b1b58b4db6dc91d99610b1bc859da7e) +- [Tests] node ^14.18 supports `node:` prefixes for CJS [`43e2f17`](https://github.com/inspect-js/is-core-module/commit/43e2f177452cea2f0eaf34f61b5407217bbdb6f4) + +## [v2.7.0](https://github.com/inspect-js/is-core-module/compare/v2.6.0...v2.7.0) - 2021-09-27 + +### Commits + +- [New] node `v14.18` added `node:`-prefixed core modules to `require` [`6d943ab`](https://github.com/inspect-js/is-core-module/commit/6d943abe81382b9bbe344384d80fbfebe1cc0526) +- [Tests] add coverage for Object.prototype pollution [`c6baf5f`](https://github.com/inspect-js/is-core-module/commit/c6baf5f942311a1945c1af41167bb80b84df2af7) +- [Dev Deps] update `@ljharb/eslint-config` [`6717f00`](https://github.com/inspect-js/is-core-module/commit/6717f000d063ea57beb772bded36c2f056ac404c) +- [eslint] fix linter warning [`594c10b`](https://github.com/inspect-js/is-core-module/commit/594c10bb7d39d7eb00925c90924199ff596184b2) +- [meta] add `sideEffects` flag [`c32cfa5`](https://github.com/inspect-js/is-core-module/commit/c32cfa5195632944c4dd4284a142b8476e75be13) + +## [v2.6.0](https://github.com/inspect-js/is-core-module/compare/v2.5.0...v2.6.0) - 2021-08-17 + +### Commits + +- [Dev Deps] update `eslint`, `tape` [`6cc928f`](https://github.com/inspect-js/is-core-module/commit/6cc928f8a4bba66aeeccc4f6beeac736d4bd3081) +- [New] add `stream/consumers` to node `>= 16.7` [`a1a423e`](https://github.com/inspect-js/is-core-module/commit/a1a423e467e4cc27df180234fad5bab45943e67d) +- [Refactor] Remove duplicated `&&` operand [`86faea7`](https://github.com/inspect-js/is-core-module/commit/86faea738213a2433c62d1098488dc9314dca832) +- [Tests] include prereleases [`a4da7a6`](https://github.com/inspect-js/is-core-module/commit/a4da7a6abf7568e2aa4fd98e69452179f1850963) + +## [v2.5.0](https://github.com/inspect-js/is-core-module/compare/v2.4.0...v2.5.0) - 2021-07-12 + +### Commits + +- [Dev Deps] update `auto-changelog`, `eslint` [`6334cc9`](https://github.com/inspect-js/is-core-module/commit/6334cc94f3af7469685bd8f236740991baaf2705) +- [New] add `stream/web` to node v16.5+ [`17ac59b`](https://github.com/inspect-js/is-core-module/commit/17ac59b662d63e220a2e5728625f005c24f177b2) + +## [v2.4.0](https://github.com/inspect-js/is-core-module/compare/v2.3.0...v2.4.0) - 2021-05-09 + +### Commits + +- [readme] add actions and codecov badges [`82b7faa`](https://github.com/inspect-js/is-core-module/commit/82b7faa12b56dbe47fbea67e1a5b9e447027ba40) +- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`8096868`](https://github.com/inspect-js/is-core-module/commit/8096868c024a161ccd4d44110b136763e92eace8) +- [Dev Deps] update `eslint` [`6726824`](https://github.com/inspect-js/is-core-module/commit/67268249b88230018c510f6532a8046d7326346f) +- [New] add `diagnostics_channel` to node `^14.17` [`86c6563`](https://github.com/inspect-js/is-core-module/commit/86c65634201b8ff9b3e48a9a782594579c7f5c3c) +- [meta] fix prepublish script [`697a01e`](https://github.com/inspect-js/is-core-module/commit/697a01e3c9c0be074066520954f30fb28532ec57) + +## [v2.3.0](https://github.com/inspect-js/is-core-module/compare/v2.2.0...v2.3.0) - 2021-04-24 + +### Commits + +- [meta] do not publish github action workflow files [`060d4bb`](https://github.com/inspect-js/is-core-module/commit/060d4bb971a29451c19ff336eb56bee27f9fa95a) +- [New] add support for `node:` prefix, in node 16+ [`7341223`](https://github.com/inspect-js/is-core-module/commit/73412230a769f6e81c05eea50b6520cebf54ed2f) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`016269a`](https://github.com/inspect-js/is-core-module/commit/016269abae9f6657a5254adfbb813f09a05067f9) +- [patch] remove unneeded `.0` in version ranges [`cb466a6`](https://github.com/inspect-js/is-core-module/commit/cb466a6d89e52b8389e5c12715efcd550c41cea3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`c9f9c39`](https://github.com/inspect-js/is-core-module/commit/c9f9c396ace60ef81906f98059c064e6452473ed) +- [actions] update workflows [`3ee4a89`](https://github.com/inspect-js/is-core-module/commit/3ee4a89fd5a02fccd43882d905448ea6a98e9a3c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`dee4fed`](https://github.com/inspect-js/is-core-module/commit/dee4fed79690c1d43a22f7fa9426abebdc6d727f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`7d046ba`](https://github.com/inspect-js/is-core-module/commit/7d046ba07ae8c9292e43652694ca808d7b309de8) +- [meta] use `prepublishOnly` script for npm 7+ [`149e677`](https://github.com/inspect-js/is-core-module/commit/149e6771a5ede6d097e71785b467a9c4b4977cc7) +- [readme] remove travis badge [`903b51d`](https://github.com/inspect-js/is-core-module/commit/903b51d6b69b98abeabfbc3695c345b02646f19c) + +## [v2.2.0](https://github.com/inspect-js/is-core-module/compare/v2.1.0...v2.2.0) - 2020-11-26 + +### Commits + +- [Tests] migrate tests to Github Actions [`c919f57`](https://github.com/inspect-js/is-core-module/commit/c919f573c0a92d10a0acad0b650b5aecb033d426) +- [patch] `core.json`: %s/ /\t/g [`db3f685`](https://github.com/inspect-js/is-core-module/commit/db3f68581f53e73cc09cd675955eb1bdd6a5a39b) +- [Tests] run `nyc` on all tests [`b2f925f`](https://github.com/inspect-js/is-core-module/commit/b2f925f8866f210ef441f39fcc8cc42692ab89b1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`; add `safe-publish-latest` [`89f02a2`](https://github.com/inspect-js/is-core-module/commit/89f02a2b4162246dea303a6ee31bb9a550b05c72) +- [New] add `path/posix`, `path/win32`, `util/types` [`77f94f1`](https://github.com/inspect-js/is-core-module/commit/77f94f1e90ffd7c0be2a3f1aa8574ebf7fd981b3) + +## [v2.1.0](https://github.com/inspect-js/is-core-module/compare/v2.0.0...v2.1.0) - 2020-11-04 + +### Commits + +- [Dev Deps] update `eslint` [`5e0034e`](https://github.com/inspect-js/is-core-module/commit/5e0034eae57c09c8f1bd769f502486a00f56c6e4) +- [New] Add `diagnostics_channel` [`c2d83d0`](https://github.com/inspect-js/is-core-module/commit/c2d83d0a0225a1a658945d9bab7036ea347d29ec) + +## [v2.0.0](https://github.com/inspect-js/is-core-module/compare/v1.0.2...v2.0.0) - 2020-09-29 + +### Commits + +- v2 implementation [`865aeb5`](https://github.com/inspect-js/is-core-module/commit/865aeb5ca0e90248a3dfff5d7622e4751fdeb9cd) +- Only apps should have lockfiles [`5a5e660`](https://github.com/inspect-js/is-core-module/commit/5a5e660d568e37eb44e17fb1ebb12a105205fc2b) +- Initial commit for v2 [`5a51524`](https://github.com/inspect-js/is-core-module/commit/5a51524e06f92adece5fbb138c69b7b9748a2348) +- Tests [`116eae4`](https://github.com/inspect-js/is-core-module/commit/116eae4fccd01bc72c1fd3cc4b7561c387afc496) +- [meta] add `auto-changelog` [`c24388b`](https://github.com/inspect-js/is-core-module/commit/c24388bee828d223040519d1f5b226ca35beee63) +- [actions] add "Automatic Rebase" and "require allow edits" actions [`34292db`](https://github.com/inspect-js/is-core-module/commit/34292dbcbadae0868aff03c22dbd8b7b8a11558a) +- [Tests] add `npm run lint` [`4f9eeee`](https://github.com/inspect-js/is-core-module/commit/4f9eeee7ddff10698bbf528620f4dc8d4fa3e697) +- [readme] fix travis badges, https all URLs [`e516a73`](https://github.com/inspect-js/is-core-module/commit/e516a73b0dccce20938c432b1ba512eae8eff9e9) +- [meta] create FUNDING.yml [`1aabebc`](https://github.com/inspect-js/is-core-module/commit/1aabebca98d01f8a04e46bc2e2520fa93cf21ac6) +- [Fix] `domain`: domain landed sometime > v0.7.7 and <= v0.7.12 [`2df7d37`](https://github.com/inspect-js/is-core-module/commit/2df7d37595d41b15eeada732b706b926c2771655) +- [Fix] `sys`: worked in 0.6, not 0.7, and 0.8+ [`a75c134`](https://github.com/inspect-js/is-core-module/commit/a75c134229e1e9441801f6b73f6a52489346eb65) + +## [v1.0.2](https://github.com/inspect-js/is-core-module/compare/v1.0.1...v1.0.2) - 2014-09-28 + +### Commits + +- simpler [`66fe90f`](https://github.com/inspect-js/is-core-module/commit/66fe90f9771581b9adc0c3900baa52c21b5baea2) + +## [v1.0.1](https://github.com/inspect-js/is-core-module/compare/v1.0.0...v1.0.1) - 2014-09-28 + +### Commits + +- remove stupid [`f21f906`](https://github.com/inspect-js/is-core-module/commit/f21f906f882c2bd656a5fc5ed6fbe48ddaffb2ac) +- update readme [`1eff0ec`](https://github.com/inspect-js/is-core-module/commit/1eff0ec69798d1ec65771552d1562911e90a8027) + +## v1.0.0 - 2014-09-28 + +### Commits + +- init [`48e5e76`](https://github.com/inspect-js/is-core-module/commit/48e5e76cac378fddb8c1f7d4055b8dfc943d6b96) diff --git a/node_modules/is-core-module/LICENSE b/node_modules/is-core-module/LICENSE new file mode 100644 index 0000000..2e50287 --- /dev/null +++ b/node_modules/is-core-module/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Dave Justice + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/is-core-module/README.md b/node_modules/is-core-module/README.md new file mode 100644 index 0000000..062d906 --- /dev/null +++ b/node_modules/is-core-module/README.md @@ -0,0 +1,40 @@ +# is-core-module [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this specifier a node.js core module? Optionally provide a node version to check; defaults to the current node version. + +## Example + +```js +var isCore = require('is-core-module'); +var assert = require('assert'); +assert(isCore('fs')); +assert(!isCore('butts')); +``` + +## Tests +Clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-core-module +[2]: https://versionbadg.es/inspect-js/is-core-module.svg +[5]: https://david-dm.org/inspect-js/is-core-module.svg +[6]: https://david-dm.org/inspect-js/is-core-module +[7]: https://david-dm.org/inspect-js/is-core-module/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-core-module#info=devDependencies +[11]: https://nodei.co/npm/is-core-module.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-core-module.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-core-module.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-core-module +[codecov-image]: https://codecov.io/gh/inspect-js/is-core-module/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-core-module/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-core-module +[actions-url]: https://github.com/inspect-js/is-core-module/actions diff --git a/node_modules/is-core-module/core.json b/node_modules/is-core-module/core.json new file mode 100644 index 0000000..930ec68 --- /dev/null +++ b/node_modules/is-core-module/core.json @@ -0,0 +1,162 @@ +{ + "assert": true, + "node:assert": [">= 14.18 && < 15", ">= 16"], + "assert/strict": ">= 15", + "node:assert/strict": ">= 16", + "async_hooks": ">= 8", + "node:async_hooks": [">= 14.18 && < 15", ">= 16"], + "buffer_ieee754": ">= 0.5 && < 0.9.7", + "buffer": true, + "node:buffer": [">= 14.18 && < 15", ">= 16"], + "child_process": true, + "node:child_process": [">= 14.18 && < 15", ">= 16"], + "cluster": ">= 0.5", + "node:cluster": [">= 14.18 && < 15", ">= 16"], + "console": true, + "node:console": [">= 14.18 && < 15", ">= 16"], + "constants": true, + "node:constants": [">= 14.18 && < 15", ">= 16"], + "crypto": true, + "node:crypto": [">= 14.18 && < 15", ">= 16"], + "_debug_agent": ">= 1 && < 8", + "_debugger": "< 8", + "dgram": true, + "node:dgram": [">= 14.18 && < 15", ">= 16"], + "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"], + "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], + "dns": true, + "node:dns": [">= 14.18 && < 15", ">= 16"], + "dns/promises": ">= 15", + "node:dns/promises": ">= 16", + "domain": ">= 0.7.12", + "node:domain": [">= 14.18 && < 15", ">= 16"], + "events": true, + "node:events": [">= 14.18 && < 15", ">= 16"], + "freelist": "< 6", + "fs": true, + "node:fs": [">= 14.18 && < 15", ">= 16"], + "fs/promises": [">= 10 && < 10.1", ">= 14"], + "node:fs/promises": [">= 14.18 && < 15", ">= 16"], + "_http_agent": ">= 0.11.1", + "node:_http_agent": [">= 14.18 && < 15", ">= 16"], + "_http_client": ">= 0.11.1", + "node:_http_client": [">= 14.18 && < 15", ">= 16"], + "_http_common": ">= 0.11.1", + "node:_http_common": [">= 14.18 && < 15", ">= 16"], + "_http_incoming": ">= 0.11.1", + "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], + "_http_outgoing": ">= 0.11.1", + "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], + "_http_server": ">= 0.11.1", + "node:_http_server": [">= 14.18 && < 15", ">= 16"], + "http": true, + "node:http": [">= 14.18 && < 15", ">= 16"], + "http2": ">= 8.8", + "node:http2": [">= 14.18 && < 15", ">= 16"], + "https": true, + "node:https": [">= 14.18 && < 15", ">= 16"], + "inspector": ">= 8", + "node:inspector": [">= 14.18 && < 15", ">= 16"], + "inspector/promises": [">= 19"], + "node:inspector/promises": [">= 19"], + "_linklist": "< 8", + "module": true, + "node:module": [">= 14.18 && < 15", ">= 16"], + "net": true, + "node:net": [">= 14.18 && < 15", ">= 16"], + "node-inspect/lib/_inspect": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", + "os": true, + "node:os": [">= 14.18 && < 15", ">= 16"], + "path": true, + "node:path": [">= 14.18 && < 15", ">= 16"], + "path/posix": ">= 15.3", + "node:path/posix": ">= 16", + "path/win32": ">= 15.3", + "node:path/win32": ">= 16", + "perf_hooks": ">= 8.5", + "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], + "process": ">= 1", + "node:process": [">= 14.18 && < 15", ">= 16"], + "punycode": ">= 0.5", + "node:punycode": [">= 14.18 && < 15", ">= 16"], + "querystring": true, + "node:querystring": [">= 14.18 && < 15", ">= 16"], + "readline": true, + "node:readline": [">= 14.18 && < 15", ">= 16"], + "readline/promises": ">= 17", + "node:readline/promises": ">= 17", + "repl": true, + "node:repl": [">= 14.18 && < 15", ">= 16"], + "node:sea": [">= 20.12 && < 21", ">= 21.7"], + "smalloc": ">= 0.11.5 && < 3", + "node:sqlite": [">= 22.13 && < 23", ">= 23.4"], + "_stream_duplex": ">= 0.9.4", + "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], + "_stream_transform": ">= 0.9.4", + "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], + "_stream_wrap": ">= 1.4.1", + "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], + "_stream_passthrough": ">= 0.9.4", + "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], + "_stream_readable": ">= 0.9.4", + "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], + "_stream_writable": ">= 0.9.4", + "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], + "stream": true, + "node:stream": [">= 14.18 && < 15", ">= 16"], + "stream/consumers": ">= 16.7", + "node:stream/consumers": ">= 16.7", + "stream/promises": ">= 15", + "node:stream/promises": ">= 16", + "stream/web": ">= 16.5", + "node:stream/web": ">= 16.5", + "string_decoder": true, + "node:string_decoder": [">= 14.18 && < 15", ">= 16"], + "sys": [">= 0.4 && < 0.7", ">= 0.8"], + "node:sys": [">= 14.18 && < 15", ">= 16"], + "test/reporters": ">= 19.9 && < 20.2", + "node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"], + "test/mock_loader": ">= 22.3 && < 22.7", + "node:test/mock_loader": ">= 22.3 && < 22.7", + "node:test": [">= 16.17 && < 17", ">= 18"], + "timers": true, + "node:timers": [">= 14.18 && < 15", ">= 16"], + "timers/promises": ">= 15", + "node:timers/promises": ">= 16", + "_tls_common": ">= 0.11.13", + "node:_tls_common": [">= 14.18 && < 15", ">= 16"], + "_tls_legacy": ">= 0.11.3 && < 10", + "_tls_wrap": ">= 0.11.3", + "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], + "tls": true, + "node:tls": [">= 14.18 && < 15", ">= 16"], + "trace_events": ">= 10", + "node:trace_events": [">= 14.18 && < 15", ">= 16"], + "tty": true, + "node:tty": [">= 14.18 && < 15", ">= 16"], + "url": true, + "node:url": [">= 14.18 && < 15", ">= 16"], + "util": true, + "node:util": [">= 14.18 && < 15", ">= 16"], + "util/types": ">= 15.3", + "node:util/types": ">= 16", + "v8/tools/arguments": ">= 10 && < 12", + "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8": ">= 1", + "node:v8": [">= 14.18 && < 15", ">= 16"], + "vm": true, + "node:vm": [">= 14.18 && < 15", ">= 16"], + "wasi": [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"], + "node:wasi": [">= 18.17 && < 19", ">= 20"], + "worker_threads": ">= 11.7", + "node:worker_threads": [">= 14.18 && < 15", ">= 16"], + "zlib": ">= 0.5", + "node:zlib": [">= 14.18 && < 15", ">= 16"] +} diff --git a/node_modules/is-core-module/index.js b/node_modules/is-core-module/index.js new file mode 100644 index 0000000..423e20c --- /dev/null +++ b/node_modules/is-core-module/index.js @@ -0,0 +1,69 @@ +'use strict'; + +var hasOwn = require('hasown'); + +function specifierIncluded(current, specifier) { + var nodeParts = current.split('.'); + var parts = specifier.split(' '); + var op = parts.length > 1 ? parts[0] : '='; + var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); + + for (var i = 0; i < 3; ++i) { + var cur = parseInt(nodeParts[i] || 0, 10); + var ver = parseInt(versionParts[i] || 0, 10); + if (cur === ver) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + if (op === '<') { + return cur < ver; + } + if (op === '>=') { + return cur >= ver; + } + return false; + } + return op === '>='; +} + +function matchesRange(current, range) { + var specifiers = range.split(/ ?&& ?/); + if (specifiers.length === 0) { + return false; + } + for (var i = 0; i < specifiers.length; ++i) { + if (!specifierIncluded(current, specifiers[i])) { + return false; + } + } + return true; +} + +function versionIncluded(nodeVersion, specifierValue) { + if (typeof specifierValue === 'boolean') { + return specifierValue; + } + + var current = typeof nodeVersion === 'undefined' + ? process.versions && process.versions.node + : nodeVersion; + + if (typeof current !== 'string') { + throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required'); + } + + if (specifierValue && typeof specifierValue === 'object') { + for (var i = 0; i < specifierValue.length; ++i) { + if (matchesRange(current, specifierValue[i])) { + return true; + } + } + return false; + } + return matchesRange(current, specifierValue); +} + +var data = require('./core.json'); + +module.exports = function isCore(x, nodeVersion) { + return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]); +}; diff --git a/node_modules/is-core-module/package.json b/node_modules/is-core-module/package.json new file mode 100644 index 0000000..2668256 --- /dev/null +++ b/node_modules/is-core-module/package.json @@ -0,0 +1,76 @@ +{ + "name": "is-core-module", + "version": "2.16.1", + "description": "Is this specifier a node.js core module?", + "main": "index.js", + "sideEffects": false, + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx npm@'>=10.2' audit --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-core-module.git" + }, + "keywords": [ + "core", + "modules", + "module", + "npm", + "node", + "dependencies" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-core-module/issues" + }, + "homepage": "https://github.com/inspect-js/is-core-module", + "dependencies": { + "hasown": "^2.0.2" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.1", + "auto-changelog": "^2.5.0", + "encoding": "^0.1.13", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "mock-property": "^1.1.0", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.1", + "tape": "^5.9.0" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/is-core-module/test/index.js b/node_modules/is-core-module/test/index.js new file mode 100644 index 0000000..7a81e1c --- /dev/null +++ b/node_modules/is-core-module/test/index.js @@ -0,0 +1,157 @@ +'use strict'; + +var test = require('tape'); +var keys = require('object-keys'); +var semver = require('semver'); +var mockProperty = require('mock-property'); + +var isCore = require('../'); +var data = require('../core.json'); + +var supportsNodePrefix = semver.satisfies(process.versions.node, '^14.18 || >= 16', { includePrerelease: true }); + +test('core modules', function (t) { + t.test('isCore()', function (st) { + st.ok(isCore('fs')); + st.ok(isCore('net')); + st.ok(isCore('http')); + + st.ok(!isCore('seq')); + st.ok(!isCore('../')); + + st.ok(!isCore('toString')); + + st.end(); + }); + + t.test('core list', function (st) { + var cores = keys(data); + st.plan(cores.length); + + for (var i = 0; i < cores.length; ++i) { + var mod = cores[i]; + var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func + if (isCore(mod)) { + st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); + } else { + st['throws'](requireFunc, mod + ' not supported; requiring throws'); + } + } + + st.end(); + }); + + t.test('core via repl module', { skip: !data.repl }, function (st) { + var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle + if (!libs) { + st.skip('repl._builtinLibs does not exist'); + } else { + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + st.ok(data[mod], mod + ' is a core module'); + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } + } + } + } + st.end(); + }); + + t.test('core via builtinModules list', { skip: !data.module }, function (st) { + var Module = require('module'); + var libs = Module.builtinModules; + if (!libs) { + st.skip('module.builtinModules does not exist'); + } else { + var excludeList = [ + '_debug_agent', + 'v8/tools/tickprocessor-driver', + 'v8/tools/SourceMap', + 'v8/tools/tickprocessor', + 'v8/tools/profile' + ]; + + // see https://github.com/nodejs/node/issues/42785 + if (semver.satisfies(process.version, '>= 18')) { + libs = libs.concat('node:test'); + } + if (semver.satisfies(process.version, '^20.12 || >= 21.7')) { + libs = libs.concat('node:sea'); + } + if (semver.satisfies(process.version, '>= 23.4')) { + libs = libs.concat('node:sqlite'); + } + + for (var i = 0; i < libs.length; ++i) { + var mod = libs[i]; + if (excludeList.indexOf(mod) === -1) { + st.ok(data[mod], mod + ' is a core module'); + + if (Module.isBuiltin) { + st.ok(Module.isBuiltin(mod), 'module.isBuiltin(' + mod + ') is true'); + } + + st.doesNotThrow( + function () { require(mod); }, // eslint-disable-line no-loop-func + 'requiring ' + mod + ' does not throw' + ); + + if (process.getBuiltinModule) { + st.equal( + process.getBuiltinModule(mod), + require(mod), + 'process.getBuiltinModule(' + mod + ') === require(' + mod + ')' + ); + } + + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } + } + } + } + } + + st.end(); + }); + + t.test('Object.prototype pollution', function (st) { + var nonKey = 'not a core module'; + st.teardown(mockProperty(Object.prototype, 'fs', { value: false })); + st.teardown(mockProperty(Object.prototype, 'path', { value: '>= 999999999' })); + st.teardown(mockProperty(Object.prototype, 'http', { value: data.http })); + st.teardown(mockProperty(Object.prototype, nonKey, { value: true })); + + st.equal(isCore('fs'), true, 'fs is a core module even if Object.prototype lies'); + st.equal(isCore('path'), true, 'path is a core module even if Object.prototype lies'); + st.equal(isCore('http'), true, 'path is a core module even if Object.prototype matches data'); + st.equal(isCore(nonKey), false, '"' + nonKey + '" is not a core module even if Object.prototype lies'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-extglob/LICENSE b/node_modules/is-extglob/LICENSE new file mode 100644 index 0000000..842218c --- /dev/null +++ b/node_modules/is-extglob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-extglob/README.md b/node_modules/is-extglob/README.md new file mode 100644 index 0000000..0416af5 --- /dev/null +++ b/node_modules/is-extglob/README.md @@ -0,0 +1,107 @@ +# is-extglob [![NPM version](https://img.shields.io/npm/v/is-extglob.svg?style=flat)](https://www.npmjs.com/package/is-extglob) [![NPM downloads](https://img.shields.io/npm/dm/is-extglob.svg?style=flat)](https://npmjs.org/package/is-extglob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-extglob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-extglob) + +> Returns true if a string has an extglob. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extglob +``` + +## Usage + +```js +var isExtglob = require('is-extglob'); +``` + +**True** + +```js +isExtglob('?(abc)'); +isExtglob('@(abc)'); +isExtglob('!(abc)'); +isExtglob('*(abc)'); +isExtglob('+(abc)'); +``` + +**False** + +Escaped extglobs: + +```js +isExtglob('\\?(abc)'); +isExtglob('\\@(abc)'); +isExtglob('\\!(abc)'); +isExtglob('\\*(abc)'); +isExtglob('\\+(abc)'); +``` + +Everything else... + +```js +isExtglob('foo.js'); +isExtglob('!foo.js'); +isExtglob('*.js'); +isExtglob('**/abc.js'); +isExtglob('abc/*.js'); +isExtglob('abc/(aaa|bbb).js'); +isExtglob('abc/[a-z].js'); +isExtglob('abc/{a,b}.js'); +isExtglob('abc/?.js'); +isExtglob('abc.js'); +isExtglob('abc/def/ghi.js'); +``` + +## History + +**v2.0** + +Adds support for escaping. Escaped exglobs no longer return true. + +## About + +### Related projects + +* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/is-extglob/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file diff --git a/node_modules/is-extglob/index.js b/node_modules/is-extglob/index.js new file mode 100644 index 0000000..c1d986f --- /dev/null +++ b/node_modules/is-extglob/index.js @@ -0,0 +1,20 @@ +/*! + * is-extglob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +module.exports = function isExtglob(str) { + if (typeof str !== 'string' || str === '') { + return false; + } + + var match; + while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { + if (match[2]) return true; + str = str.slice(match.index + match[0].length); + } + + return false; +}; diff --git a/node_modules/is-extglob/package.json b/node_modules/is-extglob/package.json new file mode 100644 index 0000000..7a90836 --- /dev/null +++ b/node_modules/is-extglob/package.json @@ -0,0 +1,69 @@ +{ + "name": "is-extglob", + "description": "Returns true if a string has an extglob.", + "version": "2.1.1", + "homepage": "https://github.com/jonschlinkert/is-extglob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extglob", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extglob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "bash", + "braces", + "check", + "exec", + "expression", + "extglob", + "glob", + "globbing", + "globstar", + "is", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-glob", + "is-glob", + "micromatch" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-glob/LICENSE b/node_modules/is-glob/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/is-glob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-glob/README.md b/node_modules/is-glob/README.md new file mode 100644 index 0000000..740724b --- /dev/null +++ b/node_modules/is-glob/README.md @@ -0,0 +1,206 @@ +# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![NPM total downloads](https://img.shields.io/npm/dt/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/github/workflow/status/micromatch/is-glob/dev)](https://github.com/micromatch/is-glob/actions) + +> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-glob +``` + +You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). + +## Usage + +```js +var isGlob = require('is-glob'); +``` + +### Default behavior + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js'); +isGlob('*.js'); +isGlob('**/abc.js'); +isGlob('abc/*.js'); +isGlob('abc/(aaa|bbb).js'); +isGlob('abc/[a-z].js'); +isGlob('abc/{a,b}.js'); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js'); +isGlob('abc/!(a).js'); +isGlob('abc/+(a).js'); +isGlob('abc/*(a).js'); +isGlob('abc/?(a).js'); +//=> true +``` + +**False** + +Escaped globs or extglobs return `false`: + +```js +isGlob('abc/\\@(a).js'); +isGlob('abc/\\!(a).js'); +isGlob('abc/\\+(a).js'); +isGlob('abc/\\*(a).js'); +isGlob('abc/\\?(a).js'); +isGlob('\\!foo.js'); +isGlob('\\*.js'); +isGlob('\\*\\*/abc.js'); +isGlob('abc/\\*.js'); +isGlob('abc/\\(aaa|bbb).js'); +isGlob('abc/\\[a-z].js'); +isGlob('abc/\\{a,b}.js'); +//=> false +``` + +Patterns that do not have glob patterns return `false`: + +```js +isGlob('abc.js'); +isGlob('abc/def/ghi.js'); +isGlob('foo.js'); +isGlob('abc/@.js'); +isGlob('abc/+.js'); +isGlob('abc/?.js'); +isGlob(); +isGlob(null); +//=> false +``` + +Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): + +```js +isGlob(['**/*.js']); +isGlob(['foo.js']); +//=> false +``` + +### Option strict + +When `options.strict === false` the behavior is less strict in determining if a pattern is a glob. Meaning that +some patterns that would return `false` may return `true`. This is done so that matching libraries like [micromatch](https://github.com/micromatch/micromatch) have a chance at determining if the pattern is a glob or not. + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js', {strict: false}); +isGlob('*.js', {strict: false}); +isGlob('**/abc.js', {strict: false}); +isGlob('abc/*.js', {strict: false}); +isGlob('abc/(aaa|bbb).js', {strict: false}); +isGlob('abc/[a-z].js', {strict: false}); +isGlob('abc/{a,b}.js', {strict: false}); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js', {strict: false}); +isGlob('abc/!(a).js', {strict: false}); +isGlob('abc/+(a).js', {strict: false}); +isGlob('abc/*(a).js', {strict: false}); +isGlob('abc/?(a).js', {strict: false}); +//=> true +``` + +**False** + +Escaped globs or extglobs return `false`: + +```js +isGlob('\\!foo.js', {strict: false}); +isGlob('\\*.js', {strict: false}); +isGlob('\\*\\*/abc.js', {strict: false}); +isGlob('abc/\\*.js', {strict: false}); +isGlob('abc/\\(aaa|bbb).js', {strict: false}); +isGlob('abc/\\[a-z].js', {strict: false}); +isGlob('abc/\\{a,b}.js', {strict: false}); +//=> false +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit") +* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base "Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks") +* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.") +* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 47 | [jonschlinkert](https://github.com/jonschlinkert) | +| 5 | [doowb](https://github.com/doowb) | +| 1 | [phated](https://github.com/phated) | +| 1 | [danhper](https://github.com/danhper) | +| 1 | [paulmillr](https://github.com/paulmillr) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on March 27, 2019._ \ No newline at end of file diff --git a/node_modules/is-glob/index.js b/node_modules/is-glob/index.js new file mode 100644 index 0000000..620f563 --- /dev/null +++ b/node_modules/is-glob/index.js @@ -0,0 +1,150 @@ +/*! + * is-glob + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +var isExtglob = require('is-extglob'); +var chars = { '{': '}', '(': ')', '[': ']'}; +var strictCheck = function(str) { + if (str[0] === '!') { + return true; + } + var index = 0; + var pipeIndex = -2; + var closeSquareIndex = -2; + var closeCurlyIndex = -2; + var closeParenIndex = -2; + var backSlashIndex = -2; + while (index < str.length) { + if (str[index] === '*') { + return true; + } + + if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) { + return true; + } + + if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') { + if (closeSquareIndex < index) { + closeSquareIndex = str.indexOf(']', index); + } + if (closeSquareIndex > index) { + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + } + } + + if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') { + closeCurlyIndex = str.indexOf('}', index); + if (closeCurlyIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { + return true; + } + } + } + + if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') { + closeParenIndex = str.indexOf(')', index); + if (closeParenIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + + if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') { + if (pipeIndex < index) { + pipeIndex = str.indexOf('|', index); + } + if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') { + closeParenIndex = str.indexOf(')', pipeIndex); + if (closeParenIndex > pipeIndex) { + backSlashIndex = str.indexOf('\\', pipeIndex); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; + +var relaxedCheck = function(str) { + if (str[0] === '!') { + return true; + } + var index = 0; + while (index < str.length) { + if (/[*?{}()[\]]/.test(str[index])) { + return true; + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; + +module.exports = function isGlob(str, options) { + if (typeof str !== 'string' || str === '') { + return false; + } + + if (isExtglob(str)) { + return true; + } + + var check = strictCheck; + + // optionally relax check + if (options && options.strict === false) { + check = relaxedCheck; + } + + return check(str); +}; diff --git a/node_modules/is-glob/package.json b/node_modules/is-glob/package.json new file mode 100644 index 0000000..858af03 --- /dev/null +++ b/node_modules/is-glob/package.json @@ -0,0 +1,81 @@ +{ + "name": "is-glob", + "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", + "version": "4.0.3", + "homepage": "https://github.com/micromatch/is-glob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Daniel Perez (https://tuvistavie.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/is-glob", + "bugs": { + "url": "https://github.com/micromatch/is-glob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha && node benchmark.js" + }, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "bash", + "braces", + "check", + "exec", + "expression", + "extglob", + "glob", + "globbing", + "globstar", + "is", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "verb": { + "layout": "default", + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assemble", + "base", + "update", + "verb" + ] + }, + "reflinks": [ + "assemble", + "bach", + "base", + "composer", + "gulp", + "has-glob", + "is-valid-glob", + "micromatch", + "npm", + "scaffold", + "verb", + "vinyl" + ] + } +} diff --git a/node_modules/is-number/LICENSE b/node_modules/is-number/LICENSE new file mode 100644 index 0000000..9af4a67 --- /dev/null +++ b/node_modules/is-number/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-number/README.md b/node_modules/is-number/README.md new file mode 100644 index 0000000..eb8149e --- /dev/null +++ b/node_modules/is-number/README.md @@ -0,0 +1,187 @@ +# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![NPM total downloads](https://img.shields.io/npm/dt/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-number) + +> Returns true if the value is a finite number. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-number +``` + +## Why is this needed? + +In JavaScript, it's not always as straightforward as it should be to reliably check if a value is a number. It's common for devs to use `+`, `-`, or `Number()` to cast a string value to a number (for example, when values are returned from user input, regex matches, parsers, etc). But there are many non-intuitive edge cases that yield unexpected results: + +```js +console.log(+[]); //=> 0 +console.log(+''); //=> 0 +console.log(+' '); //=> 0 +console.log(typeof NaN); //=> 'number' +``` + +This library offers a performant way to smooth out edge cases like these. + +## Usage + +```js +const isNumber = require('is-number'); +``` + +See the [tests](./test.js) for more examples. + +### true + +```js +isNumber(5e3); // true +isNumber(0xff); // true +isNumber(-1.1); // true +isNumber(0); // true +isNumber(1); // true +isNumber(1.1); // true +isNumber(10); // true +isNumber(10.10); // true +isNumber(100); // true +isNumber('-1.1'); // true +isNumber('0'); // true +isNumber('012'); // true +isNumber('0xff'); // true +isNumber('1'); // true +isNumber('1.1'); // true +isNumber('10'); // true +isNumber('10.10'); // true +isNumber('100'); // true +isNumber('5e3'); // true +isNumber(parseInt('012')); // true +isNumber(parseFloat('012')); // true +``` + +### False + +Everything else is false, as you would expect: + +```js +isNumber(Infinity); // false +isNumber(NaN); // false +isNumber(null); // false +isNumber(undefined); // false +isNumber(''); // false +isNumber(' '); // false +isNumber('foo'); // false +isNumber([1]); // false +isNumber([]); // false +isNumber(function () {}); // false +isNumber({}); // false +``` + +## Release history + +### 7.0.0 + +* Refactor. Now uses `.isFinite` if it exists. +* Performance is about the same as v6.0 when the value is a string or number. But it's now 3x-4x faster when the value is not a string or number. + +### 6.0.0 + +* Optimizations, thanks to @benaadams. + +### 5.0.0 + +**Breaking changes** + +* removed support for `instanceof Number` and `instanceof String` + +## Benchmarks + +As with all benchmarks, take these with a grain of salt. See the [benchmarks](./benchmark/index.js) for more detail. + +``` +# all +v7.0 x 413,222 ops/sec ±2.02% (86 runs sampled) +v6.0 x 111,061 ops/sec ±1.29% (85 runs sampled) +parseFloat x 317,596 ops/sec ±1.36% (86 runs sampled) +fastest is 'v7.0' + +# string +v7.0 x 3,054,496 ops/sec ±1.05% (89 runs sampled) +v6.0 x 2,957,781 ops/sec ±0.98% (88 runs sampled) +parseFloat x 3,071,060 ops/sec ±1.13% (88 runs sampled) +fastest is 'parseFloat,v7.0' + +# number +v7.0 x 3,146,895 ops/sec ±0.89% (89 runs sampled) +v6.0 x 3,214,038 ops/sec ±1.07% (89 runs sampled) +parseFloat x 3,077,588 ops/sec ±1.07% (87 runs sampled) +fastest is 'v6.0' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 49 | [jonschlinkert](https://github.com/jonschlinkert) | +| 5 | [charlike-old](https://github.com/charlike-old) | +| 1 | [benaadams](https://github.com/benaadams) | +| 1 | [realityking](https://github.com/realityking) | + +### Author + +**Jon Schlinkert** + +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 15, 2018._ \ No newline at end of file diff --git a/node_modules/is-number/index.js b/node_modules/is-number/index.js new file mode 100644 index 0000000..27f19b7 --- /dev/null +++ b/node_modules/is-number/index.js @@ -0,0 +1,18 @@ +/*! + * is-number + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function(num) { + if (typeof num === 'number') { + return num - num === 0; + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); + } + return false; +}; diff --git a/node_modules/is-number/package.json b/node_modules/is-number/package.json new file mode 100644 index 0000000..3715072 --- /dev/null +++ b/node_modules/is-number/package.json @@ -0,0 +1,82 @@ +{ + "name": "is-number", + "description": "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.", + "version": "7.0.0", + "homepage": "https://github.com/jonschlinkert/is-number", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Olsten Larck (https://i.am.charlike.online)", + "Rouven Weßling (www.rouvenwessling.de)" + ], + "repository": "jonschlinkert/is-number", + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.12.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "ansi": "^0.3.1", + "benchmark": "^2.1.4", + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "cast", + "check", + "coerce", + "coercion", + "finite", + "integer", + "is", + "isnan", + "is-nan", + "is-num", + "is-number", + "isnumber", + "isfinite", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "parseFloat", + "parseInt", + "test", + "type", + "typeof", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "is-plain-object", + "is-primitive", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/jiti/LICENSE b/node_modules/jiti/LICENSE new file mode 100644 index 0000000..e739abc --- /dev/null +++ b/node_modules/jiti/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Pooya Parsa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/jiti/README.md b/node_modules/jiti/README.md new file mode 100644 index 0000000..2da8e4e --- /dev/null +++ b/node_modules/jiti/README.md @@ -0,0 +1,164 @@ +# jiti + +[![npm version][npm-version-src]][npm-version-href] +[![npm downloads][npm-downloads-src]][npm-downloads-href] +[![bundle][bundle-src]][bundle-href] +[![License][license-src]][license-href] + +Runtime Typescript and ESM support for Node.js. + +> [!IMPORTANT] +> This is the support branch for jiti v1. Check out [jiti/main](https://github.com/unjs/jiti/tree/main) for the latest version and [unjs/jiti#174](https://github.com/unjs/jiti/issues/174) for the roadmap. + +## Features + +- Seamless typescript and ESM syntax support +- Seamless interoperability between ESM and CommonJS +- Synchronous API to replace `require` +- Super slim and zero dependency +- Smart syntax detection to avoid extra transforms +- CommonJS cache integration +- Filesystem transpile hard cache +- V8 compile cache +- Custom resolve alias + +## Usage + +### Programmatic + +```js +const jiti = require("jiti")(__filename); + +jiti("./path/to/file.ts"); +``` + +You can also pass options as second argument: + +```js +const jiti = require("jiti")(__filename, { debug: true }); +``` + +### CLI + +```bash +jiti index.ts +# or npx jiti index.ts +``` + +### Register require hook + +```bash +node -r jiti/register index.ts +``` + +Alternatively, you can register `jiti` as a require hook programmatically: + +```js +const jiti = require("jiti")(); +const unregister = jiti.register(); +``` + +## Options + +### `debug` + +- Type: Boolean +- Default: `false` +- Environment Variable: `JITI_DEBUG` + +Enable debug to see which files are transpiled + +### `cache` + +- Type: Boolean | String +- Default: `true` +- Environment Variable: `JITI_CACHE` + +Use transpile cache + +If set to `true` will use `node_modules/.cache/jiti` (if exists) or `{TMP_DIR}/node-jiti` + +### `esmResolve` + +- Type: Boolean | String +- Default: `false` +- Environment Variable: `JITI_ESM_RESOLVE` + +Using esm resolution algorithm to support `import` condition. + +### `transform` + +- Type: Function +- Default: Babel (lazy loaded) + +Transform function. See [src/babel](./src/babel.ts) for more details + +### `sourceMaps` + +- Type: Boolean +- Default `false` +- Environment Variable: `JITI_SOURCE_MAPS` + +Add inline source map to transformed source for better debugging. + +### `interopDefault` + +- Type: Boolean +- Default: `false` + +Return the `.default` export of a module at the top-level. + +### `alias` + +- Type: Object +- Default: - +- Environment Variable: `JITI_ALIAS` + +Custom alias map used to resolve ids. + +### `nativeModules` + +- Type: Array +- Default: ['typescript`] +- Environment Variable: `JITI_NATIVE_MODULES` + +List of modules (within `node_modules`) to always use native require for them. + +### `transformModules` + +- Type: Array +- Default: [] +- Environment Variable: `JITI_TRANSFORM_MODULES` + +List of modules (within `node_modules`) to transform them regardless of syntax. + +### `experimentalBun` + +- Type: Boolean +- Default: Enabled if `process.versions.bun` exists (Bun runtime) +- Environment Variable: `JITI_EXPERIMENTAL_BUN` + +Enable experimental native Bun support for transformations. + +## Development + +- Clone this repository +- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` +- Install dependencies using `pnpm install` +- Run `pnpm dev` +- Run `pnpm jiti ./test/path/to/file.ts` + +## License + +MIT. Made with 💖 + + + +[npm-version-src]: https://img.shields.io/npm/v/jiti?style=flat&colorA=18181B&colorB=F0DB4F +[npm-version-href]: https://npmjs.com/package/jiti +[npm-downloads-src]: https://img.shields.io/npm/dm/jiti?style=flat&colorA=18181B&colorB=F0DB4F +[npm-downloads-href]: https://npmjs.com/package/jiti +[bundle-src]: https://img.shields.io/bundlephobia/minzip/jiti?style=flat&colorA=18181B&colorB=F0DB4F +[bundle-href]: https://bundlephobia.com/result?p=h3 +[license-src]: https://img.shields.io/github/license/unjs/jiti.svg?style=flat&colorA=18181B&colorB=F0DB4F +[license-href]: https://github.com/unjs/jiti/blob/main/LICENSE diff --git a/node_modules/jiti/bin/jiti.js b/node_modules/jiti/bin/jiti.js new file mode 100755 index 0000000..2867c64 --- /dev/null +++ b/node_modules/jiti/bin/jiti.js @@ -0,0 +1,16 @@ +#!/usr/bin/env node + +const { resolve } = require("node:path"); + +const script = process.argv.splice(2, 1)[0]; + +if (!script) { + + console.error("Usage: jiti [...arguments]"); + process.exit(1); +} + +const pwd = process.cwd(); +const jiti = require("..")(pwd); +const resolved = (process.argv[1] = jiti.resolve(resolve(pwd, script))); +jiti(resolved); diff --git a/node_modules/jiti/dist/babel.d.ts b/node_modules/jiti/dist/babel.d.ts new file mode 100644 index 0000000..ea178d4 --- /dev/null +++ b/node_modules/jiti/dist/babel.d.ts @@ -0,0 +1,2 @@ +import { TransformOptions, TRANSFORM_RESULT } from "./types"; +export default function transform(opts: TransformOptions): TRANSFORM_RESULT; diff --git a/node_modules/jiti/dist/babel.js b/node_modules/jiti/dist/babel.js new file mode 100644 index 0000000..f59843c --- /dev/null +++ b/node_modules/jiti/dist/babel.js @@ -0,0 +1,227 @@ +(()=>{var __webpack_modules__={"./node_modules/.pnpm/@ampproject+remapping@2.3.0/node_modules/@ampproject/remapping/dist/remapping.umd.js":function(module,__unused_webpack_exports,__webpack_require__){module.exports=function(traceMapping,genMapping){"use strict";const SOURCELESS_MAPPING=SegmentObject("",-1,-1,"",null,!1),EMPTY_SOURCES=[];function SegmentObject(source,line,column,name,content,ignore){return{source,line,column,name,content,ignore}}function Source(map,sources,source,content,ignore){return{map,sources,source,content,ignore}}function MapSource(map,sources){return Source(map,sources,"",null,!1)}function OriginalSource(source,content,ignore){return Source(null,EMPTY_SOURCES,source,content,ignore)}function traceMappings(tree){const gen=new genMapping.GenMapping({file:tree.map.file}),{sources:rootSources,map}=tree,rootNames=map.names,rootMappings=traceMapping.decodedMappings(map);for(let i=0;inew traceMapping.TraceMap(m,""))),map=maps.pop();for(let i=0;i1)throw new Error(`Transformation map ${i} must have exactly one source file.\nDid you specify these with the most recent transformation maps first?`);let tree=build(map,loader,"",0);for(let i=maps.length-1;i>=0;i--)tree=MapSource(maps[i],[tree]);return tree}function build(map,loader,importer,importerDepth){const{resolvedSources,sourcesContent,ignoreList}=map,depth=importerDepth+1;return MapSource(map,resolvedSources.map(((sourceFile,i)=>{const ctx={importer,depth,source:sourceFile||"",content:void 0,ignore:void 0},sourceMap=loader(ctx.source,ctx),{source,content,ignore}=ctx;return sourceMap?build(new traceMapping.TraceMap(sourceMap,source),loader,source,depth):OriginalSource(source,void 0!==content?content:sourcesContent?sourcesContent[i]:null,void 0!==ignore?ignore:!!ignoreList&&ignoreList.includes(i))})))}class SourceMap{constructor(map,options){const out=options.decodedMappings?genMapping.toDecodedMap(map):genMapping.toEncodedMap(map);this.version=out.version,this.file=out.file,this.mappings=out.mappings,this.names=out.names,this.ignoreList=out.ignoreList,this.sourceRoot=out.sourceRoot,this.sources=out.sources,options.excludeContent||(this.sourcesContent=out.sourcesContent)}toString(){return JSON.stringify(this)}}function remapping(input,loader,options){const opts="object"==typeof options?options:{excludeContent:!!options,decodedMappings:!1},tree=buildSourceMapTree(input,loader);return new SourceMap(traceMappings(tree),opts)}return remapping}(__webpack_require__("./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.25/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js"),__webpack_require__("./node_modules/.pnpm/@jridgewell+gen-mapping@0.3.8/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"))},"./node_modules/.pnpm/@babel+core@7.26.0/node_modules/@babel/core/lib/config/files lazy recursive":module=>{function webpackEmptyAsyncContext(req){return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}))}webpackEmptyAsyncContext.keys=()=>[],webpackEmptyAsyncContext.resolve=webpackEmptyAsyncContext,webpackEmptyAsyncContext.id="./node_modules/.pnpm/@babel+core@7.26.0/node_modules/@babel/core/lib/config/files lazy recursive",module.exports=webpackEmptyAsyncContext},"./node_modules/.pnpm/@babel+core@7.26.0/node_modules/@babel/core/lib/config/files sync recursive":module=>{function webpackEmptyContext(req){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="./node_modules/.pnpm/@babel+core@7.26.0/node_modules/@babel/core/lib/config/files sync recursive",module.exports=webpackEmptyContext},"./node_modules/.pnpm/@babel+plugin-syntax-class-properties@7.12.13_@babel+core@7.26.0/node_modules/@babel/plugin-syntax-class-properties/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default=(0,__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.25.9/node_modules/@babel/helper-plugin-utils/lib/index.js").declare)((api=>(api.assertVersion(7),{name:"syntax-class-properties",manipulateOptions(opts,parserOpts){parserOpts.plugins.push("classProperties","classPrivateProperties","classPrivateMethods")}})));exports.default=_default},"./node_modules/.pnpm/@jridgewell+gen-mapping@0.3.8/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js":function(__unused_webpack_module,exports,__webpack_require__){!function(exports,setArray,sourcemapCodec,traceMapping){"use strict";const COLUMN=0,SOURCES_INDEX=1,SOURCE_LINE=2,SOURCE_COLUMN=3,NAMES_INDEX=4,NO_NAME=-1;class GenMapping{constructor({file,sourceRoot}={}){this._names=new setArray.SetArray,this._sources=new setArray.SetArray,this._sourcesContent=[],this._mappings=[],this.file=file,this.sourceRoot=sourceRoot,this._ignoreList=new setArray.SetArray}}function cast(map){return map}function addSegment(map,genLine,genColumn,source,sourceLine,sourceColumn,name,content){return addSegmentInternal(!1,map,genLine,genColumn,source,sourceLine,sourceColumn,name,content)}function addMapping(map,mapping){return addMappingInternal(!1,map,mapping)}const maybeAddSegment=(map,genLine,genColumn,source,sourceLine,sourceColumn,name,content)=>addSegmentInternal(!0,map,genLine,genColumn,source,sourceLine,sourceColumn,name,content),maybeAddMapping=(map,mapping)=>addMappingInternal(!0,map,mapping);function setSourceContent(map,source,content){const{_sources:sources,_sourcesContent:sourcesContent}=cast(map);sourcesContent[setArray.put(sources,source)]=content}function setIgnore(map,source,ignore=!0){const{_sources:sources,_sourcesContent:sourcesContent,_ignoreList:ignoreList}=cast(map),index=setArray.put(sources,source);index===sourcesContent.length&&(sourcesContent[index]=null),ignore?setArray.put(ignoreList,index):setArray.remove(ignoreList,index)}function toDecodedMap(map){const{_mappings:mappings,_sources:sources,_sourcesContent:sourcesContent,_names:names,_ignoreList:ignoreList}=cast(map);return removeEmptyFinalLines(mappings),{version:3,file:map.file||void 0,names:names.array,sourceRoot:map.sourceRoot||void 0,sources:sources.array,sourcesContent,mappings,ignoreList:ignoreList.array}}function toEncodedMap(map){const decoded=toDecodedMap(map);return Object.assign(Object.assign({},decoded),{mappings:sourcemapCodec.encode(decoded.mappings)})}function fromMap(input){const map=new traceMapping.TraceMap(input),gen=new GenMapping({file:map.file,sourceRoot:map.sourceRoot});return putAll(cast(gen)._names,map.names),putAll(cast(gen)._sources,map.sources),cast(gen)._sourcesContent=map.sourcesContent||map.sources.map((()=>null)),cast(gen)._mappings=traceMapping.decodedMappings(map),map.ignoreList&&putAll(cast(gen)._ignoreList,map.ignoreList),gen}function allMappings(map){const out=[],{_mappings:mappings,_sources:sources,_names:names}=cast(map);for(let i=0;i=0&&!(genColumn>=line[i][COLUMN]);index=i--);return index}function insert(array,index,value){for(let i=array.length;i>index;i--)array[i]=array[i-1];array[index]=value}function removeEmptyFinalLines(mappings){const{length}=mappings;let len=length;for(let i=len-1;i>=0&&!(mappings[i].length>0);len=i,i--);leninputType&&(inputType=baseType)}normalizePath(url,inputType);const queryHash=url.query+url.hash;switch(inputType){case 2:case 3:return queryHash;case 4:{const path=url.path.slice(1);return path?isRelative(base||input)&&!isRelative(path)?"./"+path+queryHash:path+queryHash:queryHash||"."}case 5:return url.path+queryHash;default:return url.scheme+"//"+url.user+url.host+url.port+url.path+queryHash}}return resolve}()},"./node_modules/.pnpm/@jridgewell+set-array@1.2.1/node_modules/@jridgewell/set-array/dist/set-array.umd.js":function(__unused_webpack_module,exports){!function(exports){"use strict";class SetArray{constructor(){this._indexes={__proto__:null},this.array=[]}}function cast(set){return set}function get(setarr,key){return cast(setarr)._indexes[key]}function put(setarr,key){const index=get(setarr,key);if(void 0!==index)return index;const{array,_indexes:indexes}=cast(setarr),length=array.push(key);return indexes[key]=length-1}function pop(setarr){const{array,_indexes:indexes}=cast(setarr);0!==array.length&&(indexes[array.pop()]=void 0)}function remove(setarr,key){const index=get(setarr,key);if(void 0===index)return;const{array,_indexes:indexes}=cast(setarr);for(let i=index+1;i>>=1,shouldNegate&&(value=-2147483648|-value),relative+value}function encodeInteger(builder,num,relative){let delta=num-relative;delta=delta<0?-delta<<1|1:delta<<1;do{let clamped=31δdelta>>>=5,delta>0&&(clamped|=32),builder.write(intToChar[clamped])}while(delta>0);return num}function hasMoreVlq(reader,max){return!(reader.pos>=max)&&reader.peek()!==comma}const bufLength=16384,td="undefined"!=typeof TextDecoder?new TextDecoder:"undefined"!=typeof Buffer?{decode:buf=>Buffer.from(buf.buffer,buf.byteOffset,buf.byteLength).toString()}:{decode(buf){let out="";for(let i=0;i0?out+td.decode(buffer.subarray(0,pos)):out}}class StringReader{constructor(buffer){this.pos=0,this.buffer=buffer}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(char){const{buffer,pos}=this,idx=buffer.indexOf(char,pos);return-1===idx?buffer.length:idx}}const EMPTY=[];function decodeOriginalScopes(input){const{length}=input,reader=new StringReader(input),scopes=[],stack=[];let line=0;for(;reader.pos0&&writer.write(comma),state[0]=encodeInteger(writer,startLine,state[0]),encodeInteger(writer,startColumn,0),encodeInteger(writer,kind,0),encodeInteger(writer,6===scope.length?1:0,0),6===scope.length&&encodeInteger(writer,scope[5],0);for(const v of vars)encodeInteger(writer,v,0);for(index++;indexendLine||l===endLine&&c>=endColumn)break;index=_encodeOriginalScopes(scopes,index,writer,state)}return writer.write(comma),state[0]=encodeInteger(writer,endLine,state[0]),encodeInteger(writer,endColumn,0),index}function decodeGeneratedRanges(input){const{length}=input,reader=new StringReader(input),ranges=[],stack=[];let genLine=0,definitionSourcesIndex=0,definitionScopeIndex=0,callsiteSourcesIndex=0,callsiteLine=0,callsiteColumn=0,bindingLine=0,bindingColumn=0;do{const semi=reader.indexOf(";");let genColumn=0;for(;reader.posexpressionsCount;i--){const prevBl=bindingLine;bindingLine=decodeInteger(reader,bindingLine),bindingColumn=decodeInteger(reader,bindingLine===prevBl?bindingColumn:0);const expression=decodeInteger(reader,0);expressionRanges.push([expression,bindingLine,bindingColumn])}}else expressionRanges=[[expressionsCount]];bindings.push(expressionRanges)}while(hasMoreVlq(reader,semi))}range.bindings=bindings,ranges.push(range),stack.push(range)}genLine++,reader.pos=semi+1}while(reader.pos0&&writer.write(comma),state[1]=encodeInteger(writer,range[1],state[1]),encodeInteger(writer,(6===range.length?1:0)|(callsite?2:0)|(isScope?4:0),0),6===range.length){const{4:sourcesIndex,5:scopesIndex}=range;sourcesIndex!==state[2]&&(state[3]=0),state[2]=encodeInteger(writer,sourcesIndex,state[2]),state[3]=encodeInteger(writer,scopesIndex,state[3])}if(callsite){const{0:sourcesIndex,1:callLine,2:callColumn}=range.callsite;sourcesIndex!==state[4]?(state[5]=0,state[6]=0):callLine!==state[5]&&(state[6]=0),state[4]=encodeInteger(writer,sourcesIndex,state[4]),state[5]=encodeInteger(writer,callLine,state[5]),state[6]=encodeInteger(writer,callColumn,state[6])}if(bindings)for(const binding of bindings){binding.length>1&&encodeInteger(writer,-binding.length,0),encodeInteger(writer,binding[0][0],0);let bindingStartLine=startLine,bindingStartColumn=startColumn;for(let i=1;iendLine||l===endLine&&c>=endColumn)break;index=_encodeGeneratedRanges(ranges,index,writer,state)}return state[0]0&&writer.write(semicolon),0===line.length)continue;let genColumn=0;for(let j=0;j0&&writer.write(comma),genColumn=encodeInteger(writer,segment[0],genColumn),1!==segment.length&&(sourcesIndex=encodeInteger(writer,segment[1],sourcesIndex),sourceLine=encodeInteger(writer,segment[2],sourceLine),sourceColumn=encodeInteger(writer,segment[3],sourceColumn),4!==segment.length&&(namesIndex=encodeInteger(writer,segment[4],namesIndex)))}}return writer.flush()}exports.decode=decode,exports.decodeGeneratedRanges=decodeGeneratedRanges,exports.decodeOriginalScopes=decodeOriginalScopes,exports.encode=encode,exports.encodeGeneratedRanges=encodeGeneratedRanges,exports.encodeOriginalScopes=encodeOriginalScopes,Object.defineProperty(exports,"__esModule",{value:!0})}(exports)},"./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.25/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js":function(__unused_webpack_module,exports,__webpack_require__){!function(exports,sourcemapCodec,resolveUri){"use strict";function resolve(input,base){return base&&!base.endsWith("/")&&(base+="/"),resolveUri(input,base)}function stripFilename(path){if(!path)return"";const index=path.lastIndexOf("/");return path.slice(0,index+1)}const COLUMN=0,SOURCES_INDEX=1,SOURCE_LINE=2,SOURCE_COLUMN=3,NAMES_INDEX=4,REV_GENERATED_LINE=1,REV_GENERATED_COLUMN=2;function maybeSort(mappings,owned){const unsortedIndex=nextUnsortedSegmentLine(mappings,0);if(unsortedIndex===mappings.length)return mappings;owned||(mappings=mappings.slice());for(let i=unsortedIndex;i>1),cmp=haystack[mid][COLUMN]-needle;if(0===cmp)return found=!0,mid;cmp<0?low=mid+1:high=mid-1}return found=!1,low-1}function upperBound(haystack,needle,index){for(let i=index+1;i=0&&haystack[i][COLUMN]===needle;index=i--);return index}function memoizedState(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function memoizedBinarySearch(haystack,needle,state,key){const{lastKey,lastNeedle,lastIndex}=state;let low=0,high=haystack.length-1;if(key===lastKey){if(needle===lastNeedle)return found=-1!==lastIndex&&haystack[lastIndex][COLUMN]===needle,lastIndex;needle>=lastNeedle?low=-1===lastIndex?0:lastIndex:high=lastIndex}return state.lastKey=key,state.lastNeedle=needle,state.lastIndex=binarySearch(haystack,needle,low,high)}function buildBySources(decoded,memos){const sources=memos.map(buildNullArray);for(let i=0;iindex;i--)array[i]=array[i-1];array[index]=value}function buildNullArray(){return{__proto__:null}}const AnyMap=function(map,mapUrl){const parsed=parse(map);if(!("sections"in parsed))return new TraceMap(parsed,mapUrl);const mappings=[],sources=[],sourcesContent=[],names=[],ignoreList=[];return recurse(parsed,mapUrl,mappings,sources,sourcesContent,names,ignoreList,0,0,1/0,1/0),presortedDecodedMap({version:3,file:parsed.file,names,sources,sourcesContent,mappings,ignoreList})};function parse(map){return"string"==typeof map?JSON.parse(map):map}function recurse(input,mapUrl,mappings,sources,sourcesContent,names,ignoreList,lineOffset,columnOffset,stopLine,stopColumn){const{sections}=input;for(let i=0;istopLine)return;const out=getLine(mappings,lineI),cOffset=0===i?columnOffset:0,line=decoded[i];for(let j=0;j=stopColumn)return;if(1===seg.length){out.push([column]);continue}const sourcesIndex=sourcesOffset+seg[SOURCES_INDEX],sourceLine=seg[SOURCE_LINE],sourceColumn=seg[SOURCE_COLUMN];out.push(4===seg.length?[column,sourcesIndex,sourceLine,sourceColumn]:[column,sourcesIndex,sourceLine,sourceColumn,namesOffset+seg[NAMES_INDEX]])}}}function append(arr,other){for(let i=0;iresolve(s||"",from)));const{mappings}=parsed;"string"==typeof mappings?(this._encoded=mappings,this._decoded=void 0):(this._encoded=void 0,this._decoded=maybeSort(mappings,isString)),this._decodedMemo=memoizedState(),this._bySources=void 0,this._bySourceMemos=void 0}}function cast(map){return map}function encodedMappings(map){var _a,_b;return null!==(_a=(_b=cast(map))._encoded)&&void 0!==_a?_a:_b._encoded=sourcemapCodec.encode(cast(map)._decoded)}function decodedMappings(map){var _a;return(_a=cast(map))._decoded||(_a._decoded=sourcemapCodec.decode(cast(map)._encoded))}function traceSegment(map,line,column){const decoded=decodedMappings(map);if(line>=decoded.length)return null;const segments=decoded[line],index=traceSegmentInternal(segments,cast(map)._decodedMemo,line,column,GREATEST_LOWER_BOUND);return-1===index?null:segments[index]}function originalPositionFor(map,needle){let{line,column,bias}=needle;if(line--,line<0)throw new Error(LINE_GTR_ZERO);if(column<0)throw new Error(COL_GTR_EQ_ZERO);const decoded=decodedMappings(map);if(line>=decoded.length)return OMapping(null,null,null,null);const segments=decoded[line],index=traceSegmentInternal(segments,cast(map)._decodedMemo,line,column,bias||GREATEST_LOWER_BOUND);if(-1===index)return OMapping(null,null,null,null);const segment=segments[index];if(1===segment.length)return OMapping(null,null,null,null);const{names,resolvedSources}=map;return OMapping(resolvedSources[segment[SOURCES_INDEX]],segment[SOURCE_LINE]+1,segment[SOURCE_COLUMN],5===segment.length?names[segment[NAMES_INDEX]]:null)}function generatedPositionFor(map,needle){const{source,line,column,bias}=needle;return generatedPosition(map,source,line,column,bias||GREATEST_LOWER_BOUND,!1)}function allGeneratedPositionsFor(map,needle){const{source,line,column,bias}=needle;return generatedPosition(map,source,line,column,bias||LEAST_UPPER_BOUND,!0)}function eachMapping(map,cb){const decoded=decodedMappings(map),{names,resolvedSources}=map;for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(api){var transformImport=(0,_utils.createDynamicImportTransform)(api);return{manipulateOptions:function(opts,parserOpts){parserOpts.plugins.push("dynamicImport")},visitor:{Import:function(path){transformImport(this,path)}}}};var _utils=__webpack_require__("./node_modules/.pnpm/babel-plugin-dynamic-import-node@2.3.3/node_modules/babel-plugin-dynamic-import-node/lib/utils.js");module.exports=exports.default},"./node_modules/.pnpm/babel-plugin-dynamic-import-node@2.3.3/node_modules/babel-plugin-dynamic-import-node/lib/utils.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return function(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function getImportSource(t,callNode){var importArguments=callNode.arguments,importPath=_slicedToArray(importArguments,1)[0];return t.isStringLiteral(importPath)||t.isTemplateLiteral(importPath)?(t.removeComments(importPath),importPath):t.templateLiteral([t.templateElement({raw:"",cooked:""}),t.templateElement({raw:"",cooked:""},!0)],importArguments)}exports.getImportSource=getImportSource,exports.createDynamicImportTransform=function(_ref){var template=_ref.template,t=_ref.types,builders={static:{interop:template("Promise.resolve().then(() => INTEROP(require(SOURCE)))"),noInterop:template("Promise.resolve().then(() => require(SOURCE))")},dynamic:{interop:template("Promise.resolve(SOURCE).then(s => INTEROP(require(s)))"),noInterop:template("Promise.resolve(SOURCE).then(s => require(s))")}},visited="function"==typeof WeakSet&&new WeakSet;return function(context,path){if(visited){if(visited.has(path))return;visited.add(path)}var node,SOURCE=getImportSource(t,path.parent),builder=(node=SOURCE,t.isStringLiteral(node)||t.isTemplateLiteral(node)&&0===node.expressions.length?builders.static:builders.dynamic),newImport=context.opts.noInterop?builder.noInterop({SOURCE}):builder.interop({SOURCE,INTEROP:context.addHelper("interopRequireWildcard")});path.parentPath.replaceWith(newImport)}}},"./node_modules/.pnpm/babel-plugin-parameter-decorator@1.0.16/node_modules/babel-plugin-parameter-decorator/lib/index.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _path=__webpack_require__("path");function isInType(path){switch(path.parent.type){case"TSTypeReference":case"TSQualifiedName":case"TSExpressionWithTypeArguments":case"TSTypeQuery":return!0;default:return!1}}module.exports=function(_ref){var types=_ref.types,decoratorExpressionForConstructor=function(decorator,param){return function(className){var resultantDecorator=types.callExpression(decorator.expression,[types.Identifier(className),types.Identifier("undefined"),types.NumericLiteral(param.key)]),resultantDecoratorWithFallback=types.logicalExpression("||",resultantDecorator,types.Identifier(className)),assignment=types.assignmentExpression("=",types.Identifier(className),resultantDecoratorWithFallback);return types.expressionStatement(assignment)}},decoratorExpressionForMethod=function(decorator,param){return function(className,functionName){var resultantDecorator=types.callExpression(decorator.expression,[types.Identifier("".concat(className,".prototype")),types.StringLiteral(functionName),types.NumericLiteral(param.key)]);return types.expressionStatement(resultantDecorator)}};return{visitor:{Program:function(path,state){var extension=(0,_path.extname)(state.file.opts.filename);".ts"!==extension&&".tsx"!==extension||function(){var decorators=Object.create(null);path.node.body.filter((function(it){var type=it.type,declaration=it.declaration;switch(type){case"ClassDeclaration":return!0;case"ExportNamedDeclaration":case"ExportDefaultDeclaration":return declaration&&"ClassDeclaration"===declaration.type;default:return!1}})).map((function(it){return"ClassDeclaration"===it.type?it:it.declaration})).forEach((function(clazz){clazz.body.body.forEach((function(body){(body.params||[]).forEach((function(param){(param.decorators||[]).forEach((function(decorator){decorator.expression.callee?decorators[decorator.expression.callee.name]=decorator:decorators[decorator.expression.name]=decorator}))}))}))}));var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=path.get("body")[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var stmt=_step.value;if("ImportDeclaration"===stmt.node.type){if(0===stmt.node.specifiers.length)continue;var _iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _step2,_loop=function(){var specifier=_step2.value,binding=stmt.scope.getBinding(specifier.local.name);binding.referencePaths.length?binding.referencePaths.reduce((function(prev,next){return prev||isInType(next)}),!1)&&Object.keys(decorators).forEach((function(k){var decorator=decorators[k];(decorator.expression.arguments||[]).forEach((function(arg){arg.name===specifier.local.name&&binding.referencePaths.push({parent:decorator.expression})}))})):decorators[specifier.local.name]&&binding.referencePaths.push({parent:decorators[specifier.local.name]})},_iterator2=stmt.node.specifiers[Symbol.iterator]();!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0)_loop()}catch(err){_didIteratorError2=!0,_iteratorError2=err}finally{try{_iteratorNormalCompletion2||null==_iterator2.return||_iterator2.return()}finally{if(_didIteratorError2)throw _iteratorError2}}}}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{_iteratorNormalCompletion||null==_iterator.return||_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}}()},Function:function(path){var functionName="";path.node.id?functionName=path.node.id.name:path.node.key&&(functionName=path.node.key.name),(path.get("params")||[]).slice().forEach((function(param){var decorators=param.node.decorators||[],transformable=decorators.length;if(decorators.slice().forEach((function(decorator){if("ClassMethod"===path.type){var classIdentifier,parentNode=path.parentPath.parentPath,classDeclaration=path.findParent((function(p){return"ClassDeclaration"===p.type}));if(classDeclaration?classIdentifier=classDeclaration.node.id.name:(parentNode.insertAfter(null),classIdentifier=function(path){var assignment=path.findParent((function(p){return"AssignmentExpression"===p.node.type}));return"SequenceExpression"===assignment.node.right.type?assignment.node.right.expressions[1].name:"ClassExpression"===assignment.node.right.type?assignment.node.left.name:null}(path)),"constructor"===functionName){var expression=decoratorExpressionForConstructor(decorator,param)(classIdentifier);parentNode.insertAfter(expression)}else{var _expression=decoratorExpressionForMethod(decorator,param)(classIdentifier,functionName);parentNode.insertAfter(_expression)}}else{var className=path.findParent((function(p){return"VariableDeclarator"===p.node.type})).node.id.name;if(functionName===className){var _expression2=decoratorExpressionForConstructor(decorator,param)(className);if("body"===path.parentKey)path.insertAfter(_expression2);else path.findParent((function(p){return"body"===p.parentKey})).insertAfter(_expression2)}else{var classParent=path.findParent((function(p){return"CallExpression"===p.node.type})),_expression3=decoratorExpressionForMethod(decorator,param)(className,functionName);classParent.insertAfter(_expression3)}}})),transformable){var replacement=function(path){switch(path.node.type){case"ObjectPattern":return types.ObjectPattern(path.node.properties);case"AssignmentPattern":return types.AssignmentPattern(path.node.left,path.node.right);case"TSParameterProperty":return types.Identifier(path.node.parameter.name);default:return types.Identifier(path.node.name)}}(param);param.replaceWith(replacement)}}))}}}}},"./node_modules/.pnpm/babel-plugin-transform-typescript-metadata@0.3.2_@babel+core@7.26.0_@babel+traverse@7.26.4/node_modules/babel-plugin-transform-typescript-metadata/lib/metadata/metadataVisitor.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.metadataVisitor=function(classPath,path){const field=path.node,classNode=classPath.node;switch(field.type){case"ClassMethod":const decorators="constructor"===field.kind?classNode.decorators:field.decorators;if(!decorators||0===decorators.length)return;decorators.push(createMetadataDesignDecorator("design:type",_core.types.identifier("Function"))),decorators.push(createMetadataDesignDecorator("design:paramtypes",_core.types.arrayExpression(field.params.map((param=>(0,_serializeType.serializeType)(classPath,param))))));break;case"ClassProperty":if(!field.decorators||0===field.decorators.length)return;if(!field.typeAnnotation||"TSTypeAnnotation"!==field.typeAnnotation.type)return;field.decorators.push(createMetadataDesignDecorator("design:type",(0,_serializeType.serializeType)(classPath,field)))}};var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.26.0/node_modules/@babel/core/lib/index.js"),_serializeType=__webpack_require__("./node_modules/.pnpm/babel-plugin-transform-typescript-metadata@0.3.2_@babel+core@7.26.0_@babel+traverse@7.26.4/node_modules/babel-plugin-transform-typescript-metadata/lib/metadata/serializeType.js");function createMetadataDesignDecorator(design,typeArg){return _core.types.decorator(_core.types.callExpression(_core.types.memberExpression(_core.types.identifier("Reflect"),_core.types.identifier("metadata")),[_core.types.stringLiteral(design),typeArg]))}},"./node_modules/.pnpm/babel-plugin-transform-typescript-metadata@0.3.2_@babel+core@7.26.0_@babel+traverse@7.26.4/node_modules/babel-plugin-transform-typescript-metadata/lib/metadata/serializeType.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.serializeType=function(classPath,param){const node=getTypedNode(param);if(null==node)return createVoidZero();if(!node.typeAnnotation||"TSTypeAnnotation"!==node.typeAnnotation.type)return createVoidZero();const annotation=node.typeAnnotation.typeAnnotation;return serializeTypeNode(classPath.node.id?classPath.node.id.name:"",annotation)},exports.isClassType=isClassType;var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.26.0/node_modules/@babel/core/lib/index.js");function createVoidZero(){return _core.types.unaryExpression("void",_core.types.numericLiteral(0))}function getTypedNode(param){return null==param?null:"ClassProperty"===param.type||"Identifier"===param.type||"ObjectPattern"===param.type?param:"AssignmentPattern"===param.type&&"Identifier"===param.left.type?param.left:"TSParameterProperty"===param.type?getTypedNode(param.parameter):null}function serializeTypeReferenceNode(className,node){const reference=serializeReference(node.typeName);return isClassType(className,reference)?_core.types.identifier("Object"):_core.types.conditionalExpression(_core.types.binaryExpression("===",_core.types.unaryExpression("typeof",reference),_core.types.stringLiteral("undefined")),_core.types.identifier("Object"),_core.types.cloneDeep(reference))}function isClassType(className,node){switch(node.type){case"Identifier":return node.name===className;case"MemberExpression":return isClassType(className,node.object);default:throw new Error(`The property expression at ${node.start} is not valid as a Type to be used in Reflect.metadata`)}}function serializeReference(typeName){return"Identifier"===typeName.type?_core.types.identifier(typeName.name):_core.types.memberExpression(serializeReference(typeName.left),typeName.right)}function serializeTypeNode(className,node){if(void 0===node)return _core.types.identifier("Object");switch(node.type){case"TSVoidKeyword":case"TSUndefinedKeyword":case"TSNullKeyword":case"TSNeverKeyword":return createVoidZero();case"TSParenthesizedType":return serializeTypeNode(className,node.typeAnnotation);case"TSFunctionType":case"TSConstructorType":return _core.types.identifier("Function");case"TSArrayType":case"TSTupleType":return _core.types.identifier("Array");case"TSTypePredicate":case"TSBooleanKeyword":return _core.types.identifier("Boolean");case"TSStringKeyword":return _core.types.identifier("String");case"TSObjectKeyword":return _core.types.identifier("Object");case"TSLiteralType":switch(node.literal.type){case"StringLiteral":return _core.types.identifier("String");case"NumericLiteral":return _core.types.identifier("Number");case"BooleanLiteral":return _core.types.identifier("Boolean");default:throw new Error("Bad type for decorator"+node.literal)}case"TSNumberKeyword":case"TSBigIntKeyword":return _core.types.identifier("Number");case"TSSymbolKeyword":return _core.types.identifier("Symbol");case"TSTypeReference":return serializeTypeReferenceNode(className,node);case"TSIntersectionType":case"TSUnionType":return serializeTypeList(className,node.types);case"TSConditionalType":return serializeTypeList(className,[node.trueType,node.falseType]);case"TSTypeQuery":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTypeLiteral":case"TSAnyKeyword":case"TSUnknownKeyword":case"TSThisType":break;default:throw new Error("Bad type for decorator")}return _core.types.identifier("Object")}function serializeTypeList(className,types){let serializedUnion;for(let typeNode of types){for(;"TSParenthesizedType"===typeNode.type;)typeNode=typeNode.typeAnnotation;if("TSNeverKeyword"===typeNode.type)continue;if("TSNullKeyword"===typeNode.type||"TSUndefinedKeyword"===typeNode.type)continue;const serializedIndividual=serializeTypeNode(className,typeNode);if(_core.types.isIdentifier(serializedIndividual)&&"Object"===serializedIndividual.name)return serializedIndividual;if(serializedUnion){if(!_core.types.isIdentifier(serializedUnion)||!_core.types.isIdentifier(serializedIndividual)||serializedUnion.name!==serializedIndividual.name)return _core.types.identifier("Object")}else serializedUnion=serializedIndividual}return serializedUnion||createVoidZero()}},"./node_modules/.pnpm/babel-plugin-transform-typescript-metadata@0.3.2_@babel+core@7.26.0_@babel+traverse@7.26.4/node_modules/babel-plugin-transform-typescript-metadata/lib/parameter/parameterVisitor.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parameterVisitor=function(classPath,path){if("ClassMethod"!==path.type)return;if("ClassMethod"!==path.node.type)return;if("Identifier"!==path.node.key.type)return;const methodPath=path;(methodPath.get("params")||[]).slice().forEach((function(param){let resultantDecorator;null!=("Identifier"===param.node.type||"ObjectPattern"===param.node.type?param.node:"TSParameterProperty"===param.node.type&&"Identifier"===param.node.parameter.type?param.node.parameter:null)&&((param.node.decorators||[]).slice().forEach((function(decorator){"constructor"===methodPath.node.kind?(resultantDecorator=createParamDecorator(param.key,decorator.expression,!0),classPath.node.decorators||(classPath.node.decorators=[]),classPath.node.decorators.push(resultantDecorator)):(resultantDecorator=createParamDecorator(param.key,decorator.expression,!1),methodPath.node.decorators||(methodPath.node.decorators=[]),methodPath.node.decorators.push(resultantDecorator))})),resultantDecorator&&(param.node.decorators=null))}))};var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.26.0/node_modules/@babel/core/lib/index.js");function createParamDecorator(paramIndex,decoratorExpression,isConstructor=!1){return _core.types.decorator(_core.types.functionExpression(null,[_core.types.identifier("target"),_core.types.identifier("key")],_core.types.blockStatement([_core.types.returnStatement(_core.types.callExpression(decoratorExpression,[_core.types.identifier("target"),_core.types.identifier(isConstructor?"undefined":"key"),_core.types.numericLiteral(paramIndex)]))])))}},"./node_modules/.pnpm/babel-plugin-transform-typescript-metadata@0.3.2_@babel+core@7.26.0_@babel+traverse@7.26.4/node_modules/babel-plugin-transform-typescript-metadata/lib/plugin.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _helperPluginUtils=__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.25.9/node_modules/@babel/helper-plugin-utils/lib/index.js"),_parameterVisitor=__webpack_require__("./node_modules/.pnpm/babel-plugin-transform-typescript-metadata@0.3.2_@babel+core@7.26.0_@babel+traverse@7.26.4/node_modules/babel-plugin-transform-typescript-metadata/lib/parameter/parameterVisitor.js"),_metadataVisitor=__webpack_require__("./node_modules/.pnpm/babel-plugin-transform-typescript-metadata@0.3.2_@babel+core@7.26.0_@babel+traverse@7.26.4/node_modules/babel-plugin-transform-typescript-metadata/lib/metadata/metadataVisitor.js"),_default=(0,_helperPluginUtils.declare)((api=>(api.assertVersion(7),{visitor:{Program(programPath){programPath.traverse({ClassDeclaration(path){for(const field of path.get("body").get("body"))"ClassMethod"!==field.type&&"ClassProperty"!==field.type||((0,_parameterVisitor.parameterVisitor)(path,field),(0,_metadataVisitor.metadataVisitor)(path,field));path.parentPath.scope.crawl()}})}}})));exports.default=_default},"./node_modules/.pnpm/convert-source-map@2.0.0/node_modules/convert-source-map/index.js":(__unused_webpack_module,exports)=>{"use strict";var decodeBase64;function Converter(sm,opts){(opts=opts||{}).hasComment&&(sm=function(sm){return sm.split(",").pop()}(sm)),"base64"===opts.encoding?sm=decodeBase64(sm):"uri"===opts.encoding&&(sm=decodeURIComponent(sm)),(opts.isJSON||opts.encoding)&&(sm=JSON.parse(sm)),this.sourcemap=sm}function makeConverter(sm){return new Converter(sm,{isJSON:!0})}Object.defineProperty(exports,"commentRegex",{get:function(){return/^\s*?\/[\/\*][@#]\s+?sourceMappingURL=data:(((?:application|text)\/json)(?:;charset=([^;,]+?)?)?)?(?:;(base64))?,(.*?)$/gm}}),Object.defineProperty(exports,"mapFileCommentRegex",{get:function(){return/(?:\/\/[@#][ \t]+?sourceMappingURL=([^\s'"`]+?)[ \t]*?$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*?(?:\*\/){1}[ \t]*?$)/gm}}),decodeBase64="undefined"!=typeof Buffer?"function"==typeof Buffer.from?function(base64){return Buffer.from(base64,"base64").toString()}:function(base64){if("number"==typeof value)throw new TypeError("The value to decode must not be of type number.");return new Buffer(base64,"base64").toString()}:function(base64){return decodeURIComponent(escape(atob(base64)))},Converter.prototype.toJSON=function(space){return JSON.stringify(this.sourcemap,null,space)},"undefined"!=typeof Buffer?"function"==typeof Buffer.from?Converter.prototype.toBase64=function(){var json=this.toJSON();return Buffer.from(json,"utf8").toString("base64")}:Converter.prototype.toBase64=function(){var json=this.toJSON();if("number"==typeof json)throw new TypeError("The json to encode must not be of type number.");return new Buffer(json,"utf8").toString("base64")}:Converter.prototype.toBase64=function(){var json=this.toJSON();return btoa(unescape(encodeURIComponent(json)))},Converter.prototype.toURI=function(){var json=this.toJSON();return encodeURIComponent(json)},Converter.prototype.toComment=function(options){var encoding,content,data;return null!=options&&"uri"===options.encoding?(encoding="",content=this.toURI()):(encoding=";base64",content=this.toBase64()),data="sourceMappingURL=data:application/json;charset=utf-8"+encoding+","+content,null!=options&&options.multiline?"/*# "+data+" */":"//# "+data},Converter.prototype.toObject=function(){return JSON.parse(this.toJSON())},Converter.prototype.addProperty=function(key,value){if(this.sourcemap.hasOwnProperty(key))throw new Error('property "'+key+'" already exists on the sourcemap, use set property instead');return this.setProperty(key,value)},Converter.prototype.setProperty=function(key,value){return this.sourcemap[key]=value,this},Converter.prototype.getProperty=function(key){return this.sourcemap[key]},exports.fromObject=function(obj){return new Converter(obj)},exports.fromJSON=function(json){return new Converter(json,{isJSON:!0})},exports.fromURI=function(uri){return new Converter(uri,{encoding:"uri"})},exports.fromBase64=function(base64){return new Converter(base64,{encoding:"base64"})},exports.fromComment=function(comment){var m;return new Converter(comment=comment.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),{encoding:(m=exports.commentRegex.exec(comment))&&m[4]||"uri",hasComment:!0})},exports.fromMapFileComment=function(comment,read){if("string"==typeof read)throw new Error("String directory paths are no longer supported with `fromMapFileComment`\nPlease review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading");var sm=function(sm,read){var r=exports.mapFileCommentRegex.exec(sm),filename=r[1]||r[2];try{return null!=(sm=read(filename))&&"function"==typeof sm.catch?sm.catch(throwError):sm}catch(e){throwError(e)}function throwError(e){throw new Error("An error occurred while trying to read the map file at "+filename+"\n"+e.stack)}}(comment,read);return null!=sm&&"function"==typeof sm.then?sm.then(makeConverter):makeConverter(sm)},exports.fromSource=function(content){var m=content.match(exports.commentRegex);return m?exports.fromComment(m.pop()):null},exports.fromMapFileSource=function(content,read){if("string"==typeof read)throw new Error("String directory paths are no longer supported with `fromMapFileSource`\nPlease review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading");var m=content.match(exports.mapFileCommentRegex);return m?exports.fromMapFileComment(m.pop(),read):null},exports.removeComments=function(src){return src.replace(exports.commentRegex,"")},exports.removeMapFileComments=function(src){return src.replace(exports.mapFileCommentRegex,"")},exports.generateMapFileComment=function(file,options){var data="sourceMappingURL="+file;return options&&options.multiline?"/*# "+data+" */":"//# "+data}},"./node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/browser.js":(module,exports,__webpack_require__)=>{exports.formatArgs=function(args){if(args[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+args[0]+(this.useColors?"%c ":" ")+"+"+module.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;args.splice(1,0,c,"color: inherit");let index=0,lastC=0;args[0].replace(/%[a-zA-Z%]/g,(match=>{"%%"!==match&&(index++,"%c"===match&&(lastC=index))})),args.splice(lastC,0,c)},exports.save=function(namespaces){try{namespaces?exports.storage.setItem("debug",namespaces):exports.storage.removeItem("debug")}catch(error){}},exports.load=function(){let r;try{r=exports.storage.getItem("debug")}catch(error){}!r&&"undefined"!=typeof process&&"env"in process&&(r=process.env.DEBUG);return r},exports.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let m;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(m=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(m[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},exports.storage=function(){try{return localStorage}catch(error){}}(),exports.destroy=(()=>{let warned=!1;return()=>{warned||(warned=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),exports.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],exports.log=console.debug||console.log||(()=>{}),module.exports=__webpack_require__("./node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/common.js")(exports);const{formatters}=module.exports;formatters.j=function(v){try{return JSON.stringify(v)}catch(error){return"[UnexpectedJSONParseError]: "+error.message}}},"./node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/common.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=function(env){function createDebug(namespace){let prevTime,namespacesCache,enabledCache,enableOverride=null;function debug(...args){if(!debug.enabled)return;const self=debug,curr=Number(new Date),ms=curr-(prevTime||curr);self.diff=ms,self.prev=prevTime,self.curr=curr,prevTime=curr,args[0]=createDebug.coerce(args[0]),"string"!=typeof args[0]&&args.unshift("%O");let index=0;args[0]=args[0].replace(/%([a-zA-Z%])/g,((match,format)=>{if("%%"===match)return"%";index++;const formatter=createDebug.formatters[format];if("function"==typeof formatter){const val=args[index];match=formatter.call(self,val),args.splice(index,1),index--}return match})),createDebug.formatArgs.call(self,args);(self.log||createDebug.log).apply(self,args)}return debug.namespace=namespace,debug.useColors=createDebug.useColors(),debug.color=createDebug.selectColor(namespace),debug.extend=extend,debug.destroy=createDebug.destroy,Object.defineProperty(debug,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==enableOverride?enableOverride:(namespacesCache!==createDebug.namespaces&&(namespacesCache=createDebug.namespaces,enabledCache=createDebug.enabled(namespace)),enabledCache),set:v=>{enableOverride=v}}),"function"==typeof createDebug.init&&createDebug.init(debug),debug}function extend(namespace,delimiter){const newDebug=createDebug(this.namespace+(void 0===delimiter?":":delimiter)+namespace);return newDebug.log=this.log,newDebug}function matchesTemplate(search,template){let searchIndex=0,templateIndex=0,starIndex=-1,matchIndex=0;for(;searchIndex"-"+namespace))].join(",");return createDebug.enable(""),namespaces},createDebug.enable=function(namespaces){createDebug.save(namespaces),createDebug.namespaces=namespaces,createDebug.names=[],createDebug.skips=[];const split=("string"==typeof namespaces?namespaces:"").trim().replace(" ",",").split(",").filter(Boolean);for(const ns of split)"-"===ns[0]?createDebug.skips.push(ns.slice(1)):createDebug.names.push(ns)},createDebug.enabled=function(name){for(const skip of createDebug.skips)if(matchesTemplate(name,skip))return!1;for(const ns of createDebug.names)if(matchesTemplate(name,ns))return!0;return!1},createDebug.humanize=__webpack_require__("./node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"),createDebug.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(env).forEach((key=>{createDebug[key]=env[key]})),createDebug.names=[],createDebug.skips=[],createDebug.formatters={},createDebug.selectColor=function(namespace){let hash=0;for(let i=0;i{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?module.exports=__webpack_require__("./node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/browser.js"):module.exports=__webpack_require__("./node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/node.js")},"./node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/node.js":(module,exports,__webpack_require__)=>{const tty=__webpack_require__("tty"),util=__webpack_require__("util");exports.init=function(debug){debug.inspectOpts={};const keys=Object.keys(exports.inspectOpts);for(let i=0;i{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),exports.colors=[6,2,3,4,5,1];try{const supportsColor=__webpack_require__("./node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js");supportsColor&&(supportsColor.stderr||supportsColor).level>=2&&(exports.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(error){}exports.inspectOpts=Object.keys(process.env).filter((key=>/^debug_/i.test(key))).reduce(((obj,key)=>{const prop=key.substring(6).toLowerCase().replace(/_([a-z])/g,((_,k)=>k.toUpperCase()));let val=process.env[key];return val=!!/^(yes|on|true|enabled)$/i.test(val)||!/^(no|off|false|disabled)$/i.test(val)&&("null"===val?null:Number(val)),obj[prop]=val,obj}),{}),module.exports=__webpack_require__("./node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/common.js")(exports);const{formatters}=module.exports;formatters.o=function(v){return this.inspectOpts.colors=this.useColors,util.inspect(v,this.inspectOpts).split("\n").map((str=>str.trim())).join(" ")},formatters.O=function(v){return this.inspectOpts.colors=this.useColors,util.inspect(v,this.inspectOpts)}},"./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js":module=>{"use strict";const GENSYNC_START=Symbol.for("gensync:v1:start"),GENSYNC_SUSPEND=Symbol.for("gensync:v1:suspend");function assertTypeof(type,name,value,allowUndefined){if(typeof value===type||allowUndefined&&void 0===value)return;let msg;throw msg=allowUndefined?`Expected opts.${name} to be either a ${type}, or undefined.`:`Expected opts.${name} to be a ${type}.`,makeError(msg,"GENSYNC_OPTIONS_ERROR")}function makeError(msg,code){return Object.assign(new Error(msg),{code})}function buildOperation({name,arity,sync,async}){return setFunctionMetadata(name,arity,(function*(...args){const resume=yield GENSYNC_START;if(!resume){return sync.call(this,args)}let result;try{async.call(this,args,(value=>{result||(result={value},resume())}),(err=>{result||(result={err},resume())}))}catch(err){result={err},resume()}if(yield GENSYNC_SUSPEND,result.hasOwnProperty("err"))throw result.err;return result.value}))}function evaluateSync(gen){let value;for(;!({value}=gen.next()).done;)assertStart(value,gen);return value}function evaluateAsync(gen,resolve,reject){!function step(){try{let value;for(;!({value}=gen.next()).done;){assertStart(value,gen);let sync=!0,didSyncResume=!1;const out=gen.next((()=>{sync?didSyncResume=!0:step()}));if(sync=!1,assertSuspend(out,gen),!didSyncResume)return}return resolve(value)}catch(err){return reject(err)}}()}function assertStart(value,gen){value!==GENSYNC_START&&throwError(gen,makeError(`Got unexpected yielded value in gensync generator: ${JSON.stringify(value)}. Did you perhaps mean to use 'yield*' instead of 'yield'?`,"GENSYNC_EXPECTED_START"))}function assertSuspend({value,done},gen){(done||value!==GENSYNC_SUSPEND)&&throwError(gen,makeError(done?"Unexpected generator completion. If you get this, it is probably a gensync bug.":`Expected GENSYNC_SUSPEND, got ${JSON.stringify(value)}. If you get this, it is probably a gensync bug.`,"GENSYNC_EXPECTED_SUSPEND"))}function throwError(gen,err){throw gen.throw&&gen.throw(err),err}function setFunctionMetadata(name,arity,fn){if("string"==typeof name){const nameDesc=Object.getOwnPropertyDescriptor(fn,"name");nameDesc&&!nameDesc.configurable||Object.defineProperty(fn,"name",Object.assign(nameDesc||{},{configurable:!0,value:name}))}if("number"==typeof arity){const lengthDesc=Object.getOwnPropertyDescriptor(fn,"length");lengthDesc&&!lengthDesc.configurable||Object.defineProperty(fn,"length",Object.assign(lengthDesc||{},{configurable:!0,value:arity}))}return fn}module.exports=Object.assign((function(optsOrFn){let genFn=optsOrFn;return genFn="function"!=typeof optsOrFn?function({name,arity,sync,async,errback}){if(assertTypeof("string","name",name,!0),assertTypeof("number","arity",arity,!0),assertTypeof("function","sync",sync),assertTypeof("function","async",async,!0),assertTypeof("function","errback",errback,!0),async&&errback)throw makeError("Expected one of either opts.async or opts.errback, but got _both_.","GENSYNC_OPTIONS_ERROR");if("string"!=typeof name){let fnName;errback&&errback.name&&"errback"!==errback.name&&(fnName=errback.name),async&&async.name&&"async"!==async.name&&(fnName=async.name.replace(/Async$/,"")),sync&&sync.name&&"sync"!==sync.name&&(fnName=sync.name.replace(/Sync$/,"")),"string"==typeof fnName&&(name=fnName)}"number"!=typeof arity&&(arity=sync.length);return buildOperation({name,arity,sync:function(args){return sync.apply(this,args)},async:function(args,resolve,reject){async?async.apply(this,args).then(resolve,reject):errback?errback.call(this,...args,((err,value)=>{null==err?resolve(value):reject(err)})):resolve(sync.apply(this,args))}})}(optsOrFn):function(genFn){return setFunctionMetadata(genFn.name,genFn.length,(function(...args){return genFn.apply(this,args)}))}(optsOrFn),Object.assign(genFn,function(genFn){const fns={sync:function(...args){return evaluateSync(genFn.apply(this,args))},async:function(...args){return new Promise(((resolve,reject)=>{evaluateAsync(genFn.apply(this,args),resolve,reject)}))},errback:function(...args){const cb=args.pop();if("function"!=typeof cb)throw makeError("Asynchronous function called without callback","GENSYNC_ERRBACK_NO_CALLBACK");let gen;try{gen=genFn.apply(this,args)}catch(err){return void cb(err)}evaluateAsync(gen,(val=>cb(void 0,val)),(err=>cb(err)))}};return fns}(genFn))}),{all:buildOperation({name:"all",arity:1,sync:function(args){return Array.from(args[0]).map((item=>evaluateSync(item)))},async:function(args,resolve,reject){const items=Array.from(args[0]);if(0===items.length)return void Promise.resolve().then((()=>resolve([])));let count=0;const results=items.map((()=>{}));items.forEach(((item,i)=>{evaluateAsync(item,(val=>{results[i]=val,count+=1,count===results.length&&resolve(results)}),reject)}))}}),race:buildOperation({name:"race",arity:1,sync:function(args){const items=Array.from(args[0]);if(0===items.length)throw makeError("Must race at least 1 item","GENSYNC_RACE_NONEMPTY");return evaluateSync(items[0])},async:function(args,resolve,reject){const items=Array.from(args[0]);if(0===items.length)throw makeError("Must race at least 1 item","GENSYNC_RACE_NONEMPTY");for(const item of items)evaluateAsync(item,resolve,reject)}})})},"./node_modules/.pnpm/globals@11.12.0/node_modules/globals/index.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=__webpack_require__("./node_modules/.pnpm/globals@11.12.0/node_modules/globals/globals.json")},"./node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js":module=>{"use strict";module.exports=(flag,argv=process.argv)=>{const prefix=flag.startsWith("-")?"":1===flag.length?"-":"--",position=argv.indexOf(prefix+flag),terminatorPosition=argv.indexOf("--");return-1!==position&&(-1===terminatorPosition||position{"use strict";const object={},hasOwnProperty=object.hasOwnProperty,forOwn=(object,callback)=>{for(const key in object)hasOwnProperty.call(object,key)&&callback(key,object[key])},fourHexEscape=hex=>"\\u"+("0000"+hex).slice(-4),hexadecimal=(code,lowercase)=>{let hexadecimal=code.toString(16);return lowercase?hexadecimal:hexadecimal.toUpperCase()},toString=object.toString,isArray=Array.isArray,isBigInt=value=>"bigint"==typeof value,singleEscapes={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},regexSingleEscape=/[\\\b\f\n\r\t]/,regexDigit=/[0-9]/,regexWhitespace=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,escapeEverythingRegex=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,escapeNonAsciiRegex=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,jsesc=(argument,options)=>{const increaseIndentation=()=>{oldIndent=indent,++options.indentLevel,indent=options.indent.repeat(options.indentLevel)},defaults={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:"\t",indentLevel:0,__inline1__:!1,__inline2__:!1},json=options&&options.json;var destination,source;json&&(defaults.quotes="double",defaults.wrap=!0),destination=defaults,"single"!=(options=(source=options)?(forOwn(source,((key,value)=>{destination[key]=value})),destination):destination).quotes&&"double"!=options.quotes&&"backtick"!=options.quotes&&(options.quotes="single");const quote="double"==options.quotes?'"':"backtick"==options.quotes?"`":"'",compact=options.compact,lowercaseHex=options.lowercaseHex;let indent=options.indent.repeat(options.indentLevel),oldIndent="";const inline1=options.__inline1__,inline2=options.__inline2__,newLine=compact?"":"\n";let result,isEmpty=!0;const useBinNumbers="binary"==options.numbers,useOctNumbers="octal"==options.numbers,useDecNumbers="decimal"==options.numbers,useHexNumbers="hexadecimal"==options.numbers;if(json&&argument&&(value=>"function"==typeof value)(argument.toJSON)&&(argument=argument.toJSON()),!(value=>"string"==typeof value||"[object String]"==toString.call(value))(argument)){if((value=>"[object Map]"==toString.call(value))(argument))return 0==argument.size?"new Map()":(compact||(options.__inline1__=!0,options.__inline2__=!1),"new Map("+jsesc(Array.from(argument),options)+")");if((value=>"[object Set]"==toString.call(value))(argument))return 0==argument.size?"new Set()":"new Set("+jsesc(Array.from(argument),options)+")";if((value=>"function"==typeof Buffer&&Buffer.isBuffer(value))(argument))return 0==argument.length?"Buffer.from([])":"Buffer.from("+jsesc(Array.from(argument),options)+")";if(isArray(argument))return result=[],options.wrap=!0,inline1&&(options.__inline1__=!1,options.__inline2__=!0),inline2||increaseIndentation(),((array,callback)=>{const length=array.length;let index=-1;for(;++index{isEmpty=!1,inline2&&(options.__inline2__=!1),result.push((compact||inline2?"":indent)+jsesc(value,options))})),isEmpty?"[]":inline2?"["+result.join(", ")+"]":"["+newLine+result.join(","+newLine)+newLine+(compact?"":oldIndent)+"]";if((value=>"number"==typeof value||"[object Number]"==toString.call(value))(argument)||isBigInt(argument)){if(json)return JSON.stringify(Number(argument));let result;if(useDecNumbers)result=String(argument);else if(useHexNumbers){let hexadecimal=argument.toString(16);lowercaseHex||(hexadecimal=hexadecimal.toUpperCase()),result="0x"+hexadecimal}else useBinNumbers?result="0b"+argument.toString(2):useOctNumbers&&(result="0o"+argument.toString(8));return isBigInt(argument)?result+"n":result}return isBigInt(argument)?json?JSON.stringify(Number(argument)):argument+"n":(value=>"[object Object]"==toString.call(value))(argument)?(result=[],options.wrap=!0,increaseIndentation(),forOwn(argument,((key,value)=>{isEmpty=!1,result.push((compact?"":indent)+jsesc(key,options)+":"+(compact?"":" ")+jsesc(value,options))})),isEmpty?"{}":"{"+newLine+result.join(","+newLine)+newLine+(compact?"":oldIndent)+"}"):json?JSON.stringify(argument)||"null":String(argument)}const regex=options.escapeEverything?escapeEverythingRegex:escapeNonAsciiRegex;return result=argument.replace(regex,((char,pair,lone,quoteChar,index,string)=>{if(pair){if(options.minimal)return pair;const first=pair.charCodeAt(0),second=pair.charCodeAt(1);if(options.es6){return"\\u{"+hexadecimal(1024*(first-55296)+second-56320+65536,lowercaseHex)+"}"}return fourHexEscape(hexadecimal(first,lowercaseHex))+fourHexEscape(hexadecimal(second,lowercaseHex))}if(lone)return fourHexEscape(hexadecimal(lone.charCodeAt(0),lowercaseHex));if("\0"==char&&!json&&!regexDigit.test(string.charAt(index+1)))return"\\0";if(quoteChar)return quoteChar==quote||options.escapeEverything?"\\"+quoteChar:quoteChar;if(regexSingleEscape.test(char))return singleEscapes[char];if(options.minimal&&!regexWhitespace.test(char))return char;const hex=hexadecimal(char.charCodeAt(0),lowercaseHex);return json||hex.length>2?fourHexEscape(hex):"\\x"+("00"+hex).slice(-2)})),"`"==quote&&(result=result.replace(/\$\{/g,"\\${")),options.isScriptContext&&(result=result.replace(/<\/(script|style)/gi,"<\\/$1").replace(/ + +-------------------------------------------------------------------------------- + + + + + +## Table of Contents + +- [Examples](#examples) + - [Consuming a source map](#consuming-a-source-map) + - [Generating a source map](#generating-a-source-map) + - [With SourceNode (high level API)](#with-sourcenode-high-level-api) + - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) +- [API](#api) + - [SourceMapConsumer](#sourcemapconsumer) + - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) + - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) + - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) + - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) + - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) + - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) + - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) + - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) + - [SourceMapGenerator](#sourcemapgenerator) + - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) + - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) + - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) + - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) + - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) + - [SourceNode](#sourcenode) + - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) + - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) + - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) + - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) + - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) + - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) + - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) + - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) + - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) + - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) + + + +## Examples + +### Consuming a source map + +```js +var rawSourceMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: 'http://example.com/www/js/', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' +}; + +var smc = new SourceMapConsumer(rawSourceMap); + +console.log(smc.sources); +// [ 'http://example.com/www/js/one.js', +// 'http://example.com/www/js/two.js' ] + +console.log(smc.originalPositionFor({ + line: 2, + column: 28 +})); +// { source: 'http://example.com/www/js/two.js', +// line: 2, +// column: 10, +// name: 'n' } + +console.log(smc.generatedPositionFor({ + source: 'http://example.com/www/js/two.js', + line: 2, + column: 10 +})); +// { line: 2, column: 28 } + +smc.eachMapping(function (m) { + // ... +}); +``` + +### Generating a source map + +In depth guide: +[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) + +#### With SourceNode (high level API) + +```js +function compile(ast) { + switch (ast.type) { + case 'BinaryExpression': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + [compile(ast.left), " + ", compile(ast.right)] + ); + case 'Literal': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + String(ast.value) + ); + // ... + default: + throw new Error("Bad AST"); + } +} + +var ast = parse("40 + 2", "add.js"); +console.log(compile(ast).toStringWithSourceMap({ + file: 'add.js' +})); +// { code: '40 + 2', +// map: [object SourceMapGenerator] } +``` + +#### With SourceMapGenerator (low level API) + +```js +var map = new SourceMapGenerator({ + file: "source-mapped.js" +}); + +map.addMapping({ + generated: { + line: 10, + column: 35 + }, + source: "foo.js", + original: { + line: 33, + column: 2 + }, + name: "christopher" +}); + +console.log(map.toString()); +// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' +``` + +## API + +Get a reference to the module: + +```js +// Node.js +var sourceMap = require('source-map'); + +// Browser builds +var sourceMap = window.sourceMap; + +// Inside Firefox +const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); +``` + +### SourceMapConsumer + +A SourceMapConsumer instance represents a parsed source map which we can query +for information about the original file positions by giving it a file position +in the generated source. + +#### new SourceMapConsumer(rawSourceMap) + +The only parameter is the raw source map (either as a string which can be +`JSON.parse`'d, or an object). According to the spec, source maps have the +following attributes: + +* `version`: Which version of the source map spec this map is following. + +* `sources`: An array of URLs to the original source files. + +* `names`: An array of identifiers which can be referenced by individual + mappings. + +* `sourceRoot`: Optional. The URL root from which all sources are relative. + +* `sourcesContent`: Optional. An array of contents of the original source files. + +* `mappings`: A string of base64 VLQs which contain the actual mappings. + +* `file`: Optional. The generated filename this source map is associated with. + +```js +var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); +``` + +#### SourceMapConsumer.prototype.computeColumnSpans() + +Compute the last column for each generated mapping. The last column is +inclusive. + +```js +// Before: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] + +consumer.computeColumnSpans(); + +// After: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1, +// lastColumn: 9 }, +// { line: 2, +// column: 10, +// lastColumn: 19 }, +// { line: 2, +// column: 20, +// lastColumn: Infinity } ] + +``` + +#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) + +Returns the original source, line, and column information for the generated +source's line and column positions provided. The only argument is an object with +the following properties: + +* `line`: The line number in the generated source. Line numbers in + this library are 1-based (note that the underlying source map + specification uses 0-based line numbers -- this library handles the + translation). + +* `column`: The column number in the generated source. Column numbers + in this library are 0-based. + +* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or + `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest + element that is smaller than or greater than the one we are searching for, + respectively, if the exact element cannot be found. Defaults to + `SourceMapConsumer.GREATEST_LOWER_BOUND`. + +and an object is returned with the following properties: + +* `source`: The original source file, or null if this information is not + available. + +* `line`: The line number in the original source, or null if this information is + not available. The line number is 1-based. + +* `column`: The column number in the original source, or null if this + information is not available. The column number is 0-based. + +* `name`: The original identifier, or null if this information is not available. + +```js +consumer.originalPositionFor({ line: 2, column: 10 }) +// { source: 'foo.coffee', +// line: 2, +// column: 2, +// name: null } + +consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) +// { source: null, +// line: null, +// column: null, +// name: null } +``` + +#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) + +Returns the generated line and column information for the original source, +line, and column positions provided. The only argument is an object with +the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. The line number is + 1-based. + +* `column`: The column number in the original source. The column + number is 0-based. + +and an object is returned with the following properties: + +* `line`: The line number in the generated source, or null. The line + number is 1-based. + +* `column`: The column number in the generated source, or null. The + column number is 0-based. + +```js +consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) +// { line: 1, +// column: 56 } +``` + +#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) + +Returns all generated line and column information for the original source, line, +and column provided. If no column is provided, returns all mappings +corresponding to a either the line we are searching for or the next closest line +that has any mappings. Otherwise, returns all mappings corresponding to the +given line and either the column we are searching for or the next closest column +that has any offsets. + +The only argument is an object with the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. The line number is + 1-based. + +* `column`: Optional. The column number in the original source. The + column number is 0-based. + +and an array of objects is returned, each with the following properties: + +* `line`: The line number in the generated source, or null. The line + number is 1-based. + +* `column`: The column number in the generated source, or null. The + column number is 0-based. + +```js +consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] +``` + +#### SourceMapConsumer.prototype.hasContentsOfAllSources() + +Return true if we have the embedded source content for every source listed in +the source map, false otherwise. + +In other words, if this method returns `true`, then +`consumer.sourceContentFor(s)` will succeed for every source `s` in +`consumer.sources`. + +```js +// ... +if (consumer.hasContentsOfAllSources()) { + consumerReadyCallback(consumer); +} else { + fetchSources(consumer, consumerReadyCallback); +} +// ... +``` + +#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) + +Returns the original source content for the source provided. The only +argument is the URL of the original source file. + +If the source content for the given source is not found, then an error is +thrown. Optionally, pass `true` as the second param to have `null` returned +instead. + +```js +consumer.sources +// [ "my-cool-lib.clj" ] + +consumer.sourceContentFor("my-cool-lib.clj") +// "..." + +consumer.sourceContentFor("this is not in the source map"); +// Error: "this is not in the source map" is not in the source map + +consumer.sourceContentFor("this is not in the source map", true); +// null +``` + +#### SourceMapConsumer.prototype.eachMapping(callback, context, order) + +Iterate over each mapping between an original source/line/column and a +generated line/column in this source map. + +* `callback`: The function that is called with each mapping. Mappings have the + form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, + name }` + +* `context`: Optional. If specified, this object will be the value of `this` + every time that `callback` is called. + +* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or + `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over + the mappings sorted by the generated file's line/column order or the + original's source/line/column order, respectively. Defaults to + `SourceMapConsumer.GENERATED_ORDER`. + +```js +consumer.eachMapping(function (m) { console.log(m); }) +// ... +// { source: 'illmatic.js', +// generatedLine: 1, +// generatedColumn: 0, +// originalLine: 1, +// originalColumn: 0, +// name: null } +// { source: 'illmatic.js', +// generatedLine: 2, +// generatedColumn: 0, +// originalLine: 2, +// originalColumn: 0, +// name: null } +// ... +``` +### SourceMapGenerator + +An instance of the SourceMapGenerator represents a source map which is being +built incrementally. + +#### new SourceMapGenerator([startOfSourceMap]) + +You may pass an object with the following properties: + +* `file`: The filename of the generated source that this source map is + associated with. + +* `sourceRoot`: A root for all relative URLs in this source map. + +* `skipValidation`: Optional. When `true`, disables validation of mappings as + they are added. This can improve performance but should be used with + discretion, as a last resort. Even then, one should avoid using this flag when + running tests, if possible. + +* `ignoreInvalidMapping`: Optional. When `true`, instead of throwing error on + invalid mapping, it will be ignored. + +```js +var generator = new sourceMap.SourceMapGenerator({ + file: "my-generated-javascript-file.js", + sourceRoot: "http://example.com/app/js/" +}); +``` + +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer, sourceMapGeneratorOptions) + +Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. + +* `sourceMapConsumer` The SourceMap. + +* `sourceMapGeneratorOptions` options that will be passed to the SourceMapGenerator constructor which used under the hood. + +```js +var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer, { + ignoreInvalidMapping: true, +}); +``` + +#### SourceMapGenerator.prototype.addMapping(mapping) + +Add a single mapping from original source line and column to the generated +source's line and column for this source map being created. The mapping object +should have the following properties: + +* `generated`: An object with the generated line and column positions. + +* `original`: An object with the original line and column positions. + +* `source`: The original source file (relative to the sourceRoot). + +* `name`: An optional original token name for this mapping. + +```js +generator.addMapping({ + source: "module-one.scm", + original: { line: 128, column: 0 }, + generated: { line: 3, column: 456 } +}) +``` + +#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for an original source file. + +* `sourceFile` the URL of the original source file. + +* `sourceContent` the content of the source file. + +```js +generator.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) + +Applies a SourceMap for a source file to the SourceMap. +Each mapping to the supplied source file is rewritten using the +supplied SourceMap. Note: The resolution for the resulting mappings +is the minimum of this map and the supplied map. + +* `sourceMapConsumer`: The SourceMap to be applied. + +* `sourceFile`: Optional. The filename of the source file. + If omitted, sourceMapConsumer.file will be used, if it exists. + Otherwise an error will be thrown. + +* `sourceMapPath`: Optional. The dirname of the path to the SourceMap + to be applied. If relative, it is relative to the SourceMap. + + This parameter is needed when the two SourceMaps aren't in the same + directory, and the SourceMap to be applied contains relative source + paths. If so, those relative source paths need to be rewritten + relative to the SourceMap. + + If omitted, it is assumed that both SourceMaps are in the same directory, + thus not needing any rewriting. (Supplying `'.'` has the same effect.) + +#### SourceMapGenerator.prototype.toString() + +Renders the source map being generated to a string. + +```js +generator.toString() +// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' +``` + +### SourceNode + +SourceNodes provide a way to abstract over interpolating and/or concatenating +snippets of generated JavaScript source code, while maintaining the line and +column information associated between those snippets and the original source +code. This is useful as the final intermediate representation a compiler might +use before outputting the generated JS and source map. + +#### new SourceNode([line, column, source[, chunk[, name]]]) + +* `line`: The original line number associated with this source node, or null if + it isn't associated with an original line. The line number is 1-based. + +* `column`: The original column number associated with this source node, or null + if it isn't associated with an original column. The column number + is 0-based. + +* `source`: The original source's filename; null if no filename is provided. + +* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see + below. + +* `name`: Optional. The original identifier. + +```js +var node = new SourceNode(1, 2, "a.cpp", [ + new SourceNode(3, 4, "b.cpp", "extern int status;\n"), + new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), + new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), +]); +``` + +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) + +Creates a SourceNode from generated code and a SourceMapConsumer. + +* `code`: The generated code + +* `sourceMapConsumer` The SourceMap for the generated code + +* `relativePath` The optional path that relative sources in `sourceMapConsumer` + should be relative to. + +```js +var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); +var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), + consumer); +``` + +#### SourceNode.prototype.add(chunk) + +Add a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.add(" + "); +node.add(otherNode); +node.add([leftHandOperandNode, " + ", rightHandOperandNode]); +``` + +#### SourceNode.prototype.prepend(chunk) + +Prepend a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.prepend("/** Build Id: f783haef86324gf **/\n\n"); +``` + +#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for a source file. This will be added to the +`SourceMap` in the `sourcesContent` field. + +* `sourceFile`: The filename of the source file + +* `sourceContent`: The content of the source file + +```js +node.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceNode.prototype.walk(fn) + +Walk over the tree of JS snippets in this node and its children. The walking +function is called once for each snippet of JS and is passed that snippet and +the its original associated source's line/column location. + +* `fn`: The traversal function. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.walk(function (code, loc) { console.log("WALK:", code, loc); }) +// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } +// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } +// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } +// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } +``` + +#### SourceNode.prototype.walkSourceContents(fn) + +Walk over the tree of SourceNodes. The walking function is called for each +source file content and is passed the filename and source content. + +* `fn`: The traversal function. + +```js +var a = new SourceNode(1, 2, "a.js", "generated from a"); +a.setSourceContent("a.js", "original a"); +var b = new SourceNode(1, 2, "b.js", "generated from b"); +b.setSourceContent("b.js", "original b"); +var c = new SourceNode(1, 2, "c.js", "generated from c"); +c.setSourceContent("c.js", "original c"); + +var node = new SourceNode(null, null, null, [a, b, c]); +node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) +// WALK: a.js : original a +// WALK: b.js : original b +// WALK: c.js : original c +``` + +#### SourceNode.prototype.join(sep) + +Like `Array.prototype.join` except for SourceNodes. Inserts the separator +between each of this source node's children. + +* `sep`: The separator. + +```js +var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); +var operand = new SourceNode(3, 4, "a.rs", "="); +var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); + +var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); +var joinedNode = node.join(" "); +``` + +#### SourceNode.prototype.replaceRight(pattern, replacement) + +Call `String.prototype.replace` on the very right-most source snippet. Useful +for trimming white space from the end of a source node, etc. + +* `pattern`: The pattern to replace. + +* `replacement`: The thing to replace the pattern with. + +```js +// Trim trailing white space. +node.replaceRight(/\s*$/, ""); +``` + +#### SourceNode.prototype.toString() + +Return the string representation of this source node. Walks over the tree and +concatenates all the various snippets together to one string. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toString() +// 'unodostresquatro' +``` + +#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) + +Returns the string representation of this tree of source nodes, plus a +SourceMapGenerator which contains all the mappings between the generated and +original sources. + +The arguments are the same as those to `new SourceMapGenerator`. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toStringWithSourceMap({ file: "my-output-file.js" }) +// { code: 'unodostresquatro', +// map: [object SourceMapGenerator] } +``` diff --git a/node_modules/source-map-js/lib/array-set.js b/node_modules/source-map-js/lib/array-set.js new file mode 100644 index 0000000..fbd5c81 --- /dev/null +++ b/node_modules/source-map-js/lib/array-set.js @@ -0,0 +1,121 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var has = Object.prototype.hasOwnProperty; +var hasNativeMap = typeof Map !== "undefined"; + +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ +function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); +} + +/** + * Static method for creating ArraySet instances from an existing array. + */ +ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; +}; + +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ +ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; + +/** + * Add the given string to this set. + * + * @param String aStr + */ +ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; + +/** + * Is the given string a member of this set? + * + * @param String aStr + */ +ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } +}; + +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ +ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; + +/** + * What is the element at the given index? + * + * @param Number aIdx + */ +ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); +}; + +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ +ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +exports.ArraySet = ArraySet; diff --git a/node_modules/source-map-js/lib/base64-vlq.js b/node_modules/source-map-js/lib/base64-vlq.js new file mode 100644 index 0000000..612b404 --- /dev/null +++ b/node_modules/source-map-js/lib/base64-vlq.js @@ -0,0 +1,140 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var base64 = require('./base64'); + +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + +var VLQ_BASE_SHIFT = 5; + +// binary: 100000 +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + +// binary: 011111 +var VLQ_BASE_MASK = VLQ_BASE - 1; + +// binary: 100000 +var VLQ_CONTINUATION_BIT = VLQ_BASE; + +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ +function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; +} + +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; +} + +/** + * Returns the base 64 VLQ encoded value. + */ +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ +exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; diff --git a/node_modules/source-map-js/lib/base64.js b/node_modules/source-map-js/lib/base64.js new file mode 100644 index 0000000..8aa86b3 --- /dev/null +++ b/node_modules/source-map-js/lib/base64.js @@ -0,0 +1,67 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ +exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); +}; + +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ +exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; +}; diff --git a/node_modules/source-map-js/lib/binary-search.js b/node_modules/source-map-js/lib/binary-search.js new file mode 100644 index 0000000..010ac94 --- /dev/null +++ b/node_modules/source-map-js/lib/binary-search.js @@ -0,0 +1,111 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; + +/** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ +function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} + +/** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ +exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; +}; diff --git a/node_modules/source-map-js/lib/mapping-list.js b/node_modules/source-map-js/lib/mapping-list.js new file mode 100644 index 0000000..06d1274 --- /dev/null +++ b/node_modules/source-map-js/lib/mapping-list.js @@ -0,0 +1,79 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); + +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ +function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} + +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ +function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; +} + +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ +MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + +/** + * Add the given source mapping. + * + * @param Object aMapping + */ +MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } +}; + +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ +MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; +}; + +exports.MappingList = MappingList; diff --git a/node_modules/source-map-js/lib/quick-sort.js b/node_modules/source-map-js/lib/quick-sort.js new file mode 100644 index 0000000..23f9eda --- /dev/null +++ b/node_modules/source-map-js/lib/quick-sort.js @@ -0,0 +1,132 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +function SortTemplate(comparator) { + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} + +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ +function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); +} + +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot, false) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} + + return doQuickSort; +} + +function cloneSort(comparator) { + let template = SortTemplate.toString(); + let templateFn = new Function(`return ${template}`)(); + return templateFn(comparator); +} + +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + +let sortCache = new WeakMap(); +exports.quickSort = function (ary, comparator, start = 0) { + let doQuickSort = sortCache.get(comparator); + if (doQuickSort === void 0) { + doQuickSort = cloneSort(comparator); + sortCache.set(comparator, doQuickSort); + } + doQuickSort(ary, comparator, start, ary.length - 1); +}; diff --git a/node_modules/source-map-js/lib/source-map-consumer.d.ts b/node_modules/source-map-js/lib/source-map-consumer.d.ts new file mode 100644 index 0000000..744bda7 --- /dev/null +++ b/node_modules/source-map-js/lib/source-map-consumer.d.ts @@ -0,0 +1 @@ +export { SourceMapConsumer } from '..'; diff --git a/node_modules/source-map-js/lib/source-map-consumer.js b/node_modules/source-map-js/lib/source-map-consumer.js new file mode 100644 index 0000000..ee66114 --- /dev/null +++ b/node_modules/source-map-js/lib/source-map-consumer.js @@ -0,0 +1,1188 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var binarySearch = require('./binary-search'); +var ArraySet = require('./array-set').ArraySet; +var base64VLQ = require('./base64-vlq'); +var quickSort = require('./quick-sort').quickSort; + +function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); +} + +SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); +} + +/** + * The version of the source mapping spec that we are consuming. + */ +SourceMapConsumer.prototype._version = 3; + +// `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); + +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; + +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; + +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ +SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + var boundCallback = aCallback.bind(context); + var names = this._names; + var sources = this._sources; + var sourceMapURL = this._sourceMapURL; + + for (var i = 0, n = mappings.length; i < n; i++) { + var mapping = mappings[i]; + var source = mapping.source === null ? null : sources.at(mapping.source); + if(source !== null) { + source = util.computeSourceURL(sourceRoot, source, sourceMapURL); + } + boundCallback({ + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : names.at(mapping.name) + }); + } + }; + +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + +exports.SourceMapConsumer = SourceMapConsumer; + +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ +function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + +/** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ +BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; +}; + +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ +BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + +/** + * The version of the source mapping spec that we are consuming. + */ +BasicSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } +}); + +/** + * Provide the JIT with a nice shape / hidden class. + */ +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + +const compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine; +function sortGenerated(array, start) { + let l = array.length; + let n = array.length - start; + if (n <= 1) { + return; + } else if (n == 2) { + let a = array[start]; + let b = array[start + 1]; + if (compareGenerated(a, b) > 0) { + array[start] = b; + array[start + 1] = a; + } + } else if (n < 20) { + for (let i = start; i < l; i++) { + for (let j = i; j > start; j--) { + let a = array[j - 1]; + let b = array[j]; + if (compareGenerated(a, b) <= 0) { + break; + } + array[j - 1] = b; + array[j] = a; + } + } + } else { + quickSort(array, compareGenerated, start); + } +} +BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + let subarrayStart = 0; + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + + sortGenerated(generatedMappings, subarrayStart); + subarrayStart = generatedMappings.length; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + let currentSource = mapping.source; + while (originalMappings.length <= currentSource) { + originalMappings.push(null); + } + if (originalMappings[currentSource] === null) { + originalMappings[currentSource] = []; + } + originalMappings[currentSource].push(mapping); + } + } + } + + sortGenerated(generatedMappings, subarrayStart); + this.__generatedMappings = generatedMappings; + + for (var i = 0; i < originalMappings.length; i++) { + if (originalMappings[i] != null) { + quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource); + } + } + this.__originalMappings = [].concat(...originalMappings); + }; + +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ +BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ +BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ +function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + +/** + * The version of the source mapping spec that we are consuming. + */ +IndexedSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } +}); + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content || content === '') { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if(source !== null) { + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/node_modules/source-map-js/lib/source-map-generator.d.ts b/node_modules/source-map-js/lib/source-map-generator.d.ts new file mode 100644 index 0000000..f59d70a --- /dev/null +++ b/node_modules/source-map-js/lib/source-map-generator.d.ts @@ -0,0 +1 @@ +export { SourceMapGenerator } from '..'; diff --git a/node_modules/source-map-js/lib/source-map-generator.js b/node_modules/source-map-js/lib/source-map-generator.js new file mode 100644 index 0000000..bab04ff --- /dev/null +++ b/node_modules/source-map-js/lib/source-map-generator.js @@ -0,0 +1,444 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var base64VLQ = require('./base64-vlq'); +var util = require('./util'); +var ArraySet = require('./array-set').ArraySet; +var MappingList = require('./mapping-list').MappingList; + +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ +function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._ignoreInvalidMapping = util.getArg(aArgs, 'ignoreInvalidMapping', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator.prototype._version = 3; + +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ +SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, { + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + })); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ +SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + if (this._validateMapping(generated, original, source, name) === false) { + return; + } + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + +/** + * Set the source content for a source file. + */ +SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ +SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ +SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + var message = 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message); + } + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + var message = 'Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + }); + + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message) + } + } + }; + +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ +SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + +SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + +/** + * Externalize the source map. + */ +SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + +/** + * Render the source map being generated to a string. + */ +SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + +exports.SourceMapGenerator = SourceMapGenerator; diff --git a/node_modules/source-map-js/lib/source-node.d.ts b/node_modules/source-map-js/lib/source-node.d.ts new file mode 100644 index 0000000..4df6a1a --- /dev/null +++ b/node_modules/source-map-js/lib/source-node.d.ts @@ -0,0 +1 @@ +export { SourceNode } from '..'; diff --git a/node_modules/source-map-js/lib/source-node.js b/node_modules/source-map-js/lib/source-node.js new file mode 100644 index 0000000..8bcdbe3 --- /dev/null +++ b/node_modules/source-map-js/lib/source-node.js @@ -0,0 +1,413 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; +var util = require('./util'); + +// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). +var REGEX_NEWLINE = /(\r?\n)/; + +// Newline character code for charCodeAt() comparisons +var NEWLINE_CODE = 10; + +// Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! +var isSourceNode = "$$$isSourceNode$$$"; + +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} + +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ +SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } +}; + +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; +}; + +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; +}; + +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ +SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; + +/** + * Returns the string representation of this source node along with a source + * map. + */ +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; +}; + +exports.SourceNode = SourceNode; diff --git a/node_modules/source-map-js/lib/util.js b/node_modules/source-map-js/lib/util.js new file mode 100644 index 0000000..430e2d0 --- /dev/null +++ b/node_modules/source-map-js/lib/util.js @@ -0,0 +1,594 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ +function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} +exports.getArg = getArg; + +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; + +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} +exports.urlParse = urlParse; + +function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; +} +exports.urlGenerate = urlGenerate; + +var MAX_CACHED_INPUTS = 32; + +/** + * Takes some function `f(input) -> result` and returns a memoized version of + * `f`. + * + * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The + * memoization is a dumb-simple, linear least-recently-used cache. + */ +function lruMemoize(f) { + var cache = []; + + return function(input) { + for (var i = 0; i < cache.length; i++) { + if (cache[i].input === input) { + var temp = cache[0]; + cache[0] = cache[i]; + cache[i] = temp; + return cache[0].result; + } + } + + var result = f(input); + + cache.unshift({ + input, + result, + }); + + if (cache.length > MAX_CACHED_INPUTS) { + cache.pop(); + } + + return result; + }; +} + +/** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ +var normalize = lruMemoize(function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + // Split the path into parts between `/` characters. This is much faster than + // using `.split(/\/+/g)`. + var parts = []; + var start = 0; + var i = 0; + while (true) { + start = i; + i = path.indexOf("/", start); + if (i === -1) { + parts.push(path.slice(start)); + break; + } else { + parts.push(path.slice(start, i)); + while (i < path.length && path[i] === "/") { + i++; + } + } + } + + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; +}); +exports.normalize = normalize; + +/** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ +function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; +} +exports.join = join; + +exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); +}; + +/** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ +function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} +exports.relative = relative; + +var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); +}()); + +function identity (s) { + return s; +} + +/** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ +function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; +} +exports.toSetString = supportsNullProto ? identity : toSetString; + +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; +} +exports.fromSetString = supportsNullProto ? identity : fromSetString; + +function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; +} + +/** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ +function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByOriginalPositions = compareByOriginalPositions; + +function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) { + var cmp + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource; + +/** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ +function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + +function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine; + +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; +} + +/** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ +function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + +/** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ +function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); +} +exports.parseSourceMapInput = parseSourceMapInput; + +/** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ +function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); +} +exports.computeSourceURL = computeSourceURL; diff --git a/node_modules/source-map-js/package.json b/node_modules/source-map-js/package.json new file mode 100644 index 0000000..f58dbeb --- /dev/null +++ b/node_modules/source-map-js/package.json @@ -0,0 +1,71 @@ +{ + "name": "source-map-js", + "description": "Generates and consumes source maps", + "version": "1.2.1", + "homepage": "https://github.com/7rulnik/source-map-js", + "author": "Valentin 7rulnik Semirulnik ", + "contributors": [ + "Nick Fitzgerald ", + "Tobias Koppers ", + "Duncan Beevers ", + "Stephen Crane ", + "Ryan Seddon ", + "Miles Elam ", + "Mihai Bazon ", + "Michael Ficarra ", + "Todd Wolfson ", + "Alexander Solovyov ", + "Felix Gnass ", + "Conrad Irwin ", + "usrbincc ", + "David Glasser ", + "Chase Douglas ", + "Evan Wallace ", + "Heather Arthur ", + "Hugh Kennedy ", + "David Glasser ", + "Simon Lydell ", + "Jmeas Smith ", + "Michael Z Goddard ", + "azu ", + "John Gozde ", + "Adam Kirkton ", + "Chris Montgomery ", + "J. Ryan Stinnett ", + "Jack Herrington ", + "Chris Truter ", + "Daniel Espeset ", + "Jamie Wong ", + "Eddy Bruël ", + "Hawken Rives ", + "Gilad Peleg ", + "djchie ", + "Gary Ye ", + "Nicolas Lalevée " + ], + "repository": "7rulnik/source-map-js", + "main": "./source-map.js", + "files": [ + "source-map.js", + "source-map.d.ts", + "lib/" + ], + "engines": { + "node": ">=0.10.0" + }, + "license": "BSD-3-Clause", + "scripts": { + "test": "npm run build && node test/run-tests.js", + "build": "webpack --color", + "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" + }, + "devDependencies": { + "clean-publish": "^3.1.0", + "doctoc": "^0.15.0", + "webpack": "^1.12.0" + }, + "clean-publish": { + "cleanDocs": true + }, + "typings": "source-map.d.ts" +} diff --git a/node_modules/source-map-js/source-map.d.ts b/node_modules/source-map-js/source-map.d.ts new file mode 100644 index 0000000..ec8892f --- /dev/null +++ b/node_modules/source-map-js/source-map.d.ts @@ -0,0 +1,104 @@ +export interface StartOfSourceMap { + file?: string; + sourceRoot?: string; +} + +export interface RawSourceMap extends StartOfSourceMap { + version: string; + sources: string[]; + names: string[]; + sourcesContent?: string[]; + mappings: string; +} + +export interface Position { + line: number; + column: number; +} + +export interface LineRange extends Position { + lastColumn: number; +} + +export interface FindPosition extends Position { + // SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND + bias?: number; +} + +export interface SourceFindPosition extends FindPosition { + source: string; +} + +export interface MappedPosition extends Position { + source: string; + name?: string; +} + +export interface MappingItem { + source: string | null; + generatedLine: number; + generatedColumn: number; + originalLine: number | null; + originalColumn: number | null; + name: string | null; +} + +export class SourceMapConsumer { + static GENERATED_ORDER: number; + static ORIGINAL_ORDER: number; + + static GREATEST_LOWER_BOUND: number; + static LEAST_UPPER_BOUND: number; + + constructor(rawSourceMap: RawSourceMap); + readonly file: string | undefined | null; + readonly sourceRoot: string | undefined | null; + readonly sourcesContent: readonly string[] | null | undefined; + readonly sources: readonly string[] + + computeColumnSpans(): void; + originalPositionFor(generatedPosition: FindPosition): MappedPosition; + generatedPositionFor(originalPosition: SourceFindPosition): LineRange; + allGeneratedPositionsFor(originalPosition: MappedPosition): Position[]; + hasContentsOfAllSources(): boolean; + sourceContentFor(source: string, returnNullOnMissing?: boolean): string | null; + eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void; +} + +export interface Mapping { + generated: Position; + original?: Position | null; + source?: string | null; + name?: string | null; +} + +export class SourceMapGenerator { + constructor(startOfSourceMap?: StartOfSourceMap); + static fromSourceMap(sourceMapConsumer: SourceMapConsumer, startOfSourceMap?: StartOfSourceMap): SourceMapGenerator; + addMapping(mapping: Mapping): void; + setSourceContent(sourceFile: string, sourceContent: string | null | undefined): void; + applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void; + toString(): string; + toJSON(): RawSourceMap; +} + +export interface CodeWithSourceMap { + code: string; + map: SourceMapGenerator; +} + +export class SourceNode { + constructor(); + constructor(line: number, column: number, source: string); + constructor(line: number, column: number, source: string, chunk?: string, name?: string); + static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode; + add(chunk: string): void; + prepend(chunk: string): void; + setSourceContent(sourceFile: string, sourceContent: string): void; + walk(fn: (chunk: string, mapping: MappedPosition) => void): void; + walkSourceContents(fn: (file: string, content: string) => void): void; + join(sep: string): SourceNode; + replaceRight(pattern: string, replacement: string): SourceNode; + toString(): string; + toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap; +} diff --git a/node_modules/source-map-js/source-map.js b/node_modules/source-map-js/source-map.js new file mode 100644 index 0000000..bc88fe8 --- /dev/null +++ b/node_modules/source-map-js/source-map.js @@ -0,0 +1,8 @@ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/node_modules/sucrase/LICENSE b/node_modules/sucrase/LICENSE new file mode 100644 index 0000000..06d77d6 --- /dev/null +++ b/node_modules/sucrase/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2012-2018 various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/sucrase/README.md b/node_modules/sucrase/README.md new file mode 100644 index 0000000..c45138a --- /dev/null +++ b/node_modules/sucrase/README.md @@ -0,0 +1,295 @@ +# Sucrase + +[![Build Status](https://github.com/alangpierce/sucrase/workflows/All%20tests/badge.svg)](https://github.com/alangpierce/sucrase/actions) +[![npm version](https://img.shields.io/npm/v/sucrase.svg)](https://www.npmjs.com/package/sucrase) +[![Install Size](https://packagephobia.now.sh/badge?p=sucrase)](https://packagephobia.now.sh/result?p=sucrase) +[![MIT License](https://img.shields.io/npm/l/express.svg?maxAge=2592000)](LICENSE) +[![Join the chat at https://gitter.im/sucrasejs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/sucrasejs/Lobby) + +## [Try it out](https://sucrase.io) + +## Quick usage + +```bash +yarn add --dev sucrase # Or npm install --save-dev sucrase +node -r sucrase/register main.ts +``` + +Using the [ts-node](https://github.com/TypeStrong/ts-node) integration: + +```bash +yarn add --dev sucrase ts-node typescript +./node_modules/.bin/ts-node --transpiler sucrase/ts-node-plugin main.ts +``` + +## Project overview + +Sucrase is an alternative to Babel that allows super-fast development builds. +Instead of compiling a large range of JS features to be able to work in Internet +Explorer, Sucrase assumes that you're developing with a recent browser or recent +Node.js version, so it focuses on compiling non-standard language extensions: +JSX, TypeScript, and Flow. Because of this smaller scope, Sucrase can get away +with an architecture that is much more performant but less extensible and +maintainable. Sucrase's parser is forked from Babel's parser (so Sucrase is +indebted to Babel and wouldn't be possible without it) and trims it down to a +focused subset of what Babel solves. If it fits your use case, hopefully Sucrase +can speed up your development experience! + +**Sucrase has been extensively tested.** It can successfully build +the [Benchling](https://benchling.com/) frontend code, +[Babel](https://github.com/babel/babel), +[React](https://github.com/facebook/react), +[TSLint](https://github.com/palantir/tslint), +[Apollo client](https://github.com/apollographql/apollo-client), and +[decaffeinate](https://github.com/decaffeinate/decaffeinate) +with all tests passing, about 1 million lines of code total. + +**Sucrase is about 20x faster than Babel.** Here's one measurement of how +Sucrase compares with other tools when compiling the Jest codebase 3 times, +about 360k lines of code total: + +```text + Time Speed +Sucrase 0.57 seconds 636975 lines per second +swc 1.19 seconds 304526 lines per second +esbuild 1.45 seconds 248692 lines per second +TypeScript 8.98 seconds 40240 lines per second +Babel 9.18 seconds 39366 lines per second +``` + +Details: Measured on July 2022. Tools run in single-threaded mode without warm-up. See the +[benchmark code](https://github.com/alangpierce/sucrase/blob/main/benchmark/benchmark.ts) +for methodology and caveats. + +## Transforms + +The main configuration option in Sucrase is an array of transform names. These +transforms are available: + +* **jsx**: Enables JSX syntax. By default, JSX is transformed to `React.createClass`, + but may be preserved or transformed to `_jsx()` by setting the `jsxRuntime` option. + Also adds `createReactClass` display names and JSX context information. +* **typescript**: Compiles TypeScript code to JavaScript, removing type + annotations and handling features like enums. Does not check types. Sucrase + transforms each file independently, so you should enable the `isolatedModules` + TypeScript flag so that the typechecker will disallow the few features like + `const enum`s that need cross-file compilation. The Sucrase option `keepUnusedImports` + can be used to disable all automatic removal of imports and exports, analogous to TS + `verbatimModuleSyntax`. +* **flow**: Removes Flow type annotations. Does not check types. +* **imports**: Transforms ES Modules (`import`/`export`) to CommonJS + (`require`/`module.exports`) using the same approach as Babel and TypeScript + with `--esModuleInterop`. If `preserveDynamicImport` is specified in the Sucrase + options, then dynamic `import` expressions are left alone, which is particularly + useful in Node to load ESM-only libraries. If `preserveDynamicImport` is not + specified, `import` expressions are transformed into a promise-wrapped call to + `require`. +* **react-hot-loader**: Performs the equivalent of the `react-hot-loader/babel` + transform in the [react-hot-loader](https://github.com/gaearon/react-hot-loader) + project. This enables advanced hot reloading use cases such as editing of + bound methods. +* **jest**: Hoist desired [jest](https://jestjs.io/) method calls above imports in + the same way as [babel-plugin-jest-hoist](https://github.com/facebook/jest/tree/master/packages/babel-plugin-jest-hoist). + Does not validate the arguments passed to `jest.mock`, but the same rules still apply. + +When the `imports` transform is *not* specified (i.e. when targeting ESM), the +`injectCreateRequireForImportRequire` option can be specified to transform TS +`import foo = require("foo");` in a way that matches the +[TypeScript 4.7 behavior](https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#commonjs-interoperability) +with `module: nodenext`. + +These newer JS features are transformed by default: + +* [Optional chaining](https://github.com/tc39/proposal-optional-chaining): `a?.b` +* [Nullish coalescing](https://github.com/tc39/proposal-nullish-coalescing): `a ?? b` +* [Class fields](https://github.com/tc39/proposal-class-fields): `class C { x = 1; }`. + This includes static fields but not the `#x` private field syntax. +* [Numeric separators](https://github.com/tc39/proposal-numeric-separator): + `const n = 1_234;` +* [Optional catch binding](https://github.com/tc39/proposal-optional-catch-binding): + `try { doThing(); } catch { }`. + +If your target runtime supports these features, you can specify +`disableESTransforms: true` so that Sucrase preserves the syntax rather than +trying to transform it. Note that transpiled and standard class fields behave +slightly differently; see the +[TypeScript 3.7 release notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#the-usedefineforclassfields-flag-and-the-declare-property-modifier) +for details. If you use TypeScript, you can enable the TypeScript option +`useDefineForClassFields` to enable error checking related to these differences. + +### Unsupported syntax + +All JS syntax not mentioned above will "pass through" and needs to be supported +by your JS runtime. For example: + +* Decorators, private fields, `throw` expressions, generator arrow functions, + and `do` expressions are all unsupported in browsers and Node (as of this + writing), and Sucrase doesn't make an attempt to transpile them. +* Object rest/spread, async functions, and async iterators are all recent + features that should work fine, but might cause issues if you use older + versions of tools like webpack. BigInt and newer regex features may or may not + work, based on your tooling. + +### JSX Options + +By default, JSX is compiled to React functions in development mode. This can be +configured with a few options: + +* **jsxRuntime**: A string specifying the transform mode, which can be one of three values: + * `"classic"` (default): The original JSX transform that calls `React.createElement` by default. + To configure for non-React use cases, specify: + * **jsxPragma**: Element creation function, defaults to `React.createElement`. + * **jsxFragmentPragma**: Fragment component, defaults to `React.Fragment`. + * `"automatic"`: The [new JSX transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) + introduced with React 17, which calls `jsx` functions and auto-adds import statements. + To configure for non-React use cases, specify: + * **jsxImportSource**: Package name for auto-generated import statements, defaults to `react`. + * `"preserve"`: Don't transform JSX, and instead emit it as-is in the output code. +* **production**: If `true`, use production version of functions and don't include debugging + information. When using React in production mode with the automatic transform, this *must* be + set to true to avoid an error about `jsxDEV` being missing. + +### Legacy CommonJS interop + +Two legacy modes can be used with the `imports` transform: + +* **enableLegacyTypeScriptModuleInterop**: Use the default TypeScript approach + to CommonJS interop instead of assuming that TypeScript's `--esModuleInterop` + flag is enabled. For example, if a CJS module exports a function, legacy + TypeScript interop requires you to write `import * as add from './add';`, + while Babel, Webpack, Node.js, and TypeScript with `--esModuleInterop` require + you to write `import add from './add';`. As mentioned in the + [docs](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#support-for-import-d-from-cjs-form-commonjs-modules-with---esmoduleinterop), + the TypeScript team recommends you always use `--esModuleInterop`. +* **enableLegacyBabel5ModuleInterop**: Use the Babel 5 approach to CommonJS + interop, so that you can run `require('./MyModule')` instead of + `require('./MyModule').default`. Analogous to + [babel-plugin-add-module-exports](https://github.com/59naga/babel-plugin-add-module-exports). + +## Usage + +### Tool integrations + +* [Webpack](https://github.com/alangpierce/sucrase/tree/main/integrations/webpack-loader) +* [Gulp](https://github.com/alangpierce/sucrase/tree/main/integrations/gulp-plugin) +* [Jest](https://github.com/alangpierce/sucrase/tree/main/integrations/jest-plugin) +* [Rollup](https://github.com/rollup/plugins/tree/master/packages/sucrase) +* [Broccoli](https://github.com/stefanpenner/broccoli-sucrase) + +### Usage in Node + +The most robust way is to use the Sucrase plugin for [ts-node](https://github.com/TypeStrong/ts-node), +which has various Node integrations and configures Sucrase via `tsconfig.json`: +```bash +ts-node --transpiler sucrase/ts-node-plugin +``` + +For projects that don't target ESM, Sucrase also has a require hook with some +reasonable defaults that can be accessed in a few ways: + +* From code: `require("sucrase/register");` +* When invoking Node: `node -r sucrase/register main.ts` +* As a separate binary: `sucrase-node main.ts` + +Options can be passed to the require hook via a `SUCRASE_OPTIONS` environment +variable holding a JSON string of options. + +### Compiling a project to JS + +For simple use cases, Sucrase comes with a `sucrase` CLI that mirrors your +directory structure to an output directory: +```bash +sucrase ./srcDir -d ./outDir --transforms typescript,imports +``` + +### Usage from code + +For any advanced use cases, Sucrase can be called from JS directly: + +```js +import {transform} from "sucrase"; +const compiledCode = transform(code, {transforms: ["typescript", "imports"]}).code; +``` + +## What Sucrase is not + +Sucrase is intended to be useful for the most common cases, but it does not aim +to have nearly the scope and versatility of Babel. Some specific examples: + +* Sucrase does not check your code for errors. Sucrase's contract is that if you + give it valid code, it will produce valid JS code. If you give it invalid + code, it might produce invalid code, it might produce valid code, or it might + give an error. Always use Sucrase with a linter or typechecker, which is more + suited for error-checking. +* Sucrase is not pluginizable. With the current architecture, transforms need to + be explicitly written to cooperate with each other, so each additional + transform takes significant extra work. +* Sucrase is not good for prototyping language extensions and upcoming language + features. Its faster architecture makes new transforms more difficult to write + and more fragile. +* Sucrase will never produce code for old browsers like IE. Compiling code down + to ES5 is much more complicated than any transformation that Sucrase needs to + do. +* Sucrase is hesitant to implement upcoming JS features, although some of them + make sense to implement for pragmatic reasons. Its main focus is on language + extensions (JSX, TypeScript, Flow) that will never be supported by JS + runtimes. +* Like Babel, Sucrase is not a typechecker, and must process each file in + isolation. For example, TypeScript `const enum`s are treated as regular + `enum`s rather than inlining across files. +* You should think carefully before using Sucrase in production. Sucrase is + mostly beneficial in development, and in many cases, Babel or tsc will be more + suitable for production builds. + +See the [Project Vision](./docs/PROJECT_VISION.md) document for more details on +the philosophy behind Sucrase. + +## Motivation + +As JavaScript implementations mature, it becomes more and more reasonable to +disable Babel transforms, especially in development when you know that you're +targeting a modern runtime. You might hope that you could simplify and speed up +the build step by eventually disabling Babel entirely, but this isn't possible +if you're using a non-standard language extension like JSX, TypeScript, or Flow. +Unfortunately, disabling most transforms in Babel doesn't speed it up as much as +you might expect. To understand, let's take a look at how Babel works: + +1. Tokenize the input source code into a token stream. +2. Parse the token stream into an AST. +3. Walk the AST to compute the scope information for each variable. +4. Apply all transform plugins in a single traversal, resulting in a new AST. +5. Print the resulting AST. + +Only step 4 gets faster when disabling plugins, so there's always a fixed cost +to running Babel regardless of how many transforms are enabled. + +Sucrase bypasses most of these steps, and works like this: + +1. Tokenize the input source code into a token stream using a trimmed-down fork + of the Babel parser. This fork does not produce a full AST, but still + produces meaningful token metadata specifically designed for the later + transforms. +2. Scan through the tokens, computing preliminary information like all + imported/exported names. +3. Run the transform by doing a pass through the tokens and performing a number + of careful find-and-replace operations, like replacing ` 0 || + importInfo.namedExports.length > 0 + ) { + continue; + } + const names = [ + ...importInfo.defaultNames, + ...importInfo.wildcardNames, + ...importInfo.namedImports.map(({localName}) => localName), + ]; + if (names.every((name) => this.shouldAutomaticallyElideImportedName(name))) { + this.importsToReplace.set(path, ""); + } + } + } + + shouldAutomaticallyElideImportedName(name) { + return ( + this.isTypeScriptTransformEnabled && + !this.keepUnusedImports && + !this.nonTypeIdentifiers.has(name) + ); + } + + generateImportReplacements() { + for (const [path, importInfo] of this.importInfoByPath.entries()) { + const { + defaultNames, + wildcardNames, + namedImports, + namedExports, + exportStarNames, + hasStarExport, + } = importInfo; + + if ( + defaultNames.length === 0 && + wildcardNames.length === 0 && + namedImports.length === 0 && + namedExports.length === 0 && + exportStarNames.length === 0 && + !hasStarExport + ) { + // Import is never used, so don't even assign a name. + this.importsToReplace.set(path, `require('${path}');`); + continue; + } + + const primaryImportName = this.getFreeIdentifierForPath(path); + let secondaryImportName; + if (this.enableLegacyTypeScriptModuleInterop) { + secondaryImportName = primaryImportName; + } else { + secondaryImportName = + wildcardNames.length > 0 ? wildcardNames[0] : this.getFreeIdentifierForPath(path); + } + let requireCode = `var ${primaryImportName} = require('${path}');`; + if (wildcardNames.length > 0) { + for (const wildcardName of wildcardNames) { + const moduleExpr = this.enableLegacyTypeScriptModuleInterop + ? primaryImportName + : `${this.helperManager.getHelperName("interopRequireWildcard")}(${primaryImportName})`; + requireCode += ` var ${wildcardName} = ${moduleExpr};`; + } + } else if (exportStarNames.length > 0 && secondaryImportName !== primaryImportName) { + requireCode += ` var ${secondaryImportName} = ${this.helperManager.getHelperName( + "interopRequireWildcard", + )}(${primaryImportName});`; + } else if (defaultNames.length > 0 && secondaryImportName !== primaryImportName) { + requireCode += ` var ${secondaryImportName} = ${this.helperManager.getHelperName( + "interopRequireDefault", + )}(${primaryImportName});`; + } + + for (const {importedName, localName} of namedExports) { + requireCode += ` ${this.helperManager.getHelperName( + "createNamedExportFrom", + )}(${primaryImportName}, '${localName}', '${importedName}');`; + } + for (const exportStarName of exportStarNames) { + requireCode += ` exports.${exportStarName} = ${secondaryImportName};`; + } + if (hasStarExport) { + requireCode += ` ${this.helperManager.getHelperName( + "createStarExport", + )}(${primaryImportName});`; + } + + this.importsToReplace.set(path, requireCode); + + for (const defaultName of defaultNames) { + this.identifierReplacements.set(defaultName, `${secondaryImportName}.default`); + } + for (const {importedName, localName} of namedImports) { + this.identifierReplacements.set(localName, `${primaryImportName}.${importedName}`); + } + } + } + + getFreeIdentifierForPath(path) { + const components = path.split("/"); + const lastComponent = components[components.length - 1]; + const baseName = lastComponent.replace(/\W/g, ""); + return this.nameManager.claimFreeName(`_${baseName}`); + } + + preprocessImportAtIndex(index) { + const defaultNames = []; + const wildcardNames = []; + const namedImports = []; + + index++; + if ( + (this.tokens.matchesContextualAtIndex(index, _keywords.ContextualKeyword._type) || + this.tokens.matches1AtIndex(index, _types.TokenType._typeof)) && + !this.tokens.matches1AtIndex(index + 1, _types.TokenType.comma) && + !this.tokens.matchesContextualAtIndex(index + 1, _keywords.ContextualKeyword._from) + ) { + // import type declaration, so no need to process anything. + return; + } + + if (this.tokens.matches1AtIndex(index, _types.TokenType.parenL)) { + // Dynamic import, so nothing to do + return; + } + + if (this.tokens.matches1AtIndex(index, _types.TokenType.name)) { + defaultNames.push(this.tokens.identifierNameAtIndex(index)); + index++; + if (this.tokens.matches1AtIndex(index, _types.TokenType.comma)) { + index++; + } + } + + if (this.tokens.matches1AtIndex(index, _types.TokenType.star)) { + // * as + index += 2; + wildcardNames.push(this.tokens.identifierNameAtIndex(index)); + index++; + } + + if (this.tokens.matches1AtIndex(index, _types.TokenType.braceL)) { + const result = this.getNamedImports(index + 1); + index = result.newIndex; + + for (const namedImport of result.namedImports) { + // Treat {default as X} as a default import to ensure usage of require interop helper + if (namedImport.importedName === "default") { + defaultNames.push(namedImport.localName); + } else { + namedImports.push(namedImport); + } + } + } + + if (this.tokens.matchesContextualAtIndex(index, _keywords.ContextualKeyword._from)) { + index++; + } + + if (!this.tokens.matches1AtIndex(index, _types.TokenType.string)) { + throw new Error("Expected string token at the end of import statement."); + } + const path = this.tokens.stringValueAtIndex(index); + const importInfo = this.getImportInfo(path); + importInfo.defaultNames.push(...defaultNames); + importInfo.wildcardNames.push(...wildcardNames); + importInfo.namedImports.push(...namedImports); + if (defaultNames.length === 0 && wildcardNames.length === 0 && namedImports.length === 0) { + importInfo.hasBareImport = true; + } + } + + preprocessExportAtIndex(index) { + if ( + this.tokens.matches2AtIndex(index, _types.TokenType._export, _types.TokenType._var) || + this.tokens.matches2AtIndex(index, _types.TokenType._export, _types.TokenType._let) || + this.tokens.matches2AtIndex(index, _types.TokenType._export, _types.TokenType._const) + ) { + this.preprocessVarExportAtIndex(index); + } else if ( + this.tokens.matches2AtIndex(index, _types.TokenType._export, _types.TokenType._function) || + this.tokens.matches2AtIndex(index, _types.TokenType._export, _types.TokenType._class) + ) { + const exportName = this.tokens.identifierNameAtIndex(index + 2); + this.addExportBinding(exportName, exportName); + } else if (this.tokens.matches3AtIndex(index, _types.TokenType._export, _types.TokenType.name, _types.TokenType._function)) { + const exportName = this.tokens.identifierNameAtIndex(index + 3); + this.addExportBinding(exportName, exportName); + } else if (this.tokens.matches2AtIndex(index, _types.TokenType._export, _types.TokenType.braceL)) { + this.preprocessNamedExportAtIndex(index); + } else if (this.tokens.matches2AtIndex(index, _types.TokenType._export, _types.TokenType.star)) { + this.preprocessExportStarAtIndex(index); + } + } + + preprocessVarExportAtIndex(index) { + let depth = 0; + // Handle cases like `export let {x} = y;`, starting at the open-brace in that case. + for (let i = index + 2; ; i++) { + if ( + this.tokens.matches1AtIndex(i, _types.TokenType.braceL) || + this.tokens.matches1AtIndex(i, _types.TokenType.dollarBraceL) || + this.tokens.matches1AtIndex(i, _types.TokenType.bracketL) + ) { + depth++; + } else if ( + this.tokens.matches1AtIndex(i, _types.TokenType.braceR) || + this.tokens.matches1AtIndex(i, _types.TokenType.bracketR) + ) { + depth--; + } else if (depth === 0 && !this.tokens.matches1AtIndex(i, _types.TokenType.name)) { + break; + } else if (this.tokens.matches1AtIndex(1, _types.TokenType.eq)) { + const endIndex = this.tokens.currentToken().rhsEndIndex; + if (endIndex == null) { + throw new Error("Expected = token with an end index."); + } + i = endIndex - 1; + } else { + const token = this.tokens.tokens[i]; + if (_tokenizer.isDeclaration.call(void 0, token)) { + const exportName = this.tokens.identifierNameAtIndex(i); + this.identifierReplacements.set(exportName, `exports.${exportName}`); + } + } + } + } + + /** + * Walk this export statement just in case it's an export...from statement. + * If it is, combine it into the import info for that path. Otherwise, just + * bail out; it'll be handled later. + */ + preprocessNamedExportAtIndex(index) { + // export { + index += 2; + const {newIndex, namedImports} = this.getNamedImports(index); + index = newIndex; + + if (this.tokens.matchesContextualAtIndex(index, _keywords.ContextualKeyword._from)) { + index++; + } else { + // Reinterpret "a as b" to be local/exported rather than imported/local. + for (const {importedName: localName, localName: exportedName} of namedImports) { + this.addExportBinding(localName, exportedName); + } + return; + } + + if (!this.tokens.matches1AtIndex(index, _types.TokenType.string)) { + throw new Error("Expected string token at the end of import statement."); + } + const path = this.tokens.stringValueAtIndex(index); + const importInfo = this.getImportInfo(path); + importInfo.namedExports.push(...namedImports); + } + + preprocessExportStarAtIndex(index) { + let exportedName = null; + if (this.tokens.matches3AtIndex(index, _types.TokenType._export, _types.TokenType.star, _types.TokenType._as)) { + // export * as + index += 3; + exportedName = this.tokens.identifierNameAtIndex(index); + // foo from + index += 2; + } else { + // export * from + index += 3; + } + if (!this.tokens.matches1AtIndex(index, _types.TokenType.string)) { + throw new Error("Expected string token at the end of star export statement."); + } + const path = this.tokens.stringValueAtIndex(index); + const importInfo = this.getImportInfo(path); + if (exportedName !== null) { + importInfo.exportStarNames.push(exportedName); + } else { + importInfo.hasStarExport = true; + } + } + + getNamedImports(index) { + const namedImports = []; + while (true) { + if (this.tokens.matches1AtIndex(index, _types.TokenType.braceR)) { + index++; + break; + } + + const specifierInfo = _getImportExportSpecifierInfo2.default.call(void 0, this.tokens, index); + index = specifierInfo.endIndex; + if (!specifierInfo.isType) { + namedImports.push({ + importedName: specifierInfo.leftName, + localName: specifierInfo.rightName, + }); + } + + if (this.tokens.matches2AtIndex(index, _types.TokenType.comma, _types.TokenType.braceR)) { + index += 2; + break; + } else if (this.tokens.matches1AtIndex(index, _types.TokenType.braceR)) { + index++; + break; + } else if (this.tokens.matches1AtIndex(index, _types.TokenType.comma)) { + index++; + } else { + throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[index])}`); + } + } + return {newIndex: index, namedImports}; + } + + /** + * Get a mutable import info object for this path, creating one if it doesn't + * exist yet. + */ + getImportInfo(path) { + const existingInfo = this.importInfoByPath.get(path); + if (existingInfo) { + return existingInfo; + } + const newInfo = { + defaultNames: [], + wildcardNames: [], + namedImports: [], + namedExports: [], + hasBareImport: false, + exportStarNames: [], + hasStarExport: false, + }; + this.importInfoByPath.set(path, newInfo); + return newInfo; + } + + addExportBinding(localName, exportedName) { + if (!this.exportBindingsByLocalName.has(localName)) { + this.exportBindingsByLocalName.set(localName, []); + } + this.exportBindingsByLocalName.get(localName).push(exportedName); + } + + /** + * Return the code to use for the import for this path, or the empty string if + * the code has already been "claimed" by a previous import. + */ + claimImportCode(importPath) { + const result = this.importsToReplace.get(importPath); + this.importsToReplace.set(importPath, ""); + return result || ""; + } + + getIdentifierReplacement(identifierName) { + return this.identifierReplacements.get(identifierName) || null; + } + + /** + * Return a string like `exports.foo = exports.bar`. + */ + resolveExportBinding(assignedName) { + const exportedNames = this.exportBindingsByLocalName.get(assignedName); + if (!exportedNames || exportedNames.length === 0) { + return null; + } + return exportedNames.map((exportedName) => `exports.${exportedName}`).join(" = "); + } + + /** + * Return all imported/exported names where we might be interested in whether usages of those + * names are shadowed. + */ + getGlobalNames() { + return new Set([ + ...this.identifierReplacements.keys(), + ...this.exportBindingsByLocalName.keys(), + ]); + } +} exports.default = CJSImportProcessor; diff --git a/node_modules/sucrase/dist/HelperManager.js b/node_modules/sucrase/dist/HelperManager.js new file mode 100644 index 0000000..6dcc9c9 --- /dev/null +++ b/node_modules/sucrase/dist/HelperManager.js @@ -0,0 +1,176 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); + +const HELPERS = { + require: ` + import {createRequire as CREATE_REQUIRE_NAME} from "module"; + const require = CREATE_REQUIRE_NAME(import.meta.url); + `, + interopRequireWildcard: ` + function interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + return newObj; + } + } + `, + interopRequireDefault: ` + function interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + `, + createNamedExportFrom: ` + function createNamedExportFrom(obj, localName, importedName) { + Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]}); + } + `, + // Note that TypeScript and Babel do this differently; TypeScript does a simple existence + // check in the exports object and does a plain assignment, whereas Babel uses + // defineProperty and builds an object of explicitly-exported names so that star exports can + // always take lower precedence. For now, we do the easier TypeScript thing. + createStarExport: ` + function createStarExport(obj) { + Object.keys(obj) + .filter((key) => key !== "default" && key !== "__esModule") + .forEach((key) => { + if (exports.hasOwnProperty(key)) { + return; + } + Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); + }); + } + `, + nullishCoalesce: ` + function nullishCoalesce(lhs, rhsFn) { + if (lhs != null) { + return lhs; + } else { + return rhsFn(); + } + } + `, + asyncNullishCoalesce: ` + async function asyncNullishCoalesce(lhs, rhsFn) { + if (lhs != null) { + return lhs; + } else { + return await rhsFn(); + } + } + `, + optionalChain: ` + function optionalChain(ops) { + let lastAccessLHS = undefined; + let value = ops[0]; + let i = 1; + while (i < ops.length) { + const op = ops[i]; + const fn = ops[i + 1]; + i += 2; + if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { + return undefined; + } + if (op === 'access' || op === 'optionalAccess') { + lastAccessLHS = value; + value = fn(value); + } else if (op === 'call' || op === 'optionalCall') { + value = fn((...args) => value.call(lastAccessLHS, ...args)); + lastAccessLHS = undefined; + } + } + return value; + } + `, + asyncOptionalChain: ` + async function asyncOptionalChain(ops) { + let lastAccessLHS = undefined; + let value = ops[0]; + let i = 1; + while (i < ops.length) { + const op = ops[i]; + const fn = ops[i + 1]; + i += 2; + if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { + return undefined; + } + if (op === 'access' || op === 'optionalAccess') { + lastAccessLHS = value; + value = await fn(value); + } else if (op === 'call' || op === 'optionalCall') { + value = await fn((...args) => value.call(lastAccessLHS, ...args)); + lastAccessLHS = undefined; + } + } + return value; + } + `, + optionalChainDelete: ` + function optionalChainDelete(ops) { + const result = OPTIONAL_CHAIN_NAME(ops); + return result == null ? true : result; + } + `, + asyncOptionalChainDelete: ` + async function asyncOptionalChainDelete(ops) { + const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops); + return result == null ? true : result; + } + `, +}; + + class HelperManager { + __init() {this.helperNames = {}} + __init2() {this.createRequireName = null} + constructor( nameManager) {;this.nameManager = nameManager;HelperManager.prototype.__init.call(this);HelperManager.prototype.__init2.call(this);} + + getHelperName(baseName) { + let helperName = this.helperNames[baseName]; + if (helperName) { + return helperName; + } + helperName = this.nameManager.claimFreeName(`_${baseName}`); + this.helperNames[baseName] = helperName; + return helperName; + } + + emitHelpers() { + let resultCode = ""; + if (this.helperNames.optionalChainDelete) { + this.getHelperName("optionalChain"); + } + if (this.helperNames.asyncOptionalChainDelete) { + this.getHelperName("asyncOptionalChain"); + } + for (const [baseName, helperCodeTemplate] of Object.entries(HELPERS)) { + const helperName = this.helperNames[baseName]; + let helperCode = helperCodeTemplate; + if (baseName === "optionalChainDelete") { + helperCode = helperCode.replace("OPTIONAL_CHAIN_NAME", this.helperNames.optionalChain); + } else if (baseName === "asyncOptionalChainDelete") { + helperCode = helperCode.replace( + "ASYNC_OPTIONAL_CHAIN_NAME", + this.helperNames.asyncOptionalChain, + ); + } else if (baseName === "require") { + if (this.createRequireName === null) { + this.createRequireName = this.nameManager.claimFreeName("_createRequire"); + } + helperCode = helperCode.replace(/CREATE_REQUIRE_NAME/g, this.createRequireName); + } + if (helperName) { + resultCode += " "; + resultCode += helperCode.replace(baseName, helperName).replace(/\s+/g, " ").trim(); + } + } + return resultCode; + } +} exports.HelperManager = HelperManager; diff --git a/node_modules/sucrase/dist/NameManager.js b/node_modules/sucrase/dist/NameManager.js new file mode 100644 index 0000000..0ebbe28 --- /dev/null +++ b/node_modules/sucrase/dist/NameManager.js @@ -0,0 +1,27 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _getIdentifierNames = require('./util/getIdentifierNames'); var _getIdentifierNames2 = _interopRequireDefault(_getIdentifierNames); + + class NameManager { + __init() {this.usedNames = new Set()} + + constructor(code, tokens) {;NameManager.prototype.__init.call(this); + this.usedNames = new Set(_getIdentifierNames2.default.call(void 0, code, tokens)); + } + + claimFreeName(name) { + const newName = this.findFreeName(name); + this.usedNames.add(newName); + return newName; + } + + findFreeName(name) { + if (!this.usedNames.has(name)) { + return name; + } + let suffixNum = 2; + while (this.usedNames.has(name + String(suffixNum))) { + suffixNum++; + } + return name + String(suffixNum); + } +} exports.default = NameManager; diff --git a/node_modules/sucrase/dist/Options-gen-types.js b/node_modules/sucrase/dist/Options-gen-types.js new file mode 100644 index 0000000..438d198 --- /dev/null +++ b/node_modules/sucrase/dist/Options-gen-types.js @@ -0,0 +1,42 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }/** + * This module was automatically generated by `ts-interface-builder` + */ +var _tsinterfacechecker = require('ts-interface-checker'); var t = _interopRequireWildcard(_tsinterfacechecker); +// tslint:disable:object-literal-key-quotes + + const Transform = t.union( + t.lit("jsx"), + t.lit("typescript"), + t.lit("flow"), + t.lit("imports"), + t.lit("react-hot-loader"), + t.lit("jest"), +); exports.Transform = Transform; + + const SourceMapOptions = t.iface([], { + compiledFilename: "string", +}); exports.SourceMapOptions = SourceMapOptions; + + const Options = t.iface([], { + transforms: t.array("Transform"), + disableESTransforms: t.opt("boolean"), + jsxRuntime: t.opt(t.union(t.lit("classic"), t.lit("automatic"), t.lit("preserve"))), + production: t.opt("boolean"), + jsxImportSource: t.opt("string"), + jsxPragma: t.opt("string"), + jsxFragmentPragma: t.opt("string"), + keepUnusedImports: t.opt("boolean"), + preserveDynamicImport: t.opt("boolean"), + injectCreateRequireForImportRequire: t.opt("boolean"), + enableLegacyTypeScriptModuleInterop: t.opt("boolean"), + enableLegacyBabel5ModuleInterop: t.opt("boolean"), + sourceMapOptions: t.opt("SourceMapOptions"), + filePath: t.opt("string"), +}); exports.Options = Options; + +const exportedTypeSuite = { + Transform: exports.Transform, + SourceMapOptions: exports.SourceMapOptions, + Options: exports.Options, +}; +exports. default = exportedTypeSuite; diff --git a/node_modules/sucrase/dist/Options.js b/node_modules/sucrase/dist/Options.js new file mode 100644 index 0000000..15855c4 --- /dev/null +++ b/node_modules/sucrase/dist/Options.js @@ -0,0 +1,101 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _tsinterfacechecker = require('ts-interface-checker'); + +var _Optionsgentypes = require('./Options-gen-types'); var _Optionsgentypes2 = _interopRequireDefault(_Optionsgentypes); + +const {Options: OptionsChecker} = _tsinterfacechecker.createCheckers.call(void 0, _Optionsgentypes2.default); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + function validateOptions(options) { + OptionsChecker.strictCheck(options); +} exports.validateOptions = validateOptions; diff --git a/node_modules/sucrase/dist/TokenProcessor.js b/node_modules/sucrase/dist/TokenProcessor.js new file mode 100644 index 0000000..58fdd98 --- /dev/null +++ b/node_modules/sucrase/dist/TokenProcessor.js @@ -0,0 +1,357 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + +var _types = require('./parser/tokenizer/types'); +var _isAsyncOperation = require('./util/isAsyncOperation'); var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation); + + + + + + + + + + + + class TokenProcessor { + __init() {this.resultCode = ""} + // Array mapping input token index to optional string index position in the + // output code. + __init2() {this.resultMappings = new Array(this.tokens.length)} + __init3() {this.tokenIndex = 0} + + constructor( + code, + tokens, + isFlowEnabled, + disableESTransforms, + helperManager, + ) {;this.code = code;this.tokens = tokens;this.isFlowEnabled = isFlowEnabled;this.disableESTransforms = disableESTransforms;this.helperManager = helperManager;TokenProcessor.prototype.__init.call(this);TokenProcessor.prototype.__init2.call(this);TokenProcessor.prototype.__init3.call(this);} + + /** + * Snapshot the token state in a way that can be restored later, useful for + * things like lookahead. + * + * resultMappings do not need to be copied since in all use cases, they will + * be overwritten anyway after restore. + */ + snapshot() { + return { + resultCode: this.resultCode, + tokenIndex: this.tokenIndex, + }; + } + + restoreToSnapshot(snapshot) { + this.resultCode = snapshot.resultCode; + this.tokenIndex = snapshot.tokenIndex; + } + + /** + * Remove and return the code generated since the snapshot, leaving the + * current token position in-place. Unlike most TokenProcessor operations, + * this operation can result in input/output line number mismatches because + * the removed code may contain newlines, so this operation should be used + * sparingly. + */ + dangerouslyGetAndRemoveCodeSinceSnapshot(snapshot) { + const result = this.resultCode.slice(snapshot.resultCode.length); + this.resultCode = snapshot.resultCode; + return result; + } + + reset() { + this.resultCode = ""; + this.resultMappings = new Array(this.tokens.length); + this.tokenIndex = 0; + } + + matchesContextualAtIndex(index, contextualKeyword) { + return ( + this.matches1AtIndex(index, _types.TokenType.name) && + this.tokens[index].contextualKeyword === contextualKeyword + ); + } + + identifierNameAtIndex(index) { + // TODO: We need to process escapes since technically you can have unicode escapes in variable + // names. + return this.identifierNameForToken(this.tokens[index]); + } + + identifierNameAtRelativeIndex(relativeIndex) { + return this.identifierNameForToken(this.tokenAtRelativeIndex(relativeIndex)); + } + + identifierName() { + return this.identifierNameForToken(this.currentToken()); + } + + identifierNameForToken(token) { + return this.code.slice(token.start, token.end); + } + + rawCodeForToken(token) { + return this.code.slice(token.start, token.end); + } + + stringValueAtIndex(index) { + return this.stringValueForToken(this.tokens[index]); + } + + stringValue() { + return this.stringValueForToken(this.currentToken()); + } + + stringValueForToken(token) { + // This is used to identify when two imports are the same and to resolve TypeScript enum keys. + // Ideally we'd process escapes within the strings, but for now we pretty much take the raw + // code. + return this.code.slice(token.start + 1, token.end - 1); + } + + matches1AtIndex(index, t1) { + return this.tokens[index].type === t1; + } + + matches2AtIndex(index, t1, t2) { + return this.tokens[index].type === t1 && this.tokens[index + 1].type === t2; + } + + matches3AtIndex(index, t1, t2, t3) { + return ( + this.tokens[index].type === t1 && + this.tokens[index + 1].type === t2 && + this.tokens[index + 2].type === t3 + ); + } + + matches1(t1) { + return this.tokens[this.tokenIndex].type === t1; + } + + matches2(t1, t2) { + return this.tokens[this.tokenIndex].type === t1 && this.tokens[this.tokenIndex + 1].type === t2; + } + + matches3(t1, t2, t3) { + return ( + this.tokens[this.tokenIndex].type === t1 && + this.tokens[this.tokenIndex + 1].type === t2 && + this.tokens[this.tokenIndex + 2].type === t3 + ); + } + + matches4(t1, t2, t3, t4) { + return ( + this.tokens[this.tokenIndex].type === t1 && + this.tokens[this.tokenIndex + 1].type === t2 && + this.tokens[this.tokenIndex + 2].type === t3 && + this.tokens[this.tokenIndex + 3].type === t4 + ); + } + + matches5(t1, t2, t3, t4, t5) { + return ( + this.tokens[this.tokenIndex].type === t1 && + this.tokens[this.tokenIndex + 1].type === t2 && + this.tokens[this.tokenIndex + 2].type === t3 && + this.tokens[this.tokenIndex + 3].type === t4 && + this.tokens[this.tokenIndex + 4].type === t5 + ); + } + + matchesContextual(contextualKeyword) { + return this.matchesContextualAtIndex(this.tokenIndex, contextualKeyword); + } + + matchesContextIdAndLabel(type, contextId) { + return this.matches1(type) && this.currentToken().contextId === contextId; + } + + previousWhitespaceAndComments() { + let whitespaceAndComments = this.code.slice( + this.tokenIndex > 0 ? this.tokens[this.tokenIndex - 1].end : 0, + this.tokenIndex < this.tokens.length ? this.tokens[this.tokenIndex].start : this.code.length, + ); + if (this.isFlowEnabled) { + whitespaceAndComments = whitespaceAndComments.replace(/@flow/g, ""); + } + return whitespaceAndComments; + } + + replaceToken(newCode) { + this.resultCode += this.previousWhitespaceAndComments(); + this.appendTokenPrefix(); + this.resultMappings[this.tokenIndex] = this.resultCode.length; + this.resultCode += newCode; + this.appendTokenSuffix(); + this.tokenIndex++; + } + + replaceTokenTrimmingLeftWhitespace(newCode) { + this.resultCode += this.previousWhitespaceAndComments().replace(/[^\r\n]/g, ""); + this.appendTokenPrefix(); + this.resultMappings[this.tokenIndex] = this.resultCode.length; + this.resultCode += newCode; + this.appendTokenSuffix(); + this.tokenIndex++; + } + + removeInitialToken() { + this.replaceToken(""); + } + + removeToken() { + this.replaceTokenTrimmingLeftWhitespace(""); + } + + /** + * Remove all code until the next }, accounting for balanced braces. + */ + removeBalancedCode() { + let braceDepth = 0; + while (!this.isAtEnd()) { + if (this.matches1(_types.TokenType.braceL)) { + braceDepth++; + } else if (this.matches1(_types.TokenType.braceR)) { + if (braceDepth === 0) { + return; + } + braceDepth--; + } + this.removeToken(); + } + } + + copyExpectedToken(tokenType) { + if (this.tokens[this.tokenIndex].type !== tokenType) { + throw new Error(`Expected token ${tokenType}`); + } + this.copyToken(); + } + + copyToken() { + this.resultCode += this.previousWhitespaceAndComments(); + this.appendTokenPrefix(); + this.resultMappings[this.tokenIndex] = this.resultCode.length; + this.resultCode += this.code.slice( + this.tokens[this.tokenIndex].start, + this.tokens[this.tokenIndex].end, + ); + this.appendTokenSuffix(); + this.tokenIndex++; + } + + copyTokenWithPrefix(prefix) { + this.resultCode += this.previousWhitespaceAndComments(); + this.appendTokenPrefix(); + this.resultCode += prefix; + this.resultMappings[this.tokenIndex] = this.resultCode.length; + this.resultCode += this.code.slice( + this.tokens[this.tokenIndex].start, + this.tokens[this.tokenIndex].end, + ); + this.appendTokenSuffix(); + this.tokenIndex++; + } + + appendTokenPrefix() { + const token = this.currentToken(); + if (token.numNullishCoalesceStarts || token.isOptionalChainStart) { + token.isAsyncOperation = _isAsyncOperation2.default.call(void 0, this); + } + if (this.disableESTransforms) { + return; + } + if (token.numNullishCoalesceStarts) { + for (let i = 0; i < token.numNullishCoalesceStarts; i++) { + if (token.isAsyncOperation) { + this.resultCode += "await "; + this.resultCode += this.helperManager.getHelperName("asyncNullishCoalesce"); + } else { + this.resultCode += this.helperManager.getHelperName("nullishCoalesce"); + } + this.resultCode += "("; + } + } + if (token.isOptionalChainStart) { + if (token.isAsyncOperation) { + this.resultCode += "await "; + } + if (this.tokenIndex > 0 && this.tokenAtRelativeIndex(-1).type === _types.TokenType._delete) { + if (token.isAsyncOperation) { + this.resultCode += this.helperManager.getHelperName("asyncOptionalChainDelete"); + } else { + this.resultCode += this.helperManager.getHelperName("optionalChainDelete"); + } + } else if (token.isAsyncOperation) { + this.resultCode += this.helperManager.getHelperName("asyncOptionalChain"); + } else { + this.resultCode += this.helperManager.getHelperName("optionalChain"); + } + this.resultCode += "(["; + } + } + + appendTokenSuffix() { + const token = this.currentToken(); + if (token.isOptionalChainEnd && !this.disableESTransforms) { + this.resultCode += "])"; + } + if (token.numNullishCoalesceEnds && !this.disableESTransforms) { + for (let i = 0; i < token.numNullishCoalesceEnds; i++) { + this.resultCode += "))"; + } + } + } + + appendCode(code) { + this.resultCode += code; + } + + currentToken() { + return this.tokens[this.tokenIndex]; + } + + currentTokenCode() { + const token = this.currentToken(); + return this.code.slice(token.start, token.end); + } + + tokenAtRelativeIndex(relativeIndex) { + return this.tokens[this.tokenIndex + relativeIndex]; + } + + currentIndex() { + return this.tokenIndex; + } + + /** + * Move to the next token. Only suitable in preprocessing steps. When + * generating new code, you should use copyToken or removeToken. + */ + nextToken() { + if (this.tokenIndex === this.tokens.length) { + throw new Error("Unexpectedly reached end of input."); + } + this.tokenIndex++; + } + + previousToken() { + this.tokenIndex--; + } + + finish() { + if (this.tokenIndex !== this.tokens.length) { + throw new Error("Tried to finish processing tokens before reaching the end."); + } + this.resultCode += this.previousWhitespaceAndComments(); + return {code: this.resultCode, mappings: this.resultMappings}; + } + + isAtEnd() { + return this.tokenIndex === this.tokens.length; + } +} exports.default = TokenProcessor; diff --git a/node_modules/sucrase/dist/cli.js b/node_modules/sucrase/dist/cli.js new file mode 100644 index 0000000..9334615 --- /dev/null +++ b/node_modules/sucrase/dist/cli.js @@ -0,0 +1,317 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/* eslint-disable no-console */ +var _commander = require('commander'); var _commander2 = _interopRequireDefault(_commander); +var _tinyglobby = require('tinyglobby'); +var _fs = require('mz/fs'); +var _path = require('path'); + +var _index = require('./index'); + + + + + + + + + + + + function run() { + _commander2.default + .description(`Sucrase: super-fast Babel alternative.`) + .usage("[options] ") + .option( + "-d, --out-dir ", + "Compile an input directory of modules into an output directory.", + ) + .option( + "-p, --project ", + "Compile a TypeScript project, will read from tsconfig.json in ", + ) + .option("--out-extension ", "File extension to use for all output files.", "js") + .option("--exclude-dirs ", "Names of directories that should not be traversed.") + .option("-q, --quiet", "Don't print the names of converted files.") + .option("-t, --transforms ", "Comma-separated list of transforms to run.") + .option("--disable-es-transforms", "Opt out of all ES syntax transforms.") + .option("--jsx-runtime ", "Transformation mode for the JSX transform.") + .option("--production", "Disable debugging information from JSX in output.") + .option( + "--jsx-import-source ", + "Automatic JSX transform import path prefix, defaults to `React.Fragment`.", + ) + .option( + "--jsx-pragma ", + "Classic JSX transform element creation function, defaults to `React.createElement`.", + ) + .option( + "--jsx-fragment-pragma ", + "Classic JSX transform fragment component, defaults to `React.Fragment`.", + ) + .option("--keep-unused-imports", "Disable automatic removal of type-only imports/exports.") + .option("--preserve-dynamic-import", "Don't transpile dynamic import() to require.") + .option( + "--inject-create-require-for-import-require", + "Use `createRequire` when transpiling TS `import = require` to ESM.", + ) + .option( + "--enable-legacy-typescript-module-interop", + "Use default TypeScript ESM/CJS interop strategy.", + ) + .option("--enable-legacy-babel5-module-interop", "Use Babel 5 ESM/CJS interop strategy.") + .parse(process.argv); + + if (_commander2.default.project) { + if ( + _commander2.default.outDir || + _commander2.default.transforms || + _commander2.default.args[0] || + _commander2.default.enableLegacyTypescriptModuleInterop + ) { + console.error( + "If TypeScript project is specified, out directory, transforms, source " + + "directory, and --enable-legacy-typescript-module-interop may not be specified.", + ); + process.exit(1); + } + } else { + if (!_commander2.default.outDir) { + console.error("Out directory is required"); + process.exit(1); + } + + if (!_commander2.default.transforms) { + console.error("Transforms option is required."); + process.exit(1); + } + + if (!_commander2.default.args[0]) { + console.error("Source directory is required."); + process.exit(1); + } + } + + const options = { + outDirPath: _commander2.default.outDir, + srcDirPath: _commander2.default.args[0], + project: _commander2.default.project, + outExtension: _commander2.default.outExtension, + excludeDirs: _commander2.default.excludeDirs ? _commander2.default.excludeDirs.split(",") : [], + quiet: _commander2.default.quiet, + sucraseOptions: { + transforms: _commander2.default.transforms ? _commander2.default.transforms.split(",") : [], + disableESTransforms: _commander2.default.disableEsTransforms, + jsxRuntime: _commander2.default.jsxRuntime, + production: _commander2.default.production, + jsxImportSource: _commander2.default.jsxImportSource, + jsxPragma: _commander2.default.jsxPragma || "React.createElement", + jsxFragmentPragma: _commander2.default.jsxFragmentPragma || "React.Fragment", + keepUnusedImports: _commander2.default.keepUnusedImports, + preserveDynamicImport: _commander2.default.preserveDynamicImport, + injectCreateRequireForImportRequire: _commander2.default.injectCreateRequireForImportRequire, + enableLegacyTypeScriptModuleInterop: _commander2.default.enableLegacyTypescriptModuleInterop, + enableLegacyBabel5ModuleInterop: _commander2.default.enableLegacyBabel5ModuleInterop, + }, + }; + + buildDirectory(options).catch((e) => { + process.exitCode = 1; + console.error(e); + }); +} exports.default = run; + + + + + + +async function findFiles(options) { + const outDirPath = options.outDirPath; + const srcDirPath = options.srcDirPath; + + const extensions = options.sucraseOptions.transforms.includes("typescript") + ? [".ts", ".tsx"] + : [".js", ".jsx"]; + + if (!(await _fs.exists.call(void 0, outDirPath))) { + await _fs.mkdir.call(void 0, outDirPath); + } + + const outArr = []; + for (const child of await _fs.readdir.call(void 0, srcDirPath)) { + if (["node_modules", ".git"].includes(child) || options.excludeDirs.includes(child)) { + continue; + } + const srcChildPath = _path.join.call(void 0, srcDirPath, child); + const outChildPath = _path.join.call(void 0, outDirPath, child); + if ((await _fs.stat.call(void 0, srcChildPath)).isDirectory()) { + const innerOptions = {...options}; + innerOptions.srcDirPath = srcChildPath; + innerOptions.outDirPath = outChildPath; + const innerFiles = await findFiles(innerOptions); + outArr.push(...innerFiles); + } else if (extensions.some((ext) => srcChildPath.endsWith(ext))) { + const outPath = outChildPath.replace(/\.\w+$/, `.${options.outExtension}`); + outArr.push({ + srcPath: srcChildPath, + outPath, + }); + } + } + + return outArr; +} + +async function runGlob(options) { + const tsConfigPath = _path.join.call(void 0, options.project, "tsconfig.json"); + + let str; + try { + str = await _fs.readFile.call(void 0, tsConfigPath, "utf8"); + } catch (err) { + console.error("Could not find project tsconfig.json"); + console.error(` --project=${options.project}`); + console.error(err); + process.exit(1); + } + const json = JSON.parse(str); + + const foundFiles = []; + + const files = json.files; + const include = json.include; + + const absProject = _path.join.call(void 0, process.cwd(), options.project); + const outDirs = []; + + if (!(await _fs.exists.call(void 0, options.outDirPath))) { + await _fs.mkdir.call(void 0, options.outDirPath); + } + + if (files) { + for (const file of files) { + if (file.endsWith(".d.ts")) { + continue; + } + if (!file.endsWith(".ts") && !file.endsWith(".js")) { + continue; + } + + const srcFile = _path.join.call(void 0, absProject, file); + const outFile = _path.join.call(void 0, options.outDirPath, file); + const outPath = outFile.replace(/\.\w+$/, `.${options.outExtension}`); + + const outDir = _path.dirname.call(void 0, outPath); + if (!outDirs.includes(outDir)) { + outDirs.push(outDir); + } + + foundFiles.push({ + srcPath: srcFile, + outPath, + }); + } + } + if (include) { + for (const pattern of include) { + const globFiles = await _tinyglobby.glob.call(void 0, _path.join.call(void 0, absProject, pattern), {expandDirectories: false}); + for (const file of globFiles) { + if (!file.endsWith(".ts") && !file.endsWith(".js")) { + continue; + } + if (file.endsWith(".d.ts")) { + continue; + } + + const relativeFile = _path.relative.call(void 0, absProject, file); + const outFile = _path.join.call(void 0, options.outDirPath, relativeFile); + const outPath = outFile.replace(/\.\w+$/, `.${options.outExtension}`); + + const outDir = _path.dirname.call(void 0, outPath); + if (!outDirs.includes(outDir)) { + outDirs.push(outDir); + } + + foundFiles.push({ + srcPath: file, + outPath, + }); + } + } + } + + for (const outDirPath of outDirs) { + if (!(await _fs.exists.call(void 0, outDirPath))) { + await _fs.mkdir.call(void 0, outDirPath); + } + } + + // TODO: read exclude + + return foundFiles; +} + +async function updateOptionsFromProject(options) { + /** + * Read the project information and assign the following. + * - outDirPath + * - transform: imports + * - transform: typescript + * - enableLegacyTypescriptModuleInterop: true/false. + */ + + const tsConfigPath = _path.join.call(void 0, options.project, "tsconfig.json"); + + let str; + try { + str = await _fs.readFile.call(void 0, tsConfigPath, "utf8"); + } catch (err) { + console.error("Could not find project tsconfig.json"); + console.error(` --project=${options.project}`); + console.error(err); + process.exit(1); + } + const json = JSON.parse(str); + const sucraseOpts = options.sucraseOptions; + if (!sucraseOpts.transforms.includes("typescript")) { + sucraseOpts.transforms.push("typescript"); + } + + const compilerOpts = json.compilerOptions; + if (compilerOpts.outDir) { + options.outDirPath = _path.join.call(void 0, process.cwd(), options.project, compilerOpts.outDir); + } + if (compilerOpts.esModuleInterop !== true) { + sucraseOpts.enableLegacyTypeScriptModuleInterop = true; + } + if (compilerOpts.module === "commonjs") { + if (!sucraseOpts.transforms.includes("imports")) { + sucraseOpts.transforms.push("imports"); + } + } +} + +async function buildDirectory(options) { + let files; + if (options.outDirPath && options.srcDirPath) { + files = await findFiles(options); + } else if (options.project) { + await updateOptionsFromProject(options); + files = await runGlob(options); + } else { + console.error("Project or Source directory required."); + process.exit(1); + } + + for (const file of files) { + await buildFile(file.srcPath, file.outPath, options); + } +} + +async function buildFile(srcPath, outPath, options) { + if (!options.quiet) { + console.log(`${srcPath} -> ${outPath}`); + } + const code = (await _fs.readFile.call(void 0, srcPath)).toString(); + const transformedCode = _index.transform.call(void 0, code, {...options.sucraseOptions, filePath: srcPath}).code; + await _fs.writeFile.call(void 0, outPath, transformedCode); +} diff --git a/node_modules/sucrase/dist/computeSourceMap.js b/node_modules/sucrase/dist/computeSourceMap.js new file mode 100644 index 0000000..567ddbb --- /dev/null +++ b/node_modules/sucrase/dist/computeSourceMap.js @@ -0,0 +1,89 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _genmapping = require('@jridgewell/gen-mapping'); + + + +var _charcodes = require('./parser/util/charcodes'); + + + + + + + + + + + + +/** + * Generate a source map indicating that each line maps directly to the original line, + * with the tokens in their new positions. + */ + function computeSourceMap( + {code: generatedCode, mappings: rawMappings}, + filePath, + options, + source, + tokens, +) { + const sourceColumns = computeSourceColumns(source, tokens); + const map = new (0, _genmapping.GenMapping)({file: options.compiledFilename}); + let tokenIndex = 0; + // currentMapping is the output source index for the current input token being + // considered. + let currentMapping = rawMappings[0]; + while (currentMapping === undefined && tokenIndex < rawMappings.length - 1) { + tokenIndex++; + currentMapping = rawMappings[tokenIndex]; + } + let line = 0; + let lineStart = 0; + if (currentMapping !== lineStart) { + _genmapping.maybeAddSegment.call(void 0, map, line, 0, filePath, line, 0); + } + for (let i = 0; i < generatedCode.length; i++) { + if (i === currentMapping) { + const genColumn = currentMapping - lineStart; + const sourceColumn = sourceColumns[tokenIndex]; + _genmapping.maybeAddSegment.call(void 0, map, line, genColumn, filePath, line, sourceColumn); + while ( + (currentMapping === i || currentMapping === undefined) && + tokenIndex < rawMappings.length - 1 + ) { + tokenIndex++; + currentMapping = rawMappings[tokenIndex]; + } + } + if (generatedCode.charCodeAt(i) === _charcodes.charCodes.lineFeed) { + line++; + lineStart = i + 1; + if (currentMapping !== lineStart) { + _genmapping.maybeAddSegment.call(void 0, map, line, 0, filePath, line, 0); + } + } + } + const {sourceRoot, sourcesContent, ...sourceMap} = _genmapping.toEncodedMap.call(void 0, map); + return sourceMap ; +} exports.default = computeSourceMap; + +/** + * Create an array mapping each token index to the 0-based column of the start + * position of the token. + */ +function computeSourceColumns(code, tokens) { + const sourceColumns = new Array(tokens.length); + let tokenIndex = 0; + let currentMapping = tokens[tokenIndex].start; + let lineStart = 0; + for (let i = 0; i < code.length; i++) { + if (i === currentMapping) { + sourceColumns[tokenIndex] = currentMapping - lineStart; + tokenIndex++; + currentMapping = tokens[tokenIndex].start; + } + if (code.charCodeAt(i) === _charcodes.charCodes.lineFeed) { + lineStart = i + 1; + } + } + return sourceColumns; +} diff --git a/node_modules/sucrase/dist/esm/CJSImportProcessor.js b/node_modules/sucrase/dist/esm/CJSImportProcessor.js new file mode 100644 index 0000000..d8b7803 --- /dev/null +++ b/node_modules/sucrase/dist/esm/CJSImportProcessor.js @@ -0,0 +1,456 @@ + + + +import {isDeclaration} from "./parser/tokenizer"; +import {ContextualKeyword} from "./parser/tokenizer/keywords"; +import {TokenType as tt} from "./parser/tokenizer/types"; + +import getImportExportSpecifierInfo from "./util/getImportExportSpecifierInfo"; +import {getNonTypeIdentifiers} from "./util/getNonTypeIdentifiers"; + + + + + + + + + + + + + + + + +/** + * Class responsible for preprocessing and bookkeeping import and export declarations within the + * file. + * + * TypeScript uses a simpler mechanism that does not use functions like interopRequireDefault and + * interopRequireWildcard, so we also allow that mode for compatibility. + */ +export default class CJSImportProcessor { + __init() {this.nonTypeIdentifiers = new Set()} + __init2() {this.importInfoByPath = new Map()} + __init3() {this.importsToReplace = new Map()} + __init4() {this.identifierReplacements = new Map()} + __init5() {this.exportBindingsByLocalName = new Map()} + + constructor( + nameManager, + tokens, + enableLegacyTypeScriptModuleInterop, + options, + isTypeScriptTransformEnabled, + keepUnusedImports, + helperManager, + ) {;this.nameManager = nameManager;this.tokens = tokens;this.enableLegacyTypeScriptModuleInterop = enableLegacyTypeScriptModuleInterop;this.options = options;this.isTypeScriptTransformEnabled = isTypeScriptTransformEnabled;this.keepUnusedImports = keepUnusedImports;this.helperManager = helperManager;CJSImportProcessor.prototype.__init.call(this);CJSImportProcessor.prototype.__init2.call(this);CJSImportProcessor.prototype.__init3.call(this);CJSImportProcessor.prototype.__init4.call(this);CJSImportProcessor.prototype.__init5.call(this);} + + preprocessTokens() { + for (let i = 0; i < this.tokens.tokens.length; i++) { + if ( + this.tokens.matches1AtIndex(i, tt._import) && + !this.tokens.matches3AtIndex(i, tt._import, tt.name, tt.eq) + ) { + this.preprocessImportAtIndex(i); + } + if ( + this.tokens.matches1AtIndex(i, tt._export) && + !this.tokens.matches2AtIndex(i, tt._export, tt.eq) + ) { + this.preprocessExportAtIndex(i); + } + } + this.generateImportReplacements(); + } + + /** + * In TypeScript, import statements that only import types should be removed. + * This includes `import {} from 'foo';`, but not `import 'foo';`. + */ + pruneTypeOnlyImports() { + this.nonTypeIdentifiers = getNonTypeIdentifiers(this.tokens, this.options); + for (const [path, importInfo] of this.importInfoByPath.entries()) { + if ( + importInfo.hasBareImport || + importInfo.hasStarExport || + importInfo.exportStarNames.length > 0 || + importInfo.namedExports.length > 0 + ) { + continue; + } + const names = [ + ...importInfo.defaultNames, + ...importInfo.wildcardNames, + ...importInfo.namedImports.map(({localName}) => localName), + ]; + if (names.every((name) => this.shouldAutomaticallyElideImportedName(name))) { + this.importsToReplace.set(path, ""); + } + } + } + + shouldAutomaticallyElideImportedName(name) { + return ( + this.isTypeScriptTransformEnabled && + !this.keepUnusedImports && + !this.nonTypeIdentifiers.has(name) + ); + } + + generateImportReplacements() { + for (const [path, importInfo] of this.importInfoByPath.entries()) { + const { + defaultNames, + wildcardNames, + namedImports, + namedExports, + exportStarNames, + hasStarExport, + } = importInfo; + + if ( + defaultNames.length === 0 && + wildcardNames.length === 0 && + namedImports.length === 0 && + namedExports.length === 0 && + exportStarNames.length === 0 && + !hasStarExport + ) { + // Import is never used, so don't even assign a name. + this.importsToReplace.set(path, `require('${path}');`); + continue; + } + + const primaryImportName = this.getFreeIdentifierForPath(path); + let secondaryImportName; + if (this.enableLegacyTypeScriptModuleInterop) { + secondaryImportName = primaryImportName; + } else { + secondaryImportName = + wildcardNames.length > 0 ? wildcardNames[0] : this.getFreeIdentifierForPath(path); + } + let requireCode = `var ${primaryImportName} = require('${path}');`; + if (wildcardNames.length > 0) { + for (const wildcardName of wildcardNames) { + const moduleExpr = this.enableLegacyTypeScriptModuleInterop + ? primaryImportName + : `${this.helperManager.getHelperName("interopRequireWildcard")}(${primaryImportName})`; + requireCode += ` var ${wildcardName} = ${moduleExpr};`; + } + } else if (exportStarNames.length > 0 && secondaryImportName !== primaryImportName) { + requireCode += ` var ${secondaryImportName} = ${this.helperManager.getHelperName( + "interopRequireWildcard", + )}(${primaryImportName});`; + } else if (defaultNames.length > 0 && secondaryImportName !== primaryImportName) { + requireCode += ` var ${secondaryImportName} = ${this.helperManager.getHelperName( + "interopRequireDefault", + )}(${primaryImportName});`; + } + + for (const {importedName, localName} of namedExports) { + requireCode += ` ${this.helperManager.getHelperName( + "createNamedExportFrom", + )}(${primaryImportName}, '${localName}', '${importedName}');`; + } + for (const exportStarName of exportStarNames) { + requireCode += ` exports.${exportStarName} = ${secondaryImportName};`; + } + if (hasStarExport) { + requireCode += ` ${this.helperManager.getHelperName( + "createStarExport", + )}(${primaryImportName});`; + } + + this.importsToReplace.set(path, requireCode); + + for (const defaultName of defaultNames) { + this.identifierReplacements.set(defaultName, `${secondaryImportName}.default`); + } + for (const {importedName, localName} of namedImports) { + this.identifierReplacements.set(localName, `${primaryImportName}.${importedName}`); + } + } + } + + getFreeIdentifierForPath(path) { + const components = path.split("/"); + const lastComponent = components[components.length - 1]; + const baseName = lastComponent.replace(/\W/g, ""); + return this.nameManager.claimFreeName(`_${baseName}`); + } + + preprocessImportAtIndex(index) { + const defaultNames = []; + const wildcardNames = []; + const namedImports = []; + + index++; + if ( + (this.tokens.matchesContextualAtIndex(index, ContextualKeyword._type) || + this.tokens.matches1AtIndex(index, tt._typeof)) && + !this.tokens.matches1AtIndex(index + 1, tt.comma) && + !this.tokens.matchesContextualAtIndex(index + 1, ContextualKeyword._from) + ) { + // import type declaration, so no need to process anything. + return; + } + + if (this.tokens.matches1AtIndex(index, tt.parenL)) { + // Dynamic import, so nothing to do + return; + } + + if (this.tokens.matches1AtIndex(index, tt.name)) { + defaultNames.push(this.tokens.identifierNameAtIndex(index)); + index++; + if (this.tokens.matches1AtIndex(index, tt.comma)) { + index++; + } + } + + if (this.tokens.matches1AtIndex(index, tt.star)) { + // * as + index += 2; + wildcardNames.push(this.tokens.identifierNameAtIndex(index)); + index++; + } + + if (this.tokens.matches1AtIndex(index, tt.braceL)) { + const result = this.getNamedImports(index + 1); + index = result.newIndex; + + for (const namedImport of result.namedImports) { + // Treat {default as X} as a default import to ensure usage of require interop helper + if (namedImport.importedName === "default") { + defaultNames.push(namedImport.localName); + } else { + namedImports.push(namedImport); + } + } + } + + if (this.tokens.matchesContextualAtIndex(index, ContextualKeyword._from)) { + index++; + } + + if (!this.tokens.matches1AtIndex(index, tt.string)) { + throw new Error("Expected string token at the end of import statement."); + } + const path = this.tokens.stringValueAtIndex(index); + const importInfo = this.getImportInfo(path); + importInfo.defaultNames.push(...defaultNames); + importInfo.wildcardNames.push(...wildcardNames); + importInfo.namedImports.push(...namedImports); + if (defaultNames.length === 0 && wildcardNames.length === 0 && namedImports.length === 0) { + importInfo.hasBareImport = true; + } + } + + preprocessExportAtIndex(index) { + if ( + this.tokens.matches2AtIndex(index, tt._export, tt._var) || + this.tokens.matches2AtIndex(index, tt._export, tt._let) || + this.tokens.matches2AtIndex(index, tt._export, tt._const) + ) { + this.preprocessVarExportAtIndex(index); + } else if ( + this.tokens.matches2AtIndex(index, tt._export, tt._function) || + this.tokens.matches2AtIndex(index, tt._export, tt._class) + ) { + const exportName = this.tokens.identifierNameAtIndex(index + 2); + this.addExportBinding(exportName, exportName); + } else if (this.tokens.matches3AtIndex(index, tt._export, tt.name, tt._function)) { + const exportName = this.tokens.identifierNameAtIndex(index + 3); + this.addExportBinding(exportName, exportName); + } else if (this.tokens.matches2AtIndex(index, tt._export, tt.braceL)) { + this.preprocessNamedExportAtIndex(index); + } else if (this.tokens.matches2AtIndex(index, tt._export, tt.star)) { + this.preprocessExportStarAtIndex(index); + } + } + + preprocessVarExportAtIndex(index) { + let depth = 0; + // Handle cases like `export let {x} = y;`, starting at the open-brace in that case. + for (let i = index + 2; ; i++) { + if ( + this.tokens.matches1AtIndex(i, tt.braceL) || + this.tokens.matches1AtIndex(i, tt.dollarBraceL) || + this.tokens.matches1AtIndex(i, tt.bracketL) + ) { + depth++; + } else if ( + this.tokens.matches1AtIndex(i, tt.braceR) || + this.tokens.matches1AtIndex(i, tt.bracketR) + ) { + depth--; + } else if (depth === 0 && !this.tokens.matches1AtIndex(i, tt.name)) { + break; + } else if (this.tokens.matches1AtIndex(1, tt.eq)) { + const endIndex = this.tokens.currentToken().rhsEndIndex; + if (endIndex == null) { + throw new Error("Expected = token with an end index."); + } + i = endIndex - 1; + } else { + const token = this.tokens.tokens[i]; + if (isDeclaration(token)) { + const exportName = this.tokens.identifierNameAtIndex(i); + this.identifierReplacements.set(exportName, `exports.${exportName}`); + } + } + } + } + + /** + * Walk this export statement just in case it's an export...from statement. + * If it is, combine it into the import info for that path. Otherwise, just + * bail out; it'll be handled later. + */ + preprocessNamedExportAtIndex(index) { + // export { + index += 2; + const {newIndex, namedImports} = this.getNamedImports(index); + index = newIndex; + + if (this.tokens.matchesContextualAtIndex(index, ContextualKeyword._from)) { + index++; + } else { + // Reinterpret "a as b" to be local/exported rather than imported/local. + for (const {importedName: localName, localName: exportedName} of namedImports) { + this.addExportBinding(localName, exportedName); + } + return; + } + + if (!this.tokens.matches1AtIndex(index, tt.string)) { + throw new Error("Expected string token at the end of import statement."); + } + const path = this.tokens.stringValueAtIndex(index); + const importInfo = this.getImportInfo(path); + importInfo.namedExports.push(...namedImports); + } + + preprocessExportStarAtIndex(index) { + let exportedName = null; + if (this.tokens.matches3AtIndex(index, tt._export, tt.star, tt._as)) { + // export * as + index += 3; + exportedName = this.tokens.identifierNameAtIndex(index); + // foo from + index += 2; + } else { + // export * from + index += 3; + } + if (!this.tokens.matches1AtIndex(index, tt.string)) { + throw new Error("Expected string token at the end of star export statement."); + } + const path = this.tokens.stringValueAtIndex(index); + const importInfo = this.getImportInfo(path); + if (exportedName !== null) { + importInfo.exportStarNames.push(exportedName); + } else { + importInfo.hasStarExport = true; + } + } + + getNamedImports(index) { + const namedImports = []; + while (true) { + if (this.tokens.matches1AtIndex(index, tt.braceR)) { + index++; + break; + } + + const specifierInfo = getImportExportSpecifierInfo(this.tokens, index); + index = specifierInfo.endIndex; + if (!specifierInfo.isType) { + namedImports.push({ + importedName: specifierInfo.leftName, + localName: specifierInfo.rightName, + }); + } + + if (this.tokens.matches2AtIndex(index, tt.comma, tt.braceR)) { + index += 2; + break; + } else if (this.tokens.matches1AtIndex(index, tt.braceR)) { + index++; + break; + } else if (this.tokens.matches1AtIndex(index, tt.comma)) { + index++; + } else { + throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[index])}`); + } + } + return {newIndex: index, namedImports}; + } + + /** + * Get a mutable import info object for this path, creating one if it doesn't + * exist yet. + */ + getImportInfo(path) { + const existingInfo = this.importInfoByPath.get(path); + if (existingInfo) { + return existingInfo; + } + const newInfo = { + defaultNames: [], + wildcardNames: [], + namedImports: [], + namedExports: [], + hasBareImport: false, + exportStarNames: [], + hasStarExport: false, + }; + this.importInfoByPath.set(path, newInfo); + return newInfo; + } + + addExportBinding(localName, exportedName) { + if (!this.exportBindingsByLocalName.has(localName)) { + this.exportBindingsByLocalName.set(localName, []); + } + this.exportBindingsByLocalName.get(localName).push(exportedName); + } + + /** + * Return the code to use for the import for this path, or the empty string if + * the code has already been "claimed" by a previous import. + */ + claimImportCode(importPath) { + const result = this.importsToReplace.get(importPath); + this.importsToReplace.set(importPath, ""); + return result || ""; + } + + getIdentifierReplacement(identifierName) { + return this.identifierReplacements.get(identifierName) || null; + } + + /** + * Return a string like `exports.foo = exports.bar`. + */ + resolveExportBinding(assignedName) { + const exportedNames = this.exportBindingsByLocalName.get(assignedName); + if (!exportedNames || exportedNames.length === 0) { + return null; + } + return exportedNames.map((exportedName) => `exports.${exportedName}`).join(" = "); + } + + /** + * Return all imported/exported names where we might be interested in whether usages of those + * names are shadowed. + */ + getGlobalNames() { + return new Set([ + ...this.identifierReplacements.keys(), + ...this.exportBindingsByLocalName.keys(), + ]); + } +} diff --git a/node_modules/sucrase/dist/esm/HelperManager.js b/node_modules/sucrase/dist/esm/HelperManager.js new file mode 100644 index 0000000..7964db3 --- /dev/null +++ b/node_modules/sucrase/dist/esm/HelperManager.js @@ -0,0 +1,176 @@ + + +const HELPERS = { + require: ` + import {createRequire as CREATE_REQUIRE_NAME} from "module"; + const require = CREATE_REQUIRE_NAME(import.meta.url); + `, + interopRequireWildcard: ` + function interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + return newObj; + } + } + `, + interopRequireDefault: ` + function interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + `, + createNamedExportFrom: ` + function createNamedExportFrom(obj, localName, importedName) { + Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]}); + } + `, + // Note that TypeScript and Babel do this differently; TypeScript does a simple existence + // check in the exports object and does a plain assignment, whereas Babel uses + // defineProperty and builds an object of explicitly-exported names so that star exports can + // always take lower precedence. For now, we do the easier TypeScript thing. + createStarExport: ` + function createStarExport(obj) { + Object.keys(obj) + .filter((key) => key !== "default" && key !== "__esModule") + .forEach((key) => { + if (exports.hasOwnProperty(key)) { + return; + } + Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); + }); + } + `, + nullishCoalesce: ` + function nullishCoalesce(lhs, rhsFn) { + if (lhs != null) { + return lhs; + } else { + return rhsFn(); + } + } + `, + asyncNullishCoalesce: ` + async function asyncNullishCoalesce(lhs, rhsFn) { + if (lhs != null) { + return lhs; + } else { + return await rhsFn(); + } + } + `, + optionalChain: ` + function optionalChain(ops) { + let lastAccessLHS = undefined; + let value = ops[0]; + let i = 1; + while (i < ops.length) { + const op = ops[i]; + const fn = ops[i + 1]; + i += 2; + if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { + return undefined; + } + if (op === 'access' || op === 'optionalAccess') { + lastAccessLHS = value; + value = fn(value); + } else if (op === 'call' || op === 'optionalCall') { + value = fn((...args) => value.call(lastAccessLHS, ...args)); + lastAccessLHS = undefined; + } + } + return value; + } + `, + asyncOptionalChain: ` + async function asyncOptionalChain(ops) { + let lastAccessLHS = undefined; + let value = ops[0]; + let i = 1; + while (i < ops.length) { + const op = ops[i]; + const fn = ops[i + 1]; + i += 2; + if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { + return undefined; + } + if (op === 'access' || op === 'optionalAccess') { + lastAccessLHS = value; + value = await fn(value); + } else if (op === 'call' || op === 'optionalCall') { + value = await fn((...args) => value.call(lastAccessLHS, ...args)); + lastAccessLHS = undefined; + } + } + return value; + } + `, + optionalChainDelete: ` + function optionalChainDelete(ops) { + const result = OPTIONAL_CHAIN_NAME(ops); + return result == null ? true : result; + } + `, + asyncOptionalChainDelete: ` + async function asyncOptionalChainDelete(ops) { + const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops); + return result == null ? true : result; + } + `, +}; + +export class HelperManager { + __init() {this.helperNames = {}} + __init2() {this.createRequireName = null} + constructor( nameManager) {;this.nameManager = nameManager;HelperManager.prototype.__init.call(this);HelperManager.prototype.__init2.call(this);} + + getHelperName(baseName) { + let helperName = this.helperNames[baseName]; + if (helperName) { + return helperName; + } + helperName = this.nameManager.claimFreeName(`_${baseName}`); + this.helperNames[baseName] = helperName; + return helperName; + } + + emitHelpers() { + let resultCode = ""; + if (this.helperNames.optionalChainDelete) { + this.getHelperName("optionalChain"); + } + if (this.helperNames.asyncOptionalChainDelete) { + this.getHelperName("asyncOptionalChain"); + } + for (const [baseName, helperCodeTemplate] of Object.entries(HELPERS)) { + const helperName = this.helperNames[baseName]; + let helperCode = helperCodeTemplate; + if (baseName === "optionalChainDelete") { + helperCode = helperCode.replace("OPTIONAL_CHAIN_NAME", this.helperNames.optionalChain); + } else if (baseName === "asyncOptionalChainDelete") { + helperCode = helperCode.replace( + "ASYNC_OPTIONAL_CHAIN_NAME", + this.helperNames.asyncOptionalChain, + ); + } else if (baseName === "require") { + if (this.createRequireName === null) { + this.createRequireName = this.nameManager.claimFreeName("_createRequire"); + } + helperCode = helperCode.replace(/CREATE_REQUIRE_NAME/g, this.createRequireName); + } + if (helperName) { + resultCode += " "; + resultCode += helperCode.replace(baseName, helperName).replace(/\s+/g, " ").trim(); + } + } + return resultCode; + } +} diff --git a/node_modules/sucrase/dist/esm/NameManager.js b/node_modules/sucrase/dist/esm/NameManager.js new file mode 100644 index 0000000..47d2c9f --- /dev/null +++ b/node_modules/sucrase/dist/esm/NameManager.js @@ -0,0 +1,27 @@ + +import getIdentifierNames from "./util/getIdentifierNames"; + +export default class NameManager { + __init() {this.usedNames = new Set()} + + constructor(code, tokens) {;NameManager.prototype.__init.call(this); + this.usedNames = new Set(getIdentifierNames(code, tokens)); + } + + claimFreeName(name) { + const newName = this.findFreeName(name); + this.usedNames.add(newName); + return newName; + } + + findFreeName(name) { + if (!this.usedNames.has(name)) { + return name; + } + let suffixNum = 2; + while (this.usedNames.has(name + String(suffixNum))) { + suffixNum++; + } + return name + String(suffixNum); + } +} diff --git a/node_modules/sucrase/dist/esm/Options-gen-types.js b/node_modules/sucrase/dist/esm/Options-gen-types.js new file mode 100644 index 0000000..5c39c2c --- /dev/null +++ b/node_modules/sucrase/dist/esm/Options-gen-types.js @@ -0,0 +1,42 @@ +/** + * This module was automatically generated by `ts-interface-builder` + */ +import * as t from "ts-interface-checker"; +// tslint:disable:object-literal-key-quotes + +export const Transform = t.union( + t.lit("jsx"), + t.lit("typescript"), + t.lit("flow"), + t.lit("imports"), + t.lit("react-hot-loader"), + t.lit("jest"), +); + +export const SourceMapOptions = t.iface([], { + compiledFilename: "string", +}); + +export const Options = t.iface([], { + transforms: t.array("Transform"), + disableESTransforms: t.opt("boolean"), + jsxRuntime: t.opt(t.union(t.lit("classic"), t.lit("automatic"), t.lit("preserve"))), + production: t.opt("boolean"), + jsxImportSource: t.opt("string"), + jsxPragma: t.opt("string"), + jsxFragmentPragma: t.opt("string"), + keepUnusedImports: t.opt("boolean"), + preserveDynamicImport: t.opt("boolean"), + injectCreateRequireForImportRequire: t.opt("boolean"), + enableLegacyTypeScriptModuleInterop: t.opt("boolean"), + enableLegacyBabel5ModuleInterop: t.opt("boolean"), + sourceMapOptions: t.opt("SourceMapOptions"), + filePath: t.opt("string"), +}); + +const exportedTypeSuite = { + Transform, + SourceMapOptions, + Options, +}; +export default exportedTypeSuite; diff --git a/node_modules/sucrase/dist/esm/Options.js b/node_modules/sucrase/dist/esm/Options.js new file mode 100644 index 0000000..83ee83d --- /dev/null +++ b/node_modules/sucrase/dist/esm/Options.js @@ -0,0 +1,101 @@ +import {createCheckers} from "ts-interface-checker"; + +import OptionsGenTypes from "./Options-gen-types"; + +const {Options: OptionsChecker} = createCheckers(OptionsGenTypes); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +export function validateOptions(options) { + OptionsChecker.strictCheck(options); +} diff --git a/node_modules/sucrase/dist/esm/TokenProcessor.js b/node_modules/sucrase/dist/esm/TokenProcessor.js new file mode 100644 index 0000000..5335f23 --- /dev/null +++ b/node_modules/sucrase/dist/esm/TokenProcessor.js @@ -0,0 +1,357 @@ + + + +import { TokenType as tt} from "./parser/tokenizer/types"; +import isAsyncOperation from "./util/isAsyncOperation"; + + + + + + + + + + + +export default class TokenProcessor { + __init() {this.resultCode = ""} + // Array mapping input token index to optional string index position in the + // output code. + __init2() {this.resultMappings = new Array(this.tokens.length)} + __init3() {this.tokenIndex = 0} + + constructor( + code, + tokens, + isFlowEnabled, + disableESTransforms, + helperManager, + ) {;this.code = code;this.tokens = tokens;this.isFlowEnabled = isFlowEnabled;this.disableESTransforms = disableESTransforms;this.helperManager = helperManager;TokenProcessor.prototype.__init.call(this);TokenProcessor.prototype.__init2.call(this);TokenProcessor.prototype.__init3.call(this);} + + /** + * Snapshot the token state in a way that can be restored later, useful for + * things like lookahead. + * + * resultMappings do not need to be copied since in all use cases, they will + * be overwritten anyway after restore. + */ + snapshot() { + return { + resultCode: this.resultCode, + tokenIndex: this.tokenIndex, + }; + } + + restoreToSnapshot(snapshot) { + this.resultCode = snapshot.resultCode; + this.tokenIndex = snapshot.tokenIndex; + } + + /** + * Remove and return the code generated since the snapshot, leaving the + * current token position in-place. Unlike most TokenProcessor operations, + * this operation can result in input/output line number mismatches because + * the removed code may contain newlines, so this operation should be used + * sparingly. + */ + dangerouslyGetAndRemoveCodeSinceSnapshot(snapshot) { + const result = this.resultCode.slice(snapshot.resultCode.length); + this.resultCode = snapshot.resultCode; + return result; + } + + reset() { + this.resultCode = ""; + this.resultMappings = new Array(this.tokens.length); + this.tokenIndex = 0; + } + + matchesContextualAtIndex(index, contextualKeyword) { + return ( + this.matches1AtIndex(index, tt.name) && + this.tokens[index].contextualKeyword === contextualKeyword + ); + } + + identifierNameAtIndex(index) { + // TODO: We need to process escapes since technically you can have unicode escapes in variable + // names. + return this.identifierNameForToken(this.tokens[index]); + } + + identifierNameAtRelativeIndex(relativeIndex) { + return this.identifierNameForToken(this.tokenAtRelativeIndex(relativeIndex)); + } + + identifierName() { + return this.identifierNameForToken(this.currentToken()); + } + + identifierNameForToken(token) { + return this.code.slice(token.start, token.end); + } + + rawCodeForToken(token) { + return this.code.slice(token.start, token.end); + } + + stringValueAtIndex(index) { + return this.stringValueForToken(this.tokens[index]); + } + + stringValue() { + return this.stringValueForToken(this.currentToken()); + } + + stringValueForToken(token) { + // This is used to identify when two imports are the same and to resolve TypeScript enum keys. + // Ideally we'd process escapes within the strings, but for now we pretty much take the raw + // code. + return this.code.slice(token.start + 1, token.end - 1); + } + + matches1AtIndex(index, t1) { + return this.tokens[index].type === t1; + } + + matches2AtIndex(index, t1, t2) { + return this.tokens[index].type === t1 && this.tokens[index + 1].type === t2; + } + + matches3AtIndex(index, t1, t2, t3) { + return ( + this.tokens[index].type === t1 && + this.tokens[index + 1].type === t2 && + this.tokens[index + 2].type === t3 + ); + } + + matches1(t1) { + return this.tokens[this.tokenIndex].type === t1; + } + + matches2(t1, t2) { + return this.tokens[this.tokenIndex].type === t1 && this.tokens[this.tokenIndex + 1].type === t2; + } + + matches3(t1, t2, t3) { + return ( + this.tokens[this.tokenIndex].type === t1 && + this.tokens[this.tokenIndex + 1].type === t2 && + this.tokens[this.tokenIndex + 2].type === t3 + ); + } + + matches4(t1, t2, t3, t4) { + return ( + this.tokens[this.tokenIndex].type === t1 && + this.tokens[this.tokenIndex + 1].type === t2 && + this.tokens[this.tokenIndex + 2].type === t3 && + this.tokens[this.tokenIndex + 3].type === t4 + ); + } + + matches5(t1, t2, t3, t4, t5) { + return ( + this.tokens[this.tokenIndex].type === t1 && + this.tokens[this.tokenIndex + 1].type === t2 && + this.tokens[this.tokenIndex + 2].type === t3 && + this.tokens[this.tokenIndex + 3].type === t4 && + this.tokens[this.tokenIndex + 4].type === t5 + ); + } + + matchesContextual(contextualKeyword) { + return this.matchesContextualAtIndex(this.tokenIndex, contextualKeyword); + } + + matchesContextIdAndLabel(type, contextId) { + return this.matches1(type) && this.currentToken().contextId === contextId; + } + + previousWhitespaceAndComments() { + let whitespaceAndComments = this.code.slice( + this.tokenIndex > 0 ? this.tokens[this.tokenIndex - 1].end : 0, + this.tokenIndex < this.tokens.length ? this.tokens[this.tokenIndex].start : this.code.length, + ); + if (this.isFlowEnabled) { + whitespaceAndComments = whitespaceAndComments.replace(/@flow/g, ""); + } + return whitespaceAndComments; + } + + replaceToken(newCode) { + this.resultCode += this.previousWhitespaceAndComments(); + this.appendTokenPrefix(); + this.resultMappings[this.tokenIndex] = this.resultCode.length; + this.resultCode += newCode; + this.appendTokenSuffix(); + this.tokenIndex++; + } + + replaceTokenTrimmingLeftWhitespace(newCode) { + this.resultCode += this.previousWhitespaceAndComments().replace(/[^\r\n]/g, ""); + this.appendTokenPrefix(); + this.resultMappings[this.tokenIndex] = this.resultCode.length; + this.resultCode += newCode; + this.appendTokenSuffix(); + this.tokenIndex++; + } + + removeInitialToken() { + this.replaceToken(""); + } + + removeToken() { + this.replaceTokenTrimmingLeftWhitespace(""); + } + + /** + * Remove all code until the next }, accounting for balanced braces. + */ + removeBalancedCode() { + let braceDepth = 0; + while (!this.isAtEnd()) { + if (this.matches1(tt.braceL)) { + braceDepth++; + } else if (this.matches1(tt.braceR)) { + if (braceDepth === 0) { + return; + } + braceDepth--; + } + this.removeToken(); + } + } + + copyExpectedToken(tokenType) { + if (this.tokens[this.tokenIndex].type !== tokenType) { + throw new Error(`Expected token ${tokenType}`); + } + this.copyToken(); + } + + copyToken() { + this.resultCode += this.previousWhitespaceAndComments(); + this.appendTokenPrefix(); + this.resultMappings[this.tokenIndex] = this.resultCode.length; + this.resultCode += this.code.slice( + this.tokens[this.tokenIndex].start, + this.tokens[this.tokenIndex].end, + ); + this.appendTokenSuffix(); + this.tokenIndex++; + } + + copyTokenWithPrefix(prefix) { + this.resultCode += this.previousWhitespaceAndComments(); + this.appendTokenPrefix(); + this.resultCode += prefix; + this.resultMappings[this.tokenIndex] = this.resultCode.length; + this.resultCode += this.code.slice( + this.tokens[this.tokenIndex].start, + this.tokens[this.tokenIndex].end, + ); + this.appendTokenSuffix(); + this.tokenIndex++; + } + + appendTokenPrefix() { + const token = this.currentToken(); + if (token.numNullishCoalesceStarts || token.isOptionalChainStart) { + token.isAsyncOperation = isAsyncOperation(this); + } + if (this.disableESTransforms) { + return; + } + if (token.numNullishCoalesceStarts) { + for (let i = 0; i < token.numNullishCoalesceStarts; i++) { + if (token.isAsyncOperation) { + this.resultCode += "await "; + this.resultCode += this.helperManager.getHelperName("asyncNullishCoalesce"); + } else { + this.resultCode += this.helperManager.getHelperName("nullishCoalesce"); + } + this.resultCode += "("; + } + } + if (token.isOptionalChainStart) { + if (token.isAsyncOperation) { + this.resultCode += "await "; + } + if (this.tokenIndex > 0 && this.tokenAtRelativeIndex(-1).type === tt._delete) { + if (token.isAsyncOperation) { + this.resultCode += this.helperManager.getHelperName("asyncOptionalChainDelete"); + } else { + this.resultCode += this.helperManager.getHelperName("optionalChainDelete"); + } + } else if (token.isAsyncOperation) { + this.resultCode += this.helperManager.getHelperName("asyncOptionalChain"); + } else { + this.resultCode += this.helperManager.getHelperName("optionalChain"); + } + this.resultCode += "(["; + } + } + + appendTokenSuffix() { + const token = this.currentToken(); + if (token.isOptionalChainEnd && !this.disableESTransforms) { + this.resultCode += "])"; + } + if (token.numNullishCoalesceEnds && !this.disableESTransforms) { + for (let i = 0; i < token.numNullishCoalesceEnds; i++) { + this.resultCode += "))"; + } + } + } + + appendCode(code) { + this.resultCode += code; + } + + currentToken() { + return this.tokens[this.tokenIndex]; + } + + currentTokenCode() { + const token = this.currentToken(); + return this.code.slice(token.start, token.end); + } + + tokenAtRelativeIndex(relativeIndex) { + return this.tokens[this.tokenIndex + relativeIndex]; + } + + currentIndex() { + return this.tokenIndex; + } + + /** + * Move to the next token. Only suitable in preprocessing steps. When + * generating new code, you should use copyToken or removeToken. + */ + nextToken() { + if (this.tokenIndex === this.tokens.length) { + throw new Error("Unexpectedly reached end of input."); + } + this.tokenIndex++; + } + + previousToken() { + this.tokenIndex--; + } + + finish() { + if (this.tokenIndex !== this.tokens.length) { + throw new Error("Tried to finish processing tokens before reaching the end."); + } + this.resultCode += this.previousWhitespaceAndComments(); + return {code: this.resultCode, mappings: this.resultMappings}; + } + + isAtEnd() { + return this.tokenIndex === this.tokens.length; + } +} diff --git a/node_modules/sucrase/dist/esm/cli.js b/node_modules/sucrase/dist/esm/cli.js new file mode 100644 index 0000000..08acead --- /dev/null +++ b/node_modules/sucrase/dist/esm/cli.js @@ -0,0 +1,317 @@ +/* eslint-disable no-console */ +import commander from "commander"; +import {glob} from "tinyglobby"; +import {exists, mkdir, readdir, readFile, stat, writeFile} from "mz/fs"; +import {dirname, join, relative} from "path"; + +import { transform} from "./index"; + + + + + + + + + + + +export default function run() { + commander + .description(`Sucrase: super-fast Babel alternative.`) + .usage("[options] ") + .option( + "-d, --out-dir ", + "Compile an input directory of modules into an output directory.", + ) + .option( + "-p, --project ", + "Compile a TypeScript project, will read from tsconfig.json in ", + ) + .option("--out-extension ", "File extension to use for all output files.", "js") + .option("--exclude-dirs ", "Names of directories that should not be traversed.") + .option("-q, --quiet", "Don't print the names of converted files.") + .option("-t, --transforms ", "Comma-separated list of transforms to run.") + .option("--disable-es-transforms", "Opt out of all ES syntax transforms.") + .option("--jsx-runtime ", "Transformation mode for the JSX transform.") + .option("--production", "Disable debugging information from JSX in output.") + .option( + "--jsx-import-source ", + "Automatic JSX transform import path prefix, defaults to `React.Fragment`.", + ) + .option( + "--jsx-pragma ", + "Classic JSX transform element creation function, defaults to `React.createElement`.", + ) + .option( + "--jsx-fragment-pragma ", + "Classic JSX transform fragment component, defaults to `React.Fragment`.", + ) + .option("--keep-unused-imports", "Disable automatic removal of type-only imports/exports.") + .option("--preserve-dynamic-import", "Don't transpile dynamic import() to require.") + .option( + "--inject-create-require-for-import-require", + "Use `createRequire` when transpiling TS `import = require` to ESM.", + ) + .option( + "--enable-legacy-typescript-module-interop", + "Use default TypeScript ESM/CJS interop strategy.", + ) + .option("--enable-legacy-babel5-module-interop", "Use Babel 5 ESM/CJS interop strategy.") + .parse(process.argv); + + if (commander.project) { + if ( + commander.outDir || + commander.transforms || + commander.args[0] || + commander.enableLegacyTypescriptModuleInterop + ) { + console.error( + "If TypeScript project is specified, out directory, transforms, source " + + "directory, and --enable-legacy-typescript-module-interop may not be specified.", + ); + process.exit(1); + } + } else { + if (!commander.outDir) { + console.error("Out directory is required"); + process.exit(1); + } + + if (!commander.transforms) { + console.error("Transforms option is required."); + process.exit(1); + } + + if (!commander.args[0]) { + console.error("Source directory is required."); + process.exit(1); + } + } + + const options = { + outDirPath: commander.outDir, + srcDirPath: commander.args[0], + project: commander.project, + outExtension: commander.outExtension, + excludeDirs: commander.excludeDirs ? commander.excludeDirs.split(",") : [], + quiet: commander.quiet, + sucraseOptions: { + transforms: commander.transforms ? commander.transforms.split(",") : [], + disableESTransforms: commander.disableEsTransforms, + jsxRuntime: commander.jsxRuntime, + production: commander.production, + jsxImportSource: commander.jsxImportSource, + jsxPragma: commander.jsxPragma || "React.createElement", + jsxFragmentPragma: commander.jsxFragmentPragma || "React.Fragment", + keepUnusedImports: commander.keepUnusedImports, + preserveDynamicImport: commander.preserveDynamicImport, + injectCreateRequireForImportRequire: commander.injectCreateRequireForImportRequire, + enableLegacyTypeScriptModuleInterop: commander.enableLegacyTypescriptModuleInterop, + enableLegacyBabel5ModuleInterop: commander.enableLegacyBabel5ModuleInterop, + }, + }; + + buildDirectory(options).catch((e) => { + process.exitCode = 1; + console.error(e); + }); +} + + + + + + +async function findFiles(options) { + const outDirPath = options.outDirPath; + const srcDirPath = options.srcDirPath; + + const extensions = options.sucraseOptions.transforms.includes("typescript") + ? [".ts", ".tsx"] + : [".js", ".jsx"]; + + if (!(await exists(outDirPath))) { + await mkdir(outDirPath); + } + + const outArr = []; + for (const child of await readdir(srcDirPath)) { + if (["node_modules", ".git"].includes(child) || options.excludeDirs.includes(child)) { + continue; + } + const srcChildPath = join(srcDirPath, child); + const outChildPath = join(outDirPath, child); + if ((await stat(srcChildPath)).isDirectory()) { + const innerOptions = {...options}; + innerOptions.srcDirPath = srcChildPath; + innerOptions.outDirPath = outChildPath; + const innerFiles = await findFiles(innerOptions); + outArr.push(...innerFiles); + } else if (extensions.some((ext) => srcChildPath.endsWith(ext))) { + const outPath = outChildPath.replace(/\.\w+$/, `.${options.outExtension}`); + outArr.push({ + srcPath: srcChildPath, + outPath, + }); + } + } + + return outArr; +} + +async function runGlob(options) { + const tsConfigPath = join(options.project, "tsconfig.json"); + + let str; + try { + str = await readFile(tsConfigPath, "utf8"); + } catch (err) { + console.error("Could not find project tsconfig.json"); + console.error(` --project=${options.project}`); + console.error(err); + process.exit(1); + } + const json = JSON.parse(str); + + const foundFiles = []; + + const files = json.files; + const include = json.include; + + const absProject = join(process.cwd(), options.project); + const outDirs = []; + + if (!(await exists(options.outDirPath))) { + await mkdir(options.outDirPath); + } + + if (files) { + for (const file of files) { + if (file.endsWith(".d.ts")) { + continue; + } + if (!file.endsWith(".ts") && !file.endsWith(".js")) { + continue; + } + + const srcFile = join(absProject, file); + const outFile = join(options.outDirPath, file); + const outPath = outFile.replace(/\.\w+$/, `.${options.outExtension}`); + + const outDir = dirname(outPath); + if (!outDirs.includes(outDir)) { + outDirs.push(outDir); + } + + foundFiles.push({ + srcPath: srcFile, + outPath, + }); + } + } + if (include) { + for (const pattern of include) { + const globFiles = await glob(join(absProject, pattern), {expandDirectories: false}); + for (const file of globFiles) { + if (!file.endsWith(".ts") && !file.endsWith(".js")) { + continue; + } + if (file.endsWith(".d.ts")) { + continue; + } + + const relativeFile = relative(absProject, file); + const outFile = join(options.outDirPath, relativeFile); + const outPath = outFile.replace(/\.\w+$/, `.${options.outExtension}`); + + const outDir = dirname(outPath); + if (!outDirs.includes(outDir)) { + outDirs.push(outDir); + } + + foundFiles.push({ + srcPath: file, + outPath, + }); + } + } + } + + for (const outDirPath of outDirs) { + if (!(await exists(outDirPath))) { + await mkdir(outDirPath); + } + } + + // TODO: read exclude + + return foundFiles; +} + +async function updateOptionsFromProject(options) { + /** + * Read the project information and assign the following. + * - outDirPath + * - transform: imports + * - transform: typescript + * - enableLegacyTypescriptModuleInterop: true/false. + */ + + const tsConfigPath = join(options.project, "tsconfig.json"); + + let str; + try { + str = await readFile(tsConfigPath, "utf8"); + } catch (err) { + console.error("Could not find project tsconfig.json"); + console.error(` --project=${options.project}`); + console.error(err); + process.exit(1); + } + const json = JSON.parse(str); + const sucraseOpts = options.sucraseOptions; + if (!sucraseOpts.transforms.includes("typescript")) { + sucraseOpts.transforms.push("typescript"); + } + + const compilerOpts = json.compilerOptions; + if (compilerOpts.outDir) { + options.outDirPath = join(process.cwd(), options.project, compilerOpts.outDir); + } + if (compilerOpts.esModuleInterop !== true) { + sucraseOpts.enableLegacyTypeScriptModuleInterop = true; + } + if (compilerOpts.module === "commonjs") { + if (!sucraseOpts.transforms.includes("imports")) { + sucraseOpts.transforms.push("imports"); + } + } +} + +async function buildDirectory(options) { + let files; + if (options.outDirPath && options.srcDirPath) { + files = await findFiles(options); + } else if (options.project) { + await updateOptionsFromProject(options); + files = await runGlob(options); + } else { + console.error("Project or Source directory required."); + process.exit(1); + } + + for (const file of files) { + await buildFile(file.srcPath, file.outPath, options); + } +} + +async function buildFile(srcPath, outPath, options) { + if (!options.quiet) { + console.log(`${srcPath} -> ${outPath}`); + } + const code = (await readFile(srcPath)).toString(); + const transformedCode = transform(code, {...options.sucraseOptions, filePath: srcPath}).code; + await writeFile(outPath, transformedCode); +} diff --git a/node_modules/sucrase/dist/esm/computeSourceMap.js b/node_modules/sucrase/dist/esm/computeSourceMap.js new file mode 100644 index 0000000..699ea78 --- /dev/null +++ b/node_modules/sucrase/dist/esm/computeSourceMap.js @@ -0,0 +1,89 @@ +import {GenMapping, maybeAddSegment, toEncodedMap} from "@jridgewell/gen-mapping"; + + + +import {charCodes} from "./parser/util/charcodes"; + + + + + + + + + + + + +/** + * Generate a source map indicating that each line maps directly to the original line, + * with the tokens in their new positions. + */ +export default function computeSourceMap( + {code: generatedCode, mappings: rawMappings}, + filePath, + options, + source, + tokens, +) { + const sourceColumns = computeSourceColumns(source, tokens); + const map = new GenMapping({file: options.compiledFilename}); + let tokenIndex = 0; + // currentMapping is the output source index for the current input token being + // considered. + let currentMapping = rawMappings[0]; + while (currentMapping === undefined && tokenIndex < rawMappings.length - 1) { + tokenIndex++; + currentMapping = rawMappings[tokenIndex]; + } + let line = 0; + let lineStart = 0; + if (currentMapping !== lineStart) { + maybeAddSegment(map, line, 0, filePath, line, 0); + } + for (let i = 0; i < generatedCode.length; i++) { + if (i === currentMapping) { + const genColumn = currentMapping - lineStart; + const sourceColumn = sourceColumns[tokenIndex]; + maybeAddSegment(map, line, genColumn, filePath, line, sourceColumn); + while ( + (currentMapping === i || currentMapping === undefined) && + tokenIndex < rawMappings.length - 1 + ) { + tokenIndex++; + currentMapping = rawMappings[tokenIndex]; + } + } + if (generatedCode.charCodeAt(i) === charCodes.lineFeed) { + line++; + lineStart = i + 1; + if (currentMapping !== lineStart) { + maybeAddSegment(map, line, 0, filePath, line, 0); + } + } + } + const {sourceRoot, sourcesContent, ...sourceMap} = toEncodedMap(map); + return sourceMap ; +} + +/** + * Create an array mapping each token index to the 0-based column of the start + * position of the token. + */ +function computeSourceColumns(code, tokens) { + const sourceColumns = new Array(tokens.length); + let tokenIndex = 0; + let currentMapping = tokens[tokenIndex].start; + let lineStart = 0; + for (let i = 0; i < code.length; i++) { + if (i === currentMapping) { + sourceColumns[tokenIndex] = currentMapping - lineStart; + tokenIndex++; + currentMapping = tokens[tokenIndex].start; + } + if (code.charCodeAt(i) === charCodes.lineFeed) { + lineStart = i + 1; + } + } + return sourceColumns; +} diff --git a/node_modules/sucrase/dist/esm/identifyShadowedGlobals.js b/node_modules/sucrase/dist/esm/identifyShadowedGlobals.js new file mode 100644 index 0000000..f953633 --- /dev/null +++ b/node_modules/sucrase/dist/esm/identifyShadowedGlobals.js @@ -0,0 +1,98 @@ +import { + isBlockScopedDeclaration, + isFunctionScopedDeclaration, + isNonTopLevelDeclaration, +} from "./parser/tokenizer"; + +import {TokenType as tt} from "./parser/tokenizer/types"; + + +/** + * Traverse the given tokens and modify them if necessary to indicate that some names shadow global + * variables. + */ +export default function identifyShadowedGlobals( + tokens, + scopes, + globalNames, +) { + if (!hasShadowedGlobals(tokens, globalNames)) { + return; + } + markShadowedGlobals(tokens, scopes, globalNames); +} + +/** + * We can do a fast up-front check to see if there are any declarations to global names. If not, + * then there's no point in computing scope assignments. + */ +// Exported for testing. +export function hasShadowedGlobals(tokens, globalNames) { + for (const token of tokens.tokens) { + if ( + token.type === tt.name && + !token.isType && + isNonTopLevelDeclaration(token) && + globalNames.has(tokens.identifierNameForToken(token)) + ) { + return true; + } + } + return false; +} + +function markShadowedGlobals( + tokens, + scopes, + globalNames, +) { + const scopeStack = []; + let scopeIndex = scopes.length - 1; + // Scopes were generated at completion time, so they're sorted by end index, so we can maintain a + // good stack by going backwards through them. + for (let i = tokens.tokens.length - 1; ; i--) { + while (scopeStack.length > 0 && scopeStack[scopeStack.length - 1].startTokenIndex === i + 1) { + scopeStack.pop(); + } + while (scopeIndex >= 0 && scopes[scopeIndex].endTokenIndex === i + 1) { + scopeStack.push(scopes[scopeIndex]); + scopeIndex--; + } + // Process scopes after the last iteration so we can make sure we pop all of them. + if (i < 0) { + break; + } + + const token = tokens.tokens[i]; + const name = tokens.identifierNameForToken(token); + if (scopeStack.length > 1 && !token.isType && token.type === tt.name && globalNames.has(name)) { + if (isBlockScopedDeclaration(token)) { + markShadowedForScope(scopeStack[scopeStack.length - 1], tokens, name); + } else if (isFunctionScopedDeclaration(token)) { + let stackIndex = scopeStack.length - 1; + while (stackIndex > 0 && !scopeStack[stackIndex].isFunctionScope) { + stackIndex--; + } + if (stackIndex < 0) { + throw new Error("Did not find parent function scope."); + } + markShadowedForScope(scopeStack[stackIndex], tokens, name); + } + } + } + if (scopeStack.length > 0) { + throw new Error("Expected empty scope stack after processing file."); + } +} + +function markShadowedForScope(scope, tokens, name) { + for (let i = scope.startTokenIndex; i < scope.endTokenIndex; i++) { + const token = tokens.tokens[i]; + if ( + (token.type === tt.name || token.type === tt.jsxName) && + tokens.identifierNameForToken(token) === name + ) { + token.shadowsGlobal = true; + } + } +} diff --git a/node_modules/sucrase/dist/esm/index.js b/node_modules/sucrase/dist/esm/index.js new file mode 100644 index 0000000..99e1e8a --- /dev/null +++ b/node_modules/sucrase/dist/esm/index.js @@ -0,0 +1,133 @@ +import CJSImportProcessor from "./CJSImportProcessor"; +import computeSourceMap, {} from "./computeSourceMap"; +import {HelperManager} from "./HelperManager"; +import identifyShadowedGlobals from "./identifyShadowedGlobals"; +import NameManager from "./NameManager"; +import {validateOptions} from "./Options"; + +import {parse} from "./parser"; + +import TokenProcessor from "./TokenProcessor"; +import RootTransformer from "./transformers/RootTransformer"; +import formatTokens from "./util/formatTokens"; +import getTSImportedNames from "./util/getTSImportedNames"; + + + + + + + + + + + + + + +; + +export function getVersion() { + /* istanbul ignore next */ + return "3.35.1"; +} + +export function transform(code, options) { + validateOptions(options); + try { + const sucraseContext = getSucraseContext(code, options); + const transformer = new RootTransformer( + sucraseContext, + options.transforms, + Boolean(options.enableLegacyBabel5ModuleInterop), + options, + ); + const transformerResult = transformer.transform(); + let result = {code: transformerResult.code}; + if (options.sourceMapOptions) { + if (!options.filePath) { + throw new Error("filePath must be specified when generating a source map."); + } + result = { + ...result, + sourceMap: computeSourceMap( + transformerResult, + options.filePath, + options.sourceMapOptions, + code, + sucraseContext.tokenProcessor.tokens, + ), + }; + } + return result; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } catch (e) { + if (options.filePath) { + e.message = `Error transforming ${options.filePath}: ${e.message}`; + } + throw e; + } +} + +/** + * Return a string representation of the sucrase tokens, mostly useful for + * diagnostic purposes. + */ +export function getFormattedTokens(code, options) { + const tokens = getSucraseContext(code, options).tokenProcessor.tokens; + return formatTokens(code, tokens); +} + +/** + * Call into the parser/tokenizer and do some further preprocessing: + * - Come up with a set of used names so that we can assign new names. + * - Preprocess all import/export statements so we know which globals we are interested in. + * - Compute situations where any of those globals are shadowed. + * + * In the future, some of these preprocessing steps can be skipped based on what actual work is + * being done. + */ +function getSucraseContext(code, options) { + const isJSXEnabled = options.transforms.includes("jsx"); + const isTypeScriptEnabled = options.transforms.includes("typescript"); + const isFlowEnabled = options.transforms.includes("flow"); + const disableESTransforms = options.disableESTransforms === true; + const file = parse(code, isJSXEnabled, isTypeScriptEnabled, isFlowEnabled); + const tokens = file.tokens; + const scopes = file.scopes; + + const nameManager = new NameManager(code, tokens); + const helperManager = new HelperManager(nameManager); + const tokenProcessor = new TokenProcessor( + code, + tokens, + isFlowEnabled, + disableESTransforms, + helperManager, + ); + const enableLegacyTypeScriptModuleInterop = Boolean(options.enableLegacyTypeScriptModuleInterop); + + let importProcessor = null; + if (options.transforms.includes("imports")) { + importProcessor = new CJSImportProcessor( + nameManager, + tokenProcessor, + enableLegacyTypeScriptModuleInterop, + options, + options.transforms.includes("typescript"), + Boolean(options.keepUnusedImports), + helperManager, + ); + importProcessor.preprocessTokens(); + // We need to mark shadowed globals after processing imports so we know that the globals are, + // but before type-only import pruning, since that relies on shadowing information. + identifyShadowedGlobals(tokenProcessor, scopes, importProcessor.getGlobalNames()); + if (options.transforms.includes("typescript") && !options.keepUnusedImports) { + importProcessor.pruneTypeOnlyImports(); + } + } else if (options.transforms.includes("typescript") && !options.keepUnusedImports) { + // Shadowed global detection is needed for TS implicit elision of imported names. + identifyShadowedGlobals(tokenProcessor, scopes, getTSImportedNames(tokenProcessor)); + } + return {tokenProcessor, scopes, nameManager, importProcessor, helperManager}; +} diff --git a/node_modules/sucrase/dist/esm/parser/index.js b/node_modules/sucrase/dist/esm/parser/index.js new file mode 100644 index 0000000..5074ae4 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/index.js @@ -0,0 +1,31 @@ + + +import {augmentError, initParser, state} from "./traverser/base"; +import {parseFile} from "./traverser/index"; + +export class File { + + + + constructor(tokens, scopes) { + this.tokens = tokens; + this.scopes = scopes; + } +} + +export function parse( + input, + isJSXEnabled, + isTypeScriptEnabled, + isFlowEnabled, +) { + if (isFlowEnabled && isTypeScriptEnabled) { + throw new Error("Cannot combine flow and typescript plugins."); + } + initParser(input, isJSXEnabled, isTypeScriptEnabled, isFlowEnabled); + const result = parseFile(); + if (state.error) { + throw augmentError(state.error); + } + return result; +} diff --git a/node_modules/sucrase/dist/esm/parser/plugins/flow.js b/node_modules/sucrase/dist/esm/parser/plugins/flow.js new file mode 100644 index 0000000..66295d1 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/plugins/flow.js @@ -0,0 +1,1105 @@ +/* eslint max-len: 0 */ + +import { + eat, + lookaheadType, + lookaheadTypeAndKeyword, + match, + next, + popTypeContext, + pushTypeContext, + +} from "../tokenizer/index"; +import {ContextualKeyword} from "../tokenizer/keywords"; +import {TokenType, TokenType as tt} from "../tokenizer/types"; +import {input, state} from "../traverser/base"; +import { + baseParseMaybeAssign, + baseParseSubscript, + baseParseSubscripts, + parseArrow, + parseArrowExpression, + parseCallExpressionArguments, + parseExprAtom, + parseExpression, + parseFunctionBody, + parseIdentifier, + parseLiteral, + +} from "../traverser/expression"; +import { + baseParseExportStar, + parseExport, + parseExportFrom, + parseExportSpecifiers, + parseFunctionParams, + parseImport, + parseStatement, +} from "../traverser/statement"; +import { + canInsertSemicolon, + eatContextual, + expect, + expectContextual, + isContextual, + isLookaheadContextual, + semicolon, + unexpected, +} from "../traverser/util"; + +function isMaybeDefaultImport(lookahead) { + return ( + (lookahead.type === tt.name || !!(lookahead.type & TokenType.IS_KEYWORD)) && + lookahead.contextualKeyword !== ContextualKeyword._from + ); +} + +function flowParseTypeInitialiser(tok) { + const oldIsType = pushTypeContext(0); + expect(tok || tt.colon); + flowParseType(); + popTypeContext(oldIsType); +} + +function flowParsePredicate() { + expect(tt.modulo); + expectContextual(ContextualKeyword._checks); + if (eat(tt.parenL)) { + parseExpression(); + expect(tt.parenR); + } +} + +function flowParseTypeAndPredicateInitialiser() { + const oldIsType = pushTypeContext(0); + expect(tt.colon); + if (match(tt.modulo)) { + flowParsePredicate(); + } else { + flowParseType(); + if (match(tt.modulo)) { + flowParsePredicate(); + } + } + popTypeContext(oldIsType); +} + +function flowParseDeclareClass() { + next(); + flowParseInterfaceish(/* isClass */ true); +} + +function flowParseDeclareFunction() { + next(); + parseIdentifier(); + + if (match(tt.lessThan)) { + flowParseTypeParameterDeclaration(); + } + + expect(tt.parenL); + flowParseFunctionTypeParams(); + expect(tt.parenR); + + flowParseTypeAndPredicateInitialiser(); + + semicolon(); +} + +function flowParseDeclare() { + if (match(tt._class)) { + flowParseDeclareClass(); + } else if (match(tt._function)) { + flowParseDeclareFunction(); + } else if (match(tt._var)) { + flowParseDeclareVariable(); + } else if (eatContextual(ContextualKeyword._module)) { + if (eat(tt.dot)) { + flowParseDeclareModuleExports(); + } else { + flowParseDeclareModule(); + } + } else if (isContextual(ContextualKeyword._type)) { + flowParseDeclareTypeAlias(); + } else if (isContextual(ContextualKeyword._opaque)) { + flowParseDeclareOpaqueType(); + } else if (isContextual(ContextualKeyword._interface)) { + flowParseDeclareInterface(); + } else if (match(tt._export)) { + flowParseDeclareExportDeclaration(); + } else { + unexpected(); + } +} + +function flowParseDeclareVariable() { + next(); + flowParseTypeAnnotatableIdentifier(); + semicolon(); +} + +function flowParseDeclareModule() { + if (match(tt.string)) { + parseExprAtom(); + } else { + parseIdentifier(); + } + + expect(tt.braceL); + while (!match(tt.braceR) && !state.error) { + if (match(tt._import)) { + next(); + parseImport(); + } else { + unexpected(); + } + } + expect(tt.braceR); +} + +function flowParseDeclareExportDeclaration() { + expect(tt._export); + + if (eat(tt._default)) { + if (match(tt._function) || match(tt._class)) { + // declare export default class ... + // declare export default function ... + flowParseDeclare(); + } else { + // declare export default [type]; + flowParseType(); + semicolon(); + } + } else if ( + match(tt._var) || // declare export var ... + match(tt._function) || // declare export function ... + match(tt._class) || // declare export class ... + isContextual(ContextualKeyword._opaque) // declare export opaque .. + ) { + flowParseDeclare(); + } else if ( + match(tt.star) || // declare export * from '' + match(tt.braceL) || // declare export {} ... + isContextual(ContextualKeyword._interface) || // declare export interface ... + isContextual(ContextualKeyword._type) || // declare export type ... + isContextual(ContextualKeyword._opaque) // declare export opaque type ... + ) { + parseExport(); + } else { + unexpected(); + } +} + +function flowParseDeclareModuleExports() { + expectContextual(ContextualKeyword._exports); + flowParseTypeAnnotation(); + semicolon(); +} + +function flowParseDeclareTypeAlias() { + next(); + flowParseTypeAlias(); +} + +function flowParseDeclareOpaqueType() { + next(); + flowParseOpaqueType(true); +} + +function flowParseDeclareInterface() { + next(); + flowParseInterfaceish(); +} + +// Interfaces + +function flowParseInterfaceish(isClass = false) { + flowParseRestrictedIdentifier(); + + if (match(tt.lessThan)) { + flowParseTypeParameterDeclaration(); + } + + if (eat(tt._extends)) { + do { + flowParseInterfaceExtends(); + } while (!isClass && eat(tt.comma)); + } + + if (isContextual(ContextualKeyword._mixins)) { + next(); + do { + flowParseInterfaceExtends(); + } while (eat(tt.comma)); + } + + if (isContextual(ContextualKeyword._implements)) { + next(); + do { + flowParseInterfaceExtends(); + } while (eat(tt.comma)); + } + + flowParseObjectType(isClass, false, isClass); +} + +function flowParseInterfaceExtends() { + flowParseQualifiedTypeIdentifier(false); + if (match(tt.lessThan)) { + flowParseTypeParameterInstantiation(); + } +} + +function flowParseInterface() { + flowParseInterfaceish(); +} + +function flowParseRestrictedIdentifier() { + parseIdentifier(); +} + +function flowParseTypeAlias() { + flowParseRestrictedIdentifier(); + + if (match(tt.lessThan)) { + flowParseTypeParameterDeclaration(); + } + + flowParseTypeInitialiser(tt.eq); + semicolon(); +} + +function flowParseOpaqueType(declare) { + expectContextual(ContextualKeyword._type); + flowParseRestrictedIdentifier(); + + if (match(tt.lessThan)) { + flowParseTypeParameterDeclaration(); + } + + // Parse the supertype + if (match(tt.colon)) { + flowParseTypeInitialiser(tt.colon); + } + + if (!declare) { + flowParseTypeInitialiser(tt.eq); + } + semicolon(); +} + +function flowParseTypeParameter() { + flowParseVariance(); + flowParseTypeAnnotatableIdentifier(); + + if (eat(tt.eq)) { + flowParseType(); + } +} + +export function flowParseTypeParameterDeclaration() { + const oldIsType = pushTypeContext(0); + // istanbul ignore else: this condition is already checked at all call sites + if (match(tt.lessThan) || match(tt.typeParameterStart)) { + next(); + } else { + unexpected(); + } + + do { + flowParseTypeParameter(); + if (!match(tt.greaterThan)) { + expect(tt.comma); + } + } while (!match(tt.greaterThan) && !state.error); + expect(tt.greaterThan); + popTypeContext(oldIsType); +} + +function flowParseTypeParameterInstantiation() { + const oldIsType = pushTypeContext(0); + expect(tt.lessThan); + while (!match(tt.greaterThan) && !state.error) { + flowParseType(); + if (!match(tt.greaterThan)) { + expect(tt.comma); + } + } + expect(tt.greaterThan); + popTypeContext(oldIsType); +} + +function flowParseInterfaceType() { + expectContextual(ContextualKeyword._interface); + if (eat(tt._extends)) { + do { + flowParseInterfaceExtends(); + } while (eat(tt.comma)); + } + flowParseObjectType(false, false, false); +} + +function flowParseObjectPropertyKey() { + if (match(tt.num) || match(tt.string)) { + parseExprAtom(); + } else { + parseIdentifier(); + } +} + +function flowParseObjectTypeIndexer() { + // Note: bracketL has already been consumed + if (lookaheadType() === tt.colon) { + flowParseObjectPropertyKey(); + flowParseTypeInitialiser(); + } else { + flowParseType(); + } + expect(tt.bracketR); + flowParseTypeInitialiser(); +} + +function flowParseObjectTypeInternalSlot() { + // Note: both bracketL have already been consumed + flowParseObjectPropertyKey(); + expect(tt.bracketR); + expect(tt.bracketR); + if (match(tt.lessThan) || match(tt.parenL)) { + flowParseObjectTypeMethodish(); + } else { + eat(tt.question); + flowParseTypeInitialiser(); + } +} + +function flowParseObjectTypeMethodish() { + if (match(tt.lessThan)) { + flowParseTypeParameterDeclaration(); + } + + expect(tt.parenL); + while (!match(tt.parenR) && !match(tt.ellipsis) && !state.error) { + flowParseFunctionTypeParam(); + if (!match(tt.parenR)) { + expect(tt.comma); + } + } + + if (eat(tt.ellipsis)) { + flowParseFunctionTypeParam(); + } + expect(tt.parenR); + flowParseTypeInitialiser(); +} + +function flowParseObjectTypeCallProperty() { + flowParseObjectTypeMethodish(); +} + +function flowParseObjectType(allowStatic, allowExact, allowProto) { + let endDelim; + if (allowExact && match(tt.braceBarL)) { + expect(tt.braceBarL); + endDelim = tt.braceBarR; + } else { + expect(tt.braceL); + endDelim = tt.braceR; + } + + while (!match(endDelim) && !state.error) { + if (allowProto && isContextual(ContextualKeyword._proto)) { + const lookahead = lookaheadType(); + if (lookahead !== tt.colon && lookahead !== tt.question) { + next(); + allowStatic = false; + } + } + if (allowStatic && isContextual(ContextualKeyword._static)) { + const lookahead = lookaheadType(); + if (lookahead !== tt.colon && lookahead !== tt.question) { + next(); + } + } + + flowParseVariance(); + + if (eat(tt.bracketL)) { + if (eat(tt.bracketL)) { + flowParseObjectTypeInternalSlot(); + } else { + flowParseObjectTypeIndexer(); + } + } else if (match(tt.parenL) || match(tt.lessThan)) { + flowParseObjectTypeCallProperty(); + } else { + if (isContextual(ContextualKeyword._get) || isContextual(ContextualKeyword._set)) { + const lookahead = lookaheadType(); + if (lookahead === tt.name || lookahead === tt.string || lookahead === tt.num) { + next(); + } + } + + flowParseObjectTypeProperty(); + } + + flowObjectTypeSemicolon(); + } + + expect(endDelim); +} + +function flowParseObjectTypeProperty() { + if (match(tt.ellipsis)) { + expect(tt.ellipsis); + if (!eat(tt.comma)) { + eat(tt.semi); + } + // Explicit inexact object syntax. + if (match(tt.braceR)) { + return; + } + flowParseType(); + } else { + flowParseObjectPropertyKey(); + if (match(tt.lessThan) || match(tt.parenL)) { + // This is a method property + flowParseObjectTypeMethodish(); + } else { + eat(tt.question); + flowParseTypeInitialiser(); + } + } +} + +function flowObjectTypeSemicolon() { + if (!eat(tt.semi) && !eat(tt.comma) && !match(tt.braceR) && !match(tt.braceBarR)) { + unexpected(); + } +} + +function flowParseQualifiedTypeIdentifier(initialIdAlreadyParsed) { + if (!initialIdAlreadyParsed) { + parseIdentifier(); + } + while (eat(tt.dot)) { + parseIdentifier(); + } +} + +function flowParseGenericType() { + flowParseQualifiedTypeIdentifier(true); + if (match(tt.lessThan)) { + flowParseTypeParameterInstantiation(); + } +} + +function flowParseTypeofType() { + expect(tt._typeof); + flowParsePrimaryType(); +} + +function flowParseTupleType() { + expect(tt.bracketL); + // We allow trailing commas + while (state.pos < input.length && !match(tt.bracketR)) { + flowParseType(); + if (match(tt.bracketR)) { + break; + } + expect(tt.comma); + } + expect(tt.bracketR); +} + +function flowParseFunctionTypeParam() { + const lookahead = lookaheadType(); + if (lookahead === tt.colon || lookahead === tt.question) { + parseIdentifier(); + eat(tt.question); + flowParseTypeInitialiser(); + } else { + flowParseType(); + } +} + +function flowParseFunctionTypeParams() { + while (!match(tt.parenR) && !match(tt.ellipsis) && !state.error) { + flowParseFunctionTypeParam(); + if (!match(tt.parenR)) { + expect(tt.comma); + } + } + if (eat(tt.ellipsis)) { + flowParseFunctionTypeParam(); + } +} + +// The parsing of types roughly parallels the parsing of expressions, and +// primary types are kind of like primary expressions...they're the +// primitives with which other types are constructed. +function flowParsePrimaryType() { + let isGroupedType = false; + const oldNoAnonFunctionType = state.noAnonFunctionType; + + switch (state.type) { + case tt.name: { + if (isContextual(ContextualKeyword._interface)) { + flowParseInterfaceType(); + return; + } + parseIdentifier(); + flowParseGenericType(); + return; + } + + case tt.braceL: + flowParseObjectType(false, false, false); + return; + + case tt.braceBarL: + flowParseObjectType(false, true, false); + return; + + case tt.bracketL: + flowParseTupleType(); + return; + + case tt.lessThan: + flowParseTypeParameterDeclaration(); + expect(tt.parenL); + flowParseFunctionTypeParams(); + expect(tt.parenR); + expect(tt.arrow); + flowParseType(); + return; + + case tt.parenL: + next(); + + // Check to see if this is actually a grouped type + if (!match(tt.parenR) && !match(tt.ellipsis)) { + if (match(tt.name)) { + const token = lookaheadType(); + isGroupedType = token !== tt.question && token !== tt.colon; + } else { + isGroupedType = true; + } + } + + if (isGroupedType) { + state.noAnonFunctionType = false; + flowParseType(); + state.noAnonFunctionType = oldNoAnonFunctionType; + + // A `,` or a `) =>` means this is an anonymous function type + if ( + state.noAnonFunctionType || + !(match(tt.comma) || (match(tt.parenR) && lookaheadType() === tt.arrow)) + ) { + expect(tt.parenR); + return; + } else { + // Eat a comma if there is one + eat(tt.comma); + } + } + + flowParseFunctionTypeParams(); + + expect(tt.parenR); + expect(tt.arrow); + flowParseType(); + return; + + case tt.minus: + next(); + parseLiteral(); + return; + + case tt.string: + case tt.num: + case tt._true: + case tt._false: + case tt._null: + case tt._this: + case tt._void: + case tt.star: + next(); + return; + + default: + if (state.type === tt._typeof) { + flowParseTypeofType(); + return; + } else if (state.type & TokenType.IS_KEYWORD) { + next(); + state.tokens[state.tokens.length - 1].type = tt.name; + return; + } + } + + unexpected(); +} + +function flowParsePostfixType() { + flowParsePrimaryType(); + while (!canInsertSemicolon() && (match(tt.bracketL) || match(tt.questionDot))) { + eat(tt.questionDot); + expect(tt.bracketL); + if (eat(tt.bracketR)) { + // Array type + } else { + // Indexed access type + flowParseType(); + expect(tt.bracketR); + } + } +} + +function flowParsePrefixType() { + if (eat(tt.question)) { + flowParsePrefixType(); + } else { + flowParsePostfixType(); + } +} + +function flowParseAnonFunctionWithoutParens() { + flowParsePrefixType(); + if (!state.noAnonFunctionType && eat(tt.arrow)) { + flowParseType(); + } +} + +function flowParseIntersectionType() { + eat(tt.bitwiseAND); + flowParseAnonFunctionWithoutParens(); + while (eat(tt.bitwiseAND)) { + flowParseAnonFunctionWithoutParens(); + } +} + +function flowParseUnionType() { + eat(tt.bitwiseOR); + flowParseIntersectionType(); + while (eat(tt.bitwiseOR)) { + flowParseIntersectionType(); + } +} + +function flowParseType() { + flowParseUnionType(); +} + +export function flowParseTypeAnnotation() { + flowParseTypeInitialiser(); +} + +function flowParseTypeAnnotatableIdentifier() { + parseIdentifier(); + if (match(tt.colon)) { + flowParseTypeAnnotation(); + } +} + +export function flowParseVariance() { + if (match(tt.plus) || match(tt.minus)) { + next(); + state.tokens[state.tokens.length - 1].isType = true; + } +} + +// ================================== +// Overrides +// ================================== + +export function flowParseFunctionBodyAndFinish(funcContextId) { + // For arrow functions, `parseArrow` handles the return type itself. + if (match(tt.colon)) { + flowParseTypeAndPredicateInitialiser(); + } + + parseFunctionBody(false, funcContextId); +} + +export function flowParseSubscript( + startTokenIndex, + noCalls, + stopState, +) { + if (match(tt.questionDot) && lookaheadType() === tt.lessThan) { + if (noCalls) { + stopState.stop = true; + return; + } + next(); + flowParseTypeParameterInstantiation(); + expect(tt.parenL); + parseCallExpressionArguments(); + return; + } else if (!noCalls && match(tt.lessThan)) { + const snapshot = state.snapshot(); + flowParseTypeParameterInstantiation(); + expect(tt.parenL); + parseCallExpressionArguments(); + if (state.error) { + state.restoreFromSnapshot(snapshot); + } else { + return; + } + } + baseParseSubscript(startTokenIndex, noCalls, stopState); +} + +export function flowStartParseNewArguments() { + if (match(tt.lessThan)) { + const snapshot = state.snapshot(); + flowParseTypeParameterInstantiation(); + if (state.error) { + state.restoreFromSnapshot(snapshot); + } + } +} + +// interfaces +export function flowTryParseStatement() { + if (match(tt.name) && state.contextualKeyword === ContextualKeyword._interface) { + const oldIsType = pushTypeContext(0); + next(); + flowParseInterface(); + popTypeContext(oldIsType); + return true; + } else if (isContextual(ContextualKeyword._enum)) { + flowParseEnumDeclaration(); + return true; + } + return false; +} + +export function flowTryParseExportDefaultExpression() { + if (isContextual(ContextualKeyword._enum)) { + flowParseEnumDeclaration(); + return true; + } + return false; +} + +// declares, interfaces and type aliases +export function flowParseIdentifierStatement(contextualKeyword) { + if (contextualKeyword === ContextualKeyword._declare) { + if ( + match(tt._class) || + match(tt.name) || + match(tt._function) || + match(tt._var) || + match(tt._export) + ) { + const oldIsType = pushTypeContext(1); + flowParseDeclare(); + popTypeContext(oldIsType); + } + } else if (match(tt.name)) { + if (contextualKeyword === ContextualKeyword._interface) { + const oldIsType = pushTypeContext(1); + flowParseInterface(); + popTypeContext(oldIsType); + } else if (contextualKeyword === ContextualKeyword._type) { + const oldIsType = pushTypeContext(1); + flowParseTypeAlias(); + popTypeContext(oldIsType); + } else if (contextualKeyword === ContextualKeyword._opaque) { + const oldIsType = pushTypeContext(1); + flowParseOpaqueType(false); + popTypeContext(oldIsType); + } + } + semicolon(); +} + +// export type +export function flowShouldParseExportDeclaration() { + return ( + isContextual(ContextualKeyword._type) || + isContextual(ContextualKeyword._interface) || + isContextual(ContextualKeyword._opaque) || + isContextual(ContextualKeyword._enum) + ); +} + +export function flowShouldDisallowExportDefaultSpecifier() { + return ( + match(tt.name) && + (state.contextualKeyword === ContextualKeyword._type || + state.contextualKeyword === ContextualKeyword._interface || + state.contextualKeyword === ContextualKeyword._opaque || + state.contextualKeyword === ContextualKeyword._enum) + ); +} + +export function flowParseExportDeclaration() { + if (isContextual(ContextualKeyword._type)) { + const oldIsType = pushTypeContext(1); + next(); + + if (match(tt.braceL)) { + // export type { foo, bar }; + parseExportSpecifiers(); + parseExportFrom(); + } else { + // export type Foo = Bar; + flowParseTypeAlias(); + } + popTypeContext(oldIsType); + } else if (isContextual(ContextualKeyword._opaque)) { + const oldIsType = pushTypeContext(1); + next(); + // export opaque type Foo = Bar; + flowParseOpaqueType(false); + popTypeContext(oldIsType); + } else if (isContextual(ContextualKeyword._interface)) { + const oldIsType = pushTypeContext(1); + next(); + flowParseInterface(); + popTypeContext(oldIsType); + } else { + parseStatement(true); + } +} + +export function flowShouldParseExportStar() { + return match(tt.star) || (isContextual(ContextualKeyword._type) && lookaheadType() === tt.star); +} + +export function flowParseExportStar() { + if (eatContextual(ContextualKeyword._type)) { + const oldIsType = pushTypeContext(2); + baseParseExportStar(); + popTypeContext(oldIsType); + } else { + baseParseExportStar(); + } +} + +// parse a the super class type parameters and implements +export function flowAfterParseClassSuper(hasSuper) { + if (hasSuper && match(tt.lessThan)) { + flowParseTypeParameterInstantiation(); + } + if (isContextual(ContextualKeyword._implements)) { + const oldIsType = pushTypeContext(0); + next(); + state.tokens[state.tokens.length - 1].type = tt._implements; + do { + flowParseRestrictedIdentifier(); + if (match(tt.lessThan)) { + flowParseTypeParameterInstantiation(); + } + } while (eat(tt.comma)); + popTypeContext(oldIsType); + } +} + +// parse type parameters for object method shorthand +export function flowStartParseObjPropValue() { + // method shorthand + if (match(tt.lessThan)) { + flowParseTypeParameterDeclaration(); + if (!match(tt.parenL)) unexpected(); + } +} + +export function flowParseAssignableListItemTypes() { + const oldIsType = pushTypeContext(0); + eat(tt.question); + if (match(tt.colon)) { + flowParseTypeAnnotation(); + } + popTypeContext(oldIsType); +} + +// parse typeof and type imports +export function flowStartParseImportSpecifiers() { + if (match(tt._typeof) || isContextual(ContextualKeyword._type)) { + const lh = lookaheadTypeAndKeyword(); + if (isMaybeDefaultImport(lh) || lh.type === tt.braceL || lh.type === tt.star) { + next(); + } + } +} + +// parse import-type/typeof shorthand +export function flowParseImportSpecifier() { + const isTypeKeyword = + state.contextualKeyword === ContextualKeyword._type || state.type === tt._typeof; + if (isTypeKeyword) { + next(); + } else { + parseIdentifier(); + } + + if (isContextual(ContextualKeyword._as) && !isLookaheadContextual(ContextualKeyword._as)) { + parseIdentifier(); + if (isTypeKeyword && !match(tt.name) && !(state.type & TokenType.IS_KEYWORD)) { + // `import {type as ,` or `import {type as }` + } else { + // `import {type as foo` + parseIdentifier(); + } + } else { + if (isTypeKeyword && (match(tt.name) || !!(state.type & TokenType.IS_KEYWORD))) { + // `import {type foo` + parseIdentifier(); + } + if (eatContextual(ContextualKeyword._as)) { + parseIdentifier(); + } + } +} + +// parse function type parameters - function foo() {} +export function flowStartParseFunctionParams() { + // Originally this checked if the method is a getter/setter, but if it was, we'd crash soon + // anyway, so don't try to propagate that information. + if (match(tt.lessThan)) { + const oldIsType = pushTypeContext(0); + flowParseTypeParameterDeclaration(); + popTypeContext(oldIsType); + } +} + +// parse flow type annotations on variable declarator heads - let foo: string = bar +export function flowAfterParseVarHead() { + if (match(tt.colon)) { + flowParseTypeAnnotation(); + } +} + +// parse the return type of an async arrow function - let foo = (async (): number => {}); +export function flowStartParseAsyncArrowFromCallExpression() { + if (match(tt.colon)) { + const oldNoAnonFunctionType = state.noAnonFunctionType; + state.noAnonFunctionType = true; + flowParseTypeAnnotation(); + state.noAnonFunctionType = oldNoAnonFunctionType; + } +} + +// We need to support type parameter declarations for arrow functions. This +// is tricky. There are three situations we need to handle +// +// 1. This is either JSX or an arrow function. We'll try JSX first. If that +// fails, we'll try an arrow function. If that fails, we'll throw the JSX +// error. +// 2. This is an arrow function. We'll parse the type parameter declaration, +// parse the rest, make sure the rest is an arrow function, and go from +// there +// 3. This is neither. Just call the super method +export function flowParseMaybeAssign(noIn, isWithinParens) { + if (match(tt.lessThan)) { + const snapshot = state.snapshot(); + let wasArrow = baseParseMaybeAssign(noIn, isWithinParens); + if (state.error) { + state.restoreFromSnapshot(snapshot); + state.type = tt.typeParameterStart; + } else { + return wasArrow; + } + + const oldIsType = pushTypeContext(0); + flowParseTypeParameterDeclaration(); + popTypeContext(oldIsType); + wasArrow = baseParseMaybeAssign(noIn, isWithinParens); + if (wasArrow) { + return true; + } + unexpected(); + } + + return baseParseMaybeAssign(noIn, isWithinParens); +} + +// handle return types for arrow functions +export function flowParseArrow() { + if (match(tt.colon)) { + const oldIsType = pushTypeContext(0); + const snapshot = state.snapshot(); + + const oldNoAnonFunctionType = state.noAnonFunctionType; + state.noAnonFunctionType = true; + flowParseTypeAndPredicateInitialiser(); + state.noAnonFunctionType = oldNoAnonFunctionType; + + if (canInsertSemicolon()) unexpected(); + if (!match(tt.arrow)) unexpected(); + + if (state.error) { + state.restoreFromSnapshot(snapshot); + } + popTypeContext(oldIsType); + } + return eat(tt.arrow); +} + +export function flowParseSubscripts(startTokenIndex, noCalls = false) { + if ( + state.tokens[state.tokens.length - 1].contextualKeyword === ContextualKeyword._async && + match(tt.lessThan) + ) { + const snapshot = state.snapshot(); + const wasArrow = parseAsyncArrowWithTypeParameters(); + if (wasArrow && !state.error) { + return; + } + state.restoreFromSnapshot(snapshot); + } + + baseParseSubscripts(startTokenIndex, noCalls); +} + +// Returns true if there was an arrow function here. +function parseAsyncArrowWithTypeParameters() { + state.scopeDepth++; + const startTokenIndex = state.tokens.length; + parseFunctionParams(); + if (!parseArrow()) { + return false; + } + parseArrowExpression(startTokenIndex); + return true; +} + +function flowParseEnumDeclaration() { + expectContextual(ContextualKeyword._enum); + state.tokens[state.tokens.length - 1].type = tt._enum; + parseIdentifier(); + flowParseEnumBody(); +} + +function flowParseEnumBody() { + if (eatContextual(ContextualKeyword._of)) { + next(); + } + expect(tt.braceL); + flowParseEnumMembers(); + expect(tt.braceR); +} + +function flowParseEnumMembers() { + while (!match(tt.braceR) && !state.error) { + if (eat(tt.ellipsis)) { + break; + } + flowParseEnumMember(); + if (!match(tt.braceR)) { + expect(tt.comma); + } + } +} + +function flowParseEnumMember() { + parseIdentifier(); + if (eat(tt.eq)) { + // Flow enum values are always just one token (a string, number, or boolean literal). + next(); + } +} diff --git a/node_modules/sucrase/dist/esm/parser/plugins/jsx/index.js b/node_modules/sucrase/dist/esm/parser/plugins/jsx/index.js new file mode 100644 index 0000000..83f3983 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/plugins/jsx/index.js @@ -0,0 +1,367 @@ +import { + eat, + finishToken, + getTokenFromCode, + IdentifierRole, + JSXRole, + match, + next, + skipSpace, + Token, +} from "../../tokenizer/index"; +import {TokenType as tt} from "../../tokenizer/types"; +import {input, isTypeScriptEnabled, state} from "../../traverser/base"; +import {parseExpression, parseMaybeAssign} from "../../traverser/expression"; +import {expect, unexpected} from "../../traverser/util"; +import {charCodes} from "../../util/charcodes"; +import {IS_IDENTIFIER_CHAR, IS_IDENTIFIER_START} from "../../util/identifier"; +import {tsTryParseJSXTypeArgument} from "../typescript"; + +/** + * Read token with JSX contents. + * + * In addition to detecting jsxTagStart and also regular tokens that might be + * part of an expression, this code detects the start and end of text ranges + * within JSX children. In order to properly count the number of children, we + * distinguish jsxText from jsxEmptyText, which is a text range that simplifies + * to the empty string after JSX whitespace trimming. + * + * It turns out that a JSX text range will simplify to the empty string if and + * only if both of these conditions hold: + * - The range consists entirely of whitespace characters (only counting space, + * tab, \r, and \n). + * - The range has at least one newline. + * This can be proven by analyzing any implementation of whitespace trimming, + * e.g. formatJSXTextLiteral in Sucrase or cleanJSXElementLiteralChild in Babel. + */ +function jsxReadToken() { + let sawNewline = false; + let sawNonWhitespace = false; + while (true) { + if (state.pos >= input.length) { + unexpected("Unterminated JSX contents"); + return; + } + + const ch = input.charCodeAt(state.pos); + if (ch === charCodes.lessThan || ch === charCodes.leftCurlyBrace) { + if (state.pos === state.start) { + if (ch === charCodes.lessThan) { + state.pos++; + finishToken(tt.jsxTagStart); + return; + } + getTokenFromCode(ch); + return; + } + if (sawNewline && !sawNonWhitespace) { + finishToken(tt.jsxEmptyText); + } else { + finishToken(tt.jsxText); + } + return; + } + + // This is part of JSX text. + if (ch === charCodes.lineFeed) { + sawNewline = true; + } else if (ch !== charCodes.space && ch !== charCodes.carriageReturn && ch !== charCodes.tab) { + sawNonWhitespace = true; + } + state.pos++; + } +} + +function jsxReadString(quote) { + state.pos++; + for (;;) { + if (state.pos >= input.length) { + unexpected("Unterminated string constant"); + return; + } + + const ch = input.charCodeAt(state.pos); + if (ch === quote) { + state.pos++; + break; + } + state.pos++; + } + finishToken(tt.string); +} + +// Read a JSX identifier (valid tag or attribute name). +// +// Optimized version since JSX identifiers can't contain +// escape characters and so can be read as single slice. +// Also assumes that first character was already checked +// by isIdentifierStart in readToken. + +function jsxReadWord() { + let ch; + do { + if (state.pos > input.length) { + unexpected("Unexpectedly reached the end of input."); + return; + } + ch = input.charCodeAt(++state.pos); + } while (IS_IDENTIFIER_CHAR[ch] || ch === charCodes.dash); + finishToken(tt.jsxName); +} + +// Parse next token as JSX identifier +function jsxParseIdentifier() { + nextJSXTagToken(); +} + +// Parse namespaced identifier. +function jsxParseNamespacedName(identifierRole) { + jsxParseIdentifier(); + if (!eat(tt.colon)) { + // Plain identifier, so this is an access. + state.tokens[state.tokens.length - 1].identifierRole = identifierRole; + return; + } + // Process the second half of the namespaced name. + jsxParseIdentifier(); +} + +// Parses element name in any form - namespaced, member +// or single identifier. +function jsxParseElementName() { + const firstTokenIndex = state.tokens.length; + jsxParseNamespacedName(IdentifierRole.Access); + let hadDot = false; + while (match(tt.dot)) { + hadDot = true; + nextJSXTagToken(); + jsxParseIdentifier(); + } + // For tags like
with a lowercase letter and no dots, the name is + // actually *not* an identifier access, since it's referring to a built-in + // tag name. Remove the identifier role in this case so that it's not + // accidentally transformed by the imports transform when preserving JSX. + if (!hadDot) { + const firstToken = state.tokens[firstTokenIndex]; + const firstChar = input.charCodeAt(firstToken.start); + if (firstChar >= charCodes.lowercaseA && firstChar <= charCodes.lowercaseZ) { + firstToken.identifierRole = null; + } + } +} + +// Parses any type of JSX attribute value. +function jsxParseAttributeValue() { + switch (state.type) { + case tt.braceL: + next(); + parseExpression(); + nextJSXTagToken(); + return; + + case tt.jsxTagStart: + jsxParseElement(); + nextJSXTagToken(); + return; + + case tt.string: + nextJSXTagToken(); + return; + + default: + unexpected("JSX value should be either an expression or a quoted JSX text"); + } +} + +// Parse JSX spread child, after already processing the { +// Does not parse the closing } +function jsxParseSpreadChild() { + expect(tt.ellipsis); + parseExpression(); +} + +// Parses JSX opening tag starting after "<". +// Returns true if the tag was self-closing. +// Does not parse the last token. +function jsxParseOpeningElement(initialTokenIndex) { + if (match(tt.jsxTagEnd)) { + // This is an open-fragment. + return false; + } + jsxParseElementName(); + if (isTypeScriptEnabled) { + tsTryParseJSXTypeArgument(); + } + let hasSeenPropSpread = false; + while (!match(tt.slash) && !match(tt.jsxTagEnd) && !state.error) { + if (eat(tt.braceL)) { + hasSeenPropSpread = true; + expect(tt.ellipsis); + parseMaybeAssign(); + // } + nextJSXTagToken(); + continue; + } + if ( + hasSeenPropSpread && + state.end - state.start === 3 && + input.charCodeAt(state.start) === charCodes.lowercaseK && + input.charCodeAt(state.start + 1) === charCodes.lowercaseE && + input.charCodeAt(state.start + 2) === charCodes.lowercaseY + ) { + state.tokens[initialTokenIndex].jsxRole = JSXRole.KeyAfterPropSpread; + } + jsxParseNamespacedName(IdentifierRole.ObjectKey); + if (match(tt.eq)) { + nextJSXTagToken(); + jsxParseAttributeValue(); + } + } + const isSelfClosing = match(tt.slash); + if (isSelfClosing) { + // / + nextJSXTagToken(); + } + return isSelfClosing; +} + +// Parses JSX closing tag starting after " 1) { + state.tokens[initialTokenIndex].jsxRole = JSXRole.StaticChildren; + } + } + return; + } + numExplicitChildren++; + jsxParseElementAt(); + nextJSXExprToken(); + break; + + case tt.jsxText: + numExplicitChildren++; + nextJSXExprToken(); + break; + + case tt.jsxEmptyText: + nextJSXExprToken(); + break; + + case tt.braceL: + next(); + if (match(tt.ellipsis)) { + jsxParseSpreadChild(); + nextJSXExprToken(); + // Spread children are a mechanism to explicitly mark children as + // static, so count it as 2 children to satisfy the "more than one + // child" condition. + numExplicitChildren += 2; + } else { + // If we see {}, this is an empty pseudo-expression that doesn't + // count as a child. + if (!match(tt.braceR)) { + numExplicitChildren++; + parseExpression(); + } + nextJSXExprToken(); + } + + break; + + // istanbul ignore next - should never happen + default: + unexpected(); + return; + } + } + } +} + +// Parses entire JSX element from current position. +// Does not parse the last token. +export function jsxParseElement() { + nextJSXTagToken(); + jsxParseElementAt(); +} + +// ================================== +// Overrides +// ================================== + +export function nextJSXTagToken() { + state.tokens.push(new Token()); + skipSpace(); + state.start = state.pos; + const code = input.charCodeAt(state.pos); + + if (IS_IDENTIFIER_START[code]) { + jsxReadWord(); + } else if (code === charCodes.quotationMark || code === charCodes.apostrophe) { + jsxReadString(code); + } else { + // The following tokens are just one character each. + ++state.pos; + switch (code) { + case charCodes.greaterThan: + finishToken(tt.jsxTagEnd); + break; + case charCodes.lessThan: + finishToken(tt.jsxTagStart); + break; + case charCodes.slash: + finishToken(tt.slash); + break; + case charCodes.equalsTo: + finishToken(tt.eq); + break; + case charCodes.leftCurlyBrace: + finishToken(tt.braceL); + break; + case charCodes.dot: + finishToken(tt.dot); + break; + case charCodes.colon: + finishToken(tt.colon); + break; + default: + unexpected(); + } + } +} + +function nextJSXExprToken() { + state.tokens.push(new Token()); + state.start = state.pos; + jsxReadToken(); +} diff --git a/node_modules/sucrase/dist/esm/parser/plugins/jsx/xhtml.js b/node_modules/sucrase/dist/esm/parser/plugins/jsx/xhtml.js new file mode 100644 index 0000000..c6a0741 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/plugins/jsx/xhtml.js @@ -0,0 +1,256 @@ +// Use a Map rather than object to avoid unexpected __proto__ access. +export default new Map([ + ["quot", "\u0022"], + ["amp", "&"], + ["apos", "\u0027"], + ["lt", "<"], + ["gt", ">"], + ["nbsp", "\u00A0"], + ["iexcl", "\u00A1"], + ["cent", "\u00A2"], + ["pound", "\u00A3"], + ["curren", "\u00A4"], + ["yen", "\u00A5"], + ["brvbar", "\u00A6"], + ["sect", "\u00A7"], + ["uml", "\u00A8"], + ["copy", "\u00A9"], + ["ordf", "\u00AA"], + ["laquo", "\u00AB"], + ["not", "\u00AC"], + ["shy", "\u00AD"], + ["reg", "\u00AE"], + ["macr", "\u00AF"], + ["deg", "\u00B0"], + ["plusmn", "\u00B1"], + ["sup2", "\u00B2"], + ["sup3", "\u00B3"], + ["acute", "\u00B4"], + ["micro", "\u00B5"], + ["para", "\u00B6"], + ["middot", "\u00B7"], + ["cedil", "\u00B8"], + ["sup1", "\u00B9"], + ["ordm", "\u00BA"], + ["raquo", "\u00BB"], + ["frac14", "\u00BC"], + ["frac12", "\u00BD"], + ["frac34", "\u00BE"], + ["iquest", "\u00BF"], + ["Agrave", "\u00C0"], + ["Aacute", "\u00C1"], + ["Acirc", "\u00C2"], + ["Atilde", "\u00C3"], + ["Auml", "\u00C4"], + ["Aring", "\u00C5"], + ["AElig", "\u00C6"], + ["Ccedil", "\u00C7"], + ["Egrave", "\u00C8"], + ["Eacute", "\u00C9"], + ["Ecirc", "\u00CA"], + ["Euml", "\u00CB"], + ["Igrave", "\u00CC"], + ["Iacute", "\u00CD"], + ["Icirc", "\u00CE"], + ["Iuml", "\u00CF"], + ["ETH", "\u00D0"], + ["Ntilde", "\u00D1"], + ["Ograve", "\u00D2"], + ["Oacute", "\u00D3"], + ["Ocirc", "\u00D4"], + ["Otilde", "\u00D5"], + ["Ouml", "\u00D6"], + ["times", "\u00D7"], + ["Oslash", "\u00D8"], + ["Ugrave", "\u00D9"], + ["Uacute", "\u00DA"], + ["Ucirc", "\u00DB"], + ["Uuml", "\u00DC"], + ["Yacute", "\u00DD"], + ["THORN", "\u00DE"], + ["szlig", "\u00DF"], + ["agrave", "\u00E0"], + ["aacute", "\u00E1"], + ["acirc", "\u00E2"], + ["atilde", "\u00E3"], + ["auml", "\u00E4"], + ["aring", "\u00E5"], + ["aelig", "\u00E6"], + ["ccedil", "\u00E7"], + ["egrave", "\u00E8"], + ["eacute", "\u00E9"], + ["ecirc", "\u00EA"], + ["euml", "\u00EB"], + ["igrave", "\u00EC"], + ["iacute", "\u00ED"], + ["icirc", "\u00EE"], + ["iuml", "\u00EF"], + ["eth", "\u00F0"], + ["ntilde", "\u00F1"], + ["ograve", "\u00F2"], + ["oacute", "\u00F3"], + ["ocirc", "\u00F4"], + ["otilde", "\u00F5"], + ["ouml", "\u00F6"], + ["divide", "\u00F7"], + ["oslash", "\u00F8"], + ["ugrave", "\u00F9"], + ["uacute", "\u00FA"], + ["ucirc", "\u00FB"], + ["uuml", "\u00FC"], + ["yacute", "\u00FD"], + ["thorn", "\u00FE"], + ["yuml", "\u00FF"], + ["OElig", "\u0152"], + ["oelig", "\u0153"], + ["Scaron", "\u0160"], + ["scaron", "\u0161"], + ["Yuml", "\u0178"], + ["fnof", "\u0192"], + ["circ", "\u02C6"], + ["tilde", "\u02DC"], + ["Alpha", "\u0391"], + ["Beta", "\u0392"], + ["Gamma", "\u0393"], + ["Delta", "\u0394"], + ["Epsilon", "\u0395"], + ["Zeta", "\u0396"], + ["Eta", "\u0397"], + ["Theta", "\u0398"], + ["Iota", "\u0399"], + ["Kappa", "\u039A"], + ["Lambda", "\u039B"], + ["Mu", "\u039C"], + ["Nu", "\u039D"], + ["Xi", "\u039E"], + ["Omicron", "\u039F"], + ["Pi", "\u03A0"], + ["Rho", "\u03A1"], + ["Sigma", "\u03A3"], + ["Tau", "\u03A4"], + ["Upsilon", "\u03A5"], + ["Phi", "\u03A6"], + ["Chi", "\u03A7"], + ["Psi", "\u03A8"], + ["Omega", "\u03A9"], + ["alpha", "\u03B1"], + ["beta", "\u03B2"], + ["gamma", "\u03B3"], + ["delta", "\u03B4"], + ["epsilon", "\u03B5"], + ["zeta", "\u03B6"], + ["eta", "\u03B7"], + ["theta", "\u03B8"], + ["iota", "\u03B9"], + ["kappa", "\u03BA"], + ["lambda", "\u03BB"], + ["mu", "\u03BC"], + ["nu", "\u03BD"], + ["xi", "\u03BE"], + ["omicron", "\u03BF"], + ["pi", "\u03C0"], + ["rho", "\u03C1"], + ["sigmaf", "\u03C2"], + ["sigma", "\u03C3"], + ["tau", "\u03C4"], + ["upsilon", "\u03C5"], + ["phi", "\u03C6"], + ["chi", "\u03C7"], + ["psi", "\u03C8"], + ["omega", "\u03C9"], + ["thetasym", "\u03D1"], + ["upsih", "\u03D2"], + ["piv", "\u03D6"], + ["ensp", "\u2002"], + ["emsp", "\u2003"], + ["thinsp", "\u2009"], + ["zwnj", "\u200C"], + ["zwj", "\u200D"], + ["lrm", "\u200E"], + ["rlm", "\u200F"], + ["ndash", "\u2013"], + ["mdash", "\u2014"], + ["lsquo", "\u2018"], + ["rsquo", "\u2019"], + ["sbquo", "\u201A"], + ["ldquo", "\u201C"], + ["rdquo", "\u201D"], + ["bdquo", "\u201E"], + ["dagger", "\u2020"], + ["Dagger", "\u2021"], + ["bull", "\u2022"], + ["hellip", "\u2026"], + ["permil", "\u2030"], + ["prime", "\u2032"], + ["Prime", "\u2033"], + ["lsaquo", "\u2039"], + ["rsaquo", "\u203A"], + ["oline", "\u203E"], + ["frasl", "\u2044"], + ["euro", "\u20AC"], + ["image", "\u2111"], + ["weierp", "\u2118"], + ["real", "\u211C"], + ["trade", "\u2122"], + ["alefsym", "\u2135"], + ["larr", "\u2190"], + ["uarr", "\u2191"], + ["rarr", "\u2192"], + ["darr", "\u2193"], + ["harr", "\u2194"], + ["crarr", "\u21B5"], + ["lArr", "\u21D0"], + ["uArr", "\u21D1"], + ["rArr", "\u21D2"], + ["dArr", "\u21D3"], + ["hArr", "\u21D4"], + ["forall", "\u2200"], + ["part", "\u2202"], + ["exist", "\u2203"], + ["empty", "\u2205"], + ["nabla", "\u2207"], + ["isin", "\u2208"], + ["notin", "\u2209"], + ["ni", "\u220B"], + ["prod", "\u220F"], + ["sum", "\u2211"], + ["minus", "\u2212"], + ["lowast", "\u2217"], + ["radic", "\u221A"], + ["prop", "\u221D"], + ["infin", "\u221E"], + ["ang", "\u2220"], + ["and", "\u2227"], + ["or", "\u2228"], + ["cap", "\u2229"], + ["cup", "\u222A"], + ["int", "\u222B"], + ["there4", "\u2234"], + ["sim", "\u223C"], + ["cong", "\u2245"], + ["asymp", "\u2248"], + ["ne", "\u2260"], + ["equiv", "\u2261"], + ["le", "\u2264"], + ["ge", "\u2265"], + ["sub", "\u2282"], + ["sup", "\u2283"], + ["nsub", "\u2284"], + ["sube", "\u2286"], + ["supe", "\u2287"], + ["oplus", "\u2295"], + ["otimes", "\u2297"], + ["perp", "\u22A5"], + ["sdot", "\u22C5"], + ["lceil", "\u2308"], + ["rceil", "\u2309"], + ["lfloor", "\u230A"], + ["rfloor", "\u230B"], + ["lang", "\u2329"], + ["rang", "\u232A"], + ["loz", "\u25CA"], + ["spades", "\u2660"], + ["clubs", "\u2663"], + ["hearts", "\u2665"], + ["diams", "\u2666"], +]); diff --git a/node_modules/sucrase/dist/esm/parser/plugins/types.js b/node_modules/sucrase/dist/esm/parser/plugins/types.js new file mode 100644 index 0000000..78e4af4 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/plugins/types.js @@ -0,0 +1,37 @@ +import {eatTypeToken, lookaheadType, match} from "../tokenizer/index"; +import {TokenType as tt} from "../tokenizer/types"; +import {isFlowEnabled, isTypeScriptEnabled} from "../traverser/base"; +import {baseParseConditional} from "../traverser/expression"; +import {flowParseTypeAnnotation} from "./flow"; +import {tsParseTypeAnnotation} from "./typescript"; + +/** + * Common parser code for TypeScript and Flow. + */ + +// An apparent conditional expression could actually be an optional parameter in an arrow function. +export function typedParseConditional(noIn) { + // If we see ?:, this can't possibly be a valid conditional. typedParseParenItem will be called + // later to finish off the arrow parameter. We also need to handle bare ? tokens for optional + // parameters without type annotations, i.e. ?, and ?) . + if (match(tt.question)) { + const nextType = lookaheadType(); + if (nextType === tt.colon || nextType === tt.comma || nextType === tt.parenR) { + return; + } + } + baseParseConditional(noIn); +} + +// Note: These "type casts" are *not* valid TS expressions. +// But we parse them here and change them when completing the arrow function. +export function typedParseParenItem() { + eatTypeToken(tt.question); + if (match(tt.colon)) { + if (isTypeScriptEnabled) { + tsParseTypeAnnotation(); + } else if (isFlowEnabled) { + flowParseTypeAnnotation(); + } + } +} diff --git a/node_modules/sucrase/dist/esm/parser/plugins/typescript.js b/node_modules/sucrase/dist/esm/parser/plugins/typescript.js new file mode 100644 index 0000000..f64ca67 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/plugins/typescript.js @@ -0,0 +1,1632 @@ +import { + eat, + finishToken, + IdentifierRole, + lookaheadType, + lookaheadTypeAndKeyword, + match, + next, + nextTemplateToken, + popTypeContext, + pushTypeContext, + rescan_gt, +} from "../tokenizer/index"; +import {ContextualKeyword} from "../tokenizer/keywords"; +import {TokenType, TokenType as tt} from "../tokenizer/types"; +import {isJSXEnabled, state} from "../traverser/base"; +import { + atPossibleAsync, + baseParseMaybeAssign, + baseParseSubscript, + parseCallExpressionArguments, + parseExprAtom, + parseExpression, + parseFunctionBody, + parseIdentifier, + parseLiteral, + parseMaybeAssign, + parseMaybeUnary, + parsePropertyName, + parseTemplate, + +} from "../traverser/expression"; +import {parseBindingIdentifier, parseBindingList, parseImportedIdentifier} from "../traverser/lval"; +import { + baseParseMaybeDecoratorArguments, + parseBlockBody, + parseClass, + parseFunction, + parseFunctionParams, + parseStatement, + parseVarStatement, +} from "../traverser/statement"; +import { + canInsertSemicolon, + eatContextual, + expect, + expectContextual, + hasPrecedingLineBreak, + isContextual, + isLineTerminator, + isLookaheadContextual, + semicolon, + unexpected, +} from "../traverser/util"; +import {nextJSXTagToken} from "./jsx"; + +function tsIsIdentifier() { + // TODO: actually a bit more complex in TypeScript, but shouldn't matter. + // See https://github.com/Microsoft/TypeScript/issues/15008 + return match(tt.name); +} + +function isLiteralPropertyName() { + return ( + match(tt.name) || + Boolean(state.type & TokenType.IS_KEYWORD) || + match(tt.string) || + match(tt.num) || + match(tt.bigint) || + match(tt.decimal) + ); +} + +function tsNextTokenCanFollowModifier() { + // Note: TypeScript's implementation is much more complicated because + // more things are considered modifiers there. + // This implementation only handles modifiers not handled by babylon itself. And "static". + // TODO: Would be nice to avoid lookahead. Want a hasLineBreakUpNext() method... + const snapshot = state.snapshot(); + + next(); + const canFollowModifier = + (match(tt.bracketL) || + match(tt.braceL) || + match(tt.star) || + match(tt.ellipsis) || + match(tt.hash) || + isLiteralPropertyName()) && + !hasPrecedingLineBreak(); + + if (canFollowModifier) { + return true; + } else { + state.restoreFromSnapshot(snapshot); + return false; + } +} + +export function tsParseModifiers(allowedModifiers) { + while (true) { + const modifier = tsParseModifier(allowedModifiers); + if (modifier === null) { + break; + } + } +} + +/** Parses a modifier matching one the given modifier names. */ +export function tsParseModifier( + allowedModifiers, +) { + if (!match(tt.name)) { + return null; + } + + const modifier = state.contextualKeyword; + if (allowedModifiers.indexOf(modifier) !== -1 && tsNextTokenCanFollowModifier()) { + switch (modifier) { + case ContextualKeyword._readonly: + state.tokens[state.tokens.length - 1].type = tt._readonly; + break; + case ContextualKeyword._abstract: + state.tokens[state.tokens.length - 1].type = tt._abstract; + break; + case ContextualKeyword._static: + state.tokens[state.tokens.length - 1].type = tt._static; + break; + case ContextualKeyword._public: + state.tokens[state.tokens.length - 1].type = tt._public; + break; + case ContextualKeyword._private: + state.tokens[state.tokens.length - 1].type = tt._private; + break; + case ContextualKeyword._protected: + state.tokens[state.tokens.length - 1].type = tt._protected; + break; + case ContextualKeyword._override: + state.tokens[state.tokens.length - 1].type = tt._override; + break; + case ContextualKeyword._declare: + state.tokens[state.tokens.length - 1].type = tt._declare; + break; + default: + break; + } + return modifier; + } + return null; +} + +function tsParseEntityName() { + parseIdentifier(); + while (eat(tt.dot)) { + parseIdentifier(); + } +} + +function tsParseTypeReference() { + tsParseEntityName(); + if (!hasPrecedingLineBreak() && match(tt.lessThan)) { + tsParseTypeArguments(); + } +} + +function tsParseThisTypePredicate() { + next(); + tsParseTypeAnnotation(); +} + +function tsParseThisTypeNode() { + next(); +} + +function tsParseTypeQuery() { + expect(tt._typeof); + if (match(tt._import)) { + tsParseImportType(); + } else { + tsParseEntityName(); + } + if (!hasPrecedingLineBreak() && match(tt.lessThan)) { + tsParseTypeArguments(); + } +} + +function tsParseImportType() { + expect(tt._import); + expect(tt.parenL); + expect(tt.string); + expect(tt.parenR); + if (eat(tt.dot)) { + tsParseEntityName(); + } + if (match(tt.lessThan)) { + tsParseTypeArguments(); + } +} + +function tsParseTypeParameter() { + eat(tt._const); + const hadIn = eat(tt._in); + const hadOut = eatContextual(ContextualKeyword._out); + eat(tt._const); + if ((hadIn || hadOut) && !match(tt.name)) { + // The "in" or "out" keyword must have actually been the type parameter + // name, so set it as the name. + state.tokens[state.tokens.length - 1].type = tt.name; + } else { + parseIdentifier(); + } + + if (eat(tt._extends)) { + tsParseType(); + } + if (eat(tt.eq)) { + tsParseType(); + } +} + +export function tsTryParseTypeParameters() { + if (match(tt.lessThan)) { + tsParseTypeParameters(); + } +} + +function tsParseTypeParameters() { + const oldIsType = pushTypeContext(0); + if (match(tt.lessThan) || match(tt.typeParameterStart)) { + next(); + } else { + unexpected(); + } + + while (!eat(tt.greaterThan) && !state.error) { + tsParseTypeParameter(); + eat(tt.comma); + } + popTypeContext(oldIsType); +} + +// Note: In TypeScript implementation we must provide `yieldContext` and `awaitContext`, +// but here it's always false, because this is only used for types. +function tsFillSignature(returnToken) { + // Arrow fns *must* have return token (`=>`). Normal functions can omit it. + const returnTokenRequired = returnToken === tt.arrow; + tsTryParseTypeParameters(); + expect(tt.parenL); + // Create a scope even though we're doing type parsing so we don't accidentally + // treat params as top-level bindings. + state.scopeDepth++; + tsParseBindingListForSignature(false /* isBlockScope */); + state.scopeDepth--; + if (returnTokenRequired) { + tsParseTypeOrTypePredicateAnnotation(returnToken); + } else if (match(returnToken)) { + tsParseTypeOrTypePredicateAnnotation(returnToken); + } +} + +function tsParseBindingListForSignature(isBlockScope) { + parseBindingList(tt.parenR, isBlockScope); +} + +function tsParseTypeMemberSemicolon() { + if (!eat(tt.comma)) { + semicolon(); + } +} + +function tsParseSignatureMember() { + tsFillSignature(tt.colon); + tsParseTypeMemberSemicolon(); +} + +function tsIsUnambiguouslyIndexSignature() { + const snapshot = state.snapshot(); + next(); // Skip '{' + const isIndexSignature = eat(tt.name) && match(tt.colon); + state.restoreFromSnapshot(snapshot); + return isIndexSignature; +} + +function tsTryParseIndexSignature() { + if (!(match(tt.bracketL) && tsIsUnambiguouslyIndexSignature())) { + return false; + } + + const oldIsType = pushTypeContext(0); + + expect(tt.bracketL); + parseIdentifier(); + tsParseTypeAnnotation(); + expect(tt.bracketR); + + tsTryParseTypeAnnotation(); + tsParseTypeMemberSemicolon(); + + popTypeContext(oldIsType); + return true; +} + +function tsParsePropertyOrMethodSignature(isReadonly) { + eat(tt.question); + + if (!isReadonly && (match(tt.parenL) || match(tt.lessThan))) { + tsFillSignature(tt.colon); + tsParseTypeMemberSemicolon(); + } else { + tsTryParseTypeAnnotation(); + tsParseTypeMemberSemicolon(); + } +} + +function tsParseTypeMember() { + if (match(tt.parenL) || match(tt.lessThan)) { + // call signature + tsParseSignatureMember(); + return; + } + if (match(tt._new)) { + next(); + if (match(tt.parenL) || match(tt.lessThan)) { + // constructor signature + tsParseSignatureMember(); + } else { + tsParsePropertyOrMethodSignature(false); + } + return; + } + const readonly = !!tsParseModifier([ContextualKeyword._readonly]); + + const found = tsTryParseIndexSignature(); + if (found) { + return; + } + if ( + (isContextual(ContextualKeyword._get) || isContextual(ContextualKeyword._set)) && + tsNextTokenCanFollowModifier() + ) { + // This is a getter/setter on a type. The tsNextTokenCanFollowModifier + // function already called next() for us, so continue parsing the name. + } + parsePropertyName(-1 /* Types don't need context IDs. */); + tsParsePropertyOrMethodSignature(readonly); +} + +function tsParseTypeLiteral() { + tsParseObjectTypeMembers(); +} + +function tsParseObjectTypeMembers() { + expect(tt.braceL); + while (!eat(tt.braceR) && !state.error) { + tsParseTypeMember(); + } +} + +function tsLookaheadIsStartOfMappedType() { + const snapshot = state.snapshot(); + const isStartOfMappedType = tsIsStartOfMappedType(); + state.restoreFromSnapshot(snapshot); + return isStartOfMappedType; +} + +function tsIsStartOfMappedType() { + next(); + if (eat(tt.plus) || eat(tt.minus)) { + return isContextual(ContextualKeyword._readonly); + } + if (isContextual(ContextualKeyword._readonly)) { + next(); + } + if (!match(tt.bracketL)) { + return false; + } + next(); + if (!tsIsIdentifier()) { + return false; + } + next(); + return match(tt._in); +} + +function tsParseMappedTypeParameter() { + parseIdentifier(); + expect(tt._in); + tsParseType(); +} + +function tsParseMappedType() { + expect(tt.braceL); + if (match(tt.plus) || match(tt.minus)) { + next(); + expectContextual(ContextualKeyword._readonly); + } else { + eatContextual(ContextualKeyword._readonly); + } + expect(tt.bracketL); + tsParseMappedTypeParameter(); + if (eatContextual(ContextualKeyword._as)) { + tsParseType(); + } + expect(tt.bracketR); + if (match(tt.plus) || match(tt.minus)) { + next(); + expect(tt.question); + } else { + eat(tt.question); + } + tsTryParseType(); + semicolon(); + expect(tt.braceR); +} + +function tsParseTupleType() { + expect(tt.bracketL); + while (!eat(tt.bracketR) && !state.error) { + // Do not validate presence of either none or only labeled elements + tsParseTupleElementType(); + eat(tt.comma); + } +} + +function tsParseTupleElementType() { + // parses `...TsType[]` + if (eat(tt.ellipsis)) { + tsParseType(); + } else { + // parses `TsType?` + tsParseType(); + eat(tt.question); + } + + // The type we parsed above was actually a label + if (eat(tt.colon)) { + // Labeled tuple types must affix the label with `...` or `?`, so no need to handle those here + tsParseType(); + } +} + +function tsParseParenthesizedType() { + expect(tt.parenL); + tsParseType(); + expect(tt.parenR); +} + +function tsParseTemplateLiteralType() { + // Finish `, read quasi + nextTemplateToken(); + // Finish quasi, read ${ + nextTemplateToken(); + while (!match(tt.backQuote) && !state.error) { + expect(tt.dollarBraceL); + tsParseType(); + // Finish }, read quasi + nextTemplateToken(); + // Finish quasi, read either ${ or ` + nextTemplateToken(); + } + next(); +} + +var FunctionType; (function (FunctionType) { + const TSFunctionType = 0; FunctionType[FunctionType["TSFunctionType"] = TSFunctionType] = "TSFunctionType"; + const TSConstructorType = TSFunctionType + 1; FunctionType[FunctionType["TSConstructorType"] = TSConstructorType] = "TSConstructorType"; + const TSAbstractConstructorType = TSConstructorType + 1; FunctionType[FunctionType["TSAbstractConstructorType"] = TSAbstractConstructorType] = "TSAbstractConstructorType"; +})(FunctionType || (FunctionType = {})); + +function tsParseFunctionOrConstructorType(type) { + if (type === FunctionType.TSAbstractConstructorType) { + expectContextual(ContextualKeyword._abstract); + } + if (type === FunctionType.TSConstructorType || type === FunctionType.TSAbstractConstructorType) { + expect(tt._new); + } + const oldInDisallowConditionalTypesContext = state.inDisallowConditionalTypesContext; + state.inDisallowConditionalTypesContext = false; + tsFillSignature(tt.arrow); + state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; +} + +function tsParseNonArrayType() { + switch (state.type) { + case tt.name: + tsParseTypeReference(); + return; + case tt._void: + case tt._null: + next(); + return; + case tt.string: + case tt.num: + case tt.bigint: + case tt.decimal: + case tt._true: + case tt._false: + parseLiteral(); + return; + case tt.minus: + next(); + parseLiteral(); + return; + case tt._this: { + tsParseThisTypeNode(); + if (isContextual(ContextualKeyword._is) && !hasPrecedingLineBreak()) { + tsParseThisTypePredicate(); + } + return; + } + case tt._typeof: + tsParseTypeQuery(); + return; + case tt._import: + tsParseImportType(); + return; + case tt.braceL: + if (tsLookaheadIsStartOfMappedType()) { + tsParseMappedType(); + } else { + tsParseTypeLiteral(); + } + return; + case tt.bracketL: + tsParseTupleType(); + return; + case tt.parenL: + tsParseParenthesizedType(); + return; + case tt.backQuote: + tsParseTemplateLiteralType(); + return; + default: + if (state.type & TokenType.IS_KEYWORD) { + next(); + state.tokens[state.tokens.length - 1].type = tt.name; + return; + } + break; + } + + unexpected(); +} + +function tsParseArrayTypeOrHigher() { + tsParseNonArrayType(); + while (!hasPrecedingLineBreak() && eat(tt.bracketL)) { + if (!eat(tt.bracketR)) { + // If we hit ] immediately, this is an array type, otherwise it's an indexed access type. + tsParseType(); + expect(tt.bracketR); + } + } +} + +function tsParseInferType() { + expectContextual(ContextualKeyword._infer); + parseIdentifier(); + if (match(tt._extends)) { + // Infer type constraints introduce an ambiguity about whether the "extends" + // is a constraint for this infer type or is another conditional type. + const snapshot = state.snapshot(); + expect(tt._extends); + const oldInDisallowConditionalTypesContext = state.inDisallowConditionalTypesContext; + state.inDisallowConditionalTypesContext = true; + tsParseType(); + state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + if (state.error || (!state.inDisallowConditionalTypesContext && match(tt.question))) { + state.restoreFromSnapshot(snapshot); + } + } +} + +function tsParseTypeOperatorOrHigher() { + if ( + isContextual(ContextualKeyword._keyof) || + isContextual(ContextualKeyword._unique) || + isContextual(ContextualKeyword._readonly) + ) { + next(); + tsParseTypeOperatorOrHigher(); + } else if (isContextual(ContextualKeyword._infer)) { + tsParseInferType(); + } else { + const oldInDisallowConditionalTypesContext = state.inDisallowConditionalTypesContext; + state.inDisallowConditionalTypesContext = false; + tsParseArrayTypeOrHigher(); + state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + } +} + +function tsParseIntersectionTypeOrHigher() { + eat(tt.bitwiseAND); + tsParseTypeOperatorOrHigher(); + if (match(tt.bitwiseAND)) { + while (eat(tt.bitwiseAND)) { + tsParseTypeOperatorOrHigher(); + } + } +} + +function tsParseUnionTypeOrHigher() { + eat(tt.bitwiseOR); + tsParseIntersectionTypeOrHigher(); + if (match(tt.bitwiseOR)) { + while (eat(tt.bitwiseOR)) { + tsParseIntersectionTypeOrHigher(); + } + } +} + +function tsIsStartOfFunctionType() { + if (match(tt.lessThan)) { + return true; + } + return match(tt.parenL) && tsLookaheadIsUnambiguouslyStartOfFunctionType(); +} + +function tsSkipParameterStart() { + if (match(tt.name) || match(tt._this)) { + next(); + return true; + } + // If this is a possible array/object destructure, walk to the matching bracket/brace. + // The next token after will tell us definitively whether this is a function param. + if (match(tt.braceL) || match(tt.bracketL)) { + let depth = 1; + next(); + while (depth > 0 && !state.error) { + if (match(tt.braceL) || match(tt.bracketL)) { + depth++; + } else if (match(tt.braceR) || match(tt.bracketR)) { + depth--; + } + next(); + } + return true; + } + return false; +} + +function tsLookaheadIsUnambiguouslyStartOfFunctionType() { + const snapshot = state.snapshot(); + const isUnambiguouslyStartOfFunctionType = tsIsUnambiguouslyStartOfFunctionType(); + state.restoreFromSnapshot(snapshot); + return isUnambiguouslyStartOfFunctionType; +} + +function tsIsUnambiguouslyStartOfFunctionType() { + next(); + if (match(tt.parenR) || match(tt.ellipsis)) { + // ( ) + // ( ... + return true; + } + if (tsSkipParameterStart()) { + if (match(tt.colon) || match(tt.comma) || match(tt.question) || match(tt.eq)) { + // ( xxx : + // ( xxx , + // ( xxx ? + // ( xxx = + return true; + } + if (match(tt.parenR)) { + next(); + if (match(tt.arrow)) { + // ( xxx ) => + return true; + } + } + } + return false; +} + +function tsParseTypeOrTypePredicateAnnotation(returnToken) { + const oldIsType = pushTypeContext(0); + expect(returnToken); + const finishedReturn = tsParseTypePredicateOrAssertsPrefix(); + if (!finishedReturn) { + tsParseType(); + } + popTypeContext(oldIsType); +} + +function tsTryParseTypeOrTypePredicateAnnotation() { + if (match(tt.colon)) { + tsParseTypeOrTypePredicateAnnotation(tt.colon); + } +} + +export function tsTryParseTypeAnnotation() { + if (match(tt.colon)) { + tsParseTypeAnnotation(); + } +} + +function tsTryParseType() { + if (eat(tt.colon)) { + tsParseType(); + } +} + +/** + * Detect a few special return syntax cases: `x is T`, `asserts x`, `asserts x is T`, + * `asserts this is T`. + * + * Returns true if we parsed the return type, false if there's still a type to be parsed. + */ +function tsParseTypePredicateOrAssertsPrefix() { + const snapshot = state.snapshot(); + if (isContextual(ContextualKeyword._asserts)) { + // Normally this is `asserts x is T`, but at this point, it might be `asserts is T` (a user- + // defined type guard on the `asserts` variable) or just a type called `asserts`. + next(); + if (eatContextual(ContextualKeyword._is)) { + // If we see `asserts is`, then this must be of the form `asserts is T`, since + // `asserts is is T` isn't valid. + tsParseType(); + return true; + } else if (tsIsIdentifier() || match(tt._this)) { + next(); + if (eatContextual(ContextualKeyword._is)) { + // If we see `is`, then this is `asserts x is T`. Otherwise, it's `asserts x`. + tsParseType(); + } + return true; + } else { + // Regular type, so bail out and start type parsing from scratch. + state.restoreFromSnapshot(snapshot); + return false; + } + } else if (tsIsIdentifier() || match(tt._this)) { + // This is a regular identifier, which may or may not have "is" after it. + next(); + if (isContextual(ContextualKeyword._is) && !hasPrecedingLineBreak()) { + next(); + tsParseType(); + return true; + } else { + // Regular type, so bail out and start type parsing from scratch. + state.restoreFromSnapshot(snapshot); + return false; + } + } + return false; +} + +export function tsParseTypeAnnotation() { + const oldIsType = pushTypeContext(0); + expect(tt.colon); + tsParseType(); + popTypeContext(oldIsType); +} + +export function tsParseType() { + tsParseNonConditionalType(); + if (state.inDisallowConditionalTypesContext || hasPrecedingLineBreak() || !eat(tt._extends)) { + return; + } + // extends type + const oldInDisallowConditionalTypesContext = state.inDisallowConditionalTypesContext; + state.inDisallowConditionalTypesContext = true; + tsParseNonConditionalType(); + state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + + expect(tt.question); + // true type + tsParseType(); + expect(tt.colon); + // false type + tsParseType(); +} + +function isAbstractConstructorSignature() { + return isContextual(ContextualKeyword._abstract) && lookaheadType() === tt._new; +} + +export function tsParseNonConditionalType() { + if (tsIsStartOfFunctionType()) { + tsParseFunctionOrConstructorType(FunctionType.TSFunctionType); + return; + } + if (match(tt._new)) { + // As in `new () => Date` + tsParseFunctionOrConstructorType(FunctionType.TSConstructorType); + return; + } else if (isAbstractConstructorSignature()) { + // As in `abstract new () => Date` + tsParseFunctionOrConstructorType(FunctionType.TSAbstractConstructorType); + return; + } + tsParseUnionTypeOrHigher(); +} + +export function tsParseTypeAssertion() { + const oldIsType = pushTypeContext(1); + tsParseType(); + expect(tt.greaterThan); + popTypeContext(oldIsType); + parseMaybeUnary(); +} + +export function tsTryParseJSXTypeArgument() { + if (eat(tt.jsxTagStart)) { + state.tokens[state.tokens.length - 1].type = tt.typeParameterStart; + const oldIsType = pushTypeContext(1); + while (!match(tt.greaterThan) && !state.error) { + tsParseType(); + eat(tt.comma); + } + // Process >, but the one after needs to be parsed JSX-style. + nextJSXTagToken(); + popTypeContext(oldIsType); + } +} + +function tsParseHeritageClause() { + while (!match(tt.braceL) && !state.error) { + tsParseExpressionWithTypeArguments(); + eat(tt.comma); + } +} + +function tsParseExpressionWithTypeArguments() { + // Note: TS uses parseLeftHandSideExpressionOrHigher, + // then has grammar errors later if it's not an EntityName. + tsParseEntityName(); + if (match(tt.lessThan)) { + tsParseTypeArguments(); + } +} + +function tsParseInterfaceDeclaration() { + parseBindingIdentifier(false); + tsTryParseTypeParameters(); + if (eat(tt._extends)) { + tsParseHeritageClause(); + } + tsParseObjectTypeMembers(); +} + +function tsParseTypeAliasDeclaration() { + parseBindingIdentifier(false); + tsTryParseTypeParameters(); + expect(tt.eq); + tsParseType(); + semicolon(); +} + +function tsParseEnumMember() { + // Computed property names are grammar errors in an enum, so accept just string literal or identifier. + if (match(tt.string)) { + parseLiteral(); + } else { + parseIdentifier(); + } + if (eat(tt.eq)) { + const eqIndex = state.tokens.length - 1; + parseMaybeAssign(); + state.tokens[eqIndex].rhsEndIndex = state.tokens.length; + } +} + +function tsParseEnumDeclaration() { + parseBindingIdentifier(false); + expect(tt.braceL); + while (!eat(tt.braceR) && !state.error) { + tsParseEnumMember(); + eat(tt.comma); + } +} + +function tsParseModuleBlock() { + expect(tt.braceL); + parseBlockBody(/* end */ tt.braceR); +} + +function tsParseModuleOrNamespaceDeclaration() { + parseBindingIdentifier(false); + if (eat(tt.dot)) { + tsParseModuleOrNamespaceDeclaration(); + } else { + tsParseModuleBlock(); + } +} + +function tsParseAmbientExternalModuleDeclaration() { + if (isContextual(ContextualKeyword._global)) { + parseIdentifier(); + } else if (match(tt.string)) { + parseExprAtom(); + } else { + unexpected(); + } + + if (match(tt.braceL)) { + tsParseModuleBlock(); + } else { + semicolon(); + } +} + +export function tsParseImportEqualsDeclaration() { + parseImportedIdentifier(); + expect(tt.eq); + tsParseModuleReference(); + semicolon(); +} + +function tsIsExternalModuleReference() { + return isContextual(ContextualKeyword._require) && lookaheadType() === tt.parenL; +} + +function tsParseModuleReference() { + if (tsIsExternalModuleReference()) { + tsParseExternalModuleReference(); + } else { + tsParseEntityName(); + } +} + +function tsParseExternalModuleReference() { + expectContextual(ContextualKeyword._require); + expect(tt.parenL); + if (!match(tt.string)) { + unexpected(); + } + parseLiteral(); + expect(tt.parenR); +} + +// Utilities + +// Returns true if a statement matched. +function tsTryParseDeclare() { + if (isLineTerminator()) { + return false; + } + switch (state.type) { + case tt._function: { + const oldIsType = pushTypeContext(1); + next(); + // We don't need to precisely get the function start here, since it's only used to mark + // the function as a type if it's bodiless, and it's already a type here. + const functionStart = state.start; + parseFunction(functionStart, /* isStatement */ true); + popTypeContext(oldIsType); + return true; + } + case tt._class: { + const oldIsType = pushTypeContext(1); + parseClass(/* isStatement */ true, /* optionalId */ false); + popTypeContext(oldIsType); + return true; + } + case tt._const: { + if (match(tt._const) && isLookaheadContextual(ContextualKeyword._enum)) { + const oldIsType = pushTypeContext(1); + // `const enum = 0;` not allowed because "enum" is a strict mode reserved word. + expect(tt._const); + expectContextual(ContextualKeyword._enum); + state.tokens[state.tokens.length - 1].type = tt._enum; + tsParseEnumDeclaration(); + popTypeContext(oldIsType); + return true; + } + } + // falls through + case tt._var: + case tt._let: { + const oldIsType = pushTypeContext(1); + parseVarStatement(state.type !== tt._var); + popTypeContext(oldIsType); + return true; + } + case tt.name: { + const oldIsType = pushTypeContext(1); + const contextualKeyword = state.contextualKeyword; + let matched = false; + if (contextualKeyword === ContextualKeyword._global) { + tsParseAmbientExternalModuleDeclaration(); + matched = true; + } else { + matched = tsParseDeclaration(contextualKeyword, /* isBeforeToken */ true); + } + popTypeContext(oldIsType); + return matched; + } + default: + return false; + } +} + +// Note: this won't be called unless the keyword is allowed in `shouldParseExportDeclaration`. +// Returns true if it matched a declaration. +function tsTryParseExportDeclaration() { + return tsParseDeclaration(state.contextualKeyword, /* isBeforeToken */ true); +} + +// Returns true if it matched a statement. +function tsParseExpressionStatement(contextualKeyword) { + switch (contextualKeyword) { + case ContextualKeyword._declare: { + const declareTokenIndex = state.tokens.length - 1; + const matched = tsTryParseDeclare(); + if (matched) { + state.tokens[declareTokenIndex].type = tt._declare; + return true; + } + break; + } + case ContextualKeyword._global: + // `global { }` (with no `declare`) may appear inside an ambient module declaration. + // Would like to use tsParseAmbientExternalModuleDeclaration here, but already ran past "global". + if (match(tt.braceL)) { + tsParseModuleBlock(); + return true; + } + break; + + default: + return tsParseDeclaration(contextualKeyword, /* isBeforeToken */ false); + } + return false; +} + +/** + * Common code for parsing a declaration. + * + * isBeforeToken indicates that the current parser state is at the contextual + * keyword (and that it is not yet emitted) rather than reading the token after + * it. When isBeforeToken is true, we may be preceded by an `export` token and + * should include that token in a type context we create, e.g. to handle + * `export interface` or `export type`. (This is a bit of a hack and should be + * cleaned up at some point.) + * + * Returns true if it matched a declaration. + */ +function tsParseDeclaration(contextualKeyword, isBeforeToken) { + switch (contextualKeyword) { + case ContextualKeyword._abstract: + if (tsCheckLineTerminator(isBeforeToken) && match(tt._class)) { + state.tokens[state.tokens.length - 1].type = tt._abstract; + parseClass(/* isStatement */ true, /* optionalId */ false); + return true; + } + break; + + case ContextualKeyword._enum: + if (tsCheckLineTerminator(isBeforeToken) && match(tt.name)) { + state.tokens[state.tokens.length - 1].type = tt._enum; + tsParseEnumDeclaration(); + return true; + } + break; + + case ContextualKeyword._interface: + if (tsCheckLineTerminator(isBeforeToken) && match(tt.name)) { + // `next` is true in "export" and "declare" contexts, so we want to remove that token + // as well. + const oldIsType = pushTypeContext(isBeforeToken ? 2 : 1); + tsParseInterfaceDeclaration(); + popTypeContext(oldIsType); + return true; + } + break; + + case ContextualKeyword._module: + if (tsCheckLineTerminator(isBeforeToken)) { + if (match(tt.string)) { + const oldIsType = pushTypeContext(isBeforeToken ? 2 : 1); + tsParseAmbientExternalModuleDeclaration(); + popTypeContext(oldIsType); + return true; + } else if (match(tt.name)) { + const oldIsType = pushTypeContext(isBeforeToken ? 2 : 1); + tsParseModuleOrNamespaceDeclaration(); + popTypeContext(oldIsType); + return true; + } + } + break; + + case ContextualKeyword._namespace: + if (tsCheckLineTerminator(isBeforeToken) && match(tt.name)) { + const oldIsType = pushTypeContext(isBeforeToken ? 2 : 1); + tsParseModuleOrNamespaceDeclaration(); + popTypeContext(oldIsType); + return true; + } + break; + + case ContextualKeyword._type: + if (tsCheckLineTerminator(isBeforeToken) && match(tt.name)) { + const oldIsType = pushTypeContext(isBeforeToken ? 2 : 1); + tsParseTypeAliasDeclaration(); + popTypeContext(oldIsType); + return true; + } + break; + + default: + break; + } + return false; +} + +function tsCheckLineTerminator(isBeforeToken) { + if (isBeforeToken) { + // Babel checks hasFollowingLineBreak here and returns false, but this + // doesn't actually come up, e.g. `export interface` can never be on its own + // line in valid code. + next(); + return true; + } else { + return !isLineTerminator(); + } +} + +// Returns true if there was a generic async arrow function. +function tsTryParseGenericAsyncArrowFunction() { + const snapshot = state.snapshot(); + + tsParseTypeParameters(); + parseFunctionParams(); + tsTryParseTypeOrTypePredicateAnnotation(); + expect(tt.arrow); + + if (state.error) { + state.restoreFromSnapshot(snapshot); + return false; + } + + parseFunctionBody(true); + return true; +} + +/** + * If necessary, hack the tokenizer state so that this bitshift was actually a + * less-than token, then keep parsing. This should only be used in situations + * where we restore from snapshot on error (which reverts this change) or + * where bitshift would be illegal anyway (e.g. in a class "extends" clause). + * + * This hack is useful to handle situations like foo<() => void>() where + * there can legitimately be two open-angle-brackets in a row in TS. + */ +function tsParseTypeArgumentsWithPossibleBitshift() { + if (state.type === tt.bitShiftL) { + state.pos -= 1; + finishToken(tt.lessThan); + } + tsParseTypeArguments(); +} + +function tsParseTypeArguments() { + const oldIsType = pushTypeContext(0); + expect(tt.lessThan); + while (!match(tt.greaterThan) && !state.error) { + tsParseType(); + eat(tt.comma); + } + if (!oldIsType) { + // If the type arguments are present in an expression context, e.g. + // f(), then the > sign should be tokenized as a non-type token. + // In particular, f(a < b, c >= d) should parse the >= as a single token, + // resulting in a syntax error and fallback to the non-type-args + // interpretation. In the success case, even though the > is tokenized as a + // non-type token, it still must be marked as a type token so that it is + // erased. + popTypeContext(oldIsType); + rescan_gt(); + expect(tt.greaterThan); + state.tokens[state.tokens.length - 1].isType = true; + } else { + expect(tt.greaterThan); + popTypeContext(oldIsType); + } +} + +export function tsIsDeclarationStart() { + if (match(tt.name)) { + switch (state.contextualKeyword) { + case ContextualKeyword._abstract: + case ContextualKeyword._declare: + case ContextualKeyword._enum: + case ContextualKeyword._interface: + case ContextualKeyword._module: + case ContextualKeyword._namespace: + case ContextualKeyword._type: + return true; + default: + break; + } + } + + return false; +} + +// ====================================================== +// OVERRIDES +// ====================================================== + +export function tsParseFunctionBodyAndFinish(functionStart, funcContextId) { + // For arrow functions, `parseArrow` handles the return type itself. + if (match(tt.colon)) { + tsParseTypeOrTypePredicateAnnotation(tt.colon); + } + + // The original code checked the node type to make sure this function type allows a missing + // body, but we skip that to avoid sending around the node type. We instead just use the + // allowExpressionBody boolean to make sure it's not an arrow function. + if (!match(tt.braceL) && isLineTerminator()) { + // Retroactively mark the function declaration as a type. + let i = state.tokens.length - 1; + while ( + i >= 0 && + (state.tokens[i].start >= functionStart || + state.tokens[i].type === tt._default || + state.tokens[i].type === tt._export) + ) { + state.tokens[i].isType = true; + i--; + } + return; + } + + parseFunctionBody(false, funcContextId); +} + +export function tsParseSubscript( + startTokenIndex, + noCalls, + stopState, +) { + if (!hasPrecedingLineBreak() && eat(tt.bang)) { + state.tokens[state.tokens.length - 1].type = tt.nonNullAssertion; + return; + } + + if (match(tt.lessThan) || match(tt.bitShiftL)) { + // There are number of things we are going to "maybe" parse, like type arguments on + // tagged template expressions. If any of them fail, walk it back and continue. + const snapshot = state.snapshot(); + + if (!noCalls && atPossibleAsync()) { + // Almost certainly this is a generic async function `async () => ... + // But it might be a call with a type argument `async();` + const asyncArrowFn = tsTryParseGenericAsyncArrowFunction(); + if (asyncArrowFn) { + return; + } + } + tsParseTypeArgumentsWithPossibleBitshift(); + if (!noCalls && eat(tt.parenL)) { + // With f(), the subscriptStartIndex marker is on the ( token. + state.tokens[state.tokens.length - 1].subscriptStartIndex = startTokenIndex; + parseCallExpressionArguments(); + } else if (match(tt.backQuote)) { + // Tagged template with a type argument. + parseTemplate(); + } else if ( + // The remaining possible case is an instantiation expression, e.g. + // Array . Check for a few cases that would disqualify it and + // cause us to bail out. + // a>c is not (a)>c, but a<(b>>c) + state.type === tt.greaterThan || + // ac is (ac + (state.type !== tt.parenL && + Boolean(state.type & TokenType.IS_EXPRESSION_START) && + !hasPrecedingLineBreak()) + ) { + // Bail out. We have something like ac, which is not an expression with + // type arguments but an (a < b) > c comparison. + unexpected(); + } + + if (state.error) { + state.restoreFromSnapshot(snapshot); + } else { + return; + } + } else if (!noCalls && match(tt.questionDot) && lookaheadType() === tt.lessThan) { + // If we see f?.<, then this must be an optional call with a type argument. + next(); + state.tokens[startTokenIndex].isOptionalChainStart = true; + // With f?.(), the subscriptStartIndex marker is on the ?. token. + state.tokens[state.tokens.length - 1].subscriptStartIndex = startTokenIndex; + + tsParseTypeArguments(); + expect(tt.parenL); + parseCallExpressionArguments(); + } + baseParseSubscript(startTokenIndex, noCalls, stopState); +} + +export function tsTryParseExport() { + if (eat(tt._import)) { + // One of these cases: + // export import A = B; + // export import type A = require("A"); + if (isContextual(ContextualKeyword._type) && lookaheadType() !== tt.eq) { + // Eat a `type` token, unless it's actually an identifier name. + expectContextual(ContextualKeyword._type); + } + tsParseImportEqualsDeclaration(); + return true; + } else if (eat(tt.eq)) { + // `export = x;` + parseExpression(); + semicolon(); + return true; + } else if (eatContextual(ContextualKeyword._as)) { + // `export as namespace A;` + // See `parseNamespaceExportDeclaration` in TypeScript's own parser + expectContextual(ContextualKeyword._namespace); + parseIdentifier(); + semicolon(); + return true; + } else { + if (isContextual(ContextualKeyword._type)) { + const nextType = lookaheadType(); + // export type {foo} from 'a'; + // export type * from 'a';' + // export type * as ns from 'a';' + if (nextType === tt.braceL || nextType === tt.star) { + next(); + } + } + return false; + } +} + +/** + * Parse a TS import specifier, which may be prefixed with "type" and may be of + * the form `foo as bar`. + * + * The number of identifier-like tokens we see happens to be enough to uniquely + * identify the form, so simply count the number of identifiers rather than + * matching the words `type` or `as`. This is particularly important because + * `type` and `as` could each actually be plain identifiers rather than + * keywords. + */ +export function tsParseImportSpecifier() { + parseIdentifier(); + if (match(tt.comma) || match(tt.braceR)) { + // import {foo} + state.tokens[state.tokens.length - 1].identifierRole = IdentifierRole.ImportDeclaration; + return; + } + parseIdentifier(); + if (match(tt.comma) || match(tt.braceR)) { + // import {type foo} + state.tokens[state.tokens.length - 1].identifierRole = IdentifierRole.ImportDeclaration; + state.tokens[state.tokens.length - 2].isType = true; + state.tokens[state.tokens.length - 1].isType = true; + return; + } + parseIdentifier(); + if (match(tt.comma) || match(tt.braceR)) { + // import {foo as bar} + state.tokens[state.tokens.length - 3].identifierRole = IdentifierRole.ImportAccess; + state.tokens[state.tokens.length - 1].identifierRole = IdentifierRole.ImportDeclaration; + return; + } + parseIdentifier(); + // import {type foo as bar} + state.tokens[state.tokens.length - 3].identifierRole = IdentifierRole.ImportAccess; + state.tokens[state.tokens.length - 1].identifierRole = IdentifierRole.ImportDeclaration; + state.tokens[state.tokens.length - 4].isType = true; + state.tokens[state.tokens.length - 3].isType = true; + state.tokens[state.tokens.length - 2].isType = true; + state.tokens[state.tokens.length - 1].isType = true; +} + +/** + * Just like named import specifiers, export specifiers can have from 1 to 4 + * tokens, inclusive, and the number of tokens determines the role of each token. + */ +export function tsParseExportSpecifier() { + parseIdentifier(); + if (match(tt.comma) || match(tt.braceR)) { + // export {foo} + state.tokens[state.tokens.length - 1].identifierRole = IdentifierRole.ExportAccess; + return; + } + parseIdentifier(); + if (match(tt.comma) || match(tt.braceR)) { + // export {type foo} + state.tokens[state.tokens.length - 1].identifierRole = IdentifierRole.ExportAccess; + state.tokens[state.tokens.length - 2].isType = true; + state.tokens[state.tokens.length - 1].isType = true; + return; + } + parseIdentifier(); + if (match(tt.comma) || match(tt.braceR)) { + // export {foo as bar} + state.tokens[state.tokens.length - 3].identifierRole = IdentifierRole.ExportAccess; + return; + } + parseIdentifier(); + // export {type foo as bar} + state.tokens[state.tokens.length - 3].identifierRole = IdentifierRole.ExportAccess; + state.tokens[state.tokens.length - 4].isType = true; + state.tokens[state.tokens.length - 3].isType = true; + state.tokens[state.tokens.length - 2].isType = true; + state.tokens[state.tokens.length - 1].isType = true; +} + +export function tsTryParseExportDefaultExpression() { + if (isContextual(ContextualKeyword._abstract) && lookaheadType() === tt._class) { + state.type = tt._abstract; + next(); // Skip "abstract" + parseClass(true, true); + return true; + } + if (isContextual(ContextualKeyword._interface)) { + // Make sure "export default" are considered type tokens so the whole thing is removed. + const oldIsType = pushTypeContext(2); + tsParseDeclaration(ContextualKeyword._interface, true); + popTypeContext(oldIsType); + return true; + } + return false; +} + +export function tsTryParseStatementContent() { + if (state.type === tt._const) { + const ahead = lookaheadTypeAndKeyword(); + if (ahead.type === tt.name && ahead.contextualKeyword === ContextualKeyword._enum) { + expect(tt._const); + expectContextual(ContextualKeyword._enum); + state.tokens[state.tokens.length - 1].type = tt._enum; + tsParseEnumDeclaration(); + return true; + } + } + return false; +} + +export function tsTryParseClassMemberWithIsStatic(isStatic) { + const memberStartIndexAfterStatic = state.tokens.length; + tsParseModifiers([ + ContextualKeyword._abstract, + ContextualKeyword._readonly, + ContextualKeyword._declare, + ContextualKeyword._static, + ContextualKeyword._override, + ]); + + const modifiersEndIndex = state.tokens.length; + const found = tsTryParseIndexSignature(); + if (found) { + // Index signatures are type declarations, so set the modifier tokens as + // type tokens. Most tokens could be assumed to be type tokens, but `static` + // is ambiguous unless we set it explicitly here. + const memberStartIndex = isStatic + ? memberStartIndexAfterStatic - 1 + : memberStartIndexAfterStatic; + for (let i = memberStartIndex; i < modifiersEndIndex; i++) { + state.tokens[i].isType = true; + } + return true; + } + return false; +} + +// Note: The reason we do this in `parseIdentifierStatement` and not `parseStatement` +// is that e.g. `type()` is valid JS, so we must try parsing that first. +// If it's really a type, we will parse `type` as the statement, and can correct it here +// by parsing the rest. +export function tsParseIdentifierStatement(contextualKeyword) { + const matched = tsParseExpressionStatement(contextualKeyword); + if (!matched) { + semicolon(); + } +} + +export function tsParseExportDeclaration() { + // "export declare" is equivalent to just "export". + const isDeclare = eatContextual(ContextualKeyword._declare); + if (isDeclare) { + state.tokens[state.tokens.length - 1].type = tt._declare; + } + + let matchedDeclaration = false; + if (match(tt.name)) { + if (isDeclare) { + const oldIsType = pushTypeContext(2); + matchedDeclaration = tsTryParseExportDeclaration(); + popTypeContext(oldIsType); + } else { + matchedDeclaration = tsTryParseExportDeclaration(); + } + } + if (!matchedDeclaration) { + if (isDeclare) { + const oldIsType = pushTypeContext(2); + parseStatement(true); + popTypeContext(oldIsType); + } else { + parseStatement(true); + } + } +} + +export function tsAfterParseClassSuper(hasSuper) { + if (hasSuper && (match(tt.lessThan) || match(tt.bitShiftL))) { + tsParseTypeArgumentsWithPossibleBitshift(); + } + if (eatContextual(ContextualKeyword._implements)) { + state.tokens[state.tokens.length - 1].type = tt._implements; + const oldIsType = pushTypeContext(1); + tsParseHeritageClause(); + popTypeContext(oldIsType); + } +} + +export function tsStartParseObjPropValue() { + tsTryParseTypeParameters(); +} + +export function tsStartParseFunctionParams() { + tsTryParseTypeParameters(); +} + +// `let x: number;` +export function tsAfterParseVarHead() { + const oldIsType = pushTypeContext(0); + if (!hasPrecedingLineBreak()) { + eat(tt.bang); + } + tsTryParseTypeAnnotation(); + popTypeContext(oldIsType); +} + +// parse the return type of an async arrow function - let foo = (async (): number => {}); +export function tsStartParseAsyncArrowFromCallExpression() { + if (match(tt.colon)) { + tsParseTypeAnnotation(); + } +} + +// Returns true if the expression was an arrow function. +export function tsParseMaybeAssign(noIn, isWithinParens) { + // Note: When the JSX plugin is on, type assertions (` x`) aren't valid syntax. + if (isJSXEnabled) { + return tsParseMaybeAssignWithJSX(noIn, isWithinParens); + } else { + return tsParseMaybeAssignWithoutJSX(noIn, isWithinParens); + } +} + +export function tsParseMaybeAssignWithJSX(noIn, isWithinParens) { + if (!match(tt.lessThan)) { + return baseParseMaybeAssign(noIn, isWithinParens); + } + + // Prefer to parse JSX if possible. But may be an arrow fn. + const snapshot = state.snapshot(); + let wasArrow = baseParseMaybeAssign(noIn, isWithinParens); + if (state.error) { + state.restoreFromSnapshot(snapshot); + } else { + return wasArrow; + } + + // Otherwise, try as type-parameterized arrow function. + state.type = tt.typeParameterStart; + // This is similar to TypeScript's `tryParseParenthesizedArrowFunctionExpression`. + tsParseTypeParameters(); + wasArrow = baseParseMaybeAssign(noIn, isWithinParens); + if (!wasArrow) { + unexpected(); + } + + return wasArrow; +} + +export function tsParseMaybeAssignWithoutJSX(noIn, isWithinParens) { + if (!match(tt.lessThan)) { + return baseParseMaybeAssign(noIn, isWithinParens); + } + + const snapshot = state.snapshot(); + // This is similar to TypeScript's `tryParseParenthesizedArrowFunctionExpression`. + tsParseTypeParameters(); + const wasArrow = baseParseMaybeAssign(noIn, isWithinParens); + if (!wasArrow) { + unexpected(); + } + if (state.error) { + state.restoreFromSnapshot(snapshot); + } else { + return wasArrow; + } + + // Try parsing a type cast instead of an arrow function. + // This will start with a type assertion (via parseMaybeUnary). + // But don't directly call `tsParseTypeAssertion` because we want to handle any binary after it. + return baseParseMaybeAssign(noIn, isWithinParens); +} + +export function tsParseArrow() { + if (match(tt.colon)) { + // This is different from how the TS parser does it. + // TS uses lookahead. Babylon parses it as a parenthesized expression and converts. + const snapshot = state.snapshot(); + + tsParseTypeOrTypePredicateAnnotation(tt.colon); + if (canInsertSemicolon()) unexpected(); + if (!match(tt.arrow)) unexpected(); + + if (state.error) { + state.restoreFromSnapshot(snapshot); + } + } + return eat(tt.arrow); +} + +// Allow type annotations inside of a parameter list. +export function tsParseAssignableListItemTypes() { + const oldIsType = pushTypeContext(0); + eat(tt.question); + tsTryParseTypeAnnotation(); + popTypeContext(oldIsType); +} + +export function tsParseMaybeDecoratorArguments() { + if (match(tt.lessThan) || match(tt.bitShiftL)) { + tsParseTypeArgumentsWithPossibleBitshift(); + } + baseParseMaybeDecoratorArguments(); +} diff --git a/node_modules/sucrase/dist/esm/parser/tokenizer/index.js b/node_modules/sucrase/dist/esm/parser/tokenizer/index.js new file mode 100644 index 0000000..69f286a --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/tokenizer/index.js @@ -0,0 +1,1004 @@ +/* eslint max-len: 0 */ + +import {input, isFlowEnabled, state} from "../traverser/base"; +import {unexpected} from "../traverser/util"; +import {charCodes} from "../util/charcodes"; +import {IS_IDENTIFIER_CHAR, IS_IDENTIFIER_START} from "../util/identifier"; +import {IS_WHITESPACE, skipWhiteSpace} from "../util/whitespace"; +import {ContextualKeyword} from "./keywords"; +import readWord from "./readWord"; +import { TokenType as tt} from "./types"; + +export var IdentifierRole; (function (IdentifierRole) { + const Access = 0; IdentifierRole[IdentifierRole["Access"] = Access] = "Access"; + const ExportAccess = Access + 1; IdentifierRole[IdentifierRole["ExportAccess"] = ExportAccess] = "ExportAccess"; + const TopLevelDeclaration = ExportAccess + 1; IdentifierRole[IdentifierRole["TopLevelDeclaration"] = TopLevelDeclaration] = "TopLevelDeclaration"; + const FunctionScopedDeclaration = TopLevelDeclaration + 1; IdentifierRole[IdentifierRole["FunctionScopedDeclaration"] = FunctionScopedDeclaration] = "FunctionScopedDeclaration"; + const BlockScopedDeclaration = FunctionScopedDeclaration + 1; IdentifierRole[IdentifierRole["BlockScopedDeclaration"] = BlockScopedDeclaration] = "BlockScopedDeclaration"; + const ObjectShorthandTopLevelDeclaration = BlockScopedDeclaration + 1; IdentifierRole[IdentifierRole["ObjectShorthandTopLevelDeclaration"] = ObjectShorthandTopLevelDeclaration] = "ObjectShorthandTopLevelDeclaration"; + const ObjectShorthandFunctionScopedDeclaration = ObjectShorthandTopLevelDeclaration + 1; IdentifierRole[IdentifierRole["ObjectShorthandFunctionScopedDeclaration"] = ObjectShorthandFunctionScopedDeclaration] = "ObjectShorthandFunctionScopedDeclaration"; + const ObjectShorthandBlockScopedDeclaration = ObjectShorthandFunctionScopedDeclaration + 1; IdentifierRole[IdentifierRole["ObjectShorthandBlockScopedDeclaration"] = ObjectShorthandBlockScopedDeclaration] = "ObjectShorthandBlockScopedDeclaration"; + const ObjectShorthand = ObjectShorthandBlockScopedDeclaration + 1; IdentifierRole[IdentifierRole["ObjectShorthand"] = ObjectShorthand] = "ObjectShorthand"; + // Any identifier bound in an import statement, e.g. both A and b from + // `import A, * as b from 'A';` + const ImportDeclaration = ObjectShorthand + 1; IdentifierRole[IdentifierRole["ImportDeclaration"] = ImportDeclaration] = "ImportDeclaration"; + const ObjectKey = ImportDeclaration + 1; IdentifierRole[IdentifierRole["ObjectKey"] = ObjectKey] = "ObjectKey"; + // The `foo` in `import {foo as bar} from "./abc";`. + const ImportAccess = ObjectKey + 1; IdentifierRole[IdentifierRole["ImportAccess"] = ImportAccess] = "ImportAccess"; +})(IdentifierRole || (IdentifierRole = {})); + +/** + * Extra information on jsxTagStart tokens, used to determine which of the three + * jsx functions are called in the automatic transform. + */ +export var JSXRole; (function (JSXRole) { + // The element is self-closing or has a body that resolves to empty. We + // shouldn't emit children at all in this case. + const NoChildren = 0; JSXRole[JSXRole["NoChildren"] = NoChildren] = "NoChildren"; + // The element has a single explicit child, which might still be an arbitrary + // expression like an array. We should emit that expression as the children. + const OneChild = NoChildren + 1; JSXRole[JSXRole["OneChild"] = OneChild] = "OneChild"; + // The element has at least two explicitly-specified children or has spread + // children, so child positions are assumed to be "static". We should wrap + // these children in an array. + const StaticChildren = OneChild + 1; JSXRole[JSXRole["StaticChildren"] = StaticChildren] = "StaticChildren"; + // The element has a prop named "key" after a prop spread, so we should fall + // back to the createElement function. + const KeyAfterPropSpread = StaticChildren + 1; JSXRole[JSXRole["KeyAfterPropSpread"] = KeyAfterPropSpread] = "KeyAfterPropSpread"; +})(JSXRole || (JSXRole = {})); + +export function isDeclaration(token) { + const role = token.identifierRole; + return ( + role === IdentifierRole.TopLevelDeclaration || + role === IdentifierRole.FunctionScopedDeclaration || + role === IdentifierRole.BlockScopedDeclaration || + role === IdentifierRole.ObjectShorthandTopLevelDeclaration || + role === IdentifierRole.ObjectShorthandFunctionScopedDeclaration || + role === IdentifierRole.ObjectShorthandBlockScopedDeclaration + ); +} + +export function isNonTopLevelDeclaration(token) { + const role = token.identifierRole; + return ( + role === IdentifierRole.FunctionScopedDeclaration || + role === IdentifierRole.BlockScopedDeclaration || + role === IdentifierRole.ObjectShorthandFunctionScopedDeclaration || + role === IdentifierRole.ObjectShorthandBlockScopedDeclaration + ); +} + +export function isTopLevelDeclaration(token) { + const role = token.identifierRole; + return ( + role === IdentifierRole.TopLevelDeclaration || + role === IdentifierRole.ObjectShorthandTopLevelDeclaration || + role === IdentifierRole.ImportDeclaration + ); +} + +export function isBlockScopedDeclaration(token) { + const role = token.identifierRole; + // Treat top-level declarations as block scope since the distinction doesn't matter here. + return ( + role === IdentifierRole.TopLevelDeclaration || + role === IdentifierRole.BlockScopedDeclaration || + role === IdentifierRole.ObjectShorthandTopLevelDeclaration || + role === IdentifierRole.ObjectShorthandBlockScopedDeclaration + ); +} + +export function isFunctionScopedDeclaration(token) { + const role = token.identifierRole; + return ( + role === IdentifierRole.FunctionScopedDeclaration || + role === IdentifierRole.ObjectShorthandFunctionScopedDeclaration + ); +} + +export function isObjectShorthandDeclaration(token) { + return ( + token.identifierRole === IdentifierRole.ObjectShorthandTopLevelDeclaration || + token.identifierRole === IdentifierRole.ObjectShorthandBlockScopedDeclaration || + token.identifierRole === IdentifierRole.ObjectShorthandFunctionScopedDeclaration + ); +} + +// Object type used to represent tokens. Note that normally, tokens +// simply exist as properties on the parser object. This is only +// used for the onToken callback and the external tokenizer. +export class Token { + constructor() { + this.type = state.type; + this.contextualKeyword = state.contextualKeyword; + this.start = state.start; + this.end = state.end; + this.scopeDepth = state.scopeDepth; + this.isType = state.isType; + this.identifierRole = null; + this.jsxRole = null; + this.shadowsGlobal = false; + this.isAsyncOperation = false; + this.contextId = null; + this.rhsEndIndex = null; + this.isExpression = false; + this.numNullishCoalesceStarts = 0; + this.numNullishCoalesceEnds = 0; + this.isOptionalChainStart = false; + this.isOptionalChainEnd = false; + this.subscriptStartIndex = null; + this.nullishStartIndex = null; + } + + + + + + + + + + // Initially false for all tokens, then may be computed in a follow-up step that does scope + // analysis. + + // Initially false for all tokens, but may be set during transform to mark it as containing an + // await operation. + + + // For assignments, the index of the RHS. For export tokens, the end of the export. + + // For class tokens, records if the class is a class expression or a class statement. + + // Number of times to insert a `nullishCoalesce(` snippet before this token. + + // Number of times to insert a `)` snippet after this token. + + // If true, insert an `optionalChain([` snippet before this token. + + // If true, insert a `])` snippet after this token. + + // Tag for `.`, `?.`, `[`, `?.[`, `(`, and `?.(` to denote the "root" token for this + // subscript chain. This can be used to determine if this chain is an optional chain. + + // Tag for `??` operators to denote the root token for this nullish coalescing call. + +} + +// ## Tokenizer + +// Move to the next token +export function next() { + state.tokens.push(new Token()); + nextToken(); +} + +// Call instead of next when inside a template, since that needs to be handled differently. +export function nextTemplateToken() { + state.tokens.push(new Token()); + state.start = state.pos; + readTmplToken(); +} + +// The tokenizer never parses regexes by default. Instead, the parser is responsible for +// instructing it to parse a regex when we see a slash at the start of an expression. +export function retokenizeSlashAsRegex() { + if (state.type === tt.assign) { + --state.pos; + } + readRegexp(); +} + +export function pushTypeContext(existingTokensInType) { + for (let i = state.tokens.length - existingTokensInType; i < state.tokens.length; i++) { + state.tokens[i].isType = true; + } + const oldIsType = state.isType; + state.isType = true; + return oldIsType; +} + +export function popTypeContext(oldIsType) { + state.isType = oldIsType; +} + +export function eat(type) { + if (match(type)) { + next(); + return true; + } else { + return false; + } +} + +export function eatTypeToken(tokenType) { + const oldIsType = state.isType; + state.isType = true; + eat(tokenType); + state.isType = oldIsType; +} + +export function match(type) { + return state.type === type; +} + +export function lookaheadType() { + const snapshot = state.snapshot(); + next(); + const type = state.type; + state.restoreFromSnapshot(snapshot); + return type; +} + +export class TypeAndKeyword { + + + constructor(type, contextualKeyword) { + this.type = type; + this.contextualKeyword = contextualKeyword; + } +} + +export function lookaheadTypeAndKeyword() { + const snapshot = state.snapshot(); + next(); + const type = state.type; + const contextualKeyword = state.contextualKeyword; + state.restoreFromSnapshot(snapshot); + return new TypeAndKeyword(type, contextualKeyword); +} + +export function nextTokenStart() { + return nextTokenStartSince(state.pos); +} + +export function nextTokenStartSince(pos) { + skipWhiteSpace.lastIndex = pos; + const skip = skipWhiteSpace.exec(input); + return pos + skip[0].length; +} + +export function lookaheadCharCode() { + return input.charCodeAt(nextTokenStart()); +} + +// Read a single token, updating the parser object's token-related +// properties. +export function nextToken() { + skipSpace(); + state.start = state.pos; + if (state.pos >= input.length) { + const tokens = state.tokens; + // We normally run past the end a bit, but if we're way past the end, avoid an infinite loop. + // Also check the token positions rather than the types since sometimes we rewrite the token + // type to something else. + if ( + tokens.length >= 2 && + tokens[tokens.length - 1].start >= input.length && + tokens[tokens.length - 2].start >= input.length + ) { + unexpected("Unexpectedly reached the end of input."); + } + finishToken(tt.eof); + return; + } + readToken(input.charCodeAt(state.pos)); +} + +function readToken(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if ( + IS_IDENTIFIER_START[code] || + code === charCodes.backslash || + (code === charCodes.atSign && input.charCodeAt(state.pos + 1) === charCodes.atSign) + ) { + readWord(); + } else { + getTokenFromCode(code); + } +} + +function skipBlockComment() { + while ( + input.charCodeAt(state.pos) !== charCodes.asterisk || + input.charCodeAt(state.pos + 1) !== charCodes.slash + ) { + state.pos++; + if (state.pos > input.length) { + unexpected("Unterminated comment", state.pos - 2); + return; + } + } + state.pos += 2; +} + +export function skipLineComment(startSkip) { + let ch = input.charCodeAt((state.pos += startSkip)); + if (state.pos < input.length) { + while ( + ch !== charCodes.lineFeed && + ch !== charCodes.carriageReturn && + ch !== charCodes.lineSeparator && + ch !== charCodes.paragraphSeparator && + ++state.pos < input.length + ) { + ch = input.charCodeAt(state.pos); + } + } +} + +// Called at the start of the parse and after every token. Skips +// whitespace and comments. +export function skipSpace() { + while (state.pos < input.length) { + const ch = input.charCodeAt(state.pos); + switch (ch) { + case charCodes.carriageReturn: + if (input.charCodeAt(state.pos + 1) === charCodes.lineFeed) { + ++state.pos; + } + + case charCodes.lineFeed: + case charCodes.lineSeparator: + case charCodes.paragraphSeparator: + ++state.pos; + break; + + case charCodes.slash: + switch (input.charCodeAt(state.pos + 1)) { + case charCodes.asterisk: + state.pos += 2; + skipBlockComment(); + break; + + case charCodes.slash: + skipLineComment(2); + break; + + default: + return; + } + break; + + default: + if (IS_WHITESPACE[ch]) { + ++state.pos; + } else { + return; + } + } + } +} + +// Called at the end of every token. Sets various fields, and skips the space after the token, so +// that the next one's `start` will point at the right position. +export function finishToken( + type, + contextualKeyword = ContextualKeyword.NONE, +) { + state.end = state.pos; + state.type = type; + state.contextualKeyword = contextualKeyword; +} + +// ### Token reading + +// This is the function that is called to fetch the next token. It +// is somewhat obscure, because it works in character codes rather +// than characters, and because operator parsing has been inlined +// into it. +// +// All in the name of speed. +function readToken_dot() { + const nextChar = input.charCodeAt(state.pos + 1); + if (nextChar >= charCodes.digit0 && nextChar <= charCodes.digit9) { + readNumber(true); + return; + } + + if (nextChar === charCodes.dot && input.charCodeAt(state.pos + 2) === charCodes.dot) { + state.pos += 3; + finishToken(tt.ellipsis); + } else { + ++state.pos; + finishToken(tt.dot); + } +} + +function readToken_slash() { + const nextChar = input.charCodeAt(state.pos + 1); + if (nextChar === charCodes.equalsTo) { + finishOp(tt.assign, 2); + } else { + finishOp(tt.slash, 1); + } +} + +function readToken_mult_modulo(code) { + // '%*' + let tokenType = code === charCodes.asterisk ? tt.star : tt.modulo; + let width = 1; + let nextChar = input.charCodeAt(state.pos + 1); + + // Exponentiation operator ** + if (code === charCodes.asterisk && nextChar === charCodes.asterisk) { + width++; + nextChar = input.charCodeAt(state.pos + 2); + tokenType = tt.exponent; + } + + // Match *= or %=, disallowing *=> which can be valid in flow. + if ( + nextChar === charCodes.equalsTo && + input.charCodeAt(state.pos + 2) !== charCodes.greaterThan + ) { + width++; + tokenType = tt.assign; + } + + finishOp(tokenType, width); +} + +function readToken_pipe_amp(code) { + // '|&' + const nextChar = input.charCodeAt(state.pos + 1); + + if (nextChar === code) { + if (input.charCodeAt(state.pos + 2) === charCodes.equalsTo) { + // ||= or &&= + finishOp(tt.assign, 3); + } else { + // || or && + finishOp(code === charCodes.verticalBar ? tt.logicalOR : tt.logicalAND, 2); + } + return; + } + + if (code === charCodes.verticalBar) { + // '|>' + if (nextChar === charCodes.greaterThan) { + finishOp(tt.pipeline, 2); + return; + } else if (nextChar === charCodes.rightCurlyBrace && isFlowEnabled) { + // '|}' + finishOp(tt.braceBarR, 2); + return; + } + } + + if (nextChar === charCodes.equalsTo) { + finishOp(tt.assign, 2); + return; + } + + finishOp(code === charCodes.verticalBar ? tt.bitwiseOR : tt.bitwiseAND, 1); +} + +function readToken_caret() { + // '^' + const nextChar = input.charCodeAt(state.pos + 1); + if (nextChar === charCodes.equalsTo) { + finishOp(tt.assign, 2); + } else { + finishOp(tt.bitwiseXOR, 1); + } +} + +function readToken_plus_min(code) { + // '+-' + const nextChar = input.charCodeAt(state.pos + 1); + + if (nextChar === code) { + // Tentatively call this a prefix operator, but it might be changed to postfix later. + finishOp(tt.preIncDec, 2); + return; + } + + if (nextChar === charCodes.equalsTo) { + finishOp(tt.assign, 2); + } else if (code === charCodes.plusSign) { + finishOp(tt.plus, 1); + } else { + finishOp(tt.minus, 1); + } +} + +function readToken_lt() { + const nextChar = input.charCodeAt(state.pos + 1); + + if (nextChar === charCodes.lessThan) { + if (input.charCodeAt(state.pos + 2) === charCodes.equalsTo) { + finishOp(tt.assign, 3); + return; + } + // We see <<, but need to be really careful about whether to treat it as a + // true left-shift or as two < tokens. + if (state.isType) { + // Within a type, << might come up in a snippet like `Array<() => void>`, + // so treat it as two < tokens. Importantly, this should only override << + // rather than other tokens like <= . If we treated <= as < in a type + // context, then the snippet `a as T <= 1` would incorrectly start parsing + // a type argument on T. We don't need to worry about `a as T << 1` + // because TypeScript disallows that syntax. + finishOp(tt.lessThan, 1); + } else { + // Outside a type, this might be a true left-shift operator, or it might + // still be two open-type-arg tokens, such as in `f<() => void>()`. We + // look at the token while considering the `f`, so we don't yet know that + // we're in a type context. In this case, we initially tokenize as a + // left-shift and correct after-the-fact as necessary in + // tsParseTypeArgumentsWithPossibleBitshift . + finishOp(tt.bitShiftL, 2); + } + return; + } + + if (nextChar === charCodes.equalsTo) { + // <= + finishOp(tt.relationalOrEqual, 2); + } else { + finishOp(tt.lessThan, 1); + } +} + +function readToken_gt() { + if (state.isType) { + // Avoid right-shift for things like `Array>` and + // greater-than-or-equal for things like `const a: Array=[];`. + finishOp(tt.greaterThan, 1); + return; + } + + const nextChar = input.charCodeAt(state.pos + 1); + + if (nextChar === charCodes.greaterThan) { + const size = input.charCodeAt(state.pos + 2) === charCodes.greaterThan ? 3 : 2; + if (input.charCodeAt(state.pos + size) === charCodes.equalsTo) { + finishOp(tt.assign, size + 1); + return; + } + finishOp(tt.bitShiftR, size); + return; + } + + if (nextChar === charCodes.equalsTo) { + // >= + finishOp(tt.relationalOrEqual, 2); + } else { + finishOp(tt.greaterThan, 1); + } +} + +/** + * Reinterpret a possible > token when transitioning from a type to a non-type + * context. + * + * This comes up in two situations where >= needs to be treated as one token: + * - After an `as` expression, like in the code `a as T >= 1`. + * - In a type argument in an expression context, e.g. `f(a < b, c >= d)`, we + * need to see the token as >= so that we get an error and backtrack to + * normal expression parsing. + * + * Other situations require >= to be seen as two tokens, e.g. + * `const x: Array=[];`, so it's important to treat > as its own token in + * typical type parsing situations. + */ +export function rescan_gt() { + if (state.type === tt.greaterThan) { + state.pos -= 1; + readToken_gt(); + } +} + +function readToken_eq_excl(code) { + // '=!' + const nextChar = input.charCodeAt(state.pos + 1); + if (nextChar === charCodes.equalsTo) { + finishOp(tt.equality, input.charCodeAt(state.pos + 2) === charCodes.equalsTo ? 3 : 2); + return; + } + if (code === charCodes.equalsTo && nextChar === charCodes.greaterThan) { + // '=>' + state.pos += 2; + finishToken(tt.arrow); + return; + } + finishOp(code === charCodes.equalsTo ? tt.eq : tt.bang, 1); +} + +function readToken_question() { + // '?' + const nextChar = input.charCodeAt(state.pos + 1); + const nextChar2 = input.charCodeAt(state.pos + 2); + if ( + nextChar === charCodes.questionMark && + // In Flow (but not TypeScript), ??string is a valid type that should be + // tokenized as two individual ? tokens. + !(isFlowEnabled && state.isType) + ) { + if (nextChar2 === charCodes.equalsTo) { + // '??=' + finishOp(tt.assign, 3); + } else { + // '??' + finishOp(tt.nullishCoalescing, 2); + } + } else if ( + nextChar === charCodes.dot && + !(nextChar2 >= charCodes.digit0 && nextChar2 <= charCodes.digit9) + ) { + // '.' not followed by a number + state.pos += 2; + finishToken(tt.questionDot); + } else { + ++state.pos; + finishToken(tt.question); + } +} + +export function getTokenFromCode(code) { + switch (code) { + case charCodes.numberSign: + ++state.pos; + finishToken(tt.hash); + return; + + // The interpretation of a dot depends on whether it is followed + // by a digit or another two dots. + + case charCodes.dot: + readToken_dot(); + return; + + // Punctuation tokens. + case charCodes.leftParenthesis: + ++state.pos; + finishToken(tt.parenL); + return; + case charCodes.rightParenthesis: + ++state.pos; + finishToken(tt.parenR); + return; + case charCodes.semicolon: + ++state.pos; + finishToken(tt.semi); + return; + case charCodes.comma: + ++state.pos; + finishToken(tt.comma); + return; + case charCodes.leftSquareBracket: + ++state.pos; + finishToken(tt.bracketL); + return; + case charCodes.rightSquareBracket: + ++state.pos; + finishToken(tt.bracketR); + return; + + case charCodes.leftCurlyBrace: + if (isFlowEnabled && input.charCodeAt(state.pos + 1) === charCodes.verticalBar) { + finishOp(tt.braceBarL, 2); + } else { + ++state.pos; + finishToken(tt.braceL); + } + return; + + case charCodes.rightCurlyBrace: + ++state.pos; + finishToken(tt.braceR); + return; + + case charCodes.colon: + if (input.charCodeAt(state.pos + 1) === charCodes.colon) { + finishOp(tt.doubleColon, 2); + } else { + ++state.pos; + finishToken(tt.colon); + } + return; + + case charCodes.questionMark: + readToken_question(); + return; + case charCodes.atSign: + ++state.pos; + finishToken(tt.at); + return; + + case charCodes.graveAccent: + ++state.pos; + finishToken(tt.backQuote); + return; + + case charCodes.digit0: { + const nextChar = input.charCodeAt(state.pos + 1); + // '0x', '0X', '0o', '0O', '0b', '0B' + if ( + nextChar === charCodes.lowercaseX || + nextChar === charCodes.uppercaseX || + nextChar === charCodes.lowercaseO || + nextChar === charCodes.uppercaseO || + nextChar === charCodes.lowercaseB || + nextChar === charCodes.uppercaseB + ) { + readRadixNumber(); + return; + } + } + // Anything else beginning with a digit is an integer, octal + // number, or float. + case charCodes.digit1: + case charCodes.digit2: + case charCodes.digit3: + case charCodes.digit4: + case charCodes.digit5: + case charCodes.digit6: + case charCodes.digit7: + case charCodes.digit8: + case charCodes.digit9: + readNumber(false); + return; + + // Quotes produce strings. + case charCodes.quotationMark: + case charCodes.apostrophe: + readString(code); + return; + + // Operators are parsed inline in tiny state machines. '=' (charCodes.equalsTo) is + // often referred to. `finishOp` simply skips the amount of + // characters it is given as second argument, and returns a token + // of the type given by its first argument. + + case charCodes.slash: + readToken_slash(); + return; + + case charCodes.percentSign: + case charCodes.asterisk: + readToken_mult_modulo(code); + return; + + case charCodes.verticalBar: + case charCodes.ampersand: + readToken_pipe_amp(code); + return; + + case charCodes.caret: + readToken_caret(); + return; + + case charCodes.plusSign: + case charCodes.dash: + readToken_plus_min(code); + return; + + case charCodes.lessThan: + readToken_lt(); + return; + + case charCodes.greaterThan: + readToken_gt(); + return; + + case charCodes.equalsTo: + case charCodes.exclamationMark: + readToken_eq_excl(code); + return; + + case charCodes.tilde: + finishOp(tt.tilde, 1); + return; + + default: + break; + } + + unexpected(`Unexpected character '${String.fromCharCode(code)}'`, state.pos); +} + +function finishOp(type, size) { + state.pos += size; + finishToken(type); +} + +function readRegexp() { + const start = state.pos; + let escaped = false; + let inClass = false; + for (;;) { + if (state.pos >= input.length) { + unexpected("Unterminated regular expression", start); + return; + } + const code = input.charCodeAt(state.pos); + if (escaped) { + escaped = false; + } else { + if (code === charCodes.leftSquareBracket) { + inClass = true; + } else if (code === charCodes.rightSquareBracket && inClass) { + inClass = false; + } else if (code === charCodes.slash && !inClass) { + break; + } + escaped = code === charCodes.backslash; + } + ++state.pos; + } + ++state.pos; + // Need to use `skipWord` because '\uXXXX' sequences are allowed here (don't ask). + skipWord(); + + finishToken(tt.regexp); +} + +/** + * Read a decimal integer. Note that this can't be unified with the similar code + * in readRadixNumber (which also handles hex digits) because "e" needs to be + * the end of the integer so that we can properly handle scientific notation. + */ +function readInt() { + while (true) { + const code = input.charCodeAt(state.pos); + if ((code >= charCodes.digit0 && code <= charCodes.digit9) || code === charCodes.underscore) { + state.pos++; + } else { + break; + } + } +} + +function readRadixNumber() { + state.pos += 2; // 0x + + // Walk to the end of the number, allowing hex digits. + while (true) { + const code = input.charCodeAt(state.pos); + if ( + (code >= charCodes.digit0 && code <= charCodes.digit9) || + (code >= charCodes.lowercaseA && code <= charCodes.lowercaseF) || + (code >= charCodes.uppercaseA && code <= charCodes.uppercaseF) || + code === charCodes.underscore + ) { + state.pos++; + } else { + break; + } + } + + const nextChar = input.charCodeAt(state.pos); + if (nextChar === charCodes.lowercaseN) { + ++state.pos; + finishToken(tt.bigint); + } else { + finishToken(tt.num); + } +} + +// Read an integer, octal integer, or floating-point number. +function readNumber(startsWithDot) { + let isBigInt = false; + let isDecimal = false; + + if (!startsWithDot) { + readInt(); + } + + let nextChar = input.charCodeAt(state.pos); + if (nextChar === charCodes.dot) { + ++state.pos; + readInt(); + nextChar = input.charCodeAt(state.pos); + } + + if (nextChar === charCodes.uppercaseE || nextChar === charCodes.lowercaseE) { + nextChar = input.charCodeAt(++state.pos); + if (nextChar === charCodes.plusSign || nextChar === charCodes.dash) { + ++state.pos; + } + readInt(); + nextChar = input.charCodeAt(state.pos); + } + + if (nextChar === charCodes.lowercaseN) { + ++state.pos; + isBigInt = true; + } else if (nextChar === charCodes.lowercaseM) { + ++state.pos; + isDecimal = true; + } + + if (isBigInt) { + finishToken(tt.bigint); + return; + } + + if (isDecimal) { + finishToken(tt.decimal); + return; + } + + finishToken(tt.num); +} + +function readString(quote) { + state.pos++; + for (;;) { + if (state.pos >= input.length) { + unexpected("Unterminated string constant"); + return; + } + const ch = input.charCodeAt(state.pos); + if (ch === charCodes.backslash) { + state.pos++; + } else if (ch === quote) { + break; + } + state.pos++; + } + state.pos++; + finishToken(tt.string); +} + +// Reads template string tokens. +function readTmplToken() { + for (;;) { + if (state.pos >= input.length) { + unexpected("Unterminated template"); + return; + } + const ch = input.charCodeAt(state.pos); + if ( + ch === charCodes.graveAccent || + (ch === charCodes.dollarSign && input.charCodeAt(state.pos + 1) === charCodes.leftCurlyBrace) + ) { + if (state.pos === state.start && match(tt.template)) { + if (ch === charCodes.dollarSign) { + state.pos += 2; + finishToken(tt.dollarBraceL); + return; + } else { + ++state.pos; + finishToken(tt.backQuote); + return; + } + } + finishToken(tt.template); + return; + } + if (ch === charCodes.backslash) { + state.pos++; + } + state.pos++; + } +} + +// Skip to the end of the current word. Note that this is the same as the snippet at the end of +// readWord, but calling skipWord from readWord seems to slightly hurt performance from some rough +// measurements. +export function skipWord() { + while (state.pos < input.length) { + const ch = input.charCodeAt(state.pos); + if (IS_IDENTIFIER_CHAR[ch]) { + state.pos++; + } else if (ch === charCodes.backslash) { + // \u + state.pos += 2; + if (input.charCodeAt(state.pos) === charCodes.leftCurlyBrace) { + while ( + state.pos < input.length && + input.charCodeAt(state.pos) !== charCodes.rightCurlyBrace + ) { + state.pos++; + } + state.pos++; + } + } else { + break; + } + } +} diff --git a/node_modules/sucrase/dist/esm/parser/tokenizer/keywords.js b/node_modules/sucrase/dist/esm/parser/tokenizer/keywords.js new file mode 100644 index 0000000..0dcf1b0 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/tokenizer/keywords.js @@ -0,0 +1,43 @@ +export var ContextualKeyword; (function (ContextualKeyword) { + const NONE = 0; ContextualKeyword[ContextualKeyword["NONE"] = NONE] = "NONE"; + const _abstract = NONE + 1; ContextualKeyword[ContextualKeyword["_abstract"] = _abstract] = "_abstract"; + const _accessor = _abstract + 1; ContextualKeyword[ContextualKeyword["_accessor"] = _accessor] = "_accessor"; + const _as = _accessor + 1; ContextualKeyword[ContextualKeyword["_as"] = _as] = "_as"; + const _assert = _as + 1; ContextualKeyword[ContextualKeyword["_assert"] = _assert] = "_assert"; + const _asserts = _assert + 1; ContextualKeyword[ContextualKeyword["_asserts"] = _asserts] = "_asserts"; + const _async = _asserts + 1; ContextualKeyword[ContextualKeyword["_async"] = _async] = "_async"; + const _await = _async + 1; ContextualKeyword[ContextualKeyword["_await"] = _await] = "_await"; + const _checks = _await + 1; ContextualKeyword[ContextualKeyword["_checks"] = _checks] = "_checks"; + const _constructor = _checks + 1; ContextualKeyword[ContextualKeyword["_constructor"] = _constructor] = "_constructor"; + const _declare = _constructor + 1; ContextualKeyword[ContextualKeyword["_declare"] = _declare] = "_declare"; + const _enum = _declare + 1; ContextualKeyword[ContextualKeyword["_enum"] = _enum] = "_enum"; + const _exports = _enum + 1; ContextualKeyword[ContextualKeyword["_exports"] = _exports] = "_exports"; + const _from = _exports + 1; ContextualKeyword[ContextualKeyword["_from"] = _from] = "_from"; + const _get = _from + 1; ContextualKeyword[ContextualKeyword["_get"] = _get] = "_get"; + const _global = _get + 1; ContextualKeyword[ContextualKeyword["_global"] = _global] = "_global"; + const _implements = _global + 1; ContextualKeyword[ContextualKeyword["_implements"] = _implements] = "_implements"; + const _infer = _implements + 1; ContextualKeyword[ContextualKeyword["_infer"] = _infer] = "_infer"; + const _interface = _infer + 1; ContextualKeyword[ContextualKeyword["_interface"] = _interface] = "_interface"; + const _is = _interface + 1; ContextualKeyword[ContextualKeyword["_is"] = _is] = "_is"; + const _keyof = _is + 1; ContextualKeyword[ContextualKeyword["_keyof"] = _keyof] = "_keyof"; + const _mixins = _keyof + 1; ContextualKeyword[ContextualKeyword["_mixins"] = _mixins] = "_mixins"; + const _module = _mixins + 1; ContextualKeyword[ContextualKeyword["_module"] = _module] = "_module"; + const _namespace = _module + 1; ContextualKeyword[ContextualKeyword["_namespace"] = _namespace] = "_namespace"; + const _of = _namespace + 1; ContextualKeyword[ContextualKeyword["_of"] = _of] = "_of"; + const _opaque = _of + 1; ContextualKeyword[ContextualKeyword["_opaque"] = _opaque] = "_opaque"; + const _out = _opaque + 1; ContextualKeyword[ContextualKeyword["_out"] = _out] = "_out"; + const _override = _out + 1; ContextualKeyword[ContextualKeyword["_override"] = _override] = "_override"; + const _private = _override + 1; ContextualKeyword[ContextualKeyword["_private"] = _private] = "_private"; + const _protected = _private + 1; ContextualKeyword[ContextualKeyword["_protected"] = _protected] = "_protected"; + const _proto = _protected + 1; ContextualKeyword[ContextualKeyword["_proto"] = _proto] = "_proto"; + const _public = _proto + 1; ContextualKeyword[ContextualKeyword["_public"] = _public] = "_public"; + const _readonly = _public + 1; ContextualKeyword[ContextualKeyword["_readonly"] = _readonly] = "_readonly"; + const _require = _readonly + 1; ContextualKeyword[ContextualKeyword["_require"] = _require] = "_require"; + const _satisfies = _require + 1; ContextualKeyword[ContextualKeyword["_satisfies"] = _satisfies] = "_satisfies"; + const _set = _satisfies + 1; ContextualKeyword[ContextualKeyword["_set"] = _set] = "_set"; + const _static = _set + 1; ContextualKeyword[ContextualKeyword["_static"] = _static] = "_static"; + const _symbol = _static + 1; ContextualKeyword[ContextualKeyword["_symbol"] = _symbol] = "_symbol"; + const _type = _symbol + 1; ContextualKeyword[ContextualKeyword["_type"] = _type] = "_type"; + const _unique = _type + 1; ContextualKeyword[ContextualKeyword["_unique"] = _unique] = "_unique"; + const _using = _unique + 1; ContextualKeyword[ContextualKeyword["_using"] = _using] = "_using"; +})(ContextualKeyword || (ContextualKeyword = {})); diff --git a/node_modules/sucrase/dist/esm/parser/tokenizer/readWord.js b/node_modules/sucrase/dist/esm/parser/tokenizer/readWord.js new file mode 100644 index 0000000..cf3df89 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/tokenizer/readWord.js @@ -0,0 +1,64 @@ +import {input, state} from "../traverser/base"; +import {charCodes} from "../util/charcodes"; +import {IS_IDENTIFIER_CHAR} from "../util/identifier"; +import {finishToken} from "./index"; +import {READ_WORD_TREE} from "./readWordTree"; +import {TokenType as tt} from "./types"; + +/** + * Read an identifier, producing either a name token or matching on one of the existing keywords. + * For performance, we pre-generate big decision tree that we traverse. Each node represents a + * prefix and has 27 values, where the first value is the token or contextual token, if any (-1 if + * not), and the other 26 values are the transitions to other nodes, or -1 to stop. + */ +export default function readWord() { + let treePos = 0; + let code = 0; + let pos = state.pos; + while (pos < input.length) { + code = input.charCodeAt(pos); + if (code < charCodes.lowercaseA || code > charCodes.lowercaseZ) { + break; + } + const next = READ_WORD_TREE[treePos + (code - charCodes.lowercaseA) + 1]; + if (next === -1) { + break; + } else { + treePos = next; + pos++; + } + } + + const keywordValue = READ_WORD_TREE[treePos]; + if (keywordValue > -1 && !IS_IDENTIFIER_CHAR[code]) { + state.pos = pos; + if (keywordValue & 1) { + finishToken(keywordValue >>> 1); + } else { + finishToken(tt.name, keywordValue >>> 1); + } + return; + } + + while (pos < input.length) { + const ch = input.charCodeAt(pos); + if (IS_IDENTIFIER_CHAR[ch]) { + pos++; + } else if (ch === charCodes.backslash) { + // \u + pos += 2; + if (input.charCodeAt(pos) === charCodes.leftCurlyBrace) { + while (pos < input.length && input.charCodeAt(pos) !== charCodes.rightCurlyBrace) { + pos++; + } + pos++; + } + } else if (ch === charCodes.atSign && input.charCodeAt(pos + 1) === charCodes.atSign) { + pos += 2; + } else { + break; + } + } + state.pos = pos; + finishToken(tt.name); +} diff --git a/node_modules/sucrase/dist/esm/parser/tokenizer/readWordTree.js b/node_modules/sucrase/dist/esm/parser/tokenizer/readWordTree.js new file mode 100644 index 0000000..ffb8cac --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/tokenizer/readWordTree.js @@ -0,0 +1,671 @@ +// Generated file, do not edit! Run "yarn generate" to re-generate this file. +import {ContextualKeyword} from "./keywords"; +import {TokenType as tt} from "./types"; + +// prettier-ignore +export const READ_WORD_TREE = new Int32Array([ + // "" + -1, 27, 783, 918, 1755, 2376, 2862, 3483, -1, 3699, -1, 4617, 4752, 4833, 5130, 5508, 5940, -1, 6480, 6939, 7749, 8181, 8451, 8613, -1, 8829, -1, + // "a" + -1, -1, 54, 243, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 432, -1, -1, -1, 675, -1, -1, -1, + // "ab" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1, + // "abs" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, -1, -1, -1, -1, -1, + // "abst" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 135, -1, -1, -1, -1, -1, -1, -1, -1, + // "abstr" + -1, 162, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "abstra" + -1, -1, -1, 189, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "abstrac" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 216, -1, -1, -1, -1, -1, -1, + // "abstract" + ContextualKeyword._abstract << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ac" + -1, -1, -1, 270, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "acc" + -1, -1, -1, -1, -1, 297, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "acce" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 324, -1, -1, -1, -1, -1, -1, -1, + // "acces" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 351, -1, -1, -1, -1, -1, -1, -1, + // "access" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 378, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "accesso" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 405, -1, -1, -1, -1, -1, -1, -1, -1, + // "accessor" + ContextualKeyword._accessor << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "as" + ContextualKeyword._as << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 459, -1, -1, -1, -1, -1, 594, -1, + // "ass" + -1, -1, -1, -1, -1, 486, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "asse" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 513, -1, -1, -1, -1, -1, -1, -1, -1, + // "asser" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 540, -1, -1, -1, -1, -1, -1, + // "assert" + ContextualKeyword._assert << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 567, -1, -1, -1, -1, -1, -1, -1, + // "asserts" + ContextualKeyword._asserts << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "asy" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 621, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "asyn" + -1, -1, -1, 648, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "async" + ContextualKeyword._async << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "aw" + -1, 702, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "awa" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 729, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "awai" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 756, -1, -1, -1, -1, -1, -1, + // "await" + ContextualKeyword._await << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "b" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 810, -1, -1, -1, -1, -1, -1, -1, -1, + // "br" + -1, -1, -1, -1, -1, 837, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "bre" + -1, 864, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "brea" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 891, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "break" + (tt._break << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "c" + -1, 945, -1, -1, -1, -1, -1, -1, 1107, -1, -1, -1, 1242, -1, -1, 1350, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ca" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 972, 1026, -1, -1, -1, -1, -1, -1, + // "cas" + -1, -1, -1, -1, -1, 999, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "case" + (tt._case << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "cat" + -1, -1, -1, 1053, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "catc" + -1, -1, -1, -1, -1, -1, -1, -1, 1080, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "catch" + (tt._catch << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ch" + -1, -1, -1, -1, -1, 1134, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "che" + -1, -1, -1, 1161, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "chec" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1188, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "check" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1215, -1, -1, -1, -1, -1, -1, -1, + // "checks" + ContextualKeyword._checks << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "cl" + -1, 1269, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "cla" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1296, -1, -1, -1, -1, -1, -1, -1, + // "clas" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1323, -1, -1, -1, -1, -1, -1, -1, + // "class" + (tt._class << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "co" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1377, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "con" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1404, 1620, -1, -1, -1, -1, -1, -1, + // "cons" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1431, -1, -1, -1, -1, -1, -1, + // "const" + (tt._const << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1458, -1, -1, -1, -1, -1, -1, -1, -1, + // "constr" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1485, -1, -1, -1, -1, -1, + // "constru" + -1, -1, -1, 1512, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "construc" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1539, -1, -1, -1, -1, -1, -1, + // "construct" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1566, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "constructo" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1593, -1, -1, -1, -1, -1, -1, -1, -1, + // "constructor" + ContextualKeyword._constructor << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "cont" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 1647, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "conti" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1674, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "contin" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1701, -1, -1, -1, -1, -1, + // "continu" + -1, -1, -1, -1, -1, 1728, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "continue" + (tt._continue << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "d" + -1, -1, -1, -1, -1, 1782, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2349, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "de" + -1, -1, 1809, 1971, -1, -1, 2106, -1, -1, -1, -1, -1, 2241, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "deb" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1836, -1, -1, -1, -1, -1, + // "debu" + -1, -1, -1, -1, -1, -1, -1, 1863, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "debug" + -1, -1, -1, -1, -1, -1, -1, 1890, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "debugg" + -1, -1, -1, -1, -1, 1917, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "debugge" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1944, -1, -1, -1, -1, -1, -1, -1, -1, + // "debugger" + (tt._debugger << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "dec" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1998, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "decl" + -1, 2025, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "decla" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2052, -1, -1, -1, -1, -1, -1, -1, -1, + // "declar" + -1, -1, -1, -1, -1, 2079, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "declare" + ContextualKeyword._declare << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "def" + -1, 2133, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "defa" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2160, -1, -1, -1, -1, -1, + // "defau" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2187, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "defaul" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2214, -1, -1, -1, -1, -1, -1, + // "default" + (tt._default << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "del" + -1, -1, -1, -1, -1, 2268, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "dele" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2295, -1, -1, -1, -1, -1, -1, + // "delet" + -1, -1, -1, -1, -1, 2322, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "delete" + (tt._delete << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "do" + (tt._do << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "e" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2403, -1, 2484, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2565, -1, -1, + // "el" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2430, -1, -1, -1, -1, -1, -1, -1, + // "els" + -1, -1, -1, -1, -1, 2457, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "else" + (tt._else << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "en" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2511, -1, -1, -1, -1, -1, + // "enu" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2538, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "enum" + ContextualKeyword._enum << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ex" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2592, -1, -1, -1, 2727, -1, -1, -1, -1, -1, -1, + // "exp" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2619, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "expo" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2646, -1, -1, -1, -1, -1, -1, -1, -1, + // "expor" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2673, -1, -1, -1, -1, -1, -1, + // "export" + (tt._export << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2700, -1, -1, -1, -1, -1, -1, -1, + // "exports" + ContextualKeyword._exports << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ext" + -1, -1, -1, -1, -1, 2754, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "exte" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2781, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "exten" + -1, -1, -1, -1, 2808, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "extend" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2835, -1, -1, -1, -1, -1, -1, -1, + // "extends" + (tt._extends << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "f" + -1, 2889, -1, -1, -1, -1, -1, -1, -1, 2997, -1, -1, -1, -1, -1, 3159, -1, -1, 3213, -1, -1, 3294, -1, -1, -1, -1, -1, + // "fa" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2916, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fal" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2943, -1, -1, -1, -1, -1, -1, -1, + // "fals" + -1, -1, -1, -1, -1, 2970, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "false" + (tt._false << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3024, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fin" + -1, 3051, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fina" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3078, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "final" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3105, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "finall" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3132, -1, + // "finally" + (tt._finally << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fo" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3186, -1, -1, -1, -1, -1, -1, -1, -1, + // "for" + (tt._for << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fr" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3240, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fro" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3267, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "from" + ContextualKeyword._from << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fu" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3321, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fun" + -1, -1, -1, 3348, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "func" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3375, -1, -1, -1, -1, -1, -1, + // "funct" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 3402, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "functi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3429, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "functio" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3456, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "function" + (tt._function << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "g" + -1, -1, -1, -1, -1, 3510, -1, -1, -1, -1, -1, -1, 3564, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ge" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3537, -1, -1, -1, -1, -1, -1, + // "get" + ContextualKeyword._get << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "gl" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3591, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "glo" + -1, -1, 3618, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "glob" + -1, 3645, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "globa" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3672, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "global" + ContextualKeyword._global << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "i" + -1, -1, -1, -1, -1, -1, 3726, -1, -1, -1, -1, -1, -1, 3753, 4077, -1, -1, -1, -1, 4590, -1, -1, -1, -1, -1, -1, -1, + // "if" + (tt._if << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "im" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3780, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "imp" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3807, -1, -1, 3996, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "impl" + -1, -1, -1, -1, -1, 3834, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "imple" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3861, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "implem" + -1, -1, -1, -1, -1, 3888, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "impleme" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3915, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "implemen" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3942, -1, -1, -1, -1, -1, -1, + // "implement" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3969, -1, -1, -1, -1, -1, -1, -1, + // "implements" + ContextualKeyword._implements << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "impo" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4023, -1, -1, -1, -1, -1, -1, -1, -1, + // "impor" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4050, -1, -1, -1, -1, -1, -1, + // "import" + (tt._import << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "in" + (tt._in << 1) + 1, -1, -1, -1, -1, -1, 4104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4185, 4401, -1, -1, -1, -1, -1, -1, + // "inf" + -1, -1, -1, -1, -1, 4131, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "infe" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4158, -1, -1, -1, -1, -1, -1, -1, -1, + // "infer" + ContextualKeyword._infer << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ins" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4212, -1, -1, -1, -1, -1, -1, + // "inst" + -1, 4239, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "insta" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4266, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "instan" + -1, -1, -1, 4293, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "instanc" + -1, -1, -1, -1, -1, 4320, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "instance" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4347, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "instanceo" + -1, -1, -1, -1, -1, -1, 4374, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "instanceof" + (tt._instanceof << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "int" + -1, -1, -1, -1, -1, 4428, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "inte" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4455, -1, -1, -1, -1, -1, -1, -1, -1, + // "inter" + -1, -1, -1, -1, -1, -1, 4482, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "interf" + -1, 4509, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "interfa" + -1, -1, -1, 4536, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "interfac" + -1, -1, -1, -1, -1, 4563, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "interface" + ContextualKeyword._interface << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "is" + ContextualKeyword._is << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "k" + -1, -1, -1, -1, -1, 4644, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ke" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4671, -1, + // "key" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4698, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "keyo" + -1, -1, -1, -1, -1, -1, 4725, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "keyof" + ContextualKeyword._keyof << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "l" + -1, -1, -1, -1, -1, 4779, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "le" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4806, -1, -1, -1, -1, -1, -1, + // "let" + (tt._let << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "m" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 4860, -1, -1, -1, -1, -1, 4995, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "mi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4887, -1, -1, + // "mix" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 4914, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "mixi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4941, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "mixin" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4968, -1, -1, -1, -1, -1, -1, -1, + // "mixins" + ContextualKeyword._mixins << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "mo" + -1, -1, -1, -1, 5022, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "mod" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5049, -1, -1, -1, -1, -1, + // "modu" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5076, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "modul" + -1, -1, -1, -1, -1, 5103, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "module" + ContextualKeyword._module << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "n" + -1, 5157, -1, -1, -1, 5373, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5427, -1, -1, -1, -1, -1, + // "na" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5184, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "nam" + -1, -1, -1, -1, -1, 5211, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "name" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5238, -1, -1, -1, -1, -1, -1, -1, + // "names" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5265, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "namesp" + -1, 5292, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "namespa" + -1, -1, -1, 5319, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "namespac" + -1, -1, -1, -1, -1, 5346, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "namespace" + ContextualKeyword._namespace << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ne" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5400, -1, -1, -1, + // "new" + (tt._new << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "nu" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5454, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "nul" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5481, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "null" + (tt._null << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "o" + -1, -1, -1, -1, -1, -1, 5535, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5562, -1, -1, -1, -1, 5697, 5751, -1, -1, -1, -1, + // "of" + ContextualKeyword._of << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "op" + -1, 5589, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "opa" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5616, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "opaq" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5643, -1, -1, -1, -1, -1, + // "opaqu" + -1, -1, -1, -1, -1, 5670, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "opaque" + ContextualKeyword._opaque << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ou" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5724, -1, -1, -1, -1, -1, -1, + // "out" + ContextualKeyword._out << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ov" + -1, -1, -1, -1, -1, 5778, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ove" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5805, -1, -1, -1, -1, -1, -1, -1, -1, + // "over" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5832, -1, -1, -1, -1, -1, -1, -1, -1, + // "overr" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 5859, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "overri" + -1, -1, -1, -1, 5886, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "overrid" + -1, -1, -1, -1, -1, 5913, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "override" + ContextualKeyword._override << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "p" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5967, -1, -1, 6345, -1, -1, -1, -1, -1, + // "pr" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 5994, -1, -1, -1, -1, -1, 6129, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "pri" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6021, -1, -1, -1, -1, + // "priv" + -1, 6048, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "priva" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6075, -1, -1, -1, -1, -1, -1, + // "privat" + -1, -1, -1, -1, -1, 6102, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "private" + ContextualKeyword._private << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "pro" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6156, -1, -1, -1, -1, -1, -1, + // "prot" + -1, -1, -1, -1, -1, 6183, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6318, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "prote" + -1, -1, -1, 6210, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "protec" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6237, -1, -1, -1, -1, -1, -1, + // "protect" + -1, -1, -1, -1, -1, 6264, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "protecte" + -1, -1, -1, -1, 6291, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "protected" + ContextualKeyword._protected << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "proto" + ContextualKeyword._proto << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "pu" + -1, -1, 6372, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "pub" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6399, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "publ" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 6426, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "publi" + -1, -1, -1, 6453, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "public" + ContextualKeyword._public << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "r" + -1, -1, -1, -1, -1, 6507, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "re" + -1, 6534, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6696, -1, -1, 6831, -1, -1, -1, -1, -1, -1, + // "rea" + -1, -1, -1, -1, 6561, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "read" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6588, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "reado" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6615, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "readon" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6642, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "readonl" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6669, -1, + // "readonly" + ContextualKeyword._readonly << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "req" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6723, -1, -1, -1, -1, -1, + // "requ" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 6750, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "requi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6777, -1, -1, -1, -1, -1, -1, -1, -1, + // "requir" + -1, -1, -1, -1, -1, 6804, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "require" + ContextualKeyword._require << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ret" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6858, -1, -1, -1, -1, -1, + // "retu" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6885, -1, -1, -1, -1, -1, -1, -1, -1, + // "retur" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6912, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "return" + (tt._return << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "s" + -1, 6966, -1, -1, -1, 7182, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7236, 7371, -1, 7479, -1, 7614, -1, + // "sa" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6993, -1, -1, -1, -1, -1, -1, + // "sat" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 7020, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "sati" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7047, -1, -1, -1, -1, -1, -1, -1, + // "satis" + -1, -1, -1, -1, -1, -1, 7074, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "satisf" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 7101, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "satisfi" + -1, -1, -1, -1, -1, 7128, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "satisfie" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7155, -1, -1, -1, -1, -1, -1, -1, + // "satisfies" + ContextualKeyword._satisfies << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "se" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7209, -1, -1, -1, -1, -1, -1, + // "set" + ContextualKeyword._set << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "st" + -1, 7263, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "sta" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7290, -1, -1, -1, -1, -1, -1, + // "stat" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 7317, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "stati" + -1, -1, -1, 7344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "static" + ContextualKeyword._static << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "su" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7398, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "sup" + -1, -1, -1, -1, -1, 7425, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "supe" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7452, -1, -1, -1, -1, -1, -1, -1, -1, + // "super" + (tt._super << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "sw" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 7506, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "swi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7533, -1, -1, -1, -1, -1, -1, + // "swit" + -1, -1, -1, 7560, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "switc" + -1, -1, -1, -1, -1, -1, -1, -1, 7587, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "switch" + (tt._switch << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "sy" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7641, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "sym" + -1, -1, 7668, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "symb" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7695, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "symbo" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7722, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "symbol" + ContextualKeyword._symbol << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "t" + -1, -1, -1, -1, -1, -1, -1, -1, 7776, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7938, -1, -1, -1, -1, -1, -1, 8046, -1, + // "th" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 7803, -1, -1, -1, -1, -1, -1, -1, -1, 7857, -1, -1, -1, -1, -1, -1, -1, -1, + // "thi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7830, -1, -1, -1, -1, -1, -1, -1, + // "this" + (tt._this << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "thr" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7884, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "thro" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7911, -1, -1, -1, + // "throw" + (tt._throw << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "tr" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7965, -1, -1, -1, 8019, -1, + // "tru" + -1, -1, -1, -1, -1, 7992, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "true" + (tt._true << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "try" + (tt._try << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ty" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8073, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "typ" + -1, -1, -1, -1, -1, 8100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "type" + ContextualKeyword._type << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8127, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "typeo" + -1, -1, -1, -1, -1, -1, 8154, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "typeof" + (tt._typeof << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "u" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8208, -1, -1, -1, -1, 8343, -1, -1, -1, -1, -1, -1, -1, + // "un" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8235, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "uni" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8262, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "uniq" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8289, -1, -1, -1, -1, -1, + // "uniqu" + -1, -1, -1, -1, -1, 8316, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "unique" + ContextualKeyword._unique << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "us" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8370, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "usi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8397, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "usin" + -1, -1, -1, -1, -1, -1, -1, 8424, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "using" + ContextualKeyword._using << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "v" + -1, 8478, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8532, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "va" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8505, -1, -1, -1, -1, -1, -1, -1, -1, + // "var" + (tt._var << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "vo" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8559, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "voi" + -1, -1, -1, -1, 8586, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "void" + (tt._void << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "w" + -1, -1, -1, -1, -1, -1, -1, -1, 8640, 8748, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "wh" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8667, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "whi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8694, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "whil" + -1, -1, -1, -1, -1, 8721, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "while" + (tt._while << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "wi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8775, -1, -1, -1, -1, -1, -1, + // "wit" + -1, -1, -1, -1, -1, -1, -1, -1, 8802, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "with" + (tt._with << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "y" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8856, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "yi" + -1, -1, -1, -1, -1, 8883, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "yie" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8910, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "yiel" + -1, -1, -1, -1, 8937, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "yield" + (tt._yield << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, +]); diff --git a/node_modules/sucrase/dist/esm/parser/tokenizer/state.js b/node_modules/sucrase/dist/esm/parser/tokenizer/state.js new file mode 100644 index 0000000..940cde0 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/tokenizer/state.js @@ -0,0 +1,106 @@ + +import {ContextualKeyword} from "./keywords"; +import { TokenType as tt} from "./types"; + +export class Scope { + + + + + constructor(startTokenIndex, endTokenIndex, isFunctionScope) { + this.startTokenIndex = startTokenIndex; + this.endTokenIndex = endTokenIndex; + this.isFunctionScope = isFunctionScope; + } +} + +export class StateSnapshot { + constructor( + potentialArrowAt, + noAnonFunctionType, + inDisallowConditionalTypesContext, + tokensLength, + scopesLength, + pos, + type, + contextualKeyword, + start, + end, + isType, + scopeDepth, + error, + ) {;this.potentialArrowAt = potentialArrowAt;this.noAnonFunctionType = noAnonFunctionType;this.inDisallowConditionalTypesContext = inDisallowConditionalTypesContext;this.tokensLength = tokensLength;this.scopesLength = scopesLength;this.pos = pos;this.type = type;this.contextualKeyword = contextualKeyword;this.start = start;this.end = end;this.isType = isType;this.scopeDepth = scopeDepth;this.error = error;} +} + +export default class State {constructor() { State.prototype.__init.call(this);State.prototype.__init2.call(this);State.prototype.__init3.call(this);State.prototype.__init4.call(this);State.prototype.__init5.call(this);State.prototype.__init6.call(this);State.prototype.__init7.call(this);State.prototype.__init8.call(this);State.prototype.__init9.call(this);State.prototype.__init10.call(this);State.prototype.__init11.call(this);State.prototype.__init12.call(this);State.prototype.__init13.call(this); } + // Used to signify the start of a potential arrow function + __init() {this.potentialArrowAt = -1} + + // Used by Flow to handle an edge case involving function type parsing. + __init2() {this.noAnonFunctionType = false} + + // Used by TypeScript to handle ambiguities when parsing conditional types. + __init3() {this.inDisallowConditionalTypesContext = false} + + // Token store. + __init4() {this.tokens = []} + + // Array of all observed scopes, ordered by their ending position. + __init5() {this.scopes = []} + + // The current position of the tokenizer in the input. + __init6() {this.pos = 0} + + // Information about the current token. + __init7() {this.type = tt.eof} + __init8() {this.contextualKeyword = ContextualKeyword.NONE} + __init9() {this.start = 0} + __init10() {this.end = 0} + + __init11() {this.isType = false} + __init12() {this.scopeDepth = 0} + + /** + * If the parser is in an error state, then the token is always tt.eof and all functions can + * keep executing but should be written so they don't get into an infinite loop in this situation. + * + * This approach, combined with the ability to snapshot and restore state, allows us to implement + * backtracking without exceptions and without needing to explicitly propagate error states + * everywhere. + */ + __init13() {this.error = null} + + snapshot() { + return new StateSnapshot( + this.potentialArrowAt, + this.noAnonFunctionType, + this.inDisallowConditionalTypesContext, + this.tokens.length, + this.scopes.length, + this.pos, + this.type, + this.contextualKeyword, + this.start, + this.end, + this.isType, + this.scopeDepth, + this.error, + ); + } + + restoreFromSnapshot(snapshot) { + this.potentialArrowAt = snapshot.potentialArrowAt; + this.noAnonFunctionType = snapshot.noAnonFunctionType; + this.inDisallowConditionalTypesContext = snapshot.inDisallowConditionalTypesContext; + this.tokens.length = snapshot.tokensLength; + this.scopes.length = snapshot.scopesLength; + this.pos = snapshot.pos; + this.type = snapshot.type; + this.contextualKeyword = snapshot.contextualKeyword; + this.start = snapshot.start; + this.end = snapshot.end; + this.isType = snapshot.isType; + this.scopeDepth = snapshot.scopeDepth; + this.error = snapshot.error; + } +} diff --git a/node_modules/sucrase/dist/esm/parser/tokenizer/types.js b/node_modules/sucrase/dist/esm/parser/tokenizer/types.js new file mode 100644 index 0000000..9746ad6 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/tokenizer/types.js @@ -0,0 +1,361 @@ +// Generated file, do not edit! Run "yarn generate" to re-generate this file. +/* istanbul ignore file */ +/** + * Enum of all token types, with bit fields to signify meaningful properties. + */ +export var TokenType; (function (TokenType) { + // Precedence 0 means not an operator; otherwise it is a positive number up to 12. + const PRECEDENCE_MASK = 0xf; TokenType[TokenType["PRECEDENCE_MASK"] = PRECEDENCE_MASK] = "PRECEDENCE_MASK"; + const IS_KEYWORD = 1 << 4; TokenType[TokenType["IS_KEYWORD"] = IS_KEYWORD] = "IS_KEYWORD"; + const IS_ASSIGN = 1 << 5; TokenType[TokenType["IS_ASSIGN"] = IS_ASSIGN] = "IS_ASSIGN"; + const IS_RIGHT_ASSOCIATIVE = 1 << 6; TokenType[TokenType["IS_RIGHT_ASSOCIATIVE"] = IS_RIGHT_ASSOCIATIVE] = "IS_RIGHT_ASSOCIATIVE"; + const IS_PREFIX = 1 << 7; TokenType[TokenType["IS_PREFIX"] = IS_PREFIX] = "IS_PREFIX"; + const IS_POSTFIX = 1 << 8; TokenType[TokenType["IS_POSTFIX"] = IS_POSTFIX] = "IS_POSTFIX"; + const IS_EXPRESSION_START = 1 << 9; TokenType[TokenType["IS_EXPRESSION_START"] = IS_EXPRESSION_START] = "IS_EXPRESSION_START"; + + const num = 512; TokenType[TokenType["num"] = num] = "num"; // num startsExpr + const bigint = 1536; TokenType[TokenType["bigint"] = bigint] = "bigint"; // bigint startsExpr + const decimal = 2560; TokenType[TokenType["decimal"] = decimal] = "decimal"; // decimal startsExpr + const regexp = 3584; TokenType[TokenType["regexp"] = regexp] = "regexp"; // regexp startsExpr + const string = 4608; TokenType[TokenType["string"] = string] = "string"; // string startsExpr + const name = 5632; TokenType[TokenType["name"] = name] = "name"; // name startsExpr + const eof = 6144; TokenType[TokenType["eof"] = eof] = "eof"; // eof + const bracketL = 7680; TokenType[TokenType["bracketL"] = bracketL] = "bracketL"; // [ startsExpr + const bracketR = 8192; TokenType[TokenType["bracketR"] = bracketR] = "bracketR"; // ] + const braceL = 9728; TokenType[TokenType["braceL"] = braceL] = "braceL"; // { startsExpr + const braceBarL = 10752; TokenType[TokenType["braceBarL"] = braceBarL] = "braceBarL"; // {| startsExpr + const braceR = 11264; TokenType[TokenType["braceR"] = braceR] = "braceR"; // } + const braceBarR = 12288; TokenType[TokenType["braceBarR"] = braceBarR] = "braceBarR"; // |} + const parenL = 13824; TokenType[TokenType["parenL"] = parenL] = "parenL"; // ( startsExpr + const parenR = 14336; TokenType[TokenType["parenR"] = parenR] = "parenR"; // ) + const comma = 15360; TokenType[TokenType["comma"] = comma] = "comma"; // , + const semi = 16384; TokenType[TokenType["semi"] = semi] = "semi"; // ; + const colon = 17408; TokenType[TokenType["colon"] = colon] = "colon"; // : + const doubleColon = 18432; TokenType[TokenType["doubleColon"] = doubleColon] = "doubleColon"; // :: + const dot = 19456; TokenType[TokenType["dot"] = dot] = "dot"; // . + const question = 20480; TokenType[TokenType["question"] = question] = "question"; // ? + const questionDot = 21504; TokenType[TokenType["questionDot"] = questionDot] = "questionDot"; // ?. + const arrow = 22528; TokenType[TokenType["arrow"] = arrow] = "arrow"; // => + const template = 23552; TokenType[TokenType["template"] = template] = "template"; // template + const ellipsis = 24576; TokenType[TokenType["ellipsis"] = ellipsis] = "ellipsis"; // ... + const backQuote = 25600; TokenType[TokenType["backQuote"] = backQuote] = "backQuote"; // ` + const dollarBraceL = 27136; TokenType[TokenType["dollarBraceL"] = dollarBraceL] = "dollarBraceL"; // ${ startsExpr + const at = 27648; TokenType[TokenType["at"] = at] = "at"; // @ + const hash = 29184; TokenType[TokenType["hash"] = hash] = "hash"; // # startsExpr + const eq = 29728; TokenType[TokenType["eq"] = eq] = "eq"; // = isAssign + const assign = 30752; TokenType[TokenType["assign"] = assign] = "assign"; // _= isAssign + const preIncDec = 32640; TokenType[TokenType["preIncDec"] = preIncDec] = "preIncDec"; // ++/-- prefix postfix startsExpr + const postIncDec = 33664; TokenType[TokenType["postIncDec"] = postIncDec] = "postIncDec"; // ++/-- prefix postfix startsExpr + const bang = 34432; TokenType[TokenType["bang"] = bang] = "bang"; // ! prefix startsExpr + const tilde = 35456; TokenType[TokenType["tilde"] = tilde] = "tilde"; // ~ prefix startsExpr + const pipeline = 35841; TokenType[TokenType["pipeline"] = pipeline] = "pipeline"; // |> prec:1 + const nullishCoalescing = 36866; TokenType[TokenType["nullishCoalescing"] = nullishCoalescing] = "nullishCoalescing"; // ?? prec:2 + const logicalOR = 37890; TokenType[TokenType["logicalOR"] = logicalOR] = "logicalOR"; // || prec:2 + const logicalAND = 38915; TokenType[TokenType["logicalAND"] = logicalAND] = "logicalAND"; // && prec:3 + const bitwiseOR = 39940; TokenType[TokenType["bitwiseOR"] = bitwiseOR] = "bitwiseOR"; // | prec:4 + const bitwiseXOR = 40965; TokenType[TokenType["bitwiseXOR"] = bitwiseXOR] = "bitwiseXOR"; // ^ prec:5 + const bitwiseAND = 41990; TokenType[TokenType["bitwiseAND"] = bitwiseAND] = "bitwiseAND"; // & prec:6 + const equality = 43015; TokenType[TokenType["equality"] = equality] = "equality"; // ==/!= prec:7 + const lessThan = 44040; TokenType[TokenType["lessThan"] = lessThan] = "lessThan"; // < prec:8 + const greaterThan = 45064; TokenType[TokenType["greaterThan"] = greaterThan] = "greaterThan"; // > prec:8 + const relationalOrEqual = 46088; TokenType[TokenType["relationalOrEqual"] = relationalOrEqual] = "relationalOrEqual"; // <=/>= prec:8 + const bitShiftL = 47113; TokenType[TokenType["bitShiftL"] = bitShiftL] = "bitShiftL"; // << prec:9 + const bitShiftR = 48137; TokenType[TokenType["bitShiftR"] = bitShiftR] = "bitShiftR"; // >>/>>> prec:9 + const plus = 49802; TokenType[TokenType["plus"] = plus] = "plus"; // + prec:10 prefix startsExpr + const minus = 50826; TokenType[TokenType["minus"] = minus] = "minus"; // - prec:10 prefix startsExpr + const modulo = 51723; TokenType[TokenType["modulo"] = modulo] = "modulo"; // % prec:11 startsExpr + const star = 52235; TokenType[TokenType["star"] = star] = "star"; // * prec:11 + const slash = 53259; TokenType[TokenType["slash"] = slash] = "slash"; // / prec:11 + const exponent = 54348; TokenType[TokenType["exponent"] = exponent] = "exponent"; // ** prec:12 rightAssociative + const jsxName = 55296; TokenType[TokenType["jsxName"] = jsxName] = "jsxName"; // jsxName + const jsxText = 56320; TokenType[TokenType["jsxText"] = jsxText] = "jsxText"; // jsxText + const jsxEmptyText = 57344; TokenType[TokenType["jsxEmptyText"] = jsxEmptyText] = "jsxEmptyText"; // jsxEmptyText + const jsxTagStart = 58880; TokenType[TokenType["jsxTagStart"] = jsxTagStart] = "jsxTagStart"; // jsxTagStart startsExpr + const jsxTagEnd = 59392; TokenType[TokenType["jsxTagEnd"] = jsxTagEnd] = "jsxTagEnd"; // jsxTagEnd + const typeParameterStart = 60928; TokenType[TokenType["typeParameterStart"] = typeParameterStart] = "typeParameterStart"; // typeParameterStart startsExpr + const nonNullAssertion = 61440; TokenType[TokenType["nonNullAssertion"] = nonNullAssertion] = "nonNullAssertion"; // nonNullAssertion + const _break = 62480; TokenType[TokenType["_break"] = _break] = "_break"; // break keyword + const _case = 63504; TokenType[TokenType["_case"] = _case] = "_case"; // case keyword + const _catch = 64528; TokenType[TokenType["_catch"] = _catch] = "_catch"; // catch keyword + const _continue = 65552; TokenType[TokenType["_continue"] = _continue] = "_continue"; // continue keyword + const _debugger = 66576; TokenType[TokenType["_debugger"] = _debugger] = "_debugger"; // debugger keyword + const _default = 67600; TokenType[TokenType["_default"] = _default] = "_default"; // default keyword + const _do = 68624; TokenType[TokenType["_do"] = _do] = "_do"; // do keyword + const _else = 69648; TokenType[TokenType["_else"] = _else] = "_else"; // else keyword + const _finally = 70672; TokenType[TokenType["_finally"] = _finally] = "_finally"; // finally keyword + const _for = 71696; TokenType[TokenType["_for"] = _for] = "_for"; // for keyword + const _function = 73232; TokenType[TokenType["_function"] = _function] = "_function"; // function keyword startsExpr + const _if = 73744; TokenType[TokenType["_if"] = _if] = "_if"; // if keyword + const _return = 74768; TokenType[TokenType["_return"] = _return] = "_return"; // return keyword + const _switch = 75792; TokenType[TokenType["_switch"] = _switch] = "_switch"; // switch keyword + const _throw = 77456; TokenType[TokenType["_throw"] = _throw] = "_throw"; // throw keyword prefix startsExpr + const _try = 77840; TokenType[TokenType["_try"] = _try] = "_try"; // try keyword + const _var = 78864; TokenType[TokenType["_var"] = _var] = "_var"; // var keyword + const _let = 79888; TokenType[TokenType["_let"] = _let] = "_let"; // let keyword + const _const = 80912; TokenType[TokenType["_const"] = _const] = "_const"; // const keyword + const _while = 81936; TokenType[TokenType["_while"] = _while] = "_while"; // while keyword + const _with = 82960; TokenType[TokenType["_with"] = _with] = "_with"; // with keyword + const _new = 84496; TokenType[TokenType["_new"] = _new] = "_new"; // new keyword startsExpr + const _this = 85520; TokenType[TokenType["_this"] = _this] = "_this"; // this keyword startsExpr + const _super = 86544; TokenType[TokenType["_super"] = _super] = "_super"; // super keyword startsExpr + const _class = 87568; TokenType[TokenType["_class"] = _class] = "_class"; // class keyword startsExpr + const _extends = 88080; TokenType[TokenType["_extends"] = _extends] = "_extends"; // extends keyword + const _export = 89104; TokenType[TokenType["_export"] = _export] = "_export"; // export keyword + const _import = 90640; TokenType[TokenType["_import"] = _import] = "_import"; // import keyword startsExpr + const _yield = 91664; TokenType[TokenType["_yield"] = _yield] = "_yield"; // yield keyword startsExpr + const _null = 92688; TokenType[TokenType["_null"] = _null] = "_null"; // null keyword startsExpr + const _true = 93712; TokenType[TokenType["_true"] = _true] = "_true"; // true keyword startsExpr + const _false = 94736; TokenType[TokenType["_false"] = _false] = "_false"; // false keyword startsExpr + const _in = 95256; TokenType[TokenType["_in"] = _in] = "_in"; // in prec:8 keyword + const _instanceof = 96280; TokenType[TokenType["_instanceof"] = _instanceof] = "_instanceof"; // instanceof prec:8 keyword + const _typeof = 97936; TokenType[TokenType["_typeof"] = _typeof] = "_typeof"; // typeof keyword prefix startsExpr + const _void = 98960; TokenType[TokenType["_void"] = _void] = "_void"; // void keyword prefix startsExpr + const _delete = 99984; TokenType[TokenType["_delete"] = _delete] = "_delete"; // delete keyword prefix startsExpr + const _async = 100880; TokenType[TokenType["_async"] = _async] = "_async"; // async keyword startsExpr + const _get = 101904; TokenType[TokenType["_get"] = _get] = "_get"; // get keyword startsExpr + const _set = 102928; TokenType[TokenType["_set"] = _set] = "_set"; // set keyword startsExpr + const _declare = 103952; TokenType[TokenType["_declare"] = _declare] = "_declare"; // declare keyword startsExpr + const _readonly = 104976; TokenType[TokenType["_readonly"] = _readonly] = "_readonly"; // readonly keyword startsExpr + const _abstract = 106000; TokenType[TokenType["_abstract"] = _abstract] = "_abstract"; // abstract keyword startsExpr + const _static = 107024; TokenType[TokenType["_static"] = _static] = "_static"; // static keyword startsExpr + const _public = 107536; TokenType[TokenType["_public"] = _public] = "_public"; // public keyword + const _private = 108560; TokenType[TokenType["_private"] = _private] = "_private"; // private keyword + const _protected = 109584; TokenType[TokenType["_protected"] = _protected] = "_protected"; // protected keyword + const _override = 110608; TokenType[TokenType["_override"] = _override] = "_override"; // override keyword + const _as = 112144; TokenType[TokenType["_as"] = _as] = "_as"; // as keyword startsExpr + const _enum = 113168; TokenType[TokenType["_enum"] = _enum] = "_enum"; // enum keyword startsExpr + const _type = 114192; TokenType[TokenType["_type"] = _type] = "_type"; // type keyword startsExpr + const _implements = 115216; TokenType[TokenType["_implements"] = _implements] = "_implements"; // implements keyword startsExpr +})(TokenType || (TokenType = {})); +export function formatTokenType(tokenType) { + switch (tokenType) { + case TokenType.num: + return "num"; + case TokenType.bigint: + return "bigint"; + case TokenType.decimal: + return "decimal"; + case TokenType.regexp: + return "regexp"; + case TokenType.string: + return "string"; + case TokenType.name: + return "name"; + case TokenType.eof: + return "eof"; + case TokenType.bracketL: + return "["; + case TokenType.bracketR: + return "]"; + case TokenType.braceL: + return "{"; + case TokenType.braceBarL: + return "{|"; + case TokenType.braceR: + return "}"; + case TokenType.braceBarR: + return "|}"; + case TokenType.parenL: + return "("; + case TokenType.parenR: + return ")"; + case TokenType.comma: + return ","; + case TokenType.semi: + return ";"; + case TokenType.colon: + return ":"; + case TokenType.doubleColon: + return "::"; + case TokenType.dot: + return "."; + case TokenType.question: + return "?"; + case TokenType.questionDot: + return "?."; + case TokenType.arrow: + return "=>"; + case TokenType.template: + return "template"; + case TokenType.ellipsis: + return "..."; + case TokenType.backQuote: + return "`"; + case TokenType.dollarBraceL: + return "${"; + case TokenType.at: + return "@"; + case TokenType.hash: + return "#"; + case TokenType.eq: + return "="; + case TokenType.assign: + return "_="; + case TokenType.preIncDec: + return "++/--"; + case TokenType.postIncDec: + return "++/--"; + case TokenType.bang: + return "!"; + case TokenType.tilde: + return "~"; + case TokenType.pipeline: + return "|>"; + case TokenType.nullishCoalescing: + return "??"; + case TokenType.logicalOR: + return "||"; + case TokenType.logicalAND: + return "&&"; + case TokenType.bitwiseOR: + return "|"; + case TokenType.bitwiseXOR: + return "^"; + case TokenType.bitwiseAND: + return "&"; + case TokenType.equality: + return "==/!="; + case TokenType.lessThan: + return "<"; + case TokenType.greaterThan: + return ">"; + case TokenType.relationalOrEqual: + return "<=/>="; + case TokenType.bitShiftL: + return "<<"; + case TokenType.bitShiftR: + return ">>/>>>"; + case TokenType.plus: + return "+"; + case TokenType.minus: + return "-"; + case TokenType.modulo: + return "%"; + case TokenType.star: + return "*"; + case TokenType.slash: + return "/"; + case TokenType.exponent: + return "**"; + case TokenType.jsxName: + return "jsxName"; + case TokenType.jsxText: + return "jsxText"; + case TokenType.jsxEmptyText: + return "jsxEmptyText"; + case TokenType.jsxTagStart: + return "jsxTagStart"; + case TokenType.jsxTagEnd: + return "jsxTagEnd"; + case TokenType.typeParameterStart: + return "typeParameterStart"; + case TokenType.nonNullAssertion: + return "nonNullAssertion"; + case TokenType._break: + return "break"; + case TokenType._case: + return "case"; + case TokenType._catch: + return "catch"; + case TokenType._continue: + return "continue"; + case TokenType._debugger: + return "debugger"; + case TokenType._default: + return "default"; + case TokenType._do: + return "do"; + case TokenType._else: + return "else"; + case TokenType._finally: + return "finally"; + case TokenType._for: + return "for"; + case TokenType._function: + return "function"; + case TokenType._if: + return "if"; + case TokenType._return: + return "return"; + case TokenType._switch: + return "switch"; + case TokenType._throw: + return "throw"; + case TokenType._try: + return "try"; + case TokenType._var: + return "var"; + case TokenType._let: + return "let"; + case TokenType._const: + return "const"; + case TokenType._while: + return "while"; + case TokenType._with: + return "with"; + case TokenType._new: + return "new"; + case TokenType._this: + return "this"; + case TokenType._super: + return "super"; + case TokenType._class: + return "class"; + case TokenType._extends: + return "extends"; + case TokenType._export: + return "export"; + case TokenType._import: + return "import"; + case TokenType._yield: + return "yield"; + case TokenType._null: + return "null"; + case TokenType._true: + return "true"; + case TokenType._false: + return "false"; + case TokenType._in: + return "in"; + case TokenType._instanceof: + return "instanceof"; + case TokenType._typeof: + return "typeof"; + case TokenType._void: + return "void"; + case TokenType._delete: + return "delete"; + case TokenType._async: + return "async"; + case TokenType._get: + return "get"; + case TokenType._set: + return "set"; + case TokenType._declare: + return "declare"; + case TokenType._readonly: + return "readonly"; + case TokenType._abstract: + return "abstract"; + case TokenType._static: + return "static"; + case TokenType._public: + return "public"; + case TokenType._private: + return "private"; + case TokenType._protected: + return "protected"; + case TokenType._override: + return "override"; + case TokenType._as: + return "as"; + case TokenType._enum: + return "enum"; + case TokenType._type: + return "type"; + case TokenType._implements: + return "implements"; + default: + return ""; + } +} diff --git a/node_modules/sucrase/dist/esm/parser/traverser/base.js b/node_modules/sucrase/dist/esm/parser/traverser/base.js new file mode 100644 index 0000000..df24ff7 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/traverser/base.js @@ -0,0 +1,60 @@ +import State from "../tokenizer/state"; +import {charCodes} from "../util/charcodes"; + +export let isJSXEnabled; +export let isTypeScriptEnabled; +export let isFlowEnabled; +export let state; +export let input; +export let nextContextId; + +export function getNextContextId() { + return nextContextId++; +} + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export function augmentError(error) { + if ("pos" in error) { + const loc = locationForIndex(error.pos); + error.message += ` (${loc.line}:${loc.column})`; + error.loc = loc; + } + return error; +} + +export class Loc { + + + constructor(line, column) { + this.line = line; + this.column = column; + } +} + +export function locationForIndex(pos) { + let line = 1; + let column = 1; + for (let i = 0; i < pos; i++) { + if (input.charCodeAt(i) === charCodes.lineFeed) { + line++; + column = 1; + } else { + column++; + } + } + return new Loc(line, column); +} + +export function initParser( + inputCode, + isJSXEnabledArg, + isTypeScriptEnabledArg, + isFlowEnabledArg, +) { + input = inputCode; + state = new State(); + nextContextId = 1; + isJSXEnabled = isJSXEnabledArg; + isTypeScriptEnabled = isTypeScriptEnabledArg; + isFlowEnabled = isFlowEnabledArg; +} diff --git a/node_modules/sucrase/dist/esm/parser/traverser/expression.js b/node_modules/sucrase/dist/esm/parser/traverser/expression.js new file mode 100644 index 0000000..aa6717f --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/traverser/expression.js @@ -0,0 +1,1022 @@ +/* eslint max-len: 0 */ + +// A recursive descent parser operates by defining functions for all +// syntactic elements, and recursively calling those, each function +// advancing the input stream and returning an AST node. Precedence +// of constructs (for example, the fact that `!x[1]` means `!(x[1])` +// instead of `(!x)[1]` is handled by the fact that the parser +// function that parses unary prefix operators is called first, and +// in turn calls the function that parses `[]` subscripts — that +// way, it'll receive the node for `x[1]` already parsed, and wraps +// *that* in the unary operator node. +// +// Acorn uses an [operator precedence parser][opp] to handle binary +// operator precedence, because it is much more compact than using +// the technique outlined above, which uses different, nesting +// functions to specify precedence, for all of the ten binary +// precedence levels that JavaScript defines. +// +// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser + +import { + flowParseArrow, + flowParseFunctionBodyAndFinish, + flowParseMaybeAssign, + flowParseSubscript, + flowParseSubscripts, + flowParseVariance, + flowStartParseAsyncArrowFromCallExpression, + flowStartParseNewArguments, + flowStartParseObjPropValue, +} from "../plugins/flow"; +import {jsxParseElement} from "../plugins/jsx/index"; +import {typedParseConditional, typedParseParenItem} from "../plugins/types"; +import { + tsParseArrow, + tsParseFunctionBodyAndFinish, + tsParseMaybeAssign, + tsParseSubscript, + tsParseType, + tsParseTypeAssertion, + tsStartParseAsyncArrowFromCallExpression, + tsStartParseObjPropValue, +} from "../plugins/typescript"; +import { + eat, + IdentifierRole, + lookaheadCharCode, + lookaheadType, + match, + next, + nextTemplateToken, + popTypeContext, + pushTypeContext, + rescan_gt, + retokenizeSlashAsRegex, +} from "../tokenizer/index"; +import {ContextualKeyword} from "../tokenizer/keywords"; +import {Scope} from "../tokenizer/state"; +import {TokenType, TokenType as tt} from "../tokenizer/types"; +import {charCodes} from "../util/charcodes"; +import {IS_IDENTIFIER_START} from "../util/identifier"; +import {getNextContextId, isFlowEnabled, isJSXEnabled, isTypeScriptEnabled, state} from "./base"; +import { + markPriorBindingIdentifier, + parseBindingIdentifier, + parseMaybeDefault, + parseRest, + parseSpread, +} from "./lval"; +import { + parseBlock, + parseBlockBody, + parseClass, + parseDecorators, + parseFunction, + parseFunctionParams, +} from "./statement"; +import { + canInsertSemicolon, + eatContextual, + expect, + expectContextual, + hasFollowingLineBreak, + hasPrecedingLineBreak, + isContextual, + unexpected, +} from "./util"; + +export class StopState { + + constructor(stop) { + this.stop = stop; + } +} + +// ### Expression parsing + +// These nest, from the most general expression type at the top to +// 'atomic', nondivisible expression types at the bottom. Most of +// the functions will simply let the function (s) below them parse, +// and, *if* the syntactic construct they handle is present, wrap +// the AST node that the inner parser gave them in another node. +export function parseExpression(noIn = false) { + parseMaybeAssign(noIn); + if (match(tt.comma)) { + while (eat(tt.comma)) { + parseMaybeAssign(noIn); + } + } +} + +/** + * noIn is used when parsing a for loop so that we don't interpret a following "in" as the binary + * operatior. + * isWithinParens is used to indicate that we're parsing something that might be a comma expression + * or might be an arrow function or might be a Flow type assertion (which requires explicit parens). + * In these cases, we should allow : and ?: after the initial "left" part. + */ +export function parseMaybeAssign(noIn = false, isWithinParens = false) { + if (isTypeScriptEnabled) { + return tsParseMaybeAssign(noIn, isWithinParens); + } else if (isFlowEnabled) { + return flowParseMaybeAssign(noIn, isWithinParens); + } else { + return baseParseMaybeAssign(noIn, isWithinParens); + } +} + +// Parse an assignment expression. This includes applications of +// operators like `+=`. +// Returns true if the expression was an arrow function. +export function baseParseMaybeAssign(noIn, isWithinParens) { + if (match(tt._yield)) { + parseYield(); + return false; + } + + if (match(tt.parenL) || match(tt.name) || match(tt._yield)) { + state.potentialArrowAt = state.start; + } + + const wasArrow = parseMaybeConditional(noIn); + if (isWithinParens) { + parseParenItem(); + } + if (state.type & TokenType.IS_ASSIGN) { + next(); + parseMaybeAssign(noIn); + return false; + } + return wasArrow; +} + +// Parse a ternary conditional (`?:`) operator. +// Returns true if the expression was an arrow function. +function parseMaybeConditional(noIn) { + const wasArrow = parseExprOps(noIn); + if (wasArrow) { + return true; + } + parseConditional(noIn); + return false; +} + +function parseConditional(noIn) { + if (isTypeScriptEnabled || isFlowEnabled) { + typedParseConditional(noIn); + } else { + baseParseConditional(noIn); + } +} + +export function baseParseConditional(noIn) { + if (eat(tt.question)) { + parseMaybeAssign(); + expect(tt.colon); + parseMaybeAssign(noIn); + } +} + +// Start the precedence parser. +// Returns true if this was an arrow function +function parseExprOps(noIn) { + const startTokenIndex = state.tokens.length; + const wasArrow = parseMaybeUnary(); + if (wasArrow) { + return true; + } + parseExprOp(startTokenIndex, -1, noIn); + return false; +} + +// Parse binary operators with the operator precedence parsing +// algorithm. `left` is the left-hand side of the operator. +// `minPrec` provides context that allows the function to stop and +// defer further parser to one of its callers when it encounters an +// operator that has a lower precedence than the set it is parsing. +function parseExprOp(startTokenIndex, minPrec, noIn) { + if ( + isTypeScriptEnabled && + (tt._in & TokenType.PRECEDENCE_MASK) > minPrec && + !hasPrecedingLineBreak() && + (eatContextual(ContextualKeyword._as) || eatContextual(ContextualKeyword._satisfies)) + ) { + const oldIsType = pushTypeContext(1); + tsParseType(); + popTypeContext(oldIsType); + rescan_gt(); + parseExprOp(startTokenIndex, minPrec, noIn); + return; + } + + const prec = state.type & TokenType.PRECEDENCE_MASK; + if (prec > 0 && (!noIn || !match(tt._in))) { + if (prec > minPrec) { + const op = state.type; + next(); + if (op === tt.nullishCoalescing) { + state.tokens[state.tokens.length - 1].nullishStartIndex = startTokenIndex; + } + + const rhsStartTokenIndex = state.tokens.length; + parseMaybeUnary(); + // Extend the right operand of this operator if possible. + parseExprOp(rhsStartTokenIndex, op & TokenType.IS_RIGHT_ASSOCIATIVE ? prec - 1 : prec, noIn); + if (op === tt.nullishCoalescing) { + state.tokens[startTokenIndex].numNullishCoalesceStarts++; + state.tokens[state.tokens.length - 1].numNullishCoalesceEnds++; + } + // Continue with any future operator holding this expression as the left operand. + parseExprOp(startTokenIndex, minPrec, noIn); + } + } +} + +// Parse unary operators, both prefix and postfix. +// Returns true if this was an arrow function. +export function parseMaybeUnary() { + if (isTypeScriptEnabled && !isJSXEnabled && eat(tt.lessThan)) { + tsParseTypeAssertion(); + return false; + } + if ( + isContextual(ContextualKeyword._module) && + lookaheadCharCode() === charCodes.leftCurlyBrace && + !hasFollowingLineBreak() + ) { + parseModuleExpression(); + return false; + } + if (state.type & TokenType.IS_PREFIX) { + next(); + parseMaybeUnary(); + return false; + } + + const wasArrow = parseExprSubscripts(); + if (wasArrow) { + return true; + } + while (state.type & TokenType.IS_POSTFIX && !canInsertSemicolon()) { + // The tokenizer calls everything a preincrement, so make it a postincrement when + // we see it in that context. + if (state.type === tt.preIncDec) { + state.type = tt.postIncDec; + } + next(); + } + return false; +} + +// Parse call, dot, and `[]`-subscript expressions. +// Returns true if this was an arrow function. +export function parseExprSubscripts() { + const startTokenIndex = state.tokens.length; + const wasArrow = parseExprAtom(); + if (wasArrow) { + return true; + } + parseSubscripts(startTokenIndex); + // If there was any optional chain operation, the start token would be marked + // as such, so also mark the end now. + if (state.tokens.length > startTokenIndex && state.tokens[startTokenIndex].isOptionalChainStart) { + state.tokens[state.tokens.length - 1].isOptionalChainEnd = true; + } + return false; +} + +function parseSubscripts(startTokenIndex, noCalls = false) { + if (isFlowEnabled) { + flowParseSubscripts(startTokenIndex, noCalls); + } else { + baseParseSubscripts(startTokenIndex, noCalls); + } +} + +export function baseParseSubscripts(startTokenIndex, noCalls = false) { + const stopState = new StopState(false); + do { + parseSubscript(startTokenIndex, noCalls, stopState); + } while (!stopState.stop && !state.error); +} + +function parseSubscript(startTokenIndex, noCalls, stopState) { + if (isTypeScriptEnabled) { + tsParseSubscript(startTokenIndex, noCalls, stopState); + } else if (isFlowEnabled) { + flowParseSubscript(startTokenIndex, noCalls, stopState); + } else { + baseParseSubscript(startTokenIndex, noCalls, stopState); + } +} + +/** Set 'state.stop = true' to indicate that we should stop parsing subscripts. */ +export function baseParseSubscript( + startTokenIndex, + noCalls, + stopState, +) { + if (!noCalls && eat(tt.doubleColon)) { + parseNoCallExpr(); + stopState.stop = true; + // Propagate startTokenIndex so that `a::b?.()` will keep `a` as the first token. We may want + // to revisit this in the future when fully supporting bind syntax. + parseSubscripts(startTokenIndex, noCalls); + } else if (match(tt.questionDot)) { + state.tokens[startTokenIndex].isOptionalChainStart = true; + if (noCalls && lookaheadType() === tt.parenL) { + stopState.stop = true; + return; + } + next(); + state.tokens[state.tokens.length - 1].subscriptStartIndex = startTokenIndex; + + if (eat(tt.bracketL)) { + parseExpression(); + expect(tt.bracketR); + } else if (eat(tt.parenL)) { + parseCallExpressionArguments(); + } else { + parseMaybePrivateName(); + } + } else if (eat(tt.dot)) { + state.tokens[state.tokens.length - 1].subscriptStartIndex = startTokenIndex; + parseMaybePrivateName(); + } else if (eat(tt.bracketL)) { + state.tokens[state.tokens.length - 1].subscriptStartIndex = startTokenIndex; + parseExpression(); + expect(tt.bracketR); + } else if (!noCalls && match(tt.parenL)) { + if (atPossibleAsync()) { + // We see "async", but it's possible it's a usage of the name "async". Parse as if it's a + // function call, and if we see an arrow later, backtrack and re-parse as a parameter list. + const snapshot = state.snapshot(); + const asyncStartTokenIndex = state.tokens.length; + next(); + state.tokens[state.tokens.length - 1].subscriptStartIndex = startTokenIndex; + + const callContextId = getNextContextId(); + + state.tokens[state.tokens.length - 1].contextId = callContextId; + parseCallExpressionArguments(); + state.tokens[state.tokens.length - 1].contextId = callContextId; + + if (shouldParseAsyncArrow()) { + // We hit an arrow, so backtrack and start again parsing function parameters. + state.restoreFromSnapshot(snapshot); + stopState.stop = true; + state.scopeDepth++; + + parseFunctionParams(); + parseAsyncArrowFromCallExpression(asyncStartTokenIndex); + } + } else { + next(); + state.tokens[state.tokens.length - 1].subscriptStartIndex = startTokenIndex; + const callContextId = getNextContextId(); + state.tokens[state.tokens.length - 1].contextId = callContextId; + parseCallExpressionArguments(); + state.tokens[state.tokens.length - 1].contextId = callContextId; + } + } else if (match(tt.backQuote)) { + // Tagged template expression. + parseTemplate(); + } else { + stopState.stop = true; + } +} + +export function atPossibleAsync() { + // This was made less strict than the original version to avoid passing around nodes, but it + // should be safe to have rare false positives here. + return ( + state.tokens[state.tokens.length - 1].contextualKeyword === ContextualKeyword._async && + !canInsertSemicolon() + ); +} + +export function parseCallExpressionArguments() { + let first = true; + while (!eat(tt.parenR) && !state.error) { + if (first) { + first = false; + } else { + expect(tt.comma); + if (eat(tt.parenR)) { + break; + } + } + + parseExprListItem(false); + } +} + +function shouldParseAsyncArrow() { + return match(tt.colon) || match(tt.arrow); +} + +function parseAsyncArrowFromCallExpression(startTokenIndex) { + if (isTypeScriptEnabled) { + tsStartParseAsyncArrowFromCallExpression(); + } else if (isFlowEnabled) { + flowStartParseAsyncArrowFromCallExpression(); + } + expect(tt.arrow); + parseArrowExpression(startTokenIndex); +} + +// Parse a no-call expression (like argument of `new` or `::` operators). + +function parseNoCallExpr() { + const startTokenIndex = state.tokens.length; + parseExprAtom(); + parseSubscripts(startTokenIndex, true); +} + +// Parse an atomic expression — either a single token that is an +// expression, an expression started by a keyword like `function` or +// `new`, or an expression wrapped in punctuation like `()`, `[]`, +// or `{}`. +// Returns true if the parsed expression was an arrow function. +export function parseExprAtom() { + if (eat(tt.modulo)) { + // V8 intrinsic expression. Just parse the identifier, and the function invocation is parsed + // naturally. + parseIdentifier(); + return false; + } + + if (match(tt.jsxText) || match(tt.jsxEmptyText)) { + parseLiteral(); + return false; + } else if (match(tt.lessThan) && isJSXEnabled) { + state.type = tt.jsxTagStart; + jsxParseElement(); + next(); + return false; + } + + const canBeArrow = state.potentialArrowAt === state.start; + switch (state.type) { + case tt.slash: + case tt.assign: + retokenizeSlashAsRegex(); + // Fall through. + + case tt._super: + case tt._this: + case tt.regexp: + case tt.num: + case tt.bigint: + case tt.decimal: + case tt.string: + case tt._null: + case tt._true: + case tt._false: + next(); + return false; + + case tt._import: + next(); + if (match(tt.dot)) { + // import.meta + state.tokens[state.tokens.length - 1].type = tt.name; + next(); + parseIdentifier(); + } + return false; + + case tt.name: { + const startTokenIndex = state.tokens.length; + const functionStart = state.start; + const contextualKeyword = state.contextualKeyword; + parseIdentifier(); + if (contextualKeyword === ContextualKeyword._await) { + parseAwait(); + return false; + } else if ( + contextualKeyword === ContextualKeyword._async && + match(tt._function) && + !canInsertSemicolon() + ) { + next(); + parseFunction(functionStart, false); + return false; + } else if ( + canBeArrow && + contextualKeyword === ContextualKeyword._async && + !canInsertSemicolon() && + match(tt.name) + ) { + state.scopeDepth++; + parseBindingIdentifier(false); + expect(tt.arrow); + // let foo = async bar => {}; + parseArrowExpression(startTokenIndex); + return true; + } else if (match(tt._do) && !canInsertSemicolon()) { + next(); + parseBlock(); + return false; + } + + if (canBeArrow && !canInsertSemicolon() && match(tt.arrow)) { + state.scopeDepth++; + markPriorBindingIdentifier(false); + expect(tt.arrow); + parseArrowExpression(startTokenIndex); + return true; + } + + state.tokens[state.tokens.length - 1].identifierRole = IdentifierRole.Access; + return false; + } + + case tt._do: { + next(); + parseBlock(); + return false; + } + + case tt.parenL: { + const wasArrow = parseParenAndDistinguishExpression(canBeArrow); + return wasArrow; + } + + case tt.bracketL: + next(); + parseExprList(tt.bracketR, true); + return false; + + case tt.braceL: + parseObj(false, false); + return false; + + case tt._function: + parseFunctionExpression(); + return false; + + case tt.at: + parseDecorators(); + // Fall through. + + case tt._class: + parseClass(false); + return false; + + case tt._new: + parseNew(); + return false; + + case tt.backQuote: + parseTemplate(); + return false; + + case tt.doubleColon: { + next(); + parseNoCallExpr(); + return false; + } + + case tt.hash: { + const code = lookaheadCharCode(); + if (IS_IDENTIFIER_START[code] || code === charCodes.backslash) { + parseMaybePrivateName(); + } else { + next(); + } + // Smart pipeline topic reference. + return false; + } + + default: + unexpected(); + return false; + } +} + +function parseMaybePrivateName() { + eat(tt.hash); + parseIdentifier(); +} + +function parseFunctionExpression() { + const functionStart = state.start; + parseIdentifier(); + if (eat(tt.dot)) { + // function.sent + parseIdentifier(); + } + parseFunction(functionStart, false); +} + +export function parseLiteral() { + next(); +} + +export function parseParenExpression() { + expect(tt.parenL); + parseExpression(); + expect(tt.parenR); +} + +// Returns true if this was an arrow expression. +function parseParenAndDistinguishExpression(canBeArrow) { + // Assume this is a normal parenthesized expression, but if we see an arrow, we'll bail and + // start over as a parameter list. + const snapshot = state.snapshot(); + + const startTokenIndex = state.tokens.length; + expect(tt.parenL); + + let first = true; + + while (!match(tt.parenR) && !state.error) { + if (first) { + first = false; + } else { + expect(tt.comma); + if (match(tt.parenR)) { + break; + } + } + + if (match(tt.ellipsis)) { + parseRest(false /* isBlockScope */); + parseParenItem(); + break; + } else { + parseMaybeAssign(false, true); + } + } + + expect(tt.parenR); + + if (canBeArrow && shouldParseArrow()) { + const wasArrow = parseArrow(); + if (wasArrow) { + // It was an arrow function this whole time, so start over and parse it as params so that we + // get proper token annotations. + state.restoreFromSnapshot(snapshot); + state.scopeDepth++; + // Don't specify a context ID because arrow functions don't need a context ID. + parseFunctionParams(); + parseArrow(); + parseArrowExpression(startTokenIndex); + if (state.error) { + // Nevermind! This must have been something that looks very much like an + // arrow function but where its "parameter list" isn't actually a valid + // parameter list. Force non-arrow parsing. + // See https://github.com/alangpierce/sucrase/issues/666 for an example. + state.restoreFromSnapshot(snapshot); + parseParenAndDistinguishExpression(false); + return false; + } + return true; + } + } + + return false; +} + +function shouldParseArrow() { + return match(tt.colon) || !canInsertSemicolon(); +} + +// Returns whether there was an arrow token. +export function parseArrow() { + if (isTypeScriptEnabled) { + return tsParseArrow(); + } else if (isFlowEnabled) { + return flowParseArrow(); + } else { + return eat(tt.arrow); + } +} + +function parseParenItem() { + if (isTypeScriptEnabled || isFlowEnabled) { + typedParseParenItem(); + } +} + +// New's precedence is slightly tricky. It must allow its argument to +// be a `[]` or dot subscript expression, but not a call — at least, +// not without wrapping it in parentheses. Thus, it uses the noCalls +// argument to parseSubscripts to prevent it from consuming the +// argument list. +function parseNew() { + expect(tt._new); + if (eat(tt.dot)) { + // new.target + parseIdentifier(); + return; + } + parseNewCallee(); + if (isFlowEnabled) { + flowStartParseNewArguments(); + } + if (eat(tt.parenL)) { + parseExprList(tt.parenR); + } +} + +function parseNewCallee() { + parseNoCallExpr(); + eat(tt.questionDot); +} + +export function parseTemplate() { + // Finish `, read quasi + nextTemplateToken(); + // Finish quasi, read ${ + nextTemplateToken(); + while (!match(tt.backQuote) && !state.error) { + expect(tt.dollarBraceL); + parseExpression(); + // Finish }, read quasi + nextTemplateToken(); + // Finish quasi, read either ${ or ` + nextTemplateToken(); + } + next(); +} + +// Parse an object literal or binding pattern. +export function parseObj(isPattern, isBlockScope) { + // Attach a context ID to the object open and close brace and each object key. + const contextId = getNextContextId(); + let first = true; + + next(); + state.tokens[state.tokens.length - 1].contextId = contextId; + + while (!eat(tt.braceR) && !state.error) { + if (first) { + first = false; + } else { + expect(tt.comma); + if (eat(tt.braceR)) { + break; + } + } + + let isGenerator = false; + if (match(tt.ellipsis)) { + const previousIndex = state.tokens.length; + parseSpread(); + if (isPattern) { + // Mark role when the only thing being spread over is an identifier. + if (state.tokens.length === previousIndex + 2) { + markPriorBindingIdentifier(isBlockScope); + } + if (eat(tt.braceR)) { + break; + } + } + continue; + } + + if (!isPattern) { + isGenerator = eat(tt.star); + } + + if (!isPattern && isContextual(ContextualKeyword._async)) { + if (isGenerator) unexpected(); + + parseIdentifier(); + if ( + match(tt.colon) || + match(tt.parenL) || + match(tt.braceR) || + match(tt.eq) || + match(tt.comma) + ) { + // This is a key called "async" rather than an async function. + } else { + if (match(tt.star)) { + next(); + isGenerator = true; + } + parsePropertyName(contextId); + } + } else { + parsePropertyName(contextId); + } + + parseObjPropValue(isPattern, isBlockScope, contextId); + } + + state.tokens[state.tokens.length - 1].contextId = contextId; +} + +function isGetterOrSetterMethod(isPattern) { + // We go off of the next and don't bother checking if the node key is actually "get" or "set". + // This lets us avoid generating a node, and should only make the validation worse. + return ( + !isPattern && + (match(tt.string) || // get "string"() {} + match(tt.num) || // get 1() {} + match(tt.bracketL) || // get ["string"]() {} + match(tt.name) || // get foo() {} + !!(state.type & TokenType.IS_KEYWORD)) // get debugger() {} + ); +} + +// Returns true if this was a method. +function parseObjectMethod(isPattern, objectContextId) { + // We don't need to worry about modifiers because object methods can't have optional bodies, so + // the start will never be used. + const functionStart = state.start; + if (match(tt.parenL)) { + if (isPattern) unexpected(); + parseMethod(functionStart, /* isConstructor */ false); + return true; + } + + if (isGetterOrSetterMethod(isPattern)) { + parsePropertyName(objectContextId); + parseMethod(functionStart, /* isConstructor */ false); + return true; + } + return false; +} + +function parseObjectProperty(isPattern, isBlockScope) { + if (eat(tt.colon)) { + if (isPattern) { + parseMaybeDefault(isBlockScope); + } else { + parseMaybeAssign(false); + } + return; + } + + // Since there's no colon, we assume this is an object shorthand. + + // If we're in a destructuring, we've now discovered that the key was actually an assignee, so + // we need to tag it as a declaration with the appropriate scope. Otherwise, we might need to + // transform it on access, so mark it as a normal object shorthand. + let identifierRole; + if (isPattern) { + if (state.scopeDepth === 0) { + identifierRole = IdentifierRole.ObjectShorthandTopLevelDeclaration; + } else if (isBlockScope) { + identifierRole = IdentifierRole.ObjectShorthandBlockScopedDeclaration; + } else { + identifierRole = IdentifierRole.ObjectShorthandFunctionScopedDeclaration; + } + } else { + identifierRole = IdentifierRole.ObjectShorthand; + } + state.tokens[state.tokens.length - 1].identifierRole = identifierRole; + + // Regardless of whether we know this to be a pattern or if we're in an ambiguous context, allow + // parsing as if there's a default value. + parseMaybeDefault(isBlockScope, true); +} + +function parseObjPropValue( + isPattern, + isBlockScope, + objectContextId, +) { + if (isTypeScriptEnabled) { + tsStartParseObjPropValue(); + } else if (isFlowEnabled) { + flowStartParseObjPropValue(); + } + const wasMethod = parseObjectMethod(isPattern, objectContextId); + if (!wasMethod) { + parseObjectProperty(isPattern, isBlockScope); + } +} + +export function parsePropertyName(objectContextId) { + if (isFlowEnabled) { + flowParseVariance(); + } + if (eat(tt.bracketL)) { + state.tokens[state.tokens.length - 1].contextId = objectContextId; + parseMaybeAssign(); + expect(tt.bracketR); + state.tokens[state.tokens.length - 1].contextId = objectContextId; + } else { + if (match(tt.num) || match(tt.string) || match(tt.bigint) || match(tt.decimal)) { + parseExprAtom(); + } else { + parseMaybePrivateName(); + } + + state.tokens[state.tokens.length - 1].identifierRole = IdentifierRole.ObjectKey; + state.tokens[state.tokens.length - 1].contextId = objectContextId; + } +} + +// Parse object or class method. +export function parseMethod(functionStart, isConstructor) { + const funcContextId = getNextContextId(); + + state.scopeDepth++; + const startTokenIndex = state.tokens.length; + const allowModifiers = isConstructor; // For TypeScript parameter properties + parseFunctionParams(allowModifiers, funcContextId); + parseFunctionBodyAndFinish(functionStart, funcContextId); + const endTokenIndex = state.tokens.length; + state.scopes.push(new Scope(startTokenIndex, endTokenIndex, true)); + state.scopeDepth--; +} + +// Parse arrow function expression. +// If the parameters are provided, they will be converted to an +// assignable list. +export function parseArrowExpression(startTokenIndex) { + parseFunctionBody(true); + const endTokenIndex = state.tokens.length; + state.scopes.push(new Scope(startTokenIndex, endTokenIndex, true)); + state.scopeDepth--; +} + +export function parseFunctionBodyAndFinish(functionStart, funcContextId = 0) { + if (isTypeScriptEnabled) { + tsParseFunctionBodyAndFinish(functionStart, funcContextId); + } else if (isFlowEnabled) { + flowParseFunctionBodyAndFinish(funcContextId); + } else { + parseFunctionBody(false, funcContextId); + } +} + +export function parseFunctionBody(allowExpression, funcContextId = 0) { + const isExpression = allowExpression && !match(tt.braceL); + + if (isExpression) { + parseMaybeAssign(); + } else { + parseBlock(true /* isFunctionScope */, funcContextId); + } +} + +// Parses a comma-separated list of expressions, and returns them as +// an array. `close` is the token type that ends the list, and +// `allowEmpty` can be turned on to allow subsequent commas with +// nothing in between them to be parsed as `null` (which is needed +// for array literals). + +function parseExprList(close, allowEmpty = false) { + let first = true; + while (!eat(close) && !state.error) { + if (first) { + first = false; + } else { + expect(tt.comma); + if (eat(close)) break; + } + parseExprListItem(allowEmpty); + } +} + +function parseExprListItem(allowEmpty) { + if (allowEmpty && match(tt.comma)) { + // Empty item; nothing more to parse for this item. + } else if (match(tt.ellipsis)) { + parseSpread(); + parseParenItem(); + } else if (match(tt.question)) { + // Partial function application proposal. + next(); + } else { + parseMaybeAssign(false, true); + } +} + +// Parse the next token as an identifier. +export function parseIdentifier() { + next(); + state.tokens[state.tokens.length - 1].type = tt.name; +} + +// Parses await expression inside async function. +function parseAwait() { + parseMaybeUnary(); +} + +// Parses yield expression inside generator. +function parseYield() { + next(); + if (!match(tt.semi) && !canInsertSemicolon()) { + eat(tt.star); + parseMaybeAssign(); + } +} + +// https://github.com/tc39/proposal-js-module-blocks +function parseModuleExpression() { + expectContextual(ContextualKeyword._module); + expect(tt.braceL); + // For now, just call parseBlockBody to parse the block. In the future when we + // implement full support, we'll want to emit scopes and possibly other + // information. + parseBlockBody(tt.braceR); +} diff --git a/node_modules/sucrase/dist/esm/parser/traverser/index.js b/node_modules/sucrase/dist/esm/parser/traverser/index.js new file mode 100644 index 0000000..eb8c990 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/traverser/index.js @@ -0,0 +1,18 @@ + +import {nextToken, skipLineComment} from "../tokenizer/index"; +import {charCodes} from "../util/charcodes"; +import {input, state} from "./base"; +import {parseTopLevel} from "./statement"; + +export function parseFile() { + // If enabled, skip leading hashbang line. + if ( + state.pos === 0 && + input.charCodeAt(0) === charCodes.numberSign && + input.charCodeAt(1) === charCodes.exclamationMark + ) { + skipLineComment(2); + } + nextToken(); + return parseTopLevel(); +} diff --git a/node_modules/sucrase/dist/esm/parser/traverser/lval.js b/node_modules/sucrase/dist/esm/parser/traverser/lval.js new file mode 100644 index 0000000..f5c4855 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/traverser/lval.js @@ -0,0 +1,159 @@ +import {flowParseAssignableListItemTypes} from "../plugins/flow"; +import {tsParseAssignableListItemTypes, tsParseModifiers} from "../plugins/typescript"; +import { + eat, + IdentifierRole, + match, + next, + popTypeContext, + pushTypeContext, +} from "../tokenizer/index"; +import {ContextualKeyword} from "../tokenizer/keywords"; +import {TokenType, TokenType as tt} from "../tokenizer/types"; +import {isFlowEnabled, isTypeScriptEnabled, state} from "./base"; +import {parseIdentifier, parseMaybeAssign, parseObj} from "./expression"; +import {expect, unexpected} from "./util"; + +export function parseSpread() { + next(); + parseMaybeAssign(false); +} + +export function parseRest(isBlockScope) { + next(); + parseBindingAtom(isBlockScope); +} + +export function parseBindingIdentifier(isBlockScope) { + parseIdentifier(); + markPriorBindingIdentifier(isBlockScope); +} + +export function parseImportedIdentifier() { + parseIdentifier(); + state.tokens[state.tokens.length - 1].identifierRole = IdentifierRole.ImportDeclaration; +} + +export function markPriorBindingIdentifier(isBlockScope) { + let identifierRole; + if (state.scopeDepth === 0) { + identifierRole = IdentifierRole.TopLevelDeclaration; + } else if (isBlockScope) { + identifierRole = IdentifierRole.BlockScopedDeclaration; + } else { + identifierRole = IdentifierRole.FunctionScopedDeclaration; + } + state.tokens[state.tokens.length - 1].identifierRole = identifierRole; +} + +// Parses lvalue (assignable) atom. +export function parseBindingAtom(isBlockScope) { + switch (state.type) { + case tt._this: { + // In TypeScript, "this" may be the name of a parameter, so allow it. + const oldIsType = pushTypeContext(0); + next(); + popTypeContext(oldIsType); + return; + } + + case tt._yield: + case tt.name: { + state.type = tt.name; + parseBindingIdentifier(isBlockScope); + return; + } + + case tt.bracketL: { + next(); + parseBindingList(tt.bracketR, isBlockScope, true /* allowEmpty */); + return; + } + + case tt.braceL: + parseObj(true, isBlockScope); + return; + + default: + unexpected(); + } +} + +export function parseBindingList( + close, + isBlockScope, + allowEmpty = false, + allowModifiers = false, + contextId = 0, +) { + let first = true; + + let hasRemovedComma = false; + const firstItemTokenIndex = state.tokens.length; + + while (!eat(close) && !state.error) { + if (first) { + first = false; + } else { + expect(tt.comma); + state.tokens[state.tokens.length - 1].contextId = contextId; + // After a "this" type in TypeScript, we need to set the following comma (if any) to also be + // a type token so that it will be removed. + if (!hasRemovedComma && state.tokens[firstItemTokenIndex].isType) { + state.tokens[state.tokens.length - 1].isType = true; + hasRemovedComma = true; + } + } + if (allowEmpty && match(tt.comma)) { + // Empty item; nothing further to parse for this item. + } else if (eat(close)) { + break; + } else if (match(tt.ellipsis)) { + parseRest(isBlockScope); + parseAssignableListItemTypes(); + // Support rest element trailing commas allowed by TypeScript <2.9. + eat(TokenType.comma); + expect(close); + break; + } else { + parseAssignableListItem(allowModifiers, isBlockScope); + } + } +} + +function parseAssignableListItem(allowModifiers, isBlockScope) { + if (allowModifiers) { + tsParseModifiers([ + ContextualKeyword._public, + ContextualKeyword._protected, + ContextualKeyword._private, + ContextualKeyword._readonly, + ContextualKeyword._override, + ]); + } + + parseMaybeDefault(isBlockScope); + parseAssignableListItemTypes(); + parseMaybeDefault(isBlockScope, true /* leftAlreadyParsed */); +} + +function parseAssignableListItemTypes() { + if (isFlowEnabled) { + flowParseAssignableListItemTypes(); + } else if (isTypeScriptEnabled) { + tsParseAssignableListItemTypes(); + } +} + +// Parses assignment pattern around given atom if possible. +export function parseMaybeDefault(isBlockScope, leftAlreadyParsed = false) { + if (!leftAlreadyParsed) { + parseBindingAtom(isBlockScope); + } + if (!eat(tt.eq)) { + return; + } + const eqIndex = state.tokens.length - 1; + parseMaybeAssign(); + state.tokens[eqIndex].rhsEndIndex = state.tokens.length; +} diff --git a/node_modules/sucrase/dist/esm/parser/traverser/statement.js b/node_modules/sucrase/dist/esm/parser/traverser/statement.js new file mode 100644 index 0000000..34a6511 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/traverser/statement.js @@ -0,0 +1,1332 @@ +/* eslint max-len: 0 */ + +import {File} from "../index"; +import { + flowAfterParseClassSuper, + flowAfterParseVarHead, + flowParseExportDeclaration, + flowParseExportStar, + flowParseIdentifierStatement, + flowParseImportSpecifier, + flowParseTypeAnnotation, + flowParseTypeParameterDeclaration, + flowShouldDisallowExportDefaultSpecifier, + flowShouldParseExportDeclaration, + flowShouldParseExportStar, + flowStartParseFunctionParams, + flowStartParseImportSpecifiers, + flowTryParseExportDefaultExpression, + flowTryParseStatement, +} from "../plugins/flow"; +import { + tsAfterParseClassSuper, + tsAfterParseVarHead, + tsIsDeclarationStart, + tsParseExportDeclaration, + tsParseExportSpecifier, + tsParseIdentifierStatement, + tsParseImportEqualsDeclaration, + tsParseImportSpecifier, + tsParseMaybeDecoratorArguments, + tsParseModifiers, + tsStartParseFunctionParams, + tsTryParseClassMemberWithIsStatic, + tsTryParseExport, + tsTryParseExportDefaultExpression, + tsTryParseStatementContent, + tsTryParseTypeAnnotation, + tsTryParseTypeParameters, +} from "../plugins/typescript"; +import { + eat, + eatTypeToken, + IdentifierRole, + lookaheadType, + lookaheadTypeAndKeyword, + match, + next, + nextTokenStart, + nextTokenStartSince, + popTypeContext, + pushTypeContext, +} from "../tokenizer"; +import {ContextualKeyword} from "../tokenizer/keywords"; +import {Scope} from "../tokenizer/state"; +import { TokenType as tt} from "../tokenizer/types"; +import {charCodes} from "../util/charcodes"; +import {getNextContextId, input, isFlowEnabled, isTypeScriptEnabled, state} from "./base"; +import { + parseCallExpressionArguments, + parseExprAtom, + parseExpression, + parseExprSubscripts, + parseFunctionBodyAndFinish, + parseIdentifier, + parseMaybeAssign, + parseMethod, + parseObj, + parseParenExpression, + parsePropertyName, +} from "./expression"; +import { + parseBindingAtom, + parseBindingIdentifier, + parseBindingList, + parseImportedIdentifier, +} from "./lval"; +import { + canInsertSemicolon, + eatContextual, + expect, + expectContextual, + hasFollowingLineBreak, + hasPrecedingLineBreak, + isContextual, + isLineTerminator, + isLookaheadContextual, + semicolon, + unexpected, +} from "./util"; + +export function parseTopLevel() { + parseBlockBody(tt.eof); + state.scopes.push(new Scope(0, state.tokens.length, true)); + if (state.scopeDepth !== 0) { + throw new Error(`Invalid scope depth at end of file: ${state.scopeDepth}`); + } + return new File(state.tokens, state.scopes); +} + +// Parse a single statement. +// +// If expecting a statement and finding a slash operator, parse a +// regular expression literal. This is to handle cases like +// `if (foo) /blah/.exec(foo)`, where looking at the previous token +// does not help. + +export function parseStatement(declaration) { + if (isFlowEnabled) { + if (flowTryParseStatement()) { + return; + } + } + if (match(tt.at)) { + parseDecorators(); + } + parseStatementContent(declaration); +} + +function parseStatementContent(declaration) { + if (isTypeScriptEnabled) { + if (tsTryParseStatementContent()) { + return; + } + } + + const starttype = state.type; + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case tt._break: + case tt._continue: + parseBreakContinueStatement(); + return; + case tt._debugger: + parseDebuggerStatement(); + return; + case tt._do: + parseDoStatement(); + return; + case tt._for: + parseForStatement(); + return; + case tt._function: + if (lookaheadType() === tt.dot) break; + if (!declaration) unexpected(); + parseFunctionStatement(); + return; + + case tt._class: + if (!declaration) unexpected(); + parseClass(true); + return; + + case tt._if: + parseIfStatement(); + return; + case tt._return: + parseReturnStatement(); + return; + case tt._switch: + parseSwitchStatement(); + return; + case tt._throw: + parseThrowStatement(); + return; + case tt._try: + parseTryStatement(); + return; + + case tt._let: + case tt._const: + if (!declaration) unexpected(); // NOTE: falls through to _var + + case tt._var: + parseVarStatement(starttype !== tt._var); + return; + + case tt._while: + parseWhileStatement(); + return; + case tt.braceL: + parseBlock(); + return; + case tt.semi: + parseEmptyStatement(); + return; + case tt._export: + case tt._import: { + const nextType = lookaheadType(); + if (nextType === tt.parenL || nextType === tt.dot) { + break; + } + next(); + if (starttype === tt._import) { + parseImport(); + } else { + parseExport(); + } + return; + } + case tt.name: + if (state.contextualKeyword === ContextualKeyword._async) { + const functionStart = state.start; + // peek ahead and see if next token is a function + const snapshot = state.snapshot(); + next(); + if (match(tt._function) && !canInsertSemicolon()) { + expect(tt._function); + parseFunction(functionStart, true); + return; + } else { + state.restoreFromSnapshot(snapshot); + } + } else if ( + state.contextualKeyword === ContextualKeyword._using && + !hasFollowingLineBreak() && + // Statements like `using[0]` and `using in foo` aren't actual using + // declarations. + lookaheadType() === tt.name + ) { + parseVarStatement(true); + return; + } else if (startsAwaitUsing()) { + expectContextual(ContextualKeyword._await); + parseVarStatement(true); + return; + } + default: + // Do nothing. + break; + } + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + const initialTokensLength = state.tokens.length; + parseExpression(); + let simpleName = null; + if (state.tokens.length === initialTokensLength + 1) { + const token = state.tokens[state.tokens.length - 1]; + if (token.type === tt.name) { + simpleName = token.contextualKeyword; + } + } + if (simpleName == null) { + semicolon(); + return; + } + if (eat(tt.colon)) { + parseLabeledStatement(); + } else { + // This was an identifier, so we might want to handle flow/typescript-specific cases. + parseIdentifierStatement(simpleName); + } +} + +/** + * Determine if we're positioned at an `await using` declaration. + * + * Note that this can happen either in place of a regular variable declaration + * or in a loop body, and in both places, there are similar-looking cases where + * we need to return false. + * + * Examples returning true: + * await using foo = bar(); + * for (await using a of b) {} + * + * Examples returning false: + * await using + * await using + 1 + * await using instanceof T + * for (await using;;) {} + * + * For now, we early return if we don't see `await`, then do a simple + * backtracking-based lookahead for the `using` and identifier tokens. In the + * future, this could be optimized with a character-based approach. + */ +function startsAwaitUsing() { + if (!isContextual(ContextualKeyword._await)) { + return false; + } + const snapshot = state.snapshot(); + // await + next(); + if (!isContextual(ContextualKeyword._using) || hasPrecedingLineBreak()) { + state.restoreFromSnapshot(snapshot); + return false; + } + // using + next(); + if (!match(tt.name) || hasPrecedingLineBreak()) { + state.restoreFromSnapshot(snapshot); + return false; + } + state.restoreFromSnapshot(snapshot); + return true; +} + +export function parseDecorators() { + while (match(tt.at)) { + parseDecorator(); + } +} + +function parseDecorator() { + next(); + if (eat(tt.parenL)) { + parseExpression(); + expect(tt.parenR); + } else { + parseIdentifier(); + while (eat(tt.dot)) { + parseIdentifier(); + } + parseMaybeDecoratorArguments(); + } +} + +function parseMaybeDecoratorArguments() { + if (isTypeScriptEnabled) { + tsParseMaybeDecoratorArguments(); + } else { + baseParseMaybeDecoratorArguments(); + } +} + +export function baseParseMaybeDecoratorArguments() { + if (eat(tt.parenL)) { + parseCallExpressionArguments(); + } +} + +function parseBreakContinueStatement() { + next(); + if (!isLineTerminator()) { + parseIdentifier(); + semicolon(); + } +} + +function parseDebuggerStatement() { + next(); + semicolon(); +} + +function parseDoStatement() { + next(); + parseStatement(false); + expect(tt._while); + parseParenExpression(); + eat(tt.semi); +} + +function parseForStatement() { + state.scopeDepth++; + const startTokenIndex = state.tokens.length; + parseAmbiguousForStatement(); + const endTokenIndex = state.tokens.length; + state.scopes.push(new Scope(startTokenIndex, endTokenIndex, false)); + state.scopeDepth--; +} + +/** + * Determine if this token is a `using` declaration (explicit resource + * management) as part of a loop. + * https://github.com/tc39/proposal-explicit-resource-management + */ +function isUsingInLoop() { + if (!isContextual(ContextualKeyword._using)) { + return false; + } + // This must be `for (using of`, where `using` is the name of the loop + // variable. + if (isLookaheadContextual(ContextualKeyword._of)) { + return false; + } + return true; +} + +// Disambiguating between a `for` and a `for`/`in` or `for`/`of` +// loop is non-trivial. Basically, we have to parse the init `var` +// statement or expression, disallowing the `in` operator (see +// the second parameter to `parseExpression`), and then check +// whether the next token is `in` or `of`. When there is no init +// part (semicolon immediately after the opening parenthesis), it +// is a regular `for` loop. +function parseAmbiguousForStatement() { + next(); + + let forAwait = false; + if (isContextual(ContextualKeyword._await)) { + forAwait = true; + next(); + } + expect(tt.parenL); + + if (match(tt.semi)) { + if (forAwait) { + unexpected(); + } + parseFor(); + return; + } + + const isAwaitUsing = startsAwaitUsing(); + if (isAwaitUsing || match(tt._var) || match(tt._let) || match(tt._const) || isUsingInLoop()) { + if (isAwaitUsing) { + expectContextual(ContextualKeyword._await); + } + next(); + parseVar(true, state.type !== tt._var); + if (match(tt._in) || isContextual(ContextualKeyword._of)) { + parseForIn(forAwait); + return; + } + parseFor(); + return; + } + + parseExpression(true); + if (match(tt._in) || isContextual(ContextualKeyword._of)) { + parseForIn(forAwait); + return; + } + if (forAwait) { + unexpected(); + } + parseFor(); +} + +function parseFunctionStatement() { + const functionStart = state.start; + next(); + parseFunction(functionStart, true); +} + +function parseIfStatement() { + next(); + parseParenExpression(); + parseStatement(false); + if (eat(tt._else)) { + parseStatement(false); + } +} + +function parseReturnStatement() { + next(); + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (!isLineTerminator()) { + parseExpression(); + semicolon(); + } +} + +function parseSwitchStatement() { + next(); + parseParenExpression(); + state.scopeDepth++; + const startTokenIndex = state.tokens.length; + expect(tt.braceL); + + // Don't bother validation; just go through any sequence of cases, defaults, and statements. + while (!match(tt.braceR) && !state.error) { + if (match(tt._case) || match(tt._default)) { + const isCase = match(tt._case); + next(); + if (isCase) { + parseExpression(); + } + expect(tt.colon); + } else { + parseStatement(true); + } + } + next(); // Closing brace + const endTokenIndex = state.tokens.length; + state.scopes.push(new Scope(startTokenIndex, endTokenIndex, false)); + state.scopeDepth--; +} + +function parseThrowStatement() { + next(); + parseExpression(); + semicolon(); +} + +function parseCatchClauseParam() { + parseBindingAtom(true /* isBlockScope */); + + if (isTypeScriptEnabled) { + tsTryParseTypeAnnotation(); + } +} + +function parseTryStatement() { + next(); + + parseBlock(); + + if (match(tt._catch)) { + next(); + let catchBindingStartTokenIndex = null; + if (match(tt.parenL)) { + state.scopeDepth++; + catchBindingStartTokenIndex = state.tokens.length; + expect(tt.parenL); + parseCatchClauseParam(); + expect(tt.parenR); + } + parseBlock(); + if (catchBindingStartTokenIndex != null) { + // We need a special scope for the catch binding which includes the binding itself and the + // catch block. + const endTokenIndex = state.tokens.length; + state.scopes.push(new Scope(catchBindingStartTokenIndex, endTokenIndex, false)); + state.scopeDepth--; + } + } + if (eat(tt._finally)) { + parseBlock(); + } +} + +export function parseVarStatement(isBlockScope) { + next(); + parseVar(false, isBlockScope); + semicolon(); +} + +function parseWhileStatement() { + next(); + parseParenExpression(); + parseStatement(false); +} + +function parseEmptyStatement() { + next(); +} + +function parseLabeledStatement() { + parseStatement(true); +} + +/** + * Parse a statement starting with an identifier of the given name. Subclasses match on the name + * to handle statements like "declare". + */ +function parseIdentifierStatement(contextualKeyword) { + if (isTypeScriptEnabled) { + tsParseIdentifierStatement(contextualKeyword); + } else if (isFlowEnabled) { + flowParseIdentifierStatement(contextualKeyword); + } else { + semicolon(); + } +} + +// Parse a semicolon-enclosed block of statements. +export function parseBlock(isFunctionScope = false, contextId = 0) { + const startTokenIndex = state.tokens.length; + state.scopeDepth++; + expect(tt.braceL); + if (contextId) { + state.tokens[state.tokens.length - 1].contextId = contextId; + } + parseBlockBody(tt.braceR); + if (contextId) { + state.tokens[state.tokens.length - 1].contextId = contextId; + } + const endTokenIndex = state.tokens.length; + state.scopes.push(new Scope(startTokenIndex, endTokenIndex, isFunctionScope)); + state.scopeDepth--; +} + +export function parseBlockBody(end) { + while (!eat(end) && !state.error) { + parseStatement(true); + } +} + +// Parse a regular `for` loop. The disambiguation code in +// `parseStatement` will already have parsed the init statement or +// expression. + +function parseFor() { + expect(tt.semi); + if (!match(tt.semi)) { + parseExpression(); + } + expect(tt.semi); + if (!match(tt.parenR)) { + parseExpression(); + } + expect(tt.parenR); + parseStatement(false); +} + +// Parse a `for`/`in` and `for`/`of` loop, which are almost +// same from parser's perspective. + +function parseForIn(forAwait) { + if (forAwait) { + eatContextual(ContextualKeyword._of); + } else { + next(); + } + parseExpression(); + expect(tt.parenR); + parseStatement(false); +} + +// Parse a list of variable declarations. + +function parseVar(isFor, isBlockScope) { + while (true) { + parseVarHead(isBlockScope); + if (eat(tt.eq)) { + const eqIndex = state.tokens.length - 1; + parseMaybeAssign(isFor); + state.tokens[eqIndex].rhsEndIndex = state.tokens.length; + } + if (!eat(tt.comma)) { + break; + } + } +} + +function parseVarHead(isBlockScope) { + parseBindingAtom(isBlockScope); + if (isTypeScriptEnabled) { + tsAfterParseVarHead(); + } else if (isFlowEnabled) { + flowAfterParseVarHead(); + } +} + +// Parse a function declaration or literal (depending on the +// `isStatement` parameter). + +export function parseFunction( + functionStart, + isStatement, + optionalId = false, +) { + if (match(tt.star)) { + next(); + } + + if (isStatement && !optionalId && !match(tt.name) && !match(tt._yield)) { + unexpected(); + } + + let nameScopeStartTokenIndex = null; + + if (match(tt.name)) { + // Expression-style functions should limit their name's scope to the function body, so we make + // a new function scope to enforce that. + if (!isStatement) { + nameScopeStartTokenIndex = state.tokens.length; + state.scopeDepth++; + } + parseBindingIdentifier(false); + } + + const startTokenIndex = state.tokens.length; + state.scopeDepth++; + parseFunctionParams(); + parseFunctionBodyAndFinish(functionStart); + const endTokenIndex = state.tokens.length; + // In addition to the block scope of the function body, we need a separate function-style scope + // that includes the params. + state.scopes.push(new Scope(startTokenIndex, endTokenIndex, true)); + state.scopeDepth--; + if (nameScopeStartTokenIndex !== null) { + state.scopes.push(new Scope(nameScopeStartTokenIndex, endTokenIndex, true)); + state.scopeDepth--; + } +} + +export function parseFunctionParams( + allowModifiers = false, + funcContextId = 0, +) { + if (isTypeScriptEnabled) { + tsStartParseFunctionParams(); + } else if (isFlowEnabled) { + flowStartParseFunctionParams(); + } + + expect(tt.parenL); + if (funcContextId) { + state.tokens[state.tokens.length - 1].contextId = funcContextId; + } + parseBindingList( + tt.parenR, + false /* isBlockScope */, + false /* allowEmpty */, + allowModifiers, + funcContextId, + ); + if (funcContextId) { + state.tokens[state.tokens.length - 1].contextId = funcContextId; + } +} + +// Parse a class declaration or literal (depending on the +// `isStatement` parameter). + +export function parseClass(isStatement, optionalId = false) { + // Put a context ID on the class keyword, the open-brace, and the close-brace, so that later + // code can easily navigate to meaningful points on the class. + const contextId = getNextContextId(); + + next(); + state.tokens[state.tokens.length - 1].contextId = contextId; + state.tokens[state.tokens.length - 1].isExpression = !isStatement; + // Like with functions, we declare a special "name scope" from the start of the name to the end + // of the class, but only with expression-style classes, to represent the fact that the name is + // available to the body of the class but not an outer declaration. + let nameScopeStartTokenIndex = null; + if (!isStatement) { + nameScopeStartTokenIndex = state.tokens.length; + state.scopeDepth++; + } + parseClassId(isStatement, optionalId); + parseClassSuper(); + const openBraceIndex = state.tokens.length; + parseClassBody(contextId); + if (state.error) { + return; + } + state.tokens[openBraceIndex].contextId = contextId; + state.tokens[state.tokens.length - 1].contextId = contextId; + if (nameScopeStartTokenIndex !== null) { + const endTokenIndex = state.tokens.length; + state.scopes.push(new Scope(nameScopeStartTokenIndex, endTokenIndex, false)); + state.scopeDepth--; + } +} + +function isClassProperty() { + return match(tt.eq) || match(tt.semi) || match(tt.braceR) || match(tt.bang) || match(tt.colon); +} + +function isClassMethod() { + return match(tt.parenL) || match(tt.lessThan); +} + +function parseClassBody(classContextId) { + expect(tt.braceL); + + while (!eat(tt.braceR) && !state.error) { + if (eat(tt.semi)) { + continue; + } + + if (match(tt.at)) { + parseDecorator(); + continue; + } + const memberStart = state.start; + parseClassMember(memberStart, classContextId); + } +} + +function parseClassMember(memberStart, classContextId) { + if (isTypeScriptEnabled) { + tsParseModifiers([ + ContextualKeyword._declare, + ContextualKeyword._public, + ContextualKeyword._protected, + ContextualKeyword._private, + ContextualKeyword._override, + ]); + } + let isStatic = false; + if (match(tt.name) && state.contextualKeyword === ContextualKeyword._static) { + parseIdentifier(); // eats 'static' + if (isClassMethod()) { + parseClassMethod(memberStart, /* isConstructor */ false); + return; + } else if (isClassProperty()) { + parseClassProperty(); + return; + } + // otherwise something static + state.tokens[state.tokens.length - 1].type = tt._static; + isStatic = true; + + if (match(tt.braceL)) { + // This is a static block. Mark the word "static" with the class context ID for class element + // detection and parse as a regular block. + state.tokens[state.tokens.length - 1].contextId = classContextId; + parseBlock(); + return; + } + } + + parseClassMemberWithIsStatic(memberStart, isStatic, classContextId); +} + +function parseClassMemberWithIsStatic( + memberStart, + isStatic, + classContextId, +) { + if (isTypeScriptEnabled) { + if (tsTryParseClassMemberWithIsStatic(isStatic)) { + return; + } + } + if (eat(tt.star)) { + // a generator + parseClassPropertyName(classContextId); + parseClassMethod(memberStart, /* isConstructor */ false); + return; + } + + // Get the identifier name so we can tell if it's actually a keyword like "async", "get", or + // "set". + parseClassPropertyName(classContextId); + let isConstructor = false; + const token = state.tokens[state.tokens.length - 1]; + // We allow "constructor" as either an identifier or a string. + if (token.contextualKeyword === ContextualKeyword._constructor) { + isConstructor = true; + } + parsePostMemberNameModifiers(); + + if (isClassMethod()) { + parseClassMethod(memberStart, isConstructor); + } else if (isClassProperty()) { + parseClassProperty(); + } else if (token.contextualKeyword === ContextualKeyword._async && !isLineTerminator()) { + state.tokens[state.tokens.length - 1].type = tt._async; + // an async method + const isGenerator = match(tt.star); + if (isGenerator) { + next(); + } + + // The so-called parsed name would have been "async": get the real name. + parseClassPropertyName(classContextId); + parsePostMemberNameModifiers(); + parseClassMethod(memberStart, false /* isConstructor */); + } else if ( + (token.contextualKeyword === ContextualKeyword._get || + token.contextualKeyword === ContextualKeyword._set) && + !(isLineTerminator() && match(tt.star)) + ) { + if (token.contextualKeyword === ContextualKeyword._get) { + state.tokens[state.tokens.length - 1].type = tt._get; + } else { + state.tokens[state.tokens.length - 1].type = tt._set; + } + // `get\n*` is an uninitialized property named 'get' followed by a generator. + // a getter or setter + // The so-called parsed name would have been "get/set": get the real name. + parseClassPropertyName(classContextId); + parseClassMethod(memberStart, /* isConstructor */ false); + } else if (token.contextualKeyword === ContextualKeyword._accessor && !isLineTerminator()) { + parseClassPropertyName(classContextId); + parseClassProperty(); + } else if (isLineTerminator()) { + // an uninitialized class property (due to ASI, since we don't otherwise recognize the next token) + parseClassProperty(); + } else { + unexpected(); + } +} + +function parseClassMethod(functionStart, isConstructor) { + if (isTypeScriptEnabled) { + tsTryParseTypeParameters(); + } else if (isFlowEnabled) { + if (match(tt.lessThan)) { + flowParseTypeParameterDeclaration(); + } + } + parseMethod(functionStart, isConstructor); +} + +// Return the name of the class property, if it is a simple identifier. +export function parseClassPropertyName(classContextId) { + parsePropertyName(classContextId); +} + +export function parsePostMemberNameModifiers() { + if (isTypeScriptEnabled) { + const oldIsType = pushTypeContext(0); + eat(tt.question); + popTypeContext(oldIsType); + } +} + +export function parseClassProperty() { + if (isTypeScriptEnabled) { + eatTypeToken(tt.bang); + tsTryParseTypeAnnotation(); + } else if (isFlowEnabled) { + if (match(tt.colon)) { + flowParseTypeAnnotation(); + } + } + + if (match(tt.eq)) { + const equalsTokenIndex = state.tokens.length; + next(); + parseMaybeAssign(); + state.tokens[equalsTokenIndex].rhsEndIndex = state.tokens.length; + } + semicolon(); +} + +function parseClassId(isStatement, optionalId = false) { + if ( + isTypeScriptEnabled && + (!isStatement || optionalId) && + isContextual(ContextualKeyword._implements) + ) { + return; + } + + if (match(tt.name)) { + parseBindingIdentifier(true); + } + + if (isTypeScriptEnabled) { + tsTryParseTypeParameters(); + } else if (isFlowEnabled) { + if (match(tt.lessThan)) { + flowParseTypeParameterDeclaration(); + } + } +} + +// Returns true if there was a superclass. +function parseClassSuper() { + let hasSuper = false; + if (eat(tt._extends)) { + parseExprSubscripts(); + hasSuper = true; + } else { + hasSuper = false; + } + if (isTypeScriptEnabled) { + tsAfterParseClassSuper(hasSuper); + } else if (isFlowEnabled) { + flowAfterParseClassSuper(hasSuper); + } +} + +// Parses module export declaration. + +export function parseExport() { + const exportIndex = state.tokens.length - 1; + if (isTypeScriptEnabled) { + if (tsTryParseExport()) { + return; + } + } + // export * from '...' + if (shouldParseExportStar()) { + parseExportStar(); + } else if (isExportDefaultSpecifier()) { + // export default from + parseIdentifier(); + if (match(tt.comma) && lookaheadType() === tt.star) { + expect(tt.comma); + expect(tt.star); + expectContextual(ContextualKeyword._as); + parseIdentifier(); + } else { + parseExportSpecifiersMaybe(); + } + parseExportFrom(); + } else if (eat(tt._default)) { + // export default ... + parseExportDefaultExpression(); + } else if (shouldParseExportDeclaration()) { + parseExportDeclaration(); + } else { + // export { x, y as z } [from '...'] + parseExportSpecifiers(); + parseExportFrom(); + } + state.tokens[exportIndex].rhsEndIndex = state.tokens.length; +} + +function parseExportDefaultExpression() { + if (isTypeScriptEnabled) { + if (tsTryParseExportDefaultExpression()) { + return; + } + } + if (isFlowEnabled) { + if (flowTryParseExportDefaultExpression()) { + return; + } + } + const functionStart = state.start; + if (eat(tt._function)) { + parseFunction(functionStart, true, true); + } else if (isContextual(ContextualKeyword._async) && lookaheadType() === tt._function) { + // async function declaration + eatContextual(ContextualKeyword._async); + eat(tt._function); + parseFunction(functionStart, true, true); + } else if (match(tt._class)) { + parseClass(true, true); + } else if (match(tt.at)) { + parseDecorators(); + parseClass(true, true); + } else { + parseMaybeAssign(); + semicolon(); + } +} + +function parseExportDeclaration() { + if (isTypeScriptEnabled) { + tsParseExportDeclaration(); + } else if (isFlowEnabled) { + flowParseExportDeclaration(); + } else { + parseStatement(true); + } +} + +function isExportDefaultSpecifier() { + if (isTypeScriptEnabled && tsIsDeclarationStart()) { + return false; + } else if (isFlowEnabled && flowShouldDisallowExportDefaultSpecifier()) { + return false; + } + if (match(tt.name)) { + return state.contextualKeyword !== ContextualKeyword._async; + } + + if (!match(tt._default)) { + return false; + } + + const _next = nextTokenStart(); + const lookahead = lookaheadTypeAndKeyword(); + const hasFrom = + lookahead.type === tt.name && lookahead.contextualKeyword === ContextualKeyword._from; + if (lookahead.type === tt.comma) { + return true; + } + // lookahead again when `export default from` is seen + if (hasFrom) { + const nextAfterFrom = input.charCodeAt(nextTokenStartSince(_next + 4)); + return nextAfterFrom === charCodes.quotationMark || nextAfterFrom === charCodes.apostrophe; + } + return false; +} + +function parseExportSpecifiersMaybe() { + if (eat(tt.comma)) { + parseExportSpecifiers(); + } +} + +export function parseExportFrom() { + if (eatContextual(ContextualKeyword._from)) { + parseExprAtom(); + maybeParseImportAttributes(); + } + semicolon(); +} + +function shouldParseExportStar() { + if (isFlowEnabled) { + return flowShouldParseExportStar(); + } else { + return match(tt.star); + } +} + +function parseExportStar() { + if (isFlowEnabled) { + flowParseExportStar(); + } else { + baseParseExportStar(); + } +} + +export function baseParseExportStar() { + expect(tt.star); + + if (isContextual(ContextualKeyword._as)) { + parseExportNamespace(); + } else { + parseExportFrom(); + } +} + +function parseExportNamespace() { + next(); + state.tokens[state.tokens.length - 1].type = tt._as; + parseIdentifier(); + parseExportSpecifiersMaybe(); + parseExportFrom(); +} + +function shouldParseExportDeclaration() { + return ( + (isTypeScriptEnabled && tsIsDeclarationStart()) || + (isFlowEnabled && flowShouldParseExportDeclaration()) || + state.type === tt._var || + state.type === tt._const || + state.type === tt._let || + state.type === tt._function || + state.type === tt._class || + isContextual(ContextualKeyword._async) || + match(tt.at) + ); +} + +// Parses a comma-separated list of module exports. +export function parseExportSpecifiers() { + let first = true; + + // export { x, y as z } [from '...'] + expect(tt.braceL); + + while (!eat(tt.braceR) && !state.error) { + if (first) { + first = false; + } else { + expect(tt.comma); + if (eat(tt.braceR)) { + break; + } + } + parseExportSpecifier(); + } +} + +function parseExportSpecifier() { + if (isTypeScriptEnabled) { + tsParseExportSpecifier(); + return; + } + parseIdentifier(); + state.tokens[state.tokens.length - 1].identifierRole = IdentifierRole.ExportAccess; + if (eatContextual(ContextualKeyword._as)) { + parseIdentifier(); + } +} + +/** + * Starting at the `module` token in an import, determine if it was truly an + * import reflection token or just looks like one. + * + * Returns true for: + * import module foo from "foo"; + * import module from from "foo"; + * + * Returns false for: + * import module from "foo"; + * import module, {bar} from "foo"; + */ +function isImportReflection() { + const snapshot = state.snapshot(); + expectContextual(ContextualKeyword._module); + if (eatContextual(ContextualKeyword._from)) { + if (isContextual(ContextualKeyword._from)) { + state.restoreFromSnapshot(snapshot); + return true; + } else { + state.restoreFromSnapshot(snapshot); + return false; + } + } else if (match(tt.comma)) { + state.restoreFromSnapshot(snapshot); + return false; + } else { + state.restoreFromSnapshot(snapshot); + return true; + } +} + +/** + * Eat the "module" token from the import reflection proposal. + * https://github.com/tc39/proposal-import-reflection + */ +function parseMaybeImportReflection() { + // isImportReflection does snapshot/restore, so only run it if we see the word + // "module". + if (isContextual(ContextualKeyword._module) && isImportReflection()) { + next(); + } +} + +// Parses import declaration. + +export function parseImport() { + if (isTypeScriptEnabled && match(tt.name) && lookaheadType() === tt.eq) { + tsParseImportEqualsDeclaration(); + return; + } + if (isTypeScriptEnabled && isContextual(ContextualKeyword._type)) { + const lookahead = lookaheadTypeAndKeyword(); + if (lookahead.type === tt.name && lookahead.contextualKeyword !== ContextualKeyword._from) { + // One of these `import type` cases: + // import type T = require('T'); + // import type A from 'A'; + expectContextual(ContextualKeyword._type); + if (lookaheadType() === tt.eq) { + tsParseImportEqualsDeclaration(); + return; + } + // If this is an `import type...from` statement, then we already ate the + // type token, so proceed to the regular import parser. + } else if (lookahead.type === tt.star || lookahead.type === tt.braceL) { + // One of these `import type` cases, in which case we can eat the type token + // and proceed as normal: + // import type * as A from 'A'; + // import type {a} from 'A'; + expectContextual(ContextualKeyword._type); + } + // Otherwise, we are importing the name "type". + } + + // import '...' + if (match(tt.string)) { + parseExprAtom(); + } else { + parseMaybeImportReflection(); + parseImportSpecifiers(); + expectContextual(ContextualKeyword._from); + parseExprAtom(); + } + maybeParseImportAttributes(); + semicolon(); +} + +// eslint-disable-next-line no-unused-vars +function shouldParseDefaultImport() { + return match(tt.name); +} + +function parseImportSpecifierLocal() { + parseImportedIdentifier(); +} + +// Parses a comma-separated list of module imports. +function parseImportSpecifiers() { + if (isFlowEnabled) { + flowStartParseImportSpecifiers(); + } + + let first = true; + if (shouldParseDefaultImport()) { + // import defaultObj, { x, y as z } from '...' + parseImportSpecifierLocal(); + + if (!eat(tt.comma)) return; + } + + if (match(tt.star)) { + next(); + expectContextual(ContextualKeyword._as); + + parseImportSpecifierLocal(); + + return; + } + + expect(tt.braceL); + while (!eat(tt.braceR) && !state.error) { + if (first) { + first = false; + } else { + // Detect an attempt to deep destructure + if (eat(tt.colon)) { + unexpected( + "ES2015 named imports do not destructure. Use another statement for destructuring after the import.", + ); + } + + expect(tt.comma); + if (eat(tt.braceR)) { + break; + } + } + + parseImportSpecifier(); + } +} + +function parseImportSpecifier() { + if (isTypeScriptEnabled) { + tsParseImportSpecifier(); + return; + } + if (isFlowEnabled) { + flowParseImportSpecifier(); + return; + } + parseImportedIdentifier(); + if (isContextual(ContextualKeyword._as)) { + state.tokens[state.tokens.length - 1].identifierRole = IdentifierRole.ImportAccess; + next(); + parseImportedIdentifier(); + } +} + +/** + * Parse import attributes like `with {type: "json"}`, or the legacy form + * `assert {type: "json"}`. + * + * Import attributes technically have their own syntax, but are always parseable + * as a plain JS object, so just do that for simplicity. + */ +function maybeParseImportAttributes() { + if (match(tt._with) || (isContextual(ContextualKeyword._assert) && !hasPrecedingLineBreak())) { + next(); + parseObj(false, false); + } +} diff --git a/node_modules/sucrase/dist/esm/parser/traverser/util.js b/node_modules/sucrase/dist/esm/parser/traverser/util.js new file mode 100644 index 0000000..6a2b2d9 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/traverser/util.js @@ -0,0 +1,104 @@ +import {eat, finishToken, lookaheadTypeAndKeyword, match, nextTokenStart} from "../tokenizer/index"; + +import {formatTokenType, TokenType as tt} from "../tokenizer/types"; +import {charCodes} from "../util/charcodes"; +import {input, state} from "./base"; + +// ## Parser utilities + +// Tests whether parsed token is a contextual keyword. +export function isContextual(contextualKeyword) { + return state.contextualKeyword === contextualKeyword; +} + +export function isLookaheadContextual(contextualKeyword) { + const l = lookaheadTypeAndKeyword(); + return l.type === tt.name && l.contextualKeyword === contextualKeyword; +} + +// Consumes contextual keyword if possible. +export function eatContextual(contextualKeyword) { + return state.contextualKeyword === contextualKeyword && eat(tt.name); +} + +// Asserts that following token is given contextual keyword. +export function expectContextual(contextualKeyword) { + if (!eatContextual(contextualKeyword)) { + unexpected(); + } +} + +// Test whether a semicolon can be inserted at the current position. +export function canInsertSemicolon() { + return match(tt.eof) || match(tt.braceR) || hasPrecedingLineBreak(); +} + +export function hasPrecedingLineBreak() { + const prevToken = state.tokens[state.tokens.length - 1]; + const lastTokEnd = prevToken ? prevToken.end : 0; + for (let i = lastTokEnd; i < state.start; i++) { + const code = input.charCodeAt(i); + if ( + code === charCodes.lineFeed || + code === charCodes.carriageReturn || + code === 0x2028 || + code === 0x2029 + ) { + return true; + } + } + return false; +} + +export function hasFollowingLineBreak() { + const nextStart = nextTokenStart(); + for (let i = state.end; i < nextStart; i++) { + const code = input.charCodeAt(i); + if ( + code === charCodes.lineFeed || + code === charCodes.carriageReturn || + code === 0x2028 || + code === 0x2029 + ) { + return true; + } + } + return false; +} + +export function isLineTerminator() { + return eat(tt.semi) || canInsertSemicolon(); +} + +// Consume a semicolon, or, failing that, see if we are allowed to +// pretend that there is a semicolon at this position. +export function semicolon() { + if (!isLineTerminator()) { + unexpected('Unexpected token, expected ";"'); + } +} + +// Expect a token of a given type. If found, consume it, otherwise, +// raise an unexpected token error at given pos. +export function expect(type) { + const matched = eat(type); + if (!matched) { + unexpected(`Unexpected token, expected "${formatTokenType(type)}"`); + } +} + +/** + * Transition the parser to an error state. All code needs to be written to naturally unwind in this + * state, which allows us to backtrack without exceptions and without error plumbing everywhere. + */ +export function unexpected(message = "Unexpected token", pos = state.start) { + if (state.error) { + return; + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const err = new SyntaxError(message); + err.pos = pos; + state.error = err; + state.pos = input.length; + finishToken(tt.eof); +} diff --git a/node_modules/sucrase/dist/esm/parser/util/charcodes.js b/node_modules/sucrase/dist/esm/parser/util/charcodes.js new file mode 100644 index 0000000..36ea667 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/util/charcodes.js @@ -0,0 +1,115 @@ +export var charCodes; (function (charCodes) { + const backSpace = 8; charCodes[charCodes["backSpace"] = backSpace] = "backSpace"; + const lineFeed = 10; charCodes[charCodes["lineFeed"] = lineFeed] = "lineFeed"; // '\n' + const tab = 9; charCodes[charCodes["tab"] = tab] = "tab"; // '\t' + const carriageReturn = 13; charCodes[charCodes["carriageReturn"] = carriageReturn] = "carriageReturn"; // '\r' + const shiftOut = 14; charCodes[charCodes["shiftOut"] = shiftOut] = "shiftOut"; + const space = 32; charCodes[charCodes["space"] = space] = "space"; + const exclamationMark = 33; charCodes[charCodes["exclamationMark"] = exclamationMark] = "exclamationMark"; // '!' + const quotationMark = 34; charCodes[charCodes["quotationMark"] = quotationMark] = "quotationMark"; // '"' + const numberSign = 35; charCodes[charCodes["numberSign"] = numberSign] = "numberSign"; // '#' + const dollarSign = 36; charCodes[charCodes["dollarSign"] = dollarSign] = "dollarSign"; // '$' + const percentSign = 37; charCodes[charCodes["percentSign"] = percentSign] = "percentSign"; // '%' + const ampersand = 38; charCodes[charCodes["ampersand"] = ampersand] = "ampersand"; // '&' + const apostrophe = 39; charCodes[charCodes["apostrophe"] = apostrophe] = "apostrophe"; // ''' + const leftParenthesis = 40; charCodes[charCodes["leftParenthesis"] = leftParenthesis] = "leftParenthesis"; // '(' + const rightParenthesis = 41; charCodes[charCodes["rightParenthesis"] = rightParenthesis] = "rightParenthesis"; // ')' + const asterisk = 42; charCodes[charCodes["asterisk"] = asterisk] = "asterisk"; // '*' + const plusSign = 43; charCodes[charCodes["plusSign"] = plusSign] = "plusSign"; // '+' + const comma = 44; charCodes[charCodes["comma"] = comma] = "comma"; // ',' + const dash = 45; charCodes[charCodes["dash"] = dash] = "dash"; // '-' + const dot = 46; charCodes[charCodes["dot"] = dot] = "dot"; // '.' + const slash = 47; charCodes[charCodes["slash"] = slash] = "slash"; // '/' + const digit0 = 48; charCodes[charCodes["digit0"] = digit0] = "digit0"; // '0' + const digit1 = 49; charCodes[charCodes["digit1"] = digit1] = "digit1"; // '1' + const digit2 = 50; charCodes[charCodes["digit2"] = digit2] = "digit2"; // '2' + const digit3 = 51; charCodes[charCodes["digit3"] = digit3] = "digit3"; // '3' + const digit4 = 52; charCodes[charCodes["digit4"] = digit4] = "digit4"; // '4' + const digit5 = 53; charCodes[charCodes["digit5"] = digit5] = "digit5"; // '5' + const digit6 = 54; charCodes[charCodes["digit6"] = digit6] = "digit6"; // '6' + const digit7 = 55; charCodes[charCodes["digit7"] = digit7] = "digit7"; // '7' + const digit8 = 56; charCodes[charCodes["digit8"] = digit8] = "digit8"; // '8' + const digit9 = 57; charCodes[charCodes["digit9"] = digit9] = "digit9"; // '9' + const colon = 58; charCodes[charCodes["colon"] = colon] = "colon"; // ':' + const semicolon = 59; charCodes[charCodes["semicolon"] = semicolon] = "semicolon"; // ';' + const lessThan = 60; charCodes[charCodes["lessThan"] = lessThan] = "lessThan"; // '<' + const equalsTo = 61; charCodes[charCodes["equalsTo"] = equalsTo] = "equalsTo"; // '=' + const greaterThan = 62; charCodes[charCodes["greaterThan"] = greaterThan] = "greaterThan"; // '>' + const questionMark = 63; charCodes[charCodes["questionMark"] = questionMark] = "questionMark"; // '?' + const atSign = 64; charCodes[charCodes["atSign"] = atSign] = "atSign"; // '@' + const uppercaseA = 65; charCodes[charCodes["uppercaseA"] = uppercaseA] = "uppercaseA"; // 'A' + const uppercaseB = 66; charCodes[charCodes["uppercaseB"] = uppercaseB] = "uppercaseB"; // 'B' + const uppercaseC = 67; charCodes[charCodes["uppercaseC"] = uppercaseC] = "uppercaseC"; // 'C' + const uppercaseD = 68; charCodes[charCodes["uppercaseD"] = uppercaseD] = "uppercaseD"; // 'D' + const uppercaseE = 69; charCodes[charCodes["uppercaseE"] = uppercaseE] = "uppercaseE"; // 'E' + const uppercaseF = 70; charCodes[charCodes["uppercaseF"] = uppercaseF] = "uppercaseF"; // 'F' + const uppercaseG = 71; charCodes[charCodes["uppercaseG"] = uppercaseG] = "uppercaseG"; // 'G' + const uppercaseH = 72; charCodes[charCodes["uppercaseH"] = uppercaseH] = "uppercaseH"; // 'H' + const uppercaseI = 73; charCodes[charCodes["uppercaseI"] = uppercaseI] = "uppercaseI"; // 'I' + const uppercaseJ = 74; charCodes[charCodes["uppercaseJ"] = uppercaseJ] = "uppercaseJ"; // 'J' + const uppercaseK = 75; charCodes[charCodes["uppercaseK"] = uppercaseK] = "uppercaseK"; // 'K' + const uppercaseL = 76; charCodes[charCodes["uppercaseL"] = uppercaseL] = "uppercaseL"; // 'L' + const uppercaseM = 77; charCodes[charCodes["uppercaseM"] = uppercaseM] = "uppercaseM"; // 'M' + const uppercaseN = 78; charCodes[charCodes["uppercaseN"] = uppercaseN] = "uppercaseN"; // 'N' + const uppercaseO = 79; charCodes[charCodes["uppercaseO"] = uppercaseO] = "uppercaseO"; // 'O' + const uppercaseP = 80; charCodes[charCodes["uppercaseP"] = uppercaseP] = "uppercaseP"; // 'P' + const uppercaseQ = 81; charCodes[charCodes["uppercaseQ"] = uppercaseQ] = "uppercaseQ"; // 'Q' + const uppercaseR = 82; charCodes[charCodes["uppercaseR"] = uppercaseR] = "uppercaseR"; // 'R' + const uppercaseS = 83; charCodes[charCodes["uppercaseS"] = uppercaseS] = "uppercaseS"; // 'S' + const uppercaseT = 84; charCodes[charCodes["uppercaseT"] = uppercaseT] = "uppercaseT"; // 'T' + const uppercaseU = 85; charCodes[charCodes["uppercaseU"] = uppercaseU] = "uppercaseU"; // 'U' + const uppercaseV = 86; charCodes[charCodes["uppercaseV"] = uppercaseV] = "uppercaseV"; // 'V' + const uppercaseW = 87; charCodes[charCodes["uppercaseW"] = uppercaseW] = "uppercaseW"; // 'W' + const uppercaseX = 88; charCodes[charCodes["uppercaseX"] = uppercaseX] = "uppercaseX"; // 'X' + const uppercaseY = 89; charCodes[charCodes["uppercaseY"] = uppercaseY] = "uppercaseY"; // 'Y' + const uppercaseZ = 90; charCodes[charCodes["uppercaseZ"] = uppercaseZ] = "uppercaseZ"; // 'Z' + const leftSquareBracket = 91; charCodes[charCodes["leftSquareBracket"] = leftSquareBracket] = "leftSquareBracket"; // '[' + const backslash = 92; charCodes[charCodes["backslash"] = backslash] = "backslash"; // '\ ' + const rightSquareBracket = 93; charCodes[charCodes["rightSquareBracket"] = rightSquareBracket] = "rightSquareBracket"; // ']' + const caret = 94; charCodes[charCodes["caret"] = caret] = "caret"; // '^' + const underscore = 95; charCodes[charCodes["underscore"] = underscore] = "underscore"; // '_' + const graveAccent = 96; charCodes[charCodes["graveAccent"] = graveAccent] = "graveAccent"; // '`' + const lowercaseA = 97; charCodes[charCodes["lowercaseA"] = lowercaseA] = "lowercaseA"; // 'a' + const lowercaseB = 98; charCodes[charCodes["lowercaseB"] = lowercaseB] = "lowercaseB"; // 'b' + const lowercaseC = 99; charCodes[charCodes["lowercaseC"] = lowercaseC] = "lowercaseC"; // 'c' + const lowercaseD = 100; charCodes[charCodes["lowercaseD"] = lowercaseD] = "lowercaseD"; // 'd' + const lowercaseE = 101; charCodes[charCodes["lowercaseE"] = lowercaseE] = "lowercaseE"; // 'e' + const lowercaseF = 102; charCodes[charCodes["lowercaseF"] = lowercaseF] = "lowercaseF"; // 'f' + const lowercaseG = 103; charCodes[charCodes["lowercaseG"] = lowercaseG] = "lowercaseG"; // 'g' + const lowercaseH = 104; charCodes[charCodes["lowercaseH"] = lowercaseH] = "lowercaseH"; // 'h' + const lowercaseI = 105; charCodes[charCodes["lowercaseI"] = lowercaseI] = "lowercaseI"; // 'i' + const lowercaseJ = 106; charCodes[charCodes["lowercaseJ"] = lowercaseJ] = "lowercaseJ"; // 'j' + const lowercaseK = 107; charCodes[charCodes["lowercaseK"] = lowercaseK] = "lowercaseK"; // 'k' + const lowercaseL = 108; charCodes[charCodes["lowercaseL"] = lowercaseL] = "lowercaseL"; // 'l' + const lowercaseM = 109; charCodes[charCodes["lowercaseM"] = lowercaseM] = "lowercaseM"; // 'm' + const lowercaseN = 110; charCodes[charCodes["lowercaseN"] = lowercaseN] = "lowercaseN"; // 'n' + const lowercaseO = 111; charCodes[charCodes["lowercaseO"] = lowercaseO] = "lowercaseO"; // 'o' + const lowercaseP = 112; charCodes[charCodes["lowercaseP"] = lowercaseP] = "lowercaseP"; // 'p' + const lowercaseQ = 113; charCodes[charCodes["lowercaseQ"] = lowercaseQ] = "lowercaseQ"; // 'q' + const lowercaseR = 114; charCodes[charCodes["lowercaseR"] = lowercaseR] = "lowercaseR"; // 'r' + const lowercaseS = 115; charCodes[charCodes["lowercaseS"] = lowercaseS] = "lowercaseS"; // 's' + const lowercaseT = 116; charCodes[charCodes["lowercaseT"] = lowercaseT] = "lowercaseT"; // 't' + const lowercaseU = 117; charCodes[charCodes["lowercaseU"] = lowercaseU] = "lowercaseU"; // 'u' + const lowercaseV = 118; charCodes[charCodes["lowercaseV"] = lowercaseV] = "lowercaseV"; // 'v' + const lowercaseW = 119; charCodes[charCodes["lowercaseW"] = lowercaseW] = "lowercaseW"; // 'w' + const lowercaseX = 120; charCodes[charCodes["lowercaseX"] = lowercaseX] = "lowercaseX"; // 'x' + const lowercaseY = 121; charCodes[charCodes["lowercaseY"] = lowercaseY] = "lowercaseY"; // 'y' + const lowercaseZ = 122; charCodes[charCodes["lowercaseZ"] = lowercaseZ] = "lowercaseZ"; // 'z' + const leftCurlyBrace = 123; charCodes[charCodes["leftCurlyBrace"] = leftCurlyBrace] = "leftCurlyBrace"; // '{' + const verticalBar = 124; charCodes[charCodes["verticalBar"] = verticalBar] = "verticalBar"; // '|' + const rightCurlyBrace = 125; charCodes[charCodes["rightCurlyBrace"] = rightCurlyBrace] = "rightCurlyBrace"; // '}' + const tilde = 126; charCodes[charCodes["tilde"] = tilde] = "tilde"; // '~' + const nonBreakingSpace = 160; charCodes[charCodes["nonBreakingSpace"] = nonBreakingSpace] = "nonBreakingSpace"; + // eslint-disable-next-line no-irregular-whitespace + const oghamSpaceMark = 5760; charCodes[charCodes["oghamSpaceMark"] = oghamSpaceMark] = "oghamSpaceMark"; // ' ' + const lineSeparator = 8232; charCodes[charCodes["lineSeparator"] = lineSeparator] = "lineSeparator"; + const paragraphSeparator = 8233; charCodes[charCodes["paragraphSeparator"] = paragraphSeparator] = "paragraphSeparator"; +})(charCodes || (charCodes = {})); + +export function isDigit(code) { + return ( + (code >= charCodes.digit0 && code <= charCodes.digit9) || + (code >= charCodes.lowercaseA && code <= charCodes.lowercaseF) || + (code >= charCodes.uppercaseA && code <= charCodes.uppercaseF) + ); +} diff --git a/node_modules/sucrase/dist/esm/parser/util/identifier.js b/node_modules/sucrase/dist/esm/parser/util/identifier.js new file mode 100644 index 0000000..33a6bb1 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/util/identifier.js @@ -0,0 +1,34 @@ +import {charCodes} from "./charcodes"; +import {WHITESPACE_CHARS} from "./whitespace"; + +function computeIsIdentifierChar(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code < 91) return true; + if (code < 97) return code === 95; + if (code < 123) return true; + if (code < 128) return false; + throw new Error("Should not be called with non-ASCII char code."); +} + +export const IS_IDENTIFIER_CHAR = new Uint8Array(65536); +for (let i = 0; i < 128; i++) { + IS_IDENTIFIER_CHAR[i] = computeIsIdentifierChar(i) ? 1 : 0; +} +for (let i = 128; i < 65536; i++) { + IS_IDENTIFIER_CHAR[i] = 1; +} +// Aside from whitespace and newlines, all characters outside the ASCII space are either +// identifier characters or invalid. Since we're not performing code validation, we can just +// treat all invalid characters as identifier characters. +for (const whitespaceChar of WHITESPACE_CHARS) { + IS_IDENTIFIER_CHAR[whitespaceChar] = 0; +} +IS_IDENTIFIER_CHAR[0x2028] = 0; +IS_IDENTIFIER_CHAR[0x2029] = 0; + +export const IS_IDENTIFIER_START = IS_IDENTIFIER_CHAR.slice(); +for (let numChar = charCodes.digit0; numChar <= charCodes.digit9; numChar++) { + IS_IDENTIFIER_START[numChar] = 0; +} diff --git a/node_modules/sucrase/dist/esm/parser/util/whitespace.js b/node_modules/sucrase/dist/esm/parser/util/whitespace.js new file mode 100644 index 0000000..303b8a6 --- /dev/null +++ b/node_modules/sucrase/dist/esm/parser/util/whitespace.js @@ -0,0 +1,33 @@ +import {charCodes} from "./charcodes"; + +// https://tc39.github.io/ecma262/#sec-white-space +export const WHITESPACE_CHARS = [ + 0x0009, + 0x000b, + 0x000c, + charCodes.space, + charCodes.nonBreakingSpace, + charCodes.oghamSpaceMark, + 0x2000, // EN QUAD + 0x2001, // EM QUAD + 0x2002, // EN SPACE + 0x2003, // EM SPACE + 0x2004, // THREE-PER-EM SPACE + 0x2005, // FOUR-PER-EM SPACE + 0x2006, // SIX-PER-EM SPACE + 0x2007, // FIGURE SPACE + 0x2008, // PUNCTUATION SPACE + 0x2009, // THIN SPACE + 0x200a, // HAIR SPACE + 0x202f, // NARROW NO-BREAK SPACE + 0x205f, // MEDIUM MATHEMATICAL SPACE + 0x3000, // IDEOGRAPHIC SPACE + 0xfeff, // ZERO WIDTH NO-BREAK SPACE +]; + +export const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; + +export const IS_WHITESPACE = new Uint8Array(65536); +for (const char of WHITESPACE_CHARS) { + IS_WHITESPACE[char] = 1; +} diff --git a/node_modules/sucrase/dist/esm/register.js b/node_modules/sucrase/dist/esm/register.js new file mode 100644 index 0000000..ca30cab --- /dev/null +++ b/node_modules/sucrase/dist/esm/register.js @@ -0,0 +1,88 @@ +import * as pirates from "pirates"; + +import { transform} from "./index"; + + + + + + + + +export function addHook( + extension, + sucraseOptions, + hookOptions, +) { + let mergedSucraseOptions = sucraseOptions; + const sucraseOptionsEnvJSON = process.env.SUCRASE_OPTIONS; + if (sucraseOptionsEnvJSON) { + mergedSucraseOptions = {...mergedSucraseOptions, ...JSON.parse(sucraseOptionsEnvJSON)}; + } + return pirates.addHook( + (code, filePath) => { + const {code: transformedCode, sourceMap} = transform(code, { + ...mergedSucraseOptions, + sourceMapOptions: {compiledFilename: filePath}, + filePath, + }); + const mapBase64 = Buffer.from(JSON.stringify(sourceMap)).toString("base64"); + const suffix = `//# sourceMappingURL=data:application/json;charset=utf-8;base64,${mapBase64}`; + return `${transformedCode}\n${suffix}`; + }, + {...hookOptions, exts: [extension]}, + ); +} + +export function registerJS(hookOptions) { + return addHook(".js", {transforms: ["imports", "flow", "jsx"]}, hookOptions); +} + +export function registerJSX(hookOptions) { + return addHook(".jsx", {transforms: ["imports", "flow", "jsx"]}, hookOptions); +} + +export function registerTS(hookOptions) { + return addHook(".ts", {transforms: ["imports", "typescript"]}, hookOptions); +} + +export function registerTSX(hookOptions) { + return addHook(".tsx", {transforms: ["imports", "typescript", "jsx"]}, hookOptions); +} + +export function registerTSLegacyModuleInterop(hookOptions) { + return addHook( + ".ts", + { + transforms: ["imports", "typescript"], + enableLegacyTypeScriptModuleInterop: true, + }, + hookOptions, + ); +} + +export function registerTSXLegacyModuleInterop(hookOptions) { + return addHook( + ".tsx", + { + transforms: ["imports", "typescript", "jsx"], + enableLegacyTypeScriptModuleInterop: true, + }, + hookOptions, + ); +} + +export function registerAll(hookOptions) { + const reverts = [ + registerJS(hookOptions), + registerJSX(hookOptions), + registerTS(hookOptions), + registerTSX(hookOptions), + ]; + + return () => { + for (const fn of reverts) { + fn(); + } + }; +} diff --git a/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js b/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js new file mode 100644 index 0000000..78cf896 --- /dev/null +++ b/node_modules/sucrase/dist/esm/transformers/CJSImportTransformer.js @@ -0,0 +1,916 @@ + + + +import {IdentifierRole, isDeclaration, isObjectShorthandDeclaration} from "../parser/tokenizer"; +import {ContextualKeyword} from "../parser/tokenizer/keywords"; +import {TokenType as tt} from "../parser/tokenizer/types"; + +import elideImportEquals from "../util/elideImportEquals"; +import getDeclarationInfo, { + + EMPTY_DECLARATION_INFO, +} from "../util/getDeclarationInfo"; +import getImportExportSpecifierInfo from "../util/getImportExportSpecifierInfo"; +import isExportFrom from "../util/isExportFrom"; +import {removeMaybeImportAttributes} from "../util/removeMaybeImportAttributes"; +import shouldElideDefaultExport from "../util/shouldElideDefaultExport"; + + +import Transformer from "./Transformer"; + +/** + * Class for editing import statements when we are transforming to commonjs. + */ +export default class CJSImportTransformer extends Transformer { + __init() {this.hadExport = false} + __init2() {this.hadNamedExport = false} + __init3() {this.hadDefaultExport = false} + + + constructor( + rootTransformer, + tokens, + importProcessor, + nameManager, + helperManager, + reactHotLoaderTransformer, + enableLegacyBabel5ModuleInterop, + enableLegacyTypeScriptModuleInterop, + isTypeScriptTransformEnabled, + isFlowTransformEnabled, + preserveDynamicImport, + keepUnusedImports, + ) { + super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.importProcessor = importProcessor;this.nameManager = nameManager;this.helperManager = helperManager;this.reactHotLoaderTransformer = reactHotLoaderTransformer;this.enableLegacyBabel5ModuleInterop = enableLegacyBabel5ModuleInterop;this.enableLegacyTypeScriptModuleInterop = enableLegacyTypeScriptModuleInterop;this.isTypeScriptTransformEnabled = isTypeScriptTransformEnabled;this.isFlowTransformEnabled = isFlowTransformEnabled;this.preserveDynamicImport = preserveDynamicImport;this.keepUnusedImports = keepUnusedImports;CJSImportTransformer.prototype.__init.call(this);CJSImportTransformer.prototype.__init2.call(this);CJSImportTransformer.prototype.__init3.call(this);; + this.declarationInfo = isTypeScriptTransformEnabled + ? getDeclarationInfo(tokens) + : EMPTY_DECLARATION_INFO; + } + + getPrefixCode() { + let prefix = ""; + if (this.hadExport) { + prefix += 'Object.defineProperty(exports, "__esModule", {value: true});'; + } + return prefix; + } + + getSuffixCode() { + if (this.enableLegacyBabel5ModuleInterop && this.hadDefaultExport && !this.hadNamedExport) { + return "\nmodule.exports = exports.default;\n"; + } + return ""; + } + + process() { + // TypeScript `import foo = require('foo');` should always just be translated to plain require. + if (this.tokens.matches3(tt._import, tt.name, tt.eq)) { + return this.processImportEquals(); + } + if (this.tokens.matches1(tt._import)) { + this.processImport(); + return true; + } + if (this.tokens.matches2(tt._export, tt.eq)) { + this.tokens.replaceToken("module.exports"); + return true; + } + if (this.tokens.matches1(tt._export) && !this.tokens.currentToken().isType) { + this.hadExport = true; + return this.processExport(); + } + if (this.tokens.matches2(tt.name, tt.postIncDec)) { + // Fall through to normal identifier matching if this doesn't apply. + if (this.processPostIncDec()) { + return true; + } + } + if (this.tokens.matches1(tt.name) || this.tokens.matches1(tt.jsxName)) { + return this.processIdentifier(); + } + if (this.tokens.matches1(tt.eq)) { + return this.processAssignment(); + } + if (this.tokens.matches1(tt.assign)) { + return this.processComplexAssignment(); + } + if (this.tokens.matches1(tt.preIncDec)) { + return this.processPreIncDec(); + } + return false; + } + + processImportEquals() { + const importName = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1); + if (this.importProcessor.shouldAutomaticallyElideImportedName(importName)) { + // If this name is only used as a type, elide the whole import. + elideImportEquals(this.tokens); + } else { + // Otherwise, switch `import` to `const`. + this.tokens.replaceToken("const"); + } + return true; + } + + /** + * Transform this: + * import foo, {bar} from 'baz'; + * into + * var _baz = require('baz'); var _baz2 = _interopRequireDefault(_baz); + * + * The import code was already generated in the import preprocessing step, so + * we just need to look it up. + */ + processImport() { + if (this.tokens.matches2(tt._import, tt.parenL)) { + if (this.preserveDynamicImport) { + // Bail out, only making progress for this one token. + this.tokens.copyToken(); + return; + } + const requireWrapper = this.enableLegacyTypeScriptModuleInterop + ? "" + : `${this.helperManager.getHelperName("interopRequireWildcard")}(`; + this.tokens.replaceToken(`Promise.resolve().then(() => ${requireWrapper}require`); + const contextId = this.tokens.currentToken().contextId; + if (contextId == null) { + throw new Error("Expected context ID on dynamic import invocation."); + } + this.tokens.copyToken(); + while (!this.tokens.matchesContextIdAndLabel(tt.parenR, contextId)) { + this.rootTransformer.processToken(); + } + this.tokens.replaceToken(requireWrapper ? ")))" : "))"); + return; + } + + const shouldElideImport = this.removeImportAndDetectIfShouldElide(); + if (shouldElideImport) { + this.tokens.removeToken(); + } else { + const path = this.tokens.stringValue(); + this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(path)); + this.tokens.appendCode(this.importProcessor.claimImportCode(path)); + } + removeMaybeImportAttributes(this.tokens); + if (this.tokens.matches1(tt.semi)) { + this.tokens.removeToken(); + } + } + + /** + * Erase this import (since any CJS output would be completely different), and + * return true if this import is should be elided due to being a type-only + * import. Such imports will not be emitted at all to avoid side effects. + * + * Import elision only happens with the TypeScript or Flow transforms enabled. + * + * TODO: This function has some awkward overlap with + * CJSImportProcessor.pruneTypeOnlyImports , and the two should be unified. + * That function handles TypeScript implicit import name elision, and removes + * an import if all typical imported names (without `type`) are removed due + * to being type-only imports. This function handles Flow import removal and + * properly distinguishes `import 'foo'` from `import {} from 'foo'` for TS + * purposes. + * + * The position should end at the import string. + */ + removeImportAndDetectIfShouldElide() { + this.tokens.removeInitialToken(); + if ( + this.tokens.matchesContextual(ContextualKeyword._type) && + !this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, tt.comma) && + !this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, ContextualKeyword._from) + ) { + // This is an "import type" statement, so exit early. + this.removeRemainingImport(); + return true; + } + + if (this.tokens.matches1(tt.name) || this.tokens.matches1(tt.star)) { + // We have a default import or namespace import, so there must be some + // non-type import. + this.removeRemainingImport(); + return false; + } + + if (this.tokens.matches1(tt.string)) { + // This is a bare import, so we should proceed with the import. + return false; + } + + let foundNonTypeImport = false; + let foundAnyNamedImport = false; + while (!this.tokens.matches1(tt.string)) { + // Check if any named imports are of the form "foo" or "foo as bar", with + // no leading "type". + if ( + (!foundNonTypeImport && this.tokens.matches1(tt.braceL)) || + this.tokens.matches1(tt.comma) + ) { + this.tokens.removeToken(); + if (!this.tokens.matches1(tt.braceR)) { + foundAnyNamedImport = true; + } + if ( + this.tokens.matches2(tt.name, tt.comma) || + this.tokens.matches2(tt.name, tt.braceR) || + this.tokens.matches4(tt.name, tt.name, tt.name, tt.comma) || + this.tokens.matches4(tt.name, tt.name, tt.name, tt.braceR) + ) { + foundNonTypeImport = true; + } + } + this.tokens.removeToken(); + } + if (this.keepUnusedImports) { + return false; + } + if (this.isTypeScriptTransformEnabled) { + return !foundNonTypeImport; + } else if (this.isFlowTransformEnabled) { + // In Flow, unlike TS, `import {} from 'foo';` preserves the import. + return foundAnyNamedImport && !foundNonTypeImport; + } else { + return false; + } + } + + removeRemainingImport() { + while (!this.tokens.matches1(tt.string)) { + this.tokens.removeToken(); + } + } + + processIdentifier() { + const token = this.tokens.currentToken(); + if (token.shadowsGlobal) { + return false; + } + + if (token.identifierRole === IdentifierRole.ObjectShorthand) { + return this.processObjectShorthand(); + } + + if (token.identifierRole !== IdentifierRole.Access) { + return false; + } + const replacement = this.importProcessor.getIdentifierReplacement( + this.tokens.identifierNameForToken(token), + ); + if (!replacement) { + return false; + } + // Tolerate any number of closing parens while looking for an opening paren + // that indicates a function call. + let possibleOpenParenIndex = this.tokens.currentIndex() + 1; + while ( + possibleOpenParenIndex < this.tokens.tokens.length && + this.tokens.tokens[possibleOpenParenIndex].type === tt.parenR + ) { + possibleOpenParenIndex++; + } + // Avoid treating imported functions as methods of their `exports` object + // by using `(0, f)` when the identifier is in a paren expression. Else + // use `Function.prototype.call` when the identifier is a guaranteed + // function call. When using `call`, pass undefined as the context. + if (this.tokens.tokens[possibleOpenParenIndex].type === tt.parenL) { + if ( + this.tokens.tokenAtRelativeIndex(1).type === tt.parenL && + this.tokens.tokenAtRelativeIndex(-1).type !== tt._new + ) { + this.tokens.replaceToken(`${replacement}.call(void 0, `); + // Remove the old paren. + this.tokens.removeToken(); + // Balance out the new paren. + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(tt.parenR); + } else { + // See here: http://2ality.com/2015/12/references.html + this.tokens.replaceToken(`(0, ${replacement})`); + } + } else { + this.tokens.replaceToken(replacement); + } + return true; + } + + processObjectShorthand() { + const identifier = this.tokens.identifierName(); + const replacement = this.importProcessor.getIdentifierReplacement(identifier); + if (!replacement) { + return false; + } + this.tokens.replaceToken(`${identifier}: ${replacement}`); + return true; + } + + processExport() { + if ( + this.tokens.matches2(tt._export, tt._enum) || + this.tokens.matches3(tt._export, tt._const, tt._enum) + ) { + this.hadNamedExport = true; + // Let the TypeScript transform handle it. + return false; + } + if (this.tokens.matches2(tt._export, tt._default)) { + if (this.tokens.matches3(tt._export, tt._default, tt._enum)) { + this.hadDefaultExport = true; + // Flow export default enums need some special handling, so handle them + // in that tranform rather than this one. + return false; + } + this.processExportDefault(); + return true; + } else if (this.tokens.matches2(tt._export, tt.braceL)) { + this.processExportBindings(); + return true; + } else if ( + this.tokens.matches2(tt._export, tt.name) && + this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, ContextualKeyword._type) + ) { + // export type {a}; + // export type {a as b}; + // export type {a} from './b'; + // export type * from './b'; + // export type * as ns from './b'; + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + if (this.tokens.matches1(tt.braceL)) { + while (!this.tokens.matches1(tt.braceR)) { + this.tokens.removeToken(); + } + this.tokens.removeToken(); + } else { + // * + this.tokens.removeToken(); + if (this.tokens.matches1(tt._as)) { + // as + this.tokens.removeToken(); + // ns + this.tokens.removeToken(); + } + } + // Remove type re-export `... } from './T'` + if ( + this.tokens.matchesContextual(ContextualKeyword._from) && + this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, tt.string) + ) { + this.tokens.removeToken(); + this.tokens.removeToken(); + removeMaybeImportAttributes(this.tokens); + } + return true; + } + this.hadNamedExport = true; + if ( + this.tokens.matches2(tt._export, tt._var) || + this.tokens.matches2(tt._export, tt._let) || + this.tokens.matches2(tt._export, tt._const) + ) { + this.processExportVar(); + return true; + } else if ( + this.tokens.matches2(tt._export, tt._function) || + // export async function + this.tokens.matches3(tt._export, tt.name, tt._function) + ) { + this.processExportFunction(); + return true; + } else if ( + this.tokens.matches2(tt._export, tt._class) || + this.tokens.matches3(tt._export, tt._abstract, tt._class) || + this.tokens.matches2(tt._export, tt.at) + ) { + this.processExportClass(); + return true; + } else if (this.tokens.matches2(tt._export, tt.star)) { + this.processExportStar(); + return true; + } else { + throw new Error("Unrecognized export syntax."); + } + } + + processAssignment() { + const index = this.tokens.currentIndex(); + const identifierToken = this.tokens.tokens[index - 1]; + // If the LHS is a type identifier, this must be a declaration like `let a: b = c;`, + // with `b` as the identifier, so nothing needs to be done in that case. + if (identifierToken.isType || identifierToken.type !== tt.name) { + return false; + } + if (identifierToken.shadowsGlobal) { + return false; + } + if (index >= 2 && this.tokens.matches1AtIndex(index - 2, tt.dot)) { + return false; + } + if (index >= 2 && [tt._var, tt._let, tt._const].includes(this.tokens.tokens[index - 2].type)) { + // Declarations don't need an extra assignment. This doesn't avoid the + // assignment for comma-separated declarations, but it's still correct + // since the assignment is just redundant. + return false; + } + const assignmentSnippet = this.importProcessor.resolveExportBinding( + this.tokens.identifierNameForToken(identifierToken), + ); + if (!assignmentSnippet) { + return false; + } + this.tokens.copyToken(); + this.tokens.appendCode(` ${assignmentSnippet} =`); + return true; + } + + /** + * Process something like `a += 3`, where `a` might be an exported value. + */ + processComplexAssignment() { + const index = this.tokens.currentIndex(); + const identifierToken = this.tokens.tokens[index - 1]; + if (identifierToken.type !== tt.name) { + return false; + } + if (identifierToken.shadowsGlobal) { + return false; + } + if (index >= 2 && this.tokens.matches1AtIndex(index - 2, tt.dot)) { + return false; + } + const assignmentSnippet = this.importProcessor.resolveExportBinding( + this.tokens.identifierNameForToken(identifierToken), + ); + if (!assignmentSnippet) { + return false; + } + this.tokens.appendCode(` = ${assignmentSnippet}`); + this.tokens.copyToken(); + return true; + } + + /** + * Process something like `++a`, where `a` might be an exported value. + */ + processPreIncDec() { + const index = this.tokens.currentIndex(); + const identifierToken = this.tokens.tokens[index + 1]; + if (identifierToken.type !== tt.name) { + return false; + } + if (identifierToken.shadowsGlobal) { + return false; + } + // Ignore things like ++a.b and ++a[b] and ++a().b. + if ( + index + 2 < this.tokens.tokens.length && + (this.tokens.matches1AtIndex(index + 2, tt.dot) || + this.tokens.matches1AtIndex(index + 2, tt.bracketL) || + this.tokens.matches1AtIndex(index + 2, tt.parenL)) + ) { + return false; + } + const identifierName = this.tokens.identifierNameForToken(identifierToken); + const assignmentSnippet = this.importProcessor.resolveExportBinding(identifierName); + if (!assignmentSnippet) { + return false; + } + this.tokens.appendCode(`${assignmentSnippet} = `); + this.tokens.copyToken(); + return true; + } + + /** + * Process something like `a++`, where `a` might be an exported value. + * This starts at the `a`, not at the `++`. + */ + processPostIncDec() { + const index = this.tokens.currentIndex(); + const identifierToken = this.tokens.tokens[index]; + const operatorToken = this.tokens.tokens[index + 1]; + if (identifierToken.type !== tt.name) { + return false; + } + if (identifierToken.shadowsGlobal) { + return false; + } + if (index >= 1 && this.tokens.matches1AtIndex(index - 1, tt.dot)) { + return false; + } + const identifierName = this.tokens.identifierNameForToken(identifierToken); + const assignmentSnippet = this.importProcessor.resolveExportBinding(identifierName); + if (!assignmentSnippet) { + return false; + } + const operatorCode = this.tokens.rawCodeForToken(operatorToken); + // We might also replace the identifier with something like exports.x, so + // do that replacement here as well. + const base = this.importProcessor.getIdentifierReplacement(identifierName) || identifierName; + if (operatorCode === "++") { + this.tokens.replaceToken(`(${base} = ${assignmentSnippet} = ${base} + 1, ${base} - 1)`); + } else if (operatorCode === "--") { + this.tokens.replaceToken(`(${base} = ${assignmentSnippet} = ${base} - 1, ${base} + 1)`); + } else { + throw new Error(`Unexpected operator: ${operatorCode}`); + } + this.tokens.removeToken(); + return true; + } + + processExportDefault() { + let exportedRuntimeValue = true; + if ( + this.tokens.matches4(tt._export, tt._default, tt._function, tt.name) || + // export default async function + (this.tokens.matches5(tt._export, tt._default, tt.name, tt._function, tt.name) && + this.tokens.matchesContextualAtIndex( + this.tokens.currentIndex() + 2, + ContextualKeyword._async, + )) + ) { + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + // Named function export case: change it to a top-level function + // declaration followed by exports statement. + const name = this.processNamedFunction(); + this.tokens.appendCode(` exports.default = ${name};`); + } else if ( + this.tokens.matches4(tt._export, tt._default, tt._class, tt.name) || + this.tokens.matches5(tt._export, tt._default, tt._abstract, tt._class, tt.name) || + this.tokens.matches3(tt._export, tt._default, tt.at) + ) { + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + this.copyDecorators(); + if (this.tokens.matches1(tt._abstract)) { + this.tokens.removeToken(); + } + const name = this.rootTransformer.processNamedClass(); + this.tokens.appendCode(` exports.default = ${name};`); + // After this point, this is a plain "export default E" statement. + } else if ( + shouldElideDefaultExport( + this.isTypeScriptTransformEnabled, + this.keepUnusedImports, + this.tokens, + this.declarationInfo, + ) + ) { + // If the exported value is just an identifier and should be elided by TypeScript + // rules, then remove it entirely. It will always have the form `export default e`, + // where `e` is an identifier. + exportedRuntimeValue = false; + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + this.tokens.removeToken(); + } else if (this.reactHotLoaderTransformer) { + // We need to assign E to a variable. Change "export default E" to + // "let _default; exports.default = _default = E" + const defaultVarName = this.nameManager.claimFreeName("_default"); + this.tokens.replaceToken(`let ${defaultVarName}; exports.`); + this.tokens.copyToken(); + this.tokens.appendCode(` = ${defaultVarName} =`); + this.reactHotLoaderTransformer.setExtractedDefaultExportName(defaultVarName); + } else { + // Change "export default E" to "exports.default = E" + this.tokens.replaceToken("exports."); + this.tokens.copyToken(); + this.tokens.appendCode(" ="); + } + if (exportedRuntimeValue) { + this.hadDefaultExport = true; + } + } + + copyDecorators() { + while (this.tokens.matches1(tt.at)) { + this.tokens.copyToken(); + if (this.tokens.matches1(tt.parenL)) { + this.tokens.copyExpectedToken(tt.parenL); + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(tt.parenR); + } else { + this.tokens.copyExpectedToken(tt.name); + while (this.tokens.matches1(tt.dot)) { + this.tokens.copyExpectedToken(tt.dot); + this.tokens.copyExpectedToken(tt.name); + } + if (this.tokens.matches1(tt.parenL)) { + this.tokens.copyExpectedToken(tt.parenL); + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(tt.parenR); + } + } + } + } + + /** + * Transform a declaration like `export var`, `export let`, or `export const`. + */ + processExportVar() { + if (this.isSimpleExportVar()) { + this.processSimpleExportVar(); + } else { + this.processComplexExportVar(); + } + } + + /** + * Determine if the export is of the form: + * export var/let/const [varName] = [expr]; + * In other words, determine if function name inference might apply. + */ + isSimpleExportVar() { + let tokenIndex = this.tokens.currentIndex(); + // export + tokenIndex++; + // var/let/const + tokenIndex++; + if (!this.tokens.matches1AtIndex(tokenIndex, tt.name)) { + return false; + } + tokenIndex++; + while (tokenIndex < this.tokens.tokens.length && this.tokens.tokens[tokenIndex].isType) { + tokenIndex++; + } + if (!this.tokens.matches1AtIndex(tokenIndex, tt.eq)) { + return false; + } + return true; + } + + /** + * Transform an `export var` declaration initializing a single variable. + * + * For example, this: + * export const f = () => {}; + * becomes this: + * const f = () => {}; exports.f = f; + * + * The variable is unused (e.g. exports.f has the true value of the export). + * We need to produce an assignment of this form so that the function will + * have an inferred name of "f", which wouldn't happen in the more general + * case below. + */ + processSimpleExportVar() { + // export + this.tokens.removeInitialToken(); + // var/let/const + this.tokens.copyToken(); + const varName = this.tokens.identifierName(); + // x: number -> x + while (!this.tokens.matches1(tt.eq)) { + this.rootTransformer.processToken(); + } + const endIndex = this.tokens.currentToken().rhsEndIndex; + if (endIndex == null) { + throw new Error("Expected = token with an end index."); + } + while (this.tokens.currentIndex() < endIndex) { + this.rootTransformer.processToken(); + } + this.tokens.appendCode(`; exports.${varName} = ${varName}`); + } + + /** + * Transform normal declaration exports, including handling destructuring. + * For example, this: + * export const {x: [a = 2, b], c} = d; + * becomes this: + * ({x: [exports.a = 2, exports.b], c: exports.c} = d;) + */ + processComplexExportVar() { + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + const needsParens = this.tokens.matches1(tt.braceL); + if (needsParens) { + this.tokens.appendCode("("); + } + + let depth = 0; + while (true) { + if ( + this.tokens.matches1(tt.braceL) || + this.tokens.matches1(tt.dollarBraceL) || + this.tokens.matches1(tt.bracketL) + ) { + depth++; + this.tokens.copyToken(); + } else if (this.tokens.matches1(tt.braceR) || this.tokens.matches1(tt.bracketR)) { + depth--; + this.tokens.copyToken(); + } else if ( + depth === 0 && + !this.tokens.matches1(tt.name) && + !this.tokens.currentToken().isType + ) { + break; + } else if (this.tokens.matches1(tt.eq)) { + // Default values might have assignments in the RHS that we want to ignore, so skip past + // them. + const endIndex = this.tokens.currentToken().rhsEndIndex; + if (endIndex == null) { + throw new Error("Expected = token with an end index."); + } + while (this.tokens.currentIndex() < endIndex) { + this.rootTransformer.processToken(); + } + } else { + const token = this.tokens.currentToken(); + if (isDeclaration(token)) { + const name = this.tokens.identifierName(); + let replacement = this.importProcessor.getIdentifierReplacement(name); + if (replacement === null) { + throw new Error(`Expected a replacement for ${name} in \`export var\` syntax.`); + } + if (isObjectShorthandDeclaration(token)) { + replacement = `${name}: ${replacement}`; + } + this.tokens.replaceToken(replacement); + } else { + this.rootTransformer.processToken(); + } + } + } + + if (needsParens) { + // Seek to the end of the RHS. + const endIndex = this.tokens.currentToken().rhsEndIndex; + if (endIndex == null) { + throw new Error("Expected = token with an end index."); + } + while (this.tokens.currentIndex() < endIndex) { + this.rootTransformer.processToken(); + } + this.tokens.appendCode(")"); + } + } + + /** + * Transform this: + * export function foo() {} + * into this: + * function foo() {} exports.foo = foo; + */ + processExportFunction() { + this.tokens.replaceToken(""); + const name = this.processNamedFunction(); + this.tokens.appendCode(` exports.${name} = ${name};`); + } + + /** + * Skip past a function with a name and return that name. + */ + processNamedFunction() { + if (this.tokens.matches1(tt._function)) { + this.tokens.copyToken(); + } else if (this.tokens.matches2(tt.name, tt._function)) { + if (!this.tokens.matchesContextual(ContextualKeyword._async)) { + throw new Error("Expected async keyword in function export."); + } + this.tokens.copyToken(); + this.tokens.copyToken(); + } + if (this.tokens.matches1(tt.star)) { + this.tokens.copyToken(); + } + if (!this.tokens.matches1(tt.name)) { + throw new Error("Expected identifier for exported function name."); + } + const name = this.tokens.identifierName(); + this.tokens.copyToken(); + if (this.tokens.currentToken().isType) { + this.tokens.removeInitialToken(); + while (this.tokens.currentToken().isType) { + this.tokens.removeToken(); + } + } + this.tokens.copyExpectedToken(tt.parenL); + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(tt.parenR); + this.rootTransformer.processPossibleTypeRange(); + this.tokens.copyExpectedToken(tt.braceL); + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(tt.braceR); + return name; + } + + /** + * Transform this: + * export class A {} + * into this: + * class A {} exports.A = A; + */ + processExportClass() { + this.tokens.removeInitialToken(); + this.copyDecorators(); + if (this.tokens.matches1(tt._abstract)) { + this.tokens.removeToken(); + } + const name = this.rootTransformer.processNamedClass(); + this.tokens.appendCode(` exports.${name} = ${name};`); + } + + /** + * Transform this: + * export {a, b as c}; + * into this: + * exports.a = a; exports.c = b; + * + * OR + * + * Transform this: + * export {a, b as c} from './foo'; + * into the pre-generated Object.defineProperty code from the ImportProcessor. + * + * For the first case, if the TypeScript transform is enabled, we need to skip + * exports that are only defined as types. + */ + processExportBindings() { + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + + const isReExport = isExportFrom(this.tokens); + + const exportStatements = []; + while (true) { + if (this.tokens.matches1(tt.braceR)) { + this.tokens.removeToken(); + break; + } + + const specifierInfo = getImportExportSpecifierInfo(this.tokens); + + while (this.tokens.currentIndex() < specifierInfo.endIndex) { + this.tokens.removeToken(); + } + + const shouldRemoveExport = + specifierInfo.isType || + (!isReExport && this.shouldElideExportedIdentifier(specifierInfo.leftName)); + if (!shouldRemoveExport) { + const exportedName = specifierInfo.rightName; + if (exportedName === "default") { + this.hadDefaultExport = true; + } else { + this.hadNamedExport = true; + } + const localName = specifierInfo.leftName; + const newLocalName = this.importProcessor.getIdentifierReplacement(localName); + exportStatements.push(`exports.${exportedName} = ${newLocalName || localName};`); + } + + if (this.tokens.matches1(tt.braceR)) { + this.tokens.removeToken(); + break; + } + if (this.tokens.matches2(tt.comma, tt.braceR)) { + this.tokens.removeToken(); + this.tokens.removeToken(); + break; + } else if (this.tokens.matches1(tt.comma)) { + this.tokens.removeToken(); + } else { + throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`); + } + } + + if (this.tokens.matchesContextual(ContextualKeyword._from)) { + // This is an export...from, so throw away the normal named export code + // and use the Object.defineProperty code from ImportProcessor. + this.tokens.removeToken(); + const path = this.tokens.stringValue(); + this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(path)); + removeMaybeImportAttributes(this.tokens); + } else { + // This is a normal named export, so use that. + this.tokens.appendCode(exportStatements.join(" ")); + } + + if (this.tokens.matches1(tt.semi)) { + this.tokens.removeToken(); + } + } + + processExportStar() { + this.tokens.removeInitialToken(); + while (!this.tokens.matches1(tt.string)) { + this.tokens.removeToken(); + } + const path = this.tokens.stringValue(); + this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(path)); + removeMaybeImportAttributes(this.tokens); + if (this.tokens.matches1(tt.semi)) { + this.tokens.removeToken(); + } + } + + shouldElideExportedIdentifier(name) { + return ( + this.isTypeScriptTransformEnabled && + !this.keepUnusedImports && + !this.declarationInfo.valueDeclarations.has(name) + ); + } +} diff --git a/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js b/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js new file mode 100644 index 0000000..b45cd3e --- /dev/null +++ b/node_modules/sucrase/dist/esm/transformers/ESMImportTransformer.js @@ -0,0 +1,415 @@ + + + +import {ContextualKeyword} from "../parser/tokenizer/keywords"; +import {TokenType as tt} from "../parser/tokenizer/types"; + +import elideImportEquals from "../util/elideImportEquals"; +import getDeclarationInfo, { + + EMPTY_DECLARATION_INFO, +} from "../util/getDeclarationInfo"; +import getImportExportSpecifierInfo from "../util/getImportExportSpecifierInfo"; +import {getNonTypeIdentifiers} from "../util/getNonTypeIdentifiers"; +import isExportFrom from "../util/isExportFrom"; +import {removeMaybeImportAttributes} from "../util/removeMaybeImportAttributes"; +import shouldElideDefaultExport from "../util/shouldElideDefaultExport"; + +import Transformer from "./Transformer"; + +/** + * Class for editing import statements when we are keeping the code as ESM. We still need to remove + * type-only imports in TypeScript and Flow. + */ +export default class ESMImportTransformer extends Transformer { + + + + + constructor( + tokens, + nameManager, + helperManager, + reactHotLoaderTransformer, + isTypeScriptTransformEnabled, + isFlowTransformEnabled, + keepUnusedImports, + options, + ) { + super();this.tokens = tokens;this.nameManager = nameManager;this.helperManager = helperManager;this.reactHotLoaderTransformer = reactHotLoaderTransformer;this.isTypeScriptTransformEnabled = isTypeScriptTransformEnabled;this.isFlowTransformEnabled = isFlowTransformEnabled;this.keepUnusedImports = keepUnusedImports;; + this.nonTypeIdentifiers = + isTypeScriptTransformEnabled && !keepUnusedImports + ? getNonTypeIdentifiers(tokens, options) + : new Set(); + this.declarationInfo = + isTypeScriptTransformEnabled && !keepUnusedImports + ? getDeclarationInfo(tokens) + : EMPTY_DECLARATION_INFO; + this.injectCreateRequireForImportRequire = Boolean(options.injectCreateRequireForImportRequire); + } + + process() { + // TypeScript `import foo = require('foo');` should always just be translated to plain require. + if (this.tokens.matches3(tt._import, tt.name, tt.eq)) { + return this.processImportEquals(); + } + if ( + this.tokens.matches4(tt._import, tt.name, tt.name, tt.eq) && + this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, ContextualKeyword._type) + ) { + // import type T = require('T') + this.tokens.removeInitialToken(); + // This construct is always exactly 8 tokens long, so remove the 7 remaining tokens. + for (let i = 0; i < 7; i++) { + this.tokens.removeToken(); + } + return true; + } + if (this.tokens.matches2(tt._export, tt.eq)) { + this.tokens.replaceToken("module.exports"); + return true; + } + if ( + this.tokens.matches5(tt._export, tt._import, tt.name, tt.name, tt.eq) && + this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 2, ContextualKeyword._type) + ) { + // export import type T = require('T') + this.tokens.removeInitialToken(); + // This construct is always exactly 9 tokens long, so remove the 8 remaining tokens. + for (let i = 0; i < 8; i++) { + this.tokens.removeToken(); + } + return true; + } + if (this.tokens.matches1(tt._import)) { + return this.processImport(); + } + if (this.tokens.matches2(tt._export, tt._default)) { + return this.processExportDefault(); + } + if (this.tokens.matches2(tt._export, tt.braceL)) { + return this.processNamedExports(); + } + if ( + this.tokens.matches2(tt._export, tt.name) && + this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, ContextualKeyword._type) + ) { + // export type {a}; + // export type {a as b}; + // export type {a} from './b'; + // export type * from './b'; + // export type * as ns from './b'; + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + if (this.tokens.matches1(tt.braceL)) { + while (!this.tokens.matches1(tt.braceR)) { + this.tokens.removeToken(); + } + this.tokens.removeToken(); + } else { + // * + this.tokens.removeToken(); + if (this.tokens.matches1(tt._as)) { + // as + this.tokens.removeToken(); + // ns + this.tokens.removeToken(); + } + } + // Remove type re-export `... } from './T'` + if ( + this.tokens.matchesContextual(ContextualKeyword._from) && + this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, tt.string) + ) { + this.tokens.removeToken(); + this.tokens.removeToken(); + removeMaybeImportAttributes(this.tokens); + } + return true; + } + return false; + } + + processImportEquals() { + const importName = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1); + if (this.shouldAutomaticallyElideImportedName(importName)) { + // If this name is only used as a type, elide the whole import. + elideImportEquals(this.tokens); + } else if (this.injectCreateRequireForImportRequire) { + // We're using require in an environment (Node ESM) that doesn't provide + // it as a global, so generate a helper to import it. + // import -> const + this.tokens.replaceToken("const"); + // Foo + this.tokens.copyToken(); + // = + this.tokens.copyToken(); + // require + this.tokens.replaceToken(this.helperManager.getHelperName("require")); + } else { + // Otherwise, just switch `import` to `const`. + this.tokens.replaceToken("const"); + } + return true; + } + + processImport() { + if (this.tokens.matches2(tt._import, tt.parenL)) { + // Dynamic imports don't need to be transformed. + return false; + } + + const snapshot = this.tokens.snapshot(); + const allImportsRemoved = this.removeImportTypeBindings(); + if (allImportsRemoved) { + this.tokens.restoreToSnapshot(snapshot); + while (!this.tokens.matches1(tt.string)) { + this.tokens.removeToken(); + } + this.tokens.removeToken(); + removeMaybeImportAttributes(this.tokens); + if (this.tokens.matches1(tt.semi)) { + this.tokens.removeToken(); + } + } + return true; + } + + /** + * Remove type bindings from this import, leaving the rest of the import intact. + * + * Return true if this import was ONLY types, and thus is eligible for removal. This will bail out + * of the replacement operation, so we can return early here. + */ + removeImportTypeBindings() { + this.tokens.copyExpectedToken(tt._import); + if ( + this.tokens.matchesContextual(ContextualKeyword._type) && + !this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, tt.comma) && + !this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, ContextualKeyword._from) + ) { + // This is an "import type" statement, so exit early. + return true; + } + + if (this.tokens.matches1(tt.string)) { + // This is a bare import, so we should proceed with the import. + this.tokens.copyToken(); + return false; + } + + // Skip the "module" token in import reflection. + if ( + this.tokens.matchesContextual(ContextualKeyword._module) && + this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 2, ContextualKeyword._from) + ) { + this.tokens.copyToken(); + } + + let foundNonTypeImport = false; + let foundAnyNamedImport = false; + let needsComma = false; + + // Handle default import. + if (this.tokens.matches1(tt.name)) { + if (this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())) { + this.tokens.removeToken(); + if (this.tokens.matches1(tt.comma)) { + this.tokens.removeToken(); + } + } else { + foundNonTypeImport = true; + this.tokens.copyToken(); + if (this.tokens.matches1(tt.comma)) { + // We're in a statement like: + // import A, * as B from './A'; + // or + // import A, {foo} from './A'; + // where the `A` is being kept. The comma should be removed if an only + // if the next part of the import statement is elided, but that's hard + // to determine at this point in the code. Instead, always remove it + // and set a flag to add it back if necessary. + needsComma = true; + this.tokens.removeToken(); + } + } + } + + if (this.tokens.matches1(tt.star)) { + if (this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))) { + this.tokens.removeToken(); + this.tokens.removeToken(); + this.tokens.removeToken(); + } else { + if (needsComma) { + this.tokens.appendCode(","); + } + foundNonTypeImport = true; + this.tokens.copyExpectedToken(tt.star); + this.tokens.copyExpectedToken(tt.name); + this.tokens.copyExpectedToken(tt.name); + } + } else if (this.tokens.matches1(tt.braceL)) { + if (needsComma) { + this.tokens.appendCode(","); + } + this.tokens.copyToken(); + while (!this.tokens.matches1(tt.braceR)) { + foundAnyNamedImport = true; + const specifierInfo = getImportExportSpecifierInfo(this.tokens); + if ( + specifierInfo.isType || + this.shouldAutomaticallyElideImportedName(specifierInfo.rightName) + ) { + while (this.tokens.currentIndex() < specifierInfo.endIndex) { + this.tokens.removeToken(); + } + if (this.tokens.matches1(tt.comma)) { + this.tokens.removeToken(); + } + } else { + foundNonTypeImport = true; + while (this.tokens.currentIndex() < specifierInfo.endIndex) { + this.tokens.copyToken(); + } + if (this.tokens.matches1(tt.comma)) { + this.tokens.copyToken(); + } + } + } + this.tokens.copyExpectedToken(tt.braceR); + } + + if (this.keepUnusedImports) { + return false; + } + if (this.isTypeScriptTransformEnabled) { + return !foundNonTypeImport; + } else if (this.isFlowTransformEnabled) { + // In Flow, unlike TS, `import {} from 'foo';` preserves the import. + return foundAnyNamedImport && !foundNonTypeImport; + } else { + return false; + } + } + + shouldAutomaticallyElideImportedName(name) { + return ( + this.isTypeScriptTransformEnabled && + !this.keepUnusedImports && + !this.nonTypeIdentifiers.has(name) + ); + } + + processExportDefault() { + if ( + shouldElideDefaultExport( + this.isTypeScriptTransformEnabled, + this.keepUnusedImports, + this.tokens, + this.declarationInfo, + ) + ) { + // If the exported value is just an identifier and should be elided by TypeScript + // rules, then remove it entirely. It will always have the form `export default e`, + // where `e` is an identifier. + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + this.tokens.removeToken(); + return true; + } + + const alreadyHasName = + this.tokens.matches4(tt._export, tt._default, tt._function, tt.name) || + // export default async function + (this.tokens.matches5(tt._export, tt._default, tt.name, tt._function, tt.name) && + this.tokens.matchesContextualAtIndex( + this.tokens.currentIndex() + 2, + ContextualKeyword._async, + )) || + this.tokens.matches4(tt._export, tt._default, tt._class, tt.name) || + this.tokens.matches5(tt._export, tt._default, tt._abstract, tt._class, tt.name); + + if (!alreadyHasName && this.reactHotLoaderTransformer) { + // This is a plain "export default E" statement and we need to assign E to a variable. + // Change "export default E" to "let _default; export default _default = E" + const defaultVarName = this.nameManager.claimFreeName("_default"); + this.tokens.replaceToken(`let ${defaultVarName}; export`); + this.tokens.copyToken(); + this.tokens.appendCode(` ${defaultVarName} =`); + this.reactHotLoaderTransformer.setExtractedDefaultExportName(defaultVarName); + return true; + } + return false; + } + + /** + * Handle a statement with one of these forms: + * export {a, type b}; + * export {c, type d} from 'foo'; + * + * In both cases, any explicit type exports should be removed. In the first + * case, we also need to handle implicit export elision for names declared as + * types. In the second case, we must NOT do implicit named export elision, + * but we must remove the runtime import if all exports are type exports. + */ + processNamedExports() { + if (!this.isTypeScriptTransformEnabled) { + return false; + } + this.tokens.copyExpectedToken(tt._export); + this.tokens.copyExpectedToken(tt.braceL); + + const isReExport = isExportFrom(this.tokens); + let foundNonTypeExport = false; + while (!this.tokens.matches1(tt.braceR)) { + const specifierInfo = getImportExportSpecifierInfo(this.tokens); + if ( + specifierInfo.isType || + (!isReExport && this.shouldElideExportedName(specifierInfo.leftName)) + ) { + // Type export, so remove all tokens, including any comma. + while (this.tokens.currentIndex() < specifierInfo.endIndex) { + this.tokens.removeToken(); + } + if (this.tokens.matches1(tt.comma)) { + this.tokens.removeToken(); + } + } else { + // Non-type export, so copy all tokens, including any comma. + foundNonTypeExport = true; + while (this.tokens.currentIndex() < specifierInfo.endIndex) { + this.tokens.copyToken(); + } + if (this.tokens.matches1(tt.comma)) { + this.tokens.copyToken(); + } + } + } + this.tokens.copyExpectedToken(tt.braceR); + + if (!this.keepUnusedImports && isReExport && !foundNonTypeExport) { + // This is a type-only re-export, so skip evaluating the other module. Technically this + // leaves the statement as `export {}`, but that's ok since that's a no-op. + this.tokens.removeToken(); + this.tokens.removeToken(); + removeMaybeImportAttributes(this.tokens); + } + + return true; + } + + /** + * ESM elides all imports with the rule that we only elide if we see that it's + * a type and never see it as a value. This is in contrast to CJS, which + * elides imports that are completely unknown. + */ + shouldElideExportedName(name) { + return ( + this.isTypeScriptTransformEnabled && + !this.keepUnusedImports && + this.declarationInfo.typeDeclarations.has(name) && + !this.declarationInfo.valueDeclarations.has(name) + ); + } +} diff --git a/node_modules/sucrase/dist/esm/transformers/FlowTransformer.js b/node_modules/sucrase/dist/esm/transformers/FlowTransformer.js new file mode 100644 index 0000000..7df0aca --- /dev/null +++ b/node_modules/sucrase/dist/esm/transformers/FlowTransformer.js @@ -0,0 +1,182 @@ +import {ContextualKeyword} from "../parser/tokenizer/keywords"; +import {TokenType as tt} from "../parser/tokenizer/types"; + + +import Transformer from "./Transformer"; + +export default class FlowTransformer extends Transformer { + constructor( + rootTransformer, + tokens, + isImportsTransformEnabled, + ) { + super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.isImportsTransformEnabled = isImportsTransformEnabled;; + } + + process() { + if ( + this.rootTransformer.processPossibleArrowParamEnd() || + this.rootTransformer.processPossibleAsyncArrowWithTypeParams() || + this.rootTransformer.processPossibleTypeRange() + ) { + return true; + } + if (this.tokens.matches1(tt._enum)) { + this.processEnum(); + return true; + } + if (this.tokens.matches2(tt._export, tt._enum)) { + this.processNamedExportEnum(); + return true; + } + if (this.tokens.matches3(tt._export, tt._default, tt._enum)) { + this.processDefaultExportEnum(); + return true; + } + return false; + } + + /** + * Handle a declaration like: + * export enum E ... + * + * With this imports transform, this becomes: + * const E = [[enum]]; exports.E = E; + * + * otherwise, it becomes: + * export const E = [[enum]]; + */ + processNamedExportEnum() { + if (this.isImportsTransformEnabled) { + // export + this.tokens.removeInitialToken(); + const enumName = this.tokens.identifierNameAtRelativeIndex(1); + this.processEnum(); + this.tokens.appendCode(` exports.${enumName} = ${enumName};`); + } else { + this.tokens.copyToken(); + this.processEnum(); + } + } + + /** + * Handle a declaration like: + * export default enum E + * + * With the imports transform, this becomes: + * const E = [[enum]]; exports.default = E; + * + * otherwise, it becomes: + * const E = [[enum]]; export default E; + */ + processDefaultExportEnum() { + // export + this.tokens.removeInitialToken(); + // default + this.tokens.removeToken(); + const enumName = this.tokens.identifierNameAtRelativeIndex(1); + this.processEnum(); + if (this.isImportsTransformEnabled) { + this.tokens.appendCode(` exports.default = ${enumName};`); + } else { + this.tokens.appendCode(` export default ${enumName};`); + } + } + + /** + * Transpile flow enums to invoke the "flow-enums-runtime" library. + * + * Currently, the transpiled code always uses `require("flow-enums-runtime")`, + * but if future flexibility is needed, we could expose a config option for + * this string (similar to configurable JSX). Even when targeting ESM, the + * default behavior of babel-plugin-transform-flow-enums is to use require + * rather than injecting an import. + * + * Flow enums are quite a bit simpler than TS enums and have some convenient + * constraints: + * - Element initializers must be either always present or always absent. That + * means that we can use fixed lookahead on the first element (if any) and + * assume that all elements are like that. + * - The right-hand side of an element initializer must be a literal value, + * not a complex expression and not referencing other elements. That means + * we can simply copy a single token. + * + * Enums can be broken up into three basic cases: + * + * Mirrored enums: + * enum E {A, B} + * -> + * const E = require("flow-enums-runtime").Mirrored(["A", "B"]); + * + * Initializer enums: + * enum E {A = 1, B = 2} + * -> + * const E = require("flow-enums-runtime")({A: 1, B: 2}); + * + * Symbol enums: + * enum E of symbol {A, B} + * -> + * const E = require("flow-enums-runtime")({A: Symbol("A"), B: Symbol("B")}); + * + * We can statically detect which of the three cases this is by looking at the + * "of" declaration (if any) and seeing if the first element has an initializer. + * Since the other transform details are so similar between the three cases, we + * use a single implementation and vary the transform within processEnumElement + * based on case. + */ + processEnum() { + // enum E -> const E + this.tokens.replaceToken("const"); + this.tokens.copyExpectedToken(tt.name); + + let isSymbolEnum = false; + if (this.tokens.matchesContextual(ContextualKeyword._of)) { + this.tokens.removeToken(); + isSymbolEnum = this.tokens.matchesContextual(ContextualKeyword._symbol); + this.tokens.removeToken(); + } + const hasInitializers = this.tokens.matches3(tt.braceL, tt.name, tt.eq); + this.tokens.appendCode(' = require("flow-enums-runtime")'); + + const isMirrored = !isSymbolEnum && !hasInitializers; + this.tokens.replaceTokenTrimmingLeftWhitespace(isMirrored ? ".Mirrored([" : "({"); + + while (!this.tokens.matches1(tt.braceR)) { + // ... is allowed at the end and has no runtime behavior. + if (this.tokens.matches1(tt.ellipsis)) { + this.tokens.removeToken(); + break; + } + this.processEnumElement(isSymbolEnum, hasInitializers); + if (this.tokens.matches1(tt.comma)) { + this.tokens.copyToken(); + } + } + + this.tokens.replaceToken(isMirrored ? "]);" : "});"); + } + + /** + * Process an individual enum element, producing either an array element or an + * object element based on what type of enum this is. + */ + processEnumElement(isSymbolEnum, hasInitializers) { + if (isSymbolEnum) { + // Symbol enums never have initializers and are expanded to object elements. + // A, -> A: Symbol("A"), + const elementName = this.tokens.identifierName(); + this.tokens.copyToken(); + this.tokens.appendCode(`: Symbol("${elementName}")`); + } else if (hasInitializers) { + // Initializers are expanded to object elements. + // A = 1, -> A: 1, + this.tokens.copyToken(); + this.tokens.replaceTokenTrimmingLeftWhitespace(":"); + this.tokens.copyToken(); + } else { + // Enum elements without initializers become string literal array elements. + // A, -> "A", + this.tokens.replaceToken(`"${this.tokens.identifierName()}"`); + } + } +} diff --git a/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js b/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js new file mode 100644 index 0000000..e5f5ae5 --- /dev/null +++ b/node_modules/sucrase/dist/esm/transformers/JSXTransformer.js @@ -0,0 +1,733 @@ + + + +import XHTMLEntities from "../parser/plugins/jsx/xhtml"; +import {JSXRole} from "../parser/tokenizer"; +import {TokenType as tt} from "../parser/tokenizer/types"; +import {charCodes} from "../parser/util/charcodes"; + +import getJSXPragmaInfo, {} from "../util/getJSXPragmaInfo"; + +import Transformer from "./Transformer"; + +export default class JSXTransformer extends Transformer { + + + + + // State for calculating the line number of each JSX tag in development. + __init() {this.lastLineNumber = 1} + __init2() {this.lastIndex = 0} + + // In development, variable name holding the name of the current file. + __init3() {this.filenameVarName = null} + // Mapping of claimed names for imports in the automatic transform, e,g. + // {jsx: "_jsx"}. This determines which imports to generate in the prefix. + __init4() {this.esmAutomaticImportNameResolutions = {}} + // When automatically adding imports in CJS mode, we store the variable name + // holding the imported CJS module so we can require it in the prefix. + __init5() {this.cjsAutomaticModuleNameResolutions = {}} + + constructor( + rootTransformer, + tokens, + importProcessor, + nameManager, + options, + ) { + super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.importProcessor = importProcessor;this.nameManager = nameManager;this.options = options;JSXTransformer.prototype.__init.call(this);JSXTransformer.prototype.__init2.call(this);JSXTransformer.prototype.__init3.call(this);JSXTransformer.prototype.__init4.call(this);JSXTransformer.prototype.__init5.call(this);; + this.jsxPragmaInfo = getJSXPragmaInfo(options); + this.isAutomaticRuntime = options.jsxRuntime === "automatic"; + this.jsxImportSource = options.jsxImportSource || "react"; + } + + process() { + if (this.tokens.matches1(tt.jsxTagStart)) { + this.processJSXTag(); + return true; + } + return false; + } + + getPrefixCode() { + let prefix = ""; + if (this.filenameVarName) { + prefix += `const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath || "")};`; + } + if (this.isAutomaticRuntime) { + if (this.importProcessor) { + // CJS mode: emit require statements for all modules that were referenced. + for (const [path, resolvedName] of Object.entries(this.cjsAutomaticModuleNameResolutions)) { + prefix += `var ${resolvedName} = require("${path}");`; + } + } else { + // ESM mode: consolidate and emit import statements for referenced names. + const {createElement: createElementResolution, ...otherResolutions} = + this.esmAutomaticImportNameResolutions; + if (createElementResolution) { + prefix += `import {createElement as ${createElementResolution}} from "${this.jsxImportSource}";`; + } + const importSpecifiers = Object.entries(otherResolutions) + .map(([name, resolvedName]) => `${name} as ${resolvedName}`) + .join(", "); + if (importSpecifiers) { + const importPath = + this.jsxImportSource + (this.options.production ? "/jsx-runtime" : "/jsx-dev-runtime"); + prefix += `import {${importSpecifiers}} from "${importPath}";`; + } + } + } + return prefix; + } + + processJSXTag() { + const {jsxRole, start} = this.tokens.currentToken(); + // Calculate line number information at the very start (if in development + // mode) so that the information is guaranteed to be queried in token order. + const elementLocationCode = this.options.production ? null : this.getElementLocationCode(start); + if (this.isAutomaticRuntime && jsxRole !== JSXRole.KeyAfterPropSpread) { + this.transformTagToJSXFunc(elementLocationCode, jsxRole); + } else { + this.transformTagToCreateElement(elementLocationCode); + } + } + + getElementLocationCode(firstTokenStart) { + const lineNumber = this.getLineNumberForIndex(firstTokenStart); + return `lineNumber: ${lineNumber}`; + } + + /** + * Get the line number for this source position. This is calculated lazily and + * must be called in increasing order by index. + */ + getLineNumberForIndex(index) { + const code = this.tokens.code; + while (this.lastIndex < index && this.lastIndex < code.length) { + if (code[this.lastIndex] === "\n") { + this.lastLineNumber++; + } + this.lastIndex++; + } + return this.lastLineNumber; + } + + /** + * Convert the current JSX element to a call to jsx, jsxs, or jsxDEV. This is + * the primary transformation for the automatic transform. + * + * Example: + *
Hello{x}
+ * becomes + * jsxs('div', {a: 1, children: ["Hello", x]}, 2) + */ + transformTagToJSXFunc(elementLocationCode, jsxRole) { + const isStatic = jsxRole === JSXRole.StaticChildren; + // First tag is always jsxTagStart. + this.tokens.replaceToken(this.getJSXFuncInvocationCode(isStatic)); + + let keyCode = null; + if (this.tokens.matches1(tt.jsxTagEnd)) { + // Fragment syntax. + this.tokens.replaceToken(`${this.getFragmentCode()}, {`); + this.processAutomaticChildrenAndEndProps(jsxRole); + } else { + // Normal open tag or self-closing tag. + this.processTagIntro(); + this.tokens.appendCode(", {"); + keyCode = this.processProps(true); + + if (this.tokens.matches2(tt.slash, tt.jsxTagEnd)) { + // Self-closing tag, no children to add, so close the props. + this.tokens.appendCode("}"); + } else if (this.tokens.matches1(tt.jsxTagEnd)) { + // Tag with children. + this.tokens.removeToken(); + this.processAutomaticChildrenAndEndProps(jsxRole); + } else { + throw new Error("Expected either /> or > at the end of the tag."); + } + // If a key was present, move it to its own arg. Note that moving code + // like this will cause line numbers to get out of sync within the JSX + // element if the key expression has a newline in it. This is unfortunate, + // but hopefully should be rare. + if (keyCode) { + this.tokens.appendCode(`, ${keyCode}`); + } + } + if (!this.options.production) { + // If the key wasn't already added, add it now so we can correctly set + // positional args for jsxDEV. + if (keyCode === null) { + this.tokens.appendCode(", void 0"); + } + this.tokens.appendCode(`, ${isStatic}, ${this.getDevSource(elementLocationCode)}, this`); + } + // We're at the close-tag or the end of a self-closing tag, so remove + // everything else and close the function call. + this.tokens.removeInitialToken(); + while (!this.tokens.matches1(tt.jsxTagEnd)) { + this.tokens.removeToken(); + } + this.tokens.replaceToken(")"); + } + + /** + * Convert the current JSX element to a createElement call. In the classic + * runtime, this is the only case. In the automatic runtime, this is called + * as a fallback in some situations. + * + * Example: + *
Hello{x}
+ * becomes + * React.createElement('div', {a: 1, key: 2}, "Hello", x) + */ + transformTagToCreateElement(elementLocationCode) { + // First tag is always jsxTagStart. + this.tokens.replaceToken(this.getCreateElementInvocationCode()); + + if (this.tokens.matches1(tt.jsxTagEnd)) { + // Fragment syntax. + this.tokens.replaceToken(`${this.getFragmentCode()}, null`); + this.processChildren(true); + } else { + // Normal open tag or self-closing tag. + this.processTagIntro(); + this.processPropsObjectWithDevInfo(elementLocationCode); + + if (this.tokens.matches2(tt.slash, tt.jsxTagEnd)) { + // Self-closing tag; no children to process. + } else if (this.tokens.matches1(tt.jsxTagEnd)) { + // Tag with children and a close-tag; process the children as args. + this.tokens.removeToken(); + this.processChildren(true); + } else { + throw new Error("Expected either /> or > at the end of the tag."); + } + } + // We're at the close-tag or the end of a self-closing tag, so remove + // everything else and close the function call. + this.tokens.removeInitialToken(); + while (!this.tokens.matches1(tt.jsxTagEnd)) { + this.tokens.removeToken(); + } + this.tokens.replaceToken(")"); + } + + /** + * Get the code for the relevant function for this context: jsx, jsxs, + * or jsxDEV. The following open-paren is included as well. + * + * These functions are only used for the automatic runtime, so they are always + * auto-imported, but the auto-import will be either CJS or ESM based on the + * target module format. + */ + getJSXFuncInvocationCode(isStatic) { + if (this.options.production) { + if (isStatic) { + return this.claimAutoImportedFuncInvocation("jsxs", "/jsx-runtime"); + } else { + return this.claimAutoImportedFuncInvocation("jsx", "/jsx-runtime"); + } + } else { + return this.claimAutoImportedFuncInvocation("jsxDEV", "/jsx-dev-runtime"); + } + } + + /** + * Return the code to use for the createElement function, e.g. + * `React.createElement`, including the following open-paren. + * + * This is the main function to use for the classic runtime. For the + * automatic runtime, this function is used as a fallback function to + * preserve behavior when there is a prop spread followed by an explicit + * key. In that automatic runtime case, the function should be automatically + * imported. + */ + getCreateElementInvocationCode() { + if (this.isAutomaticRuntime) { + return this.claimAutoImportedFuncInvocation("createElement", ""); + } else { + const {jsxPragmaInfo} = this; + const resolvedPragmaBaseName = this.importProcessor + ? this.importProcessor.getIdentifierReplacement(jsxPragmaInfo.base) || jsxPragmaInfo.base + : jsxPragmaInfo.base; + return `${resolvedPragmaBaseName}${jsxPragmaInfo.suffix}(`; + } + } + + /** + * Return the code to use as the component when compiling a shorthand + * fragment, e.g. `React.Fragment`. + * + * This may be called from either the classic or automatic runtime, and + * the value should be auto-imported for the automatic runtime. + */ + getFragmentCode() { + if (this.isAutomaticRuntime) { + return this.claimAutoImportedName( + "Fragment", + this.options.production ? "/jsx-runtime" : "/jsx-dev-runtime", + ); + } else { + const {jsxPragmaInfo} = this; + const resolvedFragmentPragmaBaseName = this.importProcessor + ? this.importProcessor.getIdentifierReplacement(jsxPragmaInfo.fragmentBase) || + jsxPragmaInfo.fragmentBase + : jsxPragmaInfo.fragmentBase; + return resolvedFragmentPragmaBaseName + jsxPragmaInfo.fragmentSuffix; + } + } + + /** + * Return code that invokes the given function. + * + * When the imports transform is enabled, use the CJSImportTransformer + * strategy of using `.call(void 0, ...` to avoid passing a `this` value in a + * situation that would otherwise look like a method call. + */ + claimAutoImportedFuncInvocation(funcName, importPathSuffix) { + const funcCode = this.claimAutoImportedName(funcName, importPathSuffix); + if (this.importProcessor) { + return `${funcCode}.call(void 0, `; + } else { + return `${funcCode}(`; + } + } + + claimAutoImportedName(funcName, importPathSuffix) { + if (this.importProcessor) { + // CJS mode: claim a name for the module and mark it for import. + const path = this.jsxImportSource + importPathSuffix; + if (!this.cjsAutomaticModuleNameResolutions[path]) { + this.cjsAutomaticModuleNameResolutions[path] = + this.importProcessor.getFreeIdentifierForPath(path); + } + return `${this.cjsAutomaticModuleNameResolutions[path]}.${funcName}`; + } else { + // ESM mode: claim a name for this function and add it to the names that + // should be auto-imported when the prefix is generated. + if (!this.esmAutomaticImportNameResolutions[funcName]) { + this.esmAutomaticImportNameResolutions[funcName] = this.nameManager.claimFreeName( + `_${funcName}`, + ); + } + return this.esmAutomaticImportNameResolutions[funcName]; + } + } + + /** + * Process the first part of a tag, before any props. + */ + processTagIntro() { + // Walk forward until we see one of these patterns: + // jsxName to start the first prop, preceded by another jsxName to end the tag name. + // jsxName to start the first prop, preceded by greaterThan to end the type argument. + // [open brace] to start the first prop. + // [jsxTagEnd] to end the open-tag. + // [slash, jsxTagEnd] to end the self-closing tag. + let introEnd = this.tokens.currentIndex() + 1; + while ( + this.tokens.tokens[introEnd].isType || + (!this.tokens.matches2AtIndex(introEnd - 1, tt.jsxName, tt.jsxName) && + !this.tokens.matches2AtIndex(introEnd - 1, tt.greaterThan, tt.jsxName) && + !this.tokens.matches1AtIndex(introEnd, tt.braceL) && + !this.tokens.matches1AtIndex(introEnd, tt.jsxTagEnd) && + !this.tokens.matches2AtIndex(introEnd, tt.slash, tt.jsxTagEnd)) + ) { + introEnd++; + } + if (introEnd === this.tokens.currentIndex() + 1) { + const tagName = this.tokens.identifierName(); + if (startsWithLowerCase(tagName)) { + this.tokens.replaceToken(`'${tagName}'`); + } + } + while (this.tokens.currentIndex() < introEnd) { + this.rootTransformer.processToken(); + } + } + + /** + * Starting at the beginning of the props, add the props argument to + * React.createElement, including the comma before it. + */ + processPropsObjectWithDevInfo(elementLocationCode) { + const devProps = this.options.production + ? "" + : `__self: this, __source: ${this.getDevSource(elementLocationCode)}`; + if (!this.tokens.matches1(tt.jsxName) && !this.tokens.matches1(tt.braceL)) { + if (devProps) { + this.tokens.appendCode(`, {${devProps}}`); + } else { + this.tokens.appendCode(`, null`); + } + return; + } + this.tokens.appendCode(`, {`); + this.processProps(false); + if (devProps) { + this.tokens.appendCode(` ${devProps}}`); + } else { + this.tokens.appendCode("}"); + } + } + + /** + * Transform the core part of the props, assuming that a { has already been + * inserted before us and that a } will be inserted after us. + * + * If extractKeyCode is true (i.e. when using any jsx... function), any prop + * named "key" has its code captured and returned rather than being emitted to + * the output code. This shifts line numbers, and emitting the code later will + * correct line numbers again. If no key is found or if extractKeyCode is + * false, this function returns null. + */ + processProps(extractKeyCode) { + let keyCode = null; + while (true) { + if (this.tokens.matches2(tt.jsxName, tt.eq)) { + // This is a regular key={value} or key="value" prop. + const propName = this.tokens.identifierName(); + if (extractKeyCode && propName === "key") { + if (keyCode !== null) { + // The props list has multiple keys. Different implementations are + // inconsistent about what to do here: as of this writing, Babel and + // swc keep the *last* key and completely remove the rest, while + // TypeScript uses the *first* key and leaves the others as regular + // props. The React team collaborated with Babel on the + // implementation of this behavior, so presumably the Babel behavior + // is the one to use. + // Since we won't ever be emitting the previous key code, we need to + // at least emit its newlines here so that the line numbers match up + // in the long run. + this.tokens.appendCode(keyCode.replace(/[^\n]/g, "")); + } + // key + this.tokens.removeToken(); + // = + this.tokens.removeToken(); + const snapshot = this.tokens.snapshot(); + this.processPropValue(); + keyCode = this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(snapshot); + // Don't add a comma + continue; + } else { + this.processPropName(propName); + this.tokens.replaceToken(": "); + this.processPropValue(); + } + } else if (this.tokens.matches1(tt.jsxName)) { + // This is a shorthand prop like . + const propName = this.tokens.identifierName(); + this.processPropName(propName); + this.tokens.appendCode(": true"); + } else if (this.tokens.matches1(tt.braceL)) { + // This is prop spread, like
, which we can pass + // through fairly directly as an object spread. + this.tokens.replaceToken(""); + this.rootTransformer.processBalancedCode(); + this.tokens.replaceToken(""); + } else { + break; + } + this.tokens.appendCode(","); + } + return keyCode; + } + + processPropName(propName) { + if (propName.includes("-")) { + this.tokens.replaceToken(`'${propName}'`); + } else { + this.tokens.copyToken(); + } + } + + processPropValue() { + if (this.tokens.matches1(tt.braceL)) { + this.tokens.replaceToken(""); + this.rootTransformer.processBalancedCode(); + this.tokens.replaceToken(""); + } else if (this.tokens.matches1(tt.jsxTagStart)) { + this.processJSXTag(); + } else { + this.processStringPropValue(); + } + } + + processStringPropValue() { + const token = this.tokens.currentToken(); + const valueCode = this.tokens.code.slice(token.start + 1, token.end - 1); + const replacementCode = formatJSXTextReplacement(valueCode); + const literalCode = formatJSXStringValueLiteral(valueCode); + this.tokens.replaceToken(literalCode + replacementCode); + } + + /** + * Starting in the middle of the props object literal, produce an additional + * prop for the children and close the object literal. + */ + processAutomaticChildrenAndEndProps(jsxRole) { + if (jsxRole === JSXRole.StaticChildren) { + this.tokens.appendCode(" children: ["); + this.processChildren(false); + this.tokens.appendCode("]}"); + } else { + // The parser information tells us whether we will see a real child or if + // all remaining children (if any) will resolve to empty. If there are no + // non-empty children, don't emit a children prop at all, but still + // process children so that we properly transform the code into nothing. + if (jsxRole === JSXRole.OneChild) { + this.tokens.appendCode(" children: "); + } + this.processChildren(false); + this.tokens.appendCode("}"); + } + } + + /** + * Transform children into a comma-separated list, which will be either + * arguments to createElement or array elements of a children prop. + */ + processChildren(needsInitialComma) { + let needsComma = needsInitialComma; + while (true) { + if (this.tokens.matches2(tt.jsxTagStart, tt.slash)) { + // Closing tag, so no more children. + return; + } + let didEmitElement = false; + if (this.tokens.matches1(tt.braceL)) { + if (this.tokens.matches2(tt.braceL, tt.braceR)) { + // Empty interpolations and comment-only interpolations are allowed + // and don't create an extra child arg. + this.tokens.replaceToken(""); + this.tokens.replaceToken(""); + } else { + // Interpolated expression. + this.tokens.replaceToken(needsComma ? ", " : ""); + this.rootTransformer.processBalancedCode(); + this.tokens.replaceToken(""); + didEmitElement = true; + } + } else if (this.tokens.matches1(tt.jsxTagStart)) { + // Child JSX element + this.tokens.appendCode(needsComma ? ", " : ""); + this.processJSXTag(); + didEmitElement = true; + } else if (this.tokens.matches1(tt.jsxText) || this.tokens.matches1(tt.jsxEmptyText)) { + didEmitElement = this.processChildTextElement(needsComma); + } else { + throw new Error("Unexpected token when processing JSX children."); + } + if (didEmitElement) { + needsComma = true; + } + } + } + + /** + * Turn a JSX text element into a string literal, or nothing at all if the JSX + * text resolves to the empty string. + * + * Returns true if a string literal is emitted, false otherwise. + */ + processChildTextElement(needsComma) { + const token = this.tokens.currentToken(); + const valueCode = this.tokens.code.slice(token.start, token.end); + const replacementCode = formatJSXTextReplacement(valueCode); + const literalCode = formatJSXTextLiteral(valueCode); + if (literalCode === '""') { + this.tokens.replaceToken(replacementCode); + return false; + } else { + this.tokens.replaceToken(`${needsComma ? ", " : ""}${literalCode}${replacementCode}`); + return true; + } + } + + getDevSource(elementLocationCode) { + return `{fileName: ${this.getFilenameVarName()}, ${elementLocationCode}}`; + } + + getFilenameVarName() { + if (!this.filenameVarName) { + this.filenameVarName = this.nameManager.claimFreeName("_jsxFileName"); + } + return this.filenameVarName; + } +} + +/** + * Spec for identifiers: https://tc39.github.io/ecma262/#prod-IdentifierStart. + * + * Really only treat anything starting with a-z as tag names. `_`, `$`, `é` + * should be treated as component names + */ +export function startsWithLowerCase(s) { + const firstChar = s.charCodeAt(0); + return firstChar >= charCodes.lowercaseA && firstChar <= charCodes.lowercaseZ; +} + +/** + * Turn the given jsxText string into a JS string literal. Leading and trailing + * whitespace on lines is removed, except immediately after the open-tag and + * before the close-tag. Empty lines are completely removed, and spaces are + * added between lines after that. + * + * We use JSON.stringify to introduce escape characters as necessary, and trim + * the start and end of each line and remove blank lines. + */ +function formatJSXTextLiteral(text) { + let result = ""; + let whitespace = ""; + + let isInInitialLineWhitespace = false; + let seenNonWhitespace = false; + for (let i = 0; i < text.length; i++) { + const c = text[i]; + if (c === " " || c === "\t" || c === "\r") { + if (!isInInitialLineWhitespace) { + whitespace += c; + } + } else if (c === "\n") { + whitespace = ""; + isInInitialLineWhitespace = true; + } else { + if (seenNonWhitespace && isInInitialLineWhitespace) { + result += " "; + } + result += whitespace; + whitespace = ""; + if (c === "&") { + const {entity, newI} = processEntity(text, i + 1); + i = newI - 1; + result += entity; + } else { + result += c; + } + seenNonWhitespace = true; + isInInitialLineWhitespace = false; + } + } + if (!isInInitialLineWhitespace) { + result += whitespace; + } + return JSON.stringify(result); +} + +/** + * Produce the code that should be printed after the JSX text string literal, + * with most content removed, but all newlines preserved and all spacing at the + * end preserved. + */ +function formatJSXTextReplacement(text) { + let numNewlines = 0; + let numSpaces = 0; + for (const c of text) { + if (c === "\n") { + numNewlines++; + numSpaces = 0; + } else if (c === " ") { + numSpaces++; + } + } + return "\n".repeat(numNewlines) + " ".repeat(numSpaces); +} + +/** + * Format a string in the value position of a JSX prop. + * + * Use the same implementation as convertAttribute from + * babel-helper-builder-react-jsx. + */ +function formatJSXStringValueLiteral(text) { + let result = ""; + for (let i = 0; i < text.length; i++) { + const c = text[i]; + if (c === "\n") { + if (/\s/.test(text[i + 1])) { + result += " "; + while (i < text.length && /\s/.test(text[i + 1])) { + i++; + } + } else { + result += "\n"; + } + } else if (c === "&") { + const {entity, newI} = processEntity(text, i + 1); + result += entity; + i = newI - 1; + } else { + result += c; + } + } + return JSON.stringify(result); +} + +/** + * Starting at a &, see if there's an HTML entity (specified by name, decimal + * char code, or hex char code) and return it if so. + * + * Modified from jsxReadString in babel-parser. + */ +function processEntity(text, indexAfterAmpersand) { + let str = ""; + let count = 0; + let entity; + let i = indexAfterAmpersand; + + if (text[i] === "#") { + let radix = 10; + i++; + let numStart; + if (text[i] === "x") { + radix = 16; + i++; + numStart = i; + while (i < text.length && isHexDigit(text.charCodeAt(i))) { + i++; + } + } else { + numStart = i; + while (i < text.length && isDecimalDigit(text.charCodeAt(i))) { + i++; + } + } + if (text[i] === ";") { + const numStr = text.slice(numStart, i); + if (numStr) { + i++; + entity = String.fromCodePoint(parseInt(numStr, radix)); + } + } + } else { + while (i < text.length && count++ < 10) { + const ch = text[i]; + i++; + if (ch === ";") { + entity = XHTMLEntities.get(str); + break; + } + str += ch; + } + } + + if (!entity) { + return {entity: "&", newI: indexAfterAmpersand}; + } + return {entity, newI: i}; +} + +function isDecimalDigit(code) { + return code >= charCodes.digit0 && code <= charCodes.digit9; +} + +function isHexDigit(code) { + return ( + (code >= charCodes.digit0 && code <= charCodes.digit9) || + (code >= charCodes.lowercaseA && code <= charCodes.lowercaseF) || + (code >= charCodes.uppercaseA && code <= charCodes.uppercaseF) + ); +} diff --git a/node_modules/sucrase/dist/esm/transformers/JestHoistTransformer.js b/node_modules/sucrase/dist/esm/transformers/JestHoistTransformer.js new file mode 100644 index 0000000..8f45d06 --- /dev/null +++ b/node_modules/sucrase/dist/esm/transformers/JestHoistTransformer.js @@ -0,0 +1,111 @@ + function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } + +import {TokenType as tt} from "../parser/tokenizer/types"; + + +import Transformer from "./Transformer"; + +const JEST_GLOBAL_NAME = "jest"; +const HOISTED_METHODS = ["mock", "unmock", "enableAutomock", "disableAutomock"]; + +/** + * Implementation of babel-plugin-jest-hoist, which hoists up some jest method + * calls above the imports to allow them to override other imports. + * + * To preserve line numbers, rather than directly moving the jest.mock code, we + * wrap each invocation in a function statement and then call the function from + * the top of the file. + */ +export default class JestHoistTransformer extends Transformer { + __init() {this.hoistedFunctionNames = []} + + constructor( + rootTransformer, + tokens, + nameManager, + importProcessor, + ) { + super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.nameManager = nameManager;this.importProcessor = importProcessor;JestHoistTransformer.prototype.__init.call(this);; + } + + process() { + if ( + this.tokens.currentToken().scopeDepth === 0 && + this.tokens.matches4(tt.name, tt.dot, tt.name, tt.parenL) && + this.tokens.identifierName() === JEST_GLOBAL_NAME + ) { + // TODO: This only works if imports transform is active, which it will be for jest. + // But if jest adds module support and we no longer need the import transform, this needs fixing. + if (_optionalChain([this, 'access', _ => _.importProcessor, 'optionalAccess', _2 => _2.getGlobalNames, 'call', _3 => _3(), 'optionalAccess', _4 => _4.has, 'call', _5 => _5(JEST_GLOBAL_NAME)])) { + return false; + } + return this.extractHoistedCalls(); + } + + return false; + } + + getHoistedCode() { + if (this.hoistedFunctionNames.length > 0) { + // This will be placed before module interop code, but that's fine since + // imports aren't allowed in module mock factories. + return this.hoistedFunctionNames.map((name) => `${name}();`).join(""); + } + return ""; + } + + /** + * Extracts any methods calls on the jest-object that should be hoisted. + * + * According to the jest docs, https://jestjs.io/docs/en/jest-object#jestmockmodulename-factory-options, + * mock, unmock, enableAutomock, disableAutomock, are the methods that should be hoisted. + * + * We do not apply the same checks of the arguments as babel-plugin-jest-hoist does. + */ + extractHoistedCalls() { + // We're handling a chain of calls where `jest` may or may not need to be inserted for each call + // in the chain, so remove the initial `jest` to make the loop implementation cleaner. + this.tokens.removeToken(); + // Track some state so that multiple non-hoisted chained calls in a row keep their chaining + // syntax. + let followsNonHoistedJestCall = false; + + // Iterate through all chained calls on the jest object. + while (this.tokens.matches3(tt.dot, tt.name, tt.parenL)) { + const methodName = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1); + const shouldHoist = HOISTED_METHODS.includes(methodName); + if (shouldHoist) { + // We've matched e.g. `.mock(...)` or similar call. + // Replace the initial `.` with `function __jestHoist(){jest.` + const hoistedFunctionName = this.nameManager.claimFreeName("__jestHoist"); + this.hoistedFunctionNames.push(hoistedFunctionName); + this.tokens.replaceToken(`function ${hoistedFunctionName}(){${JEST_GLOBAL_NAME}.`); + this.tokens.copyToken(); + this.tokens.copyToken(); + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(tt.parenR); + this.tokens.appendCode(";}"); + followsNonHoistedJestCall = false; + } else { + // This is a non-hoisted method, so just transform the code as usual. + if (followsNonHoistedJestCall) { + // If we didn't hoist the previous call, we can leave the code as-is to chain off of the + // previous method call. It's important to preserve the code here because we don't know + // for sure that the method actually returned the jest object for chaining. + this.tokens.copyToken(); + } else { + // If we hoisted the previous call, we know it returns the jest object back, so we insert + // the identifier `jest` to continue the chain. + this.tokens.replaceToken(`${JEST_GLOBAL_NAME}.`); + } + this.tokens.copyToken(); + this.tokens.copyToken(); + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(tt.parenR); + followsNonHoistedJestCall = true; + } + } + + return true; + } +} diff --git a/node_modules/sucrase/dist/esm/transformers/NumericSeparatorTransformer.js b/node_modules/sucrase/dist/esm/transformers/NumericSeparatorTransformer.js new file mode 100644 index 0000000..0cb01a1 --- /dev/null +++ b/node_modules/sucrase/dist/esm/transformers/NumericSeparatorTransformer.js @@ -0,0 +1,20 @@ +import {TokenType as tt} from "../parser/tokenizer/types"; + +import Transformer from "./Transformer"; + +export default class NumericSeparatorTransformer extends Transformer { + constructor( tokens) { + super();this.tokens = tokens;; + } + + process() { + if (this.tokens.matches1(tt.num)) { + const code = this.tokens.currentTokenCode(); + if (code.includes("_")) { + this.tokens.replaceToken(code.replace(/_/g, "")); + return true; + } + } + return false; + } +} diff --git a/node_modules/sucrase/dist/esm/transformers/OptionalCatchBindingTransformer.js b/node_modules/sucrase/dist/esm/transformers/OptionalCatchBindingTransformer.js new file mode 100644 index 0000000..547273b --- /dev/null +++ b/node_modules/sucrase/dist/esm/transformers/OptionalCatchBindingTransformer.js @@ -0,0 +1,19 @@ + +import {TokenType as tt} from "../parser/tokenizer/types"; + +import Transformer from "./Transformer"; + +export default class OptionalCatchBindingTransformer extends Transformer { + constructor( tokens, nameManager) { + super();this.tokens = tokens;this.nameManager = nameManager;; + } + + process() { + if (this.tokens.matches2(tt._catch, tt.braceL)) { + this.tokens.copyToken(); + this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`); + return true; + } + return false; + } +} diff --git a/node_modules/sucrase/dist/esm/transformers/OptionalChainingNullishTransformer.js b/node_modules/sucrase/dist/esm/transformers/OptionalChainingNullishTransformer.js new file mode 100644 index 0000000..571d97f --- /dev/null +++ b/node_modules/sucrase/dist/esm/transformers/OptionalChainingNullishTransformer.js @@ -0,0 +1,155 @@ + +import {TokenType as tt} from "../parser/tokenizer/types"; + +import Transformer from "./Transformer"; + +/** + * Transformer supporting the optional chaining and nullish coalescing operators. + * + * Tech plan here: + * https://github.com/alangpierce/sucrase/wiki/Sucrase-Optional-Chaining-and-Nullish-Coalescing-Technical-Plan + * + * The prefix and suffix code snippets are handled by TokenProcessor, and this transformer handles + * the operators themselves. + */ +export default class OptionalChainingNullishTransformer extends Transformer { + constructor( tokens, nameManager) { + super();this.tokens = tokens;this.nameManager = nameManager;; + } + + process() { + if (this.tokens.matches1(tt.nullishCoalescing)) { + const token = this.tokens.currentToken(); + if (this.tokens.tokens[token.nullishStartIndex].isAsyncOperation) { + this.tokens.replaceTokenTrimmingLeftWhitespace(", async () => ("); + } else { + this.tokens.replaceTokenTrimmingLeftWhitespace(", () => ("); + } + return true; + } + if (this.tokens.matches1(tt._delete)) { + const nextToken = this.tokens.tokenAtRelativeIndex(1); + if (nextToken.isOptionalChainStart) { + this.tokens.removeInitialToken(); + return true; + } + } + const token = this.tokens.currentToken(); + const chainStart = token.subscriptStartIndex; + if ( + chainStart != null && + this.tokens.tokens[chainStart].isOptionalChainStart && + // Super subscripts can't be optional (since super is never null/undefined), and the syntax + // relies on the subscript being intact, so leave this token alone. + this.tokens.tokenAtRelativeIndex(-1).type !== tt._super + ) { + const param = this.nameManager.claimFreeName("_"); + let arrowStartSnippet; + if ( + chainStart > 0 && + this.tokens.matches1AtIndex(chainStart - 1, tt._delete) && + this.isLastSubscriptInChain() + ) { + // Delete operations are special: we already removed the delete keyword, and to still + // perform a delete, we need to insert a delete in the very last part of the chain, which + // in correct code will always be a property access. + arrowStartSnippet = `${param} => delete ${param}`; + } else { + arrowStartSnippet = `${param} => ${param}`; + } + if (this.tokens.tokens[chainStart].isAsyncOperation) { + arrowStartSnippet = `async ${arrowStartSnippet}`; + } + if ( + this.tokens.matches2(tt.questionDot, tt.parenL) || + this.tokens.matches2(tt.questionDot, tt.lessThan) + ) { + if (this.justSkippedSuper()) { + this.tokens.appendCode(".bind(this)"); + } + this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalCall', ${arrowStartSnippet}`); + } else if (this.tokens.matches2(tt.questionDot, tt.bracketL)) { + this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${arrowStartSnippet}`); + } else if (this.tokens.matches1(tt.questionDot)) { + this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${arrowStartSnippet}.`); + } else if (this.tokens.matches1(tt.dot)) { + this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${arrowStartSnippet}.`); + } else if (this.tokens.matches1(tt.bracketL)) { + this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${arrowStartSnippet}[`); + } else if (this.tokens.matches1(tt.parenL)) { + if (this.justSkippedSuper()) { + this.tokens.appendCode(".bind(this)"); + } + this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${arrowStartSnippet}(`); + } else { + throw new Error("Unexpected subscript operator in optional chain."); + } + return true; + } + return false; + } + + /** + * Determine if the current token is the last of its chain, so that we know whether it's eligible + * to have a delete op inserted. + * + * We can do this by walking forward until we determine one way or another. Each + * isOptionalChainStart token must be paired with exactly one isOptionalChainEnd token after it in + * a nesting way, so we can track depth and walk to the end of the chain (the point where the + * depth goes negative) and see if any other subscript token is after us in the chain. + */ + isLastSubscriptInChain() { + let depth = 0; + for (let i = this.tokens.currentIndex() + 1; ; i++) { + if (i >= this.tokens.tokens.length) { + throw new Error("Reached the end of the code while finding the end of the access chain."); + } + if (this.tokens.tokens[i].isOptionalChainStart) { + depth++; + } else if (this.tokens.tokens[i].isOptionalChainEnd) { + depth--; + } + if (depth < 0) { + return true; + } + + // This subscript token is a later one in the same chain. + if (depth === 0 && this.tokens.tokens[i].subscriptStartIndex != null) { + return false; + } + } + } + + /** + * Determine if we are the open-paren in an expression like super.a()?.b. + * + * We can do this by walking backward to find the previous subscript. If that subscript was + * preceded by a super, then we must be the subscript after it, so if this is a call expression, + * we'll need to attach the right context. + */ + justSkippedSuper() { + let depth = 0; + let index = this.tokens.currentIndex() - 1; + while (true) { + if (index < 0) { + throw new Error( + "Reached the start of the code while finding the start of the access chain.", + ); + } + if (this.tokens.tokens[index].isOptionalChainStart) { + depth--; + } else if (this.tokens.tokens[index].isOptionalChainEnd) { + depth++; + } + if (depth < 0) { + return false; + } + + // This subscript token is a later one in the same chain. + if (depth === 0 && this.tokens.tokens[index].subscriptStartIndex != null) { + return this.tokens.tokens[index - 1].type === tt._super; + } + index--; + } + } +} diff --git a/node_modules/sucrase/dist/esm/transformers/ReactDisplayNameTransformer.js b/node_modules/sucrase/dist/esm/transformers/ReactDisplayNameTransformer.js new file mode 100644 index 0000000..0c44c81 --- /dev/null +++ b/node_modules/sucrase/dist/esm/transformers/ReactDisplayNameTransformer.js @@ -0,0 +1,160 @@ + + +import {IdentifierRole} from "../parser/tokenizer"; +import {TokenType as tt} from "../parser/tokenizer/types"; + + +import Transformer from "./Transformer"; + +/** + * Implementation of babel-plugin-transform-react-display-name, which adds a + * display name to usages of React.createClass and createReactClass. + */ +export default class ReactDisplayNameTransformer extends Transformer { + constructor( + rootTransformer, + tokens, + importProcessor, + options, + ) { + super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.importProcessor = importProcessor;this.options = options;; + } + + process() { + const startIndex = this.tokens.currentIndex(); + if (this.tokens.identifierName() === "createReactClass") { + const newName = + this.importProcessor && this.importProcessor.getIdentifierReplacement("createReactClass"); + if (newName) { + this.tokens.replaceToken(`(0, ${newName})`); + } else { + this.tokens.copyToken(); + } + this.tryProcessCreateClassCall(startIndex); + return true; + } + if ( + this.tokens.matches3(tt.name, tt.dot, tt.name) && + this.tokens.identifierName() === "React" && + this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 2) === "createClass" + ) { + const newName = this.importProcessor + ? this.importProcessor.getIdentifierReplacement("React") || "React" + : "React"; + if (newName) { + this.tokens.replaceToken(newName); + this.tokens.copyToken(); + this.tokens.copyToken(); + } else { + this.tokens.copyToken(); + this.tokens.copyToken(); + this.tokens.copyToken(); + } + this.tryProcessCreateClassCall(startIndex); + return true; + } + return false; + } + + /** + * This is called with the token position at the open-paren. + */ + tryProcessCreateClassCall(startIndex) { + const displayName = this.findDisplayName(startIndex); + if (!displayName) { + return; + } + + if (this.classNeedsDisplayName()) { + this.tokens.copyExpectedToken(tt.parenL); + this.tokens.copyExpectedToken(tt.braceL); + this.tokens.appendCode(`displayName: '${displayName}',`); + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(tt.braceR); + this.tokens.copyExpectedToken(tt.parenR); + } + } + + findDisplayName(startIndex) { + if (startIndex < 2) { + return null; + } + if (this.tokens.matches2AtIndex(startIndex - 2, tt.name, tt.eq)) { + // This is an assignment (or declaration) and the LHS is either an identifier or a member + // expression ending in an identifier, so use that identifier name. + return this.tokens.identifierNameAtIndex(startIndex - 2); + } + if ( + startIndex >= 2 && + this.tokens.tokens[startIndex - 2].identifierRole === IdentifierRole.ObjectKey + ) { + // This is an object literal value. + return this.tokens.identifierNameAtIndex(startIndex - 2); + } + if (this.tokens.matches2AtIndex(startIndex - 2, tt._export, tt._default)) { + return this.getDisplayNameFromFilename(); + } + return null; + } + + getDisplayNameFromFilename() { + const filePath = this.options.filePath || "unknown"; + const pathSegments = filePath.split("/"); + const filename = pathSegments[pathSegments.length - 1]; + const dotIndex = filename.lastIndexOf("."); + const baseFilename = dotIndex === -1 ? filename : filename.slice(0, dotIndex); + if (baseFilename === "index" && pathSegments[pathSegments.length - 2]) { + return pathSegments[pathSegments.length - 2]; + } else { + return baseFilename; + } + } + + /** + * We only want to add a display name when this is a function call containing + * one argument, which is an object literal without `displayName` as an + * existing key. + */ + classNeedsDisplayName() { + let index = this.tokens.currentIndex(); + if (!this.tokens.matches2(tt.parenL, tt.braceL)) { + return false; + } + // The block starts on the {, and we expect any displayName key to be in + // that context. We need to ignore other other contexts to avoid matching + // nested displayName keys. + const objectStartIndex = index + 1; + const objectContextId = this.tokens.tokens[objectStartIndex].contextId; + if (objectContextId == null) { + throw new Error("Expected non-null context ID on object open-brace."); + } + + for (; index < this.tokens.tokens.length; index++) { + const token = this.tokens.tokens[index]; + if (token.type === tt.braceR && token.contextId === objectContextId) { + index++; + break; + } + + if ( + this.tokens.identifierNameAtIndex(index) === "displayName" && + this.tokens.tokens[index].identifierRole === IdentifierRole.ObjectKey && + token.contextId === objectContextId + ) { + // We found a displayName key, so bail out. + return false; + } + } + + if (index === this.tokens.tokens.length) { + throw new Error("Unexpected end of input when processing React class."); + } + + // If we got this far, we know we have createClass with an object with no + // display name, so we want to proceed as long as that was the only argument. + return ( + this.tokens.matches1AtIndex(index, tt.parenR) || + this.tokens.matches2AtIndex(index, tt.comma, tt.parenR) + ); + } +} diff --git a/node_modules/sucrase/dist/esm/transformers/ReactHotLoaderTransformer.js b/node_modules/sucrase/dist/esm/transformers/ReactHotLoaderTransformer.js new file mode 100644 index 0000000..873902e --- /dev/null +++ b/node_modules/sucrase/dist/esm/transformers/ReactHotLoaderTransformer.js @@ -0,0 +1,69 @@ +import {IdentifierRole, isTopLevelDeclaration} from "../parser/tokenizer"; + +import Transformer from "./Transformer"; + +export default class ReactHotLoaderTransformer extends Transformer { + __init() {this.extractedDefaultExportName = null} + + constructor( tokens, filePath) { + super();this.tokens = tokens;this.filePath = filePath;ReactHotLoaderTransformer.prototype.__init.call(this);; + } + + setExtractedDefaultExportName(extractedDefaultExportName) { + this.extractedDefaultExportName = extractedDefaultExportName; + } + + getPrefixCode() { + return ` + (function () { + var enterModule = require('react-hot-loader').enterModule; + enterModule && enterModule(module); + })();` + .replace(/\s+/g, " ") + .trim(); + } + + getSuffixCode() { + const topLevelNames = new Set(); + for (const token of this.tokens.tokens) { + if ( + !token.isType && + isTopLevelDeclaration(token) && + token.identifierRole !== IdentifierRole.ImportDeclaration + ) { + topLevelNames.add(this.tokens.identifierNameForToken(token)); + } + } + const namesToRegister = Array.from(topLevelNames).map((name) => ({ + variableName: name, + uniqueLocalName: name, + })); + if (this.extractedDefaultExportName) { + namesToRegister.push({ + variableName: this.extractedDefaultExportName, + uniqueLocalName: "default", + }); + } + return ` +;(function () { + var reactHotLoader = require('react-hot-loader').default; + var leaveModule = require('react-hot-loader').leaveModule; + if (!reactHotLoader) { + return; + } +${namesToRegister + .map( + ({variableName, uniqueLocalName}) => + ` reactHotLoader.register(${variableName}, "${uniqueLocalName}", ${JSON.stringify( + this.filePath || "", + )});`, + ) + .join("\n")} + leaveModule(module); +})();`; + } + + process() { + return false; + } +} diff --git a/node_modules/sucrase/dist/esm/transformers/RootTransformer.js b/node_modules/sucrase/dist/esm/transformers/RootTransformer.js new file mode 100644 index 0000000..c7a83fe --- /dev/null +++ b/node_modules/sucrase/dist/esm/transformers/RootTransformer.js @@ -0,0 +1,462 @@ + + + +import {ContextualKeyword} from "../parser/tokenizer/keywords"; +import {TokenType as tt} from "../parser/tokenizer/types"; + +import getClassInfo, {} from "../util/getClassInfo"; +import CJSImportTransformer from "./CJSImportTransformer"; +import ESMImportTransformer from "./ESMImportTransformer"; +import FlowTransformer from "./FlowTransformer"; +import JestHoistTransformer from "./JestHoistTransformer"; +import JSXTransformer from "./JSXTransformer"; +import NumericSeparatorTransformer from "./NumericSeparatorTransformer"; +import OptionalCatchBindingTransformer from "./OptionalCatchBindingTransformer"; +import OptionalChainingNullishTransformer from "./OptionalChainingNullishTransformer"; +import ReactDisplayNameTransformer from "./ReactDisplayNameTransformer"; +import ReactHotLoaderTransformer from "./ReactHotLoaderTransformer"; + +import TypeScriptTransformer from "./TypeScriptTransformer"; + + + + + + + + +export default class RootTransformer { + __init() {this.transformers = []} + + + __init2() {this.generatedVariables = []} + + + + + + constructor( + sucraseContext, + transforms, + enableLegacyBabel5ModuleInterop, + options, + ) {;RootTransformer.prototype.__init.call(this);RootTransformer.prototype.__init2.call(this); + this.nameManager = sucraseContext.nameManager; + this.helperManager = sucraseContext.helperManager; + const {tokenProcessor, importProcessor} = sucraseContext; + this.tokens = tokenProcessor; + this.isImportsTransformEnabled = transforms.includes("imports"); + this.isReactHotLoaderTransformEnabled = transforms.includes("react-hot-loader"); + this.disableESTransforms = Boolean(options.disableESTransforms); + + if (!options.disableESTransforms) { + this.transformers.push( + new OptionalChainingNullishTransformer(tokenProcessor, this.nameManager), + ); + this.transformers.push(new NumericSeparatorTransformer(tokenProcessor)); + this.transformers.push(new OptionalCatchBindingTransformer(tokenProcessor, this.nameManager)); + } + + if (transforms.includes("jsx")) { + if (options.jsxRuntime !== "preserve") { + this.transformers.push( + new JSXTransformer(this, tokenProcessor, importProcessor, this.nameManager, options), + ); + } + this.transformers.push( + new ReactDisplayNameTransformer(this, tokenProcessor, importProcessor, options), + ); + } + + let reactHotLoaderTransformer = null; + if (transforms.includes("react-hot-loader")) { + if (!options.filePath) { + throw new Error("filePath is required when using the react-hot-loader transform."); + } + reactHotLoaderTransformer = new ReactHotLoaderTransformer(tokenProcessor, options.filePath); + this.transformers.push(reactHotLoaderTransformer); + } + + // Note that we always want to enable the imports transformer, even when the import transform + // itself isn't enabled, since we need to do type-only import pruning for both Flow and + // TypeScript. + if (transforms.includes("imports")) { + if (importProcessor === null) { + throw new Error("Expected non-null importProcessor with imports transform enabled."); + } + this.transformers.push( + new CJSImportTransformer( + this, + tokenProcessor, + importProcessor, + this.nameManager, + this.helperManager, + reactHotLoaderTransformer, + enableLegacyBabel5ModuleInterop, + Boolean(options.enableLegacyTypeScriptModuleInterop), + transforms.includes("typescript"), + transforms.includes("flow"), + Boolean(options.preserveDynamicImport), + Boolean(options.keepUnusedImports), + ), + ); + } else { + this.transformers.push( + new ESMImportTransformer( + tokenProcessor, + this.nameManager, + this.helperManager, + reactHotLoaderTransformer, + transforms.includes("typescript"), + transforms.includes("flow"), + Boolean(options.keepUnusedImports), + options, + ), + ); + } + + if (transforms.includes("flow")) { + this.transformers.push( + new FlowTransformer(this, tokenProcessor, transforms.includes("imports")), + ); + } + if (transforms.includes("typescript")) { + this.transformers.push( + new TypeScriptTransformer(this, tokenProcessor, transforms.includes("imports")), + ); + } + if (transforms.includes("jest")) { + this.transformers.push( + new JestHoistTransformer(this, tokenProcessor, this.nameManager, importProcessor), + ); + } + } + + transform() { + this.tokens.reset(); + this.processBalancedCode(); + const shouldAddUseStrict = this.isImportsTransformEnabled; + // "use strict" always needs to be first, so override the normal transformer order. + let prefix = shouldAddUseStrict ? '"use strict";' : ""; + for (const transformer of this.transformers) { + prefix += transformer.getPrefixCode(); + } + prefix += this.helperManager.emitHelpers(); + prefix += this.generatedVariables.map((v) => ` var ${v};`).join(""); + for (const transformer of this.transformers) { + prefix += transformer.getHoistedCode(); + } + let suffix = ""; + for (const transformer of this.transformers) { + suffix += transformer.getSuffixCode(); + } + const result = this.tokens.finish(); + let {code} = result; + if (code.startsWith("#!")) { + let newlineIndex = code.indexOf("\n"); + if (newlineIndex === -1) { + newlineIndex = code.length; + code += "\n"; + } + return { + code: code.slice(0, newlineIndex + 1) + prefix + code.slice(newlineIndex + 1) + suffix, + // The hashbang line has no tokens, so shifting the tokens to account + // for prefix can happen normally. + mappings: this.shiftMappings(result.mappings, prefix.length), + }; + } else { + return { + code: prefix + code + suffix, + mappings: this.shiftMappings(result.mappings, prefix.length), + }; + } + } + + processBalancedCode() { + let braceDepth = 0; + let parenDepth = 0; + while (!this.tokens.isAtEnd()) { + if (this.tokens.matches1(tt.braceL) || this.tokens.matches1(tt.dollarBraceL)) { + braceDepth++; + } else if (this.tokens.matches1(tt.braceR)) { + if (braceDepth === 0) { + return; + } + braceDepth--; + } + if (this.tokens.matches1(tt.parenL)) { + parenDepth++; + } else if (this.tokens.matches1(tt.parenR)) { + if (parenDepth === 0) { + return; + } + parenDepth--; + } + this.processToken(); + } + } + + processToken() { + if (this.tokens.matches1(tt._class)) { + this.processClass(); + return; + } + for (const transformer of this.transformers) { + const wasProcessed = transformer.process(); + if (wasProcessed) { + return; + } + } + this.tokens.copyToken(); + } + + /** + * Skip past a class with a name and return that name. + */ + processNamedClass() { + if (!this.tokens.matches2(tt._class, tt.name)) { + throw new Error("Expected identifier for exported class name."); + } + const name = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1); + this.processClass(); + return name; + } + + processClass() { + const classInfo = getClassInfo(this, this.tokens, this.nameManager, this.disableESTransforms); + + // Both static and instance initializers need a class name to use to invoke the initializer, so + // assign to one if necessary. + const needsCommaExpression = + (classInfo.headerInfo.isExpression || !classInfo.headerInfo.className) && + classInfo.staticInitializerNames.length + classInfo.instanceInitializerNames.length > 0; + + let className = classInfo.headerInfo.className; + if (needsCommaExpression) { + className = this.nameManager.claimFreeName("_class"); + this.generatedVariables.push(className); + this.tokens.appendCode(` (${className} =`); + } + + const classToken = this.tokens.currentToken(); + const contextId = classToken.contextId; + if (contextId == null) { + throw new Error("Expected class to have a context ID."); + } + this.tokens.copyExpectedToken(tt._class); + while (!this.tokens.matchesContextIdAndLabel(tt.braceL, contextId)) { + this.processToken(); + } + + this.processClassBody(classInfo, className); + + const staticInitializerStatements = classInfo.staticInitializerNames.map( + (name) => `${className}.${name}()`, + ); + if (needsCommaExpression) { + this.tokens.appendCode( + `, ${staticInitializerStatements.map((s) => `${s}, `).join("")}${className})`, + ); + } else if (classInfo.staticInitializerNames.length > 0) { + this.tokens.appendCode(` ${staticInitializerStatements.map((s) => `${s};`).join(" ")}`); + } + } + + /** + * We want to just handle class fields in all contexts, since TypeScript supports them. Later, + * when some JS implementations support class fields, this should be made optional. + */ + processClassBody(classInfo, className) { + const { + headerInfo, + constructorInsertPos, + constructorInitializerStatements, + fields, + instanceInitializerNames, + rangesToRemove, + } = classInfo; + let fieldIndex = 0; + let rangeToRemoveIndex = 0; + const classContextId = this.tokens.currentToken().contextId; + if (classContextId == null) { + throw new Error("Expected non-null context ID on class."); + } + this.tokens.copyExpectedToken(tt.braceL); + if (this.isReactHotLoaderTransformEnabled) { + this.tokens.appendCode( + "__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}", + ); + } + + const needsConstructorInit = + constructorInitializerStatements.length + instanceInitializerNames.length > 0; + + if (constructorInsertPos === null && needsConstructorInit) { + const constructorInitializersCode = this.makeConstructorInitCode( + constructorInitializerStatements, + instanceInitializerNames, + className, + ); + if (headerInfo.hasSuperclass) { + const argsName = this.nameManager.claimFreeName("args"); + this.tokens.appendCode( + `constructor(...${argsName}) { super(...${argsName}); ${constructorInitializersCode}; }`, + ); + } else { + this.tokens.appendCode(`constructor() { ${constructorInitializersCode}; }`); + } + } + + while (!this.tokens.matchesContextIdAndLabel(tt.braceR, classContextId)) { + if (fieldIndex < fields.length && this.tokens.currentIndex() === fields[fieldIndex].start) { + let needsCloseBrace = false; + if (this.tokens.matches1(tt.bracketL)) { + this.tokens.copyTokenWithPrefix(`${fields[fieldIndex].initializerName}() {this`); + } else if (this.tokens.matches1(tt.string) || this.tokens.matches1(tt.num)) { + this.tokens.copyTokenWithPrefix(`${fields[fieldIndex].initializerName}() {this[`); + needsCloseBrace = true; + } else { + this.tokens.copyTokenWithPrefix(`${fields[fieldIndex].initializerName}() {this.`); + } + while (this.tokens.currentIndex() < fields[fieldIndex].end) { + if (needsCloseBrace && this.tokens.currentIndex() === fields[fieldIndex].equalsIndex) { + this.tokens.appendCode("]"); + } + this.processToken(); + } + this.tokens.appendCode("}"); + fieldIndex++; + } else if ( + rangeToRemoveIndex < rangesToRemove.length && + this.tokens.currentIndex() >= rangesToRemove[rangeToRemoveIndex].start + ) { + if (this.tokens.currentIndex() < rangesToRemove[rangeToRemoveIndex].end) { + this.tokens.removeInitialToken(); + } + while (this.tokens.currentIndex() < rangesToRemove[rangeToRemoveIndex].end) { + this.tokens.removeToken(); + } + rangeToRemoveIndex++; + } else if (this.tokens.currentIndex() === constructorInsertPos) { + this.tokens.copyToken(); + if (needsConstructorInit) { + this.tokens.appendCode( + `;${this.makeConstructorInitCode( + constructorInitializerStatements, + instanceInitializerNames, + className, + )};`, + ); + } + this.processToken(); + } else { + this.processToken(); + } + } + this.tokens.copyExpectedToken(tt.braceR); + } + + makeConstructorInitCode( + constructorInitializerStatements, + instanceInitializerNames, + className, + ) { + return [ + ...constructorInitializerStatements, + ...instanceInitializerNames.map((name) => `${className}.prototype.${name}.call(this)`), + ].join(";"); + } + + /** + * Normally it's ok to simply remove type tokens, but we need to be more careful when dealing with + * arrow function return types since they can confuse the parser. In that case, we want to move + * the close-paren to the same line as the arrow. + * + * See https://github.com/alangpierce/sucrase/issues/391 for more details. + */ + processPossibleArrowParamEnd() { + if (this.tokens.matches2(tt.parenR, tt.colon) && this.tokens.tokenAtRelativeIndex(1).isType) { + let nextNonTypeIndex = this.tokens.currentIndex() + 1; + // Look ahead to see if this is an arrow function or something else. + while (this.tokens.tokens[nextNonTypeIndex].isType) { + nextNonTypeIndex++; + } + if (this.tokens.matches1AtIndex(nextNonTypeIndex, tt.arrow)) { + this.tokens.removeInitialToken(); + while (this.tokens.currentIndex() < nextNonTypeIndex) { + this.tokens.removeToken(); + } + this.tokens.replaceTokenTrimmingLeftWhitespace(") =>"); + return true; + } + } + return false; + } + + /** + * An async arrow function might be of the form: + * + * async < + * T + * >() => {} + * + * in which case, removing the type parameters will cause a syntax error. Detect this case and + * move the open-paren earlier. + */ + processPossibleAsyncArrowWithTypeParams() { + if ( + !this.tokens.matchesContextual(ContextualKeyword._async) && + !this.tokens.matches1(tt._async) + ) { + return false; + } + const nextToken = this.tokens.tokenAtRelativeIndex(1); + if (nextToken.type !== tt.lessThan || !nextToken.isType) { + return false; + } + + let nextNonTypeIndex = this.tokens.currentIndex() + 1; + // Look ahead to see if this is an arrow function or something else. + while (this.tokens.tokens[nextNonTypeIndex].isType) { + nextNonTypeIndex++; + } + if (this.tokens.matches1AtIndex(nextNonTypeIndex, tt.parenL)) { + this.tokens.replaceToken("async ("); + this.tokens.removeInitialToken(); + while (this.tokens.currentIndex() < nextNonTypeIndex) { + this.tokens.removeToken(); + } + this.tokens.removeToken(); + // We ate a ( token, so we need to process the tokens in between and then the ) token so that + // we remain balanced. + this.processBalancedCode(); + this.processToken(); + return true; + } + return false; + } + + processPossibleTypeRange() { + if (this.tokens.currentToken().isType) { + this.tokens.removeInitialToken(); + while (this.tokens.currentToken().isType) { + this.tokens.removeToken(); + } + return true; + } + return false; + } + + shiftMappings( + mappings, + prefixLength, + ) { + for (let i = 0; i < mappings.length; i++) { + const mapping = mappings[i]; + if (mapping !== undefined) { + mappings[i] = mapping + prefixLength; + } + } + return mappings; + } +} diff --git a/node_modules/sucrase/dist/esm/transformers/Transformer.js b/node_modules/sucrase/dist/esm/transformers/Transformer.js new file mode 100644 index 0000000..5e8e9e7 --- /dev/null +++ b/node_modules/sucrase/dist/esm/transformers/Transformer.js @@ -0,0 +1,16 @@ +export default class Transformer { + // Return true if anything was processed, false otherwise. + + + getPrefixCode() { + return ""; + } + + getHoistedCode() { + return ""; + } + + getSuffixCode() { + return ""; + } +} diff --git a/node_modules/sucrase/dist/esm/transformers/TypeScriptTransformer.js b/node_modules/sucrase/dist/esm/transformers/TypeScriptTransformer.js new file mode 100644 index 0000000..67e1274 --- /dev/null +++ b/node_modules/sucrase/dist/esm/transformers/TypeScriptTransformer.js @@ -0,0 +1,279 @@ + +import {TokenType as tt} from "../parser/tokenizer/types"; + +import isIdentifier from "../util/isIdentifier"; + +import Transformer from "./Transformer"; + +export default class TypeScriptTransformer extends Transformer { + constructor( + rootTransformer, + tokens, + isImportsTransformEnabled, + ) { + super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.isImportsTransformEnabled = isImportsTransformEnabled;; + } + + process() { + if ( + this.rootTransformer.processPossibleArrowParamEnd() || + this.rootTransformer.processPossibleAsyncArrowWithTypeParams() || + this.rootTransformer.processPossibleTypeRange() + ) { + return true; + } + if ( + this.tokens.matches1(tt._public) || + this.tokens.matches1(tt._protected) || + this.tokens.matches1(tt._private) || + this.tokens.matches1(tt._abstract) || + this.tokens.matches1(tt._readonly) || + this.tokens.matches1(tt._override) || + this.tokens.matches1(tt.nonNullAssertion) + ) { + this.tokens.removeInitialToken(); + return true; + } + if (this.tokens.matches1(tt._enum) || this.tokens.matches2(tt._const, tt._enum)) { + this.processEnum(); + return true; + } + if ( + this.tokens.matches2(tt._export, tt._enum) || + this.tokens.matches3(tt._export, tt._const, tt._enum) + ) { + this.processEnum(true); + return true; + } + return false; + } + + processEnum(isExport = false) { + // We might have "export const enum", so just remove all relevant tokens. + this.tokens.removeInitialToken(); + while (this.tokens.matches1(tt._const) || this.tokens.matches1(tt._enum)) { + this.tokens.removeToken(); + } + const enumName = this.tokens.identifierName(); + this.tokens.removeToken(); + if (isExport && !this.isImportsTransformEnabled) { + this.tokens.appendCode("export "); + } + this.tokens.appendCode(`var ${enumName}; (function (${enumName})`); + this.tokens.copyExpectedToken(tt.braceL); + this.processEnumBody(enumName); + this.tokens.copyExpectedToken(tt.braceR); + if (isExport && this.isImportsTransformEnabled) { + this.tokens.appendCode(`)(${enumName} || (exports.${enumName} = ${enumName} = {}));`); + } else { + this.tokens.appendCode(`)(${enumName} || (${enumName} = {}));`); + } + } + + /** + * Transform an enum into equivalent JS. This has complexity in a few places: + * - TS allows string enums, numeric enums, and a mix of the two styles within an enum. + * - Enum keys are allowed to be referenced in later enum values. + * - Enum keys are allowed to be strings. + * - When enum values are omitted, they should follow an auto-increment behavior. + */ + processEnumBody(enumName) { + // Code that can be used to reference the previous enum member, or null if this is the first + // enum member. + let previousValueCode = null; + while (true) { + if (this.tokens.matches1(tt.braceR)) { + break; + } + const {nameStringCode, variableName} = this.extractEnumKeyInfo(this.tokens.currentToken()); + this.tokens.removeInitialToken(); + + if ( + this.tokens.matches3(tt.eq, tt.string, tt.comma) || + this.tokens.matches3(tt.eq, tt.string, tt.braceR) + ) { + this.processStringLiteralEnumMember(enumName, nameStringCode, variableName); + } else if (this.tokens.matches1(tt.eq)) { + this.processExplicitValueEnumMember(enumName, nameStringCode, variableName); + } else { + this.processImplicitValueEnumMember( + enumName, + nameStringCode, + variableName, + previousValueCode, + ); + } + if (this.tokens.matches1(tt.comma)) { + this.tokens.removeToken(); + } + + if (variableName != null) { + previousValueCode = variableName; + } else { + previousValueCode = `${enumName}[${nameStringCode}]`; + } + } + } + + /** + * Detect name information about this enum key, which will be used to determine which code to emit + * and whether we should declare a variable as part of this declaration. + * + * Some cases to keep in mind: + * - Enum keys can be implicitly referenced later, e.g. `X = 1, Y = X`. In Sucrase, we implement + * this by declaring a variable `X` so that later expressions can use it. + * - In addition to the usual identifier key syntax, enum keys are allowed to be string literals, + * e.g. `"hello world" = 3,`. Template literal syntax is NOT allowed. + * - Even if the enum key is defined as a string literal, it may still be referenced by identifier + * later, e.g. `"X" = 1, Y = X`. That means that we need to detect whether or not a string + * literal is identifier-like and emit a variable if so, even if the declaration did not use an + * identifier. + * - Reserved keywords like `break` are valid enum keys, but are not valid to be referenced later + * and would be a syntax error if we emitted a variable, so we need to skip the variable + * declaration in those cases. + * + * The variableName return value captures these nuances: if non-null, we can and must emit a + * variable declaration, and if null, we can't and shouldn't. + */ + extractEnumKeyInfo(nameToken) { + if (nameToken.type === tt.name) { + const name = this.tokens.identifierNameForToken(nameToken); + return { + nameStringCode: `"${name}"`, + variableName: isIdentifier(name) ? name : null, + }; + } else if (nameToken.type === tt.string) { + const name = this.tokens.stringValueForToken(nameToken); + return { + nameStringCode: this.tokens.code.slice(nameToken.start, nameToken.end), + variableName: isIdentifier(name) ? name : null, + }; + } else { + throw new Error("Expected name or string at beginning of enum element."); + } + } + + /** + * Handle an enum member where the RHS is just a string literal (not omitted, not a number, and + * not a complex expression). This is the typical form for TS string enums, and in this case, we + * do *not* create a reverse mapping. + * + * This is called after deleting the key token, when the token processor is at the equals sign. + * + * Example 1: + * someKey = "some value" + * -> + * const someKey = "some value"; MyEnum["someKey"] = someKey; + * + * Example 2: + * "some key" = "some value" + * -> + * MyEnum["some key"] = "some value"; + */ + processStringLiteralEnumMember( + enumName, + nameStringCode, + variableName, + ) { + if (variableName != null) { + this.tokens.appendCode(`const ${variableName}`); + // = + this.tokens.copyToken(); + // value string + this.tokens.copyToken(); + this.tokens.appendCode(`; ${enumName}[${nameStringCode}] = ${variableName};`); + } else { + this.tokens.appendCode(`${enumName}[${nameStringCode}]`); + // = + this.tokens.copyToken(); + // value string + this.tokens.copyToken(); + this.tokens.appendCode(";"); + } + } + + /** + * Handle an enum member initialized with an expression on the right-hand side (other than a + * string literal). In these cases, we should transform the expression and emit code that sets up + * a reverse mapping. + * + * The TypeScript implementation of this operation distinguishes between expressions that can be + * "constant folded" at compile time (i.e. consist of number literals and simple math operations + * on those numbers) and ones that are dynamic. For constant expressions, it emits the resolved + * numeric value, and auto-incrementing is only allowed in that case. Evaluating expressions at + * compile time would add significant complexity to Sucrase, so Sucrase instead leaves the + * expression as-is, and will later emit something like `MyEnum["previousKey"] + 1` to implement + * auto-incrementing. + * + * This is called after deleting the key token, when the token processor is at the equals sign. + * + * Example 1: + * someKey = 1 + 1 + * -> + * const someKey = 1 + 1; MyEnum[MyEnum["someKey"] = someKey] = "someKey"; + * + * Example 2: + * "some key" = 1 + 1 + * -> + * MyEnum[MyEnum["some key"] = 1 + 1] = "some key"; + */ + processExplicitValueEnumMember( + enumName, + nameStringCode, + variableName, + ) { + const rhsEndIndex = this.tokens.currentToken().rhsEndIndex; + if (rhsEndIndex == null) { + throw new Error("Expected rhsEndIndex on enum assign."); + } + + if (variableName != null) { + this.tokens.appendCode(`const ${variableName}`); + this.tokens.copyToken(); + while (this.tokens.currentIndex() < rhsEndIndex) { + this.rootTransformer.processToken(); + } + this.tokens.appendCode( + `; ${enumName}[${enumName}[${nameStringCode}] = ${variableName}] = ${nameStringCode};`, + ); + } else { + this.tokens.appendCode(`${enumName}[${enumName}[${nameStringCode}]`); + this.tokens.copyToken(); + while (this.tokens.currentIndex() < rhsEndIndex) { + this.rootTransformer.processToken(); + } + this.tokens.appendCode(`] = ${nameStringCode};`); + } + } + + /** + * Handle an enum member with no right-hand side expression. In this case, the value is the + * previous value plus 1, or 0 if there was no previous value. We should also always emit a + * reverse mapping. + * + * Example 1: + * someKey2 + * -> + * const someKey2 = someKey1 + 1; MyEnum[MyEnum["someKey2"] = someKey2] = "someKey2"; + * + * Example 2: + * "some key 2" + * -> + * MyEnum[MyEnum["some key 2"] = someKey1 + 1] = "some key 2"; + */ + processImplicitValueEnumMember( + enumName, + nameStringCode, + variableName, + previousValueCode, + ) { + let valueCode = previousValueCode != null ? `${previousValueCode} + 1` : "0"; + if (variableName != null) { + this.tokens.appendCode(`const ${variableName} = ${valueCode}; `); + valueCode = variableName; + } + this.tokens.appendCode( + `${enumName}[${enumName}[${nameStringCode}] = ${valueCode}] = ${nameStringCode};`, + ); + } +} diff --git a/node_modules/sucrase/dist/esm/util/elideImportEquals.js b/node_modules/sucrase/dist/esm/util/elideImportEquals.js new file mode 100644 index 0000000..6b18a7a --- /dev/null +++ b/node_modules/sucrase/dist/esm/util/elideImportEquals.js @@ -0,0 +1,29 @@ +import {TokenType as tt} from "../parser/tokenizer/types"; + + +export default function elideImportEquals(tokens) { + // import + tokens.removeInitialToken(); + // name + tokens.removeToken(); + // = + tokens.removeToken(); + // name or require + tokens.removeToken(); + // Handle either `import A = require('A')` or `import A = B.C.D`. + if (tokens.matches1(tt.parenL)) { + // ( + tokens.removeToken(); + // path string + tokens.removeToken(); + // ) + tokens.removeToken(); + } else { + while (tokens.matches1(tt.dot)) { + // . + tokens.removeToken(); + // name + tokens.removeToken(); + } + } +} diff --git a/node_modules/sucrase/dist/esm/util/formatTokens.js b/node_modules/sucrase/dist/esm/util/formatTokens.js new file mode 100644 index 0000000..eea07d2 --- /dev/null +++ b/node_modules/sucrase/dist/esm/util/formatTokens.js @@ -0,0 +1,74 @@ +import LinesAndColumns from "lines-and-columns"; + + +import {formatTokenType} from "../parser/tokenizer/types"; + +export default function formatTokens(code, tokens) { + if (tokens.length === 0) { + return ""; + } + + const tokenKeys = Object.keys(tokens[0]).filter( + (k) => k !== "type" && k !== "value" && k !== "start" && k !== "end" && k !== "loc", + ); + const typeKeys = Object.keys(tokens[0].type).filter((k) => k !== "label" && k !== "keyword"); + + const headings = ["Location", "Label", "Raw", ...tokenKeys, ...typeKeys]; + + const lines = new LinesAndColumns(code); + const rows = [headings, ...tokens.map(getTokenComponents)]; + const padding = headings.map(() => 0); + for (const components of rows) { + for (let i = 0; i < components.length; i++) { + padding[i] = Math.max(padding[i], components[i].length); + } + } + return rows + .map((components) => components.map((component, i) => component.padEnd(padding[i])).join(" ")) + .join("\n"); + + function getTokenComponents(token) { + const raw = code.slice(token.start, token.end); + return [ + formatRange(token.start, token.end), + formatTokenType(token.type), + truncate(String(raw), 14), + // @ts-ignore: Intentional dynamic access by key. + ...tokenKeys.map((key) => formatValue(token[key], key)), + // @ts-ignore: Intentional dynamic access by key. + ...typeKeys.map((key) => formatValue(token.type[key], key)), + ]; + } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + function formatValue(value, key) { + if (value === true) { + return key; + } else if (value === false || value === null) { + return ""; + } else { + return String(value); + } + } + + function formatRange(start, end) { + return `${formatPos(start)}-${formatPos(end)}`; + } + + function formatPos(pos) { + const location = lines.locationForIndex(pos); + if (!location) { + return "Unknown"; + } else { + return `${location.line + 1}:${location.column + 1}`; + } + } +} + +function truncate(s, length) { + if (s.length > length) { + return `${s.slice(0, length - 3)}...`; + } else { + return s; + } +} diff --git a/node_modules/sucrase/dist/esm/util/getClassInfo.js b/node_modules/sucrase/dist/esm/util/getClassInfo.js new file mode 100644 index 0000000..0100ad6 --- /dev/null +++ b/node_modules/sucrase/dist/esm/util/getClassInfo.js @@ -0,0 +1,352 @@ + + +import {ContextualKeyword} from "../parser/tokenizer/keywords"; +import {TokenType as tt} from "../parser/tokenizer/types"; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/** + * Get information about the class fields for this class, given a token processor pointing to the + * open-brace at the start of the class. + */ +export default function getClassInfo( + rootTransformer, + tokens, + nameManager, + disableESTransforms, +) { + const snapshot = tokens.snapshot(); + + const headerInfo = processClassHeader(tokens); + + let constructorInitializerStatements = []; + const instanceInitializerNames = []; + const staticInitializerNames = []; + let constructorInsertPos = null; + const fields = []; + const rangesToRemove = []; + + const classContextId = tokens.currentToken().contextId; + if (classContextId == null) { + throw new Error("Expected non-null class context ID on class open-brace."); + } + + tokens.nextToken(); + while (!tokens.matchesContextIdAndLabel(tt.braceR, classContextId)) { + if (tokens.matchesContextual(ContextualKeyword._constructor) && !tokens.currentToken().isType) { + ({constructorInitializerStatements, constructorInsertPos} = processConstructor(tokens)); + } else if (tokens.matches1(tt.semi)) { + if (!disableESTransforms) { + rangesToRemove.push({start: tokens.currentIndex(), end: tokens.currentIndex() + 1}); + } + tokens.nextToken(); + } else if (tokens.currentToken().isType) { + tokens.nextToken(); + } else { + // Either a method or a field. Skip to the identifier part. + const statementStartIndex = tokens.currentIndex(); + let isStatic = false; + let isESPrivate = false; + let isDeclareOrAbstract = false; + while (isAccessModifier(tokens.currentToken())) { + if (tokens.matches1(tt._static)) { + isStatic = true; + } + if (tokens.matches1(tt.hash)) { + isESPrivate = true; + } + if (tokens.matches1(tt._declare) || tokens.matches1(tt._abstract)) { + isDeclareOrAbstract = true; + } + tokens.nextToken(); + } + if (isStatic && tokens.matches1(tt.braceL)) { + // This is a static block, so don't process it in any special way. + skipToNextClassElement(tokens, classContextId); + continue; + } + if (isESPrivate) { + // Sucrase doesn't attempt to transpile private fields; just leave them as-is. + skipToNextClassElement(tokens, classContextId); + continue; + } + if ( + tokens.matchesContextual(ContextualKeyword._constructor) && + !tokens.currentToken().isType + ) { + ({constructorInitializerStatements, constructorInsertPos} = processConstructor(tokens)); + continue; + } + + const nameStartIndex = tokens.currentIndex(); + skipFieldName(tokens); + if (tokens.matches1(tt.lessThan) || tokens.matches1(tt.parenL)) { + // This is a method, so nothing to process. + skipToNextClassElement(tokens, classContextId); + continue; + } + // There might be a type annotation that we need to skip. + while (tokens.currentToken().isType) { + tokens.nextToken(); + } + if (tokens.matches1(tt.eq)) { + const equalsIndex = tokens.currentIndex(); + // This is an initializer, so we need to wrap in an initializer method. + const valueEnd = tokens.currentToken().rhsEndIndex; + if (valueEnd == null) { + throw new Error("Expected rhsEndIndex on class field assignment."); + } + tokens.nextToken(); + while (tokens.currentIndex() < valueEnd) { + rootTransformer.processToken(); + } + let initializerName; + if (isStatic) { + initializerName = nameManager.claimFreeName("__initStatic"); + staticInitializerNames.push(initializerName); + } else { + initializerName = nameManager.claimFreeName("__init"); + instanceInitializerNames.push(initializerName); + } + // Fields start at the name, so `static x = 1;` has a field range of `x = 1;`. + fields.push({ + initializerName, + equalsIndex, + start: nameStartIndex, + end: tokens.currentIndex(), + }); + } else if (!disableESTransforms || isDeclareOrAbstract) { + // This is a regular field declaration, like `x;`. With the class transform enabled, we just + // remove the line so that no output is produced. With the class transform disabled, we + // usually want to preserve the declaration (but still strip types), but if the `declare` + // or `abstract` keyword is specified, we should remove the line to avoid initializing the + // value to undefined. + rangesToRemove.push({start: statementStartIndex, end: tokens.currentIndex()}); + } + } + } + + tokens.restoreToSnapshot(snapshot); + if (disableESTransforms) { + // With ES transforms disabled, we don't want to transform regular class + // field declarations, and we don't need to do any additional tricks to + // reference the constructor for static init, but we still need to transform + // TypeScript field initializers defined as constructor parameters and we + // still need to remove `declare` fields. For now, we run the same code + // path but omit any field information, as if the class had no field + // declarations. In the future, when we fully drop the class fields + // transform, we can simplify this code significantly. + return { + headerInfo, + constructorInitializerStatements, + instanceInitializerNames: [], + staticInitializerNames: [], + constructorInsertPos, + fields: [], + rangesToRemove, + }; + } else { + return { + headerInfo, + constructorInitializerStatements, + instanceInitializerNames, + staticInitializerNames, + constructorInsertPos, + fields, + rangesToRemove, + }; + } +} + +/** + * Move the token processor to the next method/field in the class. + * + * To do that, we seek forward to the next start of a class name (either an open + * bracket or an identifier, or the closing curly brace), then seek backward to + * include any access modifiers. + */ +function skipToNextClassElement(tokens, classContextId) { + tokens.nextToken(); + while (tokens.currentToken().contextId !== classContextId) { + tokens.nextToken(); + } + while (isAccessModifier(tokens.tokenAtRelativeIndex(-1))) { + tokens.previousToken(); + } +} + +function processClassHeader(tokens) { + const classToken = tokens.currentToken(); + const contextId = classToken.contextId; + if (contextId == null) { + throw new Error("Expected context ID on class token."); + } + const isExpression = classToken.isExpression; + if (isExpression == null) { + throw new Error("Expected isExpression on class token."); + } + let className = null; + let hasSuperclass = false; + tokens.nextToken(); + if (tokens.matches1(tt.name)) { + className = tokens.identifierName(); + } + while (!tokens.matchesContextIdAndLabel(tt.braceL, contextId)) { + // If this has a superclass, there will always be an `extends` token. If it doesn't have a + // superclass, only type parameters and `implements` clauses can show up here, all of which + // consist only of type tokens. A declaration like `class A {` should *not* count + // as having a superclass. + if (tokens.matches1(tt._extends) && !tokens.currentToken().isType) { + hasSuperclass = true; + } + tokens.nextToken(); + } + return {isExpression, className, hasSuperclass}; +} + +/** + * Extract useful information out of a constructor, starting at the "constructor" name. + */ +function processConstructor(tokens) + + + { + const constructorInitializerStatements = []; + + tokens.nextToken(); + const constructorContextId = tokens.currentToken().contextId; + if (constructorContextId == null) { + throw new Error("Expected context ID on open-paren starting constructor params."); + } + // Advance through parameters looking for access modifiers. + while (!tokens.matchesContextIdAndLabel(tt.parenR, constructorContextId)) { + if (tokens.currentToken().contextId === constructorContextId) { + // Current token is an open paren or comma just before a param, so check + // that param for access modifiers. + tokens.nextToken(); + if (isAccessModifier(tokens.currentToken())) { + tokens.nextToken(); + while (isAccessModifier(tokens.currentToken())) { + tokens.nextToken(); + } + const token = tokens.currentToken(); + if (token.type !== tt.name) { + throw new Error("Expected identifier after access modifiers in constructor arg."); + } + const name = tokens.identifierNameForToken(token); + constructorInitializerStatements.push(`this.${name} = ${name}`); + } + } else { + tokens.nextToken(); + } + } + // ) + tokens.nextToken(); + // Constructor type annotations are invalid, but skip them anyway since + // they're easy to skip. + while (tokens.currentToken().isType) { + tokens.nextToken(); + } + let constructorInsertPos = tokens.currentIndex(); + + // Advance through body looking for a super call. + let foundSuperCall = false; + while (!tokens.matchesContextIdAndLabel(tt.braceR, constructorContextId)) { + if (!foundSuperCall && tokens.matches2(tt._super, tt.parenL)) { + tokens.nextToken(); + const superCallContextId = tokens.currentToken().contextId; + if (superCallContextId == null) { + throw new Error("Expected a context ID on the super call"); + } + while (!tokens.matchesContextIdAndLabel(tt.parenR, superCallContextId)) { + tokens.nextToken(); + } + constructorInsertPos = tokens.currentIndex(); + foundSuperCall = true; + } + tokens.nextToken(); + } + // } + tokens.nextToken(); + + return {constructorInitializerStatements, constructorInsertPos}; +} + +/** + * Determine if this is any token that can go before the name in a method/field. + */ +function isAccessModifier(token) { + return [ + tt._async, + tt._get, + tt._set, + tt.plus, + tt.minus, + tt._readonly, + tt._static, + tt._public, + tt._private, + tt._protected, + tt._override, + tt._abstract, + tt.star, + tt._declare, + tt.hash, + ].includes(token.type); +} + +/** + * The next token or set of tokens is either an identifier or an expression in square brackets, for + * a method or field name. + */ +function skipFieldName(tokens) { + if (tokens.matches1(tt.bracketL)) { + const startToken = tokens.currentToken(); + const classContextId = startToken.contextId; + if (classContextId == null) { + throw new Error("Expected class context ID on computed name open bracket."); + } + while (!tokens.matchesContextIdAndLabel(tt.bracketR, classContextId)) { + tokens.nextToken(); + } + tokens.nextToken(); + } else { + tokens.nextToken(); + } +} diff --git a/node_modules/sucrase/dist/esm/util/getDeclarationInfo.js b/node_modules/sucrase/dist/esm/util/getDeclarationInfo.js new file mode 100644 index 0000000..ade9a81 --- /dev/null +++ b/node_modules/sucrase/dist/esm/util/getDeclarationInfo.js @@ -0,0 +1,40 @@ +import {isTopLevelDeclaration} from "../parser/tokenizer"; +import {TokenType as tt} from "../parser/tokenizer/types"; + + + + + + + +export const EMPTY_DECLARATION_INFO = { + typeDeclarations: new Set(), + valueDeclarations: new Set(), +}; + +/** + * Get all top-level identifiers that should be preserved when exported in TypeScript. + * + * Examples: + * - If an identifier is declared as `const x`, then `export {x}` should be preserved. + * - If it's declared as `type x`, then `export {x}` should be removed. + * - If it's declared as both `const x` and `type x`, then the export should be preserved. + * - Classes and enums should be preserved (even though they also introduce types). + * - Imported identifiers should be preserved since we don't have enough information to + * rule them out. --isolatedModules disallows re-exports, which catches errors here. + */ +export default function getDeclarationInfo(tokens) { + const typeDeclarations = new Set(); + const valueDeclarations = new Set(); + for (let i = 0; i < tokens.tokens.length; i++) { + const token = tokens.tokens[i]; + if (token.type === tt.name && isTopLevelDeclaration(token)) { + if (token.isType) { + typeDeclarations.add(tokens.identifierNameForToken(token)); + } else { + valueDeclarations.add(tokens.identifierNameForToken(token)); + } + } + } + return {typeDeclarations, valueDeclarations}; +} diff --git a/node_modules/sucrase/dist/esm/util/getIdentifierNames.js b/node_modules/sucrase/dist/esm/util/getIdentifierNames.js new file mode 100644 index 0000000..5b85901 --- /dev/null +++ b/node_modules/sucrase/dist/esm/util/getIdentifierNames.js @@ -0,0 +1,15 @@ + +import {TokenType as tt} from "../parser/tokenizer/types"; + +/** + * Get all identifier names in the code, in order, including duplicates. + */ +export default function getIdentifierNames(code, tokens) { + const names = []; + for (const token of tokens) { + if (token.type === tt.name) { + names.push(code.slice(token.start, token.end)); + } + } + return names; +} diff --git a/node_modules/sucrase/dist/esm/util/getImportExportSpecifierInfo.js b/node_modules/sucrase/dist/esm/util/getImportExportSpecifierInfo.js new file mode 100644 index 0000000..3dc6d2c --- /dev/null +++ b/node_modules/sucrase/dist/esm/util/getImportExportSpecifierInfo.js @@ -0,0 +1,92 @@ +import {TokenType as tt} from "../parser/tokenizer/types"; + + + + + + + + + + + + + + + + +/** + * Determine information about this named import or named export specifier. + * + * This syntax is the `a` from statements like these: + * import {A} from "./foo"; + * export {A}; + * export {A} from "./foo"; + * + * As it turns out, we can exactly characterize the syntax meaning by simply + * counting the number of tokens, which can be from 1 to 4: + * {A} + * {type A} + * {A as B} + * {type A as B} + * + * In the type case, we never actually need the names in practice, so don't get + * them. + * + * TODO: There's some redundancy with the type detection here and the isType + * flag that's already present on tokens in TS mode. This function could + * potentially be simplified and/or pushed to the call sites to avoid the object + * allocation. + */ +export default function getImportExportSpecifierInfo( + tokens, + index = tokens.currentIndex(), +) { + let endIndex = index + 1; + if (isSpecifierEnd(tokens, endIndex)) { + // import {A} + const name = tokens.identifierNameAtIndex(index); + return { + isType: false, + leftName: name, + rightName: name, + endIndex, + }; + } + endIndex++; + if (isSpecifierEnd(tokens, endIndex)) { + // import {type A} + return { + isType: true, + leftName: null, + rightName: null, + endIndex, + }; + } + endIndex++; + if (isSpecifierEnd(tokens, endIndex)) { + // import {A as B} + return { + isType: false, + leftName: tokens.identifierNameAtIndex(index), + rightName: tokens.identifierNameAtIndex(index + 2), + endIndex, + }; + } + endIndex++; + if (isSpecifierEnd(tokens, endIndex)) { + // import {type A as B} + return { + isType: true, + leftName: null, + rightName: null, + endIndex, + }; + } + throw new Error(`Unexpected import/export specifier at ${index}`); +} + +function isSpecifierEnd(tokens, index) { + const token = tokens.tokens[index]; + return token.type === tt.braceR || token.type === tt.comma; +} diff --git a/node_modules/sucrase/dist/esm/util/getJSXPragmaInfo.js b/node_modules/sucrase/dist/esm/util/getJSXPragmaInfo.js new file mode 100644 index 0000000..9972342 --- /dev/null +++ b/node_modules/sucrase/dist/esm/util/getJSXPragmaInfo.js @@ -0,0 +1,22 @@ + + + + + + + + + +export default function getJSXPragmaInfo(options) { + const [base, suffix] = splitPragma(options.jsxPragma || "React.createElement"); + const [fragmentBase, fragmentSuffix] = splitPragma(options.jsxFragmentPragma || "React.Fragment"); + return {base, suffix, fragmentBase, fragmentSuffix}; +} + +function splitPragma(pragma) { + let dotIndex = pragma.indexOf("."); + if (dotIndex === -1) { + dotIndex = pragma.length; + } + return [pragma.slice(0, dotIndex), pragma.slice(dotIndex)]; +} diff --git a/node_modules/sucrase/dist/esm/util/getNonTypeIdentifiers.js b/node_modules/sucrase/dist/esm/util/getNonTypeIdentifiers.js new file mode 100644 index 0000000..24c73dd --- /dev/null +++ b/node_modules/sucrase/dist/esm/util/getNonTypeIdentifiers.js @@ -0,0 +1,43 @@ + +import {IdentifierRole} from "../parser/tokenizer"; +import {TokenType, TokenType as tt} from "../parser/tokenizer/types"; + +import {startsWithLowerCase} from "../transformers/JSXTransformer"; +import getJSXPragmaInfo from "./getJSXPragmaInfo"; + +export function getNonTypeIdentifiers(tokens, options) { + const jsxPragmaInfo = getJSXPragmaInfo(options); + const nonTypeIdentifiers = new Set(); + for (let i = 0; i < tokens.tokens.length; i++) { + const token = tokens.tokens[i]; + if ( + token.type === tt.name && + !token.isType && + (token.identifierRole === IdentifierRole.Access || + token.identifierRole === IdentifierRole.ObjectShorthand || + token.identifierRole === IdentifierRole.ExportAccess) && + !token.shadowsGlobal + ) { + nonTypeIdentifiers.add(tokens.identifierNameForToken(token)); + } + if (token.type === tt.jsxTagStart) { + nonTypeIdentifiers.add(jsxPragmaInfo.base); + } + if ( + token.type === tt.jsxTagStart && + i + 1 < tokens.tokens.length && + tokens.tokens[i + 1].type === tt.jsxTagEnd + ) { + nonTypeIdentifiers.add(jsxPragmaInfo.base); + nonTypeIdentifiers.add(jsxPragmaInfo.fragmentBase); + } + if (token.type === tt.jsxName && token.identifierRole === IdentifierRole.Access) { + const identifierName = tokens.identifierNameForToken(token); + // Lower-case single-component tag names like "div" don't count. + if (!startsWithLowerCase(identifierName) || tokens.tokens[i + 1].type === TokenType.dot) { + nonTypeIdentifiers.add(tokens.identifierNameForToken(token)); + } + } + } + return nonTypeIdentifiers; +} diff --git a/node_modules/sucrase/dist/esm/util/getTSImportedNames.js b/node_modules/sucrase/dist/esm/util/getTSImportedNames.js new file mode 100644 index 0000000..523181a --- /dev/null +++ b/node_modules/sucrase/dist/esm/util/getTSImportedNames.js @@ -0,0 +1,84 @@ +import {TokenType as tt} from "../parser/tokenizer/types"; + +import getImportExportSpecifierInfo from "./getImportExportSpecifierInfo"; + +/** + * Special case code to scan for imported names in ESM TypeScript. We need to do this so we can + * properly get globals so we can compute shadowed globals. + * + * This is similar to logic in CJSImportProcessor, but trimmed down to avoid logic with CJS + * replacement and flow type imports. + */ +export default function getTSImportedNames(tokens) { + const importedNames = new Set(); + for (let i = 0; i < tokens.tokens.length; i++) { + if ( + tokens.matches1AtIndex(i, tt._import) && + !tokens.matches3AtIndex(i, tt._import, tt.name, tt.eq) + ) { + collectNamesForImport(tokens, i, importedNames); + } + } + return importedNames; +} + +function collectNamesForImport( + tokens, + index, + importedNames, +) { + index++; + + if (tokens.matches1AtIndex(index, tt.parenL)) { + // Dynamic import, so nothing to do + return; + } + + if (tokens.matches1AtIndex(index, tt.name)) { + importedNames.add(tokens.identifierNameAtIndex(index)); + index++; + if (tokens.matches1AtIndex(index, tt.comma)) { + index++; + } + } + + if (tokens.matches1AtIndex(index, tt.star)) { + // * as + index += 2; + importedNames.add(tokens.identifierNameAtIndex(index)); + index++; + } + + if (tokens.matches1AtIndex(index, tt.braceL)) { + index++; + collectNamesForNamedImport(tokens, index, importedNames); + } +} + +function collectNamesForNamedImport( + tokens, + index, + importedNames, +) { + while (true) { + if (tokens.matches1AtIndex(index, tt.braceR)) { + return; + } + + const specifierInfo = getImportExportSpecifierInfo(tokens, index); + index = specifierInfo.endIndex; + if (!specifierInfo.isType) { + importedNames.add(specifierInfo.rightName); + } + + if (tokens.matches2AtIndex(index, tt.comma, tt.braceR)) { + return; + } else if (tokens.matches1AtIndex(index, tt.braceR)) { + return; + } else if (tokens.matches1AtIndex(index, tt.comma)) { + index++; + } else { + throw new Error(`Unexpected token: ${JSON.stringify(tokens.tokens[index])}`); + } + } +} diff --git a/node_modules/sucrase/dist/esm/util/isAsyncOperation.js b/node_modules/sucrase/dist/esm/util/isAsyncOperation.js new file mode 100644 index 0000000..af40e9a --- /dev/null +++ b/node_modules/sucrase/dist/esm/util/isAsyncOperation.js @@ -0,0 +1,38 @@ +import {ContextualKeyword} from "../parser/tokenizer/keywords"; + + +/** + * Determine whether this optional chain or nullish coalescing operation has any await statements in + * it. If so, we'll need to transpile to an async operation. + * + * We compute this by walking the length of the operation and returning true if we see an await + * keyword used as a real await (rather than an object key or property access). Nested optional + * chain/nullish operations need to be tracked but don't silence await, but a nested async function + * (or any other nested scope) will make the await not count. + */ +export default function isAsyncOperation(tokens) { + let index = tokens.currentIndex(); + let depth = 0; + const startToken = tokens.currentToken(); + do { + const token = tokens.tokens[index]; + if (token.isOptionalChainStart) { + depth++; + } + if (token.isOptionalChainEnd) { + depth--; + } + depth += token.numNullishCoalesceStarts; + depth -= token.numNullishCoalesceEnds; + + if ( + token.contextualKeyword === ContextualKeyword._await && + token.identifierRole == null && + token.scopeDepth === startToken.scopeDepth + ) { + return true; + } + index += 1; + } while (depth > 0 && index < tokens.tokens.length); + return false; +} diff --git a/node_modules/sucrase/dist/esm/util/isExportFrom.js b/node_modules/sucrase/dist/esm/util/isExportFrom.js new file mode 100644 index 0000000..fd33665 --- /dev/null +++ b/node_modules/sucrase/dist/esm/util/isExportFrom.js @@ -0,0 +1,18 @@ +import {ContextualKeyword} from "../parser/tokenizer/keywords"; +import {TokenType as tt} from "../parser/tokenizer/types"; + + +/** + * Starting at `export {`, look ahead and return `true` if this is an + * `export {...} from` statement and `false` if this is a plain multi-export. + */ +export default function isExportFrom(tokens) { + let closeBraceIndex = tokens.currentIndex(); + while (!tokens.matches1AtIndex(closeBraceIndex, tt.braceR)) { + closeBraceIndex++; + } + return ( + tokens.matchesContextualAtIndex(closeBraceIndex + 1, ContextualKeyword._from) && + tokens.matches1AtIndex(closeBraceIndex + 2, tt.string) + ); +} diff --git a/node_modules/sucrase/dist/esm/util/isIdentifier.js b/node_modules/sucrase/dist/esm/util/isIdentifier.js new file mode 100644 index 0000000..4a62ff6 --- /dev/null +++ b/node_modules/sucrase/dist/esm/util/isIdentifier.js @@ -0,0 +1,81 @@ +import {IS_IDENTIFIER_CHAR, IS_IDENTIFIER_START} from "../parser/util/identifier"; + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar +// Hard-code a list of reserved words rather than trying to use keywords or contextual keywords +// from the parser, since currently there are various exceptions, like `package` being reserved +// but unused and various contextual keywords being reserved. Note that we assume that all code +// compiled by Sucrase is in a module, so strict mode words and await are all considered reserved +// here. +const RESERVED_WORDS = new Set([ + // Reserved keywords as of ECMAScript 2015 + "break", + "case", + "catch", + "class", + "const", + "continue", + "debugger", + "default", + "delete", + "do", + "else", + "export", + "extends", + "finally", + "for", + "function", + "if", + "import", + "in", + "instanceof", + "new", + "return", + "super", + "switch", + "this", + "throw", + "try", + "typeof", + "var", + "void", + "while", + "with", + "yield", + // Future reserved keywords + "enum", + "implements", + "interface", + "let", + "package", + "private", + "protected", + "public", + "static", + "await", + // Literals that cannot be used as identifiers + "false", + "null", + "true", +]); + +/** + * Determine if the given name is a legal variable name. + * + * This is needed when transforming TypeScript enums; if an enum key is a valid + * variable name, it might be referenced later in the enum, so we need to + * declare a variable. + */ +export default function isIdentifier(name) { + if (name.length === 0) { + return false; + } + if (!IS_IDENTIFIER_START[name.charCodeAt(0)]) { + return false; + } + for (let i = 1; i < name.length; i++) { + if (!IS_IDENTIFIER_CHAR[name.charCodeAt(i)]) { + return false; + } + } + return !RESERVED_WORDS.has(name); +} diff --git a/node_modules/sucrase/dist/esm/util/removeMaybeImportAttributes.js b/node_modules/sucrase/dist/esm/util/removeMaybeImportAttributes.js new file mode 100644 index 0000000..abced0e --- /dev/null +++ b/node_modules/sucrase/dist/esm/util/removeMaybeImportAttributes.js @@ -0,0 +1,22 @@ +import {ContextualKeyword} from "../parser/tokenizer/keywords"; +import {TokenType as tt} from "../parser/tokenizer/types"; + + +/** + * Starting at a potential `with` or (legacy) `assert` token, remove the import + * attributes if they exist. + */ +export function removeMaybeImportAttributes(tokens) { + if ( + tokens.matches2(tt._with, tt.braceL) || + (tokens.matches2(tt.name, tt.braceL) && tokens.matchesContextual(ContextualKeyword._assert)) + ) { + // assert + tokens.removeToken(); + // { + tokens.removeToken(); + tokens.removeBalancedCode(); + // } + tokens.removeToken(); + } +} diff --git a/node_modules/sucrase/dist/esm/util/shouldElideDefaultExport.js b/node_modules/sucrase/dist/esm/util/shouldElideDefaultExport.js new file mode 100644 index 0000000..d3c4693 --- /dev/null +++ b/node_modules/sucrase/dist/esm/util/shouldElideDefaultExport.js @@ -0,0 +1,38 @@ +import {TokenType as tt} from "../parser/tokenizer/types"; + + + +/** + * Common method sharing code between CJS and ESM cases, since they're the same here. + */ +export default function shouldElideDefaultExport( + isTypeScriptTransformEnabled, + keepUnusedImports, + tokens, + declarationInfo, +) { + if (!isTypeScriptTransformEnabled || keepUnusedImports) { + return false; + } + const exportToken = tokens.currentToken(); + if (exportToken.rhsEndIndex == null) { + throw new Error("Expected non-null rhsEndIndex on export token."); + } + // The export must be of the form `export default a` or `export default a;`. + const numTokens = exportToken.rhsEndIndex - tokens.currentIndex(); + if ( + numTokens !== 3 && + !(numTokens === 4 && tokens.matches1AtIndex(exportToken.rhsEndIndex - 1, tt.semi)) + ) { + return false; + } + const identifierToken = tokens.tokenAtRelativeIndex(2); + if (identifierToken.type !== tt.name) { + return false; + } + const exportedName = tokens.identifierNameForToken(identifierToken); + return ( + declarationInfo.typeDeclarations.has(exportedName) && + !declarationInfo.valueDeclarations.has(exportedName) + ); +} diff --git a/node_modules/sucrase/dist/identifyShadowedGlobals.js b/node_modules/sucrase/dist/identifyShadowedGlobals.js new file mode 100644 index 0000000..41c8eef --- /dev/null +++ b/node_modules/sucrase/dist/identifyShadowedGlobals.js @@ -0,0 +1,98 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); + + + +var _tokenizer = require('./parser/tokenizer'); + +var _types = require('./parser/tokenizer/types'); + + +/** + * Traverse the given tokens and modify them if necessary to indicate that some names shadow global + * variables. + */ + function identifyShadowedGlobals( + tokens, + scopes, + globalNames, +) { + if (!hasShadowedGlobals(tokens, globalNames)) { + return; + } + markShadowedGlobals(tokens, scopes, globalNames); +} exports.default = identifyShadowedGlobals; + +/** + * We can do a fast up-front check to see if there are any declarations to global names. If not, + * then there's no point in computing scope assignments. + */ +// Exported for testing. + function hasShadowedGlobals(tokens, globalNames) { + for (const token of tokens.tokens) { + if ( + token.type === _types.TokenType.name && + !token.isType && + _tokenizer.isNonTopLevelDeclaration.call(void 0, token) && + globalNames.has(tokens.identifierNameForToken(token)) + ) { + return true; + } + } + return false; +} exports.hasShadowedGlobals = hasShadowedGlobals; + +function markShadowedGlobals( + tokens, + scopes, + globalNames, +) { + const scopeStack = []; + let scopeIndex = scopes.length - 1; + // Scopes were generated at completion time, so they're sorted by end index, so we can maintain a + // good stack by going backwards through them. + for (let i = tokens.tokens.length - 1; ; i--) { + while (scopeStack.length > 0 && scopeStack[scopeStack.length - 1].startTokenIndex === i + 1) { + scopeStack.pop(); + } + while (scopeIndex >= 0 && scopes[scopeIndex].endTokenIndex === i + 1) { + scopeStack.push(scopes[scopeIndex]); + scopeIndex--; + } + // Process scopes after the last iteration so we can make sure we pop all of them. + if (i < 0) { + break; + } + + const token = tokens.tokens[i]; + const name = tokens.identifierNameForToken(token); + if (scopeStack.length > 1 && !token.isType && token.type === _types.TokenType.name && globalNames.has(name)) { + if (_tokenizer.isBlockScopedDeclaration.call(void 0, token)) { + markShadowedForScope(scopeStack[scopeStack.length - 1], tokens, name); + } else if (_tokenizer.isFunctionScopedDeclaration.call(void 0, token)) { + let stackIndex = scopeStack.length - 1; + while (stackIndex > 0 && !scopeStack[stackIndex].isFunctionScope) { + stackIndex--; + } + if (stackIndex < 0) { + throw new Error("Did not find parent function scope."); + } + markShadowedForScope(scopeStack[stackIndex], tokens, name); + } + } + } + if (scopeStack.length > 0) { + throw new Error("Expected empty scope stack after processing file."); + } +} + +function markShadowedForScope(scope, tokens, name) { + for (let i = scope.startTokenIndex; i < scope.endTokenIndex; i++) { + const token = tokens.tokens[i]; + if ( + (token.type === _types.TokenType.name || token.type === _types.TokenType.jsxName) && + tokens.identifierNameForToken(token) === name + ) { + token.shadowsGlobal = true; + } + } +} diff --git a/node_modules/sucrase/dist/index.js b/node_modules/sucrase/dist/index.js new file mode 100644 index 0000000..27f963b --- /dev/null +++ b/node_modules/sucrase/dist/index.js @@ -0,0 +1,133 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _CJSImportProcessor = require('./CJSImportProcessor'); var _CJSImportProcessor2 = _interopRequireDefault(_CJSImportProcessor); +var _computeSourceMap = require('./computeSourceMap'); var _computeSourceMap2 = _interopRequireDefault(_computeSourceMap); +var _HelperManager = require('./HelperManager'); +var _identifyShadowedGlobals = require('./identifyShadowedGlobals'); var _identifyShadowedGlobals2 = _interopRequireDefault(_identifyShadowedGlobals); +var _NameManager = require('./NameManager'); var _NameManager2 = _interopRequireDefault(_NameManager); +var _Options = require('./Options'); + +var _parser = require('./parser'); + +var _TokenProcessor = require('./TokenProcessor'); var _TokenProcessor2 = _interopRequireDefault(_TokenProcessor); +var _RootTransformer = require('./transformers/RootTransformer'); var _RootTransformer2 = _interopRequireDefault(_RootTransformer); +var _formatTokens = require('./util/formatTokens'); var _formatTokens2 = _interopRequireDefault(_formatTokens); +var _getTSImportedNames = require('./util/getTSImportedNames'); var _getTSImportedNames2 = _interopRequireDefault(_getTSImportedNames); + + + + + + + + + + + + + + +; + + function getVersion() { + /* istanbul ignore next */ + return "3.35.1"; +} exports.getVersion = getVersion; + + function transform(code, options) { + _Options.validateOptions.call(void 0, options); + try { + const sucraseContext = getSucraseContext(code, options); + const transformer = new (0, _RootTransformer2.default)( + sucraseContext, + options.transforms, + Boolean(options.enableLegacyBabel5ModuleInterop), + options, + ); + const transformerResult = transformer.transform(); + let result = {code: transformerResult.code}; + if (options.sourceMapOptions) { + if (!options.filePath) { + throw new Error("filePath must be specified when generating a source map."); + } + result = { + ...result, + sourceMap: _computeSourceMap2.default.call(void 0, + transformerResult, + options.filePath, + options.sourceMapOptions, + code, + sucraseContext.tokenProcessor.tokens, + ), + }; + } + return result; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } catch (e) { + if (options.filePath) { + e.message = `Error transforming ${options.filePath}: ${e.message}`; + } + throw e; + } +} exports.transform = transform; + +/** + * Return a string representation of the sucrase tokens, mostly useful for + * diagnostic purposes. + */ + function getFormattedTokens(code, options) { + const tokens = getSucraseContext(code, options).tokenProcessor.tokens; + return _formatTokens2.default.call(void 0, code, tokens); +} exports.getFormattedTokens = getFormattedTokens; + +/** + * Call into the parser/tokenizer and do some further preprocessing: + * - Come up with a set of used names so that we can assign new names. + * - Preprocess all import/export statements so we know which globals we are interested in. + * - Compute situations where any of those globals are shadowed. + * + * In the future, some of these preprocessing steps can be skipped based on what actual work is + * being done. + */ +function getSucraseContext(code, options) { + const isJSXEnabled = options.transforms.includes("jsx"); + const isTypeScriptEnabled = options.transforms.includes("typescript"); + const isFlowEnabled = options.transforms.includes("flow"); + const disableESTransforms = options.disableESTransforms === true; + const file = _parser.parse.call(void 0, code, isJSXEnabled, isTypeScriptEnabled, isFlowEnabled); + const tokens = file.tokens; + const scopes = file.scopes; + + const nameManager = new (0, _NameManager2.default)(code, tokens); + const helperManager = new (0, _HelperManager.HelperManager)(nameManager); + const tokenProcessor = new (0, _TokenProcessor2.default)( + code, + tokens, + isFlowEnabled, + disableESTransforms, + helperManager, + ); + const enableLegacyTypeScriptModuleInterop = Boolean(options.enableLegacyTypeScriptModuleInterop); + + let importProcessor = null; + if (options.transforms.includes("imports")) { + importProcessor = new (0, _CJSImportProcessor2.default)( + nameManager, + tokenProcessor, + enableLegacyTypeScriptModuleInterop, + options, + options.transforms.includes("typescript"), + Boolean(options.keepUnusedImports), + helperManager, + ); + importProcessor.preprocessTokens(); + // We need to mark shadowed globals after processing imports so we know that the globals are, + // but before type-only import pruning, since that relies on shadowing information. + _identifyShadowedGlobals2.default.call(void 0, tokenProcessor, scopes, importProcessor.getGlobalNames()); + if (options.transforms.includes("typescript") && !options.keepUnusedImports) { + importProcessor.pruneTypeOnlyImports(); + } + } else if (options.transforms.includes("typescript") && !options.keepUnusedImports) { + // Shadowed global detection is needed for TS implicit elision of imported names. + _identifyShadowedGlobals2.default.call(void 0, tokenProcessor, scopes, _getTSImportedNames2.default.call(void 0, tokenProcessor)); + } + return {tokenProcessor, scopes, nameManager, importProcessor, helperManager}; +} diff --git a/node_modules/sucrase/dist/parser/index.js b/node_modules/sucrase/dist/parser/index.js new file mode 100644 index 0000000..35d832a --- /dev/null +++ b/node_modules/sucrase/dist/parser/index.js @@ -0,0 +1,31 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); + +var _base = require('./traverser/base'); +var _index = require('./traverser/index'); + + class File { + + + + constructor(tokens, scopes) { + this.tokens = tokens; + this.scopes = scopes; + } +} exports.File = File; + + function parse( + input, + isJSXEnabled, + isTypeScriptEnabled, + isFlowEnabled, +) { + if (isFlowEnabled && isTypeScriptEnabled) { + throw new Error("Cannot combine flow and typescript plugins."); + } + _base.initParser.call(void 0, input, isJSXEnabled, isTypeScriptEnabled, isFlowEnabled); + const result = _index.parseFile.call(void 0, ); + if (_base.state.error) { + throw _base.augmentError.call(void 0, _base.state.error); + } + return result; +} exports.parse = parse; diff --git a/node_modules/sucrase/dist/parser/plugins/flow.js b/node_modules/sucrase/dist/parser/plugins/flow.js new file mode 100644 index 0000000..9401895 --- /dev/null +++ b/node_modules/sucrase/dist/parser/plugins/flow.js @@ -0,0 +1,1105 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});/* eslint max-len: 0 */ + + + + + + + + + + +var _index = require('../tokenizer/index'); +var _keywords = require('../tokenizer/keywords'); +var _types = require('../tokenizer/types'); +var _base = require('../traverser/base'); + + + + + + + + + + + + + +var _expression = require('../traverser/expression'); + + + + + + + + +var _statement = require('../traverser/statement'); + + + + + + + + + +var _util = require('../traverser/util'); + +function isMaybeDefaultImport(lookahead) { + return ( + (lookahead.type === _types.TokenType.name || !!(lookahead.type & _types.TokenType.IS_KEYWORD)) && + lookahead.contextualKeyword !== _keywords.ContextualKeyword._from + ); +} + +function flowParseTypeInitialiser(tok) { + const oldIsType = _index.pushTypeContext.call(void 0, 0); + _util.expect.call(void 0, tok || _types.TokenType.colon); + flowParseType(); + _index.popTypeContext.call(void 0, oldIsType); +} + +function flowParsePredicate() { + _util.expect.call(void 0, _types.TokenType.modulo); + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._checks); + if (_index.eat.call(void 0, _types.TokenType.parenL)) { + _expression.parseExpression.call(void 0, ); + _util.expect.call(void 0, _types.TokenType.parenR); + } +} + +function flowParseTypeAndPredicateInitialiser() { + const oldIsType = _index.pushTypeContext.call(void 0, 0); + _util.expect.call(void 0, _types.TokenType.colon); + if (_index.match.call(void 0, _types.TokenType.modulo)) { + flowParsePredicate(); + } else { + flowParseType(); + if (_index.match.call(void 0, _types.TokenType.modulo)) { + flowParsePredicate(); + } + } + _index.popTypeContext.call(void 0, oldIsType); +} + +function flowParseDeclareClass() { + _index.next.call(void 0, ); + flowParseInterfaceish(/* isClass */ true); +} + +function flowParseDeclareFunction() { + _index.next.call(void 0, ); + _expression.parseIdentifier.call(void 0, ); + + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + flowParseTypeParameterDeclaration(); + } + + _util.expect.call(void 0, _types.TokenType.parenL); + flowParseFunctionTypeParams(); + _util.expect.call(void 0, _types.TokenType.parenR); + + flowParseTypeAndPredicateInitialiser(); + + _util.semicolon.call(void 0, ); +} + +function flowParseDeclare() { + if (_index.match.call(void 0, _types.TokenType._class)) { + flowParseDeclareClass(); + } else if (_index.match.call(void 0, _types.TokenType._function)) { + flowParseDeclareFunction(); + } else if (_index.match.call(void 0, _types.TokenType._var)) { + flowParseDeclareVariable(); + } else if (_util.eatContextual.call(void 0, _keywords.ContextualKeyword._module)) { + if (_index.eat.call(void 0, _types.TokenType.dot)) { + flowParseDeclareModuleExports(); + } else { + flowParseDeclareModule(); + } + } else if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._type)) { + flowParseDeclareTypeAlias(); + } else if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._opaque)) { + flowParseDeclareOpaqueType(); + } else if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._interface)) { + flowParseDeclareInterface(); + } else if (_index.match.call(void 0, _types.TokenType._export)) { + flowParseDeclareExportDeclaration(); + } else { + _util.unexpected.call(void 0, ); + } +} + +function flowParseDeclareVariable() { + _index.next.call(void 0, ); + flowParseTypeAnnotatableIdentifier(); + _util.semicolon.call(void 0, ); +} + +function flowParseDeclareModule() { + if (_index.match.call(void 0, _types.TokenType.string)) { + _expression.parseExprAtom.call(void 0, ); + } else { + _expression.parseIdentifier.call(void 0, ); + } + + _util.expect.call(void 0, _types.TokenType.braceL); + while (!_index.match.call(void 0, _types.TokenType.braceR) && !_base.state.error) { + if (_index.match.call(void 0, _types.TokenType._import)) { + _index.next.call(void 0, ); + _statement.parseImport.call(void 0, ); + } else { + _util.unexpected.call(void 0, ); + } + } + _util.expect.call(void 0, _types.TokenType.braceR); +} + +function flowParseDeclareExportDeclaration() { + _util.expect.call(void 0, _types.TokenType._export); + + if (_index.eat.call(void 0, _types.TokenType._default)) { + if (_index.match.call(void 0, _types.TokenType._function) || _index.match.call(void 0, _types.TokenType._class)) { + // declare export default class ... + // declare export default function ... + flowParseDeclare(); + } else { + // declare export default [type]; + flowParseType(); + _util.semicolon.call(void 0, ); + } + } else if ( + _index.match.call(void 0, _types.TokenType._var) || // declare export var ... + _index.match.call(void 0, _types.TokenType._function) || // declare export function ... + _index.match.call(void 0, _types.TokenType._class) || // declare export class ... + _util.isContextual.call(void 0, _keywords.ContextualKeyword._opaque) // declare export opaque .. + ) { + flowParseDeclare(); + } else if ( + _index.match.call(void 0, _types.TokenType.star) || // declare export * from '' + _index.match.call(void 0, _types.TokenType.braceL) || // declare export {} ... + _util.isContextual.call(void 0, _keywords.ContextualKeyword._interface) || // declare export interface ... + _util.isContextual.call(void 0, _keywords.ContextualKeyword._type) || // declare export type ... + _util.isContextual.call(void 0, _keywords.ContextualKeyword._opaque) // declare export opaque type ... + ) { + _statement.parseExport.call(void 0, ); + } else { + _util.unexpected.call(void 0, ); + } +} + +function flowParseDeclareModuleExports() { + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._exports); + flowParseTypeAnnotation(); + _util.semicolon.call(void 0, ); +} + +function flowParseDeclareTypeAlias() { + _index.next.call(void 0, ); + flowParseTypeAlias(); +} + +function flowParseDeclareOpaqueType() { + _index.next.call(void 0, ); + flowParseOpaqueType(true); +} + +function flowParseDeclareInterface() { + _index.next.call(void 0, ); + flowParseInterfaceish(); +} + +// Interfaces + +function flowParseInterfaceish(isClass = false) { + flowParseRestrictedIdentifier(); + + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + flowParseTypeParameterDeclaration(); + } + + if (_index.eat.call(void 0, _types.TokenType._extends)) { + do { + flowParseInterfaceExtends(); + } while (!isClass && _index.eat.call(void 0, _types.TokenType.comma)); + } + + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._mixins)) { + _index.next.call(void 0, ); + do { + flowParseInterfaceExtends(); + } while (_index.eat.call(void 0, _types.TokenType.comma)); + } + + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._implements)) { + _index.next.call(void 0, ); + do { + flowParseInterfaceExtends(); + } while (_index.eat.call(void 0, _types.TokenType.comma)); + } + + flowParseObjectType(isClass, false, isClass); +} + +function flowParseInterfaceExtends() { + flowParseQualifiedTypeIdentifier(false); + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + flowParseTypeParameterInstantiation(); + } +} + +function flowParseInterface() { + flowParseInterfaceish(); +} + +function flowParseRestrictedIdentifier() { + _expression.parseIdentifier.call(void 0, ); +} + +function flowParseTypeAlias() { + flowParseRestrictedIdentifier(); + + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + flowParseTypeParameterDeclaration(); + } + + flowParseTypeInitialiser(_types.TokenType.eq); + _util.semicolon.call(void 0, ); +} + +function flowParseOpaqueType(declare) { + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._type); + flowParseRestrictedIdentifier(); + + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + flowParseTypeParameterDeclaration(); + } + + // Parse the supertype + if (_index.match.call(void 0, _types.TokenType.colon)) { + flowParseTypeInitialiser(_types.TokenType.colon); + } + + if (!declare) { + flowParseTypeInitialiser(_types.TokenType.eq); + } + _util.semicolon.call(void 0, ); +} + +function flowParseTypeParameter() { + flowParseVariance(); + flowParseTypeAnnotatableIdentifier(); + + if (_index.eat.call(void 0, _types.TokenType.eq)) { + flowParseType(); + } +} + + function flowParseTypeParameterDeclaration() { + const oldIsType = _index.pushTypeContext.call(void 0, 0); + // istanbul ignore else: this condition is already checked at all call sites + if (_index.match.call(void 0, _types.TokenType.lessThan) || _index.match.call(void 0, _types.TokenType.typeParameterStart)) { + _index.next.call(void 0, ); + } else { + _util.unexpected.call(void 0, ); + } + + do { + flowParseTypeParameter(); + if (!_index.match.call(void 0, _types.TokenType.greaterThan)) { + _util.expect.call(void 0, _types.TokenType.comma); + } + } while (!_index.match.call(void 0, _types.TokenType.greaterThan) && !_base.state.error); + _util.expect.call(void 0, _types.TokenType.greaterThan); + _index.popTypeContext.call(void 0, oldIsType); +} exports.flowParseTypeParameterDeclaration = flowParseTypeParameterDeclaration; + +function flowParseTypeParameterInstantiation() { + const oldIsType = _index.pushTypeContext.call(void 0, 0); + _util.expect.call(void 0, _types.TokenType.lessThan); + while (!_index.match.call(void 0, _types.TokenType.greaterThan) && !_base.state.error) { + flowParseType(); + if (!_index.match.call(void 0, _types.TokenType.greaterThan)) { + _util.expect.call(void 0, _types.TokenType.comma); + } + } + _util.expect.call(void 0, _types.TokenType.greaterThan); + _index.popTypeContext.call(void 0, oldIsType); +} + +function flowParseInterfaceType() { + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._interface); + if (_index.eat.call(void 0, _types.TokenType._extends)) { + do { + flowParseInterfaceExtends(); + } while (_index.eat.call(void 0, _types.TokenType.comma)); + } + flowParseObjectType(false, false, false); +} + +function flowParseObjectPropertyKey() { + if (_index.match.call(void 0, _types.TokenType.num) || _index.match.call(void 0, _types.TokenType.string)) { + _expression.parseExprAtom.call(void 0, ); + } else { + _expression.parseIdentifier.call(void 0, ); + } +} + +function flowParseObjectTypeIndexer() { + // Note: bracketL has already been consumed + if (_index.lookaheadType.call(void 0, ) === _types.TokenType.colon) { + flowParseObjectPropertyKey(); + flowParseTypeInitialiser(); + } else { + flowParseType(); + } + _util.expect.call(void 0, _types.TokenType.bracketR); + flowParseTypeInitialiser(); +} + +function flowParseObjectTypeInternalSlot() { + // Note: both bracketL have already been consumed + flowParseObjectPropertyKey(); + _util.expect.call(void 0, _types.TokenType.bracketR); + _util.expect.call(void 0, _types.TokenType.bracketR); + if (_index.match.call(void 0, _types.TokenType.lessThan) || _index.match.call(void 0, _types.TokenType.parenL)) { + flowParseObjectTypeMethodish(); + } else { + _index.eat.call(void 0, _types.TokenType.question); + flowParseTypeInitialiser(); + } +} + +function flowParseObjectTypeMethodish() { + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + flowParseTypeParameterDeclaration(); + } + + _util.expect.call(void 0, _types.TokenType.parenL); + while (!_index.match.call(void 0, _types.TokenType.parenR) && !_index.match.call(void 0, _types.TokenType.ellipsis) && !_base.state.error) { + flowParseFunctionTypeParam(); + if (!_index.match.call(void 0, _types.TokenType.parenR)) { + _util.expect.call(void 0, _types.TokenType.comma); + } + } + + if (_index.eat.call(void 0, _types.TokenType.ellipsis)) { + flowParseFunctionTypeParam(); + } + _util.expect.call(void 0, _types.TokenType.parenR); + flowParseTypeInitialiser(); +} + +function flowParseObjectTypeCallProperty() { + flowParseObjectTypeMethodish(); +} + +function flowParseObjectType(allowStatic, allowExact, allowProto) { + let endDelim; + if (allowExact && _index.match.call(void 0, _types.TokenType.braceBarL)) { + _util.expect.call(void 0, _types.TokenType.braceBarL); + endDelim = _types.TokenType.braceBarR; + } else { + _util.expect.call(void 0, _types.TokenType.braceL); + endDelim = _types.TokenType.braceR; + } + + while (!_index.match.call(void 0, endDelim) && !_base.state.error) { + if (allowProto && _util.isContextual.call(void 0, _keywords.ContextualKeyword._proto)) { + const lookahead = _index.lookaheadType.call(void 0, ); + if (lookahead !== _types.TokenType.colon && lookahead !== _types.TokenType.question) { + _index.next.call(void 0, ); + allowStatic = false; + } + } + if (allowStatic && _util.isContextual.call(void 0, _keywords.ContextualKeyword._static)) { + const lookahead = _index.lookaheadType.call(void 0, ); + if (lookahead !== _types.TokenType.colon && lookahead !== _types.TokenType.question) { + _index.next.call(void 0, ); + } + } + + flowParseVariance(); + + if (_index.eat.call(void 0, _types.TokenType.bracketL)) { + if (_index.eat.call(void 0, _types.TokenType.bracketL)) { + flowParseObjectTypeInternalSlot(); + } else { + flowParseObjectTypeIndexer(); + } + } else if (_index.match.call(void 0, _types.TokenType.parenL) || _index.match.call(void 0, _types.TokenType.lessThan)) { + flowParseObjectTypeCallProperty(); + } else { + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._get) || _util.isContextual.call(void 0, _keywords.ContextualKeyword._set)) { + const lookahead = _index.lookaheadType.call(void 0, ); + if (lookahead === _types.TokenType.name || lookahead === _types.TokenType.string || lookahead === _types.TokenType.num) { + _index.next.call(void 0, ); + } + } + + flowParseObjectTypeProperty(); + } + + flowObjectTypeSemicolon(); + } + + _util.expect.call(void 0, endDelim); +} + +function flowParseObjectTypeProperty() { + if (_index.match.call(void 0, _types.TokenType.ellipsis)) { + _util.expect.call(void 0, _types.TokenType.ellipsis); + if (!_index.eat.call(void 0, _types.TokenType.comma)) { + _index.eat.call(void 0, _types.TokenType.semi); + } + // Explicit inexact object syntax. + if (_index.match.call(void 0, _types.TokenType.braceR)) { + return; + } + flowParseType(); + } else { + flowParseObjectPropertyKey(); + if (_index.match.call(void 0, _types.TokenType.lessThan) || _index.match.call(void 0, _types.TokenType.parenL)) { + // This is a method property + flowParseObjectTypeMethodish(); + } else { + _index.eat.call(void 0, _types.TokenType.question); + flowParseTypeInitialiser(); + } + } +} + +function flowObjectTypeSemicolon() { + if (!_index.eat.call(void 0, _types.TokenType.semi) && !_index.eat.call(void 0, _types.TokenType.comma) && !_index.match.call(void 0, _types.TokenType.braceR) && !_index.match.call(void 0, _types.TokenType.braceBarR)) { + _util.unexpected.call(void 0, ); + } +} + +function flowParseQualifiedTypeIdentifier(initialIdAlreadyParsed) { + if (!initialIdAlreadyParsed) { + _expression.parseIdentifier.call(void 0, ); + } + while (_index.eat.call(void 0, _types.TokenType.dot)) { + _expression.parseIdentifier.call(void 0, ); + } +} + +function flowParseGenericType() { + flowParseQualifiedTypeIdentifier(true); + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + flowParseTypeParameterInstantiation(); + } +} + +function flowParseTypeofType() { + _util.expect.call(void 0, _types.TokenType._typeof); + flowParsePrimaryType(); +} + +function flowParseTupleType() { + _util.expect.call(void 0, _types.TokenType.bracketL); + // We allow trailing commas + while (_base.state.pos < _base.input.length && !_index.match.call(void 0, _types.TokenType.bracketR)) { + flowParseType(); + if (_index.match.call(void 0, _types.TokenType.bracketR)) { + break; + } + _util.expect.call(void 0, _types.TokenType.comma); + } + _util.expect.call(void 0, _types.TokenType.bracketR); +} + +function flowParseFunctionTypeParam() { + const lookahead = _index.lookaheadType.call(void 0, ); + if (lookahead === _types.TokenType.colon || lookahead === _types.TokenType.question) { + _expression.parseIdentifier.call(void 0, ); + _index.eat.call(void 0, _types.TokenType.question); + flowParseTypeInitialiser(); + } else { + flowParseType(); + } +} + +function flowParseFunctionTypeParams() { + while (!_index.match.call(void 0, _types.TokenType.parenR) && !_index.match.call(void 0, _types.TokenType.ellipsis) && !_base.state.error) { + flowParseFunctionTypeParam(); + if (!_index.match.call(void 0, _types.TokenType.parenR)) { + _util.expect.call(void 0, _types.TokenType.comma); + } + } + if (_index.eat.call(void 0, _types.TokenType.ellipsis)) { + flowParseFunctionTypeParam(); + } +} + +// The parsing of types roughly parallels the parsing of expressions, and +// primary types are kind of like primary expressions...they're the +// primitives with which other types are constructed. +function flowParsePrimaryType() { + let isGroupedType = false; + const oldNoAnonFunctionType = _base.state.noAnonFunctionType; + + switch (_base.state.type) { + case _types.TokenType.name: { + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._interface)) { + flowParseInterfaceType(); + return; + } + _expression.parseIdentifier.call(void 0, ); + flowParseGenericType(); + return; + } + + case _types.TokenType.braceL: + flowParseObjectType(false, false, false); + return; + + case _types.TokenType.braceBarL: + flowParseObjectType(false, true, false); + return; + + case _types.TokenType.bracketL: + flowParseTupleType(); + return; + + case _types.TokenType.lessThan: + flowParseTypeParameterDeclaration(); + _util.expect.call(void 0, _types.TokenType.parenL); + flowParseFunctionTypeParams(); + _util.expect.call(void 0, _types.TokenType.parenR); + _util.expect.call(void 0, _types.TokenType.arrow); + flowParseType(); + return; + + case _types.TokenType.parenL: + _index.next.call(void 0, ); + + // Check to see if this is actually a grouped type + if (!_index.match.call(void 0, _types.TokenType.parenR) && !_index.match.call(void 0, _types.TokenType.ellipsis)) { + if (_index.match.call(void 0, _types.TokenType.name)) { + const token = _index.lookaheadType.call(void 0, ); + isGroupedType = token !== _types.TokenType.question && token !== _types.TokenType.colon; + } else { + isGroupedType = true; + } + } + + if (isGroupedType) { + _base.state.noAnonFunctionType = false; + flowParseType(); + _base.state.noAnonFunctionType = oldNoAnonFunctionType; + + // A `,` or a `) =>` means this is an anonymous function type + if ( + _base.state.noAnonFunctionType || + !(_index.match.call(void 0, _types.TokenType.comma) || (_index.match.call(void 0, _types.TokenType.parenR) && _index.lookaheadType.call(void 0, ) === _types.TokenType.arrow)) + ) { + _util.expect.call(void 0, _types.TokenType.parenR); + return; + } else { + // Eat a comma if there is one + _index.eat.call(void 0, _types.TokenType.comma); + } + } + + flowParseFunctionTypeParams(); + + _util.expect.call(void 0, _types.TokenType.parenR); + _util.expect.call(void 0, _types.TokenType.arrow); + flowParseType(); + return; + + case _types.TokenType.minus: + _index.next.call(void 0, ); + _expression.parseLiteral.call(void 0, ); + return; + + case _types.TokenType.string: + case _types.TokenType.num: + case _types.TokenType._true: + case _types.TokenType._false: + case _types.TokenType._null: + case _types.TokenType._this: + case _types.TokenType._void: + case _types.TokenType.star: + _index.next.call(void 0, ); + return; + + default: + if (_base.state.type === _types.TokenType._typeof) { + flowParseTypeofType(); + return; + } else if (_base.state.type & _types.TokenType.IS_KEYWORD) { + _index.next.call(void 0, ); + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType.name; + return; + } + } + + _util.unexpected.call(void 0, ); +} + +function flowParsePostfixType() { + flowParsePrimaryType(); + while (!_util.canInsertSemicolon.call(void 0, ) && (_index.match.call(void 0, _types.TokenType.bracketL) || _index.match.call(void 0, _types.TokenType.questionDot))) { + _index.eat.call(void 0, _types.TokenType.questionDot); + _util.expect.call(void 0, _types.TokenType.bracketL); + if (_index.eat.call(void 0, _types.TokenType.bracketR)) { + // Array type + } else { + // Indexed access type + flowParseType(); + _util.expect.call(void 0, _types.TokenType.bracketR); + } + } +} + +function flowParsePrefixType() { + if (_index.eat.call(void 0, _types.TokenType.question)) { + flowParsePrefixType(); + } else { + flowParsePostfixType(); + } +} + +function flowParseAnonFunctionWithoutParens() { + flowParsePrefixType(); + if (!_base.state.noAnonFunctionType && _index.eat.call(void 0, _types.TokenType.arrow)) { + flowParseType(); + } +} + +function flowParseIntersectionType() { + _index.eat.call(void 0, _types.TokenType.bitwiseAND); + flowParseAnonFunctionWithoutParens(); + while (_index.eat.call(void 0, _types.TokenType.bitwiseAND)) { + flowParseAnonFunctionWithoutParens(); + } +} + +function flowParseUnionType() { + _index.eat.call(void 0, _types.TokenType.bitwiseOR); + flowParseIntersectionType(); + while (_index.eat.call(void 0, _types.TokenType.bitwiseOR)) { + flowParseIntersectionType(); + } +} + +function flowParseType() { + flowParseUnionType(); +} + + function flowParseTypeAnnotation() { + flowParseTypeInitialiser(); +} exports.flowParseTypeAnnotation = flowParseTypeAnnotation; + +function flowParseTypeAnnotatableIdentifier() { + _expression.parseIdentifier.call(void 0, ); + if (_index.match.call(void 0, _types.TokenType.colon)) { + flowParseTypeAnnotation(); + } +} + + function flowParseVariance() { + if (_index.match.call(void 0, _types.TokenType.plus) || _index.match.call(void 0, _types.TokenType.minus)) { + _index.next.call(void 0, ); + _base.state.tokens[_base.state.tokens.length - 1].isType = true; + } +} exports.flowParseVariance = flowParseVariance; + +// ================================== +// Overrides +// ================================== + + function flowParseFunctionBodyAndFinish(funcContextId) { + // For arrow functions, `parseArrow` handles the return type itself. + if (_index.match.call(void 0, _types.TokenType.colon)) { + flowParseTypeAndPredicateInitialiser(); + } + + _expression.parseFunctionBody.call(void 0, false, funcContextId); +} exports.flowParseFunctionBodyAndFinish = flowParseFunctionBodyAndFinish; + + function flowParseSubscript( + startTokenIndex, + noCalls, + stopState, +) { + if (_index.match.call(void 0, _types.TokenType.questionDot) && _index.lookaheadType.call(void 0, ) === _types.TokenType.lessThan) { + if (noCalls) { + stopState.stop = true; + return; + } + _index.next.call(void 0, ); + flowParseTypeParameterInstantiation(); + _util.expect.call(void 0, _types.TokenType.parenL); + _expression.parseCallExpressionArguments.call(void 0, ); + return; + } else if (!noCalls && _index.match.call(void 0, _types.TokenType.lessThan)) { + const snapshot = _base.state.snapshot(); + flowParseTypeParameterInstantiation(); + _util.expect.call(void 0, _types.TokenType.parenL); + _expression.parseCallExpressionArguments.call(void 0, ); + if (_base.state.error) { + _base.state.restoreFromSnapshot(snapshot); + } else { + return; + } + } + _expression.baseParseSubscript.call(void 0, startTokenIndex, noCalls, stopState); +} exports.flowParseSubscript = flowParseSubscript; + + function flowStartParseNewArguments() { + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + const snapshot = _base.state.snapshot(); + flowParseTypeParameterInstantiation(); + if (_base.state.error) { + _base.state.restoreFromSnapshot(snapshot); + } + } +} exports.flowStartParseNewArguments = flowStartParseNewArguments; + +// interfaces + function flowTryParseStatement() { + if (_index.match.call(void 0, _types.TokenType.name) && _base.state.contextualKeyword === _keywords.ContextualKeyword._interface) { + const oldIsType = _index.pushTypeContext.call(void 0, 0); + _index.next.call(void 0, ); + flowParseInterface(); + _index.popTypeContext.call(void 0, oldIsType); + return true; + } else if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._enum)) { + flowParseEnumDeclaration(); + return true; + } + return false; +} exports.flowTryParseStatement = flowTryParseStatement; + + function flowTryParseExportDefaultExpression() { + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._enum)) { + flowParseEnumDeclaration(); + return true; + } + return false; +} exports.flowTryParseExportDefaultExpression = flowTryParseExportDefaultExpression; + +// declares, interfaces and type aliases + function flowParseIdentifierStatement(contextualKeyword) { + if (contextualKeyword === _keywords.ContextualKeyword._declare) { + if ( + _index.match.call(void 0, _types.TokenType._class) || + _index.match.call(void 0, _types.TokenType.name) || + _index.match.call(void 0, _types.TokenType._function) || + _index.match.call(void 0, _types.TokenType._var) || + _index.match.call(void 0, _types.TokenType._export) + ) { + const oldIsType = _index.pushTypeContext.call(void 0, 1); + flowParseDeclare(); + _index.popTypeContext.call(void 0, oldIsType); + } + } else if (_index.match.call(void 0, _types.TokenType.name)) { + if (contextualKeyword === _keywords.ContextualKeyword._interface) { + const oldIsType = _index.pushTypeContext.call(void 0, 1); + flowParseInterface(); + _index.popTypeContext.call(void 0, oldIsType); + } else if (contextualKeyword === _keywords.ContextualKeyword._type) { + const oldIsType = _index.pushTypeContext.call(void 0, 1); + flowParseTypeAlias(); + _index.popTypeContext.call(void 0, oldIsType); + } else if (contextualKeyword === _keywords.ContextualKeyword._opaque) { + const oldIsType = _index.pushTypeContext.call(void 0, 1); + flowParseOpaqueType(false); + _index.popTypeContext.call(void 0, oldIsType); + } + } + _util.semicolon.call(void 0, ); +} exports.flowParseIdentifierStatement = flowParseIdentifierStatement; + +// export type + function flowShouldParseExportDeclaration() { + return ( + _util.isContextual.call(void 0, _keywords.ContextualKeyword._type) || + _util.isContextual.call(void 0, _keywords.ContextualKeyword._interface) || + _util.isContextual.call(void 0, _keywords.ContextualKeyword._opaque) || + _util.isContextual.call(void 0, _keywords.ContextualKeyword._enum) + ); +} exports.flowShouldParseExportDeclaration = flowShouldParseExportDeclaration; + + function flowShouldDisallowExportDefaultSpecifier() { + return ( + _index.match.call(void 0, _types.TokenType.name) && + (_base.state.contextualKeyword === _keywords.ContextualKeyword._type || + _base.state.contextualKeyword === _keywords.ContextualKeyword._interface || + _base.state.contextualKeyword === _keywords.ContextualKeyword._opaque || + _base.state.contextualKeyword === _keywords.ContextualKeyword._enum) + ); +} exports.flowShouldDisallowExportDefaultSpecifier = flowShouldDisallowExportDefaultSpecifier; + + function flowParseExportDeclaration() { + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._type)) { + const oldIsType = _index.pushTypeContext.call(void 0, 1); + _index.next.call(void 0, ); + + if (_index.match.call(void 0, _types.TokenType.braceL)) { + // export type { foo, bar }; + _statement.parseExportSpecifiers.call(void 0, ); + _statement.parseExportFrom.call(void 0, ); + } else { + // export type Foo = Bar; + flowParseTypeAlias(); + } + _index.popTypeContext.call(void 0, oldIsType); + } else if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._opaque)) { + const oldIsType = _index.pushTypeContext.call(void 0, 1); + _index.next.call(void 0, ); + // export opaque type Foo = Bar; + flowParseOpaqueType(false); + _index.popTypeContext.call(void 0, oldIsType); + } else if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._interface)) { + const oldIsType = _index.pushTypeContext.call(void 0, 1); + _index.next.call(void 0, ); + flowParseInterface(); + _index.popTypeContext.call(void 0, oldIsType); + } else { + _statement.parseStatement.call(void 0, true); + } +} exports.flowParseExportDeclaration = flowParseExportDeclaration; + + function flowShouldParseExportStar() { + return _index.match.call(void 0, _types.TokenType.star) || (_util.isContextual.call(void 0, _keywords.ContextualKeyword._type) && _index.lookaheadType.call(void 0, ) === _types.TokenType.star); +} exports.flowShouldParseExportStar = flowShouldParseExportStar; + + function flowParseExportStar() { + if (_util.eatContextual.call(void 0, _keywords.ContextualKeyword._type)) { + const oldIsType = _index.pushTypeContext.call(void 0, 2); + _statement.baseParseExportStar.call(void 0, ); + _index.popTypeContext.call(void 0, oldIsType); + } else { + _statement.baseParseExportStar.call(void 0, ); + } +} exports.flowParseExportStar = flowParseExportStar; + +// parse a the super class type parameters and implements + function flowAfterParseClassSuper(hasSuper) { + if (hasSuper && _index.match.call(void 0, _types.TokenType.lessThan)) { + flowParseTypeParameterInstantiation(); + } + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._implements)) { + const oldIsType = _index.pushTypeContext.call(void 0, 0); + _index.next.call(void 0, ); + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._implements; + do { + flowParseRestrictedIdentifier(); + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + flowParseTypeParameterInstantiation(); + } + } while (_index.eat.call(void 0, _types.TokenType.comma)); + _index.popTypeContext.call(void 0, oldIsType); + } +} exports.flowAfterParseClassSuper = flowAfterParseClassSuper; + +// parse type parameters for object method shorthand + function flowStartParseObjPropValue() { + // method shorthand + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + flowParseTypeParameterDeclaration(); + if (!_index.match.call(void 0, _types.TokenType.parenL)) _util.unexpected.call(void 0, ); + } +} exports.flowStartParseObjPropValue = flowStartParseObjPropValue; + + function flowParseAssignableListItemTypes() { + const oldIsType = _index.pushTypeContext.call(void 0, 0); + _index.eat.call(void 0, _types.TokenType.question); + if (_index.match.call(void 0, _types.TokenType.colon)) { + flowParseTypeAnnotation(); + } + _index.popTypeContext.call(void 0, oldIsType); +} exports.flowParseAssignableListItemTypes = flowParseAssignableListItemTypes; + +// parse typeof and type imports + function flowStartParseImportSpecifiers() { + if (_index.match.call(void 0, _types.TokenType._typeof) || _util.isContextual.call(void 0, _keywords.ContextualKeyword._type)) { + const lh = _index.lookaheadTypeAndKeyword.call(void 0, ); + if (isMaybeDefaultImport(lh) || lh.type === _types.TokenType.braceL || lh.type === _types.TokenType.star) { + _index.next.call(void 0, ); + } + } +} exports.flowStartParseImportSpecifiers = flowStartParseImportSpecifiers; + +// parse import-type/typeof shorthand + function flowParseImportSpecifier() { + const isTypeKeyword = + _base.state.contextualKeyword === _keywords.ContextualKeyword._type || _base.state.type === _types.TokenType._typeof; + if (isTypeKeyword) { + _index.next.call(void 0, ); + } else { + _expression.parseIdentifier.call(void 0, ); + } + + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._as) && !_util.isLookaheadContextual.call(void 0, _keywords.ContextualKeyword._as)) { + _expression.parseIdentifier.call(void 0, ); + if (isTypeKeyword && !_index.match.call(void 0, _types.TokenType.name) && !(_base.state.type & _types.TokenType.IS_KEYWORD)) { + // `import {type as ,` or `import {type as }` + } else { + // `import {type as foo` + _expression.parseIdentifier.call(void 0, ); + } + } else { + if (isTypeKeyword && (_index.match.call(void 0, _types.TokenType.name) || !!(_base.state.type & _types.TokenType.IS_KEYWORD))) { + // `import {type foo` + _expression.parseIdentifier.call(void 0, ); + } + if (_util.eatContextual.call(void 0, _keywords.ContextualKeyword._as)) { + _expression.parseIdentifier.call(void 0, ); + } + } +} exports.flowParseImportSpecifier = flowParseImportSpecifier; + +// parse function type parameters - function foo() {} + function flowStartParseFunctionParams() { + // Originally this checked if the method is a getter/setter, but if it was, we'd crash soon + // anyway, so don't try to propagate that information. + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + const oldIsType = _index.pushTypeContext.call(void 0, 0); + flowParseTypeParameterDeclaration(); + _index.popTypeContext.call(void 0, oldIsType); + } +} exports.flowStartParseFunctionParams = flowStartParseFunctionParams; + +// parse flow type annotations on variable declarator heads - let foo: string = bar + function flowAfterParseVarHead() { + if (_index.match.call(void 0, _types.TokenType.colon)) { + flowParseTypeAnnotation(); + } +} exports.flowAfterParseVarHead = flowAfterParseVarHead; + +// parse the return type of an async arrow function - let foo = (async (): number => {}); + function flowStartParseAsyncArrowFromCallExpression() { + if (_index.match.call(void 0, _types.TokenType.colon)) { + const oldNoAnonFunctionType = _base.state.noAnonFunctionType; + _base.state.noAnonFunctionType = true; + flowParseTypeAnnotation(); + _base.state.noAnonFunctionType = oldNoAnonFunctionType; + } +} exports.flowStartParseAsyncArrowFromCallExpression = flowStartParseAsyncArrowFromCallExpression; + +// We need to support type parameter declarations for arrow functions. This +// is tricky. There are three situations we need to handle +// +// 1. This is either JSX or an arrow function. We'll try JSX first. If that +// fails, we'll try an arrow function. If that fails, we'll throw the JSX +// error. +// 2. This is an arrow function. We'll parse the type parameter declaration, +// parse the rest, make sure the rest is an arrow function, and go from +// there +// 3. This is neither. Just call the super method + function flowParseMaybeAssign(noIn, isWithinParens) { + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + const snapshot = _base.state.snapshot(); + let wasArrow = _expression.baseParseMaybeAssign.call(void 0, noIn, isWithinParens); + if (_base.state.error) { + _base.state.restoreFromSnapshot(snapshot); + _base.state.type = _types.TokenType.typeParameterStart; + } else { + return wasArrow; + } + + const oldIsType = _index.pushTypeContext.call(void 0, 0); + flowParseTypeParameterDeclaration(); + _index.popTypeContext.call(void 0, oldIsType); + wasArrow = _expression.baseParseMaybeAssign.call(void 0, noIn, isWithinParens); + if (wasArrow) { + return true; + } + _util.unexpected.call(void 0, ); + } + + return _expression.baseParseMaybeAssign.call(void 0, noIn, isWithinParens); +} exports.flowParseMaybeAssign = flowParseMaybeAssign; + +// handle return types for arrow functions + function flowParseArrow() { + if (_index.match.call(void 0, _types.TokenType.colon)) { + const oldIsType = _index.pushTypeContext.call(void 0, 0); + const snapshot = _base.state.snapshot(); + + const oldNoAnonFunctionType = _base.state.noAnonFunctionType; + _base.state.noAnonFunctionType = true; + flowParseTypeAndPredicateInitialiser(); + _base.state.noAnonFunctionType = oldNoAnonFunctionType; + + if (_util.canInsertSemicolon.call(void 0, )) _util.unexpected.call(void 0, ); + if (!_index.match.call(void 0, _types.TokenType.arrow)) _util.unexpected.call(void 0, ); + + if (_base.state.error) { + _base.state.restoreFromSnapshot(snapshot); + } + _index.popTypeContext.call(void 0, oldIsType); + } + return _index.eat.call(void 0, _types.TokenType.arrow); +} exports.flowParseArrow = flowParseArrow; + + function flowParseSubscripts(startTokenIndex, noCalls = false) { + if ( + _base.state.tokens[_base.state.tokens.length - 1].contextualKeyword === _keywords.ContextualKeyword._async && + _index.match.call(void 0, _types.TokenType.lessThan) + ) { + const snapshot = _base.state.snapshot(); + const wasArrow = parseAsyncArrowWithTypeParameters(); + if (wasArrow && !_base.state.error) { + return; + } + _base.state.restoreFromSnapshot(snapshot); + } + + _expression.baseParseSubscripts.call(void 0, startTokenIndex, noCalls); +} exports.flowParseSubscripts = flowParseSubscripts; + +// Returns true if there was an arrow function here. +function parseAsyncArrowWithTypeParameters() { + _base.state.scopeDepth++; + const startTokenIndex = _base.state.tokens.length; + _statement.parseFunctionParams.call(void 0, ); + if (!_expression.parseArrow.call(void 0, )) { + return false; + } + _expression.parseArrowExpression.call(void 0, startTokenIndex); + return true; +} + +function flowParseEnumDeclaration() { + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._enum); + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._enum; + _expression.parseIdentifier.call(void 0, ); + flowParseEnumBody(); +} + +function flowParseEnumBody() { + if (_util.eatContextual.call(void 0, _keywords.ContextualKeyword._of)) { + _index.next.call(void 0, ); + } + _util.expect.call(void 0, _types.TokenType.braceL); + flowParseEnumMembers(); + _util.expect.call(void 0, _types.TokenType.braceR); +} + +function flowParseEnumMembers() { + while (!_index.match.call(void 0, _types.TokenType.braceR) && !_base.state.error) { + if (_index.eat.call(void 0, _types.TokenType.ellipsis)) { + break; + } + flowParseEnumMember(); + if (!_index.match.call(void 0, _types.TokenType.braceR)) { + _util.expect.call(void 0, _types.TokenType.comma); + } + } +} + +function flowParseEnumMember() { + _expression.parseIdentifier.call(void 0, ); + if (_index.eat.call(void 0, _types.TokenType.eq)) { + // Flow enum values are always just one token (a string, number, or boolean literal). + _index.next.call(void 0, ); + } +} diff --git a/node_modules/sucrase/dist/parser/plugins/jsx/index.js b/node_modules/sucrase/dist/parser/plugins/jsx/index.js new file mode 100644 index 0000000..41797de --- /dev/null +++ b/node_modules/sucrase/dist/parser/plugins/jsx/index.js @@ -0,0 +1,367 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); + + + + + + + + + +var _index = require('../../tokenizer/index'); +var _types = require('../../tokenizer/types'); +var _base = require('../../traverser/base'); +var _expression = require('../../traverser/expression'); +var _util = require('../../traverser/util'); +var _charcodes = require('../../util/charcodes'); +var _identifier = require('../../util/identifier'); +var _typescript = require('../typescript'); + +/** + * Read token with JSX contents. + * + * In addition to detecting jsxTagStart and also regular tokens that might be + * part of an expression, this code detects the start and end of text ranges + * within JSX children. In order to properly count the number of children, we + * distinguish jsxText from jsxEmptyText, which is a text range that simplifies + * to the empty string after JSX whitespace trimming. + * + * It turns out that a JSX text range will simplify to the empty string if and + * only if both of these conditions hold: + * - The range consists entirely of whitespace characters (only counting space, + * tab, \r, and \n). + * - The range has at least one newline. + * This can be proven by analyzing any implementation of whitespace trimming, + * e.g. formatJSXTextLiteral in Sucrase or cleanJSXElementLiteralChild in Babel. + */ +function jsxReadToken() { + let sawNewline = false; + let sawNonWhitespace = false; + while (true) { + if (_base.state.pos >= _base.input.length) { + _util.unexpected.call(void 0, "Unterminated JSX contents"); + return; + } + + const ch = _base.input.charCodeAt(_base.state.pos); + if (ch === _charcodes.charCodes.lessThan || ch === _charcodes.charCodes.leftCurlyBrace) { + if (_base.state.pos === _base.state.start) { + if (ch === _charcodes.charCodes.lessThan) { + _base.state.pos++; + _index.finishToken.call(void 0, _types.TokenType.jsxTagStart); + return; + } + _index.getTokenFromCode.call(void 0, ch); + return; + } + if (sawNewline && !sawNonWhitespace) { + _index.finishToken.call(void 0, _types.TokenType.jsxEmptyText); + } else { + _index.finishToken.call(void 0, _types.TokenType.jsxText); + } + return; + } + + // This is part of JSX text. + if (ch === _charcodes.charCodes.lineFeed) { + sawNewline = true; + } else if (ch !== _charcodes.charCodes.space && ch !== _charcodes.charCodes.carriageReturn && ch !== _charcodes.charCodes.tab) { + sawNonWhitespace = true; + } + _base.state.pos++; + } +} + +function jsxReadString(quote) { + _base.state.pos++; + for (;;) { + if (_base.state.pos >= _base.input.length) { + _util.unexpected.call(void 0, "Unterminated string constant"); + return; + } + + const ch = _base.input.charCodeAt(_base.state.pos); + if (ch === quote) { + _base.state.pos++; + break; + } + _base.state.pos++; + } + _index.finishToken.call(void 0, _types.TokenType.string); +} + +// Read a JSX identifier (valid tag or attribute name). +// +// Optimized version since JSX identifiers can't contain +// escape characters and so can be read as single slice. +// Also assumes that first character was already checked +// by isIdentifierStart in readToken. + +function jsxReadWord() { + let ch; + do { + if (_base.state.pos > _base.input.length) { + _util.unexpected.call(void 0, "Unexpectedly reached the end of input."); + return; + } + ch = _base.input.charCodeAt(++_base.state.pos); + } while (_identifier.IS_IDENTIFIER_CHAR[ch] || ch === _charcodes.charCodes.dash); + _index.finishToken.call(void 0, _types.TokenType.jsxName); +} + +// Parse next token as JSX identifier +function jsxParseIdentifier() { + nextJSXTagToken(); +} + +// Parse namespaced identifier. +function jsxParseNamespacedName(identifierRole) { + jsxParseIdentifier(); + if (!_index.eat.call(void 0, _types.TokenType.colon)) { + // Plain identifier, so this is an access. + _base.state.tokens[_base.state.tokens.length - 1].identifierRole = identifierRole; + return; + } + // Process the second half of the namespaced name. + jsxParseIdentifier(); +} + +// Parses element name in any form - namespaced, member +// or single identifier. +function jsxParseElementName() { + const firstTokenIndex = _base.state.tokens.length; + jsxParseNamespacedName(_index.IdentifierRole.Access); + let hadDot = false; + while (_index.match.call(void 0, _types.TokenType.dot)) { + hadDot = true; + nextJSXTagToken(); + jsxParseIdentifier(); + } + // For tags like
with a lowercase letter and no dots, the name is + // actually *not* an identifier access, since it's referring to a built-in + // tag name. Remove the identifier role in this case so that it's not + // accidentally transformed by the imports transform when preserving JSX. + if (!hadDot) { + const firstToken = _base.state.tokens[firstTokenIndex]; + const firstChar = _base.input.charCodeAt(firstToken.start); + if (firstChar >= _charcodes.charCodes.lowercaseA && firstChar <= _charcodes.charCodes.lowercaseZ) { + firstToken.identifierRole = null; + } + } +} + +// Parses any type of JSX attribute value. +function jsxParseAttributeValue() { + switch (_base.state.type) { + case _types.TokenType.braceL: + _index.next.call(void 0, ); + _expression.parseExpression.call(void 0, ); + nextJSXTagToken(); + return; + + case _types.TokenType.jsxTagStart: + jsxParseElement(); + nextJSXTagToken(); + return; + + case _types.TokenType.string: + nextJSXTagToken(); + return; + + default: + _util.unexpected.call(void 0, "JSX value should be either an expression or a quoted JSX text"); + } +} + +// Parse JSX spread child, after already processing the { +// Does not parse the closing } +function jsxParseSpreadChild() { + _util.expect.call(void 0, _types.TokenType.ellipsis); + _expression.parseExpression.call(void 0, ); +} + +// Parses JSX opening tag starting after "<". +// Returns true if the tag was self-closing. +// Does not parse the last token. +function jsxParseOpeningElement(initialTokenIndex) { + if (_index.match.call(void 0, _types.TokenType.jsxTagEnd)) { + // This is an open-fragment. + return false; + } + jsxParseElementName(); + if (_base.isTypeScriptEnabled) { + _typescript.tsTryParseJSXTypeArgument.call(void 0, ); + } + let hasSeenPropSpread = false; + while (!_index.match.call(void 0, _types.TokenType.slash) && !_index.match.call(void 0, _types.TokenType.jsxTagEnd) && !_base.state.error) { + if (_index.eat.call(void 0, _types.TokenType.braceL)) { + hasSeenPropSpread = true; + _util.expect.call(void 0, _types.TokenType.ellipsis); + _expression.parseMaybeAssign.call(void 0, ); + // } + nextJSXTagToken(); + continue; + } + if ( + hasSeenPropSpread && + _base.state.end - _base.state.start === 3 && + _base.input.charCodeAt(_base.state.start) === _charcodes.charCodes.lowercaseK && + _base.input.charCodeAt(_base.state.start + 1) === _charcodes.charCodes.lowercaseE && + _base.input.charCodeAt(_base.state.start + 2) === _charcodes.charCodes.lowercaseY + ) { + _base.state.tokens[initialTokenIndex].jsxRole = _index.JSXRole.KeyAfterPropSpread; + } + jsxParseNamespacedName(_index.IdentifierRole.ObjectKey); + if (_index.match.call(void 0, _types.TokenType.eq)) { + nextJSXTagToken(); + jsxParseAttributeValue(); + } + } + const isSelfClosing = _index.match.call(void 0, _types.TokenType.slash); + if (isSelfClosing) { + // / + nextJSXTagToken(); + } + return isSelfClosing; +} + +// Parses JSX closing tag starting after " 1) { + _base.state.tokens[initialTokenIndex].jsxRole = _index.JSXRole.StaticChildren; + } + } + return; + } + numExplicitChildren++; + jsxParseElementAt(); + nextJSXExprToken(); + break; + + case _types.TokenType.jsxText: + numExplicitChildren++; + nextJSXExprToken(); + break; + + case _types.TokenType.jsxEmptyText: + nextJSXExprToken(); + break; + + case _types.TokenType.braceL: + _index.next.call(void 0, ); + if (_index.match.call(void 0, _types.TokenType.ellipsis)) { + jsxParseSpreadChild(); + nextJSXExprToken(); + // Spread children are a mechanism to explicitly mark children as + // static, so count it as 2 children to satisfy the "more than one + // child" condition. + numExplicitChildren += 2; + } else { + // If we see {}, this is an empty pseudo-expression that doesn't + // count as a child. + if (!_index.match.call(void 0, _types.TokenType.braceR)) { + numExplicitChildren++; + _expression.parseExpression.call(void 0, ); + } + nextJSXExprToken(); + } + + break; + + // istanbul ignore next - should never happen + default: + _util.unexpected.call(void 0, ); + return; + } + } + } +} + +// Parses entire JSX element from current position. +// Does not parse the last token. + function jsxParseElement() { + nextJSXTagToken(); + jsxParseElementAt(); +} exports.jsxParseElement = jsxParseElement; + +// ================================== +// Overrides +// ================================== + + function nextJSXTagToken() { + _base.state.tokens.push(new (0, _index.Token)()); + _index.skipSpace.call(void 0, ); + _base.state.start = _base.state.pos; + const code = _base.input.charCodeAt(_base.state.pos); + + if (_identifier.IS_IDENTIFIER_START[code]) { + jsxReadWord(); + } else if (code === _charcodes.charCodes.quotationMark || code === _charcodes.charCodes.apostrophe) { + jsxReadString(code); + } else { + // The following tokens are just one character each. + ++_base.state.pos; + switch (code) { + case _charcodes.charCodes.greaterThan: + _index.finishToken.call(void 0, _types.TokenType.jsxTagEnd); + break; + case _charcodes.charCodes.lessThan: + _index.finishToken.call(void 0, _types.TokenType.jsxTagStart); + break; + case _charcodes.charCodes.slash: + _index.finishToken.call(void 0, _types.TokenType.slash); + break; + case _charcodes.charCodes.equalsTo: + _index.finishToken.call(void 0, _types.TokenType.eq); + break; + case _charcodes.charCodes.leftCurlyBrace: + _index.finishToken.call(void 0, _types.TokenType.braceL); + break; + case _charcodes.charCodes.dot: + _index.finishToken.call(void 0, _types.TokenType.dot); + break; + case _charcodes.charCodes.colon: + _index.finishToken.call(void 0, _types.TokenType.colon); + break; + default: + _util.unexpected.call(void 0, ); + } + } +} exports.nextJSXTagToken = nextJSXTagToken; + +function nextJSXExprToken() { + _base.state.tokens.push(new (0, _index.Token)()); + _base.state.start = _base.state.pos; + jsxReadToken(); +} diff --git a/node_modules/sucrase/dist/parser/plugins/jsx/xhtml.js b/node_modules/sucrase/dist/parser/plugins/jsx/xhtml.js new file mode 100644 index 0000000..d8e91c5 --- /dev/null +++ b/node_modules/sucrase/dist/parser/plugins/jsx/xhtml.js @@ -0,0 +1,256 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});// Use a Map rather than object to avoid unexpected __proto__ access. +exports. default = new Map([ + ["quot", "\u0022"], + ["amp", "&"], + ["apos", "\u0027"], + ["lt", "<"], + ["gt", ">"], + ["nbsp", "\u00A0"], + ["iexcl", "\u00A1"], + ["cent", "\u00A2"], + ["pound", "\u00A3"], + ["curren", "\u00A4"], + ["yen", "\u00A5"], + ["brvbar", "\u00A6"], + ["sect", "\u00A7"], + ["uml", "\u00A8"], + ["copy", "\u00A9"], + ["ordf", "\u00AA"], + ["laquo", "\u00AB"], + ["not", "\u00AC"], + ["shy", "\u00AD"], + ["reg", "\u00AE"], + ["macr", "\u00AF"], + ["deg", "\u00B0"], + ["plusmn", "\u00B1"], + ["sup2", "\u00B2"], + ["sup3", "\u00B3"], + ["acute", "\u00B4"], + ["micro", "\u00B5"], + ["para", "\u00B6"], + ["middot", "\u00B7"], + ["cedil", "\u00B8"], + ["sup1", "\u00B9"], + ["ordm", "\u00BA"], + ["raquo", "\u00BB"], + ["frac14", "\u00BC"], + ["frac12", "\u00BD"], + ["frac34", "\u00BE"], + ["iquest", "\u00BF"], + ["Agrave", "\u00C0"], + ["Aacute", "\u00C1"], + ["Acirc", "\u00C2"], + ["Atilde", "\u00C3"], + ["Auml", "\u00C4"], + ["Aring", "\u00C5"], + ["AElig", "\u00C6"], + ["Ccedil", "\u00C7"], + ["Egrave", "\u00C8"], + ["Eacute", "\u00C9"], + ["Ecirc", "\u00CA"], + ["Euml", "\u00CB"], + ["Igrave", "\u00CC"], + ["Iacute", "\u00CD"], + ["Icirc", "\u00CE"], + ["Iuml", "\u00CF"], + ["ETH", "\u00D0"], + ["Ntilde", "\u00D1"], + ["Ograve", "\u00D2"], + ["Oacute", "\u00D3"], + ["Ocirc", "\u00D4"], + ["Otilde", "\u00D5"], + ["Ouml", "\u00D6"], + ["times", "\u00D7"], + ["Oslash", "\u00D8"], + ["Ugrave", "\u00D9"], + ["Uacute", "\u00DA"], + ["Ucirc", "\u00DB"], + ["Uuml", "\u00DC"], + ["Yacute", "\u00DD"], + ["THORN", "\u00DE"], + ["szlig", "\u00DF"], + ["agrave", "\u00E0"], + ["aacute", "\u00E1"], + ["acirc", "\u00E2"], + ["atilde", "\u00E3"], + ["auml", "\u00E4"], + ["aring", "\u00E5"], + ["aelig", "\u00E6"], + ["ccedil", "\u00E7"], + ["egrave", "\u00E8"], + ["eacute", "\u00E9"], + ["ecirc", "\u00EA"], + ["euml", "\u00EB"], + ["igrave", "\u00EC"], + ["iacute", "\u00ED"], + ["icirc", "\u00EE"], + ["iuml", "\u00EF"], + ["eth", "\u00F0"], + ["ntilde", "\u00F1"], + ["ograve", "\u00F2"], + ["oacute", "\u00F3"], + ["ocirc", "\u00F4"], + ["otilde", "\u00F5"], + ["ouml", "\u00F6"], + ["divide", "\u00F7"], + ["oslash", "\u00F8"], + ["ugrave", "\u00F9"], + ["uacute", "\u00FA"], + ["ucirc", "\u00FB"], + ["uuml", "\u00FC"], + ["yacute", "\u00FD"], + ["thorn", "\u00FE"], + ["yuml", "\u00FF"], + ["OElig", "\u0152"], + ["oelig", "\u0153"], + ["Scaron", "\u0160"], + ["scaron", "\u0161"], + ["Yuml", "\u0178"], + ["fnof", "\u0192"], + ["circ", "\u02C6"], + ["tilde", "\u02DC"], + ["Alpha", "\u0391"], + ["Beta", "\u0392"], + ["Gamma", "\u0393"], + ["Delta", "\u0394"], + ["Epsilon", "\u0395"], + ["Zeta", "\u0396"], + ["Eta", "\u0397"], + ["Theta", "\u0398"], + ["Iota", "\u0399"], + ["Kappa", "\u039A"], + ["Lambda", "\u039B"], + ["Mu", "\u039C"], + ["Nu", "\u039D"], + ["Xi", "\u039E"], + ["Omicron", "\u039F"], + ["Pi", "\u03A0"], + ["Rho", "\u03A1"], + ["Sigma", "\u03A3"], + ["Tau", "\u03A4"], + ["Upsilon", "\u03A5"], + ["Phi", "\u03A6"], + ["Chi", "\u03A7"], + ["Psi", "\u03A8"], + ["Omega", "\u03A9"], + ["alpha", "\u03B1"], + ["beta", "\u03B2"], + ["gamma", "\u03B3"], + ["delta", "\u03B4"], + ["epsilon", "\u03B5"], + ["zeta", "\u03B6"], + ["eta", "\u03B7"], + ["theta", "\u03B8"], + ["iota", "\u03B9"], + ["kappa", "\u03BA"], + ["lambda", "\u03BB"], + ["mu", "\u03BC"], + ["nu", "\u03BD"], + ["xi", "\u03BE"], + ["omicron", "\u03BF"], + ["pi", "\u03C0"], + ["rho", "\u03C1"], + ["sigmaf", "\u03C2"], + ["sigma", "\u03C3"], + ["tau", "\u03C4"], + ["upsilon", "\u03C5"], + ["phi", "\u03C6"], + ["chi", "\u03C7"], + ["psi", "\u03C8"], + ["omega", "\u03C9"], + ["thetasym", "\u03D1"], + ["upsih", "\u03D2"], + ["piv", "\u03D6"], + ["ensp", "\u2002"], + ["emsp", "\u2003"], + ["thinsp", "\u2009"], + ["zwnj", "\u200C"], + ["zwj", "\u200D"], + ["lrm", "\u200E"], + ["rlm", "\u200F"], + ["ndash", "\u2013"], + ["mdash", "\u2014"], + ["lsquo", "\u2018"], + ["rsquo", "\u2019"], + ["sbquo", "\u201A"], + ["ldquo", "\u201C"], + ["rdquo", "\u201D"], + ["bdquo", "\u201E"], + ["dagger", "\u2020"], + ["Dagger", "\u2021"], + ["bull", "\u2022"], + ["hellip", "\u2026"], + ["permil", "\u2030"], + ["prime", "\u2032"], + ["Prime", "\u2033"], + ["lsaquo", "\u2039"], + ["rsaquo", "\u203A"], + ["oline", "\u203E"], + ["frasl", "\u2044"], + ["euro", "\u20AC"], + ["image", "\u2111"], + ["weierp", "\u2118"], + ["real", "\u211C"], + ["trade", "\u2122"], + ["alefsym", "\u2135"], + ["larr", "\u2190"], + ["uarr", "\u2191"], + ["rarr", "\u2192"], + ["darr", "\u2193"], + ["harr", "\u2194"], + ["crarr", "\u21B5"], + ["lArr", "\u21D0"], + ["uArr", "\u21D1"], + ["rArr", "\u21D2"], + ["dArr", "\u21D3"], + ["hArr", "\u21D4"], + ["forall", "\u2200"], + ["part", "\u2202"], + ["exist", "\u2203"], + ["empty", "\u2205"], + ["nabla", "\u2207"], + ["isin", "\u2208"], + ["notin", "\u2209"], + ["ni", "\u220B"], + ["prod", "\u220F"], + ["sum", "\u2211"], + ["minus", "\u2212"], + ["lowast", "\u2217"], + ["radic", "\u221A"], + ["prop", "\u221D"], + ["infin", "\u221E"], + ["ang", "\u2220"], + ["and", "\u2227"], + ["or", "\u2228"], + ["cap", "\u2229"], + ["cup", "\u222A"], + ["int", "\u222B"], + ["there4", "\u2234"], + ["sim", "\u223C"], + ["cong", "\u2245"], + ["asymp", "\u2248"], + ["ne", "\u2260"], + ["equiv", "\u2261"], + ["le", "\u2264"], + ["ge", "\u2265"], + ["sub", "\u2282"], + ["sup", "\u2283"], + ["nsub", "\u2284"], + ["sube", "\u2286"], + ["supe", "\u2287"], + ["oplus", "\u2295"], + ["otimes", "\u2297"], + ["perp", "\u22A5"], + ["sdot", "\u22C5"], + ["lceil", "\u2308"], + ["rceil", "\u2309"], + ["lfloor", "\u230A"], + ["rfloor", "\u230B"], + ["lang", "\u2329"], + ["rang", "\u232A"], + ["loz", "\u25CA"], + ["spades", "\u2660"], + ["clubs", "\u2663"], + ["hearts", "\u2665"], + ["diams", "\u2666"], +]); diff --git a/node_modules/sucrase/dist/parser/plugins/types.js b/node_modules/sucrase/dist/parser/plugins/types.js new file mode 100644 index 0000000..c892994 --- /dev/null +++ b/node_modules/sucrase/dist/parser/plugins/types.js @@ -0,0 +1,37 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _index = require('../tokenizer/index'); +var _types = require('../tokenizer/types'); +var _base = require('../traverser/base'); +var _expression = require('../traverser/expression'); +var _flow = require('./flow'); +var _typescript = require('./typescript'); + +/** + * Common parser code for TypeScript and Flow. + */ + +// An apparent conditional expression could actually be an optional parameter in an arrow function. + function typedParseConditional(noIn) { + // If we see ?:, this can't possibly be a valid conditional. typedParseParenItem will be called + // later to finish off the arrow parameter. We also need to handle bare ? tokens for optional + // parameters without type annotations, i.e. ?, and ?) . + if (_index.match.call(void 0, _types.TokenType.question)) { + const nextType = _index.lookaheadType.call(void 0, ); + if (nextType === _types.TokenType.colon || nextType === _types.TokenType.comma || nextType === _types.TokenType.parenR) { + return; + } + } + _expression.baseParseConditional.call(void 0, noIn); +} exports.typedParseConditional = typedParseConditional; + +// Note: These "type casts" are *not* valid TS expressions. +// But we parse them here and change them when completing the arrow function. + function typedParseParenItem() { + _index.eatTypeToken.call(void 0, _types.TokenType.question); + if (_index.match.call(void 0, _types.TokenType.colon)) { + if (_base.isTypeScriptEnabled) { + _typescript.tsParseTypeAnnotation.call(void 0, ); + } else if (_base.isFlowEnabled) { + _flow.flowParseTypeAnnotation.call(void 0, ); + } + } +} exports.typedParseParenItem = typedParseParenItem; diff --git a/node_modules/sucrase/dist/parser/plugins/typescript.js b/node_modules/sucrase/dist/parser/plugins/typescript.js new file mode 100644 index 0000000..d1ec6d3 --- /dev/null +++ b/node_modules/sucrase/dist/parser/plugins/typescript.js @@ -0,0 +1,1632 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); + + + + + + + + + + + +var _index = require('../tokenizer/index'); +var _keywords = require('../tokenizer/keywords'); +var _types = require('../tokenizer/types'); +var _base = require('../traverser/base'); + + + + + + + + + + + + + + + +var _expression = require('../traverser/expression'); +var _lval = require('../traverser/lval'); + + + + + + + + +var _statement = require('../traverser/statement'); + + + + + + + + + + + +var _util = require('../traverser/util'); +var _jsx = require('./jsx'); + +function tsIsIdentifier() { + // TODO: actually a bit more complex in TypeScript, but shouldn't matter. + // See https://github.com/Microsoft/TypeScript/issues/15008 + return _index.match.call(void 0, _types.TokenType.name); +} + +function isLiteralPropertyName() { + return ( + _index.match.call(void 0, _types.TokenType.name) || + Boolean(_base.state.type & _types.TokenType.IS_KEYWORD) || + _index.match.call(void 0, _types.TokenType.string) || + _index.match.call(void 0, _types.TokenType.num) || + _index.match.call(void 0, _types.TokenType.bigint) || + _index.match.call(void 0, _types.TokenType.decimal) + ); +} + +function tsNextTokenCanFollowModifier() { + // Note: TypeScript's implementation is much more complicated because + // more things are considered modifiers there. + // This implementation only handles modifiers not handled by babylon itself. And "static". + // TODO: Would be nice to avoid lookahead. Want a hasLineBreakUpNext() method... + const snapshot = _base.state.snapshot(); + + _index.next.call(void 0, ); + const canFollowModifier = + (_index.match.call(void 0, _types.TokenType.bracketL) || + _index.match.call(void 0, _types.TokenType.braceL) || + _index.match.call(void 0, _types.TokenType.star) || + _index.match.call(void 0, _types.TokenType.ellipsis) || + _index.match.call(void 0, _types.TokenType.hash) || + isLiteralPropertyName()) && + !_util.hasPrecedingLineBreak.call(void 0, ); + + if (canFollowModifier) { + return true; + } else { + _base.state.restoreFromSnapshot(snapshot); + return false; + } +} + + function tsParseModifiers(allowedModifiers) { + while (true) { + const modifier = tsParseModifier(allowedModifiers); + if (modifier === null) { + break; + } + } +} exports.tsParseModifiers = tsParseModifiers; + +/** Parses a modifier matching one the given modifier names. */ + function tsParseModifier( + allowedModifiers, +) { + if (!_index.match.call(void 0, _types.TokenType.name)) { + return null; + } + + const modifier = _base.state.contextualKeyword; + if (allowedModifiers.indexOf(modifier) !== -1 && tsNextTokenCanFollowModifier()) { + switch (modifier) { + case _keywords.ContextualKeyword._readonly: + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._readonly; + break; + case _keywords.ContextualKeyword._abstract: + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._abstract; + break; + case _keywords.ContextualKeyword._static: + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._static; + break; + case _keywords.ContextualKeyword._public: + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._public; + break; + case _keywords.ContextualKeyword._private: + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._private; + break; + case _keywords.ContextualKeyword._protected: + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._protected; + break; + case _keywords.ContextualKeyword._override: + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._override; + break; + case _keywords.ContextualKeyword._declare: + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._declare; + break; + default: + break; + } + return modifier; + } + return null; +} exports.tsParseModifier = tsParseModifier; + +function tsParseEntityName() { + _expression.parseIdentifier.call(void 0, ); + while (_index.eat.call(void 0, _types.TokenType.dot)) { + _expression.parseIdentifier.call(void 0, ); + } +} + +function tsParseTypeReference() { + tsParseEntityName(); + if (!_util.hasPrecedingLineBreak.call(void 0, ) && _index.match.call(void 0, _types.TokenType.lessThan)) { + tsParseTypeArguments(); + } +} + +function tsParseThisTypePredicate() { + _index.next.call(void 0, ); + tsParseTypeAnnotation(); +} + +function tsParseThisTypeNode() { + _index.next.call(void 0, ); +} + +function tsParseTypeQuery() { + _util.expect.call(void 0, _types.TokenType._typeof); + if (_index.match.call(void 0, _types.TokenType._import)) { + tsParseImportType(); + } else { + tsParseEntityName(); + } + if (!_util.hasPrecedingLineBreak.call(void 0, ) && _index.match.call(void 0, _types.TokenType.lessThan)) { + tsParseTypeArguments(); + } +} + +function tsParseImportType() { + _util.expect.call(void 0, _types.TokenType._import); + _util.expect.call(void 0, _types.TokenType.parenL); + _util.expect.call(void 0, _types.TokenType.string); + _util.expect.call(void 0, _types.TokenType.parenR); + if (_index.eat.call(void 0, _types.TokenType.dot)) { + tsParseEntityName(); + } + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + tsParseTypeArguments(); + } +} + +function tsParseTypeParameter() { + _index.eat.call(void 0, _types.TokenType._const); + const hadIn = _index.eat.call(void 0, _types.TokenType._in); + const hadOut = _util.eatContextual.call(void 0, _keywords.ContextualKeyword._out); + _index.eat.call(void 0, _types.TokenType._const); + if ((hadIn || hadOut) && !_index.match.call(void 0, _types.TokenType.name)) { + // The "in" or "out" keyword must have actually been the type parameter + // name, so set it as the name. + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType.name; + } else { + _expression.parseIdentifier.call(void 0, ); + } + + if (_index.eat.call(void 0, _types.TokenType._extends)) { + tsParseType(); + } + if (_index.eat.call(void 0, _types.TokenType.eq)) { + tsParseType(); + } +} + + function tsTryParseTypeParameters() { + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + tsParseTypeParameters(); + } +} exports.tsTryParseTypeParameters = tsTryParseTypeParameters; + +function tsParseTypeParameters() { + const oldIsType = _index.pushTypeContext.call(void 0, 0); + if (_index.match.call(void 0, _types.TokenType.lessThan) || _index.match.call(void 0, _types.TokenType.typeParameterStart)) { + _index.next.call(void 0, ); + } else { + _util.unexpected.call(void 0, ); + } + + while (!_index.eat.call(void 0, _types.TokenType.greaterThan) && !_base.state.error) { + tsParseTypeParameter(); + _index.eat.call(void 0, _types.TokenType.comma); + } + _index.popTypeContext.call(void 0, oldIsType); +} + +// Note: In TypeScript implementation we must provide `yieldContext` and `awaitContext`, +// but here it's always false, because this is only used for types. +function tsFillSignature(returnToken) { + // Arrow fns *must* have return token (`=>`). Normal functions can omit it. + const returnTokenRequired = returnToken === _types.TokenType.arrow; + tsTryParseTypeParameters(); + _util.expect.call(void 0, _types.TokenType.parenL); + // Create a scope even though we're doing type parsing so we don't accidentally + // treat params as top-level bindings. + _base.state.scopeDepth++; + tsParseBindingListForSignature(false /* isBlockScope */); + _base.state.scopeDepth--; + if (returnTokenRequired) { + tsParseTypeOrTypePredicateAnnotation(returnToken); + } else if (_index.match.call(void 0, returnToken)) { + tsParseTypeOrTypePredicateAnnotation(returnToken); + } +} + +function tsParseBindingListForSignature(isBlockScope) { + _lval.parseBindingList.call(void 0, _types.TokenType.parenR, isBlockScope); +} + +function tsParseTypeMemberSemicolon() { + if (!_index.eat.call(void 0, _types.TokenType.comma)) { + _util.semicolon.call(void 0, ); + } +} + +function tsParseSignatureMember() { + tsFillSignature(_types.TokenType.colon); + tsParseTypeMemberSemicolon(); +} + +function tsIsUnambiguouslyIndexSignature() { + const snapshot = _base.state.snapshot(); + _index.next.call(void 0, ); // Skip '{' + const isIndexSignature = _index.eat.call(void 0, _types.TokenType.name) && _index.match.call(void 0, _types.TokenType.colon); + _base.state.restoreFromSnapshot(snapshot); + return isIndexSignature; +} + +function tsTryParseIndexSignature() { + if (!(_index.match.call(void 0, _types.TokenType.bracketL) && tsIsUnambiguouslyIndexSignature())) { + return false; + } + + const oldIsType = _index.pushTypeContext.call(void 0, 0); + + _util.expect.call(void 0, _types.TokenType.bracketL); + _expression.parseIdentifier.call(void 0, ); + tsParseTypeAnnotation(); + _util.expect.call(void 0, _types.TokenType.bracketR); + + tsTryParseTypeAnnotation(); + tsParseTypeMemberSemicolon(); + + _index.popTypeContext.call(void 0, oldIsType); + return true; +} + +function tsParsePropertyOrMethodSignature(isReadonly) { + _index.eat.call(void 0, _types.TokenType.question); + + if (!isReadonly && (_index.match.call(void 0, _types.TokenType.parenL) || _index.match.call(void 0, _types.TokenType.lessThan))) { + tsFillSignature(_types.TokenType.colon); + tsParseTypeMemberSemicolon(); + } else { + tsTryParseTypeAnnotation(); + tsParseTypeMemberSemicolon(); + } +} + +function tsParseTypeMember() { + if (_index.match.call(void 0, _types.TokenType.parenL) || _index.match.call(void 0, _types.TokenType.lessThan)) { + // call signature + tsParseSignatureMember(); + return; + } + if (_index.match.call(void 0, _types.TokenType._new)) { + _index.next.call(void 0, ); + if (_index.match.call(void 0, _types.TokenType.parenL) || _index.match.call(void 0, _types.TokenType.lessThan)) { + // constructor signature + tsParseSignatureMember(); + } else { + tsParsePropertyOrMethodSignature(false); + } + return; + } + const readonly = !!tsParseModifier([_keywords.ContextualKeyword._readonly]); + + const found = tsTryParseIndexSignature(); + if (found) { + return; + } + if ( + (_util.isContextual.call(void 0, _keywords.ContextualKeyword._get) || _util.isContextual.call(void 0, _keywords.ContextualKeyword._set)) && + tsNextTokenCanFollowModifier() + ) { + // This is a getter/setter on a type. The tsNextTokenCanFollowModifier + // function already called next() for us, so continue parsing the name. + } + _expression.parsePropertyName.call(void 0, -1 /* Types don't need context IDs. */); + tsParsePropertyOrMethodSignature(readonly); +} + +function tsParseTypeLiteral() { + tsParseObjectTypeMembers(); +} + +function tsParseObjectTypeMembers() { + _util.expect.call(void 0, _types.TokenType.braceL); + while (!_index.eat.call(void 0, _types.TokenType.braceR) && !_base.state.error) { + tsParseTypeMember(); + } +} + +function tsLookaheadIsStartOfMappedType() { + const snapshot = _base.state.snapshot(); + const isStartOfMappedType = tsIsStartOfMappedType(); + _base.state.restoreFromSnapshot(snapshot); + return isStartOfMappedType; +} + +function tsIsStartOfMappedType() { + _index.next.call(void 0, ); + if (_index.eat.call(void 0, _types.TokenType.plus) || _index.eat.call(void 0, _types.TokenType.minus)) { + return _util.isContextual.call(void 0, _keywords.ContextualKeyword._readonly); + } + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._readonly)) { + _index.next.call(void 0, ); + } + if (!_index.match.call(void 0, _types.TokenType.bracketL)) { + return false; + } + _index.next.call(void 0, ); + if (!tsIsIdentifier()) { + return false; + } + _index.next.call(void 0, ); + return _index.match.call(void 0, _types.TokenType._in); +} + +function tsParseMappedTypeParameter() { + _expression.parseIdentifier.call(void 0, ); + _util.expect.call(void 0, _types.TokenType._in); + tsParseType(); +} + +function tsParseMappedType() { + _util.expect.call(void 0, _types.TokenType.braceL); + if (_index.match.call(void 0, _types.TokenType.plus) || _index.match.call(void 0, _types.TokenType.minus)) { + _index.next.call(void 0, ); + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._readonly); + } else { + _util.eatContextual.call(void 0, _keywords.ContextualKeyword._readonly); + } + _util.expect.call(void 0, _types.TokenType.bracketL); + tsParseMappedTypeParameter(); + if (_util.eatContextual.call(void 0, _keywords.ContextualKeyword._as)) { + tsParseType(); + } + _util.expect.call(void 0, _types.TokenType.bracketR); + if (_index.match.call(void 0, _types.TokenType.plus) || _index.match.call(void 0, _types.TokenType.minus)) { + _index.next.call(void 0, ); + _util.expect.call(void 0, _types.TokenType.question); + } else { + _index.eat.call(void 0, _types.TokenType.question); + } + tsTryParseType(); + _util.semicolon.call(void 0, ); + _util.expect.call(void 0, _types.TokenType.braceR); +} + +function tsParseTupleType() { + _util.expect.call(void 0, _types.TokenType.bracketL); + while (!_index.eat.call(void 0, _types.TokenType.bracketR) && !_base.state.error) { + // Do not validate presence of either none or only labeled elements + tsParseTupleElementType(); + _index.eat.call(void 0, _types.TokenType.comma); + } +} + +function tsParseTupleElementType() { + // parses `...TsType[]` + if (_index.eat.call(void 0, _types.TokenType.ellipsis)) { + tsParseType(); + } else { + // parses `TsType?` + tsParseType(); + _index.eat.call(void 0, _types.TokenType.question); + } + + // The type we parsed above was actually a label + if (_index.eat.call(void 0, _types.TokenType.colon)) { + // Labeled tuple types must affix the label with `...` or `?`, so no need to handle those here + tsParseType(); + } +} + +function tsParseParenthesizedType() { + _util.expect.call(void 0, _types.TokenType.parenL); + tsParseType(); + _util.expect.call(void 0, _types.TokenType.parenR); +} + +function tsParseTemplateLiteralType() { + // Finish `, read quasi + _index.nextTemplateToken.call(void 0, ); + // Finish quasi, read ${ + _index.nextTemplateToken.call(void 0, ); + while (!_index.match.call(void 0, _types.TokenType.backQuote) && !_base.state.error) { + _util.expect.call(void 0, _types.TokenType.dollarBraceL); + tsParseType(); + // Finish }, read quasi + _index.nextTemplateToken.call(void 0, ); + // Finish quasi, read either ${ or ` + _index.nextTemplateToken.call(void 0, ); + } + _index.next.call(void 0, ); +} + +var FunctionType; (function (FunctionType) { + const TSFunctionType = 0; FunctionType[FunctionType["TSFunctionType"] = TSFunctionType] = "TSFunctionType"; + const TSConstructorType = TSFunctionType + 1; FunctionType[FunctionType["TSConstructorType"] = TSConstructorType] = "TSConstructorType"; + const TSAbstractConstructorType = TSConstructorType + 1; FunctionType[FunctionType["TSAbstractConstructorType"] = TSAbstractConstructorType] = "TSAbstractConstructorType"; +})(FunctionType || (FunctionType = {})); + +function tsParseFunctionOrConstructorType(type) { + if (type === FunctionType.TSAbstractConstructorType) { + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._abstract); + } + if (type === FunctionType.TSConstructorType || type === FunctionType.TSAbstractConstructorType) { + _util.expect.call(void 0, _types.TokenType._new); + } + const oldInDisallowConditionalTypesContext = _base.state.inDisallowConditionalTypesContext; + _base.state.inDisallowConditionalTypesContext = false; + tsFillSignature(_types.TokenType.arrow); + _base.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; +} + +function tsParseNonArrayType() { + switch (_base.state.type) { + case _types.TokenType.name: + tsParseTypeReference(); + return; + case _types.TokenType._void: + case _types.TokenType._null: + _index.next.call(void 0, ); + return; + case _types.TokenType.string: + case _types.TokenType.num: + case _types.TokenType.bigint: + case _types.TokenType.decimal: + case _types.TokenType._true: + case _types.TokenType._false: + _expression.parseLiteral.call(void 0, ); + return; + case _types.TokenType.minus: + _index.next.call(void 0, ); + _expression.parseLiteral.call(void 0, ); + return; + case _types.TokenType._this: { + tsParseThisTypeNode(); + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._is) && !_util.hasPrecedingLineBreak.call(void 0, )) { + tsParseThisTypePredicate(); + } + return; + } + case _types.TokenType._typeof: + tsParseTypeQuery(); + return; + case _types.TokenType._import: + tsParseImportType(); + return; + case _types.TokenType.braceL: + if (tsLookaheadIsStartOfMappedType()) { + tsParseMappedType(); + } else { + tsParseTypeLiteral(); + } + return; + case _types.TokenType.bracketL: + tsParseTupleType(); + return; + case _types.TokenType.parenL: + tsParseParenthesizedType(); + return; + case _types.TokenType.backQuote: + tsParseTemplateLiteralType(); + return; + default: + if (_base.state.type & _types.TokenType.IS_KEYWORD) { + _index.next.call(void 0, ); + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType.name; + return; + } + break; + } + + _util.unexpected.call(void 0, ); +} + +function tsParseArrayTypeOrHigher() { + tsParseNonArrayType(); + while (!_util.hasPrecedingLineBreak.call(void 0, ) && _index.eat.call(void 0, _types.TokenType.bracketL)) { + if (!_index.eat.call(void 0, _types.TokenType.bracketR)) { + // If we hit ] immediately, this is an array type, otherwise it's an indexed access type. + tsParseType(); + _util.expect.call(void 0, _types.TokenType.bracketR); + } + } +} + +function tsParseInferType() { + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._infer); + _expression.parseIdentifier.call(void 0, ); + if (_index.match.call(void 0, _types.TokenType._extends)) { + // Infer type constraints introduce an ambiguity about whether the "extends" + // is a constraint for this infer type or is another conditional type. + const snapshot = _base.state.snapshot(); + _util.expect.call(void 0, _types.TokenType._extends); + const oldInDisallowConditionalTypesContext = _base.state.inDisallowConditionalTypesContext; + _base.state.inDisallowConditionalTypesContext = true; + tsParseType(); + _base.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + if (_base.state.error || (!_base.state.inDisallowConditionalTypesContext && _index.match.call(void 0, _types.TokenType.question))) { + _base.state.restoreFromSnapshot(snapshot); + } + } +} + +function tsParseTypeOperatorOrHigher() { + if ( + _util.isContextual.call(void 0, _keywords.ContextualKeyword._keyof) || + _util.isContextual.call(void 0, _keywords.ContextualKeyword._unique) || + _util.isContextual.call(void 0, _keywords.ContextualKeyword._readonly) + ) { + _index.next.call(void 0, ); + tsParseTypeOperatorOrHigher(); + } else if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._infer)) { + tsParseInferType(); + } else { + const oldInDisallowConditionalTypesContext = _base.state.inDisallowConditionalTypesContext; + _base.state.inDisallowConditionalTypesContext = false; + tsParseArrayTypeOrHigher(); + _base.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + } +} + +function tsParseIntersectionTypeOrHigher() { + _index.eat.call(void 0, _types.TokenType.bitwiseAND); + tsParseTypeOperatorOrHigher(); + if (_index.match.call(void 0, _types.TokenType.bitwiseAND)) { + while (_index.eat.call(void 0, _types.TokenType.bitwiseAND)) { + tsParseTypeOperatorOrHigher(); + } + } +} + +function tsParseUnionTypeOrHigher() { + _index.eat.call(void 0, _types.TokenType.bitwiseOR); + tsParseIntersectionTypeOrHigher(); + if (_index.match.call(void 0, _types.TokenType.bitwiseOR)) { + while (_index.eat.call(void 0, _types.TokenType.bitwiseOR)) { + tsParseIntersectionTypeOrHigher(); + } + } +} + +function tsIsStartOfFunctionType() { + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + return true; + } + return _index.match.call(void 0, _types.TokenType.parenL) && tsLookaheadIsUnambiguouslyStartOfFunctionType(); +} + +function tsSkipParameterStart() { + if (_index.match.call(void 0, _types.TokenType.name) || _index.match.call(void 0, _types.TokenType._this)) { + _index.next.call(void 0, ); + return true; + } + // If this is a possible array/object destructure, walk to the matching bracket/brace. + // The next token after will tell us definitively whether this is a function param. + if (_index.match.call(void 0, _types.TokenType.braceL) || _index.match.call(void 0, _types.TokenType.bracketL)) { + let depth = 1; + _index.next.call(void 0, ); + while (depth > 0 && !_base.state.error) { + if (_index.match.call(void 0, _types.TokenType.braceL) || _index.match.call(void 0, _types.TokenType.bracketL)) { + depth++; + } else if (_index.match.call(void 0, _types.TokenType.braceR) || _index.match.call(void 0, _types.TokenType.bracketR)) { + depth--; + } + _index.next.call(void 0, ); + } + return true; + } + return false; +} + +function tsLookaheadIsUnambiguouslyStartOfFunctionType() { + const snapshot = _base.state.snapshot(); + const isUnambiguouslyStartOfFunctionType = tsIsUnambiguouslyStartOfFunctionType(); + _base.state.restoreFromSnapshot(snapshot); + return isUnambiguouslyStartOfFunctionType; +} + +function tsIsUnambiguouslyStartOfFunctionType() { + _index.next.call(void 0, ); + if (_index.match.call(void 0, _types.TokenType.parenR) || _index.match.call(void 0, _types.TokenType.ellipsis)) { + // ( ) + // ( ... + return true; + } + if (tsSkipParameterStart()) { + if (_index.match.call(void 0, _types.TokenType.colon) || _index.match.call(void 0, _types.TokenType.comma) || _index.match.call(void 0, _types.TokenType.question) || _index.match.call(void 0, _types.TokenType.eq)) { + // ( xxx : + // ( xxx , + // ( xxx ? + // ( xxx = + return true; + } + if (_index.match.call(void 0, _types.TokenType.parenR)) { + _index.next.call(void 0, ); + if (_index.match.call(void 0, _types.TokenType.arrow)) { + // ( xxx ) => + return true; + } + } + } + return false; +} + +function tsParseTypeOrTypePredicateAnnotation(returnToken) { + const oldIsType = _index.pushTypeContext.call(void 0, 0); + _util.expect.call(void 0, returnToken); + const finishedReturn = tsParseTypePredicateOrAssertsPrefix(); + if (!finishedReturn) { + tsParseType(); + } + _index.popTypeContext.call(void 0, oldIsType); +} + +function tsTryParseTypeOrTypePredicateAnnotation() { + if (_index.match.call(void 0, _types.TokenType.colon)) { + tsParseTypeOrTypePredicateAnnotation(_types.TokenType.colon); + } +} + + function tsTryParseTypeAnnotation() { + if (_index.match.call(void 0, _types.TokenType.colon)) { + tsParseTypeAnnotation(); + } +} exports.tsTryParseTypeAnnotation = tsTryParseTypeAnnotation; + +function tsTryParseType() { + if (_index.eat.call(void 0, _types.TokenType.colon)) { + tsParseType(); + } +} + +/** + * Detect a few special return syntax cases: `x is T`, `asserts x`, `asserts x is T`, + * `asserts this is T`. + * + * Returns true if we parsed the return type, false if there's still a type to be parsed. + */ +function tsParseTypePredicateOrAssertsPrefix() { + const snapshot = _base.state.snapshot(); + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._asserts)) { + // Normally this is `asserts x is T`, but at this point, it might be `asserts is T` (a user- + // defined type guard on the `asserts` variable) or just a type called `asserts`. + _index.next.call(void 0, ); + if (_util.eatContextual.call(void 0, _keywords.ContextualKeyword._is)) { + // If we see `asserts is`, then this must be of the form `asserts is T`, since + // `asserts is is T` isn't valid. + tsParseType(); + return true; + } else if (tsIsIdentifier() || _index.match.call(void 0, _types.TokenType._this)) { + _index.next.call(void 0, ); + if (_util.eatContextual.call(void 0, _keywords.ContextualKeyword._is)) { + // If we see `is`, then this is `asserts x is T`. Otherwise, it's `asserts x`. + tsParseType(); + } + return true; + } else { + // Regular type, so bail out and start type parsing from scratch. + _base.state.restoreFromSnapshot(snapshot); + return false; + } + } else if (tsIsIdentifier() || _index.match.call(void 0, _types.TokenType._this)) { + // This is a regular identifier, which may or may not have "is" after it. + _index.next.call(void 0, ); + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._is) && !_util.hasPrecedingLineBreak.call(void 0, )) { + _index.next.call(void 0, ); + tsParseType(); + return true; + } else { + // Regular type, so bail out and start type parsing from scratch. + _base.state.restoreFromSnapshot(snapshot); + return false; + } + } + return false; +} + + function tsParseTypeAnnotation() { + const oldIsType = _index.pushTypeContext.call(void 0, 0); + _util.expect.call(void 0, _types.TokenType.colon); + tsParseType(); + _index.popTypeContext.call(void 0, oldIsType); +} exports.tsParseTypeAnnotation = tsParseTypeAnnotation; + + function tsParseType() { + tsParseNonConditionalType(); + if (_base.state.inDisallowConditionalTypesContext || _util.hasPrecedingLineBreak.call(void 0, ) || !_index.eat.call(void 0, _types.TokenType._extends)) { + return; + } + // extends type + const oldInDisallowConditionalTypesContext = _base.state.inDisallowConditionalTypesContext; + _base.state.inDisallowConditionalTypesContext = true; + tsParseNonConditionalType(); + _base.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + + _util.expect.call(void 0, _types.TokenType.question); + // true type + tsParseType(); + _util.expect.call(void 0, _types.TokenType.colon); + // false type + tsParseType(); +} exports.tsParseType = tsParseType; + +function isAbstractConstructorSignature() { + return _util.isContextual.call(void 0, _keywords.ContextualKeyword._abstract) && _index.lookaheadType.call(void 0, ) === _types.TokenType._new; +} + + function tsParseNonConditionalType() { + if (tsIsStartOfFunctionType()) { + tsParseFunctionOrConstructorType(FunctionType.TSFunctionType); + return; + } + if (_index.match.call(void 0, _types.TokenType._new)) { + // As in `new () => Date` + tsParseFunctionOrConstructorType(FunctionType.TSConstructorType); + return; + } else if (isAbstractConstructorSignature()) { + // As in `abstract new () => Date` + tsParseFunctionOrConstructorType(FunctionType.TSAbstractConstructorType); + return; + } + tsParseUnionTypeOrHigher(); +} exports.tsParseNonConditionalType = tsParseNonConditionalType; + + function tsParseTypeAssertion() { + const oldIsType = _index.pushTypeContext.call(void 0, 1); + tsParseType(); + _util.expect.call(void 0, _types.TokenType.greaterThan); + _index.popTypeContext.call(void 0, oldIsType); + _expression.parseMaybeUnary.call(void 0, ); +} exports.tsParseTypeAssertion = tsParseTypeAssertion; + + function tsTryParseJSXTypeArgument() { + if (_index.eat.call(void 0, _types.TokenType.jsxTagStart)) { + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType.typeParameterStart; + const oldIsType = _index.pushTypeContext.call(void 0, 1); + while (!_index.match.call(void 0, _types.TokenType.greaterThan) && !_base.state.error) { + tsParseType(); + _index.eat.call(void 0, _types.TokenType.comma); + } + // Process >, but the one after needs to be parsed JSX-style. + _jsx.nextJSXTagToken.call(void 0, ); + _index.popTypeContext.call(void 0, oldIsType); + } +} exports.tsTryParseJSXTypeArgument = tsTryParseJSXTypeArgument; + +function tsParseHeritageClause() { + while (!_index.match.call(void 0, _types.TokenType.braceL) && !_base.state.error) { + tsParseExpressionWithTypeArguments(); + _index.eat.call(void 0, _types.TokenType.comma); + } +} + +function tsParseExpressionWithTypeArguments() { + // Note: TS uses parseLeftHandSideExpressionOrHigher, + // then has grammar errors later if it's not an EntityName. + tsParseEntityName(); + if (_index.match.call(void 0, _types.TokenType.lessThan)) { + tsParseTypeArguments(); + } +} + +function tsParseInterfaceDeclaration() { + _lval.parseBindingIdentifier.call(void 0, false); + tsTryParseTypeParameters(); + if (_index.eat.call(void 0, _types.TokenType._extends)) { + tsParseHeritageClause(); + } + tsParseObjectTypeMembers(); +} + +function tsParseTypeAliasDeclaration() { + _lval.parseBindingIdentifier.call(void 0, false); + tsTryParseTypeParameters(); + _util.expect.call(void 0, _types.TokenType.eq); + tsParseType(); + _util.semicolon.call(void 0, ); +} + +function tsParseEnumMember() { + // Computed property names are grammar errors in an enum, so accept just string literal or identifier. + if (_index.match.call(void 0, _types.TokenType.string)) { + _expression.parseLiteral.call(void 0, ); + } else { + _expression.parseIdentifier.call(void 0, ); + } + if (_index.eat.call(void 0, _types.TokenType.eq)) { + const eqIndex = _base.state.tokens.length - 1; + _expression.parseMaybeAssign.call(void 0, ); + _base.state.tokens[eqIndex].rhsEndIndex = _base.state.tokens.length; + } +} + +function tsParseEnumDeclaration() { + _lval.parseBindingIdentifier.call(void 0, false); + _util.expect.call(void 0, _types.TokenType.braceL); + while (!_index.eat.call(void 0, _types.TokenType.braceR) && !_base.state.error) { + tsParseEnumMember(); + _index.eat.call(void 0, _types.TokenType.comma); + } +} + +function tsParseModuleBlock() { + _util.expect.call(void 0, _types.TokenType.braceL); + _statement.parseBlockBody.call(void 0, /* end */ _types.TokenType.braceR); +} + +function tsParseModuleOrNamespaceDeclaration() { + _lval.parseBindingIdentifier.call(void 0, false); + if (_index.eat.call(void 0, _types.TokenType.dot)) { + tsParseModuleOrNamespaceDeclaration(); + } else { + tsParseModuleBlock(); + } +} + +function tsParseAmbientExternalModuleDeclaration() { + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._global)) { + _expression.parseIdentifier.call(void 0, ); + } else if (_index.match.call(void 0, _types.TokenType.string)) { + _expression.parseExprAtom.call(void 0, ); + } else { + _util.unexpected.call(void 0, ); + } + + if (_index.match.call(void 0, _types.TokenType.braceL)) { + tsParseModuleBlock(); + } else { + _util.semicolon.call(void 0, ); + } +} + + function tsParseImportEqualsDeclaration() { + _lval.parseImportedIdentifier.call(void 0, ); + _util.expect.call(void 0, _types.TokenType.eq); + tsParseModuleReference(); + _util.semicolon.call(void 0, ); +} exports.tsParseImportEqualsDeclaration = tsParseImportEqualsDeclaration; + +function tsIsExternalModuleReference() { + return _util.isContextual.call(void 0, _keywords.ContextualKeyword._require) && _index.lookaheadType.call(void 0, ) === _types.TokenType.parenL; +} + +function tsParseModuleReference() { + if (tsIsExternalModuleReference()) { + tsParseExternalModuleReference(); + } else { + tsParseEntityName(); + } +} + +function tsParseExternalModuleReference() { + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._require); + _util.expect.call(void 0, _types.TokenType.parenL); + if (!_index.match.call(void 0, _types.TokenType.string)) { + _util.unexpected.call(void 0, ); + } + _expression.parseLiteral.call(void 0, ); + _util.expect.call(void 0, _types.TokenType.parenR); +} + +// Utilities + +// Returns true if a statement matched. +function tsTryParseDeclare() { + if (_util.isLineTerminator.call(void 0, )) { + return false; + } + switch (_base.state.type) { + case _types.TokenType._function: { + const oldIsType = _index.pushTypeContext.call(void 0, 1); + _index.next.call(void 0, ); + // We don't need to precisely get the function start here, since it's only used to mark + // the function as a type if it's bodiless, and it's already a type here. + const functionStart = _base.state.start; + _statement.parseFunction.call(void 0, functionStart, /* isStatement */ true); + _index.popTypeContext.call(void 0, oldIsType); + return true; + } + case _types.TokenType._class: { + const oldIsType = _index.pushTypeContext.call(void 0, 1); + _statement.parseClass.call(void 0, /* isStatement */ true, /* optionalId */ false); + _index.popTypeContext.call(void 0, oldIsType); + return true; + } + case _types.TokenType._const: { + if (_index.match.call(void 0, _types.TokenType._const) && _util.isLookaheadContextual.call(void 0, _keywords.ContextualKeyword._enum)) { + const oldIsType = _index.pushTypeContext.call(void 0, 1); + // `const enum = 0;` not allowed because "enum" is a strict mode reserved word. + _util.expect.call(void 0, _types.TokenType._const); + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._enum); + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._enum; + tsParseEnumDeclaration(); + _index.popTypeContext.call(void 0, oldIsType); + return true; + } + } + // falls through + case _types.TokenType._var: + case _types.TokenType._let: { + const oldIsType = _index.pushTypeContext.call(void 0, 1); + _statement.parseVarStatement.call(void 0, _base.state.type !== _types.TokenType._var); + _index.popTypeContext.call(void 0, oldIsType); + return true; + } + case _types.TokenType.name: { + const oldIsType = _index.pushTypeContext.call(void 0, 1); + const contextualKeyword = _base.state.contextualKeyword; + let matched = false; + if (contextualKeyword === _keywords.ContextualKeyword._global) { + tsParseAmbientExternalModuleDeclaration(); + matched = true; + } else { + matched = tsParseDeclaration(contextualKeyword, /* isBeforeToken */ true); + } + _index.popTypeContext.call(void 0, oldIsType); + return matched; + } + default: + return false; + } +} + +// Note: this won't be called unless the keyword is allowed in `shouldParseExportDeclaration`. +// Returns true if it matched a declaration. +function tsTryParseExportDeclaration() { + return tsParseDeclaration(_base.state.contextualKeyword, /* isBeforeToken */ true); +} + +// Returns true if it matched a statement. +function tsParseExpressionStatement(contextualKeyword) { + switch (contextualKeyword) { + case _keywords.ContextualKeyword._declare: { + const declareTokenIndex = _base.state.tokens.length - 1; + const matched = tsTryParseDeclare(); + if (matched) { + _base.state.tokens[declareTokenIndex].type = _types.TokenType._declare; + return true; + } + break; + } + case _keywords.ContextualKeyword._global: + // `global { }` (with no `declare`) may appear inside an ambient module declaration. + // Would like to use tsParseAmbientExternalModuleDeclaration here, but already ran past "global". + if (_index.match.call(void 0, _types.TokenType.braceL)) { + tsParseModuleBlock(); + return true; + } + break; + + default: + return tsParseDeclaration(contextualKeyword, /* isBeforeToken */ false); + } + return false; +} + +/** + * Common code for parsing a declaration. + * + * isBeforeToken indicates that the current parser state is at the contextual + * keyword (and that it is not yet emitted) rather than reading the token after + * it. When isBeforeToken is true, we may be preceded by an `export` token and + * should include that token in a type context we create, e.g. to handle + * `export interface` or `export type`. (This is a bit of a hack and should be + * cleaned up at some point.) + * + * Returns true if it matched a declaration. + */ +function tsParseDeclaration(contextualKeyword, isBeforeToken) { + switch (contextualKeyword) { + case _keywords.ContextualKeyword._abstract: + if (tsCheckLineTerminator(isBeforeToken) && _index.match.call(void 0, _types.TokenType._class)) { + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._abstract; + _statement.parseClass.call(void 0, /* isStatement */ true, /* optionalId */ false); + return true; + } + break; + + case _keywords.ContextualKeyword._enum: + if (tsCheckLineTerminator(isBeforeToken) && _index.match.call(void 0, _types.TokenType.name)) { + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._enum; + tsParseEnumDeclaration(); + return true; + } + break; + + case _keywords.ContextualKeyword._interface: + if (tsCheckLineTerminator(isBeforeToken) && _index.match.call(void 0, _types.TokenType.name)) { + // `next` is true in "export" and "declare" contexts, so we want to remove that token + // as well. + const oldIsType = _index.pushTypeContext.call(void 0, isBeforeToken ? 2 : 1); + tsParseInterfaceDeclaration(); + _index.popTypeContext.call(void 0, oldIsType); + return true; + } + break; + + case _keywords.ContextualKeyword._module: + if (tsCheckLineTerminator(isBeforeToken)) { + if (_index.match.call(void 0, _types.TokenType.string)) { + const oldIsType = _index.pushTypeContext.call(void 0, isBeforeToken ? 2 : 1); + tsParseAmbientExternalModuleDeclaration(); + _index.popTypeContext.call(void 0, oldIsType); + return true; + } else if (_index.match.call(void 0, _types.TokenType.name)) { + const oldIsType = _index.pushTypeContext.call(void 0, isBeforeToken ? 2 : 1); + tsParseModuleOrNamespaceDeclaration(); + _index.popTypeContext.call(void 0, oldIsType); + return true; + } + } + break; + + case _keywords.ContextualKeyword._namespace: + if (tsCheckLineTerminator(isBeforeToken) && _index.match.call(void 0, _types.TokenType.name)) { + const oldIsType = _index.pushTypeContext.call(void 0, isBeforeToken ? 2 : 1); + tsParseModuleOrNamespaceDeclaration(); + _index.popTypeContext.call(void 0, oldIsType); + return true; + } + break; + + case _keywords.ContextualKeyword._type: + if (tsCheckLineTerminator(isBeforeToken) && _index.match.call(void 0, _types.TokenType.name)) { + const oldIsType = _index.pushTypeContext.call(void 0, isBeforeToken ? 2 : 1); + tsParseTypeAliasDeclaration(); + _index.popTypeContext.call(void 0, oldIsType); + return true; + } + break; + + default: + break; + } + return false; +} + +function tsCheckLineTerminator(isBeforeToken) { + if (isBeforeToken) { + // Babel checks hasFollowingLineBreak here and returns false, but this + // doesn't actually come up, e.g. `export interface` can never be on its own + // line in valid code. + _index.next.call(void 0, ); + return true; + } else { + return !_util.isLineTerminator.call(void 0, ); + } +} + +// Returns true if there was a generic async arrow function. +function tsTryParseGenericAsyncArrowFunction() { + const snapshot = _base.state.snapshot(); + + tsParseTypeParameters(); + _statement.parseFunctionParams.call(void 0, ); + tsTryParseTypeOrTypePredicateAnnotation(); + _util.expect.call(void 0, _types.TokenType.arrow); + + if (_base.state.error) { + _base.state.restoreFromSnapshot(snapshot); + return false; + } + + _expression.parseFunctionBody.call(void 0, true); + return true; +} + +/** + * If necessary, hack the tokenizer state so that this bitshift was actually a + * less-than token, then keep parsing. This should only be used in situations + * where we restore from snapshot on error (which reverts this change) or + * where bitshift would be illegal anyway (e.g. in a class "extends" clause). + * + * This hack is useful to handle situations like foo<() => void>() where + * there can legitimately be two open-angle-brackets in a row in TS. + */ +function tsParseTypeArgumentsWithPossibleBitshift() { + if (_base.state.type === _types.TokenType.bitShiftL) { + _base.state.pos -= 1; + _index.finishToken.call(void 0, _types.TokenType.lessThan); + } + tsParseTypeArguments(); +} + +function tsParseTypeArguments() { + const oldIsType = _index.pushTypeContext.call(void 0, 0); + _util.expect.call(void 0, _types.TokenType.lessThan); + while (!_index.match.call(void 0, _types.TokenType.greaterThan) && !_base.state.error) { + tsParseType(); + _index.eat.call(void 0, _types.TokenType.comma); + } + if (!oldIsType) { + // If the type arguments are present in an expression context, e.g. + // f(), then the > sign should be tokenized as a non-type token. + // In particular, f(a < b, c >= d) should parse the >= as a single token, + // resulting in a syntax error and fallback to the non-type-args + // interpretation. In the success case, even though the > is tokenized as a + // non-type token, it still must be marked as a type token so that it is + // erased. + _index.popTypeContext.call(void 0, oldIsType); + _index.rescan_gt.call(void 0, ); + _util.expect.call(void 0, _types.TokenType.greaterThan); + _base.state.tokens[_base.state.tokens.length - 1].isType = true; + } else { + _util.expect.call(void 0, _types.TokenType.greaterThan); + _index.popTypeContext.call(void 0, oldIsType); + } +} + + function tsIsDeclarationStart() { + if (_index.match.call(void 0, _types.TokenType.name)) { + switch (_base.state.contextualKeyword) { + case _keywords.ContextualKeyword._abstract: + case _keywords.ContextualKeyword._declare: + case _keywords.ContextualKeyword._enum: + case _keywords.ContextualKeyword._interface: + case _keywords.ContextualKeyword._module: + case _keywords.ContextualKeyword._namespace: + case _keywords.ContextualKeyword._type: + return true; + default: + break; + } + } + + return false; +} exports.tsIsDeclarationStart = tsIsDeclarationStart; + +// ====================================================== +// OVERRIDES +// ====================================================== + + function tsParseFunctionBodyAndFinish(functionStart, funcContextId) { + // For arrow functions, `parseArrow` handles the return type itself. + if (_index.match.call(void 0, _types.TokenType.colon)) { + tsParseTypeOrTypePredicateAnnotation(_types.TokenType.colon); + } + + // The original code checked the node type to make sure this function type allows a missing + // body, but we skip that to avoid sending around the node type. We instead just use the + // allowExpressionBody boolean to make sure it's not an arrow function. + if (!_index.match.call(void 0, _types.TokenType.braceL) && _util.isLineTerminator.call(void 0, )) { + // Retroactively mark the function declaration as a type. + let i = _base.state.tokens.length - 1; + while ( + i >= 0 && + (_base.state.tokens[i].start >= functionStart || + _base.state.tokens[i].type === _types.TokenType._default || + _base.state.tokens[i].type === _types.TokenType._export) + ) { + _base.state.tokens[i].isType = true; + i--; + } + return; + } + + _expression.parseFunctionBody.call(void 0, false, funcContextId); +} exports.tsParseFunctionBodyAndFinish = tsParseFunctionBodyAndFinish; + + function tsParseSubscript( + startTokenIndex, + noCalls, + stopState, +) { + if (!_util.hasPrecedingLineBreak.call(void 0, ) && _index.eat.call(void 0, _types.TokenType.bang)) { + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType.nonNullAssertion; + return; + } + + if (_index.match.call(void 0, _types.TokenType.lessThan) || _index.match.call(void 0, _types.TokenType.bitShiftL)) { + // There are number of things we are going to "maybe" parse, like type arguments on + // tagged template expressions. If any of them fail, walk it back and continue. + const snapshot = _base.state.snapshot(); + + if (!noCalls && _expression.atPossibleAsync.call(void 0, )) { + // Almost certainly this is a generic async function `async () => ... + // But it might be a call with a type argument `async();` + const asyncArrowFn = tsTryParseGenericAsyncArrowFunction(); + if (asyncArrowFn) { + return; + } + } + tsParseTypeArgumentsWithPossibleBitshift(); + if (!noCalls && _index.eat.call(void 0, _types.TokenType.parenL)) { + // With f(), the subscriptStartIndex marker is on the ( token. + _base.state.tokens[_base.state.tokens.length - 1].subscriptStartIndex = startTokenIndex; + _expression.parseCallExpressionArguments.call(void 0, ); + } else if (_index.match.call(void 0, _types.TokenType.backQuote)) { + // Tagged template with a type argument. + _expression.parseTemplate.call(void 0, ); + } else if ( + // The remaining possible case is an instantiation expression, e.g. + // Array . Check for a few cases that would disqualify it and + // cause us to bail out. + // a>c is not (a)>c, but a<(b>>c) + _base.state.type === _types.TokenType.greaterThan || + // ac is (ac + (_base.state.type !== _types.TokenType.parenL && + Boolean(_base.state.type & _types.TokenType.IS_EXPRESSION_START) && + !_util.hasPrecedingLineBreak.call(void 0, )) + ) { + // Bail out. We have something like ac, which is not an expression with + // type arguments but an (a < b) > c comparison. + _util.unexpected.call(void 0, ); + } + + if (_base.state.error) { + _base.state.restoreFromSnapshot(snapshot); + } else { + return; + } + } else if (!noCalls && _index.match.call(void 0, _types.TokenType.questionDot) && _index.lookaheadType.call(void 0, ) === _types.TokenType.lessThan) { + // If we see f?.<, then this must be an optional call with a type argument. + _index.next.call(void 0, ); + _base.state.tokens[startTokenIndex].isOptionalChainStart = true; + // With f?.(), the subscriptStartIndex marker is on the ?. token. + _base.state.tokens[_base.state.tokens.length - 1].subscriptStartIndex = startTokenIndex; + + tsParseTypeArguments(); + _util.expect.call(void 0, _types.TokenType.parenL); + _expression.parseCallExpressionArguments.call(void 0, ); + } + _expression.baseParseSubscript.call(void 0, startTokenIndex, noCalls, stopState); +} exports.tsParseSubscript = tsParseSubscript; + + function tsTryParseExport() { + if (_index.eat.call(void 0, _types.TokenType._import)) { + // One of these cases: + // export import A = B; + // export import type A = require("A"); + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._type) && _index.lookaheadType.call(void 0, ) !== _types.TokenType.eq) { + // Eat a `type` token, unless it's actually an identifier name. + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._type); + } + tsParseImportEqualsDeclaration(); + return true; + } else if (_index.eat.call(void 0, _types.TokenType.eq)) { + // `export = x;` + _expression.parseExpression.call(void 0, ); + _util.semicolon.call(void 0, ); + return true; + } else if (_util.eatContextual.call(void 0, _keywords.ContextualKeyword._as)) { + // `export as namespace A;` + // See `parseNamespaceExportDeclaration` in TypeScript's own parser + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._namespace); + _expression.parseIdentifier.call(void 0, ); + _util.semicolon.call(void 0, ); + return true; + } else { + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._type)) { + const nextType = _index.lookaheadType.call(void 0, ); + // export type {foo} from 'a'; + // export type * from 'a';' + // export type * as ns from 'a';' + if (nextType === _types.TokenType.braceL || nextType === _types.TokenType.star) { + _index.next.call(void 0, ); + } + } + return false; + } +} exports.tsTryParseExport = tsTryParseExport; + +/** + * Parse a TS import specifier, which may be prefixed with "type" and may be of + * the form `foo as bar`. + * + * The number of identifier-like tokens we see happens to be enough to uniquely + * identify the form, so simply count the number of identifiers rather than + * matching the words `type` or `as`. This is particularly important because + * `type` and `as` could each actually be plain identifiers rather than + * keywords. + */ + function tsParseImportSpecifier() { + _expression.parseIdentifier.call(void 0, ); + if (_index.match.call(void 0, _types.TokenType.comma) || _index.match.call(void 0, _types.TokenType.braceR)) { + // import {foo} + _base.state.tokens[_base.state.tokens.length - 1].identifierRole = _index.IdentifierRole.ImportDeclaration; + return; + } + _expression.parseIdentifier.call(void 0, ); + if (_index.match.call(void 0, _types.TokenType.comma) || _index.match.call(void 0, _types.TokenType.braceR)) { + // import {type foo} + _base.state.tokens[_base.state.tokens.length - 1].identifierRole = _index.IdentifierRole.ImportDeclaration; + _base.state.tokens[_base.state.tokens.length - 2].isType = true; + _base.state.tokens[_base.state.tokens.length - 1].isType = true; + return; + } + _expression.parseIdentifier.call(void 0, ); + if (_index.match.call(void 0, _types.TokenType.comma) || _index.match.call(void 0, _types.TokenType.braceR)) { + // import {foo as bar} + _base.state.tokens[_base.state.tokens.length - 3].identifierRole = _index.IdentifierRole.ImportAccess; + _base.state.tokens[_base.state.tokens.length - 1].identifierRole = _index.IdentifierRole.ImportDeclaration; + return; + } + _expression.parseIdentifier.call(void 0, ); + // import {type foo as bar} + _base.state.tokens[_base.state.tokens.length - 3].identifierRole = _index.IdentifierRole.ImportAccess; + _base.state.tokens[_base.state.tokens.length - 1].identifierRole = _index.IdentifierRole.ImportDeclaration; + _base.state.tokens[_base.state.tokens.length - 4].isType = true; + _base.state.tokens[_base.state.tokens.length - 3].isType = true; + _base.state.tokens[_base.state.tokens.length - 2].isType = true; + _base.state.tokens[_base.state.tokens.length - 1].isType = true; +} exports.tsParseImportSpecifier = tsParseImportSpecifier; + +/** + * Just like named import specifiers, export specifiers can have from 1 to 4 + * tokens, inclusive, and the number of tokens determines the role of each token. + */ + function tsParseExportSpecifier() { + _expression.parseIdentifier.call(void 0, ); + if (_index.match.call(void 0, _types.TokenType.comma) || _index.match.call(void 0, _types.TokenType.braceR)) { + // export {foo} + _base.state.tokens[_base.state.tokens.length - 1].identifierRole = _index.IdentifierRole.ExportAccess; + return; + } + _expression.parseIdentifier.call(void 0, ); + if (_index.match.call(void 0, _types.TokenType.comma) || _index.match.call(void 0, _types.TokenType.braceR)) { + // export {type foo} + _base.state.tokens[_base.state.tokens.length - 1].identifierRole = _index.IdentifierRole.ExportAccess; + _base.state.tokens[_base.state.tokens.length - 2].isType = true; + _base.state.tokens[_base.state.tokens.length - 1].isType = true; + return; + } + _expression.parseIdentifier.call(void 0, ); + if (_index.match.call(void 0, _types.TokenType.comma) || _index.match.call(void 0, _types.TokenType.braceR)) { + // export {foo as bar} + _base.state.tokens[_base.state.tokens.length - 3].identifierRole = _index.IdentifierRole.ExportAccess; + return; + } + _expression.parseIdentifier.call(void 0, ); + // export {type foo as bar} + _base.state.tokens[_base.state.tokens.length - 3].identifierRole = _index.IdentifierRole.ExportAccess; + _base.state.tokens[_base.state.tokens.length - 4].isType = true; + _base.state.tokens[_base.state.tokens.length - 3].isType = true; + _base.state.tokens[_base.state.tokens.length - 2].isType = true; + _base.state.tokens[_base.state.tokens.length - 1].isType = true; +} exports.tsParseExportSpecifier = tsParseExportSpecifier; + + function tsTryParseExportDefaultExpression() { + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._abstract) && _index.lookaheadType.call(void 0, ) === _types.TokenType._class) { + _base.state.type = _types.TokenType._abstract; + _index.next.call(void 0, ); // Skip "abstract" + _statement.parseClass.call(void 0, true, true); + return true; + } + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._interface)) { + // Make sure "export default" are considered type tokens so the whole thing is removed. + const oldIsType = _index.pushTypeContext.call(void 0, 2); + tsParseDeclaration(_keywords.ContextualKeyword._interface, true); + _index.popTypeContext.call(void 0, oldIsType); + return true; + } + return false; +} exports.tsTryParseExportDefaultExpression = tsTryParseExportDefaultExpression; + + function tsTryParseStatementContent() { + if (_base.state.type === _types.TokenType._const) { + const ahead = _index.lookaheadTypeAndKeyword.call(void 0, ); + if (ahead.type === _types.TokenType.name && ahead.contextualKeyword === _keywords.ContextualKeyword._enum) { + _util.expect.call(void 0, _types.TokenType._const); + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._enum); + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._enum; + tsParseEnumDeclaration(); + return true; + } + } + return false; +} exports.tsTryParseStatementContent = tsTryParseStatementContent; + + function tsTryParseClassMemberWithIsStatic(isStatic) { + const memberStartIndexAfterStatic = _base.state.tokens.length; + tsParseModifiers([ + _keywords.ContextualKeyword._abstract, + _keywords.ContextualKeyword._readonly, + _keywords.ContextualKeyword._declare, + _keywords.ContextualKeyword._static, + _keywords.ContextualKeyword._override, + ]); + + const modifiersEndIndex = _base.state.tokens.length; + const found = tsTryParseIndexSignature(); + if (found) { + // Index signatures are type declarations, so set the modifier tokens as + // type tokens. Most tokens could be assumed to be type tokens, but `static` + // is ambiguous unless we set it explicitly here. + const memberStartIndex = isStatic + ? memberStartIndexAfterStatic - 1 + : memberStartIndexAfterStatic; + for (let i = memberStartIndex; i < modifiersEndIndex; i++) { + _base.state.tokens[i].isType = true; + } + return true; + } + return false; +} exports.tsTryParseClassMemberWithIsStatic = tsTryParseClassMemberWithIsStatic; + +// Note: The reason we do this in `parseIdentifierStatement` and not `parseStatement` +// is that e.g. `type()` is valid JS, so we must try parsing that first. +// If it's really a type, we will parse `type` as the statement, and can correct it here +// by parsing the rest. + function tsParseIdentifierStatement(contextualKeyword) { + const matched = tsParseExpressionStatement(contextualKeyword); + if (!matched) { + _util.semicolon.call(void 0, ); + } +} exports.tsParseIdentifierStatement = tsParseIdentifierStatement; + + function tsParseExportDeclaration() { + // "export declare" is equivalent to just "export". + const isDeclare = _util.eatContextual.call(void 0, _keywords.ContextualKeyword._declare); + if (isDeclare) { + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._declare; + } + + let matchedDeclaration = false; + if (_index.match.call(void 0, _types.TokenType.name)) { + if (isDeclare) { + const oldIsType = _index.pushTypeContext.call(void 0, 2); + matchedDeclaration = tsTryParseExportDeclaration(); + _index.popTypeContext.call(void 0, oldIsType); + } else { + matchedDeclaration = tsTryParseExportDeclaration(); + } + } + if (!matchedDeclaration) { + if (isDeclare) { + const oldIsType = _index.pushTypeContext.call(void 0, 2); + _statement.parseStatement.call(void 0, true); + _index.popTypeContext.call(void 0, oldIsType); + } else { + _statement.parseStatement.call(void 0, true); + } + } +} exports.tsParseExportDeclaration = tsParseExportDeclaration; + + function tsAfterParseClassSuper(hasSuper) { + if (hasSuper && (_index.match.call(void 0, _types.TokenType.lessThan) || _index.match.call(void 0, _types.TokenType.bitShiftL))) { + tsParseTypeArgumentsWithPossibleBitshift(); + } + if (_util.eatContextual.call(void 0, _keywords.ContextualKeyword._implements)) { + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._implements; + const oldIsType = _index.pushTypeContext.call(void 0, 1); + tsParseHeritageClause(); + _index.popTypeContext.call(void 0, oldIsType); + } +} exports.tsAfterParseClassSuper = tsAfterParseClassSuper; + + function tsStartParseObjPropValue() { + tsTryParseTypeParameters(); +} exports.tsStartParseObjPropValue = tsStartParseObjPropValue; + + function tsStartParseFunctionParams() { + tsTryParseTypeParameters(); +} exports.tsStartParseFunctionParams = tsStartParseFunctionParams; + +// `let x: number;` + function tsAfterParseVarHead() { + const oldIsType = _index.pushTypeContext.call(void 0, 0); + if (!_util.hasPrecedingLineBreak.call(void 0, )) { + _index.eat.call(void 0, _types.TokenType.bang); + } + tsTryParseTypeAnnotation(); + _index.popTypeContext.call(void 0, oldIsType); +} exports.tsAfterParseVarHead = tsAfterParseVarHead; + +// parse the return type of an async arrow function - let foo = (async (): number => {}); + function tsStartParseAsyncArrowFromCallExpression() { + if (_index.match.call(void 0, _types.TokenType.colon)) { + tsParseTypeAnnotation(); + } +} exports.tsStartParseAsyncArrowFromCallExpression = tsStartParseAsyncArrowFromCallExpression; + +// Returns true if the expression was an arrow function. + function tsParseMaybeAssign(noIn, isWithinParens) { + // Note: When the JSX plugin is on, type assertions (` x`) aren't valid syntax. + if (_base.isJSXEnabled) { + return tsParseMaybeAssignWithJSX(noIn, isWithinParens); + } else { + return tsParseMaybeAssignWithoutJSX(noIn, isWithinParens); + } +} exports.tsParseMaybeAssign = tsParseMaybeAssign; + + function tsParseMaybeAssignWithJSX(noIn, isWithinParens) { + if (!_index.match.call(void 0, _types.TokenType.lessThan)) { + return _expression.baseParseMaybeAssign.call(void 0, noIn, isWithinParens); + } + + // Prefer to parse JSX if possible. But may be an arrow fn. + const snapshot = _base.state.snapshot(); + let wasArrow = _expression.baseParseMaybeAssign.call(void 0, noIn, isWithinParens); + if (_base.state.error) { + _base.state.restoreFromSnapshot(snapshot); + } else { + return wasArrow; + } + + // Otherwise, try as type-parameterized arrow function. + _base.state.type = _types.TokenType.typeParameterStart; + // This is similar to TypeScript's `tryParseParenthesizedArrowFunctionExpression`. + tsParseTypeParameters(); + wasArrow = _expression.baseParseMaybeAssign.call(void 0, noIn, isWithinParens); + if (!wasArrow) { + _util.unexpected.call(void 0, ); + } + + return wasArrow; +} exports.tsParseMaybeAssignWithJSX = tsParseMaybeAssignWithJSX; + + function tsParseMaybeAssignWithoutJSX(noIn, isWithinParens) { + if (!_index.match.call(void 0, _types.TokenType.lessThan)) { + return _expression.baseParseMaybeAssign.call(void 0, noIn, isWithinParens); + } + + const snapshot = _base.state.snapshot(); + // This is similar to TypeScript's `tryParseParenthesizedArrowFunctionExpression`. + tsParseTypeParameters(); + const wasArrow = _expression.baseParseMaybeAssign.call(void 0, noIn, isWithinParens); + if (!wasArrow) { + _util.unexpected.call(void 0, ); + } + if (_base.state.error) { + _base.state.restoreFromSnapshot(snapshot); + } else { + return wasArrow; + } + + // Try parsing a type cast instead of an arrow function. + // This will start with a type assertion (via parseMaybeUnary). + // But don't directly call `tsParseTypeAssertion` because we want to handle any binary after it. + return _expression.baseParseMaybeAssign.call(void 0, noIn, isWithinParens); +} exports.tsParseMaybeAssignWithoutJSX = tsParseMaybeAssignWithoutJSX; + + function tsParseArrow() { + if (_index.match.call(void 0, _types.TokenType.colon)) { + // This is different from how the TS parser does it. + // TS uses lookahead. Babylon parses it as a parenthesized expression and converts. + const snapshot = _base.state.snapshot(); + + tsParseTypeOrTypePredicateAnnotation(_types.TokenType.colon); + if (_util.canInsertSemicolon.call(void 0, )) _util.unexpected.call(void 0, ); + if (!_index.match.call(void 0, _types.TokenType.arrow)) _util.unexpected.call(void 0, ); + + if (_base.state.error) { + _base.state.restoreFromSnapshot(snapshot); + } + } + return _index.eat.call(void 0, _types.TokenType.arrow); +} exports.tsParseArrow = tsParseArrow; + +// Allow type annotations inside of a parameter list. + function tsParseAssignableListItemTypes() { + const oldIsType = _index.pushTypeContext.call(void 0, 0); + _index.eat.call(void 0, _types.TokenType.question); + tsTryParseTypeAnnotation(); + _index.popTypeContext.call(void 0, oldIsType); +} exports.tsParseAssignableListItemTypes = tsParseAssignableListItemTypes; + + function tsParseMaybeDecoratorArguments() { + if (_index.match.call(void 0, _types.TokenType.lessThan) || _index.match.call(void 0, _types.TokenType.bitShiftL)) { + tsParseTypeArgumentsWithPossibleBitshift(); + } + _statement.baseParseMaybeDecoratorArguments.call(void 0, ); +} exports.tsParseMaybeDecoratorArguments = tsParseMaybeDecoratorArguments; diff --git a/node_modules/sucrase/dist/parser/tokenizer/index.js b/node_modules/sucrase/dist/parser/tokenizer/index.js new file mode 100644 index 0000000..84f5e14 --- /dev/null +++ b/node_modules/sucrase/dist/parser/tokenizer/index.js @@ -0,0 +1,1004 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/* eslint max-len: 0 */ + +var _base = require('../traverser/base'); +var _util = require('../traverser/util'); +var _charcodes = require('../util/charcodes'); +var _identifier = require('../util/identifier'); +var _whitespace = require('../util/whitespace'); +var _keywords = require('./keywords'); +var _readWord = require('./readWord'); var _readWord2 = _interopRequireDefault(_readWord); +var _types = require('./types'); + +var IdentifierRole; (function (IdentifierRole) { + const Access = 0; IdentifierRole[IdentifierRole["Access"] = Access] = "Access"; + const ExportAccess = Access + 1; IdentifierRole[IdentifierRole["ExportAccess"] = ExportAccess] = "ExportAccess"; + const TopLevelDeclaration = ExportAccess + 1; IdentifierRole[IdentifierRole["TopLevelDeclaration"] = TopLevelDeclaration] = "TopLevelDeclaration"; + const FunctionScopedDeclaration = TopLevelDeclaration + 1; IdentifierRole[IdentifierRole["FunctionScopedDeclaration"] = FunctionScopedDeclaration] = "FunctionScopedDeclaration"; + const BlockScopedDeclaration = FunctionScopedDeclaration + 1; IdentifierRole[IdentifierRole["BlockScopedDeclaration"] = BlockScopedDeclaration] = "BlockScopedDeclaration"; + const ObjectShorthandTopLevelDeclaration = BlockScopedDeclaration + 1; IdentifierRole[IdentifierRole["ObjectShorthandTopLevelDeclaration"] = ObjectShorthandTopLevelDeclaration] = "ObjectShorthandTopLevelDeclaration"; + const ObjectShorthandFunctionScopedDeclaration = ObjectShorthandTopLevelDeclaration + 1; IdentifierRole[IdentifierRole["ObjectShorthandFunctionScopedDeclaration"] = ObjectShorthandFunctionScopedDeclaration] = "ObjectShorthandFunctionScopedDeclaration"; + const ObjectShorthandBlockScopedDeclaration = ObjectShorthandFunctionScopedDeclaration + 1; IdentifierRole[IdentifierRole["ObjectShorthandBlockScopedDeclaration"] = ObjectShorthandBlockScopedDeclaration] = "ObjectShorthandBlockScopedDeclaration"; + const ObjectShorthand = ObjectShorthandBlockScopedDeclaration + 1; IdentifierRole[IdentifierRole["ObjectShorthand"] = ObjectShorthand] = "ObjectShorthand"; + // Any identifier bound in an import statement, e.g. both A and b from + // `import A, * as b from 'A';` + const ImportDeclaration = ObjectShorthand + 1; IdentifierRole[IdentifierRole["ImportDeclaration"] = ImportDeclaration] = "ImportDeclaration"; + const ObjectKey = ImportDeclaration + 1; IdentifierRole[IdentifierRole["ObjectKey"] = ObjectKey] = "ObjectKey"; + // The `foo` in `import {foo as bar} from "./abc";`. + const ImportAccess = ObjectKey + 1; IdentifierRole[IdentifierRole["ImportAccess"] = ImportAccess] = "ImportAccess"; +})(IdentifierRole || (exports.IdentifierRole = IdentifierRole = {})); + +/** + * Extra information on jsxTagStart tokens, used to determine which of the three + * jsx functions are called in the automatic transform. + */ +var JSXRole; (function (JSXRole) { + // The element is self-closing or has a body that resolves to empty. We + // shouldn't emit children at all in this case. + const NoChildren = 0; JSXRole[JSXRole["NoChildren"] = NoChildren] = "NoChildren"; + // The element has a single explicit child, which might still be an arbitrary + // expression like an array. We should emit that expression as the children. + const OneChild = NoChildren + 1; JSXRole[JSXRole["OneChild"] = OneChild] = "OneChild"; + // The element has at least two explicitly-specified children or has spread + // children, so child positions are assumed to be "static". We should wrap + // these children in an array. + const StaticChildren = OneChild + 1; JSXRole[JSXRole["StaticChildren"] = StaticChildren] = "StaticChildren"; + // The element has a prop named "key" after a prop spread, so we should fall + // back to the createElement function. + const KeyAfterPropSpread = StaticChildren + 1; JSXRole[JSXRole["KeyAfterPropSpread"] = KeyAfterPropSpread] = "KeyAfterPropSpread"; +})(JSXRole || (exports.JSXRole = JSXRole = {})); + + function isDeclaration(token) { + const role = token.identifierRole; + return ( + role === IdentifierRole.TopLevelDeclaration || + role === IdentifierRole.FunctionScopedDeclaration || + role === IdentifierRole.BlockScopedDeclaration || + role === IdentifierRole.ObjectShorthandTopLevelDeclaration || + role === IdentifierRole.ObjectShorthandFunctionScopedDeclaration || + role === IdentifierRole.ObjectShorthandBlockScopedDeclaration + ); +} exports.isDeclaration = isDeclaration; + + function isNonTopLevelDeclaration(token) { + const role = token.identifierRole; + return ( + role === IdentifierRole.FunctionScopedDeclaration || + role === IdentifierRole.BlockScopedDeclaration || + role === IdentifierRole.ObjectShorthandFunctionScopedDeclaration || + role === IdentifierRole.ObjectShorthandBlockScopedDeclaration + ); +} exports.isNonTopLevelDeclaration = isNonTopLevelDeclaration; + + function isTopLevelDeclaration(token) { + const role = token.identifierRole; + return ( + role === IdentifierRole.TopLevelDeclaration || + role === IdentifierRole.ObjectShorthandTopLevelDeclaration || + role === IdentifierRole.ImportDeclaration + ); +} exports.isTopLevelDeclaration = isTopLevelDeclaration; + + function isBlockScopedDeclaration(token) { + const role = token.identifierRole; + // Treat top-level declarations as block scope since the distinction doesn't matter here. + return ( + role === IdentifierRole.TopLevelDeclaration || + role === IdentifierRole.BlockScopedDeclaration || + role === IdentifierRole.ObjectShorthandTopLevelDeclaration || + role === IdentifierRole.ObjectShorthandBlockScopedDeclaration + ); +} exports.isBlockScopedDeclaration = isBlockScopedDeclaration; + + function isFunctionScopedDeclaration(token) { + const role = token.identifierRole; + return ( + role === IdentifierRole.FunctionScopedDeclaration || + role === IdentifierRole.ObjectShorthandFunctionScopedDeclaration + ); +} exports.isFunctionScopedDeclaration = isFunctionScopedDeclaration; + + function isObjectShorthandDeclaration(token) { + return ( + token.identifierRole === IdentifierRole.ObjectShorthandTopLevelDeclaration || + token.identifierRole === IdentifierRole.ObjectShorthandBlockScopedDeclaration || + token.identifierRole === IdentifierRole.ObjectShorthandFunctionScopedDeclaration + ); +} exports.isObjectShorthandDeclaration = isObjectShorthandDeclaration; + +// Object type used to represent tokens. Note that normally, tokens +// simply exist as properties on the parser object. This is only +// used for the onToken callback and the external tokenizer. + class Token { + constructor() { + this.type = _base.state.type; + this.contextualKeyword = _base.state.contextualKeyword; + this.start = _base.state.start; + this.end = _base.state.end; + this.scopeDepth = _base.state.scopeDepth; + this.isType = _base.state.isType; + this.identifierRole = null; + this.jsxRole = null; + this.shadowsGlobal = false; + this.isAsyncOperation = false; + this.contextId = null; + this.rhsEndIndex = null; + this.isExpression = false; + this.numNullishCoalesceStarts = 0; + this.numNullishCoalesceEnds = 0; + this.isOptionalChainStart = false; + this.isOptionalChainEnd = false; + this.subscriptStartIndex = null; + this.nullishStartIndex = null; + } + + + + + + + + + + // Initially false for all tokens, then may be computed in a follow-up step that does scope + // analysis. + + // Initially false for all tokens, but may be set during transform to mark it as containing an + // await operation. + + + // For assignments, the index of the RHS. For export tokens, the end of the export. + + // For class tokens, records if the class is a class expression or a class statement. + + // Number of times to insert a `nullishCoalesce(` snippet before this token. + + // Number of times to insert a `)` snippet after this token. + + // If true, insert an `optionalChain([` snippet before this token. + + // If true, insert a `])` snippet after this token. + + // Tag for `.`, `?.`, `[`, `?.[`, `(`, and `?.(` to denote the "root" token for this + // subscript chain. This can be used to determine if this chain is an optional chain. + + // Tag for `??` operators to denote the root token for this nullish coalescing call. + +} exports.Token = Token; + +// ## Tokenizer + +// Move to the next token + function next() { + _base.state.tokens.push(new Token()); + nextToken(); +} exports.next = next; + +// Call instead of next when inside a template, since that needs to be handled differently. + function nextTemplateToken() { + _base.state.tokens.push(new Token()); + _base.state.start = _base.state.pos; + readTmplToken(); +} exports.nextTemplateToken = nextTemplateToken; + +// The tokenizer never parses regexes by default. Instead, the parser is responsible for +// instructing it to parse a regex when we see a slash at the start of an expression. + function retokenizeSlashAsRegex() { + if (_base.state.type === _types.TokenType.assign) { + --_base.state.pos; + } + readRegexp(); +} exports.retokenizeSlashAsRegex = retokenizeSlashAsRegex; + + function pushTypeContext(existingTokensInType) { + for (let i = _base.state.tokens.length - existingTokensInType; i < _base.state.tokens.length; i++) { + _base.state.tokens[i].isType = true; + } + const oldIsType = _base.state.isType; + _base.state.isType = true; + return oldIsType; +} exports.pushTypeContext = pushTypeContext; + + function popTypeContext(oldIsType) { + _base.state.isType = oldIsType; +} exports.popTypeContext = popTypeContext; + + function eat(type) { + if (match(type)) { + next(); + return true; + } else { + return false; + } +} exports.eat = eat; + + function eatTypeToken(tokenType) { + const oldIsType = _base.state.isType; + _base.state.isType = true; + eat(tokenType); + _base.state.isType = oldIsType; +} exports.eatTypeToken = eatTypeToken; + + function match(type) { + return _base.state.type === type; +} exports.match = match; + + function lookaheadType() { + const snapshot = _base.state.snapshot(); + next(); + const type = _base.state.type; + _base.state.restoreFromSnapshot(snapshot); + return type; +} exports.lookaheadType = lookaheadType; + + class TypeAndKeyword { + + + constructor(type, contextualKeyword) { + this.type = type; + this.contextualKeyword = contextualKeyword; + } +} exports.TypeAndKeyword = TypeAndKeyword; + + function lookaheadTypeAndKeyword() { + const snapshot = _base.state.snapshot(); + next(); + const type = _base.state.type; + const contextualKeyword = _base.state.contextualKeyword; + _base.state.restoreFromSnapshot(snapshot); + return new TypeAndKeyword(type, contextualKeyword); +} exports.lookaheadTypeAndKeyword = lookaheadTypeAndKeyword; + + function nextTokenStart() { + return nextTokenStartSince(_base.state.pos); +} exports.nextTokenStart = nextTokenStart; + + function nextTokenStartSince(pos) { + _whitespace.skipWhiteSpace.lastIndex = pos; + const skip = _whitespace.skipWhiteSpace.exec(_base.input); + return pos + skip[0].length; +} exports.nextTokenStartSince = nextTokenStartSince; + + function lookaheadCharCode() { + return _base.input.charCodeAt(nextTokenStart()); +} exports.lookaheadCharCode = lookaheadCharCode; + +// Read a single token, updating the parser object's token-related +// properties. + function nextToken() { + skipSpace(); + _base.state.start = _base.state.pos; + if (_base.state.pos >= _base.input.length) { + const tokens = _base.state.tokens; + // We normally run past the end a bit, but if we're way past the end, avoid an infinite loop. + // Also check the token positions rather than the types since sometimes we rewrite the token + // type to something else. + if ( + tokens.length >= 2 && + tokens[tokens.length - 1].start >= _base.input.length && + tokens[tokens.length - 2].start >= _base.input.length + ) { + _util.unexpected.call(void 0, "Unexpectedly reached the end of input."); + } + finishToken(_types.TokenType.eof); + return; + } + readToken(_base.input.charCodeAt(_base.state.pos)); +} exports.nextToken = nextToken; + +function readToken(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if ( + _identifier.IS_IDENTIFIER_START[code] || + code === _charcodes.charCodes.backslash || + (code === _charcodes.charCodes.atSign && _base.input.charCodeAt(_base.state.pos + 1) === _charcodes.charCodes.atSign) + ) { + _readWord2.default.call(void 0, ); + } else { + getTokenFromCode(code); + } +} + +function skipBlockComment() { + while ( + _base.input.charCodeAt(_base.state.pos) !== _charcodes.charCodes.asterisk || + _base.input.charCodeAt(_base.state.pos + 1) !== _charcodes.charCodes.slash + ) { + _base.state.pos++; + if (_base.state.pos > _base.input.length) { + _util.unexpected.call(void 0, "Unterminated comment", _base.state.pos - 2); + return; + } + } + _base.state.pos += 2; +} + + function skipLineComment(startSkip) { + let ch = _base.input.charCodeAt((_base.state.pos += startSkip)); + if (_base.state.pos < _base.input.length) { + while ( + ch !== _charcodes.charCodes.lineFeed && + ch !== _charcodes.charCodes.carriageReturn && + ch !== _charcodes.charCodes.lineSeparator && + ch !== _charcodes.charCodes.paragraphSeparator && + ++_base.state.pos < _base.input.length + ) { + ch = _base.input.charCodeAt(_base.state.pos); + } + } +} exports.skipLineComment = skipLineComment; + +// Called at the start of the parse and after every token. Skips +// whitespace and comments. + function skipSpace() { + while (_base.state.pos < _base.input.length) { + const ch = _base.input.charCodeAt(_base.state.pos); + switch (ch) { + case _charcodes.charCodes.carriageReturn: + if (_base.input.charCodeAt(_base.state.pos + 1) === _charcodes.charCodes.lineFeed) { + ++_base.state.pos; + } + + case _charcodes.charCodes.lineFeed: + case _charcodes.charCodes.lineSeparator: + case _charcodes.charCodes.paragraphSeparator: + ++_base.state.pos; + break; + + case _charcodes.charCodes.slash: + switch (_base.input.charCodeAt(_base.state.pos + 1)) { + case _charcodes.charCodes.asterisk: + _base.state.pos += 2; + skipBlockComment(); + break; + + case _charcodes.charCodes.slash: + skipLineComment(2); + break; + + default: + return; + } + break; + + default: + if (_whitespace.IS_WHITESPACE[ch]) { + ++_base.state.pos; + } else { + return; + } + } + } +} exports.skipSpace = skipSpace; + +// Called at the end of every token. Sets various fields, and skips the space after the token, so +// that the next one's `start` will point at the right position. + function finishToken( + type, + contextualKeyword = _keywords.ContextualKeyword.NONE, +) { + _base.state.end = _base.state.pos; + _base.state.type = type; + _base.state.contextualKeyword = contextualKeyword; +} exports.finishToken = finishToken; + +// ### Token reading + +// This is the function that is called to fetch the next token. It +// is somewhat obscure, because it works in character codes rather +// than characters, and because operator parsing has been inlined +// into it. +// +// All in the name of speed. +function readToken_dot() { + const nextChar = _base.input.charCodeAt(_base.state.pos + 1); + if (nextChar >= _charcodes.charCodes.digit0 && nextChar <= _charcodes.charCodes.digit9) { + readNumber(true); + return; + } + + if (nextChar === _charcodes.charCodes.dot && _base.input.charCodeAt(_base.state.pos + 2) === _charcodes.charCodes.dot) { + _base.state.pos += 3; + finishToken(_types.TokenType.ellipsis); + } else { + ++_base.state.pos; + finishToken(_types.TokenType.dot); + } +} + +function readToken_slash() { + const nextChar = _base.input.charCodeAt(_base.state.pos + 1); + if (nextChar === _charcodes.charCodes.equalsTo) { + finishOp(_types.TokenType.assign, 2); + } else { + finishOp(_types.TokenType.slash, 1); + } +} + +function readToken_mult_modulo(code) { + // '%*' + let tokenType = code === _charcodes.charCodes.asterisk ? _types.TokenType.star : _types.TokenType.modulo; + let width = 1; + let nextChar = _base.input.charCodeAt(_base.state.pos + 1); + + // Exponentiation operator ** + if (code === _charcodes.charCodes.asterisk && nextChar === _charcodes.charCodes.asterisk) { + width++; + nextChar = _base.input.charCodeAt(_base.state.pos + 2); + tokenType = _types.TokenType.exponent; + } + + // Match *= or %=, disallowing *=> which can be valid in flow. + if ( + nextChar === _charcodes.charCodes.equalsTo && + _base.input.charCodeAt(_base.state.pos + 2) !== _charcodes.charCodes.greaterThan + ) { + width++; + tokenType = _types.TokenType.assign; + } + + finishOp(tokenType, width); +} + +function readToken_pipe_amp(code) { + // '|&' + const nextChar = _base.input.charCodeAt(_base.state.pos + 1); + + if (nextChar === code) { + if (_base.input.charCodeAt(_base.state.pos + 2) === _charcodes.charCodes.equalsTo) { + // ||= or &&= + finishOp(_types.TokenType.assign, 3); + } else { + // || or && + finishOp(code === _charcodes.charCodes.verticalBar ? _types.TokenType.logicalOR : _types.TokenType.logicalAND, 2); + } + return; + } + + if (code === _charcodes.charCodes.verticalBar) { + // '|>' + if (nextChar === _charcodes.charCodes.greaterThan) { + finishOp(_types.TokenType.pipeline, 2); + return; + } else if (nextChar === _charcodes.charCodes.rightCurlyBrace && _base.isFlowEnabled) { + // '|}' + finishOp(_types.TokenType.braceBarR, 2); + return; + } + } + + if (nextChar === _charcodes.charCodes.equalsTo) { + finishOp(_types.TokenType.assign, 2); + return; + } + + finishOp(code === _charcodes.charCodes.verticalBar ? _types.TokenType.bitwiseOR : _types.TokenType.bitwiseAND, 1); +} + +function readToken_caret() { + // '^' + const nextChar = _base.input.charCodeAt(_base.state.pos + 1); + if (nextChar === _charcodes.charCodes.equalsTo) { + finishOp(_types.TokenType.assign, 2); + } else { + finishOp(_types.TokenType.bitwiseXOR, 1); + } +} + +function readToken_plus_min(code) { + // '+-' + const nextChar = _base.input.charCodeAt(_base.state.pos + 1); + + if (nextChar === code) { + // Tentatively call this a prefix operator, but it might be changed to postfix later. + finishOp(_types.TokenType.preIncDec, 2); + return; + } + + if (nextChar === _charcodes.charCodes.equalsTo) { + finishOp(_types.TokenType.assign, 2); + } else if (code === _charcodes.charCodes.plusSign) { + finishOp(_types.TokenType.plus, 1); + } else { + finishOp(_types.TokenType.minus, 1); + } +} + +function readToken_lt() { + const nextChar = _base.input.charCodeAt(_base.state.pos + 1); + + if (nextChar === _charcodes.charCodes.lessThan) { + if (_base.input.charCodeAt(_base.state.pos + 2) === _charcodes.charCodes.equalsTo) { + finishOp(_types.TokenType.assign, 3); + return; + } + // We see <<, but need to be really careful about whether to treat it as a + // true left-shift or as two < tokens. + if (_base.state.isType) { + // Within a type, << might come up in a snippet like `Array<() => void>`, + // so treat it as two < tokens. Importantly, this should only override << + // rather than other tokens like <= . If we treated <= as < in a type + // context, then the snippet `a as T <= 1` would incorrectly start parsing + // a type argument on T. We don't need to worry about `a as T << 1` + // because TypeScript disallows that syntax. + finishOp(_types.TokenType.lessThan, 1); + } else { + // Outside a type, this might be a true left-shift operator, or it might + // still be two open-type-arg tokens, such as in `f<() => void>()`. We + // look at the token while considering the `f`, so we don't yet know that + // we're in a type context. In this case, we initially tokenize as a + // left-shift and correct after-the-fact as necessary in + // tsParseTypeArgumentsWithPossibleBitshift . + finishOp(_types.TokenType.bitShiftL, 2); + } + return; + } + + if (nextChar === _charcodes.charCodes.equalsTo) { + // <= + finishOp(_types.TokenType.relationalOrEqual, 2); + } else { + finishOp(_types.TokenType.lessThan, 1); + } +} + +function readToken_gt() { + if (_base.state.isType) { + // Avoid right-shift for things like `Array>` and + // greater-than-or-equal for things like `const a: Array=[];`. + finishOp(_types.TokenType.greaterThan, 1); + return; + } + + const nextChar = _base.input.charCodeAt(_base.state.pos + 1); + + if (nextChar === _charcodes.charCodes.greaterThan) { + const size = _base.input.charCodeAt(_base.state.pos + 2) === _charcodes.charCodes.greaterThan ? 3 : 2; + if (_base.input.charCodeAt(_base.state.pos + size) === _charcodes.charCodes.equalsTo) { + finishOp(_types.TokenType.assign, size + 1); + return; + } + finishOp(_types.TokenType.bitShiftR, size); + return; + } + + if (nextChar === _charcodes.charCodes.equalsTo) { + // >= + finishOp(_types.TokenType.relationalOrEqual, 2); + } else { + finishOp(_types.TokenType.greaterThan, 1); + } +} + +/** + * Reinterpret a possible > token when transitioning from a type to a non-type + * context. + * + * This comes up in two situations where >= needs to be treated as one token: + * - After an `as` expression, like in the code `a as T >= 1`. + * - In a type argument in an expression context, e.g. `f(a < b, c >= d)`, we + * need to see the token as >= so that we get an error and backtrack to + * normal expression parsing. + * + * Other situations require >= to be seen as two tokens, e.g. + * `const x: Array=[];`, so it's important to treat > as its own token in + * typical type parsing situations. + */ + function rescan_gt() { + if (_base.state.type === _types.TokenType.greaterThan) { + _base.state.pos -= 1; + readToken_gt(); + } +} exports.rescan_gt = rescan_gt; + +function readToken_eq_excl(code) { + // '=!' + const nextChar = _base.input.charCodeAt(_base.state.pos + 1); + if (nextChar === _charcodes.charCodes.equalsTo) { + finishOp(_types.TokenType.equality, _base.input.charCodeAt(_base.state.pos + 2) === _charcodes.charCodes.equalsTo ? 3 : 2); + return; + } + if (code === _charcodes.charCodes.equalsTo && nextChar === _charcodes.charCodes.greaterThan) { + // '=>' + _base.state.pos += 2; + finishToken(_types.TokenType.arrow); + return; + } + finishOp(code === _charcodes.charCodes.equalsTo ? _types.TokenType.eq : _types.TokenType.bang, 1); +} + +function readToken_question() { + // '?' + const nextChar = _base.input.charCodeAt(_base.state.pos + 1); + const nextChar2 = _base.input.charCodeAt(_base.state.pos + 2); + if ( + nextChar === _charcodes.charCodes.questionMark && + // In Flow (but not TypeScript), ??string is a valid type that should be + // tokenized as two individual ? tokens. + !(_base.isFlowEnabled && _base.state.isType) + ) { + if (nextChar2 === _charcodes.charCodes.equalsTo) { + // '??=' + finishOp(_types.TokenType.assign, 3); + } else { + // '??' + finishOp(_types.TokenType.nullishCoalescing, 2); + } + } else if ( + nextChar === _charcodes.charCodes.dot && + !(nextChar2 >= _charcodes.charCodes.digit0 && nextChar2 <= _charcodes.charCodes.digit9) + ) { + // '.' not followed by a number + _base.state.pos += 2; + finishToken(_types.TokenType.questionDot); + } else { + ++_base.state.pos; + finishToken(_types.TokenType.question); + } +} + + function getTokenFromCode(code) { + switch (code) { + case _charcodes.charCodes.numberSign: + ++_base.state.pos; + finishToken(_types.TokenType.hash); + return; + + // The interpretation of a dot depends on whether it is followed + // by a digit or another two dots. + + case _charcodes.charCodes.dot: + readToken_dot(); + return; + + // Punctuation tokens. + case _charcodes.charCodes.leftParenthesis: + ++_base.state.pos; + finishToken(_types.TokenType.parenL); + return; + case _charcodes.charCodes.rightParenthesis: + ++_base.state.pos; + finishToken(_types.TokenType.parenR); + return; + case _charcodes.charCodes.semicolon: + ++_base.state.pos; + finishToken(_types.TokenType.semi); + return; + case _charcodes.charCodes.comma: + ++_base.state.pos; + finishToken(_types.TokenType.comma); + return; + case _charcodes.charCodes.leftSquareBracket: + ++_base.state.pos; + finishToken(_types.TokenType.bracketL); + return; + case _charcodes.charCodes.rightSquareBracket: + ++_base.state.pos; + finishToken(_types.TokenType.bracketR); + return; + + case _charcodes.charCodes.leftCurlyBrace: + if (_base.isFlowEnabled && _base.input.charCodeAt(_base.state.pos + 1) === _charcodes.charCodes.verticalBar) { + finishOp(_types.TokenType.braceBarL, 2); + } else { + ++_base.state.pos; + finishToken(_types.TokenType.braceL); + } + return; + + case _charcodes.charCodes.rightCurlyBrace: + ++_base.state.pos; + finishToken(_types.TokenType.braceR); + return; + + case _charcodes.charCodes.colon: + if (_base.input.charCodeAt(_base.state.pos + 1) === _charcodes.charCodes.colon) { + finishOp(_types.TokenType.doubleColon, 2); + } else { + ++_base.state.pos; + finishToken(_types.TokenType.colon); + } + return; + + case _charcodes.charCodes.questionMark: + readToken_question(); + return; + case _charcodes.charCodes.atSign: + ++_base.state.pos; + finishToken(_types.TokenType.at); + return; + + case _charcodes.charCodes.graveAccent: + ++_base.state.pos; + finishToken(_types.TokenType.backQuote); + return; + + case _charcodes.charCodes.digit0: { + const nextChar = _base.input.charCodeAt(_base.state.pos + 1); + // '0x', '0X', '0o', '0O', '0b', '0B' + if ( + nextChar === _charcodes.charCodes.lowercaseX || + nextChar === _charcodes.charCodes.uppercaseX || + nextChar === _charcodes.charCodes.lowercaseO || + nextChar === _charcodes.charCodes.uppercaseO || + nextChar === _charcodes.charCodes.lowercaseB || + nextChar === _charcodes.charCodes.uppercaseB + ) { + readRadixNumber(); + return; + } + } + // Anything else beginning with a digit is an integer, octal + // number, or float. + case _charcodes.charCodes.digit1: + case _charcodes.charCodes.digit2: + case _charcodes.charCodes.digit3: + case _charcodes.charCodes.digit4: + case _charcodes.charCodes.digit5: + case _charcodes.charCodes.digit6: + case _charcodes.charCodes.digit7: + case _charcodes.charCodes.digit8: + case _charcodes.charCodes.digit9: + readNumber(false); + return; + + // Quotes produce strings. + case _charcodes.charCodes.quotationMark: + case _charcodes.charCodes.apostrophe: + readString(code); + return; + + // Operators are parsed inline in tiny state machines. '=' (charCodes.equalsTo) is + // often referred to. `finishOp` simply skips the amount of + // characters it is given as second argument, and returns a token + // of the type given by its first argument. + + case _charcodes.charCodes.slash: + readToken_slash(); + return; + + case _charcodes.charCodes.percentSign: + case _charcodes.charCodes.asterisk: + readToken_mult_modulo(code); + return; + + case _charcodes.charCodes.verticalBar: + case _charcodes.charCodes.ampersand: + readToken_pipe_amp(code); + return; + + case _charcodes.charCodes.caret: + readToken_caret(); + return; + + case _charcodes.charCodes.plusSign: + case _charcodes.charCodes.dash: + readToken_plus_min(code); + return; + + case _charcodes.charCodes.lessThan: + readToken_lt(); + return; + + case _charcodes.charCodes.greaterThan: + readToken_gt(); + return; + + case _charcodes.charCodes.equalsTo: + case _charcodes.charCodes.exclamationMark: + readToken_eq_excl(code); + return; + + case _charcodes.charCodes.tilde: + finishOp(_types.TokenType.tilde, 1); + return; + + default: + break; + } + + _util.unexpected.call(void 0, `Unexpected character '${String.fromCharCode(code)}'`, _base.state.pos); +} exports.getTokenFromCode = getTokenFromCode; + +function finishOp(type, size) { + _base.state.pos += size; + finishToken(type); +} + +function readRegexp() { + const start = _base.state.pos; + let escaped = false; + let inClass = false; + for (;;) { + if (_base.state.pos >= _base.input.length) { + _util.unexpected.call(void 0, "Unterminated regular expression", start); + return; + } + const code = _base.input.charCodeAt(_base.state.pos); + if (escaped) { + escaped = false; + } else { + if (code === _charcodes.charCodes.leftSquareBracket) { + inClass = true; + } else if (code === _charcodes.charCodes.rightSquareBracket && inClass) { + inClass = false; + } else if (code === _charcodes.charCodes.slash && !inClass) { + break; + } + escaped = code === _charcodes.charCodes.backslash; + } + ++_base.state.pos; + } + ++_base.state.pos; + // Need to use `skipWord` because '\uXXXX' sequences are allowed here (don't ask). + skipWord(); + + finishToken(_types.TokenType.regexp); +} + +/** + * Read a decimal integer. Note that this can't be unified with the similar code + * in readRadixNumber (which also handles hex digits) because "e" needs to be + * the end of the integer so that we can properly handle scientific notation. + */ +function readInt() { + while (true) { + const code = _base.input.charCodeAt(_base.state.pos); + if ((code >= _charcodes.charCodes.digit0 && code <= _charcodes.charCodes.digit9) || code === _charcodes.charCodes.underscore) { + _base.state.pos++; + } else { + break; + } + } +} + +function readRadixNumber() { + _base.state.pos += 2; // 0x + + // Walk to the end of the number, allowing hex digits. + while (true) { + const code = _base.input.charCodeAt(_base.state.pos); + if ( + (code >= _charcodes.charCodes.digit0 && code <= _charcodes.charCodes.digit9) || + (code >= _charcodes.charCodes.lowercaseA && code <= _charcodes.charCodes.lowercaseF) || + (code >= _charcodes.charCodes.uppercaseA && code <= _charcodes.charCodes.uppercaseF) || + code === _charcodes.charCodes.underscore + ) { + _base.state.pos++; + } else { + break; + } + } + + const nextChar = _base.input.charCodeAt(_base.state.pos); + if (nextChar === _charcodes.charCodes.lowercaseN) { + ++_base.state.pos; + finishToken(_types.TokenType.bigint); + } else { + finishToken(_types.TokenType.num); + } +} + +// Read an integer, octal integer, or floating-point number. +function readNumber(startsWithDot) { + let isBigInt = false; + let isDecimal = false; + + if (!startsWithDot) { + readInt(); + } + + let nextChar = _base.input.charCodeAt(_base.state.pos); + if (nextChar === _charcodes.charCodes.dot) { + ++_base.state.pos; + readInt(); + nextChar = _base.input.charCodeAt(_base.state.pos); + } + + if (nextChar === _charcodes.charCodes.uppercaseE || nextChar === _charcodes.charCodes.lowercaseE) { + nextChar = _base.input.charCodeAt(++_base.state.pos); + if (nextChar === _charcodes.charCodes.plusSign || nextChar === _charcodes.charCodes.dash) { + ++_base.state.pos; + } + readInt(); + nextChar = _base.input.charCodeAt(_base.state.pos); + } + + if (nextChar === _charcodes.charCodes.lowercaseN) { + ++_base.state.pos; + isBigInt = true; + } else if (nextChar === _charcodes.charCodes.lowercaseM) { + ++_base.state.pos; + isDecimal = true; + } + + if (isBigInt) { + finishToken(_types.TokenType.bigint); + return; + } + + if (isDecimal) { + finishToken(_types.TokenType.decimal); + return; + } + + finishToken(_types.TokenType.num); +} + +function readString(quote) { + _base.state.pos++; + for (;;) { + if (_base.state.pos >= _base.input.length) { + _util.unexpected.call(void 0, "Unterminated string constant"); + return; + } + const ch = _base.input.charCodeAt(_base.state.pos); + if (ch === _charcodes.charCodes.backslash) { + _base.state.pos++; + } else if (ch === quote) { + break; + } + _base.state.pos++; + } + _base.state.pos++; + finishToken(_types.TokenType.string); +} + +// Reads template string tokens. +function readTmplToken() { + for (;;) { + if (_base.state.pos >= _base.input.length) { + _util.unexpected.call(void 0, "Unterminated template"); + return; + } + const ch = _base.input.charCodeAt(_base.state.pos); + if ( + ch === _charcodes.charCodes.graveAccent || + (ch === _charcodes.charCodes.dollarSign && _base.input.charCodeAt(_base.state.pos + 1) === _charcodes.charCodes.leftCurlyBrace) + ) { + if (_base.state.pos === _base.state.start && match(_types.TokenType.template)) { + if (ch === _charcodes.charCodes.dollarSign) { + _base.state.pos += 2; + finishToken(_types.TokenType.dollarBraceL); + return; + } else { + ++_base.state.pos; + finishToken(_types.TokenType.backQuote); + return; + } + } + finishToken(_types.TokenType.template); + return; + } + if (ch === _charcodes.charCodes.backslash) { + _base.state.pos++; + } + _base.state.pos++; + } +} + +// Skip to the end of the current word. Note that this is the same as the snippet at the end of +// readWord, but calling skipWord from readWord seems to slightly hurt performance from some rough +// measurements. + function skipWord() { + while (_base.state.pos < _base.input.length) { + const ch = _base.input.charCodeAt(_base.state.pos); + if (_identifier.IS_IDENTIFIER_CHAR[ch]) { + _base.state.pos++; + } else if (ch === _charcodes.charCodes.backslash) { + // \u + _base.state.pos += 2; + if (_base.input.charCodeAt(_base.state.pos) === _charcodes.charCodes.leftCurlyBrace) { + while ( + _base.state.pos < _base.input.length && + _base.input.charCodeAt(_base.state.pos) !== _charcodes.charCodes.rightCurlyBrace + ) { + _base.state.pos++; + } + _base.state.pos++; + } + } else { + break; + } + } +} exports.skipWord = skipWord; diff --git a/node_modules/sucrase/dist/parser/tokenizer/keywords.js b/node_modules/sucrase/dist/parser/tokenizer/keywords.js new file mode 100644 index 0000000..e741926 --- /dev/null +++ b/node_modules/sucrase/dist/parser/tokenizer/keywords.js @@ -0,0 +1,43 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var ContextualKeyword; (function (ContextualKeyword) { + const NONE = 0; ContextualKeyword[ContextualKeyword["NONE"] = NONE] = "NONE"; + const _abstract = NONE + 1; ContextualKeyword[ContextualKeyword["_abstract"] = _abstract] = "_abstract"; + const _accessor = _abstract + 1; ContextualKeyword[ContextualKeyword["_accessor"] = _accessor] = "_accessor"; + const _as = _accessor + 1; ContextualKeyword[ContextualKeyword["_as"] = _as] = "_as"; + const _assert = _as + 1; ContextualKeyword[ContextualKeyword["_assert"] = _assert] = "_assert"; + const _asserts = _assert + 1; ContextualKeyword[ContextualKeyword["_asserts"] = _asserts] = "_asserts"; + const _async = _asserts + 1; ContextualKeyword[ContextualKeyword["_async"] = _async] = "_async"; + const _await = _async + 1; ContextualKeyword[ContextualKeyword["_await"] = _await] = "_await"; + const _checks = _await + 1; ContextualKeyword[ContextualKeyword["_checks"] = _checks] = "_checks"; + const _constructor = _checks + 1; ContextualKeyword[ContextualKeyword["_constructor"] = _constructor] = "_constructor"; + const _declare = _constructor + 1; ContextualKeyword[ContextualKeyword["_declare"] = _declare] = "_declare"; + const _enum = _declare + 1; ContextualKeyword[ContextualKeyword["_enum"] = _enum] = "_enum"; + const _exports = _enum + 1; ContextualKeyword[ContextualKeyword["_exports"] = _exports] = "_exports"; + const _from = _exports + 1; ContextualKeyword[ContextualKeyword["_from"] = _from] = "_from"; + const _get = _from + 1; ContextualKeyword[ContextualKeyword["_get"] = _get] = "_get"; + const _global = _get + 1; ContextualKeyword[ContextualKeyword["_global"] = _global] = "_global"; + const _implements = _global + 1; ContextualKeyword[ContextualKeyword["_implements"] = _implements] = "_implements"; + const _infer = _implements + 1; ContextualKeyword[ContextualKeyword["_infer"] = _infer] = "_infer"; + const _interface = _infer + 1; ContextualKeyword[ContextualKeyword["_interface"] = _interface] = "_interface"; + const _is = _interface + 1; ContextualKeyword[ContextualKeyword["_is"] = _is] = "_is"; + const _keyof = _is + 1; ContextualKeyword[ContextualKeyword["_keyof"] = _keyof] = "_keyof"; + const _mixins = _keyof + 1; ContextualKeyword[ContextualKeyword["_mixins"] = _mixins] = "_mixins"; + const _module = _mixins + 1; ContextualKeyword[ContextualKeyword["_module"] = _module] = "_module"; + const _namespace = _module + 1; ContextualKeyword[ContextualKeyword["_namespace"] = _namespace] = "_namespace"; + const _of = _namespace + 1; ContextualKeyword[ContextualKeyword["_of"] = _of] = "_of"; + const _opaque = _of + 1; ContextualKeyword[ContextualKeyword["_opaque"] = _opaque] = "_opaque"; + const _out = _opaque + 1; ContextualKeyword[ContextualKeyword["_out"] = _out] = "_out"; + const _override = _out + 1; ContextualKeyword[ContextualKeyword["_override"] = _override] = "_override"; + const _private = _override + 1; ContextualKeyword[ContextualKeyword["_private"] = _private] = "_private"; + const _protected = _private + 1; ContextualKeyword[ContextualKeyword["_protected"] = _protected] = "_protected"; + const _proto = _protected + 1; ContextualKeyword[ContextualKeyword["_proto"] = _proto] = "_proto"; + const _public = _proto + 1; ContextualKeyword[ContextualKeyword["_public"] = _public] = "_public"; + const _readonly = _public + 1; ContextualKeyword[ContextualKeyword["_readonly"] = _readonly] = "_readonly"; + const _require = _readonly + 1; ContextualKeyword[ContextualKeyword["_require"] = _require] = "_require"; + const _satisfies = _require + 1; ContextualKeyword[ContextualKeyword["_satisfies"] = _satisfies] = "_satisfies"; + const _set = _satisfies + 1; ContextualKeyword[ContextualKeyword["_set"] = _set] = "_set"; + const _static = _set + 1; ContextualKeyword[ContextualKeyword["_static"] = _static] = "_static"; + const _symbol = _static + 1; ContextualKeyword[ContextualKeyword["_symbol"] = _symbol] = "_symbol"; + const _type = _symbol + 1; ContextualKeyword[ContextualKeyword["_type"] = _type] = "_type"; + const _unique = _type + 1; ContextualKeyword[ContextualKeyword["_unique"] = _unique] = "_unique"; + const _using = _unique + 1; ContextualKeyword[ContextualKeyword["_using"] = _using] = "_using"; +})(ContextualKeyword || (exports.ContextualKeyword = ContextualKeyword = {})); diff --git a/node_modules/sucrase/dist/parser/tokenizer/readWord.js b/node_modules/sucrase/dist/parser/tokenizer/readWord.js new file mode 100644 index 0000000..69ed5c9 --- /dev/null +++ b/node_modules/sucrase/dist/parser/tokenizer/readWord.js @@ -0,0 +1,64 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _base = require('../traverser/base'); +var _charcodes = require('../util/charcodes'); +var _identifier = require('../util/identifier'); +var _index = require('./index'); +var _readWordTree = require('./readWordTree'); +var _types = require('./types'); + +/** + * Read an identifier, producing either a name token or matching on one of the existing keywords. + * For performance, we pre-generate big decision tree that we traverse. Each node represents a + * prefix and has 27 values, where the first value is the token or contextual token, if any (-1 if + * not), and the other 26 values are the transitions to other nodes, or -1 to stop. + */ + function readWord() { + let treePos = 0; + let code = 0; + let pos = _base.state.pos; + while (pos < _base.input.length) { + code = _base.input.charCodeAt(pos); + if (code < _charcodes.charCodes.lowercaseA || code > _charcodes.charCodes.lowercaseZ) { + break; + } + const next = _readWordTree.READ_WORD_TREE[treePos + (code - _charcodes.charCodes.lowercaseA) + 1]; + if (next === -1) { + break; + } else { + treePos = next; + pos++; + } + } + + const keywordValue = _readWordTree.READ_WORD_TREE[treePos]; + if (keywordValue > -1 && !_identifier.IS_IDENTIFIER_CHAR[code]) { + _base.state.pos = pos; + if (keywordValue & 1) { + _index.finishToken.call(void 0, keywordValue >>> 1); + } else { + _index.finishToken.call(void 0, _types.TokenType.name, keywordValue >>> 1); + } + return; + } + + while (pos < _base.input.length) { + const ch = _base.input.charCodeAt(pos); + if (_identifier.IS_IDENTIFIER_CHAR[ch]) { + pos++; + } else if (ch === _charcodes.charCodes.backslash) { + // \u + pos += 2; + if (_base.input.charCodeAt(pos) === _charcodes.charCodes.leftCurlyBrace) { + while (pos < _base.input.length && _base.input.charCodeAt(pos) !== _charcodes.charCodes.rightCurlyBrace) { + pos++; + } + pos++; + } + } else if (ch === _charcodes.charCodes.atSign && _base.input.charCodeAt(pos + 1) === _charcodes.charCodes.atSign) { + pos += 2; + } else { + break; + } + } + _base.state.pos = pos; + _index.finishToken.call(void 0, _types.TokenType.name); +} exports.default = readWord; diff --git a/node_modules/sucrase/dist/parser/tokenizer/readWordTree.js b/node_modules/sucrase/dist/parser/tokenizer/readWordTree.js new file mode 100644 index 0000000..fcc7733 --- /dev/null +++ b/node_modules/sucrase/dist/parser/tokenizer/readWordTree.js @@ -0,0 +1,671 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});// Generated file, do not edit! Run "yarn generate" to re-generate this file. +var _keywords = require('./keywords'); +var _types = require('./types'); + +// prettier-ignore + const READ_WORD_TREE = new Int32Array([ + // "" + -1, 27, 783, 918, 1755, 2376, 2862, 3483, -1, 3699, -1, 4617, 4752, 4833, 5130, 5508, 5940, -1, 6480, 6939, 7749, 8181, 8451, 8613, -1, 8829, -1, + // "a" + -1, -1, 54, 243, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 432, -1, -1, -1, 675, -1, -1, -1, + // "ab" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1, + // "abs" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, -1, -1, -1, -1, -1, + // "abst" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 135, -1, -1, -1, -1, -1, -1, -1, -1, + // "abstr" + -1, 162, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "abstra" + -1, -1, -1, 189, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "abstrac" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 216, -1, -1, -1, -1, -1, -1, + // "abstract" + _keywords.ContextualKeyword._abstract << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ac" + -1, -1, -1, 270, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "acc" + -1, -1, -1, -1, -1, 297, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "acce" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 324, -1, -1, -1, -1, -1, -1, -1, + // "acces" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 351, -1, -1, -1, -1, -1, -1, -1, + // "access" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 378, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "accesso" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 405, -1, -1, -1, -1, -1, -1, -1, -1, + // "accessor" + _keywords.ContextualKeyword._accessor << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "as" + _keywords.ContextualKeyword._as << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 459, -1, -1, -1, -1, -1, 594, -1, + // "ass" + -1, -1, -1, -1, -1, 486, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "asse" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 513, -1, -1, -1, -1, -1, -1, -1, -1, + // "asser" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 540, -1, -1, -1, -1, -1, -1, + // "assert" + _keywords.ContextualKeyword._assert << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 567, -1, -1, -1, -1, -1, -1, -1, + // "asserts" + _keywords.ContextualKeyword._asserts << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "asy" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 621, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "asyn" + -1, -1, -1, 648, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "async" + _keywords.ContextualKeyword._async << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "aw" + -1, 702, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "awa" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 729, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "awai" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 756, -1, -1, -1, -1, -1, -1, + // "await" + _keywords.ContextualKeyword._await << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "b" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 810, -1, -1, -1, -1, -1, -1, -1, -1, + // "br" + -1, -1, -1, -1, -1, 837, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "bre" + -1, 864, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "brea" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 891, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "break" + (_types.TokenType._break << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "c" + -1, 945, -1, -1, -1, -1, -1, -1, 1107, -1, -1, -1, 1242, -1, -1, 1350, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ca" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 972, 1026, -1, -1, -1, -1, -1, -1, + // "cas" + -1, -1, -1, -1, -1, 999, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "case" + (_types.TokenType._case << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "cat" + -1, -1, -1, 1053, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "catc" + -1, -1, -1, -1, -1, -1, -1, -1, 1080, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "catch" + (_types.TokenType._catch << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ch" + -1, -1, -1, -1, -1, 1134, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "che" + -1, -1, -1, 1161, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "chec" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1188, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "check" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1215, -1, -1, -1, -1, -1, -1, -1, + // "checks" + _keywords.ContextualKeyword._checks << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "cl" + -1, 1269, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "cla" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1296, -1, -1, -1, -1, -1, -1, -1, + // "clas" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1323, -1, -1, -1, -1, -1, -1, -1, + // "class" + (_types.TokenType._class << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "co" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1377, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "con" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1404, 1620, -1, -1, -1, -1, -1, -1, + // "cons" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1431, -1, -1, -1, -1, -1, -1, + // "const" + (_types.TokenType._const << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1458, -1, -1, -1, -1, -1, -1, -1, -1, + // "constr" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1485, -1, -1, -1, -1, -1, + // "constru" + -1, -1, -1, 1512, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "construc" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1539, -1, -1, -1, -1, -1, -1, + // "construct" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1566, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "constructo" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1593, -1, -1, -1, -1, -1, -1, -1, -1, + // "constructor" + _keywords.ContextualKeyword._constructor << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "cont" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 1647, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "conti" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1674, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "contin" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1701, -1, -1, -1, -1, -1, + // "continu" + -1, -1, -1, -1, -1, 1728, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "continue" + (_types.TokenType._continue << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "d" + -1, -1, -1, -1, -1, 1782, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2349, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "de" + -1, -1, 1809, 1971, -1, -1, 2106, -1, -1, -1, -1, -1, 2241, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "deb" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1836, -1, -1, -1, -1, -1, + // "debu" + -1, -1, -1, -1, -1, -1, -1, 1863, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "debug" + -1, -1, -1, -1, -1, -1, -1, 1890, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "debugg" + -1, -1, -1, -1, -1, 1917, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "debugge" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1944, -1, -1, -1, -1, -1, -1, -1, -1, + // "debugger" + (_types.TokenType._debugger << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "dec" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1998, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "decl" + -1, 2025, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "decla" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2052, -1, -1, -1, -1, -1, -1, -1, -1, + // "declar" + -1, -1, -1, -1, -1, 2079, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "declare" + _keywords.ContextualKeyword._declare << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "def" + -1, 2133, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "defa" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2160, -1, -1, -1, -1, -1, + // "defau" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2187, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "defaul" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2214, -1, -1, -1, -1, -1, -1, + // "default" + (_types.TokenType._default << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "del" + -1, -1, -1, -1, -1, 2268, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "dele" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2295, -1, -1, -1, -1, -1, -1, + // "delet" + -1, -1, -1, -1, -1, 2322, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "delete" + (_types.TokenType._delete << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "do" + (_types.TokenType._do << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "e" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2403, -1, 2484, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2565, -1, -1, + // "el" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2430, -1, -1, -1, -1, -1, -1, -1, + // "els" + -1, -1, -1, -1, -1, 2457, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "else" + (_types.TokenType._else << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "en" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2511, -1, -1, -1, -1, -1, + // "enu" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2538, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "enum" + _keywords.ContextualKeyword._enum << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ex" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2592, -1, -1, -1, 2727, -1, -1, -1, -1, -1, -1, + // "exp" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2619, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "expo" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2646, -1, -1, -1, -1, -1, -1, -1, -1, + // "expor" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2673, -1, -1, -1, -1, -1, -1, + // "export" + (_types.TokenType._export << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2700, -1, -1, -1, -1, -1, -1, -1, + // "exports" + _keywords.ContextualKeyword._exports << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ext" + -1, -1, -1, -1, -1, 2754, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "exte" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2781, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "exten" + -1, -1, -1, -1, 2808, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "extend" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2835, -1, -1, -1, -1, -1, -1, -1, + // "extends" + (_types.TokenType._extends << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "f" + -1, 2889, -1, -1, -1, -1, -1, -1, -1, 2997, -1, -1, -1, -1, -1, 3159, -1, -1, 3213, -1, -1, 3294, -1, -1, -1, -1, -1, + // "fa" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2916, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fal" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2943, -1, -1, -1, -1, -1, -1, -1, + // "fals" + -1, -1, -1, -1, -1, 2970, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "false" + (_types.TokenType._false << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3024, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fin" + -1, 3051, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fina" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3078, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "final" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3105, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "finall" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3132, -1, + // "finally" + (_types.TokenType._finally << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fo" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3186, -1, -1, -1, -1, -1, -1, -1, -1, + // "for" + (_types.TokenType._for << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fr" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3240, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fro" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3267, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "from" + _keywords.ContextualKeyword._from << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fu" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3321, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "fun" + -1, -1, -1, 3348, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "func" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3375, -1, -1, -1, -1, -1, -1, + // "funct" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 3402, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "functi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3429, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "functio" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3456, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "function" + (_types.TokenType._function << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "g" + -1, -1, -1, -1, -1, 3510, -1, -1, -1, -1, -1, -1, 3564, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ge" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3537, -1, -1, -1, -1, -1, -1, + // "get" + _keywords.ContextualKeyword._get << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "gl" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3591, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "glo" + -1, -1, 3618, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "glob" + -1, 3645, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "globa" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3672, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "global" + _keywords.ContextualKeyword._global << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "i" + -1, -1, -1, -1, -1, -1, 3726, -1, -1, -1, -1, -1, -1, 3753, 4077, -1, -1, -1, -1, 4590, -1, -1, -1, -1, -1, -1, -1, + // "if" + (_types.TokenType._if << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "im" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3780, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "imp" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3807, -1, -1, 3996, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "impl" + -1, -1, -1, -1, -1, 3834, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "imple" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3861, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "implem" + -1, -1, -1, -1, -1, 3888, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "impleme" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3915, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "implemen" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3942, -1, -1, -1, -1, -1, -1, + // "implement" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3969, -1, -1, -1, -1, -1, -1, -1, + // "implements" + _keywords.ContextualKeyword._implements << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "impo" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4023, -1, -1, -1, -1, -1, -1, -1, -1, + // "impor" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4050, -1, -1, -1, -1, -1, -1, + // "import" + (_types.TokenType._import << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "in" + (_types.TokenType._in << 1) + 1, -1, -1, -1, -1, -1, 4104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4185, 4401, -1, -1, -1, -1, -1, -1, + // "inf" + -1, -1, -1, -1, -1, 4131, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "infe" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4158, -1, -1, -1, -1, -1, -1, -1, -1, + // "infer" + _keywords.ContextualKeyword._infer << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ins" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4212, -1, -1, -1, -1, -1, -1, + // "inst" + -1, 4239, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "insta" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4266, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "instan" + -1, -1, -1, 4293, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "instanc" + -1, -1, -1, -1, -1, 4320, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "instance" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4347, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "instanceo" + -1, -1, -1, -1, -1, -1, 4374, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "instanceof" + (_types.TokenType._instanceof << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "int" + -1, -1, -1, -1, -1, 4428, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "inte" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4455, -1, -1, -1, -1, -1, -1, -1, -1, + // "inter" + -1, -1, -1, -1, -1, -1, 4482, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "interf" + -1, 4509, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "interfa" + -1, -1, -1, 4536, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "interfac" + -1, -1, -1, -1, -1, 4563, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "interface" + _keywords.ContextualKeyword._interface << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "is" + _keywords.ContextualKeyword._is << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "k" + -1, -1, -1, -1, -1, 4644, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ke" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4671, -1, + // "key" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4698, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "keyo" + -1, -1, -1, -1, -1, -1, 4725, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "keyof" + _keywords.ContextualKeyword._keyof << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "l" + -1, -1, -1, -1, -1, 4779, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "le" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4806, -1, -1, -1, -1, -1, -1, + // "let" + (_types.TokenType._let << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "m" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 4860, -1, -1, -1, -1, -1, 4995, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "mi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4887, -1, -1, + // "mix" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 4914, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "mixi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4941, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "mixin" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4968, -1, -1, -1, -1, -1, -1, -1, + // "mixins" + _keywords.ContextualKeyword._mixins << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "mo" + -1, -1, -1, -1, 5022, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "mod" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5049, -1, -1, -1, -1, -1, + // "modu" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5076, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "modul" + -1, -1, -1, -1, -1, 5103, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "module" + _keywords.ContextualKeyword._module << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "n" + -1, 5157, -1, -1, -1, 5373, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5427, -1, -1, -1, -1, -1, + // "na" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5184, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "nam" + -1, -1, -1, -1, -1, 5211, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "name" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5238, -1, -1, -1, -1, -1, -1, -1, + // "names" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5265, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "namesp" + -1, 5292, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "namespa" + -1, -1, -1, 5319, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "namespac" + -1, -1, -1, -1, -1, 5346, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "namespace" + _keywords.ContextualKeyword._namespace << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ne" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5400, -1, -1, -1, + // "new" + (_types.TokenType._new << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "nu" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5454, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "nul" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5481, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "null" + (_types.TokenType._null << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "o" + -1, -1, -1, -1, -1, -1, 5535, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5562, -1, -1, -1, -1, 5697, 5751, -1, -1, -1, -1, + // "of" + _keywords.ContextualKeyword._of << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "op" + -1, 5589, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "opa" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5616, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "opaq" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5643, -1, -1, -1, -1, -1, + // "opaqu" + -1, -1, -1, -1, -1, 5670, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "opaque" + _keywords.ContextualKeyword._opaque << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ou" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5724, -1, -1, -1, -1, -1, -1, + // "out" + _keywords.ContextualKeyword._out << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ov" + -1, -1, -1, -1, -1, 5778, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ove" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5805, -1, -1, -1, -1, -1, -1, -1, -1, + // "over" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5832, -1, -1, -1, -1, -1, -1, -1, -1, + // "overr" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 5859, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "overri" + -1, -1, -1, -1, 5886, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "overrid" + -1, -1, -1, -1, -1, 5913, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "override" + _keywords.ContextualKeyword._override << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "p" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5967, -1, -1, 6345, -1, -1, -1, -1, -1, + // "pr" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 5994, -1, -1, -1, -1, -1, 6129, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "pri" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6021, -1, -1, -1, -1, + // "priv" + -1, 6048, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "priva" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6075, -1, -1, -1, -1, -1, -1, + // "privat" + -1, -1, -1, -1, -1, 6102, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "private" + _keywords.ContextualKeyword._private << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "pro" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6156, -1, -1, -1, -1, -1, -1, + // "prot" + -1, -1, -1, -1, -1, 6183, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6318, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "prote" + -1, -1, -1, 6210, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "protec" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6237, -1, -1, -1, -1, -1, -1, + // "protect" + -1, -1, -1, -1, -1, 6264, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "protecte" + -1, -1, -1, -1, 6291, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "protected" + _keywords.ContextualKeyword._protected << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "proto" + _keywords.ContextualKeyword._proto << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "pu" + -1, -1, 6372, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "pub" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6399, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "publ" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 6426, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "publi" + -1, -1, -1, 6453, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "public" + _keywords.ContextualKeyword._public << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "r" + -1, -1, -1, -1, -1, 6507, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "re" + -1, 6534, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6696, -1, -1, 6831, -1, -1, -1, -1, -1, -1, + // "rea" + -1, -1, -1, -1, 6561, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "read" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6588, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "reado" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6615, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "readon" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6642, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "readonl" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6669, -1, + // "readonly" + _keywords.ContextualKeyword._readonly << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "req" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6723, -1, -1, -1, -1, -1, + // "requ" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 6750, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "requi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6777, -1, -1, -1, -1, -1, -1, -1, -1, + // "requir" + -1, -1, -1, -1, -1, 6804, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "require" + _keywords.ContextualKeyword._require << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ret" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6858, -1, -1, -1, -1, -1, + // "retu" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6885, -1, -1, -1, -1, -1, -1, -1, -1, + // "retur" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6912, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "return" + (_types.TokenType._return << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "s" + -1, 6966, -1, -1, -1, 7182, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7236, 7371, -1, 7479, -1, 7614, -1, + // "sa" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6993, -1, -1, -1, -1, -1, -1, + // "sat" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 7020, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "sati" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7047, -1, -1, -1, -1, -1, -1, -1, + // "satis" + -1, -1, -1, -1, -1, -1, 7074, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "satisf" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 7101, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "satisfi" + -1, -1, -1, -1, -1, 7128, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "satisfie" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7155, -1, -1, -1, -1, -1, -1, -1, + // "satisfies" + _keywords.ContextualKeyword._satisfies << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "se" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7209, -1, -1, -1, -1, -1, -1, + // "set" + _keywords.ContextualKeyword._set << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "st" + -1, 7263, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "sta" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7290, -1, -1, -1, -1, -1, -1, + // "stat" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 7317, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "stati" + -1, -1, -1, 7344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "static" + _keywords.ContextualKeyword._static << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "su" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7398, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "sup" + -1, -1, -1, -1, -1, 7425, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "supe" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7452, -1, -1, -1, -1, -1, -1, -1, -1, + // "super" + (_types.TokenType._super << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "sw" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 7506, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "swi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7533, -1, -1, -1, -1, -1, -1, + // "swit" + -1, -1, -1, 7560, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "switc" + -1, -1, -1, -1, -1, -1, -1, -1, 7587, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "switch" + (_types.TokenType._switch << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "sy" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7641, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "sym" + -1, -1, 7668, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "symb" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7695, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "symbo" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7722, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "symbol" + _keywords.ContextualKeyword._symbol << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "t" + -1, -1, -1, -1, -1, -1, -1, -1, 7776, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7938, -1, -1, -1, -1, -1, -1, 8046, -1, + // "th" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 7803, -1, -1, -1, -1, -1, -1, -1, -1, 7857, -1, -1, -1, -1, -1, -1, -1, -1, + // "thi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7830, -1, -1, -1, -1, -1, -1, -1, + // "this" + (_types.TokenType._this << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "thr" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7884, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "thro" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7911, -1, -1, -1, + // "throw" + (_types.TokenType._throw << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "tr" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7965, -1, -1, -1, 8019, -1, + // "tru" + -1, -1, -1, -1, -1, 7992, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "true" + (_types.TokenType._true << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "try" + (_types.TokenType._try << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "ty" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8073, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "typ" + -1, -1, -1, -1, -1, 8100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "type" + _keywords.ContextualKeyword._type << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8127, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "typeo" + -1, -1, -1, -1, -1, -1, 8154, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "typeof" + (_types.TokenType._typeof << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "u" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8208, -1, -1, -1, -1, 8343, -1, -1, -1, -1, -1, -1, -1, + // "un" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8235, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "uni" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8262, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "uniq" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8289, -1, -1, -1, -1, -1, + // "uniqu" + -1, -1, -1, -1, -1, 8316, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "unique" + _keywords.ContextualKeyword._unique << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "us" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8370, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "usi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8397, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "usin" + -1, -1, -1, -1, -1, -1, -1, 8424, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "using" + _keywords.ContextualKeyword._using << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "v" + -1, 8478, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8532, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "va" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8505, -1, -1, -1, -1, -1, -1, -1, -1, + // "var" + (_types.TokenType._var << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "vo" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8559, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "voi" + -1, -1, -1, -1, 8586, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "void" + (_types.TokenType._void << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "w" + -1, -1, -1, -1, -1, -1, -1, -1, 8640, 8748, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "wh" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8667, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "whi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8694, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "whil" + -1, -1, -1, -1, -1, 8721, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "while" + (_types.TokenType._while << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "wi" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8775, -1, -1, -1, -1, -1, -1, + // "wit" + -1, -1, -1, -1, -1, -1, -1, -1, 8802, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "with" + (_types.TokenType._with << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "y" + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8856, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "yi" + -1, -1, -1, -1, -1, 8883, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "yie" + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8910, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "yiel" + -1, -1, -1, -1, 8937, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // "yield" + (_types.TokenType._yield << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, +]); exports.READ_WORD_TREE = READ_WORD_TREE; diff --git a/node_modules/sucrase/dist/parser/tokenizer/state.js b/node_modules/sucrase/dist/parser/tokenizer/state.js new file mode 100644 index 0000000..359e1b4 --- /dev/null +++ b/node_modules/sucrase/dist/parser/tokenizer/state.js @@ -0,0 +1,106 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); +var _keywords = require('./keywords'); +var _types = require('./types'); + + class Scope { + + + + + constructor(startTokenIndex, endTokenIndex, isFunctionScope) { + this.startTokenIndex = startTokenIndex; + this.endTokenIndex = endTokenIndex; + this.isFunctionScope = isFunctionScope; + } +} exports.Scope = Scope; + + class StateSnapshot { + constructor( + potentialArrowAt, + noAnonFunctionType, + inDisallowConditionalTypesContext, + tokensLength, + scopesLength, + pos, + type, + contextualKeyword, + start, + end, + isType, + scopeDepth, + error, + ) {;this.potentialArrowAt = potentialArrowAt;this.noAnonFunctionType = noAnonFunctionType;this.inDisallowConditionalTypesContext = inDisallowConditionalTypesContext;this.tokensLength = tokensLength;this.scopesLength = scopesLength;this.pos = pos;this.type = type;this.contextualKeyword = contextualKeyword;this.start = start;this.end = end;this.isType = isType;this.scopeDepth = scopeDepth;this.error = error;} +} exports.StateSnapshot = StateSnapshot; + + class State {constructor() { State.prototype.__init.call(this);State.prototype.__init2.call(this);State.prototype.__init3.call(this);State.prototype.__init4.call(this);State.prototype.__init5.call(this);State.prototype.__init6.call(this);State.prototype.__init7.call(this);State.prototype.__init8.call(this);State.prototype.__init9.call(this);State.prototype.__init10.call(this);State.prototype.__init11.call(this);State.prototype.__init12.call(this);State.prototype.__init13.call(this); } + // Used to signify the start of a potential arrow function + __init() {this.potentialArrowAt = -1} + + // Used by Flow to handle an edge case involving function type parsing. + __init2() {this.noAnonFunctionType = false} + + // Used by TypeScript to handle ambiguities when parsing conditional types. + __init3() {this.inDisallowConditionalTypesContext = false} + + // Token store. + __init4() {this.tokens = []} + + // Array of all observed scopes, ordered by their ending position. + __init5() {this.scopes = []} + + // The current position of the tokenizer in the input. + __init6() {this.pos = 0} + + // Information about the current token. + __init7() {this.type = _types.TokenType.eof} + __init8() {this.contextualKeyword = _keywords.ContextualKeyword.NONE} + __init9() {this.start = 0} + __init10() {this.end = 0} + + __init11() {this.isType = false} + __init12() {this.scopeDepth = 0} + + /** + * If the parser is in an error state, then the token is always tt.eof and all functions can + * keep executing but should be written so they don't get into an infinite loop in this situation. + * + * This approach, combined with the ability to snapshot and restore state, allows us to implement + * backtracking without exceptions and without needing to explicitly propagate error states + * everywhere. + */ + __init13() {this.error = null} + + snapshot() { + return new StateSnapshot( + this.potentialArrowAt, + this.noAnonFunctionType, + this.inDisallowConditionalTypesContext, + this.tokens.length, + this.scopes.length, + this.pos, + this.type, + this.contextualKeyword, + this.start, + this.end, + this.isType, + this.scopeDepth, + this.error, + ); + } + + restoreFromSnapshot(snapshot) { + this.potentialArrowAt = snapshot.potentialArrowAt; + this.noAnonFunctionType = snapshot.noAnonFunctionType; + this.inDisallowConditionalTypesContext = snapshot.inDisallowConditionalTypesContext; + this.tokens.length = snapshot.tokensLength; + this.scopes.length = snapshot.scopesLength; + this.pos = snapshot.pos; + this.type = snapshot.type; + this.contextualKeyword = snapshot.contextualKeyword; + this.start = snapshot.start; + this.end = snapshot.end; + this.isType = snapshot.isType; + this.scopeDepth = snapshot.scopeDepth; + this.error = snapshot.error; + } +} exports.default = State; diff --git a/node_modules/sucrase/dist/parser/tokenizer/types.js b/node_modules/sucrase/dist/parser/tokenizer/types.js new file mode 100644 index 0000000..c1f2a81 --- /dev/null +++ b/node_modules/sucrase/dist/parser/tokenizer/types.js @@ -0,0 +1,361 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});// Generated file, do not edit! Run "yarn generate" to re-generate this file. +/* istanbul ignore file */ +/** + * Enum of all token types, with bit fields to signify meaningful properties. + */ +var TokenType; (function (TokenType) { + // Precedence 0 means not an operator; otherwise it is a positive number up to 12. + const PRECEDENCE_MASK = 0xf; TokenType[TokenType["PRECEDENCE_MASK"] = PRECEDENCE_MASK] = "PRECEDENCE_MASK"; + const IS_KEYWORD = 1 << 4; TokenType[TokenType["IS_KEYWORD"] = IS_KEYWORD] = "IS_KEYWORD"; + const IS_ASSIGN = 1 << 5; TokenType[TokenType["IS_ASSIGN"] = IS_ASSIGN] = "IS_ASSIGN"; + const IS_RIGHT_ASSOCIATIVE = 1 << 6; TokenType[TokenType["IS_RIGHT_ASSOCIATIVE"] = IS_RIGHT_ASSOCIATIVE] = "IS_RIGHT_ASSOCIATIVE"; + const IS_PREFIX = 1 << 7; TokenType[TokenType["IS_PREFIX"] = IS_PREFIX] = "IS_PREFIX"; + const IS_POSTFIX = 1 << 8; TokenType[TokenType["IS_POSTFIX"] = IS_POSTFIX] = "IS_POSTFIX"; + const IS_EXPRESSION_START = 1 << 9; TokenType[TokenType["IS_EXPRESSION_START"] = IS_EXPRESSION_START] = "IS_EXPRESSION_START"; + + const num = 512; TokenType[TokenType["num"] = num] = "num"; // num startsExpr + const bigint = 1536; TokenType[TokenType["bigint"] = bigint] = "bigint"; // bigint startsExpr + const decimal = 2560; TokenType[TokenType["decimal"] = decimal] = "decimal"; // decimal startsExpr + const regexp = 3584; TokenType[TokenType["regexp"] = regexp] = "regexp"; // regexp startsExpr + const string = 4608; TokenType[TokenType["string"] = string] = "string"; // string startsExpr + const name = 5632; TokenType[TokenType["name"] = name] = "name"; // name startsExpr + const eof = 6144; TokenType[TokenType["eof"] = eof] = "eof"; // eof + const bracketL = 7680; TokenType[TokenType["bracketL"] = bracketL] = "bracketL"; // [ startsExpr + const bracketR = 8192; TokenType[TokenType["bracketR"] = bracketR] = "bracketR"; // ] + const braceL = 9728; TokenType[TokenType["braceL"] = braceL] = "braceL"; // { startsExpr + const braceBarL = 10752; TokenType[TokenType["braceBarL"] = braceBarL] = "braceBarL"; // {| startsExpr + const braceR = 11264; TokenType[TokenType["braceR"] = braceR] = "braceR"; // } + const braceBarR = 12288; TokenType[TokenType["braceBarR"] = braceBarR] = "braceBarR"; // |} + const parenL = 13824; TokenType[TokenType["parenL"] = parenL] = "parenL"; // ( startsExpr + const parenR = 14336; TokenType[TokenType["parenR"] = parenR] = "parenR"; // ) + const comma = 15360; TokenType[TokenType["comma"] = comma] = "comma"; // , + const semi = 16384; TokenType[TokenType["semi"] = semi] = "semi"; // ; + const colon = 17408; TokenType[TokenType["colon"] = colon] = "colon"; // : + const doubleColon = 18432; TokenType[TokenType["doubleColon"] = doubleColon] = "doubleColon"; // :: + const dot = 19456; TokenType[TokenType["dot"] = dot] = "dot"; // . + const question = 20480; TokenType[TokenType["question"] = question] = "question"; // ? + const questionDot = 21504; TokenType[TokenType["questionDot"] = questionDot] = "questionDot"; // ?. + const arrow = 22528; TokenType[TokenType["arrow"] = arrow] = "arrow"; // => + const template = 23552; TokenType[TokenType["template"] = template] = "template"; // template + const ellipsis = 24576; TokenType[TokenType["ellipsis"] = ellipsis] = "ellipsis"; // ... + const backQuote = 25600; TokenType[TokenType["backQuote"] = backQuote] = "backQuote"; // ` + const dollarBraceL = 27136; TokenType[TokenType["dollarBraceL"] = dollarBraceL] = "dollarBraceL"; // ${ startsExpr + const at = 27648; TokenType[TokenType["at"] = at] = "at"; // @ + const hash = 29184; TokenType[TokenType["hash"] = hash] = "hash"; // # startsExpr + const eq = 29728; TokenType[TokenType["eq"] = eq] = "eq"; // = isAssign + const assign = 30752; TokenType[TokenType["assign"] = assign] = "assign"; // _= isAssign + const preIncDec = 32640; TokenType[TokenType["preIncDec"] = preIncDec] = "preIncDec"; // ++/-- prefix postfix startsExpr + const postIncDec = 33664; TokenType[TokenType["postIncDec"] = postIncDec] = "postIncDec"; // ++/-- prefix postfix startsExpr + const bang = 34432; TokenType[TokenType["bang"] = bang] = "bang"; // ! prefix startsExpr + const tilde = 35456; TokenType[TokenType["tilde"] = tilde] = "tilde"; // ~ prefix startsExpr + const pipeline = 35841; TokenType[TokenType["pipeline"] = pipeline] = "pipeline"; // |> prec:1 + const nullishCoalescing = 36866; TokenType[TokenType["nullishCoalescing"] = nullishCoalescing] = "nullishCoalescing"; // ?? prec:2 + const logicalOR = 37890; TokenType[TokenType["logicalOR"] = logicalOR] = "logicalOR"; // || prec:2 + const logicalAND = 38915; TokenType[TokenType["logicalAND"] = logicalAND] = "logicalAND"; // && prec:3 + const bitwiseOR = 39940; TokenType[TokenType["bitwiseOR"] = bitwiseOR] = "bitwiseOR"; // | prec:4 + const bitwiseXOR = 40965; TokenType[TokenType["bitwiseXOR"] = bitwiseXOR] = "bitwiseXOR"; // ^ prec:5 + const bitwiseAND = 41990; TokenType[TokenType["bitwiseAND"] = bitwiseAND] = "bitwiseAND"; // & prec:6 + const equality = 43015; TokenType[TokenType["equality"] = equality] = "equality"; // ==/!= prec:7 + const lessThan = 44040; TokenType[TokenType["lessThan"] = lessThan] = "lessThan"; // < prec:8 + const greaterThan = 45064; TokenType[TokenType["greaterThan"] = greaterThan] = "greaterThan"; // > prec:8 + const relationalOrEqual = 46088; TokenType[TokenType["relationalOrEqual"] = relationalOrEqual] = "relationalOrEqual"; // <=/>= prec:8 + const bitShiftL = 47113; TokenType[TokenType["bitShiftL"] = bitShiftL] = "bitShiftL"; // << prec:9 + const bitShiftR = 48137; TokenType[TokenType["bitShiftR"] = bitShiftR] = "bitShiftR"; // >>/>>> prec:9 + const plus = 49802; TokenType[TokenType["plus"] = plus] = "plus"; // + prec:10 prefix startsExpr + const minus = 50826; TokenType[TokenType["minus"] = minus] = "minus"; // - prec:10 prefix startsExpr + const modulo = 51723; TokenType[TokenType["modulo"] = modulo] = "modulo"; // % prec:11 startsExpr + const star = 52235; TokenType[TokenType["star"] = star] = "star"; // * prec:11 + const slash = 53259; TokenType[TokenType["slash"] = slash] = "slash"; // / prec:11 + const exponent = 54348; TokenType[TokenType["exponent"] = exponent] = "exponent"; // ** prec:12 rightAssociative + const jsxName = 55296; TokenType[TokenType["jsxName"] = jsxName] = "jsxName"; // jsxName + const jsxText = 56320; TokenType[TokenType["jsxText"] = jsxText] = "jsxText"; // jsxText + const jsxEmptyText = 57344; TokenType[TokenType["jsxEmptyText"] = jsxEmptyText] = "jsxEmptyText"; // jsxEmptyText + const jsxTagStart = 58880; TokenType[TokenType["jsxTagStart"] = jsxTagStart] = "jsxTagStart"; // jsxTagStart startsExpr + const jsxTagEnd = 59392; TokenType[TokenType["jsxTagEnd"] = jsxTagEnd] = "jsxTagEnd"; // jsxTagEnd + const typeParameterStart = 60928; TokenType[TokenType["typeParameterStart"] = typeParameterStart] = "typeParameterStart"; // typeParameterStart startsExpr + const nonNullAssertion = 61440; TokenType[TokenType["nonNullAssertion"] = nonNullAssertion] = "nonNullAssertion"; // nonNullAssertion + const _break = 62480; TokenType[TokenType["_break"] = _break] = "_break"; // break keyword + const _case = 63504; TokenType[TokenType["_case"] = _case] = "_case"; // case keyword + const _catch = 64528; TokenType[TokenType["_catch"] = _catch] = "_catch"; // catch keyword + const _continue = 65552; TokenType[TokenType["_continue"] = _continue] = "_continue"; // continue keyword + const _debugger = 66576; TokenType[TokenType["_debugger"] = _debugger] = "_debugger"; // debugger keyword + const _default = 67600; TokenType[TokenType["_default"] = _default] = "_default"; // default keyword + const _do = 68624; TokenType[TokenType["_do"] = _do] = "_do"; // do keyword + const _else = 69648; TokenType[TokenType["_else"] = _else] = "_else"; // else keyword + const _finally = 70672; TokenType[TokenType["_finally"] = _finally] = "_finally"; // finally keyword + const _for = 71696; TokenType[TokenType["_for"] = _for] = "_for"; // for keyword + const _function = 73232; TokenType[TokenType["_function"] = _function] = "_function"; // function keyword startsExpr + const _if = 73744; TokenType[TokenType["_if"] = _if] = "_if"; // if keyword + const _return = 74768; TokenType[TokenType["_return"] = _return] = "_return"; // return keyword + const _switch = 75792; TokenType[TokenType["_switch"] = _switch] = "_switch"; // switch keyword + const _throw = 77456; TokenType[TokenType["_throw"] = _throw] = "_throw"; // throw keyword prefix startsExpr + const _try = 77840; TokenType[TokenType["_try"] = _try] = "_try"; // try keyword + const _var = 78864; TokenType[TokenType["_var"] = _var] = "_var"; // var keyword + const _let = 79888; TokenType[TokenType["_let"] = _let] = "_let"; // let keyword + const _const = 80912; TokenType[TokenType["_const"] = _const] = "_const"; // const keyword + const _while = 81936; TokenType[TokenType["_while"] = _while] = "_while"; // while keyword + const _with = 82960; TokenType[TokenType["_with"] = _with] = "_with"; // with keyword + const _new = 84496; TokenType[TokenType["_new"] = _new] = "_new"; // new keyword startsExpr + const _this = 85520; TokenType[TokenType["_this"] = _this] = "_this"; // this keyword startsExpr + const _super = 86544; TokenType[TokenType["_super"] = _super] = "_super"; // super keyword startsExpr + const _class = 87568; TokenType[TokenType["_class"] = _class] = "_class"; // class keyword startsExpr + const _extends = 88080; TokenType[TokenType["_extends"] = _extends] = "_extends"; // extends keyword + const _export = 89104; TokenType[TokenType["_export"] = _export] = "_export"; // export keyword + const _import = 90640; TokenType[TokenType["_import"] = _import] = "_import"; // import keyword startsExpr + const _yield = 91664; TokenType[TokenType["_yield"] = _yield] = "_yield"; // yield keyword startsExpr + const _null = 92688; TokenType[TokenType["_null"] = _null] = "_null"; // null keyword startsExpr + const _true = 93712; TokenType[TokenType["_true"] = _true] = "_true"; // true keyword startsExpr + const _false = 94736; TokenType[TokenType["_false"] = _false] = "_false"; // false keyword startsExpr + const _in = 95256; TokenType[TokenType["_in"] = _in] = "_in"; // in prec:8 keyword + const _instanceof = 96280; TokenType[TokenType["_instanceof"] = _instanceof] = "_instanceof"; // instanceof prec:8 keyword + const _typeof = 97936; TokenType[TokenType["_typeof"] = _typeof] = "_typeof"; // typeof keyword prefix startsExpr + const _void = 98960; TokenType[TokenType["_void"] = _void] = "_void"; // void keyword prefix startsExpr + const _delete = 99984; TokenType[TokenType["_delete"] = _delete] = "_delete"; // delete keyword prefix startsExpr + const _async = 100880; TokenType[TokenType["_async"] = _async] = "_async"; // async keyword startsExpr + const _get = 101904; TokenType[TokenType["_get"] = _get] = "_get"; // get keyword startsExpr + const _set = 102928; TokenType[TokenType["_set"] = _set] = "_set"; // set keyword startsExpr + const _declare = 103952; TokenType[TokenType["_declare"] = _declare] = "_declare"; // declare keyword startsExpr + const _readonly = 104976; TokenType[TokenType["_readonly"] = _readonly] = "_readonly"; // readonly keyword startsExpr + const _abstract = 106000; TokenType[TokenType["_abstract"] = _abstract] = "_abstract"; // abstract keyword startsExpr + const _static = 107024; TokenType[TokenType["_static"] = _static] = "_static"; // static keyword startsExpr + const _public = 107536; TokenType[TokenType["_public"] = _public] = "_public"; // public keyword + const _private = 108560; TokenType[TokenType["_private"] = _private] = "_private"; // private keyword + const _protected = 109584; TokenType[TokenType["_protected"] = _protected] = "_protected"; // protected keyword + const _override = 110608; TokenType[TokenType["_override"] = _override] = "_override"; // override keyword + const _as = 112144; TokenType[TokenType["_as"] = _as] = "_as"; // as keyword startsExpr + const _enum = 113168; TokenType[TokenType["_enum"] = _enum] = "_enum"; // enum keyword startsExpr + const _type = 114192; TokenType[TokenType["_type"] = _type] = "_type"; // type keyword startsExpr + const _implements = 115216; TokenType[TokenType["_implements"] = _implements] = "_implements"; // implements keyword startsExpr +})(TokenType || (exports.TokenType = TokenType = {})); + function formatTokenType(tokenType) { + switch (tokenType) { + case TokenType.num: + return "num"; + case TokenType.bigint: + return "bigint"; + case TokenType.decimal: + return "decimal"; + case TokenType.regexp: + return "regexp"; + case TokenType.string: + return "string"; + case TokenType.name: + return "name"; + case TokenType.eof: + return "eof"; + case TokenType.bracketL: + return "["; + case TokenType.bracketR: + return "]"; + case TokenType.braceL: + return "{"; + case TokenType.braceBarL: + return "{|"; + case TokenType.braceR: + return "}"; + case TokenType.braceBarR: + return "|}"; + case TokenType.parenL: + return "("; + case TokenType.parenR: + return ")"; + case TokenType.comma: + return ","; + case TokenType.semi: + return ";"; + case TokenType.colon: + return ":"; + case TokenType.doubleColon: + return "::"; + case TokenType.dot: + return "."; + case TokenType.question: + return "?"; + case TokenType.questionDot: + return "?."; + case TokenType.arrow: + return "=>"; + case TokenType.template: + return "template"; + case TokenType.ellipsis: + return "..."; + case TokenType.backQuote: + return "`"; + case TokenType.dollarBraceL: + return "${"; + case TokenType.at: + return "@"; + case TokenType.hash: + return "#"; + case TokenType.eq: + return "="; + case TokenType.assign: + return "_="; + case TokenType.preIncDec: + return "++/--"; + case TokenType.postIncDec: + return "++/--"; + case TokenType.bang: + return "!"; + case TokenType.tilde: + return "~"; + case TokenType.pipeline: + return "|>"; + case TokenType.nullishCoalescing: + return "??"; + case TokenType.logicalOR: + return "||"; + case TokenType.logicalAND: + return "&&"; + case TokenType.bitwiseOR: + return "|"; + case TokenType.bitwiseXOR: + return "^"; + case TokenType.bitwiseAND: + return "&"; + case TokenType.equality: + return "==/!="; + case TokenType.lessThan: + return "<"; + case TokenType.greaterThan: + return ">"; + case TokenType.relationalOrEqual: + return "<=/>="; + case TokenType.bitShiftL: + return "<<"; + case TokenType.bitShiftR: + return ">>/>>>"; + case TokenType.plus: + return "+"; + case TokenType.minus: + return "-"; + case TokenType.modulo: + return "%"; + case TokenType.star: + return "*"; + case TokenType.slash: + return "/"; + case TokenType.exponent: + return "**"; + case TokenType.jsxName: + return "jsxName"; + case TokenType.jsxText: + return "jsxText"; + case TokenType.jsxEmptyText: + return "jsxEmptyText"; + case TokenType.jsxTagStart: + return "jsxTagStart"; + case TokenType.jsxTagEnd: + return "jsxTagEnd"; + case TokenType.typeParameterStart: + return "typeParameterStart"; + case TokenType.nonNullAssertion: + return "nonNullAssertion"; + case TokenType._break: + return "break"; + case TokenType._case: + return "case"; + case TokenType._catch: + return "catch"; + case TokenType._continue: + return "continue"; + case TokenType._debugger: + return "debugger"; + case TokenType._default: + return "default"; + case TokenType._do: + return "do"; + case TokenType._else: + return "else"; + case TokenType._finally: + return "finally"; + case TokenType._for: + return "for"; + case TokenType._function: + return "function"; + case TokenType._if: + return "if"; + case TokenType._return: + return "return"; + case TokenType._switch: + return "switch"; + case TokenType._throw: + return "throw"; + case TokenType._try: + return "try"; + case TokenType._var: + return "var"; + case TokenType._let: + return "let"; + case TokenType._const: + return "const"; + case TokenType._while: + return "while"; + case TokenType._with: + return "with"; + case TokenType._new: + return "new"; + case TokenType._this: + return "this"; + case TokenType._super: + return "super"; + case TokenType._class: + return "class"; + case TokenType._extends: + return "extends"; + case TokenType._export: + return "export"; + case TokenType._import: + return "import"; + case TokenType._yield: + return "yield"; + case TokenType._null: + return "null"; + case TokenType._true: + return "true"; + case TokenType._false: + return "false"; + case TokenType._in: + return "in"; + case TokenType._instanceof: + return "instanceof"; + case TokenType._typeof: + return "typeof"; + case TokenType._void: + return "void"; + case TokenType._delete: + return "delete"; + case TokenType._async: + return "async"; + case TokenType._get: + return "get"; + case TokenType._set: + return "set"; + case TokenType._declare: + return "declare"; + case TokenType._readonly: + return "readonly"; + case TokenType._abstract: + return "abstract"; + case TokenType._static: + return "static"; + case TokenType._public: + return "public"; + case TokenType._private: + return "private"; + case TokenType._protected: + return "protected"; + case TokenType._override: + return "override"; + case TokenType._as: + return "as"; + case TokenType._enum: + return "enum"; + case TokenType._type: + return "type"; + case TokenType._implements: + return "implements"; + default: + return ""; + } +} exports.formatTokenType = formatTokenType; diff --git a/node_modules/sucrase/dist/parser/traverser/base.js b/node_modules/sucrase/dist/parser/traverser/base.js new file mode 100644 index 0000000..85c9c17 --- /dev/null +++ b/node_modules/sucrase/dist/parser/traverser/base.js @@ -0,0 +1,60 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _state = require('../tokenizer/state'); var _state2 = _interopRequireDefault(_state); +var _charcodes = require('../util/charcodes'); + + exports.isJSXEnabled; + exports.isTypeScriptEnabled; + exports.isFlowEnabled; + exports.state; + exports.input; + exports.nextContextId; + + function getNextContextId() { + return exports.nextContextId++; +} exports.getNextContextId = getNextContextId; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any + function augmentError(error) { + if ("pos" in error) { + const loc = locationForIndex(error.pos); + error.message += ` (${loc.line}:${loc.column})`; + error.loc = loc; + } + return error; +} exports.augmentError = augmentError; + + class Loc { + + + constructor(line, column) { + this.line = line; + this.column = column; + } +} exports.Loc = Loc; + + function locationForIndex(pos) { + let line = 1; + let column = 1; + for (let i = 0; i < pos; i++) { + if (exports.input.charCodeAt(i) === _charcodes.charCodes.lineFeed) { + line++; + column = 1; + } else { + column++; + } + } + return new Loc(line, column); +} exports.locationForIndex = locationForIndex; + + function initParser( + inputCode, + isJSXEnabledArg, + isTypeScriptEnabledArg, + isFlowEnabledArg, +) { + exports.input = inputCode; + exports.state = new (0, _state2.default)(); + exports.nextContextId = 1; + exports.isJSXEnabled = isJSXEnabledArg; + exports.isTypeScriptEnabled = isTypeScriptEnabledArg; + exports.isFlowEnabled = isFlowEnabledArg; +} exports.initParser = initParser; diff --git a/node_modules/sucrase/dist/parser/traverser/expression.js b/node_modules/sucrase/dist/parser/traverser/expression.js new file mode 100644 index 0000000..d0011e3 --- /dev/null +++ b/node_modules/sucrase/dist/parser/traverser/expression.js @@ -0,0 +1,1022 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});/* eslint max-len: 0 */ + +// A recursive descent parser operates by defining functions for all +// syntactic elements, and recursively calling those, each function +// advancing the input stream and returning an AST node. Precedence +// of constructs (for example, the fact that `!x[1]` means `!(x[1])` +// instead of `(!x)[1]` is handled by the fact that the parser +// function that parses unary prefix operators is called first, and +// in turn calls the function that parses `[]` subscripts — that +// way, it'll receive the node for `x[1]` already parsed, and wraps +// *that* in the unary operator node. +// +// Acorn uses an [operator precedence parser][opp] to handle binary +// operator precedence, because it is much more compact than using +// the technique outlined above, which uses different, nesting +// functions to specify precedence, for all of the ten binary +// precedence levels that JavaScript defines. +// +// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser + + + + + + + + + + + +var _flow = require('../plugins/flow'); +var _index = require('../plugins/jsx/index'); +var _types = require('../plugins/types'); + + + + + + + + + +var _typescript = require('../plugins/typescript'); + + + + + + + + + + + + +var _index3 = require('../tokenizer/index'); +var _keywords = require('../tokenizer/keywords'); +var _state = require('../tokenizer/state'); +var _types3 = require('../tokenizer/types'); +var _charcodes = require('../util/charcodes'); +var _identifier = require('../util/identifier'); +var _base = require('./base'); + + + + + + +var _lval = require('./lval'); + + + + + + + +var _statement = require('./statement'); + + + + + + + + + +var _util = require('./util'); + + class StopState { + + constructor(stop) { + this.stop = stop; + } +} exports.StopState = StopState; + +// ### Expression parsing + +// These nest, from the most general expression type at the top to +// 'atomic', nondivisible expression types at the bottom. Most of +// the functions will simply let the function (s) below them parse, +// and, *if* the syntactic construct they handle is present, wrap +// the AST node that the inner parser gave them in another node. + function parseExpression(noIn = false) { + parseMaybeAssign(noIn); + if (_index3.match.call(void 0, _types3.TokenType.comma)) { + while (_index3.eat.call(void 0, _types3.TokenType.comma)) { + parseMaybeAssign(noIn); + } + } +} exports.parseExpression = parseExpression; + +/** + * noIn is used when parsing a for loop so that we don't interpret a following "in" as the binary + * operatior. + * isWithinParens is used to indicate that we're parsing something that might be a comma expression + * or might be an arrow function or might be a Flow type assertion (which requires explicit parens). + * In these cases, we should allow : and ?: after the initial "left" part. + */ + function parseMaybeAssign(noIn = false, isWithinParens = false) { + if (_base.isTypeScriptEnabled) { + return _typescript.tsParseMaybeAssign.call(void 0, noIn, isWithinParens); + } else if (_base.isFlowEnabled) { + return _flow.flowParseMaybeAssign.call(void 0, noIn, isWithinParens); + } else { + return baseParseMaybeAssign(noIn, isWithinParens); + } +} exports.parseMaybeAssign = parseMaybeAssign; + +// Parse an assignment expression. This includes applications of +// operators like `+=`. +// Returns true if the expression was an arrow function. + function baseParseMaybeAssign(noIn, isWithinParens) { + if (_index3.match.call(void 0, _types3.TokenType._yield)) { + parseYield(); + return false; + } + + if (_index3.match.call(void 0, _types3.TokenType.parenL) || _index3.match.call(void 0, _types3.TokenType.name) || _index3.match.call(void 0, _types3.TokenType._yield)) { + _base.state.potentialArrowAt = _base.state.start; + } + + const wasArrow = parseMaybeConditional(noIn); + if (isWithinParens) { + parseParenItem(); + } + if (_base.state.type & _types3.TokenType.IS_ASSIGN) { + _index3.next.call(void 0, ); + parseMaybeAssign(noIn); + return false; + } + return wasArrow; +} exports.baseParseMaybeAssign = baseParseMaybeAssign; + +// Parse a ternary conditional (`?:`) operator. +// Returns true if the expression was an arrow function. +function parseMaybeConditional(noIn) { + const wasArrow = parseExprOps(noIn); + if (wasArrow) { + return true; + } + parseConditional(noIn); + return false; +} + +function parseConditional(noIn) { + if (_base.isTypeScriptEnabled || _base.isFlowEnabled) { + _types.typedParseConditional.call(void 0, noIn); + } else { + baseParseConditional(noIn); + } +} + + function baseParseConditional(noIn) { + if (_index3.eat.call(void 0, _types3.TokenType.question)) { + parseMaybeAssign(); + _util.expect.call(void 0, _types3.TokenType.colon); + parseMaybeAssign(noIn); + } +} exports.baseParseConditional = baseParseConditional; + +// Start the precedence parser. +// Returns true if this was an arrow function +function parseExprOps(noIn) { + const startTokenIndex = _base.state.tokens.length; + const wasArrow = parseMaybeUnary(); + if (wasArrow) { + return true; + } + parseExprOp(startTokenIndex, -1, noIn); + return false; +} + +// Parse binary operators with the operator precedence parsing +// algorithm. `left` is the left-hand side of the operator. +// `minPrec` provides context that allows the function to stop and +// defer further parser to one of its callers when it encounters an +// operator that has a lower precedence than the set it is parsing. +function parseExprOp(startTokenIndex, minPrec, noIn) { + if ( + _base.isTypeScriptEnabled && + (_types3.TokenType._in & _types3.TokenType.PRECEDENCE_MASK) > minPrec && + !_util.hasPrecedingLineBreak.call(void 0, ) && + (_util.eatContextual.call(void 0, _keywords.ContextualKeyword._as) || _util.eatContextual.call(void 0, _keywords.ContextualKeyword._satisfies)) + ) { + const oldIsType = _index3.pushTypeContext.call(void 0, 1); + _typescript.tsParseType.call(void 0, ); + _index3.popTypeContext.call(void 0, oldIsType); + _index3.rescan_gt.call(void 0, ); + parseExprOp(startTokenIndex, minPrec, noIn); + return; + } + + const prec = _base.state.type & _types3.TokenType.PRECEDENCE_MASK; + if (prec > 0 && (!noIn || !_index3.match.call(void 0, _types3.TokenType._in))) { + if (prec > minPrec) { + const op = _base.state.type; + _index3.next.call(void 0, ); + if (op === _types3.TokenType.nullishCoalescing) { + _base.state.tokens[_base.state.tokens.length - 1].nullishStartIndex = startTokenIndex; + } + + const rhsStartTokenIndex = _base.state.tokens.length; + parseMaybeUnary(); + // Extend the right operand of this operator if possible. + parseExprOp(rhsStartTokenIndex, op & _types3.TokenType.IS_RIGHT_ASSOCIATIVE ? prec - 1 : prec, noIn); + if (op === _types3.TokenType.nullishCoalescing) { + _base.state.tokens[startTokenIndex].numNullishCoalesceStarts++; + _base.state.tokens[_base.state.tokens.length - 1].numNullishCoalesceEnds++; + } + // Continue with any future operator holding this expression as the left operand. + parseExprOp(startTokenIndex, minPrec, noIn); + } + } +} + +// Parse unary operators, both prefix and postfix. +// Returns true if this was an arrow function. + function parseMaybeUnary() { + if (_base.isTypeScriptEnabled && !_base.isJSXEnabled && _index3.eat.call(void 0, _types3.TokenType.lessThan)) { + _typescript.tsParseTypeAssertion.call(void 0, ); + return false; + } + if ( + _util.isContextual.call(void 0, _keywords.ContextualKeyword._module) && + _index3.lookaheadCharCode.call(void 0, ) === _charcodes.charCodes.leftCurlyBrace && + !_util.hasFollowingLineBreak.call(void 0, ) + ) { + parseModuleExpression(); + return false; + } + if (_base.state.type & _types3.TokenType.IS_PREFIX) { + _index3.next.call(void 0, ); + parseMaybeUnary(); + return false; + } + + const wasArrow = parseExprSubscripts(); + if (wasArrow) { + return true; + } + while (_base.state.type & _types3.TokenType.IS_POSTFIX && !_util.canInsertSemicolon.call(void 0, )) { + // The tokenizer calls everything a preincrement, so make it a postincrement when + // we see it in that context. + if (_base.state.type === _types3.TokenType.preIncDec) { + _base.state.type = _types3.TokenType.postIncDec; + } + _index3.next.call(void 0, ); + } + return false; +} exports.parseMaybeUnary = parseMaybeUnary; + +// Parse call, dot, and `[]`-subscript expressions. +// Returns true if this was an arrow function. + function parseExprSubscripts() { + const startTokenIndex = _base.state.tokens.length; + const wasArrow = parseExprAtom(); + if (wasArrow) { + return true; + } + parseSubscripts(startTokenIndex); + // If there was any optional chain operation, the start token would be marked + // as such, so also mark the end now. + if (_base.state.tokens.length > startTokenIndex && _base.state.tokens[startTokenIndex].isOptionalChainStart) { + _base.state.tokens[_base.state.tokens.length - 1].isOptionalChainEnd = true; + } + return false; +} exports.parseExprSubscripts = parseExprSubscripts; + +function parseSubscripts(startTokenIndex, noCalls = false) { + if (_base.isFlowEnabled) { + _flow.flowParseSubscripts.call(void 0, startTokenIndex, noCalls); + } else { + baseParseSubscripts(startTokenIndex, noCalls); + } +} + + function baseParseSubscripts(startTokenIndex, noCalls = false) { + const stopState = new StopState(false); + do { + parseSubscript(startTokenIndex, noCalls, stopState); + } while (!stopState.stop && !_base.state.error); +} exports.baseParseSubscripts = baseParseSubscripts; + +function parseSubscript(startTokenIndex, noCalls, stopState) { + if (_base.isTypeScriptEnabled) { + _typescript.tsParseSubscript.call(void 0, startTokenIndex, noCalls, stopState); + } else if (_base.isFlowEnabled) { + _flow.flowParseSubscript.call(void 0, startTokenIndex, noCalls, stopState); + } else { + baseParseSubscript(startTokenIndex, noCalls, stopState); + } +} + +/** Set 'state.stop = true' to indicate that we should stop parsing subscripts. */ + function baseParseSubscript( + startTokenIndex, + noCalls, + stopState, +) { + if (!noCalls && _index3.eat.call(void 0, _types3.TokenType.doubleColon)) { + parseNoCallExpr(); + stopState.stop = true; + // Propagate startTokenIndex so that `a::b?.()` will keep `a` as the first token. We may want + // to revisit this in the future when fully supporting bind syntax. + parseSubscripts(startTokenIndex, noCalls); + } else if (_index3.match.call(void 0, _types3.TokenType.questionDot)) { + _base.state.tokens[startTokenIndex].isOptionalChainStart = true; + if (noCalls && _index3.lookaheadType.call(void 0, ) === _types3.TokenType.parenL) { + stopState.stop = true; + return; + } + _index3.next.call(void 0, ); + _base.state.tokens[_base.state.tokens.length - 1].subscriptStartIndex = startTokenIndex; + + if (_index3.eat.call(void 0, _types3.TokenType.bracketL)) { + parseExpression(); + _util.expect.call(void 0, _types3.TokenType.bracketR); + } else if (_index3.eat.call(void 0, _types3.TokenType.parenL)) { + parseCallExpressionArguments(); + } else { + parseMaybePrivateName(); + } + } else if (_index3.eat.call(void 0, _types3.TokenType.dot)) { + _base.state.tokens[_base.state.tokens.length - 1].subscriptStartIndex = startTokenIndex; + parseMaybePrivateName(); + } else if (_index3.eat.call(void 0, _types3.TokenType.bracketL)) { + _base.state.tokens[_base.state.tokens.length - 1].subscriptStartIndex = startTokenIndex; + parseExpression(); + _util.expect.call(void 0, _types3.TokenType.bracketR); + } else if (!noCalls && _index3.match.call(void 0, _types3.TokenType.parenL)) { + if (atPossibleAsync()) { + // We see "async", but it's possible it's a usage of the name "async". Parse as if it's a + // function call, and if we see an arrow later, backtrack and re-parse as a parameter list. + const snapshot = _base.state.snapshot(); + const asyncStartTokenIndex = _base.state.tokens.length; + _index3.next.call(void 0, ); + _base.state.tokens[_base.state.tokens.length - 1].subscriptStartIndex = startTokenIndex; + + const callContextId = _base.getNextContextId.call(void 0, ); + + _base.state.tokens[_base.state.tokens.length - 1].contextId = callContextId; + parseCallExpressionArguments(); + _base.state.tokens[_base.state.tokens.length - 1].contextId = callContextId; + + if (shouldParseAsyncArrow()) { + // We hit an arrow, so backtrack and start again parsing function parameters. + _base.state.restoreFromSnapshot(snapshot); + stopState.stop = true; + _base.state.scopeDepth++; + + _statement.parseFunctionParams.call(void 0, ); + parseAsyncArrowFromCallExpression(asyncStartTokenIndex); + } + } else { + _index3.next.call(void 0, ); + _base.state.tokens[_base.state.tokens.length - 1].subscriptStartIndex = startTokenIndex; + const callContextId = _base.getNextContextId.call(void 0, ); + _base.state.tokens[_base.state.tokens.length - 1].contextId = callContextId; + parseCallExpressionArguments(); + _base.state.tokens[_base.state.tokens.length - 1].contextId = callContextId; + } + } else if (_index3.match.call(void 0, _types3.TokenType.backQuote)) { + // Tagged template expression. + parseTemplate(); + } else { + stopState.stop = true; + } +} exports.baseParseSubscript = baseParseSubscript; + + function atPossibleAsync() { + // This was made less strict than the original version to avoid passing around nodes, but it + // should be safe to have rare false positives here. + return ( + _base.state.tokens[_base.state.tokens.length - 1].contextualKeyword === _keywords.ContextualKeyword._async && + !_util.canInsertSemicolon.call(void 0, ) + ); +} exports.atPossibleAsync = atPossibleAsync; + + function parseCallExpressionArguments() { + let first = true; + while (!_index3.eat.call(void 0, _types3.TokenType.parenR) && !_base.state.error) { + if (first) { + first = false; + } else { + _util.expect.call(void 0, _types3.TokenType.comma); + if (_index3.eat.call(void 0, _types3.TokenType.parenR)) { + break; + } + } + + parseExprListItem(false); + } +} exports.parseCallExpressionArguments = parseCallExpressionArguments; + +function shouldParseAsyncArrow() { + return _index3.match.call(void 0, _types3.TokenType.colon) || _index3.match.call(void 0, _types3.TokenType.arrow); +} + +function parseAsyncArrowFromCallExpression(startTokenIndex) { + if (_base.isTypeScriptEnabled) { + _typescript.tsStartParseAsyncArrowFromCallExpression.call(void 0, ); + } else if (_base.isFlowEnabled) { + _flow.flowStartParseAsyncArrowFromCallExpression.call(void 0, ); + } + _util.expect.call(void 0, _types3.TokenType.arrow); + parseArrowExpression(startTokenIndex); +} + +// Parse a no-call expression (like argument of `new` or `::` operators). + +function parseNoCallExpr() { + const startTokenIndex = _base.state.tokens.length; + parseExprAtom(); + parseSubscripts(startTokenIndex, true); +} + +// Parse an atomic expression — either a single token that is an +// expression, an expression started by a keyword like `function` or +// `new`, or an expression wrapped in punctuation like `()`, `[]`, +// or `{}`. +// Returns true if the parsed expression was an arrow function. + function parseExprAtom() { + if (_index3.eat.call(void 0, _types3.TokenType.modulo)) { + // V8 intrinsic expression. Just parse the identifier, and the function invocation is parsed + // naturally. + parseIdentifier(); + return false; + } + + if (_index3.match.call(void 0, _types3.TokenType.jsxText) || _index3.match.call(void 0, _types3.TokenType.jsxEmptyText)) { + parseLiteral(); + return false; + } else if (_index3.match.call(void 0, _types3.TokenType.lessThan) && _base.isJSXEnabled) { + _base.state.type = _types3.TokenType.jsxTagStart; + _index.jsxParseElement.call(void 0, ); + _index3.next.call(void 0, ); + return false; + } + + const canBeArrow = _base.state.potentialArrowAt === _base.state.start; + switch (_base.state.type) { + case _types3.TokenType.slash: + case _types3.TokenType.assign: + _index3.retokenizeSlashAsRegex.call(void 0, ); + // Fall through. + + case _types3.TokenType._super: + case _types3.TokenType._this: + case _types3.TokenType.regexp: + case _types3.TokenType.num: + case _types3.TokenType.bigint: + case _types3.TokenType.decimal: + case _types3.TokenType.string: + case _types3.TokenType._null: + case _types3.TokenType._true: + case _types3.TokenType._false: + _index3.next.call(void 0, ); + return false; + + case _types3.TokenType._import: + _index3.next.call(void 0, ); + if (_index3.match.call(void 0, _types3.TokenType.dot)) { + // import.meta + _base.state.tokens[_base.state.tokens.length - 1].type = _types3.TokenType.name; + _index3.next.call(void 0, ); + parseIdentifier(); + } + return false; + + case _types3.TokenType.name: { + const startTokenIndex = _base.state.tokens.length; + const functionStart = _base.state.start; + const contextualKeyword = _base.state.contextualKeyword; + parseIdentifier(); + if (contextualKeyword === _keywords.ContextualKeyword._await) { + parseAwait(); + return false; + } else if ( + contextualKeyword === _keywords.ContextualKeyword._async && + _index3.match.call(void 0, _types3.TokenType._function) && + !_util.canInsertSemicolon.call(void 0, ) + ) { + _index3.next.call(void 0, ); + _statement.parseFunction.call(void 0, functionStart, false); + return false; + } else if ( + canBeArrow && + contextualKeyword === _keywords.ContextualKeyword._async && + !_util.canInsertSemicolon.call(void 0, ) && + _index3.match.call(void 0, _types3.TokenType.name) + ) { + _base.state.scopeDepth++; + _lval.parseBindingIdentifier.call(void 0, false); + _util.expect.call(void 0, _types3.TokenType.arrow); + // let foo = async bar => {}; + parseArrowExpression(startTokenIndex); + return true; + } else if (_index3.match.call(void 0, _types3.TokenType._do) && !_util.canInsertSemicolon.call(void 0, )) { + _index3.next.call(void 0, ); + _statement.parseBlock.call(void 0, ); + return false; + } + + if (canBeArrow && !_util.canInsertSemicolon.call(void 0, ) && _index3.match.call(void 0, _types3.TokenType.arrow)) { + _base.state.scopeDepth++; + _lval.markPriorBindingIdentifier.call(void 0, false); + _util.expect.call(void 0, _types3.TokenType.arrow); + parseArrowExpression(startTokenIndex); + return true; + } + + _base.state.tokens[_base.state.tokens.length - 1].identifierRole = _index3.IdentifierRole.Access; + return false; + } + + case _types3.TokenType._do: { + _index3.next.call(void 0, ); + _statement.parseBlock.call(void 0, ); + return false; + } + + case _types3.TokenType.parenL: { + const wasArrow = parseParenAndDistinguishExpression(canBeArrow); + return wasArrow; + } + + case _types3.TokenType.bracketL: + _index3.next.call(void 0, ); + parseExprList(_types3.TokenType.bracketR, true); + return false; + + case _types3.TokenType.braceL: + parseObj(false, false); + return false; + + case _types3.TokenType._function: + parseFunctionExpression(); + return false; + + case _types3.TokenType.at: + _statement.parseDecorators.call(void 0, ); + // Fall through. + + case _types3.TokenType._class: + _statement.parseClass.call(void 0, false); + return false; + + case _types3.TokenType._new: + parseNew(); + return false; + + case _types3.TokenType.backQuote: + parseTemplate(); + return false; + + case _types3.TokenType.doubleColon: { + _index3.next.call(void 0, ); + parseNoCallExpr(); + return false; + } + + case _types3.TokenType.hash: { + const code = _index3.lookaheadCharCode.call(void 0, ); + if (_identifier.IS_IDENTIFIER_START[code] || code === _charcodes.charCodes.backslash) { + parseMaybePrivateName(); + } else { + _index3.next.call(void 0, ); + } + // Smart pipeline topic reference. + return false; + } + + default: + _util.unexpected.call(void 0, ); + return false; + } +} exports.parseExprAtom = parseExprAtom; + +function parseMaybePrivateName() { + _index3.eat.call(void 0, _types3.TokenType.hash); + parseIdentifier(); +} + +function parseFunctionExpression() { + const functionStart = _base.state.start; + parseIdentifier(); + if (_index3.eat.call(void 0, _types3.TokenType.dot)) { + // function.sent + parseIdentifier(); + } + _statement.parseFunction.call(void 0, functionStart, false); +} + + function parseLiteral() { + _index3.next.call(void 0, ); +} exports.parseLiteral = parseLiteral; + + function parseParenExpression() { + _util.expect.call(void 0, _types3.TokenType.parenL); + parseExpression(); + _util.expect.call(void 0, _types3.TokenType.parenR); +} exports.parseParenExpression = parseParenExpression; + +// Returns true if this was an arrow expression. +function parseParenAndDistinguishExpression(canBeArrow) { + // Assume this is a normal parenthesized expression, but if we see an arrow, we'll bail and + // start over as a parameter list. + const snapshot = _base.state.snapshot(); + + const startTokenIndex = _base.state.tokens.length; + _util.expect.call(void 0, _types3.TokenType.parenL); + + let first = true; + + while (!_index3.match.call(void 0, _types3.TokenType.parenR) && !_base.state.error) { + if (first) { + first = false; + } else { + _util.expect.call(void 0, _types3.TokenType.comma); + if (_index3.match.call(void 0, _types3.TokenType.parenR)) { + break; + } + } + + if (_index3.match.call(void 0, _types3.TokenType.ellipsis)) { + _lval.parseRest.call(void 0, false /* isBlockScope */); + parseParenItem(); + break; + } else { + parseMaybeAssign(false, true); + } + } + + _util.expect.call(void 0, _types3.TokenType.parenR); + + if (canBeArrow && shouldParseArrow()) { + const wasArrow = parseArrow(); + if (wasArrow) { + // It was an arrow function this whole time, so start over and parse it as params so that we + // get proper token annotations. + _base.state.restoreFromSnapshot(snapshot); + _base.state.scopeDepth++; + // Don't specify a context ID because arrow functions don't need a context ID. + _statement.parseFunctionParams.call(void 0, ); + parseArrow(); + parseArrowExpression(startTokenIndex); + if (_base.state.error) { + // Nevermind! This must have been something that looks very much like an + // arrow function but where its "parameter list" isn't actually a valid + // parameter list. Force non-arrow parsing. + // See https://github.com/alangpierce/sucrase/issues/666 for an example. + _base.state.restoreFromSnapshot(snapshot); + parseParenAndDistinguishExpression(false); + return false; + } + return true; + } + } + + return false; +} + +function shouldParseArrow() { + return _index3.match.call(void 0, _types3.TokenType.colon) || !_util.canInsertSemicolon.call(void 0, ); +} + +// Returns whether there was an arrow token. + function parseArrow() { + if (_base.isTypeScriptEnabled) { + return _typescript.tsParseArrow.call(void 0, ); + } else if (_base.isFlowEnabled) { + return _flow.flowParseArrow.call(void 0, ); + } else { + return _index3.eat.call(void 0, _types3.TokenType.arrow); + } +} exports.parseArrow = parseArrow; + +function parseParenItem() { + if (_base.isTypeScriptEnabled || _base.isFlowEnabled) { + _types.typedParseParenItem.call(void 0, ); + } +} + +// New's precedence is slightly tricky. It must allow its argument to +// be a `[]` or dot subscript expression, but not a call — at least, +// not without wrapping it in parentheses. Thus, it uses the noCalls +// argument to parseSubscripts to prevent it from consuming the +// argument list. +function parseNew() { + _util.expect.call(void 0, _types3.TokenType._new); + if (_index3.eat.call(void 0, _types3.TokenType.dot)) { + // new.target + parseIdentifier(); + return; + } + parseNewCallee(); + if (_base.isFlowEnabled) { + _flow.flowStartParseNewArguments.call(void 0, ); + } + if (_index3.eat.call(void 0, _types3.TokenType.parenL)) { + parseExprList(_types3.TokenType.parenR); + } +} + +function parseNewCallee() { + parseNoCallExpr(); + _index3.eat.call(void 0, _types3.TokenType.questionDot); +} + + function parseTemplate() { + // Finish `, read quasi + _index3.nextTemplateToken.call(void 0, ); + // Finish quasi, read ${ + _index3.nextTemplateToken.call(void 0, ); + while (!_index3.match.call(void 0, _types3.TokenType.backQuote) && !_base.state.error) { + _util.expect.call(void 0, _types3.TokenType.dollarBraceL); + parseExpression(); + // Finish }, read quasi + _index3.nextTemplateToken.call(void 0, ); + // Finish quasi, read either ${ or ` + _index3.nextTemplateToken.call(void 0, ); + } + _index3.next.call(void 0, ); +} exports.parseTemplate = parseTemplate; + +// Parse an object literal or binding pattern. + function parseObj(isPattern, isBlockScope) { + // Attach a context ID to the object open and close brace and each object key. + const contextId = _base.getNextContextId.call(void 0, ); + let first = true; + + _index3.next.call(void 0, ); + _base.state.tokens[_base.state.tokens.length - 1].contextId = contextId; + + while (!_index3.eat.call(void 0, _types3.TokenType.braceR) && !_base.state.error) { + if (first) { + first = false; + } else { + _util.expect.call(void 0, _types3.TokenType.comma); + if (_index3.eat.call(void 0, _types3.TokenType.braceR)) { + break; + } + } + + let isGenerator = false; + if (_index3.match.call(void 0, _types3.TokenType.ellipsis)) { + const previousIndex = _base.state.tokens.length; + _lval.parseSpread.call(void 0, ); + if (isPattern) { + // Mark role when the only thing being spread over is an identifier. + if (_base.state.tokens.length === previousIndex + 2) { + _lval.markPriorBindingIdentifier.call(void 0, isBlockScope); + } + if (_index3.eat.call(void 0, _types3.TokenType.braceR)) { + break; + } + } + continue; + } + + if (!isPattern) { + isGenerator = _index3.eat.call(void 0, _types3.TokenType.star); + } + + if (!isPattern && _util.isContextual.call(void 0, _keywords.ContextualKeyword._async)) { + if (isGenerator) _util.unexpected.call(void 0, ); + + parseIdentifier(); + if ( + _index3.match.call(void 0, _types3.TokenType.colon) || + _index3.match.call(void 0, _types3.TokenType.parenL) || + _index3.match.call(void 0, _types3.TokenType.braceR) || + _index3.match.call(void 0, _types3.TokenType.eq) || + _index3.match.call(void 0, _types3.TokenType.comma) + ) { + // This is a key called "async" rather than an async function. + } else { + if (_index3.match.call(void 0, _types3.TokenType.star)) { + _index3.next.call(void 0, ); + isGenerator = true; + } + parsePropertyName(contextId); + } + } else { + parsePropertyName(contextId); + } + + parseObjPropValue(isPattern, isBlockScope, contextId); + } + + _base.state.tokens[_base.state.tokens.length - 1].contextId = contextId; +} exports.parseObj = parseObj; + +function isGetterOrSetterMethod(isPattern) { + // We go off of the next and don't bother checking if the node key is actually "get" or "set". + // This lets us avoid generating a node, and should only make the validation worse. + return ( + !isPattern && + (_index3.match.call(void 0, _types3.TokenType.string) || // get "string"() {} + _index3.match.call(void 0, _types3.TokenType.num) || // get 1() {} + _index3.match.call(void 0, _types3.TokenType.bracketL) || // get ["string"]() {} + _index3.match.call(void 0, _types3.TokenType.name) || // get foo() {} + !!(_base.state.type & _types3.TokenType.IS_KEYWORD)) // get debugger() {} + ); +} + +// Returns true if this was a method. +function parseObjectMethod(isPattern, objectContextId) { + // We don't need to worry about modifiers because object methods can't have optional bodies, so + // the start will never be used. + const functionStart = _base.state.start; + if (_index3.match.call(void 0, _types3.TokenType.parenL)) { + if (isPattern) _util.unexpected.call(void 0, ); + parseMethod(functionStart, /* isConstructor */ false); + return true; + } + + if (isGetterOrSetterMethod(isPattern)) { + parsePropertyName(objectContextId); + parseMethod(functionStart, /* isConstructor */ false); + return true; + } + return false; +} + +function parseObjectProperty(isPattern, isBlockScope) { + if (_index3.eat.call(void 0, _types3.TokenType.colon)) { + if (isPattern) { + _lval.parseMaybeDefault.call(void 0, isBlockScope); + } else { + parseMaybeAssign(false); + } + return; + } + + // Since there's no colon, we assume this is an object shorthand. + + // If we're in a destructuring, we've now discovered that the key was actually an assignee, so + // we need to tag it as a declaration with the appropriate scope. Otherwise, we might need to + // transform it on access, so mark it as a normal object shorthand. + let identifierRole; + if (isPattern) { + if (_base.state.scopeDepth === 0) { + identifierRole = _index3.IdentifierRole.ObjectShorthandTopLevelDeclaration; + } else if (isBlockScope) { + identifierRole = _index3.IdentifierRole.ObjectShorthandBlockScopedDeclaration; + } else { + identifierRole = _index3.IdentifierRole.ObjectShorthandFunctionScopedDeclaration; + } + } else { + identifierRole = _index3.IdentifierRole.ObjectShorthand; + } + _base.state.tokens[_base.state.tokens.length - 1].identifierRole = identifierRole; + + // Regardless of whether we know this to be a pattern or if we're in an ambiguous context, allow + // parsing as if there's a default value. + _lval.parseMaybeDefault.call(void 0, isBlockScope, true); +} + +function parseObjPropValue( + isPattern, + isBlockScope, + objectContextId, +) { + if (_base.isTypeScriptEnabled) { + _typescript.tsStartParseObjPropValue.call(void 0, ); + } else if (_base.isFlowEnabled) { + _flow.flowStartParseObjPropValue.call(void 0, ); + } + const wasMethod = parseObjectMethod(isPattern, objectContextId); + if (!wasMethod) { + parseObjectProperty(isPattern, isBlockScope); + } +} + + function parsePropertyName(objectContextId) { + if (_base.isFlowEnabled) { + _flow.flowParseVariance.call(void 0, ); + } + if (_index3.eat.call(void 0, _types3.TokenType.bracketL)) { + _base.state.tokens[_base.state.tokens.length - 1].contextId = objectContextId; + parseMaybeAssign(); + _util.expect.call(void 0, _types3.TokenType.bracketR); + _base.state.tokens[_base.state.tokens.length - 1].contextId = objectContextId; + } else { + if (_index3.match.call(void 0, _types3.TokenType.num) || _index3.match.call(void 0, _types3.TokenType.string) || _index3.match.call(void 0, _types3.TokenType.bigint) || _index3.match.call(void 0, _types3.TokenType.decimal)) { + parseExprAtom(); + } else { + parseMaybePrivateName(); + } + + _base.state.tokens[_base.state.tokens.length - 1].identifierRole = _index3.IdentifierRole.ObjectKey; + _base.state.tokens[_base.state.tokens.length - 1].contextId = objectContextId; + } +} exports.parsePropertyName = parsePropertyName; + +// Parse object or class method. + function parseMethod(functionStart, isConstructor) { + const funcContextId = _base.getNextContextId.call(void 0, ); + + _base.state.scopeDepth++; + const startTokenIndex = _base.state.tokens.length; + const allowModifiers = isConstructor; // For TypeScript parameter properties + _statement.parseFunctionParams.call(void 0, allowModifiers, funcContextId); + parseFunctionBodyAndFinish(functionStart, funcContextId); + const endTokenIndex = _base.state.tokens.length; + _base.state.scopes.push(new (0, _state.Scope)(startTokenIndex, endTokenIndex, true)); + _base.state.scopeDepth--; +} exports.parseMethod = parseMethod; + +// Parse arrow function expression. +// If the parameters are provided, they will be converted to an +// assignable list. + function parseArrowExpression(startTokenIndex) { + parseFunctionBody(true); + const endTokenIndex = _base.state.tokens.length; + _base.state.scopes.push(new (0, _state.Scope)(startTokenIndex, endTokenIndex, true)); + _base.state.scopeDepth--; +} exports.parseArrowExpression = parseArrowExpression; + + function parseFunctionBodyAndFinish(functionStart, funcContextId = 0) { + if (_base.isTypeScriptEnabled) { + _typescript.tsParseFunctionBodyAndFinish.call(void 0, functionStart, funcContextId); + } else if (_base.isFlowEnabled) { + _flow.flowParseFunctionBodyAndFinish.call(void 0, funcContextId); + } else { + parseFunctionBody(false, funcContextId); + } +} exports.parseFunctionBodyAndFinish = parseFunctionBodyAndFinish; + + function parseFunctionBody(allowExpression, funcContextId = 0) { + const isExpression = allowExpression && !_index3.match.call(void 0, _types3.TokenType.braceL); + + if (isExpression) { + parseMaybeAssign(); + } else { + _statement.parseBlock.call(void 0, true /* isFunctionScope */, funcContextId); + } +} exports.parseFunctionBody = parseFunctionBody; + +// Parses a comma-separated list of expressions, and returns them as +// an array. `close` is the token type that ends the list, and +// `allowEmpty` can be turned on to allow subsequent commas with +// nothing in between them to be parsed as `null` (which is needed +// for array literals). + +function parseExprList(close, allowEmpty = false) { + let first = true; + while (!_index3.eat.call(void 0, close) && !_base.state.error) { + if (first) { + first = false; + } else { + _util.expect.call(void 0, _types3.TokenType.comma); + if (_index3.eat.call(void 0, close)) break; + } + parseExprListItem(allowEmpty); + } +} + +function parseExprListItem(allowEmpty) { + if (allowEmpty && _index3.match.call(void 0, _types3.TokenType.comma)) { + // Empty item; nothing more to parse for this item. + } else if (_index3.match.call(void 0, _types3.TokenType.ellipsis)) { + _lval.parseSpread.call(void 0, ); + parseParenItem(); + } else if (_index3.match.call(void 0, _types3.TokenType.question)) { + // Partial function application proposal. + _index3.next.call(void 0, ); + } else { + parseMaybeAssign(false, true); + } +} + +// Parse the next token as an identifier. + function parseIdentifier() { + _index3.next.call(void 0, ); + _base.state.tokens[_base.state.tokens.length - 1].type = _types3.TokenType.name; +} exports.parseIdentifier = parseIdentifier; + +// Parses await expression inside async function. +function parseAwait() { + parseMaybeUnary(); +} + +// Parses yield expression inside generator. +function parseYield() { + _index3.next.call(void 0, ); + if (!_index3.match.call(void 0, _types3.TokenType.semi) && !_util.canInsertSemicolon.call(void 0, )) { + _index3.eat.call(void 0, _types3.TokenType.star); + parseMaybeAssign(); + } +} + +// https://github.com/tc39/proposal-js-module-blocks +function parseModuleExpression() { + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._module); + _util.expect.call(void 0, _types3.TokenType.braceL); + // For now, just call parseBlockBody to parse the block. In the future when we + // implement full support, we'll want to emit scopes and possibly other + // information. + _statement.parseBlockBody.call(void 0, _types3.TokenType.braceR); +} diff --git a/node_modules/sucrase/dist/parser/traverser/index.js b/node_modules/sucrase/dist/parser/traverser/index.js new file mode 100644 index 0000000..72e4130 --- /dev/null +++ b/node_modules/sucrase/dist/parser/traverser/index.js @@ -0,0 +1,18 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); +var _index = require('../tokenizer/index'); +var _charcodes = require('../util/charcodes'); +var _base = require('./base'); +var _statement = require('./statement'); + + function parseFile() { + // If enabled, skip leading hashbang line. + if ( + _base.state.pos === 0 && + _base.input.charCodeAt(0) === _charcodes.charCodes.numberSign && + _base.input.charCodeAt(1) === _charcodes.charCodes.exclamationMark + ) { + _index.skipLineComment.call(void 0, 2); + } + _index.nextToken.call(void 0, ); + return _statement.parseTopLevel.call(void 0, ); +} exports.parseFile = parseFile; diff --git a/node_modules/sucrase/dist/parser/traverser/lval.js b/node_modules/sucrase/dist/parser/traverser/lval.js new file mode 100644 index 0000000..9057497 --- /dev/null +++ b/node_modules/sucrase/dist/parser/traverser/lval.js @@ -0,0 +1,159 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _flow = require('../plugins/flow'); +var _typescript = require('../plugins/typescript'); + + + + + + + +var _index = require('../tokenizer/index'); +var _keywords = require('../tokenizer/keywords'); +var _types = require('../tokenizer/types'); +var _base = require('./base'); +var _expression = require('./expression'); +var _util = require('./util'); + + function parseSpread() { + _index.next.call(void 0, ); + _expression.parseMaybeAssign.call(void 0, false); +} exports.parseSpread = parseSpread; + + function parseRest(isBlockScope) { + _index.next.call(void 0, ); + parseBindingAtom(isBlockScope); +} exports.parseRest = parseRest; + + function parseBindingIdentifier(isBlockScope) { + _expression.parseIdentifier.call(void 0, ); + markPriorBindingIdentifier(isBlockScope); +} exports.parseBindingIdentifier = parseBindingIdentifier; + + function parseImportedIdentifier() { + _expression.parseIdentifier.call(void 0, ); + _base.state.tokens[_base.state.tokens.length - 1].identifierRole = _index.IdentifierRole.ImportDeclaration; +} exports.parseImportedIdentifier = parseImportedIdentifier; + + function markPriorBindingIdentifier(isBlockScope) { + let identifierRole; + if (_base.state.scopeDepth === 0) { + identifierRole = _index.IdentifierRole.TopLevelDeclaration; + } else if (isBlockScope) { + identifierRole = _index.IdentifierRole.BlockScopedDeclaration; + } else { + identifierRole = _index.IdentifierRole.FunctionScopedDeclaration; + } + _base.state.tokens[_base.state.tokens.length - 1].identifierRole = identifierRole; +} exports.markPriorBindingIdentifier = markPriorBindingIdentifier; + +// Parses lvalue (assignable) atom. + function parseBindingAtom(isBlockScope) { + switch (_base.state.type) { + case _types.TokenType._this: { + // In TypeScript, "this" may be the name of a parameter, so allow it. + const oldIsType = _index.pushTypeContext.call(void 0, 0); + _index.next.call(void 0, ); + _index.popTypeContext.call(void 0, oldIsType); + return; + } + + case _types.TokenType._yield: + case _types.TokenType.name: { + _base.state.type = _types.TokenType.name; + parseBindingIdentifier(isBlockScope); + return; + } + + case _types.TokenType.bracketL: { + _index.next.call(void 0, ); + parseBindingList(_types.TokenType.bracketR, isBlockScope, true /* allowEmpty */); + return; + } + + case _types.TokenType.braceL: + _expression.parseObj.call(void 0, true, isBlockScope); + return; + + default: + _util.unexpected.call(void 0, ); + } +} exports.parseBindingAtom = parseBindingAtom; + + function parseBindingList( + close, + isBlockScope, + allowEmpty = false, + allowModifiers = false, + contextId = 0, +) { + let first = true; + + let hasRemovedComma = false; + const firstItemTokenIndex = _base.state.tokens.length; + + while (!_index.eat.call(void 0, close) && !_base.state.error) { + if (first) { + first = false; + } else { + _util.expect.call(void 0, _types.TokenType.comma); + _base.state.tokens[_base.state.tokens.length - 1].contextId = contextId; + // After a "this" type in TypeScript, we need to set the following comma (if any) to also be + // a type token so that it will be removed. + if (!hasRemovedComma && _base.state.tokens[firstItemTokenIndex].isType) { + _base.state.tokens[_base.state.tokens.length - 1].isType = true; + hasRemovedComma = true; + } + } + if (allowEmpty && _index.match.call(void 0, _types.TokenType.comma)) { + // Empty item; nothing further to parse for this item. + } else if (_index.eat.call(void 0, close)) { + break; + } else if (_index.match.call(void 0, _types.TokenType.ellipsis)) { + parseRest(isBlockScope); + parseAssignableListItemTypes(); + // Support rest element trailing commas allowed by TypeScript <2.9. + _index.eat.call(void 0, _types.TokenType.comma); + _util.expect.call(void 0, close); + break; + } else { + parseAssignableListItem(allowModifiers, isBlockScope); + } + } +} exports.parseBindingList = parseBindingList; + +function parseAssignableListItem(allowModifiers, isBlockScope) { + if (allowModifiers) { + _typescript.tsParseModifiers.call(void 0, [ + _keywords.ContextualKeyword._public, + _keywords.ContextualKeyword._protected, + _keywords.ContextualKeyword._private, + _keywords.ContextualKeyword._readonly, + _keywords.ContextualKeyword._override, + ]); + } + + parseMaybeDefault(isBlockScope); + parseAssignableListItemTypes(); + parseMaybeDefault(isBlockScope, true /* leftAlreadyParsed */); +} + +function parseAssignableListItemTypes() { + if (_base.isFlowEnabled) { + _flow.flowParseAssignableListItemTypes.call(void 0, ); + } else if (_base.isTypeScriptEnabled) { + _typescript.tsParseAssignableListItemTypes.call(void 0, ); + } +} + +// Parses assignment pattern around given atom if possible. + function parseMaybeDefault(isBlockScope, leftAlreadyParsed = false) { + if (!leftAlreadyParsed) { + parseBindingAtom(isBlockScope); + } + if (!_index.eat.call(void 0, _types.TokenType.eq)) { + return; + } + const eqIndex = _base.state.tokens.length - 1; + _expression.parseMaybeAssign.call(void 0, ); + _base.state.tokens[eqIndex].rhsEndIndex = _base.state.tokens.length; +} exports.parseMaybeDefault = parseMaybeDefault; diff --git a/node_modules/sucrase/dist/parser/traverser/statement.js b/node_modules/sucrase/dist/parser/traverser/statement.js new file mode 100644 index 0000000..6be3391 --- /dev/null +++ b/node_modules/sucrase/dist/parser/traverser/statement.js @@ -0,0 +1,1332 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});/* eslint max-len: 0 */ + +var _index = require('../index'); + + + + + + + + + + + + + + + + +var _flow = require('../plugins/flow'); + + + + + + + + + + + + + + + + + + +var _typescript = require('../plugins/typescript'); + + + + + + + + + + + + +var _tokenizer = require('../tokenizer'); +var _keywords = require('../tokenizer/keywords'); +var _state = require('../tokenizer/state'); +var _types = require('../tokenizer/types'); +var _charcodes = require('../util/charcodes'); +var _base = require('./base'); + + + + + + + + + + + + +var _expression = require('./expression'); + + + + + +var _lval = require('./lval'); + + + + + + + + + + + + +var _util = require('./util'); + + function parseTopLevel() { + parseBlockBody(_types.TokenType.eof); + _base.state.scopes.push(new (0, _state.Scope)(0, _base.state.tokens.length, true)); + if (_base.state.scopeDepth !== 0) { + throw new Error(`Invalid scope depth at end of file: ${_base.state.scopeDepth}`); + } + return new (0, _index.File)(_base.state.tokens, _base.state.scopes); +} exports.parseTopLevel = parseTopLevel; + +// Parse a single statement. +// +// If expecting a statement and finding a slash operator, parse a +// regular expression literal. This is to handle cases like +// `if (foo) /blah/.exec(foo)`, where looking at the previous token +// does not help. + + function parseStatement(declaration) { + if (_base.isFlowEnabled) { + if (_flow.flowTryParseStatement.call(void 0, )) { + return; + } + } + if (_tokenizer.match.call(void 0, _types.TokenType.at)) { + parseDecorators(); + } + parseStatementContent(declaration); +} exports.parseStatement = parseStatement; + +function parseStatementContent(declaration) { + if (_base.isTypeScriptEnabled) { + if (_typescript.tsTryParseStatementContent.call(void 0, )) { + return; + } + } + + const starttype = _base.state.type; + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case _types.TokenType._break: + case _types.TokenType._continue: + parseBreakContinueStatement(); + return; + case _types.TokenType._debugger: + parseDebuggerStatement(); + return; + case _types.TokenType._do: + parseDoStatement(); + return; + case _types.TokenType._for: + parseForStatement(); + return; + case _types.TokenType._function: + if (_tokenizer.lookaheadType.call(void 0, ) === _types.TokenType.dot) break; + if (!declaration) _util.unexpected.call(void 0, ); + parseFunctionStatement(); + return; + + case _types.TokenType._class: + if (!declaration) _util.unexpected.call(void 0, ); + parseClass(true); + return; + + case _types.TokenType._if: + parseIfStatement(); + return; + case _types.TokenType._return: + parseReturnStatement(); + return; + case _types.TokenType._switch: + parseSwitchStatement(); + return; + case _types.TokenType._throw: + parseThrowStatement(); + return; + case _types.TokenType._try: + parseTryStatement(); + return; + + case _types.TokenType._let: + case _types.TokenType._const: + if (!declaration) _util.unexpected.call(void 0, ); // NOTE: falls through to _var + + case _types.TokenType._var: + parseVarStatement(starttype !== _types.TokenType._var); + return; + + case _types.TokenType._while: + parseWhileStatement(); + return; + case _types.TokenType.braceL: + parseBlock(); + return; + case _types.TokenType.semi: + parseEmptyStatement(); + return; + case _types.TokenType._export: + case _types.TokenType._import: { + const nextType = _tokenizer.lookaheadType.call(void 0, ); + if (nextType === _types.TokenType.parenL || nextType === _types.TokenType.dot) { + break; + } + _tokenizer.next.call(void 0, ); + if (starttype === _types.TokenType._import) { + parseImport(); + } else { + parseExport(); + } + return; + } + case _types.TokenType.name: + if (_base.state.contextualKeyword === _keywords.ContextualKeyword._async) { + const functionStart = _base.state.start; + // peek ahead and see if next token is a function + const snapshot = _base.state.snapshot(); + _tokenizer.next.call(void 0, ); + if (_tokenizer.match.call(void 0, _types.TokenType._function) && !_util.canInsertSemicolon.call(void 0, )) { + _util.expect.call(void 0, _types.TokenType._function); + parseFunction(functionStart, true); + return; + } else { + _base.state.restoreFromSnapshot(snapshot); + } + } else if ( + _base.state.contextualKeyword === _keywords.ContextualKeyword._using && + !_util.hasFollowingLineBreak.call(void 0, ) && + // Statements like `using[0]` and `using in foo` aren't actual using + // declarations. + _tokenizer.lookaheadType.call(void 0, ) === _types.TokenType.name + ) { + parseVarStatement(true); + return; + } else if (startsAwaitUsing()) { + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._await); + parseVarStatement(true); + return; + } + default: + // Do nothing. + break; + } + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + const initialTokensLength = _base.state.tokens.length; + _expression.parseExpression.call(void 0, ); + let simpleName = null; + if (_base.state.tokens.length === initialTokensLength + 1) { + const token = _base.state.tokens[_base.state.tokens.length - 1]; + if (token.type === _types.TokenType.name) { + simpleName = token.contextualKeyword; + } + } + if (simpleName == null) { + _util.semicolon.call(void 0, ); + return; + } + if (_tokenizer.eat.call(void 0, _types.TokenType.colon)) { + parseLabeledStatement(); + } else { + // This was an identifier, so we might want to handle flow/typescript-specific cases. + parseIdentifierStatement(simpleName); + } +} + +/** + * Determine if we're positioned at an `await using` declaration. + * + * Note that this can happen either in place of a regular variable declaration + * or in a loop body, and in both places, there are similar-looking cases where + * we need to return false. + * + * Examples returning true: + * await using foo = bar(); + * for (await using a of b) {} + * + * Examples returning false: + * await using + * await using + 1 + * await using instanceof T + * for (await using;;) {} + * + * For now, we early return if we don't see `await`, then do a simple + * backtracking-based lookahead for the `using` and identifier tokens. In the + * future, this could be optimized with a character-based approach. + */ +function startsAwaitUsing() { + if (!_util.isContextual.call(void 0, _keywords.ContextualKeyword._await)) { + return false; + } + const snapshot = _base.state.snapshot(); + // await + _tokenizer.next.call(void 0, ); + if (!_util.isContextual.call(void 0, _keywords.ContextualKeyword._using) || _util.hasPrecedingLineBreak.call(void 0, )) { + _base.state.restoreFromSnapshot(snapshot); + return false; + } + // using + _tokenizer.next.call(void 0, ); + if (!_tokenizer.match.call(void 0, _types.TokenType.name) || _util.hasPrecedingLineBreak.call(void 0, )) { + _base.state.restoreFromSnapshot(snapshot); + return false; + } + _base.state.restoreFromSnapshot(snapshot); + return true; +} + + function parseDecorators() { + while (_tokenizer.match.call(void 0, _types.TokenType.at)) { + parseDecorator(); + } +} exports.parseDecorators = parseDecorators; + +function parseDecorator() { + _tokenizer.next.call(void 0, ); + if (_tokenizer.eat.call(void 0, _types.TokenType.parenL)) { + _expression.parseExpression.call(void 0, ); + _util.expect.call(void 0, _types.TokenType.parenR); + } else { + _expression.parseIdentifier.call(void 0, ); + while (_tokenizer.eat.call(void 0, _types.TokenType.dot)) { + _expression.parseIdentifier.call(void 0, ); + } + parseMaybeDecoratorArguments(); + } +} + +function parseMaybeDecoratorArguments() { + if (_base.isTypeScriptEnabled) { + _typescript.tsParseMaybeDecoratorArguments.call(void 0, ); + } else { + baseParseMaybeDecoratorArguments(); + } +} + + function baseParseMaybeDecoratorArguments() { + if (_tokenizer.eat.call(void 0, _types.TokenType.parenL)) { + _expression.parseCallExpressionArguments.call(void 0, ); + } +} exports.baseParseMaybeDecoratorArguments = baseParseMaybeDecoratorArguments; + +function parseBreakContinueStatement() { + _tokenizer.next.call(void 0, ); + if (!_util.isLineTerminator.call(void 0, )) { + _expression.parseIdentifier.call(void 0, ); + _util.semicolon.call(void 0, ); + } +} + +function parseDebuggerStatement() { + _tokenizer.next.call(void 0, ); + _util.semicolon.call(void 0, ); +} + +function parseDoStatement() { + _tokenizer.next.call(void 0, ); + parseStatement(false); + _util.expect.call(void 0, _types.TokenType._while); + _expression.parseParenExpression.call(void 0, ); + _tokenizer.eat.call(void 0, _types.TokenType.semi); +} + +function parseForStatement() { + _base.state.scopeDepth++; + const startTokenIndex = _base.state.tokens.length; + parseAmbiguousForStatement(); + const endTokenIndex = _base.state.tokens.length; + _base.state.scopes.push(new (0, _state.Scope)(startTokenIndex, endTokenIndex, false)); + _base.state.scopeDepth--; +} + +/** + * Determine if this token is a `using` declaration (explicit resource + * management) as part of a loop. + * https://github.com/tc39/proposal-explicit-resource-management + */ +function isUsingInLoop() { + if (!_util.isContextual.call(void 0, _keywords.ContextualKeyword._using)) { + return false; + } + // This must be `for (using of`, where `using` is the name of the loop + // variable. + if (_util.isLookaheadContextual.call(void 0, _keywords.ContextualKeyword._of)) { + return false; + } + return true; +} + +// Disambiguating between a `for` and a `for`/`in` or `for`/`of` +// loop is non-trivial. Basically, we have to parse the init `var` +// statement or expression, disallowing the `in` operator (see +// the second parameter to `parseExpression`), and then check +// whether the next token is `in` or `of`. When there is no init +// part (semicolon immediately after the opening parenthesis), it +// is a regular `for` loop. +function parseAmbiguousForStatement() { + _tokenizer.next.call(void 0, ); + + let forAwait = false; + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._await)) { + forAwait = true; + _tokenizer.next.call(void 0, ); + } + _util.expect.call(void 0, _types.TokenType.parenL); + + if (_tokenizer.match.call(void 0, _types.TokenType.semi)) { + if (forAwait) { + _util.unexpected.call(void 0, ); + } + parseFor(); + return; + } + + const isAwaitUsing = startsAwaitUsing(); + if (isAwaitUsing || _tokenizer.match.call(void 0, _types.TokenType._var) || _tokenizer.match.call(void 0, _types.TokenType._let) || _tokenizer.match.call(void 0, _types.TokenType._const) || isUsingInLoop()) { + if (isAwaitUsing) { + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._await); + } + _tokenizer.next.call(void 0, ); + parseVar(true, _base.state.type !== _types.TokenType._var); + if (_tokenizer.match.call(void 0, _types.TokenType._in) || _util.isContextual.call(void 0, _keywords.ContextualKeyword._of)) { + parseForIn(forAwait); + return; + } + parseFor(); + return; + } + + _expression.parseExpression.call(void 0, true); + if (_tokenizer.match.call(void 0, _types.TokenType._in) || _util.isContextual.call(void 0, _keywords.ContextualKeyword._of)) { + parseForIn(forAwait); + return; + } + if (forAwait) { + _util.unexpected.call(void 0, ); + } + parseFor(); +} + +function parseFunctionStatement() { + const functionStart = _base.state.start; + _tokenizer.next.call(void 0, ); + parseFunction(functionStart, true); +} + +function parseIfStatement() { + _tokenizer.next.call(void 0, ); + _expression.parseParenExpression.call(void 0, ); + parseStatement(false); + if (_tokenizer.eat.call(void 0, _types.TokenType._else)) { + parseStatement(false); + } +} + +function parseReturnStatement() { + _tokenizer.next.call(void 0, ); + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (!_util.isLineTerminator.call(void 0, )) { + _expression.parseExpression.call(void 0, ); + _util.semicolon.call(void 0, ); + } +} + +function parseSwitchStatement() { + _tokenizer.next.call(void 0, ); + _expression.parseParenExpression.call(void 0, ); + _base.state.scopeDepth++; + const startTokenIndex = _base.state.tokens.length; + _util.expect.call(void 0, _types.TokenType.braceL); + + // Don't bother validation; just go through any sequence of cases, defaults, and statements. + while (!_tokenizer.match.call(void 0, _types.TokenType.braceR) && !_base.state.error) { + if (_tokenizer.match.call(void 0, _types.TokenType._case) || _tokenizer.match.call(void 0, _types.TokenType._default)) { + const isCase = _tokenizer.match.call(void 0, _types.TokenType._case); + _tokenizer.next.call(void 0, ); + if (isCase) { + _expression.parseExpression.call(void 0, ); + } + _util.expect.call(void 0, _types.TokenType.colon); + } else { + parseStatement(true); + } + } + _tokenizer.next.call(void 0, ); // Closing brace + const endTokenIndex = _base.state.tokens.length; + _base.state.scopes.push(new (0, _state.Scope)(startTokenIndex, endTokenIndex, false)); + _base.state.scopeDepth--; +} + +function parseThrowStatement() { + _tokenizer.next.call(void 0, ); + _expression.parseExpression.call(void 0, ); + _util.semicolon.call(void 0, ); +} + +function parseCatchClauseParam() { + _lval.parseBindingAtom.call(void 0, true /* isBlockScope */); + + if (_base.isTypeScriptEnabled) { + _typescript.tsTryParseTypeAnnotation.call(void 0, ); + } +} + +function parseTryStatement() { + _tokenizer.next.call(void 0, ); + + parseBlock(); + + if (_tokenizer.match.call(void 0, _types.TokenType._catch)) { + _tokenizer.next.call(void 0, ); + let catchBindingStartTokenIndex = null; + if (_tokenizer.match.call(void 0, _types.TokenType.parenL)) { + _base.state.scopeDepth++; + catchBindingStartTokenIndex = _base.state.tokens.length; + _util.expect.call(void 0, _types.TokenType.parenL); + parseCatchClauseParam(); + _util.expect.call(void 0, _types.TokenType.parenR); + } + parseBlock(); + if (catchBindingStartTokenIndex != null) { + // We need a special scope for the catch binding which includes the binding itself and the + // catch block. + const endTokenIndex = _base.state.tokens.length; + _base.state.scopes.push(new (0, _state.Scope)(catchBindingStartTokenIndex, endTokenIndex, false)); + _base.state.scopeDepth--; + } + } + if (_tokenizer.eat.call(void 0, _types.TokenType._finally)) { + parseBlock(); + } +} + + function parseVarStatement(isBlockScope) { + _tokenizer.next.call(void 0, ); + parseVar(false, isBlockScope); + _util.semicolon.call(void 0, ); +} exports.parseVarStatement = parseVarStatement; + +function parseWhileStatement() { + _tokenizer.next.call(void 0, ); + _expression.parseParenExpression.call(void 0, ); + parseStatement(false); +} + +function parseEmptyStatement() { + _tokenizer.next.call(void 0, ); +} + +function parseLabeledStatement() { + parseStatement(true); +} + +/** + * Parse a statement starting with an identifier of the given name. Subclasses match on the name + * to handle statements like "declare". + */ +function parseIdentifierStatement(contextualKeyword) { + if (_base.isTypeScriptEnabled) { + _typescript.tsParseIdentifierStatement.call(void 0, contextualKeyword); + } else if (_base.isFlowEnabled) { + _flow.flowParseIdentifierStatement.call(void 0, contextualKeyword); + } else { + _util.semicolon.call(void 0, ); + } +} + +// Parse a semicolon-enclosed block of statements. + function parseBlock(isFunctionScope = false, contextId = 0) { + const startTokenIndex = _base.state.tokens.length; + _base.state.scopeDepth++; + _util.expect.call(void 0, _types.TokenType.braceL); + if (contextId) { + _base.state.tokens[_base.state.tokens.length - 1].contextId = contextId; + } + parseBlockBody(_types.TokenType.braceR); + if (contextId) { + _base.state.tokens[_base.state.tokens.length - 1].contextId = contextId; + } + const endTokenIndex = _base.state.tokens.length; + _base.state.scopes.push(new (0, _state.Scope)(startTokenIndex, endTokenIndex, isFunctionScope)); + _base.state.scopeDepth--; +} exports.parseBlock = parseBlock; + + function parseBlockBody(end) { + while (!_tokenizer.eat.call(void 0, end) && !_base.state.error) { + parseStatement(true); + } +} exports.parseBlockBody = parseBlockBody; + +// Parse a regular `for` loop. The disambiguation code in +// `parseStatement` will already have parsed the init statement or +// expression. + +function parseFor() { + _util.expect.call(void 0, _types.TokenType.semi); + if (!_tokenizer.match.call(void 0, _types.TokenType.semi)) { + _expression.parseExpression.call(void 0, ); + } + _util.expect.call(void 0, _types.TokenType.semi); + if (!_tokenizer.match.call(void 0, _types.TokenType.parenR)) { + _expression.parseExpression.call(void 0, ); + } + _util.expect.call(void 0, _types.TokenType.parenR); + parseStatement(false); +} + +// Parse a `for`/`in` and `for`/`of` loop, which are almost +// same from parser's perspective. + +function parseForIn(forAwait) { + if (forAwait) { + _util.eatContextual.call(void 0, _keywords.ContextualKeyword._of); + } else { + _tokenizer.next.call(void 0, ); + } + _expression.parseExpression.call(void 0, ); + _util.expect.call(void 0, _types.TokenType.parenR); + parseStatement(false); +} + +// Parse a list of variable declarations. + +function parseVar(isFor, isBlockScope) { + while (true) { + parseVarHead(isBlockScope); + if (_tokenizer.eat.call(void 0, _types.TokenType.eq)) { + const eqIndex = _base.state.tokens.length - 1; + _expression.parseMaybeAssign.call(void 0, isFor); + _base.state.tokens[eqIndex].rhsEndIndex = _base.state.tokens.length; + } + if (!_tokenizer.eat.call(void 0, _types.TokenType.comma)) { + break; + } + } +} + +function parseVarHead(isBlockScope) { + _lval.parseBindingAtom.call(void 0, isBlockScope); + if (_base.isTypeScriptEnabled) { + _typescript.tsAfterParseVarHead.call(void 0, ); + } else if (_base.isFlowEnabled) { + _flow.flowAfterParseVarHead.call(void 0, ); + } +} + +// Parse a function declaration or literal (depending on the +// `isStatement` parameter). + + function parseFunction( + functionStart, + isStatement, + optionalId = false, +) { + if (_tokenizer.match.call(void 0, _types.TokenType.star)) { + _tokenizer.next.call(void 0, ); + } + + if (isStatement && !optionalId && !_tokenizer.match.call(void 0, _types.TokenType.name) && !_tokenizer.match.call(void 0, _types.TokenType._yield)) { + _util.unexpected.call(void 0, ); + } + + let nameScopeStartTokenIndex = null; + + if (_tokenizer.match.call(void 0, _types.TokenType.name)) { + // Expression-style functions should limit their name's scope to the function body, so we make + // a new function scope to enforce that. + if (!isStatement) { + nameScopeStartTokenIndex = _base.state.tokens.length; + _base.state.scopeDepth++; + } + _lval.parseBindingIdentifier.call(void 0, false); + } + + const startTokenIndex = _base.state.tokens.length; + _base.state.scopeDepth++; + parseFunctionParams(); + _expression.parseFunctionBodyAndFinish.call(void 0, functionStart); + const endTokenIndex = _base.state.tokens.length; + // In addition to the block scope of the function body, we need a separate function-style scope + // that includes the params. + _base.state.scopes.push(new (0, _state.Scope)(startTokenIndex, endTokenIndex, true)); + _base.state.scopeDepth--; + if (nameScopeStartTokenIndex !== null) { + _base.state.scopes.push(new (0, _state.Scope)(nameScopeStartTokenIndex, endTokenIndex, true)); + _base.state.scopeDepth--; + } +} exports.parseFunction = parseFunction; + + function parseFunctionParams( + allowModifiers = false, + funcContextId = 0, +) { + if (_base.isTypeScriptEnabled) { + _typescript.tsStartParseFunctionParams.call(void 0, ); + } else if (_base.isFlowEnabled) { + _flow.flowStartParseFunctionParams.call(void 0, ); + } + + _util.expect.call(void 0, _types.TokenType.parenL); + if (funcContextId) { + _base.state.tokens[_base.state.tokens.length - 1].contextId = funcContextId; + } + _lval.parseBindingList.call(void 0, + _types.TokenType.parenR, + false /* isBlockScope */, + false /* allowEmpty */, + allowModifiers, + funcContextId, + ); + if (funcContextId) { + _base.state.tokens[_base.state.tokens.length - 1].contextId = funcContextId; + } +} exports.parseFunctionParams = parseFunctionParams; + +// Parse a class declaration or literal (depending on the +// `isStatement` parameter). + + function parseClass(isStatement, optionalId = false) { + // Put a context ID on the class keyword, the open-brace, and the close-brace, so that later + // code can easily navigate to meaningful points on the class. + const contextId = _base.getNextContextId.call(void 0, ); + + _tokenizer.next.call(void 0, ); + _base.state.tokens[_base.state.tokens.length - 1].contextId = contextId; + _base.state.tokens[_base.state.tokens.length - 1].isExpression = !isStatement; + // Like with functions, we declare a special "name scope" from the start of the name to the end + // of the class, but only with expression-style classes, to represent the fact that the name is + // available to the body of the class but not an outer declaration. + let nameScopeStartTokenIndex = null; + if (!isStatement) { + nameScopeStartTokenIndex = _base.state.tokens.length; + _base.state.scopeDepth++; + } + parseClassId(isStatement, optionalId); + parseClassSuper(); + const openBraceIndex = _base.state.tokens.length; + parseClassBody(contextId); + if (_base.state.error) { + return; + } + _base.state.tokens[openBraceIndex].contextId = contextId; + _base.state.tokens[_base.state.tokens.length - 1].contextId = contextId; + if (nameScopeStartTokenIndex !== null) { + const endTokenIndex = _base.state.tokens.length; + _base.state.scopes.push(new (0, _state.Scope)(nameScopeStartTokenIndex, endTokenIndex, false)); + _base.state.scopeDepth--; + } +} exports.parseClass = parseClass; + +function isClassProperty() { + return _tokenizer.match.call(void 0, _types.TokenType.eq) || _tokenizer.match.call(void 0, _types.TokenType.semi) || _tokenizer.match.call(void 0, _types.TokenType.braceR) || _tokenizer.match.call(void 0, _types.TokenType.bang) || _tokenizer.match.call(void 0, _types.TokenType.colon); +} + +function isClassMethod() { + return _tokenizer.match.call(void 0, _types.TokenType.parenL) || _tokenizer.match.call(void 0, _types.TokenType.lessThan); +} + +function parseClassBody(classContextId) { + _util.expect.call(void 0, _types.TokenType.braceL); + + while (!_tokenizer.eat.call(void 0, _types.TokenType.braceR) && !_base.state.error) { + if (_tokenizer.eat.call(void 0, _types.TokenType.semi)) { + continue; + } + + if (_tokenizer.match.call(void 0, _types.TokenType.at)) { + parseDecorator(); + continue; + } + const memberStart = _base.state.start; + parseClassMember(memberStart, classContextId); + } +} + +function parseClassMember(memberStart, classContextId) { + if (_base.isTypeScriptEnabled) { + _typescript.tsParseModifiers.call(void 0, [ + _keywords.ContextualKeyword._declare, + _keywords.ContextualKeyword._public, + _keywords.ContextualKeyword._protected, + _keywords.ContextualKeyword._private, + _keywords.ContextualKeyword._override, + ]); + } + let isStatic = false; + if (_tokenizer.match.call(void 0, _types.TokenType.name) && _base.state.contextualKeyword === _keywords.ContextualKeyword._static) { + _expression.parseIdentifier.call(void 0, ); // eats 'static' + if (isClassMethod()) { + parseClassMethod(memberStart, /* isConstructor */ false); + return; + } else if (isClassProperty()) { + parseClassProperty(); + return; + } + // otherwise something static + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._static; + isStatic = true; + + if (_tokenizer.match.call(void 0, _types.TokenType.braceL)) { + // This is a static block. Mark the word "static" with the class context ID for class element + // detection and parse as a regular block. + _base.state.tokens[_base.state.tokens.length - 1].contextId = classContextId; + parseBlock(); + return; + } + } + + parseClassMemberWithIsStatic(memberStart, isStatic, classContextId); +} + +function parseClassMemberWithIsStatic( + memberStart, + isStatic, + classContextId, +) { + if (_base.isTypeScriptEnabled) { + if (_typescript.tsTryParseClassMemberWithIsStatic.call(void 0, isStatic)) { + return; + } + } + if (_tokenizer.eat.call(void 0, _types.TokenType.star)) { + // a generator + parseClassPropertyName(classContextId); + parseClassMethod(memberStart, /* isConstructor */ false); + return; + } + + // Get the identifier name so we can tell if it's actually a keyword like "async", "get", or + // "set". + parseClassPropertyName(classContextId); + let isConstructor = false; + const token = _base.state.tokens[_base.state.tokens.length - 1]; + // We allow "constructor" as either an identifier or a string. + if (token.contextualKeyword === _keywords.ContextualKeyword._constructor) { + isConstructor = true; + } + parsePostMemberNameModifiers(); + + if (isClassMethod()) { + parseClassMethod(memberStart, isConstructor); + } else if (isClassProperty()) { + parseClassProperty(); + } else if (token.contextualKeyword === _keywords.ContextualKeyword._async && !_util.isLineTerminator.call(void 0, )) { + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._async; + // an async method + const isGenerator = _tokenizer.match.call(void 0, _types.TokenType.star); + if (isGenerator) { + _tokenizer.next.call(void 0, ); + } + + // The so-called parsed name would have been "async": get the real name. + parseClassPropertyName(classContextId); + parsePostMemberNameModifiers(); + parseClassMethod(memberStart, false /* isConstructor */); + } else if ( + (token.contextualKeyword === _keywords.ContextualKeyword._get || + token.contextualKeyword === _keywords.ContextualKeyword._set) && + !(_util.isLineTerminator.call(void 0, ) && _tokenizer.match.call(void 0, _types.TokenType.star)) + ) { + if (token.contextualKeyword === _keywords.ContextualKeyword._get) { + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._get; + } else { + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._set; + } + // `get\n*` is an uninitialized property named 'get' followed by a generator. + // a getter or setter + // The so-called parsed name would have been "get/set": get the real name. + parseClassPropertyName(classContextId); + parseClassMethod(memberStart, /* isConstructor */ false); + } else if (token.contextualKeyword === _keywords.ContextualKeyword._accessor && !_util.isLineTerminator.call(void 0, )) { + parseClassPropertyName(classContextId); + parseClassProperty(); + } else if (_util.isLineTerminator.call(void 0, )) { + // an uninitialized class property (due to ASI, since we don't otherwise recognize the next token) + parseClassProperty(); + } else { + _util.unexpected.call(void 0, ); + } +} + +function parseClassMethod(functionStart, isConstructor) { + if (_base.isTypeScriptEnabled) { + _typescript.tsTryParseTypeParameters.call(void 0, ); + } else if (_base.isFlowEnabled) { + if (_tokenizer.match.call(void 0, _types.TokenType.lessThan)) { + _flow.flowParseTypeParameterDeclaration.call(void 0, ); + } + } + _expression.parseMethod.call(void 0, functionStart, isConstructor); +} + +// Return the name of the class property, if it is a simple identifier. + function parseClassPropertyName(classContextId) { + _expression.parsePropertyName.call(void 0, classContextId); +} exports.parseClassPropertyName = parseClassPropertyName; + + function parsePostMemberNameModifiers() { + if (_base.isTypeScriptEnabled) { + const oldIsType = _tokenizer.pushTypeContext.call(void 0, 0); + _tokenizer.eat.call(void 0, _types.TokenType.question); + _tokenizer.popTypeContext.call(void 0, oldIsType); + } +} exports.parsePostMemberNameModifiers = parsePostMemberNameModifiers; + + function parseClassProperty() { + if (_base.isTypeScriptEnabled) { + _tokenizer.eatTypeToken.call(void 0, _types.TokenType.bang); + _typescript.tsTryParseTypeAnnotation.call(void 0, ); + } else if (_base.isFlowEnabled) { + if (_tokenizer.match.call(void 0, _types.TokenType.colon)) { + _flow.flowParseTypeAnnotation.call(void 0, ); + } + } + + if (_tokenizer.match.call(void 0, _types.TokenType.eq)) { + const equalsTokenIndex = _base.state.tokens.length; + _tokenizer.next.call(void 0, ); + _expression.parseMaybeAssign.call(void 0, ); + _base.state.tokens[equalsTokenIndex].rhsEndIndex = _base.state.tokens.length; + } + _util.semicolon.call(void 0, ); +} exports.parseClassProperty = parseClassProperty; + +function parseClassId(isStatement, optionalId = false) { + if ( + _base.isTypeScriptEnabled && + (!isStatement || optionalId) && + _util.isContextual.call(void 0, _keywords.ContextualKeyword._implements) + ) { + return; + } + + if (_tokenizer.match.call(void 0, _types.TokenType.name)) { + _lval.parseBindingIdentifier.call(void 0, true); + } + + if (_base.isTypeScriptEnabled) { + _typescript.tsTryParseTypeParameters.call(void 0, ); + } else if (_base.isFlowEnabled) { + if (_tokenizer.match.call(void 0, _types.TokenType.lessThan)) { + _flow.flowParseTypeParameterDeclaration.call(void 0, ); + } + } +} + +// Returns true if there was a superclass. +function parseClassSuper() { + let hasSuper = false; + if (_tokenizer.eat.call(void 0, _types.TokenType._extends)) { + _expression.parseExprSubscripts.call(void 0, ); + hasSuper = true; + } else { + hasSuper = false; + } + if (_base.isTypeScriptEnabled) { + _typescript.tsAfterParseClassSuper.call(void 0, hasSuper); + } else if (_base.isFlowEnabled) { + _flow.flowAfterParseClassSuper.call(void 0, hasSuper); + } +} + +// Parses module export declaration. + + function parseExport() { + const exportIndex = _base.state.tokens.length - 1; + if (_base.isTypeScriptEnabled) { + if (_typescript.tsTryParseExport.call(void 0, )) { + return; + } + } + // export * from '...' + if (shouldParseExportStar()) { + parseExportStar(); + } else if (isExportDefaultSpecifier()) { + // export default from + _expression.parseIdentifier.call(void 0, ); + if (_tokenizer.match.call(void 0, _types.TokenType.comma) && _tokenizer.lookaheadType.call(void 0, ) === _types.TokenType.star) { + _util.expect.call(void 0, _types.TokenType.comma); + _util.expect.call(void 0, _types.TokenType.star); + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._as); + _expression.parseIdentifier.call(void 0, ); + } else { + parseExportSpecifiersMaybe(); + } + parseExportFrom(); + } else if (_tokenizer.eat.call(void 0, _types.TokenType._default)) { + // export default ... + parseExportDefaultExpression(); + } else if (shouldParseExportDeclaration()) { + parseExportDeclaration(); + } else { + // export { x, y as z } [from '...'] + parseExportSpecifiers(); + parseExportFrom(); + } + _base.state.tokens[exportIndex].rhsEndIndex = _base.state.tokens.length; +} exports.parseExport = parseExport; + +function parseExportDefaultExpression() { + if (_base.isTypeScriptEnabled) { + if (_typescript.tsTryParseExportDefaultExpression.call(void 0, )) { + return; + } + } + if (_base.isFlowEnabled) { + if (_flow.flowTryParseExportDefaultExpression.call(void 0, )) { + return; + } + } + const functionStart = _base.state.start; + if (_tokenizer.eat.call(void 0, _types.TokenType._function)) { + parseFunction(functionStart, true, true); + } else if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._async) && _tokenizer.lookaheadType.call(void 0, ) === _types.TokenType._function) { + // async function declaration + _util.eatContextual.call(void 0, _keywords.ContextualKeyword._async); + _tokenizer.eat.call(void 0, _types.TokenType._function); + parseFunction(functionStart, true, true); + } else if (_tokenizer.match.call(void 0, _types.TokenType._class)) { + parseClass(true, true); + } else if (_tokenizer.match.call(void 0, _types.TokenType.at)) { + parseDecorators(); + parseClass(true, true); + } else { + _expression.parseMaybeAssign.call(void 0, ); + _util.semicolon.call(void 0, ); + } +} + +function parseExportDeclaration() { + if (_base.isTypeScriptEnabled) { + _typescript.tsParseExportDeclaration.call(void 0, ); + } else if (_base.isFlowEnabled) { + _flow.flowParseExportDeclaration.call(void 0, ); + } else { + parseStatement(true); + } +} + +function isExportDefaultSpecifier() { + if (_base.isTypeScriptEnabled && _typescript.tsIsDeclarationStart.call(void 0, )) { + return false; + } else if (_base.isFlowEnabled && _flow.flowShouldDisallowExportDefaultSpecifier.call(void 0, )) { + return false; + } + if (_tokenizer.match.call(void 0, _types.TokenType.name)) { + return _base.state.contextualKeyword !== _keywords.ContextualKeyword._async; + } + + if (!_tokenizer.match.call(void 0, _types.TokenType._default)) { + return false; + } + + const _next = _tokenizer.nextTokenStart.call(void 0, ); + const lookahead = _tokenizer.lookaheadTypeAndKeyword.call(void 0, ); + const hasFrom = + lookahead.type === _types.TokenType.name && lookahead.contextualKeyword === _keywords.ContextualKeyword._from; + if (lookahead.type === _types.TokenType.comma) { + return true; + } + // lookahead again when `export default from` is seen + if (hasFrom) { + const nextAfterFrom = _base.input.charCodeAt(_tokenizer.nextTokenStartSince.call(void 0, _next + 4)); + return nextAfterFrom === _charcodes.charCodes.quotationMark || nextAfterFrom === _charcodes.charCodes.apostrophe; + } + return false; +} + +function parseExportSpecifiersMaybe() { + if (_tokenizer.eat.call(void 0, _types.TokenType.comma)) { + parseExportSpecifiers(); + } +} + + function parseExportFrom() { + if (_util.eatContextual.call(void 0, _keywords.ContextualKeyword._from)) { + _expression.parseExprAtom.call(void 0, ); + maybeParseImportAttributes(); + } + _util.semicolon.call(void 0, ); +} exports.parseExportFrom = parseExportFrom; + +function shouldParseExportStar() { + if (_base.isFlowEnabled) { + return _flow.flowShouldParseExportStar.call(void 0, ); + } else { + return _tokenizer.match.call(void 0, _types.TokenType.star); + } +} + +function parseExportStar() { + if (_base.isFlowEnabled) { + _flow.flowParseExportStar.call(void 0, ); + } else { + baseParseExportStar(); + } +} + + function baseParseExportStar() { + _util.expect.call(void 0, _types.TokenType.star); + + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._as)) { + parseExportNamespace(); + } else { + parseExportFrom(); + } +} exports.baseParseExportStar = baseParseExportStar; + +function parseExportNamespace() { + _tokenizer.next.call(void 0, ); + _base.state.tokens[_base.state.tokens.length - 1].type = _types.TokenType._as; + _expression.parseIdentifier.call(void 0, ); + parseExportSpecifiersMaybe(); + parseExportFrom(); +} + +function shouldParseExportDeclaration() { + return ( + (_base.isTypeScriptEnabled && _typescript.tsIsDeclarationStart.call(void 0, )) || + (_base.isFlowEnabled && _flow.flowShouldParseExportDeclaration.call(void 0, )) || + _base.state.type === _types.TokenType._var || + _base.state.type === _types.TokenType._const || + _base.state.type === _types.TokenType._let || + _base.state.type === _types.TokenType._function || + _base.state.type === _types.TokenType._class || + _util.isContextual.call(void 0, _keywords.ContextualKeyword._async) || + _tokenizer.match.call(void 0, _types.TokenType.at) + ); +} + +// Parses a comma-separated list of module exports. + function parseExportSpecifiers() { + let first = true; + + // export { x, y as z } [from '...'] + _util.expect.call(void 0, _types.TokenType.braceL); + + while (!_tokenizer.eat.call(void 0, _types.TokenType.braceR) && !_base.state.error) { + if (first) { + first = false; + } else { + _util.expect.call(void 0, _types.TokenType.comma); + if (_tokenizer.eat.call(void 0, _types.TokenType.braceR)) { + break; + } + } + parseExportSpecifier(); + } +} exports.parseExportSpecifiers = parseExportSpecifiers; + +function parseExportSpecifier() { + if (_base.isTypeScriptEnabled) { + _typescript.tsParseExportSpecifier.call(void 0, ); + return; + } + _expression.parseIdentifier.call(void 0, ); + _base.state.tokens[_base.state.tokens.length - 1].identifierRole = _tokenizer.IdentifierRole.ExportAccess; + if (_util.eatContextual.call(void 0, _keywords.ContextualKeyword._as)) { + _expression.parseIdentifier.call(void 0, ); + } +} + +/** + * Starting at the `module` token in an import, determine if it was truly an + * import reflection token or just looks like one. + * + * Returns true for: + * import module foo from "foo"; + * import module from from "foo"; + * + * Returns false for: + * import module from "foo"; + * import module, {bar} from "foo"; + */ +function isImportReflection() { + const snapshot = _base.state.snapshot(); + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._module); + if (_util.eatContextual.call(void 0, _keywords.ContextualKeyword._from)) { + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._from)) { + _base.state.restoreFromSnapshot(snapshot); + return true; + } else { + _base.state.restoreFromSnapshot(snapshot); + return false; + } + } else if (_tokenizer.match.call(void 0, _types.TokenType.comma)) { + _base.state.restoreFromSnapshot(snapshot); + return false; + } else { + _base.state.restoreFromSnapshot(snapshot); + return true; + } +} + +/** + * Eat the "module" token from the import reflection proposal. + * https://github.com/tc39/proposal-import-reflection + */ +function parseMaybeImportReflection() { + // isImportReflection does snapshot/restore, so only run it if we see the word + // "module". + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._module) && isImportReflection()) { + _tokenizer.next.call(void 0, ); + } +} + +// Parses import declaration. + + function parseImport() { + if (_base.isTypeScriptEnabled && _tokenizer.match.call(void 0, _types.TokenType.name) && _tokenizer.lookaheadType.call(void 0, ) === _types.TokenType.eq) { + _typescript.tsParseImportEqualsDeclaration.call(void 0, ); + return; + } + if (_base.isTypeScriptEnabled && _util.isContextual.call(void 0, _keywords.ContextualKeyword._type)) { + const lookahead = _tokenizer.lookaheadTypeAndKeyword.call(void 0, ); + if (lookahead.type === _types.TokenType.name && lookahead.contextualKeyword !== _keywords.ContextualKeyword._from) { + // One of these `import type` cases: + // import type T = require('T'); + // import type A from 'A'; + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._type); + if (_tokenizer.lookaheadType.call(void 0, ) === _types.TokenType.eq) { + _typescript.tsParseImportEqualsDeclaration.call(void 0, ); + return; + } + // If this is an `import type...from` statement, then we already ate the + // type token, so proceed to the regular import parser. + } else if (lookahead.type === _types.TokenType.star || lookahead.type === _types.TokenType.braceL) { + // One of these `import type` cases, in which case we can eat the type token + // and proceed as normal: + // import type * as A from 'A'; + // import type {a} from 'A'; + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._type); + } + // Otherwise, we are importing the name "type". + } + + // import '...' + if (_tokenizer.match.call(void 0, _types.TokenType.string)) { + _expression.parseExprAtom.call(void 0, ); + } else { + parseMaybeImportReflection(); + parseImportSpecifiers(); + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._from); + _expression.parseExprAtom.call(void 0, ); + } + maybeParseImportAttributes(); + _util.semicolon.call(void 0, ); +} exports.parseImport = parseImport; + +// eslint-disable-next-line no-unused-vars +function shouldParseDefaultImport() { + return _tokenizer.match.call(void 0, _types.TokenType.name); +} + +function parseImportSpecifierLocal() { + _lval.parseImportedIdentifier.call(void 0, ); +} + +// Parses a comma-separated list of module imports. +function parseImportSpecifiers() { + if (_base.isFlowEnabled) { + _flow.flowStartParseImportSpecifiers.call(void 0, ); + } + + let first = true; + if (shouldParseDefaultImport()) { + // import defaultObj, { x, y as z } from '...' + parseImportSpecifierLocal(); + + if (!_tokenizer.eat.call(void 0, _types.TokenType.comma)) return; + } + + if (_tokenizer.match.call(void 0, _types.TokenType.star)) { + _tokenizer.next.call(void 0, ); + _util.expectContextual.call(void 0, _keywords.ContextualKeyword._as); + + parseImportSpecifierLocal(); + + return; + } + + _util.expect.call(void 0, _types.TokenType.braceL); + while (!_tokenizer.eat.call(void 0, _types.TokenType.braceR) && !_base.state.error) { + if (first) { + first = false; + } else { + // Detect an attempt to deep destructure + if (_tokenizer.eat.call(void 0, _types.TokenType.colon)) { + _util.unexpected.call(void 0, + "ES2015 named imports do not destructure. Use another statement for destructuring after the import.", + ); + } + + _util.expect.call(void 0, _types.TokenType.comma); + if (_tokenizer.eat.call(void 0, _types.TokenType.braceR)) { + break; + } + } + + parseImportSpecifier(); + } +} + +function parseImportSpecifier() { + if (_base.isTypeScriptEnabled) { + _typescript.tsParseImportSpecifier.call(void 0, ); + return; + } + if (_base.isFlowEnabled) { + _flow.flowParseImportSpecifier.call(void 0, ); + return; + } + _lval.parseImportedIdentifier.call(void 0, ); + if (_util.isContextual.call(void 0, _keywords.ContextualKeyword._as)) { + _base.state.tokens[_base.state.tokens.length - 1].identifierRole = _tokenizer.IdentifierRole.ImportAccess; + _tokenizer.next.call(void 0, ); + _lval.parseImportedIdentifier.call(void 0, ); + } +} + +/** + * Parse import attributes like `with {type: "json"}`, or the legacy form + * `assert {type: "json"}`. + * + * Import attributes technically have their own syntax, but are always parseable + * as a plain JS object, so just do that for simplicity. + */ +function maybeParseImportAttributes() { + if (_tokenizer.match.call(void 0, _types.TokenType._with) || (_util.isContextual.call(void 0, _keywords.ContextualKeyword._assert) && !_util.hasPrecedingLineBreak.call(void 0, ))) { + _tokenizer.next.call(void 0, ); + _expression.parseObj.call(void 0, false, false); + } +} diff --git a/node_modules/sucrase/dist/parser/traverser/util.js b/node_modules/sucrase/dist/parser/traverser/util.js new file mode 100644 index 0000000..8ade800 --- /dev/null +++ b/node_modules/sucrase/dist/parser/traverser/util.js @@ -0,0 +1,104 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _index = require('../tokenizer/index'); + +var _types = require('../tokenizer/types'); +var _charcodes = require('../util/charcodes'); +var _base = require('./base'); + +// ## Parser utilities + +// Tests whether parsed token is a contextual keyword. + function isContextual(contextualKeyword) { + return _base.state.contextualKeyword === contextualKeyword; +} exports.isContextual = isContextual; + + function isLookaheadContextual(contextualKeyword) { + const l = _index.lookaheadTypeAndKeyword.call(void 0, ); + return l.type === _types.TokenType.name && l.contextualKeyword === contextualKeyword; +} exports.isLookaheadContextual = isLookaheadContextual; + +// Consumes contextual keyword if possible. + function eatContextual(contextualKeyword) { + return _base.state.contextualKeyword === contextualKeyword && _index.eat.call(void 0, _types.TokenType.name); +} exports.eatContextual = eatContextual; + +// Asserts that following token is given contextual keyword. + function expectContextual(contextualKeyword) { + if (!eatContextual(contextualKeyword)) { + unexpected(); + } +} exports.expectContextual = expectContextual; + +// Test whether a semicolon can be inserted at the current position. + function canInsertSemicolon() { + return _index.match.call(void 0, _types.TokenType.eof) || _index.match.call(void 0, _types.TokenType.braceR) || hasPrecedingLineBreak(); +} exports.canInsertSemicolon = canInsertSemicolon; + + function hasPrecedingLineBreak() { + const prevToken = _base.state.tokens[_base.state.tokens.length - 1]; + const lastTokEnd = prevToken ? prevToken.end : 0; + for (let i = lastTokEnd; i < _base.state.start; i++) { + const code = _base.input.charCodeAt(i); + if ( + code === _charcodes.charCodes.lineFeed || + code === _charcodes.charCodes.carriageReturn || + code === 0x2028 || + code === 0x2029 + ) { + return true; + } + } + return false; +} exports.hasPrecedingLineBreak = hasPrecedingLineBreak; + + function hasFollowingLineBreak() { + const nextStart = _index.nextTokenStart.call(void 0, ); + for (let i = _base.state.end; i < nextStart; i++) { + const code = _base.input.charCodeAt(i); + if ( + code === _charcodes.charCodes.lineFeed || + code === _charcodes.charCodes.carriageReturn || + code === 0x2028 || + code === 0x2029 + ) { + return true; + } + } + return false; +} exports.hasFollowingLineBreak = hasFollowingLineBreak; + + function isLineTerminator() { + return _index.eat.call(void 0, _types.TokenType.semi) || canInsertSemicolon(); +} exports.isLineTerminator = isLineTerminator; + +// Consume a semicolon, or, failing that, see if we are allowed to +// pretend that there is a semicolon at this position. + function semicolon() { + if (!isLineTerminator()) { + unexpected('Unexpected token, expected ";"'); + } +} exports.semicolon = semicolon; + +// Expect a token of a given type. If found, consume it, otherwise, +// raise an unexpected token error at given pos. + function expect(type) { + const matched = _index.eat.call(void 0, type); + if (!matched) { + unexpected(`Unexpected token, expected "${_types.formatTokenType.call(void 0, type)}"`); + } +} exports.expect = expect; + +/** + * Transition the parser to an error state. All code needs to be written to naturally unwind in this + * state, which allows us to backtrack without exceptions and without error plumbing everywhere. + */ + function unexpected(message = "Unexpected token", pos = _base.state.start) { + if (_base.state.error) { + return; + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const err = new SyntaxError(message); + err.pos = pos; + _base.state.error = err; + _base.state.pos = _base.input.length; + _index.finishToken.call(void 0, _types.TokenType.eof); +} exports.unexpected = unexpected; diff --git a/node_modules/sucrase/dist/parser/util/charcodes.js b/node_modules/sucrase/dist/parser/util/charcodes.js new file mode 100644 index 0000000..52bebc4 --- /dev/null +++ b/node_modules/sucrase/dist/parser/util/charcodes.js @@ -0,0 +1,115 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var charCodes; (function (charCodes) { + const backSpace = 8; charCodes[charCodes["backSpace"] = backSpace] = "backSpace"; + const lineFeed = 10; charCodes[charCodes["lineFeed"] = lineFeed] = "lineFeed"; // '\n' + const tab = 9; charCodes[charCodes["tab"] = tab] = "tab"; // '\t' + const carriageReturn = 13; charCodes[charCodes["carriageReturn"] = carriageReturn] = "carriageReturn"; // '\r' + const shiftOut = 14; charCodes[charCodes["shiftOut"] = shiftOut] = "shiftOut"; + const space = 32; charCodes[charCodes["space"] = space] = "space"; + const exclamationMark = 33; charCodes[charCodes["exclamationMark"] = exclamationMark] = "exclamationMark"; // '!' + const quotationMark = 34; charCodes[charCodes["quotationMark"] = quotationMark] = "quotationMark"; // '"' + const numberSign = 35; charCodes[charCodes["numberSign"] = numberSign] = "numberSign"; // '#' + const dollarSign = 36; charCodes[charCodes["dollarSign"] = dollarSign] = "dollarSign"; // '$' + const percentSign = 37; charCodes[charCodes["percentSign"] = percentSign] = "percentSign"; // '%' + const ampersand = 38; charCodes[charCodes["ampersand"] = ampersand] = "ampersand"; // '&' + const apostrophe = 39; charCodes[charCodes["apostrophe"] = apostrophe] = "apostrophe"; // ''' + const leftParenthesis = 40; charCodes[charCodes["leftParenthesis"] = leftParenthesis] = "leftParenthesis"; // '(' + const rightParenthesis = 41; charCodes[charCodes["rightParenthesis"] = rightParenthesis] = "rightParenthesis"; // ')' + const asterisk = 42; charCodes[charCodes["asterisk"] = asterisk] = "asterisk"; // '*' + const plusSign = 43; charCodes[charCodes["plusSign"] = plusSign] = "plusSign"; // '+' + const comma = 44; charCodes[charCodes["comma"] = comma] = "comma"; // ',' + const dash = 45; charCodes[charCodes["dash"] = dash] = "dash"; // '-' + const dot = 46; charCodes[charCodes["dot"] = dot] = "dot"; // '.' + const slash = 47; charCodes[charCodes["slash"] = slash] = "slash"; // '/' + const digit0 = 48; charCodes[charCodes["digit0"] = digit0] = "digit0"; // '0' + const digit1 = 49; charCodes[charCodes["digit1"] = digit1] = "digit1"; // '1' + const digit2 = 50; charCodes[charCodes["digit2"] = digit2] = "digit2"; // '2' + const digit3 = 51; charCodes[charCodes["digit3"] = digit3] = "digit3"; // '3' + const digit4 = 52; charCodes[charCodes["digit4"] = digit4] = "digit4"; // '4' + const digit5 = 53; charCodes[charCodes["digit5"] = digit5] = "digit5"; // '5' + const digit6 = 54; charCodes[charCodes["digit6"] = digit6] = "digit6"; // '6' + const digit7 = 55; charCodes[charCodes["digit7"] = digit7] = "digit7"; // '7' + const digit8 = 56; charCodes[charCodes["digit8"] = digit8] = "digit8"; // '8' + const digit9 = 57; charCodes[charCodes["digit9"] = digit9] = "digit9"; // '9' + const colon = 58; charCodes[charCodes["colon"] = colon] = "colon"; // ':' + const semicolon = 59; charCodes[charCodes["semicolon"] = semicolon] = "semicolon"; // ';' + const lessThan = 60; charCodes[charCodes["lessThan"] = lessThan] = "lessThan"; // '<' + const equalsTo = 61; charCodes[charCodes["equalsTo"] = equalsTo] = "equalsTo"; // '=' + const greaterThan = 62; charCodes[charCodes["greaterThan"] = greaterThan] = "greaterThan"; // '>' + const questionMark = 63; charCodes[charCodes["questionMark"] = questionMark] = "questionMark"; // '?' + const atSign = 64; charCodes[charCodes["atSign"] = atSign] = "atSign"; // '@' + const uppercaseA = 65; charCodes[charCodes["uppercaseA"] = uppercaseA] = "uppercaseA"; // 'A' + const uppercaseB = 66; charCodes[charCodes["uppercaseB"] = uppercaseB] = "uppercaseB"; // 'B' + const uppercaseC = 67; charCodes[charCodes["uppercaseC"] = uppercaseC] = "uppercaseC"; // 'C' + const uppercaseD = 68; charCodes[charCodes["uppercaseD"] = uppercaseD] = "uppercaseD"; // 'D' + const uppercaseE = 69; charCodes[charCodes["uppercaseE"] = uppercaseE] = "uppercaseE"; // 'E' + const uppercaseF = 70; charCodes[charCodes["uppercaseF"] = uppercaseF] = "uppercaseF"; // 'F' + const uppercaseG = 71; charCodes[charCodes["uppercaseG"] = uppercaseG] = "uppercaseG"; // 'G' + const uppercaseH = 72; charCodes[charCodes["uppercaseH"] = uppercaseH] = "uppercaseH"; // 'H' + const uppercaseI = 73; charCodes[charCodes["uppercaseI"] = uppercaseI] = "uppercaseI"; // 'I' + const uppercaseJ = 74; charCodes[charCodes["uppercaseJ"] = uppercaseJ] = "uppercaseJ"; // 'J' + const uppercaseK = 75; charCodes[charCodes["uppercaseK"] = uppercaseK] = "uppercaseK"; // 'K' + const uppercaseL = 76; charCodes[charCodes["uppercaseL"] = uppercaseL] = "uppercaseL"; // 'L' + const uppercaseM = 77; charCodes[charCodes["uppercaseM"] = uppercaseM] = "uppercaseM"; // 'M' + const uppercaseN = 78; charCodes[charCodes["uppercaseN"] = uppercaseN] = "uppercaseN"; // 'N' + const uppercaseO = 79; charCodes[charCodes["uppercaseO"] = uppercaseO] = "uppercaseO"; // 'O' + const uppercaseP = 80; charCodes[charCodes["uppercaseP"] = uppercaseP] = "uppercaseP"; // 'P' + const uppercaseQ = 81; charCodes[charCodes["uppercaseQ"] = uppercaseQ] = "uppercaseQ"; // 'Q' + const uppercaseR = 82; charCodes[charCodes["uppercaseR"] = uppercaseR] = "uppercaseR"; // 'R' + const uppercaseS = 83; charCodes[charCodes["uppercaseS"] = uppercaseS] = "uppercaseS"; // 'S' + const uppercaseT = 84; charCodes[charCodes["uppercaseT"] = uppercaseT] = "uppercaseT"; // 'T' + const uppercaseU = 85; charCodes[charCodes["uppercaseU"] = uppercaseU] = "uppercaseU"; // 'U' + const uppercaseV = 86; charCodes[charCodes["uppercaseV"] = uppercaseV] = "uppercaseV"; // 'V' + const uppercaseW = 87; charCodes[charCodes["uppercaseW"] = uppercaseW] = "uppercaseW"; // 'W' + const uppercaseX = 88; charCodes[charCodes["uppercaseX"] = uppercaseX] = "uppercaseX"; // 'X' + const uppercaseY = 89; charCodes[charCodes["uppercaseY"] = uppercaseY] = "uppercaseY"; // 'Y' + const uppercaseZ = 90; charCodes[charCodes["uppercaseZ"] = uppercaseZ] = "uppercaseZ"; // 'Z' + const leftSquareBracket = 91; charCodes[charCodes["leftSquareBracket"] = leftSquareBracket] = "leftSquareBracket"; // '[' + const backslash = 92; charCodes[charCodes["backslash"] = backslash] = "backslash"; // '\ ' + const rightSquareBracket = 93; charCodes[charCodes["rightSquareBracket"] = rightSquareBracket] = "rightSquareBracket"; // ']' + const caret = 94; charCodes[charCodes["caret"] = caret] = "caret"; // '^' + const underscore = 95; charCodes[charCodes["underscore"] = underscore] = "underscore"; // '_' + const graveAccent = 96; charCodes[charCodes["graveAccent"] = graveAccent] = "graveAccent"; // '`' + const lowercaseA = 97; charCodes[charCodes["lowercaseA"] = lowercaseA] = "lowercaseA"; // 'a' + const lowercaseB = 98; charCodes[charCodes["lowercaseB"] = lowercaseB] = "lowercaseB"; // 'b' + const lowercaseC = 99; charCodes[charCodes["lowercaseC"] = lowercaseC] = "lowercaseC"; // 'c' + const lowercaseD = 100; charCodes[charCodes["lowercaseD"] = lowercaseD] = "lowercaseD"; // 'd' + const lowercaseE = 101; charCodes[charCodes["lowercaseE"] = lowercaseE] = "lowercaseE"; // 'e' + const lowercaseF = 102; charCodes[charCodes["lowercaseF"] = lowercaseF] = "lowercaseF"; // 'f' + const lowercaseG = 103; charCodes[charCodes["lowercaseG"] = lowercaseG] = "lowercaseG"; // 'g' + const lowercaseH = 104; charCodes[charCodes["lowercaseH"] = lowercaseH] = "lowercaseH"; // 'h' + const lowercaseI = 105; charCodes[charCodes["lowercaseI"] = lowercaseI] = "lowercaseI"; // 'i' + const lowercaseJ = 106; charCodes[charCodes["lowercaseJ"] = lowercaseJ] = "lowercaseJ"; // 'j' + const lowercaseK = 107; charCodes[charCodes["lowercaseK"] = lowercaseK] = "lowercaseK"; // 'k' + const lowercaseL = 108; charCodes[charCodes["lowercaseL"] = lowercaseL] = "lowercaseL"; // 'l' + const lowercaseM = 109; charCodes[charCodes["lowercaseM"] = lowercaseM] = "lowercaseM"; // 'm' + const lowercaseN = 110; charCodes[charCodes["lowercaseN"] = lowercaseN] = "lowercaseN"; // 'n' + const lowercaseO = 111; charCodes[charCodes["lowercaseO"] = lowercaseO] = "lowercaseO"; // 'o' + const lowercaseP = 112; charCodes[charCodes["lowercaseP"] = lowercaseP] = "lowercaseP"; // 'p' + const lowercaseQ = 113; charCodes[charCodes["lowercaseQ"] = lowercaseQ] = "lowercaseQ"; // 'q' + const lowercaseR = 114; charCodes[charCodes["lowercaseR"] = lowercaseR] = "lowercaseR"; // 'r' + const lowercaseS = 115; charCodes[charCodes["lowercaseS"] = lowercaseS] = "lowercaseS"; // 's' + const lowercaseT = 116; charCodes[charCodes["lowercaseT"] = lowercaseT] = "lowercaseT"; // 't' + const lowercaseU = 117; charCodes[charCodes["lowercaseU"] = lowercaseU] = "lowercaseU"; // 'u' + const lowercaseV = 118; charCodes[charCodes["lowercaseV"] = lowercaseV] = "lowercaseV"; // 'v' + const lowercaseW = 119; charCodes[charCodes["lowercaseW"] = lowercaseW] = "lowercaseW"; // 'w' + const lowercaseX = 120; charCodes[charCodes["lowercaseX"] = lowercaseX] = "lowercaseX"; // 'x' + const lowercaseY = 121; charCodes[charCodes["lowercaseY"] = lowercaseY] = "lowercaseY"; // 'y' + const lowercaseZ = 122; charCodes[charCodes["lowercaseZ"] = lowercaseZ] = "lowercaseZ"; // 'z' + const leftCurlyBrace = 123; charCodes[charCodes["leftCurlyBrace"] = leftCurlyBrace] = "leftCurlyBrace"; // '{' + const verticalBar = 124; charCodes[charCodes["verticalBar"] = verticalBar] = "verticalBar"; // '|' + const rightCurlyBrace = 125; charCodes[charCodes["rightCurlyBrace"] = rightCurlyBrace] = "rightCurlyBrace"; // '}' + const tilde = 126; charCodes[charCodes["tilde"] = tilde] = "tilde"; // '~' + const nonBreakingSpace = 160; charCodes[charCodes["nonBreakingSpace"] = nonBreakingSpace] = "nonBreakingSpace"; + // eslint-disable-next-line no-irregular-whitespace + const oghamSpaceMark = 5760; charCodes[charCodes["oghamSpaceMark"] = oghamSpaceMark] = "oghamSpaceMark"; // ' ' + const lineSeparator = 8232; charCodes[charCodes["lineSeparator"] = lineSeparator] = "lineSeparator"; + const paragraphSeparator = 8233; charCodes[charCodes["paragraphSeparator"] = paragraphSeparator] = "paragraphSeparator"; +})(charCodes || (exports.charCodes = charCodes = {})); + + function isDigit(code) { + return ( + (code >= charCodes.digit0 && code <= charCodes.digit9) || + (code >= charCodes.lowercaseA && code <= charCodes.lowercaseF) || + (code >= charCodes.uppercaseA && code <= charCodes.uppercaseF) + ); +} exports.isDigit = isDigit; diff --git a/node_modules/sucrase/dist/parser/util/identifier.js b/node_modules/sucrase/dist/parser/util/identifier.js new file mode 100644 index 0000000..9a2813c --- /dev/null +++ b/node_modules/sucrase/dist/parser/util/identifier.js @@ -0,0 +1,34 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _charcodes = require('./charcodes'); +var _whitespace = require('./whitespace'); + +function computeIsIdentifierChar(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code < 91) return true; + if (code < 97) return code === 95; + if (code < 123) return true; + if (code < 128) return false; + throw new Error("Should not be called with non-ASCII char code."); +} + + const IS_IDENTIFIER_CHAR = new Uint8Array(65536); exports.IS_IDENTIFIER_CHAR = IS_IDENTIFIER_CHAR; +for (let i = 0; i < 128; i++) { + exports.IS_IDENTIFIER_CHAR[i] = computeIsIdentifierChar(i) ? 1 : 0; +} +for (let i = 128; i < 65536; i++) { + exports.IS_IDENTIFIER_CHAR[i] = 1; +} +// Aside from whitespace and newlines, all characters outside the ASCII space are either +// identifier characters or invalid. Since we're not performing code validation, we can just +// treat all invalid characters as identifier characters. +for (const whitespaceChar of _whitespace.WHITESPACE_CHARS) { + exports.IS_IDENTIFIER_CHAR[whitespaceChar] = 0; +} +exports.IS_IDENTIFIER_CHAR[0x2028] = 0; +exports.IS_IDENTIFIER_CHAR[0x2029] = 0; + + const IS_IDENTIFIER_START = exports.IS_IDENTIFIER_CHAR.slice(); exports.IS_IDENTIFIER_START = IS_IDENTIFIER_START; +for (let numChar = _charcodes.charCodes.digit0; numChar <= _charcodes.charCodes.digit9; numChar++) { + exports.IS_IDENTIFIER_START[numChar] = 0; +} diff --git a/node_modules/sucrase/dist/parser/util/whitespace.js b/node_modules/sucrase/dist/parser/util/whitespace.js new file mode 100644 index 0000000..55bb994 --- /dev/null +++ b/node_modules/sucrase/dist/parser/util/whitespace.js @@ -0,0 +1,33 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _charcodes = require('./charcodes'); + +// https://tc39.github.io/ecma262/#sec-white-space + const WHITESPACE_CHARS = [ + 0x0009, + 0x000b, + 0x000c, + _charcodes.charCodes.space, + _charcodes.charCodes.nonBreakingSpace, + _charcodes.charCodes.oghamSpaceMark, + 0x2000, // EN QUAD + 0x2001, // EM QUAD + 0x2002, // EN SPACE + 0x2003, // EM SPACE + 0x2004, // THREE-PER-EM SPACE + 0x2005, // FOUR-PER-EM SPACE + 0x2006, // SIX-PER-EM SPACE + 0x2007, // FIGURE SPACE + 0x2008, // PUNCTUATION SPACE + 0x2009, // THIN SPACE + 0x200a, // HAIR SPACE + 0x202f, // NARROW NO-BREAK SPACE + 0x205f, // MEDIUM MATHEMATICAL SPACE + 0x3000, // IDEOGRAPHIC SPACE + 0xfeff, // ZERO WIDTH NO-BREAK SPACE +]; exports.WHITESPACE_CHARS = WHITESPACE_CHARS; + + const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; exports.skipWhiteSpace = skipWhiteSpace; + + const IS_WHITESPACE = new Uint8Array(65536); exports.IS_WHITESPACE = IS_WHITESPACE; +for (const char of exports.WHITESPACE_CHARS) { + exports.IS_WHITESPACE[char] = 1; +} diff --git a/node_modules/sucrase/dist/register.js b/node_modules/sucrase/dist/register.js new file mode 100644 index 0000000..1325f30 --- /dev/null +++ b/node_modules/sucrase/dist/register.js @@ -0,0 +1,88 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _pirates = require('pirates'); var pirates = _interopRequireWildcard(_pirates); + +var _index = require('./index'); + + + + + + + + + function addHook( + extension, + sucraseOptions, + hookOptions, +) { + let mergedSucraseOptions = sucraseOptions; + const sucraseOptionsEnvJSON = process.env.SUCRASE_OPTIONS; + if (sucraseOptionsEnvJSON) { + mergedSucraseOptions = {...mergedSucraseOptions, ...JSON.parse(sucraseOptionsEnvJSON)}; + } + return pirates.addHook( + (code, filePath) => { + const {code: transformedCode, sourceMap} = _index.transform.call(void 0, code, { + ...mergedSucraseOptions, + sourceMapOptions: {compiledFilename: filePath}, + filePath, + }); + const mapBase64 = Buffer.from(JSON.stringify(sourceMap)).toString("base64"); + const suffix = `//# sourceMappingURL=data:application/json;charset=utf-8;base64,${mapBase64}`; + return `${transformedCode}\n${suffix}`; + }, + {...hookOptions, exts: [extension]}, + ); +} exports.addHook = addHook; + + function registerJS(hookOptions) { + return addHook(".js", {transforms: ["imports", "flow", "jsx"]}, hookOptions); +} exports.registerJS = registerJS; + + function registerJSX(hookOptions) { + return addHook(".jsx", {transforms: ["imports", "flow", "jsx"]}, hookOptions); +} exports.registerJSX = registerJSX; + + function registerTS(hookOptions) { + return addHook(".ts", {transforms: ["imports", "typescript"]}, hookOptions); +} exports.registerTS = registerTS; + + function registerTSX(hookOptions) { + return addHook(".tsx", {transforms: ["imports", "typescript", "jsx"]}, hookOptions); +} exports.registerTSX = registerTSX; + + function registerTSLegacyModuleInterop(hookOptions) { + return addHook( + ".ts", + { + transforms: ["imports", "typescript"], + enableLegacyTypeScriptModuleInterop: true, + }, + hookOptions, + ); +} exports.registerTSLegacyModuleInterop = registerTSLegacyModuleInterop; + + function registerTSXLegacyModuleInterop(hookOptions) { + return addHook( + ".tsx", + { + transforms: ["imports", "typescript", "jsx"], + enableLegacyTypeScriptModuleInterop: true, + }, + hookOptions, + ); +} exports.registerTSXLegacyModuleInterop = registerTSXLegacyModuleInterop; + + function registerAll(hookOptions) { + const reverts = [ + registerJS(hookOptions), + registerJSX(hookOptions), + registerTS(hookOptions), + registerTSX(hookOptions), + ]; + + return () => { + for (const fn of reverts) { + fn(); + } + }; +} exports.registerAll = registerAll; diff --git a/node_modules/sucrase/dist/transformers/CJSImportTransformer.js b/node_modules/sucrase/dist/transformers/CJSImportTransformer.js new file mode 100644 index 0000000..170e5bb --- /dev/null +++ b/node_modules/sucrase/dist/transformers/CJSImportTransformer.js @@ -0,0 +1,916 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + +var _tokenizer = require('../parser/tokenizer'); +var _keywords = require('../parser/tokenizer/keywords'); +var _types = require('../parser/tokenizer/types'); + +var _elideImportEquals = require('../util/elideImportEquals'); var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals); + + + +var _getDeclarationInfo = require('../util/getDeclarationInfo'); var _getDeclarationInfo2 = _interopRequireDefault(_getDeclarationInfo); +var _getImportExportSpecifierInfo = require('../util/getImportExportSpecifierInfo'); var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo); +var _isExportFrom = require('../util/isExportFrom'); var _isExportFrom2 = _interopRequireDefault(_isExportFrom); +var _removeMaybeImportAttributes = require('../util/removeMaybeImportAttributes'); +var _shouldElideDefaultExport = require('../util/shouldElideDefaultExport'); var _shouldElideDefaultExport2 = _interopRequireDefault(_shouldElideDefaultExport); + + +var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer); + +/** + * Class for editing import statements when we are transforming to commonjs. + */ + class CJSImportTransformer extends _Transformer2.default { + __init() {this.hadExport = false} + __init2() {this.hadNamedExport = false} + __init3() {this.hadDefaultExport = false} + + + constructor( + rootTransformer, + tokens, + importProcessor, + nameManager, + helperManager, + reactHotLoaderTransformer, + enableLegacyBabel5ModuleInterop, + enableLegacyTypeScriptModuleInterop, + isTypeScriptTransformEnabled, + isFlowTransformEnabled, + preserveDynamicImport, + keepUnusedImports, + ) { + super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.importProcessor = importProcessor;this.nameManager = nameManager;this.helperManager = helperManager;this.reactHotLoaderTransformer = reactHotLoaderTransformer;this.enableLegacyBabel5ModuleInterop = enableLegacyBabel5ModuleInterop;this.enableLegacyTypeScriptModuleInterop = enableLegacyTypeScriptModuleInterop;this.isTypeScriptTransformEnabled = isTypeScriptTransformEnabled;this.isFlowTransformEnabled = isFlowTransformEnabled;this.preserveDynamicImport = preserveDynamicImport;this.keepUnusedImports = keepUnusedImports;CJSImportTransformer.prototype.__init.call(this);CJSImportTransformer.prototype.__init2.call(this);CJSImportTransformer.prototype.__init3.call(this);; + this.declarationInfo = isTypeScriptTransformEnabled + ? _getDeclarationInfo2.default.call(void 0, tokens) + : _getDeclarationInfo.EMPTY_DECLARATION_INFO; + } + + getPrefixCode() { + let prefix = ""; + if (this.hadExport) { + prefix += 'Object.defineProperty(exports, "__esModule", {value: true});'; + } + return prefix; + } + + getSuffixCode() { + if (this.enableLegacyBabel5ModuleInterop && this.hadDefaultExport && !this.hadNamedExport) { + return "\nmodule.exports = exports.default;\n"; + } + return ""; + } + + process() { + // TypeScript `import foo = require('foo');` should always just be translated to plain require. + if (this.tokens.matches3(_types.TokenType._import, _types.TokenType.name, _types.TokenType.eq)) { + return this.processImportEquals(); + } + if (this.tokens.matches1(_types.TokenType._import)) { + this.processImport(); + return true; + } + if (this.tokens.matches2(_types.TokenType._export, _types.TokenType.eq)) { + this.tokens.replaceToken("module.exports"); + return true; + } + if (this.tokens.matches1(_types.TokenType._export) && !this.tokens.currentToken().isType) { + this.hadExport = true; + return this.processExport(); + } + if (this.tokens.matches2(_types.TokenType.name, _types.TokenType.postIncDec)) { + // Fall through to normal identifier matching if this doesn't apply. + if (this.processPostIncDec()) { + return true; + } + } + if (this.tokens.matches1(_types.TokenType.name) || this.tokens.matches1(_types.TokenType.jsxName)) { + return this.processIdentifier(); + } + if (this.tokens.matches1(_types.TokenType.eq)) { + return this.processAssignment(); + } + if (this.tokens.matches1(_types.TokenType.assign)) { + return this.processComplexAssignment(); + } + if (this.tokens.matches1(_types.TokenType.preIncDec)) { + return this.processPreIncDec(); + } + return false; + } + + processImportEquals() { + const importName = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1); + if (this.importProcessor.shouldAutomaticallyElideImportedName(importName)) { + // If this name is only used as a type, elide the whole import. + _elideImportEquals2.default.call(void 0, this.tokens); + } else { + // Otherwise, switch `import` to `const`. + this.tokens.replaceToken("const"); + } + return true; + } + + /** + * Transform this: + * import foo, {bar} from 'baz'; + * into + * var _baz = require('baz'); var _baz2 = _interopRequireDefault(_baz); + * + * The import code was already generated in the import preprocessing step, so + * we just need to look it up. + */ + processImport() { + if (this.tokens.matches2(_types.TokenType._import, _types.TokenType.parenL)) { + if (this.preserveDynamicImport) { + // Bail out, only making progress for this one token. + this.tokens.copyToken(); + return; + } + const requireWrapper = this.enableLegacyTypeScriptModuleInterop + ? "" + : `${this.helperManager.getHelperName("interopRequireWildcard")}(`; + this.tokens.replaceToken(`Promise.resolve().then(() => ${requireWrapper}require`); + const contextId = this.tokens.currentToken().contextId; + if (contextId == null) { + throw new Error("Expected context ID on dynamic import invocation."); + } + this.tokens.copyToken(); + while (!this.tokens.matchesContextIdAndLabel(_types.TokenType.parenR, contextId)) { + this.rootTransformer.processToken(); + } + this.tokens.replaceToken(requireWrapper ? ")))" : "))"); + return; + } + + const shouldElideImport = this.removeImportAndDetectIfShouldElide(); + if (shouldElideImport) { + this.tokens.removeToken(); + } else { + const path = this.tokens.stringValue(); + this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(path)); + this.tokens.appendCode(this.importProcessor.claimImportCode(path)); + } + _removeMaybeImportAttributes.removeMaybeImportAttributes.call(void 0, this.tokens); + if (this.tokens.matches1(_types.TokenType.semi)) { + this.tokens.removeToken(); + } + } + + /** + * Erase this import (since any CJS output would be completely different), and + * return true if this import is should be elided due to being a type-only + * import. Such imports will not be emitted at all to avoid side effects. + * + * Import elision only happens with the TypeScript or Flow transforms enabled. + * + * TODO: This function has some awkward overlap with + * CJSImportProcessor.pruneTypeOnlyImports , and the two should be unified. + * That function handles TypeScript implicit import name elision, and removes + * an import if all typical imported names (without `type`) are removed due + * to being type-only imports. This function handles Flow import removal and + * properly distinguishes `import 'foo'` from `import {} from 'foo'` for TS + * purposes. + * + * The position should end at the import string. + */ + removeImportAndDetectIfShouldElide() { + this.tokens.removeInitialToken(); + if ( + this.tokens.matchesContextual(_keywords.ContextualKeyword._type) && + !this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, _types.TokenType.comma) && + !this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, _keywords.ContextualKeyword._from) + ) { + // This is an "import type" statement, so exit early. + this.removeRemainingImport(); + return true; + } + + if (this.tokens.matches1(_types.TokenType.name) || this.tokens.matches1(_types.TokenType.star)) { + // We have a default import or namespace import, so there must be some + // non-type import. + this.removeRemainingImport(); + return false; + } + + if (this.tokens.matches1(_types.TokenType.string)) { + // This is a bare import, so we should proceed with the import. + return false; + } + + let foundNonTypeImport = false; + let foundAnyNamedImport = false; + while (!this.tokens.matches1(_types.TokenType.string)) { + // Check if any named imports are of the form "foo" or "foo as bar", with + // no leading "type". + if ( + (!foundNonTypeImport && this.tokens.matches1(_types.TokenType.braceL)) || + this.tokens.matches1(_types.TokenType.comma) + ) { + this.tokens.removeToken(); + if (!this.tokens.matches1(_types.TokenType.braceR)) { + foundAnyNamedImport = true; + } + if ( + this.tokens.matches2(_types.TokenType.name, _types.TokenType.comma) || + this.tokens.matches2(_types.TokenType.name, _types.TokenType.braceR) || + this.tokens.matches4(_types.TokenType.name, _types.TokenType.name, _types.TokenType.name, _types.TokenType.comma) || + this.tokens.matches4(_types.TokenType.name, _types.TokenType.name, _types.TokenType.name, _types.TokenType.braceR) + ) { + foundNonTypeImport = true; + } + } + this.tokens.removeToken(); + } + if (this.keepUnusedImports) { + return false; + } + if (this.isTypeScriptTransformEnabled) { + return !foundNonTypeImport; + } else if (this.isFlowTransformEnabled) { + // In Flow, unlike TS, `import {} from 'foo';` preserves the import. + return foundAnyNamedImport && !foundNonTypeImport; + } else { + return false; + } + } + + removeRemainingImport() { + while (!this.tokens.matches1(_types.TokenType.string)) { + this.tokens.removeToken(); + } + } + + processIdentifier() { + const token = this.tokens.currentToken(); + if (token.shadowsGlobal) { + return false; + } + + if (token.identifierRole === _tokenizer.IdentifierRole.ObjectShorthand) { + return this.processObjectShorthand(); + } + + if (token.identifierRole !== _tokenizer.IdentifierRole.Access) { + return false; + } + const replacement = this.importProcessor.getIdentifierReplacement( + this.tokens.identifierNameForToken(token), + ); + if (!replacement) { + return false; + } + // Tolerate any number of closing parens while looking for an opening paren + // that indicates a function call. + let possibleOpenParenIndex = this.tokens.currentIndex() + 1; + while ( + possibleOpenParenIndex < this.tokens.tokens.length && + this.tokens.tokens[possibleOpenParenIndex].type === _types.TokenType.parenR + ) { + possibleOpenParenIndex++; + } + // Avoid treating imported functions as methods of their `exports` object + // by using `(0, f)` when the identifier is in a paren expression. Else + // use `Function.prototype.call` when the identifier is a guaranteed + // function call. When using `call`, pass undefined as the context. + if (this.tokens.tokens[possibleOpenParenIndex].type === _types.TokenType.parenL) { + if ( + this.tokens.tokenAtRelativeIndex(1).type === _types.TokenType.parenL && + this.tokens.tokenAtRelativeIndex(-1).type !== _types.TokenType._new + ) { + this.tokens.replaceToken(`${replacement}.call(void 0, `); + // Remove the old paren. + this.tokens.removeToken(); + // Balance out the new paren. + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(_types.TokenType.parenR); + } else { + // See here: http://2ality.com/2015/12/references.html + this.tokens.replaceToken(`(0, ${replacement})`); + } + } else { + this.tokens.replaceToken(replacement); + } + return true; + } + + processObjectShorthand() { + const identifier = this.tokens.identifierName(); + const replacement = this.importProcessor.getIdentifierReplacement(identifier); + if (!replacement) { + return false; + } + this.tokens.replaceToken(`${identifier}: ${replacement}`); + return true; + } + + processExport() { + if ( + this.tokens.matches2(_types.TokenType._export, _types.TokenType._enum) || + this.tokens.matches3(_types.TokenType._export, _types.TokenType._const, _types.TokenType._enum) + ) { + this.hadNamedExport = true; + // Let the TypeScript transform handle it. + return false; + } + if (this.tokens.matches2(_types.TokenType._export, _types.TokenType._default)) { + if (this.tokens.matches3(_types.TokenType._export, _types.TokenType._default, _types.TokenType._enum)) { + this.hadDefaultExport = true; + // Flow export default enums need some special handling, so handle them + // in that tranform rather than this one. + return false; + } + this.processExportDefault(); + return true; + } else if (this.tokens.matches2(_types.TokenType._export, _types.TokenType.braceL)) { + this.processExportBindings(); + return true; + } else if ( + this.tokens.matches2(_types.TokenType._export, _types.TokenType.name) && + this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, _keywords.ContextualKeyword._type) + ) { + // export type {a}; + // export type {a as b}; + // export type {a} from './b'; + // export type * from './b'; + // export type * as ns from './b'; + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + if (this.tokens.matches1(_types.TokenType.braceL)) { + while (!this.tokens.matches1(_types.TokenType.braceR)) { + this.tokens.removeToken(); + } + this.tokens.removeToken(); + } else { + // * + this.tokens.removeToken(); + if (this.tokens.matches1(_types.TokenType._as)) { + // as + this.tokens.removeToken(); + // ns + this.tokens.removeToken(); + } + } + // Remove type re-export `... } from './T'` + if ( + this.tokens.matchesContextual(_keywords.ContextualKeyword._from) && + this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, _types.TokenType.string) + ) { + this.tokens.removeToken(); + this.tokens.removeToken(); + _removeMaybeImportAttributes.removeMaybeImportAttributes.call(void 0, this.tokens); + } + return true; + } + this.hadNamedExport = true; + if ( + this.tokens.matches2(_types.TokenType._export, _types.TokenType._var) || + this.tokens.matches2(_types.TokenType._export, _types.TokenType._let) || + this.tokens.matches2(_types.TokenType._export, _types.TokenType._const) + ) { + this.processExportVar(); + return true; + } else if ( + this.tokens.matches2(_types.TokenType._export, _types.TokenType._function) || + // export async function + this.tokens.matches3(_types.TokenType._export, _types.TokenType.name, _types.TokenType._function) + ) { + this.processExportFunction(); + return true; + } else if ( + this.tokens.matches2(_types.TokenType._export, _types.TokenType._class) || + this.tokens.matches3(_types.TokenType._export, _types.TokenType._abstract, _types.TokenType._class) || + this.tokens.matches2(_types.TokenType._export, _types.TokenType.at) + ) { + this.processExportClass(); + return true; + } else if (this.tokens.matches2(_types.TokenType._export, _types.TokenType.star)) { + this.processExportStar(); + return true; + } else { + throw new Error("Unrecognized export syntax."); + } + } + + processAssignment() { + const index = this.tokens.currentIndex(); + const identifierToken = this.tokens.tokens[index - 1]; + // If the LHS is a type identifier, this must be a declaration like `let a: b = c;`, + // with `b` as the identifier, so nothing needs to be done in that case. + if (identifierToken.isType || identifierToken.type !== _types.TokenType.name) { + return false; + } + if (identifierToken.shadowsGlobal) { + return false; + } + if (index >= 2 && this.tokens.matches1AtIndex(index - 2, _types.TokenType.dot)) { + return false; + } + if (index >= 2 && [_types.TokenType._var, _types.TokenType._let, _types.TokenType._const].includes(this.tokens.tokens[index - 2].type)) { + // Declarations don't need an extra assignment. This doesn't avoid the + // assignment for comma-separated declarations, but it's still correct + // since the assignment is just redundant. + return false; + } + const assignmentSnippet = this.importProcessor.resolveExportBinding( + this.tokens.identifierNameForToken(identifierToken), + ); + if (!assignmentSnippet) { + return false; + } + this.tokens.copyToken(); + this.tokens.appendCode(` ${assignmentSnippet} =`); + return true; + } + + /** + * Process something like `a += 3`, where `a` might be an exported value. + */ + processComplexAssignment() { + const index = this.tokens.currentIndex(); + const identifierToken = this.tokens.tokens[index - 1]; + if (identifierToken.type !== _types.TokenType.name) { + return false; + } + if (identifierToken.shadowsGlobal) { + return false; + } + if (index >= 2 && this.tokens.matches1AtIndex(index - 2, _types.TokenType.dot)) { + return false; + } + const assignmentSnippet = this.importProcessor.resolveExportBinding( + this.tokens.identifierNameForToken(identifierToken), + ); + if (!assignmentSnippet) { + return false; + } + this.tokens.appendCode(` = ${assignmentSnippet}`); + this.tokens.copyToken(); + return true; + } + + /** + * Process something like `++a`, where `a` might be an exported value. + */ + processPreIncDec() { + const index = this.tokens.currentIndex(); + const identifierToken = this.tokens.tokens[index + 1]; + if (identifierToken.type !== _types.TokenType.name) { + return false; + } + if (identifierToken.shadowsGlobal) { + return false; + } + // Ignore things like ++a.b and ++a[b] and ++a().b. + if ( + index + 2 < this.tokens.tokens.length && + (this.tokens.matches1AtIndex(index + 2, _types.TokenType.dot) || + this.tokens.matches1AtIndex(index + 2, _types.TokenType.bracketL) || + this.tokens.matches1AtIndex(index + 2, _types.TokenType.parenL)) + ) { + return false; + } + const identifierName = this.tokens.identifierNameForToken(identifierToken); + const assignmentSnippet = this.importProcessor.resolveExportBinding(identifierName); + if (!assignmentSnippet) { + return false; + } + this.tokens.appendCode(`${assignmentSnippet} = `); + this.tokens.copyToken(); + return true; + } + + /** + * Process something like `a++`, where `a` might be an exported value. + * This starts at the `a`, not at the `++`. + */ + processPostIncDec() { + const index = this.tokens.currentIndex(); + const identifierToken = this.tokens.tokens[index]; + const operatorToken = this.tokens.tokens[index + 1]; + if (identifierToken.type !== _types.TokenType.name) { + return false; + } + if (identifierToken.shadowsGlobal) { + return false; + } + if (index >= 1 && this.tokens.matches1AtIndex(index - 1, _types.TokenType.dot)) { + return false; + } + const identifierName = this.tokens.identifierNameForToken(identifierToken); + const assignmentSnippet = this.importProcessor.resolveExportBinding(identifierName); + if (!assignmentSnippet) { + return false; + } + const operatorCode = this.tokens.rawCodeForToken(operatorToken); + // We might also replace the identifier with something like exports.x, so + // do that replacement here as well. + const base = this.importProcessor.getIdentifierReplacement(identifierName) || identifierName; + if (operatorCode === "++") { + this.tokens.replaceToken(`(${base} = ${assignmentSnippet} = ${base} + 1, ${base} - 1)`); + } else if (operatorCode === "--") { + this.tokens.replaceToken(`(${base} = ${assignmentSnippet} = ${base} - 1, ${base} + 1)`); + } else { + throw new Error(`Unexpected operator: ${operatorCode}`); + } + this.tokens.removeToken(); + return true; + } + + processExportDefault() { + let exportedRuntimeValue = true; + if ( + this.tokens.matches4(_types.TokenType._export, _types.TokenType._default, _types.TokenType._function, _types.TokenType.name) || + // export default async function + (this.tokens.matches5(_types.TokenType._export, _types.TokenType._default, _types.TokenType.name, _types.TokenType._function, _types.TokenType.name) && + this.tokens.matchesContextualAtIndex( + this.tokens.currentIndex() + 2, + _keywords.ContextualKeyword._async, + )) + ) { + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + // Named function export case: change it to a top-level function + // declaration followed by exports statement. + const name = this.processNamedFunction(); + this.tokens.appendCode(` exports.default = ${name};`); + } else if ( + this.tokens.matches4(_types.TokenType._export, _types.TokenType._default, _types.TokenType._class, _types.TokenType.name) || + this.tokens.matches5(_types.TokenType._export, _types.TokenType._default, _types.TokenType._abstract, _types.TokenType._class, _types.TokenType.name) || + this.tokens.matches3(_types.TokenType._export, _types.TokenType._default, _types.TokenType.at) + ) { + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + this.copyDecorators(); + if (this.tokens.matches1(_types.TokenType._abstract)) { + this.tokens.removeToken(); + } + const name = this.rootTransformer.processNamedClass(); + this.tokens.appendCode(` exports.default = ${name};`); + // After this point, this is a plain "export default E" statement. + } else if ( + _shouldElideDefaultExport2.default.call(void 0, + this.isTypeScriptTransformEnabled, + this.keepUnusedImports, + this.tokens, + this.declarationInfo, + ) + ) { + // If the exported value is just an identifier and should be elided by TypeScript + // rules, then remove it entirely. It will always have the form `export default e`, + // where `e` is an identifier. + exportedRuntimeValue = false; + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + this.tokens.removeToken(); + } else if (this.reactHotLoaderTransformer) { + // We need to assign E to a variable. Change "export default E" to + // "let _default; exports.default = _default = E" + const defaultVarName = this.nameManager.claimFreeName("_default"); + this.tokens.replaceToken(`let ${defaultVarName}; exports.`); + this.tokens.copyToken(); + this.tokens.appendCode(` = ${defaultVarName} =`); + this.reactHotLoaderTransformer.setExtractedDefaultExportName(defaultVarName); + } else { + // Change "export default E" to "exports.default = E" + this.tokens.replaceToken("exports."); + this.tokens.copyToken(); + this.tokens.appendCode(" ="); + } + if (exportedRuntimeValue) { + this.hadDefaultExport = true; + } + } + + copyDecorators() { + while (this.tokens.matches1(_types.TokenType.at)) { + this.tokens.copyToken(); + if (this.tokens.matches1(_types.TokenType.parenL)) { + this.tokens.copyExpectedToken(_types.TokenType.parenL); + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(_types.TokenType.parenR); + } else { + this.tokens.copyExpectedToken(_types.TokenType.name); + while (this.tokens.matches1(_types.TokenType.dot)) { + this.tokens.copyExpectedToken(_types.TokenType.dot); + this.tokens.copyExpectedToken(_types.TokenType.name); + } + if (this.tokens.matches1(_types.TokenType.parenL)) { + this.tokens.copyExpectedToken(_types.TokenType.parenL); + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(_types.TokenType.parenR); + } + } + } + } + + /** + * Transform a declaration like `export var`, `export let`, or `export const`. + */ + processExportVar() { + if (this.isSimpleExportVar()) { + this.processSimpleExportVar(); + } else { + this.processComplexExportVar(); + } + } + + /** + * Determine if the export is of the form: + * export var/let/const [varName] = [expr]; + * In other words, determine if function name inference might apply. + */ + isSimpleExportVar() { + let tokenIndex = this.tokens.currentIndex(); + // export + tokenIndex++; + // var/let/const + tokenIndex++; + if (!this.tokens.matches1AtIndex(tokenIndex, _types.TokenType.name)) { + return false; + } + tokenIndex++; + while (tokenIndex < this.tokens.tokens.length && this.tokens.tokens[tokenIndex].isType) { + tokenIndex++; + } + if (!this.tokens.matches1AtIndex(tokenIndex, _types.TokenType.eq)) { + return false; + } + return true; + } + + /** + * Transform an `export var` declaration initializing a single variable. + * + * For example, this: + * export const f = () => {}; + * becomes this: + * const f = () => {}; exports.f = f; + * + * The variable is unused (e.g. exports.f has the true value of the export). + * We need to produce an assignment of this form so that the function will + * have an inferred name of "f", which wouldn't happen in the more general + * case below. + */ + processSimpleExportVar() { + // export + this.tokens.removeInitialToken(); + // var/let/const + this.tokens.copyToken(); + const varName = this.tokens.identifierName(); + // x: number -> x + while (!this.tokens.matches1(_types.TokenType.eq)) { + this.rootTransformer.processToken(); + } + const endIndex = this.tokens.currentToken().rhsEndIndex; + if (endIndex == null) { + throw new Error("Expected = token with an end index."); + } + while (this.tokens.currentIndex() < endIndex) { + this.rootTransformer.processToken(); + } + this.tokens.appendCode(`; exports.${varName} = ${varName}`); + } + + /** + * Transform normal declaration exports, including handling destructuring. + * For example, this: + * export const {x: [a = 2, b], c} = d; + * becomes this: + * ({x: [exports.a = 2, exports.b], c: exports.c} = d;) + */ + processComplexExportVar() { + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + const needsParens = this.tokens.matches1(_types.TokenType.braceL); + if (needsParens) { + this.tokens.appendCode("("); + } + + let depth = 0; + while (true) { + if ( + this.tokens.matches1(_types.TokenType.braceL) || + this.tokens.matches1(_types.TokenType.dollarBraceL) || + this.tokens.matches1(_types.TokenType.bracketL) + ) { + depth++; + this.tokens.copyToken(); + } else if (this.tokens.matches1(_types.TokenType.braceR) || this.tokens.matches1(_types.TokenType.bracketR)) { + depth--; + this.tokens.copyToken(); + } else if ( + depth === 0 && + !this.tokens.matches1(_types.TokenType.name) && + !this.tokens.currentToken().isType + ) { + break; + } else if (this.tokens.matches1(_types.TokenType.eq)) { + // Default values might have assignments in the RHS that we want to ignore, so skip past + // them. + const endIndex = this.tokens.currentToken().rhsEndIndex; + if (endIndex == null) { + throw new Error("Expected = token with an end index."); + } + while (this.tokens.currentIndex() < endIndex) { + this.rootTransformer.processToken(); + } + } else { + const token = this.tokens.currentToken(); + if (_tokenizer.isDeclaration.call(void 0, token)) { + const name = this.tokens.identifierName(); + let replacement = this.importProcessor.getIdentifierReplacement(name); + if (replacement === null) { + throw new Error(`Expected a replacement for ${name} in \`export var\` syntax.`); + } + if (_tokenizer.isObjectShorthandDeclaration.call(void 0, token)) { + replacement = `${name}: ${replacement}`; + } + this.tokens.replaceToken(replacement); + } else { + this.rootTransformer.processToken(); + } + } + } + + if (needsParens) { + // Seek to the end of the RHS. + const endIndex = this.tokens.currentToken().rhsEndIndex; + if (endIndex == null) { + throw new Error("Expected = token with an end index."); + } + while (this.tokens.currentIndex() < endIndex) { + this.rootTransformer.processToken(); + } + this.tokens.appendCode(")"); + } + } + + /** + * Transform this: + * export function foo() {} + * into this: + * function foo() {} exports.foo = foo; + */ + processExportFunction() { + this.tokens.replaceToken(""); + const name = this.processNamedFunction(); + this.tokens.appendCode(` exports.${name} = ${name};`); + } + + /** + * Skip past a function with a name and return that name. + */ + processNamedFunction() { + if (this.tokens.matches1(_types.TokenType._function)) { + this.tokens.copyToken(); + } else if (this.tokens.matches2(_types.TokenType.name, _types.TokenType._function)) { + if (!this.tokens.matchesContextual(_keywords.ContextualKeyword._async)) { + throw new Error("Expected async keyword in function export."); + } + this.tokens.copyToken(); + this.tokens.copyToken(); + } + if (this.tokens.matches1(_types.TokenType.star)) { + this.tokens.copyToken(); + } + if (!this.tokens.matches1(_types.TokenType.name)) { + throw new Error("Expected identifier for exported function name."); + } + const name = this.tokens.identifierName(); + this.tokens.copyToken(); + if (this.tokens.currentToken().isType) { + this.tokens.removeInitialToken(); + while (this.tokens.currentToken().isType) { + this.tokens.removeToken(); + } + } + this.tokens.copyExpectedToken(_types.TokenType.parenL); + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(_types.TokenType.parenR); + this.rootTransformer.processPossibleTypeRange(); + this.tokens.copyExpectedToken(_types.TokenType.braceL); + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(_types.TokenType.braceR); + return name; + } + + /** + * Transform this: + * export class A {} + * into this: + * class A {} exports.A = A; + */ + processExportClass() { + this.tokens.removeInitialToken(); + this.copyDecorators(); + if (this.tokens.matches1(_types.TokenType._abstract)) { + this.tokens.removeToken(); + } + const name = this.rootTransformer.processNamedClass(); + this.tokens.appendCode(` exports.${name} = ${name};`); + } + + /** + * Transform this: + * export {a, b as c}; + * into this: + * exports.a = a; exports.c = b; + * + * OR + * + * Transform this: + * export {a, b as c} from './foo'; + * into the pre-generated Object.defineProperty code from the ImportProcessor. + * + * For the first case, if the TypeScript transform is enabled, we need to skip + * exports that are only defined as types. + */ + processExportBindings() { + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + + const isReExport = _isExportFrom2.default.call(void 0, this.tokens); + + const exportStatements = []; + while (true) { + if (this.tokens.matches1(_types.TokenType.braceR)) { + this.tokens.removeToken(); + break; + } + + const specifierInfo = _getImportExportSpecifierInfo2.default.call(void 0, this.tokens); + + while (this.tokens.currentIndex() < specifierInfo.endIndex) { + this.tokens.removeToken(); + } + + const shouldRemoveExport = + specifierInfo.isType || + (!isReExport && this.shouldElideExportedIdentifier(specifierInfo.leftName)); + if (!shouldRemoveExport) { + const exportedName = specifierInfo.rightName; + if (exportedName === "default") { + this.hadDefaultExport = true; + } else { + this.hadNamedExport = true; + } + const localName = specifierInfo.leftName; + const newLocalName = this.importProcessor.getIdentifierReplacement(localName); + exportStatements.push(`exports.${exportedName} = ${newLocalName || localName};`); + } + + if (this.tokens.matches1(_types.TokenType.braceR)) { + this.tokens.removeToken(); + break; + } + if (this.tokens.matches2(_types.TokenType.comma, _types.TokenType.braceR)) { + this.tokens.removeToken(); + this.tokens.removeToken(); + break; + } else if (this.tokens.matches1(_types.TokenType.comma)) { + this.tokens.removeToken(); + } else { + throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`); + } + } + + if (this.tokens.matchesContextual(_keywords.ContextualKeyword._from)) { + // This is an export...from, so throw away the normal named export code + // and use the Object.defineProperty code from ImportProcessor. + this.tokens.removeToken(); + const path = this.tokens.stringValue(); + this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(path)); + _removeMaybeImportAttributes.removeMaybeImportAttributes.call(void 0, this.tokens); + } else { + // This is a normal named export, so use that. + this.tokens.appendCode(exportStatements.join(" ")); + } + + if (this.tokens.matches1(_types.TokenType.semi)) { + this.tokens.removeToken(); + } + } + + processExportStar() { + this.tokens.removeInitialToken(); + while (!this.tokens.matches1(_types.TokenType.string)) { + this.tokens.removeToken(); + } + const path = this.tokens.stringValue(); + this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(path)); + _removeMaybeImportAttributes.removeMaybeImportAttributes.call(void 0, this.tokens); + if (this.tokens.matches1(_types.TokenType.semi)) { + this.tokens.removeToken(); + } + } + + shouldElideExportedIdentifier(name) { + return ( + this.isTypeScriptTransformEnabled && + !this.keepUnusedImports && + !this.declarationInfo.valueDeclarations.has(name) + ); + } +} exports.default = CJSImportTransformer; diff --git a/node_modules/sucrase/dist/transformers/ESMImportTransformer.js b/node_modules/sucrase/dist/transformers/ESMImportTransformer.js new file mode 100644 index 0000000..d89e5ea --- /dev/null +++ b/node_modules/sucrase/dist/transformers/ESMImportTransformer.js @@ -0,0 +1,415 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + +var _keywords = require('../parser/tokenizer/keywords'); +var _types = require('../parser/tokenizer/types'); + +var _elideImportEquals = require('../util/elideImportEquals'); var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals); + + + +var _getDeclarationInfo = require('../util/getDeclarationInfo'); var _getDeclarationInfo2 = _interopRequireDefault(_getDeclarationInfo); +var _getImportExportSpecifierInfo = require('../util/getImportExportSpecifierInfo'); var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo); +var _getNonTypeIdentifiers = require('../util/getNonTypeIdentifiers'); +var _isExportFrom = require('../util/isExportFrom'); var _isExportFrom2 = _interopRequireDefault(_isExportFrom); +var _removeMaybeImportAttributes = require('../util/removeMaybeImportAttributes'); +var _shouldElideDefaultExport = require('../util/shouldElideDefaultExport'); var _shouldElideDefaultExport2 = _interopRequireDefault(_shouldElideDefaultExport); + +var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer); + +/** + * Class for editing import statements when we are keeping the code as ESM. We still need to remove + * type-only imports in TypeScript and Flow. + */ + class ESMImportTransformer extends _Transformer2.default { + + + + + constructor( + tokens, + nameManager, + helperManager, + reactHotLoaderTransformer, + isTypeScriptTransformEnabled, + isFlowTransformEnabled, + keepUnusedImports, + options, + ) { + super();this.tokens = tokens;this.nameManager = nameManager;this.helperManager = helperManager;this.reactHotLoaderTransformer = reactHotLoaderTransformer;this.isTypeScriptTransformEnabled = isTypeScriptTransformEnabled;this.isFlowTransformEnabled = isFlowTransformEnabled;this.keepUnusedImports = keepUnusedImports;; + this.nonTypeIdentifiers = + isTypeScriptTransformEnabled && !keepUnusedImports + ? _getNonTypeIdentifiers.getNonTypeIdentifiers.call(void 0, tokens, options) + : new Set(); + this.declarationInfo = + isTypeScriptTransformEnabled && !keepUnusedImports + ? _getDeclarationInfo2.default.call(void 0, tokens) + : _getDeclarationInfo.EMPTY_DECLARATION_INFO; + this.injectCreateRequireForImportRequire = Boolean(options.injectCreateRequireForImportRequire); + } + + process() { + // TypeScript `import foo = require('foo');` should always just be translated to plain require. + if (this.tokens.matches3(_types.TokenType._import, _types.TokenType.name, _types.TokenType.eq)) { + return this.processImportEquals(); + } + if ( + this.tokens.matches4(_types.TokenType._import, _types.TokenType.name, _types.TokenType.name, _types.TokenType.eq) && + this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, _keywords.ContextualKeyword._type) + ) { + // import type T = require('T') + this.tokens.removeInitialToken(); + // This construct is always exactly 8 tokens long, so remove the 7 remaining tokens. + for (let i = 0; i < 7; i++) { + this.tokens.removeToken(); + } + return true; + } + if (this.tokens.matches2(_types.TokenType._export, _types.TokenType.eq)) { + this.tokens.replaceToken("module.exports"); + return true; + } + if ( + this.tokens.matches5(_types.TokenType._export, _types.TokenType._import, _types.TokenType.name, _types.TokenType.name, _types.TokenType.eq) && + this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 2, _keywords.ContextualKeyword._type) + ) { + // export import type T = require('T') + this.tokens.removeInitialToken(); + // This construct is always exactly 9 tokens long, so remove the 8 remaining tokens. + for (let i = 0; i < 8; i++) { + this.tokens.removeToken(); + } + return true; + } + if (this.tokens.matches1(_types.TokenType._import)) { + return this.processImport(); + } + if (this.tokens.matches2(_types.TokenType._export, _types.TokenType._default)) { + return this.processExportDefault(); + } + if (this.tokens.matches2(_types.TokenType._export, _types.TokenType.braceL)) { + return this.processNamedExports(); + } + if ( + this.tokens.matches2(_types.TokenType._export, _types.TokenType.name) && + this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, _keywords.ContextualKeyword._type) + ) { + // export type {a}; + // export type {a as b}; + // export type {a} from './b'; + // export type * from './b'; + // export type * as ns from './b'; + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + if (this.tokens.matches1(_types.TokenType.braceL)) { + while (!this.tokens.matches1(_types.TokenType.braceR)) { + this.tokens.removeToken(); + } + this.tokens.removeToken(); + } else { + // * + this.tokens.removeToken(); + if (this.tokens.matches1(_types.TokenType._as)) { + // as + this.tokens.removeToken(); + // ns + this.tokens.removeToken(); + } + } + // Remove type re-export `... } from './T'` + if ( + this.tokens.matchesContextual(_keywords.ContextualKeyword._from) && + this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, _types.TokenType.string) + ) { + this.tokens.removeToken(); + this.tokens.removeToken(); + _removeMaybeImportAttributes.removeMaybeImportAttributes.call(void 0, this.tokens); + } + return true; + } + return false; + } + + processImportEquals() { + const importName = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1); + if (this.shouldAutomaticallyElideImportedName(importName)) { + // If this name is only used as a type, elide the whole import. + _elideImportEquals2.default.call(void 0, this.tokens); + } else if (this.injectCreateRequireForImportRequire) { + // We're using require in an environment (Node ESM) that doesn't provide + // it as a global, so generate a helper to import it. + // import -> const + this.tokens.replaceToken("const"); + // Foo + this.tokens.copyToken(); + // = + this.tokens.copyToken(); + // require + this.tokens.replaceToken(this.helperManager.getHelperName("require")); + } else { + // Otherwise, just switch `import` to `const`. + this.tokens.replaceToken("const"); + } + return true; + } + + processImport() { + if (this.tokens.matches2(_types.TokenType._import, _types.TokenType.parenL)) { + // Dynamic imports don't need to be transformed. + return false; + } + + const snapshot = this.tokens.snapshot(); + const allImportsRemoved = this.removeImportTypeBindings(); + if (allImportsRemoved) { + this.tokens.restoreToSnapshot(snapshot); + while (!this.tokens.matches1(_types.TokenType.string)) { + this.tokens.removeToken(); + } + this.tokens.removeToken(); + _removeMaybeImportAttributes.removeMaybeImportAttributes.call(void 0, this.tokens); + if (this.tokens.matches1(_types.TokenType.semi)) { + this.tokens.removeToken(); + } + } + return true; + } + + /** + * Remove type bindings from this import, leaving the rest of the import intact. + * + * Return true if this import was ONLY types, and thus is eligible for removal. This will bail out + * of the replacement operation, so we can return early here. + */ + removeImportTypeBindings() { + this.tokens.copyExpectedToken(_types.TokenType._import); + if ( + this.tokens.matchesContextual(_keywords.ContextualKeyword._type) && + !this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, _types.TokenType.comma) && + !this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, _keywords.ContextualKeyword._from) + ) { + // This is an "import type" statement, so exit early. + return true; + } + + if (this.tokens.matches1(_types.TokenType.string)) { + // This is a bare import, so we should proceed with the import. + this.tokens.copyToken(); + return false; + } + + // Skip the "module" token in import reflection. + if ( + this.tokens.matchesContextual(_keywords.ContextualKeyword._module) && + this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 2, _keywords.ContextualKeyword._from) + ) { + this.tokens.copyToken(); + } + + let foundNonTypeImport = false; + let foundAnyNamedImport = false; + let needsComma = false; + + // Handle default import. + if (this.tokens.matches1(_types.TokenType.name)) { + if (this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())) { + this.tokens.removeToken(); + if (this.tokens.matches1(_types.TokenType.comma)) { + this.tokens.removeToken(); + } + } else { + foundNonTypeImport = true; + this.tokens.copyToken(); + if (this.tokens.matches1(_types.TokenType.comma)) { + // We're in a statement like: + // import A, * as B from './A'; + // or + // import A, {foo} from './A'; + // where the `A` is being kept. The comma should be removed if an only + // if the next part of the import statement is elided, but that's hard + // to determine at this point in the code. Instead, always remove it + // and set a flag to add it back if necessary. + needsComma = true; + this.tokens.removeToken(); + } + } + } + + if (this.tokens.matches1(_types.TokenType.star)) { + if (this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))) { + this.tokens.removeToken(); + this.tokens.removeToken(); + this.tokens.removeToken(); + } else { + if (needsComma) { + this.tokens.appendCode(","); + } + foundNonTypeImport = true; + this.tokens.copyExpectedToken(_types.TokenType.star); + this.tokens.copyExpectedToken(_types.TokenType.name); + this.tokens.copyExpectedToken(_types.TokenType.name); + } + } else if (this.tokens.matches1(_types.TokenType.braceL)) { + if (needsComma) { + this.tokens.appendCode(","); + } + this.tokens.copyToken(); + while (!this.tokens.matches1(_types.TokenType.braceR)) { + foundAnyNamedImport = true; + const specifierInfo = _getImportExportSpecifierInfo2.default.call(void 0, this.tokens); + if ( + specifierInfo.isType || + this.shouldAutomaticallyElideImportedName(specifierInfo.rightName) + ) { + while (this.tokens.currentIndex() < specifierInfo.endIndex) { + this.tokens.removeToken(); + } + if (this.tokens.matches1(_types.TokenType.comma)) { + this.tokens.removeToken(); + } + } else { + foundNonTypeImport = true; + while (this.tokens.currentIndex() < specifierInfo.endIndex) { + this.tokens.copyToken(); + } + if (this.tokens.matches1(_types.TokenType.comma)) { + this.tokens.copyToken(); + } + } + } + this.tokens.copyExpectedToken(_types.TokenType.braceR); + } + + if (this.keepUnusedImports) { + return false; + } + if (this.isTypeScriptTransformEnabled) { + return !foundNonTypeImport; + } else if (this.isFlowTransformEnabled) { + // In Flow, unlike TS, `import {} from 'foo';` preserves the import. + return foundAnyNamedImport && !foundNonTypeImport; + } else { + return false; + } + } + + shouldAutomaticallyElideImportedName(name) { + return ( + this.isTypeScriptTransformEnabled && + !this.keepUnusedImports && + !this.nonTypeIdentifiers.has(name) + ); + } + + processExportDefault() { + if ( + _shouldElideDefaultExport2.default.call(void 0, + this.isTypeScriptTransformEnabled, + this.keepUnusedImports, + this.tokens, + this.declarationInfo, + ) + ) { + // If the exported value is just an identifier and should be elided by TypeScript + // rules, then remove it entirely. It will always have the form `export default e`, + // where `e` is an identifier. + this.tokens.removeInitialToken(); + this.tokens.removeToken(); + this.tokens.removeToken(); + return true; + } + + const alreadyHasName = + this.tokens.matches4(_types.TokenType._export, _types.TokenType._default, _types.TokenType._function, _types.TokenType.name) || + // export default async function + (this.tokens.matches5(_types.TokenType._export, _types.TokenType._default, _types.TokenType.name, _types.TokenType._function, _types.TokenType.name) && + this.tokens.matchesContextualAtIndex( + this.tokens.currentIndex() + 2, + _keywords.ContextualKeyword._async, + )) || + this.tokens.matches4(_types.TokenType._export, _types.TokenType._default, _types.TokenType._class, _types.TokenType.name) || + this.tokens.matches5(_types.TokenType._export, _types.TokenType._default, _types.TokenType._abstract, _types.TokenType._class, _types.TokenType.name); + + if (!alreadyHasName && this.reactHotLoaderTransformer) { + // This is a plain "export default E" statement and we need to assign E to a variable. + // Change "export default E" to "let _default; export default _default = E" + const defaultVarName = this.nameManager.claimFreeName("_default"); + this.tokens.replaceToken(`let ${defaultVarName}; export`); + this.tokens.copyToken(); + this.tokens.appendCode(` ${defaultVarName} =`); + this.reactHotLoaderTransformer.setExtractedDefaultExportName(defaultVarName); + return true; + } + return false; + } + + /** + * Handle a statement with one of these forms: + * export {a, type b}; + * export {c, type d} from 'foo'; + * + * In both cases, any explicit type exports should be removed. In the first + * case, we also need to handle implicit export elision for names declared as + * types. In the second case, we must NOT do implicit named export elision, + * but we must remove the runtime import if all exports are type exports. + */ + processNamedExports() { + if (!this.isTypeScriptTransformEnabled) { + return false; + } + this.tokens.copyExpectedToken(_types.TokenType._export); + this.tokens.copyExpectedToken(_types.TokenType.braceL); + + const isReExport = _isExportFrom2.default.call(void 0, this.tokens); + let foundNonTypeExport = false; + while (!this.tokens.matches1(_types.TokenType.braceR)) { + const specifierInfo = _getImportExportSpecifierInfo2.default.call(void 0, this.tokens); + if ( + specifierInfo.isType || + (!isReExport && this.shouldElideExportedName(specifierInfo.leftName)) + ) { + // Type export, so remove all tokens, including any comma. + while (this.tokens.currentIndex() < specifierInfo.endIndex) { + this.tokens.removeToken(); + } + if (this.tokens.matches1(_types.TokenType.comma)) { + this.tokens.removeToken(); + } + } else { + // Non-type export, so copy all tokens, including any comma. + foundNonTypeExport = true; + while (this.tokens.currentIndex() < specifierInfo.endIndex) { + this.tokens.copyToken(); + } + if (this.tokens.matches1(_types.TokenType.comma)) { + this.tokens.copyToken(); + } + } + } + this.tokens.copyExpectedToken(_types.TokenType.braceR); + + if (!this.keepUnusedImports && isReExport && !foundNonTypeExport) { + // This is a type-only re-export, so skip evaluating the other module. Technically this + // leaves the statement as `export {}`, but that's ok since that's a no-op. + this.tokens.removeToken(); + this.tokens.removeToken(); + _removeMaybeImportAttributes.removeMaybeImportAttributes.call(void 0, this.tokens); + } + + return true; + } + + /** + * ESM elides all imports with the rule that we only elide if we see that it's + * a type and never see it as a value. This is in contrast to CJS, which + * elides imports that are completely unknown. + */ + shouldElideExportedName(name) { + return ( + this.isTypeScriptTransformEnabled && + !this.keepUnusedImports && + this.declarationInfo.typeDeclarations.has(name) && + !this.declarationInfo.valueDeclarations.has(name) + ); + } +} exports.default = ESMImportTransformer; diff --git a/node_modules/sucrase/dist/transformers/FlowTransformer.js b/node_modules/sucrase/dist/transformers/FlowTransformer.js new file mode 100644 index 0000000..31c9744 --- /dev/null +++ b/node_modules/sucrase/dist/transformers/FlowTransformer.js @@ -0,0 +1,182 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _keywords = require('../parser/tokenizer/keywords'); +var _types = require('../parser/tokenizer/types'); + + +var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer); + + class FlowTransformer extends _Transformer2.default { + constructor( + rootTransformer, + tokens, + isImportsTransformEnabled, + ) { + super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.isImportsTransformEnabled = isImportsTransformEnabled;; + } + + process() { + if ( + this.rootTransformer.processPossibleArrowParamEnd() || + this.rootTransformer.processPossibleAsyncArrowWithTypeParams() || + this.rootTransformer.processPossibleTypeRange() + ) { + return true; + } + if (this.tokens.matches1(_types.TokenType._enum)) { + this.processEnum(); + return true; + } + if (this.tokens.matches2(_types.TokenType._export, _types.TokenType._enum)) { + this.processNamedExportEnum(); + return true; + } + if (this.tokens.matches3(_types.TokenType._export, _types.TokenType._default, _types.TokenType._enum)) { + this.processDefaultExportEnum(); + return true; + } + return false; + } + + /** + * Handle a declaration like: + * export enum E ... + * + * With this imports transform, this becomes: + * const E = [[enum]]; exports.E = E; + * + * otherwise, it becomes: + * export const E = [[enum]]; + */ + processNamedExportEnum() { + if (this.isImportsTransformEnabled) { + // export + this.tokens.removeInitialToken(); + const enumName = this.tokens.identifierNameAtRelativeIndex(1); + this.processEnum(); + this.tokens.appendCode(` exports.${enumName} = ${enumName};`); + } else { + this.tokens.copyToken(); + this.processEnum(); + } + } + + /** + * Handle a declaration like: + * export default enum E + * + * With the imports transform, this becomes: + * const E = [[enum]]; exports.default = E; + * + * otherwise, it becomes: + * const E = [[enum]]; export default E; + */ + processDefaultExportEnum() { + // export + this.tokens.removeInitialToken(); + // default + this.tokens.removeToken(); + const enumName = this.tokens.identifierNameAtRelativeIndex(1); + this.processEnum(); + if (this.isImportsTransformEnabled) { + this.tokens.appendCode(` exports.default = ${enumName};`); + } else { + this.tokens.appendCode(` export default ${enumName};`); + } + } + + /** + * Transpile flow enums to invoke the "flow-enums-runtime" library. + * + * Currently, the transpiled code always uses `require("flow-enums-runtime")`, + * but if future flexibility is needed, we could expose a config option for + * this string (similar to configurable JSX). Even when targeting ESM, the + * default behavior of babel-plugin-transform-flow-enums is to use require + * rather than injecting an import. + * + * Flow enums are quite a bit simpler than TS enums and have some convenient + * constraints: + * - Element initializers must be either always present or always absent. That + * means that we can use fixed lookahead on the first element (if any) and + * assume that all elements are like that. + * - The right-hand side of an element initializer must be a literal value, + * not a complex expression and not referencing other elements. That means + * we can simply copy a single token. + * + * Enums can be broken up into three basic cases: + * + * Mirrored enums: + * enum E {A, B} + * -> + * const E = require("flow-enums-runtime").Mirrored(["A", "B"]); + * + * Initializer enums: + * enum E {A = 1, B = 2} + * -> + * const E = require("flow-enums-runtime")({A: 1, B: 2}); + * + * Symbol enums: + * enum E of symbol {A, B} + * -> + * const E = require("flow-enums-runtime")({A: Symbol("A"), B: Symbol("B")}); + * + * We can statically detect which of the three cases this is by looking at the + * "of" declaration (if any) and seeing if the first element has an initializer. + * Since the other transform details are so similar between the three cases, we + * use a single implementation and vary the transform within processEnumElement + * based on case. + */ + processEnum() { + // enum E -> const E + this.tokens.replaceToken("const"); + this.tokens.copyExpectedToken(_types.TokenType.name); + + let isSymbolEnum = false; + if (this.tokens.matchesContextual(_keywords.ContextualKeyword._of)) { + this.tokens.removeToken(); + isSymbolEnum = this.tokens.matchesContextual(_keywords.ContextualKeyword._symbol); + this.tokens.removeToken(); + } + const hasInitializers = this.tokens.matches3(_types.TokenType.braceL, _types.TokenType.name, _types.TokenType.eq); + this.tokens.appendCode(' = require("flow-enums-runtime")'); + + const isMirrored = !isSymbolEnum && !hasInitializers; + this.tokens.replaceTokenTrimmingLeftWhitespace(isMirrored ? ".Mirrored([" : "({"); + + while (!this.tokens.matches1(_types.TokenType.braceR)) { + // ... is allowed at the end and has no runtime behavior. + if (this.tokens.matches1(_types.TokenType.ellipsis)) { + this.tokens.removeToken(); + break; + } + this.processEnumElement(isSymbolEnum, hasInitializers); + if (this.tokens.matches1(_types.TokenType.comma)) { + this.tokens.copyToken(); + } + } + + this.tokens.replaceToken(isMirrored ? "]);" : "});"); + } + + /** + * Process an individual enum element, producing either an array element or an + * object element based on what type of enum this is. + */ + processEnumElement(isSymbolEnum, hasInitializers) { + if (isSymbolEnum) { + // Symbol enums never have initializers and are expanded to object elements. + // A, -> A: Symbol("A"), + const elementName = this.tokens.identifierName(); + this.tokens.copyToken(); + this.tokens.appendCode(`: Symbol("${elementName}")`); + } else if (hasInitializers) { + // Initializers are expanded to object elements. + // A = 1, -> A: 1, + this.tokens.copyToken(); + this.tokens.replaceTokenTrimmingLeftWhitespace(":"); + this.tokens.copyToken(); + } else { + // Enum elements without initializers become string literal array elements. + // A, -> "A", + this.tokens.replaceToken(`"${this.tokens.identifierName()}"`); + } + } +} exports.default = FlowTransformer; diff --git a/node_modules/sucrase/dist/transformers/JSXTransformer.js b/node_modules/sucrase/dist/transformers/JSXTransformer.js new file mode 100644 index 0000000..df51be3 --- /dev/null +++ b/node_modules/sucrase/dist/transformers/JSXTransformer.js @@ -0,0 +1,733 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + +var _xhtml = require('../parser/plugins/jsx/xhtml'); var _xhtml2 = _interopRequireDefault(_xhtml); +var _tokenizer = require('../parser/tokenizer'); +var _types = require('../parser/tokenizer/types'); +var _charcodes = require('../parser/util/charcodes'); + +var _getJSXPragmaInfo = require('../util/getJSXPragmaInfo'); var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo); + +var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer); + + class JSXTransformer extends _Transformer2.default { + + + + + // State for calculating the line number of each JSX tag in development. + __init() {this.lastLineNumber = 1} + __init2() {this.lastIndex = 0} + + // In development, variable name holding the name of the current file. + __init3() {this.filenameVarName = null} + // Mapping of claimed names for imports in the automatic transform, e,g. + // {jsx: "_jsx"}. This determines which imports to generate in the prefix. + __init4() {this.esmAutomaticImportNameResolutions = {}} + // When automatically adding imports in CJS mode, we store the variable name + // holding the imported CJS module so we can require it in the prefix. + __init5() {this.cjsAutomaticModuleNameResolutions = {}} + + constructor( + rootTransformer, + tokens, + importProcessor, + nameManager, + options, + ) { + super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.importProcessor = importProcessor;this.nameManager = nameManager;this.options = options;JSXTransformer.prototype.__init.call(this);JSXTransformer.prototype.__init2.call(this);JSXTransformer.prototype.__init3.call(this);JSXTransformer.prototype.__init4.call(this);JSXTransformer.prototype.__init5.call(this);; + this.jsxPragmaInfo = _getJSXPragmaInfo2.default.call(void 0, options); + this.isAutomaticRuntime = options.jsxRuntime === "automatic"; + this.jsxImportSource = options.jsxImportSource || "react"; + } + + process() { + if (this.tokens.matches1(_types.TokenType.jsxTagStart)) { + this.processJSXTag(); + return true; + } + return false; + } + + getPrefixCode() { + let prefix = ""; + if (this.filenameVarName) { + prefix += `const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath || "")};`; + } + if (this.isAutomaticRuntime) { + if (this.importProcessor) { + // CJS mode: emit require statements for all modules that were referenced. + for (const [path, resolvedName] of Object.entries(this.cjsAutomaticModuleNameResolutions)) { + prefix += `var ${resolvedName} = require("${path}");`; + } + } else { + // ESM mode: consolidate and emit import statements for referenced names. + const {createElement: createElementResolution, ...otherResolutions} = + this.esmAutomaticImportNameResolutions; + if (createElementResolution) { + prefix += `import {createElement as ${createElementResolution}} from "${this.jsxImportSource}";`; + } + const importSpecifiers = Object.entries(otherResolutions) + .map(([name, resolvedName]) => `${name} as ${resolvedName}`) + .join(", "); + if (importSpecifiers) { + const importPath = + this.jsxImportSource + (this.options.production ? "/jsx-runtime" : "/jsx-dev-runtime"); + prefix += `import {${importSpecifiers}} from "${importPath}";`; + } + } + } + return prefix; + } + + processJSXTag() { + const {jsxRole, start} = this.tokens.currentToken(); + // Calculate line number information at the very start (if in development + // mode) so that the information is guaranteed to be queried in token order. + const elementLocationCode = this.options.production ? null : this.getElementLocationCode(start); + if (this.isAutomaticRuntime && jsxRole !== _tokenizer.JSXRole.KeyAfterPropSpread) { + this.transformTagToJSXFunc(elementLocationCode, jsxRole); + } else { + this.transformTagToCreateElement(elementLocationCode); + } + } + + getElementLocationCode(firstTokenStart) { + const lineNumber = this.getLineNumberForIndex(firstTokenStart); + return `lineNumber: ${lineNumber}`; + } + + /** + * Get the line number for this source position. This is calculated lazily and + * must be called in increasing order by index. + */ + getLineNumberForIndex(index) { + const code = this.tokens.code; + while (this.lastIndex < index && this.lastIndex < code.length) { + if (code[this.lastIndex] === "\n") { + this.lastLineNumber++; + } + this.lastIndex++; + } + return this.lastLineNumber; + } + + /** + * Convert the current JSX element to a call to jsx, jsxs, or jsxDEV. This is + * the primary transformation for the automatic transform. + * + * Example: + *
Hello{x}
+ * becomes + * jsxs('div', {a: 1, children: ["Hello", x]}, 2) + */ + transformTagToJSXFunc(elementLocationCode, jsxRole) { + const isStatic = jsxRole === _tokenizer.JSXRole.StaticChildren; + // First tag is always jsxTagStart. + this.tokens.replaceToken(this.getJSXFuncInvocationCode(isStatic)); + + let keyCode = null; + if (this.tokens.matches1(_types.TokenType.jsxTagEnd)) { + // Fragment syntax. + this.tokens.replaceToken(`${this.getFragmentCode()}, {`); + this.processAutomaticChildrenAndEndProps(jsxRole); + } else { + // Normal open tag or self-closing tag. + this.processTagIntro(); + this.tokens.appendCode(", {"); + keyCode = this.processProps(true); + + if (this.tokens.matches2(_types.TokenType.slash, _types.TokenType.jsxTagEnd)) { + // Self-closing tag, no children to add, so close the props. + this.tokens.appendCode("}"); + } else if (this.tokens.matches1(_types.TokenType.jsxTagEnd)) { + // Tag with children. + this.tokens.removeToken(); + this.processAutomaticChildrenAndEndProps(jsxRole); + } else { + throw new Error("Expected either /> or > at the end of the tag."); + } + // If a key was present, move it to its own arg. Note that moving code + // like this will cause line numbers to get out of sync within the JSX + // element if the key expression has a newline in it. This is unfortunate, + // but hopefully should be rare. + if (keyCode) { + this.tokens.appendCode(`, ${keyCode}`); + } + } + if (!this.options.production) { + // If the key wasn't already added, add it now so we can correctly set + // positional args for jsxDEV. + if (keyCode === null) { + this.tokens.appendCode(", void 0"); + } + this.tokens.appendCode(`, ${isStatic}, ${this.getDevSource(elementLocationCode)}, this`); + } + // We're at the close-tag or the end of a self-closing tag, so remove + // everything else and close the function call. + this.tokens.removeInitialToken(); + while (!this.tokens.matches1(_types.TokenType.jsxTagEnd)) { + this.tokens.removeToken(); + } + this.tokens.replaceToken(")"); + } + + /** + * Convert the current JSX element to a createElement call. In the classic + * runtime, this is the only case. In the automatic runtime, this is called + * as a fallback in some situations. + * + * Example: + *
Hello{x}
+ * becomes + * React.createElement('div', {a: 1, key: 2}, "Hello", x) + */ + transformTagToCreateElement(elementLocationCode) { + // First tag is always jsxTagStart. + this.tokens.replaceToken(this.getCreateElementInvocationCode()); + + if (this.tokens.matches1(_types.TokenType.jsxTagEnd)) { + // Fragment syntax. + this.tokens.replaceToken(`${this.getFragmentCode()}, null`); + this.processChildren(true); + } else { + // Normal open tag or self-closing tag. + this.processTagIntro(); + this.processPropsObjectWithDevInfo(elementLocationCode); + + if (this.tokens.matches2(_types.TokenType.slash, _types.TokenType.jsxTagEnd)) { + // Self-closing tag; no children to process. + } else if (this.tokens.matches1(_types.TokenType.jsxTagEnd)) { + // Tag with children and a close-tag; process the children as args. + this.tokens.removeToken(); + this.processChildren(true); + } else { + throw new Error("Expected either /> or > at the end of the tag."); + } + } + // We're at the close-tag or the end of a self-closing tag, so remove + // everything else and close the function call. + this.tokens.removeInitialToken(); + while (!this.tokens.matches1(_types.TokenType.jsxTagEnd)) { + this.tokens.removeToken(); + } + this.tokens.replaceToken(")"); + } + + /** + * Get the code for the relevant function for this context: jsx, jsxs, + * or jsxDEV. The following open-paren is included as well. + * + * These functions are only used for the automatic runtime, so they are always + * auto-imported, but the auto-import will be either CJS or ESM based on the + * target module format. + */ + getJSXFuncInvocationCode(isStatic) { + if (this.options.production) { + if (isStatic) { + return this.claimAutoImportedFuncInvocation("jsxs", "/jsx-runtime"); + } else { + return this.claimAutoImportedFuncInvocation("jsx", "/jsx-runtime"); + } + } else { + return this.claimAutoImportedFuncInvocation("jsxDEV", "/jsx-dev-runtime"); + } + } + + /** + * Return the code to use for the createElement function, e.g. + * `React.createElement`, including the following open-paren. + * + * This is the main function to use for the classic runtime. For the + * automatic runtime, this function is used as a fallback function to + * preserve behavior when there is a prop spread followed by an explicit + * key. In that automatic runtime case, the function should be automatically + * imported. + */ + getCreateElementInvocationCode() { + if (this.isAutomaticRuntime) { + return this.claimAutoImportedFuncInvocation("createElement", ""); + } else { + const {jsxPragmaInfo} = this; + const resolvedPragmaBaseName = this.importProcessor + ? this.importProcessor.getIdentifierReplacement(jsxPragmaInfo.base) || jsxPragmaInfo.base + : jsxPragmaInfo.base; + return `${resolvedPragmaBaseName}${jsxPragmaInfo.suffix}(`; + } + } + + /** + * Return the code to use as the component when compiling a shorthand + * fragment, e.g. `React.Fragment`. + * + * This may be called from either the classic or automatic runtime, and + * the value should be auto-imported for the automatic runtime. + */ + getFragmentCode() { + if (this.isAutomaticRuntime) { + return this.claimAutoImportedName( + "Fragment", + this.options.production ? "/jsx-runtime" : "/jsx-dev-runtime", + ); + } else { + const {jsxPragmaInfo} = this; + const resolvedFragmentPragmaBaseName = this.importProcessor + ? this.importProcessor.getIdentifierReplacement(jsxPragmaInfo.fragmentBase) || + jsxPragmaInfo.fragmentBase + : jsxPragmaInfo.fragmentBase; + return resolvedFragmentPragmaBaseName + jsxPragmaInfo.fragmentSuffix; + } + } + + /** + * Return code that invokes the given function. + * + * When the imports transform is enabled, use the CJSImportTransformer + * strategy of using `.call(void 0, ...` to avoid passing a `this` value in a + * situation that would otherwise look like a method call. + */ + claimAutoImportedFuncInvocation(funcName, importPathSuffix) { + const funcCode = this.claimAutoImportedName(funcName, importPathSuffix); + if (this.importProcessor) { + return `${funcCode}.call(void 0, `; + } else { + return `${funcCode}(`; + } + } + + claimAutoImportedName(funcName, importPathSuffix) { + if (this.importProcessor) { + // CJS mode: claim a name for the module and mark it for import. + const path = this.jsxImportSource + importPathSuffix; + if (!this.cjsAutomaticModuleNameResolutions[path]) { + this.cjsAutomaticModuleNameResolutions[path] = + this.importProcessor.getFreeIdentifierForPath(path); + } + return `${this.cjsAutomaticModuleNameResolutions[path]}.${funcName}`; + } else { + // ESM mode: claim a name for this function and add it to the names that + // should be auto-imported when the prefix is generated. + if (!this.esmAutomaticImportNameResolutions[funcName]) { + this.esmAutomaticImportNameResolutions[funcName] = this.nameManager.claimFreeName( + `_${funcName}`, + ); + } + return this.esmAutomaticImportNameResolutions[funcName]; + } + } + + /** + * Process the first part of a tag, before any props. + */ + processTagIntro() { + // Walk forward until we see one of these patterns: + // jsxName to start the first prop, preceded by another jsxName to end the tag name. + // jsxName to start the first prop, preceded by greaterThan to end the type argument. + // [open brace] to start the first prop. + // [jsxTagEnd] to end the open-tag. + // [slash, jsxTagEnd] to end the self-closing tag. + let introEnd = this.tokens.currentIndex() + 1; + while ( + this.tokens.tokens[introEnd].isType || + (!this.tokens.matches2AtIndex(introEnd - 1, _types.TokenType.jsxName, _types.TokenType.jsxName) && + !this.tokens.matches2AtIndex(introEnd - 1, _types.TokenType.greaterThan, _types.TokenType.jsxName) && + !this.tokens.matches1AtIndex(introEnd, _types.TokenType.braceL) && + !this.tokens.matches1AtIndex(introEnd, _types.TokenType.jsxTagEnd) && + !this.tokens.matches2AtIndex(introEnd, _types.TokenType.slash, _types.TokenType.jsxTagEnd)) + ) { + introEnd++; + } + if (introEnd === this.tokens.currentIndex() + 1) { + const tagName = this.tokens.identifierName(); + if (startsWithLowerCase(tagName)) { + this.tokens.replaceToken(`'${tagName}'`); + } + } + while (this.tokens.currentIndex() < introEnd) { + this.rootTransformer.processToken(); + } + } + + /** + * Starting at the beginning of the props, add the props argument to + * React.createElement, including the comma before it. + */ + processPropsObjectWithDevInfo(elementLocationCode) { + const devProps = this.options.production + ? "" + : `__self: this, __source: ${this.getDevSource(elementLocationCode)}`; + if (!this.tokens.matches1(_types.TokenType.jsxName) && !this.tokens.matches1(_types.TokenType.braceL)) { + if (devProps) { + this.tokens.appendCode(`, {${devProps}}`); + } else { + this.tokens.appendCode(`, null`); + } + return; + } + this.tokens.appendCode(`, {`); + this.processProps(false); + if (devProps) { + this.tokens.appendCode(` ${devProps}}`); + } else { + this.tokens.appendCode("}"); + } + } + + /** + * Transform the core part of the props, assuming that a { has already been + * inserted before us and that a } will be inserted after us. + * + * If extractKeyCode is true (i.e. when using any jsx... function), any prop + * named "key" has its code captured and returned rather than being emitted to + * the output code. This shifts line numbers, and emitting the code later will + * correct line numbers again. If no key is found or if extractKeyCode is + * false, this function returns null. + */ + processProps(extractKeyCode) { + let keyCode = null; + while (true) { + if (this.tokens.matches2(_types.TokenType.jsxName, _types.TokenType.eq)) { + // This is a regular key={value} or key="value" prop. + const propName = this.tokens.identifierName(); + if (extractKeyCode && propName === "key") { + if (keyCode !== null) { + // The props list has multiple keys. Different implementations are + // inconsistent about what to do here: as of this writing, Babel and + // swc keep the *last* key and completely remove the rest, while + // TypeScript uses the *first* key and leaves the others as regular + // props. The React team collaborated with Babel on the + // implementation of this behavior, so presumably the Babel behavior + // is the one to use. + // Since we won't ever be emitting the previous key code, we need to + // at least emit its newlines here so that the line numbers match up + // in the long run. + this.tokens.appendCode(keyCode.replace(/[^\n]/g, "")); + } + // key + this.tokens.removeToken(); + // = + this.tokens.removeToken(); + const snapshot = this.tokens.snapshot(); + this.processPropValue(); + keyCode = this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(snapshot); + // Don't add a comma + continue; + } else { + this.processPropName(propName); + this.tokens.replaceToken(": "); + this.processPropValue(); + } + } else if (this.tokens.matches1(_types.TokenType.jsxName)) { + // This is a shorthand prop like . + const propName = this.tokens.identifierName(); + this.processPropName(propName); + this.tokens.appendCode(": true"); + } else if (this.tokens.matches1(_types.TokenType.braceL)) { + // This is prop spread, like
, which we can pass + // through fairly directly as an object spread. + this.tokens.replaceToken(""); + this.rootTransformer.processBalancedCode(); + this.tokens.replaceToken(""); + } else { + break; + } + this.tokens.appendCode(","); + } + return keyCode; + } + + processPropName(propName) { + if (propName.includes("-")) { + this.tokens.replaceToken(`'${propName}'`); + } else { + this.tokens.copyToken(); + } + } + + processPropValue() { + if (this.tokens.matches1(_types.TokenType.braceL)) { + this.tokens.replaceToken(""); + this.rootTransformer.processBalancedCode(); + this.tokens.replaceToken(""); + } else if (this.tokens.matches1(_types.TokenType.jsxTagStart)) { + this.processJSXTag(); + } else { + this.processStringPropValue(); + } + } + + processStringPropValue() { + const token = this.tokens.currentToken(); + const valueCode = this.tokens.code.slice(token.start + 1, token.end - 1); + const replacementCode = formatJSXTextReplacement(valueCode); + const literalCode = formatJSXStringValueLiteral(valueCode); + this.tokens.replaceToken(literalCode + replacementCode); + } + + /** + * Starting in the middle of the props object literal, produce an additional + * prop for the children and close the object literal. + */ + processAutomaticChildrenAndEndProps(jsxRole) { + if (jsxRole === _tokenizer.JSXRole.StaticChildren) { + this.tokens.appendCode(" children: ["); + this.processChildren(false); + this.tokens.appendCode("]}"); + } else { + // The parser information tells us whether we will see a real child or if + // all remaining children (if any) will resolve to empty. If there are no + // non-empty children, don't emit a children prop at all, but still + // process children so that we properly transform the code into nothing. + if (jsxRole === _tokenizer.JSXRole.OneChild) { + this.tokens.appendCode(" children: "); + } + this.processChildren(false); + this.tokens.appendCode("}"); + } + } + + /** + * Transform children into a comma-separated list, which will be either + * arguments to createElement or array elements of a children prop. + */ + processChildren(needsInitialComma) { + let needsComma = needsInitialComma; + while (true) { + if (this.tokens.matches2(_types.TokenType.jsxTagStart, _types.TokenType.slash)) { + // Closing tag, so no more children. + return; + } + let didEmitElement = false; + if (this.tokens.matches1(_types.TokenType.braceL)) { + if (this.tokens.matches2(_types.TokenType.braceL, _types.TokenType.braceR)) { + // Empty interpolations and comment-only interpolations are allowed + // and don't create an extra child arg. + this.tokens.replaceToken(""); + this.tokens.replaceToken(""); + } else { + // Interpolated expression. + this.tokens.replaceToken(needsComma ? ", " : ""); + this.rootTransformer.processBalancedCode(); + this.tokens.replaceToken(""); + didEmitElement = true; + } + } else if (this.tokens.matches1(_types.TokenType.jsxTagStart)) { + // Child JSX element + this.tokens.appendCode(needsComma ? ", " : ""); + this.processJSXTag(); + didEmitElement = true; + } else if (this.tokens.matches1(_types.TokenType.jsxText) || this.tokens.matches1(_types.TokenType.jsxEmptyText)) { + didEmitElement = this.processChildTextElement(needsComma); + } else { + throw new Error("Unexpected token when processing JSX children."); + } + if (didEmitElement) { + needsComma = true; + } + } + } + + /** + * Turn a JSX text element into a string literal, or nothing at all if the JSX + * text resolves to the empty string. + * + * Returns true if a string literal is emitted, false otherwise. + */ + processChildTextElement(needsComma) { + const token = this.tokens.currentToken(); + const valueCode = this.tokens.code.slice(token.start, token.end); + const replacementCode = formatJSXTextReplacement(valueCode); + const literalCode = formatJSXTextLiteral(valueCode); + if (literalCode === '""') { + this.tokens.replaceToken(replacementCode); + return false; + } else { + this.tokens.replaceToken(`${needsComma ? ", " : ""}${literalCode}${replacementCode}`); + return true; + } + } + + getDevSource(elementLocationCode) { + return `{fileName: ${this.getFilenameVarName()}, ${elementLocationCode}}`; + } + + getFilenameVarName() { + if (!this.filenameVarName) { + this.filenameVarName = this.nameManager.claimFreeName("_jsxFileName"); + } + return this.filenameVarName; + } +} exports.default = JSXTransformer; + +/** + * Spec for identifiers: https://tc39.github.io/ecma262/#prod-IdentifierStart. + * + * Really only treat anything starting with a-z as tag names. `_`, `$`, `é` + * should be treated as component names + */ + function startsWithLowerCase(s) { + const firstChar = s.charCodeAt(0); + return firstChar >= _charcodes.charCodes.lowercaseA && firstChar <= _charcodes.charCodes.lowercaseZ; +} exports.startsWithLowerCase = startsWithLowerCase; + +/** + * Turn the given jsxText string into a JS string literal. Leading and trailing + * whitespace on lines is removed, except immediately after the open-tag and + * before the close-tag. Empty lines are completely removed, and spaces are + * added between lines after that. + * + * We use JSON.stringify to introduce escape characters as necessary, and trim + * the start and end of each line and remove blank lines. + */ +function formatJSXTextLiteral(text) { + let result = ""; + let whitespace = ""; + + let isInInitialLineWhitespace = false; + let seenNonWhitespace = false; + for (let i = 0; i < text.length; i++) { + const c = text[i]; + if (c === " " || c === "\t" || c === "\r") { + if (!isInInitialLineWhitespace) { + whitespace += c; + } + } else if (c === "\n") { + whitespace = ""; + isInInitialLineWhitespace = true; + } else { + if (seenNonWhitespace && isInInitialLineWhitespace) { + result += " "; + } + result += whitespace; + whitespace = ""; + if (c === "&") { + const {entity, newI} = processEntity(text, i + 1); + i = newI - 1; + result += entity; + } else { + result += c; + } + seenNonWhitespace = true; + isInInitialLineWhitespace = false; + } + } + if (!isInInitialLineWhitespace) { + result += whitespace; + } + return JSON.stringify(result); +} + +/** + * Produce the code that should be printed after the JSX text string literal, + * with most content removed, but all newlines preserved and all spacing at the + * end preserved. + */ +function formatJSXTextReplacement(text) { + let numNewlines = 0; + let numSpaces = 0; + for (const c of text) { + if (c === "\n") { + numNewlines++; + numSpaces = 0; + } else if (c === " ") { + numSpaces++; + } + } + return "\n".repeat(numNewlines) + " ".repeat(numSpaces); +} + +/** + * Format a string in the value position of a JSX prop. + * + * Use the same implementation as convertAttribute from + * babel-helper-builder-react-jsx. + */ +function formatJSXStringValueLiteral(text) { + let result = ""; + for (let i = 0; i < text.length; i++) { + const c = text[i]; + if (c === "\n") { + if (/\s/.test(text[i + 1])) { + result += " "; + while (i < text.length && /\s/.test(text[i + 1])) { + i++; + } + } else { + result += "\n"; + } + } else if (c === "&") { + const {entity, newI} = processEntity(text, i + 1); + result += entity; + i = newI - 1; + } else { + result += c; + } + } + return JSON.stringify(result); +} + +/** + * Starting at a &, see if there's an HTML entity (specified by name, decimal + * char code, or hex char code) and return it if so. + * + * Modified from jsxReadString in babel-parser. + */ +function processEntity(text, indexAfterAmpersand) { + let str = ""; + let count = 0; + let entity; + let i = indexAfterAmpersand; + + if (text[i] === "#") { + let radix = 10; + i++; + let numStart; + if (text[i] === "x") { + radix = 16; + i++; + numStart = i; + while (i < text.length && isHexDigit(text.charCodeAt(i))) { + i++; + } + } else { + numStart = i; + while (i < text.length && isDecimalDigit(text.charCodeAt(i))) { + i++; + } + } + if (text[i] === ";") { + const numStr = text.slice(numStart, i); + if (numStr) { + i++; + entity = String.fromCodePoint(parseInt(numStr, radix)); + } + } + } else { + while (i < text.length && count++ < 10) { + const ch = text[i]; + i++; + if (ch === ";") { + entity = _xhtml2.default.get(str); + break; + } + str += ch; + } + } + + if (!entity) { + return {entity: "&", newI: indexAfterAmpersand}; + } + return {entity, newI: i}; +} + +function isDecimalDigit(code) { + return code >= _charcodes.charCodes.digit0 && code <= _charcodes.charCodes.digit9; +} + +function isHexDigit(code) { + return ( + (code >= _charcodes.charCodes.digit0 && code <= _charcodes.charCodes.digit9) || + (code >= _charcodes.charCodes.lowercaseA && code <= _charcodes.charCodes.lowercaseF) || + (code >= _charcodes.charCodes.uppercaseA && code <= _charcodes.charCodes.uppercaseF) + ); +} diff --git a/node_modules/sucrase/dist/transformers/JestHoistTransformer.js b/node_modules/sucrase/dist/transformers/JestHoistTransformer.js new file mode 100644 index 0000000..fb7f0fd --- /dev/null +++ b/node_modules/sucrase/dist/transformers/JestHoistTransformer.js @@ -0,0 +1,111 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } + +var _types = require('../parser/tokenizer/types'); + + +var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer); + +const JEST_GLOBAL_NAME = "jest"; +const HOISTED_METHODS = ["mock", "unmock", "enableAutomock", "disableAutomock"]; + +/** + * Implementation of babel-plugin-jest-hoist, which hoists up some jest method + * calls above the imports to allow them to override other imports. + * + * To preserve line numbers, rather than directly moving the jest.mock code, we + * wrap each invocation in a function statement and then call the function from + * the top of the file. + */ + class JestHoistTransformer extends _Transformer2.default { + __init() {this.hoistedFunctionNames = []} + + constructor( + rootTransformer, + tokens, + nameManager, + importProcessor, + ) { + super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.nameManager = nameManager;this.importProcessor = importProcessor;JestHoistTransformer.prototype.__init.call(this);; + } + + process() { + if ( + this.tokens.currentToken().scopeDepth === 0 && + this.tokens.matches4(_types.TokenType.name, _types.TokenType.dot, _types.TokenType.name, _types.TokenType.parenL) && + this.tokens.identifierName() === JEST_GLOBAL_NAME + ) { + // TODO: This only works if imports transform is active, which it will be for jest. + // But if jest adds module support and we no longer need the import transform, this needs fixing. + if (_optionalChain([this, 'access', _ => _.importProcessor, 'optionalAccess', _2 => _2.getGlobalNames, 'call', _3 => _3(), 'optionalAccess', _4 => _4.has, 'call', _5 => _5(JEST_GLOBAL_NAME)])) { + return false; + } + return this.extractHoistedCalls(); + } + + return false; + } + + getHoistedCode() { + if (this.hoistedFunctionNames.length > 0) { + // This will be placed before module interop code, but that's fine since + // imports aren't allowed in module mock factories. + return this.hoistedFunctionNames.map((name) => `${name}();`).join(""); + } + return ""; + } + + /** + * Extracts any methods calls on the jest-object that should be hoisted. + * + * According to the jest docs, https://jestjs.io/docs/en/jest-object#jestmockmodulename-factory-options, + * mock, unmock, enableAutomock, disableAutomock, are the methods that should be hoisted. + * + * We do not apply the same checks of the arguments as babel-plugin-jest-hoist does. + */ + extractHoistedCalls() { + // We're handling a chain of calls where `jest` may or may not need to be inserted for each call + // in the chain, so remove the initial `jest` to make the loop implementation cleaner. + this.tokens.removeToken(); + // Track some state so that multiple non-hoisted chained calls in a row keep their chaining + // syntax. + let followsNonHoistedJestCall = false; + + // Iterate through all chained calls on the jest object. + while (this.tokens.matches3(_types.TokenType.dot, _types.TokenType.name, _types.TokenType.parenL)) { + const methodName = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1); + const shouldHoist = HOISTED_METHODS.includes(methodName); + if (shouldHoist) { + // We've matched e.g. `.mock(...)` or similar call. + // Replace the initial `.` with `function __jestHoist(){jest.` + const hoistedFunctionName = this.nameManager.claimFreeName("__jestHoist"); + this.hoistedFunctionNames.push(hoistedFunctionName); + this.tokens.replaceToken(`function ${hoistedFunctionName}(){${JEST_GLOBAL_NAME}.`); + this.tokens.copyToken(); + this.tokens.copyToken(); + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(_types.TokenType.parenR); + this.tokens.appendCode(";}"); + followsNonHoistedJestCall = false; + } else { + // This is a non-hoisted method, so just transform the code as usual. + if (followsNonHoistedJestCall) { + // If we didn't hoist the previous call, we can leave the code as-is to chain off of the + // previous method call. It's important to preserve the code here because we don't know + // for sure that the method actually returned the jest object for chaining. + this.tokens.copyToken(); + } else { + // If we hoisted the previous call, we know it returns the jest object back, so we insert + // the identifier `jest` to continue the chain. + this.tokens.replaceToken(`${JEST_GLOBAL_NAME}.`); + } + this.tokens.copyToken(); + this.tokens.copyToken(); + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(_types.TokenType.parenR); + followsNonHoistedJestCall = true; + } + } + + return true; + } +} exports.default = JestHoistTransformer; diff --git a/node_modules/sucrase/dist/transformers/NumericSeparatorTransformer.js b/node_modules/sucrase/dist/transformers/NumericSeparatorTransformer.js new file mode 100644 index 0000000..7a30f09 --- /dev/null +++ b/node_modules/sucrase/dist/transformers/NumericSeparatorTransformer.js @@ -0,0 +1,20 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _types = require('../parser/tokenizer/types'); + +var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer); + + class NumericSeparatorTransformer extends _Transformer2.default { + constructor( tokens) { + super();this.tokens = tokens;; + } + + process() { + if (this.tokens.matches1(_types.TokenType.num)) { + const code = this.tokens.currentTokenCode(); + if (code.includes("_")) { + this.tokens.replaceToken(code.replace(/_/g, "")); + return true; + } + } + return false; + } +} exports.default = NumericSeparatorTransformer; diff --git a/node_modules/sucrase/dist/transformers/OptionalCatchBindingTransformer.js b/node_modules/sucrase/dist/transformers/OptionalCatchBindingTransformer.js new file mode 100644 index 0000000..79ae8bc --- /dev/null +++ b/node_modules/sucrase/dist/transformers/OptionalCatchBindingTransformer.js @@ -0,0 +1,19 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _types = require('../parser/tokenizer/types'); + +var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer); + + class OptionalCatchBindingTransformer extends _Transformer2.default { + constructor( tokens, nameManager) { + super();this.tokens = tokens;this.nameManager = nameManager;; + } + + process() { + if (this.tokens.matches2(_types.TokenType._catch, _types.TokenType.braceL)) { + this.tokens.copyToken(); + this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`); + return true; + } + return false; + } +} exports.default = OptionalCatchBindingTransformer; diff --git a/node_modules/sucrase/dist/transformers/OptionalChainingNullishTransformer.js b/node_modules/sucrase/dist/transformers/OptionalChainingNullishTransformer.js new file mode 100644 index 0000000..3a68a0a --- /dev/null +++ b/node_modules/sucrase/dist/transformers/OptionalChainingNullishTransformer.js @@ -0,0 +1,155 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _types = require('../parser/tokenizer/types'); + +var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer); + +/** + * Transformer supporting the optional chaining and nullish coalescing operators. + * + * Tech plan here: + * https://github.com/alangpierce/sucrase/wiki/Sucrase-Optional-Chaining-and-Nullish-Coalescing-Technical-Plan + * + * The prefix and suffix code snippets are handled by TokenProcessor, and this transformer handles + * the operators themselves. + */ + class OptionalChainingNullishTransformer extends _Transformer2.default { + constructor( tokens, nameManager) { + super();this.tokens = tokens;this.nameManager = nameManager;; + } + + process() { + if (this.tokens.matches1(_types.TokenType.nullishCoalescing)) { + const token = this.tokens.currentToken(); + if (this.tokens.tokens[token.nullishStartIndex].isAsyncOperation) { + this.tokens.replaceTokenTrimmingLeftWhitespace(", async () => ("); + } else { + this.tokens.replaceTokenTrimmingLeftWhitespace(", () => ("); + } + return true; + } + if (this.tokens.matches1(_types.TokenType._delete)) { + const nextToken = this.tokens.tokenAtRelativeIndex(1); + if (nextToken.isOptionalChainStart) { + this.tokens.removeInitialToken(); + return true; + } + } + const token = this.tokens.currentToken(); + const chainStart = token.subscriptStartIndex; + if ( + chainStart != null && + this.tokens.tokens[chainStart].isOptionalChainStart && + // Super subscripts can't be optional (since super is never null/undefined), and the syntax + // relies on the subscript being intact, so leave this token alone. + this.tokens.tokenAtRelativeIndex(-1).type !== _types.TokenType._super + ) { + const param = this.nameManager.claimFreeName("_"); + let arrowStartSnippet; + if ( + chainStart > 0 && + this.tokens.matches1AtIndex(chainStart - 1, _types.TokenType._delete) && + this.isLastSubscriptInChain() + ) { + // Delete operations are special: we already removed the delete keyword, and to still + // perform a delete, we need to insert a delete in the very last part of the chain, which + // in correct code will always be a property access. + arrowStartSnippet = `${param} => delete ${param}`; + } else { + arrowStartSnippet = `${param} => ${param}`; + } + if (this.tokens.tokens[chainStart].isAsyncOperation) { + arrowStartSnippet = `async ${arrowStartSnippet}`; + } + if ( + this.tokens.matches2(_types.TokenType.questionDot, _types.TokenType.parenL) || + this.tokens.matches2(_types.TokenType.questionDot, _types.TokenType.lessThan) + ) { + if (this.justSkippedSuper()) { + this.tokens.appendCode(".bind(this)"); + } + this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalCall', ${arrowStartSnippet}`); + } else if (this.tokens.matches2(_types.TokenType.questionDot, _types.TokenType.bracketL)) { + this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${arrowStartSnippet}`); + } else if (this.tokens.matches1(_types.TokenType.questionDot)) { + this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${arrowStartSnippet}.`); + } else if (this.tokens.matches1(_types.TokenType.dot)) { + this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${arrowStartSnippet}.`); + } else if (this.tokens.matches1(_types.TokenType.bracketL)) { + this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${arrowStartSnippet}[`); + } else if (this.tokens.matches1(_types.TokenType.parenL)) { + if (this.justSkippedSuper()) { + this.tokens.appendCode(".bind(this)"); + } + this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${arrowStartSnippet}(`); + } else { + throw new Error("Unexpected subscript operator in optional chain."); + } + return true; + } + return false; + } + + /** + * Determine if the current token is the last of its chain, so that we know whether it's eligible + * to have a delete op inserted. + * + * We can do this by walking forward until we determine one way or another. Each + * isOptionalChainStart token must be paired with exactly one isOptionalChainEnd token after it in + * a nesting way, so we can track depth and walk to the end of the chain (the point where the + * depth goes negative) and see if any other subscript token is after us in the chain. + */ + isLastSubscriptInChain() { + let depth = 0; + for (let i = this.tokens.currentIndex() + 1; ; i++) { + if (i >= this.tokens.tokens.length) { + throw new Error("Reached the end of the code while finding the end of the access chain."); + } + if (this.tokens.tokens[i].isOptionalChainStart) { + depth++; + } else if (this.tokens.tokens[i].isOptionalChainEnd) { + depth--; + } + if (depth < 0) { + return true; + } + + // This subscript token is a later one in the same chain. + if (depth === 0 && this.tokens.tokens[i].subscriptStartIndex != null) { + return false; + } + } + } + + /** + * Determine if we are the open-paren in an expression like super.a()?.b. + * + * We can do this by walking backward to find the previous subscript. If that subscript was + * preceded by a super, then we must be the subscript after it, so if this is a call expression, + * we'll need to attach the right context. + */ + justSkippedSuper() { + let depth = 0; + let index = this.tokens.currentIndex() - 1; + while (true) { + if (index < 0) { + throw new Error( + "Reached the start of the code while finding the start of the access chain.", + ); + } + if (this.tokens.tokens[index].isOptionalChainStart) { + depth--; + } else if (this.tokens.tokens[index].isOptionalChainEnd) { + depth++; + } + if (depth < 0) { + return false; + } + + // This subscript token is a later one in the same chain. + if (depth === 0 && this.tokens.tokens[index].subscriptStartIndex != null) { + return this.tokens.tokens[index - 1].type === _types.TokenType._super; + } + index--; + } + } +} exports.default = OptionalChainingNullishTransformer; diff --git a/node_modules/sucrase/dist/transformers/ReactDisplayNameTransformer.js b/node_modules/sucrase/dist/transformers/ReactDisplayNameTransformer.js new file mode 100644 index 0000000..faf6f65 --- /dev/null +++ b/node_modules/sucrase/dist/transformers/ReactDisplayNameTransformer.js @@ -0,0 +1,160 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _tokenizer = require('../parser/tokenizer'); +var _types = require('../parser/tokenizer/types'); + + +var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer); + +/** + * Implementation of babel-plugin-transform-react-display-name, which adds a + * display name to usages of React.createClass and createReactClass. + */ + class ReactDisplayNameTransformer extends _Transformer2.default { + constructor( + rootTransformer, + tokens, + importProcessor, + options, + ) { + super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.importProcessor = importProcessor;this.options = options;; + } + + process() { + const startIndex = this.tokens.currentIndex(); + if (this.tokens.identifierName() === "createReactClass") { + const newName = + this.importProcessor && this.importProcessor.getIdentifierReplacement("createReactClass"); + if (newName) { + this.tokens.replaceToken(`(0, ${newName})`); + } else { + this.tokens.copyToken(); + } + this.tryProcessCreateClassCall(startIndex); + return true; + } + if ( + this.tokens.matches3(_types.TokenType.name, _types.TokenType.dot, _types.TokenType.name) && + this.tokens.identifierName() === "React" && + this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 2) === "createClass" + ) { + const newName = this.importProcessor + ? this.importProcessor.getIdentifierReplacement("React") || "React" + : "React"; + if (newName) { + this.tokens.replaceToken(newName); + this.tokens.copyToken(); + this.tokens.copyToken(); + } else { + this.tokens.copyToken(); + this.tokens.copyToken(); + this.tokens.copyToken(); + } + this.tryProcessCreateClassCall(startIndex); + return true; + } + return false; + } + + /** + * This is called with the token position at the open-paren. + */ + tryProcessCreateClassCall(startIndex) { + const displayName = this.findDisplayName(startIndex); + if (!displayName) { + return; + } + + if (this.classNeedsDisplayName()) { + this.tokens.copyExpectedToken(_types.TokenType.parenL); + this.tokens.copyExpectedToken(_types.TokenType.braceL); + this.tokens.appendCode(`displayName: '${displayName}',`); + this.rootTransformer.processBalancedCode(); + this.tokens.copyExpectedToken(_types.TokenType.braceR); + this.tokens.copyExpectedToken(_types.TokenType.parenR); + } + } + + findDisplayName(startIndex) { + if (startIndex < 2) { + return null; + } + if (this.tokens.matches2AtIndex(startIndex - 2, _types.TokenType.name, _types.TokenType.eq)) { + // This is an assignment (or declaration) and the LHS is either an identifier or a member + // expression ending in an identifier, so use that identifier name. + return this.tokens.identifierNameAtIndex(startIndex - 2); + } + if ( + startIndex >= 2 && + this.tokens.tokens[startIndex - 2].identifierRole === _tokenizer.IdentifierRole.ObjectKey + ) { + // This is an object literal value. + return this.tokens.identifierNameAtIndex(startIndex - 2); + } + if (this.tokens.matches2AtIndex(startIndex - 2, _types.TokenType._export, _types.TokenType._default)) { + return this.getDisplayNameFromFilename(); + } + return null; + } + + getDisplayNameFromFilename() { + const filePath = this.options.filePath || "unknown"; + const pathSegments = filePath.split("/"); + const filename = pathSegments[pathSegments.length - 1]; + const dotIndex = filename.lastIndexOf("."); + const baseFilename = dotIndex === -1 ? filename : filename.slice(0, dotIndex); + if (baseFilename === "index" && pathSegments[pathSegments.length - 2]) { + return pathSegments[pathSegments.length - 2]; + } else { + return baseFilename; + } + } + + /** + * We only want to add a display name when this is a function call containing + * one argument, which is an object literal without `displayName` as an + * existing key. + */ + classNeedsDisplayName() { + let index = this.tokens.currentIndex(); + if (!this.tokens.matches2(_types.TokenType.parenL, _types.TokenType.braceL)) { + return false; + } + // The block starts on the {, and we expect any displayName key to be in + // that context. We need to ignore other other contexts to avoid matching + // nested displayName keys. + const objectStartIndex = index + 1; + const objectContextId = this.tokens.tokens[objectStartIndex].contextId; + if (objectContextId == null) { + throw new Error("Expected non-null context ID on object open-brace."); + } + + for (; index < this.tokens.tokens.length; index++) { + const token = this.tokens.tokens[index]; + if (token.type === _types.TokenType.braceR && token.contextId === objectContextId) { + index++; + break; + } + + if ( + this.tokens.identifierNameAtIndex(index) === "displayName" && + this.tokens.tokens[index].identifierRole === _tokenizer.IdentifierRole.ObjectKey && + token.contextId === objectContextId + ) { + // We found a displayName key, so bail out. + return false; + } + } + + if (index === this.tokens.tokens.length) { + throw new Error("Unexpected end of input when processing React class."); + } + + // If we got this far, we know we have createClass with an object with no + // display name, so we want to proceed as long as that was the only argument. + return ( + this.tokens.matches1AtIndex(index, _types.TokenType.parenR) || + this.tokens.matches2AtIndex(index, _types.TokenType.comma, _types.TokenType.parenR) + ); + } +} exports.default = ReactDisplayNameTransformer; diff --git a/node_modules/sucrase/dist/transformers/ReactHotLoaderTransformer.js b/node_modules/sucrase/dist/transformers/ReactHotLoaderTransformer.js new file mode 100644 index 0000000..3657c49 --- /dev/null +++ b/node_modules/sucrase/dist/transformers/ReactHotLoaderTransformer.js @@ -0,0 +1,69 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _tokenizer = require('../parser/tokenizer'); + +var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer); + + class ReactHotLoaderTransformer extends _Transformer2.default { + __init() {this.extractedDefaultExportName = null} + + constructor( tokens, filePath) { + super();this.tokens = tokens;this.filePath = filePath;ReactHotLoaderTransformer.prototype.__init.call(this);; + } + + setExtractedDefaultExportName(extractedDefaultExportName) { + this.extractedDefaultExportName = extractedDefaultExportName; + } + + getPrefixCode() { + return ` + (function () { + var enterModule = require('react-hot-loader').enterModule; + enterModule && enterModule(module); + })();` + .replace(/\s+/g, " ") + .trim(); + } + + getSuffixCode() { + const topLevelNames = new Set(); + for (const token of this.tokens.tokens) { + if ( + !token.isType && + _tokenizer.isTopLevelDeclaration.call(void 0, token) && + token.identifierRole !== _tokenizer.IdentifierRole.ImportDeclaration + ) { + topLevelNames.add(this.tokens.identifierNameForToken(token)); + } + } + const namesToRegister = Array.from(topLevelNames).map((name) => ({ + variableName: name, + uniqueLocalName: name, + })); + if (this.extractedDefaultExportName) { + namesToRegister.push({ + variableName: this.extractedDefaultExportName, + uniqueLocalName: "default", + }); + } + return ` +;(function () { + var reactHotLoader = require('react-hot-loader').default; + var leaveModule = require('react-hot-loader').leaveModule; + if (!reactHotLoader) { + return; + } +${namesToRegister + .map( + ({variableName, uniqueLocalName}) => + ` reactHotLoader.register(${variableName}, "${uniqueLocalName}", ${JSON.stringify( + this.filePath || "", + )});`, + ) + .join("\n")} + leaveModule(module); +})();`; + } + + process() { + return false; + } +} exports.default = ReactHotLoaderTransformer; diff --git a/node_modules/sucrase/dist/transformers/RootTransformer.js b/node_modules/sucrase/dist/transformers/RootTransformer.js new file mode 100644 index 0000000..70b33c8 --- /dev/null +++ b/node_modules/sucrase/dist/transformers/RootTransformer.js @@ -0,0 +1,462 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + +var _keywords = require('../parser/tokenizer/keywords'); +var _types = require('../parser/tokenizer/types'); + +var _getClassInfo = require('../util/getClassInfo'); var _getClassInfo2 = _interopRequireDefault(_getClassInfo); +var _CJSImportTransformer = require('./CJSImportTransformer'); var _CJSImportTransformer2 = _interopRequireDefault(_CJSImportTransformer); +var _ESMImportTransformer = require('./ESMImportTransformer'); var _ESMImportTransformer2 = _interopRequireDefault(_ESMImportTransformer); +var _FlowTransformer = require('./FlowTransformer'); var _FlowTransformer2 = _interopRequireDefault(_FlowTransformer); +var _JestHoistTransformer = require('./JestHoistTransformer'); var _JestHoistTransformer2 = _interopRequireDefault(_JestHoistTransformer); +var _JSXTransformer = require('./JSXTransformer'); var _JSXTransformer2 = _interopRequireDefault(_JSXTransformer); +var _NumericSeparatorTransformer = require('./NumericSeparatorTransformer'); var _NumericSeparatorTransformer2 = _interopRequireDefault(_NumericSeparatorTransformer); +var _OptionalCatchBindingTransformer = require('./OptionalCatchBindingTransformer'); var _OptionalCatchBindingTransformer2 = _interopRequireDefault(_OptionalCatchBindingTransformer); +var _OptionalChainingNullishTransformer = require('./OptionalChainingNullishTransformer'); var _OptionalChainingNullishTransformer2 = _interopRequireDefault(_OptionalChainingNullishTransformer); +var _ReactDisplayNameTransformer = require('./ReactDisplayNameTransformer'); var _ReactDisplayNameTransformer2 = _interopRequireDefault(_ReactDisplayNameTransformer); +var _ReactHotLoaderTransformer = require('./ReactHotLoaderTransformer'); var _ReactHotLoaderTransformer2 = _interopRequireDefault(_ReactHotLoaderTransformer); + +var _TypeScriptTransformer = require('./TypeScriptTransformer'); var _TypeScriptTransformer2 = _interopRequireDefault(_TypeScriptTransformer); + + + + + + + + + class RootTransformer { + __init() {this.transformers = []} + + + __init2() {this.generatedVariables = []} + + + + + + constructor( + sucraseContext, + transforms, + enableLegacyBabel5ModuleInterop, + options, + ) {;RootTransformer.prototype.__init.call(this);RootTransformer.prototype.__init2.call(this); + this.nameManager = sucraseContext.nameManager; + this.helperManager = sucraseContext.helperManager; + const {tokenProcessor, importProcessor} = sucraseContext; + this.tokens = tokenProcessor; + this.isImportsTransformEnabled = transforms.includes("imports"); + this.isReactHotLoaderTransformEnabled = transforms.includes("react-hot-loader"); + this.disableESTransforms = Boolean(options.disableESTransforms); + + if (!options.disableESTransforms) { + this.transformers.push( + new (0, _OptionalChainingNullishTransformer2.default)(tokenProcessor, this.nameManager), + ); + this.transformers.push(new (0, _NumericSeparatorTransformer2.default)(tokenProcessor)); + this.transformers.push(new (0, _OptionalCatchBindingTransformer2.default)(tokenProcessor, this.nameManager)); + } + + if (transforms.includes("jsx")) { + if (options.jsxRuntime !== "preserve") { + this.transformers.push( + new (0, _JSXTransformer2.default)(this, tokenProcessor, importProcessor, this.nameManager, options), + ); + } + this.transformers.push( + new (0, _ReactDisplayNameTransformer2.default)(this, tokenProcessor, importProcessor, options), + ); + } + + let reactHotLoaderTransformer = null; + if (transforms.includes("react-hot-loader")) { + if (!options.filePath) { + throw new Error("filePath is required when using the react-hot-loader transform."); + } + reactHotLoaderTransformer = new (0, _ReactHotLoaderTransformer2.default)(tokenProcessor, options.filePath); + this.transformers.push(reactHotLoaderTransformer); + } + + // Note that we always want to enable the imports transformer, even when the import transform + // itself isn't enabled, since we need to do type-only import pruning for both Flow and + // TypeScript. + if (transforms.includes("imports")) { + if (importProcessor === null) { + throw new Error("Expected non-null importProcessor with imports transform enabled."); + } + this.transformers.push( + new (0, _CJSImportTransformer2.default)( + this, + tokenProcessor, + importProcessor, + this.nameManager, + this.helperManager, + reactHotLoaderTransformer, + enableLegacyBabel5ModuleInterop, + Boolean(options.enableLegacyTypeScriptModuleInterop), + transforms.includes("typescript"), + transforms.includes("flow"), + Boolean(options.preserveDynamicImport), + Boolean(options.keepUnusedImports), + ), + ); + } else { + this.transformers.push( + new (0, _ESMImportTransformer2.default)( + tokenProcessor, + this.nameManager, + this.helperManager, + reactHotLoaderTransformer, + transforms.includes("typescript"), + transforms.includes("flow"), + Boolean(options.keepUnusedImports), + options, + ), + ); + } + + if (transforms.includes("flow")) { + this.transformers.push( + new (0, _FlowTransformer2.default)(this, tokenProcessor, transforms.includes("imports")), + ); + } + if (transforms.includes("typescript")) { + this.transformers.push( + new (0, _TypeScriptTransformer2.default)(this, tokenProcessor, transforms.includes("imports")), + ); + } + if (transforms.includes("jest")) { + this.transformers.push( + new (0, _JestHoistTransformer2.default)(this, tokenProcessor, this.nameManager, importProcessor), + ); + } + } + + transform() { + this.tokens.reset(); + this.processBalancedCode(); + const shouldAddUseStrict = this.isImportsTransformEnabled; + // "use strict" always needs to be first, so override the normal transformer order. + let prefix = shouldAddUseStrict ? '"use strict";' : ""; + for (const transformer of this.transformers) { + prefix += transformer.getPrefixCode(); + } + prefix += this.helperManager.emitHelpers(); + prefix += this.generatedVariables.map((v) => ` var ${v};`).join(""); + for (const transformer of this.transformers) { + prefix += transformer.getHoistedCode(); + } + let suffix = ""; + for (const transformer of this.transformers) { + suffix += transformer.getSuffixCode(); + } + const result = this.tokens.finish(); + let {code} = result; + if (code.startsWith("#!")) { + let newlineIndex = code.indexOf("\n"); + if (newlineIndex === -1) { + newlineIndex = code.length; + code += "\n"; + } + return { + code: code.slice(0, newlineIndex + 1) + prefix + code.slice(newlineIndex + 1) + suffix, + // The hashbang line has no tokens, so shifting the tokens to account + // for prefix can happen normally. + mappings: this.shiftMappings(result.mappings, prefix.length), + }; + } else { + return { + code: prefix + code + suffix, + mappings: this.shiftMappings(result.mappings, prefix.length), + }; + } + } + + processBalancedCode() { + let braceDepth = 0; + let parenDepth = 0; + while (!this.tokens.isAtEnd()) { + if (this.tokens.matches1(_types.TokenType.braceL) || this.tokens.matches1(_types.TokenType.dollarBraceL)) { + braceDepth++; + } else if (this.tokens.matches1(_types.TokenType.braceR)) { + if (braceDepth === 0) { + return; + } + braceDepth--; + } + if (this.tokens.matches1(_types.TokenType.parenL)) { + parenDepth++; + } else if (this.tokens.matches1(_types.TokenType.parenR)) { + if (parenDepth === 0) { + return; + } + parenDepth--; + } + this.processToken(); + } + } + + processToken() { + if (this.tokens.matches1(_types.TokenType._class)) { + this.processClass(); + return; + } + for (const transformer of this.transformers) { + const wasProcessed = transformer.process(); + if (wasProcessed) { + return; + } + } + this.tokens.copyToken(); + } + + /** + * Skip past a class with a name and return that name. + */ + processNamedClass() { + if (!this.tokens.matches2(_types.TokenType._class, _types.TokenType.name)) { + throw new Error("Expected identifier for exported class name."); + } + const name = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1); + this.processClass(); + return name; + } + + processClass() { + const classInfo = _getClassInfo2.default.call(void 0, this, this.tokens, this.nameManager, this.disableESTransforms); + + // Both static and instance initializers need a class name to use to invoke the initializer, so + // assign to one if necessary. + const needsCommaExpression = + (classInfo.headerInfo.isExpression || !classInfo.headerInfo.className) && + classInfo.staticInitializerNames.length + classInfo.instanceInitializerNames.length > 0; + + let className = classInfo.headerInfo.className; + if (needsCommaExpression) { + className = this.nameManager.claimFreeName("_class"); + this.generatedVariables.push(className); + this.tokens.appendCode(` (${className} =`); + } + + const classToken = this.tokens.currentToken(); + const contextId = classToken.contextId; + if (contextId == null) { + throw new Error("Expected class to have a context ID."); + } + this.tokens.copyExpectedToken(_types.TokenType._class); + while (!this.tokens.matchesContextIdAndLabel(_types.TokenType.braceL, contextId)) { + this.processToken(); + } + + this.processClassBody(classInfo, className); + + const staticInitializerStatements = classInfo.staticInitializerNames.map( + (name) => `${className}.${name}()`, + ); + if (needsCommaExpression) { + this.tokens.appendCode( + `, ${staticInitializerStatements.map((s) => `${s}, `).join("")}${className})`, + ); + } else if (classInfo.staticInitializerNames.length > 0) { + this.tokens.appendCode(` ${staticInitializerStatements.map((s) => `${s};`).join(" ")}`); + } + } + + /** + * We want to just handle class fields in all contexts, since TypeScript supports them. Later, + * when some JS implementations support class fields, this should be made optional. + */ + processClassBody(classInfo, className) { + const { + headerInfo, + constructorInsertPos, + constructorInitializerStatements, + fields, + instanceInitializerNames, + rangesToRemove, + } = classInfo; + let fieldIndex = 0; + let rangeToRemoveIndex = 0; + const classContextId = this.tokens.currentToken().contextId; + if (classContextId == null) { + throw new Error("Expected non-null context ID on class."); + } + this.tokens.copyExpectedToken(_types.TokenType.braceL); + if (this.isReactHotLoaderTransformEnabled) { + this.tokens.appendCode( + "__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}", + ); + } + + const needsConstructorInit = + constructorInitializerStatements.length + instanceInitializerNames.length > 0; + + if (constructorInsertPos === null && needsConstructorInit) { + const constructorInitializersCode = this.makeConstructorInitCode( + constructorInitializerStatements, + instanceInitializerNames, + className, + ); + if (headerInfo.hasSuperclass) { + const argsName = this.nameManager.claimFreeName("args"); + this.tokens.appendCode( + `constructor(...${argsName}) { super(...${argsName}); ${constructorInitializersCode}; }`, + ); + } else { + this.tokens.appendCode(`constructor() { ${constructorInitializersCode}; }`); + } + } + + while (!this.tokens.matchesContextIdAndLabel(_types.TokenType.braceR, classContextId)) { + if (fieldIndex < fields.length && this.tokens.currentIndex() === fields[fieldIndex].start) { + let needsCloseBrace = false; + if (this.tokens.matches1(_types.TokenType.bracketL)) { + this.tokens.copyTokenWithPrefix(`${fields[fieldIndex].initializerName}() {this`); + } else if (this.tokens.matches1(_types.TokenType.string) || this.tokens.matches1(_types.TokenType.num)) { + this.tokens.copyTokenWithPrefix(`${fields[fieldIndex].initializerName}() {this[`); + needsCloseBrace = true; + } else { + this.tokens.copyTokenWithPrefix(`${fields[fieldIndex].initializerName}() {this.`); + } + while (this.tokens.currentIndex() < fields[fieldIndex].end) { + if (needsCloseBrace && this.tokens.currentIndex() === fields[fieldIndex].equalsIndex) { + this.tokens.appendCode("]"); + } + this.processToken(); + } + this.tokens.appendCode("}"); + fieldIndex++; + } else if ( + rangeToRemoveIndex < rangesToRemove.length && + this.tokens.currentIndex() >= rangesToRemove[rangeToRemoveIndex].start + ) { + if (this.tokens.currentIndex() < rangesToRemove[rangeToRemoveIndex].end) { + this.tokens.removeInitialToken(); + } + while (this.tokens.currentIndex() < rangesToRemove[rangeToRemoveIndex].end) { + this.tokens.removeToken(); + } + rangeToRemoveIndex++; + } else if (this.tokens.currentIndex() === constructorInsertPos) { + this.tokens.copyToken(); + if (needsConstructorInit) { + this.tokens.appendCode( + `;${this.makeConstructorInitCode( + constructorInitializerStatements, + instanceInitializerNames, + className, + )};`, + ); + } + this.processToken(); + } else { + this.processToken(); + } + } + this.tokens.copyExpectedToken(_types.TokenType.braceR); + } + + makeConstructorInitCode( + constructorInitializerStatements, + instanceInitializerNames, + className, + ) { + return [ + ...constructorInitializerStatements, + ...instanceInitializerNames.map((name) => `${className}.prototype.${name}.call(this)`), + ].join(";"); + } + + /** + * Normally it's ok to simply remove type tokens, but we need to be more careful when dealing with + * arrow function return types since they can confuse the parser. In that case, we want to move + * the close-paren to the same line as the arrow. + * + * See https://github.com/alangpierce/sucrase/issues/391 for more details. + */ + processPossibleArrowParamEnd() { + if (this.tokens.matches2(_types.TokenType.parenR, _types.TokenType.colon) && this.tokens.tokenAtRelativeIndex(1).isType) { + let nextNonTypeIndex = this.tokens.currentIndex() + 1; + // Look ahead to see if this is an arrow function or something else. + while (this.tokens.tokens[nextNonTypeIndex].isType) { + nextNonTypeIndex++; + } + if (this.tokens.matches1AtIndex(nextNonTypeIndex, _types.TokenType.arrow)) { + this.tokens.removeInitialToken(); + while (this.tokens.currentIndex() < nextNonTypeIndex) { + this.tokens.removeToken(); + } + this.tokens.replaceTokenTrimmingLeftWhitespace(") =>"); + return true; + } + } + return false; + } + + /** + * An async arrow function might be of the form: + * + * async < + * T + * >() => {} + * + * in which case, removing the type parameters will cause a syntax error. Detect this case and + * move the open-paren earlier. + */ + processPossibleAsyncArrowWithTypeParams() { + if ( + !this.tokens.matchesContextual(_keywords.ContextualKeyword._async) && + !this.tokens.matches1(_types.TokenType._async) + ) { + return false; + } + const nextToken = this.tokens.tokenAtRelativeIndex(1); + if (nextToken.type !== _types.TokenType.lessThan || !nextToken.isType) { + return false; + } + + let nextNonTypeIndex = this.tokens.currentIndex() + 1; + // Look ahead to see if this is an arrow function or something else. + while (this.tokens.tokens[nextNonTypeIndex].isType) { + nextNonTypeIndex++; + } + if (this.tokens.matches1AtIndex(nextNonTypeIndex, _types.TokenType.parenL)) { + this.tokens.replaceToken("async ("); + this.tokens.removeInitialToken(); + while (this.tokens.currentIndex() < nextNonTypeIndex) { + this.tokens.removeToken(); + } + this.tokens.removeToken(); + // We ate a ( token, so we need to process the tokens in between and then the ) token so that + // we remain balanced. + this.processBalancedCode(); + this.processToken(); + return true; + } + return false; + } + + processPossibleTypeRange() { + if (this.tokens.currentToken().isType) { + this.tokens.removeInitialToken(); + while (this.tokens.currentToken().isType) { + this.tokens.removeToken(); + } + return true; + } + return false; + } + + shiftMappings( + mappings, + prefixLength, + ) { + for (let i = 0; i < mappings.length; i++) { + const mapping = mappings[i]; + if (mapping !== undefined) { + mappings[i] = mapping + prefixLength; + } + } + return mappings; + } +} exports.default = RootTransformer; diff --git a/node_modules/sucrase/dist/transformers/Transformer.js b/node_modules/sucrase/dist/transformers/Transformer.js new file mode 100644 index 0000000..991d363 --- /dev/null +++ b/node_modules/sucrase/dist/transformers/Transformer.js @@ -0,0 +1,16 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); class Transformer { + // Return true if anything was processed, false otherwise. + + + getPrefixCode() { + return ""; + } + + getHoistedCode() { + return ""; + } + + getSuffixCode() { + return ""; + } +} exports.default = Transformer; diff --git a/node_modules/sucrase/dist/transformers/TypeScriptTransformer.js b/node_modules/sucrase/dist/transformers/TypeScriptTransformer.js new file mode 100644 index 0000000..9fe5c6e --- /dev/null +++ b/node_modules/sucrase/dist/transformers/TypeScriptTransformer.js @@ -0,0 +1,279 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _types = require('../parser/tokenizer/types'); + +var _isIdentifier = require('../util/isIdentifier'); var _isIdentifier2 = _interopRequireDefault(_isIdentifier); + +var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer); + + class TypeScriptTransformer extends _Transformer2.default { + constructor( + rootTransformer, + tokens, + isImportsTransformEnabled, + ) { + super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.isImportsTransformEnabled = isImportsTransformEnabled;; + } + + process() { + if ( + this.rootTransformer.processPossibleArrowParamEnd() || + this.rootTransformer.processPossibleAsyncArrowWithTypeParams() || + this.rootTransformer.processPossibleTypeRange() + ) { + return true; + } + if ( + this.tokens.matches1(_types.TokenType._public) || + this.tokens.matches1(_types.TokenType._protected) || + this.tokens.matches1(_types.TokenType._private) || + this.tokens.matches1(_types.TokenType._abstract) || + this.tokens.matches1(_types.TokenType._readonly) || + this.tokens.matches1(_types.TokenType._override) || + this.tokens.matches1(_types.TokenType.nonNullAssertion) + ) { + this.tokens.removeInitialToken(); + return true; + } + if (this.tokens.matches1(_types.TokenType._enum) || this.tokens.matches2(_types.TokenType._const, _types.TokenType._enum)) { + this.processEnum(); + return true; + } + if ( + this.tokens.matches2(_types.TokenType._export, _types.TokenType._enum) || + this.tokens.matches3(_types.TokenType._export, _types.TokenType._const, _types.TokenType._enum) + ) { + this.processEnum(true); + return true; + } + return false; + } + + processEnum(isExport = false) { + // We might have "export const enum", so just remove all relevant tokens. + this.tokens.removeInitialToken(); + while (this.tokens.matches1(_types.TokenType._const) || this.tokens.matches1(_types.TokenType._enum)) { + this.tokens.removeToken(); + } + const enumName = this.tokens.identifierName(); + this.tokens.removeToken(); + if (isExport && !this.isImportsTransformEnabled) { + this.tokens.appendCode("export "); + } + this.tokens.appendCode(`var ${enumName}; (function (${enumName})`); + this.tokens.copyExpectedToken(_types.TokenType.braceL); + this.processEnumBody(enumName); + this.tokens.copyExpectedToken(_types.TokenType.braceR); + if (isExport && this.isImportsTransformEnabled) { + this.tokens.appendCode(`)(${enumName} || (exports.${enumName} = ${enumName} = {}));`); + } else { + this.tokens.appendCode(`)(${enumName} || (${enumName} = {}));`); + } + } + + /** + * Transform an enum into equivalent JS. This has complexity in a few places: + * - TS allows string enums, numeric enums, and a mix of the two styles within an enum. + * - Enum keys are allowed to be referenced in later enum values. + * - Enum keys are allowed to be strings. + * - When enum values are omitted, they should follow an auto-increment behavior. + */ + processEnumBody(enumName) { + // Code that can be used to reference the previous enum member, or null if this is the first + // enum member. + let previousValueCode = null; + while (true) { + if (this.tokens.matches1(_types.TokenType.braceR)) { + break; + } + const {nameStringCode, variableName} = this.extractEnumKeyInfo(this.tokens.currentToken()); + this.tokens.removeInitialToken(); + + if ( + this.tokens.matches3(_types.TokenType.eq, _types.TokenType.string, _types.TokenType.comma) || + this.tokens.matches3(_types.TokenType.eq, _types.TokenType.string, _types.TokenType.braceR) + ) { + this.processStringLiteralEnumMember(enumName, nameStringCode, variableName); + } else if (this.tokens.matches1(_types.TokenType.eq)) { + this.processExplicitValueEnumMember(enumName, nameStringCode, variableName); + } else { + this.processImplicitValueEnumMember( + enumName, + nameStringCode, + variableName, + previousValueCode, + ); + } + if (this.tokens.matches1(_types.TokenType.comma)) { + this.tokens.removeToken(); + } + + if (variableName != null) { + previousValueCode = variableName; + } else { + previousValueCode = `${enumName}[${nameStringCode}]`; + } + } + } + + /** + * Detect name information about this enum key, which will be used to determine which code to emit + * and whether we should declare a variable as part of this declaration. + * + * Some cases to keep in mind: + * - Enum keys can be implicitly referenced later, e.g. `X = 1, Y = X`. In Sucrase, we implement + * this by declaring a variable `X` so that later expressions can use it. + * - In addition to the usual identifier key syntax, enum keys are allowed to be string literals, + * e.g. `"hello world" = 3,`. Template literal syntax is NOT allowed. + * - Even if the enum key is defined as a string literal, it may still be referenced by identifier + * later, e.g. `"X" = 1, Y = X`. That means that we need to detect whether or not a string + * literal is identifier-like and emit a variable if so, even if the declaration did not use an + * identifier. + * - Reserved keywords like `break` are valid enum keys, but are not valid to be referenced later + * and would be a syntax error if we emitted a variable, so we need to skip the variable + * declaration in those cases. + * + * The variableName return value captures these nuances: if non-null, we can and must emit a + * variable declaration, and if null, we can't and shouldn't. + */ + extractEnumKeyInfo(nameToken) { + if (nameToken.type === _types.TokenType.name) { + const name = this.tokens.identifierNameForToken(nameToken); + return { + nameStringCode: `"${name}"`, + variableName: _isIdentifier2.default.call(void 0, name) ? name : null, + }; + } else if (nameToken.type === _types.TokenType.string) { + const name = this.tokens.stringValueForToken(nameToken); + return { + nameStringCode: this.tokens.code.slice(nameToken.start, nameToken.end), + variableName: _isIdentifier2.default.call(void 0, name) ? name : null, + }; + } else { + throw new Error("Expected name or string at beginning of enum element."); + } + } + + /** + * Handle an enum member where the RHS is just a string literal (not omitted, not a number, and + * not a complex expression). This is the typical form for TS string enums, and in this case, we + * do *not* create a reverse mapping. + * + * This is called after deleting the key token, when the token processor is at the equals sign. + * + * Example 1: + * someKey = "some value" + * -> + * const someKey = "some value"; MyEnum["someKey"] = someKey; + * + * Example 2: + * "some key" = "some value" + * -> + * MyEnum["some key"] = "some value"; + */ + processStringLiteralEnumMember( + enumName, + nameStringCode, + variableName, + ) { + if (variableName != null) { + this.tokens.appendCode(`const ${variableName}`); + // = + this.tokens.copyToken(); + // value string + this.tokens.copyToken(); + this.tokens.appendCode(`; ${enumName}[${nameStringCode}] = ${variableName};`); + } else { + this.tokens.appendCode(`${enumName}[${nameStringCode}]`); + // = + this.tokens.copyToken(); + // value string + this.tokens.copyToken(); + this.tokens.appendCode(";"); + } + } + + /** + * Handle an enum member initialized with an expression on the right-hand side (other than a + * string literal). In these cases, we should transform the expression and emit code that sets up + * a reverse mapping. + * + * The TypeScript implementation of this operation distinguishes between expressions that can be + * "constant folded" at compile time (i.e. consist of number literals and simple math operations + * on those numbers) and ones that are dynamic. For constant expressions, it emits the resolved + * numeric value, and auto-incrementing is only allowed in that case. Evaluating expressions at + * compile time would add significant complexity to Sucrase, so Sucrase instead leaves the + * expression as-is, and will later emit something like `MyEnum["previousKey"] + 1` to implement + * auto-incrementing. + * + * This is called after deleting the key token, when the token processor is at the equals sign. + * + * Example 1: + * someKey = 1 + 1 + * -> + * const someKey = 1 + 1; MyEnum[MyEnum["someKey"] = someKey] = "someKey"; + * + * Example 2: + * "some key" = 1 + 1 + * -> + * MyEnum[MyEnum["some key"] = 1 + 1] = "some key"; + */ + processExplicitValueEnumMember( + enumName, + nameStringCode, + variableName, + ) { + const rhsEndIndex = this.tokens.currentToken().rhsEndIndex; + if (rhsEndIndex == null) { + throw new Error("Expected rhsEndIndex on enum assign."); + } + + if (variableName != null) { + this.tokens.appendCode(`const ${variableName}`); + this.tokens.copyToken(); + while (this.tokens.currentIndex() < rhsEndIndex) { + this.rootTransformer.processToken(); + } + this.tokens.appendCode( + `; ${enumName}[${enumName}[${nameStringCode}] = ${variableName}] = ${nameStringCode};`, + ); + } else { + this.tokens.appendCode(`${enumName}[${enumName}[${nameStringCode}]`); + this.tokens.copyToken(); + while (this.tokens.currentIndex() < rhsEndIndex) { + this.rootTransformer.processToken(); + } + this.tokens.appendCode(`] = ${nameStringCode};`); + } + } + + /** + * Handle an enum member with no right-hand side expression. In this case, the value is the + * previous value plus 1, or 0 if there was no previous value. We should also always emit a + * reverse mapping. + * + * Example 1: + * someKey2 + * -> + * const someKey2 = someKey1 + 1; MyEnum[MyEnum["someKey2"] = someKey2] = "someKey2"; + * + * Example 2: + * "some key 2" + * -> + * MyEnum[MyEnum["some key 2"] = someKey1 + 1] = "some key 2"; + */ + processImplicitValueEnumMember( + enumName, + nameStringCode, + variableName, + previousValueCode, + ) { + let valueCode = previousValueCode != null ? `${previousValueCode} + 1` : "0"; + if (variableName != null) { + this.tokens.appendCode(`const ${variableName} = ${valueCode}; `); + valueCode = variableName; + } + this.tokens.appendCode( + `${enumName}[${enumName}[${nameStringCode}] = ${valueCode}] = ${nameStringCode};`, + ); + } +} exports.default = TypeScriptTransformer; diff --git a/node_modules/sucrase/dist/types/CJSImportProcessor.d.ts b/node_modules/sucrase/dist/types/CJSImportProcessor.d.ts new file mode 100644 index 0000000..265db0e --- /dev/null +++ b/node_modules/sucrase/dist/types/CJSImportProcessor.d.ts @@ -0,0 +1,67 @@ +import type { HelperManager } from "./HelperManager"; +import type { Options } from "./index"; +import type NameManager from "./NameManager"; +import type TokenProcessor from "./TokenProcessor"; +/** + * Class responsible for preprocessing and bookkeeping import and export declarations within the + * file. + * + * TypeScript uses a simpler mechanism that does not use functions like interopRequireDefault and + * interopRequireWildcard, so we also allow that mode for compatibility. + */ +export default class CJSImportProcessor { + readonly nameManager: NameManager; + readonly tokens: TokenProcessor; + readonly enableLegacyTypeScriptModuleInterop: boolean; + readonly options: Options; + readonly isTypeScriptTransformEnabled: boolean; + readonly keepUnusedImports: boolean; + readonly helperManager: HelperManager; + private nonTypeIdentifiers; + private importInfoByPath; + private importsToReplace; + private identifierReplacements; + private exportBindingsByLocalName; + constructor(nameManager: NameManager, tokens: TokenProcessor, enableLegacyTypeScriptModuleInterop: boolean, options: Options, isTypeScriptTransformEnabled: boolean, keepUnusedImports: boolean, helperManager: HelperManager); + preprocessTokens(): void; + /** + * In TypeScript, import statements that only import types should be removed. + * This includes `import {} from 'foo';`, but not `import 'foo';`. + */ + pruneTypeOnlyImports(): void; + shouldAutomaticallyElideImportedName(name: string): boolean; + private generateImportReplacements; + getFreeIdentifierForPath(path: string): string; + private preprocessImportAtIndex; + private preprocessExportAtIndex; + private preprocessVarExportAtIndex; + /** + * Walk this export statement just in case it's an export...from statement. + * If it is, combine it into the import info for that path. Otherwise, just + * bail out; it'll be handled later. + */ + private preprocessNamedExportAtIndex; + private preprocessExportStarAtIndex; + private getNamedImports; + /** + * Get a mutable import info object for this path, creating one if it doesn't + * exist yet. + */ + private getImportInfo; + private addExportBinding; + /** + * Return the code to use for the import for this path, or the empty string if + * the code has already been "claimed" by a previous import. + */ + claimImportCode(importPath: string): string; + getIdentifierReplacement(identifierName: string): string | null; + /** + * Return a string like `exports.foo = exports.bar`. + */ + resolveExportBinding(assignedName: string): string | null; + /** + * Return all imported/exported names where we might be interested in whether usages of those + * names are shadowed. + */ + getGlobalNames(): Set; +} diff --git a/node_modules/sucrase/dist/types/HelperManager.d.ts b/node_modules/sucrase/dist/types/HelperManager.d.ts new file mode 100644 index 0000000..8ec724d --- /dev/null +++ b/node_modules/sucrase/dist/types/HelperManager.d.ts @@ -0,0 +1,15 @@ +import type NameManager from "./NameManager"; +declare const HELPERS: { + [name: string]: string; +}; +export declare class HelperManager { + readonly nameManager: NameManager; + helperNames: { + [baseName in keyof typeof HELPERS]?: string; + }; + createRequireName: string | null; + constructor(nameManager: NameManager); + getHelperName(baseName: keyof typeof HELPERS): string; + emitHelpers(): string; +} +export {}; diff --git a/node_modules/sucrase/dist/types/NameManager.d.ts b/node_modules/sucrase/dist/types/NameManager.d.ts new file mode 100644 index 0000000..7485bf0 --- /dev/null +++ b/node_modules/sucrase/dist/types/NameManager.d.ts @@ -0,0 +1,7 @@ +import type { Token } from "./parser/tokenizer"; +export default class NameManager { + private readonly usedNames; + constructor(code: string, tokens: Array); + claimFreeName(name: string): string; + findFreeName(name: string): string; +} diff --git a/node_modules/sucrase/dist/types/Options-gen-types.d.ts b/node_modules/sucrase/dist/types/Options-gen-types.d.ts new file mode 100644 index 0000000..22996e8 --- /dev/null +++ b/node_modules/sucrase/dist/types/Options-gen-types.d.ts @@ -0,0 +1,9 @@ +/** + * This module was automatically generated by `ts-interface-builder` + */ +import * as t from "ts-interface-checker"; +export declare const Transform: t.TUnion; +export declare const SourceMapOptions: t.TIface; +export declare const Options: t.TIface; +declare const exportedTypeSuite: t.ITypeSuite; +export default exportedTypeSuite; diff --git a/node_modules/sucrase/dist/types/Options.d.ts b/node_modules/sucrase/dist/types/Options.d.ts new file mode 100644 index 0000000..c182ed9 --- /dev/null +++ b/node_modules/sucrase/dist/types/Options.d.ts @@ -0,0 +1,90 @@ +export type Transform = "jsx" | "typescript" | "flow" | "imports" | "react-hot-loader" | "jest"; +export interface SourceMapOptions { + /** + * The name to use in the "file" field of the source map. This should be the name of the compiled + * file. + */ + compiledFilename: string; +} +export interface Options { + /** + * Unordered array of transform names describing both the allowed syntax + * (where applicable) and the transformation behavior. + */ + transforms: Array; + /** + * Opts out of all ES syntax transformations: optional chaining, nullish + * coalescing, class fields, numeric separators, optional catch binding. + */ + disableESTransforms?: boolean; + /** + * Transformation mode for the JSX transform. + * - "classic" refers to the original behavior using `React.createElement`. + * - "automatic" refers to the transform behavior released with React 17, + * where the `jsx` function (or a variation) is automatically imported. + * - "preserve" leaves the JSX as-is. + * + * Default value: "classic". + */ + jsxRuntime?: "classic" | "automatic" | "preserve"; + /** + * Compile code for production use. Currently only applies to the JSX + * transform. + */ + production?: boolean; + /** + * If specified, import path prefix to use in place of "react" when compiling + * JSX with the automatic runtime. + */ + jsxImportSource?: string; + /** + * If specified, function name to use in place of React.createClass when + * compiling JSX with the classic runtime. + */ + jsxPragma?: string; + /** + * If specified, function name to use in place of React.Fragment when + * compiling JSX with the classic runtime. + */ + jsxFragmentPragma?: string; + /** + * If specified, disable automatic removal of type-only import and export + * statements and names. Only statements and names that explicitly use the + * `type` keyword are removed. + */ + keepUnusedImports?: boolean; + /** + * If specified, the imports transform does not attempt to change dynamic + * import() expressions into require() calls. + */ + preserveDynamicImport?: boolean; + /** + * Only relevant when targeting ESM (i.e. when the imports transform is *not* + * specified). This flag changes the behavior of TS require imports: + * + * import Foo = require("foo"); + * + * to import createRequire, create a require function, and use that function. + * This is the TS behavior with module: nodenext and makes it easier for the + * same code to target ESM and CJS. + */ + injectCreateRequireForImportRequire?: boolean; + /** + * If true, replicate the import behavior of TypeScript's esModuleInterop: false. + */ + enableLegacyTypeScriptModuleInterop?: boolean; + /** + * If true, replicate the import behavior Babel 5 and babel-plugin-add-module-exports. + */ + enableLegacyBabel5ModuleInterop?: boolean; + /** + * If specified, we also return a RawSourceMap object alongside the code. + * filePath must be specified if this option is enabled. + */ + sourceMapOptions?: SourceMapOptions; + /** + * File path to use in error messages, React display names, and source maps. + */ + filePath?: string; +} +export declare function validateOptions(options: Options): void; diff --git a/node_modules/sucrase/dist/types/TokenProcessor.d.ts b/node_modules/sucrase/dist/types/TokenProcessor.d.ts new file mode 100644 index 0000000..9492aed --- /dev/null +++ b/node_modules/sucrase/dist/types/TokenProcessor.d.ts @@ -0,0 +1,87 @@ +import type { HelperManager } from "./HelperManager"; +import type { Token } from "./parser/tokenizer"; +import type { ContextualKeyword } from "./parser/tokenizer/keywords"; +import { type TokenType } from "./parser/tokenizer/types"; +export interface TokenProcessorSnapshot { + resultCode: string; + tokenIndex: number; +} +export interface TokenProcessorResult { + code: string; + mappings: Array; +} +export default class TokenProcessor { + readonly code: string; + readonly tokens: Array; + readonly isFlowEnabled: boolean; + readonly disableESTransforms: boolean; + readonly helperManager: HelperManager; + private resultCode; + private resultMappings; + private tokenIndex; + constructor(code: string, tokens: Array, isFlowEnabled: boolean, disableESTransforms: boolean, helperManager: HelperManager); + /** + * Snapshot the token state in a way that can be restored later, useful for + * things like lookahead. + * + * resultMappings do not need to be copied since in all use cases, they will + * be overwritten anyway after restore. + */ + snapshot(): TokenProcessorSnapshot; + restoreToSnapshot(snapshot: TokenProcessorSnapshot): void; + /** + * Remove and return the code generated since the snapshot, leaving the + * current token position in-place. Unlike most TokenProcessor operations, + * this operation can result in input/output line number mismatches because + * the removed code may contain newlines, so this operation should be used + * sparingly. + */ + dangerouslyGetAndRemoveCodeSinceSnapshot(snapshot: TokenProcessorSnapshot): string; + reset(): void; + matchesContextualAtIndex(index: number, contextualKeyword: ContextualKeyword): boolean; + identifierNameAtIndex(index: number): string; + identifierNameAtRelativeIndex(relativeIndex: number): string; + identifierName(): string; + identifierNameForToken(token: Token): string; + rawCodeForToken(token: Token): string; + stringValueAtIndex(index: number): string; + stringValue(): string; + stringValueForToken(token: Token): string; + matches1AtIndex(index: number, t1: TokenType): boolean; + matches2AtIndex(index: number, t1: TokenType, t2: TokenType): boolean; + matches3AtIndex(index: number, t1: TokenType, t2: TokenType, t3: TokenType): boolean; + matches1(t1: TokenType): boolean; + matches2(t1: TokenType, t2: TokenType): boolean; + matches3(t1: TokenType, t2: TokenType, t3: TokenType): boolean; + matches4(t1: TokenType, t2: TokenType, t3: TokenType, t4: TokenType): boolean; + matches5(t1: TokenType, t2: TokenType, t3: TokenType, t4: TokenType, t5: TokenType): boolean; + matchesContextual(contextualKeyword: ContextualKeyword): boolean; + matchesContextIdAndLabel(type: TokenType, contextId: number): boolean; + previousWhitespaceAndComments(): string; + replaceToken(newCode: string): void; + replaceTokenTrimmingLeftWhitespace(newCode: string): void; + removeInitialToken(): void; + removeToken(): void; + /** + * Remove all code until the next }, accounting for balanced braces. + */ + removeBalancedCode(): void; + copyExpectedToken(tokenType: TokenType): void; + copyToken(): void; + copyTokenWithPrefix(prefix: string): void; + private appendTokenPrefix; + private appendTokenSuffix; + appendCode(code: string): void; + currentToken(): Token; + currentTokenCode(): string; + tokenAtRelativeIndex(relativeIndex: number): Token; + currentIndex(): number; + /** + * Move to the next token. Only suitable in preprocessing steps. When + * generating new code, you should use copyToken or removeToken. + */ + nextToken(): void; + previousToken(): void; + finish(): TokenProcessorResult; + isAtEnd(): boolean; +} diff --git a/node_modules/sucrase/dist/types/cli.d.ts b/node_modules/sucrase/dist/types/cli.d.ts new file mode 100644 index 0000000..238c75f --- /dev/null +++ b/node_modules/sucrase/dist/types/cli.d.ts @@ -0,0 +1 @@ +export default function run(): void; diff --git a/node_modules/sucrase/dist/types/computeSourceMap.d.ts b/node_modules/sucrase/dist/types/computeSourceMap.d.ts new file mode 100644 index 0000000..1277847 --- /dev/null +++ b/node_modules/sucrase/dist/types/computeSourceMap.d.ts @@ -0,0 +1,17 @@ +import type { SourceMapOptions } from "./index"; +import type { Token } from "./parser/tokenizer"; +import type { RootTransformerResult } from "./transformers/RootTransformer"; +export interface RawSourceMap { + version: number; + file: string; + sources: Array; + sourceRoot?: string; + sourcesContent?: Array; + mappings: string; + names: Array; +} +/** + * Generate a source map indicating that each line maps directly to the original line, + * with the tokens in their new positions. + */ +export default function computeSourceMap({ code: generatedCode, mappings: rawMappings }: RootTransformerResult, filePath: string, options: SourceMapOptions, source: string, tokens: Array): RawSourceMap; diff --git a/node_modules/sucrase/dist/types/identifyShadowedGlobals.d.ts b/node_modules/sucrase/dist/types/identifyShadowedGlobals.d.ts new file mode 100644 index 0000000..a9222d8 --- /dev/null +++ b/node_modules/sucrase/dist/types/identifyShadowedGlobals.d.ts @@ -0,0 +1,12 @@ +import type { Scope } from "./parser/tokenizer/state"; +import type TokenProcessor from "./TokenProcessor"; +/** + * Traverse the given tokens and modify them if necessary to indicate that some names shadow global + * variables. + */ +export default function identifyShadowedGlobals(tokens: TokenProcessor, scopes: Array, globalNames: Set): void; +/** + * We can do a fast up-front check to see if there are any declarations to global names. If not, + * then there's no point in computing scope assignments. + */ +export declare function hasShadowedGlobals(tokens: TokenProcessor, globalNames: Set): boolean; diff --git a/node_modules/sucrase/dist/types/index.d.ts b/node_modules/sucrase/dist/types/index.d.ts new file mode 100644 index 0000000..bfc4a9c --- /dev/null +++ b/node_modules/sucrase/dist/types/index.d.ts @@ -0,0 +1,26 @@ +import CJSImportProcessor from "./CJSImportProcessor"; +import { type RawSourceMap } from "./computeSourceMap"; +import { HelperManager } from "./HelperManager"; +import NameManager from "./NameManager"; +import type { Options, SourceMapOptions, Transform } from "./Options"; +import type { Scope } from "./parser/tokenizer/state"; +import TokenProcessor from "./TokenProcessor"; +export interface TransformResult { + code: string; + sourceMap?: RawSourceMap; +} +export interface SucraseContext { + tokenProcessor: TokenProcessor; + scopes: Array; + nameManager: NameManager; + importProcessor: CJSImportProcessor | null; + helperManager: HelperManager; +} +export type { Options, SourceMapOptions, Transform }; +export declare function getVersion(): string; +export declare function transform(code: string, options: Options): TransformResult; +/** + * Return a string representation of the sucrase tokens, mostly useful for + * diagnostic purposes. + */ +export declare function getFormattedTokens(code: string, options: Options): string; diff --git a/node_modules/sucrase/dist/types/parser/index.d.ts b/node_modules/sucrase/dist/types/parser/index.d.ts new file mode 100644 index 0000000..8d082c0 --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/index.d.ts @@ -0,0 +1,8 @@ +import type { Token } from "./tokenizer/index"; +import type { Scope } from "./tokenizer/state"; +export declare class File { + tokens: Array; + scopes: Array; + constructor(tokens: Array, scopes: Array); +} +export declare function parse(input: string, isJSXEnabled: boolean, isTypeScriptEnabled: boolean, isFlowEnabled: boolean): File; diff --git a/node_modules/sucrase/dist/types/parser/plugins/flow.d.ts b/node_modules/sucrase/dist/types/parser/plugins/flow.d.ts new file mode 100644 index 0000000..fe83776 --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/plugins/flow.d.ts @@ -0,0 +1,27 @@ +import { ContextualKeyword } from "../tokenizer/keywords"; +import { type StopState } from "../traverser/expression"; +export declare function flowParseTypeParameterDeclaration(): void; +export declare function flowParseTypeAnnotation(): void; +export declare function flowParseVariance(): void; +export declare function flowParseFunctionBodyAndFinish(funcContextId: number): void; +export declare function flowParseSubscript(startTokenIndex: number, noCalls: boolean, stopState: StopState): void; +export declare function flowStartParseNewArguments(): void; +export declare function flowTryParseStatement(): boolean; +export declare function flowTryParseExportDefaultExpression(): boolean; +export declare function flowParseIdentifierStatement(contextualKeyword: ContextualKeyword): void; +export declare function flowShouldParseExportDeclaration(): boolean; +export declare function flowShouldDisallowExportDefaultSpecifier(): boolean; +export declare function flowParseExportDeclaration(): void; +export declare function flowShouldParseExportStar(): boolean; +export declare function flowParseExportStar(): void; +export declare function flowAfterParseClassSuper(hasSuper: boolean): void; +export declare function flowStartParseObjPropValue(): void; +export declare function flowParseAssignableListItemTypes(): void; +export declare function flowStartParseImportSpecifiers(): void; +export declare function flowParseImportSpecifier(): void; +export declare function flowStartParseFunctionParams(): void; +export declare function flowAfterParseVarHead(): void; +export declare function flowStartParseAsyncArrowFromCallExpression(): void; +export declare function flowParseMaybeAssign(noIn: boolean, isWithinParens: boolean): boolean; +export declare function flowParseArrow(): boolean; +export declare function flowParseSubscripts(startTokenIndex: number, noCalls?: boolean): void; diff --git a/node_modules/sucrase/dist/types/parser/plugins/jsx/index.d.ts b/node_modules/sucrase/dist/types/parser/plugins/jsx/index.d.ts new file mode 100644 index 0000000..2600d0f --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/plugins/jsx/index.d.ts @@ -0,0 +1,2 @@ +export declare function jsxParseElement(): void; +export declare function nextJSXTagToken(): void; diff --git a/node_modules/sucrase/dist/types/parser/plugins/jsx/xhtml.d.ts b/node_modules/sucrase/dist/types/parser/plugins/jsx/xhtml.d.ts new file mode 100644 index 0000000..1190776 --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/plugins/jsx/xhtml.d.ts @@ -0,0 +1,2 @@ +declare const _default: Map; +export default _default; diff --git a/node_modules/sucrase/dist/types/parser/plugins/types.d.ts b/node_modules/sucrase/dist/types/parser/plugins/types.d.ts new file mode 100644 index 0000000..fce6440 --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/plugins/types.d.ts @@ -0,0 +1,5 @@ +/** + * Common parser code for TypeScript and Flow. + */ +export declare function typedParseConditional(noIn: boolean): void; +export declare function typedParseParenItem(): void; diff --git a/node_modules/sucrase/dist/types/parser/plugins/typescript.d.ts b/node_modules/sucrase/dist/types/parser/plugins/typescript.d.ts new file mode 100644 index 0000000..adf9a13 --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/plugins/typescript.d.ts @@ -0,0 +1,49 @@ +import { ContextualKeyword } from "../tokenizer/keywords"; +import { type StopState } from "../traverser/expression"; +export declare function tsParseModifiers(allowedModifiers: Array): void; +/** Parses a modifier matching one the given modifier names. */ +export declare function tsParseModifier(allowedModifiers: Array): ContextualKeyword | null; +export declare function tsTryParseTypeParameters(): void; +export declare function tsTryParseTypeAnnotation(): void; +export declare function tsParseTypeAnnotation(): void; +export declare function tsParseType(): void; +export declare function tsParseNonConditionalType(): void; +export declare function tsParseTypeAssertion(): void; +export declare function tsTryParseJSXTypeArgument(): void; +export declare function tsParseImportEqualsDeclaration(): void; +export declare function tsIsDeclarationStart(): boolean; +export declare function tsParseFunctionBodyAndFinish(functionStart: number, funcContextId: number): void; +export declare function tsParseSubscript(startTokenIndex: number, noCalls: boolean, stopState: StopState): void; +export declare function tsTryParseExport(): boolean; +/** + * Parse a TS import specifier, which may be prefixed with "type" and may be of + * the form `foo as bar`. + * + * The number of identifier-like tokens we see happens to be enough to uniquely + * identify the form, so simply count the number of identifiers rather than + * matching the words `type` or `as`. This is particularly important because + * `type` and `as` could each actually be plain identifiers rather than + * keywords. + */ +export declare function tsParseImportSpecifier(): void; +/** + * Just like named import specifiers, export specifiers can have from 1 to 4 + * tokens, inclusive, and the number of tokens determines the role of each token. + */ +export declare function tsParseExportSpecifier(): void; +export declare function tsTryParseExportDefaultExpression(): boolean; +export declare function tsTryParseStatementContent(): boolean; +export declare function tsTryParseClassMemberWithIsStatic(isStatic: boolean): boolean; +export declare function tsParseIdentifierStatement(contextualKeyword: ContextualKeyword): void; +export declare function tsParseExportDeclaration(): void; +export declare function tsAfterParseClassSuper(hasSuper: boolean): void; +export declare function tsStartParseObjPropValue(): void; +export declare function tsStartParseFunctionParams(): void; +export declare function tsAfterParseVarHead(): void; +export declare function tsStartParseAsyncArrowFromCallExpression(): void; +export declare function tsParseMaybeAssign(noIn: boolean, isWithinParens: boolean): boolean; +export declare function tsParseMaybeAssignWithJSX(noIn: boolean, isWithinParens: boolean): boolean; +export declare function tsParseMaybeAssignWithoutJSX(noIn: boolean, isWithinParens: boolean): boolean; +export declare function tsParseArrow(): boolean; +export declare function tsParseAssignableListItemTypes(): void; +export declare function tsParseMaybeDecoratorArguments(): void; diff --git a/node_modules/sucrase/dist/types/parser/tokenizer/index.d.ts b/node_modules/sucrase/dist/types/parser/tokenizer/index.d.ts new file mode 100644 index 0000000..45cd799 --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/tokenizer/index.d.ts @@ -0,0 +1,93 @@ +import { ContextualKeyword } from "./keywords"; +import { type TokenType } from "./types"; +export declare enum IdentifierRole { + Access = 0, + ExportAccess = 1, + TopLevelDeclaration = 2, + FunctionScopedDeclaration = 3, + BlockScopedDeclaration = 4, + ObjectShorthandTopLevelDeclaration = 5, + ObjectShorthandFunctionScopedDeclaration = 6, + ObjectShorthandBlockScopedDeclaration = 7, + ObjectShorthand = 8, + ImportDeclaration = 9, + ObjectKey = 10, + ImportAccess = 11 +} +/** + * Extra information on jsxTagStart tokens, used to determine which of the three + * jsx functions are called in the automatic transform. + */ +export declare enum JSXRole { + NoChildren = 0, + OneChild = 1, + StaticChildren = 2, + KeyAfterPropSpread = 3 +} +export declare function isDeclaration(token: Token): boolean; +export declare function isNonTopLevelDeclaration(token: Token): boolean; +export declare function isTopLevelDeclaration(token: Token): boolean; +export declare function isBlockScopedDeclaration(token: Token): boolean; +export declare function isFunctionScopedDeclaration(token: Token): boolean; +export declare function isObjectShorthandDeclaration(token: Token): boolean; +export declare class Token { + constructor(); + type: TokenType; + contextualKeyword: ContextualKeyword; + start: number; + end: number; + scopeDepth: number; + isType: boolean; + identifierRole: IdentifierRole | null; + jsxRole: JSXRole | null; + shadowsGlobal: boolean; + isAsyncOperation: boolean; + contextId: number | null; + rhsEndIndex: number | null; + isExpression: boolean; + numNullishCoalesceStarts: number; + numNullishCoalesceEnds: number; + isOptionalChainStart: boolean; + isOptionalChainEnd: boolean; + subscriptStartIndex: number | null; + nullishStartIndex: number | null; +} +export declare function next(): void; +export declare function nextTemplateToken(): void; +export declare function retokenizeSlashAsRegex(): void; +export declare function pushTypeContext(existingTokensInType: number): boolean; +export declare function popTypeContext(oldIsType: boolean): void; +export declare function eat(type: TokenType): boolean; +export declare function eatTypeToken(tokenType: TokenType): void; +export declare function match(type: TokenType): boolean; +export declare function lookaheadType(): TokenType; +export declare class TypeAndKeyword { + type: TokenType; + contextualKeyword: ContextualKeyword; + constructor(type: TokenType, contextualKeyword: ContextualKeyword); +} +export declare function lookaheadTypeAndKeyword(): TypeAndKeyword; +export declare function nextTokenStart(): number; +export declare function nextTokenStartSince(pos: number): number; +export declare function lookaheadCharCode(): number; +export declare function nextToken(): void; +export declare function skipLineComment(startSkip: number): void; +export declare function skipSpace(): void; +export declare function finishToken(type: TokenType, contextualKeyword?: ContextualKeyword): void; +/** + * Reinterpret a possible > token when transitioning from a type to a non-type + * context. + * + * This comes up in two situations where >= needs to be treated as one token: + * - After an `as` expression, like in the code `a as T >= 1`. + * - In a type argument in an expression context, e.g. `f(a < b, c >= d)`, we + * need to see the token as >= so that we get an error and backtrack to + * normal expression parsing. + * + * Other situations require >= to be seen as two tokens, e.g. + * `const x: Array=[];`, so it's important to treat > as its own token in + * typical type parsing situations. + */ +export declare function rescan_gt(): void; +export declare function getTokenFromCode(code: number): void; +export declare function skipWord(): void; diff --git a/node_modules/sucrase/dist/types/parser/tokenizer/keywords.d.ts b/node_modules/sucrase/dist/types/parser/tokenizer/keywords.d.ts new file mode 100644 index 0000000..e0e7cd0 --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/tokenizer/keywords.d.ts @@ -0,0 +1,43 @@ +export declare enum ContextualKeyword { + NONE = 0, + _abstract = 1, + _accessor = 2, + _as = 3, + _assert = 4, + _asserts = 5, + _async = 6, + _await = 7, + _checks = 8, + _constructor = 9, + _declare = 10, + _enum = 11, + _exports = 12, + _from = 13, + _get = 14, + _global = 15, + _implements = 16, + _infer = 17, + _interface = 18, + _is = 19, + _keyof = 20, + _mixins = 21, + _module = 22, + _namespace = 23, + _of = 24, + _opaque = 25, + _out = 26, + _override = 27, + _private = 28, + _protected = 29, + _proto = 30, + _public = 31, + _readonly = 32, + _require = 33, + _satisfies = 34, + _set = 35, + _static = 36, + _symbol = 37, + _type = 38, + _unique = 39, + _using = 40 +} diff --git a/node_modules/sucrase/dist/types/parser/tokenizer/readWord.d.ts b/node_modules/sucrase/dist/types/parser/tokenizer/readWord.d.ts new file mode 100644 index 0000000..6fdfe90 --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/tokenizer/readWord.d.ts @@ -0,0 +1,7 @@ +/** + * Read an identifier, producing either a name token or matching on one of the existing keywords. + * For performance, we pre-generate big decision tree that we traverse. Each node represents a + * prefix and has 27 values, where the first value is the token or contextual token, if any (-1 if + * not), and the other 26 values are the transitions to other nodes, or -1 to stop. + */ +export default function readWord(): void; diff --git a/node_modules/sucrase/dist/types/parser/tokenizer/readWordTree.d.ts b/node_modules/sucrase/dist/types/parser/tokenizer/readWordTree.d.ts new file mode 100644 index 0000000..f6fb9b2 --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/tokenizer/readWordTree.d.ts @@ -0,0 +1 @@ +export declare const READ_WORD_TREE: Int32Array; diff --git a/node_modules/sucrase/dist/types/parser/tokenizer/state.d.ts b/node_modules/sucrase/dist/types/parser/tokenizer/state.d.ts new file mode 100644 index 0000000..e010c18 --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/tokenizer/state.d.ts @@ -0,0 +1,50 @@ +import type { Token } from "./index"; +import { ContextualKeyword } from "./keywords"; +import { type TokenType } from "./types"; +export declare class Scope { + startTokenIndex: number; + endTokenIndex: number; + isFunctionScope: boolean; + constructor(startTokenIndex: number, endTokenIndex: number, isFunctionScope: boolean); +} +export declare class StateSnapshot { + readonly potentialArrowAt: number; + readonly noAnonFunctionType: boolean; + readonly inDisallowConditionalTypesContext: boolean; + readonly tokensLength: number; + readonly scopesLength: number; + readonly pos: number; + readonly type: TokenType; + readonly contextualKeyword: ContextualKeyword; + readonly start: number; + readonly end: number; + readonly isType: boolean; + readonly scopeDepth: number; + readonly error: Error | null; + constructor(potentialArrowAt: number, noAnonFunctionType: boolean, inDisallowConditionalTypesContext: boolean, tokensLength: number, scopesLength: number, pos: number, type: TokenType, contextualKeyword: ContextualKeyword, start: number, end: number, isType: boolean, scopeDepth: number, error: Error | null); +} +export default class State { + potentialArrowAt: number; + noAnonFunctionType: boolean; + inDisallowConditionalTypesContext: boolean; + tokens: Array; + scopes: Array; + pos: number; + type: TokenType; + contextualKeyword: ContextualKeyword; + start: number; + end: number; + isType: boolean; + scopeDepth: number; + /** + * If the parser is in an error state, then the token is always tt.eof and all functions can + * keep executing but should be written so they don't get into an infinite loop in this situation. + * + * This approach, combined with the ability to snapshot and restore state, allows us to implement + * backtracking without exceptions and without needing to explicitly propagate error states + * everywhere. + */ + error: Error | null; + snapshot(): StateSnapshot; + restoreFromSnapshot(snapshot: StateSnapshot): void; +} diff --git a/node_modules/sucrase/dist/types/parser/tokenizer/types.d.ts b/node_modules/sucrase/dist/types/parser/tokenizer/types.d.ts new file mode 100644 index 0000000..d778d5d --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/tokenizer/types.d.ts @@ -0,0 +1,126 @@ +/** + * Enum of all token types, with bit fields to signify meaningful properties. + */ +export declare enum TokenType { + PRECEDENCE_MASK = 15, + IS_KEYWORD = 16, + IS_ASSIGN = 32, + IS_RIGHT_ASSOCIATIVE = 64, + IS_PREFIX = 128, + IS_POSTFIX = 256, + IS_EXPRESSION_START = 512, + num = 512, + bigint = 1536, + decimal = 2560, + regexp = 3584, + string = 4608, + name = 5632, + eof = 6144, + bracketL = 7680, + bracketR = 8192, + braceL = 9728, + braceBarL = 10752, + braceR = 11264, + braceBarR = 12288, + parenL = 13824, + parenR = 14336, + comma = 15360, + semi = 16384, + colon = 17408, + doubleColon = 18432, + dot = 19456, + question = 20480, + questionDot = 21504, + arrow = 22528, + template = 23552, + ellipsis = 24576, + backQuote = 25600, + dollarBraceL = 27136, + at = 27648, + hash = 29184, + eq = 29728, + assign = 30752, + preIncDec = 32640, + postIncDec = 33664, + bang = 34432, + tilde = 35456, + pipeline = 35841, + nullishCoalescing = 36866, + logicalOR = 37890, + logicalAND = 38915, + bitwiseOR = 39940, + bitwiseXOR = 40965, + bitwiseAND = 41990, + equality = 43015, + lessThan = 44040, + greaterThan = 45064, + relationalOrEqual = 46088, + bitShiftL = 47113, + bitShiftR = 48137, + plus = 49802, + minus = 50826, + modulo = 51723, + star = 52235, + slash = 53259, + exponent = 54348, + jsxName = 55296, + jsxText = 56320, + jsxEmptyText = 57344, + jsxTagStart = 58880, + jsxTagEnd = 59392, + typeParameterStart = 60928, + nonNullAssertion = 61440, + _break = 62480, + _case = 63504, + _catch = 64528, + _continue = 65552, + _debugger = 66576, + _default = 67600, + _do = 68624, + _else = 69648, + _finally = 70672, + _for = 71696, + _function = 73232, + _if = 73744, + _return = 74768, + _switch = 75792, + _throw = 77456, + _try = 77840, + _var = 78864, + _let = 79888, + _const = 80912, + _while = 81936, + _with = 82960, + _new = 84496, + _this = 85520, + _super = 86544, + _class = 87568, + _extends = 88080, + _export = 89104, + _import = 90640, + _yield = 91664, + _null = 92688, + _true = 93712, + _false = 94736, + _in = 95256, + _instanceof = 96280, + _typeof = 97936, + _void = 98960, + _delete = 99984, + _async = 100880, + _get = 101904, + _set = 102928, + _declare = 103952, + _readonly = 104976, + _abstract = 106000, + _static = 107024, + _public = 107536, + _private = 108560, + _protected = 109584, + _override = 110608, + _as = 112144, + _enum = 113168, + _type = 114192, + _implements = 115216 +} +export declare function formatTokenType(tokenType: TokenType): string; diff --git a/node_modules/sucrase/dist/types/parser/traverser/base.d.ts b/node_modules/sucrase/dist/types/parser/traverser/base.d.ts new file mode 100644 index 0000000..e15e892 --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/traverser/base.d.ts @@ -0,0 +1,16 @@ +import State from "../tokenizer/state"; +export declare let isJSXEnabled: boolean; +export declare let isTypeScriptEnabled: boolean; +export declare let isFlowEnabled: boolean; +export declare let state: State; +export declare let input: string; +export declare let nextContextId: number; +export declare function getNextContextId(): number; +export declare function augmentError(error: any): any; +export declare class Loc { + line: number; + column: number; + constructor(line: number, column: number); +} +export declare function locationForIndex(pos: number): Loc; +export declare function initParser(inputCode: string, isJSXEnabledArg: boolean, isTypeScriptEnabledArg: boolean, isFlowEnabledArg: boolean): void; diff --git a/node_modules/sucrase/dist/types/parser/traverser/expression.d.ts b/node_modules/sucrase/dist/types/parser/traverser/expression.d.ts new file mode 100644 index 0000000..52e29fb --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/traverser/expression.d.ts @@ -0,0 +1,34 @@ +export declare class StopState { + stop: boolean; + constructor(stop: boolean); +} +export declare function parseExpression(noIn?: boolean): void; +/** + * noIn is used when parsing a for loop so that we don't interpret a following "in" as the binary + * operatior. + * isWithinParens is used to indicate that we're parsing something that might be a comma expression + * or might be an arrow function or might be a Flow type assertion (which requires explicit parens). + * In these cases, we should allow : and ?: after the initial "left" part. + */ +export declare function parseMaybeAssign(noIn?: boolean, isWithinParens?: boolean): boolean; +export declare function baseParseMaybeAssign(noIn: boolean, isWithinParens: boolean): boolean; +export declare function baseParseConditional(noIn: boolean): void; +export declare function parseMaybeUnary(): boolean; +export declare function parseExprSubscripts(): boolean; +export declare function baseParseSubscripts(startTokenIndex: number, noCalls?: boolean): void; +/** Set 'state.stop = true' to indicate that we should stop parsing subscripts. */ +export declare function baseParseSubscript(startTokenIndex: number, noCalls: boolean, stopState: StopState): void; +export declare function atPossibleAsync(): boolean; +export declare function parseCallExpressionArguments(): void; +export declare function parseExprAtom(): boolean; +export declare function parseLiteral(): void; +export declare function parseParenExpression(): void; +export declare function parseArrow(): boolean; +export declare function parseTemplate(): void; +export declare function parseObj(isPattern: boolean, isBlockScope: boolean): void; +export declare function parsePropertyName(objectContextId: number): void; +export declare function parseMethod(functionStart: number, isConstructor: boolean): void; +export declare function parseArrowExpression(startTokenIndex: number): void; +export declare function parseFunctionBodyAndFinish(functionStart: number, funcContextId?: number): void; +export declare function parseFunctionBody(allowExpression: boolean, funcContextId?: number): void; +export declare function parseIdentifier(): void; diff --git a/node_modules/sucrase/dist/types/parser/traverser/index.d.ts b/node_modules/sucrase/dist/types/parser/traverser/index.d.ts new file mode 100644 index 0000000..9f9127d --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/traverser/index.d.ts @@ -0,0 +1,2 @@ +import type { File } from "../index"; +export declare function parseFile(): File; diff --git a/node_modules/sucrase/dist/types/parser/traverser/lval.d.ts b/node_modules/sucrase/dist/types/parser/traverser/lval.d.ts new file mode 100644 index 0000000..eb17756 --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/traverser/lval.d.ts @@ -0,0 +1,9 @@ +import { TokenType } from "../tokenizer/types"; +export declare function parseSpread(): void; +export declare function parseRest(isBlockScope: boolean): void; +export declare function parseBindingIdentifier(isBlockScope: boolean): void; +export declare function parseImportedIdentifier(): void; +export declare function markPriorBindingIdentifier(isBlockScope: boolean): void; +export declare function parseBindingAtom(isBlockScope: boolean): void; +export declare function parseBindingList(close: TokenType, isBlockScope: boolean, allowEmpty?: boolean, allowModifiers?: boolean, contextId?: number): void; +export declare function parseMaybeDefault(isBlockScope: boolean, leftAlreadyParsed?: boolean): void; diff --git a/node_modules/sucrase/dist/types/parser/traverser/statement.d.ts b/node_modules/sucrase/dist/types/parser/traverser/statement.d.ts new file mode 100644 index 0000000..508b20a --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/traverser/statement.d.ts @@ -0,0 +1,20 @@ +import { File } from "../index"; +import { type TokenType } from "../tokenizer/types"; +export declare function parseTopLevel(): File; +export declare function parseStatement(declaration: boolean): void; +export declare function parseDecorators(): void; +export declare function baseParseMaybeDecoratorArguments(): void; +export declare function parseVarStatement(isBlockScope: boolean): void; +export declare function parseBlock(isFunctionScope?: boolean, contextId?: number): void; +export declare function parseBlockBody(end: TokenType): void; +export declare function parseFunction(functionStart: number, isStatement: boolean, optionalId?: boolean): void; +export declare function parseFunctionParams(allowModifiers?: boolean, funcContextId?: number): void; +export declare function parseClass(isStatement: boolean, optionalId?: boolean): void; +export declare function parseClassPropertyName(classContextId: number): void; +export declare function parsePostMemberNameModifiers(): void; +export declare function parseClassProperty(): void; +export declare function parseExport(): void; +export declare function parseExportFrom(): void; +export declare function baseParseExportStar(): void; +export declare function parseExportSpecifiers(): void; +export declare function parseImport(): void; diff --git a/node_modules/sucrase/dist/types/parser/traverser/util.d.ts b/node_modules/sucrase/dist/types/parser/traverser/util.d.ts new file mode 100644 index 0000000..6ec2a55 --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/traverser/util.d.ts @@ -0,0 +1,17 @@ +import type { ContextualKeyword } from "../tokenizer/keywords"; +import { type TokenType } from "../tokenizer/types"; +export declare function isContextual(contextualKeyword: ContextualKeyword): boolean; +export declare function isLookaheadContextual(contextualKeyword: ContextualKeyword): boolean; +export declare function eatContextual(contextualKeyword: ContextualKeyword): boolean; +export declare function expectContextual(contextualKeyword: ContextualKeyword): void; +export declare function canInsertSemicolon(): boolean; +export declare function hasPrecedingLineBreak(): boolean; +export declare function hasFollowingLineBreak(): boolean; +export declare function isLineTerminator(): boolean; +export declare function semicolon(): void; +export declare function expect(type: TokenType): void; +/** + * Transition the parser to an error state. All code needs to be written to naturally unwind in this + * state, which allows us to backtrack without exceptions and without error plumbing everywhere. + */ +export declare function unexpected(message?: string, pos?: number): void; diff --git a/node_modules/sucrase/dist/types/parser/util/charcodes.d.ts b/node_modules/sucrase/dist/types/parser/util/charcodes.d.ts new file mode 100644 index 0000000..19bba1f --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/util/charcodes.d.ts @@ -0,0 +1,107 @@ +export declare enum charCodes { + backSpace = 8, + lineFeed = 10, + tab = 9, + carriageReturn = 13, + shiftOut = 14, + space = 32, + exclamationMark = 33, + quotationMark = 34, + numberSign = 35, + dollarSign = 36, + percentSign = 37, + ampersand = 38, + apostrophe = 39, + leftParenthesis = 40, + rightParenthesis = 41, + asterisk = 42, + plusSign = 43, + comma = 44, + dash = 45, + dot = 46, + slash = 47, + digit0 = 48, + digit1 = 49, + digit2 = 50, + digit3 = 51, + digit4 = 52, + digit5 = 53, + digit6 = 54, + digit7 = 55, + digit8 = 56, + digit9 = 57, + colon = 58, + semicolon = 59, + lessThan = 60, + equalsTo = 61, + greaterThan = 62, + questionMark = 63, + atSign = 64, + uppercaseA = 65, + uppercaseB = 66, + uppercaseC = 67, + uppercaseD = 68, + uppercaseE = 69, + uppercaseF = 70, + uppercaseG = 71, + uppercaseH = 72, + uppercaseI = 73, + uppercaseJ = 74, + uppercaseK = 75, + uppercaseL = 76, + uppercaseM = 77, + uppercaseN = 78, + uppercaseO = 79, + uppercaseP = 80, + uppercaseQ = 81, + uppercaseR = 82, + uppercaseS = 83, + uppercaseT = 84, + uppercaseU = 85, + uppercaseV = 86, + uppercaseW = 87, + uppercaseX = 88, + uppercaseY = 89, + uppercaseZ = 90, + leftSquareBracket = 91, + backslash = 92, + rightSquareBracket = 93, + caret = 94, + underscore = 95, + graveAccent = 96, + lowercaseA = 97, + lowercaseB = 98, + lowercaseC = 99, + lowercaseD = 100, + lowercaseE = 101, + lowercaseF = 102, + lowercaseG = 103, + lowercaseH = 104, + lowercaseI = 105, + lowercaseJ = 106, + lowercaseK = 107, + lowercaseL = 108, + lowercaseM = 109, + lowercaseN = 110, + lowercaseO = 111, + lowercaseP = 112, + lowercaseQ = 113, + lowercaseR = 114, + lowercaseS = 115, + lowercaseT = 116, + lowercaseU = 117, + lowercaseV = 118, + lowercaseW = 119, + lowercaseX = 120, + lowercaseY = 121, + lowercaseZ = 122, + leftCurlyBrace = 123, + verticalBar = 124, + rightCurlyBrace = 125, + tilde = 126, + nonBreakingSpace = 160, + oghamSpaceMark = 5760, + lineSeparator = 8232, + paragraphSeparator = 8233 +} +export declare function isDigit(code: number): boolean; diff --git a/node_modules/sucrase/dist/types/parser/util/identifier.d.ts b/node_modules/sucrase/dist/types/parser/util/identifier.d.ts new file mode 100644 index 0000000..5c2eaeb --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/util/identifier.d.ts @@ -0,0 +1,2 @@ +export declare const IS_IDENTIFIER_CHAR: Uint8Array; +export declare const IS_IDENTIFIER_START: Uint8Array; diff --git a/node_modules/sucrase/dist/types/parser/util/whitespace.d.ts b/node_modules/sucrase/dist/types/parser/util/whitespace.d.ts new file mode 100644 index 0000000..dca5425 --- /dev/null +++ b/node_modules/sucrase/dist/types/parser/util/whitespace.d.ts @@ -0,0 +1,3 @@ +export declare const WHITESPACE_CHARS: Array; +export declare const skipWhiteSpace: RegExp; +export declare const IS_WHITESPACE: Uint8Array; diff --git a/node_modules/sucrase/dist/types/register.d.ts b/node_modules/sucrase/dist/types/register.d.ts new file mode 100644 index 0000000..8a7ebd5 --- /dev/null +++ b/node_modules/sucrase/dist/types/register.d.ts @@ -0,0 +1,14 @@ +import { type Options } from "./index"; +export interface HookOptions { + matcher?: (code: string) => boolean; + ignoreNodeModules?: boolean; +} +export type RevertFunction = () => void; +export declare function addHook(extension: string, sucraseOptions: Options, hookOptions?: HookOptions): RevertFunction; +export declare function registerJS(hookOptions?: HookOptions): RevertFunction; +export declare function registerJSX(hookOptions?: HookOptions): RevertFunction; +export declare function registerTS(hookOptions?: HookOptions): RevertFunction; +export declare function registerTSX(hookOptions?: HookOptions): RevertFunction; +export declare function registerTSLegacyModuleInterop(hookOptions?: HookOptions): RevertFunction; +export declare function registerTSXLegacyModuleInterop(hookOptions?: HookOptions): RevertFunction; +export declare function registerAll(hookOptions?: HookOptions): RevertFunction; diff --git a/node_modules/sucrase/dist/types/transformers/CJSImportTransformer.d.ts b/node_modules/sucrase/dist/types/transformers/CJSImportTransformer.d.ts new file mode 100644 index 0000000..6a65621 --- /dev/null +++ b/node_modules/sucrase/dist/types/transformers/CJSImportTransformer.d.ts @@ -0,0 +1,149 @@ +import type CJSImportProcessor from "../CJSImportProcessor"; +import type { HelperManager } from "../HelperManager"; +import type NameManager from "../NameManager"; +import type TokenProcessor from "../TokenProcessor"; +import type ReactHotLoaderTransformer from "./ReactHotLoaderTransformer"; +import type RootTransformer from "./RootTransformer"; +import Transformer from "./Transformer"; +/** + * Class for editing import statements when we are transforming to commonjs. + */ +export default class CJSImportTransformer extends Transformer { + readonly rootTransformer: RootTransformer; + readonly tokens: TokenProcessor; + readonly importProcessor: CJSImportProcessor; + readonly nameManager: NameManager; + readonly helperManager: HelperManager; + readonly reactHotLoaderTransformer: ReactHotLoaderTransformer | null; + readonly enableLegacyBabel5ModuleInterop: boolean; + readonly enableLegacyTypeScriptModuleInterop: boolean; + readonly isTypeScriptTransformEnabled: boolean; + readonly isFlowTransformEnabled: boolean; + readonly preserveDynamicImport: boolean; + readonly keepUnusedImports: boolean; + private hadExport; + private hadNamedExport; + private hadDefaultExport; + private declarationInfo; + constructor(rootTransformer: RootTransformer, tokens: TokenProcessor, importProcessor: CJSImportProcessor, nameManager: NameManager, helperManager: HelperManager, reactHotLoaderTransformer: ReactHotLoaderTransformer | null, enableLegacyBabel5ModuleInterop: boolean, enableLegacyTypeScriptModuleInterop: boolean, isTypeScriptTransformEnabled: boolean, isFlowTransformEnabled: boolean, preserveDynamicImport: boolean, keepUnusedImports: boolean); + getPrefixCode(): string; + getSuffixCode(): string; + process(): boolean; + private processImportEquals; + /** + * Transform this: + * import foo, {bar} from 'baz'; + * into + * var _baz = require('baz'); var _baz2 = _interopRequireDefault(_baz); + * + * The import code was already generated in the import preprocessing step, so + * we just need to look it up. + */ + private processImport; + /** + * Erase this import (since any CJS output would be completely different), and + * return true if this import is should be elided due to being a type-only + * import. Such imports will not be emitted at all to avoid side effects. + * + * Import elision only happens with the TypeScript or Flow transforms enabled. + * + * TODO: This function has some awkward overlap with + * CJSImportProcessor.pruneTypeOnlyImports , and the two should be unified. + * That function handles TypeScript implicit import name elision, and removes + * an import if all typical imported names (without `type`) are removed due + * to being type-only imports. This function handles Flow import removal and + * properly distinguishes `import 'foo'` from `import {} from 'foo'` for TS + * purposes. + * + * The position should end at the import string. + */ + private removeImportAndDetectIfShouldElide; + private removeRemainingImport; + private processIdentifier; + processObjectShorthand(): boolean; + processExport(): boolean; + private processAssignment; + /** + * Process something like `a += 3`, where `a` might be an exported value. + */ + private processComplexAssignment; + /** + * Process something like `++a`, where `a` might be an exported value. + */ + private processPreIncDec; + /** + * Process something like `a++`, where `a` might be an exported value. + * This starts at the `a`, not at the `++`. + */ + private processPostIncDec; + private processExportDefault; + private copyDecorators; + /** + * Transform a declaration like `export var`, `export let`, or `export const`. + */ + private processExportVar; + /** + * Determine if the export is of the form: + * export var/let/const [varName] = [expr]; + * In other words, determine if function name inference might apply. + */ + private isSimpleExportVar; + /** + * Transform an `export var` declaration initializing a single variable. + * + * For example, this: + * export const f = () => {}; + * becomes this: + * const f = () => {}; exports.f = f; + * + * The variable is unused (e.g. exports.f has the true value of the export). + * We need to produce an assignment of this form so that the function will + * have an inferred name of "f", which wouldn't happen in the more general + * case below. + */ + private processSimpleExportVar; + /** + * Transform normal declaration exports, including handling destructuring. + * For example, this: + * export const {x: [a = 2, b], c} = d; + * becomes this: + * ({x: [exports.a = 2, exports.b], c: exports.c} = d;) + */ + private processComplexExportVar; + /** + * Transform this: + * export function foo() {} + * into this: + * function foo() {} exports.foo = foo; + */ + private processExportFunction; + /** + * Skip past a function with a name and return that name. + */ + private processNamedFunction; + /** + * Transform this: + * export class A {} + * into this: + * class A {} exports.A = A; + */ + private processExportClass; + /** + * Transform this: + * export {a, b as c}; + * into this: + * exports.a = a; exports.c = b; + * + * OR + * + * Transform this: + * export {a, b as c} from './foo'; + * into the pre-generated Object.defineProperty code from the ImportProcessor. + * + * For the first case, if the TypeScript transform is enabled, we need to skip + * exports that are only defined as types. + */ + private processExportBindings; + private processExportStar; + private shouldElideExportedIdentifier; +} diff --git a/node_modules/sucrase/dist/types/transformers/ESMImportTransformer.d.ts b/node_modules/sucrase/dist/types/transformers/ESMImportTransformer.d.ts new file mode 100644 index 0000000..5caf082 --- /dev/null +++ b/node_modules/sucrase/dist/types/transformers/ESMImportTransformer.d.ts @@ -0,0 +1,52 @@ +import type { HelperManager } from "../HelperManager"; +import type { Options } from "../index"; +import type NameManager from "../NameManager"; +import type TokenProcessor from "../TokenProcessor"; +import type ReactHotLoaderTransformer from "./ReactHotLoaderTransformer"; +import Transformer from "./Transformer"; +/** + * Class for editing import statements when we are keeping the code as ESM. We still need to remove + * type-only imports in TypeScript and Flow. + */ +export default class ESMImportTransformer extends Transformer { + readonly tokens: TokenProcessor; + readonly nameManager: NameManager; + readonly helperManager: HelperManager; + readonly reactHotLoaderTransformer: ReactHotLoaderTransformer | null; + readonly isTypeScriptTransformEnabled: boolean; + readonly isFlowTransformEnabled: boolean; + readonly keepUnusedImports: boolean; + private nonTypeIdentifiers; + private declarationInfo; + private injectCreateRequireForImportRequire; + constructor(tokens: TokenProcessor, nameManager: NameManager, helperManager: HelperManager, reactHotLoaderTransformer: ReactHotLoaderTransformer | null, isTypeScriptTransformEnabled: boolean, isFlowTransformEnabled: boolean, keepUnusedImports: boolean, options: Options); + process(): boolean; + private processImportEquals; + private processImport; + /** + * Remove type bindings from this import, leaving the rest of the import intact. + * + * Return true if this import was ONLY types, and thus is eligible for removal. This will bail out + * of the replacement operation, so we can return early here. + */ + private removeImportTypeBindings; + private shouldAutomaticallyElideImportedName; + private processExportDefault; + /** + * Handle a statement with one of these forms: + * export {a, type b}; + * export {c, type d} from 'foo'; + * + * In both cases, any explicit type exports should be removed. In the first + * case, we also need to handle implicit export elision for names declared as + * types. In the second case, we must NOT do implicit named export elision, + * but we must remove the runtime import if all exports are type exports. + */ + private processNamedExports; + /** + * ESM elides all imports with the rule that we only elide if we see that it's + * a type and never see it as a value. This is in contrast to CJS, which + * elides imports that are completely unknown. + */ + private shouldElideExportedName; +} diff --git a/node_modules/sucrase/dist/types/transformers/FlowTransformer.d.ts b/node_modules/sucrase/dist/types/transformers/FlowTransformer.d.ts new file mode 100644 index 0000000..8a85ac4 --- /dev/null +++ b/node_modules/sucrase/dist/types/transformers/FlowTransformer.d.ts @@ -0,0 +1,79 @@ +import type TokenProcessor from "../TokenProcessor"; +import type RootTransformer from "./RootTransformer"; +import Transformer from "./Transformer"; +export default class FlowTransformer extends Transformer { + readonly rootTransformer: RootTransformer; + readonly tokens: TokenProcessor; + readonly isImportsTransformEnabled: boolean; + constructor(rootTransformer: RootTransformer, tokens: TokenProcessor, isImportsTransformEnabled: boolean); + process(): boolean; + /** + * Handle a declaration like: + * export enum E ... + * + * With this imports transform, this becomes: + * const E = [[enum]]; exports.E = E; + * + * otherwise, it becomes: + * export const E = [[enum]]; + */ + processNamedExportEnum(): void; + /** + * Handle a declaration like: + * export default enum E + * + * With the imports transform, this becomes: + * const E = [[enum]]; exports.default = E; + * + * otherwise, it becomes: + * const E = [[enum]]; export default E; + */ + processDefaultExportEnum(): void; + /** + * Transpile flow enums to invoke the "flow-enums-runtime" library. + * + * Currently, the transpiled code always uses `require("flow-enums-runtime")`, + * but if future flexibility is needed, we could expose a config option for + * this string (similar to configurable JSX). Even when targeting ESM, the + * default behavior of babel-plugin-transform-flow-enums is to use require + * rather than injecting an import. + * + * Flow enums are quite a bit simpler than TS enums and have some convenient + * constraints: + * - Element initializers must be either always present or always absent. That + * means that we can use fixed lookahead on the first element (if any) and + * assume that all elements are like that. + * - The right-hand side of an element initializer must be a literal value, + * not a complex expression and not referencing other elements. That means + * we can simply copy a single token. + * + * Enums can be broken up into three basic cases: + * + * Mirrored enums: + * enum E {A, B} + * -> + * const E = require("flow-enums-runtime").Mirrored(["A", "B"]); + * + * Initializer enums: + * enum E {A = 1, B = 2} + * -> + * const E = require("flow-enums-runtime")({A: 1, B: 2}); + * + * Symbol enums: + * enum E of symbol {A, B} + * -> + * const E = require("flow-enums-runtime")({A: Symbol("A"), B: Symbol("B")}); + * + * We can statically detect which of the three cases this is by looking at the + * "of" declaration (if any) and seeing if the first element has an initializer. + * Since the other transform details are so similar between the three cases, we + * use a single implementation and vary the transform within processEnumElement + * based on case. + */ + processEnum(): void; + /** + * Process an individual enum element, producing either an array element or an + * object element based on what type of enum this is. + */ + processEnumElement(isSymbolEnum: boolean, hasInitializers: boolean): void; +} diff --git a/node_modules/sucrase/dist/types/transformers/JSXTransformer.d.ts b/node_modules/sucrase/dist/types/transformers/JSXTransformer.d.ts new file mode 100644 index 0000000..ca7228b --- /dev/null +++ b/node_modules/sucrase/dist/types/transformers/JSXTransformer.d.ts @@ -0,0 +1,144 @@ +import type CJSImportProcessor from "../CJSImportProcessor"; +import type { Options } from "../index"; +import type NameManager from "../NameManager"; +import { JSXRole } from "../parser/tokenizer"; +import type TokenProcessor from "../TokenProcessor"; +import { type JSXPragmaInfo } from "../util/getJSXPragmaInfo"; +import type RootTransformer from "./RootTransformer"; +import Transformer from "./Transformer"; +export default class JSXTransformer extends Transformer { + readonly rootTransformer: RootTransformer; + readonly tokens: TokenProcessor; + readonly importProcessor: CJSImportProcessor | null; + readonly nameManager: NameManager; + readonly options: Options; + jsxPragmaInfo: JSXPragmaInfo; + jsxImportSource: string; + isAutomaticRuntime: boolean; + lastLineNumber: number; + lastIndex: number; + filenameVarName: string | null; + esmAutomaticImportNameResolutions: { + [name: string]: string; + }; + cjsAutomaticModuleNameResolutions: { + [path: string]: string; + }; + constructor(rootTransformer: RootTransformer, tokens: TokenProcessor, importProcessor: CJSImportProcessor | null, nameManager: NameManager, options: Options); + process(): boolean; + getPrefixCode(): string; + processJSXTag(): void; + getElementLocationCode(firstTokenStart: number): string; + /** + * Get the line number for this source position. This is calculated lazily and + * must be called in increasing order by index. + */ + getLineNumberForIndex(index: number): number; + /** + * Convert the current JSX element to a call to jsx, jsxs, or jsxDEV. This is + * the primary transformation for the automatic transform. + * + * Example: + *
Hello{x}
+ * becomes + * jsxs('div', {a: 1, children: ["Hello", x]}, 2) + */ + transformTagToJSXFunc(elementLocationCode: string | null, jsxRole: JSXRole): void; + /** + * Convert the current JSX element to a createElement call. In the classic + * runtime, this is the only case. In the automatic runtime, this is called + * as a fallback in some situations. + * + * Example: + *
Hello{x}
+ * becomes + * React.createElement('div', {a: 1, key: 2}, "Hello", x) + */ + transformTagToCreateElement(elementLocationCode: string | null): void; + /** + * Get the code for the relevant function for this context: jsx, jsxs, + * or jsxDEV. The following open-paren is included as well. + * + * These functions are only used for the automatic runtime, so they are always + * auto-imported, but the auto-import will be either CJS or ESM based on the + * target module format. + */ + getJSXFuncInvocationCode(isStatic: boolean): string; + /** + * Return the code to use for the createElement function, e.g. + * `React.createElement`, including the following open-paren. + * + * This is the main function to use for the classic runtime. For the + * automatic runtime, this function is used as a fallback function to + * preserve behavior when there is a prop spread followed by an explicit + * key. In that automatic runtime case, the function should be automatically + * imported. + */ + getCreateElementInvocationCode(): string; + /** + * Return the code to use as the component when compiling a shorthand + * fragment, e.g. `React.Fragment`. + * + * This may be called from either the classic or automatic runtime, and + * the value should be auto-imported for the automatic runtime. + */ + getFragmentCode(): string; + /** + * Return code that invokes the given function. + * + * When the imports transform is enabled, use the CJSImportTransformer + * strategy of using `.call(void 0, ...` to avoid passing a `this` value in a + * situation that would otherwise look like a method call. + */ + claimAutoImportedFuncInvocation(funcName: string, importPathSuffix: string): string; + claimAutoImportedName(funcName: string, importPathSuffix: string): string; + /** + * Process the first part of a tag, before any props. + */ + processTagIntro(): void; + /** + * Starting at the beginning of the props, add the props argument to + * React.createElement, including the comma before it. + */ + processPropsObjectWithDevInfo(elementLocationCode: string | null): void; + /** + * Transform the core part of the props, assuming that a { has already been + * inserted before us and that a } will be inserted after us. + * + * If extractKeyCode is true (i.e. when using any jsx... function), any prop + * named "key" has its code captured and returned rather than being emitted to + * the output code. This shifts line numbers, and emitting the code later will + * correct line numbers again. If no key is found or if extractKeyCode is + * false, this function returns null. + */ + processProps(extractKeyCode: boolean): string | null; + processPropName(propName: string): void; + processPropValue(): void; + processStringPropValue(): void; + /** + * Starting in the middle of the props object literal, produce an additional + * prop for the children and close the object literal. + */ + processAutomaticChildrenAndEndProps(jsxRole: JSXRole): void; + /** + * Transform children into a comma-separated list, which will be either + * arguments to createElement or array elements of a children prop. + */ + processChildren(needsInitialComma: boolean): void; + /** + * Turn a JSX text element into a string literal, or nothing at all if the JSX + * text resolves to the empty string. + * + * Returns true if a string literal is emitted, false otherwise. + */ + processChildTextElement(needsComma: boolean): boolean; + getDevSource(elementLocationCode: string): string; + getFilenameVarName(): string; +} +/** + * Spec for identifiers: https://tc39.github.io/ecma262/#prod-IdentifierStart. + * + * Really only treat anything starting with a-z as tag names. `_`, `$`, `é` + * should be treated as component names + */ +export declare function startsWithLowerCase(s: string): boolean; diff --git a/node_modules/sucrase/dist/types/transformers/JestHoistTransformer.d.ts b/node_modules/sucrase/dist/types/transformers/JestHoistTransformer.d.ts new file mode 100644 index 0000000..6a8b9df --- /dev/null +++ b/node_modules/sucrase/dist/types/transformers/JestHoistTransformer.d.ts @@ -0,0 +1,32 @@ +import type CJSImportProcessor from "../CJSImportProcessor"; +import type NameManager from "../NameManager"; +import type TokenProcessor from "../TokenProcessor"; +import type RootTransformer from "./RootTransformer"; +import Transformer from "./Transformer"; +/** + * Implementation of babel-plugin-jest-hoist, which hoists up some jest method + * calls above the imports to allow them to override other imports. + * + * To preserve line numbers, rather than directly moving the jest.mock code, we + * wrap each invocation in a function statement and then call the function from + * the top of the file. + */ +export default class JestHoistTransformer extends Transformer { + readonly rootTransformer: RootTransformer; + readonly tokens: TokenProcessor; + readonly nameManager: NameManager; + readonly importProcessor: CJSImportProcessor | null; + private readonly hoistedFunctionNames; + constructor(rootTransformer: RootTransformer, tokens: TokenProcessor, nameManager: NameManager, importProcessor: CJSImportProcessor | null); + process(): boolean; + getHoistedCode(): string; + /** + * Extracts any methods calls on the jest-object that should be hoisted. + * + * According to the jest docs, https://jestjs.io/docs/en/jest-object#jestmockmodulename-factory-options, + * mock, unmock, enableAutomock, disableAutomock, are the methods that should be hoisted. + * + * We do not apply the same checks of the arguments as babel-plugin-jest-hoist does. + */ + private extractHoistedCalls; +} diff --git a/node_modules/sucrase/dist/types/transformers/NumericSeparatorTransformer.d.ts b/node_modules/sucrase/dist/types/transformers/NumericSeparatorTransformer.d.ts new file mode 100644 index 0000000..69a1cf5 --- /dev/null +++ b/node_modules/sucrase/dist/types/transformers/NumericSeparatorTransformer.d.ts @@ -0,0 +1,7 @@ +import type TokenProcessor from "../TokenProcessor"; +import Transformer from "./Transformer"; +export default class NumericSeparatorTransformer extends Transformer { + readonly tokens: TokenProcessor; + constructor(tokens: TokenProcessor); + process(): boolean; +} diff --git a/node_modules/sucrase/dist/types/transformers/OptionalCatchBindingTransformer.d.ts b/node_modules/sucrase/dist/types/transformers/OptionalCatchBindingTransformer.d.ts new file mode 100644 index 0000000..d381e5a --- /dev/null +++ b/node_modules/sucrase/dist/types/transformers/OptionalCatchBindingTransformer.d.ts @@ -0,0 +1,9 @@ +import type NameManager from "../NameManager"; +import type TokenProcessor from "../TokenProcessor"; +import Transformer from "./Transformer"; +export default class OptionalCatchBindingTransformer extends Transformer { + readonly tokens: TokenProcessor; + readonly nameManager: NameManager; + constructor(tokens: TokenProcessor, nameManager: NameManager); + process(): boolean; +} diff --git a/node_modules/sucrase/dist/types/transformers/OptionalChainingNullishTransformer.d.ts b/node_modules/sucrase/dist/types/transformers/OptionalChainingNullishTransformer.d.ts new file mode 100644 index 0000000..d468029 --- /dev/null +++ b/node_modules/sucrase/dist/types/transformers/OptionalChainingNullishTransformer.d.ts @@ -0,0 +1,36 @@ +import type NameManager from "../NameManager"; +import type TokenProcessor from "../TokenProcessor"; +import Transformer from "./Transformer"; +/** + * Transformer supporting the optional chaining and nullish coalescing operators. + * + * Tech plan here: + * https://github.com/alangpierce/sucrase/wiki/Sucrase-Optional-Chaining-and-Nullish-Coalescing-Technical-Plan + * + * The prefix and suffix code snippets are handled by TokenProcessor, and this transformer handles + * the operators themselves. + */ +export default class OptionalChainingNullishTransformer extends Transformer { + readonly tokens: TokenProcessor; + readonly nameManager: NameManager; + constructor(tokens: TokenProcessor, nameManager: NameManager); + process(): boolean; + /** + * Determine if the current token is the last of its chain, so that we know whether it's eligible + * to have a delete op inserted. + * + * We can do this by walking forward until we determine one way or another. Each + * isOptionalChainStart token must be paired with exactly one isOptionalChainEnd token after it in + * a nesting way, so we can track depth and walk to the end of the chain (the point where the + * depth goes negative) and see if any other subscript token is after us in the chain. + */ + isLastSubscriptInChain(): boolean; + /** + * Determine if we are the open-paren in an expression like super.a()?.b. + * + * We can do this by walking backward to find the previous subscript. If that subscript was + * preceded by a super, then we must be the subscript after it, so if this is a call expression, + * we'll need to attach the right context. + */ + justSkippedSuper(): boolean; +} diff --git a/node_modules/sucrase/dist/types/transformers/ReactDisplayNameTransformer.d.ts b/node_modules/sucrase/dist/types/transformers/ReactDisplayNameTransformer.d.ts new file mode 100644 index 0000000..56ed86e --- /dev/null +++ b/node_modules/sucrase/dist/types/transformers/ReactDisplayNameTransformer.d.ts @@ -0,0 +1,29 @@ +import type CJSImportProcessor from "../CJSImportProcessor"; +import type { Options } from "../index"; +import type TokenProcessor from "../TokenProcessor"; +import type RootTransformer from "./RootTransformer"; +import Transformer from "./Transformer"; +/** + * Implementation of babel-plugin-transform-react-display-name, which adds a + * display name to usages of React.createClass and createReactClass. + */ +export default class ReactDisplayNameTransformer extends Transformer { + readonly rootTransformer: RootTransformer; + readonly tokens: TokenProcessor; + readonly importProcessor: CJSImportProcessor | null; + readonly options: Options; + constructor(rootTransformer: RootTransformer, tokens: TokenProcessor, importProcessor: CJSImportProcessor | null, options: Options); + process(): boolean; + /** + * This is called with the token position at the open-paren. + */ + private tryProcessCreateClassCall; + private findDisplayName; + private getDisplayNameFromFilename; + /** + * We only want to add a display name when this is a function call containing + * one argument, which is an object literal without `displayName` as an + * existing key. + */ + private classNeedsDisplayName; +} diff --git a/node_modules/sucrase/dist/types/transformers/ReactHotLoaderTransformer.d.ts b/node_modules/sucrase/dist/types/transformers/ReactHotLoaderTransformer.d.ts new file mode 100644 index 0000000..0221216 --- /dev/null +++ b/node_modules/sucrase/dist/types/transformers/ReactHotLoaderTransformer.d.ts @@ -0,0 +1,12 @@ +import type TokenProcessor from "../TokenProcessor"; +import Transformer from "./Transformer"; +export default class ReactHotLoaderTransformer extends Transformer { + readonly tokens: TokenProcessor; + readonly filePath: string; + private extractedDefaultExportName; + constructor(tokens: TokenProcessor, filePath: string); + setExtractedDefaultExportName(extractedDefaultExportName: string): void; + getPrefixCode(): string; + getSuffixCode(): string; + process(): boolean; +} diff --git a/node_modules/sucrase/dist/types/transformers/RootTransformer.d.ts b/node_modules/sucrase/dist/types/transformers/RootTransformer.d.ts new file mode 100644 index 0000000..07a0173 --- /dev/null +++ b/node_modules/sucrase/dist/types/transformers/RootTransformer.d.ts @@ -0,0 +1,52 @@ +import type { Options, SucraseContext, Transform } from "../index"; +import { type ClassInfo } from "../util/getClassInfo"; +export interface RootTransformerResult { + code: string; + mappings: Array; +} +export default class RootTransformer { + private transformers; + private nameManager; + private tokens; + private generatedVariables; + private isImportsTransformEnabled; + private isReactHotLoaderTransformEnabled; + private disableESTransforms; + private helperManager; + constructor(sucraseContext: SucraseContext, transforms: Array, enableLegacyBabel5ModuleInterop: boolean, options: Options); + transform(): RootTransformerResult; + processBalancedCode(): void; + processToken(): void; + /** + * Skip past a class with a name and return that name. + */ + processNamedClass(): string; + processClass(): void; + /** + * We want to just handle class fields in all contexts, since TypeScript supports them. Later, + * when some JS implementations support class fields, this should be made optional. + */ + processClassBody(classInfo: ClassInfo, className: string | null): void; + makeConstructorInitCode(constructorInitializerStatements: Array, instanceInitializerNames: Array, className: string): string; + /** + * Normally it's ok to simply remove type tokens, but we need to be more careful when dealing with + * arrow function return types since they can confuse the parser. In that case, we want to move + * the close-paren to the same line as the arrow. + * + * See https://github.com/alangpierce/sucrase/issues/391 for more details. + */ + processPossibleArrowParamEnd(): boolean; + /** + * An async arrow function might be of the form: + * + * async < + * T + * >() => {} + * + * in which case, removing the type parameters will cause a syntax error. Detect this case and + * move the open-paren earlier. + */ + processPossibleAsyncArrowWithTypeParams(): boolean; + processPossibleTypeRange(): boolean; + shiftMappings(mappings: Array, prefixLength: number): Array; +} diff --git a/node_modules/sucrase/dist/types/transformers/Transformer.d.ts b/node_modules/sucrase/dist/types/transformers/Transformer.d.ts new file mode 100644 index 0000000..35c18b1 --- /dev/null +++ b/node_modules/sucrase/dist/types/transformers/Transformer.d.ts @@ -0,0 +1,6 @@ +export default abstract class Transformer { + abstract process(): boolean; + getPrefixCode(): string; + getHoistedCode(): string; + getSuffixCode(): string; +} diff --git a/node_modules/sucrase/dist/types/transformers/TypeScriptTransformer.d.ts b/node_modules/sucrase/dist/types/transformers/TypeScriptTransformer.d.ts new file mode 100644 index 0000000..6e9c9d3 --- /dev/null +++ b/node_modules/sucrase/dist/types/transformers/TypeScriptTransformer.d.ts @@ -0,0 +1,104 @@ +import type { Token } from "../parser/tokenizer"; +import type TokenProcessor from "../TokenProcessor"; +import type RootTransformer from "./RootTransformer"; +import Transformer from "./Transformer"; +export default class TypeScriptTransformer extends Transformer { + readonly rootTransformer: RootTransformer; + readonly tokens: TokenProcessor; + readonly isImportsTransformEnabled: boolean; + constructor(rootTransformer: RootTransformer, tokens: TokenProcessor, isImportsTransformEnabled: boolean); + process(): boolean; + processEnum(isExport?: boolean): void; + /** + * Transform an enum into equivalent JS. This has complexity in a few places: + * - TS allows string enums, numeric enums, and a mix of the two styles within an enum. + * - Enum keys are allowed to be referenced in later enum values. + * - Enum keys are allowed to be strings. + * - When enum values are omitted, they should follow an auto-increment behavior. + */ + processEnumBody(enumName: string): void; + /** + * Detect name information about this enum key, which will be used to determine which code to emit + * and whether we should declare a variable as part of this declaration. + * + * Some cases to keep in mind: + * - Enum keys can be implicitly referenced later, e.g. `X = 1, Y = X`. In Sucrase, we implement + * this by declaring a variable `X` so that later expressions can use it. + * - In addition to the usual identifier key syntax, enum keys are allowed to be string literals, + * e.g. `"hello world" = 3,`. Template literal syntax is NOT allowed. + * - Even if the enum key is defined as a string literal, it may still be referenced by identifier + * later, e.g. `"X" = 1, Y = X`. That means that we need to detect whether or not a string + * literal is identifier-like and emit a variable if so, even if the declaration did not use an + * identifier. + * - Reserved keywords like `break` are valid enum keys, but are not valid to be referenced later + * and would be a syntax error if we emitted a variable, so we need to skip the variable + * declaration in those cases. + * + * The variableName return value captures these nuances: if non-null, we can and must emit a + * variable declaration, and if null, we can't and shouldn't. + */ + extractEnumKeyInfo(nameToken: Token): { + nameStringCode: string; + variableName: string | null; + }; + /** + * Handle an enum member where the RHS is just a string literal (not omitted, not a number, and + * not a complex expression). This is the typical form for TS string enums, and in this case, we + * do *not* create a reverse mapping. + * + * This is called after deleting the key token, when the token processor is at the equals sign. + * + * Example 1: + * someKey = "some value" + * -> + * const someKey = "some value"; MyEnum["someKey"] = someKey; + * + * Example 2: + * "some key" = "some value" + * -> + * MyEnum["some key"] = "some value"; + */ + processStringLiteralEnumMember(enumName: string, nameStringCode: string, variableName: string | null): void; + /** + * Handle an enum member initialized with an expression on the right-hand side (other than a + * string literal). In these cases, we should transform the expression and emit code that sets up + * a reverse mapping. + * + * The TypeScript implementation of this operation distinguishes between expressions that can be + * "constant folded" at compile time (i.e. consist of number literals and simple math operations + * on those numbers) and ones that are dynamic. For constant expressions, it emits the resolved + * numeric value, and auto-incrementing is only allowed in that case. Evaluating expressions at + * compile time would add significant complexity to Sucrase, so Sucrase instead leaves the + * expression as-is, and will later emit something like `MyEnum["previousKey"] + 1` to implement + * auto-incrementing. + * + * This is called after deleting the key token, when the token processor is at the equals sign. + * + * Example 1: + * someKey = 1 + 1 + * -> + * const someKey = 1 + 1; MyEnum[MyEnum["someKey"] = someKey] = "someKey"; + * + * Example 2: + * "some key" = 1 + 1 + * -> + * MyEnum[MyEnum["some key"] = 1 + 1] = "some key"; + */ + processExplicitValueEnumMember(enumName: string, nameStringCode: string, variableName: string | null): void; + /** + * Handle an enum member with no right-hand side expression. In this case, the value is the + * previous value plus 1, or 0 if there was no previous value. We should also always emit a + * reverse mapping. + * + * Example 1: + * someKey2 + * -> + * const someKey2 = someKey1 + 1; MyEnum[MyEnum["someKey2"] = someKey2] = "someKey2"; + * + * Example 2: + * "some key 2" + * -> + * MyEnum[MyEnum["some key 2"] = someKey1 + 1] = "some key 2"; + */ + processImplicitValueEnumMember(enumName: string, nameStringCode: string, variableName: string | null, previousValueCode: string | null): void; +} diff --git a/node_modules/sucrase/dist/types/util/elideImportEquals.d.ts b/node_modules/sucrase/dist/types/util/elideImportEquals.d.ts new file mode 100644 index 0000000..d04bb71 --- /dev/null +++ b/node_modules/sucrase/dist/types/util/elideImportEquals.d.ts @@ -0,0 +1,2 @@ +import type TokenProcessor from "../TokenProcessor"; +export default function elideImportEquals(tokens: TokenProcessor): void; diff --git a/node_modules/sucrase/dist/types/util/formatTokens.d.ts b/node_modules/sucrase/dist/types/util/formatTokens.d.ts new file mode 100644 index 0000000..fe5fb1e --- /dev/null +++ b/node_modules/sucrase/dist/types/util/formatTokens.d.ts @@ -0,0 +1,2 @@ +import type { Token } from "../parser/tokenizer"; +export default function formatTokens(code: string, tokens: Array): string; diff --git a/node_modules/sucrase/dist/types/util/getClassInfo.d.ts b/node_modules/sucrase/dist/types/util/getClassInfo.d.ts new file mode 100644 index 0000000..f4309cb --- /dev/null +++ b/node_modules/sucrase/dist/types/util/getClassInfo.d.ts @@ -0,0 +1,34 @@ +import type NameManager from "../NameManager"; +import type TokenProcessor from "../TokenProcessor"; +import type RootTransformer from "../transformers/RootTransformer"; +export interface ClassHeaderInfo { + isExpression: boolean; + className: string | null; + hasSuperclass: boolean; +} +export interface TokenRange { + start: number; + end: number; +} +export interface FieldInfo extends TokenRange { + equalsIndex: number; + initializerName: string; +} +/** + * Information about a class returned to inform the implementation of class fields and constructor + * initializers. + */ +export interface ClassInfo { + headerInfo: ClassHeaderInfo; + constructorInitializerStatements: Array; + instanceInitializerNames: Array; + staticInitializerNames: Array; + constructorInsertPos: number | null; + fields: Array; + rangesToRemove: Array; +} +/** + * Get information about the class fields for this class, given a token processor pointing to the + * open-brace at the start of the class. + */ +export default function getClassInfo(rootTransformer: RootTransformer, tokens: TokenProcessor, nameManager: NameManager, disableESTransforms: boolean): ClassInfo; diff --git a/node_modules/sucrase/dist/types/util/getDeclarationInfo.d.ts b/node_modules/sucrase/dist/types/util/getDeclarationInfo.d.ts new file mode 100644 index 0000000..04122ba --- /dev/null +++ b/node_modules/sucrase/dist/types/util/getDeclarationInfo.d.ts @@ -0,0 +1,18 @@ +import type TokenProcessor from "../TokenProcessor"; +export interface DeclarationInfo { + typeDeclarations: Set; + valueDeclarations: Set; +} +export declare const EMPTY_DECLARATION_INFO: DeclarationInfo; +/** + * Get all top-level identifiers that should be preserved when exported in TypeScript. + * + * Examples: + * - If an identifier is declared as `const x`, then `export {x}` should be preserved. + * - If it's declared as `type x`, then `export {x}` should be removed. + * - If it's declared as both `const x` and `type x`, then the export should be preserved. + * - Classes and enums should be preserved (even though they also introduce types). + * - Imported identifiers should be preserved since we don't have enough information to + * rule them out. --isolatedModules disallows re-exports, which catches errors here. + */ +export default function getDeclarationInfo(tokens: TokenProcessor): DeclarationInfo; diff --git a/node_modules/sucrase/dist/types/util/getIdentifierNames.d.ts b/node_modules/sucrase/dist/types/util/getIdentifierNames.d.ts new file mode 100644 index 0000000..9e0d5a2 --- /dev/null +++ b/node_modules/sucrase/dist/types/util/getIdentifierNames.d.ts @@ -0,0 +1,5 @@ +import type { Token } from "../parser/tokenizer"; +/** + * Get all identifier names in the code, in order, including duplicates. + */ +export default function getIdentifierNames(code: string, tokens: Array): Array; diff --git a/node_modules/sucrase/dist/types/util/getImportExportSpecifierInfo.d.ts b/node_modules/sucrase/dist/types/util/getImportExportSpecifierInfo.d.ts new file mode 100644 index 0000000..44d53fc --- /dev/null +++ b/node_modules/sucrase/dist/types/util/getImportExportSpecifierInfo.d.ts @@ -0,0 +1,36 @@ +import type TokenProcessor from "../TokenProcessor"; +export type ImportExportSpecifierInfo = { + isType: false; + leftName: string; + rightName: string; + endIndex: number; +} | { + isType: true; + leftName: null; + rightName: null; + endIndex: number; +}; +/** + * Determine information about this named import or named export specifier. + * + * This syntax is the `a` from statements like these: + * import {A} from "./foo"; + * export {A}; + * export {A} from "./foo"; + * + * As it turns out, we can exactly characterize the syntax meaning by simply + * counting the number of tokens, which can be from 1 to 4: + * {A} + * {type A} + * {A as B} + * {type A as B} + * + * In the type case, we never actually need the names in practice, so don't get + * them. + * + * TODO: There's some redundancy with the type detection here and the isType + * flag that's already present on tokens in TS mode. This function could + * potentially be simplified and/or pushed to the call sites to avoid the object + * allocation. + */ +export default function getImportExportSpecifierInfo(tokens: TokenProcessor, index?: number): ImportExportSpecifierInfo; diff --git a/node_modules/sucrase/dist/types/util/getJSXPragmaInfo.d.ts b/node_modules/sucrase/dist/types/util/getJSXPragmaInfo.d.ts new file mode 100644 index 0000000..fec9a48 --- /dev/null +++ b/node_modules/sucrase/dist/types/util/getJSXPragmaInfo.d.ts @@ -0,0 +1,8 @@ +import type { Options } from "../index"; +export interface JSXPragmaInfo { + base: string; + suffix: string; + fragmentBase: string; + fragmentSuffix: string; +} +export default function getJSXPragmaInfo(options: Options): JSXPragmaInfo; diff --git a/node_modules/sucrase/dist/types/util/getNonTypeIdentifiers.d.ts b/node_modules/sucrase/dist/types/util/getNonTypeIdentifiers.d.ts new file mode 100644 index 0000000..3e40768 --- /dev/null +++ b/node_modules/sucrase/dist/types/util/getNonTypeIdentifiers.d.ts @@ -0,0 +1,3 @@ +import type { Options } from "../index"; +import type TokenProcessor from "../TokenProcessor"; +export declare function getNonTypeIdentifiers(tokens: TokenProcessor, options: Options): Set; diff --git a/node_modules/sucrase/dist/types/util/getTSImportedNames.d.ts b/node_modules/sucrase/dist/types/util/getTSImportedNames.d.ts new file mode 100644 index 0000000..bc236e4 --- /dev/null +++ b/node_modules/sucrase/dist/types/util/getTSImportedNames.d.ts @@ -0,0 +1,9 @@ +import type TokenProcessor from "../TokenProcessor"; +/** + * Special case code to scan for imported names in ESM TypeScript. We need to do this so we can + * properly get globals so we can compute shadowed globals. + * + * This is similar to logic in CJSImportProcessor, but trimmed down to avoid logic with CJS + * replacement and flow type imports. + */ +export default function getTSImportedNames(tokens: TokenProcessor): Set; diff --git a/node_modules/sucrase/dist/types/util/isAsyncOperation.d.ts b/node_modules/sucrase/dist/types/util/isAsyncOperation.d.ts new file mode 100644 index 0000000..3ad0036 --- /dev/null +++ b/node_modules/sucrase/dist/types/util/isAsyncOperation.d.ts @@ -0,0 +1,11 @@ +import type TokenProcessor from "../TokenProcessor"; +/** + * Determine whether this optional chain or nullish coalescing operation has any await statements in + * it. If so, we'll need to transpile to an async operation. + * + * We compute this by walking the length of the operation and returning true if we see an await + * keyword used as a real await (rather than an object key or property access). Nested optional + * chain/nullish operations need to be tracked but don't silence await, but a nested async function + * (or any other nested scope) will make the await not count. + */ +export default function isAsyncOperation(tokens: TokenProcessor): boolean; diff --git a/node_modules/sucrase/dist/types/util/isExportFrom.d.ts b/node_modules/sucrase/dist/types/util/isExportFrom.d.ts new file mode 100644 index 0000000..abf0b4d --- /dev/null +++ b/node_modules/sucrase/dist/types/util/isExportFrom.d.ts @@ -0,0 +1,6 @@ +import type TokenProcessor from "../TokenProcessor"; +/** + * Starting at `export {`, look ahead and return `true` if this is an + * `export {...} from` statement and `false` if this is a plain multi-export. + */ +export default function isExportFrom(tokens: TokenProcessor): boolean; diff --git a/node_modules/sucrase/dist/types/util/isIdentifier.d.ts b/node_modules/sucrase/dist/types/util/isIdentifier.d.ts new file mode 100644 index 0000000..b39af27 --- /dev/null +++ b/node_modules/sucrase/dist/types/util/isIdentifier.d.ts @@ -0,0 +1,8 @@ +/** + * Determine if the given name is a legal variable name. + * + * This is needed when transforming TypeScript enums; if an enum key is a valid + * variable name, it might be referenced later in the enum, so we need to + * declare a variable. + */ +export default function isIdentifier(name: string): boolean; diff --git a/node_modules/sucrase/dist/types/util/removeMaybeImportAttributes.d.ts b/node_modules/sucrase/dist/types/util/removeMaybeImportAttributes.d.ts new file mode 100644 index 0000000..0d7ca6e --- /dev/null +++ b/node_modules/sucrase/dist/types/util/removeMaybeImportAttributes.d.ts @@ -0,0 +1,6 @@ +import type TokenProcessor from "../TokenProcessor"; +/** + * Starting at a potential `with` or (legacy) `assert` token, remove the import + * attributes if they exist. + */ +export declare function removeMaybeImportAttributes(tokens: TokenProcessor): void; diff --git a/node_modules/sucrase/dist/types/util/shouldElideDefaultExport.d.ts b/node_modules/sucrase/dist/types/util/shouldElideDefaultExport.d.ts new file mode 100644 index 0000000..f774c14 --- /dev/null +++ b/node_modules/sucrase/dist/types/util/shouldElideDefaultExport.d.ts @@ -0,0 +1,6 @@ +import type TokenProcessor from "../TokenProcessor"; +import type { DeclarationInfo } from "./getDeclarationInfo"; +/** + * Common method sharing code between CJS and ESM cases, since they're the same here. + */ +export default function shouldElideDefaultExport(isTypeScriptTransformEnabled: boolean, keepUnusedImports: boolean, tokens: TokenProcessor, declarationInfo: DeclarationInfo): boolean; diff --git a/node_modules/sucrase/dist/util/elideImportEquals.js b/node_modules/sucrase/dist/util/elideImportEquals.js new file mode 100644 index 0000000..c6ef30f --- /dev/null +++ b/node_modules/sucrase/dist/util/elideImportEquals.js @@ -0,0 +1,29 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _types = require('../parser/tokenizer/types'); + + + function elideImportEquals(tokens) { + // import + tokens.removeInitialToken(); + // name + tokens.removeToken(); + // = + tokens.removeToken(); + // name or require + tokens.removeToken(); + // Handle either `import A = require('A')` or `import A = B.C.D`. + if (tokens.matches1(_types.TokenType.parenL)) { + // ( + tokens.removeToken(); + // path string + tokens.removeToken(); + // ) + tokens.removeToken(); + } else { + while (tokens.matches1(_types.TokenType.dot)) { + // . + tokens.removeToken(); + // name + tokens.removeToken(); + } + } +} exports.default = elideImportEquals; diff --git a/node_modules/sucrase/dist/util/formatTokens.js b/node_modules/sucrase/dist/util/formatTokens.js new file mode 100644 index 0000000..c663633 --- /dev/null +++ b/node_modules/sucrase/dist/util/formatTokens.js @@ -0,0 +1,74 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _linesandcolumns = require('lines-and-columns'); var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns); + + +var _types = require('../parser/tokenizer/types'); + + function formatTokens(code, tokens) { + if (tokens.length === 0) { + return ""; + } + + const tokenKeys = Object.keys(tokens[0]).filter( + (k) => k !== "type" && k !== "value" && k !== "start" && k !== "end" && k !== "loc", + ); + const typeKeys = Object.keys(tokens[0].type).filter((k) => k !== "label" && k !== "keyword"); + + const headings = ["Location", "Label", "Raw", ...tokenKeys, ...typeKeys]; + + const lines = new (0, _linesandcolumns2.default)(code); + const rows = [headings, ...tokens.map(getTokenComponents)]; + const padding = headings.map(() => 0); + for (const components of rows) { + for (let i = 0; i < components.length; i++) { + padding[i] = Math.max(padding[i], components[i].length); + } + } + return rows + .map((components) => components.map((component, i) => component.padEnd(padding[i])).join(" ")) + .join("\n"); + + function getTokenComponents(token) { + const raw = code.slice(token.start, token.end); + return [ + formatRange(token.start, token.end), + _types.formatTokenType.call(void 0, token.type), + truncate(String(raw), 14), + // @ts-ignore: Intentional dynamic access by key. + ...tokenKeys.map((key) => formatValue(token[key], key)), + // @ts-ignore: Intentional dynamic access by key. + ...typeKeys.map((key) => formatValue(token.type[key], key)), + ]; + } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + function formatValue(value, key) { + if (value === true) { + return key; + } else if (value === false || value === null) { + return ""; + } else { + return String(value); + } + } + + function formatRange(start, end) { + return `${formatPos(start)}-${formatPos(end)}`; + } + + function formatPos(pos) { + const location = lines.locationForIndex(pos); + if (!location) { + return "Unknown"; + } else { + return `${location.line + 1}:${location.column + 1}`; + } + } +} exports.default = formatTokens; + +function truncate(s, length) { + if (s.length > length) { + return `${s.slice(0, length - 3)}...`; + } else { + return s; + } +} diff --git a/node_modules/sucrase/dist/util/getClassInfo.js b/node_modules/sucrase/dist/util/getClassInfo.js new file mode 100644 index 0000000..510a771 --- /dev/null +++ b/node_modules/sucrase/dist/util/getClassInfo.js @@ -0,0 +1,352 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); + +var _keywords = require('../parser/tokenizer/keywords'); +var _types = require('../parser/tokenizer/types'); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/** + * Get information about the class fields for this class, given a token processor pointing to the + * open-brace at the start of the class. + */ + function getClassInfo( + rootTransformer, + tokens, + nameManager, + disableESTransforms, +) { + const snapshot = tokens.snapshot(); + + const headerInfo = processClassHeader(tokens); + + let constructorInitializerStatements = []; + const instanceInitializerNames = []; + const staticInitializerNames = []; + let constructorInsertPos = null; + const fields = []; + const rangesToRemove = []; + + const classContextId = tokens.currentToken().contextId; + if (classContextId == null) { + throw new Error("Expected non-null class context ID on class open-brace."); + } + + tokens.nextToken(); + while (!tokens.matchesContextIdAndLabel(_types.TokenType.braceR, classContextId)) { + if (tokens.matchesContextual(_keywords.ContextualKeyword._constructor) && !tokens.currentToken().isType) { + ({constructorInitializerStatements, constructorInsertPos} = processConstructor(tokens)); + } else if (tokens.matches1(_types.TokenType.semi)) { + if (!disableESTransforms) { + rangesToRemove.push({start: tokens.currentIndex(), end: tokens.currentIndex() + 1}); + } + tokens.nextToken(); + } else if (tokens.currentToken().isType) { + tokens.nextToken(); + } else { + // Either a method or a field. Skip to the identifier part. + const statementStartIndex = tokens.currentIndex(); + let isStatic = false; + let isESPrivate = false; + let isDeclareOrAbstract = false; + while (isAccessModifier(tokens.currentToken())) { + if (tokens.matches1(_types.TokenType._static)) { + isStatic = true; + } + if (tokens.matches1(_types.TokenType.hash)) { + isESPrivate = true; + } + if (tokens.matches1(_types.TokenType._declare) || tokens.matches1(_types.TokenType._abstract)) { + isDeclareOrAbstract = true; + } + tokens.nextToken(); + } + if (isStatic && tokens.matches1(_types.TokenType.braceL)) { + // This is a static block, so don't process it in any special way. + skipToNextClassElement(tokens, classContextId); + continue; + } + if (isESPrivate) { + // Sucrase doesn't attempt to transpile private fields; just leave them as-is. + skipToNextClassElement(tokens, classContextId); + continue; + } + if ( + tokens.matchesContextual(_keywords.ContextualKeyword._constructor) && + !tokens.currentToken().isType + ) { + ({constructorInitializerStatements, constructorInsertPos} = processConstructor(tokens)); + continue; + } + + const nameStartIndex = tokens.currentIndex(); + skipFieldName(tokens); + if (tokens.matches1(_types.TokenType.lessThan) || tokens.matches1(_types.TokenType.parenL)) { + // This is a method, so nothing to process. + skipToNextClassElement(tokens, classContextId); + continue; + } + // There might be a type annotation that we need to skip. + while (tokens.currentToken().isType) { + tokens.nextToken(); + } + if (tokens.matches1(_types.TokenType.eq)) { + const equalsIndex = tokens.currentIndex(); + // This is an initializer, so we need to wrap in an initializer method. + const valueEnd = tokens.currentToken().rhsEndIndex; + if (valueEnd == null) { + throw new Error("Expected rhsEndIndex on class field assignment."); + } + tokens.nextToken(); + while (tokens.currentIndex() < valueEnd) { + rootTransformer.processToken(); + } + let initializerName; + if (isStatic) { + initializerName = nameManager.claimFreeName("__initStatic"); + staticInitializerNames.push(initializerName); + } else { + initializerName = nameManager.claimFreeName("__init"); + instanceInitializerNames.push(initializerName); + } + // Fields start at the name, so `static x = 1;` has a field range of `x = 1;`. + fields.push({ + initializerName, + equalsIndex, + start: nameStartIndex, + end: tokens.currentIndex(), + }); + } else if (!disableESTransforms || isDeclareOrAbstract) { + // This is a regular field declaration, like `x;`. With the class transform enabled, we just + // remove the line so that no output is produced. With the class transform disabled, we + // usually want to preserve the declaration (but still strip types), but if the `declare` + // or `abstract` keyword is specified, we should remove the line to avoid initializing the + // value to undefined. + rangesToRemove.push({start: statementStartIndex, end: tokens.currentIndex()}); + } + } + } + + tokens.restoreToSnapshot(snapshot); + if (disableESTransforms) { + // With ES transforms disabled, we don't want to transform regular class + // field declarations, and we don't need to do any additional tricks to + // reference the constructor for static init, but we still need to transform + // TypeScript field initializers defined as constructor parameters and we + // still need to remove `declare` fields. For now, we run the same code + // path but omit any field information, as if the class had no field + // declarations. In the future, when we fully drop the class fields + // transform, we can simplify this code significantly. + return { + headerInfo, + constructorInitializerStatements, + instanceInitializerNames: [], + staticInitializerNames: [], + constructorInsertPos, + fields: [], + rangesToRemove, + }; + } else { + return { + headerInfo, + constructorInitializerStatements, + instanceInitializerNames, + staticInitializerNames, + constructorInsertPos, + fields, + rangesToRemove, + }; + } +} exports.default = getClassInfo; + +/** + * Move the token processor to the next method/field in the class. + * + * To do that, we seek forward to the next start of a class name (either an open + * bracket or an identifier, or the closing curly brace), then seek backward to + * include any access modifiers. + */ +function skipToNextClassElement(tokens, classContextId) { + tokens.nextToken(); + while (tokens.currentToken().contextId !== classContextId) { + tokens.nextToken(); + } + while (isAccessModifier(tokens.tokenAtRelativeIndex(-1))) { + tokens.previousToken(); + } +} + +function processClassHeader(tokens) { + const classToken = tokens.currentToken(); + const contextId = classToken.contextId; + if (contextId == null) { + throw new Error("Expected context ID on class token."); + } + const isExpression = classToken.isExpression; + if (isExpression == null) { + throw new Error("Expected isExpression on class token."); + } + let className = null; + let hasSuperclass = false; + tokens.nextToken(); + if (tokens.matches1(_types.TokenType.name)) { + className = tokens.identifierName(); + } + while (!tokens.matchesContextIdAndLabel(_types.TokenType.braceL, contextId)) { + // If this has a superclass, there will always be an `extends` token. If it doesn't have a + // superclass, only type parameters and `implements` clauses can show up here, all of which + // consist only of type tokens. A declaration like `class A {` should *not* count + // as having a superclass. + if (tokens.matches1(_types.TokenType._extends) && !tokens.currentToken().isType) { + hasSuperclass = true; + } + tokens.nextToken(); + } + return {isExpression, className, hasSuperclass}; +} + +/** + * Extract useful information out of a constructor, starting at the "constructor" name. + */ +function processConstructor(tokens) + + + { + const constructorInitializerStatements = []; + + tokens.nextToken(); + const constructorContextId = tokens.currentToken().contextId; + if (constructorContextId == null) { + throw new Error("Expected context ID on open-paren starting constructor params."); + } + // Advance through parameters looking for access modifiers. + while (!tokens.matchesContextIdAndLabel(_types.TokenType.parenR, constructorContextId)) { + if (tokens.currentToken().contextId === constructorContextId) { + // Current token is an open paren or comma just before a param, so check + // that param for access modifiers. + tokens.nextToken(); + if (isAccessModifier(tokens.currentToken())) { + tokens.nextToken(); + while (isAccessModifier(tokens.currentToken())) { + tokens.nextToken(); + } + const token = tokens.currentToken(); + if (token.type !== _types.TokenType.name) { + throw new Error("Expected identifier after access modifiers in constructor arg."); + } + const name = tokens.identifierNameForToken(token); + constructorInitializerStatements.push(`this.${name} = ${name}`); + } + } else { + tokens.nextToken(); + } + } + // ) + tokens.nextToken(); + // Constructor type annotations are invalid, but skip them anyway since + // they're easy to skip. + while (tokens.currentToken().isType) { + tokens.nextToken(); + } + let constructorInsertPos = tokens.currentIndex(); + + // Advance through body looking for a super call. + let foundSuperCall = false; + while (!tokens.matchesContextIdAndLabel(_types.TokenType.braceR, constructorContextId)) { + if (!foundSuperCall && tokens.matches2(_types.TokenType._super, _types.TokenType.parenL)) { + tokens.nextToken(); + const superCallContextId = tokens.currentToken().contextId; + if (superCallContextId == null) { + throw new Error("Expected a context ID on the super call"); + } + while (!tokens.matchesContextIdAndLabel(_types.TokenType.parenR, superCallContextId)) { + tokens.nextToken(); + } + constructorInsertPos = tokens.currentIndex(); + foundSuperCall = true; + } + tokens.nextToken(); + } + // } + tokens.nextToken(); + + return {constructorInitializerStatements, constructorInsertPos}; +} + +/** + * Determine if this is any token that can go before the name in a method/field. + */ +function isAccessModifier(token) { + return [ + _types.TokenType._async, + _types.TokenType._get, + _types.TokenType._set, + _types.TokenType.plus, + _types.TokenType.minus, + _types.TokenType._readonly, + _types.TokenType._static, + _types.TokenType._public, + _types.TokenType._private, + _types.TokenType._protected, + _types.TokenType._override, + _types.TokenType._abstract, + _types.TokenType.star, + _types.TokenType._declare, + _types.TokenType.hash, + ].includes(token.type); +} + +/** + * The next token or set of tokens is either an identifier or an expression in square brackets, for + * a method or field name. + */ +function skipFieldName(tokens) { + if (tokens.matches1(_types.TokenType.bracketL)) { + const startToken = tokens.currentToken(); + const classContextId = startToken.contextId; + if (classContextId == null) { + throw new Error("Expected class context ID on computed name open bracket."); + } + while (!tokens.matchesContextIdAndLabel(_types.TokenType.bracketR, classContextId)) { + tokens.nextToken(); + } + tokens.nextToken(); + } else { + tokens.nextToken(); + } +} diff --git a/node_modules/sucrase/dist/util/getDeclarationInfo.js b/node_modules/sucrase/dist/util/getDeclarationInfo.js new file mode 100644 index 0000000..465fc06 --- /dev/null +++ b/node_modules/sucrase/dist/util/getDeclarationInfo.js @@ -0,0 +1,40 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _tokenizer = require('../parser/tokenizer'); +var _types = require('../parser/tokenizer/types'); + + + + + + + + const EMPTY_DECLARATION_INFO = { + typeDeclarations: new Set(), + valueDeclarations: new Set(), +}; exports.EMPTY_DECLARATION_INFO = EMPTY_DECLARATION_INFO; + +/** + * Get all top-level identifiers that should be preserved when exported in TypeScript. + * + * Examples: + * - If an identifier is declared as `const x`, then `export {x}` should be preserved. + * - If it's declared as `type x`, then `export {x}` should be removed. + * - If it's declared as both `const x` and `type x`, then the export should be preserved. + * - Classes and enums should be preserved (even though they also introduce types). + * - Imported identifiers should be preserved since we don't have enough information to + * rule them out. --isolatedModules disallows re-exports, which catches errors here. + */ + function getDeclarationInfo(tokens) { + const typeDeclarations = new Set(); + const valueDeclarations = new Set(); + for (let i = 0; i < tokens.tokens.length; i++) { + const token = tokens.tokens[i]; + if (token.type === _types.TokenType.name && _tokenizer.isTopLevelDeclaration.call(void 0, token)) { + if (token.isType) { + typeDeclarations.add(tokens.identifierNameForToken(token)); + } else { + valueDeclarations.add(tokens.identifierNameForToken(token)); + } + } + } + return {typeDeclarations, valueDeclarations}; +} exports.default = getDeclarationInfo; diff --git a/node_modules/sucrase/dist/util/getIdentifierNames.js b/node_modules/sucrase/dist/util/getIdentifierNames.js new file mode 100644 index 0000000..c0195ca --- /dev/null +++ b/node_modules/sucrase/dist/util/getIdentifierNames.js @@ -0,0 +1,15 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); +var _types = require('../parser/tokenizer/types'); + +/** + * Get all identifier names in the code, in order, including duplicates. + */ + function getIdentifierNames(code, tokens) { + const names = []; + for (const token of tokens) { + if (token.type === _types.TokenType.name) { + names.push(code.slice(token.start, token.end)); + } + } + return names; +} exports.default = getIdentifierNames; diff --git a/node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js b/node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js new file mode 100644 index 0000000..45edb74 --- /dev/null +++ b/node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js @@ -0,0 +1,92 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _types = require('../parser/tokenizer/types'); + + + + + + + + + + + + + + + + +/** + * Determine information about this named import or named export specifier. + * + * This syntax is the `a` from statements like these: + * import {A} from "./foo"; + * export {A}; + * export {A} from "./foo"; + * + * As it turns out, we can exactly characterize the syntax meaning by simply + * counting the number of tokens, which can be from 1 to 4: + * {A} + * {type A} + * {A as B} + * {type A as B} + * + * In the type case, we never actually need the names in practice, so don't get + * them. + * + * TODO: There's some redundancy with the type detection here and the isType + * flag that's already present on tokens in TS mode. This function could + * potentially be simplified and/or pushed to the call sites to avoid the object + * allocation. + */ + function getImportExportSpecifierInfo( + tokens, + index = tokens.currentIndex(), +) { + let endIndex = index + 1; + if (isSpecifierEnd(tokens, endIndex)) { + // import {A} + const name = tokens.identifierNameAtIndex(index); + return { + isType: false, + leftName: name, + rightName: name, + endIndex, + }; + } + endIndex++; + if (isSpecifierEnd(tokens, endIndex)) { + // import {type A} + return { + isType: true, + leftName: null, + rightName: null, + endIndex, + }; + } + endIndex++; + if (isSpecifierEnd(tokens, endIndex)) { + // import {A as B} + return { + isType: false, + leftName: tokens.identifierNameAtIndex(index), + rightName: tokens.identifierNameAtIndex(index + 2), + endIndex, + }; + } + endIndex++; + if (isSpecifierEnd(tokens, endIndex)) { + // import {type A as B} + return { + isType: true, + leftName: null, + rightName: null, + endIndex, + }; + } + throw new Error(`Unexpected import/export specifier at ${index}`); +} exports.default = getImportExportSpecifierInfo; + +function isSpecifierEnd(tokens, index) { + const token = tokens.tokens[index]; + return token.type === _types.TokenType.braceR || token.type === _types.TokenType.comma; +} diff --git a/node_modules/sucrase/dist/util/getJSXPragmaInfo.js b/node_modules/sucrase/dist/util/getJSXPragmaInfo.js new file mode 100644 index 0000000..67513db --- /dev/null +++ b/node_modules/sucrase/dist/util/getJSXPragmaInfo.js @@ -0,0 +1,22 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); + + + + + + + + + function getJSXPragmaInfo(options) { + const [base, suffix] = splitPragma(options.jsxPragma || "React.createElement"); + const [fragmentBase, fragmentSuffix] = splitPragma(options.jsxFragmentPragma || "React.Fragment"); + return {base, suffix, fragmentBase, fragmentSuffix}; +} exports.default = getJSXPragmaInfo; + +function splitPragma(pragma) { + let dotIndex = pragma.indexOf("."); + if (dotIndex === -1) { + dotIndex = pragma.length; + } + return [pragma.slice(0, dotIndex), pragma.slice(dotIndex)]; +} diff --git a/node_modules/sucrase/dist/util/getNonTypeIdentifiers.js b/node_modules/sucrase/dist/util/getNonTypeIdentifiers.js new file mode 100644 index 0000000..86d9daf --- /dev/null +++ b/node_modules/sucrase/dist/util/getNonTypeIdentifiers.js @@ -0,0 +1,43 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _tokenizer = require('../parser/tokenizer'); +var _types = require('../parser/tokenizer/types'); + +var _JSXTransformer = require('../transformers/JSXTransformer'); +var _getJSXPragmaInfo = require('./getJSXPragmaInfo'); var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo); + + function getNonTypeIdentifiers(tokens, options) { + const jsxPragmaInfo = _getJSXPragmaInfo2.default.call(void 0, options); + const nonTypeIdentifiers = new Set(); + for (let i = 0; i < tokens.tokens.length; i++) { + const token = tokens.tokens[i]; + if ( + token.type === _types.TokenType.name && + !token.isType && + (token.identifierRole === _tokenizer.IdentifierRole.Access || + token.identifierRole === _tokenizer.IdentifierRole.ObjectShorthand || + token.identifierRole === _tokenizer.IdentifierRole.ExportAccess) && + !token.shadowsGlobal + ) { + nonTypeIdentifiers.add(tokens.identifierNameForToken(token)); + } + if (token.type === _types.TokenType.jsxTagStart) { + nonTypeIdentifiers.add(jsxPragmaInfo.base); + } + if ( + token.type === _types.TokenType.jsxTagStart && + i + 1 < tokens.tokens.length && + tokens.tokens[i + 1].type === _types.TokenType.jsxTagEnd + ) { + nonTypeIdentifiers.add(jsxPragmaInfo.base); + nonTypeIdentifiers.add(jsxPragmaInfo.fragmentBase); + } + if (token.type === _types.TokenType.jsxName && token.identifierRole === _tokenizer.IdentifierRole.Access) { + const identifierName = tokens.identifierNameForToken(token); + // Lower-case single-component tag names like "div" don't count. + if (!_JSXTransformer.startsWithLowerCase.call(void 0, identifierName) || tokens.tokens[i + 1].type === _types.TokenType.dot) { + nonTypeIdentifiers.add(tokens.identifierNameForToken(token)); + } + } + } + return nonTypeIdentifiers; +} exports.getNonTypeIdentifiers = getNonTypeIdentifiers; diff --git a/node_modules/sucrase/dist/util/getTSImportedNames.js b/node_modules/sucrase/dist/util/getTSImportedNames.js new file mode 100644 index 0000000..5c5362c --- /dev/null +++ b/node_modules/sucrase/dist/util/getTSImportedNames.js @@ -0,0 +1,84 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _types = require('../parser/tokenizer/types'); + +var _getImportExportSpecifierInfo = require('./getImportExportSpecifierInfo'); var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo); + +/** + * Special case code to scan for imported names in ESM TypeScript. We need to do this so we can + * properly get globals so we can compute shadowed globals. + * + * This is similar to logic in CJSImportProcessor, but trimmed down to avoid logic with CJS + * replacement and flow type imports. + */ + function getTSImportedNames(tokens) { + const importedNames = new Set(); + for (let i = 0; i < tokens.tokens.length; i++) { + if ( + tokens.matches1AtIndex(i, _types.TokenType._import) && + !tokens.matches3AtIndex(i, _types.TokenType._import, _types.TokenType.name, _types.TokenType.eq) + ) { + collectNamesForImport(tokens, i, importedNames); + } + } + return importedNames; +} exports.default = getTSImportedNames; + +function collectNamesForImport( + tokens, + index, + importedNames, +) { + index++; + + if (tokens.matches1AtIndex(index, _types.TokenType.parenL)) { + // Dynamic import, so nothing to do + return; + } + + if (tokens.matches1AtIndex(index, _types.TokenType.name)) { + importedNames.add(tokens.identifierNameAtIndex(index)); + index++; + if (tokens.matches1AtIndex(index, _types.TokenType.comma)) { + index++; + } + } + + if (tokens.matches1AtIndex(index, _types.TokenType.star)) { + // * as + index += 2; + importedNames.add(tokens.identifierNameAtIndex(index)); + index++; + } + + if (tokens.matches1AtIndex(index, _types.TokenType.braceL)) { + index++; + collectNamesForNamedImport(tokens, index, importedNames); + } +} + +function collectNamesForNamedImport( + tokens, + index, + importedNames, +) { + while (true) { + if (tokens.matches1AtIndex(index, _types.TokenType.braceR)) { + return; + } + + const specifierInfo = _getImportExportSpecifierInfo2.default.call(void 0, tokens, index); + index = specifierInfo.endIndex; + if (!specifierInfo.isType) { + importedNames.add(specifierInfo.rightName); + } + + if (tokens.matches2AtIndex(index, _types.TokenType.comma, _types.TokenType.braceR)) { + return; + } else if (tokens.matches1AtIndex(index, _types.TokenType.braceR)) { + return; + } else if (tokens.matches1AtIndex(index, _types.TokenType.comma)) { + index++; + } else { + throw new Error(`Unexpected token: ${JSON.stringify(tokens.tokens[index])}`); + } + } +} diff --git a/node_modules/sucrase/dist/util/isAsyncOperation.js b/node_modules/sucrase/dist/util/isAsyncOperation.js new file mode 100644 index 0000000..c02023a --- /dev/null +++ b/node_modules/sucrase/dist/util/isAsyncOperation.js @@ -0,0 +1,38 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _keywords = require('../parser/tokenizer/keywords'); + + +/** + * Determine whether this optional chain or nullish coalescing operation has any await statements in + * it. If so, we'll need to transpile to an async operation. + * + * We compute this by walking the length of the operation and returning true if we see an await + * keyword used as a real await (rather than an object key or property access). Nested optional + * chain/nullish operations need to be tracked but don't silence await, but a nested async function + * (or any other nested scope) will make the await not count. + */ + function isAsyncOperation(tokens) { + let index = tokens.currentIndex(); + let depth = 0; + const startToken = tokens.currentToken(); + do { + const token = tokens.tokens[index]; + if (token.isOptionalChainStart) { + depth++; + } + if (token.isOptionalChainEnd) { + depth--; + } + depth += token.numNullishCoalesceStarts; + depth -= token.numNullishCoalesceEnds; + + if ( + token.contextualKeyword === _keywords.ContextualKeyword._await && + token.identifierRole == null && + token.scopeDepth === startToken.scopeDepth + ) { + return true; + } + index += 1; + } while (depth > 0 && index < tokens.tokens.length); + return false; +} exports.default = isAsyncOperation; diff --git a/node_modules/sucrase/dist/util/isExportFrom.js b/node_modules/sucrase/dist/util/isExportFrom.js new file mode 100644 index 0000000..830a0fe --- /dev/null +++ b/node_modules/sucrase/dist/util/isExportFrom.js @@ -0,0 +1,18 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _keywords = require('../parser/tokenizer/keywords'); +var _types = require('../parser/tokenizer/types'); + + +/** + * Starting at `export {`, look ahead and return `true` if this is an + * `export {...} from` statement and `false` if this is a plain multi-export. + */ + function isExportFrom(tokens) { + let closeBraceIndex = tokens.currentIndex(); + while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) { + closeBraceIndex++; + } + return ( + tokens.matchesContextualAtIndex(closeBraceIndex + 1, _keywords.ContextualKeyword._from) && + tokens.matches1AtIndex(closeBraceIndex + 2, _types.TokenType.string) + ); +} exports.default = isExportFrom; diff --git a/node_modules/sucrase/dist/util/isIdentifier.js b/node_modules/sucrase/dist/util/isIdentifier.js new file mode 100644 index 0000000..8be8cf4 --- /dev/null +++ b/node_modules/sucrase/dist/util/isIdentifier.js @@ -0,0 +1,81 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _identifier = require('../parser/util/identifier'); + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar +// Hard-code a list of reserved words rather than trying to use keywords or contextual keywords +// from the parser, since currently there are various exceptions, like `package` being reserved +// but unused and various contextual keywords being reserved. Note that we assume that all code +// compiled by Sucrase is in a module, so strict mode words and await are all considered reserved +// here. +const RESERVED_WORDS = new Set([ + // Reserved keywords as of ECMAScript 2015 + "break", + "case", + "catch", + "class", + "const", + "continue", + "debugger", + "default", + "delete", + "do", + "else", + "export", + "extends", + "finally", + "for", + "function", + "if", + "import", + "in", + "instanceof", + "new", + "return", + "super", + "switch", + "this", + "throw", + "try", + "typeof", + "var", + "void", + "while", + "with", + "yield", + // Future reserved keywords + "enum", + "implements", + "interface", + "let", + "package", + "private", + "protected", + "public", + "static", + "await", + // Literals that cannot be used as identifiers + "false", + "null", + "true", +]); + +/** + * Determine if the given name is a legal variable name. + * + * This is needed when transforming TypeScript enums; if an enum key is a valid + * variable name, it might be referenced later in the enum, so we need to + * declare a variable. + */ + function isIdentifier(name) { + if (name.length === 0) { + return false; + } + if (!_identifier.IS_IDENTIFIER_START[name.charCodeAt(0)]) { + return false; + } + for (let i = 1; i < name.length; i++) { + if (!_identifier.IS_IDENTIFIER_CHAR[name.charCodeAt(i)]) { + return false; + } + } + return !RESERVED_WORDS.has(name); +} exports.default = isIdentifier; diff --git a/node_modules/sucrase/dist/util/removeMaybeImportAttributes.js b/node_modules/sucrase/dist/util/removeMaybeImportAttributes.js new file mode 100644 index 0000000..fd0b142 --- /dev/null +++ b/node_modules/sucrase/dist/util/removeMaybeImportAttributes.js @@ -0,0 +1,22 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _keywords = require('../parser/tokenizer/keywords'); +var _types = require('../parser/tokenizer/types'); + + +/** + * Starting at a potential `with` or (legacy) `assert` token, remove the import + * attributes if they exist. + */ + function removeMaybeImportAttributes(tokens) { + if ( + tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || + (tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) + ) { + // assert + tokens.removeToken(); + // { + tokens.removeToken(); + tokens.removeBalancedCode(); + // } + tokens.removeToken(); + } +} exports.removeMaybeImportAttributes = removeMaybeImportAttributes; diff --git a/node_modules/sucrase/dist/util/shouldElideDefaultExport.js b/node_modules/sucrase/dist/util/shouldElideDefaultExport.js new file mode 100644 index 0000000..3525feb --- /dev/null +++ b/node_modules/sucrase/dist/util/shouldElideDefaultExport.js @@ -0,0 +1,38 @@ +"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _types = require('../parser/tokenizer/types'); + + + +/** + * Common method sharing code between CJS and ESM cases, since they're the same here. + */ + function shouldElideDefaultExport( + isTypeScriptTransformEnabled, + keepUnusedImports, + tokens, + declarationInfo, +) { + if (!isTypeScriptTransformEnabled || keepUnusedImports) { + return false; + } + const exportToken = tokens.currentToken(); + if (exportToken.rhsEndIndex == null) { + throw new Error("Expected non-null rhsEndIndex on export token."); + } + // The export must be of the form `export default a` or `export default a;`. + const numTokens = exportToken.rhsEndIndex - tokens.currentIndex(); + if ( + numTokens !== 3 && + !(numTokens === 4 && tokens.matches1AtIndex(exportToken.rhsEndIndex - 1, _types.TokenType.semi)) + ) { + return false; + } + const identifierToken = tokens.tokenAtRelativeIndex(2); + if (identifierToken.type !== _types.TokenType.name) { + return false; + } + const exportedName = tokens.identifierNameForToken(identifierToken); + return ( + declarationInfo.typeDeclarations.has(exportedName) && + !declarationInfo.valueDeclarations.has(exportedName) + ); +} exports.default = shouldElideDefaultExport; diff --git a/node_modules/sucrase/package.json b/node_modules/sucrase/package.json new file mode 100644 index 0000000..7bccf70 --- /dev/null +++ b/node_modules/sucrase/package.json @@ -0,0 +1,88 @@ +{ + "name": "sucrase", + "version": "3.35.1", + "description": "Super-fast alternative to Babel for when you can target modern JS runtimes", + "author": "Alan Pierce ", + "license": "MIT", + "main": "dist/index.js", + "module": "dist/esm/index.js", + "types": "dist/types/index.d.ts", + "bin": { + "sucrase": "./bin/sucrase", + "sucrase-node": "./bin/sucrase-node" + }, + "scripts": { + "build": "sucrase-node script/build.ts", + "fast-build": "sucrase-node script/build.ts --fast", + "clean": "rm -rf ./build ./dist ./dist-self-build ./dist-types ./example-runner/example-repos ./spec-compliance-tests/test262/test262-checkout ./spec-compliance-tests/babel-tests/babel-tests-checkout", + "generate": "sucrase-node generator/generate.ts", + "benchmark": "cd benchmark && yarn && sucrase-node ./benchmark.ts", + "benchmark-compare": "sucrase-node ./benchmark/compare-performance.ts", + "microbenchmark": "sucrase-node benchmark/microbenchmark.ts", + "lint": "sucrase-node script/lint.ts", + "lint-fix": "sucrase-node script/lint.ts --fix", + "profile": "node --inspect-brk ./node_modules/.bin/sucrase-node ./benchmark/profile", + "profile-project": "node --inspect-brk ./node_modules/.bin/sucrase-node ./benchmark/benchmark-project.ts --profile", + "prepublishOnly": "yarn clean && yarn build", + "release": "sucrase-node script/release.ts", + "run-examples": "sucrase-node example-runner/example-runner.ts", + "test": "yarn lint && yarn test-only", + "test-only": "mocha './test/**/*.ts'", + "integration-test": "cd integration-test && yarn && yarn link @sucrase/jest-plugin && mocha --timeout 10000 ./integration-tests.ts", + "test262": "sucrase-node spec-compliance-tests/test262/run-test262.ts", + "check-babel-tests": "sucrase-node spec-compliance-tests/babel-tests/check-babel-tests.ts", + "test-with-coverage": "nyc mocha './test/**/*.ts'", + "report-coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov" + }, + "repository": { + "type": "git", + "url": "https://github.com/alangpierce/sucrase.git" + }, + "keywords": [ + "babel", + "jsx", + "typescript", + "flow" + ], + "bugs": { + "url": "https://github.com/alangpierce/sucrase/issues" + }, + "devDependencies": { + "@babel/core": "^7.22.5", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/mocha": "^9.1.1", + "@types/mz": "^2.7.4", + "@types/node": "^20.3.2", + "@typescript-eslint/eslint-plugin": "^5.60.1", + "@typescript-eslint/parser": "^5.60.1", + "chalk": "^4", + "codecov": "^3.8.3", + "eslint": "^8.43.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-import": "~2.26", + "eslint-plugin-prettier": "^4.2.1", + "mocha": "^10.2.0", + "nyc": "^15.1.0", + "prettier": "^2.8.8", + "sucrase": "^3.35.0", + "test262-harness": "^10.0.0", + "ts-interface-builder": "^0.3.3", + "typescript": "~5.0" + }, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", + "ts-interface-checker": "^0.1.9" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "resolutions": { + "**/eshost/socket.io": "4.7.0" + } +} diff --git a/node_modules/sucrase/register/index.js b/node_modules/sucrase/register/index.js new file mode 100644 index 0000000..f6eb814 --- /dev/null +++ b/node_modules/sucrase/register/index.js @@ -0,0 +1 @@ +require("../dist/register").registerAll(); diff --git a/node_modules/sucrase/register/js.js b/node_modules/sucrase/register/js.js new file mode 100644 index 0000000..4891896 --- /dev/null +++ b/node_modules/sucrase/register/js.js @@ -0,0 +1 @@ +require("../dist/register").registerJS(); diff --git a/node_modules/sucrase/register/jsx.js b/node_modules/sucrase/register/jsx.js new file mode 100644 index 0000000..4bd476e --- /dev/null +++ b/node_modules/sucrase/register/jsx.js @@ -0,0 +1 @@ +require("../dist/register").registerJSX(); diff --git a/node_modules/sucrase/register/ts-legacy-module-interop.js b/node_modules/sucrase/register/ts-legacy-module-interop.js new file mode 100644 index 0000000..1ec5a6d --- /dev/null +++ b/node_modules/sucrase/register/ts-legacy-module-interop.js @@ -0,0 +1 @@ +require("../dist/register").registerTSLegacyModuleInterop(); diff --git a/node_modules/sucrase/register/ts.js b/node_modules/sucrase/register/ts.js new file mode 100644 index 0000000..23b8c88 --- /dev/null +++ b/node_modules/sucrase/register/ts.js @@ -0,0 +1 @@ +require("../dist/register").registerTS(); diff --git a/node_modules/sucrase/register/tsx-legacy-module-interop.js b/node_modules/sucrase/register/tsx-legacy-module-interop.js new file mode 100644 index 0000000..a883680 --- /dev/null +++ b/node_modules/sucrase/register/tsx-legacy-module-interop.js @@ -0,0 +1 @@ +require("../dist/register").registerTSXLegacyModuleInterop(); diff --git a/node_modules/sucrase/register/tsx.js b/node_modules/sucrase/register/tsx.js new file mode 100644 index 0000000..deb8b34 --- /dev/null +++ b/node_modules/sucrase/register/tsx.js @@ -0,0 +1 @@ +require("../dist/register").registerTSX(); diff --git a/node_modules/sucrase/ts-node-plugin/index.js b/node_modules/sucrase/ts-node-plugin/index.js new file mode 100644 index 0000000..b523fb3 --- /dev/null +++ b/node_modules/sucrase/ts-node-plugin/index.js @@ -0,0 +1,83 @@ +const {transform} = require("../dist"); + +// Enum constants taken from the TypeScript codebase. +const ModuleKindCommonJS = 1; + +const JsxEmitReactJSX = 4; +const JsxEmitReactJSXDev = 5; + +/** + * ts-node transpiler plugin + * + * This plugin hooks into ts-node so that Sucrase can handle all TS-to-JS + * conversion while ts-node handles the ESM loader, require hook, REPL + * integration, etc. ts-node automatically discovers the relevant tsconfig file, + * so the main logic in this integration is translating tsconfig options to the + * corresponding Sucrase options. + * + * Any tsconfig options relevant to Sucrase are translated, but some config + * options outside the scope of Sucrase are ignored. For example, we assume the + * isolatedModules option, and we ignore target because Sucrase doesn't provide + * JS syntax downleveling (at least not in a way that is useful for Node). + * + * One notable caveat is that importsNotUsedAsValues and preserveValueImports + * are ignored right now, since they are deprecated and don't have exact Sucrase + * equivalents. To preserve imports and exports, use verbatimModuleSyntax. + */ +function create(createOptions) { + const {nodeModuleEmitKind} = createOptions; + const { + module, + jsx, + jsxFactory, + jsxFragmentFactory, + jsxImportSource, + esModuleInterop, + verbatimModuleSyntax, + } = createOptions.service.config.options; + + return { + transpile(input, transpileOptions) { + const {fileName} = transpileOptions; + const transforms = []; + // Detect JS rather than TS so we bias toward including the typescript + // transform, since almost always it doesn't hurt to include. + const isJS = + fileName.endsWith(".js") || + fileName.endsWith(".jsx") || + fileName.endsWith(".mjs") || + fileName.endsWith(".cjs"); + if (!isJS) { + transforms.push("typescript"); + } + if (module === ModuleKindCommonJS || nodeModuleEmitKind === "nodecjs") { + transforms.push("imports"); + } + if (fileName.endsWith(".tsx") || fileName.endsWith(".jsx")) { + transforms.push("jsx"); + } + + const {code, sourceMap} = transform(input, { + transforms, + disableESTransforms: true, + jsxRuntime: jsx === JsxEmitReactJSX || jsx === JsxEmitReactJSXDev ? "automatic" : "classic", + production: jsx === JsxEmitReactJSX, + jsxImportSource, + jsxPragma: jsxFactory, + jsxFragmentPragma: jsxFragmentFactory, + keepUnusedImports: verbatimModuleSyntax, + preserveDynamicImport: nodeModuleEmitKind === "nodecjs", + injectCreateRequireForImportRequire: nodeModuleEmitKind === "nodeesm", + enableLegacyTypeScriptModuleInterop: !esModuleInterop, + sourceMapOptions: {compiledFilename: fileName}, + filePath: fileName, + }); + return { + outputText: code, + sourceMapText: JSON.stringify(sourceMap), + }; + }, + }; +} + +exports.create = create; diff --git a/node_modules/supports-preserve-symlinks-flag/.eslintrc b/node_modules/supports-preserve-symlinks-flag/.eslintrc new file mode 100644 index 0000000..346ffec --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.eslintrc @@ -0,0 +1,14 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "browser": true, + "node": true, + }, + + "rules": { + "id-length": "off", + }, +} diff --git a/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml b/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml new file mode 100644 index 0000000..e8d64f3 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/supports-preserve-symlink-flag +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/supports-preserve-symlinks-flag/.nycrc b/node_modules/supports-preserve-symlinks-flag/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md b/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md new file mode 100644 index 0000000..61f607f --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2022-01-02 + +### Commits + +- Tests [`e2f59ad`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/e2f59ad74e2ae0f5f4899fcde6a6f693ab7cc074) +- Initial commit [`dc222aa`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/dc222aad3c0b940d8d3af1ca9937d108bd2dc4b9) +- [meta] do not publish workflow files [`5ef77f7`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/5ef77f7cb6946d16ee38672be9ec0f1bbdf63262) +- npm init [`992b068`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/992b068503a461f7e8676f40ca2aab255fd8d6ff) +- read me [`6c9afa9`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c9afa9fabc8eaf0814aaed6dd01e6df0931b76d) +- Initial implementation [`2f98925`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2f9892546396d4ab0ad9f1ff83e76c3f01234ae8) +- [meta] add `auto-changelog` [`6c476ae`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c476ae1ed7ce68b0480344f090ac2844f35509d) +- [Dev Deps] add `eslint`, `@ljharb/eslint-config` [`d0fffc8`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/d0fffc886d25fba119355520750a909d64da0087) +- Only apps should have lockfiles [`ab318ed`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/ab318ed7ae62f6c2c0e80a50398d40912afd8f69) +- [meta] add `safe-publish-latest` [`2bb23b3`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2bb23b3ebab02dc4135c4cdf0217db82835b9fca) +- [meta] add `sideEffects` flag [`600223b`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/600223ba24f30779f209d9097721eff35ed62741) diff --git a/node_modules/supports-preserve-symlinks-flag/LICENSE b/node_modules/supports-preserve-symlinks-flag/LICENSE new file mode 100644 index 0000000..2e7b9a3 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/supports-preserve-symlinks-flag/README.md b/node_modules/supports-preserve-symlinks-flag/README.md new file mode 100644 index 0000000..eb05b12 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/README.md @@ -0,0 +1,42 @@ +# node-supports-preserve-symlinks-flag [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Determine if the current node version supports the `--preserve-symlinks` flag. + +## Example + +```js +var supportsPreserveSymlinks = require('node-supports-preserve-symlinks-flag'); +var assert = require('assert'); + +assert.equal(supportsPreserveSymlinks, null); // in a browser +assert.equal(supportsPreserveSymlinks, false); // in node < v6.2 +assert.equal(supportsPreserveSymlinks, true); // in node v6.2+ +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/node-supports-preserve-symlinks-flag +[npm-version-svg]: https://versionbadg.es/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag +[dev-deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/node-supports-preserve-symlinks-flag.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/node-supports-preserve-symlinks-flag.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/node-supports-preserve-symlinks-flag.svg +[downloads-url]: https://npm-stat.com/charts.html?package=node-supports-preserve-symlinks-flag +[codecov-image]: https://codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/node-supports-preserve-symlinks-flag +[actions-url]: https://github.com/inspect-js/node-supports-preserve-symlinks-flag/actions diff --git a/node_modules/supports-preserve-symlinks-flag/browser.js b/node_modules/supports-preserve-symlinks-flag/browser.js new file mode 100644 index 0000000..087be1f --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/browser.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = null; diff --git a/node_modules/supports-preserve-symlinks-flag/index.js b/node_modules/supports-preserve-symlinks-flag/index.js new file mode 100644 index 0000000..86fd5d3 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/index.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = ( +// node 12+ + process.allowedNodeEnvironmentFlags && process.allowedNodeEnvironmentFlags.has('--preserve-symlinks') +) || ( +// node v6.2 - v11 + String(module.constructor._findPath).indexOf('preserveSymlinks') >= 0 // eslint-disable-line no-underscore-dangle +); diff --git a/node_modules/supports-preserve-symlinks-flag/package.json b/node_modules/supports-preserve-symlinks-flag/package.json new file mode 100644 index 0000000..56edadc --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/package.json @@ -0,0 +1,70 @@ +{ + "name": "supports-preserve-symlinks-flag", + "version": "1.0.0", + "description": "Determine if the current node version supports the `--preserve-symlinks` flag.", + "main": "./index.js", + "browser": "./browser.js", + "exports": { + ".": [ + { + "browser": "./browser.js", + "default": "./index.js" + }, + "./index.js" + ], + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/node-supports-preserve-symlinks-flag.git" + }, + "keywords": [ + "node", + "flag", + "symlink", + "symlinks", + "preserve-symlinks" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag/issues" + }, + "homepage": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.1.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^8.6.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.0", + "tape": "^5.4.0" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/supports-preserve-symlinks-flag/test/index.js b/node_modules/supports-preserve-symlinks-flag/test/index.js new file mode 100644 index 0000000..9938d67 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/test/index.js @@ -0,0 +1,29 @@ +'use strict'; + +var test = require('tape'); +var semver = require('semver'); + +var supportsPreserveSymlinks = require('../'); +var browser = require('../browser'); + +test('supportsPreserveSymlinks', function (t) { + t.equal(typeof supportsPreserveSymlinks, 'boolean', 'is a boolean'); + + t.equal(browser, null, 'browser file is `null`'); + t.equal( + supportsPreserveSymlinks, + null, + 'in a browser, is null', + { skip: typeof window === 'undefined' } + ); + + var expected = semver.satisfies(process.version, '>= 6.2'); + t.equal( + supportsPreserveSymlinks, + expected, + 'is true in node v6.2+, false otherwise (actual: ' + supportsPreserveSymlinks + ', expected ' + expected + ')', + { skip: typeof window !== 'undefined' } + ); + + t.end(); +}); diff --git a/node_modules/tailwindcss/LICENSE b/node_modules/tailwindcss/LICENSE new file mode 100644 index 0000000..d6a8229 --- /dev/null +++ b/node_modules/tailwindcss/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/tailwindcss/README.md b/node_modules/tailwindcss/README.md new file mode 100644 index 0000000..14c29a3 --- /dev/null +++ b/node_modules/tailwindcss/README.md @@ -0,0 +1,40 @@ +

+ + + + + Tailwind CSS + + +

+ +

+ A utility-first CSS framework for rapidly building custom user interfaces. +

+ +

+ Build Status + Total Downloads + Latest Release + License +

+ +--- + +## Documentation + +For full documentation, visit [tailwindcss.com](https://tailwindcss.com/). + +## Community + +For help, discussion about best practices, or any other conversation that would benefit from being searchable: + +[Discuss Tailwind CSS on GitHub](https://github.com/tailwindcss/tailwindcss/discussions) + +For casual chit-chat with others using the framework: + +[Join the Tailwind CSS Discord Server](https://discord.gg/7NF8GNe) + +## Contributing + +If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindcss/tailwindcss/blob/main/.github/CONTRIBUTING.md) **before submitting a pull request**. diff --git a/node_modules/tailwindcss/base.css b/node_modules/tailwindcss/base.css new file mode 100644 index 0000000..2f02db5 --- /dev/null +++ b/node_modules/tailwindcss/base.css @@ -0,0 +1 @@ +@tailwind base; diff --git a/node_modules/tailwindcss/colors.d.ts b/node_modules/tailwindcss/colors.d.ts new file mode 100644 index 0000000..d85ab86 --- /dev/null +++ b/node_modules/tailwindcss/colors.d.ts @@ -0,0 +1,3 @@ +import type { DefaultColors } from './types/generated/colors' +declare const colors: DefaultColors +export = colors diff --git a/node_modules/tailwindcss/colors.js b/node_modules/tailwindcss/colors.js new file mode 100644 index 0000000..c6f9149 --- /dev/null +++ b/node_modules/tailwindcss/colors.js @@ -0,0 +1,2 @@ +let colors = require('./lib/public/colors') +module.exports = (colors.__esModule ? colors : { default: colors }).default diff --git a/node_modules/tailwindcss/components.css b/node_modules/tailwindcss/components.css new file mode 100644 index 0000000..020aaba --- /dev/null +++ b/node_modules/tailwindcss/components.css @@ -0,0 +1 @@ +@tailwind components; diff --git a/node_modules/tailwindcss/defaultConfig.d.ts b/node_modules/tailwindcss/defaultConfig.d.ts new file mode 100644 index 0000000..2c2bccf --- /dev/null +++ b/node_modules/tailwindcss/defaultConfig.d.ts @@ -0,0 +1,3 @@ +import type { Config } from './types/config' +declare const config: Config +export = config diff --git a/node_modules/tailwindcss/defaultConfig.js b/node_modules/tailwindcss/defaultConfig.js new file mode 100644 index 0000000..7b63587 --- /dev/null +++ b/node_modules/tailwindcss/defaultConfig.js @@ -0,0 +1,2 @@ +let defaultConfig = require('./lib/public/default-config') +module.exports = (defaultConfig.__esModule ? defaultConfig : { default: defaultConfig }).default diff --git a/node_modules/tailwindcss/defaultTheme.d.ts b/node_modules/tailwindcss/defaultTheme.d.ts new file mode 100644 index 0000000..2bc9dc7 --- /dev/null +++ b/node_modules/tailwindcss/defaultTheme.d.ts @@ -0,0 +1,4 @@ +import type { Config } from './types/config' +import { DefaultTheme } from './types/generated/default-theme' +declare const theme: Config['theme'] & DefaultTheme +export = theme diff --git a/node_modules/tailwindcss/defaultTheme.js b/node_modules/tailwindcss/defaultTheme.js new file mode 100644 index 0000000..991526d --- /dev/null +++ b/node_modules/tailwindcss/defaultTheme.js @@ -0,0 +1,2 @@ +let defaultTheme = require('./lib/public/default-theme') +module.exports = (defaultTheme.__esModule ? defaultTheme : { default: defaultTheme }).default diff --git a/node_modules/tailwindcss/lib/cli-peer-dependencies.js b/node_modules/tailwindcss/lib/cli-peer-dependencies.js new file mode 100644 index 0000000..4b64be2 --- /dev/null +++ b/node_modules/tailwindcss/lib/cli-peer-dependencies.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +function _export(target, all) { + for(var name in all)Object.defineProperty(target, name, { + enumerable: true, + get: all[name] + }); +} +_export(exports, { + lazyPostcss: function() { + return lazyPostcss; + }, + lazyPostcssImport: function() { + return lazyPostcssImport; + }, + lazyAutoprefixer: function() { + return lazyAutoprefixer; + }, + lazyCssnano: function() { + return lazyCssnano; + } +}); +function lazyPostcss() { + return require("postcss"); +} +function lazyPostcssImport() { + return require("postcss-import"); +} +function lazyAutoprefixer() { + return require("autoprefixer"); +} +function lazyCssnano() { + return require("cssnano"); +} diff --git a/node_modules/tailwindcss/lib/cli.js b/node_modules/tailwindcss/lib/cli.js new file mode 100755 index 0000000..1cdfd6e --- /dev/null +++ b/node_modules/tailwindcss/lib/cli.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node +"use strict"; +module.exports = require("./cli/index"); diff --git a/node_modules/tailwindcss/lib/cli/build/deps.js b/node_modules/tailwindcss/lib/cli/build/deps.js new file mode 100644 index 0000000..1aa8116 --- /dev/null +++ b/node_modules/tailwindcss/lib/cli/build/deps.js @@ -0,0 +1,62 @@ +// @ts-check +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +function _export(target, all) { + for(var name in all)Object.defineProperty(target, name, { + enumerable: true, + get: all[name] + }); +} +_export(exports, { + loadPostcss: function() { + return loadPostcss; + }, + loadPostcssImport: function() { + return loadPostcssImport; + }, + loadCssNano: function() { + return loadCssNano; + }, + loadAutoprefixer: function() { + return loadAutoprefixer; + } +}); +const _index = require("../../../peers/index.js"); +function loadPostcss() { + // Try to load a local `postcss` version first + try { + return require("postcss"); + } catch {} + return (0, _index.lazyPostcss)(); +} +function loadPostcssImport() { + // Try to load a local `postcss-import` version first + try { + return require("postcss-import"); + } catch {} + return (0, _index.lazyPostcssImport)(); +} +function loadCssNano() { + let options = { + preset: [ + "default", + { + cssDeclarationSorter: false + } + ] + }; + // Try to load a local `cssnano` version first + try { + return require("cssnano"); + } catch {} + return (0, _index.lazyCssnano)()(options); +} +function loadAutoprefixer() { + // Try to load a local `autoprefixer` version first + try { + return require("autoprefixer"); + } catch {} + return (0, _index.lazyAutoprefixer)(); +} diff --git a/node_modules/tailwindcss/lib/cli/build/index.js b/node_modules/tailwindcss/lib/cli/build/index.js new file mode 100644 index 0000000..60304f6 --- /dev/null +++ b/node_modules/tailwindcss/lib/cli/build/index.js @@ -0,0 +1,54 @@ +// @ts-check +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "build", { + enumerable: true, + get: function() { + return build; + } +}); +const _fs = /*#__PURE__*/ _interop_require_default(require("fs")); +const _path = /*#__PURE__*/ _interop_require_default(require("path")); +const _resolveConfigPath = require("../../util/resolveConfigPath.js"); +const _plugin = require("./plugin.js"); +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +async function build(args) { + let input = args["--input"]; + let shouldWatch = args["--watch"]; + // TODO: Deprecate this in future versions + if (!input && args["_"][1]) { + console.error("[deprecation] Running tailwindcss without -i, please provide an input file."); + input = args["--input"] = args["_"][1]; + } + if (input && input !== "-" && !_fs.default.existsSync(input = _path.default.resolve(input))) { + console.error(`Specified input file ${args["--input"]} does not exist.`); + process.exit(9); + } + if (args["--config"] && !_fs.default.existsSync(args["--config"] = _path.default.resolve(args["--config"]))) { + console.error(`Specified config file ${args["--config"]} does not exist.`); + process.exit(9); + } + // TODO: Reference the @config path here if exists + let configPath = args["--config"] ? args["--config"] : (0, _resolveConfigPath.resolveDefaultConfigPath)(); + let processor = await (0, _plugin.createProcessor)(args, configPath); + if (shouldWatch) { + // Abort the watcher if stdin is closed to avoid zombie processes + // You can disable this behavior with --watch=always + if (args["--watch"] !== "always") { + process.stdin.on("end", ()=>process.exit(0)); + } + process.stdin.resume(); + await processor.watch(); + } else { + await processor.build().catch((e)=>{ + console.error(e); + process.exit(1); + }); + } +} diff --git a/node_modules/tailwindcss/lib/cli/build/plugin.js b/node_modules/tailwindcss/lib/cli/build/plugin.js new file mode 100644 index 0000000..5714067 --- /dev/null +++ b/node_modules/tailwindcss/lib/cli/build/plugin.js @@ -0,0 +1,376 @@ +// @ts-check +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "createProcessor", { + enumerable: true, + get: function() { + return createProcessor; + } +}); +const _path = /*#__PURE__*/ _interop_require_default(require("path")); +const _fs = /*#__PURE__*/ _interop_require_default(require("fs")); +const _postcssloadconfig = /*#__PURE__*/ _interop_require_default(require("postcss-load-config")); +const _lilconfig = require("lilconfig"); +const _plugins = /*#__PURE__*/ _interop_require_default(require("postcss-load-config/src/plugins" // Little bit scary, looking at private/internal API +)); +const _options = /*#__PURE__*/ _interop_require_default(require("postcss-load-config/src/options" // Little bit scary, looking at private/internal API +)); +const _processTailwindFeatures = /*#__PURE__*/ _interop_require_default(require("../../processTailwindFeatures")); +const _deps = require("./deps"); +const _utils = require("./utils"); +const _sharedState = require("../../lib/sharedState"); +const _resolveConfig = /*#__PURE__*/ _interop_require_default(require("../../../resolveConfig.js")); +const _content = require("../../lib/content.js"); +const _watching = require("./watching.js"); +const _fastglob = /*#__PURE__*/ _interop_require_default(require("fast-glob")); +const _findAtConfigPath = require("../../lib/findAtConfigPath.js"); +const _log = /*#__PURE__*/ _interop_require_default(require("../../util/log")); +const _loadconfig = require("../../lib/load-config"); +const _getModuleDependencies = /*#__PURE__*/ _interop_require_default(require("../../lib/getModuleDependencies")); +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +/** + * + * @param {string} [customPostCssPath ] + * @returns + */ async function loadPostCssPlugins(customPostCssPath) { + let config = customPostCssPath ? await (async ()=>{ + let file = _path.default.resolve(customPostCssPath); + // Implementation, see: https://unpkg.com/browse/postcss-load-config@3.1.0/src/index.js + // @ts-ignore + let { config ={} } = await (0, _lilconfig.lilconfig)("postcss").load(file); + if (typeof config === "function") { + config = config(); + } else { + config = Object.assign({}, config); + } + if (!config.plugins) { + config.plugins = []; + } + // We have to await these because in v5 and v6 of postcss-load-config + // these functions return promises while they don't in v4. Awaiting a + // non-promise is basically a no-op so this is safe to do. + return { + file, + plugins: await (0, _plugins.default)(config, file), + options: await (0, _options.default)(config, file) + }; + })() : await (0, _postcssloadconfig.default)(); + let configPlugins = config.plugins; + let configPluginTailwindIdx = configPlugins.findIndex((plugin)=>{ + if (typeof plugin === "function" && plugin.name === "tailwindcss") { + return true; + } + if (typeof plugin === "object" && plugin !== null && plugin.postcssPlugin === "tailwindcss") { + return true; + } + return false; + }); + let beforePlugins = configPluginTailwindIdx === -1 ? [] : configPlugins.slice(0, configPluginTailwindIdx); + let afterPlugins = configPluginTailwindIdx === -1 ? configPlugins : configPlugins.slice(configPluginTailwindIdx + 1); + return [ + beforePlugins, + afterPlugins, + config.options + ]; +} +function loadBuiltinPostcssPlugins() { + let postcss = (0, _deps.loadPostcss)(); + let IMPORT_COMMENT = "__TAILWIND_RESTORE_IMPORT__: "; + return [ + [ + (root)=>{ + root.walkAtRules("import", (rule)=>{ + if (rule.params.slice(1).startsWith("tailwindcss/")) { + rule.after(postcss.comment({ + text: IMPORT_COMMENT + rule.params + })); + rule.remove(); + } + }); + }, + (0, _deps.loadPostcssImport)(), + (root)=>{ + root.walkComments((rule)=>{ + if (rule.text.startsWith(IMPORT_COMMENT)) { + rule.after(postcss.atRule({ + name: "import", + params: rule.text.replace(IMPORT_COMMENT, "") + })); + rule.remove(); + } + }); + } + ], + [], + {} + ]; +} +let state = { + /** @type {any} */ context: null, + /** @type {ReturnType | null} */ watcher: null, + /** @type {{content: string, extension: string}[]} */ changedContent: [], + /** @type {ReturnType | null} */ configBag: null, + contextDependencies: new Set(), + /** @type {import('../../lib/content.js').ContentPath[]} */ contentPaths: [], + refreshContentPaths () { + var _this_context; + this.contentPaths = (0, _content.parseCandidateFiles)(this.context, (_this_context = this.context) === null || _this_context === void 0 ? void 0 : _this_context.tailwindConfig); + }, + get config () { + return this.context.tailwindConfig; + }, + get contentPatterns () { + return { + all: this.contentPaths.map((contentPath)=>contentPath.pattern), + dynamic: this.contentPaths.filter((contentPath)=>contentPath.glob !== undefined).map((contentPath)=>contentPath.pattern) + }; + }, + loadConfig (configPath, content) { + if (this.watcher && configPath) { + this.refreshConfigDependencies(); + } + let config = (0, _loadconfig.loadConfig)(configPath); + let dependencies = (0, _getModuleDependencies.default)(configPath); + this.configBag = { + config, + dependencies, + dispose () { + for (let file of dependencies){ + delete require.cache[require.resolve(file)]; + } + } + }; + // @ts-ignore + this.configBag.config = (0, _resolveConfig.default)(this.configBag.config, { + content: { + files: [] + } + }); + // Override content files if `--content` has been passed explicitly + if ((content === null || content === void 0 ? void 0 : content.length) > 0) { + this.configBag.config.content.files = content; + } + return this.configBag.config; + }, + refreshConfigDependencies () { + var _this_configBag; + _sharedState.env.DEBUG && console.time("Module dependencies"); + (_this_configBag = this.configBag) === null || _this_configBag === void 0 ? void 0 : _this_configBag.dispose(); + _sharedState.env.DEBUG && console.timeEnd("Module dependencies"); + }, + readContentPaths () { + let content = []; + // Resolve globs from the content config + // TODO: When we make the postcss plugin async-capable this can become async + let files = _fastglob.default.sync(this.contentPatterns.all); + let checkBroadPattern = (0, _content.createBroadPatternCheck)(this.contentPatterns.all); + for (let file of files){ + checkBroadPattern(file); + content.push({ + content: _fs.default.readFileSync(_path.default.resolve(file), "utf8"), + extension: _path.default.extname(file).slice(1) + }); + } + // Resolve raw content in the tailwind config + let rawContent = this.config.content.files.filter((file)=>{ + return file !== null && typeof file === "object"; + }); + for (let { raw: htmlContent , extension ="html" } of rawContent){ + content.push({ + content: htmlContent, + extension + }); + } + return content; + }, + getContext ({ createContext , cliConfigPath , root , result , content }) { + _sharedState.env.DEBUG && console.time("Searching for config"); + var _findAtConfigPath1; + let configPath = (_findAtConfigPath1 = (0, _findAtConfigPath.findAtConfigPath)(root, result)) !== null && _findAtConfigPath1 !== void 0 ? _findAtConfigPath1 : cliConfigPath; + _sharedState.env.DEBUG && console.timeEnd("Searching for config"); + if (this.context) { + this.context.changedContent = this.changedContent.splice(0); + return this.context; + } + _sharedState.env.DEBUG && console.time("Loading config"); + let config = this.loadConfig(configPath, content); + _sharedState.env.DEBUG && console.timeEnd("Loading config"); + _sharedState.env.DEBUG && console.time("Creating context"); + this.context = createContext(config, []); + Object.assign(this.context, { + userConfigPath: configPath + }); + _sharedState.env.DEBUG && console.timeEnd("Creating context"); + _sharedState.env.DEBUG && console.time("Resolving content paths"); + this.refreshContentPaths(); + _sharedState.env.DEBUG && console.timeEnd("Resolving content paths"); + if (this.watcher) { + _sharedState.env.DEBUG && console.time("Watch new files"); + this.watcher.refreshWatchedFiles(); + _sharedState.env.DEBUG && console.timeEnd("Watch new files"); + } + for (let file of this.readContentPaths()){ + this.context.changedContent.push(file); + } + return this.context; + } +}; +async function createProcessor(args, cliConfigPath) { + var _args_content; + let postcss = (0, _deps.loadPostcss)(); + let input = args["--input"]; + let output = args["--output"]; + let includePostCss = args["--postcss"]; + let customPostCssPath = typeof args["--postcss"] === "string" ? args["--postcss"] : undefined; + let [beforePlugins, afterPlugins, postcssOptions] = includePostCss ? await loadPostCssPlugins(customPostCssPath) : loadBuiltinPostcssPlugins(); + if (args["--purge"]) { + _log.default.warn("purge-flag-deprecated", [ + "The `--purge` flag has been deprecated.", + "Please use `--content` instead." + ]); + if (!args["--content"]) { + args["--content"] = args["--purge"]; + } + } + var _args_content_split; + let content = (_args_content_split = (_args_content = args["--content"]) === null || _args_content === void 0 ? void 0 : _args_content.split(/(?{ + return { + postcssPlugin: "tailwindcss", + async Once (root, { result }) { + _sharedState.env.DEBUG && console.time("Compiling CSS"); + await (0, _processTailwindFeatures.default)(({ createContext })=>{ + console.error(); + console.error("Rebuilding..."); + return ()=>{ + return state.getContext({ + createContext, + cliConfigPath, + root, + result, + content + }); + }; + })(root, result); + _sharedState.env.DEBUG && console.timeEnd("Compiling CSS"); + } + }; + }; + tailwindPlugin.postcss = true; + let plugins = [ + ...beforePlugins, + tailwindPlugin, + !args["--minify"] && _utils.formatNodes, + ...afterPlugins, + !args["--no-autoprefixer"] && (0, _deps.loadAutoprefixer)(), + args["--minify"] && (0, _deps.loadCssNano)() + ].filter(Boolean); + /** @type {import('postcss').Processor} */ // @ts-ignore + let processor = postcss(plugins); + async function readInput() { + // Piping in data, let's drain the stdin + if (input === "-") { + return (0, _utils.drainStdin)(); + } + // Input file has been provided + if (input) { + return _fs.default.promises.readFile(_path.default.resolve(input), "utf8"); + } + // No input file provided, fallback to default at-rules + return "@tailwind base; @tailwind components; @tailwind utilities"; + } + async function build() { + let start = process.hrtime.bigint(); + return readInput().then((css)=>processor.process(css, { + ...postcssOptions, + from: input, + to: output + })).then((result)=>{ + if (!state.watcher) { + return result; + } + _sharedState.env.DEBUG && console.time("Recording PostCSS dependencies"); + for (let message of result.messages){ + if (message.type === "dependency") { + state.contextDependencies.add(message.file); + } + } + _sharedState.env.DEBUG && console.timeEnd("Recording PostCSS dependencies"); + // TODO: This needs to be in a different spot + _sharedState.env.DEBUG && console.time("Watch new files"); + state.watcher.refreshWatchedFiles(); + _sharedState.env.DEBUG && console.timeEnd("Watch new files"); + return result; + }).then((result)=>{ + if (!output) { + process.stdout.write(result.css); + return; + } + return Promise.all([ + (0, _utils.outputFile)(result.opts.to, result.css), + result.map && (0, _utils.outputFile)(result.opts.to + ".map", result.map.toString()) + ]); + }).then(()=>{ + let end = process.hrtime.bigint(); + console.error(); + console.error("Done in", (end - start) / BigInt(1e6) + "ms."); + }).then(()=>{}, (err)=>{ + // TODO: If an initial build fails we can't easily pick up any PostCSS dependencies + // that were collected before the error occurred + // The result is not stored on the error so we have to store it externally + // and pull the messages off of it here somehow + // This results in a less than ideal DX because the watcher will not pick up + // changes to imported CSS if one of them caused an error during the initial build + // If you fix it and then save the main CSS file so there's no error + // The watcher will start watching the imported CSS files and will be + // resilient to future errors. + if (state.watcher) { + console.error(err); + } else { + return Promise.reject(err); + } + }); + } + /** + * @param {{file: string, content(): Promise, extension: string}[]} changes + */ async function parseChanges(changes) { + return Promise.all(changes.map(async (change)=>({ + content: await change.content(), + extension: change.extension + }))); + } + if (input !== undefined && input !== "-") { + state.contextDependencies.add(_path.default.resolve(input)); + } + return { + build, + watch: async ()=>{ + state.watcher = (0, _watching.createWatcher)(args, { + state, + /** + * @param {{file: string, content(): Promise, extension: string}[]} changes + */ async rebuild (changes) { + let needsNewContext = changes.some((change)=>{ + var _state_configBag; + return ((_state_configBag = state.configBag) === null || _state_configBag === void 0 ? void 0 : _state_configBag.dependencies.has(change.file)) || state.contextDependencies.has(change.file); + }); + if (needsNewContext) { + state.context = null; + } else { + for (let change of (await parseChanges(changes))){ + state.changedContent.push(change); + } + } + return build(); + } + }); + await build(); + } + }; +} diff --git a/node_modules/tailwindcss/lib/cli/build/utils.js b/node_modules/tailwindcss/lib/cli/build/utils.js new file mode 100644 index 0000000..3bed060 --- /dev/null +++ b/node_modules/tailwindcss/lib/cli/build/utils.js @@ -0,0 +1,88 @@ +// @ts-check +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +function _export(target, all) { + for(var name in all)Object.defineProperty(target, name, { + enumerable: true, + get: all[name] + }); +} +_export(exports, { + indentRecursive: function() { + return indentRecursive; + }, + formatNodes: function() { + return formatNodes; + }, + readFileWithRetries: function() { + return readFileWithRetries; + }, + drainStdin: function() { + return drainStdin; + }, + outputFile: function() { + return outputFile; + } +}); +const _fs = /*#__PURE__*/ _interop_require_default(require("fs")); +const _path = /*#__PURE__*/ _interop_require_default(require("path")); +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +function indentRecursive(node, indent = 0) { + node.each && node.each((child, i)=>{ + if (!child.raws.before || !child.raws.before.trim() || child.raws.before.includes("\n")) { + child.raws.before = `\n${node.type !== "rule" && i > 0 ? "\n" : ""}${" ".repeat(indent)}`; + } + child.raws.after = `\n${" ".repeat(indent)}`; + indentRecursive(child, indent + 1); + }); +} +function formatNodes(root) { + indentRecursive(root); + if (root.first) { + root.first.raws.before = ""; + } +} +async function readFileWithRetries(path, tries = 5) { + for(let n = 0; n <= tries; n++){ + try { + return await _fs.default.promises.readFile(path, "utf8"); + } catch (err) { + if (n !== tries) { + if (err.code === "ENOENT" || err.code === "EBUSY") { + await new Promise((resolve)=>setTimeout(resolve, 10)); + continue; + } + } + throw err; + } + } +} +function drainStdin() { + return new Promise((resolve, reject)=>{ + let result = ""; + process.stdin.on("data", (chunk)=>{ + result += chunk; + }); + process.stdin.on("end", ()=>resolve(result)); + process.stdin.on("error", (err)=>reject(err)); + }); +} +async function outputFile(file, newContents) { + try { + let currentContents = await _fs.default.promises.readFile(file, "utf8"); + if (currentContents === newContents) { + return; // Skip writing the file + } + } catch {} + // Write the file + await _fs.default.promises.mkdir(_path.default.dirname(file), { + recursive: true + }); + await _fs.default.promises.writeFile(file, newContents, "utf8"); +} diff --git a/node_modules/tailwindcss/lib/cli/build/watching.js b/node_modules/tailwindcss/lib/cli/build/watching.js new file mode 100644 index 0000000..83639bd --- /dev/null +++ b/node_modules/tailwindcss/lib/cli/build/watching.js @@ -0,0 +1,182 @@ +// @ts-check +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "createWatcher", { + enumerable: true, + get: function() { + return createWatcher; + } +}); +const _chokidar = /*#__PURE__*/ _interop_require_default(require("chokidar")); +const _fs = /*#__PURE__*/ _interop_require_default(require("fs")); +const _micromatch = /*#__PURE__*/ _interop_require_default(require("micromatch")); +const _normalizepath = /*#__PURE__*/ _interop_require_default(require("normalize-path")); +const _path = /*#__PURE__*/ _interop_require_default(require("path")); +const _utils = require("./utils.js"); +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +function createWatcher(args, { state , rebuild }) { + let shouldPoll = args["--poll"]; + let shouldCoalesceWriteEvents = shouldPoll || process.platform === "win32"; + // Polling interval in milliseconds + // Used only when polling or coalescing add/change events on Windows + let pollInterval = 10; + let watcher = _chokidar.default.watch([], { + // Force checking for atomic writes in all situations + // This causes chokidar to wait up to 100ms for a file to re-added after it's been unlinked + // This only works when watching directories though + atomic: true, + usePolling: shouldPoll, + interval: shouldPoll ? pollInterval : undefined, + ignoreInitial: true, + awaitWriteFinish: shouldCoalesceWriteEvents ? { + stabilityThreshold: 50, + pollInterval: pollInterval + } : false + }); + // A queue of rebuilds, file reads, etc… to run + let chain = Promise.resolve(); + /** + * A list of files that have been changed since the last rebuild + * + * @type {{file: string, content: () => Promise, extension: string}[]} + */ let changedContent = []; + /** + * A list of files for which a rebuild has already been queued. + * This is used to prevent duplicate rebuilds when multiple events are fired for the same file. + * The rebuilt file is cleared from this list when it's associated rebuild has _started_ + * This is because if the file is changed during a rebuild it won't trigger a new rebuild which it should + **/ let pendingRebuilds = new Set(); + let _timer; + let _reject; + /** + * Rebuilds the changed files and resolves when the rebuild is + * complete regardless of whether it was successful or not + */ async function rebuildAndContinue() { + let changes = changedContent.splice(0); + // There are no changes to rebuild so we can just do nothing + if (changes.length === 0) { + return Promise.resolve(); + } + // Clear all pending rebuilds for the about-to-be-built files + changes.forEach((change)=>pendingRebuilds.delete(change.file)); + // Resolve the promise even when the rebuild fails + return rebuild(changes).then(()=>{}, (e)=>{ + console.error(e.toString()); + }); + } + /** + * + * @param {*} file + * @param {(() => Promise) | null} content + * @param {boolean} skipPendingCheck + * @returns {Promise} + */ function recordChangedFile(file, content = null, skipPendingCheck = false) { + file = _path.default.resolve(file); + // Applications like Vim/Neovim fire both rename and change events in succession for atomic writes + // In that case rebuild has already been queued by rename, so can be skipped in change + if (pendingRebuilds.has(file) && !skipPendingCheck) { + return Promise.resolve(); + } + // Mark that a rebuild of this file is going to happen + // It MUST happen synchronously before the rebuild is queued for this to be effective + pendingRebuilds.add(file); + changedContent.push({ + file, + content: content !== null && content !== void 0 ? content : ()=>_fs.default.promises.readFile(file, "utf8"), + extension: _path.default.extname(file).slice(1) + }); + if (_timer) { + clearTimeout(_timer); + _reject(); + } + // If a rebuild is already in progress we don't want to start another one until the 10ms timer has expired + chain = chain.then(()=>new Promise((resolve, reject)=>{ + _timer = setTimeout(resolve, 10); + _reject = reject; + })); + // Resolves once this file has been rebuilt (or the rebuild for this file has failed) + // This queues as many rebuilds as there are changed files + // But those rebuilds happen after some delay + // And will immediately resolve if there are no changes + chain = chain.then(rebuildAndContinue, rebuildAndContinue); + return chain; + } + watcher.on("change", (file)=>recordChangedFile(file)); + watcher.on("add", (file)=>recordChangedFile(file)); + // Restore watching any files that are "removed" + // This can happen when a file is pseudo-atomically replaced (a copy is created, overwritten, the old one is unlinked, and the new one is renamed) + // TODO: An an optimization we should allow removal when the config changes + watcher.on("unlink", (file)=>{ + file = (0, _normalizepath.default)(file); + // Only re-add the file if it's not covered by a dynamic pattern + if (!_micromatch.default.some([ + file + ], state.contentPatterns.dynamic)) { + watcher.add(file); + } + }); + // Some applications such as Visual Studio (but not VS Code) + // will only fire a rename event for atomic writes and not a change event + // This is very likely a chokidar bug but it's one we need to work around + // We treat this as a change event and rebuild the CSS + watcher.on("raw", (evt, filePath, meta)=>{ + if (evt !== "rename" || filePath === null) { + return; + } + let watchedPath = meta.watchedPath; + // Watched path might be the file itself + // Or the directory it is in + filePath = watchedPath.endsWith(filePath) ? watchedPath : _path.default.join(watchedPath, filePath); + // Skip this event since the files it is for does not match any of the registered content globs + if (!_micromatch.default.some([ + filePath + ], state.contentPatterns.all)) { + return; + } + // Skip since we've already queued a rebuild for this file that hasn't happened yet + if (pendingRebuilds.has(filePath)) { + return; + } + // We'll go ahead and add the file to the pending rebuilds list here + // It'll be removed when the rebuild starts unless the read fails + // which will be taken care of as well + pendingRebuilds.add(filePath); + async function enqueue() { + try { + // We need to read the file as early as possible outside of the chain + // because it may be gone by the time we get to it. doing the read + // immediately increases the chance that the file is still there + let content = await (0, _utils.readFileWithRetries)(_path.default.resolve(filePath)); + if (content === undefined) { + return; + } + // This will push the rebuild onto the chain + // We MUST skip the rebuild check here otherwise the rebuild will never happen on Linux + // This is because the order of events and timing is different on Linux + // @ts-ignore: TypeScript isn't picking up that content is a string here + await recordChangedFile(filePath, ()=>content, true); + } catch { + // If reading the file fails, it's was probably a deleted temporary file + // So we can ignore it and no rebuild is needed + } + } + enqueue().then(()=>{ + // If the file read fails we still need to make sure the file isn't stuck in the pending rebuilds list + pendingRebuilds.delete(filePath); + }); + }); + return { + fswatcher: watcher, + refreshWatchedFiles () { + watcher.add(Array.from(state.contextDependencies)); + watcher.add(Array.from(state.configBag.dependencies)); + watcher.add(state.contentPatterns.all); + } + }; +} diff --git a/node_modules/tailwindcss/lib/cli/help/index.js b/node_modules/tailwindcss/lib/cli/help/index.js new file mode 100644 index 0000000..030997f --- /dev/null +++ b/node_modules/tailwindcss/lib/cli/help/index.js @@ -0,0 +1,73 @@ +// @ts-check +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "help", { + enumerable: true, + get: function() { + return help; + } +}); +const _packagejson = /*#__PURE__*/ _interop_require_default(require("../../../package.json")); +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +function help({ message , usage , commands , options }) { + let indent = 2; + // Render header + console.log(); + console.log(`${_packagejson.default.name} v${_packagejson.default.version}`); + // Render message + if (message) { + console.log(); + for (let msg of message.split("\n")){ + console.log(msg); + } + } + // Render usage + if (usage && usage.length > 0) { + console.log(); + console.log("Usage:"); + for (let example of usage){ + console.log(" ".repeat(indent), example); + } + } + // Render commands + if (commands && commands.length > 0) { + console.log(); + console.log("Commands:"); + for (let command of commands){ + console.log(" ".repeat(indent), command); + } + } + // Render options + if (options) { + let groupedOptions = {}; + for (let [key, value] of Object.entries(options)){ + if (typeof value === "object") { + groupedOptions[key] = { + ...value, + flags: [ + key + ] + }; + } else { + groupedOptions[value].flags.push(key); + } + } + console.log(); + console.log("Options:"); + for (let { flags , description , deprecated } of Object.values(groupedOptions)){ + if (deprecated) continue; + if (flags.length === 1) { + console.log(" ".repeat(indent + 4 /* 4 = "-i, ".length */ ), flags.slice().reverse().join(", ").padEnd(20, " "), description); + } else { + console.log(" ".repeat(indent), flags.slice().reverse().join(", ").padEnd(24, " "), description); + } + } + } + console.log(); +} diff --git a/node_modules/tailwindcss/lib/cli/index.js b/node_modules/tailwindcss/lib/cli/index.js new file mode 100644 index 0000000..e6e2e27 --- /dev/null +++ b/node_modules/tailwindcss/lib/cli/index.js @@ -0,0 +1,230 @@ +#!/usr/bin/env node +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +const _path = /*#__PURE__*/ _interop_require_default(require("path")); +const _arg = /*#__PURE__*/ _interop_require_default(require("arg")); +const _fs = /*#__PURE__*/ _interop_require_default(require("fs")); +const _build = require("./build"); +const _help = require("./help"); +const _init = require("./init"); +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +function oneOf(...options) { + return Object.assign((value = true)=>{ + for (let option of options){ + let parsed = option(value); + if (parsed === value) { + return parsed; + } + } + throw new Error("..."); + }, { + manualParsing: true + }); +} +let commands = { + init: { + run: _init.init, + args: { + "--esm": { + type: Boolean, + description: `Initialize configuration file as ESM` + }, + "--ts": { + type: Boolean, + description: `Initialize configuration file as TypeScript` + }, + "--postcss": { + type: Boolean, + description: `Initialize a \`postcss.config.js\` file` + }, + "--full": { + type: Boolean, + description: `Include the default values for all options in the generated configuration file` + }, + "-f": "--full", + "-p": "--postcss" + } + }, + build: { + run: _build.build, + args: { + "--input": { + type: String, + description: "Input file" + }, + "--output": { + type: String, + description: "Output file" + }, + "--watch": { + type: oneOf(String, Boolean), + description: "Watch for changes and rebuild as needed" + }, + "--poll": { + type: Boolean, + description: "Use polling instead of filesystem events when watching" + }, + "--content": { + type: String, + description: "Content paths to use for removing unused classes" + }, + "--purge": { + type: String, + deprecated: true + }, + "--postcss": { + type: oneOf(String, Boolean), + description: "Load custom PostCSS configuration" + }, + "--minify": { + type: Boolean, + description: "Minify the output" + }, + "--config": { + type: String, + description: "Path to a custom config file" + }, + "--no-autoprefixer": { + type: Boolean, + description: "Disable autoprefixer" + }, + "-c": "--config", + "-i": "--input", + "-o": "--output", + "-m": "--minify", + "-w": "--watch", + "-p": "--poll" + } + } +}; +let sharedFlags = { + "--help": { + type: Boolean, + description: "Display usage information" + }, + "-h": "--help" +}; +if (process.stdout.isTTY /* Detect redirecting output to a file */ && (process.argv[2] === undefined || process.argv.slice(2).every((flag)=>sharedFlags[flag] !== undefined))) { + (0, _help.help)({ + usage: [ + "tailwindcss [--input input.css] [--output output.css] [--watch] [options...]", + "tailwindcss init [--full] [--postcss] [options...]" + ], + commands: Object.keys(commands).filter((command)=>command !== "build").map((command)=>`${command} [options]`), + options: { + ...commands.build.args, + ...sharedFlags + } + }); + process.exit(0); +} +let command = ((arg = "")=>arg.startsWith("-") ? undefined : arg)(process.argv[2]) || "build"; +if (commands[command] === undefined) { + if (_fs.default.existsSync(_path.default.resolve(command))) { + // TODO: Deprecate this in future versions + // Check if non-existing command, might be a file. + command = "build"; + } else { + (0, _help.help)({ + message: `Invalid command: ${command}`, + usage: [ + "tailwindcss [options]" + ], + commands: Object.keys(commands).filter((command)=>command !== "build").map((command)=>`${command} [options]`), + options: sharedFlags + }); + process.exit(1); + } +} +// Execute command +let { args: flags , run } = commands[command]; +let args = (()=>{ + try { + let result = (0, _arg.default)(Object.fromEntries(Object.entries({ + ...flags, + ...sharedFlags + }).filter(([_key, value])=>{ + var _value_type; + return !(value === null || value === void 0 ? void 0 : (_value_type = value.type) === null || _value_type === void 0 ? void 0 : _value_type.manualParsing); + }).map(([key, value])=>[ + key, + typeof value === "object" ? value.type : value + ])), { + permissive: true + }); + // Manual parsing of flags to allow for special flags like oneOf(Boolean, String) + for(let i = result["_"].length - 1; i >= 0; --i){ + let flag = result["_"][i]; + if (!flag.startsWith("-")) continue; + let [flagName, flagValue] = flag.split("="); + let handler = flags[flagName]; + // Resolve flagName & handler + while(typeof handler === "string"){ + flagName = handler; + handler = flags[handler]; + } + if (!handler) continue; + let args = []; + let offset = i + 1; + // --flag value syntax was used so we need to pull `value` from `args` + if (flagValue === undefined) { + // Parse args for current flag + while(result["_"][offset] && !result["_"][offset].startsWith("-")){ + args.push(result["_"][offset++]); + } + // Cleanup manually parsed flags + args + result["_"].splice(i, 1 + args.length); + // No args were provided, use default value defined in handler + // One arg was provided, use that directly + // Multiple args were provided so pass them all in an array + flagValue = args.length === 0 ? undefined : args.length === 1 ? args[0] : args; + } else { + // Remove the whole flag from the args array + result["_"].splice(i, 1); + } + // Set the resolved value in the `result` object + result[flagName] = handler.type(flagValue, flagName); + } + // Ensure that the `command` is always the first argument in the `args`. + // This is important so that we don't have to check if a default command + // (build) was used or not from within each plugin. + // + // E.g.: tailwindcss input.css -> _: ['build', 'input.css'] + // E.g.: tailwindcss build input.css -> _: ['build', 'input.css'] + if (result["_"][0] !== command) { + result["_"].unshift(command); + } + return result; + } catch (err) { + if (err.code === "ARG_UNKNOWN_OPTION") { + (0, _help.help)({ + message: err.message, + usage: [ + "tailwindcss [options]" + ], + options: sharedFlags + }); + process.exit(1); + } + throw err; + } +})(); +if (args["--help"]) { + (0, _help.help)({ + options: { + ...flags, + ...sharedFlags + }, + usage: [ + `tailwindcss ${command} [options]` + ] + }); + process.exit(0); +} +run(args); diff --git a/node_modules/tailwindcss/lib/cli/init/index.js b/node_modules/tailwindcss/lib/cli/init/index.js new file mode 100644 index 0000000..47caf30 --- /dev/null +++ b/node_modules/tailwindcss/lib/cli/init/index.js @@ -0,0 +1,63 @@ +// @ts-check +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "init", { + enumerable: true, + get: function() { + return init; + } +}); +const _fs = /*#__PURE__*/ _interop_require_default(require("fs")); +const _path = /*#__PURE__*/ _interop_require_default(require("path")); +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +function isESM() { + const pkgPath = _path.default.resolve("./package.json"); + try { + let pkg = JSON.parse(_fs.default.readFileSync(pkgPath, "utf8")); + return pkg.type && pkg.type === "module"; + } catch (err) { + return false; + } +} +function init(args) { + let messages = []; + let isProjectESM = args["--ts"] || args["--esm"] || isESM(); + let syntax = args["--ts"] ? "ts" : isProjectESM ? "js" : "cjs"; + let extension = args["--ts"] ? "ts" : "js"; + var _args___; + let tailwindConfigLocation = _path.default.resolve((_args___ = args["_"][1]) !== null && _args___ !== void 0 ? _args___ : `./tailwind.config.${extension}`); + if (_fs.default.existsSync(tailwindConfigLocation)) { + messages.push(`${_path.default.basename(tailwindConfigLocation)} already exists.`); + } else { + let stubContentsFile = _fs.default.readFileSync(args["--full"] ? _path.default.resolve(__dirname, "../../../stubs/config.full.js") : _path.default.resolve(__dirname, "../../../stubs/config.simple.js"), "utf8"); + let stubFile = _fs.default.readFileSync(_path.default.resolve(__dirname, `../../../stubs/tailwind.config.${syntax}`), "utf8"); + // Change colors import + stubContentsFile = stubContentsFile.replace("../colors", "tailwindcss/colors"); + // Replace contents of {ts,js,cjs} file with the stub {simple,full}. + stubFile = stubFile.replace("__CONFIG__", stubContentsFile.replace("module.exports =", "").trim()).trim() + "\n\n"; + _fs.default.writeFileSync(tailwindConfigLocation, stubFile, "utf8"); + messages.push(`Created Tailwind CSS config file: ${_path.default.basename(tailwindConfigLocation)}`); + } + if (args["--postcss"]) { + let postcssConfigLocation = _path.default.resolve("./postcss.config.js"); + if (_fs.default.existsSync(postcssConfigLocation)) { + messages.push(`${_path.default.basename(postcssConfigLocation)} already exists.`); + } else { + let stubFile = _fs.default.readFileSync(isProjectESM ? _path.default.resolve(__dirname, "../../../stubs/postcss.config.js") : _path.default.resolve(__dirname, "../../../stubs/postcss.config.cjs"), "utf8"); + _fs.default.writeFileSync(postcssConfigLocation, stubFile, "utf8"); + messages.push(`Created PostCSS config file: ${_path.default.basename(postcssConfigLocation)}`); + } + } + if (messages.length > 0) { + console.log(); + for (let message of messages){ + console.log(message); + } + } +} diff --git a/node_modules/tailwindcss/lib/corePluginList.js b/node_modules/tailwindcss/lib/corePluginList.js new file mode 100644 index 0000000..552934b --- /dev/null +++ b/node_modules/tailwindcss/lib/corePluginList.js @@ -0,0 +1,191 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "default", { + enumerable: true, + get: function() { + return _default; + } +}); +const _default = [ + "preflight", + "container", + "accessibility", + "pointerEvents", + "visibility", + "position", + "inset", + "isolation", + "zIndex", + "order", + "gridColumn", + "gridColumnStart", + "gridColumnEnd", + "gridRow", + "gridRowStart", + "gridRowEnd", + "float", + "clear", + "margin", + "boxSizing", + "lineClamp", + "display", + "aspectRatio", + "size", + "height", + "maxHeight", + "minHeight", + "width", + "minWidth", + "maxWidth", + "flex", + "flexShrink", + "flexGrow", + "flexBasis", + "tableLayout", + "captionSide", + "borderCollapse", + "borderSpacing", + "transformOrigin", + "translate", + "rotate", + "skew", + "scale", + "transform", + "animation", + "cursor", + "touchAction", + "userSelect", + "resize", + "scrollSnapType", + "scrollSnapAlign", + "scrollSnapStop", + "scrollMargin", + "scrollPadding", + "listStylePosition", + "listStyleType", + "listStyleImage", + "appearance", + "columns", + "breakBefore", + "breakInside", + "breakAfter", + "gridAutoColumns", + "gridAutoFlow", + "gridAutoRows", + "gridTemplateColumns", + "gridTemplateRows", + "flexDirection", + "flexWrap", + "placeContent", + "placeItems", + "alignContent", + "alignItems", + "justifyContent", + "justifyItems", + "gap", + "space", + "divideWidth", + "divideStyle", + "divideColor", + "divideOpacity", + "placeSelf", + "alignSelf", + "justifySelf", + "overflow", + "overscrollBehavior", + "scrollBehavior", + "textOverflow", + "hyphens", + "whitespace", + "textWrap", + "wordBreak", + "borderRadius", + "borderWidth", + "borderStyle", + "borderColor", + "borderOpacity", + "backgroundColor", + "backgroundOpacity", + "backgroundImage", + "gradientColorStops", + "boxDecorationBreak", + "backgroundSize", + "backgroundAttachment", + "backgroundClip", + "backgroundPosition", + "backgroundRepeat", + "backgroundOrigin", + "fill", + "stroke", + "strokeWidth", + "objectFit", + "objectPosition", + "padding", + "textAlign", + "textIndent", + "verticalAlign", + "fontFamily", + "fontSize", + "fontWeight", + "textTransform", + "fontStyle", + "fontVariantNumeric", + "lineHeight", + "letterSpacing", + "textColor", + "textOpacity", + "textDecoration", + "textDecorationColor", + "textDecorationStyle", + "textDecorationThickness", + "textUnderlineOffset", + "fontSmoothing", + "placeholderColor", + "placeholderOpacity", + "caretColor", + "accentColor", + "opacity", + "backgroundBlendMode", + "mixBlendMode", + "boxShadow", + "boxShadowColor", + "outlineStyle", + "outlineWidth", + "outlineOffset", + "outlineColor", + "ringWidth", + "ringColor", + "ringOpacity", + "ringOffsetWidth", + "ringOffsetColor", + "blur", + "brightness", + "contrast", + "dropShadow", + "grayscale", + "hueRotate", + "invert", + "saturate", + "sepia", + "filter", + "backdropBlur", + "backdropBrightness", + "backdropContrast", + "backdropGrayscale", + "backdropHueRotate", + "backdropInvert", + "backdropOpacity", + "backdropSaturate", + "backdropSepia", + "backdropFilter", + "transitionProperty", + "transitionDelay", + "transitionDuration", + "transitionTimingFunction", + "willChange", + "contain", + "content", + "forcedColorAdjust" +]; diff --git a/node_modules/tailwindcss/lib/corePlugins.js b/node_modules/tailwindcss/lib/corePlugins.js new file mode 100644 index 0000000..bf5d083 --- /dev/null +++ b/node_modules/tailwindcss/lib/corePlugins.js @@ -0,0 +1,4339 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +function _export(target, all) { + for(var name in all)Object.defineProperty(target, name, { + enumerable: true, + get: all[name] + }); +} +_export(exports, { + variantPlugins: function() { + return variantPlugins; + }, + corePlugins: function() { + return corePlugins; + } +}); +const _fs = /*#__PURE__*/ _interop_require_default(require("fs")); +const _path = /*#__PURE__*/ _interop_require_wildcard(require("path")); +const _postcss = /*#__PURE__*/ _interop_require_default(require("postcss")); +const _createUtilityPlugin = /*#__PURE__*/ _interop_require_default(require("./util/createUtilityPlugin")); +const _buildMediaQuery = /*#__PURE__*/ _interop_require_default(require("./util/buildMediaQuery")); +const _escapeClassName = /*#__PURE__*/ _interop_require_default(require("./util/escapeClassName")); +const _parseAnimationValue = /*#__PURE__*/ _interop_require_default(require("./util/parseAnimationValue")); +const _flattenColorPalette = /*#__PURE__*/ _interop_require_default(require("./util/flattenColorPalette")); +const _withAlphaVariable = /*#__PURE__*/ _interop_require_wildcard(require("./util/withAlphaVariable")); +const _toColorValue = /*#__PURE__*/ _interop_require_default(require("./util/toColorValue")); +const _isPlainObject = /*#__PURE__*/ _interop_require_default(require("./util/isPlainObject")); +const _transformThemeValue = /*#__PURE__*/ _interop_require_default(require("./util/transformThemeValue")); +const _packagejson = require("../package.json"); +const _log = /*#__PURE__*/ _interop_require_default(require("./util/log")); +const _normalizeScreens = require("./util/normalizeScreens"); +const _parseBoxShadowValue = require("./util/parseBoxShadowValue"); +const _removeAlphaVariables = require("./util/removeAlphaVariables"); +const _featureFlags = require("./featureFlags"); +const _dataTypes = require("./util/dataTypes"); +const _setupContextUtils = require("./lib/setupContextUtils"); +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== "function") return null; + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + return (_getRequireWildcardCache = function(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} +function _interop_require_wildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) { + return obj; + } + if (obj === null || typeof obj !== "object" && typeof obj !== "function") { + return { + default: obj + }; + } + var cache = _getRequireWildcardCache(nodeInterop); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + for(var key in obj){ + if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} +let variantPlugins = { + childVariant: ({ addVariant })=>{ + addVariant("*", "& > *"); + }, + pseudoElementVariants: ({ addVariant })=>{ + addVariant("first-letter", "&::first-letter"); + addVariant("first-line", "&::first-line"); + addVariant("marker", [ + ({ container })=>{ + (0, _removeAlphaVariables.removeAlphaVariables)(container, [ + "--tw-text-opacity" + ]); + return "& *::marker"; + }, + ({ container })=>{ + (0, _removeAlphaVariables.removeAlphaVariables)(container, [ + "--tw-text-opacity" + ]); + return "&::marker"; + } + ]); + addVariant("selection", [ + "& *::selection", + "&::selection" + ]); + addVariant("file", "&::file-selector-button"); + addVariant("placeholder", "&::placeholder"); + addVariant("backdrop", "&::backdrop"); + addVariant("before", ({ container })=>{ + container.walkRules((rule)=>{ + let foundContent = false; + rule.walkDecls("content", ()=>{ + foundContent = true; + }); + if (!foundContent) { + rule.prepend(_postcss.default.decl({ + prop: "content", + value: "var(--tw-content)" + })); + } + }); + return "&::before"; + }); + addVariant("after", ({ container })=>{ + container.walkRules((rule)=>{ + let foundContent = false; + rule.walkDecls("content", ()=>{ + foundContent = true; + }); + if (!foundContent) { + rule.prepend(_postcss.default.decl({ + prop: "content", + value: "var(--tw-content)" + })); + } + }); + return "&::after"; + }); + }, + pseudoClassVariants: ({ addVariant , matchVariant , config , prefix })=>{ + let pseudoVariants = [ + // Positional + [ + "first", + "&:first-child" + ], + [ + "last", + "&:last-child" + ], + [ + "only", + "&:only-child" + ], + [ + "odd", + "&:nth-child(odd)" + ], + [ + "even", + "&:nth-child(even)" + ], + "first-of-type", + "last-of-type", + "only-of-type", + // State + [ + "visited", + ({ container })=>{ + (0, _removeAlphaVariables.removeAlphaVariables)(container, [ + "--tw-text-opacity", + "--tw-border-opacity", + "--tw-bg-opacity" + ]); + return "&:visited"; + } + ], + "target", + [ + "open", + "&[open]" + ], + // Forms + "default", + "checked", + "indeterminate", + "placeholder-shown", + "autofill", + "optional", + "required", + "valid", + "invalid", + "in-range", + "out-of-range", + "read-only", + // Content + "empty", + // Interactive + "focus-within", + [ + "hover", + !(0, _featureFlags.flagEnabled)(config(), "hoverOnlyWhenSupported") ? "&:hover" : "@media (hover: hover) and (pointer: fine) { &:hover }" + ], + "focus", + "focus-visible", + "active", + "enabled", + "disabled" + ].map((variant)=>Array.isArray(variant) ? variant : [ + variant, + `&:${variant}` + ]); + for (let [variantName, state] of pseudoVariants){ + addVariant(variantName, (ctx)=>{ + let result = typeof state === "function" ? state(ctx) : state; + return result; + }); + } + let variants = { + group: (_, { modifier })=>modifier ? [ + `:merge(${prefix(".group")}\\/${(0, _escapeClassName.default)(modifier)})`, + " &" + ] : [ + `:merge(${prefix(".group")})`, + " &" + ], + peer: (_, { modifier })=>modifier ? [ + `:merge(${prefix(".peer")}\\/${(0, _escapeClassName.default)(modifier)})`, + " ~ &" + ] : [ + `:merge(${prefix(".peer")})`, + " ~ &" + ] + }; + for (let [name, fn] of Object.entries(variants)){ + matchVariant(name, (value = "", extra)=>{ + let result = (0, _dataTypes.normalize)(typeof value === "function" ? value(extra) : value); + if (!result.includes("&")) result = "&" + result; + let [a, b] = fn("", extra); + let start = null; + let end = null; + let quotes = 0; + for(let i = 0; i < result.length; ++i){ + let c = result[i]; + if (c === "&") { + start = i; + } else if (c === "'" || c === '"') { + quotes += 1; + } else if (start !== null && c === " " && !quotes) { + end = i; + } + } + if (start !== null && end === null) { + end = result.length; + } + // Basically this but can handle quotes: + // result.replace(/&(\S+)?/g, (_, pseudo = '') => a + pseudo + b) + return result.slice(0, start) + a + result.slice(start + 1, end) + b + result.slice(end); + }, { + values: Object.fromEntries(pseudoVariants), + [_setupContextUtils.INTERNAL_FEATURES]: { + respectPrefix: false + } + }); + } + }, + directionVariants: ({ addVariant })=>{ + addVariant("ltr", '&:where([dir="ltr"], [dir="ltr"] *)'); + addVariant("rtl", '&:where([dir="rtl"], [dir="rtl"] *)'); + }, + reducedMotionVariants: ({ addVariant })=>{ + addVariant("motion-safe", "@media (prefers-reduced-motion: no-preference)"); + addVariant("motion-reduce", "@media (prefers-reduced-motion: reduce)"); + }, + darkVariants: ({ config , addVariant })=>{ + let [mode, selector = ".dark"] = [].concat(config("darkMode", "media")); + if (mode === false) { + mode = "media"; + _log.default.warn("darkmode-false", [ + "The `darkMode` option in your Tailwind CSS configuration is set to `false`, which now behaves the same as `media`.", + "Change `darkMode` to `media` or remove it entirely.", + "https://tailwindcss.com/docs/upgrade-guide#remove-dark-mode-configuration" + ]); + } + if (mode === "variant") { + let formats; + if (Array.isArray(selector)) { + formats = selector; + } else if (typeof selector === "function") { + formats = selector; + } else if (typeof selector === "string") { + formats = [ + selector + ]; + } + // TODO: We could also add these warnings if the user passes a function that returns string | string[] + // But this is an advanced enough use case that it's probably not necessary + if (Array.isArray(formats)) { + for (let format of formats){ + if (format === ".dark") { + mode = false; + _log.default.warn("darkmode-variant-without-selector", [ + "When using `variant` for `darkMode`, you must provide a selector.", + 'Example: `darkMode: ["variant", ".your-selector &"]`' + ]); + } else if (!format.includes("&")) { + mode = false; + _log.default.warn("darkmode-variant-without-ampersand", [ + "When using `variant` for `darkMode`, your selector must contain `&`.", + 'Example `darkMode: ["variant", ".your-selector &"]`' + ]); + } + } + } + selector = formats; + } + if (mode === "selector") { + // New preferred behavior + addVariant("dark", `&:where(${selector}, ${selector} *)`); + } else if (mode === "media") { + addVariant("dark", "@media (prefers-color-scheme: dark)"); + } else if (mode === "variant") { + addVariant("dark", selector); + } else if (mode === "class") { + // Old behavior + addVariant("dark", `&:is(${selector} *)`); + } + }, + printVariant: ({ addVariant })=>{ + addVariant("print", "@media print"); + }, + screenVariants: ({ theme , addVariant , matchVariant })=>{ + var _theme; + let rawScreens = (_theme = theme("screens")) !== null && _theme !== void 0 ? _theme : {}; + let areSimpleScreens = Object.values(rawScreens).every((v)=>typeof v === "string"); + let screens = (0, _normalizeScreens.normalizeScreens)(theme("screens")); + /** @type {Set} */ let unitCache = new Set([]); + /** @param {string} value */ function units(value) { + var _value_match; + var _value_match_; + return (_value_match_ = (_value_match = value.match(/(\D+)$/)) === null || _value_match === void 0 ? void 0 : _value_match[1]) !== null && _value_match_ !== void 0 ? _value_match_ : "(none)"; + } + /** @param {string} value */ function recordUnits(value) { + if (value !== undefined) { + unitCache.add(units(value)); + } + } + /** @param {string} value */ function canUseUnits(value) { + recordUnits(value); + // If the cache was empty it'll become 1 because we've just added the current unit + // If the cache was not empty and the units are the same the size doesn't change + // Otherwise, if the units are different from what is already known the size will always be > 1 + return unitCache.size === 1; + } + for (const screen of screens){ + for (const value of screen.values){ + recordUnits(value.min); + recordUnits(value.max); + } + } + let screensUseConsistentUnits = unitCache.size <= 1; + /** + * @typedef {import('./util/normalizeScreens').Screen} Screen + */ /** + * @param {'min' | 'max'} type + * @returns {Record} + */ function buildScreenValues(type) { + return Object.fromEntries(screens.filter((screen)=>(0, _normalizeScreens.isScreenSortable)(screen).result).map((screen)=>{ + let { min , max } = screen.values[0]; + if (type === "min" && min !== undefined) { + return screen; + } else if (type === "min" && max !== undefined) { + return { + ...screen, + not: !screen.not + }; + } else if (type === "max" && max !== undefined) { + return screen; + } else if (type === "max" && min !== undefined) { + return { + ...screen, + not: !screen.not + }; + } + }).map((screen)=>[ + screen.name, + screen + ])); + } + /** + * @param {'min' | 'max'} type + * @returns {(a: { value: string | Screen }, z: { value: string | Screen }) => number} + */ function buildSort(type) { + return (a, z)=>(0, _normalizeScreens.compareScreens)(type, a.value, z.value); + } + let maxSort = buildSort("max"); + let minSort = buildSort("min"); + /** @param {'min'|'max'} type */ function buildScreenVariant(type) { + return (value)=>{ + if (!areSimpleScreens) { + _log.default.warn("complex-screen-config", [ + "The `min-*` and `max-*` variants are not supported with a `screens` configuration containing objects." + ]); + return []; + } else if (!screensUseConsistentUnits) { + _log.default.warn("mixed-screen-units", [ + "The `min-*` and `max-*` variants are not supported with a `screens` configuration containing mixed units." + ]); + return []; + } else if (typeof value === "string" && !canUseUnits(value)) { + _log.default.warn("minmax-have-mixed-units", [ + "The `min-*` and `max-*` variants are not supported with a `screens` configuration containing mixed units." + ]); + return []; + } + return [ + `@media ${(0, _buildMediaQuery.default)((0, _normalizeScreens.toScreen)(value, type))}` + ]; + }; + } + matchVariant("max", buildScreenVariant("max"), { + sort: maxSort, + values: areSimpleScreens ? buildScreenValues("max") : {} + }); + // screens and min-* are sorted together when they can be + let id = "min-screens"; + for (let screen of screens){ + addVariant(screen.name, `@media ${(0, _buildMediaQuery.default)(screen)}`, { + id, + sort: areSimpleScreens && screensUseConsistentUnits ? minSort : undefined, + value: screen + }); + } + matchVariant("min", buildScreenVariant("min"), { + id, + sort: minSort + }); + }, + supportsVariants: ({ matchVariant , theme })=>{ + var _theme; + matchVariant("supports", (value = "")=>{ + let check = value.startsWith("--") ? value : (0, _dataTypes.normalize)(value); + let isRaw = /^[\w-]*\s*\(/.test(check); + // Chrome has a bug where `(condition1)or(condition2)` is not valid + // But `(condition1) or (condition2)` is supported. + check = isRaw ? check.replace(/\b(and|or|not)\b/g, " $1 ") : check; + if (isRaw) { + return `@supports ${check}`; + } + if (!check.includes(":")) { + check = `${check}: var(--tw)`; + } + if (!(check.startsWith("(") && check.endsWith(")"))) { + check = `(${check})`; + } + return `@supports ${check}`; + }, { + values: (_theme = theme("supports")) !== null && _theme !== void 0 ? _theme : {} + }); + }, + hasVariants: ({ matchVariant , prefix })=>{ + matchVariant("has", (value)=>`&:has(${(0, _dataTypes.normalize)(value)})`, { + values: {}, + [_setupContextUtils.INTERNAL_FEATURES]: { + respectPrefix: false + } + }); + matchVariant("group-has", (value, { modifier })=>modifier ? `:merge(${prefix(".group")}\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) &` : `:merge(${prefix(".group")}):has(${(0, _dataTypes.normalize)(value)}) &`, { + values: {}, + [_setupContextUtils.INTERNAL_FEATURES]: { + respectPrefix: false + } + }); + matchVariant("peer-has", (value, { modifier })=>modifier ? `:merge(${prefix(".peer")}\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) ~ &` : `:merge(${prefix(".peer")}):has(${(0, _dataTypes.normalize)(value)}) ~ &`, { + values: {}, + [_setupContextUtils.INTERNAL_FEATURES]: { + respectPrefix: false + } + }); + }, + ariaVariants: ({ matchVariant , theme })=>{ + var _theme; + matchVariant("aria", (value)=>`&[aria-${(0, _dataTypes.normalizeAttributeSelectors)((0, _dataTypes.normalize)(value))}]`, { + values: (_theme = theme("aria")) !== null && _theme !== void 0 ? _theme : {} + }); + var _theme1; + matchVariant("group-aria", (value, { modifier })=>modifier ? `:merge(.group\\/${modifier})[aria-${(0, _dataTypes.normalizeAttributeSelectors)((0, _dataTypes.normalize)(value))}] &` : `:merge(.group)[aria-${(0, _dataTypes.normalizeAttributeSelectors)((0, _dataTypes.normalize)(value))}] &`, { + values: (_theme1 = theme("aria")) !== null && _theme1 !== void 0 ? _theme1 : {} + }); + var _theme2; + matchVariant("peer-aria", (value, { modifier })=>modifier ? `:merge(.peer\\/${modifier})[aria-${(0, _dataTypes.normalizeAttributeSelectors)((0, _dataTypes.normalize)(value))}] ~ &` : `:merge(.peer)[aria-${(0, _dataTypes.normalizeAttributeSelectors)((0, _dataTypes.normalize)(value))}] ~ &`, { + values: (_theme2 = theme("aria")) !== null && _theme2 !== void 0 ? _theme2 : {} + }); + }, + dataVariants: ({ matchVariant , theme })=>{ + var _theme; + matchVariant("data", (value)=>`&[data-${(0, _dataTypes.normalizeAttributeSelectors)((0, _dataTypes.normalize)(value))}]`, { + values: (_theme = theme("data")) !== null && _theme !== void 0 ? _theme : {} + }); + var _theme1; + matchVariant("group-data", (value, { modifier })=>modifier ? `:merge(.group\\/${modifier})[data-${(0, _dataTypes.normalizeAttributeSelectors)((0, _dataTypes.normalize)(value))}] &` : `:merge(.group)[data-${(0, _dataTypes.normalizeAttributeSelectors)((0, _dataTypes.normalize)(value))}] &`, { + values: (_theme1 = theme("data")) !== null && _theme1 !== void 0 ? _theme1 : {} + }); + var _theme2; + matchVariant("peer-data", (value, { modifier })=>modifier ? `:merge(.peer\\/${modifier})[data-${(0, _dataTypes.normalizeAttributeSelectors)((0, _dataTypes.normalize)(value))}] ~ &` : `:merge(.peer)[data-${(0, _dataTypes.normalizeAttributeSelectors)((0, _dataTypes.normalize)(value))}] ~ &`, { + values: (_theme2 = theme("data")) !== null && _theme2 !== void 0 ? _theme2 : {} + }); + }, + orientationVariants: ({ addVariant })=>{ + addVariant("portrait", "@media (orientation: portrait)"); + addVariant("landscape", "@media (orientation: landscape)"); + }, + prefersContrastVariants: ({ addVariant })=>{ + addVariant("contrast-more", "@media (prefers-contrast: more)"); + addVariant("contrast-less", "@media (prefers-contrast: less)"); + }, + forcedColorsVariants: ({ addVariant })=>{ + addVariant("forced-colors", "@media (forced-colors: active)"); + } +}; +let cssTransformValue = [ + "translate(var(--tw-translate-x), var(--tw-translate-y))", + "rotate(var(--tw-rotate))", + "skewX(var(--tw-skew-x))", + "skewY(var(--tw-skew-y))", + "scaleX(var(--tw-scale-x))", + "scaleY(var(--tw-scale-y))" +].join(" "); +let cssFilterValue = [ + "var(--tw-blur)", + "var(--tw-brightness)", + "var(--tw-contrast)", + "var(--tw-grayscale)", + "var(--tw-hue-rotate)", + "var(--tw-invert)", + "var(--tw-saturate)", + "var(--tw-sepia)", + "var(--tw-drop-shadow)" +].join(" "); +let cssBackdropFilterValue = [ + "var(--tw-backdrop-blur)", + "var(--tw-backdrop-brightness)", + "var(--tw-backdrop-contrast)", + "var(--tw-backdrop-grayscale)", + "var(--tw-backdrop-hue-rotate)", + "var(--tw-backdrop-invert)", + "var(--tw-backdrop-opacity)", + "var(--tw-backdrop-saturate)", + "var(--tw-backdrop-sepia)" +].join(" "); +let corePlugins = { + preflight: ({ addBase })=>{ + let preflightStyles = _postcss.default.parse(_fs.default.readFileSync(_path.join(__dirname, "./css/preflight.css"), "utf8")); + addBase([ + _postcss.default.comment({ + text: `! tailwindcss v${_packagejson.version} | MIT License | https://tailwindcss.com` + }), + ...preflightStyles.nodes + ]); + }, + container: (()=>{ + function extractMinWidths(breakpoints = []) { + return breakpoints.flatMap((breakpoint)=>breakpoint.values.map((breakpoint)=>breakpoint.min)).filter((v)=>v !== undefined); + } + function mapMinWidthsToPadding(minWidths, screens, paddings) { + if (typeof paddings === "undefined") { + return []; + } + if (!(typeof paddings === "object" && paddings !== null)) { + return [ + { + screen: "DEFAULT", + minWidth: 0, + padding: paddings + } + ]; + } + let mapping = []; + if (paddings.DEFAULT) { + mapping.push({ + screen: "DEFAULT", + minWidth: 0, + padding: paddings.DEFAULT + }); + } + for (let minWidth of minWidths){ + for (let screen of screens){ + for (let { min } of screen.values){ + if (min === minWidth) { + mapping.push({ + minWidth, + padding: paddings[screen.name] + }); + } + } + } + } + return mapping; + } + return function({ addComponents , theme }) { + let screens = (0, _normalizeScreens.normalizeScreens)(theme("container.screens", theme("screens"))); + let minWidths = extractMinWidths(screens); + let paddings = mapMinWidthsToPadding(minWidths, screens, theme("container.padding")); + let generatePaddingFor = (minWidth)=>{ + let paddingConfig = paddings.find((padding)=>padding.minWidth === minWidth); + if (!paddingConfig) { + return {}; + } + return { + paddingRight: paddingConfig.padding, + paddingLeft: paddingConfig.padding + }; + }; + let atRules = Array.from(new Set(minWidths.slice().sort((a, z)=>parseInt(a) - parseInt(z)))).map((minWidth)=>({ + [`@media (min-width: ${minWidth})`]: { + ".container": { + "max-width": minWidth, + ...generatePaddingFor(minWidth) + } + } + })); + addComponents([ + { + ".container": Object.assign({ + width: "100%" + }, theme("container.center", false) ? { + marginRight: "auto", + marginLeft: "auto" + } : {}, generatePaddingFor(0)) + }, + ...atRules + ]); + }; + })(), + accessibility: ({ addUtilities })=>{ + addUtilities({ + ".sr-only": { + position: "absolute", + width: "1px", + height: "1px", + padding: "0", + margin: "-1px", + overflow: "hidden", + clip: "rect(0, 0, 0, 0)", + whiteSpace: "nowrap", + borderWidth: "0" + }, + ".not-sr-only": { + position: "static", + width: "auto", + height: "auto", + padding: "0", + margin: "0", + overflow: "visible", + clip: "auto", + whiteSpace: "normal" + } + }); + }, + pointerEvents: ({ addUtilities })=>{ + addUtilities({ + ".pointer-events-none": { + "pointer-events": "none" + }, + ".pointer-events-auto": { + "pointer-events": "auto" + } + }); + }, + visibility: ({ addUtilities })=>{ + addUtilities({ + ".visible": { + visibility: "visible" + }, + ".invisible": { + visibility: "hidden" + }, + ".collapse": { + visibility: "collapse" + } + }); + }, + position: ({ addUtilities })=>{ + addUtilities({ + ".static": { + position: "static" + }, + ".fixed": { + position: "fixed" + }, + ".absolute": { + position: "absolute" + }, + ".relative": { + position: "relative" + }, + ".sticky": { + position: "sticky" + } + }); + }, + inset: (0, _createUtilityPlugin.default)("inset", [ + [ + "inset", + [ + "inset" + ] + ], + [ + [ + "inset-x", + [ + "left", + "right" + ] + ], + [ + "inset-y", + [ + "top", + "bottom" + ] + ] + ], + [ + [ + "start", + [ + "inset-inline-start" + ] + ], + [ + "end", + [ + "inset-inline-end" + ] + ], + [ + "top", + [ + "top" + ] + ], + [ + "right", + [ + "right" + ] + ], + [ + "bottom", + [ + "bottom" + ] + ], + [ + "left", + [ + "left" + ] + ] + ] + ], { + supportsNegativeValues: true + }), + isolation: ({ addUtilities })=>{ + addUtilities({ + ".isolate": { + isolation: "isolate" + }, + ".isolation-auto": { + isolation: "auto" + } + }); + }, + zIndex: (0, _createUtilityPlugin.default)("zIndex", [ + [ + "z", + [ + "zIndex" + ] + ] + ], { + supportsNegativeValues: true + }), + order: (0, _createUtilityPlugin.default)("order", undefined, { + supportsNegativeValues: true + }), + gridColumn: (0, _createUtilityPlugin.default)("gridColumn", [ + [ + "col", + [ + "gridColumn" + ] + ] + ]), + gridColumnStart: (0, _createUtilityPlugin.default)("gridColumnStart", [ + [ + "col-start", + [ + "gridColumnStart" + ] + ] + ], { + supportsNegativeValues: true + }), + gridColumnEnd: (0, _createUtilityPlugin.default)("gridColumnEnd", [ + [ + "col-end", + [ + "gridColumnEnd" + ] + ] + ], { + supportsNegativeValues: true + }), + gridRow: (0, _createUtilityPlugin.default)("gridRow", [ + [ + "row", + [ + "gridRow" + ] + ] + ]), + gridRowStart: (0, _createUtilityPlugin.default)("gridRowStart", [ + [ + "row-start", + [ + "gridRowStart" + ] + ] + ], { + supportsNegativeValues: true + }), + gridRowEnd: (0, _createUtilityPlugin.default)("gridRowEnd", [ + [ + "row-end", + [ + "gridRowEnd" + ] + ] + ], { + supportsNegativeValues: true + }), + float: ({ addUtilities })=>{ + addUtilities({ + ".float-start": { + float: "inline-start" + }, + ".float-end": { + float: "inline-end" + }, + ".float-right": { + float: "right" + }, + ".float-left": { + float: "left" + }, + ".float-none": { + float: "none" + } + }); + }, + clear: ({ addUtilities })=>{ + addUtilities({ + ".clear-start": { + clear: "inline-start" + }, + ".clear-end": { + clear: "inline-end" + }, + ".clear-left": { + clear: "left" + }, + ".clear-right": { + clear: "right" + }, + ".clear-both": { + clear: "both" + }, + ".clear-none": { + clear: "none" + } + }); + }, + margin: (0, _createUtilityPlugin.default)("margin", [ + [ + "m", + [ + "margin" + ] + ], + [ + [ + "mx", + [ + "margin-left", + "margin-right" + ] + ], + [ + "my", + [ + "margin-top", + "margin-bottom" + ] + ] + ], + [ + [ + "ms", + [ + "margin-inline-start" + ] + ], + [ + "me", + [ + "margin-inline-end" + ] + ], + [ + "mt", + [ + "margin-top" + ] + ], + [ + "mr", + [ + "margin-right" + ] + ], + [ + "mb", + [ + "margin-bottom" + ] + ], + [ + "ml", + [ + "margin-left" + ] + ] + ] + ], { + supportsNegativeValues: true + }), + boxSizing: ({ addUtilities })=>{ + addUtilities({ + ".box-border": { + "box-sizing": "border-box" + }, + ".box-content": { + "box-sizing": "content-box" + } + }); + }, + lineClamp: ({ matchUtilities , addUtilities , theme })=>{ + matchUtilities({ + "line-clamp": (value)=>({ + overflow: "hidden", + display: "-webkit-box", + "-webkit-box-orient": "vertical", + "-webkit-line-clamp": `${value}` + }) + }, { + values: theme("lineClamp") + }); + addUtilities({ + ".line-clamp-none": { + overflow: "visible", + display: "block", + "-webkit-box-orient": "horizontal", + "-webkit-line-clamp": "none" + } + }); + }, + display: ({ addUtilities })=>{ + addUtilities({ + ".block": { + display: "block" + }, + ".inline-block": { + display: "inline-block" + }, + ".inline": { + display: "inline" + }, + ".flex": { + display: "flex" + }, + ".inline-flex": { + display: "inline-flex" + }, + ".table": { + display: "table" + }, + ".inline-table": { + display: "inline-table" + }, + ".table-caption": { + display: "table-caption" + }, + ".table-cell": { + display: "table-cell" + }, + ".table-column": { + display: "table-column" + }, + ".table-column-group": { + display: "table-column-group" + }, + ".table-footer-group": { + display: "table-footer-group" + }, + ".table-header-group": { + display: "table-header-group" + }, + ".table-row-group": { + display: "table-row-group" + }, + ".table-row": { + display: "table-row" + }, + ".flow-root": { + display: "flow-root" + }, + ".grid": { + display: "grid" + }, + ".inline-grid": { + display: "inline-grid" + }, + ".contents": { + display: "contents" + }, + ".list-item": { + display: "list-item" + }, + ".hidden": { + display: "none" + } + }); + }, + aspectRatio: (0, _createUtilityPlugin.default)("aspectRatio", [ + [ + "aspect", + [ + "aspect-ratio" + ] + ] + ]), + size: (0, _createUtilityPlugin.default)("size", [ + [ + "size", + [ + "width", + "height" + ] + ] + ]), + height: (0, _createUtilityPlugin.default)("height", [ + [ + "h", + [ + "height" + ] + ] + ]), + maxHeight: (0, _createUtilityPlugin.default)("maxHeight", [ + [ + "max-h", + [ + "maxHeight" + ] + ] + ]), + minHeight: (0, _createUtilityPlugin.default)("minHeight", [ + [ + "min-h", + [ + "minHeight" + ] + ] + ]), + width: (0, _createUtilityPlugin.default)("width", [ + [ + "w", + [ + "width" + ] + ] + ]), + minWidth: (0, _createUtilityPlugin.default)("minWidth", [ + [ + "min-w", + [ + "minWidth" + ] + ] + ]), + maxWidth: (0, _createUtilityPlugin.default)("maxWidth", [ + [ + "max-w", + [ + "maxWidth" + ] + ] + ]), + flex: (0, _createUtilityPlugin.default)("flex"), + flexShrink: (0, _createUtilityPlugin.default)("flexShrink", [ + [ + "flex-shrink", + [ + "flex-shrink" + ] + ], + [ + "shrink", + [ + "flex-shrink" + ] + ] + ]), + flexGrow: (0, _createUtilityPlugin.default)("flexGrow", [ + [ + "flex-grow", + [ + "flex-grow" + ] + ], + [ + "grow", + [ + "flex-grow" + ] + ] + ]), + flexBasis: (0, _createUtilityPlugin.default)("flexBasis", [ + [ + "basis", + [ + "flex-basis" + ] + ] + ]), + tableLayout: ({ addUtilities })=>{ + addUtilities({ + ".table-auto": { + "table-layout": "auto" + }, + ".table-fixed": { + "table-layout": "fixed" + } + }); + }, + captionSide: ({ addUtilities })=>{ + addUtilities({ + ".caption-top": { + "caption-side": "top" + }, + ".caption-bottom": { + "caption-side": "bottom" + } + }); + }, + borderCollapse: ({ addUtilities })=>{ + addUtilities({ + ".border-collapse": { + "border-collapse": "collapse" + }, + ".border-separate": { + "border-collapse": "separate" + } + }); + }, + borderSpacing: ({ addDefaults , matchUtilities , theme })=>{ + addDefaults("border-spacing", { + "--tw-border-spacing-x": 0, + "--tw-border-spacing-y": 0 + }); + matchUtilities({ + "border-spacing": (value)=>{ + return { + "--tw-border-spacing-x": value, + "--tw-border-spacing-y": value, + "@defaults border-spacing": {}, + "border-spacing": "var(--tw-border-spacing-x) var(--tw-border-spacing-y)" + }; + }, + "border-spacing-x": (value)=>{ + return { + "--tw-border-spacing-x": value, + "@defaults border-spacing": {}, + "border-spacing": "var(--tw-border-spacing-x) var(--tw-border-spacing-y)" + }; + }, + "border-spacing-y": (value)=>{ + return { + "--tw-border-spacing-y": value, + "@defaults border-spacing": {}, + "border-spacing": "var(--tw-border-spacing-x) var(--tw-border-spacing-y)" + }; + } + }, { + values: theme("borderSpacing") + }); + }, + transformOrigin: (0, _createUtilityPlugin.default)("transformOrigin", [ + [ + "origin", + [ + "transformOrigin" + ] + ] + ]), + translate: (0, _createUtilityPlugin.default)("translate", [ + [ + [ + "translate-x", + [ + [ + "@defaults transform", + {} + ], + "--tw-translate-x", + [ + "transform", + cssTransformValue + ] + ] + ], + [ + "translate-y", + [ + [ + "@defaults transform", + {} + ], + "--tw-translate-y", + [ + "transform", + cssTransformValue + ] + ] + ] + ] + ], { + supportsNegativeValues: true + }), + rotate: (0, _createUtilityPlugin.default)("rotate", [ + [ + "rotate", + [ + [ + "@defaults transform", + {} + ], + "--tw-rotate", + [ + "transform", + cssTransformValue + ] + ] + ] + ], { + supportsNegativeValues: true + }), + skew: (0, _createUtilityPlugin.default)("skew", [ + [ + [ + "skew-x", + [ + [ + "@defaults transform", + {} + ], + "--tw-skew-x", + [ + "transform", + cssTransformValue + ] + ] + ], + [ + "skew-y", + [ + [ + "@defaults transform", + {} + ], + "--tw-skew-y", + [ + "transform", + cssTransformValue + ] + ] + ] + ] + ], { + supportsNegativeValues: true + }), + scale: (0, _createUtilityPlugin.default)("scale", [ + [ + "scale", + [ + [ + "@defaults transform", + {} + ], + "--tw-scale-x", + "--tw-scale-y", + [ + "transform", + cssTransformValue + ] + ] + ], + [ + [ + "scale-x", + [ + [ + "@defaults transform", + {} + ], + "--tw-scale-x", + [ + "transform", + cssTransformValue + ] + ] + ], + [ + "scale-y", + [ + [ + "@defaults transform", + {} + ], + "--tw-scale-y", + [ + "transform", + cssTransformValue + ] + ] + ] + ] + ], { + supportsNegativeValues: true + }), + transform: ({ addDefaults , addUtilities })=>{ + addDefaults("transform", { + "--tw-translate-x": "0", + "--tw-translate-y": "0", + "--tw-rotate": "0", + "--tw-skew-x": "0", + "--tw-skew-y": "0", + "--tw-scale-x": "1", + "--tw-scale-y": "1" + }); + addUtilities({ + ".transform": { + "@defaults transform": {}, + transform: cssTransformValue + }, + ".transform-cpu": { + transform: cssTransformValue + }, + ".transform-gpu": { + transform: cssTransformValue.replace("translate(var(--tw-translate-x), var(--tw-translate-y))", "translate3d(var(--tw-translate-x), var(--tw-translate-y), 0)") + }, + ".transform-none": { + transform: "none" + } + }); + }, + animation: ({ matchUtilities , theme , config })=>{ + let prefixName = (name)=>(0, _escapeClassName.default)(config("prefix") + name); + var _theme; + let keyframes = Object.fromEntries(Object.entries((_theme = theme("keyframes")) !== null && _theme !== void 0 ? _theme : {}).map(([key, value])=>{ + return [ + key, + { + [`@keyframes ${prefixName(key)}`]: value + } + ]; + })); + matchUtilities({ + animate: (value)=>{ + let animations = (0, _parseAnimationValue.default)(value); + return [ + ...animations.flatMap((animation)=>keyframes[animation.name]), + { + animation: animations.map(({ name , value })=>{ + if (name === undefined || keyframes[name] === undefined) { + return value; + } + return value.replace(name, prefixName(name)); + }).join(", ") + } + ]; + } + }, { + values: theme("animation") + }); + }, + cursor: (0, _createUtilityPlugin.default)("cursor"), + touchAction: ({ addDefaults , addUtilities })=>{ + addDefaults("touch-action", { + "--tw-pan-x": " ", + "--tw-pan-y": " ", + "--tw-pinch-zoom": " " + }); + let cssTouchActionValue = "var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"; + addUtilities({ + ".touch-auto": { + "touch-action": "auto" + }, + ".touch-none": { + "touch-action": "none" + }, + ".touch-pan-x": { + "@defaults touch-action": {}, + "--tw-pan-x": "pan-x", + "touch-action": cssTouchActionValue + }, + ".touch-pan-left": { + "@defaults touch-action": {}, + "--tw-pan-x": "pan-left", + "touch-action": cssTouchActionValue + }, + ".touch-pan-right": { + "@defaults touch-action": {}, + "--tw-pan-x": "pan-right", + "touch-action": cssTouchActionValue + }, + ".touch-pan-y": { + "@defaults touch-action": {}, + "--tw-pan-y": "pan-y", + "touch-action": cssTouchActionValue + }, + ".touch-pan-up": { + "@defaults touch-action": {}, + "--tw-pan-y": "pan-up", + "touch-action": cssTouchActionValue + }, + ".touch-pan-down": { + "@defaults touch-action": {}, + "--tw-pan-y": "pan-down", + "touch-action": cssTouchActionValue + }, + ".touch-pinch-zoom": { + "@defaults touch-action": {}, + "--tw-pinch-zoom": "pinch-zoom", + "touch-action": cssTouchActionValue + }, + ".touch-manipulation": { + "touch-action": "manipulation" + } + }); + }, + userSelect: ({ addUtilities })=>{ + addUtilities({ + ".select-none": { + "user-select": "none" + }, + ".select-text": { + "user-select": "text" + }, + ".select-all": { + "user-select": "all" + }, + ".select-auto": { + "user-select": "auto" + } + }); + }, + resize: ({ addUtilities })=>{ + addUtilities({ + ".resize-none": { + resize: "none" + }, + ".resize-y": { + resize: "vertical" + }, + ".resize-x": { + resize: "horizontal" + }, + ".resize": { + resize: "both" + } + }); + }, + scrollSnapType: ({ addDefaults , addUtilities })=>{ + addDefaults("scroll-snap-type", { + "--tw-scroll-snap-strictness": "proximity" + }); + addUtilities({ + ".snap-none": { + "scroll-snap-type": "none" + }, + ".snap-x": { + "@defaults scroll-snap-type": {}, + "scroll-snap-type": "x var(--tw-scroll-snap-strictness)" + }, + ".snap-y": { + "@defaults scroll-snap-type": {}, + "scroll-snap-type": "y var(--tw-scroll-snap-strictness)" + }, + ".snap-both": { + "@defaults scroll-snap-type": {}, + "scroll-snap-type": "both var(--tw-scroll-snap-strictness)" + }, + ".snap-mandatory": { + "--tw-scroll-snap-strictness": "mandatory" + }, + ".snap-proximity": { + "--tw-scroll-snap-strictness": "proximity" + } + }); + }, + scrollSnapAlign: ({ addUtilities })=>{ + addUtilities({ + ".snap-start": { + "scroll-snap-align": "start" + }, + ".snap-end": { + "scroll-snap-align": "end" + }, + ".snap-center": { + "scroll-snap-align": "center" + }, + ".snap-align-none": { + "scroll-snap-align": "none" + } + }); + }, + scrollSnapStop: ({ addUtilities })=>{ + addUtilities({ + ".snap-normal": { + "scroll-snap-stop": "normal" + }, + ".snap-always": { + "scroll-snap-stop": "always" + } + }); + }, + scrollMargin: (0, _createUtilityPlugin.default)("scrollMargin", [ + [ + "scroll-m", + [ + "scroll-margin" + ] + ], + [ + [ + "scroll-mx", + [ + "scroll-margin-left", + "scroll-margin-right" + ] + ], + [ + "scroll-my", + [ + "scroll-margin-top", + "scroll-margin-bottom" + ] + ] + ], + [ + [ + "scroll-ms", + [ + "scroll-margin-inline-start" + ] + ], + [ + "scroll-me", + [ + "scroll-margin-inline-end" + ] + ], + [ + "scroll-mt", + [ + "scroll-margin-top" + ] + ], + [ + "scroll-mr", + [ + "scroll-margin-right" + ] + ], + [ + "scroll-mb", + [ + "scroll-margin-bottom" + ] + ], + [ + "scroll-ml", + [ + "scroll-margin-left" + ] + ] + ] + ], { + supportsNegativeValues: true + }), + scrollPadding: (0, _createUtilityPlugin.default)("scrollPadding", [ + [ + "scroll-p", + [ + "scroll-padding" + ] + ], + [ + [ + "scroll-px", + [ + "scroll-padding-left", + "scroll-padding-right" + ] + ], + [ + "scroll-py", + [ + "scroll-padding-top", + "scroll-padding-bottom" + ] + ] + ], + [ + [ + "scroll-ps", + [ + "scroll-padding-inline-start" + ] + ], + [ + "scroll-pe", + [ + "scroll-padding-inline-end" + ] + ], + [ + "scroll-pt", + [ + "scroll-padding-top" + ] + ], + [ + "scroll-pr", + [ + "scroll-padding-right" + ] + ], + [ + "scroll-pb", + [ + "scroll-padding-bottom" + ] + ], + [ + "scroll-pl", + [ + "scroll-padding-left" + ] + ] + ] + ]), + listStylePosition: ({ addUtilities })=>{ + addUtilities({ + ".list-inside": { + "list-style-position": "inside" + }, + ".list-outside": { + "list-style-position": "outside" + } + }); + }, + listStyleType: (0, _createUtilityPlugin.default)("listStyleType", [ + [ + "list", + [ + "listStyleType" + ] + ] + ]), + listStyleImage: (0, _createUtilityPlugin.default)("listStyleImage", [ + [ + "list-image", + [ + "listStyleImage" + ] + ] + ]), + appearance: ({ addUtilities })=>{ + addUtilities({ + ".appearance-none": { + appearance: "none" + }, + ".appearance-auto": { + appearance: "auto" + } + }); + }, + columns: (0, _createUtilityPlugin.default)("columns", [ + [ + "columns", + [ + "columns" + ] + ] + ]), + breakBefore: ({ addUtilities })=>{ + addUtilities({ + ".break-before-auto": { + "break-before": "auto" + }, + ".break-before-avoid": { + "break-before": "avoid" + }, + ".break-before-all": { + "break-before": "all" + }, + ".break-before-avoid-page": { + "break-before": "avoid-page" + }, + ".break-before-page": { + "break-before": "page" + }, + ".break-before-left": { + "break-before": "left" + }, + ".break-before-right": { + "break-before": "right" + }, + ".break-before-column": { + "break-before": "column" + } + }); + }, + breakInside: ({ addUtilities })=>{ + addUtilities({ + ".break-inside-auto": { + "break-inside": "auto" + }, + ".break-inside-avoid": { + "break-inside": "avoid" + }, + ".break-inside-avoid-page": { + "break-inside": "avoid-page" + }, + ".break-inside-avoid-column": { + "break-inside": "avoid-column" + } + }); + }, + breakAfter: ({ addUtilities })=>{ + addUtilities({ + ".break-after-auto": { + "break-after": "auto" + }, + ".break-after-avoid": { + "break-after": "avoid" + }, + ".break-after-all": { + "break-after": "all" + }, + ".break-after-avoid-page": { + "break-after": "avoid-page" + }, + ".break-after-page": { + "break-after": "page" + }, + ".break-after-left": { + "break-after": "left" + }, + ".break-after-right": { + "break-after": "right" + }, + ".break-after-column": { + "break-after": "column" + } + }); + }, + gridAutoColumns: (0, _createUtilityPlugin.default)("gridAutoColumns", [ + [ + "auto-cols", + [ + "gridAutoColumns" + ] + ] + ]), + gridAutoFlow: ({ addUtilities })=>{ + addUtilities({ + ".grid-flow-row": { + gridAutoFlow: "row" + }, + ".grid-flow-col": { + gridAutoFlow: "column" + }, + ".grid-flow-dense": { + gridAutoFlow: "dense" + }, + ".grid-flow-row-dense": { + gridAutoFlow: "row dense" + }, + ".grid-flow-col-dense": { + gridAutoFlow: "column dense" + } + }); + }, + gridAutoRows: (0, _createUtilityPlugin.default)("gridAutoRows", [ + [ + "auto-rows", + [ + "gridAutoRows" + ] + ] + ]), + gridTemplateColumns: (0, _createUtilityPlugin.default)("gridTemplateColumns", [ + [ + "grid-cols", + [ + "gridTemplateColumns" + ] + ] + ]), + gridTemplateRows: (0, _createUtilityPlugin.default)("gridTemplateRows", [ + [ + "grid-rows", + [ + "gridTemplateRows" + ] + ] + ]), + flexDirection: ({ addUtilities })=>{ + addUtilities({ + ".flex-row": { + "flex-direction": "row" + }, + ".flex-row-reverse": { + "flex-direction": "row-reverse" + }, + ".flex-col": { + "flex-direction": "column" + }, + ".flex-col-reverse": { + "flex-direction": "column-reverse" + } + }); + }, + flexWrap: ({ addUtilities })=>{ + addUtilities({ + ".flex-wrap": { + "flex-wrap": "wrap" + }, + ".flex-wrap-reverse": { + "flex-wrap": "wrap-reverse" + }, + ".flex-nowrap": { + "flex-wrap": "nowrap" + } + }); + }, + placeContent: ({ addUtilities })=>{ + addUtilities({ + ".place-content-center": { + "place-content": "center" + }, + ".place-content-start": { + "place-content": "start" + }, + ".place-content-end": { + "place-content": "end" + }, + ".place-content-between": { + "place-content": "space-between" + }, + ".place-content-around": { + "place-content": "space-around" + }, + ".place-content-evenly": { + "place-content": "space-evenly" + }, + ".place-content-baseline": { + "place-content": "baseline" + }, + ".place-content-stretch": { + "place-content": "stretch" + } + }); + }, + placeItems: ({ addUtilities })=>{ + addUtilities({ + ".place-items-start": { + "place-items": "start" + }, + ".place-items-end": { + "place-items": "end" + }, + ".place-items-center": { + "place-items": "center" + }, + ".place-items-baseline": { + "place-items": "baseline" + }, + ".place-items-stretch": { + "place-items": "stretch" + } + }); + }, + alignContent: ({ addUtilities })=>{ + addUtilities({ + ".content-normal": { + "align-content": "normal" + }, + ".content-center": { + "align-content": "center" + }, + ".content-start": { + "align-content": "flex-start" + }, + ".content-end": { + "align-content": "flex-end" + }, + ".content-between": { + "align-content": "space-between" + }, + ".content-around": { + "align-content": "space-around" + }, + ".content-evenly": { + "align-content": "space-evenly" + }, + ".content-baseline": { + "align-content": "baseline" + }, + ".content-stretch": { + "align-content": "stretch" + } + }); + }, + alignItems: ({ addUtilities })=>{ + addUtilities({ + ".items-start": { + "align-items": "flex-start" + }, + ".items-end": { + "align-items": "flex-end" + }, + ".items-center": { + "align-items": "center" + }, + ".items-baseline": { + "align-items": "baseline" + }, + ".items-stretch": { + "align-items": "stretch" + } + }); + }, + justifyContent: ({ addUtilities })=>{ + addUtilities({ + ".justify-normal": { + "justify-content": "normal" + }, + ".justify-start": { + "justify-content": "flex-start" + }, + ".justify-end": { + "justify-content": "flex-end" + }, + ".justify-center": { + "justify-content": "center" + }, + ".justify-between": { + "justify-content": "space-between" + }, + ".justify-around": { + "justify-content": "space-around" + }, + ".justify-evenly": { + "justify-content": "space-evenly" + }, + ".justify-stretch": { + "justify-content": "stretch" + } + }); + }, + justifyItems: ({ addUtilities })=>{ + addUtilities({ + ".justify-items-start": { + "justify-items": "start" + }, + ".justify-items-end": { + "justify-items": "end" + }, + ".justify-items-center": { + "justify-items": "center" + }, + ".justify-items-stretch": { + "justify-items": "stretch" + } + }); + }, + gap: (0, _createUtilityPlugin.default)("gap", [ + [ + "gap", + [ + "gap" + ] + ], + [ + [ + "gap-x", + [ + "columnGap" + ] + ], + [ + "gap-y", + [ + "rowGap" + ] + ] + ] + ]), + space: ({ matchUtilities , addUtilities , theme })=>{ + matchUtilities({ + "space-x": (value)=>{ + value = value === "0" ? "0px" : value; + return { + "& > :not([hidden]) ~ :not([hidden])": { + "--tw-space-x-reverse": "0", + "margin-right": `calc(${value} * var(--tw-space-x-reverse))`, + "margin-left": `calc(${value} * calc(1 - var(--tw-space-x-reverse)))` + } + }; + }, + "space-y": (value)=>{ + value = value === "0" ? "0px" : value; + return { + "& > :not([hidden]) ~ :not([hidden])": { + "--tw-space-y-reverse": "0", + "margin-top": `calc(${value} * calc(1 - var(--tw-space-y-reverse)))`, + "margin-bottom": `calc(${value} * var(--tw-space-y-reverse))` + } + }; + } + }, { + values: theme("space"), + supportsNegativeValues: true + }); + addUtilities({ + ".space-y-reverse > :not([hidden]) ~ :not([hidden])": { + "--tw-space-y-reverse": "1" + }, + ".space-x-reverse > :not([hidden]) ~ :not([hidden])": { + "--tw-space-x-reverse": "1" + } + }); + }, + divideWidth: ({ matchUtilities , addUtilities , theme })=>{ + matchUtilities({ + "divide-x": (value)=>{ + value = value === "0" ? "0px" : value; + return { + "& > :not([hidden]) ~ :not([hidden])": { + "@defaults border-width": {}, + "--tw-divide-x-reverse": "0", + "border-right-width": `calc(${value} * var(--tw-divide-x-reverse))`, + "border-left-width": `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))` + } + }; + }, + "divide-y": (value)=>{ + value = value === "0" ? "0px" : value; + return { + "& > :not([hidden]) ~ :not([hidden])": { + "@defaults border-width": {}, + "--tw-divide-y-reverse": "0", + "border-top-width": `calc(${value} * calc(1 - var(--tw-divide-y-reverse)))`, + "border-bottom-width": `calc(${value} * var(--tw-divide-y-reverse))` + } + }; + } + }, { + values: theme("divideWidth"), + type: [ + "line-width", + "length", + "any" + ] + }); + addUtilities({ + ".divide-y-reverse > :not([hidden]) ~ :not([hidden])": { + "@defaults border-width": {}, + "--tw-divide-y-reverse": "1" + }, + ".divide-x-reverse > :not([hidden]) ~ :not([hidden])": { + "@defaults border-width": {}, + "--tw-divide-x-reverse": "1" + } + }); + }, + divideStyle: ({ addUtilities })=>{ + addUtilities({ + ".divide-solid > :not([hidden]) ~ :not([hidden])": { + "border-style": "solid" + }, + ".divide-dashed > :not([hidden]) ~ :not([hidden])": { + "border-style": "dashed" + }, + ".divide-dotted > :not([hidden]) ~ :not([hidden])": { + "border-style": "dotted" + }, + ".divide-double > :not([hidden]) ~ :not([hidden])": { + "border-style": "double" + }, + ".divide-none > :not([hidden]) ~ :not([hidden])": { + "border-style": "none" + } + }); + }, + divideColor: ({ matchUtilities , theme , corePlugins })=>{ + matchUtilities({ + divide: (value)=>{ + if (!corePlugins("divideOpacity")) { + return { + ["& > :not([hidden]) ~ :not([hidden])"]: { + "border-color": (0, _toColorValue.default)(value) + } + }; + } + return { + ["& > :not([hidden]) ~ :not([hidden])"]: (0, _withAlphaVariable.default)({ + color: value, + property: "border-color", + variable: "--tw-divide-opacity" + }) + }; + } + }, { + values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette.default)(theme("divideColor"))), + type: [ + "color", + "any" + ] + }); + }, + divideOpacity: ({ matchUtilities , theme })=>{ + matchUtilities({ + "divide-opacity": (value)=>{ + return { + [`& > :not([hidden]) ~ :not([hidden])`]: { + "--tw-divide-opacity": value + } + }; + } + }, { + values: theme("divideOpacity") + }); + }, + placeSelf: ({ addUtilities })=>{ + addUtilities({ + ".place-self-auto": { + "place-self": "auto" + }, + ".place-self-start": { + "place-self": "start" + }, + ".place-self-end": { + "place-self": "end" + }, + ".place-self-center": { + "place-self": "center" + }, + ".place-self-stretch": { + "place-self": "stretch" + } + }); + }, + alignSelf: ({ addUtilities })=>{ + addUtilities({ + ".self-auto": { + "align-self": "auto" + }, + ".self-start": { + "align-self": "flex-start" + }, + ".self-end": { + "align-self": "flex-end" + }, + ".self-center": { + "align-self": "center" + }, + ".self-stretch": { + "align-self": "stretch" + }, + ".self-baseline": { + "align-self": "baseline" + } + }); + }, + justifySelf: ({ addUtilities })=>{ + addUtilities({ + ".justify-self-auto": { + "justify-self": "auto" + }, + ".justify-self-start": { + "justify-self": "start" + }, + ".justify-self-end": { + "justify-self": "end" + }, + ".justify-self-center": { + "justify-self": "center" + }, + ".justify-self-stretch": { + "justify-self": "stretch" + } + }); + }, + overflow: ({ addUtilities })=>{ + addUtilities({ + ".overflow-auto": { + overflow: "auto" + }, + ".overflow-hidden": { + overflow: "hidden" + }, + ".overflow-clip": { + overflow: "clip" + }, + ".overflow-visible": { + overflow: "visible" + }, + ".overflow-scroll": { + overflow: "scroll" + }, + ".overflow-x-auto": { + "overflow-x": "auto" + }, + ".overflow-y-auto": { + "overflow-y": "auto" + }, + ".overflow-x-hidden": { + "overflow-x": "hidden" + }, + ".overflow-y-hidden": { + "overflow-y": "hidden" + }, + ".overflow-x-clip": { + "overflow-x": "clip" + }, + ".overflow-y-clip": { + "overflow-y": "clip" + }, + ".overflow-x-visible": { + "overflow-x": "visible" + }, + ".overflow-y-visible": { + "overflow-y": "visible" + }, + ".overflow-x-scroll": { + "overflow-x": "scroll" + }, + ".overflow-y-scroll": { + "overflow-y": "scroll" + } + }); + }, + overscrollBehavior: ({ addUtilities })=>{ + addUtilities({ + ".overscroll-auto": { + "overscroll-behavior": "auto" + }, + ".overscroll-contain": { + "overscroll-behavior": "contain" + }, + ".overscroll-none": { + "overscroll-behavior": "none" + }, + ".overscroll-y-auto": { + "overscroll-behavior-y": "auto" + }, + ".overscroll-y-contain": { + "overscroll-behavior-y": "contain" + }, + ".overscroll-y-none": { + "overscroll-behavior-y": "none" + }, + ".overscroll-x-auto": { + "overscroll-behavior-x": "auto" + }, + ".overscroll-x-contain": { + "overscroll-behavior-x": "contain" + }, + ".overscroll-x-none": { + "overscroll-behavior-x": "none" + } + }); + }, + scrollBehavior: ({ addUtilities })=>{ + addUtilities({ + ".scroll-auto": { + "scroll-behavior": "auto" + }, + ".scroll-smooth": { + "scroll-behavior": "smooth" + } + }); + }, + textOverflow: ({ addUtilities })=>{ + addUtilities({ + ".truncate": { + overflow: "hidden", + "text-overflow": "ellipsis", + "white-space": "nowrap" + }, + ".overflow-ellipsis": { + "text-overflow": "ellipsis" + }, + ".text-ellipsis": { + "text-overflow": "ellipsis" + }, + ".text-clip": { + "text-overflow": "clip" + } + }); + }, + hyphens: ({ addUtilities })=>{ + addUtilities({ + ".hyphens-none": { + hyphens: "none" + }, + ".hyphens-manual": { + hyphens: "manual" + }, + ".hyphens-auto": { + hyphens: "auto" + } + }); + }, + whitespace: ({ addUtilities })=>{ + addUtilities({ + ".whitespace-normal": { + "white-space": "normal" + }, + ".whitespace-nowrap": { + "white-space": "nowrap" + }, + ".whitespace-pre": { + "white-space": "pre" + }, + ".whitespace-pre-line": { + "white-space": "pre-line" + }, + ".whitespace-pre-wrap": { + "white-space": "pre-wrap" + }, + ".whitespace-break-spaces": { + "white-space": "break-spaces" + } + }); + }, + textWrap: ({ addUtilities })=>{ + addUtilities({ + ".text-wrap": { + "text-wrap": "wrap" + }, + ".text-nowrap": { + "text-wrap": "nowrap" + }, + ".text-balance": { + "text-wrap": "balance" + }, + ".text-pretty": { + "text-wrap": "pretty" + } + }); + }, + wordBreak: ({ addUtilities })=>{ + addUtilities({ + ".break-normal": { + "overflow-wrap": "normal", + "word-break": "normal" + }, + ".break-words": { + "overflow-wrap": "break-word" + }, + ".break-all": { + "word-break": "break-all" + }, + ".break-keep": { + "word-break": "keep-all" + } + }); + }, + borderRadius: (0, _createUtilityPlugin.default)("borderRadius", [ + [ + "rounded", + [ + "border-radius" + ] + ], + [ + [ + "rounded-s", + [ + "border-start-start-radius", + "border-end-start-radius" + ] + ], + [ + "rounded-e", + [ + "border-start-end-radius", + "border-end-end-radius" + ] + ], + [ + "rounded-t", + [ + "border-top-left-radius", + "border-top-right-radius" + ] + ], + [ + "rounded-r", + [ + "border-top-right-radius", + "border-bottom-right-radius" + ] + ], + [ + "rounded-b", + [ + "border-bottom-right-radius", + "border-bottom-left-radius" + ] + ], + [ + "rounded-l", + [ + "border-top-left-radius", + "border-bottom-left-radius" + ] + ] + ], + [ + [ + "rounded-ss", + [ + "border-start-start-radius" + ] + ], + [ + "rounded-se", + [ + "border-start-end-radius" + ] + ], + [ + "rounded-ee", + [ + "border-end-end-radius" + ] + ], + [ + "rounded-es", + [ + "border-end-start-radius" + ] + ], + [ + "rounded-tl", + [ + "border-top-left-radius" + ] + ], + [ + "rounded-tr", + [ + "border-top-right-radius" + ] + ], + [ + "rounded-br", + [ + "border-bottom-right-radius" + ] + ], + [ + "rounded-bl", + [ + "border-bottom-left-radius" + ] + ] + ] + ]), + borderWidth: (0, _createUtilityPlugin.default)("borderWidth", [ + [ + "border", + [ + [ + "@defaults border-width", + {} + ], + "border-width" + ] + ], + [ + [ + "border-x", + [ + [ + "@defaults border-width", + {} + ], + "border-left-width", + "border-right-width" + ] + ], + [ + "border-y", + [ + [ + "@defaults border-width", + {} + ], + "border-top-width", + "border-bottom-width" + ] + ] + ], + [ + [ + "border-s", + [ + [ + "@defaults border-width", + {} + ], + "border-inline-start-width" + ] + ], + [ + "border-e", + [ + [ + "@defaults border-width", + {} + ], + "border-inline-end-width" + ] + ], + [ + "border-t", + [ + [ + "@defaults border-width", + {} + ], + "border-top-width" + ] + ], + [ + "border-r", + [ + [ + "@defaults border-width", + {} + ], + "border-right-width" + ] + ], + [ + "border-b", + [ + [ + "@defaults border-width", + {} + ], + "border-bottom-width" + ] + ], + [ + "border-l", + [ + [ + "@defaults border-width", + {} + ], + "border-left-width" + ] + ] + ] + ], { + type: [ + "line-width", + "length" + ] + }), + borderStyle: ({ addUtilities })=>{ + addUtilities({ + ".border-solid": { + "border-style": "solid" + }, + ".border-dashed": { + "border-style": "dashed" + }, + ".border-dotted": { + "border-style": "dotted" + }, + ".border-double": { + "border-style": "double" + }, + ".border-hidden": { + "border-style": "hidden" + }, + ".border-none": { + "border-style": "none" + } + }); + }, + borderColor: ({ matchUtilities , theme , corePlugins })=>{ + matchUtilities({ + border: (value)=>{ + if (!corePlugins("borderOpacity")) { + return { + "border-color": (0, _toColorValue.default)(value) + }; + } + return (0, _withAlphaVariable.default)({ + color: value, + property: "border-color", + variable: "--tw-border-opacity" + }); + } + }, { + values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette.default)(theme("borderColor"))), + type: [ + "color", + "any" + ] + }); + matchUtilities({ + "border-x": (value)=>{ + if (!corePlugins("borderOpacity")) { + return { + "border-left-color": (0, _toColorValue.default)(value), + "border-right-color": (0, _toColorValue.default)(value) + }; + } + return (0, _withAlphaVariable.default)({ + color: value, + property: [ + "border-left-color", + "border-right-color" + ], + variable: "--tw-border-opacity" + }); + }, + "border-y": (value)=>{ + if (!corePlugins("borderOpacity")) { + return { + "border-top-color": (0, _toColorValue.default)(value), + "border-bottom-color": (0, _toColorValue.default)(value) + }; + } + return (0, _withAlphaVariable.default)({ + color: value, + property: [ + "border-top-color", + "border-bottom-color" + ], + variable: "--tw-border-opacity" + }); + } + }, { + values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette.default)(theme("borderColor"))), + type: [ + "color", + "any" + ] + }); + matchUtilities({ + "border-s": (value)=>{ + if (!corePlugins("borderOpacity")) { + return { + "border-inline-start-color": (0, _toColorValue.default)(value) + }; + } + return (0, _withAlphaVariable.default)({ + color: value, + property: "border-inline-start-color", + variable: "--tw-border-opacity" + }); + }, + "border-e": (value)=>{ + if (!corePlugins("borderOpacity")) { + return { + "border-inline-end-color": (0, _toColorValue.default)(value) + }; + } + return (0, _withAlphaVariable.default)({ + color: value, + property: "border-inline-end-color", + variable: "--tw-border-opacity" + }); + }, + "border-t": (value)=>{ + if (!corePlugins("borderOpacity")) { + return { + "border-top-color": (0, _toColorValue.default)(value) + }; + } + return (0, _withAlphaVariable.default)({ + color: value, + property: "border-top-color", + variable: "--tw-border-opacity" + }); + }, + "border-r": (value)=>{ + if (!corePlugins("borderOpacity")) { + return { + "border-right-color": (0, _toColorValue.default)(value) + }; + } + return (0, _withAlphaVariable.default)({ + color: value, + property: "border-right-color", + variable: "--tw-border-opacity" + }); + }, + "border-b": (value)=>{ + if (!corePlugins("borderOpacity")) { + return { + "border-bottom-color": (0, _toColorValue.default)(value) + }; + } + return (0, _withAlphaVariable.default)({ + color: value, + property: "border-bottom-color", + variable: "--tw-border-opacity" + }); + }, + "border-l": (value)=>{ + if (!corePlugins("borderOpacity")) { + return { + "border-left-color": (0, _toColorValue.default)(value) + }; + } + return (0, _withAlphaVariable.default)({ + color: value, + property: "border-left-color", + variable: "--tw-border-opacity" + }); + } + }, { + values: (({ DEFAULT: _ , ...colors })=>colors)((0, _flattenColorPalette.default)(theme("borderColor"))), + type: [ + "color", + "any" + ] + }); + }, + borderOpacity: (0, _createUtilityPlugin.default)("borderOpacity", [ + [ + "border-opacity", + [ + "--tw-border-opacity" + ] + ] + ]), + backgroundColor: ({ matchUtilities , theme , corePlugins })=>{ + matchUtilities({ + bg: (value)=>{ + if (!corePlugins("backgroundOpacity")) { + return { + "background-color": (0, _toColorValue.default)(value) + }; + } + return (0, _withAlphaVariable.default)({ + color: value, + property: "background-color", + variable: "--tw-bg-opacity" + }); + } + }, { + values: (0, _flattenColorPalette.default)(theme("backgroundColor")), + type: [ + "color", + "any" + ] + }); + }, + backgroundOpacity: (0, _createUtilityPlugin.default)("backgroundOpacity", [ + [ + "bg-opacity", + [ + "--tw-bg-opacity" + ] + ] + ]), + backgroundImage: (0, _createUtilityPlugin.default)("backgroundImage", [ + [ + "bg", + [ + "background-image" + ] + ] + ], { + type: [ + "lookup", + "image", + "url" + ] + }), + gradientColorStops: (()=>{ + function transparentTo(value) { + return (0, _withAlphaVariable.withAlphaValue)(value, 0, "rgb(255 255 255 / 0)"); + } + return function({ matchUtilities , theme , addDefaults }) { + addDefaults("gradient-color-stops", { + "--tw-gradient-from-position": " ", + "--tw-gradient-via-position": " ", + "--tw-gradient-to-position": " " + }); + let options = { + values: (0, _flattenColorPalette.default)(theme("gradientColorStops")), + type: [ + "color", + "any" + ] + }; + let positionOptions = { + values: theme("gradientColorStopPositions"), + type: [ + "length", + "percentage" + ] + }; + matchUtilities({ + from: (value)=>{ + let transparentToValue = transparentTo(value); + return { + "@defaults gradient-color-stops": {}, + "--tw-gradient-from": `${(0, _toColorValue.default)(value)} var(--tw-gradient-from-position)`, + "--tw-gradient-to": `${transparentToValue} var(--tw-gradient-to-position)`, + "--tw-gradient-stops": `var(--tw-gradient-from), var(--tw-gradient-to)` + }; + } + }, options); + matchUtilities({ + from: (value)=>{ + return { + "--tw-gradient-from-position": value + }; + } + }, positionOptions); + matchUtilities({ + via: (value)=>{ + let transparentToValue = transparentTo(value); + return { + "@defaults gradient-color-stops": {}, + "--tw-gradient-to": `${transparentToValue} var(--tw-gradient-to-position)`, + "--tw-gradient-stops": `var(--tw-gradient-from), ${(0, _toColorValue.default)(value)} var(--tw-gradient-via-position), var(--tw-gradient-to)` + }; + } + }, options); + matchUtilities({ + via: (value)=>{ + return { + "--tw-gradient-via-position": value + }; + } + }, positionOptions); + matchUtilities({ + to: (value)=>({ + "@defaults gradient-color-stops": {}, + "--tw-gradient-to": `${(0, _toColorValue.default)(value)} var(--tw-gradient-to-position)` + }) + }, options); + matchUtilities({ + to: (value)=>{ + return { + "--tw-gradient-to-position": value + }; + } + }, positionOptions); + }; + })(), + boxDecorationBreak: ({ addUtilities })=>{ + addUtilities({ + ".decoration-slice": { + "box-decoration-break": "slice" + }, + ".decoration-clone": { + "box-decoration-break": "clone" + }, + ".box-decoration-slice": { + "box-decoration-break": "slice" + }, + ".box-decoration-clone": { + "box-decoration-break": "clone" + } + }); + }, + backgroundSize: (0, _createUtilityPlugin.default)("backgroundSize", [ + [ + "bg", + [ + "background-size" + ] + ] + ], { + type: [ + "lookup", + "length", + "percentage", + "size" + ] + }), + backgroundAttachment: ({ addUtilities })=>{ + addUtilities({ + ".bg-fixed": { + "background-attachment": "fixed" + }, + ".bg-local": { + "background-attachment": "local" + }, + ".bg-scroll": { + "background-attachment": "scroll" + } + }); + }, + backgroundClip: ({ addUtilities })=>{ + addUtilities({ + ".bg-clip-border": { + "background-clip": "border-box" + }, + ".bg-clip-padding": { + "background-clip": "padding-box" + }, + ".bg-clip-content": { + "background-clip": "content-box" + }, + ".bg-clip-text": { + "background-clip": "text" + } + }); + }, + backgroundPosition: (0, _createUtilityPlugin.default)("backgroundPosition", [ + [ + "bg", + [ + "background-position" + ] + ] + ], { + type: [ + "lookup", + [ + "position", + { + preferOnConflict: true + } + ] + ] + }), + backgroundRepeat: ({ addUtilities })=>{ + addUtilities({ + ".bg-repeat": { + "background-repeat": "repeat" + }, + ".bg-no-repeat": { + "background-repeat": "no-repeat" + }, + ".bg-repeat-x": { + "background-repeat": "repeat-x" + }, + ".bg-repeat-y": { + "background-repeat": "repeat-y" + }, + ".bg-repeat-round": { + "background-repeat": "round" + }, + ".bg-repeat-space": { + "background-repeat": "space" + } + }); + }, + backgroundOrigin: ({ addUtilities })=>{ + addUtilities({ + ".bg-origin-border": { + "background-origin": "border-box" + }, + ".bg-origin-padding": { + "background-origin": "padding-box" + }, + ".bg-origin-content": { + "background-origin": "content-box" + } + }); + }, + fill: ({ matchUtilities , theme })=>{ + matchUtilities({ + fill: (value)=>{ + return { + fill: (0, _toColorValue.default)(value) + }; + } + }, { + values: (0, _flattenColorPalette.default)(theme("fill")), + type: [ + "color", + "any" + ] + }); + }, + stroke: ({ matchUtilities , theme })=>{ + matchUtilities({ + stroke: (value)=>{ + return { + stroke: (0, _toColorValue.default)(value) + }; + } + }, { + values: (0, _flattenColorPalette.default)(theme("stroke")), + type: [ + "color", + "url", + "any" + ] + }); + }, + strokeWidth: (0, _createUtilityPlugin.default)("strokeWidth", [ + [ + "stroke", + [ + "stroke-width" + ] + ] + ], { + type: [ + "length", + "number", + "percentage" + ] + }), + objectFit: ({ addUtilities })=>{ + addUtilities({ + ".object-contain": { + "object-fit": "contain" + }, + ".object-cover": { + "object-fit": "cover" + }, + ".object-fill": { + "object-fit": "fill" + }, + ".object-none": { + "object-fit": "none" + }, + ".object-scale-down": { + "object-fit": "scale-down" + } + }); + }, + objectPosition: (0, _createUtilityPlugin.default)("objectPosition", [ + [ + "object", + [ + "object-position" + ] + ] + ]), + padding: (0, _createUtilityPlugin.default)("padding", [ + [ + "p", + [ + "padding" + ] + ], + [ + [ + "px", + [ + "padding-left", + "padding-right" + ] + ], + [ + "py", + [ + "padding-top", + "padding-bottom" + ] + ] + ], + [ + [ + "ps", + [ + "padding-inline-start" + ] + ], + [ + "pe", + [ + "padding-inline-end" + ] + ], + [ + "pt", + [ + "padding-top" + ] + ], + [ + "pr", + [ + "padding-right" + ] + ], + [ + "pb", + [ + "padding-bottom" + ] + ], + [ + "pl", + [ + "padding-left" + ] + ] + ] + ]), + textAlign: ({ addUtilities })=>{ + addUtilities({ + ".text-left": { + "text-align": "left" + }, + ".text-center": { + "text-align": "center" + }, + ".text-right": { + "text-align": "right" + }, + ".text-justify": { + "text-align": "justify" + }, + ".text-start": { + "text-align": "start" + }, + ".text-end": { + "text-align": "end" + } + }); + }, + textIndent: (0, _createUtilityPlugin.default)("textIndent", [ + [ + "indent", + [ + "text-indent" + ] + ] + ], { + supportsNegativeValues: true + }), + verticalAlign: ({ addUtilities , matchUtilities })=>{ + addUtilities({ + ".align-baseline": { + "vertical-align": "baseline" + }, + ".align-top": { + "vertical-align": "top" + }, + ".align-middle": { + "vertical-align": "middle" + }, + ".align-bottom": { + "vertical-align": "bottom" + }, + ".align-text-top": { + "vertical-align": "text-top" + }, + ".align-text-bottom": { + "vertical-align": "text-bottom" + }, + ".align-sub": { + "vertical-align": "sub" + }, + ".align-super": { + "vertical-align": "super" + } + }); + matchUtilities({ + align: (value)=>({ + "vertical-align": value + }) + }); + }, + fontFamily: ({ matchUtilities , theme })=>{ + matchUtilities({ + font: (value)=>{ + let [families, options = {}] = Array.isArray(value) && (0, _isPlainObject.default)(value[1]) ? value : [ + value + ]; + let { fontFeatureSettings , fontVariationSettings } = options; + return { + "font-family": Array.isArray(families) ? families.join(", ") : families, + ...fontFeatureSettings === undefined ? {} : { + "font-feature-settings": fontFeatureSettings + }, + ...fontVariationSettings === undefined ? {} : { + "font-variation-settings": fontVariationSettings + } + }; + } + }, { + values: theme("fontFamily"), + type: [ + "lookup", + "generic-name", + "family-name" + ] + }); + }, + fontSize: ({ matchUtilities , theme })=>{ + matchUtilities({ + text: (value, { modifier })=>{ + let [fontSize, options] = Array.isArray(value) ? value : [ + value + ]; + if (modifier) { + return { + "font-size": fontSize, + "line-height": modifier + }; + } + let { lineHeight , letterSpacing , fontWeight } = (0, _isPlainObject.default)(options) ? options : { + lineHeight: options + }; + return { + "font-size": fontSize, + ...lineHeight === undefined ? {} : { + "line-height": lineHeight + }, + ...letterSpacing === undefined ? {} : { + "letter-spacing": letterSpacing + }, + ...fontWeight === undefined ? {} : { + "font-weight": fontWeight + } + }; + } + }, { + values: theme("fontSize"), + modifiers: theme("lineHeight"), + type: [ + "absolute-size", + "relative-size", + "length", + "percentage" + ] + }); + }, + fontWeight: (0, _createUtilityPlugin.default)("fontWeight", [ + [ + "font", + [ + "fontWeight" + ] + ] + ], { + type: [ + "lookup", + "number", + "any" + ] + }), + textTransform: ({ addUtilities })=>{ + addUtilities({ + ".uppercase": { + "text-transform": "uppercase" + }, + ".lowercase": { + "text-transform": "lowercase" + }, + ".capitalize": { + "text-transform": "capitalize" + }, + ".normal-case": { + "text-transform": "none" + } + }); + }, + fontStyle: ({ addUtilities })=>{ + addUtilities({ + ".italic": { + "font-style": "italic" + }, + ".not-italic": { + "font-style": "normal" + } + }); + }, + fontVariantNumeric: ({ addDefaults , addUtilities })=>{ + let cssFontVariantNumericValue = "var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)"; + addDefaults("font-variant-numeric", { + "--tw-ordinal": " ", + "--tw-slashed-zero": " ", + "--tw-numeric-figure": " ", + "--tw-numeric-spacing": " ", + "--tw-numeric-fraction": " " + }); + addUtilities({ + ".normal-nums": { + "font-variant-numeric": "normal" + }, + ".ordinal": { + "@defaults font-variant-numeric": {}, + "--tw-ordinal": "ordinal", + "font-variant-numeric": cssFontVariantNumericValue + }, + ".slashed-zero": { + "@defaults font-variant-numeric": {}, + "--tw-slashed-zero": "slashed-zero", + "font-variant-numeric": cssFontVariantNumericValue + }, + ".lining-nums": { + "@defaults font-variant-numeric": {}, + "--tw-numeric-figure": "lining-nums", + "font-variant-numeric": cssFontVariantNumericValue + }, + ".oldstyle-nums": { + "@defaults font-variant-numeric": {}, + "--tw-numeric-figure": "oldstyle-nums", + "font-variant-numeric": cssFontVariantNumericValue + }, + ".proportional-nums": { + "@defaults font-variant-numeric": {}, + "--tw-numeric-spacing": "proportional-nums", + "font-variant-numeric": cssFontVariantNumericValue + }, + ".tabular-nums": { + "@defaults font-variant-numeric": {}, + "--tw-numeric-spacing": "tabular-nums", + "font-variant-numeric": cssFontVariantNumericValue + }, + ".diagonal-fractions": { + "@defaults font-variant-numeric": {}, + "--tw-numeric-fraction": "diagonal-fractions", + "font-variant-numeric": cssFontVariantNumericValue + }, + ".stacked-fractions": { + "@defaults font-variant-numeric": {}, + "--tw-numeric-fraction": "stacked-fractions", + "font-variant-numeric": cssFontVariantNumericValue + } + }); + }, + lineHeight: (0, _createUtilityPlugin.default)("lineHeight", [ + [ + "leading", + [ + "lineHeight" + ] + ] + ]), + letterSpacing: (0, _createUtilityPlugin.default)("letterSpacing", [ + [ + "tracking", + [ + "letterSpacing" + ] + ] + ], { + supportsNegativeValues: true + }), + textColor: ({ matchUtilities , theme , corePlugins })=>{ + matchUtilities({ + text: (value)=>{ + if (!corePlugins("textOpacity")) { + return { + color: (0, _toColorValue.default)(value) + }; + } + return (0, _withAlphaVariable.default)({ + color: value, + property: "color", + variable: "--tw-text-opacity" + }); + } + }, { + values: (0, _flattenColorPalette.default)(theme("textColor")), + type: [ + "color", + "any" + ] + }); + }, + textOpacity: (0, _createUtilityPlugin.default)("textOpacity", [ + [ + "text-opacity", + [ + "--tw-text-opacity" + ] + ] + ]), + textDecoration: ({ addUtilities })=>{ + addUtilities({ + ".underline": { + "text-decoration-line": "underline" + }, + ".overline": { + "text-decoration-line": "overline" + }, + ".line-through": { + "text-decoration-line": "line-through" + }, + ".no-underline": { + "text-decoration-line": "none" + } + }); + }, + textDecorationColor: ({ matchUtilities , theme })=>{ + matchUtilities({ + decoration: (value)=>{ + return { + "text-decoration-color": (0, _toColorValue.default)(value) + }; + } + }, { + values: (0, _flattenColorPalette.default)(theme("textDecorationColor")), + type: [ + "color", + "any" + ] + }); + }, + textDecorationStyle: ({ addUtilities })=>{ + addUtilities({ + ".decoration-solid": { + "text-decoration-style": "solid" + }, + ".decoration-double": { + "text-decoration-style": "double" + }, + ".decoration-dotted": { + "text-decoration-style": "dotted" + }, + ".decoration-dashed": { + "text-decoration-style": "dashed" + }, + ".decoration-wavy": { + "text-decoration-style": "wavy" + } + }); + }, + textDecorationThickness: (0, _createUtilityPlugin.default)("textDecorationThickness", [ + [ + "decoration", + [ + "text-decoration-thickness" + ] + ] + ], { + type: [ + "length", + "percentage" + ] + }), + textUnderlineOffset: (0, _createUtilityPlugin.default)("textUnderlineOffset", [ + [ + "underline-offset", + [ + "text-underline-offset" + ] + ] + ], { + type: [ + "length", + "percentage", + "any" + ] + }), + fontSmoothing: ({ addUtilities })=>{ + addUtilities({ + ".antialiased": { + "-webkit-font-smoothing": "antialiased", + "-moz-osx-font-smoothing": "grayscale" + }, + ".subpixel-antialiased": { + "-webkit-font-smoothing": "auto", + "-moz-osx-font-smoothing": "auto" + } + }); + }, + placeholderColor: ({ matchUtilities , theme , corePlugins })=>{ + matchUtilities({ + placeholder: (value)=>{ + if (!corePlugins("placeholderOpacity")) { + return { + "&::placeholder": { + color: (0, _toColorValue.default)(value) + } + }; + } + return { + "&::placeholder": (0, _withAlphaVariable.default)({ + color: value, + property: "color", + variable: "--tw-placeholder-opacity" + }) + }; + } + }, { + values: (0, _flattenColorPalette.default)(theme("placeholderColor")), + type: [ + "color", + "any" + ] + }); + }, + placeholderOpacity: ({ matchUtilities , theme })=>{ + matchUtilities({ + "placeholder-opacity": (value)=>{ + return { + ["&::placeholder"]: { + "--tw-placeholder-opacity": value + } + }; + } + }, { + values: theme("placeholderOpacity") + }); + }, + caretColor: ({ matchUtilities , theme })=>{ + matchUtilities({ + caret: (value)=>{ + return { + "caret-color": (0, _toColorValue.default)(value) + }; + } + }, { + values: (0, _flattenColorPalette.default)(theme("caretColor")), + type: [ + "color", + "any" + ] + }); + }, + accentColor: ({ matchUtilities , theme })=>{ + matchUtilities({ + accent: (value)=>{ + return { + "accent-color": (0, _toColorValue.default)(value) + }; + } + }, { + values: (0, _flattenColorPalette.default)(theme("accentColor")), + type: [ + "color", + "any" + ] + }); + }, + opacity: (0, _createUtilityPlugin.default)("opacity", [ + [ + "opacity", + [ + "opacity" + ] + ] + ]), + backgroundBlendMode: ({ addUtilities })=>{ + addUtilities({ + ".bg-blend-normal": { + "background-blend-mode": "normal" + }, + ".bg-blend-multiply": { + "background-blend-mode": "multiply" + }, + ".bg-blend-screen": { + "background-blend-mode": "screen" + }, + ".bg-blend-overlay": { + "background-blend-mode": "overlay" + }, + ".bg-blend-darken": { + "background-blend-mode": "darken" + }, + ".bg-blend-lighten": { + "background-blend-mode": "lighten" + }, + ".bg-blend-color-dodge": { + "background-blend-mode": "color-dodge" + }, + ".bg-blend-color-burn": { + "background-blend-mode": "color-burn" + }, + ".bg-blend-hard-light": { + "background-blend-mode": "hard-light" + }, + ".bg-blend-soft-light": { + "background-blend-mode": "soft-light" + }, + ".bg-blend-difference": { + "background-blend-mode": "difference" + }, + ".bg-blend-exclusion": { + "background-blend-mode": "exclusion" + }, + ".bg-blend-hue": { + "background-blend-mode": "hue" + }, + ".bg-blend-saturation": { + "background-blend-mode": "saturation" + }, + ".bg-blend-color": { + "background-blend-mode": "color" + }, + ".bg-blend-luminosity": { + "background-blend-mode": "luminosity" + } + }); + }, + mixBlendMode: ({ addUtilities })=>{ + addUtilities({ + ".mix-blend-normal": { + "mix-blend-mode": "normal" + }, + ".mix-blend-multiply": { + "mix-blend-mode": "multiply" + }, + ".mix-blend-screen": { + "mix-blend-mode": "screen" + }, + ".mix-blend-overlay": { + "mix-blend-mode": "overlay" + }, + ".mix-blend-darken": { + "mix-blend-mode": "darken" + }, + ".mix-blend-lighten": { + "mix-blend-mode": "lighten" + }, + ".mix-blend-color-dodge": { + "mix-blend-mode": "color-dodge" + }, + ".mix-blend-color-burn": { + "mix-blend-mode": "color-burn" + }, + ".mix-blend-hard-light": { + "mix-blend-mode": "hard-light" + }, + ".mix-blend-soft-light": { + "mix-blend-mode": "soft-light" + }, + ".mix-blend-difference": { + "mix-blend-mode": "difference" + }, + ".mix-blend-exclusion": { + "mix-blend-mode": "exclusion" + }, + ".mix-blend-hue": { + "mix-blend-mode": "hue" + }, + ".mix-blend-saturation": { + "mix-blend-mode": "saturation" + }, + ".mix-blend-color": { + "mix-blend-mode": "color" + }, + ".mix-blend-luminosity": { + "mix-blend-mode": "luminosity" + }, + ".mix-blend-plus-darker": { + "mix-blend-mode": "plus-darker" + }, + ".mix-blend-plus-lighter": { + "mix-blend-mode": "plus-lighter" + } + }); + }, + boxShadow: (()=>{ + let transformValue = (0, _transformThemeValue.default)("boxShadow"); + let defaultBoxShadow = [ + `var(--tw-ring-offset-shadow, 0 0 #0000)`, + `var(--tw-ring-shadow, 0 0 #0000)`, + `var(--tw-shadow)` + ].join(", "); + return function({ matchUtilities , addDefaults , theme }) { + addDefaults("box-shadow", { + "--tw-ring-offset-shadow": "0 0 #0000", + "--tw-ring-shadow": "0 0 #0000", + "--tw-shadow": "0 0 #0000", + "--tw-shadow-colored": "0 0 #0000" + }); + matchUtilities({ + shadow: (value)=>{ + value = transformValue(value); + let ast = (0, _parseBoxShadowValue.parseBoxShadowValue)(value); + for (let shadow of ast){ + // Don't override color if the whole shadow is a variable + if (!shadow.valid) { + continue; + } + shadow.color = "var(--tw-shadow-color)"; + } + return { + "@defaults box-shadow": {}, + "--tw-shadow": value === "none" ? "0 0 #0000" : value, + "--tw-shadow-colored": value === "none" ? "0 0 #0000" : (0, _parseBoxShadowValue.formatBoxShadowValue)(ast), + "box-shadow": defaultBoxShadow + }; + } + }, { + values: theme("boxShadow"), + type: [ + "shadow" + ] + }); + }; + })(), + boxShadowColor: ({ matchUtilities , theme })=>{ + matchUtilities({ + shadow: (value)=>{ + return { + "--tw-shadow-color": (0, _toColorValue.default)(value), + "--tw-shadow": "var(--tw-shadow-colored)" + }; + } + }, { + values: (0, _flattenColorPalette.default)(theme("boxShadowColor")), + type: [ + "color", + "any" + ] + }); + }, + outlineStyle: ({ addUtilities })=>{ + addUtilities({ + ".outline-none": { + outline: "2px solid transparent", + "outline-offset": "2px" + }, + ".outline": { + "outline-style": "solid" + }, + ".outline-dashed": { + "outline-style": "dashed" + }, + ".outline-dotted": { + "outline-style": "dotted" + }, + ".outline-double": { + "outline-style": "double" + } + }); + }, + outlineWidth: (0, _createUtilityPlugin.default)("outlineWidth", [ + [ + "outline", + [ + "outline-width" + ] + ] + ], { + type: [ + "length", + "number", + "percentage" + ] + }), + outlineOffset: (0, _createUtilityPlugin.default)("outlineOffset", [ + [ + "outline-offset", + [ + "outline-offset" + ] + ] + ], { + type: [ + "length", + "number", + "percentage", + "any" + ], + supportsNegativeValues: true + }), + outlineColor: ({ matchUtilities , theme })=>{ + matchUtilities({ + outline: (value)=>{ + return { + "outline-color": (0, _toColorValue.default)(value) + }; + } + }, { + values: (0, _flattenColorPalette.default)(theme("outlineColor")), + type: [ + "color", + "any" + ] + }); + }, + ringWidth: ({ matchUtilities , addDefaults , addUtilities , theme , config })=>{ + let ringColorDefault = (()=>{ + var _theme, _theme1; + if ((0, _featureFlags.flagEnabled)(config(), "respectDefaultRingColorOpacity")) { + return theme("ringColor.DEFAULT"); + } + let ringOpacityDefault = theme("ringOpacity.DEFAULT", "0.5"); + if (!((_theme = theme("ringColor")) === null || _theme === void 0 ? void 0 : _theme.DEFAULT)) { + return `rgb(147 197 253 / ${ringOpacityDefault})`; + } + return (0, _withAlphaVariable.withAlphaValue)((_theme1 = theme("ringColor")) === null || _theme1 === void 0 ? void 0 : _theme1.DEFAULT, ringOpacityDefault, `rgb(147 197 253 / ${ringOpacityDefault})`); + })(); + addDefaults("ring-width", { + "--tw-ring-inset": " ", + "--tw-ring-offset-width": theme("ringOffsetWidth.DEFAULT", "0px"), + "--tw-ring-offset-color": theme("ringOffsetColor.DEFAULT", "#fff"), + "--tw-ring-color": ringColorDefault, + "--tw-ring-offset-shadow": "0 0 #0000", + "--tw-ring-shadow": "0 0 #0000", + "--tw-shadow": "0 0 #0000", + "--tw-shadow-colored": "0 0 #0000" + }); + matchUtilities({ + ring: (value)=>{ + return { + "@defaults ring-width": {}, + "--tw-ring-offset-shadow": `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`, + "--tw-ring-shadow": `var(--tw-ring-inset) 0 0 0 calc(${value} + var(--tw-ring-offset-width)) var(--tw-ring-color)`, + "box-shadow": [ + `var(--tw-ring-offset-shadow)`, + `var(--tw-ring-shadow)`, + `var(--tw-shadow, 0 0 #0000)` + ].join(", ") + }; + } + }, { + values: theme("ringWidth"), + type: "length" + }); + addUtilities({ + ".ring-inset": { + "@defaults ring-width": {}, + "--tw-ring-inset": "inset" + } + }); + }, + ringColor: ({ matchUtilities , theme , corePlugins })=>{ + matchUtilities({ + ring: (value)=>{ + if (!corePlugins("ringOpacity")) { + return { + "--tw-ring-color": (0, _toColorValue.default)(value) + }; + } + return (0, _withAlphaVariable.default)({ + color: value, + property: "--tw-ring-color", + variable: "--tw-ring-opacity" + }); + } + }, { + values: Object.fromEntries(Object.entries((0, _flattenColorPalette.default)(theme("ringColor"))).filter(([modifier])=>modifier !== "DEFAULT")), + type: [ + "color", + "any" + ] + }); + }, + ringOpacity: (helpers)=>{ + let { config } = helpers; + return (0, _createUtilityPlugin.default)("ringOpacity", [ + [ + "ring-opacity", + [ + "--tw-ring-opacity" + ] + ] + ], { + filterDefault: !(0, _featureFlags.flagEnabled)(config(), "respectDefaultRingColorOpacity") + })(helpers); + }, + ringOffsetWidth: (0, _createUtilityPlugin.default)("ringOffsetWidth", [ + [ + "ring-offset", + [ + "--tw-ring-offset-width" + ] + ] + ], { + type: "length" + }), + ringOffsetColor: ({ matchUtilities , theme })=>{ + matchUtilities({ + "ring-offset": (value)=>{ + return { + "--tw-ring-offset-color": (0, _toColorValue.default)(value) + }; + } + }, { + values: (0, _flattenColorPalette.default)(theme("ringOffsetColor")), + type: [ + "color", + "any" + ] + }); + }, + blur: ({ matchUtilities , theme })=>{ + matchUtilities({ + blur: (value)=>{ + return { + "--tw-blur": value.trim() === "" ? " " : `blur(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("blur") + }); + }, + brightness: ({ matchUtilities , theme })=>{ + matchUtilities({ + brightness: (value)=>{ + return { + "--tw-brightness": `brightness(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("brightness") + }); + }, + contrast: ({ matchUtilities , theme })=>{ + matchUtilities({ + contrast: (value)=>{ + return { + "--tw-contrast": `contrast(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("contrast") + }); + }, + dropShadow: ({ matchUtilities , theme })=>{ + matchUtilities({ + "drop-shadow": (value)=>{ + return { + "--tw-drop-shadow": Array.isArray(value) ? value.map((v)=>`drop-shadow(${v})`).join(" ") : `drop-shadow(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("dropShadow") + }); + }, + grayscale: ({ matchUtilities , theme })=>{ + matchUtilities({ + grayscale: (value)=>{ + return { + "--tw-grayscale": `grayscale(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("grayscale") + }); + }, + hueRotate: ({ matchUtilities , theme })=>{ + matchUtilities({ + "hue-rotate": (value)=>{ + return { + "--tw-hue-rotate": `hue-rotate(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("hueRotate"), + supportsNegativeValues: true + }); + }, + invert: ({ matchUtilities , theme })=>{ + matchUtilities({ + invert: (value)=>{ + return { + "--tw-invert": `invert(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("invert") + }); + }, + saturate: ({ matchUtilities , theme })=>{ + matchUtilities({ + saturate: (value)=>{ + return { + "--tw-saturate": `saturate(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("saturate") + }); + }, + sepia: ({ matchUtilities , theme })=>{ + matchUtilities({ + sepia: (value)=>{ + return { + "--tw-sepia": `sepia(${value})`, + "@defaults filter": {}, + filter: cssFilterValue + }; + } + }, { + values: theme("sepia") + }); + }, + filter: ({ addDefaults , addUtilities })=>{ + addDefaults("filter", { + "--tw-blur": " ", + "--tw-brightness": " ", + "--tw-contrast": " ", + "--tw-grayscale": " ", + "--tw-hue-rotate": " ", + "--tw-invert": " ", + "--tw-saturate": " ", + "--tw-sepia": " ", + "--tw-drop-shadow": " " + }); + addUtilities({ + ".filter": { + "@defaults filter": {}, + filter: cssFilterValue + }, + ".filter-none": { + filter: "none" + } + }); + }, + backdropBlur: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-blur": (value)=>{ + return { + "--tw-backdrop-blur": value.trim() === "" ? " " : `blur(${value})`, + "@defaults backdrop-filter": {}, + "-webkit-backdrop-filter": cssBackdropFilterValue, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropBlur") + }); + }, + backdropBrightness: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-brightness": (value)=>{ + return { + "--tw-backdrop-brightness": `brightness(${value})`, + "@defaults backdrop-filter": {}, + "-webkit-backdrop-filter": cssBackdropFilterValue, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropBrightness") + }); + }, + backdropContrast: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-contrast": (value)=>{ + return { + "--tw-backdrop-contrast": `contrast(${value})`, + "@defaults backdrop-filter": {}, + "-webkit-backdrop-filter": cssBackdropFilterValue, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropContrast") + }); + }, + backdropGrayscale: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-grayscale": (value)=>{ + return { + "--tw-backdrop-grayscale": `grayscale(${value})`, + "@defaults backdrop-filter": {}, + "-webkit-backdrop-filter": cssBackdropFilterValue, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropGrayscale") + }); + }, + backdropHueRotate: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-hue-rotate": (value)=>{ + return { + "--tw-backdrop-hue-rotate": `hue-rotate(${value})`, + "@defaults backdrop-filter": {}, + "-webkit-backdrop-filter": cssBackdropFilterValue, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropHueRotate"), + supportsNegativeValues: true + }); + }, + backdropInvert: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-invert": (value)=>{ + return { + "--tw-backdrop-invert": `invert(${value})`, + "@defaults backdrop-filter": {}, + "-webkit-backdrop-filter": cssBackdropFilterValue, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropInvert") + }); + }, + backdropOpacity: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-opacity": (value)=>{ + return { + "--tw-backdrop-opacity": `opacity(${value})`, + "@defaults backdrop-filter": {}, + "-webkit-backdrop-filter": cssBackdropFilterValue, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropOpacity") + }); + }, + backdropSaturate: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-saturate": (value)=>{ + return { + "--tw-backdrop-saturate": `saturate(${value})`, + "@defaults backdrop-filter": {}, + "-webkit-backdrop-filter": cssBackdropFilterValue, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropSaturate") + }); + }, + backdropSepia: ({ matchUtilities , theme })=>{ + matchUtilities({ + "backdrop-sepia": (value)=>{ + return { + "--tw-backdrop-sepia": `sepia(${value})`, + "@defaults backdrop-filter": {}, + "-webkit-backdrop-filter": cssBackdropFilterValue, + "backdrop-filter": cssBackdropFilterValue + }; + } + }, { + values: theme("backdropSepia") + }); + }, + backdropFilter: ({ addDefaults , addUtilities })=>{ + addDefaults("backdrop-filter", { + "--tw-backdrop-blur": " ", + "--tw-backdrop-brightness": " ", + "--tw-backdrop-contrast": " ", + "--tw-backdrop-grayscale": " ", + "--tw-backdrop-hue-rotate": " ", + "--tw-backdrop-invert": " ", + "--tw-backdrop-opacity": " ", + "--tw-backdrop-saturate": " ", + "--tw-backdrop-sepia": " " + }); + addUtilities({ + ".backdrop-filter": { + "@defaults backdrop-filter": {}, + "-webkit-backdrop-filter": cssBackdropFilterValue, + "backdrop-filter": cssBackdropFilterValue + }, + ".backdrop-filter-none": { + "-webkit-backdrop-filter": "none", + "backdrop-filter": "none" + } + }); + }, + transitionProperty: ({ matchUtilities , theme })=>{ + let defaultTimingFunction = theme("transitionTimingFunction.DEFAULT"); + let defaultDuration = theme("transitionDuration.DEFAULT"); + matchUtilities({ + transition: (value)=>{ + return { + "transition-property": value, + ...value === "none" ? {} : { + "transition-timing-function": defaultTimingFunction, + "transition-duration": defaultDuration + } + }; + } + }, { + values: theme("transitionProperty") + }); + }, + transitionDelay: (0, _createUtilityPlugin.default)("transitionDelay", [ + [ + "delay", + [ + "transitionDelay" + ] + ] + ]), + transitionDuration: (0, _createUtilityPlugin.default)("transitionDuration", [ + [ + "duration", + [ + "transitionDuration" + ] + ] + ], { + filterDefault: true + }), + transitionTimingFunction: (0, _createUtilityPlugin.default)("transitionTimingFunction", [ + [ + "ease", + [ + "transitionTimingFunction" + ] + ] + ], { + filterDefault: true + }), + willChange: (0, _createUtilityPlugin.default)("willChange", [ + [ + "will-change", + [ + "will-change" + ] + ] + ]), + contain: ({ addDefaults , addUtilities })=>{ + let cssContainValue = "var(--tw-contain-size) var(--tw-contain-layout) var(--tw-contain-paint) var(--tw-contain-style)"; + addDefaults("contain", { + "--tw-contain-size": " ", + "--tw-contain-layout": " ", + "--tw-contain-paint": " ", + "--tw-contain-style": " " + }); + addUtilities({ + ".contain-none": { + contain: "none" + }, + ".contain-content": { + contain: "content" + }, + ".contain-strict": { + contain: "strict" + }, + ".contain-size": { + "@defaults contain": {}, + "--tw-contain-size": "size", + contain: cssContainValue + }, + ".contain-inline-size": { + "@defaults contain": {}, + "--tw-contain-size": "inline-size", + contain: cssContainValue + }, + ".contain-layout": { + "@defaults contain": {}, + "--tw-contain-layout": "layout", + contain: cssContainValue + }, + ".contain-paint": { + "@defaults contain": {}, + "--tw-contain-paint": "paint", + contain: cssContainValue + }, + ".contain-style": { + "@defaults contain": {}, + "--tw-contain-style": "style", + contain: cssContainValue + } + }); + }, + content: (0, _createUtilityPlugin.default)("content", [ + [ + "content", + [ + "--tw-content", + [ + "content", + "var(--tw-content)" + ] + ] + ] + ]), + forcedColorAdjust: ({ addUtilities })=>{ + addUtilities({ + ".forced-color-adjust-auto": { + "forced-color-adjust": "auto" + }, + ".forced-color-adjust-none": { + "forced-color-adjust": "none" + } + }); + } +}; diff --git a/node_modules/tailwindcss/lib/css/LICENSE b/node_modules/tailwindcss/lib/css/LICENSE new file mode 100644 index 0000000..a1fb039 --- /dev/null +++ b/node_modules/tailwindcss/lib/css/LICENSE @@ -0,0 +1,25 @@ +MIT License + +Copyright (c) Nicolas Gallagher +Copyright (c) Jonathan Neal +Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) Adam Wathan +Copyright (c) Jonathan Reinink + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/tailwindcss/lib/css/preflight.css b/node_modules/tailwindcss/lib/css/preflight.css new file mode 100644 index 0000000..04b9d14 --- /dev/null +++ b/node_modules/tailwindcss/lib/css/preflight.css @@ -0,0 +1,386 @@ +/* +1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) +2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) +*/ + +*, +::before, +::after { + box-sizing: border-box; /* 1 */ + border-width: 0; /* 2 */ + border-style: solid; /* 2 */ + border-color: theme('borderColor.DEFAULT', currentColor); /* 2 */ +} + +::before, +::after { + --tw-content: ''; +} + +/* +1. Use a consistent sensible line-height in all browsers. +2. Prevent adjustments of font size after orientation changes in iOS. +3. Use a more readable tab size. +4. Use the user's configured `sans` font-family by default. +5. Use the user's configured `sans` font-feature-settings by default. +6. Use the user's configured `sans` font-variation-settings by default. +7. Disable tap highlights on iOS +*/ + +html, +:host { + line-height: 1.5; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + -moz-tab-size: 4; /* 3 */ + tab-size: 4; /* 3 */ + font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */ + font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings', normal); /* 5 */ + font-variation-settings: theme('fontFamily.sans[1].fontVariationSettings', normal); /* 6 */ + -webkit-tap-highlight-color: transparent; /* 7 */ +} + +/* +1. Remove the margin in all browsers. +2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. +*/ + +body { + margin: 0; /* 1 */ + line-height: inherit; /* 2 */ +} + +/* +1. Add the correct height in Firefox. +2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) +3. Ensure horizontal rules are visible by default. +*/ + +hr { + height: 0; /* 1 */ + color: inherit; /* 2 */ + border-top-width: 1px; /* 3 */ +} + +/* +Add the correct text decoration in Chrome, Edge, and Safari. +*/ + +abbr:where([title]) { + text-decoration: underline dotted; +} + +/* +Remove the default font size and weight for headings. +*/ + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +} + +/* +Reset links to optimize for opt-in styling instead of opt-out. +*/ + +a { + color: inherit; + text-decoration: inherit; +} + +/* +Add the correct font weight in Edge and Safari. +*/ + +b, +strong { + font-weight: bolder; +} + +/* +1. Use the user's configured `mono` font-family by default. +2. Use the user's configured `mono` font-feature-settings by default. +3. Use the user's configured `mono` font-variation-settings by default. +4. Correct the odd `em` font sizing in all browsers. +*/ + +code, +kbd, +samp, +pre { + font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); /* 1 */ + font-feature-settings: theme('fontFamily.mono[1].fontFeatureSettings', normal); /* 2 */ + font-variation-settings: theme('fontFamily.mono[1].fontVariationSettings', normal); /* 3 */ + font-size: 1em; /* 4 */ +} + +/* +Add the correct font size in all browsers. +*/ + +small { + font-size: 80%; +} + +/* +Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* +1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) +2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) +3. Remove gaps between table borders by default. +*/ + +table { + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ + border-collapse: collapse; /* 3 */ +} + +/* +1. Change the font styles in all browsers. +2. Remove the margin in Firefox and Safari. +3. Remove default padding in all browsers. +*/ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-feature-settings: inherit; /* 1 */ + font-variation-settings: inherit; /* 1 */ + font-size: 100%; /* 1 */ + font-weight: inherit; /* 1 */ + line-height: inherit; /* 1 */ + letter-spacing: inherit; /* 1 */ + color: inherit; /* 1 */ + margin: 0; /* 2 */ + padding: 0; /* 3 */ +} + +/* +Remove the inheritance of text transform in Edge and Firefox. +*/ + +button, +select { + text-transform: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Remove default button styles. +*/ + +button, +input:where([type='button']), +input:where([type='reset']), +input:where([type='submit']) { + -webkit-appearance: button; /* 1 */ + background-color: transparent; /* 2 */ + background-image: none; /* 2 */ +} + +/* +Use the modern Firefox focus style for all focusable elements. +*/ + +:-moz-focusring { + outline: auto; +} + +/* +Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + +:-moz-ui-invalid { + box-shadow: none; +} + +/* +Add the correct vertical alignment in Chrome and Firefox. +*/ + +progress { + vertical-align: baseline; +} + +/* +Correct the cursor style of increment and decrement buttons in Safari. +*/ + +::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; +} + +/* +1. Correct the odd appearance in Chrome and Safari. +2. Correct the outline style in Safari. +*/ + +[type='search'] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/* +Remove the inner padding in Chrome and Safari on macOS. +*/ + +::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Change font properties to `inherit` in Safari. +*/ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* +Add the correct display in Chrome and Safari. +*/ + +summary { + display: list-item; +} + +/* +Removes the default spacing and border for appropriate elements. +*/ + +blockquote, +dl, +dd, +h1, +h2, +h3, +h4, +h5, +h6, +hr, +figure, +p, +pre { + margin: 0; +} + +fieldset { + margin: 0; + padding: 0; +} + +legend { + padding: 0; +} + +ol, +ul, +menu { + list-style: none; + margin: 0; + padding: 0; +} + +/* +Reset default styling for dialogs. +*/ +dialog { + padding: 0; +} + +/* +Prevent resizing textareas horizontally by default. +*/ + +textarea { + resize: vertical; +} + +/* +1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +2. Set the default placeholder color to the user's configured gray 400 color. +*/ + +input::placeholder, +textarea::placeholder { + opacity: 1; /* 1 */ + color: theme('colors.gray.400', #9ca3af); /* 2 */ +} + +/* +Set the default cursor for buttons. +*/ + +button, +[role="button"] { + cursor: pointer; +} + +/* +Make sure disabled buttons don't get the pointer cursor. +*/ +:disabled { + cursor: default; +} + +/* +1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) +2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; /* 1 */ + vertical-align: middle; /* 2 */ +} + +/* +Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + +img, +video { + max-width: 100%; + height: auto; +} + +/* Make elements with the HTML hidden attribute stay hidden by default */ +[hidden]:where(:not([hidden="until-found"])) { + display: none; +} diff --git a/node_modules/tailwindcss/lib/featureFlags.js b/node_modules/tailwindcss/lib/featureFlags.js new file mode 100644 index 0000000..78826fd --- /dev/null +++ b/node_modules/tailwindcss/lib/featureFlags.js @@ -0,0 +1,79 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +function _export(target, all) { + for(var name in all)Object.defineProperty(target, name, { + enumerable: true, + get: all[name] + }); +} +_export(exports, { + flagEnabled: function() { + return flagEnabled; + }, + issueFlagNotices: function() { + return issueFlagNotices; + }, + default: function() { + return _default; + } +}); +const _picocolors = /*#__PURE__*/ _interop_require_default(require("picocolors")); +const _log = /*#__PURE__*/ _interop_require_default(require("./util/log")); +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +let defaults = { + optimizeUniversalDefaults: false, + generalizedModifiers: true, + disableColorOpacityUtilitiesByDefault: false, + relativeContentPathsByDefault: false +}; +let featureFlags = { + future: [ + "hoverOnlyWhenSupported", + "respectDefaultRingColorOpacity", + "disableColorOpacityUtilitiesByDefault", + "relativeContentPathsByDefault" + ], + experimental: [ + "optimizeUniversalDefaults", + "generalizedModifiers" + ] +}; +function flagEnabled(config, flag) { + if (featureFlags.future.includes(flag)) { + var _config_future; + var _config_future_flag, _ref; + return config.future === "all" || ((_ref = (_config_future_flag = config === null || config === void 0 ? void 0 : (_config_future = config.future) === null || _config_future === void 0 ? void 0 : _config_future[flag]) !== null && _config_future_flag !== void 0 ? _config_future_flag : defaults[flag]) !== null && _ref !== void 0 ? _ref : false); + } + if (featureFlags.experimental.includes(flag)) { + var _config_experimental; + var _config_experimental_flag, _ref1; + return config.experimental === "all" || ((_ref1 = (_config_experimental_flag = config === null || config === void 0 ? void 0 : (_config_experimental = config.experimental) === null || _config_experimental === void 0 ? void 0 : _config_experimental[flag]) !== null && _config_experimental_flag !== void 0 ? _config_experimental_flag : defaults[flag]) !== null && _ref1 !== void 0 ? _ref1 : false); + } + return false; +} +function experimentalFlagsEnabled(config) { + if (config.experimental === "all") { + return featureFlags.experimental; + } + var _config_experimental; + return Object.keys((_config_experimental = config === null || config === void 0 ? void 0 : config.experimental) !== null && _config_experimental !== void 0 ? _config_experimental : {}).filter((flag)=>featureFlags.experimental.includes(flag) && config.experimental[flag]); +} +function issueFlagNotices(config) { + if (process.env.JEST_WORKER_ID !== undefined) { + return; + } + if (experimentalFlagsEnabled(config).length > 0) { + let changes = experimentalFlagsEnabled(config).map((s)=>_picocolors.default.yellow(s)).join(", "); + _log.default.warn("experimental-flags-enabled", [ + `You have enabled experimental features: ${changes}`, + "Experimental features in Tailwind CSS are not covered by semver, may introduce breaking changes, and can change at any time." + ]); + } +} +const _default = featureFlags; diff --git a/node_modules/tailwindcss/lib/index.js b/node_modules/tailwindcss/lib/index.js new file mode 100644 index 0000000..c947d97 --- /dev/null +++ b/node_modules/tailwindcss/lib/index.js @@ -0,0 +1,2 @@ +"use strict"; +module.exports = require("./plugin"); diff --git a/node_modules/tailwindcss/lib/lib/cacheInvalidation.js b/node_modules/tailwindcss/lib/lib/cacheInvalidation.js new file mode 100644 index 0000000..c247179 --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/cacheInvalidation.js @@ -0,0 +1,92 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "hasContentChanged", { + enumerable: true, + get: function() { + return hasContentChanged; + } +}); +const _crypto = /*#__PURE__*/ _interop_require_default(require("crypto")); +const _sharedState = /*#__PURE__*/ _interop_require_wildcard(require("./sharedState")); +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== "function") return null; + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + return (_getRequireWildcardCache = function(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} +function _interop_require_wildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) { + return obj; + } + if (obj === null || typeof obj !== "object" && typeof obj !== "function") { + return { + default: obj + }; + } + var cache = _getRequireWildcardCache(nodeInterop); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + for(var key in obj){ + if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} +/** + * Calculate the hash of a string. + * + * This doesn't need to be cryptographically secure or + * anything like that since it's used only to detect + * when the CSS changes to invalidate the context. + * + * This is wrapped in a try/catch because it's really dependent + * on how Node itself is build and the environment and OpenSSL + * version / build that is installed on the user's machine. + * + * Based on the environment this can just outright fail. + * + * See https://github.com/nodejs/node/issues/40455 + * + * @param {string} str + */ function getHash(str) { + try { + return _crypto.default.createHash("md5").update(str, "utf-8").digest("binary"); + } catch (err) { + return ""; + } +} +function hasContentChanged(sourcePath, root) { + let css = root.toString(); + // We only care about files with @tailwind directives + // Other files use an existing context + if (!css.includes("@tailwind")) { + return false; + } + let existingHash = _sharedState.sourceHashMap.get(sourcePath); + let rootHash = getHash(css); + let didChange = existingHash !== rootHash; + _sharedState.sourceHashMap.set(sourcePath, rootHash); + return didChange; +} diff --git a/node_modules/tailwindcss/lib/lib/collapseAdjacentRules.js b/node_modules/tailwindcss/lib/lib/collapseAdjacentRules.js new file mode 100644 index 0000000..e900872 --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/collapseAdjacentRules.js @@ -0,0 +1,61 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "default", { + enumerable: true, + get: function() { + return collapseAdjacentRules; + } +}); +let comparisonMap = { + atrule: [ + "name", + "params" + ], + rule: [ + "selector" + ] +}; +let types = new Set(Object.keys(comparisonMap)); +function collapseAdjacentRules() { + function collapseRulesIn(root) { + let currentRule = null; + root.each((node)=>{ + if (!types.has(node.type)) { + currentRule = null; + return; + } + if (currentRule === null) { + currentRule = node; + return; + } + let properties = comparisonMap[node.type]; + var _node_property, _currentRule_property; + if (node.type === "atrule" && node.name === "font-face") { + currentRule = node; + } else if (properties.every((property)=>((_node_property = node[property]) !== null && _node_property !== void 0 ? _node_property : "").replace(/\s+/g, " ") === ((_currentRule_property = currentRule[property]) !== null && _currentRule_property !== void 0 ? _currentRule_property : "").replace(/\s+/g, " "))) { + // An AtRule may not have children (for example if we encounter duplicate @import url(…) rules) + if (node.nodes) { + currentRule.append(node.nodes); + } + node.remove(); + } else { + currentRule = node; + } + }); + // After we've collapsed adjacent rules & at-rules, we need to collapse + // adjacent rules & at-rules that are children of at-rules. + // We do not care about nesting rules because Tailwind CSS + // explicitly does not handle rule nesting on its own as + // the user is expected to use a nesting plugin + root.each((node)=>{ + if (node.type === "atrule") { + collapseRulesIn(node); + } + }); + } + return (root)=>{ + collapseRulesIn(root); + }; +} diff --git a/node_modules/tailwindcss/lib/lib/collapseDuplicateDeclarations.js b/node_modules/tailwindcss/lib/lib/collapseDuplicateDeclarations.js new file mode 100644 index 0000000..70a1ad1 --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/collapseDuplicateDeclarations.js @@ -0,0 +1,85 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "default", { + enumerable: true, + get: function() { + return collapseDuplicateDeclarations; + } +}); +function collapseDuplicateDeclarations() { + return (root)=>{ + root.walkRules((node)=>{ + let seen = new Map(); + let droppable = new Set([]); + let byProperty = new Map(); + node.walkDecls((decl)=>{ + // This could happen if we have nested selectors. In that case the + // parent will loop over all its declarations but also the declarations + // of nested rules. With this we ensure that we are shallowly checking + // declarations. + if (decl.parent !== node) { + return; + } + if (seen.has(decl.prop)) { + // Exact same value as what we have seen so far + if (seen.get(decl.prop).value === decl.value) { + // Keep the last one, drop the one we've seen so far + droppable.add(seen.get(decl.prop)); + // Override the existing one with the new value. This is necessary + // so that if we happen to have more than one declaration with the + // same value, that we keep removing the previous one. Otherwise we + // will only remove the *first* one. + seen.set(decl.prop, decl); + return; + } + // Not the same value, so we need to check if we can merge it so + // let's collect it first. + if (!byProperty.has(decl.prop)) { + byProperty.set(decl.prop, new Set()); + } + byProperty.get(decl.prop).add(seen.get(decl.prop)); + byProperty.get(decl.prop).add(decl); + } + seen.set(decl.prop, decl); + }); + // Drop all the duplicate declarations with the exact same value we've + // already seen so far. + for (let decl of droppable){ + decl.remove(); + } + // Analyze the declarations based on its unit, drop all the declarations + // with the same unit but the last one in the list. + for (let declarations of byProperty.values()){ + let byUnit = new Map(); + for (let decl of declarations){ + let unit = resolveUnit(decl.value); + if (unit === null) { + continue; + } + if (!byUnit.has(unit)) { + byUnit.set(unit, new Set()); + } + byUnit.get(unit).add(decl); + } + for (let declarations of byUnit.values()){ + // Get all but the last one + let removableDeclarations = Array.from(declarations).slice(0, -1); + for (let decl of removableDeclarations){ + decl.remove(); + } + } + } + }); + }; +} +let UNITLESS_NUMBER = Symbol("unitless-number"); +function resolveUnit(input) { + let result = /^-?\d*.?\d+([\w%]+)?$/g.exec(input); + if (result) { + var _result_; + return (_result_ = result[1]) !== null && _result_ !== void 0 ? _result_ : UNITLESS_NUMBER; + } + return null; +} diff --git a/node_modules/tailwindcss/lib/lib/content.js b/node_modules/tailwindcss/lib/lib/content.js new file mode 100644 index 0000000..a2d5941 --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/content.js @@ -0,0 +1,247 @@ +// @ts-check +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +function _export(target, all) { + for(var name in all)Object.defineProperty(target, name, { + enumerable: true, + get: all[name] + }); +} +_export(exports, { + parseCandidateFiles: function() { + return parseCandidateFiles; + }, + resolvedChangedContent: function() { + return resolvedChangedContent; + }, + createBroadPatternCheck: function() { + return createBroadPatternCheck; + } +}); +const _fs = /*#__PURE__*/ _interop_require_default(require("fs")); +const _path = /*#__PURE__*/ _interop_require_default(require("path")); +const _isglob = /*#__PURE__*/ _interop_require_default(require("is-glob")); +const _fastglob = /*#__PURE__*/ _interop_require_default(require("fast-glob")); +const _normalizepath = /*#__PURE__*/ _interop_require_default(require("normalize-path")); +const _parseGlob = require("../util/parseGlob"); +const _sharedState = require("./sharedState"); +const _log = /*#__PURE__*/ _interop_require_default(require("../util/log")); +const _micromatch = /*#__PURE__*/ _interop_require_default(require("micromatch")); +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +function parseCandidateFiles(context, tailwindConfig) { + let files = tailwindConfig.content.files; + // Normalize the file globs + files = files.filter((filePath)=>typeof filePath === "string"); + files = files.map(_normalizepath.default); + // Split into included and excluded globs + let tasks = _fastglob.default.generateTasks(files); + /** @type {ContentPath[]} */ let included = []; + /** @type {ContentPath[]} */ let excluded = []; + for (const task of tasks){ + included.push(...task.positive.map((filePath)=>parseFilePath(filePath, false))); + excluded.push(...task.negative.map((filePath)=>parseFilePath(filePath, true))); + } + let paths = [ + ...included, + ...excluded + ]; + // Resolve paths relative to the config file or cwd + paths = resolveRelativePaths(context, paths); + // Resolve symlinks if possible + paths = paths.flatMap(resolvePathSymlinks); + // Update cached patterns + paths = paths.map(resolveGlobPattern); + return paths; +} +/** + * + * @param {string} filePath + * @param {boolean} ignore + * @returns {ContentPath} + */ function parseFilePath(filePath, ignore) { + let contentPath = { + original: filePath, + base: filePath, + ignore, + pattern: filePath, + glob: null + }; + if ((0, _isglob.default)(filePath)) { + Object.assign(contentPath, (0, _parseGlob.parseGlob)(filePath)); + } + return contentPath; +} +/** + * + * @param {ContentPath} contentPath + * @returns {ContentPath} + */ function resolveGlobPattern(contentPath) { + // This is required for Windows support to properly pick up Glob paths. + // Afaik, this technically shouldn't be needed but there's probably + // some internal, direct path matching with a normalized path in + // a package which can't handle mixed directory separators + let base = (0, _normalizepath.default)(contentPath.base); + // If the user's file path contains any special characters (like parens) for instance fast-glob + // is like "OOOH SHINY" and treats them as such. So we have to escape the base path to fix this + base = _fastglob.default.escapePath(base); + contentPath.pattern = contentPath.glob ? `${base}/${contentPath.glob}` : base; + contentPath.pattern = contentPath.ignore ? `!${contentPath.pattern}` : contentPath.pattern; + return contentPath; +} +/** + * Resolve each path relative to the config file (when possible) if the experimental flag is enabled + * Otherwise, resolve relative to the current working directory + * + * @param {any} context + * @param {ContentPath[]} contentPaths + * @returns {ContentPath[]} + */ function resolveRelativePaths(context, contentPaths) { + let resolveFrom = []; + // Resolve base paths relative to the config file (when possible) if the experimental flag is enabled + if (context.userConfigPath && context.tailwindConfig.content.relative) { + resolveFrom = [ + _path.default.dirname(context.userConfigPath) + ]; + } + return contentPaths.map((contentPath)=>{ + contentPath.base = _path.default.resolve(...resolveFrom, contentPath.base); + return contentPath; + }); +} +/** + * Resolve the symlink for the base directory / file in each path + * These are added as additional dependencies to watch for changes because + * some tools (like webpack) will only watch the actual file or directory + * but not the symlink itself even in projects that use monorepos. + * + * @param {ContentPath} contentPath + * @returns {ContentPath[]} + */ function resolvePathSymlinks(contentPath) { + let paths = [ + contentPath + ]; + try { + let resolvedPath = _fs.default.realpathSync(contentPath.base); + if (resolvedPath !== contentPath.base) { + paths.push({ + ...contentPath, + base: resolvedPath + }); + } + } catch { + // TODO: log this? + } + return paths; +} +function resolvedChangedContent(context, candidateFiles, fileModifiedMap) { + let changedContent = context.tailwindConfig.content.files.filter((item)=>typeof item.raw === "string").map(({ raw , extension ="html" })=>({ + content: raw, + extension + })); + let [changedFiles, mTimesToCommit] = resolveChangedFiles(candidateFiles, fileModifiedMap); + for (let changedFile of changedFiles){ + let extension = _path.default.extname(changedFile).slice(1); + changedContent.push({ + file: changedFile, + extension + }); + } + return [ + changedContent, + mTimesToCommit + ]; +} +const LARGE_DIRECTORIES = [ + "node_modules" +]; +// Ensures that `node_modules` has to match as-is, otherwise `mynode_modules` +// would match as well, but that is not a known large directory. +const LARGE_DIRECTORIES_REGEX = new RegExp(`(${LARGE_DIRECTORIES.map((dir)=>String.raw`\b${dir}\b`).join("|")})`); +function createBroadPatternCheck(paths) { + // Detect whether a glob pattern might be too broad. This means that it: + // - Includes `**` + // - Does not include any of the known large directories (e.g.: node_modules) + let maybeBroadPattern = paths.some((path)=>path.includes("**") && !LARGE_DIRECTORIES_REGEX.test(path)); + // Didn't detect any potentially broad patterns, so we can skip further + // checks. + if (!maybeBroadPattern) { + return ()=>{}; + } + // All glob matchers + let matchers = []; + // All glob matchers that explicitly contain any of the known large + // directories (e.g.: node_modules). + let explicitMatchers = []; + // Create matchers for all paths + for (let path of paths){ + let matcher = _micromatch.default.matcher(path); + if (LARGE_DIRECTORIES_REGEX.test(path)) { + explicitMatchers.push(matcher); + } + matchers.push(matcher); + } + // Keep track of whether we already warned about the broad pattern issue or + // not. The `log.warn` function already does something similar where we only + // output the log once. However, with this we can also skip the other checks + // when we already warned about the broad pattern. + let warned = false; + /** + * @param {string} file + */ return (file)=>{ + if (warned) return; // Already warned about the broad pattern + if (explicitMatchers.some((matcher)=>matcher(file))) return; // Explicitly included, so we can skip further checks + // When a broad pattern is used, we have to double check that the file was + // not explicitly included in the globs. + let matchingGlobIndex = matchers.findIndex((matcher)=>matcher(file)); + if (matchingGlobIndex === -1) return; // This should never happen + let matchingGlob = paths[matchingGlobIndex]; + // Create relative paths to make the output a bit more readable. + let relativeMatchingGlob = _path.default.relative(process.cwd(), matchingGlob); + if (relativeMatchingGlob[0] !== ".") relativeMatchingGlob = `./${relativeMatchingGlob}`; + let largeDirectory = LARGE_DIRECTORIES.find((directory)=>file.includes(directory)); + if (largeDirectory) { + warned = true; + _log.default.warn("broad-content-glob-pattern", [ + `Your \`content\` configuration includes a pattern which looks like it's accidentally matching all of \`${largeDirectory}\` and can cause serious performance issues.`, + `Pattern: \`${relativeMatchingGlob}\``, + `See our documentation for recommendations:`, + "https://tailwindcss.com/docs/content-configuration#pattern-recommendations" + ]); + } + }; +} +/** + * + * @param {ContentPath[]} candidateFiles + * @param {Map} fileModifiedMap + * @returns {[Set, Map]} + */ function resolveChangedFiles(candidateFiles, fileModifiedMap) { + let paths = candidateFiles.map((contentPath)=>contentPath.pattern); + let mTimesToCommit = new Map(); + let checkBroadPattern = createBroadPatternCheck(paths); + let changedFiles = new Set(); + _sharedState.env.DEBUG && console.time("Finding changed files"); + let files = _fastglob.default.sync(paths, { + absolute: true + }); + for (let file of files){ + checkBroadPattern(file); + let prevModified = fileModifiedMap.get(file) || -Infinity; + let modified = _fs.default.statSync(file).mtimeMs; + if (modified > prevModified) { + changedFiles.add(file); + mTimesToCommit.set(file, modified); + } + } + _sharedState.env.DEBUG && console.timeEnd("Finding changed files"); + return [ + changedFiles, + mTimesToCommit + ]; +} diff --git a/node_modules/tailwindcss/lib/lib/defaultExtractor.js b/node_modules/tailwindcss/lib/lib/defaultExtractor.js new file mode 100644 index 0000000..684808b --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/defaultExtractor.js @@ -0,0 +1,273 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "defaultExtractor", { + enumerable: true, + get: function() { + return defaultExtractor; + } +}); +const _regex = /*#__PURE__*/ _interop_require_wildcard(require("./regex")); +const _splitAtTopLevelOnly = require("../util/splitAtTopLevelOnly"); +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== "function") return null; + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + return (_getRequireWildcardCache = function(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} +function _interop_require_wildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) { + return obj; + } + if (obj === null || typeof obj !== "object" && typeof obj !== "function") { + return { + default: obj + }; + } + var cache = _getRequireWildcardCache(nodeInterop); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + for(var key in obj){ + if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} +function defaultExtractor(context) { + let patterns = Array.from(buildRegExps(context)); + /** + * @param {string} content + */ return (content)=>{ + /** @type {(string|string)[]} */ let results = []; + for (let pattern of patterns){ + var _content_match; + for (let result of (_content_match = content.match(pattern)) !== null && _content_match !== void 0 ? _content_match : []){ + results.push(clipAtBalancedParens(result)); + } + } + // Extract any subclasses from languages like Slim and Pug, eg: + // div.flex.px-5.underline + for (let result of results.slice()){ + let segments = (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(result, "."); + for(let idx = 0; idx < segments.length; idx++){ + let segment = segments[idx]; + if (idx >= segments.length - 1) { + results.push(segment); + continue; + } + // If the next segment is a number, discard both, for example seeing + // `px-1` and `5` means the real candidate was `px-1.5` which is already + // captured. + let next = Number(segments[idx + 1]); + if (isNaN(next)) { + results.push(segment); + } else { + idx++; + } + } + } + return results; + }; +} +function* buildRegExps(context) { + let separator = context.tailwindConfig.separator; + let prefix = context.tailwindConfig.prefix !== "" ? _regex.optional(_regex.pattern([ + /-?/, + _regex.escape(context.tailwindConfig.prefix) + ])) : ""; + let utility = _regex.any([ + // Arbitrary properties (without square brackets) + /\[[^\s:'"`]+:[^\s\[\]]+\]/, + // Arbitrary properties with balanced square brackets + // This is a targeted fix to continue to allow theme() + // with square brackets to work in arbitrary properties + // while fixing a problem with the regex matching too much + /\[[^\s:'"`\]]+:[^\s]+?\[[^\s]+\][^\s]+?\]/, + // Utilities + _regex.pattern([ + // Utility Name / Group Name + _regex.any([ + /-?(?:\w+)/, + // This is here to make sure @container supports everything that other utilities do + /@(?:\w+)/ + ]), + // Normal/Arbitrary values + _regex.optional(_regex.any([ + _regex.pattern([ + // Arbitrary values + _regex.any([ + /-(?:\w+-)*\['[^\s]+'\]/, + /-(?:\w+-)*\["[^\s]+"\]/, + /-(?:\w+-)*\[`[^\s]+`\]/, + /-(?:\w+-)*\[(?:[^\s\[\]]+\[[^\s\[\]]+\])*[^\s:\[\]]+\]/ + ]), + // Not immediately followed by an `{[(` + /(?![{([]])/, + // optionally followed by an opacity modifier + /(?:\/[^\s'"`\\><$]*)?/ + ]), + _regex.pattern([ + // Arbitrary values + _regex.any([ + /-(?:\w+-)*\['[^\s]+'\]/, + /-(?:\w+-)*\["[^\s]+"\]/, + /-(?:\w+-)*\[`[^\s]+`\]/, + /-(?:\w+-)*\[(?:[^\s\[\]]+\[[^\s\[\]]+\])*[^\s\[\]]+\]/ + ]), + // Not immediately followed by an `{[(` + /(?![{([]])/, + // optionally followed by an opacity modifier + /(?:\/[^\s'"`\\$]*)?/ + ]), + // Normal values w/o quotes — may include an opacity modifier + /[-\/][^\s'"`\\$={><]*/ + ])) + ]) + ]); + let variantPatterns = [ + // Without quotes + _regex.any([ + // This is here to provide special support for the `@` variant + _regex.pattern([ + /@\[[^\s"'`]+\](\/[^\s"'`]+)?/, + separator + ]), + // With variant modifier (e.g.: group-[..]/modifier) + _regex.pattern([ + /([^\s"'`\[\\]+-)?\[[^\s"'`]+\]\/[\w_-]+/, + separator + ]), + _regex.pattern([ + /([^\s"'`\[\\]+-)?\[[^\s"'`]+\]/, + separator + ]), + _regex.pattern([ + /[^\s"'`\[\\]+/, + separator + ]) + ]), + // With quotes allowed + _regex.any([ + // With variant modifier (e.g.: group-[..]/modifier) + _regex.pattern([ + /([^\s"'`\[\\]+-)?\[[^\s`]+\]\/[\w_-]+/, + separator + ]), + _regex.pattern([ + /([^\s"'`\[\\]+-)?\[[^\s`]+\]/, + separator + ]), + _regex.pattern([ + /[^\s`\[\\]+/, + separator + ]) + ]) + ]; + for (const variantPattern of variantPatterns){ + yield _regex.pattern([ + // Variants + "((?=((", + variantPattern, + ")+))\\2)?", + // Important (optional) + /!?/, + prefix, + utility + ]); + } + // 5. Inner matches + yield /[^<>"'`\s.(){}[\]#=%$][^<>"'`\s(){}[\]#=%$]*[^<>"'`\s.(){}[\]#=%:$]/g; +} +// We want to capture any "special" characters +// AND the characters immediately following them (if there is one) +let SPECIALS = /([\[\]'"`])([^\[\]'"`])?/g; +let ALLOWED_CLASS_CHARACTERS = /[^"'`\s<>\]]+/; +/** + * Clips a string ensuring that parentheses, quotes, etc… are balanced + * Used for arbitrary values only + * + * We will go past the end of the balanced parens until we find a non-class character + * + * Depth matching behavior: + * w-[calc(100%-theme('spacing[some_key][1.5]'))]'] + * ┬ ┬ ┬┬ ┬ ┬┬ ┬┬┬┬┬┬┬ + * 1 2 3 4 34 3 210 END + * ╰────┴──────────┴────────┴────────┴┴───┴─┴┴┴ + * + * @param {string} input + */ function clipAtBalancedParens(input) { + // We are care about this for arbitrary values + if (!input.includes("-[")) { + return input; + } + let depth = 0; + let openStringTypes = []; + // Find all parens, brackets, quotes, etc + // Stop when we end at a balanced pair + // This is naive and will treat mismatched parens as balanced + // This shouldn't be a problem in practice though + let matches = input.matchAll(SPECIALS); + // We can't use lookbehind assertions because we have to support Safari + // So, instead, we've emulated it using capture groups and we'll re-work the matches to accommodate + matches = Array.from(matches).flatMap((match)=>{ + const [, ...groups] = match; + return groups.map((group, idx)=>Object.assign([], match, { + index: match.index + idx, + 0: group + })); + }); + for (let match of matches){ + let char = match[0]; + let inStringType = openStringTypes[openStringTypes.length - 1]; + if (char === inStringType) { + openStringTypes.pop(); + } else if (char === "'" || char === '"' || char === "`") { + openStringTypes.push(char); + } + if (inStringType) { + continue; + } else if (char === "[") { + depth++; + continue; + } else if (char === "]") { + depth--; + continue; + } + // We've gone one character past the point where we should stop + // This means that there was an extra closing `]` + // We'll clip to just before it + if (depth < 0) { + return input.substring(0, match.index - 1); + } + // We've finished balancing the brackets but there still may be characters that can be included + // For example in the class `text-[#336699]/[.35]` + // The depth goes to `0` at the closing `]` but goes up again at the `[` + // If we're at zero and encounter a non-class character then we clip the class there + if (depth === 0 && !ALLOWED_CLASS_CHARACTERS.test(char)) { + return input.substring(0, match.index); + } + } + return input; +} // Regular utilities + // {{modifier}:}*{namespace}{-{suffix}}*{/{opacityModifier}}? + // Arbitrary values + // {{modifier}:}*{namespace}-[{arbitraryValue}]{/{opacityModifier}}? + // arbitraryValue: no whitespace, balanced quotes unless within quotes, balanced brackets unless within quotes + // Arbitrary properties + // {{modifier}:}*[{validCssPropertyName}:{arbitraryValue}] diff --git a/node_modules/tailwindcss/lib/lib/evaluateTailwindFunctions.js b/node_modules/tailwindcss/lib/lib/evaluateTailwindFunctions.js new file mode 100644 index 0000000..e2e3c26 --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/evaluateTailwindFunctions.js @@ -0,0 +1,238 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "default", { + enumerable: true, + get: function() { + return _default; + } +}); +const _dlv = /*#__PURE__*/ _interop_require_default(require("dlv")); +const _didyoumean = /*#__PURE__*/ _interop_require_default(require("didyoumean")); +const _transformThemeValue = /*#__PURE__*/ _interop_require_default(require("../util/transformThemeValue")); +const _index = /*#__PURE__*/ _interop_require_default(require("../value-parser/index")); +const _normalizeScreens = require("../util/normalizeScreens"); +const _buildMediaQuery = /*#__PURE__*/ _interop_require_default(require("../util/buildMediaQuery")); +const _toPath = require("../util/toPath"); +const _withAlphaVariable = require("../util/withAlphaVariable"); +const _pluginUtils = require("../util/pluginUtils"); +const _log = /*#__PURE__*/ _interop_require_default(require("../util/log")); +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +function isObject(input) { + return typeof input === "object" && input !== null; +} +function findClosestExistingPath(theme, path) { + let parts = (0, _toPath.toPath)(path); + do { + parts.pop(); + if ((0, _dlv.default)(theme, parts) !== undefined) break; + }while (parts.length); + return parts.length ? parts : undefined; +} +function pathToString(path) { + if (typeof path === "string") return path; + return path.reduce((acc, cur, i)=>{ + if (cur.includes(".")) return `${acc}[${cur}]`; + return i === 0 ? cur : `${acc}.${cur}`; + }, ""); +} +function list(items) { + return items.map((key)=>`'${key}'`).join(", "); +} +function listKeys(obj) { + return list(Object.keys(obj)); +} +function validatePath(config, path, defaultValue, themeOpts = {}) { + const pathString = Array.isArray(path) ? pathToString(path) : path.replace(/^['"]+|['"]+$/g, ""); + const pathSegments = Array.isArray(path) ? path : (0, _toPath.toPath)(pathString); + const value = (0, _dlv.default)(config.theme, pathSegments, defaultValue); + if (value === undefined) { + let error = `'${pathString}' does not exist in your theme config.`; + const parentSegments = pathSegments.slice(0, -1); + const parentValue = (0, _dlv.default)(config.theme, parentSegments); + if (isObject(parentValue)) { + const validKeys = Object.keys(parentValue).filter((key)=>validatePath(config, [ + ...parentSegments, + key + ]).isValid); + const suggestion = (0, _didyoumean.default)(pathSegments[pathSegments.length - 1], validKeys); + if (suggestion) { + error += ` Did you mean '${pathToString([ + ...parentSegments, + suggestion + ])}'?`; + } else if (validKeys.length > 0) { + error += ` '${pathToString(parentSegments)}' has the following valid keys: ${list(validKeys)}`; + } + } else { + const closestPath = findClosestExistingPath(config.theme, pathString); + if (closestPath) { + const closestValue = (0, _dlv.default)(config.theme, closestPath); + if (isObject(closestValue)) { + error += ` '${pathToString(closestPath)}' has the following keys: ${listKeys(closestValue)}`; + } else { + error += ` '${pathToString(closestPath)}' is not an object.`; + } + } else { + error += ` Your theme has the following top-level keys: ${listKeys(config.theme)}`; + } + } + return { + isValid: false, + error + }; + } + if (!(typeof value === "string" || typeof value === "number" || typeof value === "function" || value instanceof String || value instanceof Number || Array.isArray(value))) { + let error = `'${pathString}' was found but does not resolve to a string.`; + if (isObject(value)) { + let validKeys = Object.keys(value).filter((key)=>validatePath(config, [ + ...pathSegments, + key + ]).isValid); + if (validKeys.length) { + error += ` Did you mean something like '${pathToString([ + ...pathSegments, + validKeys[0] + ])}'?`; + } + } + return { + isValid: false, + error + }; + } + const [themeSection] = pathSegments; + return { + isValid: true, + value: (0, _transformThemeValue.default)(themeSection)(value, themeOpts) + }; +} +function extractArgs(node, vNodes, functions) { + vNodes = vNodes.map((vNode)=>resolveVNode(node, vNode, functions)); + let args = [ + "" + ]; + for (let vNode of vNodes){ + if (vNode.type === "div" && vNode.value === ",") { + args.push(""); + } else { + args[args.length - 1] += _index.default.stringify(vNode); + } + } + return args; +} +function resolveVNode(node, vNode, functions) { + if (vNode.type === "function" && functions[vNode.value] !== undefined) { + let args = extractArgs(node, vNode.nodes, functions); + vNode.type = "word"; + vNode.value = functions[vNode.value](node, ...args); + } + return vNode; +} +function resolveFunctions(node, input, functions) { + let hasAnyFn = Object.keys(functions).some((fn)=>input.includes(`${fn}(`)); + if (!hasAnyFn) return input; + return (0, _index.default)(input).walk((vNode)=>{ + resolveVNode(node, vNode, functions); + }).toString(); +} +let nodeTypePropertyMap = { + atrule: "params", + decl: "value" +}; +/** + * @param {string} path + * @returns {Iterable<[path: string, alpha: string|undefined]>} + */ function* toPaths(path) { + // Strip quotes from beginning and end of string + // This allows the alpha value to be present inside of quotes + path = path.replace(/^['"]+|['"]+$/g, ""); + let matches = path.match(/^([^\s]+)(?![^\[]*\])(?:\s*\/\s*([^\/\s]+))$/); + let alpha = undefined; + yield [ + path, + undefined + ]; + if (matches) { + path = matches[1]; + alpha = matches[2]; + yield [ + path, + alpha + ]; + } +} +/** + * + * @param {any} config + * @param {string} path + * @param {any} defaultValue + */ function resolvePath(config, path, defaultValue) { + const results = Array.from(toPaths(path)).map(([path, alpha])=>{ + return Object.assign(validatePath(config, path, defaultValue, { + opacityValue: alpha + }), { + resolvedPath: path, + alpha + }); + }); + var _results_find; + return (_results_find = results.find((result)=>result.isValid)) !== null && _results_find !== void 0 ? _results_find : results[0]; +} +function _default(context) { + let config = context.tailwindConfig; + let functions = { + theme: (node, path, ...defaultValue)=>{ + let { isValid , value , error , alpha } = resolvePath(config, path, defaultValue.length ? defaultValue : undefined); + if (!isValid) { + var _parentNode_raws_tailwind; + let parentNode = node.parent; + let candidate = (_parentNode_raws_tailwind = parentNode === null || parentNode === void 0 ? void 0 : parentNode.raws.tailwind) === null || _parentNode_raws_tailwind === void 0 ? void 0 : _parentNode_raws_tailwind.candidate; + if (parentNode && candidate !== undefined) { + // Remove this utility from any caches + context.markInvalidUtilityNode(parentNode); + // Remove the CSS node from the markup + parentNode.remove(); + // Show a warning + _log.default.warn("invalid-theme-key-in-class", [ + `The utility \`${candidate}\` contains an invalid theme value and was not generated.` + ]); + return; + } + throw node.error(error); + } + let maybeColor = (0, _pluginUtils.parseColorFormat)(value); + let isColorFunction = maybeColor !== undefined && typeof maybeColor === "function"; + if (alpha !== undefined || isColorFunction) { + if (alpha === undefined) { + alpha = 1.0; + } + value = (0, _withAlphaVariable.withAlphaValue)(maybeColor, alpha, maybeColor); + } + return value; + }, + screen: (node, screen)=>{ + screen = screen.replace(/^['"]+/g, "").replace(/['"]+$/g, ""); + let screens = (0, _normalizeScreens.normalizeScreens)(config.theme.screens); + let screenDefinition = screens.find(({ name })=>name === screen); + if (!screenDefinition) { + throw node.error(`The '${screen}' screen does not exist in your theme.`); + } + return (0, _buildMediaQuery.default)(screenDefinition); + } + }; + return (root)=>{ + root.walk((node)=>{ + let property = nodeTypePropertyMap[node.type]; + if (property === undefined) { + return; + } + node[property] = resolveFunctions(node, node[property], functions); + }); + }; +} diff --git a/node_modules/tailwindcss/lib/lib/expandApplyAtRules.js b/node_modules/tailwindcss/lib/lib/expandApplyAtRules.js new file mode 100644 index 0000000..c47ea1a --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/expandApplyAtRules.js @@ -0,0 +1,553 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "default", { + enumerable: true, + get: function() { + return expandApplyAtRules; + } +}); +const _postcss = /*#__PURE__*/ _interop_require_default(require("postcss")); +const _postcssselectorparser = /*#__PURE__*/ _interop_require_default(require("postcss-selector-parser")); +const _generateRules = require("./generateRules"); +const _escapeClassName = /*#__PURE__*/ _interop_require_default(require("../util/escapeClassName")); +const _applyImportantSelector = require("../util/applyImportantSelector"); +const _pseudoElements = require("../util/pseudoElements"); +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +/** @typedef {Map} ApplyCache */ function extractClasses(node) { + /** @type {Map>} */ let groups = new Map(); + let container = _postcss.default.root({ + nodes: [ + node.clone() + ] + }); + container.walkRules((rule)=>{ + (0, _postcssselectorparser.default)((selectors)=>{ + selectors.walkClasses((classSelector)=>{ + let parentSelector = classSelector.parent.toString(); + let classes = groups.get(parentSelector); + if (!classes) { + groups.set(parentSelector, classes = new Set()); + } + classes.add(classSelector.value); + }); + }).processSync(rule.selector); + }); + let normalizedGroups = Array.from(groups.values(), (classes)=>Array.from(classes)); + let classes = normalizedGroups.flat(); + return Object.assign(classes, { + groups: normalizedGroups + }); +} +let selectorExtractor = (0, _postcssselectorparser.default)(); +/** + * @param {string} ruleSelectors + */ function extractSelectors(ruleSelectors) { + return selectorExtractor.astSync(ruleSelectors); +} +function extractBaseCandidates(candidates, separator) { + let baseClasses = new Set(); + for (let candidate of candidates){ + baseClasses.add(candidate.split(separator).pop()); + } + return Array.from(baseClasses); +} +function prefix(context, selector) { + let prefix = context.tailwindConfig.prefix; + return typeof prefix === "function" ? prefix(selector) : prefix + selector; +} +function* pathToRoot(node) { + yield node; + while(node.parent){ + yield node.parent; + node = node.parent; + } +} +/** + * Only clone the node itself and not its children + * + * @param {*} node + * @param {*} overrides + * @returns + */ function shallowClone(node, overrides = {}) { + let children = node.nodes; + node.nodes = []; + let tmp = node.clone(overrides); + node.nodes = children; + return tmp; +} +/** + * Clone just the nodes all the way to the top that are required to represent + * this singular rule in the tree. + * + * For example, if we have CSS like this: + * ```css + * @media (min-width: 768px) { + * @supports (display: grid) { + * .foo { + * display: grid; + * grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + * } + * } + * + * @supports (backdrop-filter: blur(1px)) { + * .bar { + * backdrop-filter: blur(1px); + * } + * } + * + * .baz { + * color: orange; + * } + * } + * ``` + * + * And we're cloning `.bar` it'll return a cloned version of what's required for just that single node: + * + * ```css + * @media (min-width: 768px) { + * @supports (backdrop-filter: blur(1px)) { + * .bar { + * backdrop-filter: blur(1px); + * } + * } + * } + * ``` + * + * @param {import('postcss').Node} node + */ function nestedClone(node) { + for (let parent of pathToRoot(node)){ + if (node === parent) { + continue; + } + if (parent.type === "root") { + break; + } + node = shallowClone(parent, { + nodes: [ + node + ] + }); + } + return node; +} +/** + * @param {import('postcss').Root} root + */ function buildLocalApplyCache(root, context) { + /** @type {ApplyCache} */ let cache = new Map(); + root.walkRules((rule)=>{ + // Ignore rules generated by Tailwind + for (let node of pathToRoot(rule)){ + var _node_raws_tailwind; + if (((_node_raws_tailwind = node.raws.tailwind) === null || _node_raws_tailwind === void 0 ? void 0 : _node_raws_tailwind.layer) !== undefined) { + return; + } + } + // Clone what's required to represent this singular rule in the tree + let container = nestedClone(rule); + let sort = context.offsets.create("user"); + for (let className of extractClasses(rule)){ + let list = cache.get(className) || []; + cache.set(className, list); + list.push([ + { + layer: "user", + sort, + important: false + }, + container + ]); + } + }); + return cache; +} +/** + * @returns {ApplyCache} + */ function buildApplyCache(applyCandidates, context) { + for (let candidate of applyCandidates){ + if (context.notClassCache.has(candidate) || context.applyClassCache.has(candidate)) { + continue; + } + if (context.classCache.has(candidate)) { + context.applyClassCache.set(candidate, context.classCache.get(candidate).map(([meta, rule])=>[ + meta, + rule.clone() + ])); + continue; + } + let matches = Array.from((0, _generateRules.resolveMatches)(candidate, context)); + if (matches.length === 0) { + context.notClassCache.add(candidate); + continue; + } + context.applyClassCache.set(candidate, matches); + } + return context.applyClassCache; +} +/** + * Build a cache only when it's first used + * + * @param {() => ApplyCache} buildCacheFn + * @returns {ApplyCache} + */ function lazyCache(buildCacheFn) { + let cache = null; + return { + get: (name)=>{ + cache = cache || buildCacheFn(); + return cache.get(name); + }, + has: (name)=>{ + cache = cache || buildCacheFn(); + return cache.has(name); + } + }; +} +/** + * Take a series of multiple caches and merge + * them so they act like one large cache + * + * @param {ApplyCache[]} caches + * @returns {ApplyCache} + */ function combineCaches(caches) { + return { + get: (name)=>caches.flatMap((cache)=>cache.get(name) || []), + has: (name)=>caches.some((cache)=>cache.has(name)) + }; +} +function extractApplyCandidates(params) { + let candidates = params.split(/[\s\t\n]+/g); + if (candidates[candidates.length - 1] === "!important") { + return [ + candidates.slice(0, -1), + true + ]; + } + return [ + candidates, + false + ]; +} +function processApply(root, context, localCache) { + let applyCandidates = new Set(); + // Collect all @apply rules and candidates + let applies = []; + root.walkAtRules("apply", (rule)=>{ + let [candidates] = extractApplyCandidates(rule.params); + for (let util of candidates){ + applyCandidates.add(util); + } + applies.push(rule); + }); + // Start the @apply process if we have rules with @apply in them + if (applies.length === 0) { + return; + } + // Fill up some caches! + let applyClassCache = combineCaches([ + localCache, + buildApplyCache(applyCandidates, context) + ]); + /** + * When we have an apply like this: + * + * .abc { + * @apply hover:font-bold; + * } + * + * What we essentially will do is resolve to this: + * + * .abc { + * @apply .hover\:font-bold:hover { + * font-weight: 500; + * } + * } + * + * Notice that the to-be-applied class is `.hover\:font-bold:hover` and that the utility candidate was `hover:font-bold`. + * What happens in this function is that we prepend a `.` and escape the candidate. + * This will result in `.hover\:font-bold` + * Which means that we can replace `.hover\:font-bold` with `.abc` in `.hover\:font-bold:hover` resulting in `.abc:hover` + * + * @param {string} selector + * @param {string} utilitySelectors + * @param {string} candidate + */ function replaceSelector(selector, utilitySelectors, candidate) { + let selectorList = extractSelectors(selector); + let utilitySelectorsList = extractSelectors(utilitySelectors); + let candidateList = extractSelectors(`.${(0, _escapeClassName.default)(candidate)}`); + let candidateClass = candidateList.nodes[0].nodes[0]; + selectorList.each((sel)=>{ + /** @type {Set} */ let replaced = new Set(); + utilitySelectorsList.each((utilitySelector)=>{ + let hasReplaced = false; + utilitySelector = utilitySelector.clone(); + utilitySelector.walkClasses((node)=>{ + if (node.value !== candidateClass.value) { + return; + } + // Don't replace multiple instances of the same class + // This is theoretically correct but only partially + // We'd need to generate every possible permutation of the replacement + // For example with `.foo + .foo { … }` and `section { @apply foo; }` + // We'd need to generate all of these: + // - `.foo + .foo` + // - `.foo + section` + // - `section + .foo` + // - `section + section` + if (hasReplaced) { + return; + } + // Since you can only `@apply` class names this is sufficient + // We want to replace the matched class name with the selector the user is using + // Ex: Replace `.text-blue-500` with `.foo.bar:is(.something-cool)` + node.replaceWith(...sel.nodes.map((node)=>node.clone())); + // Record that we did something and we want to use this new selector + replaced.add(utilitySelector); + hasReplaced = true; + }); + }); + // Sort tag names before class names (but only sort each group (separated by a combinator) + // separately and not in total) + // This happens when replacing `.bar` in `.foo.bar` with a tag like `section` + for (let sel of replaced){ + let groups = [ + [] + ]; + for (let node of sel.nodes){ + if (node.type === "combinator") { + groups.push(node); + groups.push([]); + } else { + let last = groups[groups.length - 1]; + last.push(node); + } + } + sel.nodes = []; + for (let group of groups){ + if (Array.isArray(group)) { + group.sort((a, b)=>{ + if (a.type === "tag" && b.type === "class") { + return -1; + } else if (a.type === "class" && b.type === "tag") { + return 1; + } else if (a.type === "class" && b.type === "pseudo" && b.value.startsWith("::")) { + return -1; + } else if (a.type === "pseudo" && a.value.startsWith("::") && b.type === "class") { + return 1; + } + return 0; + }); + } + sel.nodes = sel.nodes.concat(group); + } + } + sel.replaceWith(...replaced); + }); + return selectorList.toString(); + } + let perParentApplies = new Map(); + // Collect all apply candidates and their rules + for (let apply of applies){ + let [candidates] = perParentApplies.get(apply.parent) || [ + [], + apply.source + ]; + perParentApplies.set(apply.parent, [ + candidates, + apply.source + ]); + let [applyCandidates, important] = extractApplyCandidates(apply.params); + if (apply.parent.type === "atrule") { + if (apply.parent.name === "screen") { + let screenType = apply.parent.params; + throw apply.error(`@apply is not supported within nested at-rules like @screen. We suggest you write this as @apply ${applyCandidates.map((c)=>`${screenType}:${c}`).join(" ")} instead.`); + } + throw apply.error(`@apply is not supported within nested at-rules like @${apply.parent.name}. You can fix this by un-nesting @${apply.parent.name}.`); + } + for (let applyCandidate of applyCandidates){ + if ([ + prefix(context, "group"), + prefix(context, "peer") + ].includes(applyCandidate)) { + // TODO: Link to specific documentation page with error code. + throw apply.error(`@apply should not be used with the '${applyCandidate}' utility`); + } + if (!applyClassCache.has(applyCandidate)) { + throw apply.error(`The \`${applyCandidate}\` class does not exist. If \`${applyCandidate}\` is a custom class, make sure it is defined within a \`@layer\` directive.`); + } + let rules = applyClassCache.get(applyCandidate); + // Verify that we can apply the class + for (let [, rule] of rules){ + if (rule.type === "atrule") { + continue; + } + rule.walkRules(()=>{ + throw apply.error([ + `The \`${applyCandidate}\` class cannot be used with \`@apply\` because \`@apply\` does not currently support nested CSS.`, + "Rewrite the selector without nesting or configure the `tailwindcss/nesting` plugin:", + "https://tailwindcss.com/docs/using-with-preprocessors#nesting" + ].join("\n")); + }); + } + candidates.push([ + applyCandidate, + important, + rules + ]); + } + } + for (let [parent, [candidates, atApplySource]] of perParentApplies){ + let siblings = []; + for (let [applyCandidate, important, rules] of candidates){ + let potentialApplyCandidates = [ + applyCandidate, + ...extractBaseCandidates([ + applyCandidate + ], context.tailwindConfig.separator) + ]; + for (let [meta, node] of rules){ + let parentClasses = extractClasses(parent); + let nodeClasses = extractClasses(node); + // When we encounter a rule like `.dark .a, .b { … }` we only want to be left with `[.dark, .a]` if the base applyCandidate is `.a` or with `[.b]` if the base applyCandidate is `.b` + // So we've split them into groups + nodeClasses = nodeClasses.groups.filter((classList)=>classList.some((className)=>potentialApplyCandidates.includes(className))).flat(); + // Add base utility classes from the @apply node to the list of + // classes to check whether it intersects and therefore results in a + // circular dependency or not. + // + // E.g.: + // .foo { + // @apply hover:a; // This applies "a" but with a modifier + // } + // + // We only have to do that with base classes of the `node`, not of the `parent` + // E.g.: + // .hover\:foo { + // @apply bar; + // } + // .bar { + // @apply foo; + // } + // + // This should not result in a circular dependency because we are + // just applying `.foo` and the rule above is `.hover\:foo` which is + // unrelated. However, if we were to apply `hover:foo` then we _did_ + // have to include this one. + nodeClasses = nodeClasses.concat(extractBaseCandidates(nodeClasses, context.tailwindConfig.separator)); + let intersects = parentClasses.some((selector)=>nodeClasses.includes(selector)); + if (intersects) { + throw node.error(`You cannot \`@apply\` the \`${applyCandidate}\` utility here because it creates a circular dependency.`); + } + let root = _postcss.default.root({ + nodes: [ + node.clone() + ] + }); + // Make sure every node in the entire tree points back at the @apply rule that generated it + root.walk((node)=>{ + node.source = atApplySource; + }); + let canRewriteSelector = node.type !== "atrule" || node.type === "atrule" && node.name !== "keyframes"; + if (canRewriteSelector) { + root.walkRules((rule)=>{ + // Let's imagine you have the following structure: + // + // .foo { + // @apply bar; + // } + // + // @supports (a: b) { + // .bar { + // color: blue + // } + // + // .something-unrelated {} + // } + // + // In this case we want to apply `.bar` but it happens to be in + // an atrule node. We clone that node instead of the nested one + // because we still want that @supports rule to be there once we + // applied everything. + // + // However it happens to be that the `.something-unrelated` is + // also in that same shared @supports atrule. This is not good, + // and this should not be there. The good part is that this is + // a clone already and it can be safely removed. The question is + // how do we know we can remove it. Basically what we can do is + // match it against the applyCandidate that you want to apply. If + // it doesn't match the we can safely delete it. + // + // If we didn't do this, then the `replaceSelector` function + // would have replaced this with something that didn't exist and + // therefore it removed the selector altogether. In this specific + // case it would result in `{}` instead of `.something-unrelated {}` + if (!extractClasses(rule).some((candidate)=>candidate === applyCandidate)) { + rule.remove(); + return; + } + // Strip the important selector from the parent selector if at the beginning + let importantSelector = typeof context.tailwindConfig.important === "string" ? context.tailwindConfig.important : null; + // We only want to move the "important" selector if this is a Tailwind-generated utility + // We do *not* want to do this for user CSS that happens to be structured the same + let isGenerated = parent.raws.tailwind !== undefined; + let parentSelector = isGenerated && importantSelector && parent.selector.indexOf(importantSelector) === 0 ? parent.selector.slice(importantSelector.length) : parent.selector; + // If the selector becomes empty after replacing the important selector + // This means that it's the same as the parent selector and we don't want to replace it + // Otherwise we'll crash + if (parentSelector === "") { + parentSelector = parent.selector; + } + rule.selector = replaceSelector(parentSelector, rule.selector, applyCandidate); + // And then re-add it if it was removed + if (importantSelector && parentSelector !== parent.selector) { + rule.selector = (0, _applyImportantSelector.applyImportantSelector)(rule.selector, importantSelector); + } + rule.walkDecls((d)=>{ + d.important = meta.important || important; + }); + // Move pseudo elements to the end of the selector (if necessary) + let selector = (0, _postcssselectorparser.default)().astSync(rule.selector); + selector.each((sel)=>(0, _pseudoElements.movePseudos)(sel)); + rule.selector = selector.toString(); + }); + } + // It could be that the node we were inserted was removed because the class didn't match + // If that was the *only* rule in the parent, then we have nothing add so we skip it + if (!root.nodes[0]) { + continue; + } + // Insert it + siblings.push([ + meta.sort, + root.nodes[0] + ]); + } + } + // Inject the rules, sorted, correctly + let nodes = context.offsets.sort(siblings).map((s)=>s[1]); + // `parent` refers to the node at `.abc` in: .abc { @apply mt-2 } + parent.after(nodes); + } + for (let apply of applies){ + // If there are left-over declarations, just remove the @apply + if (apply.parent.nodes.length > 1) { + apply.remove(); + } else { + // The node is empty, drop the full node + apply.parent.remove(); + } + } + // Do it again, in case we have other `@apply` rules + processApply(root, context, localCache); +} +function expandApplyAtRules(context) { + return (root)=>{ + // Build a cache of the user's CSS so we can use it to resolve classes used by @apply + let localCache = lazyCache(()=>buildLocalApplyCache(root, context)); + processApply(root, context, localCache); + }; +} diff --git a/node_modules/tailwindcss/lib/lib/expandTailwindAtRules.js b/node_modules/tailwindcss/lib/lib/expandTailwindAtRules.js new file mode 100644 index 0000000..0836d3f --- /dev/null +++ b/node_modules/tailwindcss/lib/lib/expandTailwindAtRules.js @@ -0,0 +1,279 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "default", { + enumerable: true, + get: function() { + return expandTailwindAtRules; + } +}); +const _fs = /*#__PURE__*/ _interop_require_default(require("fs")); +const _quicklru = /*#__PURE__*/ _interop_require_default(require("@alloc/quick-lru")); +const _sharedState = /*#__PURE__*/ _interop_require_wildcard(require("./sharedState")); +const _generateRules = require("./generateRules"); +const _log = /*#__PURE__*/ _interop_require_default(require("../util/log")); +const _cloneNodes = /*#__PURE__*/ _interop_require_default(require("../util/cloneNodes")); +const _defaultExtractor = require("./defaultExtractor"); +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== "function") return null; + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + return (_getRequireWildcardCache = function(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} +function _interop_require_wildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) { + return obj; + } + if (obj === null || typeof obj !== "object" && typeof obj !== "function") { + return { + default: obj + }; + } + var cache = _getRequireWildcardCache(nodeInterop); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + for(var key in obj){ + if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} +let env = _sharedState.env; +const builtInExtractors = { + DEFAULT: _defaultExtractor.defaultExtractor +}; +const builtInTransformers = { + DEFAULT: (content)=>content, + svelte: (content)=>content.replace(/(?:^|\s)class:/g, " ") +}; +function getExtractor(context, fileExtension) { + let extractors = context.tailwindConfig.content.extract; + return extractors[fileExtension] || extractors.DEFAULT || builtInExtractors[fileExtension] || builtInExtractors.DEFAULT(context); +} +function getTransformer(tailwindConfig, fileExtension) { + let transformers = tailwindConfig.content.transform; + return transformers[fileExtension] || transformers.DEFAULT || builtInTransformers[fileExtension] || builtInTransformers.DEFAULT; +} +let extractorCache = new WeakMap(); +// Scans template contents for possible classes. This is a hot path on initial build but +// not too important for subsequent builds. The faster the better though — if we can speed +// up these regexes by 50% that could cut initial build time by like 20%. +function getClassCandidates(content, extractor, candidates, seen) { + if (!extractorCache.has(extractor)) { + extractorCache.set(extractor, new _quicklru.default({ + maxSize: 25000 + })); + } + for (let line of content.split("\n")){ + line = line.trim(); + if (seen.has(line)) { + continue; + } + seen.add(line); + if (extractorCache.get(extractor).has(line)) { + for (let match of extractorCache.get(extractor).get(line)){ + candidates.add(match); + } + } else { + let extractorMatches = extractor(line).filter((s)=>s !== "!*"); + let lineMatchesSet = new Set(extractorMatches); + for (let match of lineMatchesSet){ + candidates.add(match); + } + extractorCache.get(extractor).set(line, lineMatchesSet); + } + } +} +/** + * + * @param {[import('./offsets.js').RuleOffset, import('postcss').Node][]} rules + * @param {*} context + */ function buildStylesheet(rules, context) { + let sortedRules = context.offsets.sort(rules); + let returnValue = { + base: new Set(), + defaults: new Set(), + components: new Set(), + utilities: new Set(), + variants: new Set() + }; + for (let [sort, rule] of sortedRules){ + returnValue[sort.layer].add(rule); + } + return returnValue; +} +function expandTailwindAtRules(context) { + return async (root)=>{ + let layerNodes = { + base: null, + components: null, + utilities: null, + variants: null + }; + root.walkAtRules((rule)=>{ + // Make sure this file contains Tailwind directives. If not, we can save + // a lot of work and bail early. Also we don't have to register our touch + // file as a dependency since the output of this CSS does not depend on + // the source of any templates. Think Vue ")}}function zr(){var e=re().querySelector('meta[name="htmx-config"]');if(e){return E(e.content)}else{return null}}function $r(){var e=zr();if(e){Q.config=le(Q.config,e)}}jr(function(){$r();_r();var e=re().body;zt(e);var t=re().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");e.addEventListener("htmx:abort",function(e){var t=e.target;var r=ae(t);if(r&&r.xhr){r.xhr.abort()}});const r=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(e){if(e.state&&e.state.htmx){ar();oe(t,function(e){ce(e,"htmx:restored",{document:re(),triggerEvent:ce})})}else{if(r){r(e)}}};setTimeout(function(){ce(e,"htmx:load",{});e=null},0)});return Q}()}); \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..9060b4a --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,38 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: [ + "./templates/**/*.html", + "./static/js/**/*.js" + ], + theme: { + extend: { + colors: { + primary: { + 50: '#f0fdf4', + 100: '#dcfce7', + 200: '#bbf7d0', + 300: '#86efac', + 400: '#4ade80', + 500: '#5CB82C', + 600: '#4CA324', + 700: '#3D8A1D', + 800: '#2F6B16', + 900: '#1F4D0F', + }, + accent: { + 50: '#fff7ed', + 100: '#ffedd5', + 200: '#fed7aa', + 300: '#fdba74', + 400: '#fb923c', + 500: '#F7931E', + 600: '#ea7c0c', + 700: '#c2640a', + 800: '#9a4f0d', + 900: '#7c400e', + } + } + }, + }, + plugins: [], +} diff --git a/templates/about.html b/templates/about.html new file mode 100644 index 0000000..3912d6e --- /dev/null +++ b/templates/about.html @@ -0,0 +1,147 @@ +{% extends "base.html" %} + +{% block title %}About Us{% endblock %} + +{% block content %} + +
+
+
+

About DirectLX

+

+ We're a team of passionate developers dedicated to building software that makes a difference. +

+
+
+
+ + +
+
+
+
+

Our Story

+

+ DirectLX was founded with a simple mission: to help businesses succeed through technology. + We believe that great software isn't just about code—it's about understanding problems + and crafting solutions that truly work. +

+

+ Over the years, we've had the privilege of working with startups, growing businesses, + and established enterprises across various industries. Each project has taught us + something new and reinforced our commitment to excellence. +

+

+ Today, we continue to push boundaries, embrace new technologies, and deliver + solutions that exceed expectations. Our journey is far from over, and we're + excited about what the future holds. +

+
+
+

Our Values

+
    +
  • + + + +
    + Quality First + We never compromise on quality, even under pressure. +
    +
  • +
  • + + + +
    + Transparency + Open communication and honest relationships with clients. +
    +
  • +
  • + + + +
    + Continuous Learning + Always evolving and improving our skills. +
    +
  • +
  • + + + +
    + Client Success + Your success is our success. +
    +
  • +
+
+
+
+
+ + +
+
+
+

Meet Our Team

+

+ A diverse group of talented individuals united by a shared passion for building great software. +

+
+ +
+
+
+ JD +
+

John Doe

+

Founder & CEO

+

+ 15+ years in software development. Passionate about clean code and scalable architectures. +

+
+ +
+
+ JS +
+

Jane Smith

+

Lead Developer

+

+ Full-stack expert with a focus on modern web technologies and user experience. +

+
+ +
+
+ MJ +
+

Mike Johnson

+

Solutions Architect

+

+ Cloud infrastructure specialist ensuring our solutions are robust and scalable. +

+
+
+
+
+ + +
+
+

Our Mission

+

+ "To empower businesses with innovative software solutions that drive growth, + improve efficiency, and create lasting value. We believe technology should + be an enabler, not a barrier, and we're committed to making that a reality + for every client we work with." +

+ + Let's Work Together + +
+
+{% endblock %} diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..2cb50a7 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,118 @@ + + + + + + {% block title %}DirectLX{% endblock %} | DirectLX.dev + + + {% block head %}{% endblock %} + + + + + + + {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} +
+ {% for category, message in messages %} +
+ {{ message }} +
+ {% endfor %} +
+ {% endif %} + {% endwith %} + + +
+ {% block content %}{% endblock %} +
+ + +
+
+
+
+
+ DirectLX +
+

+ Building innovative software solutions that drive business growth. + We specialize in custom development, consulting, and technical excellence. +

+
+
+

Quick Links

+ +
+
+

Community

+ +
+
+
+

© {{ now.year if now else '2024' }} DirectLX.dev. All rights reserved.

+
+
+
+ + + {% block scripts %}{% endblock %} + + diff --git a/templates/blog/index.html b/templates/blog/index.html new file mode 100644 index 0000000..558e644 --- /dev/null +++ b/templates/blog/index.html @@ -0,0 +1,66 @@ +{% extends "base.html" %} + +{% block title %}Blog{% endblock %} + +{% block content %} + +
+
+
+

Our Blog

+

+ Insights, tutorials, and thoughts on software development, technology, and industry trends. +

+
+
+
+ + +
+
+
+
+ + + + +
+
+
+
+ + +
+
+
+ {% include "blog/partials/post_list.html" %} +
+ + + {% if posts and posts|length >= 10 %} +
+ +
+ {% endif %} +
+
+{% endblock %} diff --git a/templates/blog/partials/post_list.html b/templates/blog/partials/post_list.html new file mode 100644 index 0000000..c544dda --- /dev/null +++ b/templates/blog/partials/post_list.html @@ -0,0 +1,38 @@ +{% if posts %} +
+ {% for post in posts %} +
+
{{ post.created_at.strftime('%B %d, %Y') }}
+

+ + {{ post.title }} + +

+

+ {{ post.excerpt or post.content[:150] }}{% if post.content|length > 150 %}...{% endif %} +

+
+
+
+ {{ post.author.username[0].upper() }} +
+ {{ post.author.username }} +
+ + Read more → + +
+
+ {% endfor %} +
+{% else %} +
+
+ + + +
+

No posts yet

+

Check back soon for new content!

+
+{% endif %} diff --git a/templates/blog/post.html b/templates/blog/post.html new file mode 100644 index 0000000..bc08209 --- /dev/null +++ b/templates/blog/post.html @@ -0,0 +1,47 @@ +{% extends "base.html" %} + +{% block title %}{{ post.title }}{% endblock %} + +{% block content %} +
+
+ +
+ +

{{ post.title }}

+
+
+ {{ post.author.username[0].upper() }} +
+
+
{{ post.author.username }}
+
{{ post.created_at.strftime('%B %d, %Y') }}
+
+
+
+ + +
+ {{ post.content | safe }} +
+ + +
+
+
+ {% if post.updated_at and post.updated_at != post.created_at %} +

+ Last updated: {{ post.updated_at.strftime('%B %d, %Y') }} +

+ {% endif %} +
+ + ← Back to Blog + +
+
+
+
+{% endblock %} diff --git a/templates/contact.html b/templates/contact.html new file mode 100644 index 0000000..9baaa03 --- /dev/null +++ b/templates/contact.html @@ -0,0 +1,142 @@ +{% extends "base.html" %} + +{% block title %}Contact{% endblock %} + +{% block content %} + +
+
+
+

Get in Touch

+

+ Have a project in mind? We'd love to hear from you. + Send us a message and we'll respond as soon as possible. +

+
+
+
+ + +
+
+
+ +
+

Send us a Message

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+ + +
+
+

Contact Information

+

+ Feel free to reach out through the form or use any of the contact methods below. + We typically respond within 24 hours. +

+
+ +
+
+
+ + + +
+
+

Email

+

hello@directlx.dev

+
+
+ +
+
+ + + + +
+
+

Location

+

Remote - Worldwide

+
+
+ +
+
+ + + +
+
+

Response Time

+

Within 24 hours

+
+
+
+ + +
+

Follow Us

+ +
+
+
+
+
+{% endblock %} diff --git a/templates/forum/category.html b/templates/forum/category.html new file mode 100644 index 0000000..5b9922d --- /dev/null +++ b/templates/forum/category.html @@ -0,0 +1,112 @@ +{% extends "base.html" %} + +{% block title %}{{ category.name }} - Forum{% endblock %} + +{% block content %} + +
+
+ +

{{ category.name }}

+

{{ category.description }}

+
+
+ + +
+
+
+

{{ topics.total if topics else 0 }} Topics

+ +
+ + +
+ {% include "forum/partials/topic_list.html" %} +
+ + + {% if topics and topics.pages > 1 %} +
+ {% if topics.has_prev %} + + ← Previous + + {% endif %} + + + Page {{ topics.page }} of {{ topics.pages }} + + + {% if topics.has_next %} + + Next → + + {% endif %} +
+ {% endif %} +
+
+ + + +{% endblock %} + +{% block scripts %} + +{% endblock %} diff --git a/templates/forum/index.html b/templates/forum/index.html new file mode 100644 index 0000000..19057b2 --- /dev/null +++ b/templates/forum/index.html @@ -0,0 +1,110 @@ +{% extends "base.html" %} + +{% block title %}Forum{% endblock %} + +{% block content %} + +
+
+
+

Community Forum

+

+ Connect with other developers, ask questions, share knowledge, and grow together. +

+
+
+
+ + +
+
+
+

Categories

+
+ + + + +
+
+ + +
+ + + {% if categories %} + + {% else %} +
+
+ + + +
+

No categories yet

+

The forum is being set up. Check back soon!

+
+ {% endif %} +
+
+ + +
+
+

Recent Activity

+ + {% if recent_topics %} +
+ {% for topic in recent_topics %} +
+
+ {{ topic.author.username[0].upper() }} +
+
+ + {{ topic.title }} + +
+ by {{ topic.author.username }} in + {{ topic.category.name }} +
+
+
+ {{ topic.reply_count }} replies +
+
+ {% endfor %} +
+ {% else %} +

No recent activity yet.

+ {% endif %} +
+
+{% endblock %} diff --git a/templates/forum/partials/reply_form.html b/templates/forum/partials/reply_form.html new file mode 100644 index 0000000..a7ac739 --- /dev/null +++ b/templates/forum/partials/reply_form.html @@ -0,0 +1,24 @@ +
+

Add a Reply

+
+
+ +
+
+ +
+
+
diff --git a/templates/forum/partials/topic_list.html b/templates/forum/partials/topic_list.html new file mode 100644 index 0000000..b1e5b8c --- /dev/null +++ b/templates/forum/partials/topic_list.html @@ -0,0 +1,43 @@ +{% if topics and topics.items %} +
+ {% for topic in topics.items %} +
+
+
+ {{ topic.author.username[0].upper() }} +
+
+
+ {% if topic.is_pinned %} + Pinned + {% endif %} + {% if topic.is_locked %} + Locked + {% endif %} + + {{ topic.title }} + +
+
+ by {{ topic.author.username }} · {{ topic.created_at.strftime('%B %d, %Y') }} +
+
+
+
{{ topic.reply_count }} replies
+
Last activity: {{ topic.last_activity.strftime('%b %d') }}
+
+
+
+ {% endfor %} +
+{% else %} +
+
+ + + +
+

No topics yet

+

Be the first to start a discussion!

+
+{% endif %} diff --git a/templates/forum/topic.html b/templates/forum/topic.html new file mode 100644 index 0000000..c12fe5b --- /dev/null +++ b/templates/forum/topic.html @@ -0,0 +1,99 @@ +{% extends "base.html" %} + +{% block title %}{{ topic.title }} - Forum{% endblock %} + +{% block content %} + +
+
+ +
+
+

+ {% if topic.is_pinned %} + + + + + + {% endif %} + {{ topic.title }} + {% if topic.is_locked %} + + + + {% endif %} +

+
+ Started by {{ topic.author.username }} · {{ topic.created_at.strftime('%B %d, %Y at %H:%M') }} +
+
+
+
+
+ + +
+
+
+
+
+ {{ topic.author.username[0].upper() }} +
+
+
+
{{ topic.author.username }}
+
{{ topic.created_at.strftime('%B %d, %Y at %H:%M') }}
+
+
+ {{ topic.content | safe }} +
+
+
+
+ + +
+ {% if replies %} +

{{ replies|length }} Replies

+ {% for reply in replies %} +
+
+
+ {{ reply.author.username[0].upper() }} +
+
+
+
{{ reply.author.username }}
+
{{ reply.created_at.strftime('%B %d, %Y at %H:%M') }}
+
+
+ {{ reply.content | safe }} +
+
+
+
+ {% endfor %} + {% endif %} +
+ + + {% if not topic.is_locked %} +
+ {% include "forum/partials/reply_form.html" %} +
+ {% else %} +
+ + + +

This topic is locked. No new replies can be added.

+
+ {% endif %} +
+
+{% endblock %} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..fa0287b --- /dev/null +++ b/templates/index.html @@ -0,0 +1,153 @@ +{% extends "base.html" %} + +{% block title %}Home{% endblock %} + +{% block content %} + +
+
+
+

+ Build Better Software,
+ Faster +

+

+ We help businesses transform their ideas into powerful, scalable software solutions. + From concept to deployment, we're your trusted development partner. +

+ +
+
+
+ + +
+
+
+

Why Choose DirectLX?

+

+ We combine technical expertise with a deep understanding of business needs + to deliver solutions that truly make a difference. +

+
+ +
+
+
+ + + +
+

Fast Delivery

+

+ Agile methodology and modern tools ensure rapid development without compromising quality. +

+
+ +
+
+ + + +
+

Secure & Reliable

+

+ Security-first approach with industry best practices and thorough testing. +

+
+ +
+
+ + + +
+

Expert Team

+

+ Experienced developers passionate about creating exceptional software solutions. +

+
+
+
+
+ + +
+
+
+
+
50+
+
Projects Delivered
+
+
+
30+
+
Happy Clients
+
+
+
5+
+
Years Experience
+
+
+
99%
+
Client Satisfaction
+
+
+
+
+ + +
+
+
+

Latest from the Blog

+ + View all posts → + +
+ +
+ {% if latest_posts %} + {% for post in latest_posts %} + + {% endfor %} + {% else %} +
+

No blog posts yet. Check back soon!

+
+ {% endif %} +
+
+
+ + +
+
+

Ready to Start Your Project?

+

+ Let's discuss how we can help bring your vision to life. + Get in touch for a free consultation. +

+ + Contact Us Today + +
+
+{% endblock %} diff --git a/templates/services.html b/templates/services.html new file mode 100644 index 0000000..b2ad928 --- /dev/null +++ b/templates/services.html @@ -0,0 +1,218 @@ +{% extends "base.html" %} + +{% block title %}Services{% endblock %} + +{% block content %} + +
+
+
+

Our Services

+

+ Comprehensive software solutions tailored to your business needs. + From development to deployment, we've got you covered. +

+
+
+
+ + +
+
+
+ +
+
+ + + +
+

Web Development

+

+ Modern, responsive websites and web applications built with the latest technologies. + From simple landing pages to complex enterprise platforms. +

+
    +
  • + + + + Custom web applications +
  • +
  • + + + + E-commerce solutions +
  • +
  • + + + + Progressive Web Apps (PWAs) +
  • +
+
+ + +
+
+ + + +
+

API Development

+

+ Robust, scalable APIs that power your applications and enable seamless integrations + with third-party services. +

+
    +
  • + + + + RESTful API design +
  • +
  • + + + + GraphQL implementations +
  • +
  • + + + + Third-party integrations +
  • +
+
+ + +
+
+ + + +
+

Cloud Solutions

+

+ Leverage the power of cloud computing with our expertise in AWS, Azure, and + Google Cloud Platform. +

+
    +
  • + + + + Cloud architecture design +
  • +
  • + + + + Migration services +
  • +
  • + + + + DevOps & CI/CD pipelines +
  • +
+
+ + +
+
+ + + +
+

Technical Consulting

+

+ Expert guidance on technology strategy, architecture decisions, and best practices + for your development team. +

+
    +
  • + + + + Technology assessment +
  • +
  • + + + + Code reviews & audits +
  • +
  • + + + + Team training +
  • +
+
+
+
+
+ + +
+
+
+

Our Process

+

+ A structured approach that ensures quality delivery and client satisfaction. +

+
+ +
+
+
+ 1 +
+

Discovery

+

Understanding your requirements, goals, and challenges.

+
+
+
+ 2 +
+

Planning

+

Designing the architecture and creating a detailed roadmap.

+
+
+
+ 3 +
+

Development

+

Building your solution with regular updates and feedback cycles.

+
+
+
+ 4 +
+

Delivery

+

Testing, deployment, and ongoing support.

+
+
+
+
+ + +
+
+

Ready to Get Started?

+

+ Whether you have a specific project in mind or need help defining your requirements, + we're here to help. Let's discuss how we can work together. +

+ + Request a Consultation + +
+
+{% endblock %} diff --git a/venv/bin/Activate.ps1 b/venv/bin/Activate.ps1 new file mode 100644 index 0000000..b49d77b --- /dev/null +++ b/venv/bin/Activate.ps1 @@ -0,0 +1,247 @@ +<# +.Synopsis +Activate a Python virtual environment for the current PowerShell session. + +.Description +Pushes the python executable for a virtual environment to the front of the +$Env:PATH environment variable and sets the prompt to signify that you are +in a Python virtual environment. Makes use of the command line switches as +well as the `pyvenv.cfg` file values present in the virtual environment. + +.Parameter VenvDir +Path to the directory that contains the virtual environment to activate. The +default value for this is the parent of the directory that the Activate.ps1 +script is located within. + +.Parameter Prompt +The prompt prefix to display when this virtual environment is activated. By +default, this prompt is the name of the virtual environment folder (VenvDir) +surrounded by parentheses and followed by a single space (ie. '(.venv) '). + +.Example +Activate.ps1 +Activates the Python virtual environment that contains the Activate.ps1 script. + +.Example +Activate.ps1 -Verbose +Activates the Python virtual environment that contains the Activate.ps1 script, +and shows extra information about the activation as it executes. + +.Example +Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv +Activates the Python virtual environment located in the specified location. + +.Example +Activate.ps1 -Prompt "MyPython" +Activates the Python virtual environment that contains the Activate.ps1 script, +and prefixes the current prompt with the specified string (surrounded in +parentheses) while the virtual environment is active. + +.Notes +On Windows, it may be required to enable this Activate.ps1 script by setting the +execution policy for the user. You can do this by issuing the following PowerShell +command: + +PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser + +For more information on Execution Policies: +https://go.microsoft.com/fwlink/?LinkID=135170 + +#> +Param( + [Parameter(Mandatory = $false)] + [String] + $VenvDir, + [Parameter(Mandatory = $false)] + [String] + $Prompt +) + +<# Function declarations --------------------------------------------------- #> + +<# +.Synopsis +Remove all shell session elements added by the Activate script, including the +addition of the virtual environment's Python executable from the beginning of +the PATH variable. + +.Parameter NonDestructive +If present, do not remove this function from the global namespace for the +session. + +#> +function global:deactivate ([switch]$NonDestructive) { + # Revert to original values + + # The prior prompt: + if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) { + Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt + Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT + } + + # The prior PYTHONHOME: + if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) { + Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME + Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME + } + + # The prior PATH: + if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) { + Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH + Remove-Item -Path Env:_OLD_VIRTUAL_PATH + } + + # Just remove the VIRTUAL_ENV altogether: + if (Test-Path -Path Env:VIRTUAL_ENV) { + Remove-Item -Path env:VIRTUAL_ENV + } + + # Just remove VIRTUAL_ENV_PROMPT altogether. + if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) { + Remove-Item -Path env:VIRTUAL_ENV_PROMPT + } + + # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether: + if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) { + Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force + } + + # Leave deactivate function in the global namespace if requested: + if (-not $NonDestructive) { + Remove-Item -Path function:deactivate + } +} + +<# +.Description +Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the +given folder, and returns them in a map. + +For each line in the pyvenv.cfg file, if that line can be parsed into exactly +two strings separated by `=` (with any amount of whitespace surrounding the =) +then it is considered a `key = value` line. The left hand string is the key, +the right hand is the value. + +If the value starts with a `'` or a `"` then the first and last character is +stripped from the value before being captured. + +.Parameter ConfigDir +Path to the directory that contains the `pyvenv.cfg` file. +#> +function Get-PyVenvConfig( + [String] + $ConfigDir +) { + Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg" + + # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue). + $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue + + # An empty map will be returned if no config file is found. + $pyvenvConfig = @{ } + + if ($pyvenvConfigPath) { + + Write-Verbose "File exists, parse `key = value` lines" + $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath + + $pyvenvConfigContent | ForEach-Object { + $keyval = $PSItem -split "\s*=\s*", 2 + if ($keyval[0] -and $keyval[1]) { + $val = $keyval[1] + + # Remove extraneous quotations around a string value. + if ("'""".Contains($val.Substring(0, 1))) { + $val = $val.Substring(1, $val.Length - 2) + } + + $pyvenvConfig[$keyval[0]] = $val + Write-Verbose "Adding Key: '$($keyval[0])'='$val'" + } + } + } + return $pyvenvConfig +} + + +<# Begin Activate script --------------------------------------------------- #> + +# Determine the containing directory of this script +$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition +$VenvExecDir = Get-Item -Path $VenvExecPath + +Write-Verbose "Activation script is located in path: '$VenvExecPath'" +Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)" +Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)" + +# Set values required in priority: CmdLine, ConfigFile, Default +# First, get the location of the virtual environment, it might not be +# VenvExecDir if specified on the command line. +if ($VenvDir) { + Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values" +} +else { + Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir." + $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/") + Write-Verbose "VenvDir=$VenvDir" +} + +# Next, read the `pyvenv.cfg` file to determine any required value such +# as `prompt`. +$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir + +# Next, set the prompt from the command line, or the config file, or +# just use the name of the virtual environment folder. +if ($Prompt) { + Write-Verbose "Prompt specified as argument, using '$Prompt'" +} +else { + Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value" + if ($pyvenvCfg -and $pyvenvCfg['prompt']) { + Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'" + $Prompt = $pyvenvCfg['prompt']; + } + else { + Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)" + Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'" + $Prompt = Split-Path -Path $venvDir -Leaf + } +} + +Write-Verbose "Prompt = '$Prompt'" +Write-Verbose "VenvDir='$VenvDir'" + +# Deactivate any currently active virtual environment, but leave the +# deactivate function in place. +deactivate -nondestructive + +# Now set the environment variable VIRTUAL_ENV, used by many tools to determine +# that there is an activated venv. +$env:VIRTUAL_ENV = $VenvDir + +if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) { + + Write-Verbose "Setting prompt to '$Prompt'" + + # Set the prompt to include the env name + # Make sure _OLD_VIRTUAL_PROMPT is global + function global:_OLD_VIRTUAL_PROMPT { "" } + Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT + New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt + + function global:prompt { + Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) " + _OLD_VIRTUAL_PROMPT + } + $env:VIRTUAL_ENV_PROMPT = $Prompt +} + +# Clear PYTHONHOME +if (Test-Path -Path Env:PYTHONHOME) { + Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME + Remove-Item -Path Env:PYTHONHOME +} + +# Add the venv to the PATH +Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH +$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH" diff --git a/venv/bin/activate b/venv/bin/activate new file mode 100644 index 0000000..845e4c7 --- /dev/null +++ b/venv/bin/activate @@ -0,0 +1,70 @@ +# This file must be used with "source bin/activate" *from bash* +# You cannot run it directly + +deactivate () { + # reset old environment variables + if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then + PATH="${_OLD_VIRTUAL_PATH:-}" + export PATH + unset _OLD_VIRTUAL_PATH + fi + if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then + PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" + export PYTHONHOME + unset _OLD_VIRTUAL_PYTHONHOME + fi + + # Call hash to forget past commands. Without forgetting + # past commands the $PATH changes we made may not be respected + hash -r 2> /dev/null + + if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then + PS1="${_OLD_VIRTUAL_PS1:-}" + export PS1 + unset _OLD_VIRTUAL_PS1 + fi + + unset VIRTUAL_ENV + unset VIRTUAL_ENV_PROMPT + if [ ! "${1:-}" = "nondestructive" ] ; then + # Self destruct! + unset -f deactivate + fi +} + +# unset irrelevant variables +deactivate nondestructive + +# on Windows, a path can contain colons and backslashes and has to be converted: +if [ "${OSTYPE:-}" = "cygwin" ] || [ "${OSTYPE:-}" = "msys" ] ; then + # transform D:\path\to\venv to /d/path/to/venv on MSYS + # and to /cygdrive/d/path/to/venv on Cygwin + export VIRTUAL_ENV=$(cygpath /source/dlx-src/directlx.dev/venv) +else + # use the path as-is + export VIRTUAL_ENV=/source/dlx-src/directlx.dev/venv +fi + +_OLD_VIRTUAL_PATH="$PATH" +PATH="$VIRTUAL_ENV/"bin":$PATH" +export PATH + +# unset PYTHONHOME if set +# this will fail if PYTHONHOME is set to the empty string (which is bad anyway) +# could use `if (set -u; : $PYTHONHOME) ;` in bash +if [ -n "${PYTHONHOME:-}" ] ; then + _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" + unset PYTHONHOME +fi + +if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then + _OLD_VIRTUAL_PS1="${PS1:-}" + PS1='(venv) '"${PS1:-}" + export PS1 + VIRTUAL_ENV_PROMPT='(venv) ' + export VIRTUAL_ENV_PROMPT +fi + +# Call hash to forget past commands. Without forgetting +# past commands the $PATH changes we made may not be respected +hash -r 2> /dev/null diff --git a/venv/bin/activate.csh b/venv/bin/activate.csh new file mode 100644 index 0000000..fb7d209 --- /dev/null +++ b/venv/bin/activate.csh @@ -0,0 +1,27 @@ +# This file must be used with "source bin/activate.csh" *from csh*. +# You cannot run it directly. + +# Created by Davide Di Blasi . +# Ported to Python 3.3 venv by Andrew Svetlov + +alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate' + +# Unset irrelevant variables. +deactivate nondestructive + +setenv VIRTUAL_ENV /source/dlx-src/directlx.dev/venv + +set _OLD_VIRTUAL_PATH="$PATH" +setenv PATH "$VIRTUAL_ENV/"bin":$PATH" + + +set _OLD_VIRTUAL_PROMPT="$prompt" + +if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then + set prompt = '(venv) '"$prompt" + setenv VIRTUAL_ENV_PROMPT '(venv) ' +endif + +alias pydoc python -m pydoc + +rehash diff --git a/venv/bin/activate.fish b/venv/bin/activate.fish new file mode 100644 index 0000000..6330889 --- /dev/null +++ b/venv/bin/activate.fish @@ -0,0 +1,69 @@ +# This file must be used with "source /bin/activate.fish" *from fish* +# (https://fishshell.com/). You cannot run it directly. + +function deactivate -d "Exit virtual environment and return to normal shell environment" + # reset old environment variables + if test -n "$_OLD_VIRTUAL_PATH" + set -gx PATH $_OLD_VIRTUAL_PATH + set -e _OLD_VIRTUAL_PATH + end + if test -n "$_OLD_VIRTUAL_PYTHONHOME" + set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME + set -e _OLD_VIRTUAL_PYTHONHOME + end + + if test -n "$_OLD_FISH_PROMPT_OVERRIDE" + set -e _OLD_FISH_PROMPT_OVERRIDE + # prevents error when using nested fish instances (Issue #93858) + if functions -q _old_fish_prompt + functions -e fish_prompt + functions -c _old_fish_prompt fish_prompt + functions -e _old_fish_prompt + end + end + + set -e VIRTUAL_ENV + set -e VIRTUAL_ENV_PROMPT + if test "$argv[1]" != "nondestructive" + # Self-destruct! + functions -e deactivate + end +end + +# Unset irrelevant variables. +deactivate nondestructive + +set -gx VIRTUAL_ENV /source/dlx-src/directlx.dev/venv + +set -gx _OLD_VIRTUAL_PATH $PATH +set -gx PATH "$VIRTUAL_ENV/"bin $PATH + +# Unset PYTHONHOME if set. +if set -q PYTHONHOME + set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME + set -e PYTHONHOME +end + +if test -z "$VIRTUAL_ENV_DISABLE_PROMPT" + # fish uses a function instead of an env var to generate the prompt. + + # Save the current fish_prompt function as the function _old_fish_prompt. + functions -c fish_prompt _old_fish_prompt + + # With the original prompt function renamed, we can override with our own. + function fish_prompt + # Save the return status of the last command. + set -l old_status $status + + # Output the venv prompt; color taken from the blue of the Python logo. + printf "%s%s%s" (set_color 4B8BBE) '(venv) ' (set_color normal) + + # Restore the return status of the previous command. + echo "exit $old_status" | . + # Output the original/"old" prompt. + _old_fish_prompt + end + + set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV" + set -gx VIRTUAL_ENV_PROMPT '(venv) ' +end diff --git a/venv/bin/flask b/venv/bin/flask new file mode 100755 index 0000000..f21caf6 --- /dev/null +++ b/venv/bin/flask @@ -0,0 +1,8 @@ +#!/source/dlx-src/directlx.dev/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from flask.cli import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/pip b/venv/bin/pip new file mode 100755 index 0000000..6454312 --- /dev/null +++ b/venv/bin/pip @@ -0,0 +1,8 @@ +#!/source/dlx-src/directlx.dev/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/pip3 b/venv/bin/pip3 new file mode 100755 index 0000000..6454312 --- /dev/null +++ b/venv/bin/pip3 @@ -0,0 +1,8 @@ +#!/source/dlx-src/directlx.dev/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/pip3.12 b/venv/bin/pip3.12 new file mode 100755 index 0000000..6454312 --- /dev/null +++ b/venv/bin/pip3.12 @@ -0,0 +1,8 @@ +#!/source/dlx-src/directlx.dev/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/python b/venv/bin/python new file mode 120000 index 0000000..b8a0adb --- /dev/null +++ b/venv/bin/python @@ -0,0 +1 @@ +python3 \ No newline at end of file diff --git a/venv/bin/python3 b/venv/bin/python3 new file mode 120000 index 0000000..ae65fda --- /dev/null +++ b/venv/bin/python3 @@ -0,0 +1 @@ +/usr/bin/python3 \ No newline at end of file diff --git a/venv/bin/python3.12 b/venv/bin/python3.12 new file mode 120000 index 0000000..b8a0adb --- /dev/null +++ b/venv/bin/python3.12 @@ -0,0 +1 @@ +python3 \ No newline at end of file diff --git a/venv/bin/slugify b/venv/bin/slugify new file mode 100755 index 0000000..f2e4cae --- /dev/null +++ b/venv/bin/slugify @@ -0,0 +1,8 @@ +#!/source/dlx-src/directlx.dev/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from slugify.__main__ import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/include/site/python3.12/greenlet/greenlet.h b/venv/include/site/python3.12/greenlet/greenlet.h new file mode 100644 index 0000000..d02a16e --- /dev/null +++ b/venv/include/site/python3.12/greenlet/greenlet.h @@ -0,0 +1,164 @@ +/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */ + +/* Greenlet object interface */ + +#ifndef Py_GREENLETOBJECT_H +#define Py_GREENLETOBJECT_H + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* This is deprecated and undocumented. It does not change. */ +#define GREENLET_VERSION "1.0.0" + +#ifndef GREENLET_MODULE +#define implementation_ptr_t void* +#endif + +typedef struct _greenlet { + PyObject_HEAD + PyObject* weakreflist; + PyObject* dict; + implementation_ptr_t pimpl; +} PyGreenlet; + +#define PyGreenlet_Check(op) (op && PyObject_TypeCheck(op, &PyGreenlet_Type)) + + +/* C API functions */ + +/* Total number of symbols that are exported */ +#define PyGreenlet_API_pointers 12 + +#define PyGreenlet_Type_NUM 0 +#define PyExc_GreenletError_NUM 1 +#define PyExc_GreenletExit_NUM 2 + +#define PyGreenlet_New_NUM 3 +#define PyGreenlet_GetCurrent_NUM 4 +#define PyGreenlet_Throw_NUM 5 +#define PyGreenlet_Switch_NUM 6 +#define PyGreenlet_SetParent_NUM 7 + +#define PyGreenlet_MAIN_NUM 8 +#define PyGreenlet_STARTED_NUM 9 +#define PyGreenlet_ACTIVE_NUM 10 +#define PyGreenlet_GET_PARENT_NUM 11 + +#ifndef GREENLET_MODULE +/* This section is used by modules that uses the greenlet C API */ +static void** _PyGreenlet_API = NULL; + +# define PyGreenlet_Type \ + (*(PyTypeObject*)_PyGreenlet_API[PyGreenlet_Type_NUM]) + +# define PyExc_GreenletError \ + ((PyObject*)_PyGreenlet_API[PyExc_GreenletError_NUM]) + +# define PyExc_GreenletExit \ + ((PyObject*)_PyGreenlet_API[PyExc_GreenletExit_NUM]) + +/* + * PyGreenlet_New(PyObject *args) + * + * greenlet.greenlet(run, parent=None) + */ +# define PyGreenlet_New \ + (*(PyGreenlet * (*)(PyObject * run, PyGreenlet * parent)) \ + _PyGreenlet_API[PyGreenlet_New_NUM]) + +/* + * PyGreenlet_GetCurrent(void) + * + * greenlet.getcurrent() + */ +# define PyGreenlet_GetCurrent \ + (*(PyGreenlet * (*)(void)) _PyGreenlet_API[PyGreenlet_GetCurrent_NUM]) + +/* + * PyGreenlet_Throw( + * PyGreenlet *greenlet, + * PyObject *typ, + * PyObject *val, + * PyObject *tb) + * + * g.throw(...) + */ +# define PyGreenlet_Throw \ + (*(PyObject * (*)(PyGreenlet * self, \ + PyObject * typ, \ + PyObject * val, \ + PyObject * tb)) \ + _PyGreenlet_API[PyGreenlet_Throw_NUM]) + +/* + * PyGreenlet_Switch(PyGreenlet *greenlet, PyObject *args) + * + * g.switch(*args, **kwargs) + */ +# define PyGreenlet_Switch \ + (*(PyObject * \ + (*)(PyGreenlet * greenlet, PyObject * args, PyObject * kwargs)) \ + _PyGreenlet_API[PyGreenlet_Switch_NUM]) + +/* + * PyGreenlet_SetParent(PyObject *greenlet, PyObject *new_parent) + * + * g.parent = new_parent + */ +# define PyGreenlet_SetParent \ + (*(int (*)(PyGreenlet * greenlet, PyGreenlet * nparent)) \ + _PyGreenlet_API[PyGreenlet_SetParent_NUM]) + +/* + * PyGreenlet_GetParent(PyObject* greenlet) + * + * return greenlet.parent; + * + * This could return NULL even if there is no exception active. + * If it does not return NULL, you are responsible for decrementing the + * reference count. + */ +# define PyGreenlet_GetParent \ + (*(PyGreenlet* (*)(PyGreenlet*)) \ + _PyGreenlet_API[PyGreenlet_GET_PARENT_NUM]) + +/* + * deprecated, undocumented alias. + */ +# define PyGreenlet_GET_PARENT PyGreenlet_GetParent + +# define PyGreenlet_MAIN \ + (*(int (*)(PyGreenlet*)) \ + _PyGreenlet_API[PyGreenlet_MAIN_NUM]) + +# define PyGreenlet_STARTED \ + (*(int (*)(PyGreenlet*)) \ + _PyGreenlet_API[PyGreenlet_STARTED_NUM]) + +# define PyGreenlet_ACTIVE \ + (*(int (*)(PyGreenlet*)) \ + _PyGreenlet_API[PyGreenlet_ACTIVE_NUM]) + + + + +/* Macro that imports greenlet and initializes C API */ +/* NOTE: This has actually moved to ``greenlet._greenlet._C_API``, but we + keep the older definition to be sure older code that might have a copy of + the header still works. */ +# define PyGreenlet_Import() \ + { \ + _PyGreenlet_API = (void**)PyCapsule_Import("greenlet._C_API", 0); \ + } + +#endif /* GREENLET_MODULE */ + +#ifdef __cplusplus +} +#endif +#endif /* !Py_GREENLETOBJECT_H */ diff --git a/venv/lib/python3.12/site-packages/__pycache__/typing_extensions.cpython-312.pyc b/venv/lib/python3.12/site-packages/__pycache__/typing_extensions.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5b1dfddc8ac38cc72893dda00b5c74d6ff471bf2 GIT binary patch literal 163747 zcmdqK30z#)bw55E!wd|}zzmC62Z7jx(7x{i$<~Hs32)%86>8)dJ8CV}N`o6WQQEYTois_Cw4D(+jHft1xmEjX`s;#)evRY&+Wx-hzIBF& zm;BPt=l}UXi97GzeL45sbI&>V+#hFUWf<^muI%ajnqV^g9ev18j`T8fqs(A9Z{Q4^ zvD@Gie~msP`!@MZ?AI*)T6`Avo#snpzgC}>{igfU*{{uKW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NMyyNAr4W&%;$#!1Uv ztt|{@OOv6m{M6`1B^=&hM#w$mirO0hnPawx&Aw0ai$eN0cU(WhBIhTv3sFd&`Q^?R zJEwQWbc7(9)P8@h+Z5JqS~Kb}tz2*Te#5thrN@b3SB>53TzjIZ{H^hCkFRN8Q0slm zZJ05v|Ego!nxv}3c&c=!?T+iCmY-{nsP#EZXEiFD6aGsQ2wh%;pX8Rjng4UgX|+D< z3rdm+QC&_mOg*As=@(#9b#qF#+OWSm3>}iPtSrsm^gaCVcj7-2rDzNf{bVq?*Twb}0 zymAd(kS^{e9+^hYA0Lu=f$Ok=OPE=CZ*lMdOEgyAKcB*Q8CXLZi$MdiKa^Q&B^dq) Y@YSkt{E_DYl7A&wYZaOQDlh^`0P66>f&c&j literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/INSTALLER b/venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/INSTALLER new file mode 100644 index 0000000..a1b589e --- /dev/null +++ b/venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/LICENSE.txt b/venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/LICENSE.txt new file mode 100644 index 0000000..79c9825 --- /dev/null +++ b/venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright 2010 Jason Kirtland + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/METADATA b/venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/METADATA new file mode 100644 index 0000000..6d343f5 --- /dev/null +++ b/venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/METADATA @@ -0,0 +1,60 @@ +Metadata-Version: 2.3 +Name: blinker +Version: 1.9.0 +Summary: Fast, simple object-to-object and broadcast signaling +Author: Jason Kirtland +Maintainer-email: Pallets Ecosystem +Requires-Python: >=3.9 +Description-Content-Type: text/markdown +Classifier: Development Status :: 5 - Production/Stable +Classifier: License :: OSI Approved :: MIT License +Classifier: Programming Language :: Python +Classifier: Typing :: Typed +Project-URL: Chat, https://discord.gg/pallets +Project-URL: Documentation, https://blinker.readthedocs.io +Project-URL: Source, https://github.com/pallets-eco/blinker/ + +# Blinker + +Blinker provides a fast dispatching system that allows any number of +interested parties to subscribe to events, or "signals". + + +## Pallets Community Ecosystem + +> [!IMPORTANT]\ +> This project is part of the Pallets Community Ecosystem. Pallets is the open +> source organization that maintains Flask; Pallets-Eco enables community +> maintenance of related projects. If you are interested in helping maintain +> this project, please reach out on [the Pallets Discord server][discord]. +> +> [discord]: https://discord.gg/pallets + + +## Example + +Signal receivers can subscribe to specific senders or receive signals +sent by any sender. + +```pycon +>>> from blinker import signal +>>> started = signal('round-started') +>>> def each(round): +... print(f"Round {round}") +... +>>> started.connect(each) + +>>> def round_two(round): +... print("This is round two.") +... +>>> started.connect(round_two, sender=2) + +>>> for round in range(1, 4): +... started.send(round) +... +Round 1! +Round 2! +This is round two. +Round 3! +``` + diff --git a/venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/RECORD b/venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/RECORD new file mode 100644 index 0000000..7cfb714 --- /dev/null +++ b/venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/RECORD @@ -0,0 +1,12 @@ +blinker-1.9.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +blinker-1.9.0.dist-info/LICENSE.txt,sha256=nrc6HzhZekqhcCXSrhvjg5Ykx5XphdTw6Xac4p-spGc,1054 +blinker-1.9.0.dist-info/METADATA,sha256=uIRiM8wjjbHkCtbCyTvctU37IAZk0kEe5kxAld1dvzA,1633 +blinker-1.9.0.dist-info/RECORD,, +blinker-1.9.0.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82 +blinker/__init__.py,sha256=I2EdZqpy4LyjX17Hn1yzJGWCjeLaVaPzsMgHkLfj_cQ,317 +blinker/__pycache__/__init__.cpython-312.pyc,, +blinker/__pycache__/_utilities.cpython-312.pyc,, +blinker/__pycache__/base.cpython-312.pyc,, +blinker/_utilities.py,sha256=0J7eeXXTUx0Ivf8asfpx0ycVkp0Eqfqnj117x2mYX9E,1675 +blinker/base.py,sha256=QpDuvXXcwJF49lUBcH5BiST46Rz9wSG7VW_p7N_027M,19132 +blinker/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 diff --git a/venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/WHEEL b/venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/WHEEL new file mode 100644 index 0000000..e3c6fee --- /dev/null +++ b/venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/WHEEL @@ -0,0 +1,4 @@ +Wheel-Version: 1.0 +Generator: flit 3.10.1 +Root-Is-Purelib: true +Tag: py3-none-any diff --git a/venv/lib/python3.12/site-packages/blinker/__init__.py b/venv/lib/python3.12/site-packages/blinker/__init__.py new file mode 100644 index 0000000..1772fa4 --- /dev/null +++ b/venv/lib/python3.12/site-packages/blinker/__init__.py @@ -0,0 +1,17 @@ +from __future__ import annotations + +from .base import ANY +from .base import default_namespace +from .base import NamedSignal +from .base import Namespace +from .base import Signal +from .base import signal + +__all__ = [ + "ANY", + "default_namespace", + "NamedSignal", + "Namespace", + "Signal", + "signal", +] diff --git a/venv/lib/python3.12/site-packages/blinker/__pycache__/__init__.cpython-312.pyc b/venv/lib/python3.12/site-packages/blinker/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7c00637651ef31763a87f17a55fad6657d52bccf GIT binary patch literal 491 zcmaKoy-ve05Xa9=nxv^J)ByA-5rdYU6WhYfT@)YcBJPU77 zDHCE~L$EP%4k{xj>+j#4?|k;X^m-|vo$publmNVXXKk%tAYV5Kk03x04O5a40-_}X z-I@kj&~S(xW?{o^I6{uHsNonn&fN0g zsS4xX@l8G!T#T-9>kE0yD_t_fr_#-ME`9z89dV^5hHG>?-d&$Xf8ogeCPcQ4SK7!+ z>?QHi@!}^j8lPwtYpjv7+Zy7?&SY0FvQ)oM&<%kr);$HT)T>QpHY@K5)AA{`xTW$vY=j47i^#)h-ycXBc< sM5X1K?PCi+8n=t`5fDOZ*n5M`8un}0sbRZ@EnJ^r+-*I?b_2710Q*~dzW@LL literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/blinker/__pycache__/_utilities.cpython-312.pyc b/venv/lib/python3.12/site-packages/blinker/__pycache__/_utilities.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..64481f90b2011eed44ecac7935ea308d073b3154 GIT binary patch literal 2718 zcmb7G&2JM&6rb^~z3Y$IA>k_}frX$Fqp&9BP^m5M7gxPb@g`Lvz1 zQ+9kQn$J`s*^a-tI*Ws(>3KzFGNLdZr&Mzrvs296Yp#UokG@wW?v**GnSXZ*`v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QMGs!E1S2kIq|#dJG}13 z?^;V0G8?z8Iq|#d>sfc>cU@|5@4B_$?QY|1Ln{)+pLH3cQd}oweGMYl{PGih_epUn zZaBN(bGT4Bm`aRA_T&|m&T5Kv+enUVjrhv{~6=G=M)Dx*fkn{!d`49!n_1vyO6=6n(U zQK(47)cmG7Nm8ZB&>$)qs}(jsoUuZRKqFqm({RIEIa@{!{@Nw)7P$ADT4r3Y`!;H7 zgg6)!Kl4yDAncXXfK2`Byhwg{MQjq@!Z`>S>ITvQf_1&+P@I440z$b4fBlcRCLIq- zx5Y=`b$A(Nhzn}!xQ06o)bK^*T=W?wZ5lZ`&95XGBfWr!;*s*|e?uePh1WFFKxp<{ z7W^l$b;gB##LN1e<8tTa&2vZR((g>XIWd>Gx@RGmm&K%||Hbq70wm{t` zN9q?Bz(v6;;Y@V5{KoHahi?kFapIohevFYrhX@buX5q|*t6<5`Q;VnmWRbi z{saQVOhJNzvS$1@&*VM?n-Ah17)IVoyEA_%;4t|LSaVvm_YL2gMZ^X=b4N2i1i(BS zlR;~d!aV1H5?YXk3(KqukiXZVayS2Q4trS|E$dL) zCUHpKIDnE)m`Uzjb>!>Tc)4^bL_E~xh({QB#oU_U-TOYW3g-|Eg!X3e)u5&gaKQ)p zyIV8_GC{v2Q?VpNOJTMs@5NQS2ZYNqlL_T*f|Ksa&{X5_qI*HY;eddMb6`&R^c zl5Qms>bCbGuH`Z+VR^4hWQ9-E2IRln2pX48D%)#^Xn^!}##C$o(`ORnA1;x9e^nQ#1l zV%oWa;=b}}&u=^#kJxrop!==y%Agp&+;L05&#jJ1vFWnw^6|O*7B+3q29b-5TaqXa zigV&S>> Symbol('foo') is Symbol('foo') + True + >>> Symbol('foo') + foo + """ + + symbols: t.ClassVar[dict[str, Symbol]] = {} + + def __new__(cls, name: str) -> Symbol: + if name in cls.symbols: + return cls.symbols[name] + + obj = super().__new__(cls) + cls.symbols[name] = obj + return obj + + def __init__(self, name: str) -> None: + self.name = name + + def __repr__(self) -> str: + return self.name + + def __getnewargs__(self) -> tuple[t.Any, ...]: + return (self.name,) + + +def make_id(obj: object) -> c.Hashable: + """Get a stable identifier for a receiver or sender, to be used as a dict + key or in a set. + """ + if inspect.ismethod(obj): + # The id of a bound method is not stable, but the id of the unbound + # function and instance are. + return id(obj.__func__), id(obj.__self__) + + if isinstance(obj, (str, int)): + # Instances with the same value always compare equal and have the same + # hash, even if the id may change. + return obj + + # Assume other types are not hashable but will always be the same instance. + return id(obj) + + +def make_ref(obj: T, callback: c.Callable[[ref[T]], None] | None = None) -> ref[T]: + if inspect.ismethod(obj): + return WeakMethod(obj, callback) # type: ignore[arg-type, return-value] + + return ref(obj, callback) diff --git a/venv/lib/python3.12/site-packages/blinker/base.py b/venv/lib/python3.12/site-packages/blinker/base.py new file mode 100644 index 0000000..d051b94 --- /dev/null +++ b/venv/lib/python3.12/site-packages/blinker/base.py @@ -0,0 +1,512 @@ +from __future__ import annotations + +import collections.abc as c +import sys +import typing as t +import weakref +from collections import defaultdict +from contextlib import contextmanager +from functools import cached_property +from inspect import iscoroutinefunction + +from ._utilities import make_id +from ._utilities import make_ref +from ._utilities import Symbol + +F = t.TypeVar("F", bound=c.Callable[..., t.Any]) + +ANY = Symbol("ANY") +"""Symbol for "any sender".""" + +ANY_ID = 0 + + +class Signal: + """A notification emitter. + + :param doc: The docstring for the signal. + """ + + ANY = ANY + """An alias for the :data:`~blinker.ANY` sender symbol.""" + + set_class: type[set[t.Any]] = set + """The set class to use for tracking connected receivers and senders. + Python's ``set`` is unordered. If receivers must be dispatched in the order + they were connected, an ordered set implementation can be used. + + .. versionadded:: 1.7 + """ + + @cached_property + def receiver_connected(self) -> Signal: + """Emitted at the end of each :meth:`connect` call. + + The signal sender is the signal instance, and the :meth:`connect` + arguments are passed through: ``receiver``, ``sender``, and ``weak``. + + .. versionadded:: 1.2 + """ + return Signal(doc="Emitted after a receiver connects.") + + @cached_property + def receiver_disconnected(self) -> Signal: + """Emitted at the end of each :meth:`disconnect` call. + + The sender is the signal instance, and the :meth:`disconnect` arguments + are passed through: ``receiver`` and ``sender``. + + This signal is emitted **only** when :meth:`disconnect` is called + explicitly. This signal cannot be emitted by an automatic disconnect + when a weakly referenced receiver or sender goes out of scope, as the + instance is no longer be available to be used as the sender for this + signal. + + An alternative approach is available by subscribing to + :attr:`receiver_connected` and setting up a custom weakref cleanup + callback on weak receivers and senders. + + .. versionadded:: 1.2 + """ + return Signal(doc="Emitted after a receiver disconnects.") + + def __init__(self, doc: str | None = None) -> None: + if doc: + self.__doc__ = doc + + self.receivers: dict[ + t.Any, weakref.ref[c.Callable[..., t.Any]] | c.Callable[..., t.Any] + ] = {} + """The map of connected receivers. Useful to quickly check if any + receivers are connected to the signal: ``if s.receivers:``. The + structure and data is not part of the public API, but checking its + boolean value is. + """ + + self.is_muted: bool = False + self._by_receiver: dict[t.Any, set[t.Any]] = defaultdict(self.set_class) + self._by_sender: dict[t.Any, set[t.Any]] = defaultdict(self.set_class) + self._weak_senders: dict[t.Any, weakref.ref[t.Any]] = {} + + def connect(self, receiver: F, sender: t.Any = ANY, weak: bool = True) -> F: + """Connect ``receiver`` to be called when the signal is sent by + ``sender``. + + :param receiver: The callable to call when :meth:`send` is called with + the given ``sender``, passing ``sender`` as a positional argument + along with any extra keyword arguments. + :param sender: Any object or :data:`ANY`. ``receiver`` will only be + called when :meth:`send` is called with this sender. If ``ANY``, the + receiver will be called for any sender. A receiver may be connected + to multiple senders by calling :meth:`connect` multiple times. + :param weak: Track the receiver with a :mod:`weakref`. The receiver will + be automatically disconnected when it is garbage collected. When + connecting a receiver defined within a function, set to ``False``, + otherwise it will be disconnected when the function scope ends. + """ + receiver_id = make_id(receiver) + sender_id = ANY_ID if sender is ANY else make_id(sender) + + if weak: + self.receivers[receiver_id] = make_ref( + receiver, self._make_cleanup_receiver(receiver_id) + ) + else: + self.receivers[receiver_id] = receiver + + self._by_sender[sender_id].add(receiver_id) + self._by_receiver[receiver_id].add(sender_id) + + if sender is not ANY and sender_id not in self._weak_senders: + # store a cleanup for weakref-able senders + try: + self._weak_senders[sender_id] = make_ref( + sender, self._make_cleanup_sender(sender_id) + ) + except TypeError: + pass + + if "receiver_connected" in self.__dict__ and self.receiver_connected.receivers: + try: + self.receiver_connected.send( + self, receiver=receiver, sender=sender, weak=weak + ) + except TypeError: + # TODO no explanation or test for this + self.disconnect(receiver, sender) + raise + + return receiver + + def connect_via(self, sender: t.Any, weak: bool = False) -> c.Callable[[F], F]: + """Connect the decorated function to be called when the signal is sent + by ``sender``. + + The decorated function will be called when :meth:`send` is called with + the given ``sender``, passing ``sender`` as a positional argument along + with any extra keyword arguments. + + :param sender: Any object or :data:`ANY`. ``receiver`` will only be + called when :meth:`send` is called with this sender. If ``ANY``, the + receiver will be called for any sender. A receiver may be connected + to multiple senders by calling :meth:`connect` multiple times. + :param weak: Track the receiver with a :mod:`weakref`. The receiver will + be automatically disconnected when it is garbage collected. When + connecting a receiver defined within a function, set to ``False``, + otherwise it will be disconnected when the function scope ends.= + + .. versionadded:: 1.1 + """ + + def decorator(fn: F) -> F: + self.connect(fn, sender, weak) + return fn + + return decorator + + @contextmanager + def connected_to( + self, receiver: c.Callable[..., t.Any], sender: t.Any = ANY + ) -> c.Generator[None, None, None]: + """A context manager that temporarily connects ``receiver`` to the + signal while a ``with`` block executes. When the block exits, the + receiver is disconnected. Useful for tests. + + :param receiver: The callable to call when :meth:`send` is called with + the given ``sender``, passing ``sender`` as a positional argument + along with any extra keyword arguments. + :param sender: Any object or :data:`ANY`. ``receiver`` will only be + called when :meth:`send` is called with this sender. If ``ANY``, the + receiver will be called for any sender. + + .. versionadded:: 1.1 + """ + self.connect(receiver, sender=sender, weak=False) + + try: + yield None + finally: + self.disconnect(receiver) + + @contextmanager + def muted(self) -> c.Generator[None, None, None]: + """A context manager that temporarily disables the signal. No receivers + will be called if the signal is sent, until the ``with`` block exits. + Useful for tests. + """ + self.is_muted = True + + try: + yield None + finally: + self.is_muted = False + + def send( + self, + sender: t.Any | None = None, + /, + *, + _async_wrapper: c.Callable[ + [c.Callable[..., c.Coroutine[t.Any, t.Any, t.Any]]], c.Callable[..., t.Any] + ] + | None = None, + **kwargs: t.Any, + ) -> list[tuple[c.Callable[..., t.Any], t.Any]]: + """Call all receivers that are connected to the given ``sender`` + or :data:`ANY`. Each receiver is called with ``sender`` as a positional + argument along with any extra keyword arguments. Return a list of + ``(receiver, return value)`` tuples. + + The order receivers are called is undefined, but can be influenced by + setting :attr:`set_class`. + + If a receiver raises an exception, that exception will propagate up. + This makes debugging straightforward, with an assumption that correctly + implemented receivers will not raise. + + :param sender: Call receivers connected to this sender, in addition to + those connected to :data:`ANY`. + :param _async_wrapper: Will be called on any receivers that are async + coroutines to turn them into sync callables. For example, could run + the receiver with an event loop. + :param kwargs: Extra keyword arguments to pass to each receiver. + + .. versionchanged:: 1.7 + Added the ``_async_wrapper`` argument. + """ + if self.is_muted: + return [] + + results = [] + + for receiver in self.receivers_for(sender): + if iscoroutinefunction(receiver): + if _async_wrapper is None: + raise RuntimeError("Cannot send to a coroutine function.") + + result = _async_wrapper(receiver)(sender, **kwargs) + else: + result = receiver(sender, **kwargs) + + results.append((receiver, result)) + + return results + + async def send_async( + self, + sender: t.Any | None = None, + /, + *, + _sync_wrapper: c.Callable[ + [c.Callable[..., t.Any]], c.Callable[..., c.Coroutine[t.Any, t.Any, t.Any]] + ] + | None = None, + **kwargs: t.Any, + ) -> list[tuple[c.Callable[..., t.Any], t.Any]]: + """Await all receivers that are connected to the given ``sender`` + or :data:`ANY`. Each receiver is called with ``sender`` as a positional + argument along with any extra keyword arguments. Return a list of + ``(receiver, return value)`` tuples. + + The order receivers are called is undefined, but can be influenced by + setting :attr:`set_class`. + + If a receiver raises an exception, that exception will propagate up. + This makes debugging straightforward, with an assumption that correctly + implemented receivers will not raise. + + :param sender: Call receivers connected to this sender, in addition to + those connected to :data:`ANY`. + :param _sync_wrapper: Will be called on any receivers that are sync + callables to turn them into async coroutines. For example, + could call the receiver in a thread. + :param kwargs: Extra keyword arguments to pass to each receiver. + + .. versionadded:: 1.7 + """ + if self.is_muted: + return [] + + results = [] + + for receiver in self.receivers_for(sender): + if not iscoroutinefunction(receiver): + if _sync_wrapper is None: + raise RuntimeError("Cannot send to a non-coroutine function.") + + result = await _sync_wrapper(receiver)(sender, **kwargs) + else: + result = await receiver(sender, **kwargs) + + results.append((receiver, result)) + + return results + + def has_receivers_for(self, sender: t.Any) -> bool: + """Check if there is at least one receiver that will be called with the + given ``sender``. A receiver connected to :data:`ANY` will always be + called, regardless of sender. Does not check if weakly referenced + receivers are still live. See :meth:`receivers_for` for a stronger + search. + + :param sender: Check for receivers connected to this sender, in addition + to those connected to :data:`ANY`. + """ + if not self.receivers: + return False + + if self._by_sender[ANY_ID]: + return True + + if sender is ANY: + return False + + return make_id(sender) in self._by_sender + + def receivers_for( + self, sender: t.Any + ) -> c.Generator[c.Callable[..., t.Any], None, None]: + """Yield each receiver to be called for ``sender``, in addition to those + to be called for :data:`ANY`. Weakly referenced receivers that are not + live will be disconnected and skipped. + + :param sender: Yield receivers connected to this sender, in addition + to those connected to :data:`ANY`. + """ + # TODO: test receivers_for(ANY) + if not self.receivers: + return + + sender_id = make_id(sender) + + if sender_id in self._by_sender: + ids = self._by_sender[ANY_ID] | self._by_sender[sender_id] + else: + ids = self._by_sender[ANY_ID].copy() + + for receiver_id in ids: + receiver = self.receivers.get(receiver_id) + + if receiver is None: + continue + + if isinstance(receiver, weakref.ref): + strong = receiver() + + if strong is None: + self._disconnect(receiver_id, ANY_ID) + continue + + yield strong + else: + yield receiver + + def disconnect(self, receiver: c.Callable[..., t.Any], sender: t.Any = ANY) -> None: + """Disconnect ``receiver`` from being called when the signal is sent by + ``sender``. + + :param receiver: A connected receiver callable. + :param sender: Disconnect from only this sender. By default, disconnect + from all senders. + """ + sender_id: c.Hashable + + if sender is ANY: + sender_id = ANY_ID + else: + sender_id = make_id(sender) + + receiver_id = make_id(receiver) + self._disconnect(receiver_id, sender_id) + + if ( + "receiver_disconnected" in self.__dict__ + and self.receiver_disconnected.receivers + ): + self.receiver_disconnected.send(self, receiver=receiver, sender=sender) + + def _disconnect(self, receiver_id: c.Hashable, sender_id: c.Hashable) -> None: + if sender_id == ANY_ID: + if self._by_receiver.pop(receiver_id, None) is not None: + for bucket in self._by_sender.values(): + bucket.discard(receiver_id) + + self.receivers.pop(receiver_id, None) + else: + self._by_sender[sender_id].discard(receiver_id) + self._by_receiver[receiver_id].discard(sender_id) + + def _make_cleanup_receiver( + self, receiver_id: c.Hashable + ) -> c.Callable[[weakref.ref[c.Callable[..., t.Any]]], None]: + """Create a callback function to disconnect a weakly referenced + receiver when it is garbage collected. + """ + + def cleanup(ref: weakref.ref[c.Callable[..., t.Any]]) -> None: + # If the interpreter is shutting down, disconnecting can result in a + # weird ignored exception. Don't call it in that case. + if not sys.is_finalizing(): + self._disconnect(receiver_id, ANY_ID) + + return cleanup + + def _make_cleanup_sender( + self, sender_id: c.Hashable + ) -> c.Callable[[weakref.ref[t.Any]], None]: + """Create a callback function to disconnect all receivers for a weakly + referenced sender when it is garbage collected. + """ + assert sender_id != ANY_ID + + def cleanup(ref: weakref.ref[t.Any]) -> None: + self._weak_senders.pop(sender_id, None) + + for receiver_id in self._by_sender.pop(sender_id, ()): + self._by_receiver[receiver_id].discard(sender_id) + + return cleanup + + def _cleanup_bookkeeping(self) -> None: + """Prune unused sender/receiver bookkeeping. Not threadsafe. + + Connecting & disconnecting leaves behind a small amount of bookkeeping + data. Typical workloads using Blinker, for example in most web apps, + Flask, CLI scripts, etc., are not adversely affected by this + bookkeeping. + + With a long-running process performing dynamic signal routing with high + volume, e.g. connecting to function closures, senders are all unique + object instances. Doing all of this over and over may cause memory usage + to grow due to extraneous bookkeeping. (An empty ``set`` for each stale + sender/receiver pair.) + + This method will prune that bookkeeping away, with the caveat that such + pruning is not threadsafe. The risk is that cleanup of a fully + disconnected receiver/sender pair occurs while another thread is + connecting that same pair. If you are in the highly dynamic, unique + receiver/sender situation that has lead you to this method, that failure + mode is perhaps not a big deal for you. + """ + for mapping in (self._by_sender, self._by_receiver): + for ident, bucket in list(mapping.items()): + if not bucket: + mapping.pop(ident, None) + + def _clear_state(self) -> None: + """Disconnect all receivers and senders. Useful for tests.""" + self._weak_senders.clear() + self.receivers.clear() + self._by_sender.clear() + self._by_receiver.clear() + + +class NamedSignal(Signal): + """A named generic notification emitter. The name is not used by the signal + itself, but matches the key in the :class:`Namespace` that it belongs to. + + :param name: The name of the signal within the namespace. + :param doc: The docstring for the signal. + """ + + def __init__(self, name: str, doc: str | None = None) -> None: + super().__init__(doc) + + #: The name of this signal. + self.name: str = name + + def __repr__(self) -> str: + base = super().__repr__() + return f"{base[:-1]}; {self.name!r}>" # noqa: E702 + + +class Namespace(dict[str, NamedSignal]): + """A dict mapping names to signals.""" + + def signal(self, name: str, doc: str | None = None) -> NamedSignal: + """Return the :class:`NamedSignal` for the given ``name``, creating it + if required. Repeated calls with the same name return the same signal. + + :param name: The name of the signal. + :param doc: The docstring of the signal. + """ + if name not in self: + self[name] = NamedSignal(name, doc) + + return self[name] + + +class _PNamespaceSignal(t.Protocol): + def __call__(self, name: str, doc: str | None = None) -> NamedSignal: ... + + +default_namespace: Namespace = Namespace() +"""A default :class:`Namespace` for creating named signals. :func:`signal` +creates a :class:`NamedSignal` in this namespace. +""" + +signal: _PNamespaceSignal = default_namespace.signal +"""Return a :class:`NamedSignal` in :data:`default_namespace` with the given +``name``, creating it if required. Repeated calls with the same name return the +same signal. +""" diff --git a/venv/lib/python3.12/site-packages/blinker/py.typed b/venv/lib/python3.12/site-packages/blinker/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/venv/lib/python3.12/site-packages/click-8.3.1.dist-info/INSTALLER b/venv/lib/python3.12/site-packages/click-8.3.1.dist-info/INSTALLER new file mode 100644 index 0000000..a1b589e --- /dev/null +++ b/venv/lib/python3.12/site-packages/click-8.3.1.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/venv/lib/python3.12/site-packages/click-8.3.1.dist-info/METADATA b/venv/lib/python3.12/site-packages/click-8.3.1.dist-info/METADATA new file mode 100644 index 0000000..3f433af --- /dev/null +++ b/venv/lib/python3.12/site-packages/click-8.3.1.dist-info/METADATA @@ -0,0 +1,84 @@ +Metadata-Version: 2.4 +Name: click +Version: 8.3.1 +Summary: Composable command line interface toolkit +Maintainer-email: Pallets +Requires-Python: >=3.10 +Description-Content-Type: text/markdown +License-Expression: BSD-3-Clause +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Typing :: Typed +License-File: LICENSE.txt +Requires-Dist: colorama; platform_system == 'Windows' +Project-URL: Changes, https://click.palletsprojects.com/page/changes/ +Project-URL: Chat, https://discord.gg/pallets +Project-URL: Documentation, https://click.palletsprojects.com/ +Project-URL: Donate, https://palletsprojects.com/donate +Project-URL: Source, https://github.com/pallets/click/ + +
+ +# Click + +Click is a Python package for creating beautiful command line interfaces +in a composable way with as little code as necessary. It's the "Command +Line Interface Creation Kit". It's highly configurable but comes with +sensible defaults out of the box. + +It aims to make the process of writing command line tools quick and fun +while also preventing any frustration caused by the inability to +implement an intended CLI API. + +Click in three points: + +- Arbitrary nesting of commands +- Automatic help page generation +- Supports lazy loading of subcommands at runtime + + +## A Simple Example + +```python +import click + +@click.command() +@click.option("--count", default=1, help="Number of greetings.") +@click.option("--name", prompt="Your name", help="The person to greet.") +def hello(count, name): + """Simple program that greets NAME for a total of COUNT times.""" + for _ in range(count): + click.echo(f"Hello, {name}!") + +if __name__ == '__main__': + hello() +``` + +``` +$ python hello.py --count=3 +Your name: Click +Hello, Click! +Hello, Click! +Hello, Click! +``` + + +## Donate + +The Pallets organization develops and supports Click and other popular +packages. In order to grow the community of contributors and users, and +allow the maintainers to devote more time to the projects, [please +donate today][]. + +[please donate today]: https://palletsprojects.com/donate + +## Contributing + +See our [detailed contributing documentation][contrib] for many ways to +contribute, including reporting issues, requesting features, asking or answering +questions, and making PRs. + +[contrib]: https://palletsprojects.com/contributing/ + diff --git a/venv/lib/python3.12/site-packages/click-8.3.1.dist-info/RECORD b/venv/lib/python3.12/site-packages/click-8.3.1.dist-info/RECORD new file mode 100644 index 0000000..77e5c98 --- /dev/null +++ b/venv/lib/python3.12/site-packages/click-8.3.1.dist-info/RECORD @@ -0,0 +1,40 @@ +click-8.3.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +click-8.3.1.dist-info/METADATA,sha256=XZeBrMAE0ghTE88SjfrSDuSyNCpBPplxJR1tbwD9oZg,2621 +click-8.3.1.dist-info/RECORD,, +click-8.3.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82 +click-8.3.1.dist-info/licenses/LICENSE.txt,sha256=morRBqOU6FO_4h9C9OctWSgZoigF2ZG18ydQKSkrZY0,1475 +click/__init__.py,sha256=6YyS1aeyknZ0LYweWozNZy0A9nZ_11wmYIhv3cbQrYo,4473 +click/__pycache__/__init__.cpython-312.pyc,, +click/__pycache__/_compat.cpython-312.pyc,, +click/__pycache__/_termui_impl.cpython-312.pyc,, +click/__pycache__/_textwrap.cpython-312.pyc,, +click/__pycache__/_utils.cpython-312.pyc,, +click/__pycache__/_winconsole.cpython-312.pyc,, +click/__pycache__/core.cpython-312.pyc,, +click/__pycache__/decorators.cpython-312.pyc,, +click/__pycache__/exceptions.cpython-312.pyc,, +click/__pycache__/formatting.cpython-312.pyc,, +click/__pycache__/globals.cpython-312.pyc,, +click/__pycache__/parser.cpython-312.pyc,, +click/__pycache__/shell_completion.cpython-312.pyc,, +click/__pycache__/termui.cpython-312.pyc,, +click/__pycache__/testing.cpython-312.pyc,, +click/__pycache__/types.cpython-312.pyc,, +click/__pycache__/utils.cpython-312.pyc,, +click/_compat.py,sha256=v3xBZkFbvA1BXPRkFfBJc6-pIwPI7345m-kQEnpVAs4,18693 +click/_termui_impl.py,sha256=rgCb3On8X5A4200rA5L6i13u5iapmFer7sru57Jy6zA,27093 +click/_textwrap.py,sha256=BOae0RQ6vg3FkNgSJyOoGzG1meGMxJ_ukWVZKx_v-0o,1400 +click/_utils.py,sha256=kZwtTf5gMuCilJJceS2iTCvRvCY-0aN5rJq8gKw7p8g,943 +click/_winconsole.py,sha256=_vxUuUaxwBhoR0vUWCNuHY8VUefiMdCIyU2SXPqoF-A,8465 +click/core.py,sha256=U6Bfxt8GkjNDqyJ0HqXvluJHtyZ4sY5USAvM1Cdq7mQ,132105 +click/decorators.py,sha256=5P7abhJtAQYp_KHgjUvhMv464ERwOzrv2enNknlwHyQ,18461 +click/exceptions.py,sha256=8utf8w6V5hJXMnO_ic1FNrtbwuEn1NUu1aDwV8UqnG4,9954 +click/formatting.py,sha256=RVfwwr0rwWNpgGr8NaHodPzkIr7_tUyVh_nDdanLMNc,9730 +click/globals.py,sha256=gM-Nh6A4M0HB_SgkaF5M4ncGGMDHc_flHXu9_oh4GEU,1923 +click/parser.py,sha256=Q31pH0FlQZEq-UXE_ABRzlygEfvxPTuZbWNh4xfXmzw,19010 +click/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +click/shell_completion.py,sha256=Cc4GQUFuWpfQBa9sF5qXeeYI7n3tI_1k6ZdSn4BZbT0,20994 +click/termui.py,sha256=hqCEjNndU-nzW08nRAkBaVgfZp_FdCA9KxfIWlKYaMc,31037 +click/testing.py,sha256=EERbzcl1br0mW0qBS9EqkknfNfXB9WQEW0ELIpkvuSs,19102 +click/types.py,sha256=ek54BNSFwPKsqtfT7jsqcc4WHui8AIFVMKM4oVZIXhc,39927 +click/utils.py,sha256=gCUoewdAhA-QLBUUHxrLh4uj6m7T1WjZZMNPvR0I7YA,20257 diff --git a/venv/lib/python3.12/site-packages/click-8.3.1.dist-info/WHEEL b/venv/lib/python3.12/site-packages/click-8.3.1.dist-info/WHEEL new file mode 100644 index 0000000..d8b9936 --- /dev/null +++ b/venv/lib/python3.12/site-packages/click-8.3.1.dist-info/WHEEL @@ -0,0 +1,4 @@ +Wheel-Version: 1.0 +Generator: flit 3.12.0 +Root-Is-Purelib: true +Tag: py3-none-any diff --git a/venv/lib/python3.12/site-packages/click-8.3.1.dist-info/licenses/LICENSE.txt b/venv/lib/python3.12/site-packages/click-8.3.1.dist-info/licenses/LICENSE.txt new file mode 100644 index 0000000..d12a849 --- /dev/null +++ b/venv/lib/python3.12/site-packages/click-8.3.1.dist-info/licenses/LICENSE.txt @@ -0,0 +1,28 @@ +Copyright 2014 Pallets + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/venv/lib/python3.12/site-packages/click/__init__.py b/venv/lib/python3.12/site-packages/click/__init__.py new file mode 100644 index 0000000..1aa547c --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/__init__.py @@ -0,0 +1,123 @@ +""" +Click is a simple Python module inspired by the stdlib optparse to make +writing command line scripts fun. Unlike other modules, it's based +around a simple API that does not come with too much magic and is +composable. +""" + +from __future__ import annotations + +from .core import Argument as Argument +from .core import Command as Command +from .core import CommandCollection as CommandCollection +from .core import Context as Context +from .core import Group as Group +from .core import Option as Option +from .core import Parameter as Parameter +from .decorators import argument as argument +from .decorators import command as command +from .decorators import confirmation_option as confirmation_option +from .decorators import group as group +from .decorators import help_option as help_option +from .decorators import make_pass_decorator as make_pass_decorator +from .decorators import option as option +from .decorators import pass_context as pass_context +from .decorators import pass_obj as pass_obj +from .decorators import password_option as password_option +from .decorators import version_option as version_option +from .exceptions import Abort as Abort +from .exceptions import BadArgumentUsage as BadArgumentUsage +from .exceptions import BadOptionUsage as BadOptionUsage +from .exceptions import BadParameter as BadParameter +from .exceptions import ClickException as ClickException +from .exceptions import FileError as FileError +from .exceptions import MissingParameter as MissingParameter +from .exceptions import NoSuchOption as NoSuchOption +from .exceptions import UsageError as UsageError +from .formatting import HelpFormatter as HelpFormatter +from .formatting import wrap_text as wrap_text +from .globals import get_current_context as get_current_context +from .termui import clear as clear +from .termui import confirm as confirm +from .termui import echo_via_pager as echo_via_pager +from .termui import edit as edit +from .termui import getchar as getchar +from .termui import launch as launch +from .termui import pause as pause +from .termui import progressbar as progressbar +from .termui import prompt as prompt +from .termui import secho as secho +from .termui import style as style +from .termui import unstyle as unstyle +from .types import BOOL as BOOL +from .types import Choice as Choice +from .types import DateTime as DateTime +from .types import File as File +from .types import FLOAT as FLOAT +from .types import FloatRange as FloatRange +from .types import INT as INT +from .types import IntRange as IntRange +from .types import ParamType as ParamType +from .types import Path as Path +from .types import STRING as STRING +from .types import Tuple as Tuple +from .types import UNPROCESSED as UNPROCESSED +from .types import UUID as UUID +from .utils import echo as echo +from .utils import format_filename as format_filename +from .utils import get_app_dir as get_app_dir +from .utils import get_binary_stream as get_binary_stream +from .utils import get_text_stream as get_text_stream +from .utils import open_file as open_file + + +def __getattr__(name: str) -> object: + import warnings + + if name == "BaseCommand": + from .core import _BaseCommand + + warnings.warn( + "'BaseCommand' is deprecated and will be removed in Click 9.0. Use" + " 'Command' instead.", + DeprecationWarning, + stacklevel=2, + ) + return _BaseCommand + + if name == "MultiCommand": + from .core import _MultiCommand + + warnings.warn( + "'MultiCommand' is deprecated and will be removed in Click 9.0. Use" + " 'Group' instead.", + DeprecationWarning, + stacklevel=2, + ) + return _MultiCommand + + if name == "OptionParser": + from .parser import _OptionParser + + warnings.warn( + "'OptionParser' is deprecated and will be removed in Click 9.0. The" + " old parser is available in 'optparse'.", + DeprecationWarning, + stacklevel=2, + ) + return _OptionParser + + if name == "__version__": + import importlib.metadata + import warnings + + warnings.warn( + "The '__version__' attribute is deprecated and will be removed in" + " Click 9.1. Use feature detection or" + " 'importlib.metadata.version(\"click\")' instead.", + DeprecationWarning, + stacklevel=2, + ) + return importlib.metadata.version("click") + + raise AttributeError(name) diff --git a/venv/lib/python3.12/site-packages/click/__pycache__/__init__.cpython-312.pyc b/venv/lib/python3.12/site-packages/click/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..34579a4d2cf28b5cd7e59d44d7430348251e147e GIT binary patch literal 4063 zcmbW4TW=f36~~tn?-x-QUu0XCm1LWuEs>IJ%a$!$*40*;NP;CJ==5Q+$OP=~ahonTHae4Zg? zIRcJ|2y+x16;b9GI3{Auad2G3nG@iINH8bCNs(ku*(oP2(#&aaMr4>X;4aa{+y%~x zEOQpzExMVz!9Ajfxd+@UdYOB{eWH)K4}3(v3 zTwv}8UlbRaFMuzJOUxI+17d*r5_nJyG7o@<#1Qi!cvuWG4}n#oG7sA$&Zrn=R>5Op zjCsVq>|7C7m`ClaPEO>Q$H3!aocS_1FY?S+z}Lhz=BwcA;yQB%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k#Dp4ud?|sa^GZUUd3mANcR8v%s0uQSK*;|IHt0Z56e&SUF$>%s70lT z2g}7JTYP({hu9ih!gml9b*hWpkMzp+CT63Q|j+ zyuSD{P1X!a7fF_+n*@KQDU$M`>?1itLa9)mgVd5{>n+2VlmKNv$pw;&B$r4ANCruU zNQNP`WTObuE2&h;Izraip6!)%+n1x%isEI%sakT3`Y)4QA-PJDBSA4!WS-<2$#s$m zl1Y*Rq!tNKu6|y!vNz=w%_H!u+KBVh`9xBf~V@rEH@X}6^6kGw~bZc u93!zD0RLbdt}A18CC4yQSFYEUL2l+-T`*2EW8^L7IfnfE=yYh9&-)+z|7BhP literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/click/__pycache__/_compat.cpython-312.pyc b/venv/lib/python3.12/site-packages/click/__pycache__/_compat.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..854f6a2cfa96b9dac45eb5c704d24d095e79f4cb GIT binary patch literal 24185 zcmd^ndw5*Ob>F@Fy!*!cLA;hA01_m)e2UbAA_b6yNKpbMk`hVC^m4iPf?RNch3;LD z1iY{zTde>|Hpy5vphU62Mqfo*PQ#@B8a1DjNb2KrKmU=177kX|aLUALoAgUl$e?S5 zPQLVa=05hprR=!r*R&lHGqdxaGiS~@bLPzbp3mpz;P$K;joA-!+>hvo;p|$3U-=s= z$IWn0b0R15ac+q3=Xr`-;+B333#~)8e!HIL=y$L*XTOt$LchR5SHFve?tTwKYur2J z>-Vubwzz*N&>!GA$u$@>I?siJYjSZTCfeWTwRnHU-=mhptW_ym`m02zR4od-(2#|b zguyPO^;{^r%o?>W&c%rjk$?9;ahK?R!QNjdJ}i1(u=UrAyG1X;RTl11PV~LNiGIm3 zxFgrD5qleuCD-4`N(NA}>}`vl)+Fu`9}&yZZZnHjAl4#wiAW#DIS}+Ppn0H8>QcC^hO0sXB* z*od$bVH3jj;z98-u^A;cuviOXT`U$vY-6sMTueM9u13v}ks>~B#0o?439%JzY+?{x z0|>U65Zo;Gi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ti`*wv@mVk@y(WVU zFMomx?Aeg^s4+nGecE*NFN12Tz)mVBk#~-~Ve+0MkN6{dW~Mzu`V#$ok-S&PyGq{I z$@^9EzCqqK@<@VXrW(wgK+`_op|rmxPdj6h$+vFptx5CjOhE@zCQNGrEAe@?5?`ic zUx3Ur?pCYrN`ykPL@Lx+GM=VG@kw4G^8)vVbp}4Awp;E&F8*`M?_f0{`SARoaIHV$ zd_Uxxf55qn|Lz}f6+h%!e#o`oa(OQ|PB$*Pg7dE6Tpd0MIqAqcTrb9-k1sl!<{eG5 zQpV9XY0d8LNpltHs)sUMPu5dCwe|9Y(+{R=Hf21UCk3258&_u=g3F!?-jVgzEL#!Y zf-!>~A*3>2?Xr_%0#{wX?4p>PVpN*x?N@w=t*p26)hlIo-haESmT#Yx7h5*Xw`{u2 z;m1$6_wanx#~k^$AG6r_+S?UwzHDVx0A3sO9Q+}ErNY5K#V=O~JgxxoO;8Gh>$PzE zZWi9MyH@N-UvAZh9N2&%m*YDn2-%Pk>O-a&j?VWjyC~-7Dt0e>DCVWX`zYq87`1@s z_YVI`ImJXCEib!#db0>wvk3KODW*Y!Vs5JFq1d`#uHH(}##gNP4evH$CwTHt>i)9d z&F{{-JC>~oZ@GQTc7zy9pnlm&G2DODF1sj(v6QcPDAvrCS7jSovh}O8_-c@+kLNqH z{UD{PpREo{a6pPi(906)TVNy!|M@?0`K?)>FA`rLd(_3%5PY!dtF7SgYW>8(yAo zrtwrS`|J6#tbgOO72&Ol^~-jIn5LtB#fjL*_j9$I<~Kd^ZYWdpRGO>&5WhC}yn8rP zdo0aW75)NP{mof_3;uuXv~}~ANq@TR;T6utTgVit5%x3qkF2A}@}~WVZ&MbNIsYeJ CHiU8j literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/click/__pycache__/_termui_impl.cpython-312.pyc b/venv/lib/python3.12/site-packages/click/__pycache__/_termui_impl.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..da4ea03b4410dfa52436c1432f8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<6&Ka=AAuS_20TQ1bR?)Q!htpS;x(n$0M(D0MfcQq2>j-#(z&w z*X8qSr|(!$1b^DfBod=s51 zcK|lhJ;hUHlV#6VjPLr`<0BU00(P>eF6CK~*af-?;zNVe>RGI;U#M(NR<_O_NmbsK zIFvP5oHa1NP8PkU*TZNR-Shw0?O$-$CEay1^)H=VXxfx)+H|>U-n}=MPm)#6yXzq* zoY|a~@%a2{9q>;W%k@|l{+A;Vicb4w)^1moAY2U*A zVr}{ETJD#YofLSpT8D%;Yj>8lZ_>ZDNsp+vws`lr^=~^V;cXXBezzX}W$2HzE-&iK-bWrnQw0&~ePjR+C?FLIYi<;DjL3IB^&OuC&_5;}Xt7Jnm`VE^F-ozC z9D*@*C9j~pbpND( zx_J7?v$YGJl}XRa`Q|(Sa>dVEe%6v|Zhs@3^4yo$1%CeXrspFs#4g6>%T_I0+%v^E zVSMZe;O%HgdrLltan;h#sq)XrxgMcDKfTMat6cxfa^tRgGm~?-m?V|L7U~|z-JE#` z#)&1iFQ|i~6wA^-hA(C%1Kz|uezY+EA4&O1=^$p2O-JMv*Q#E(cQ2YykEwr4jZsD7 zR_YP+vCi~UE@(yv># zNv1D$i2X>#e=hPZxVT`#^PlPryy3SFj$iQ`uI59|^C4&dkh6ZsIX>iU%wPNw7x;+t zf5er2#MSmQ$xP$u>;pkyN&#ci8{JnJiT+W^%_UvYlmzr`Ks(O{!yNHr(Jbf zJ@d3}%6aa-NAfHgtyhhdl)YQun#)OV%1Cd@hd0ZHclI&f%vYuzxK%^%x((8M+dlSY zxe))kub=0uJ_Y}bue$cQzMbbiuu@?|@e0mh{?4{@+a@+$(N}zkOH@YJg0UuPtocmG n8$Bc{sLhh^nyD3LB_88BqxVBYQC_YxB^P|xHd>6O>;wHDn%)!q literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/click/__pycache__/_textwrap.cpython-312.pyc b/venv/lib/python3.12/site-packages/click/__pycache__/_textwrap.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bcdd6447f39c5661961832a9249e18f62a1c2374 GIT binary patch literal 2416 zcmaJ@TWcFf6rR0kwYu1{k;)h-%_JCxV%A{OT!MG8C*grP&Jfbx zgqJ}qdIzceJW@THC)H9*vq!9Obu}U8SV?$76^S7M#WXXvV(S^x8U?*MnK5l`)=n#? za$Cd6#uRP>X6q`)c&QE1l*!o=F*jU%IgLhKPR3=*m>GDDLsL1@Do-e;YC!p&4b4RxUh~jPX1XE^gSdyDHKWc*v19qbmxsSQ zvfgpL;NJ{{%7NHgAXaJXT|QlE8z>A{!kvqEi~iMcU*Q_XbBlNDIM{xFY+FqC!6|b%Z5C75{sknx*a(BGc9bfN0wGljBAEv~+>5H3{NR^!y&$j2 z*wJ$Ad?|K*Rg6}|U|H;16T6DjC9!`)?5a)ltcg9#10`{AL+q*YyzkeiH9_d{^`|ag#F0c2UU5}i5iUgmuFjBa-*k0*~lsg7X z9fO6pH$&mY>z~e4BGGarUW&vQh0S2|{gH){VrNlYZeJEwJ73!f4py5WxY~kR+VAHU za>ejx`BkwS(;H({^5YOZw|$0g**7d3-^BDv#mA^<1p&J=Z5*cRajFVfv$NPF{AkA1 z;G3a4CL9Ff6M*L0lFE2;XvC&xnZY-x(@pRipz(1ks8K1&E`cux}7!|LB_#V~PUi;cGJ?xqg0a)*Wm`7E%#dBse(p&Ywvnrsr z?y8p}5rsRdK8pOPrL7vED2V*cTTK)lMMC>i*6+Ev#Q~~P^z2~36Rj7cb>NDEh2F}- z0l-2rWj_feGll^-3H@I&1bZhO6+Ar#B2tRb>w@^*e;aVe)HhRG_8Ca_zQtjOY$!SPBnP| literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/click/__pycache__/_utils.cpython-312.pyc b/venv/lib/python3.12/site-packages/click/__pycache__/_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b95a6761d34101f9130fba99451195757cae0989 GIT binary patch literal 1191 zcmZ`&%}>-o6rbtG?y@WhyMj@JRy@@}3w{7Wf|9VJ3E7bFkNfY9yk#17!Ujd{s&%`6If$n;>jBXPMnf3$9=YwOuqM0Zaf}+yJ(Og<>sZJxRQOV!8P; z5;#$8jd7zil1+dyZH=}V8!5&}#q7TfPF`h3BmG}KRpXm0f-3*w;VO)pP0#ZKGjM#5 z7OcjcLae~k`wZ*=3=C)k)*v)QffexS!q<@h(h|003mcM=tca={rKYhLI39LizRr7L zNeL;omB3eQyvVEyy`i4tabPb6dTAoEMCl^ zuJe7D9X#`v8f`J&1s}v|pbCX^sHtMqgplQ$lp++R5c13tW=P^Y8@)uayGVIK%6UPj zen>2=+wNK~C6;bG1Y3c-rrCH^U&Y?4?m7#4+}k~^|E^A*0QZ(nYsFl`RJUBmTG3G$ zI4++6{~N(&g3!zM`n0sViQgRB&BQu5%69H(+uC7PJ;3!tbE_Cusf#vS*15 z9C{OMRW>VUfWhM%ps9VUb+dI{J_18Oa@P-YJqNj-Drh?vBq$wcKyzkG-BjP@57O7x clSkmekB-ir`R)1YP5q#wuL`n9;Bl>p-vj*>f&c&j literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/click/__pycache__/_winconsole.cpython-312.pyc b/venv/lib/python3.12/site-packages/click/__pycache__/_winconsole.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..afbe98a3ca75bd9c30cb5488577bb5a4c4f79d31 GIT binary patch literal 11761 zcmeHNYj7Lab-oK=fyIj;0Y1TpK#`INNhGbeWb0u{A|*-`sgP6^t)d_xb}4}d0p{*f z5*a9k9nFNQotmCF6&)#!9H)s?Ij!4zT6@wqbvu)KCNmvSP=@fDYL&+M;hFxRO(yZE zKiqTfVgZn19y9&d>5@42+~?lc`OdlL?oZrq2Z856(|EM3k&vHb#CQaq;TA_Mgj^@5 zh(shVMn*Z2c(3G()sEJQbsUkcBTpKWQV6B;XIcnROvlJ` z92;qa*Z^S#ym5`VhP74+d_W9v#6)DDTzZ$&Ym1HYnvuhWmJCi@E3X~tGGc{LY=ZQo zg}A|q&5(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jp5A4rrg?e`oj gGId3tTaswM)aTnr{fu5*k~p*UwLG7xjwkwm2dH6#sQ>@~ literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/click/__pycache__/decorators.cpython-312.pyc b/venv/lib/python3.12/site-packages/click/__pycache__/decorators.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5713d88918197316828b1cf07175b3398c52265d GIT binary patch literal 22128 zcmdUXeQ+GdmEX+Heqt9`e1in|F(5$#OM*-BLnH-}q9{-lX-PCsnIfD0~m z;hqIaz)Ks{$tA2}AHh2-q++RrT-^s*a;}(4>a40<66fMdrILRZ0$g0JsVcZm`Q!dc zL56&Gn1Awn-7~YZiv`8Y$(3Xz&h*Z7zkdDt_514A_;0nfH4?6)TPG45PfF6?(huwM zh=ROw(Je{0Bu&!fq%#pn;cblZ|6d15L7| zyGMI0bW2ax%JFI$Xmv??>u9v}#VToaAIhRUunu+HqkF9{rKc9Q>$I;~r{1p90Vsz` zt*w&QfcJgYuhMhawH`kPHmwP{QEU2f^M@|cVqmkjTWfjKJ)mk&Xsvj51|)4yK(hYR z_G)c!dIq*=E^Xa=vh@~q_G#iQTC=xR^f;<@IonmG$Ftft(4$8?rfmmT zMZiDZPX6I-p3{23Lp!Q|>(?Uqwo^NeMBR-4B#b7LzN@rr3L^@@hzAG2&CdRc`MjyPwV&mgFLk-`Ep2_G} zGk-^G88!UJ*vQ0~p32a-{`A;bETxHJimIXLd4Z)T#!=P#^>G4>SAjDz78}zuI>YNG zKpc!uFa{ul@wC;i}IPG{7O+i7cII@^iQ=89!pL3$CAm|g`}=#)lz?+3+aiJ z7B>Y9Uo{Y*k|Ig+3Q4QCNSL~2q+wZ;-wa)oGj`3aoRh32e^!bpQ|Difu}g*;Q{(99 zLM(nsjT!2dSSpi9ji{Nl%JjINxU8$0i@Iu}t(s`psJPM>M)i1x8Vx6yfr3e(DE}Jg zxS2PS_L~XCUKHMuZ%HmG=PIFQt;Z2LEB%T5FTDvVEB~qdhw@n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%AWQF(XFHLl*CtDEi7btBH>V1ooG5sjG@%km^3+NIrIj5%IkMa;J^9q< z%6bs85i?284SU41|0I7ddDgFZ@P4^Z+IO&`CYY6496M1~bLCKrykq5wI(Y|@13NY^ zDGL4HDAcxzFH7jyV^(R}xa{Lazf|A89N@(osczjeZ-OC)o0n_( V+d9eHz7nS57w439viO@Y{~O2R8fO3i literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/click/__pycache__/exceptions.cpython-312.pyc b/venv/lib/python3.12/site-packages/click/__pycache__/exceptions.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2aaf0286a090c1a05bcd1d32b51822c4fd96d51d GIT binary patch literal 14767 zcmb_jYit|Yb)F%I6h)DuBmgBdhyRZyISry+`uj z5Js9E+;L8-y}?NVx#gi#?`5QwQR_ghms>4r8>2RW8kE~CYCEGgg4!gvThtClZ3eZ) z)^-h}wu0JbqpoGtc2GNP)OC!y2Gq4SYA2(v1GUpOGLcb5P}j@rtub^lY8R;8Hfr~j zBedaH^r0cXP!mZcl3GNIB@^l}uB$G}nkHY>Q1v8?`meC2)HZ{J6o6<~=$~jvIJ-h${;Eo&6vY>>_p8a25|#U<_|VyU;&5rHv&MyZUzQ>{nx&ylpZPy%f19tNqb7MX-GL{HW(v*hBVhK&{+ZRtpBXRXWpVg`fLs1)1{3rLj>)eNJ1NS07=$XHK zcjH3az<;SU@!x1_;X}@XH>SoCsuoE^<$_byl!8FLDF{c<=qeCv5|{z(CeB@T{gOD>N;mJr||I zJPZ-#mk)#TO{|H`jqnmT;*j_er{owBq^b-z%1h20z7dz?kpu|28)p~JRZ_L&mE1R6 zBc2R*l^?0b%GVTXkI-x$H77H@_fSH#rdHI(BAUorh|x$w90TXZWf7&QjwRm`wIo`| zVoH^jKE;h8MJ<-Z1r3(5?-^9S%ircSob_YYG0lAkj5=*G5YK5A>N`D-kK;5;h;i5G2myIF}!1^)GwCvti;yuTyOdR%<8~EPrRIqum^9eBy zo0spQf_dSud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R4u+3HmYT2zL#-=tAff!`BxDv2w^ z>|kuWqruQGRWzgy=vvC4mWxq}^lWFzr5JU!8 z%52}T@^u>DUs6FC=elwG4%MjWr7@Eb+~5kralHl6O9o0JiGyDzja~{G*l#V66pRf& z*NAIMK!%WT6gkc5Z)4PDBed_I;pY^DVUfgv4Zo7a4$6o|Vy!mDa%7pgMh20VQh{M5 z5a?|s z%3s9Yw4XlL669SppJX{8$LqQvp0#XF@gpETAy82M3O5T*q(m2Wd}W+SKh03%New^E z&{M|B*6=1eQmEKW@1)HTN)sbb%E#4rQt~(N>eg43T0zp<=!rL}V6GZ*c&LZc)JIcD zd`FtPLMvSeAbUR!H-vr;)`$J>f|Ck?T)=`Gk$5m)f!7q$Y`X9g{}if_#y)|}M3&Hq zpOD3q7m(Yn{|v>I(qgDHi^^1}|J<8rj)sq%IC|uZCx?&I)GD$S)+WS%4g%nXk)W5-0X;Cnrl&|(w14PuHD8Ttp5ALDH# zkm^68SaR|_{|VRiOK#o2at)tw;wRjiUvfR4aGO8jT0np16ux=z8wWoT*0TSd%Wi>h zUa9Tiy>oA_a5$~(>p^|p3Ww9mFuxHOgDV_PE9dwjo)_n)S2#Ma3_CjcEp!j3l_9>C z-#9n2!r`>i<>oze=@kyAl?FF|nxFU5#c6(}p%&fMQY-ID7tf#IGhbTa=)B_b^4*zz KpK&;`h5ui(7n&IW literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/click/__pycache__/formatting.cpython-312.pyc b/venv/lib/python3.12/site-packages/click/__pycache__/formatting.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..247ef2e1d8d4a13e4bca836f202b7d2f1737ee0d GIT binary patch literal 13663 zcmb_jdvF`adB4K}Af9}J5(!e`k(6Y@q9{w$%X-tMsD~YveH>j=-6NiU59*eF zujG)+CFfy4mMSIJRcn8RlPmm4RgxQRl}3wHZPeC&N;Q(_s;$4u!ky$K?^RAJzhlu> z-Cr&Fqzb^OnXm+EA5dd}&$~mhSUeF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%?LyrS~#-iwhZjR&ZuC1Oa=2&X2zw$=+cXBdR&b71n#?0kqW*dRq0Vn#(LR`tF`hO zG^&tdKc&4x4y9$ePy!o%2HzA4BNKMW8*Gz*L7%u^(>FxF3BksnQ-8w5NGUiG^QHD$)to( zMF!%}*ePwk?DWgeb%l={?>h3-iSA=EiJh{SGFqY_d2FN0jIxqaO7@Y%sJ5Tdl&vC* z_$ee9PrewDWl~nDhj)*Wj~VbV0(OBu8PQ}EgO=VJQu5ILgnIMnpnMOpSeKkaq!8y~ zJpYBMlDGWRc8=fpk6h#5a+UYFhWng&pR4~zuK7M!d!O5UpWAew{2P|cmhT;U{m^|& z+kMOW`G*G^=kf7X44U$#EZH|3o5%Vv7FJ;B~f!qY1PzE>{u zR=#ef(!xLXyYgLp%NHD+-zE5Z^1}JuL4j}of`jur@3$;`^A{Ys57PEVemz^g{}+O_ B_Avke literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/click/__pycache__/shell_completion.cpython-312.pyc b/venv/lib/python3.12/site-packages/click/__pycache__/shell_completion.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0167ab8f59e81593c3bc497f96ea57c52030217f GIT binary patch literal 23328 zcmdsfd2k%pnP2xz_uRk?P68kRHU}VyAqnu7MUZqvfuKZM0u_?FKv9F?bb}ahFaviF zNMbmU5SKOvYxmjp`yaW;rT~xV=>!Fj{6n;FdtEm@T>oo z=eXwP{Q(yDAYRp9#o}JXtNW{2+!wDIsqL@jIrqo> zlS6XFOG1C0jeCTXD_`Pd|C=^_Uj6lQpnsiQ)!!gj_cyZq8syhn`AsaX4r%pD)0=jq z)_Rt@4yg?Vsm(045vffDsVz26aSb0d7c~Et*UQaswOBoEP}VCgO0(ShEqlKtZ%{VM z5>;|@^49#k{yj>1rMs0GZ+=h3%+$Fc;y-D67Z^C=Cyi?wc_m+Ikd`#XY zZ$Vy1K1GkoyX6j~hsJH8J-?x0hWMN}l1L;|kyI?1(E9M(d0t7Sl*_5#02(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_A1_=bvNnn;CA+27VB3xe#tKl(#d&L2+!XV0j*3+;#nSwC bzKzwPcf-aNJH2=8X76RO{jP}LY_I+oDdy3% literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/click/__pycache__/termui.cpython-312.pyc b/venv/lib/python3.12/site-packages/click/__pycache__/termui.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dad0488419a59ad38a785af9fee34b36c5541ce4 GIT binary patch literal 34642 zcmd^odvIGl0{p7&|Zsv(RK(B7bGEp0QUkE zMHbxByE`$Jbz?faiRG-_YBO#|9y^UYNoPFM%yf6#bdsiN;gH^iVL6qvPA2*zE!J`} z8*N{|?>px{z=y2uB!3l_4?f&`&Uaql`Ofz`hksI6SF7N2bjNh+o>@it3H>lX4FXWF zz3Ww!*OVs}UD4IFGN}%$D#5O_YtlXJk+65z%g=nnKK}L(`}sRC9N_Po;aYsV)4|Em zaEQxz(sh${!}Wl@x-Z=@**M(Dupe;Ka1+CUbn|4(a0|mVfWyOKhHKN2$=2akhJ)$0 z$xXwX7!Cn$A8u#34sgeC2gCL0&dJTgn;C8Zyk&Tcsw8Vq-)(l*{x*DQPh)!9q&BRn zii>g`v)`JK-t>+t;Nh<1j^Ukpb8?s7Lg-S89@Zn@R`piB4e2Jm9chQ&iFC8R1?g6O z8&XZ*j7+(8qqbK@v`rW{GoBdvY z-iB90`V0C!$i1gV(SON)r;q6O;^|(D@$=@$+TXfMKce5s=~4YYyY%>EXS9>*GKge-}Kro`LYuKKy?ma%zO2O{s5?8 zpRVgk{Xsmref`??vGt$d=&3%gp9IGJ`h@-v>NsHM)l)XS8q!be52Mt<8_$P+W_3C7 zTTkncIL7jhFTpao0hWyZ=*?px9C~(rO#E(2A9P}K=DcCKuj-FsB<|1+J*Pho=#cJ; zAJ)GD9`gk87(K5~>!lT1ux@i6d6d~S9il}^5m#y@Uk$ALF@EN+z5r{-GoJ;&qe zbbK_OeC|0k>V-WTrRA2hsay&VN2ZMImp#F?vG(VMc{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FLv(vc9fM-+GkCwXu6^JFB_fcmrATKb=u_KDwVf3=zIop9jXG*~SNsG8 zh)LBDR7-?Qxk2E*=FjT@Ns^;y%_i5duy2vrBh0ycYD8j>SlA;L_K1Z&Lf9J#d&I&X zv9MohB1X-PC-kL#2P<`cwV{MzaO0b6z_+Y{Aklt;MEeQC0QGP==8c~>;F+w8-nJ@x z_N}Spu-aIv?XI}-&6VI=Rzi@dgdkA~L820ZFbO-aH30e|uXd;hD)*v-g+Q^kds*rI W!q=>)W$?HvDa9o7%y$#s38WYZpcU literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/click/__pycache__/testing.cpython-312.pyc b/venv/lib/python3.12/site-packages/click/__pycache__/testing.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8bbaa3dc56f6162b56694c18ccd4f5c7b6673521 GIT binary patch literal 27400 zcmdsg32{950S09!zSBffu8*Kdy^z5!z(wsv40gxzdy3nOMIqwr-k??4xGPk? zCsx{1)?UWadt>E273~$GU=bb`WZwlr_P=i7>DwzK_U;`5U&xFWgbC0${nYoy&+|&Ly3gs zh=S<6Cjf;`#UlIrySiA6^FX|(C)6v4wbs#H?H+Nd9S@g<*@e4DE|lH4dxt#DMH%0r@R>MT zaUv;4d&BB?SygDr@hmO{SshYhO6XuOC`eiGMBTzJnck@=A_zl5v!(5Dvo+)Bi1zmN zC(&>5{v-$bLj8$|jCZy~B-WL&^8^n5K0%+CBQymxDG^OjACXfkqdAI2+mI+EBFjzz;~Hzgwp8lPa_ zP{!4Pszj3=9m6H&_6D`+N_;p`hTy!AF0C51jeFB&HMsfGW!0m$FZ-6LnPI(!c(CDT z>Yb$C7b&6JoQ^W$N{Jfcoe*9V+nOyI=jjL#E~zN_c>S71DZ(uy4kjqGBq^oz=2TCWBmtVN_!nJ)ffyOCUqf(Cetcp_~vx=Vta9KcgabI~Q zs&Y4@Tcvd7^k|yecoEG!At=ChU#y+56c$(EVT9k8HjkI?}fP%w?+0CQ4 zdSp&W2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3JqHPUi_E z6dS$$E(OHdDbV2x%r$~LJCG#|f4%4F#}2`N;?RLdTH7ARQPnKxnTX8J7si*N;8Pee zAtpt+LBU}Po~Gak1y3SCIgrQn11y)QWW<2?!S9C}8o;iIvl0<;NC>Sc{RhR4o#;T$nFP6ZMxjT-vZK0Q{t} zOsxJ$K(M?mPpq7*=YLXUS-`_$eSuh$_TrdBy6?E3-52bEB|Dx!X?jEyw|yi~_{p=D OXYFFe#{z{6cm6M+V>=fB literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/click/__pycache__/types.cpython-312.pyc b/venv/lib/python3.12/site-packages/click/__pycache__/types.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..20de277a3457bdd5e272f4744f42125623055476 GIT binary patch literal 50029 zcmeIb3wT@CeJ6M?UIYk`011F^QqY@}DC%uVv?S{-OO`2HlAW54hJ*l6fqX!yRVNn>DbZE z?(FaXKlcR?RFcWG{l3|~67M}Y_uTV7|M&TyzpAJxmvB9_d@%mm%aZhO=!bTdiGV!! zq*aoxOHnB*_e%qEw=7fG(r+2CcH7jjz1z-lj&27(%eu?>>Fjp$)74#$r?uZb;O=(w zH@1GyfTz2H!*+x#yDJfPM9ccU1HNt_hn)ylbysoN)n7f}@Ah-Jygx7y><)6+jc`qO z4Tn7l*LK&+Qmp*^2CW&!Q>o#))ORyA{~~ZRnJS&>NhQF+%k^yBQ6kI_9l9cuI}X=8$@i4DRu?N)*`mf z6uXjR>k->vie1IAjficEEkn(^M9$`WY-v4yzG)M2-L3pZGrnjs<?5fz>Si4@{I*wnB_*PTu4vuX@>>8x*&{MDH__c^{ zH`QYU$F4(chbeX=$F4{022<>&=!4OX&)d2;^V>~$yV>-13&(Cj?AF+Fy+vE2JEOaz z4?J)0egNaU@=dk-y0_uiD*e}X{A$;K?ZB@N{Z}V`ZP0%`h+iA^Upu+XZ76d)Mkr$* z8xfA~_+F>p1G|STZM*-5UbM-1cQ}zqro-uYGLh=SZ)Y@|j-}%RF@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-7JuUMRp7ZDA9dh%>T^7l^JXg8msvAB=%jNu*ub9;p-R1FWe0NT*41t-v2LB!XUW- literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/click/__pycache__/utils.cpython-312.pyc b/venv/lib/python3.12/site-packages/click/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..356e1ad5e3d6cc275a628e076e86e40abc9003b2 GIT binary patch literal 24870 zcmc(Hd2k%pnP2zZ7w(GyL9%%QLjnUyq$CQasDKA}m;x!0vLr}apgBDt1{}=5-2;+< z2Ubr zB~8-ggfu93%QA%>3CEzb+hvB`-ENNabbI*g?e_B5*X_sGnFtI9yMvt9l?V-%beC}0 zjc{pqDZ(DjnH#Qu6LdJG%KXFYfZ0tx*r^Igg^HSnuxHR4XVjxDy^pDsie_$L(Y~C4{2&T z)^k}`hlXN0as-}CX~T)wxsjn5ewCcl)oARz8ofvnzo4~3Y;}(o>r;ml>7I1#O1j5L zYcZY5u8&U*rx9P((-%)_J?G;|RUbiH@iaG8sSc-8+;mT0O7BsVMjV+-&1^$!Rt?T)PjsPVjUF>niA%AbXexmQ%|T@4 zGg~vbbl(jH}c>^Z3gDKbqH&xUWgfO(L_9Yv28dVPZ*J*k*vRG zC}qU2#QR3{O;kVr40?@Ai^0;X`zQBL9hp9P?d0317J^%E2b<=DO$)*BoGZM7JW}z= zYDUWIG+mAfsZZAA*Fs}*+Mc+KJSkb=jDb5xA9xl(XDF)DH=K+TL@Gu~N%yO1C7xD{ z%W49%U?{OG(by2fYa~idTMtd^7Fwcx2>eTV8k^H0O*%4CT*}Dr%YP)Fm9|T1E4Q>m z(w(yOyfh+RmaaITmoCdUWC98QQLBDh1XaIaWIY!z^VdcFGH8hvWn6E>H|sU`$!NWy z_Qj&;V&p&~g|BfiVkR{qpV5lfZ^osZ!|AX1q^fSFdakN@wsyX%c`nrao29Z1zmjBs z#bT&@v8*cRM(~~yLWwVXgVLM+I_JNV>zrYaz8z7co-+~ZjJ|_@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Kn z!}$oB1isOWO_>&IGcRwn+~dyTQXe3VFZuM6`ynVYoMzG^d7wc%po+1) z8xl-+Np_+kWdnk2yj|A;OVdhpMgYlrDj|eI+}uI^q3b;C5#eayGPV=j`xr^rxAc=Y`^4gSPq274=_TOjeawqR=Uh&I{U@~zGkdQ`Zq+_EaqO2qT;>56b-G1i%J|A@IH_~+ z@{dDXa$C?sZX2#%8$bD*yA_1!amO274q3lgyWx#vbRlH@J%e%U7w#y8*q!){mZu|!p$H)ueBn%s^7KnA8jjYji8fERzl36YQH$D#OL#^GxJv|sB=%_ydWX!q457CtfeZ#mb7gr+a#4BXWaK;4Z^Tn0IxKjb!7%zCgosSAU z@efp68)fy76HoF2bAVYt`-TEu44wFmtec!%4W0bIbT37Caji6TkLiNrGGx!>BQJbf zK={=Wi5CZA*q6GJixTF7?*$*3!KK^JpE=rd`1sMopFh!cEL$OZ0b~NKMD!O(D~(G< z&d@b~XNO`@y_)MdhyHv4hjB>s7HWRdHSQuHsAul^4hSatp#D$DM{Jl;1+)ePBFlHAZT~23{)y!0|AC)Km3O2accjKU z(w2Xe!guI@^Bt+_j3aQ%SD*NaYumD~dctuvG#Q#Y zyWp!I?^t$~jCZ_#;*}E<(Jyz6%Q%uP?_Ti*6*< zN3E>qf#pDB&P@R@ss56jmxDgsB$4xT z5En1ii6Zd6@B~&$D0ZdG>6fc>jZ&ksSid#rt(12x1|G;c@m((6kaOdU>PqT31-=-b z(iK0&MWl-A#f@7~X0f6cH~8jCB67)M>5iNe-{n9_&W$fhmeuFH6vEvWbvZwU0#dLn z7o<=KSBY}DT&d)#SSh18xK`FQw*0pOwy`MV5Fn;Y>tcsW+q;(96c`Io^5<+4RgmJ?spitczR YB&Lc&0o;R{qg*smWp_&uVlMvw0(JS<&;S4c literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/click/_compat.py b/venv/lib/python3.12/site-packages/click/_compat.py new file mode 100644 index 0000000..f2726b9 --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/_compat.py @@ -0,0 +1,622 @@ +from __future__ import annotations + +import codecs +import collections.abc as cabc +import io +import os +import re +import sys +import typing as t +from types import TracebackType +from weakref import WeakKeyDictionary + +CYGWIN = sys.platform.startswith("cygwin") +WIN = sys.platform.startswith("win") +auto_wrap_for_ansi: t.Callable[[t.TextIO], t.TextIO] | None = None +_ansi_re = re.compile(r"\033\[[;?0-9]*[a-zA-Z]") + + +def _make_text_stream( + stream: t.BinaryIO, + encoding: str | None, + errors: str | None, + force_readable: bool = False, + force_writable: bool = False, +) -> t.TextIO: + if encoding is None: + encoding = get_best_encoding(stream) + if errors is None: + errors = "replace" + return _NonClosingTextIOWrapper( + stream, + encoding, + errors, + line_buffering=True, + force_readable=force_readable, + force_writable=force_writable, + ) + + +def is_ascii_encoding(encoding: str) -> bool: + """Checks if a given encoding is ascii.""" + try: + return codecs.lookup(encoding).name == "ascii" + except LookupError: + return False + + +def get_best_encoding(stream: t.IO[t.Any]) -> str: + """Returns the default stream encoding if not found.""" + rv = getattr(stream, "encoding", None) or sys.getdefaultencoding() + if is_ascii_encoding(rv): + return "utf-8" + return rv + + +class _NonClosingTextIOWrapper(io.TextIOWrapper): + def __init__( + self, + stream: t.BinaryIO, + encoding: str | None, + errors: str | None, + force_readable: bool = False, + force_writable: bool = False, + **extra: t.Any, + ) -> None: + self._stream = stream = t.cast( + t.BinaryIO, _FixupStream(stream, force_readable, force_writable) + ) + super().__init__(stream, encoding, errors, **extra) + + def __del__(self) -> None: + try: + self.detach() + except Exception: + pass + + def isatty(self) -> bool: + # https://bitbucket.org/pypy/pypy/issue/1803 + return self._stream.isatty() + + +class _FixupStream: + """The new io interface needs more from streams than streams + traditionally implement. As such, this fix-up code is necessary in + some circumstances. + + The forcing of readable and writable flags are there because some tools + put badly patched objects on sys (one such offender are certain version + of jupyter notebook). + """ + + def __init__( + self, + stream: t.BinaryIO, + force_readable: bool = False, + force_writable: bool = False, + ): + self._stream = stream + self._force_readable = force_readable + self._force_writable = force_writable + + def __getattr__(self, name: str) -> t.Any: + return getattr(self._stream, name) + + def read1(self, size: int) -> bytes: + f = getattr(self._stream, "read1", None) + + if f is not None: + return t.cast(bytes, f(size)) + + return self._stream.read(size) + + def readable(self) -> bool: + if self._force_readable: + return True + x = getattr(self._stream, "readable", None) + if x is not None: + return t.cast(bool, x()) + try: + self._stream.read(0) + except Exception: + return False + return True + + def writable(self) -> bool: + if self._force_writable: + return True + x = getattr(self._stream, "writable", None) + if x is not None: + return t.cast(bool, x()) + try: + self._stream.write(b"") + except Exception: + try: + self._stream.write(b"") + except Exception: + return False + return True + + def seekable(self) -> bool: + x = getattr(self._stream, "seekable", None) + if x is not None: + return t.cast(bool, x()) + try: + self._stream.seek(self._stream.tell()) + except Exception: + return False + return True + + +def _is_binary_reader(stream: t.IO[t.Any], default: bool = False) -> bool: + try: + return isinstance(stream.read(0), bytes) + except Exception: + return default + # This happens in some cases where the stream was already + # closed. In this case, we assume the default. + + +def _is_binary_writer(stream: t.IO[t.Any], default: bool = False) -> bool: + try: + stream.write(b"") + except Exception: + try: + stream.write("") + return False + except Exception: + pass + return default + return True + + +def _find_binary_reader(stream: t.IO[t.Any]) -> t.BinaryIO | None: + # We need to figure out if the given stream is already binary. + # This can happen because the official docs recommend detaching + # the streams to get binary streams. Some code might do this, so + # we need to deal with this case explicitly. + if _is_binary_reader(stream, False): + return t.cast(t.BinaryIO, stream) + + buf = getattr(stream, "buffer", None) + + # Same situation here; this time we assume that the buffer is + # actually binary in case it's closed. + if buf is not None and _is_binary_reader(buf, True): + return t.cast(t.BinaryIO, buf) + + return None + + +def _find_binary_writer(stream: t.IO[t.Any]) -> t.BinaryIO | None: + # We need to figure out if the given stream is already binary. + # This can happen because the official docs recommend detaching + # the streams to get binary streams. Some code might do this, so + # we need to deal with this case explicitly. + if _is_binary_writer(stream, False): + return t.cast(t.BinaryIO, stream) + + buf = getattr(stream, "buffer", None) + + # Same situation here; this time we assume that the buffer is + # actually binary in case it's closed. + if buf is not None and _is_binary_writer(buf, True): + return t.cast(t.BinaryIO, buf) + + return None + + +def _stream_is_misconfigured(stream: t.TextIO) -> bool: + """A stream is misconfigured if its encoding is ASCII.""" + # If the stream does not have an encoding set, we assume it's set + # to ASCII. This appears to happen in certain unittest + # environments. It's not quite clear what the correct behavior is + # but this at least will force Click to recover somehow. + return is_ascii_encoding(getattr(stream, "encoding", None) or "ascii") + + +def _is_compat_stream_attr(stream: t.TextIO, attr: str, value: str | None) -> bool: + """A stream attribute is compatible if it is equal to the + desired value or the desired value is unset and the attribute + has a value. + """ + stream_value = getattr(stream, attr, None) + return stream_value == value or (value is None and stream_value is not None) + + +def _is_compatible_text_stream( + stream: t.TextIO, encoding: str | None, errors: str | None +) -> bool: + """Check if a stream's encoding and errors attributes are + compatible with the desired values. + """ + return _is_compat_stream_attr( + stream, "encoding", encoding + ) and _is_compat_stream_attr(stream, "errors", errors) + + +def _force_correct_text_stream( + text_stream: t.IO[t.Any], + encoding: str | None, + errors: str | None, + is_binary: t.Callable[[t.IO[t.Any], bool], bool], + find_binary: t.Callable[[t.IO[t.Any]], t.BinaryIO | None], + force_readable: bool = False, + force_writable: bool = False, +) -> t.TextIO: + if is_binary(text_stream, False): + binary_reader = t.cast(t.BinaryIO, text_stream) + else: + text_stream = t.cast(t.TextIO, text_stream) + # If the stream looks compatible, and won't default to a + # misconfigured ascii encoding, return it as-is. + if _is_compatible_text_stream(text_stream, encoding, errors) and not ( + encoding is None and _stream_is_misconfigured(text_stream) + ): + return text_stream + + # Otherwise, get the underlying binary reader. + possible_binary_reader = find_binary(text_stream) + + # If that's not possible, silently use the original reader + # and get mojibake instead of exceptions. + if possible_binary_reader is None: + return text_stream + + binary_reader = possible_binary_reader + + # Default errors to replace instead of strict in order to get + # something that works. + if errors is None: + errors = "replace" + + # Wrap the binary stream in a text stream with the correct + # encoding parameters. + return _make_text_stream( + binary_reader, + encoding, + errors, + force_readable=force_readable, + force_writable=force_writable, + ) + + +def _force_correct_text_reader( + text_reader: t.IO[t.Any], + encoding: str | None, + errors: str | None, + force_readable: bool = False, +) -> t.TextIO: + return _force_correct_text_stream( + text_reader, + encoding, + errors, + _is_binary_reader, + _find_binary_reader, + force_readable=force_readable, + ) + + +def _force_correct_text_writer( + text_writer: t.IO[t.Any], + encoding: str | None, + errors: str | None, + force_writable: bool = False, +) -> t.TextIO: + return _force_correct_text_stream( + text_writer, + encoding, + errors, + _is_binary_writer, + _find_binary_writer, + force_writable=force_writable, + ) + + +def get_binary_stdin() -> t.BinaryIO: + reader = _find_binary_reader(sys.stdin) + if reader is None: + raise RuntimeError("Was not able to determine binary stream for sys.stdin.") + return reader + + +def get_binary_stdout() -> t.BinaryIO: + writer = _find_binary_writer(sys.stdout) + if writer is None: + raise RuntimeError("Was not able to determine binary stream for sys.stdout.") + return writer + + +def get_binary_stderr() -> t.BinaryIO: + writer = _find_binary_writer(sys.stderr) + if writer is None: + raise RuntimeError("Was not able to determine binary stream for sys.stderr.") + return writer + + +def get_text_stdin(encoding: str | None = None, errors: str | None = None) -> t.TextIO: + rv = _get_windows_console_stream(sys.stdin, encoding, errors) + if rv is not None: + return rv + return _force_correct_text_reader(sys.stdin, encoding, errors, force_readable=True) + + +def get_text_stdout(encoding: str | None = None, errors: str | None = None) -> t.TextIO: + rv = _get_windows_console_stream(sys.stdout, encoding, errors) + if rv is not None: + return rv + return _force_correct_text_writer(sys.stdout, encoding, errors, force_writable=True) + + +def get_text_stderr(encoding: str | None = None, errors: str | None = None) -> t.TextIO: + rv = _get_windows_console_stream(sys.stderr, encoding, errors) + if rv is not None: + return rv + return _force_correct_text_writer(sys.stderr, encoding, errors, force_writable=True) + + +def _wrap_io_open( + file: str | os.PathLike[str] | int, + mode: str, + encoding: str | None, + errors: str | None, +) -> t.IO[t.Any]: + """Handles not passing ``encoding`` and ``errors`` in binary mode.""" + if "b" in mode: + return open(file, mode) + + return open(file, mode, encoding=encoding, errors=errors) + + +def open_stream( + filename: str | os.PathLike[str], + mode: str = "r", + encoding: str | None = None, + errors: str | None = "strict", + atomic: bool = False, +) -> tuple[t.IO[t.Any], bool]: + binary = "b" in mode + filename = os.fspath(filename) + + # Standard streams first. These are simple because they ignore the + # atomic flag. Use fsdecode to handle Path("-"). + if os.fsdecode(filename) == "-": + if any(m in mode for m in ["w", "a", "x"]): + if binary: + return get_binary_stdout(), False + return get_text_stdout(encoding=encoding, errors=errors), False + if binary: + return get_binary_stdin(), False + return get_text_stdin(encoding=encoding, errors=errors), False + + # Non-atomic writes directly go out through the regular open functions. + if not atomic: + return _wrap_io_open(filename, mode, encoding, errors), True + + # Some usability stuff for atomic writes + if "a" in mode: + raise ValueError( + "Appending to an existing file is not supported, because that" + " would involve an expensive `copy`-operation to a temporary" + " file. Open the file in normal `w`-mode and copy explicitly" + " if that's what you're after." + ) + if "x" in mode: + raise ValueError("Use the `overwrite`-parameter instead.") + if "w" not in mode: + raise ValueError("Atomic writes only make sense with `w`-mode.") + + # Atomic writes are more complicated. They work by opening a file + # as a proxy in the same folder and then using the fdopen + # functionality to wrap it in a Python file. Then we wrap it in an + # atomic file that moves the file over on close. + import errno + import random + + try: + perm: int | None = os.stat(filename).st_mode + except OSError: + perm = None + + flags = os.O_RDWR | os.O_CREAT | os.O_EXCL + + if binary: + flags |= getattr(os, "O_BINARY", 0) + + while True: + tmp_filename = os.path.join( + os.path.dirname(filename), + f".__atomic-write{random.randrange(1 << 32):08x}", + ) + try: + fd = os.open(tmp_filename, flags, 0o666 if perm is None else perm) + break + except OSError as e: + if e.errno == errno.EEXIST or ( + os.name == "nt" + and e.errno == errno.EACCES + and os.path.isdir(e.filename) + and os.access(e.filename, os.W_OK) + ): + continue + raise + + if perm is not None: + os.chmod(tmp_filename, perm) # in case perm includes bits in umask + + f = _wrap_io_open(fd, mode, encoding, errors) + af = _AtomicFile(f, tmp_filename, os.path.realpath(filename)) + return t.cast(t.IO[t.Any], af), True + + +class _AtomicFile: + def __init__(self, f: t.IO[t.Any], tmp_filename: str, real_filename: str) -> None: + self._f = f + self._tmp_filename = tmp_filename + self._real_filename = real_filename + self.closed = False + + @property + def name(self) -> str: + return self._real_filename + + def close(self, delete: bool = False) -> None: + if self.closed: + return + self._f.close() + os.replace(self._tmp_filename, self._real_filename) + self.closed = True + + def __getattr__(self, name: str) -> t.Any: + return getattr(self._f, name) + + def __enter__(self) -> _AtomicFile: + return self + + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_value: BaseException | None, + tb: TracebackType | None, + ) -> None: + self.close(delete=exc_type is not None) + + def __repr__(self) -> str: + return repr(self._f) + + +def strip_ansi(value: str) -> str: + return _ansi_re.sub("", value) + + +def _is_jupyter_kernel_output(stream: t.IO[t.Any]) -> bool: + while isinstance(stream, (_FixupStream, _NonClosingTextIOWrapper)): + stream = stream._stream + + return stream.__class__.__module__.startswith("ipykernel.") + + +def should_strip_ansi( + stream: t.IO[t.Any] | None = None, color: bool | None = None +) -> bool: + if color is None: + if stream is None: + stream = sys.stdin + return not isatty(stream) and not _is_jupyter_kernel_output(stream) + return not color + + +# On Windows, wrap the output streams with colorama to support ANSI +# color codes. +# NOTE: double check is needed so mypy does not analyze this on Linux +if sys.platform.startswith("win") and WIN: + from ._winconsole import _get_windows_console_stream + + def _get_argv_encoding() -> str: + import locale + + return locale.getpreferredencoding() + + _ansi_stream_wrappers: cabc.MutableMapping[t.TextIO, t.TextIO] = WeakKeyDictionary() + + def auto_wrap_for_ansi(stream: t.TextIO, color: bool | None = None) -> t.TextIO: + """Support ANSI color and style codes on Windows by wrapping a + stream with colorama. + """ + try: + cached = _ansi_stream_wrappers.get(stream) + except Exception: + cached = None + + if cached is not None: + return cached + + import colorama + + strip = should_strip_ansi(stream, color) + ansi_wrapper = colorama.AnsiToWin32(stream, strip=strip) + rv = t.cast(t.TextIO, ansi_wrapper.stream) + _write = rv.write + + def _safe_write(s: str) -> int: + try: + return _write(s) + except BaseException: + ansi_wrapper.reset_all() + raise + + rv.write = _safe_write # type: ignore[method-assign] + + try: + _ansi_stream_wrappers[stream] = rv + except Exception: + pass + + return rv + +else: + + def _get_argv_encoding() -> str: + return getattr(sys.stdin, "encoding", None) or sys.getfilesystemencoding() + + def _get_windows_console_stream( + f: t.TextIO, encoding: str | None, errors: str | None + ) -> t.TextIO | None: + return None + + +def term_len(x: str) -> int: + return len(strip_ansi(x)) + + +def isatty(stream: t.IO[t.Any]) -> bool: + try: + return stream.isatty() + except Exception: + return False + + +def _make_cached_stream_func( + src_func: t.Callable[[], t.TextIO | None], + wrapper_func: t.Callable[[], t.TextIO], +) -> t.Callable[[], t.TextIO | None]: + cache: cabc.MutableMapping[t.TextIO, t.TextIO] = WeakKeyDictionary() + + def func() -> t.TextIO | None: + stream = src_func() + + if stream is None: + return None + + try: + rv = cache.get(stream) + except Exception: + rv = None + if rv is not None: + return rv + rv = wrapper_func() + try: + cache[stream] = rv + except Exception: + pass + return rv + + return func + + +_default_text_stdin = _make_cached_stream_func(lambda: sys.stdin, get_text_stdin) +_default_text_stdout = _make_cached_stream_func(lambda: sys.stdout, get_text_stdout) +_default_text_stderr = _make_cached_stream_func(lambda: sys.stderr, get_text_stderr) + + +binary_streams: cabc.Mapping[str, t.Callable[[], t.BinaryIO]] = { + "stdin": get_binary_stdin, + "stdout": get_binary_stdout, + "stderr": get_binary_stderr, +} + +text_streams: cabc.Mapping[str, t.Callable[[str | None, str | None], t.TextIO]] = { + "stdin": get_text_stdin, + "stdout": get_text_stdout, + "stderr": get_text_stderr, +} diff --git a/venv/lib/python3.12/site-packages/click/_termui_impl.py b/venv/lib/python3.12/site-packages/click/_termui_impl.py new file mode 100644 index 0000000..ee8225c --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/_termui_impl.py @@ -0,0 +1,852 @@ +""" +This module contains implementations for the termui module. To keep the +import time of Click down, some infrequently used functionality is +placed in this module and only imported as needed. +""" + +from __future__ import annotations + +import collections.abc as cabc +import contextlib +import math +import os +import shlex +import sys +import time +import typing as t +from gettext import gettext as _ +from io import StringIO +from pathlib import Path +from types import TracebackType + +from ._compat import _default_text_stdout +from ._compat import CYGWIN +from ._compat import get_best_encoding +from ._compat import isatty +from ._compat import open_stream +from ._compat import strip_ansi +from ._compat import term_len +from ._compat import WIN +from .exceptions import ClickException +from .utils import echo + +V = t.TypeVar("V") + +if os.name == "nt": + BEFORE_BAR = "\r" + AFTER_BAR = "\n" +else: + BEFORE_BAR = "\r\033[?25l" + AFTER_BAR = "\033[?25h\n" + + +class ProgressBar(t.Generic[V]): + def __init__( + self, + iterable: cabc.Iterable[V] | None, + length: int | None = None, + fill_char: str = "#", + empty_char: str = " ", + bar_template: str = "%(bar)s", + info_sep: str = " ", + hidden: bool = False, + show_eta: bool = True, + show_percent: bool | None = None, + show_pos: bool = False, + item_show_func: t.Callable[[V | None], str | None] | None = None, + label: str | None = None, + file: t.TextIO | None = None, + color: bool | None = None, + update_min_steps: int = 1, + width: int = 30, + ) -> None: + self.fill_char = fill_char + self.empty_char = empty_char + self.bar_template = bar_template + self.info_sep = info_sep + self.hidden = hidden + self.show_eta = show_eta + self.show_percent = show_percent + self.show_pos = show_pos + self.item_show_func = item_show_func + self.label: str = label or "" + + if file is None: + file = _default_text_stdout() + + # There are no standard streams attached to write to. For example, + # pythonw on Windows. + if file is None: + file = StringIO() + + self.file = file + self.color = color + self.update_min_steps = update_min_steps + self._completed_intervals = 0 + self.width: int = width + self.autowidth: bool = width == 0 + + if length is None: + from operator import length_hint + + length = length_hint(iterable, -1) + + if length == -1: + length = None + if iterable is None: + if length is None: + raise TypeError("iterable or length is required") + iterable = t.cast("cabc.Iterable[V]", range(length)) + self.iter: cabc.Iterable[V] = iter(iterable) + self.length = length + self.pos: int = 0 + self.avg: list[float] = [] + self.last_eta: float + self.start: float + self.start = self.last_eta = time.time() + self.eta_known: bool = False + self.finished: bool = False + self.max_width: int | None = None + self.entered: bool = False + self.current_item: V | None = None + self._is_atty = isatty(self.file) + self._last_line: str | None = None + + def __enter__(self) -> ProgressBar[V]: + self.entered = True + self.render_progress() + return self + + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_value: BaseException | None, + tb: TracebackType | None, + ) -> None: + self.render_finish() + + def __iter__(self) -> cabc.Iterator[V]: + if not self.entered: + raise RuntimeError("You need to use progress bars in a with block.") + self.render_progress() + return self.generator() + + def __next__(self) -> V: + # Iteration is defined in terms of a generator function, + # returned by iter(self); use that to define next(). This works + # because `self.iter` is an iterable consumed by that generator, + # so it is re-entry safe. Calling `next(self.generator())` + # twice works and does "what you want". + return next(iter(self)) + + def render_finish(self) -> None: + if self.hidden or not self._is_atty: + return + self.file.write(AFTER_BAR) + self.file.flush() + + @property + def pct(self) -> float: + if self.finished: + return 1.0 + return min(self.pos / (float(self.length or 1) or 1), 1.0) + + @property + def time_per_iteration(self) -> float: + if not self.avg: + return 0.0 + return sum(self.avg) / float(len(self.avg)) + + @property + def eta(self) -> float: + if self.length is not None and not self.finished: + return self.time_per_iteration * (self.length - self.pos) + return 0.0 + + def format_eta(self) -> str: + if self.eta_known: + t = int(self.eta) + seconds = t % 60 + t //= 60 + minutes = t % 60 + t //= 60 + hours = t % 24 + t //= 24 + if t > 0: + return f"{t}d {hours:02}:{minutes:02}:{seconds:02}" + else: + return f"{hours:02}:{minutes:02}:{seconds:02}" + return "" + + def format_pos(self) -> str: + pos = str(self.pos) + if self.length is not None: + pos += f"/{self.length}" + return pos + + def format_pct(self) -> str: + return f"{int(self.pct * 100): 4}%"[1:] + + def format_bar(self) -> str: + if self.length is not None: + bar_length = int(self.pct * self.width) + bar = self.fill_char * bar_length + bar += self.empty_char * (self.width - bar_length) + elif self.finished: + bar = self.fill_char * self.width + else: + chars = list(self.empty_char * (self.width or 1)) + if self.time_per_iteration != 0: + chars[ + int( + (math.cos(self.pos * self.time_per_iteration) / 2.0 + 0.5) + * self.width + ) + ] = self.fill_char + bar = "".join(chars) + return bar + + def format_progress_line(self) -> str: + show_percent = self.show_percent + + info_bits = [] + if self.length is not None and show_percent is None: + show_percent = not self.show_pos + + if self.show_pos: + info_bits.append(self.format_pos()) + if show_percent: + info_bits.append(self.format_pct()) + if self.show_eta and self.eta_known and not self.finished: + info_bits.append(self.format_eta()) + if self.item_show_func is not None: + item_info = self.item_show_func(self.current_item) + if item_info is not None: + info_bits.append(item_info) + + return ( + self.bar_template + % { + "label": self.label, + "bar": self.format_bar(), + "info": self.info_sep.join(info_bits), + } + ).rstrip() + + def render_progress(self) -> None: + if self.hidden: + return + + if not self._is_atty: + # Only output the label once if the output is not a TTY. + if self._last_line != self.label: + self._last_line = self.label + echo(self.label, file=self.file, color=self.color) + return + + buf = [] + # Update width in case the terminal has been resized + if self.autowidth: + import shutil + + old_width = self.width + self.width = 0 + clutter_length = term_len(self.format_progress_line()) + new_width = max(0, shutil.get_terminal_size().columns - clutter_length) + if new_width < old_width and self.max_width is not None: + buf.append(BEFORE_BAR) + buf.append(" " * self.max_width) + self.max_width = new_width + self.width = new_width + + clear_width = self.width + if self.max_width is not None: + clear_width = self.max_width + + buf.append(BEFORE_BAR) + line = self.format_progress_line() + line_len = term_len(line) + if self.max_width is None or self.max_width < line_len: + self.max_width = line_len + + buf.append(line) + buf.append(" " * (clear_width - line_len)) + line = "".join(buf) + # Render the line only if it changed. + + if line != self._last_line: + self._last_line = line + echo(line, file=self.file, color=self.color, nl=False) + self.file.flush() + + def make_step(self, n_steps: int) -> None: + self.pos += n_steps + if self.length is not None and self.pos >= self.length: + self.finished = True + + if (time.time() - self.last_eta) < 1.0: + return + + self.last_eta = time.time() + + # self.avg is a rolling list of length <= 7 of steps where steps are + # defined as time elapsed divided by the total progress through + # self.length. + if self.pos: + step = (time.time() - self.start) / self.pos + else: + step = time.time() - self.start + + self.avg = self.avg[-6:] + [step] + + self.eta_known = self.length is not None + + def update(self, n_steps: int, current_item: V | None = None) -> None: + """Update the progress bar by advancing a specified number of + steps, and optionally set the ``current_item`` for this new + position. + + :param n_steps: Number of steps to advance. + :param current_item: Optional item to set as ``current_item`` + for the updated position. + + .. versionchanged:: 8.0 + Added the ``current_item`` optional parameter. + + .. versionchanged:: 8.0 + Only render when the number of steps meets the + ``update_min_steps`` threshold. + """ + if current_item is not None: + self.current_item = current_item + + self._completed_intervals += n_steps + + if self._completed_intervals >= self.update_min_steps: + self.make_step(self._completed_intervals) + self.render_progress() + self._completed_intervals = 0 + + def finish(self) -> None: + self.eta_known = False + self.current_item = None + self.finished = True + + def generator(self) -> cabc.Iterator[V]: + """Return a generator which yields the items added to the bar + during construction, and updates the progress bar *after* the + yielded block returns. + """ + # WARNING: the iterator interface for `ProgressBar` relies on + # this and only works because this is a simple generator which + # doesn't create or manage additional state. If this function + # changes, the impact should be evaluated both against + # `iter(bar)` and `next(bar)`. `next()` in particular may call + # `self.generator()` repeatedly, and this must remain safe in + # order for that interface to work. + if not self.entered: + raise RuntimeError("You need to use progress bars in a with block.") + + if not self._is_atty: + yield from self.iter + else: + for rv in self.iter: + self.current_item = rv + + # This allows show_item_func to be updated before the + # item is processed. Only trigger at the beginning of + # the update interval. + if self._completed_intervals == 0: + self.render_progress() + + yield rv + self.update(1) + + self.finish() + self.render_progress() + + +def pager(generator: cabc.Iterable[str], color: bool | None = None) -> None: + """Decide what method to use for paging through text.""" + stdout = _default_text_stdout() + + # There are no standard streams attached to write to. For example, + # pythonw on Windows. + if stdout is None: + stdout = StringIO() + + if not isatty(sys.stdin) or not isatty(stdout): + return _nullpager(stdout, generator, color) + + # Split and normalize the pager command into parts. + pager_cmd_parts = shlex.split(os.environ.get("PAGER", ""), posix=False) + if pager_cmd_parts: + if WIN: + if _tempfilepager(generator, pager_cmd_parts, color): + return + elif _pipepager(generator, pager_cmd_parts, color): + return + + if os.environ.get("TERM") in ("dumb", "emacs"): + return _nullpager(stdout, generator, color) + if (WIN or sys.platform.startswith("os2")) and _tempfilepager( + generator, ["more"], color + ): + return + if _pipepager(generator, ["less"], color): + return + + import tempfile + + fd, filename = tempfile.mkstemp() + os.close(fd) + try: + if _pipepager(generator, ["more"], color): + return + return _nullpager(stdout, generator, color) + finally: + os.unlink(filename) + + +def _pipepager( + generator: cabc.Iterable[str], cmd_parts: list[str], color: bool | None +) -> bool: + """Page through text by feeding it to another program. Invoking a + pager through this might support colors. + + Returns `True` if the command was found, `False` otherwise and thus another + pager should be attempted. + """ + # Split the command into the invoked CLI and its parameters. + if not cmd_parts: + return False + + import shutil + + cmd = cmd_parts[0] + cmd_params = cmd_parts[1:] + + cmd_filepath = shutil.which(cmd) + if not cmd_filepath: + return False + + # Produces a normalized absolute path string. + # multi-call binaries such as busybox derive their identity from the symlink + # less -> busybox. resolve() causes them to misbehave. (eg. less becomes busybox) + cmd_path = Path(cmd_filepath).absolute() + cmd_name = cmd_path.name + + import subprocess + + # Make a local copy of the environment to not affect the global one. + env = dict(os.environ) + + # If we're piping to less and the user hasn't decided on colors, we enable + # them by default we find the -R flag in the command line arguments. + if color is None and cmd_name == "less": + less_flags = f"{os.environ.get('LESS', '')}{' '.join(cmd_params)}" + if not less_flags: + env["LESS"] = "-R" + color = True + elif "r" in less_flags or "R" in less_flags: + color = True + + c = subprocess.Popen( + [str(cmd_path)] + cmd_params, + shell=False, + stdin=subprocess.PIPE, + env=env, + errors="replace", + text=True, + ) + assert c.stdin is not None + try: + for text in generator: + if not color: + text = strip_ansi(text) + + c.stdin.write(text) + except BrokenPipeError: + # In case the pager exited unexpectedly, ignore the broken pipe error. + pass + except Exception as e: + # In case there is an exception we want to close the pager immediately + # and let the caller handle it. + # Otherwise the pager will keep running, and the user may not notice + # the error message, or worse yet it may leave the terminal in a broken state. + c.terminate() + raise e + finally: + # We must close stdin and wait for the pager to exit before we continue + try: + c.stdin.close() + # Close implies flush, so it might throw a BrokenPipeError if the pager + # process exited already. + except BrokenPipeError: + pass + + # Less doesn't respect ^C, but catches it for its own UI purposes (aborting + # search or other commands inside less). + # + # That means when the user hits ^C, the parent process (click) terminates, + # but less is still alive, paging the output and messing up the terminal. + # + # If the user wants to make the pager exit on ^C, they should set + # `LESS='-K'`. It's not our decision to make. + while True: + try: + c.wait() + except KeyboardInterrupt: + pass + else: + break + + return True + + +def _tempfilepager( + generator: cabc.Iterable[str], cmd_parts: list[str], color: bool | None +) -> bool: + """Page through text by invoking a program on a temporary file. + + Returns `True` if the command was found, `False` otherwise and thus another + pager should be attempted. + """ + # Split the command into the invoked CLI and its parameters. + if not cmd_parts: + return False + + import shutil + + cmd = cmd_parts[0] + + cmd_filepath = shutil.which(cmd) + if not cmd_filepath: + return False + # Produces a normalized absolute path string. + # multi-call binaries such as busybox derive their identity from the symlink + # less -> busybox. resolve() causes them to misbehave. (eg. less becomes busybox) + cmd_path = Path(cmd_filepath).absolute() + + import subprocess + import tempfile + + fd, filename = tempfile.mkstemp() + # TODO: This never terminates if the passed generator never terminates. + text = "".join(generator) + if not color: + text = strip_ansi(text) + encoding = get_best_encoding(sys.stdout) + with open_stream(filename, "wb")[0] as f: + f.write(text.encode(encoding)) + try: + subprocess.call([str(cmd_path), filename]) + except OSError: + # Command not found + pass + finally: + os.close(fd) + os.unlink(filename) + + return True + + +def _nullpager( + stream: t.TextIO, generator: cabc.Iterable[str], color: bool | None +) -> None: + """Simply print unformatted text. This is the ultimate fallback.""" + for text in generator: + if not color: + text = strip_ansi(text) + stream.write(text) + + +class Editor: + def __init__( + self, + editor: str | None = None, + env: cabc.Mapping[str, str] | None = None, + require_save: bool = True, + extension: str = ".txt", + ) -> None: + self.editor = editor + self.env = env + self.require_save = require_save + self.extension = extension + + def get_editor(self) -> str: + if self.editor is not None: + return self.editor + for key in "VISUAL", "EDITOR": + rv = os.environ.get(key) + if rv: + return rv + if WIN: + return "notepad" + + from shutil import which + + for editor in "sensible-editor", "vim", "nano": + if which(editor) is not None: + return editor + return "vi" + + def edit_files(self, filenames: cabc.Iterable[str]) -> None: + import subprocess + + editor = self.get_editor() + environ: dict[str, str] | None = None + + if self.env: + environ = os.environ.copy() + environ.update(self.env) + + exc_filename = " ".join(f'"{filename}"' for filename in filenames) + + try: + c = subprocess.Popen( + args=f"{editor} {exc_filename}", env=environ, shell=True + ) + exit_code = c.wait() + if exit_code != 0: + raise ClickException( + _("{editor}: Editing failed").format(editor=editor) + ) + except OSError as e: + raise ClickException( + _("{editor}: Editing failed: {e}").format(editor=editor, e=e) + ) from e + + @t.overload + def edit(self, text: bytes | bytearray) -> bytes | None: ... + + # We cannot know whether or not the type expected is str or bytes when None + # is passed, so str is returned as that was what was done before. + @t.overload + def edit(self, text: str | None) -> str | None: ... + + def edit(self, text: str | bytes | bytearray | None) -> str | bytes | None: + import tempfile + + if text is None: + data: bytes | bytearray = b"" + elif isinstance(text, (bytes, bytearray)): + data = text + else: + if text and not text.endswith("\n"): + text += "\n" + + if WIN: + data = text.replace("\n", "\r\n").encode("utf-8-sig") + else: + data = text.encode("utf-8") + + fd, name = tempfile.mkstemp(prefix="editor-", suffix=self.extension) + f: t.BinaryIO + + try: + with os.fdopen(fd, "wb") as f: + f.write(data) + + # If the filesystem resolution is 1 second, like Mac OS + # 10.12 Extended, or 2 seconds, like FAT32, and the editor + # closes very fast, require_save can fail. Set the modified + # time to be 2 seconds in the past to work around this. + os.utime(name, (os.path.getatime(name), os.path.getmtime(name) - 2)) + # Depending on the resolution, the exact value might not be + # recorded, so get the new recorded value. + timestamp = os.path.getmtime(name) + + self.edit_files((name,)) + + if self.require_save and os.path.getmtime(name) == timestamp: + return None + + with open(name, "rb") as f: + rv = f.read() + + if isinstance(text, (bytes, bytearray)): + return rv + + return rv.decode("utf-8-sig").replace("\r\n", "\n") + finally: + os.unlink(name) + + +def open_url(url: str, wait: bool = False, locate: bool = False) -> int: + import subprocess + + def _unquote_file(url: str) -> str: + from urllib.parse import unquote + + if url.startswith("file://"): + url = unquote(url[7:]) + + return url + + if sys.platform == "darwin": + args = ["open"] + if wait: + args.append("-W") + if locate: + args.append("-R") + args.append(_unquote_file(url)) + null = open("/dev/null", "w") + try: + return subprocess.Popen(args, stderr=null).wait() + finally: + null.close() + elif WIN: + if locate: + url = _unquote_file(url) + args = ["explorer", f"/select,{url}"] + else: + args = ["start"] + if wait: + args.append("/WAIT") + args.append("") + args.append(url) + try: + return subprocess.call(args) + except OSError: + # Command not found + return 127 + elif CYGWIN: + if locate: + url = _unquote_file(url) + args = ["cygstart", os.path.dirname(url)] + else: + args = ["cygstart"] + if wait: + args.append("-w") + args.append(url) + try: + return subprocess.call(args) + except OSError: + # Command not found + return 127 + + try: + if locate: + url = os.path.dirname(_unquote_file(url)) or "." + else: + url = _unquote_file(url) + c = subprocess.Popen(["xdg-open", url]) + if wait: + return c.wait() + return 0 + except OSError: + if url.startswith(("http://", "https://")) and not locate and not wait: + import webbrowser + + webbrowser.open(url) + return 0 + return 1 + + +def _translate_ch_to_exc(ch: str) -> None: + if ch == "\x03": + raise KeyboardInterrupt() + + if ch == "\x04" and not WIN: # Unix-like, Ctrl+D + raise EOFError() + + if ch == "\x1a" and WIN: # Windows, Ctrl+Z + raise EOFError() + + return None + + +if sys.platform == "win32": + import msvcrt + + @contextlib.contextmanager + def raw_terminal() -> cabc.Iterator[int]: + yield -1 + + def getchar(echo: bool) -> str: + # The function `getch` will return a bytes object corresponding to + # the pressed character. Since Windows 10 build 1803, it will also + # return \x00 when called a second time after pressing a regular key. + # + # `getwch` does not share this probably-bugged behavior. Moreover, it + # returns a Unicode object by default, which is what we want. + # + # Either of these functions will return \x00 or \xe0 to indicate + # a special key, and you need to call the same function again to get + # the "rest" of the code. The fun part is that \u00e0 is + # "latin small letter a with grave", so if you type that on a French + # keyboard, you _also_ get a \xe0. + # E.g., consider the Up arrow. This returns \xe0 and then \x48. The + # resulting Unicode string reads as "a with grave" + "capital H". + # This is indistinguishable from when the user actually types + # "a with grave" and then "capital H". + # + # When \xe0 is returned, we assume it's part of a special-key sequence + # and call `getwch` again, but that means that when the user types + # the \u00e0 character, `getchar` doesn't return until a second + # character is typed. + # The alternative is returning immediately, but that would mess up + # cross-platform handling of arrow keys and others that start with + # \xe0. Another option is using `getch`, but then we can't reliably + # read non-ASCII characters, because return values of `getch` are + # limited to the current 8-bit codepage. + # + # Anyway, Click doesn't claim to do this Right(tm), and using `getwch` + # is doing the right thing in more situations than with `getch`. + + if echo: + func = t.cast(t.Callable[[], str], msvcrt.getwche) + else: + func = t.cast(t.Callable[[], str], msvcrt.getwch) + + rv = func() + + if rv in ("\x00", "\xe0"): + # \x00 and \xe0 are control characters that indicate special key, + # see above. + rv += func() + + _translate_ch_to_exc(rv) + return rv + +else: + import termios + import tty + + @contextlib.contextmanager + def raw_terminal() -> cabc.Iterator[int]: + f: t.TextIO | None + fd: int + + if not isatty(sys.stdin): + f = open("/dev/tty") + fd = f.fileno() + else: + fd = sys.stdin.fileno() + f = None + + try: + old_settings = termios.tcgetattr(fd) + + try: + tty.setraw(fd) + yield fd + finally: + termios.tcsetattr(fd, termios.TCSADRAIN, old_settings) + sys.stdout.flush() + + if f is not None: + f.close() + except termios.error: + pass + + def getchar(echo: bool) -> str: + with raw_terminal() as fd: + ch = os.read(fd, 32).decode(get_best_encoding(sys.stdin), "replace") + + if echo and isatty(sys.stdout): + sys.stdout.write(ch) + + _translate_ch_to_exc(ch) + return ch diff --git a/venv/lib/python3.12/site-packages/click/_textwrap.py b/venv/lib/python3.12/site-packages/click/_textwrap.py new file mode 100644 index 0000000..97fbee3 --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/_textwrap.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +import collections.abc as cabc +import textwrap +from contextlib import contextmanager + + +class TextWrapper(textwrap.TextWrapper): + def _handle_long_word( + self, + reversed_chunks: list[str], + cur_line: list[str], + cur_len: int, + width: int, + ) -> None: + space_left = max(width - cur_len, 1) + + if self.break_long_words: + last = reversed_chunks[-1] + cut = last[:space_left] + res = last[space_left:] + cur_line.append(cut) + reversed_chunks[-1] = res + elif not cur_line: + cur_line.append(reversed_chunks.pop()) + + @contextmanager + def extra_indent(self, indent: str) -> cabc.Iterator[None]: + old_initial_indent = self.initial_indent + old_subsequent_indent = self.subsequent_indent + self.initial_indent += indent + self.subsequent_indent += indent + + try: + yield + finally: + self.initial_indent = old_initial_indent + self.subsequent_indent = old_subsequent_indent + + def indent_only(self, text: str) -> str: + rv = [] + + for idx, line in enumerate(text.splitlines()): + indent = self.initial_indent + + if idx > 0: + indent = self.subsequent_indent + + rv.append(f"{indent}{line}") + + return "\n".join(rv) diff --git a/venv/lib/python3.12/site-packages/click/_utils.py b/venv/lib/python3.12/site-packages/click/_utils.py new file mode 100644 index 0000000..09fb008 --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/_utils.py @@ -0,0 +1,36 @@ +from __future__ import annotations + +import enum +import typing as t + + +class Sentinel(enum.Enum): + """Enum used to define sentinel values. + + .. seealso:: + + `PEP 661 - Sentinel Values `_. + """ + + UNSET = object() + FLAG_NEEDS_VALUE = object() + + def __repr__(self) -> str: + return f"{self.__class__.__name__}.{self.name}" + + +UNSET = Sentinel.UNSET +"""Sentinel used to indicate that a value is not set.""" + +FLAG_NEEDS_VALUE = Sentinel.FLAG_NEEDS_VALUE +"""Sentinel used to indicate an option was passed as a flag without a +value but is not a flag option. + +``Option.consume_value`` uses this to prompt or use the ``flag_value``. +""" + +T_UNSET = t.Literal[UNSET] # type: ignore[valid-type] +"""Type hint for the :data:`UNSET` sentinel value.""" + +T_FLAG_NEEDS_VALUE = t.Literal[FLAG_NEEDS_VALUE] # type: ignore[valid-type] +"""Type hint for the :data:`FLAG_NEEDS_VALUE` sentinel value.""" diff --git a/venv/lib/python3.12/site-packages/click/_winconsole.py b/venv/lib/python3.12/site-packages/click/_winconsole.py new file mode 100644 index 0000000..e56c7c6 --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/_winconsole.py @@ -0,0 +1,296 @@ +# This module is based on the excellent work by Adam Bartoš who +# provided a lot of what went into the implementation here in +# the discussion to issue1602 in the Python bug tracker. +# +# There are some general differences in regards to how this works +# compared to the original patches as we do not need to patch +# the entire interpreter but just work in our little world of +# echo and prompt. +from __future__ import annotations + +import collections.abc as cabc +import io +import sys +import time +import typing as t +from ctypes import Array +from ctypes import byref +from ctypes import c_char +from ctypes import c_char_p +from ctypes import c_int +from ctypes import c_ssize_t +from ctypes import c_ulong +from ctypes import c_void_p +from ctypes import POINTER +from ctypes import py_object +from ctypes import Structure +from ctypes.wintypes import DWORD +from ctypes.wintypes import HANDLE +from ctypes.wintypes import LPCWSTR +from ctypes.wintypes import LPWSTR + +from ._compat import _NonClosingTextIOWrapper + +assert sys.platform == "win32" +import msvcrt # noqa: E402 +from ctypes import windll # noqa: E402 +from ctypes import WINFUNCTYPE # noqa: E402 + +c_ssize_p = POINTER(c_ssize_t) + +kernel32 = windll.kernel32 +GetStdHandle = kernel32.GetStdHandle +ReadConsoleW = kernel32.ReadConsoleW +WriteConsoleW = kernel32.WriteConsoleW +GetConsoleMode = kernel32.GetConsoleMode +GetLastError = kernel32.GetLastError +GetCommandLineW = WINFUNCTYPE(LPWSTR)(("GetCommandLineW", windll.kernel32)) +CommandLineToArgvW = WINFUNCTYPE(POINTER(LPWSTR), LPCWSTR, POINTER(c_int))( + ("CommandLineToArgvW", windll.shell32) +) +LocalFree = WINFUNCTYPE(c_void_p, c_void_p)(("LocalFree", windll.kernel32)) + +STDIN_HANDLE = GetStdHandle(-10) +STDOUT_HANDLE = GetStdHandle(-11) +STDERR_HANDLE = GetStdHandle(-12) + +PyBUF_SIMPLE = 0 +PyBUF_WRITABLE = 1 + +ERROR_SUCCESS = 0 +ERROR_NOT_ENOUGH_MEMORY = 8 +ERROR_OPERATION_ABORTED = 995 + +STDIN_FILENO = 0 +STDOUT_FILENO = 1 +STDERR_FILENO = 2 + +EOF = b"\x1a" +MAX_BYTES_WRITTEN = 32767 + +if t.TYPE_CHECKING: + try: + # Using `typing_extensions.Buffer` instead of `collections.abc` + # on Windows for some reason does not have `Sized` implemented. + from collections.abc import Buffer # type: ignore + except ImportError: + from typing_extensions import Buffer + +try: + from ctypes import pythonapi +except ImportError: + # On PyPy we cannot get buffers so our ability to operate here is + # severely limited. + get_buffer = None +else: + + class Py_buffer(Structure): + _fields_ = [ # noqa: RUF012 + ("buf", c_void_p), + ("obj", py_object), + ("len", c_ssize_t), + ("itemsize", c_ssize_t), + ("readonly", c_int), + ("ndim", c_int), + ("format", c_char_p), + ("shape", c_ssize_p), + ("strides", c_ssize_p), + ("suboffsets", c_ssize_p), + ("internal", c_void_p), + ] + + PyObject_GetBuffer = pythonapi.PyObject_GetBuffer + PyBuffer_Release = pythonapi.PyBuffer_Release + + def get_buffer(obj: Buffer, writable: bool = False) -> Array[c_char]: + buf = Py_buffer() + flags: int = PyBUF_WRITABLE if writable else PyBUF_SIMPLE + PyObject_GetBuffer(py_object(obj), byref(buf), flags) + + try: + buffer_type = c_char * buf.len + out: Array[c_char] = buffer_type.from_address(buf.buf) + return out + finally: + PyBuffer_Release(byref(buf)) + + +class _WindowsConsoleRawIOBase(io.RawIOBase): + def __init__(self, handle: int | None) -> None: + self.handle = handle + + def isatty(self) -> t.Literal[True]: + super().isatty() + return True + + +class _WindowsConsoleReader(_WindowsConsoleRawIOBase): + def readable(self) -> t.Literal[True]: + return True + + def readinto(self, b: Buffer) -> int: + bytes_to_be_read = len(b) + if not bytes_to_be_read: + return 0 + elif bytes_to_be_read % 2: + raise ValueError( + "cannot read odd number of bytes from UTF-16-LE encoded console" + ) + + buffer = get_buffer(b, writable=True) + code_units_to_be_read = bytes_to_be_read // 2 + code_units_read = c_ulong() + + rv = ReadConsoleW( + HANDLE(self.handle), + buffer, + code_units_to_be_read, + byref(code_units_read), + None, + ) + if GetLastError() == ERROR_OPERATION_ABORTED: + # wait for KeyboardInterrupt + time.sleep(0.1) + if not rv: + raise OSError(f"Windows error: {GetLastError()}") + + if buffer[0] == EOF: + return 0 + return 2 * code_units_read.value + + +class _WindowsConsoleWriter(_WindowsConsoleRawIOBase): + def writable(self) -> t.Literal[True]: + return True + + @staticmethod + def _get_error_message(errno: int) -> str: + if errno == ERROR_SUCCESS: + return "ERROR_SUCCESS" + elif errno == ERROR_NOT_ENOUGH_MEMORY: + return "ERROR_NOT_ENOUGH_MEMORY" + return f"Windows error {errno}" + + def write(self, b: Buffer) -> int: + bytes_to_be_written = len(b) + buf = get_buffer(b) + code_units_to_be_written = min(bytes_to_be_written, MAX_BYTES_WRITTEN) // 2 + code_units_written = c_ulong() + + WriteConsoleW( + HANDLE(self.handle), + buf, + code_units_to_be_written, + byref(code_units_written), + None, + ) + bytes_written = 2 * code_units_written.value + + if bytes_written == 0 and bytes_to_be_written > 0: + raise OSError(self._get_error_message(GetLastError())) + return bytes_written + + +class ConsoleStream: + def __init__(self, text_stream: t.TextIO, byte_stream: t.BinaryIO) -> None: + self._text_stream = text_stream + self.buffer = byte_stream + + @property + def name(self) -> str: + return self.buffer.name + + def write(self, x: t.AnyStr) -> int: + if isinstance(x, str): + return self._text_stream.write(x) + try: + self.flush() + except Exception: + pass + return self.buffer.write(x) + + def writelines(self, lines: cabc.Iterable[t.AnyStr]) -> None: + for line in lines: + self.write(line) + + def __getattr__(self, name: str) -> t.Any: + return getattr(self._text_stream, name) + + def isatty(self) -> bool: + return self.buffer.isatty() + + def __repr__(self) -> str: + return f"" + + +def _get_text_stdin(buffer_stream: t.BinaryIO) -> t.TextIO: + text_stream = _NonClosingTextIOWrapper( + io.BufferedReader(_WindowsConsoleReader(STDIN_HANDLE)), + "utf-16-le", + "strict", + line_buffering=True, + ) + return t.cast(t.TextIO, ConsoleStream(text_stream, buffer_stream)) + + +def _get_text_stdout(buffer_stream: t.BinaryIO) -> t.TextIO: + text_stream = _NonClosingTextIOWrapper( + io.BufferedWriter(_WindowsConsoleWriter(STDOUT_HANDLE)), + "utf-16-le", + "strict", + line_buffering=True, + ) + return t.cast(t.TextIO, ConsoleStream(text_stream, buffer_stream)) + + +def _get_text_stderr(buffer_stream: t.BinaryIO) -> t.TextIO: + text_stream = _NonClosingTextIOWrapper( + io.BufferedWriter(_WindowsConsoleWriter(STDERR_HANDLE)), + "utf-16-le", + "strict", + line_buffering=True, + ) + return t.cast(t.TextIO, ConsoleStream(text_stream, buffer_stream)) + + +_stream_factories: cabc.Mapping[int, t.Callable[[t.BinaryIO], t.TextIO]] = { + 0: _get_text_stdin, + 1: _get_text_stdout, + 2: _get_text_stderr, +} + + +def _is_console(f: t.TextIO) -> bool: + if not hasattr(f, "fileno"): + return False + + try: + fileno = f.fileno() + except (OSError, io.UnsupportedOperation): + return False + + handle = msvcrt.get_osfhandle(fileno) + return bool(GetConsoleMode(handle, byref(DWORD()))) + + +def _get_windows_console_stream( + f: t.TextIO, encoding: str | None, errors: str | None +) -> t.TextIO | None: + if ( + get_buffer is None + or encoding not in {"utf-16-le", None} + or errors not in {"strict", None} + or not _is_console(f) + ): + return None + + func = _stream_factories.get(f.fileno()) + if func is None: + return None + + b = getattr(f, "buffer", None) + + if b is None: + return None + + return func(b) diff --git a/venv/lib/python3.12/site-packages/click/core.py b/venv/lib/python3.12/site-packages/click/core.py new file mode 100644 index 0000000..57f549c --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/core.py @@ -0,0 +1,3415 @@ +from __future__ import annotations + +import collections.abc as cabc +import enum +import errno +import inspect +import os +import sys +import typing as t +from collections import abc +from collections import Counter +from contextlib import AbstractContextManager +from contextlib import contextmanager +from contextlib import ExitStack +from functools import update_wrapper +from gettext import gettext as _ +from gettext import ngettext +from itertools import repeat +from types import TracebackType + +from . import types +from ._utils import FLAG_NEEDS_VALUE +from ._utils import UNSET +from .exceptions import Abort +from .exceptions import BadParameter +from .exceptions import ClickException +from .exceptions import Exit +from .exceptions import MissingParameter +from .exceptions import NoArgsIsHelpError +from .exceptions import UsageError +from .formatting import HelpFormatter +from .formatting import join_options +from .globals import pop_context +from .globals import push_context +from .parser import _OptionParser +from .parser import _split_opt +from .termui import confirm +from .termui import prompt +from .termui import style +from .utils import _detect_program_name +from .utils import _expand_args +from .utils import echo +from .utils import make_default_short_help +from .utils import make_str +from .utils import PacifyFlushWrapper + +if t.TYPE_CHECKING: + from .shell_completion import CompletionItem + +F = t.TypeVar("F", bound="t.Callable[..., t.Any]") +V = t.TypeVar("V") + + +def _complete_visible_commands( + ctx: Context, incomplete: str +) -> cabc.Iterator[tuple[str, Command]]: + """List all the subcommands of a group that start with the + incomplete value and aren't hidden. + + :param ctx: Invocation context for the group. + :param incomplete: Value being completed. May be empty. + """ + multi = t.cast(Group, ctx.command) + + for name in multi.list_commands(ctx): + if name.startswith(incomplete): + command = multi.get_command(ctx, name) + + if command is not None and not command.hidden: + yield name, command + + +def _check_nested_chain( + base_command: Group, cmd_name: str, cmd: Command, register: bool = False +) -> None: + if not base_command.chain or not isinstance(cmd, Group): + return + + if register: + message = ( + f"It is not possible to add the group {cmd_name!r} to another" + f" group {base_command.name!r} that is in chain mode." + ) + else: + message = ( + f"Found the group {cmd_name!r} as subcommand to another group " + f" {base_command.name!r} that is in chain mode. This is not supported." + ) + + raise RuntimeError(message) + + +def batch(iterable: cabc.Iterable[V], batch_size: int) -> list[tuple[V, ...]]: + return list(zip(*repeat(iter(iterable), batch_size), strict=False)) + + +@contextmanager +def augment_usage_errors( + ctx: Context, param: Parameter | None = None +) -> cabc.Iterator[None]: + """Context manager that attaches extra information to exceptions.""" + try: + yield + except BadParameter as e: + if e.ctx is None: + e.ctx = ctx + if param is not None and e.param is None: + e.param = param + raise + except UsageError as e: + if e.ctx is None: + e.ctx = ctx + raise + + +def iter_params_for_processing( + invocation_order: cabc.Sequence[Parameter], + declaration_order: cabc.Sequence[Parameter], +) -> list[Parameter]: + """Returns all declared parameters in the order they should be processed. + + The declared parameters are re-shuffled depending on the order in which + they were invoked, as well as the eagerness of each parameters. + + The invocation order takes precedence over the declaration order. I.e. the + order in which the user provided them to the CLI is respected. + + This behavior and its effect on callback evaluation is detailed at: + https://click.palletsprojects.com/en/stable/advanced/#callback-evaluation-order + """ + + def sort_key(item: Parameter) -> tuple[bool, float]: + try: + idx: float = invocation_order.index(item) + except ValueError: + idx = float("inf") + + return not item.is_eager, idx + + return sorted(declaration_order, key=sort_key) + + +class ParameterSource(enum.Enum): + """This is an :class:`~enum.Enum` that indicates the source of a + parameter's value. + + Use :meth:`click.Context.get_parameter_source` to get the + source for a parameter by name. + + .. versionchanged:: 8.0 + Use :class:`~enum.Enum` and drop the ``validate`` method. + + .. versionchanged:: 8.0 + Added the ``PROMPT`` value. + """ + + COMMANDLINE = enum.auto() + """The value was provided by the command line args.""" + ENVIRONMENT = enum.auto() + """The value was provided with an environment variable.""" + DEFAULT = enum.auto() + """Used the default specified by the parameter.""" + DEFAULT_MAP = enum.auto() + """Used a default provided by :attr:`Context.default_map`.""" + PROMPT = enum.auto() + """Used a prompt to confirm a default or provide a value.""" + + +class Context: + """The context is a special internal object that holds state relevant + for the script execution at every single level. It's normally invisible + to commands unless they opt-in to getting access to it. + + The context is useful as it can pass internal objects around and can + control special execution features such as reading data from + environment variables. + + A context can be used as context manager in which case it will call + :meth:`close` on teardown. + + :param command: the command class for this context. + :param parent: the parent context. + :param info_name: the info name for this invocation. Generally this + is the most descriptive name for the script or + command. For the toplevel script it is usually + the name of the script, for commands below it it's + the name of the script. + :param obj: an arbitrary object of user data. + :param auto_envvar_prefix: the prefix to use for automatic environment + variables. If this is `None` then reading + from environment variables is disabled. This + does not affect manually set environment + variables which are always read. + :param default_map: a dictionary (like object) with default values + for parameters. + :param terminal_width: the width of the terminal. The default is + inherit from parent context. If no context + defines the terminal width then auto + detection will be applied. + :param max_content_width: the maximum width for content rendered by + Click (this currently only affects help + pages). This defaults to 80 characters if + not overridden. In other words: even if the + terminal is larger than that, Click will not + format things wider than 80 characters by + default. In addition to that, formatters might + add some safety mapping on the right. + :param resilient_parsing: if this flag is enabled then Click will + parse without any interactivity or callback + invocation. Default values will also be + ignored. This is useful for implementing + things such as completion support. + :param allow_extra_args: if this is set to `True` then extra arguments + at the end will not raise an error and will be + kept on the context. The default is to inherit + from the command. + :param allow_interspersed_args: if this is set to `False` then options + and arguments cannot be mixed. The + default is to inherit from the command. + :param ignore_unknown_options: instructs click to ignore options it does + not know and keeps them for later + processing. + :param help_option_names: optionally a list of strings that define how + the default help parameter is named. The + default is ``['--help']``. + :param token_normalize_func: an optional function that is used to + normalize tokens (options, choices, + etc.). This for instance can be used to + implement case insensitive behavior. + :param color: controls if the terminal supports ANSI colors or not. The + default is autodetection. This is only needed if ANSI + codes are used in texts that Click prints which is by + default not the case. This for instance would affect + help output. + :param show_default: Show the default value for commands. If this + value is not set, it defaults to the value from the parent + context. ``Command.show_default`` overrides this default for the + specific command. + + .. versionchanged:: 8.2 + The ``protected_args`` attribute is deprecated and will be removed in + Click 9.0. ``args`` will contain remaining unparsed tokens. + + .. versionchanged:: 8.1 + The ``show_default`` parameter is overridden by + ``Command.show_default``, instead of the other way around. + + .. versionchanged:: 8.0 + The ``show_default`` parameter defaults to the value from the + parent context. + + .. versionchanged:: 7.1 + Added the ``show_default`` parameter. + + .. versionchanged:: 4.0 + Added the ``color``, ``ignore_unknown_options``, and + ``max_content_width`` parameters. + + .. versionchanged:: 3.0 + Added the ``allow_extra_args`` and ``allow_interspersed_args`` + parameters. + + .. versionchanged:: 2.0 + Added the ``resilient_parsing``, ``help_option_names``, and + ``token_normalize_func`` parameters. + """ + + #: The formatter class to create with :meth:`make_formatter`. + #: + #: .. versionadded:: 8.0 + formatter_class: type[HelpFormatter] = HelpFormatter + + def __init__( + self, + command: Command, + parent: Context | None = None, + info_name: str | None = None, + obj: t.Any | None = None, + auto_envvar_prefix: str | None = None, + default_map: cabc.MutableMapping[str, t.Any] | None = None, + terminal_width: int | None = None, + max_content_width: int | None = None, + resilient_parsing: bool = False, + allow_extra_args: bool | None = None, + allow_interspersed_args: bool | None = None, + ignore_unknown_options: bool | None = None, + help_option_names: list[str] | None = None, + token_normalize_func: t.Callable[[str], str] | None = None, + color: bool | None = None, + show_default: bool | None = None, + ) -> None: + #: the parent context or `None` if none exists. + self.parent = parent + #: the :class:`Command` for this context. + self.command = command + #: the descriptive information name + self.info_name = info_name + #: Map of parameter names to their parsed values. Parameters + #: with ``expose_value=False`` are not stored. + self.params: dict[str, t.Any] = {} + #: the leftover arguments. + self.args: list[str] = [] + #: protected arguments. These are arguments that are prepended + #: to `args` when certain parsing scenarios are encountered but + #: must be never propagated to another arguments. This is used + #: to implement nested parsing. + self._protected_args: list[str] = [] + #: the collected prefixes of the command's options. + self._opt_prefixes: set[str] = set(parent._opt_prefixes) if parent else set() + + if obj is None and parent is not None: + obj = parent.obj + + #: the user object stored. + self.obj: t.Any = obj + self._meta: dict[str, t.Any] = getattr(parent, "meta", {}) + + #: A dictionary (-like object) with defaults for parameters. + if ( + default_map is None + and info_name is not None + and parent is not None + and parent.default_map is not None + ): + default_map = parent.default_map.get(info_name) + + self.default_map: cabc.MutableMapping[str, t.Any] | None = default_map + + #: This flag indicates if a subcommand is going to be executed. A + #: group callback can use this information to figure out if it's + #: being executed directly or because the execution flow passes + #: onwards to a subcommand. By default it's None, but it can be + #: the name of the subcommand to execute. + #: + #: If chaining is enabled this will be set to ``'*'`` in case + #: any commands are executed. It is however not possible to + #: figure out which ones. If you require this knowledge you + #: should use a :func:`result_callback`. + self.invoked_subcommand: str | None = None + + if terminal_width is None and parent is not None: + terminal_width = parent.terminal_width + + #: The width of the terminal (None is autodetection). + self.terminal_width: int | None = terminal_width + + if max_content_width is None and parent is not None: + max_content_width = parent.max_content_width + + #: The maximum width of formatted content (None implies a sensible + #: default which is 80 for most things). + self.max_content_width: int | None = max_content_width + + if allow_extra_args is None: + allow_extra_args = command.allow_extra_args + + #: Indicates if the context allows extra args or if it should + #: fail on parsing. + #: + #: .. versionadded:: 3.0 + self.allow_extra_args = allow_extra_args + + if allow_interspersed_args is None: + allow_interspersed_args = command.allow_interspersed_args + + #: Indicates if the context allows mixing of arguments and + #: options or not. + #: + #: .. versionadded:: 3.0 + self.allow_interspersed_args: bool = allow_interspersed_args + + if ignore_unknown_options is None: + ignore_unknown_options = command.ignore_unknown_options + + #: Instructs click to ignore options that a command does not + #: understand and will store it on the context for later + #: processing. This is primarily useful for situations where you + #: want to call into external programs. Generally this pattern is + #: strongly discouraged because it's not possibly to losslessly + #: forward all arguments. + #: + #: .. versionadded:: 4.0 + self.ignore_unknown_options: bool = ignore_unknown_options + + if help_option_names is None: + if parent is not None: + help_option_names = parent.help_option_names + else: + help_option_names = ["--help"] + + #: The names for the help options. + self.help_option_names: list[str] = help_option_names + + if token_normalize_func is None and parent is not None: + token_normalize_func = parent.token_normalize_func + + #: An optional normalization function for tokens. This is + #: options, choices, commands etc. + self.token_normalize_func: t.Callable[[str], str] | None = token_normalize_func + + #: Indicates if resilient parsing is enabled. In that case Click + #: will do its best to not cause any failures and default values + #: will be ignored. Useful for completion. + self.resilient_parsing: bool = resilient_parsing + + # If there is no envvar prefix yet, but the parent has one and + # the command on this level has a name, we can expand the envvar + # prefix automatically. + if auto_envvar_prefix is None: + if ( + parent is not None + and parent.auto_envvar_prefix is not None + and self.info_name is not None + ): + auto_envvar_prefix = ( + f"{parent.auto_envvar_prefix}_{self.info_name.upper()}" + ) + else: + auto_envvar_prefix = auto_envvar_prefix.upper() + + if auto_envvar_prefix is not None: + auto_envvar_prefix = auto_envvar_prefix.replace("-", "_") + + self.auto_envvar_prefix: str | None = auto_envvar_prefix + + if color is None and parent is not None: + color = parent.color + + #: Controls if styling output is wanted or not. + self.color: bool | None = color + + if show_default is None and parent is not None: + show_default = parent.show_default + + #: Show option default values when formatting help text. + self.show_default: bool | None = show_default + + self._close_callbacks: list[t.Callable[[], t.Any]] = [] + self._depth = 0 + self._parameter_source: dict[str, ParameterSource] = {} + self._exit_stack = ExitStack() + + @property + def protected_args(self) -> list[str]: + import warnings + + warnings.warn( + "'protected_args' is deprecated and will be removed in Click 9.0." + " 'args' will contain remaining unparsed tokens.", + DeprecationWarning, + stacklevel=2, + ) + return self._protected_args + + def to_info_dict(self) -> dict[str, t.Any]: + """Gather information that could be useful for a tool generating + user-facing documentation. This traverses the entire CLI + structure. + + .. code-block:: python + + with Context(cli) as ctx: + info = ctx.to_info_dict() + + .. versionadded:: 8.0 + """ + return { + "command": self.command.to_info_dict(self), + "info_name": self.info_name, + "allow_extra_args": self.allow_extra_args, + "allow_interspersed_args": self.allow_interspersed_args, + "ignore_unknown_options": self.ignore_unknown_options, + "auto_envvar_prefix": self.auto_envvar_prefix, + } + + def __enter__(self) -> Context: + self._depth += 1 + push_context(self) + return self + + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_value: BaseException | None, + tb: TracebackType | None, + ) -> bool | None: + self._depth -= 1 + exit_result: bool | None = None + if self._depth == 0: + exit_result = self._close_with_exception_info(exc_type, exc_value, tb) + pop_context() + + return exit_result + + @contextmanager + def scope(self, cleanup: bool = True) -> cabc.Iterator[Context]: + """This helper method can be used with the context object to promote + it to the current thread local (see :func:`get_current_context`). + The default behavior of this is to invoke the cleanup functions which + can be disabled by setting `cleanup` to `False`. The cleanup + functions are typically used for things such as closing file handles. + + If the cleanup is intended the context object can also be directly + used as a context manager. + + Example usage:: + + with ctx.scope(): + assert get_current_context() is ctx + + This is equivalent:: + + with ctx: + assert get_current_context() is ctx + + .. versionadded:: 5.0 + + :param cleanup: controls if the cleanup functions should be run or + not. The default is to run these functions. In + some situations the context only wants to be + temporarily pushed in which case this can be disabled. + Nested pushes automatically defer the cleanup. + """ + if not cleanup: + self._depth += 1 + try: + with self as rv: + yield rv + finally: + if not cleanup: + self._depth -= 1 + + @property + def meta(self) -> dict[str, t.Any]: + """This is a dictionary which is shared with all the contexts + that are nested. It exists so that click utilities can store some + state here if they need to. It is however the responsibility of + that code to manage this dictionary well. + + The keys are supposed to be unique dotted strings. For instance + module paths are a good choice for it. What is stored in there is + irrelevant for the operation of click. However what is important is + that code that places data here adheres to the general semantics of + the system. + + Example usage:: + + LANG_KEY = f'{__name__}.lang' + + def set_language(value): + ctx = get_current_context() + ctx.meta[LANG_KEY] = value + + def get_language(): + return get_current_context().meta.get(LANG_KEY, 'en_US') + + .. versionadded:: 5.0 + """ + return self._meta + + def make_formatter(self) -> HelpFormatter: + """Creates the :class:`~click.HelpFormatter` for the help and + usage output. + + To quickly customize the formatter class used without overriding + this method, set the :attr:`formatter_class` attribute. + + .. versionchanged:: 8.0 + Added the :attr:`formatter_class` attribute. + """ + return self.formatter_class( + width=self.terminal_width, max_width=self.max_content_width + ) + + def with_resource(self, context_manager: AbstractContextManager[V]) -> V: + """Register a resource as if it were used in a ``with`` + statement. The resource will be cleaned up when the context is + popped. + + Uses :meth:`contextlib.ExitStack.enter_context`. It calls the + resource's ``__enter__()`` method and returns the result. When + the context is popped, it closes the stack, which calls the + resource's ``__exit__()`` method. + + To register a cleanup function for something that isn't a + context manager, use :meth:`call_on_close`. Or use something + from :mod:`contextlib` to turn it into a context manager first. + + .. code-block:: python + + @click.group() + @click.option("--name") + @click.pass_context + def cli(ctx): + ctx.obj = ctx.with_resource(connect_db(name)) + + :param context_manager: The context manager to enter. + :return: Whatever ``context_manager.__enter__()`` returns. + + .. versionadded:: 8.0 + """ + return self._exit_stack.enter_context(context_manager) + + def call_on_close(self, f: t.Callable[..., t.Any]) -> t.Callable[..., t.Any]: + """Register a function to be called when the context tears down. + + This can be used to close resources opened during the script + execution. Resources that support Python's context manager + protocol which would be used in a ``with`` statement should be + registered with :meth:`with_resource` instead. + + :param f: The function to execute on teardown. + """ + return self._exit_stack.callback(f) + + def close(self) -> None: + """Invoke all close callbacks registered with + :meth:`call_on_close`, and exit all context managers entered + with :meth:`with_resource`. + """ + self._close_with_exception_info(None, None, None) + + def _close_with_exception_info( + self, + exc_type: type[BaseException] | None, + exc_value: BaseException | None, + tb: TracebackType | None, + ) -> bool | None: + """Unwind the exit stack by calling its :meth:`__exit__` providing the exception + information to allow for exception handling by the various resources registered + using :meth;`with_resource` + + :return: Whatever ``exit_stack.__exit__()`` returns. + """ + exit_result = self._exit_stack.__exit__(exc_type, exc_value, tb) + # In case the context is reused, create a new exit stack. + self._exit_stack = ExitStack() + + return exit_result + + @property + def command_path(self) -> str: + """The computed command path. This is used for the ``usage`` + information on the help page. It's automatically created by + combining the info names of the chain of contexts to the root. + """ + rv = "" + if self.info_name is not None: + rv = self.info_name + if self.parent is not None: + parent_command_path = [self.parent.command_path] + + if isinstance(self.parent.command, Command): + for param in self.parent.command.get_params(self): + parent_command_path.extend(param.get_usage_pieces(self)) + + rv = f"{' '.join(parent_command_path)} {rv}" + return rv.lstrip() + + def find_root(self) -> Context: + """Finds the outermost context.""" + node = self + while node.parent is not None: + node = node.parent + return node + + def find_object(self, object_type: type[V]) -> V | None: + """Finds the closest object of a given type.""" + node: Context | None = self + + while node is not None: + if isinstance(node.obj, object_type): + return node.obj + + node = node.parent + + return None + + def ensure_object(self, object_type: type[V]) -> V: + """Like :meth:`find_object` but sets the innermost object to a + new instance of `object_type` if it does not exist. + """ + rv = self.find_object(object_type) + if rv is None: + self.obj = rv = object_type() + return rv + + @t.overload + def lookup_default( + self, name: str, call: t.Literal[True] = True + ) -> t.Any | None: ... + + @t.overload + def lookup_default( + self, name: str, call: t.Literal[False] = ... + ) -> t.Any | t.Callable[[], t.Any] | None: ... + + def lookup_default(self, name: str, call: bool = True) -> t.Any | None: + """Get the default for a parameter from :attr:`default_map`. + + :param name: Name of the parameter. + :param call: If the default is a callable, call it. Disable to + return the callable instead. + + .. versionchanged:: 8.0 + Added the ``call`` parameter. + """ + if self.default_map is not None: + value = self.default_map.get(name, UNSET) + + if call and callable(value): + return value() + + return value + + return UNSET + + def fail(self, message: str) -> t.NoReturn: + """Aborts the execution of the program with a specific error + message. + + :param message: the error message to fail with. + """ + raise UsageError(message, self) + + def abort(self) -> t.NoReturn: + """Aborts the script.""" + raise Abort() + + def exit(self, code: int = 0) -> t.NoReturn: + """Exits the application with a given exit code. + + .. versionchanged:: 8.2 + Callbacks and context managers registered with :meth:`call_on_close` + and :meth:`with_resource` are closed before exiting. + """ + self.close() + raise Exit(code) + + def get_usage(self) -> str: + """Helper method to get formatted usage string for the current + context and command. + """ + return self.command.get_usage(self) + + def get_help(self) -> str: + """Helper method to get formatted help page for the current + context and command. + """ + return self.command.get_help(self) + + def _make_sub_context(self, command: Command) -> Context: + """Create a new context of the same type as this context, but + for a new command. + + :meta private: + """ + return type(self)(command, info_name=command.name, parent=self) + + @t.overload + def invoke( + self, callback: t.Callable[..., V], /, *args: t.Any, **kwargs: t.Any + ) -> V: ... + + @t.overload + def invoke(self, callback: Command, /, *args: t.Any, **kwargs: t.Any) -> t.Any: ... + + def invoke( + self, callback: Command | t.Callable[..., V], /, *args: t.Any, **kwargs: t.Any + ) -> t.Any | V: + """Invokes a command callback in exactly the way it expects. There + are two ways to invoke this method: + + 1. the first argument can be a callback and all other arguments and + keyword arguments are forwarded directly to the function. + 2. the first argument is a click command object. In that case all + arguments are forwarded as well but proper click parameters + (options and click arguments) must be keyword arguments and Click + will fill in defaults. + + .. versionchanged:: 8.0 + All ``kwargs`` are tracked in :attr:`params` so they will be + passed if :meth:`forward` is called at multiple levels. + + .. versionchanged:: 3.2 + A new context is created, and missing arguments use default values. + """ + if isinstance(callback, Command): + other_cmd = callback + + if other_cmd.callback is None: + raise TypeError( + "The given command does not have a callback that can be invoked." + ) + else: + callback = t.cast("t.Callable[..., V]", other_cmd.callback) + + ctx = self._make_sub_context(other_cmd) + + for param in other_cmd.params: + if param.name not in kwargs and param.expose_value: + default_value = param.get_default(ctx) + # We explicitly hide the :attr:`UNSET` value to the user, as we + # choose to make it an implementation detail. And because ``invoke`` + # has been designed as part of Click public API, we return ``None`` + # instead. Refs: + # https://github.com/pallets/click/issues/3066 + # https://github.com/pallets/click/issues/3065 + # https://github.com/pallets/click/pull/3068 + if default_value is UNSET: + default_value = None + kwargs[param.name] = param.type_cast_value( # type: ignore + ctx, default_value + ) + + # Track all kwargs as params, so that forward() will pass + # them on in subsequent calls. + ctx.params.update(kwargs) + else: + ctx = self + + with augment_usage_errors(self): + with ctx: + return callback(*args, **kwargs) + + def forward(self, cmd: Command, /, *args: t.Any, **kwargs: t.Any) -> t.Any: + """Similar to :meth:`invoke` but fills in default keyword + arguments from the current context if the other command expects + it. This cannot invoke callbacks directly, only other commands. + + .. versionchanged:: 8.0 + All ``kwargs`` are tracked in :attr:`params` so they will be + passed if ``forward`` is called at multiple levels. + """ + # Can only forward to other commands, not direct callbacks. + if not isinstance(cmd, Command): + raise TypeError("Callback is not a command.") + + for param in self.params: + if param not in kwargs: + kwargs[param] = self.params[param] + + return self.invoke(cmd, *args, **kwargs) + + def set_parameter_source(self, name: str, source: ParameterSource) -> None: + """Set the source of a parameter. This indicates the location + from which the value of the parameter was obtained. + + :param name: The name of the parameter. + :param source: A member of :class:`~click.core.ParameterSource`. + """ + self._parameter_source[name] = source + + def get_parameter_source(self, name: str) -> ParameterSource | None: + """Get the source of a parameter. This indicates the location + from which the value of the parameter was obtained. + + This can be useful for determining when a user specified a value + on the command line that is the same as the default value. It + will be :attr:`~click.core.ParameterSource.DEFAULT` only if the + value was actually taken from the default. + + :param name: The name of the parameter. + :rtype: ParameterSource + + .. versionchanged:: 8.0 + Returns ``None`` if the parameter was not provided from any + source. + """ + return self._parameter_source.get(name) + + +class Command: + """Commands are the basic building block of command line interfaces in + Click. A basic command handles command line parsing and might dispatch + more parsing to commands nested below it. + + :param name: the name of the command to use unless a group overrides it. + :param context_settings: an optional dictionary with defaults that are + passed to the context object. + :param callback: the callback to invoke. This is optional. + :param params: the parameters to register with this command. This can + be either :class:`Option` or :class:`Argument` objects. + :param help: the help string to use for this command. + :param epilog: like the help string but it's printed at the end of the + help page after everything else. + :param short_help: the short help to use for this command. This is + shown on the command listing of the parent command. + :param add_help_option: by default each command registers a ``--help`` + option. This can be disabled by this parameter. + :param no_args_is_help: this controls what happens if no arguments are + provided. This option is disabled by default. + If enabled this will add ``--help`` as argument + if no arguments are passed + :param hidden: hide this command from help outputs. + :param deprecated: If ``True`` or non-empty string, issues a message + indicating that the command is deprecated and highlights + its deprecation in --help. The message can be customized + by using a string as the value. + + .. versionchanged:: 8.2 + This is the base class for all commands, not ``BaseCommand``. + ``deprecated`` can be set to a string as well to customize the + deprecation message. + + .. versionchanged:: 8.1 + ``help``, ``epilog``, and ``short_help`` are stored unprocessed, + all formatting is done when outputting help text, not at init, + and is done even if not using the ``@command`` decorator. + + .. versionchanged:: 8.0 + Added a ``repr`` showing the command name. + + .. versionchanged:: 7.1 + Added the ``no_args_is_help`` parameter. + + .. versionchanged:: 2.0 + Added the ``context_settings`` parameter. + """ + + #: The context class to create with :meth:`make_context`. + #: + #: .. versionadded:: 8.0 + context_class: type[Context] = Context + + #: the default for the :attr:`Context.allow_extra_args` flag. + allow_extra_args = False + + #: the default for the :attr:`Context.allow_interspersed_args` flag. + allow_interspersed_args = True + + #: the default for the :attr:`Context.ignore_unknown_options` flag. + ignore_unknown_options = False + + def __init__( + self, + name: str | None, + context_settings: cabc.MutableMapping[str, t.Any] | None = None, + callback: t.Callable[..., t.Any] | None = None, + params: list[Parameter] | None = None, + help: str | None = None, + epilog: str | None = None, + short_help: str | None = None, + options_metavar: str | None = "[OPTIONS]", + add_help_option: bool = True, + no_args_is_help: bool = False, + hidden: bool = False, + deprecated: bool | str = False, + ) -> None: + #: the name the command thinks it has. Upon registering a command + #: on a :class:`Group` the group will default the command name + #: with this information. You should instead use the + #: :class:`Context`\'s :attr:`~Context.info_name` attribute. + self.name = name + + if context_settings is None: + context_settings = {} + + #: an optional dictionary with defaults passed to the context. + self.context_settings: cabc.MutableMapping[str, t.Any] = context_settings + + #: the callback to execute when the command fires. This might be + #: `None` in which case nothing happens. + self.callback = callback + #: the list of parameters for this command in the order they + #: should show up in the help page and execute. Eager parameters + #: will automatically be handled before non eager ones. + self.params: list[Parameter] = params or [] + self.help = help + self.epilog = epilog + self.options_metavar = options_metavar + self.short_help = short_help + self.add_help_option = add_help_option + self._help_option = None + self.no_args_is_help = no_args_is_help + self.hidden = hidden + self.deprecated = deprecated + + def to_info_dict(self, ctx: Context) -> dict[str, t.Any]: + return { + "name": self.name, + "params": [param.to_info_dict() for param in self.get_params(ctx)], + "help": self.help, + "epilog": self.epilog, + "short_help": self.short_help, + "hidden": self.hidden, + "deprecated": self.deprecated, + } + + def __repr__(self) -> str: + return f"<{self.__class__.__name__} {self.name}>" + + def get_usage(self, ctx: Context) -> str: + """Formats the usage line into a string and returns it. + + Calls :meth:`format_usage` internally. + """ + formatter = ctx.make_formatter() + self.format_usage(ctx, formatter) + return formatter.getvalue().rstrip("\n") + + def get_params(self, ctx: Context) -> list[Parameter]: + params = self.params + help_option = self.get_help_option(ctx) + + if help_option is not None: + params = [*params, help_option] + + if __debug__: + import warnings + + opts = [opt for param in params for opt in param.opts] + opts_counter = Counter(opts) + duplicate_opts = (opt for opt, count in opts_counter.items() if count > 1) + + for duplicate_opt in duplicate_opts: + warnings.warn( + ( + f"The parameter {duplicate_opt} is used more than once. " + "Remove its duplicate as parameters should be unique." + ), + stacklevel=3, + ) + + return params + + def format_usage(self, ctx: Context, formatter: HelpFormatter) -> None: + """Writes the usage line into the formatter. + + This is a low-level method called by :meth:`get_usage`. + """ + pieces = self.collect_usage_pieces(ctx) + formatter.write_usage(ctx.command_path, " ".join(pieces)) + + def collect_usage_pieces(self, ctx: Context) -> list[str]: + """Returns all the pieces that go into the usage line and returns + it as a list of strings. + """ + rv = [self.options_metavar] if self.options_metavar else [] + + for param in self.get_params(ctx): + rv.extend(param.get_usage_pieces(ctx)) + + return rv + + def get_help_option_names(self, ctx: Context) -> list[str]: + """Returns the names for the help option.""" + all_names = set(ctx.help_option_names) + for param in self.params: + all_names.difference_update(param.opts) + all_names.difference_update(param.secondary_opts) + return list(all_names) + + def get_help_option(self, ctx: Context) -> Option | None: + """Returns the help option object. + + Skipped if :attr:`add_help_option` is ``False``. + + .. versionchanged:: 8.1.8 + The help option is now cached to avoid creating it multiple times. + """ + help_option_names = self.get_help_option_names(ctx) + + if not help_option_names or not self.add_help_option: + return None + + # Cache the help option object in private _help_option attribute to + # avoid creating it multiple times. Not doing this will break the + # callback odering by iter_params_for_processing(), which relies on + # object comparison. + if self._help_option is None: + # Avoid circular import. + from .decorators import help_option + + # Apply help_option decorator and pop resulting option + help_option(*help_option_names)(self) + self._help_option = self.params.pop() # type: ignore[assignment] + + return self._help_option + + def make_parser(self, ctx: Context) -> _OptionParser: + """Creates the underlying option parser for this command.""" + parser = _OptionParser(ctx) + for param in self.get_params(ctx): + param.add_to_parser(parser, ctx) + return parser + + def get_help(self, ctx: Context) -> str: + """Formats the help into a string and returns it. + + Calls :meth:`format_help` internally. + """ + formatter = ctx.make_formatter() + self.format_help(ctx, formatter) + return formatter.getvalue().rstrip("\n") + + def get_short_help_str(self, limit: int = 45) -> str: + """Gets short help for the command or makes it by shortening the + long help string. + """ + if self.short_help: + text = inspect.cleandoc(self.short_help) + elif self.help: + text = make_default_short_help(self.help, limit) + else: + text = "" + + if self.deprecated: + deprecated_message = ( + f"(DEPRECATED: {self.deprecated})" + if isinstance(self.deprecated, str) + else "(DEPRECATED)" + ) + text = _("{text} {deprecated_message}").format( + text=text, deprecated_message=deprecated_message + ) + + return text.strip() + + def format_help(self, ctx: Context, formatter: HelpFormatter) -> None: + """Writes the help into the formatter if it exists. + + This is a low-level method called by :meth:`get_help`. + + This calls the following methods: + + - :meth:`format_usage` + - :meth:`format_help_text` + - :meth:`format_options` + - :meth:`format_epilog` + """ + self.format_usage(ctx, formatter) + self.format_help_text(ctx, formatter) + self.format_options(ctx, formatter) + self.format_epilog(ctx, formatter) + + def format_help_text(self, ctx: Context, formatter: HelpFormatter) -> None: + """Writes the help text to the formatter if it exists.""" + if self.help is not None: + # truncate the help text to the first form feed + text = inspect.cleandoc(self.help).partition("\f")[0] + else: + text = "" + + if self.deprecated: + deprecated_message = ( + f"(DEPRECATED: {self.deprecated})" + if isinstance(self.deprecated, str) + else "(DEPRECATED)" + ) + text = _("{text} {deprecated_message}").format( + text=text, deprecated_message=deprecated_message + ) + + if text: + formatter.write_paragraph() + + with formatter.indentation(): + formatter.write_text(text) + + def format_options(self, ctx: Context, formatter: HelpFormatter) -> None: + """Writes all the options into the formatter if they exist.""" + opts = [] + for param in self.get_params(ctx): + rv = param.get_help_record(ctx) + if rv is not None: + opts.append(rv) + + if opts: + with formatter.section(_("Options")): + formatter.write_dl(opts) + + def format_epilog(self, ctx: Context, formatter: HelpFormatter) -> None: + """Writes the epilog into the formatter if it exists.""" + if self.epilog: + epilog = inspect.cleandoc(self.epilog) + formatter.write_paragraph() + + with formatter.indentation(): + formatter.write_text(epilog) + + def make_context( + self, + info_name: str | None, + args: list[str], + parent: Context | None = None, + **extra: t.Any, + ) -> Context: + """This function when given an info name and arguments will kick + off the parsing and create a new :class:`Context`. It does not + invoke the actual command callback though. + + To quickly customize the context class used without overriding + this method, set the :attr:`context_class` attribute. + + :param info_name: the info name for this invocation. Generally this + is the most descriptive name for the script or + command. For the toplevel script it's usually + the name of the script, for commands below it's + the name of the command. + :param args: the arguments to parse as list of strings. + :param parent: the parent context if available. + :param extra: extra keyword arguments forwarded to the context + constructor. + + .. versionchanged:: 8.0 + Added the :attr:`context_class` attribute. + """ + for key, value in self.context_settings.items(): + if key not in extra: + extra[key] = value + + ctx = self.context_class(self, info_name=info_name, parent=parent, **extra) + + with ctx.scope(cleanup=False): + self.parse_args(ctx, args) + return ctx + + def parse_args(self, ctx: Context, args: list[str]) -> list[str]: + if not args and self.no_args_is_help and not ctx.resilient_parsing: + raise NoArgsIsHelpError(ctx) + + parser = self.make_parser(ctx) + opts, args, param_order = parser.parse_args(args=args) + + for param in iter_params_for_processing(param_order, self.get_params(ctx)): + _, args = param.handle_parse_result(ctx, opts, args) + + # We now have all parameters' values into `ctx.params`, but the data may contain + # the `UNSET` sentinel. + # Convert `UNSET` to `None` to ensure that the user doesn't see `UNSET`. + # + # Waiting until after the initial parse to convert allows us to treat `UNSET` + # more like a missing value when multiple params use the same name. + # Refs: + # https://github.com/pallets/click/issues/3071 + # https://github.com/pallets/click/pull/3079 + for name, value in ctx.params.items(): + if value is UNSET: + ctx.params[name] = None + + if args and not ctx.allow_extra_args and not ctx.resilient_parsing: + ctx.fail( + ngettext( + "Got unexpected extra argument ({args})", + "Got unexpected extra arguments ({args})", + len(args), + ).format(args=" ".join(map(str, args))) + ) + + ctx.args = args + ctx._opt_prefixes.update(parser._opt_prefixes) + return args + + def invoke(self, ctx: Context) -> t.Any: + """Given a context, this invokes the attached callback (if it exists) + in the right way. + """ + if self.deprecated: + extra_message = ( + f" {self.deprecated}" if isinstance(self.deprecated, str) else "" + ) + message = _( + "DeprecationWarning: The command {name!r} is deprecated.{extra_message}" + ).format(name=self.name, extra_message=extra_message) + echo(style(message, fg="red"), err=True) + + if self.callback is not None: + return ctx.invoke(self.callback, **ctx.params) + + def shell_complete(self, ctx: Context, incomplete: str) -> list[CompletionItem]: + """Return a list of completions for the incomplete value. Looks + at the names of options and chained multi-commands. + + Any command could be part of a chained multi-command, so sibling + commands are valid at any point during command completion. + + :param ctx: Invocation context for this command. + :param incomplete: Value being completed. May be empty. + + .. versionadded:: 8.0 + """ + from click.shell_completion import CompletionItem + + results: list[CompletionItem] = [] + + if incomplete and not incomplete[0].isalnum(): + for param in self.get_params(ctx): + if ( + not isinstance(param, Option) + or param.hidden + or ( + not param.multiple + and ctx.get_parameter_source(param.name) # type: ignore + is ParameterSource.COMMANDLINE + ) + ): + continue + + results.extend( + CompletionItem(name, help=param.help) + for name in [*param.opts, *param.secondary_opts] + if name.startswith(incomplete) + ) + + while ctx.parent is not None: + ctx = ctx.parent + + if isinstance(ctx.command, Group) and ctx.command.chain: + results.extend( + CompletionItem(name, help=command.get_short_help_str()) + for name, command in _complete_visible_commands(ctx, incomplete) + if name not in ctx._protected_args + ) + + return results + + @t.overload + def main( + self, + args: cabc.Sequence[str] | None = None, + prog_name: str | None = None, + complete_var: str | None = None, + standalone_mode: t.Literal[True] = True, + **extra: t.Any, + ) -> t.NoReturn: ... + + @t.overload + def main( + self, + args: cabc.Sequence[str] | None = None, + prog_name: str | None = None, + complete_var: str | None = None, + standalone_mode: bool = ..., + **extra: t.Any, + ) -> t.Any: ... + + def main( + self, + args: cabc.Sequence[str] | None = None, + prog_name: str | None = None, + complete_var: str | None = None, + standalone_mode: bool = True, + windows_expand_args: bool = True, + **extra: t.Any, + ) -> t.Any: + """This is the way to invoke a script with all the bells and + whistles as a command line application. This will always terminate + the application after a call. If this is not wanted, ``SystemExit`` + needs to be caught. + + This method is also available by directly calling the instance of + a :class:`Command`. + + :param args: the arguments that should be used for parsing. If not + provided, ``sys.argv[1:]`` is used. + :param prog_name: the program name that should be used. By default + the program name is constructed by taking the file + name from ``sys.argv[0]``. + :param complete_var: the environment variable that controls the + bash completion support. The default is + ``"__COMPLETE"`` with prog_name in + uppercase. + :param standalone_mode: the default behavior is to invoke the script + in standalone mode. Click will then + handle exceptions and convert them into + error messages and the function will never + return but shut down the interpreter. If + this is set to `False` they will be + propagated to the caller and the return + value of this function is the return value + of :meth:`invoke`. + :param windows_expand_args: Expand glob patterns, user dir, and + env vars in command line args on Windows. + :param extra: extra keyword arguments are forwarded to the context + constructor. See :class:`Context` for more information. + + .. versionchanged:: 8.0.1 + Added the ``windows_expand_args`` parameter to allow + disabling command line arg expansion on Windows. + + .. versionchanged:: 8.0 + When taking arguments from ``sys.argv`` on Windows, glob + patterns, user dir, and env vars are expanded. + + .. versionchanged:: 3.0 + Added the ``standalone_mode`` parameter. + """ + if args is None: + args = sys.argv[1:] + + if os.name == "nt" and windows_expand_args: + args = _expand_args(args) + else: + args = list(args) + + if prog_name is None: + prog_name = _detect_program_name() + + # Process shell completion requests and exit early. + self._main_shell_completion(extra, prog_name, complete_var) + + try: + try: + with self.make_context(prog_name, args, **extra) as ctx: + rv = self.invoke(ctx) + if not standalone_mode: + return rv + # it's not safe to `ctx.exit(rv)` here! + # note that `rv` may actually contain data like "1" which + # has obvious effects + # more subtle case: `rv=[None, None]` can come out of + # chained commands which all returned `None` -- so it's not + # even always obvious that `rv` indicates success/failure + # by its truthiness/falsiness + ctx.exit() + except (EOFError, KeyboardInterrupt) as e: + echo(file=sys.stderr) + raise Abort() from e + except ClickException as e: + if not standalone_mode: + raise + e.show() + sys.exit(e.exit_code) + except OSError as e: + if e.errno == errno.EPIPE: + sys.stdout = t.cast(t.TextIO, PacifyFlushWrapper(sys.stdout)) + sys.stderr = t.cast(t.TextIO, PacifyFlushWrapper(sys.stderr)) + sys.exit(1) + else: + raise + except Exit as e: + if standalone_mode: + sys.exit(e.exit_code) + else: + # in non-standalone mode, return the exit code + # note that this is only reached if `self.invoke` above raises + # an Exit explicitly -- thus bypassing the check there which + # would return its result + # the results of non-standalone execution may therefore be + # somewhat ambiguous: if there are codepaths which lead to + # `ctx.exit(1)` and to `return 1`, the caller won't be able to + # tell the difference between the two + return e.exit_code + except Abort: + if not standalone_mode: + raise + echo(_("Aborted!"), file=sys.stderr) + sys.exit(1) + + def _main_shell_completion( + self, + ctx_args: cabc.MutableMapping[str, t.Any], + prog_name: str, + complete_var: str | None = None, + ) -> None: + """Check if the shell is asking for tab completion, process + that, then exit early. Called from :meth:`main` before the + program is invoked. + + :param prog_name: Name of the executable in the shell. + :param complete_var: Name of the environment variable that holds + the completion instruction. Defaults to + ``_{PROG_NAME}_COMPLETE``. + + .. versionchanged:: 8.2.0 + Dots (``.``) in ``prog_name`` are replaced with underscores (``_``). + """ + if complete_var is None: + complete_name = prog_name.replace("-", "_").replace(".", "_") + complete_var = f"_{complete_name}_COMPLETE".upper() + + instruction = os.environ.get(complete_var) + + if not instruction: + return + + from .shell_completion import shell_complete + + rv = shell_complete(self, ctx_args, prog_name, complete_var, instruction) + sys.exit(rv) + + def __call__(self, *args: t.Any, **kwargs: t.Any) -> t.Any: + """Alias for :meth:`main`.""" + return self.main(*args, **kwargs) + + +class _FakeSubclassCheck(type): + def __subclasscheck__(cls, subclass: type) -> bool: + return issubclass(subclass, cls.__bases__[0]) + + def __instancecheck__(cls, instance: t.Any) -> bool: + return isinstance(instance, cls.__bases__[0]) + + +class _BaseCommand(Command, metaclass=_FakeSubclassCheck): + """ + .. deprecated:: 8.2 + Will be removed in Click 9.0. Use ``Command`` instead. + """ + + +class Group(Command): + """A group is a command that nests other commands (or more groups). + + :param name: The name of the group command. + :param commands: Map names to :class:`Command` objects. Can be a list, which + will use :attr:`Command.name` as the keys. + :param invoke_without_command: Invoke the group's callback even if a + subcommand is not given. + :param no_args_is_help: If no arguments are given, show the group's help and + exit. Defaults to the opposite of ``invoke_without_command``. + :param subcommand_metavar: How to represent the subcommand argument in help. + The default will represent whether ``chain`` is set or not. + :param chain: Allow passing more than one subcommand argument. After parsing + a command's arguments, if any arguments remain another command will be + matched, and so on. + :param result_callback: A function to call after the group's and + subcommand's callbacks. The value returned by the subcommand is passed. + If ``chain`` is enabled, the value will be a list of values returned by + all the commands. If ``invoke_without_command`` is enabled, the value + will be the value returned by the group's callback, or an empty list if + ``chain`` is enabled. + :param kwargs: Other arguments passed to :class:`Command`. + + .. versionchanged:: 8.0 + The ``commands`` argument can be a list of command objects. + + .. versionchanged:: 8.2 + Merged with and replaces the ``MultiCommand`` base class. + """ + + allow_extra_args = True + allow_interspersed_args = False + + #: If set, this is used by the group's :meth:`command` decorator + #: as the default :class:`Command` class. This is useful to make all + #: subcommands use a custom command class. + #: + #: .. versionadded:: 8.0 + command_class: type[Command] | None = None + + #: If set, this is used by the group's :meth:`group` decorator + #: as the default :class:`Group` class. This is useful to make all + #: subgroups use a custom group class. + #: + #: If set to the special value :class:`type` (literally + #: ``group_class = type``), this group's class will be used as the + #: default class. This makes a custom group class continue to make + #: custom groups. + #: + #: .. versionadded:: 8.0 + group_class: type[Group] | type[type] | None = None + # Literal[type] isn't valid, so use Type[type] + + def __init__( + self, + name: str | None = None, + commands: cabc.MutableMapping[str, Command] + | cabc.Sequence[Command] + | None = None, + invoke_without_command: bool = False, + no_args_is_help: bool | None = None, + subcommand_metavar: str | None = None, + chain: bool = False, + result_callback: t.Callable[..., t.Any] | None = None, + **kwargs: t.Any, + ) -> None: + super().__init__(name, **kwargs) + + if commands is None: + commands = {} + elif isinstance(commands, abc.Sequence): + commands = {c.name: c for c in commands if c.name is not None} + + #: The registered subcommands by their exported names. + self.commands: cabc.MutableMapping[str, Command] = commands + + if no_args_is_help is None: + no_args_is_help = not invoke_without_command + + self.no_args_is_help = no_args_is_help + self.invoke_without_command = invoke_without_command + + if subcommand_metavar is None: + if chain: + subcommand_metavar = "COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]..." + else: + subcommand_metavar = "COMMAND [ARGS]..." + + self.subcommand_metavar = subcommand_metavar + self.chain = chain + # The result callback that is stored. This can be set or + # overridden with the :func:`result_callback` decorator. + self._result_callback = result_callback + + if self.chain: + for param in self.params: + if isinstance(param, Argument) and not param.required: + raise RuntimeError( + "A group in chain mode cannot have optional arguments." + ) + + def to_info_dict(self, ctx: Context) -> dict[str, t.Any]: + info_dict = super().to_info_dict(ctx) + commands = {} + + for name in self.list_commands(ctx): + command = self.get_command(ctx, name) + + if command is None: + continue + + sub_ctx = ctx._make_sub_context(command) + + with sub_ctx.scope(cleanup=False): + commands[name] = command.to_info_dict(sub_ctx) + + info_dict.update(commands=commands, chain=self.chain) + return info_dict + + def add_command(self, cmd: Command, name: str | None = None) -> None: + """Registers another :class:`Command` with this group. If the name + is not provided, the name of the command is used. + """ + name = name or cmd.name + if name is None: + raise TypeError("Command has no name.") + _check_nested_chain(self, name, cmd, register=True) + self.commands[name] = cmd + + @t.overload + def command(self, __func: t.Callable[..., t.Any]) -> Command: ... + + @t.overload + def command( + self, *args: t.Any, **kwargs: t.Any + ) -> t.Callable[[t.Callable[..., t.Any]], Command]: ... + + def command( + self, *args: t.Any, **kwargs: t.Any + ) -> t.Callable[[t.Callable[..., t.Any]], Command] | Command: + """A shortcut decorator for declaring and attaching a command to + the group. This takes the same arguments as :func:`command` and + immediately registers the created command with this group by + calling :meth:`add_command`. + + To customize the command class used, set the + :attr:`command_class` attribute. + + .. versionchanged:: 8.1 + This decorator can be applied without parentheses. + + .. versionchanged:: 8.0 + Added the :attr:`command_class` attribute. + """ + from .decorators import command + + func: t.Callable[..., t.Any] | None = None + + if args and callable(args[0]): + assert len(args) == 1 and not kwargs, ( + "Use 'command(**kwargs)(callable)' to provide arguments." + ) + (func,) = args + args = () + + if self.command_class and kwargs.get("cls") is None: + kwargs["cls"] = self.command_class + + def decorator(f: t.Callable[..., t.Any]) -> Command: + cmd: Command = command(*args, **kwargs)(f) + self.add_command(cmd) + return cmd + + if func is not None: + return decorator(func) + + return decorator + + @t.overload + def group(self, __func: t.Callable[..., t.Any]) -> Group: ... + + @t.overload + def group( + self, *args: t.Any, **kwargs: t.Any + ) -> t.Callable[[t.Callable[..., t.Any]], Group]: ... + + def group( + self, *args: t.Any, **kwargs: t.Any + ) -> t.Callable[[t.Callable[..., t.Any]], Group] | Group: + """A shortcut decorator for declaring and attaching a group to + the group. This takes the same arguments as :func:`group` and + immediately registers the created group with this group by + calling :meth:`add_command`. + + To customize the group class used, set the :attr:`group_class` + attribute. + + .. versionchanged:: 8.1 + This decorator can be applied without parentheses. + + .. versionchanged:: 8.0 + Added the :attr:`group_class` attribute. + """ + from .decorators import group + + func: t.Callable[..., t.Any] | None = None + + if args and callable(args[0]): + assert len(args) == 1 and not kwargs, ( + "Use 'group(**kwargs)(callable)' to provide arguments." + ) + (func,) = args + args = () + + if self.group_class is not None and kwargs.get("cls") is None: + if self.group_class is type: + kwargs["cls"] = type(self) + else: + kwargs["cls"] = self.group_class + + def decorator(f: t.Callable[..., t.Any]) -> Group: + cmd: Group = group(*args, **kwargs)(f) + self.add_command(cmd) + return cmd + + if func is not None: + return decorator(func) + + return decorator + + def result_callback(self, replace: bool = False) -> t.Callable[[F], F]: + """Adds a result callback to the command. By default if a + result callback is already registered this will chain them but + this can be disabled with the `replace` parameter. The result + callback is invoked with the return value of the subcommand + (or the list of return values from all subcommands if chaining + is enabled) as well as the parameters as they would be passed + to the main callback. + + Example:: + + @click.group() + @click.option('-i', '--input', default=23) + def cli(input): + return 42 + + @cli.result_callback() + def process_result(result, input): + return result + input + + :param replace: if set to `True` an already existing result + callback will be removed. + + .. versionchanged:: 8.0 + Renamed from ``resultcallback``. + + .. versionadded:: 3.0 + """ + + def decorator(f: F) -> F: + old_callback = self._result_callback + + if old_callback is None or replace: + self._result_callback = f + return f + + def function(value: t.Any, /, *args: t.Any, **kwargs: t.Any) -> t.Any: + inner = old_callback(value, *args, **kwargs) + return f(inner, *args, **kwargs) + + self._result_callback = rv = update_wrapper(t.cast(F, function), f) + return rv # type: ignore[return-value] + + return decorator + + def get_command(self, ctx: Context, cmd_name: str) -> Command | None: + """Given a context and a command name, this returns a :class:`Command` + object if it exists or returns ``None``. + """ + return self.commands.get(cmd_name) + + def list_commands(self, ctx: Context) -> list[str]: + """Returns a list of subcommand names in the order they should appear.""" + return sorted(self.commands) + + def collect_usage_pieces(self, ctx: Context) -> list[str]: + rv = super().collect_usage_pieces(ctx) + rv.append(self.subcommand_metavar) + return rv + + def format_options(self, ctx: Context, formatter: HelpFormatter) -> None: + super().format_options(ctx, formatter) + self.format_commands(ctx, formatter) + + def format_commands(self, ctx: Context, formatter: HelpFormatter) -> None: + """Extra format methods for multi methods that adds all the commands + after the options. + """ + commands = [] + for subcommand in self.list_commands(ctx): + cmd = self.get_command(ctx, subcommand) + # What is this, the tool lied about a command. Ignore it + if cmd is None: + continue + if cmd.hidden: + continue + + commands.append((subcommand, cmd)) + + # allow for 3 times the default spacing + if len(commands): + limit = formatter.width - 6 - max(len(cmd[0]) for cmd in commands) + + rows = [] + for subcommand, cmd in commands: + help = cmd.get_short_help_str(limit) + rows.append((subcommand, help)) + + if rows: + with formatter.section(_("Commands")): + formatter.write_dl(rows) + + def parse_args(self, ctx: Context, args: list[str]) -> list[str]: + if not args and self.no_args_is_help and not ctx.resilient_parsing: + raise NoArgsIsHelpError(ctx) + + rest = super().parse_args(ctx, args) + + if self.chain: + ctx._protected_args = rest + ctx.args = [] + elif rest: + ctx._protected_args, ctx.args = rest[:1], rest[1:] + + return ctx.args + + def invoke(self, ctx: Context) -> t.Any: + def _process_result(value: t.Any) -> t.Any: + if self._result_callback is not None: + value = ctx.invoke(self._result_callback, value, **ctx.params) + return value + + if not ctx._protected_args: + if self.invoke_without_command: + # No subcommand was invoked, so the result callback is + # invoked with the group return value for regular + # groups, or an empty list for chained groups. + with ctx: + rv = super().invoke(ctx) + return _process_result([] if self.chain else rv) + ctx.fail(_("Missing command.")) + + # Fetch args back out + args = [*ctx._protected_args, *ctx.args] + ctx.args = [] + ctx._protected_args = [] + + # If we're not in chain mode, we only allow the invocation of a + # single command but we also inform the current context about the + # name of the command to invoke. + if not self.chain: + # Make sure the context is entered so we do not clean up + # resources until the result processor has worked. + with ctx: + cmd_name, cmd, args = self.resolve_command(ctx, args) + assert cmd is not None + ctx.invoked_subcommand = cmd_name + super().invoke(ctx) + sub_ctx = cmd.make_context(cmd_name, args, parent=ctx) + with sub_ctx: + return _process_result(sub_ctx.command.invoke(sub_ctx)) + + # In chain mode we create the contexts step by step, but after the + # base command has been invoked. Because at that point we do not + # know the subcommands yet, the invoked subcommand attribute is + # set to ``*`` to inform the command that subcommands are executed + # but nothing else. + with ctx: + ctx.invoked_subcommand = "*" if args else None + super().invoke(ctx) + + # Otherwise we make every single context and invoke them in a + # chain. In that case the return value to the result processor + # is the list of all invoked subcommand's results. + contexts = [] + while args: + cmd_name, cmd, args = self.resolve_command(ctx, args) + assert cmd is not None + sub_ctx = cmd.make_context( + cmd_name, + args, + parent=ctx, + allow_extra_args=True, + allow_interspersed_args=False, + ) + contexts.append(sub_ctx) + args, sub_ctx.args = sub_ctx.args, [] + + rv = [] + for sub_ctx in contexts: + with sub_ctx: + rv.append(sub_ctx.command.invoke(sub_ctx)) + return _process_result(rv) + + def resolve_command( + self, ctx: Context, args: list[str] + ) -> tuple[str | None, Command | None, list[str]]: + cmd_name = make_str(args[0]) + original_cmd_name = cmd_name + + # Get the command + cmd = self.get_command(ctx, cmd_name) + + # If we can't find the command but there is a normalization + # function available, we try with that one. + if cmd is None and ctx.token_normalize_func is not None: + cmd_name = ctx.token_normalize_func(cmd_name) + cmd = self.get_command(ctx, cmd_name) + + # If we don't find the command we want to show an error message + # to the user that it was not provided. However, there is + # something else we should do: if the first argument looks like + # an option we want to kick off parsing again for arguments to + # resolve things like --help which now should go to the main + # place. + if cmd is None and not ctx.resilient_parsing: + if _split_opt(cmd_name)[0]: + self.parse_args(ctx, args) + ctx.fail(_("No such command {name!r}.").format(name=original_cmd_name)) + return cmd_name if cmd else None, cmd, args[1:] + + def shell_complete(self, ctx: Context, incomplete: str) -> list[CompletionItem]: + """Return a list of completions for the incomplete value. Looks + at the names of options, subcommands, and chained + multi-commands. + + :param ctx: Invocation context for this command. + :param incomplete: Value being completed. May be empty. + + .. versionadded:: 8.0 + """ + from click.shell_completion import CompletionItem + + results = [ + CompletionItem(name, help=command.get_short_help_str()) + for name, command in _complete_visible_commands(ctx, incomplete) + ] + results.extend(super().shell_complete(ctx, incomplete)) + return results + + +class _MultiCommand(Group, metaclass=_FakeSubclassCheck): + """ + .. deprecated:: 8.2 + Will be removed in Click 9.0. Use ``Group`` instead. + """ + + +class CommandCollection(Group): + """A :class:`Group` that looks up subcommands on other groups. If a command + is not found on this group, each registered source is checked in order. + Parameters on a source are not added to this group, and a source's callback + is not invoked when invoking its commands. In other words, this "flattens" + commands in many groups into this one group. + + :param name: The name of the group command. + :param sources: A list of :class:`Group` objects to look up commands from. + :param kwargs: Other arguments passed to :class:`Group`. + + .. versionchanged:: 8.2 + This is a subclass of ``Group``. Commands are looked up first on this + group, then each of its sources. + """ + + def __init__( + self, + name: str | None = None, + sources: list[Group] | None = None, + **kwargs: t.Any, + ) -> None: + super().__init__(name, **kwargs) + #: The list of registered groups. + self.sources: list[Group] = sources or [] + + def add_source(self, group: Group) -> None: + """Add a group as a source of commands.""" + self.sources.append(group) + + def get_command(self, ctx: Context, cmd_name: str) -> Command | None: + rv = super().get_command(ctx, cmd_name) + + if rv is not None: + return rv + + for source in self.sources: + rv = source.get_command(ctx, cmd_name) + + if rv is not None: + if self.chain: + _check_nested_chain(self, cmd_name, rv) + + return rv + + return None + + def list_commands(self, ctx: Context) -> list[str]: + rv: set[str] = set(super().list_commands(ctx)) + + for source in self.sources: + rv.update(source.list_commands(ctx)) + + return sorted(rv) + + +def _check_iter(value: t.Any) -> cabc.Iterator[t.Any]: + """Check if the value is iterable but not a string. Raises a type + error, or return an iterator over the value. + """ + if isinstance(value, str): + raise TypeError + + return iter(value) + + +class Parameter: + r"""A parameter to a command comes in two versions: they are either + :class:`Option`\s or :class:`Argument`\s. Other subclasses are currently + not supported by design as some of the internals for parsing are + intentionally not finalized. + + Some settings are supported by both options and arguments. + + :param param_decls: the parameter declarations for this option or + argument. This is a list of flags or argument + names. + :param type: the type that should be used. Either a :class:`ParamType` + or a Python type. The latter is converted into the former + automatically if supported. + :param required: controls if this is optional or not. + :param default: the default value if omitted. This can also be a callable, + in which case it's invoked when the default is needed + without any arguments. + :param callback: A function to further process or validate the value + after type conversion. It is called as ``f(ctx, param, value)`` + and must return the value. It is called for all sources, + including prompts. + :param nargs: the number of arguments to match. If not ``1`` the return + value is a tuple instead of single value. The default for + nargs is ``1`` (except if the type is a tuple, then it's + the arity of the tuple). If ``nargs=-1``, all remaining + parameters are collected. + :param metavar: how the value is represented in the help page. + :param expose_value: if this is `True` then the value is passed onwards + to the command callback and stored on the context, + otherwise it's skipped. + :param is_eager: eager values are processed before non eager ones. This + should not be set for arguments or it will inverse the + order of processing. + :param envvar: environment variable(s) that are used to provide a default value for + this parameter. This can be a string or a sequence of strings. If a sequence is + given, only the first non-empty environment variable is used for the parameter. + :param shell_complete: A function that returns custom shell + completions. Used instead of the param's type completion if + given. Takes ``ctx, param, incomplete`` and must return a list + of :class:`~click.shell_completion.CompletionItem` or a list of + strings. + :param deprecated: If ``True`` or non-empty string, issues a message + indicating that the argument is deprecated and highlights + its deprecation in --help. The message can be customized + by using a string as the value. A deprecated parameter + cannot be required, a ValueError will be raised otherwise. + + .. versionchanged:: 8.2.0 + Introduction of ``deprecated``. + + .. versionchanged:: 8.2 + Adding duplicate parameter names to a :class:`~click.core.Command` will + result in a ``UserWarning`` being shown. + + .. versionchanged:: 8.2 + Adding duplicate parameter names to a :class:`~click.core.Command` will + result in a ``UserWarning`` being shown. + + .. versionchanged:: 8.0 + ``process_value`` validates required parameters and bounded + ``nargs``, and invokes the parameter callback before returning + the value. This allows the callback to validate prompts. + ``full_process_value`` is removed. + + .. versionchanged:: 8.0 + ``autocompletion`` is renamed to ``shell_complete`` and has new + semantics described above. The old name is deprecated and will + be removed in 8.1, until then it will be wrapped to match the + new requirements. + + .. versionchanged:: 8.0 + For ``multiple=True, nargs>1``, the default must be a list of + tuples. + + .. versionchanged:: 8.0 + Setting a default is no longer required for ``nargs>1``, it will + default to ``None``. ``multiple=True`` or ``nargs=-1`` will + default to ``()``. + + .. versionchanged:: 7.1 + Empty environment variables are ignored rather than taking the + empty string value. This makes it possible for scripts to clear + variables if they can't unset them. + + .. versionchanged:: 2.0 + Changed signature for parameter callback to also be passed the + parameter. The old callback format will still work, but it will + raise a warning to give you a chance to migrate the code easier. + """ + + param_type_name = "parameter" + + def __init__( + self, + param_decls: cabc.Sequence[str] | None = None, + type: types.ParamType | t.Any | None = None, + required: bool = False, + # XXX The default historically embed two concepts: + # - the declaration of a Parameter object carrying the default (handy to + # arbitrage the default value of coupled Parameters sharing the same + # self.name, like flag options), + # - and the actual value of the default. + # It is confusing and is the source of many issues discussed in: + # https://github.com/pallets/click/pull/3030 + # In the future, we might think of splitting it in two, not unlike + # Option.is_flag and Option.flag_value: we could have something like + # Parameter.is_default and Parameter.default_value. + default: t.Any | t.Callable[[], t.Any] | None = UNSET, + callback: t.Callable[[Context, Parameter, t.Any], t.Any] | None = None, + nargs: int | None = None, + multiple: bool = False, + metavar: str | None = None, + expose_value: bool = True, + is_eager: bool = False, + envvar: str | cabc.Sequence[str] | None = None, + shell_complete: t.Callable[ + [Context, Parameter, str], list[CompletionItem] | list[str] + ] + | None = None, + deprecated: bool | str = False, + ) -> None: + self.name: str | None + self.opts: list[str] + self.secondary_opts: list[str] + self.name, self.opts, self.secondary_opts = self._parse_decls( + param_decls or (), expose_value + ) + self.type: types.ParamType = types.convert_type(type, default) + + # Default nargs to what the type tells us if we have that + # information available. + if nargs is None: + if self.type.is_composite: + nargs = self.type.arity + else: + nargs = 1 + + self.required = required + self.callback = callback + self.nargs = nargs + self.multiple = multiple + self.expose_value = expose_value + self.default: t.Any | t.Callable[[], t.Any] | None = default + self.is_eager = is_eager + self.metavar = metavar + self.envvar = envvar + self._custom_shell_complete = shell_complete + self.deprecated = deprecated + + if __debug__: + if self.type.is_composite and nargs != self.type.arity: + raise ValueError( + f"'nargs' must be {self.type.arity} (or None) for" + f" type {self.type!r}, but it was {nargs}." + ) + + if required and deprecated: + raise ValueError( + f"The {self.param_type_name} '{self.human_readable_name}' " + "is deprecated and still required. A deprecated " + f"{self.param_type_name} cannot be required." + ) + + def to_info_dict(self) -> dict[str, t.Any]: + """Gather information that could be useful for a tool generating + user-facing documentation. + + Use :meth:`click.Context.to_info_dict` to traverse the entire + CLI structure. + + .. versionchanged:: 8.3.0 + Returns ``None`` for the :attr:`default` if it was not set. + + .. versionadded:: 8.0 + """ + return { + "name": self.name, + "param_type_name": self.param_type_name, + "opts": self.opts, + "secondary_opts": self.secondary_opts, + "type": self.type.to_info_dict(), + "required": self.required, + "nargs": self.nargs, + "multiple": self.multiple, + # We explicitly hide the :attr:`UNSET` value to the user, as we choose to + # make it an implementation detail. And because ``to_info_dict`` has been + # designed for documentation purposes, we return ``None`` instead. + "default": self.default if self.default is not UNSET else None, + "envvar": self.envvar, + } + + def __repr__(self) -> str: + return f"<{self.__class__.__name__} {self.name}>" + + def _parse_decls( + self, decls: cabc.Sequence[str], expose_value: bool + ) -> tuple[str | None, list[str], list[str]]: + raise NotImplementedError() + + @property + def human_readable_name(self) -> str: + """Returns the human readable name of this parameter. This is the + same as the name for options, but the metavar for arguments. + """ + return self.name # type: ignore + + def make_metavar(self, ctx: Context) -> str: + if self.metavar is not None: + return self.metavar + + metavar = self.type.get_metavar(param=self, ctx=ctx) + + if metavar is None: + metavar = self.type.name.upper() + + if self.nargs != 1: + metavar += "..." + + return metavar + + @t.overload + def get_default( + self, ctx: Context, call: t.Literal[True] = True + ) -> t.Any | None: ... + + @t.overload + def get_default( + self, ctx: Context, call: bool = ... + ) -> t.Any | t.Callable[[], t.Any] | None: ... + + def get_default( + self, ctx: Context, call: bool = True + ) -> t.Any | t.Callable[[], t.Any] | None: + """Get the default for the parameter. Tries + :meth:`Context.lookup_default` first, then the local default. + + :param ctx: Current context. + :param call: If the default is a callable, call it. Disable to + return the callable instead. + + .. versionchanged:: 8.0.2 + Type casting is no longer performed when getting a default. + + .. versionchanged:: 8.0.1 + Type casting can fail in resilient parsing mode. Invalid + defaults will not prevent showing help text. + + .. versionchanged:: 8.0 + Looks at ``ctx.default_map`` first. + + .. versionchanged:: 8.0 + Added the ``call`` parameter. + """ + value = ctx.lookup_default(self.name, call=False) # type: ignore + + if value is UNSET: + value = self.default + + if call and callable(value): + value = value() + + return value + + def add_to_parser(self, parser: _OptionParser, ctx: Context) -> None: + raise NotImplementedError() + + def consume_value( + self, ctx: Context, opts: cabc.Mapping[str, t.Any] + ) -> tuple[t.Any, ParameterSource]: + """Returns the parameter value produced by the parser. + + If the parser did not produce a value from user input, the value is either + sourced from the environment variable, the default map, or the parameter's + default value. In that order of precedence. + + If no value is found, an internal sentinel value is returned. + + :meta private: + """ + # Collect from the parse the value passed by the user to the CLI. + value = opts.get(self.name, UNSET) # type: ignore + # If the value is set, it means it was sourced from the command line by the + # parser, otherwise it left unset by default. + source = ( + ParameterSource.COMMANDLINE + if value is not UNSET + else ParameterSource.DEFAULT + ) + + if value is UNSET: + envvar_value = self.value_from_envvar(ctx) + if envvar_value is not None: + value = envvar_value + source = ParameterSource.ENVIRONMENT + + if value is UNSET: + default_map_value = ctx.lookup_default(self.name) # type: ignore + if default_map_value is not UNSET: + value = default_map_value + source = ParameterSource.DEFAULT_MAP + + if value is UNSET: + default_value = self.get_default(ctx) + if default_value is not UNSET: + value = default_value + source = ParameterSource.DEFAULT + + return value, source + + def type_cast_value(self, ctx: Context, value: t.Any) -> t.Any: + """Convert and validate a value against the parameter's + :attr:`type`, :attr:`multiple`, and :attr:`nargs`. + """ + if value is None: + if self.multiple or self.nargs == -1: + return () + else: + return value + + def check_iter(value: t.Any) -> cabc.Iterator[t.Any]: + try: + return _check_iter(value) + except TypeError: + # This should only happen when passing in args manually, + # the parser should construct an iterable when parsing + # the command line. + raise BadParameter( + _("Value must be an iterable."), ctx=ctx, param=self + ) from None + + # Define the conversion function based on nargs and type. + + if self.nargs == 1 or self.type.is_composite: + + def convert(value: t.Any) -> t.Any: + return self.type(value, param=self, ctx=ctx) + + elif self.nargs == -1: + + def convert(value: t.Any) -> t.Any: # tuple[t.Any, ...] + return tuple(self.type(x, self, ctx) for x in check_iter(value)) + + else: # nargs > 1 + + def convert(value: t.Any) -> t.Any: # tuple[t.Any, ...] + value = tuple(check_iter(value)) + + if len(value) != self.nargs: + raise BadParameter( + ngettext( + "Takes {nargs} values but 1 was given.", + "Takes {nargs} values but {len} were given.", + len(value), + ).format(nargs=self.nargs, len=len(value)), + ctx=ctx, + param=self, + ) + + return tuple(self.type(x, self, ctx) for x in value) + + if self.multiple: + return tuple(convert(x) for x in check_iter(value)) + + return convert(value) + + def value_is_missing(self, value: t.Any) -> bool: + """A value is considered missing if: + + - it is :attr:`UNSET`, + - or if it is an empty sequence while the parameter is suppose to have + non-single value (i.e. :attr:`nargs` is not ``1`` or :attr:`multiple` is + set). + + :meta private: + """ + if value is UNSET: + return True + + if (self.nargs != 1 or self.multiple) and value == (): + return True + + return False + + def process_value(self, ctx: Context, value: t.Any) -> t.Any: + """Process the value of this parameter: + + 1. Type cast the value using :meth:`type_cast_value`. + 2. Check if the value is missing (see: :meth:`value_is_missing`), and raise + :exc:`MissingParameter` if it is required. + 3. If a :attr:`callback` is set, call it to have the value replaced by the + result of the callback. If the value was not set, the callback receive + ``None``. This keep the legacy behavior as it was before the introduction of + the :attr:`UNSET` sentinel. + + :meta private: + """ + # shelter `type_cast_value` from ever seeing an `UNSET` value by handling the + # cases in which `UNSET` gets special treatment explicitly at this layer + # + # Refs: + # https://github.com/pallets/click/issues/3069 + if value is UNSET: + if self.multiple or self.nargs == -1: + value = () + else: + value = self.type_cast_value(ctx, value) + + if self.required and self.value_is_missing(value): + raise MissingParameter(ctx=ctx, param=self) + + if self.callback is not None: + # Legacy case: UNSET is not exposed directly to the callback, but converted + # to None. + if value is UNSET: + value = None + + # Search for parameters with UNSET values in the context. + unset_keys = {k: None for k, v in ctx.params.items() if v is UNSET} + # No UNSET values, call the callback as usual. + if not unset_keys: + value = self.callback(ctx, self, value) + + # Legacy case: provide a temporarily manipulated context to the callback + # to hide UNSET values as None. + # + # Refs: + # https://github.com/pallets/click/issues/3136 + # https://github.com/pallets/click/pull/3137 + else: + # Add another layer to the context stack to clearly hint that the + # context is temporarily modified. + with ctx: + # Update the context parameters to replace UNSET with None. + ctx.params.update(unset_keys) + # Feed these fake context parameters to the callback. + value = self.callback(ctx, self, value) + # Restore the UNSET values in the context parameters. + ctx.params.update( + { + k: UNSET + for k in unset_keys + # Only restore keys that are present and still None, in case + # the callback modified other parameters. + if k in ctx.params and ctx.params[k] is None + } + ) + + return value + + def resolve_envvar_value(self, ctx: Context) -> str | None: + """Returns the value found in the environment variable(s) attached to this + parameter. + + Environment variables values are `always returned as strings + `_. + + This method returns ``None`` if: + + - the :attr:`envvar` property is not set on the :class:`Parameter`, + - the environment variable is not found in the environment, + - the variable is found in the environment but its value is empty (i.e. the + environment variable is present but has an empty string). + + If :attr:`envvar` is setup with multiple environment variables, + then only the first non-empty value is returned. + + .. caution:: + + The raw value extracted from the environment is not normalized and is + returned as-is. Any normalization or reconciliation is performed later by + the :class:`Parameter`'s :attr:`type`. + + :meta private: + """ + if not self.envvar: + return None + + if isinstance(self.envvar, str): + rv = os.environ.get(self.envvar) + + if rv: + return rv + else: + for envvar in self.envvar: + rv = os.environ.get(envvar) + + # Return the first non-empty value of the list of environment variables. + if rv: + return rv + # Else, absence of value is interpreted as an environment variable that + # is not set, so proceed to the next one. + + return None + + def value_from_envvar(self, ctx: Context) -> str | cabc.Sequence[str] | None: + """Process the raw environment variable string for this parameter. + + Returns the string as-is or splits it into a sequence of strings if the + parameter is expecting multiple values (i.e. its :attr:`nargs` property is set + to a value other than ``1``). + + :meta private: + """ + rv = self.resolve_envvar_value(ctx) + + if rv is not None and self.nargs != 1: + return self.type.split_envvar_value(rv) + + return rv + + def handle_parse_result( + self, ctx: Context, opts: cabc.Mapping[str, t.Any], args: list[str] + ) -> tuple[t.Any, list[str]]: + """Process the value produced by the parser from user input. + + Always process the value through the Parameter's :attr:`type`, wherever it + comes from. + + If the parameter is deprecated, this method warn the user about it. But only if + the value has been explicitly set by the user (and as such, is not coming from + a default). + + :meta private: + """ + with augment_usage_errors(ctx, param=self): + value, source = self.consume_value(ctx, opts) + + ctx.set_parameter_source(self.name, source) # type: ignore + + # Display a deprecation warning if necessary. + if ( + self.deprecated + and value is not UNSET + and source not in (ParameterSource.DEFAULT, ParameterSource.DEFAULT_MAP) + ): + extra_message = ( + f" {self.deprecated}" if isinstance(self.deprecated, str) else "" + ) + message = _( + "DeprecationWarning: The {param_type} {name!r} is deprecated." + "{extra_message}" + ).format( + param_type=self.param_type_name, + name=self.human_readable_name, + extra_message=extra_message, + ) + echo(style(message, fg="red"), err=True) + + # Process the value through the parameter's type. + try: + value = self.process_value(ctx, value) + except Exception: + if not ctx.resilient_parsing: + raise + # In resilient parsing mode, we do not want to fail the command if the + # value is incompatible with the parameter type, so we reset the value + # to UNSET, which will be interpreted as a missing value. + value = UNSET + + # Add parameter's value to the context. + if ( + self.expose_value + # We skip adding the value if it was previously set by another parameter + # targeting the same variable name. This prevents parameters competing for + # the same name to override each other. + and (self.name not in ctx.params or ctx.params[self.name] is UNSET) + ): + # Click is logically enforcing that the name is None if the parameter is + # not to be exposed. We still assert it here to please the type checker. + assert self.name is not None, ( + f"{self!r} parameter's name should not be None when exposing value." + ) + ctx.params[self.name] = value + + return value, args + + def get_help_record(self, ctx: Context) -> tuple[str, str] | None: + pass + + def get_usage_pieces(self, ctx: Context) -> list[str]: + return [] + + def get_error_hint(self, ctx: Context) -> str: + """Get a stringified version of the param for use in error messages to + indicate which param caused the error. + """ + hint_list = self.opts or [self.human_readable_name] + return " / ".join(f"'{x}'" for x in hint_list) + + def shell_complete(self, ctx: Context, incomplete: str) -> list[CompletionItem]: + """Return a list of completions for the incomplete value. If a + ``shell_complete`` function was given during init, it is used. + Otherwise, the :attr:`type` + :meth:`~click.types.ParamType.shell_complete` function is used. + + :param ctx: Invocation context for this command. + :param incomplete: Value being completed. May be empty. + + .. versionadded:: 8.0 + """ + if self._custom_shell_complete is not None: + results = self._custom_shell_complete(ctx, self, incomplete) + + if results and isinstance(results[0], str): + from click.shell_completion import CompletionItem + + results = [CompletionItem(c) for c in results] + + return t.cast("list[CompletionItem]", results) + + return self.type.shell_complete(ctx, self, incomplete) + + +class Option(Parameter): + """Options are usually optional values on the command line and + have some extra features that arguments don't have. + + All other parameters are passed onwards to the parameter constructor. + + :param show_default: Show the default value for this option in its + help text. Values are not shown by default, unless + :attr:`Context.show_default` is ``True``. If this value is a + string, it shows that string in parentheses instead of the + actual value. This is particularly useful for dynamic options. + For single option boolean flags, the default remains hidden if + its value is ``False``. + :param show_envvar: Controls if an environment variable should be + shown on the help page and error messages. + Normally, environment variables are not shown. + :param prompt: If set to ``True`` or a non empty string then the + user will be prompted for input. If set to ``True`` the prompt + will be the option name capitalized. A deprecated option cannot be + prompted. + :param confirmation_prompt: Prompt a second time to confirm the + value if it was prompted for. Can be set to a string instead of + ``True`` to customize the message. + :param prompt_required: If set to ``False``, the user will be + prompted for input only when the option was specified as a flag + without a value. + :param hide_input: If this is ``True`` then the input on the prompt + will be hidden from the user. This is useful for password input. + :param is_flag: forces this option to act as a flag. The default is + auto detection. + :param flag_value: which value should be used for this flag if it's + enabled. This is set to a boolean automatically if + the option string contains a slash to mark two options. + :param multiple: if this is set to `True` then the argument is accepted + multiple times and recorded. This is similar to ``nargs`` + in how it works but supports arbitrary number of + arguments. + :param count: this flag makes an option increment an integer. + :param allow_from_autoenv: if this is enabled then the value of this + parameter will be pulled from an environment + variable in case a prefix is defined on the + context. + :param help: the help string. + :param hidden: hide this option from help outputs. + :param attrs: Other command arguments described in :class:`Parameter`. + + .. versionchanged:: 8.2 + ``envvar`` used with ``flag_value`` will always use the ``flag_value``, + previously it would use the value of the environment variable. + + .. versionchanged:: 8.1 + Help text indentation is cleaned here instead of only in the + ``@option`` decorator. + + .. versionchanged:: 8.1 + The ``show_default`` parameter overrides + ``Context.show_default``. + + .. versionchanged:: 8.1 + The default of a single option boolean flag is not shown if the + default value is ``False``. + + .. versionchanged:: 8.0.1 + ``type`` is detected from ``flag_value`` if given. + """ + + param_type_name = "option" + + def __init__( + self, + param_decls: cabc.Sequence[str] | None = None, + show_default: bool | str | None = None, + prompt: bool | str = False, + confirmation_prompt: bool | str = False, + prompt_required: bool = True, + hide_input: bool = False, + is_flag: bool | None = None, + flag_value: t.Any = UNSET, + multiple: bool = False, + count: bool = False, + allow_from_autoenv: bool = True, + type: types.ParamType | t.Any | None = None, + help: str | None = None, + hidden: bool = False, + show_choices: bool = True, + show_envvar: bool = False, + deprecated: bool | str = False, + **attrs: t.Any, + ) -> None: + if help: + help = inspect.cleandoc(help) + + super().__init__( + param_decls, type=type, multiple=multiple, deprecated=deprecated, **attrs + ) + + if prompt is True: + if self.name is None: + raise TypeError("'name' is required with 'prompt=True'.") + + prompt_text: str | None = self.name.replace("_", " ").capitalize() + elif prompt is False: + prompt_text = None + else: + prompt_text = prompt + + if deprecated: + deprecated_message = ( + f"(DEPRECATED: {deprecated})" + if isinstance(deprecated, str) + else "(DEPRECATED)" + ) + help = help + deprecated_message if help is not None else deprecated_message + + self.prompt = prompt_text + self.confirmation_prompt = confirmation_prompt + self.prompt_required = prompt_required + self.hide_input = hide_input + self.hidden = hidden + + # The _flag_needs_value property tells the parser that this option is a flag + # that cannot be used standalone and needs a value. With this information, the + # parser can determine whether to consider the next user-provided argument in + # the CLI as a value for this flag or as a new option. + # If prompt is enabled but not required, then it opens the possibility for the + # option to gets its value from the user. + self._flag_needs_value = self.prompt is not None and not self.prompt_required + + # Auto-detect if this is a flag or not. + if is_flag is None: + # Implicitly a flag because flag_value was set. + if flag_value is not UNSET: + is_flag = True + # Not a flag, but when used as a flag it shows a prompt. + elif self._flag_needs_value: + is_flag = False + # Implicitly a flag because secondary options names were given. + elif self.secondary_opts: + is_flag = True + # The option is explicitly not a flag. But we do not know yet if it needs a + # value or not. So we look at the default value to determine it. + elif is_flag is False and not self._flag_needs_value: + self._flag_needs_value = self.default is UNSET + + if is_flag: + # Set missing default for flags if not explicitly required or prompted. + if self.default is UNSET and not self.required and not self.prompt: + if multiple: + self.default = () + + # Auto-detect the type of the flag based on the flag_value. + if type is None: + # A flag without a flag_value is a boolean flag. + if flag_value is UNSET: + self.type: types.ParamType = types.BoolParamType() + # If the flag value is a boolean, use BoolParamType. + elif isinstance(flag_value, bool): + self.type = types.BoolParamType() + # Otherwise, guess the type from the flag value. + else: + self.type = types.convert_type(None, flag_value) + + self.is_flag: bool = bool(is_flag) + self.is_bool_flag: bool = bool( + is_flag and isinstance(self.type, types.BoolParamType) + ) + self.flag_value: t.Any = flag_value + + # Set boolean flag default to False if unset and not required. + if self.is_bool_flag: + if self.default is UNSET and not self.required: + self.default = False + + # Support the special case of aligning the default value with the flag_value + # for flags whose default is explicitly set to True. Note that as long as we + # have this condition, there is no way a flag can have a default set to True, + # and a flag_value set to something else. Refs: + # https://github.com/pallets/click/issues/3024#issuecomment-3146199461 + # https://github.com/pallets/click/pull/3030/commits/06847da + if self.default is True and self.flag_value is not UNSET: + self.default = self.flag_value + + # Set the default flag_value if it is not set. + if self.flag_value is UNSET: + if self.is_flag: + self.flag_value = True + else: + self.flag_value = None + + # Counting. + self.count = count + if count: + if type is None: + self.type = types.IntRange(min=0) + if self.default is UNSET: + self.default = 0 + + self.allow_from_autoenv = allow_from_autoenv + self.help = help + self.show_default = show_default + self.show_choices = show_choices + self.show_envvar = show_envvar + + if __debug__: + if deprecated and prompt: + raise ValueError("`deprecated` options cannot use `prompt`.") + + if self.nargs == -1: + raise TypeError("nargs=-1 is not supported for options.") + + if not self.is_bool_flag and self.secondary_opts: + raise TypeError("Secondary flag is not valid for non-boolean flag.") + + if self.is_bool_flag and self.hide_input and self.prompt is not None: + raise TypeError( + "'prompt' with 'hide_input' is not valid for boolean flag." + ) + + if self.count: + if self.multiple: + raise TypeError("'count' is not valid with 'multiple'.") + + if self.is_flag: + raise TypeError("'count' is not valid with 'is_flag'.") + + def to_info_dict(self) -> dict[str, t.Any]: + """ + .. versionchanged:: 8.3.0 + Returns ``None`` for the :attr:`flag_value` if it was not set. + """ + info_dict = super().to_info_dict() + info_dict.update( + help=self.help, + prompt=self.prompt, + is_flag=self.is_flag, + # We explicitly hide the :attr:`UNSET` value to the user, as we choose to + # make it an implementation detail. And because ``to_info_dict`` has been + # designed for documentation purposes, we return ``None`` instead. + flag_value=self.flag_value if self.flag_value is not UNSET else None, + count=self.count, + hidden=self.hidden, + ) + return info_dict + + def get_error_hint(self, ctx: Context) -> str: + result = super().get_error_hint(ctx) + if self.show_envvar and self.envvar is not None: + result += f" (env var: '{self.envvar}')" + return result + + def _parse_decls( + self, decls: cabc.Sequence[str], expose_value: bool + ) -> tuple[str | None, list[str], list[str]]: + opts = [] + secondary_opts = [] + name = None + possible_names = [] + + for decl in decls: + if decl.isidentifier(): + if name is not None: + raise TypeError(f"Name '{name}' defined twice") + name = decl + else: + split_char = ";" if decl[:1] == "/" else "/" + if split_char in decl: + first, second = decl.split(split_char, 1) + first = first.rstrip() + if first: + possible_names.append(_split_opt(first)) + opts.append(first) + second = second.lstrip() + if second: + secondary_opts.append(second.lstrip()) + if first == second: + raise ValueError( + f"Boolean option {decl!r} cannot use the" + " same flag for true/false." + ) + else: + possible_names.append(_split_opt(decl)) + opts.append(decl) + + if name is None and possible_names: + possible_names.sort(key=lambda x: -len(x[0])) # group long options first + name = possible_names[0][1].replace("-", "_").lower() + if not name.isidentifier(): + name = None + + if name is None: + if not expose_value: + return None, opts, secondary_opts + raise TypeError( + f"Could not determine name for option with declarations {decls!r}" + ) + + if not opts and not secondary_opts: + raise TypeError( + f"No options defined but a name was passed ({name})." + " Did you mean to declare an argument instead? Did" + f" you mean to pass '--{name}'?" + ) + + return name, opts, secondary_opts + + def add_to_parser(self, parser: _OptionParser, ctx: Context) -> None: + if self.multiple: + action = "append" + elif self.count: + action = "count" + else: + action = "store" + + if self.is_flag: + action = f"{action}_const" + + if self.is_bool_flag and self.secondary_opts: + parser.add_option( + obj=self, opts=self.opts, dest=self.name, action=action, const=True + ) + parser.add_option( + obj=self, + opts=self.secondary_opts, + dest=self.name, + action=action, + const=False, + ) + else: + parser.add_option( + obj=self, + opts=self.opts, + dest=self.name, + action=action, + const=self.flag_value, + ) + else: + parser.add_option( + obj=self, + opts=self.opts, + dest=self.name, + action=action, + nargs=self.nargs, + ) + + def get_help_record(self, ctx: Context) -> tuple[str, str] | None: + if self.hidden: + return None + + any_prefix_is_slash = False + + def _write_opts(opts: cabc.Sequence[str]) -> str: + nonlocal any_prefix_is_slash + + rv, any_slashes = join_options(opts) + + if any_slashes: + any_prefix_is_slash = True + + if not self.is_flag and not self.count: + rv += f" {self.make_metavar(ctx=ctx)}" + + return rv + + rv = [_write_opts(self.opts)] + + if self.secondary_opts: + rv.append(_write_opts(self.secondary_opts)) + + help = self.help or "" + + extra = self.get_help_extra(ctx) + extra_items = [] + if "envvars" in extra: + extra_items.append( + _("env var: {var}").format(var=", ".join(extra["envvars"])) + ) + if "default" in extra: + extra_items.append(_("default: {default}").format(default=extra["default"])) + if "range" in extra: + extra_items.append(extra["range"]) + if "required" in extra: + extra_items.append(_(extra["required"])) + + if extra_items: + extra_str = "; ".join(extra_items) + help = f"{help} [{extra_str}]" if help else f"[{extra_str}]" + + return ("; " if any_prefix_is_slash else " / ").join(rv), help + + def get_help_extra(self, ctx: Context) -> types.OptionHelpExtra: + extra: types.OptionHelpExtra = {} + + if self.show_envvar: + envvar = self.envvar + + if envvar is None: + if ( + self.allow_from_autoenv + and ctx.auto_envvar_prefix is not None + and self.name is not None + ): + envvar = f"{ctx.auto_envvar_prefix}_{self.name.upper()}" + + if envvar is not None: + if isinstance(envvar, str): + extra["envvars"] = (envvar,) + else: + extra["envvars"] = tuple(str(d) for d in envvar) + + # Temporarily enable resilient parsing to avoid type casting + # failing for the default. Might be possible to extend this to + # help formatting in general. + resilient = ctx.resilient_parsing + ctx.resilient_parsing = True + + try: + default_value = self.get_default(ctx, call=False) + finally: + ctx.resilient_parsing = resilient + + show_default = False + show_default_is_str = False + + if self.show_default is not None: + if isinstance(self.show_default, str): + show_default_is_str = show_default = True + else: + show_default = self.show_default + elif ctx.show_default is not None: + show_default = ctx.show_default + + if show_default_is_str or ( + show_default and (default_value not in (None, UNSET)) + ): + if show_default_is_str: + default_string = f"({self.show_default})" + elif isinstance(default_value, (list, tuple)): + default_string = ", ".join(str(d) for d in default_value) + elif isinstance(default_value, enum.Enum): + default_string = default_value.name + elif inspect.isfunction(default_value): + default_string = _("(dynamic)") + elif self.is_bool_flag and self.secondary_opts: + # For boolean flags that have distinct True/False opts, + # use the opt without prefix instead of the value. + default_string = _split_opt( + (self.opts if default_value else self.secondary_opts)[0] + )[1] + elif self.is_bool_flag and not self.secondary_opts and not default_value: + default_string = "" + elif default_value == "": + default_string = '""' + else: + default_string = str(default_value) + + if default_string: + extra["default"] = default_string + + if ( + isinstance(self.type, types._NumberRangeBase) + # skip count with default range type + and not (self.count and self.type.min == 0 and self.type.max is None) + ): + range_str = self.type._describe_range() + + if range_str: + extra["range"] = range_str + + if self.required: + extra["required"] = "required" + + return extra + + def prompt_for_value(self, ctx: Context) -> t.Any: + """This is an alternative flow that can be activated in the full + value processing if a value does not exist. It will prompt the + user until a valid value exists and then returns the processed + value as result. + """ + assert self.prompt is not None + + # Calculate the default before prompting anything to lock in the value before + # attempting any user interaction. + default = self.get_default(ctx) + + # A boolean flag can use a simplified [y/n] confirmation prompt. + if self.is_bool_flag: + # If we have no boolean default, we force the user to explicitly provide + # one. + if default in (UNSET, None): + default = None + # Nothing prevent you to declare an option that is simultaneously: + # 1) auto-detected as a boolean flag, + # 2) allowed to prompt, and + # 3) still declare a non-boolean default. + # This forced casting into a boolean is necessary to align any non-boolean + # default to the prompt, which is going to be a [y/n]-style confirmation + # because the option is still a boolean flag. That way, instead of [y/n], + # we get [Y/n] or [y/N] depending on the truthy value of the default. + # Refs: https://github.com/pallets/click/pull/3030#discussion_r2289180249 + else: + default = bool(default) + return confirm(self.prompt, default) + + # If show_default is set to True/False, provide this to `prompt` as well. For + # non-bool values of `show_default`, we use `prompt`'s default behavior + prompt_kwargs: t.Any = {} + if isinstance(self.show_default, bool): + prompt_kwargs["show_default"] = self.show_default + + return prompt( + self.prompt, + # Use ``None`` to inform the prompt() function to reiterate until a valid + # value is provided by the user if we have no default. + default=None if default is UNSET else default, + type=self.type, + hide_input=self.hide_input, + show_choices=self.show_choices, + confirmation_prompt=self.confirmation_prompt, + value_proc=lambda x: self.process_value(ctx, x), + **prompt_kwargs, + ) + + def resolve_envvar_value(self, ctx: Context) -> str | None: + """:class:`Option` resolves its environment variable the same way as + :func:`Parameter.resolve_envvar_value`, but it also supports + :attr:`Context.auto_envvar_prefix`. If we could not find an environment from + the :attr:`envvar` property, we fallback on :attr:`Context.auto_envvar_prefix` + to build dynamiccaly the environment variable name using the + :python:`{ctx.auto_envvar_prefix}_{self.name.upper()}` template. + + :meta private: + """ + rv = super().resolve_envvar_value(ctx) + + if rv is not None: + return rv + + if ( + self.allow_from_autoenv + and ctx.auto_envvar_prefix is not None + and self.name is not None + ): + envvar = f"{ctx.auto_envvar_prefix}_{self.name.upper()}" + rv = os.environ.get(envvar) + + if rv: + return rv + + return None + + def value_from_envvar(self, ctx: Context) -> t.Any: + """For :class:`Option`, this method processes the raw environment variable + string the same way as :func:`Parameter.value_from_envvar` does. + + But in the case of non-boolean flags, the value is analyzed to determine if the + flag is activated or not, and returns a boolean of its activation, or the + :attr:`flag_value` if the latter is set. + + This method also takes care of repeated options (i.e. options with + :attr:`multiple` set to ``True``). + + :meta private: + """ + rv = self.resolve_envvar_value(ctx) + + # Absent environment variable or an empty string is interpreted as unset. + if rv is None: + return None + + # Non-boolean flags are more liberal in what they accept. But a flag being a + # flag, its envvar value still needs to be analyzed to determine if the flag is + # activated or not. + if self.is_flag and not self.is_bool_flag: + # If the flag_value is set and match the envvar value, return it + # directly. + if self.flag_value is not UNSET and rv == self.flag_value: + return self.flag_value + # Analyze the envvar value as a boolean to know if the flag is + # activated or not. + return types.BoolParamType.str_to_bool(rv) + + # Split the envvar value if it is allowed to be repeated. + value_depth = (self.nargs != 1) + bool(self.multiple) + if value_depth > 0: + multi_rv = self.type.split_envvar_value(rv) + if self.multiple and self.nargs != 1: + multi_rv = batch(multi_rv, self.nargs) # type: ignore[assignment] + + return multi_rv + + return rv + + def consume_value( + self, ctx: Context, opts: cabc.Mapping[str, Parameter] + ) -> tuple[t.Any, ParameterSource]: + """For :class:`Option`, the value can be collected from an interactive prompt + if the option is a flag that needs a value (and the :attr:`prompt` property is + set). + + Additionally, this method handles flag option that are activated without a + value, in which case the :attr:`flag_value` is returned. + + :meta private: + """ + value, source = super().consume_value(ctx, opts) + + # The parser will emit a sentinel value if the option is allowed to as a flag + # without a value. + if value is FLAG_NEEDS_VALUE: + # If the option allows for a prompt, we start an interaction with the user. + if self.prompt is not None and not ctx.resilient_parsing: + value = self.prompt_for_value(ctx) + source = ParameterSource.PROMPT + # Else the flag takes its flag_value as value. + else: + value = self.flag_value + source = ParameterSource.COMMANDLINE + + # A flag which is activated always returns the flag value, unless the value + # comes from the explicitly sets default. + elif ( + self.is_flag + and value is True + and not self.is_bool_flag + and source not in (ParameterSource.DEFAULT, ParameterSource.DEFAULT_MAP) + ): + value = self.flag_value + + # Re-interpret a multiple option which has been sent as-is by the parser. + # Here we replace each occurrence of value-less flags (marked by the + # FLAG_NEEDS_VALUE sentinel) with the flag_value. + elif ( + self.multiple + and value is not UNSET + and source not in (ParameterSource.DEFAULT, ParameterSource.DEFAULT_MAP) + and any(v is FLAG_NEEDS_VALUE for v in value) + ): + value = [self.flag_value if v is FLAG_NEEDS_VALUE else v for v in value] + source = ParameterSource.COMMANDLINE + + # The value wasn't set, or used the param's default, prompt for one to the user + # if prompting is enabled. + elif ( + ( + value is UNSET + or source in (ParameterSource.DEFAULT, ParameterSource.DEFAULT_MAP) + ) + and self.prompt is not None + and (self.required or self.prompt_required) + and not ctx.resilient_parsing + ): + value = self.prompt_for_value(ctx) + source = ParameterSource.PROMPT + + return value, source + + def process_value(self, ctx: Context, value: t.Any) -> t.Any: + # process_value has to be overridden on Options in order to capture + # `value == UNSET` cases before `type_cast_value()` gets called. + # + # Refs: + # https://github.com/pallets/click/issues/3069 + if self.is_flag and not self.required and self.is_bool_flag and value is UNSET: + value = False + + if self.callback is not None: + value = self.callback(ctx, self, value) + + return value + + # in the normal case, rely on Parameter.process_value + return super().process_value(ctx, value) + + +class Argument(Parameter): + """Arguments are positional parameters to a command. They generally + provide fewer features than options but can have infinite ``nargs`` + and are required by default. + + All parameters are passed onwards to the constructor of :class:`Parameter`. + """ + + param_type_name = "argument" + + def __init__( + self, + param_decls: cabc.Sequence[str], + required: bool | None = None, + **attrs: t.Any, + ) -> None: + # Auto-detect the requirement status of the argument if not explicitly set. + if required is None: + # The argument gets automatically required if it has no explicit default + # value set and is setup to match at least one value. + if attrs.get("default", UNSET) is UNSET: + required = attrs.get("nargs", 1) > 0 + # If the argument has a default value, it is not required. + else: + required = False + + if "multiple" in attrs: + raise TypeError("__init__() got an unexpected keyword argument 'multiple'.") + + super().__init__(param_decls, required=required, **attrs) + + @property + def human_readable_name(self) -> str: + if self.metavar is not None: + return self.metavar + return self.name.upper() # type: ignore + + def make_metavar(self, ctx: Context) -> str: + if self.metavar is not None: + return self.metavar + var = self.type.get_metavar(param=self, ctx=ctx) + if not var: + var = self.name.upper() # type: ignore + if self.deprecated: + var += "!" + if not self.required: + var = f"[{var}]" + if self.nargs != 1: + var += "..." + return var + + def _parse_decls( + self, decls: cabc.Sequence[str], expose_value: bool + ) -> tuple[str | None, list[str], list[str]]: + if not decls: + if not expose_value: + return None, [], [] + raise TypeError("Argument is marked as exposed, but does not have a name.") + if len(decls) == 1: + name = arg = decls[0] + name = name.replace("-", "_").lower() + else: + raise TypeError( + "Arguments take exactly one parameter declaration, got" + f" {len(decls)}: {decls}." + ) + return name, [arg], [] + + def get_usage_pieces(self, ctx: Context) -> list[str]: + return [self.make_metavar(ctx)] + + def get_error_hint(self, ctx: Context) -> str: + return f"'{self.make_metavar(ctx)}'" + + def add_to_parser(self, parser: _OptionParser, ctx: Context) -> None: + parser.add_argument(dest=self.name, nargs=self.nargs, obj=self) + + +def __getattr__(name: str) -> object: + import warnings + + if name == "BaseCommand": + warnings.warn( + "'BaseCommand' is deprecated and will be removed in Click 9.0. Use" + " 'Command' instead.", + DeprecationWarning, + stacklevel=2, + ) + return _BaseCommand + + if name == "MultiCommand": + warnings.warn( + "'MultiCommand' is deprecated and will be removed in Click 9.0. Use" + " 'Group' instead.", + DeprecationWarning, + stacklevel=2, + ) + return _MultiCommand + + raise AttributeError(name) diff --git a/venv/lib/python3.12/site-packages/click/decorators.py b/venv/lib/python3.12/site-packages/click/decorators.py new file mode 100644 index 0000000..21f4c34 --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/decorators.py @@ -0,0 +1,551 @@ +from __future__ import annotations + +import inspect +import typing as t +from functools import update_wrapper +from gettext import gettext as _ + +from .core import Argument +from .core import Command +from .core import Context +from .core import Group +from .core import Option +from .core import Parameter +from .globals import get_current_context +from .utils import echo + +if t.TYPE_CHECKING: + import typing_extensions as te + + P = te.ParamSpec("P") + +R = t.TypeVar("R") +T = t.TypeVar("T") +_AnyCallable = t.Callable[..., t.Any] +FC = t.TypeVar("FC", bound="_AnyCallable | Command") + + +def pass_context(f: t.Callable[te.Concatenate[Context, P], R]) -> t.Callable[P, R]: + """Marks a callback as wanting to receive the current context + object as first argument. + """ + + def new_func(*args: P.args, **kwargs: P.kwargs) -> R: + return f(get_current_context(), *args, **kwargs) + + return update_wrapper(new_func, f) + + +def pass_obj(f: t.Callable[te.Concatenate[T, P], R]) -> t.Callable[P, R]: + """Similar to :func:`pass_context`, but only pass the object on the + context onwards (:attr:`Context.obj`). This is useful if that object + represents the state of a nested system. + """ + + def new_func(*args: P.args, **kwargs: P.kwargs) -> R: + return f(get_current_context().obj, *args, **kwargs) + + return update_wrapper(new_func, f) + + +def make_pass_decorator( + object_type: type[T], ensure: bool = False +) -> t.Callable[[t.Callable[te.Concatenate[T, P], R]], t.Callable[P, R]]: + """Given an object type this creates a decorator that will work + similar to :func:`pass_obj` but instead of passing the object of the + current context, it will find the innermost context of type + :func:`object_type`. + + This generates a decorator that works roughly like this:: + + from functools import update_wrapper + + def decorator(f): + @pass_context + def new_func(ctx, *args, **kwargs): + obj = ctx.find_object(object_type) + return ctx.invoke(f, obj, *args, **kwargs) + return update_wrapper(new_func, f) + return decorator + + :param object_type: the type of the object to pass. + :param ensure: if set to `True`, a new object will be created and + remembered on the context if it's not there yet. + """ + + def decorator(f: t.Callable[te.Concatenate[T, P], R]) -> t.Callable[P, R]: + def new_func(*args: P.args, **kwargs: P.kwargs) -> R: + ctx = get_current_context() + + obj: T | None + if ensure: + obj = ctx.ensure_object(object_type) + else: + obj = ctx.find_object(object_type) + + if obj is None: + raise RuntimeError( + "Managed to invoke callback without a context" + f" object of type {object_type.__name__!r}" + " existing." + ) + + return ctx.invoke(f, obj, *args, **kwargs) + + return update_wrapper(new_func, f) + + return decorator + + +def pass_meta_key( + key: str, *, doc_description: str | None = None +) -> t.Callable[[t.Callable[te.Concatenate[T, P], R]], t.Callable[P, R]]: + """Create a decorator that passes a key from + :attr:`click.Context.meta` as the first argument to the decorated + function. + + :param key: Key in ``Context.meta`` to pass. + :param doc_description: Description of the object being passed, + inserted into the decorator's docstring. Defaults to "the 'key' + key from Context.meta". + + .. versionadded:: 8.0 + """ + + def decorator(f: t.Callable[te.Concatenate[T, P], R]) -> t.Callable[P, R]: + def new_func(*args: P.args, **kwargs: P.kwargs) -> R: + ctx = get_current_context() + obj = ctx.meta[key] + return ctx.invoke(f, obj, *args, **kwargs) + + return update_wrapper(new_func, f) + + if doc_description is None: + doc_description = f"the {key!r} key from :attr:`click.Context.meta`" + + decorator.__doc__ = ( + f"Decorator that passes {doc_description} as the first argument" + " to the decorated function." + ) + return decorator + + +CmdType = t.TypeVar("CmdType", bound=Command) + + +# variant: no call, directly as decorator for a function. +@t.overload +def command(name: _AnyCallable) -> Command: ... + + +# variant: with positional name and with positional or keyword cls argument: +# @command(namearg, CommandCls, ...) or @command(namearg, cls=CommandCls, ...) +@t.overload +def command( + name: str | None, + cls: type[CmdType], + **attrs: t.Any, +) -> t.Callable[[_AnyCallable], CmdType]: ... + + +# variant: name omitted, cls _must_ be a keyword argument, @command(cls=CommandCls, ...) +@t.overload +def command( + name: None = None, + *, + cls: type[CmdType], + **attrs: t.Any, +) -> t.Callable[[_AnyCallable], CmdType]: ... + + +# variant: with optional string name, no cls argument provided. +@t.overload +def command( + name: str | None = ..., cls: None = None, **attrs: t.Any +) -> t.Callable[[_AnyCallable], Command]: ... + + +def command( + name: str | _AnyCallable | None = None, + cls: type[CmdType] | None = None, + **attrs: t.Any, +) -> Command | t.Callable[[_AnyCallable], Command | CmdType]: + r"""Creates a new :class:`Command` and uses the decorated function as + callback. This will also automatically attach all decorated + :func:`option`\s and :func:`argument`\s as parameters to the command. + + The name of the command defaults to the name of the function, converted to + lowercase, with underscores ``_`` replaced by dashes ``-``, and the suffixes + ``_command``, ``_cmd``, ``_group``, and ``_grp`` are removed. For example, + ``init_data_command`` becomes ``init-data``. + + All keyword arguments are forwarded to the underlying command class. + For the ``params`` argument, any decorated params are appended to + the end of the list. + + Once decorated the function turns into a :class:`Command` instance + that can be invoked as a command line utility or be attached to a + command :class:`Group`. + + :param name: The name of the command. Defaults to modifying the function's + name as described above. + :param cls: The command class to create. Defaults to :class:`Command`. + + .. versionchanged:: 8.2 + The suffixes ``_command``, ``_cmd``, ``_group``, and ``_grp`` are + removed when generating the name. + + .. versionchanged:: 8.1 + This decorator can be applied without parentheses. + + .. versionchanged:: 8.1 + The ``params`` argument can be used. Decorated params are + appended to the end of the list. + """ + + func: t.Callable[[_AnyCallable], t.Any] | None = None + + if callable(name): + func = name + name = None + assert cls is None, "Use 'command(cls=cls)(callable)' to specify a class." + assert not attrs, "Use 'command(**kwargs)(callable)' to provide arguments." + + if cls is None: + cls = t.cast("type[CmdType]", Command) + + def decorator(f: _AnyCallable) -> CmdType: + if isinstance(f, Command): + raise TypeError("Attempted to convert a callback into a command twice.") + + attr_params = attrs.pop("params", None) + params = attr_params if attr_params is not None else [] + + try: + decorator_params = f.__click_params__ # type: ignore + except AttributeError: + pass + else: + del f.__click_params__ # type: ignore + params.extend(reversed(decorator_params)) + + if attrs.get("help") is None: + attrs["help"] = f.__doc__ + + if t.TYPE_CHECKING: + assert cls is not None + assert not callable(name) + + if name is not None: + cmd_name = name + else: + cmd_name = f.__name__.lower().replace("_", "-") + cmd_left, sep, suffix = cmd_name.rpartition("-") + + if sep and suffix in {"command", "cmd", "group", "grp"}: + cmd_name = cmd_left + + cmd = cls(name=cmd_name, callback=f, params=params, **attrs) + cmd.__doc__ = f.__doc__ + return cmd + + if func is not None: + return decorator(func) + + return decorator + + +GrpType = t.TypeVar("GrpType", bound=Group) + + +# variant: no call, directly as decorator for a function. +@t.overload +def group(name: _AnyCallable) -> Group: ... + + +# variant: with positional name and with positional or keyword cls argument: +# @group(namearg, GroupCls, ...) or @group(namearg, cls=GroupCls, ...) +@t.overload +def group( + name: str | None, + cls: type[GrpType], + **attrs: t.Any, +) -> t.Callable[[_AnyCallable], GrpType]: ... + + +# variant: name omitted, cls _must_ be a keyword argument, @group(cmd=GroupCls, ...) +@t.overload +def group( + name: None = None, + *, + cls: type[GrpType], + **attrs: t.Any, +) -> t.Callable[[_AnyCallable], GrpType]: ... + + +# variant: with optional string name, no cls argument provided. +@t.overload +def group( + name: str | None = ..., cls: None = None, **attrs: t.Any +) -> t.Callable[[_AnyCallable], Group]: ... + + +def group( + name: str | _AnyCallable | None = None, + cls: type[GrpType] | None = None, + **attrs: t.Any, +) -> Group | t.Callable[[_AnyCallable], Group | GrpType]: + """Creates a new :class:`Group` with a function as callback. This + works otherwise the same as :func:`command` just that the `cls` + parameter is set to :class:`Group`. + + .. versionchanged:: 8.1 + This decorator can be applied without parentheses. + """ + if cls is None: + cls = t.cast("type[GrpType]", Group) + + if callable(name): + return command(cls=cls, **attrs)(name) + + return command(name, cls, **attrs) + + +def _param_memo(f: t.Callable[..., t.Any], param: Parameter) -> None: + if isinstance(f, Command): + f.params.append(param) + else: + if not hasattr(f, "__click_params__"): + f.__click_params__ = [] # type: ignore + + f.__click_params__.append(param) # type: ignore + + +def argument( + *param_decls: str, cls: type[Argument] | None = None, **attrs: t.Any +) -> t.Callable[[FC], FC]: + """Attaches an argument to the command. All positional arguments are + passed as parameter declarations to :class:`Argument`; all keyword + arguments are forwarded unchanged (except ``cls``). + This is equivalent to creating an :class:`Argument` instance manually + and attaching it to the :attr:`Command.params` list. + + For the default argument class, refer to :class:`Argument` and + :class:`Parameter` for descriptions of parameters. + + :param cls: the argument class to instantiate. This defaults to + :class:`Argument`. + :param param_decls: Passed as positional arguments to the constructor of + ``cls``. + :param attrs: Passed as keyword arguments to the constructor of ``cls``. + """ + if cls is None: + cls = Argument + + def decorator(f: FC) -> FC: + _param_memo(f, cls(param_decls, **attrs)) + return f + + return decorator + + +def option( + *param_decls: str, cls: type[Option] | None = None, **attrs: t.Any +) -> t.Callable[[FC], FC]: + """Attaches an option to the command. All positional arguments are + passed as parameter declarations to :class:`Option`; all keyword + arguments are forwarded unchanged (except ``cls``). + This is equivalent to creating an :class:`Option` instance manually + and attaching it to the :attr:`Command.params` list. + + For the default option class, refer to :class:`Option` and + :class:`Parameter` for descriptions of parameters. + + :param cls: the option class to instantiate. This defaults to + :class:`Option`. + :param param_decls: Passed as positional arguments to the constructor of + ``cls``. + :param attrs: Passed as keyword arguments to the constructor of ``cls``. + """ + if cls is None: + cls = Option + + def decorator(f: FC) -> FC: + _param_memo(f, cls(param_decls, **attrs)) + return f + + return decorator + + +def confirmation_option(*param_decls: str, **kwargs: t.Any) -> t.Callable[[FC], FC]: + """Add a ``--yes`` option which shows a prompt before continuing if + not passed. If the prompt is declined, the program will exit. + + :param param_decls: One or more option names. Defaults to the single + value ``"--yes"``. + :param kwargs: Extra arguments are passed to :func:`option`. + """ + + def callback(ctx: Context, param: Parameter, value: bool) -> None: + if not value: + ctx.abort() + + if not param_decls: + param_decls = ("--yes",) + + kwargs.setdefault("is_flag", True) + kwargs.setdefault("callback", callback) + kwargs.setdefault("expose_value", False) + kwargs.setdefault("prompt", "Do you want to continue?") + kwargs.setdefault("help", "Confirm the action without prompting.") + return option(*param_decls, **kwargs) + + +def password_option(*param_decls: str, **kwargs: t.Any) -> t.Callable[[FC], FC]: + """Add a ``--password`` option which prompts for a password, hiding + input and asking to enter the value again for confirmation. + + :param param_decls: One or more option names. Defaults to the single + value ``"--password"``. + :param kwargs: Extra arguments are passed to :func:`option`. + """ + if not param_decls: + param_decls = ("--password",) + + kwargs.setdefault("prompt", True) + kwargs.setdefault("confirmation_prompt", True) + kwargs.setdefault("hide_input", True) + return option(*param_decls, **kwargs) + + +def version_option( + version: str | None = None, + *param_decls: str, + package_name: str | None = None, + prog_name: str | None = None, + message: str | None = None, + **kwargs: t.Any, +) -> t.Callable[[FC], FC]: + """Add a ``--version`` option which immediately prints the version + number and exits the program. + + If ``version`` is not provided, Click will try to detect it using + :func:`importlib.metadata.version` to get the version for the + ``package_name``. + + If ``package_name`` is not provided, Click will try to detect it by + inspecting the stack frames. This will be used to detect the + version, so it must match the name of the installed package. + + :param version: The version number to show. If not provided, Click + will try to detect it. + :param param_decls: One or more option names. Defaults to the single + value ``"--version"``. + :param package_name: The package name to detect the version from. If + not provided, Click will try to detect it. + :param prog_name: The name of the CLI to show in the message. If not + provided, it will be detected from the command. + :param message: The message to show. The values ``%(prog)s``, + ``%(package)s``, and ``%(version)s`` are available. Defaults to + ``"%(prog)s, version %(version)s"``. + :param kwargs: Extra arguments are passed to :func:`option`. + :raise RuntimeError: ``version`` could not be detected. + + .. versionchanged:: 8.0 + Add the ``package_name`` parameter, and the ``%(package)s`` + value for messages. + + .. versionchanged:: 8.0 + Use :mod:`importlib.metadata` instead of ``pkg_resources``. The + version is detected based on the package name, not the entry + point name. The Python package name must match the installed + package name, or be passed with ``package_name=``. + """ + if message is None: + message = _("%(prog)s, version %(version)s") + + if version is None and package_name is None: + frame = inspect.currentframe() + f_back = frame.f_back if frame is not None else None + f_globals = f_back.f_globals if f_back is not None else None + # break reference cycle + # https://docs.python.org/3/library/inspect.html#the-interpreter-stack + del frame + + if f_globals is not None: + package_name = f_globals.get("__name__") + + if package_name == "__main__": + package_name = f_globals.get("__package__") + + if package_name: + package_name = package_name.partition(".")[0] + + def callback(ctx: Context, param: Parameter, value: bool) -> None: + if not value or ctx.resilient_parsing: + return + + nonlocal prog_name + nonlocal version + + if prog_name is None: + prog_name = ctx.find_root().info_name + + if version is None and package_name is not None: + import importlib.metadata + + try: + version = importlib.metadata.version(package_name) + except importlib.metadata.PackageNotFoundError: + raise RuntimeError( + f"{package_name!r} is not installed. Try passing" + " 'package_name' instead." + ) from None + + if version is None: + raise RuntimeError( + f"Could not determine the version for {package_name!r} automatically." + ) + + echo( + message % {"prog": prog_name, "package": package_name, "version": version}, + color=ctx.color, + ) + ctx.exit() + + if not param_decls: + param_decls = ("--version",) + + kwargs.setdefault("is_flag", True) + kwargs.setdefault("expose_value", False) + kwargs.setdefault("is_eager", True) + kwargs.setdefault("help", _("Show the version and exit.")) + kwargs["callback"] = callback + return option(*param_decls, **kwargs) + + +def help_option(*param_decls: str, **kwargs: t.Any) -> t.Callable[[FC], FC]: + """Pre-configured ``--help`` option which immediately prints the help page + and exits the program. + + :param param_decls: One or more option names. Defaults to the single + value ``"--help"``. + :param kwargs: Extra arguments are passed to :func:`option`. + """ + + def show_help(ctx: Context, param: Parameter, value: bool) -> None: + """Callback that print the help page on ```` and exits.""" + if value and not ctx.resilient_parsing: + echo(ctx.get_help(), color=ctx.color) + ctx.exit() + + if not param_decls: + param_decls = ("--help",) + + kwargs.setdefault("is_flag", True) + kwargs.setdefault("expose_value", False) + kwargs.setdefault("is_eager", True) + kwargs.setdefault("help", _("Show this message and exit.")) + kwargs.setdefault("callback", show_help) + + return option(*param_decls, **kwargs) diff --git a/venv/lib/python3.12/site-packages/click/exceptions.py b/venv/lib/python3.12/site-packages/click/exceptions.py new file mode 100644 index 0000000..4d782ee --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/exceptions.py @@ -0,0 +1,308 @@ +from __future__ import annotations + +import collections.abc as cabc +import typing as t +from gettext import gettext as _ +from gettext import ngettext + +from ._compat import get_text_stderr +from .globals import resolve_color_default +from .utils import echo +from .utils import format_filename + +if t.TYPE_CHECKING: + from .core import Command + from .core import Context + from .core import Parameter + + +def _join_param_hints(param_hint: cabc.Sequence[str] | str | None) -> str | None: + if param_hint is not None and not isinstance(param_hint, str): + return " / ".join(repr(x) for x in param_hint) + + return param_hint + + +class ClickException(Exception): + """An exception that Click can handle and show to the user.""" + + #: The exit code for this exception. + exit_code = 1 + + def __init__(self, message: str) -> None: + super().__init__(message) + # The context will be removed by the time we print the message, so cache + # the color settings here to be used later on (in `show`) + self.show_color: bool | None = resolve_color_default() + self.message = message + + def format_message(self) -> str: + return self.message + + def __str__(self) -> str: + return self.message + + def show(self, file: t.IO[t.Any] | None = None) -> None: + if file is None: + file = get_text_stderr() + + echo( + _("Error: {message}").format(message=self.format_message()), + file=file, + color=self.show_color, + ) + + +class UsageError(ClickException): + """An internal exception that signals a usage error. This typically + aborts any further handling. + + :param message: the error message to display. + :param ctx: optionally the context that caused this error. Click will + fill in the context automatically in some situations. + """ + + exit_code = 2 + + def __init__(self, message: str, ctx: Context | None = None) -> None: + super().__init__(message) + self.ctx = ctx + self.cmd: Command | None = self.ctx.command if self.ctx else None + + def show(self, file: t.IO[t.Any] | None = None) -> None: + if file is None: + file = get_text_stderr() + color = None + hint = "" + if ( + self.ctx is not None + and self.ctx.command.get_help_option(self.ctx) is not None + ): + hint = _("Try '{command} {option}' for help.").format( + command=self.ctx.command_path, option=self.ctx.help_option_names[0] + ) + hint = f"{hint}\n" + if self.ctx is not None: + color = self.ctx.color + echo(f"{self.ctx.get_usage()}\n{hint}", file=file, color=color) + echo( + _("Error: {message}").format(message=self.format_message()), + file=file, + color=color, + ) + + +class BadParameter(UsageError): + """An exception that formats out a standardized error message for a + bad parameter. This is useful when thrown from a callback or type as + Click will attach contextual information to it (for instance, which + parameter it is). + + .. versionadded:: 2.0 + + :param param: the parameter object that caused this error. This can + be left out, and Click will attach this info itself + if possible. + :param param_hint: a string that shows up as parameter name. This + can be used as alternative to `param` in cases + where custom validation should happen. If it is + a string it's used as such, if it's a list then + each item is quoted and separated. + """ + + def __init__( + self, + message: str, + ctx: Context | None = None, + param: Parameter | None = None, + param_hint: cabc.Sequence[str] | str | None = None, + ) -> None: + super().__init__(message, ctx) + self.param = param + self.param_hint = param_hint + + def format_message(self) -> str: + if self.param_hint is not None: + param_hint = self.param_hint + elif self.param is not None: + param_hint = self.param.get_error_hint(self.ctx) # type: ignore + else: + return _("Invalid value: {message}").format(message=self.message) + + return _("Invalid value for {param_hint}: {message}").format( + param_hint=_join_param_hints(param_hint), message=self.message + ) + + +class MissingParameter(BadParameter): + """Raised if click required an option or argument but it was not + provided when invoking the script. + + .. versionadded:: 4.0 + + :param param_type: a string that indicates the type of the parameter. + The default is to inherit the parameter type from + the given `param`. Valid values are ``'parameter'``, + ``'option'`` or ``'argument'``. + """ + + def __init__( + self, + message: str | None = None, + ctx: Context | None = None, + param: Parameter | None = None, + param_hint: cabc.Sequence[str] | str | None = None, + param_type: str | None = None, + ) -> None: + super().__init__(message or "", ctx, param, param_hint) + self.param_type = param_type + + def format_message(self) -> str: + if self.param_hint is not None: + param_hint: cabc.Sequence[str] | str | None = self.param_hint + elif self.param is not None: + param_hint = self.param.get_error_hint(self.ctx) # type: ignore + else: + param_hint = None + + param_hint = _join_param_hints(param_hint) + param_hint = f" {param_hint}" if param_hint else "" + + param_type = self.param_type + if param_type is None and self.param is not None: + param_type = self.param.param_type_name + + msg = self.message + if self.param is not None: + msg_extra = self.param.type.get_missing_message( + param=self.param, ctx=self.ctx + ) + if msg_extra: + if msg: + msg += f". {msg_extra}" + else: + msg = msg_extra + + msg = f" {msg}" if msg else "" + + # Translate param_type for known types. + if param_type == "argument": + missing = _("Missing argument") + elif param_type == "option": + missing = _("Missing option") + elif param_type == "parameter": + missing = _("Missing parameter") + else: + missing = _("Missing {param_type}").format(param_type=param_type) + + return f"{missing}{param_hint}.{msg}" + + def __str__(self) -> str: + if not self.message: + param_name = self.param.name if self.param else None + return _("Missing parameter: {param_name}").format(param_name=param_name) + else: + return self.message + + +class NoSuchOption(UsageError): + """Raised if click attempted to handle an option that does not + exist. + + .. versionadded:: 4.0 + """ + + def __init__( + self, + option_name: str, + message: str | None = None, + possibilities: cabc.Sequence[str] | None = None, + ctx: Context | None = None, + ) -> None: + if message is None: + message = _("No such option: {name}").format(name=option_name) + + super().__init__(message, ctx) + self.option_name = option_name + self.possibilities = possibilities + + def format_message(self) -> str: + if not self.possibilities: + return self.message + + possibility_str = ", ".join(sorted(self.possibilities)) + suggest = ngettext( + "Did you mean {possibility}?", + "(Possible options: {possibilities})", + len(self.possibilities), + ).format(possibility=possibility_str, possibilities=possibility_str) + return f"{self.message} {suggest}" + + +class BadOptionUsage(UsageError): + """Raised if an option is generally supplied but the use of the option + was incorrect. This is for instance raised if the number of arguments + for an option is not correct. + + .. versionadded:: 4.0 + + :param option_name: the name of the option being used incorrectly. + """ + + def __init__( + self, option_name: str, message: str, ctx: Context | None = None + ) -> None: + super().__init__(message, ctx) + self.option_name = option_name + + +class BadArgumentUsage(UsageError): + """Raised if an argument is generally supplied but the use of the argument + was incorrect. This is for instance raised if the number of values + for an argument is not correct. + + .. versionadded:: 6.0 + """ + + +class NoArgsIsHelpError(UsageError): + def __init__(self, ctx: Context) -> None: + self.ctx: Context + super().__init__(ctx.get_help(), ctx=ctx) + + def show(self, file: t.IO[t.Any] | None = None) -> None: + echo(self.format_message(), file=file, err=True, color=self.ctx.color) + + +class FileError(ClickException): + """Raised if a file cannot be opened.""" + + def __init__(self, filename: str, hint: str | None = None) -> None: + if hint is None: + hint = _("unknown error") + + super().__init__(hint) + self.ui_filename: str = format_filename(filename) + self.filename = filename + + def format_message(self) -> str: + return _("Could not open file {filename!r}: {message}").format( + filename=self.ui_filename, message=self.message + ) + + +class Abort(RuntimeError): + """An internal signalling exception that signals Click to abort.""" + + +class Exit(RuntimeError): + """An exception that indicates that the application should exit with some + status code. + + :param code: the status code to exit with. + """ + + __slots__ = ("exit_code",) + + def __init__(self, code: int = 0) -> None: + self.exit_code: int = code diff --git a/venv/lib/python3.12/site-packages/click/formatting.py b/venv/lib/python3.12/site-packages/click/formatting.py new file mode 100644 index 0000000..0b64f83 --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/formatting.py @@ -0,0 +1,301 @@ +from __future__ import annotations + +import collections.abc as cabc +from contextlib import contextmanager +from gettext import gettext as _ + +from ._compat import term_len +from .parser import _split_opt + +# Can force a width. This is used by the test system +FORCED_WIDTH: int | None = None + + +def measure_table(rows: cabc.Iterable[tuple[str, str]]) -> tuple[int, ...]: + widths: dict[int, int] = {} + + for row in rows: + for idx, col in enumerate(row): + widths[idx] = max(widths.get(idx, 0), term_len(col)) + + return tuple(y for x, y in sorted(widths.items())) + + +def iter_rows( + rows: cabc.Iterable[tuple[str, str]], col_count: int +) -> cabc.Iterator[tuple[str, ...]]: + for row in rows: + yield row + ("",) * (col_count - len(row)) + + +def wrap_text( + text: str, + width: int = 78, + initial_indent: str = "", + subsequent_indent: str = "", + preserve_paragraphs: bool = False, +) -> str: + """A helper function that intelligently wraps text. By default, it + assumes that it operates on a single paragraph of text but if the + `preserve_paragraphs` parameter is provided it will intelligently + handle paragraphs (defined by two empty lines). + + If paragraphs are handled, a paragraph can be prefixed with an empty + line containing the ``\\b`` character (``\\x08``) to indicate that + no rewrapping should happen in that block. + + :param text: the text that should be rewrapped. + :param width: the maximum width for the text. + :param initial_indent: the initial indent that should be placed on the + first line as a string. + :param subsequent_indent: the indent string that should be placed on + each consecutive line. + :param preserve_paragraphs: if this flag is set then the wrapping will + intelligently handle paragraphs. + """ + from ._textwrap import TextWrapper + + text = text.expandtabs() + wrapper = TextWrapper( + width, + initial_indent=initial_indent, + subsequent_indent=subsequent_indent, + replace_whitespace=False, + ) + if not preserve_paragraphs: + return wrapper.fill(text) + + p: list[tuple[int, bool, str]] = [] + buf: list[str] = [] + indent = None + + def _flush_par() -> None: + if not buf: + return + if buf[0].strip() == "\b": + p.append((indent or 0, True, "\n".join(buf[1:]))) + else: + p.append((indent or 0, False, " ".join(buf))) + del buf[:] + + for line in text.splitlines(): + if not line: + _flush_par() + indent = None + else: + if indent is None: + orig_len = term_len(line) + line = line.lstrip() + indent = orig_len - term_len(line) + buf.append(line) + _flush_par() + + rv = [] + for indent, raw, text in p: + with wrapper.extra_indent(" " * indent): + if raw: + rv.append(wrapper.indent_only(text)) + else: + rv.append(wrapper.fill(text)) + + return "\n\n".join(rv) + + +class HelpFormatter: + """This class helps with formatting text-based help pages. It's + usually just needed for very special internal cases, but it's also + exposed so that developers can write their own fancy outputs. + + At present, it always writes into memory. + + :param indent_increment: the additional increment for each level. + :param width: the width for the text. This defaults to the terminal + width clamped to a maximum of 78. + """ + + def __init__( + self, + indent_increment: int = 2, + width: int | None = None, + max_width: int | None = None, + ) -> None: + self.indent_increment = indent_increment + if max_width is None: + max_width = 80 + if width is None: + import shutil + + width = FORCED_WIDTH + if width is None: + width = max(min(shutil.get_terminal_size().columns, max_width) - 2, 50) + self.width = width + self.current_indent: int = 0 + self.buffer: list[str] = [] + + def write(self, string: str) -> None: + """Writes a unicode string into the internal buffer.""" + self.buffer.append(string) + + def indent(self) -> None: + """Increases the indentation.""" + self.current_indent += self.indent_increment + + def dedent(self) -> None: + """Decreases the indentation.""" + self.current_indent -= self.indent_increment + + def write_usage(self, prog: str, args: str = "", prefix: str | None = None) -> None: + """Writes a usage line into the buffer. + + :param prog: the program name. + :param args: whitespace separated list of arguments. + :param prefix: The prefix for the first line. Defaults to + ``"Usage: "``. + """ + if prefix is None: + prefix = f"{_('Usage:')} " + + usage_prefix = f"{prefix:>{self.current_indent}}{prog} " + text_width = self.width - self.current_indent + + if text_width >= (term_len(usage_prefix) + 20): + # The arguments will fit to the right of the prefix. + indent = " " * term_len(usage_prefix) + self.write( + wrap_text( + args, + text_width, + initial_indent=usage_prefix, + subsequent_indent=indent, + ) + ) + else: + # The prefix is too long, put the arguments on the next line. + self.write(usage_prefix) + self.write("\n") + indent = " " * (max(self.current_indent, term_len(prefix)) + 4) + self.write( + wrap_text( + args, text_width, initial_indent=indent, subsequent_indent=indent + ) + ) + + self.write("\n") + + def write_heading(self, heading: str) -> None: + """Writes a heading into the buffer.""" + self.write(f"{'':>{self.current_indent}}{heading}:\n") + + def write_paragraph(self) -> None: + """Writes a paragraph into the buffer.""" + if self.buffer: + self.write("\n") + + def write_text(self, text: str) -> None: + """Writes re-indented text into the buffer. This rewraps and + preserves paragraphs. + """ + indent = " " * self.current_indent + self.write( + wrap_text( + text, + self.width, + initial_indent=indent, + subsequent_indent=indent, + preserve_paragraphs=True, + ) + ) + self.write("\n") + + def write_dl( + self, + rows: cabc.Sequence[tuple[str, str]], + col_max: int = 30, + col_spacing: int = 2, + ) -> None: + """Writes a definition list into the buffer. This is how options + and commands are usually formatted. + + :param rows: a list of two item tuples for the terms and values. + :param col_max: the maximum width of the first column. + :param col_spacing: the number of spaces between the first and + second column. + """ + rows = list(rows) + widths = measure_table(rows) + if len(widths) != 2: + raise TypeError("Expected two columns for definition list") + + first_col = min(widths[0], col_max) + col_spacing + + for first, second in iter_rows(rows, len(widths)): + self.write(f"{'':>{self.current_indent}}{first}") + if not second: + self.write("\n") + continue + if term_len(first) <= first_col - col_spacing: + self.write(" " * (first_col - term_len(first))) + else: + self.write("\n") + self.write(" " * (first_col + self.current_indent)) + + text_width = max(self.width - first_col - 2, 10) + wrapped_text = wrap_text(second, text_width, preserve_paragraphs=True) + lines = wrapped_text.splitlines() + + if lines: + self.write(f"{lines[0]}\n") + + for line in lines[1:]: + self.write(f"{'':>{first_col + self.current_indent}}{line}\n") + else: + self.write("\n") + + @contextmanager + def section(self, name: str) -> cabc.Iterator[None]: + """Helpful context manager that writes a paragraph, a heading, + and the indents. + + :param name: the section name that is written as heading. + """ + self.write_paragraph() + self.write_heading(name) + self.indent() + try: + yield + finally: + self.dedent() + + @contextmanager + def indentation(self) -> cabc.Iterator[None]: + """A context manager that increases the indentation.""" + self.indent() + try: + yield + finally: + self.dedent() + + def getvalue(self) -> str: + """Returns the buffer contents.""" + return "".join(self.buffer) + + +def join_options(options: cabc.Sequence[str]) -> tuple[str, bool]: + """Given a list of option strings this joins them in the most appropriate + way and returns them in the form ``(formatted_string, + any_prefix_is_slash)`` where the second item in the tuple is a flag that + indicates if any of the option prefixes was a slash. + """ + rv = [] + any_prefix_is_slash = False + + for opt in options: + prefix = _split_opt(opt)[0] + + if prefix == "/": + any_prefix_is_slash = True + + rv.append((len(prefix), opt)) + + rv.sort(key=lambda x: x[0]) + return ", ".join(x[1] for x in rv), any_prefix_is_slash diff --git a/venv/lib/python3.12/site-packages/click/globals.py b/venv/lib/python3.12/site-packages/click/globals.py new file mode 100644 index 0000000..a2f9172 --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/globals.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +import typing as t +from threading import local + +if t.TYPE_CHECKING: + from .core import Context + +_local = local() + + +@t.overload +def get_current_context(silent: t.Literal[False] = False) -> Context: ... + + +@t.overload +def get_current_context(silent: bool = ...) -> Context | None: ... + + +def get_current_context(silent: bool = False) -> Context | None: + """Returns the current click context. This can be used as a way to + access the current context object from anywhere. This is a more implicit + alternative to the :func:`pass_context` decorator. This function is + primarily useful for helpers such as :func:`echo` which might be + interested in changing its behavior based on the current context. + + To push the current context, :meth:`Context.scope` can be used. + + .. versionadded:: 5.0 + + :param silent: if set to `True` the return value is `None` if no context + is available. The default behavior is to raise a + :exc:`RuntimeError`. + """ + try: + return t.cast("Context", _local.stack[-1]) + except (AttributeError, IndexError) as e: + if not silent: + raise RuntimeError("There is no active click context.") from e + + return None + + +def push_context(ctx: Context) -> None: + """Pushes a new context to the current stack.""" + _local.__dict__.setdefault("stack", []).append(ctx) + + +def pop_context() -> None: + """Removes the top level from the stack.""" + _local.stack.pop() + + +def resolve_color_default(color: bool | None = None) -> bool | None: + """Internal helper to get the default value of the color flag. If a + value is passed it's returned unchanged, otherwise it's looked up from + the current context. + """ + if color is not None: + return color + + ctx = get_current_context(silent=True) + + if ctx is not None: + return ctx.color + + return None diff --git a/venv/lib/python3.12/site-packages/click/parser.py b/venv/lib/python3.12/site-packages/click/parser.py new file mode 100644 index 0000000..1ea1f71 --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/parser.py @@ -0,0 +1,532 @@ +""" +This module started out as largely a copy paste from the stdlib's +optparse module with the features removed that we do not need from +optparse because we implement them in Click on a higher level (for +instance type handling, help formatting and a lot more). + +The plan is to remove more and more from here over time. + +The reason this is a different module and not optparse from the stdlib +is that there are differences in 2.x and 3.x about the error messages +generated and optparse in the stdlib uses gettext for no good reason +and might cause us issues. + +Click uses parts of optparse written by Gregory P. Ward and maintained +by the Python Software Foundation. This is limited to code in parser.py. + +Copyright 2001-2006 Gregory P. Ward. All rights reserved. +Copyright 2002-2006 Python Software Foundation. All rights reserved. +""" + +# This code uses parts of optparse written by Gregory P. Ward and +# maintained by the Python Software Foundation. +# Copyright 2001-2006 Gregory P. Ward +# Copyright 2002-2006 Python Software Foundation +from __future__ import annotations + +import collections.abc as cabc +import typing as t +from collections import deque +from gettext import gettext as _ +from gettext import ngettext + +from ._utils import FLAG_NEEDS_VALUE +from ._utils import UNSET +from .exceptions import BadArgumentUsage +from .exceptions import BadOptionUsage +from .exceptions import NoSuchOption +from .exceptions import UsageError + +if t.TYPE_CHECKING: + from ._utils import T_FLAG_NEEDS_VALUE + from ._utils import T_UNSET + from .core import Argument as CoreArgument + from .core import Context + from .core import Option as CoreOption + from .core import Parameter as CoreParameter + +V = t.TypeVar("V") + + +def _unpack_args( + args: cabc.Sequence[str], nargs_spec: cabc.Sequence[int] +) -> tuple[cabc.Sequence[str | cabc.Sequence[str | None] | None], list[str]]: + """Given an iterable of arguments and an iterable of nargs specifications, + it returns a tuple with all the unpacked arguments at the first index + and all remaining arguments as the second. + + The nargs specification is the number of arguments that should be consumed + or `-1` to indicate that this position should eat up all the remainders. + + Missing items are filled with ``UNSET``. + """ + args = deque(args) + nargs_spec = deque(nargs_spec) + rv: list[str | tuple[str | T_UNSET, ...] | T_UNSET] = [] + spos: int | None = None + + def _fetch(c: deque[V]) -> V | T_UNSET: + try: + if spos is None: + return c.popleft() + else: + return c.pop() + except IndexError: + return UNSET + + while nargs_spec: + nargs = _fetch(nargs_spec) + + if nargs is None: + continue + + if nargs == 1: + rv.append(_fetch(args)) # type: ignore[arg-type] + elif nargs > 1: + x = [_fetch(args) for _ in range(nargs)] + + # If we're reversed, we're pulling in the arguments in reverse, + # so we need to turn them around. + if spos is not None: + x.reverse() + + rv.append(tuple(x)) + elif nargs < 0: + if spos is not None: + raise TypeError("Cannot have two nargs < 0") + + spos = len(rv) + rv.append(UNSET) + + # spos is the position of the wildcard (star). If it's not `None`, + # we fill it with the remainder. + if spos is not None: + rv[spos] = tuple(args) + args = [] + rv[spos + 1 :] = reversed(rv[spos + 1 :]) + + return tuple(rv), list(args) + + +def _split_opt(opt: str) -> tuple[str, str]: + first = opt[:1] + if first.isalnum(): + return "", opt + if opt[1:2] == first: + return opt[:2], opt[2:] + return first, opt[1:] + + +def _normalize_opt(opt: str, ctx: Context | None) -> str: + if ctx is None or ctx.token_normalize_func is None: + return opt + prefix, opt = _split_opt(opt) + return f"{prefix}{ctx.token_normalize_func(opt)}" + + +class _Option: + def __init__( + self, + obj: CoreOption, + opts: cabc.Sequence[str], + dest: str | None, + action: str | None = None, + nargs: int = 1, + const: t.Any | None = None, + ): + self._short_opts = [] + self._long_opts = [] + self.prefixes: set[str] = set() + + for opt in opts: + prefix, value = _split_opt(opt) + if not prefix: + raise ValueError(f"Invalid start character for option ({opt})") + self.prefixes.add(prefix[0]) + if len(prefix) == 1 and len(value) == 1: + self._short_opts.append(opt) + else: + self._long_opts.append(opt) + self.prefixes.add(prefix) + + if action is None: + action = "store" + + self.dest = dest + self.action = action + self.nargs = nargs + self.const = const + self.obj = obj + + @property + def takes_value(self) -> bool: + return self.action in ("store", "append") + + def process(self, value: t.Any, state: _ParsingState) -> None: + if self.action == "store": + state.opts[self.dest] = value # type: ignore + elif self.action == "store_const": + state.opts[self.dest] = self.const # type: ignore + elif self.action == "append": + state.opts.setdefault(self.dest, []).append(value) # type: ignore + elif self.action == "append_const": + state.opts.setdefault(self.dest, []).append(self.const) # type: ignore + elif self.action == "count": + state.opts[self.dest] = state.opts.get(self.dest, 0) + 1 # type: ignore + else: + raise ValueError(f"unknown action '{self.action}'") + state.order.append(self.obj) + + +class _Argument: + def __init__(self, obj: CoreArgument, dest: str | None, nargs: int = 1): + self.dest = dest + self.nargs = nargs + self.obj = obj + + def process( + self, + value: str | cabc.Sequence[str | None] | None | T_UNSET, + state: _ParsingState, + ) -> None: + if self.nargs > 1: + assert isinstance(value, cabc.Sequence) + holes = sum(1 for x in value if x is UNSET) + if holes == len(value): + value = UNSET + elif holes != 0: + raise BadArgumentUsage( + _("Argument {name!r} takes {nargs} values.").format( + name=self.dest, nargs=self.nargs + ) + ) + + # We failed to collect any argument value so we consider the argument as unset. + if value == (): + value = UNSET + + state.opts[self.dest] = value # type: ignore + state.order.append(self.obj) + + +class _ParsingState: + def __init__(self, rargs: list[str]) -> None: + self.opts: dict[str, t.Any] = {} + self.largs: list[str] = [] + self.rargs = rargs + self.order: list[CoreParameter] = [] + + +class _OptionParser: + """The option parser is an internal class that is ultimately used to + parse options and arguments. It's modelled after optparse and brings + a similar but vastly simplified API. It should generally not be used + directly as the high level Click classes wrap it for you. + + It's not nearly as extensible as optparse or argparse as it does not + implement features that are implemented on a higher level (such as + types or defaults). + + :param ctx: optionally the :class:`~click.Context` where this parser + should go with. + + .. deprecated:: 8.2 + Will be removed in Click 9.0. + """ + + def __init__(self, ctx: Context | None = None) -> None: + #: The :class:`~click.Context` for this parser. This might be + #: `None` for some advanced use cases. + self.ctx = ctx + #: This controls how the parser deals with interspersed arguments. + #: If this is set to `False`, the parser will stop on the first + #: non-option. Click uses this to implement nested subcommands + #: safely. + self.allow_interspersed_args: bool = True + #: This tells the parser how to deal with unknown options. By + #: default it will error out (which is sensible), but there is a + #: second mode where it will ignore it and continue processing + #: after shifting all the unknown options into the resulting args. + self.ignore_unknown_options: bool = False + + if ctx is not None: + self.allow_interspersed_args = ctx.allow_interspersed_args + self.ignore_unknown_options = ctx.ignore_unknown_options + + self._short_opt: dict[str, _Option] = {} + self._long_opt: dict[str, _Option] = {} + self._opt_prefixes = {"-", "--"} + self._args: list[_Argument] = [] + + def add_option( + self, + obj: CoreOption, + opts: cabc.Sequence[str], + dest: str | None, + action: str | None = None, + nargs: int = 1, + const: t.Any | None = None, + ) -> None: + """Adds a new option named `dest` to the parser. The destination + is not inferred (unlike with optparse) and needs to be explicitly + provided. Action can be any of ``store``, ``store_const``, + ``append``, ``append_const`` or ``count``. + + The `obj` can be used to identify the option in the order list + that is returned from the parser. + """ + opts = [_normalize_opt(opt, self.ctx) for opt in opts] + option = _Option(obj, opts, dest, action=action, nargs=nargs, const=const) + self._opt_prefixes.update(option.prefixes) + for opt in option._short_opts: + self._short_opt[opt] = option + for opt in option._long_opts: + self._long_opt[opt] = option + + def add_argument(self, obj: CoreArgument, dest: str | None, nargs: int = 1) -> None: + """Adds a positional argument named `dest` to the parser. + + The `obj` can be used to identify the option in the order list + that is returned from the parser. + """ + self._args.append(_Argument(obj, dest=dest, nargs=nargs)) + + def parse_args( + self, args: list[str] + ) -> tuple[dict[str, t.Any], list[str], list[CoreParameter]]: + """Parses positional arguments and returns ``(values, args, order)`` + for the parsed options and arguments as well as the leftover + arguments if there are any. The order is a list of objects as they + appear on the command line. If arguments appear multiple times they + will be memorized multiple times as well. + """ + state = _ParsingState(args) + try: + self._process_args_for_options(state) + self._process_args_for_args(state) + except UsageError: + if self.ctx is None or not self.ctx.resilient_parsing: + raise + return state.opts, state.largs, state.order + + def _process_args_for_args(self, state: _ParsingState) -> None: + pargs, args = _unpack_args( + state.largs + state.rargs, [x.nargs for x in self._args] + ) + + for idx, arg in enumerate(self._args): + arg.process(pargs[idx], state) + + state.largs = args + state.rargs = [] + + def _process_args_for_options(self, state: _ParsingState) -> None: + while state.rargs: + arg = state.rargs.pop(0) + arglen = len(arg) + # Double dashes always handled explicitly regardless of what + # prefixes are valid. + if arg == "--": + return + elif arg[:1] in self._opt_prefixes and arglen > 1: + self._process_opts(arg, state) + elif self.allow_interspersed_args: + state.largs.append(arg) + else: + state.rargs.insert(0, arg) + return + + # Say this is the original argument list: + # [arg0, arg1, ..., arg(i-1), arg(i), arg(i+1), ..., arg(N-1)] + # ^ + # (we are about to process arg(i)). + # + # Then rargs is [arg(i), ..., arg(N-1)] and largs is a *subset* of + # [arg0, ..., arg(i-1)] (any options and their arguments will have + # been removed from largs). + # + # The while loop will usually consume 1 or more arguments per pass. + # If it consumes 1 (eg. arg is an option that takes no arguments), + # then after _process_arg() is done the situation is: + # + # largs = subset of [arg0, ..., arg(i)] + # rargs = [arg(i+1), ..., arg(N-1)] + # + # If allow_interspersed_args is false, largs will always be + # *empty* -- still a subset of [arg0, ..., arg(i-1)], but + # not a very interesting subset! + + def _match_long_opt( + self, opt: str, explicit_value: str | None, state: _ParsingState + ) -> None: + if opt not in self._long_opt: + from difflib import get_close_matches + + possibilities = get_close_matches(opt, self._long_opt) + raise NoSuchOption(opt, possibilities=possibilities, ctx=self.ctx) + + option = self._long_opt[opt] + if option.takes_value: + # At this point it's safe to modify rargs by injecting the + # explicit value, because no exception is raised in this + # branch. This means that the inserted value will be fully + # consumed. + if explicit_value is not None: + state.rargs.insert(0, explicit_value) + + value = self._get_value_from_state(opt, option, state) + + elif explicit_value is not None: + raise BadOptionUsage( + opt, _("Option {name!r} does not take a value.").format(name=opt) + ) + + else: + value = UNSET + + option.process(value, state) + + def _match_short_opt(self, arg: str, state: _ParsingState) -> None: + stop = False + i = 1 + prefix = arg[0] + unknown_options = [] + + for ch in arg[1:]: + opt = _normalize_opt(f"{prefix}{ch}", self.ctx) + option = self._short_opt.get(opt) + i += 1 + + if not option: + if self.ignore_unknown_options: + unknown_options.append(ch) + continue + raise NoSuchOption(opt, ctx=self.ctx) + if option.takes_value: + # Any characters left in arg? Pretend they're the + # next arg, and stop consuming characters of arg. + if i < len(arg): + state.rargs.insert(0, arg[i:]) + stop = True + + value = self._get_value_from_state(opt, option, state) + + else: + value = UNSET + + option.process(value, state) + + if stop: + break + + # If we got any unknown options we recombine the string of the + # remaining options and re-attach the prefix, then report that + # to the state as new larg. This way there is basic combinatorics + # that can be achieved while still ignoring unknown arguments. + if self.ignore_unknown_options and unknown_options: + state.largs.append(f"{prefix}{''.join(unknown_options)}") + + def _get_value_from_state( + self, option_name: str, option: _Option, state: _ParsingState + ) -> str | cabc.Sequence[str] | T_FLAG_NEEDS_VALUE: + nargs = option.nargs + + value: str | cabc.Sequence[str] | T_FLAG_NEEDS_VALUE + + if len(state.rargs) < nargs: + if option.obj._flag_needs_value: + # Option allows omitting the value. + value = FLAG_NEEDS_VALUE + else: + raise BadOptionUsage( + option_name, + ngettext( + "Option {name!r} requires an argument.", + "Option {name!r} requires {nargs} arguments.", + nargs, + ).format(name=option_name, nargs=nargs), + ) + elif nargs == 1: + next_rarg = state.rargs[0] + + if ( + option.obj._flag_needs_value + and isinstance(next_rarg, str) + and next_rarg[:1] in self._opt_prefixes + and len(next_rarg) > 1 + ): + # The next arg looks like the start of an option, don't + # use it as the value if omitting the value is allowed. + value = FLAG_NEEDS_VALUE + else: + value = state.rargs.pop(0) + else: + value = tuple(state.rargs[:nargs]) + del state.rargs[:nargs] + + return value + + def _process_opts(self, arg: str, state: _ParsingState) -> None: + explicit_value = None + # Long option handling happens in two parts. The first part is + # supporting explicitly attached values. In any case, we will try + # to long match the option first. + if "=" in arg: + long_opt, explicit_value = arg.split("=", 1) + else: + long_opt = arg + norm_long_opt = _normalize_opt(long_opt, self.ctx) + + # At this point we will match the (assumed) long option through + # the long option matching code. Note that this allows options + # like "-foo" to be matched as long options. + try: + self._match_long_opt(norm_long_opt, explicit_value, state) + except NoSuchOption: + # At this point the long option matching failed, and we need + # to try with short options. However there is a special rule + # which says, that if we have a two character options prefix + # (applies to "--foo" for instance), we do not dispatch to the + # short option code and will instead raise the no option + # error. + if arg[:2] not in self._opt_prefixes: + self._match_short_opt(arg, state) + return + + if not self.ignore_unknown_options: + raise + + state.largs.append(arg) + + +def __getattr__(name: str) -> object: + import warnings + + if name in { + "OptionParser", + "Argument", + "Option", + "split_opt", + "normalize_opt", + "ParsingState", + }: + warnings.warn( + f"'parser.{name}' is deprecated and will be removed in Click 9.0." + " The old parser is available in 'optparse'.", + DeprecationWarning, + stacklevel=2, + ) + return globals()[f"_{name}"] + + if name == "split_arg_string": + from .shell_completion import split_arg_string + + warnings.warn( + "Importing 'parser.split_arg_string' is deprecated, it will only be" + " available in 'shell_completion' in Click 9.0.", + DeprecationWarning, + stacklevel=2, + ) + return split_arg_string + + raise AttributeError(name) diff --git a/venv/lib/python3.12/site-packages/click/py.typed b/venv/lib/python3.12/site-packages/click/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/venv/lib/python3.12/site-packages/click/shell_completion.py b/venv/lib/python3.12/site-packages/click/shell_completion.py new file mode 100644 index 0000000..8f1564c --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/shell_completion.py @@ -0,0 +1,667 @@ +from __future__ import annotations + +import collections.abc as cabc +import os +import re +import typing as t +from gettext import gettext as _ + +from .core import Argument +from .core import Command +from .core import Context +from .core import Group +from .core import Option +from .core import Parameter +from .core import ParameterSource +from .utils import echo + + +def shell_complete( + cli: Command, + ctx_args: cabc.MutableMapping[str, t.Any], + prog_name: str, + complete_var: str, + instruction: str, +) -> int: + """Perform shell completion for the given CLI program. + + :param cli: Command being called. + :param ctx_args: Extra arguments to pass to + ``cli.make_context``. + :param prog_name: Name of the executable in the shell. + :param complete_var: Name of the environment variable that holds + the completion instruction. + :param instruction: Value of ``complete_var`` with the completion + instruction and shell, in the form ``instruction_shell``. + :return: Status code to exit with. + """ + shell, _, instruction = instruction.partition("_") + comp_cls = get_completion_class(shell) + + if comp_cls is None: + return 1 + + comp = comp_cls(cli, ctx_args, prog_name, complete_var) + + if instruction == "source": + echo(comp.source()) + return 0 + + if instruction == "complete": + echo(comp.complete()) + return 0 + + return 1 + + +class CompletionItem: + """Represents a completion value and metadata about the value. The + default metadata is ``type`` to indicate special shell handling, + and ``help`` if a shell supports showing a help string next to the + value. + + Arbitrary parameters can be passed when creating the object, and + accessed using ``item.attr``. If an attribute wasn't passed, + accessing it returns ``None``. + + :param value: The completion suggestion. + :param type: Tells the shell script to provide special completion + support for the type. Click uses ``"dir"`` and ``"file"``. + :param help: String shown next to the value if supported. + :param kwargs: Arbitrary metadata. The built-in implementations + don't use this, but custom type completions paired with custom + shell support could use it. + """ + + __slots__ = ("value", "type", "help", "_info") + + def __init__( + self, + value: t.Any, + type: str = "plain", + help: str | None = None, + **kwargs: t.Any, + ) -> None: + self.value: t.Any = value + self.type: str = type + self.help: str | None = help + self._info = kwargs + + def __getattr__(self, name: str) -> t.Any: + return self._info.get(name) + + +# Only Bash >= 4.4 has the nosort option. +_SOURCE_BASH = """\ +%(complete_func)s() { + local IFS=$'\\n' + local response + + response=$(env COMP_WORDS="${COMP_WORDS[*]}" COMP_CWORD=$COMP_CWORD \ +%(complete_var)s=bash_complete $1) + + for completion in $response; do + IFS=',' read type value <<< "$completion" + + if [[ $type == 'dir' ]]; then + COMPREPLY=() + compopt -o dirnames + elif [[ $type == 'file' ]]; then + COMPREPLY=() + compopt -o default + elif [[ $type == 'plain' ]]; then + COMPREPLY+=($value) + fi + done + + return 0 +} + +%(complete_func)s_setup() { + complete -o nosort -F %(complete_func)s %(prog_name)s +} + +%(complete_func)s_setup; +""" + +# See ZshComplete.format_completion below, and issue #2703, before +# changing this script. +# +# (TL;DR: _describe is picky about the format, but this Zsh script snippet +# is already widely deployed. So freeze this script, and use clever-ish +# handling of colons in ZshComplet.format_completion.) +_SOURCE_ZSH = """\ +#compdef %(prog_name)s + +%(complete_func)s() { + local -a completions + local -a completions_with_descriptions + local -a response + (( ! $+commands[%(prog_name)s] )) && return 1 + + response=("${(@f)$(env COMP_WORDS="${words[*]}" COMP_CWORD=$((CURRENT-1)) \ +%(complete_var)s=zsh_complete %(prog_name)s)}") + + for type key descr in ${response}; do + if [[ "$type" == "plain" ]]; then + if [[ "$descr" == "_" ]]; then + completions+=("$key") + else + completions_with_descriptions+=("$key":"$descr") + fi + elif [[ "$type" == "dir" ]]; then + _path_files -/ + elif [[ "$type" == "file" ]]; then + _path_files -f + fi + done + + if [ -n "$completions_with_descriptions" ]; then + _describe -V unsorted completions_with_descriptions -U + fi + + if [ -n "$completions" ]; then + compadd -U -V unsorted -a completions + fi +} + +if [[ $zsh_eval_context[-1] == loadautofunc ]]; then + # autoload from fpath, call function directly + %(complete_func)s "$@" +else + # eval/source/. command, register function for later + compdef %(complete_func)s %(prog_name)s +fi +""" + +_SOURCE_FISH = """\ +function %(complete_func)s; + set -l response (env %(complete_var)s=fish_complete COMP_WORDS=(commandline -cp) \ +COMP_CWORD=(commandline -t) %(prog_name)s); + + for completion in $response; + set -l metadata (string split "," $completion); + + if test $metadata[1] = "dir"; + __fish_complete_directories $metadata[2]; + else if test $metadata[1] = "file"; + __fish_complete_path $metadata[2]; + else if test $metadata[1] = "plain"; + echo $metadata[2]; + end; + end; +end; + +complete --no-files --command %(prog_name)s --arguments \ +"(%(complete_func)s)"; +""" + + +class ShellComplete: + """Base class for providing shell completion support. A subclass for + a given shell will override attributes and methods to implement the + completion instructions (``source`` and ``complete``). + + :param cli: Command being called. + :param prog_name: Name of the executable in the shell. + :param complete_var: Name of the environment variable that holds + the completion instruction. + + .. versionadded:: 8.0 + """ + + name: t.ClassVar[str] + """Name to register the shell as with :func:`add_completion_class`. + This is used in completion instructions (``{name}_source`` and + ``{name}_complete``). + """ + + source_template: t.ClassVar[str] + """Completion script template formatted by :meth:`source`. This must + be provided by subclasses. + """ + + def __init__( + self, + cli: Command, + ctx_args: cabc.MutableMapping[str, t.Any], + prog_name: str, + complete_var: str, + ) -> None: + self.cli = cli + self.ctx_args = ctx_args + self.prog_name = prog_name + self.complete_var = complete_var + + @property + def func_name(self) -> str: + """The name of the shell function defined by the completion + script. + """ + safe_name = re.sub(r"\W*", "", self.prog_name.replace("-", "_"), flags=re.ASCII) + return f"_{safe_name}_completion" + + def source_vars(self) -> dict[str, t.Any]: + """Vars for formatting :attr:`source_template`. + + By default this provides ``complete_func``, ``complete_var``, + and ``prog_name``. + """ + return { + "complete_func": self.func_name, + "complete_var": self.complete_var, + "prog_name": self.prog_name, + } + + def source(self) -> str: + """Produce the shell script that defines the completion + function. By default this ``%``-style formats + :attr:`source_template` with the dict returned by + :meth:`source_vars`. + """ + return self.source_template % self.source_vars() + + def get_completion_args(self) -> tuple[list[str], str]: + """Use the env vars defined by the shell script to return a + tuple of ``args, incomplete``. This must be implemented by + subclasses. + """ + raise NotImplementedError + + def get_completions(self, args: list[str], incomplete: str) -> list[CompletionItem]: + """Determine the context and last complete command or parameter + from the complete args. Call that object's ``shell_complete`` + method to get the completions for the incomplete value. + + :param args: List of complete args before the incomplete value. + :param incomplete: Value being completed. May be empty. + """ + ctx = _resolve_context(self.cli, self.ctx_args, self.prog_name, args) + obj, incomplete = _resolve_incomplete(ctx, args, incomplete) + return obj.shell_complete(ctx, incomplete) + + def format_completion(self, item: CompletionItem) -> str: + """Format a completion item into the form recognized by the + shell script. This must be implemented by subclasses. + + :param item: Completion item to format. + """ + raise NotImplementedError + + def complete(self) -> str: + """Produce the completion data to send back to the shell. + + By default this calls :meth:`get_completion_args`, gets the + completions, then calls :meth:`format_completion` for each + completion. + """ + args, incomplete = self.get_completion_args() + completions = self.get_completions(args, incomplete) + out = [self.format_completion(item) for item in completions] + return "\n".join(out) + + +class BashComplete(ShellComplete): + """Shell completion for Bash.""" + + name = "bash" + source_template = _SOURCE_BASH + + @staticmethod + def _check_version() -> None: + import shutil + import subprocess + + bash_exe = shutil.which("bash") + + if bash_exe is None: + match = None + else: + output = subprocess.run( + [bash_exe, "--norc", "-c", 'echo "${BASH_VERSION}"'], + stdout=subprocess.PIPE, + ) + match = re.search(r"^(\d+)\.(\d+)\.\d+", output.stdout.decode()) + + if match is not None: + major, minor = match.groups() + + if major < "4" or major == "4" and minor < "4": + echo( + _( + "Shell completion is not supported for Bash" + " versions older than 4.4." + ), + err=True, + ) + else: + echo( + _("Couldn't detect Bash version, shell completion is not supported."), + err=True, + ) + + def source(self) -> str: + self._check_version() + return super().source() + + def get_completion_args(self) -> tuple[list[str], str]: + cwords = split_arg_string(os.environ["COMP_WORDS"]) + cword = int(os.environ["COMP_CWORD"]) + args = cwords[1:cword] + + try: + incomplete = cwords[cword] + except IndexError: + incomplete = "" + + return args, incomplete + + def format_completion(self, item: CompletionItem) -> str: + return f"{item.type},{item.value}" + + +class ZshComplete(ShellComplete): + """Shell completion for Zsh.""" + + name = "zsh" + source_template = _SOURCE_ZSH + + def get_completion_args(self) -> tuple[list[str], str]: + cwords = split_arg_string(os.environ["COMP_WORDS"]) + cword = int(os.environ["COMP_CWORD"]) + args = cwords[1:cword] + + try: + incomplete = cwords[cword] + except IndexError: + incomplete = "" + + return args, incomplete + + def format_completion(self, item: CompletionItem) -> str: + help_ = item.help or "_" + # The zsh completion script uses `_describe` on items with help + # texts (which splits the item help from the item value at the + # first unescaped colon) and `compadd` on items without help + # text (which uses the item value as-is and does not support + # colon escaping). So escape colons in the item value if and + # only if the item help is not the sentinel "_" value, as used + # by the completion script. + # + # (The zsh completion script is potentially widely deployed, and + # thus harder to fix than this method.) + # + # See issue #1812 and issue #2703 for further context. + value = item.value.replace(":", r"\:") if help_ != "_" else item.value + return f"{item.type}\n{value}\n{help_}" + + +class FishComplete(ShellComplete): + """Shell completion for Fish.""" + + name = "fish" + source_template = _SOURCE_FISH + + def get_completion_args(self) -> tuple[list[str], str]: + cwords = split_arg_string(os.environ["COMP_WORDS"]) + incomplete = os.environ["COMP_CWORD"] + if incomplete: + incomplete = split_arg_string(incomplete)[0] + args = cwords[1:] + + # Fish stores the partial word in both COMP_WORDS and + # COMP_CWORD, remove it from complete args. + if incomplete and args and args[-1] == incomplete: + args.pop() + + return args, incomplete + + def format_completion(self, item: CompletionItem) -> str: + if item.help: + return f"{item.type},{item.value}\t{item.help}" + + return f"{item.type},{item.value}" + + +ShellCompleteType = t.TypeVar("ShellCompleteType", bound="type[ShellComplete]") + + +_available_shells: dict[str, type[ShellComplete]] = { + "bash": BashComplete, + "fish": FishComplete, + "zsh": ZshComplete, +} + + +def add_completion_class( + cls: ShellCompleteType, name: str | None = None +) -> ShellCompleteType: + """Register a :class:`ShellComplete` subclass under the given name. + The name will be provided by the completion instruction environment + variable during completion. + + :param cls: The completion class that will handle completion for the + shell. + :param name: Name to register the class under. Defaults to the + class's ``name`` attribute. + """ + if name is None: + name = cls.name + + _available_shells[name] = cls + + return cls + + +def get_completion_class(shell: str) -> type[ShellComplete] | None: + """Look up a registered :class:`ShellComplete` subclass by the name + provided by the completion instruction environment variable. If the + name isn't registered, returns ``None``. + + :param shell: Name the class is registered under. + """ + return _available_shells.get(shell) + + +def split_arg_string(string: str) -> list[str]: + """Split an argument string as with :func:`shlex.split`, but don't + fail if the string is incomplete. Ignores a missing closing quote or + incomplete escape sequence and uses the partial token as-is. + + .. code-block:: python + + split_arg_string("example 'my file") + ["example", "my file"] + + split_arg_string("example my\\") + ["example", "my"] + + :param string: String to split. + + .. versionchanged:: 8.2 + Moved to ``shell_completion`` from ``parser``. + """ + import shlex + + lex = shlex.shlex(string, posix=True) + lex.whitespace_split = True + lex.commenters = "" + out = [] + + try: + for token in lex: + out.append(token) + except ValueError: + # Raised when end-of-string is reached in an invalid state. Use + # the partial token as-is. The quote or escape character is in + # lex.state, not lex.token. + out.append(lex.token) + + return out + + +def _is_incomplete_argument(ctx: Context, param: Parameter) -> bool: + """Determine if the given parameter is an argument that can still + accept values. + + :param ctx: Invocation context for the command represented by the + parsed complete args. + :param param: Argument object being checked. + """ + if not isinstance(param, Argument): + return False + + assert param.name is not None + # Will be None if expose_value is False. + value = ctx.params.get(param.name) + return ( + param.nargs == -1 + or ctx.get_parameter_source(param.name) is not ParameterSource.COMMANDLINE + or ( + param.nargs > 1 + and isinstance(value, (tuple, list)) + and len(value) < param.nargs + ) + ) + + +def _start_of_option(ctx: Context, value: str) -> bool: + """Check if the value looks like the start of an option.""" + if not value: + return False + + c = value[0] + return c in ctx._opt_prefixes + + +def _is_incomplete_option(ctx: Context, args: list[str], param: Parameter) -> bool: + """Determine if the given parameter is an option that needs a value. + + :param args: List of complete args before the incomplete value. + :param param: Option object being checked. + """ + if not isinstance(param, Option): + return False + + if param.is_flag or param.count: + return False + + last_option = None + + for index, arg in enumerate(reversed(args)): + if index + 1 > param.nargs: + break + + if _start_of_option(ctx, arg): + last_option = arg + break + + return last_option is not None and last_option in param.opts + + +def _resolve_context( + cli: Command, + ctx_args: cabc.MutableMapping[str, t.Any], + prog_name: str, + args: list[str], +) -> Context: + """Produce the context hierarchy starting with the command and + traversing the complete arguments. This only follows the commands, + it doesn't trigger input prompts or callbacks. + + :param cli: Command being called. + :param prog_name: Name of the executable in the shell. + :param args: List of complete args before the incomplete value. + """ + ctx_args["resilient_parsing"] = True + with cli.make_context(prog_name, args.copy(), **ctx_args) as ctx: + args = ctx._protected_args + ctx.args + + while args: + command = ctx.command + + if isinstance(command, Group): + if not command.chain: + name, cmd, args = command.resolve_command(ctx, args) + + if cmd is None: + return ctx + + with cmd.make_context( + name, args, parent=ctx, resilient_parsing=True + ) as sub_ctx: + ctx = sub_ctx + args = ctx._protected_args + ctx.args + else: + sub_ctx = ctx + + while args: + name, cmd, args = command.resolve_command(ctx, args) + + if cmd is None: + return ctx + + with cmd.make_context( + name, + args, + parent=ctx, + allow_extra_args=True, + allow_interspersed_args=False, + resilient_parsing=True, + ) as sub_sub_ctx: + sub_ctx = sub_sub_ctx + args = sub_ctx.args + + ctx = sub_ctx + args = [*sub_ctx._protected_args, *sub_ctx.args] + else: + break + + return ctx + + +def _resolve_incomplete( + ctx: Context, args: list[str], incomplete: str +) -> tuple[Command | Parameter, str]: + """Find the Click object that will handle the completion of the + incomplete value. Return the object and the incomplete value. + + :param ctx: Invocation context for the command represented by + the parsed complete args. + :param args: List of complete args before the incomplete value. + :param incomplete: Value being completed. May be empty. + """ + # Different shells treat an "=" between a long option name and + # value differently. Might keep the value joined, return the "=" + # as a separate item, or return the split name and value. Always + # split and discard the "=" to make completion easier. + if incomplete == "=": + incomplete = "" + elif "=" in incomplete and _start_of_option(ctx, incomplete): + name, _, incomplete = incomplete.partition("=") + args.append(name) + + # The "--" marker tells Click to stop treating values as options + # even if they start with the option character. If it hasn't been + # given and the incomplete arg looks like an option, the current + # command will provide option name completions. + if "--" not in args and _start_of_option(ctx, incomplete): + return ctx.command, incomplete + + params = ctx.command.get_params(ctx) + + # If the last complete arg is an option name with an incomplete + # value, the option will provide value completions. + for param in params: + if _is_incomplete_option(ctx, args, param): + return param, incomplete + + # It's not an option name or value. The first argument without a + # parsed value will provide value completions. + for param in params: + if _is_incomplete_argument(ctx, param): + return param, incomplete + + # There were no unparsed arguments, the command may be a group that + # will provide command name completions. + return ctx.command, incomplete diff --git a/venv/lib/python3.12/site-packages/click/termui.py b/venv/lib/python3.12/site-packages/click/termui.py new file mode 100644 index 0000000..2e98a07 --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/termui.py @@ -0,0 +1,883 @@ +from __future__ import annotations + +import collections.abc as cabc +import inspect +import io +import itertools +import sys +import typing as t +from contextlib import AbstractContextManager +from gettext import gettext as _ + +from ._compat import isatty +from ._compat import strip_ansi +from .exceptions import Abort +from .exceptions import UsageError +from .globals import resolve_color_default +from .types import Choice +from .types import convert_type +from .types import ParamType +from .utils import echo +from .utils import LazyFile + +if t.TYPE_CHECKING: + from ._termui_impl import ProgressBar + +V = t.TypeVar("V") + +# The prompt functions to use. The doc tools currently override these +# functions to customize how they work. +visible_prompt_func: t.Callable[[str], str] = input + +_ansi_colors = { + "black": 30, + "red": 31, + "green": 32, + "yellow": 33, + "blue": 34, + "magenta": 35, + "cyan": 36, + "white": 37, + "reset": 39, + "bright_black": 90, + "bright_red": 91, + "bright_green": 92, + "bright_yellow": 93, + "bright_blue": 94, + "bright_magenta": 95, + "bright_cyan": 96, + "bright_white": 97, +} +_ansi_reset_all = "\033[0m" + + +def hidden_prompt_func(prompt: str) -> str: + import getpass + + return getpass.getpass(prompt) + + +def _build_prompt( + text: str, + suffix: str, + show_default: bool = False, + default: t.Any | None = None, + show_choices: bool = True, + type: ParamType | None = None, +) -> str: + prompt = text + if type is not None and show_choices and isinstance(type, Choice): + prompt += f" ({', '.join(map(str, type.choices))})" + if default is not None and show_default: + prompt = f"{prompt} [{_format_default(default)}]" + return f"{prompt}{suffix}" + + +def _format_default(default: t.Any) -> t.Any: + if isinstance(default, (io.IOBase, LazyFile)) and hasattr(default, "name"): + return default.name + + return default + + +def prompt( + text: str, + default: t.Any | None = None, + hide_input: bool = False, + confirmation_prompt: bool | str = False, + type: ParamType | t.Any | None = None, + value_proc: t.Callable[[str], t.Any] | None = None, + prompt_suffix: str = ": ", + show_default: bool = True, + err: bool = False, + show_choices: bool = True, +) -> t.Any: + """Prompts a user for input. This is a convenience function that can + be used to prompt a user for input later. + + If the user aborts the input by sending an interrupt signal, this + function will catch it and raise a :exc:`Abort` exception. + + :param text: the text to show for the prompt. + :param default: the default value to use if no input happens. If this + is not given it will prompt until it's aborted. + :param hide_input: if this is set to true then the input value will + be hidden. + :param confirmation_prompt: Prompt a second time to confirm the + value. Can be set to a string instead of ``True`` to customize + the message. + :param type: the type to use to check the value against. + :param value_proc: if this parameter is provided it's a function that + is invoked instead of the type conversion to + convert a value. + :param prompt_suffix: a suffix that should be added to the prompt. + :param show_default: shows or hides the default value in the prompt. + :param err: if set to true the file defaults to ``stderr`` instead of + ``stdout``, the same as with echo. + :param show_choices: Show or hide choices if the passed type is a Choice. + For example if type is a Choice of either day or week, + show_choices is true and text is "Group by" then the + prompt will be "Group by (day, week): ". + + .. versionchanged:: 8.3.1 + A space is no longer appended to the prompt. + + .. versionadded:: 8.0 + ``confirmation_prompt`` can be a custom string. + + .. versionadded:: 7.0 + Added the ``show_choices`` parameter. + + .. versionadded:: 6.0 + Added unicode support for cmd.exe on Windows. + + .. versionadded:: 4.0 + Added the `err` parameter. + + """ + + def prompt_func(text: str) -> str: + f = hidden_prompt_func if hide_input else visible_prompt_func + try: + # Write the prompt separately so that we get nice + # coloring through colorama on Windows + echo(text[:-1], nl=False, err=err) + # Echo the last character to stdout to work around an issue where + # readline causes backspace to clear the whole line. + return f(text[-1:]) + except (KeyboardInterrupt, EOFError): + # getpass doesn't print a newline if the user aborts input with ^C. + # Allegedly this behavior is inherited from getpass(3). + # A doc bug has been filed at https://bugs.python.org/issue24711 + if hide_input: + echo(None, err=err) + raise Abort() from None + + if value_proc is None: + value_proc = convert_type(type, default) + + prompt = _build_prompt( + text, prompt_suffix, show_default, default, show_choices, type + ) + + if confirmation_prompt: + if confirmation_prompt is True: + confirmation_prompt = _("Repeat for confirmation") + + confirmation_prompt = _build_prompt(confirmation_prompt, prompt_suffix) + + while True: + while True: + value = prompt_func(prompt) + if value: + break + elif default is not None: + value = default + break + try: + result = value_proc(value) + except UsageError as e: + if hide_input: + echo(_("Error: The value you entered was invalid."), err=err) + else: + echo(_("Error: {e.message}").format(e=e), err=err) + continue + if not confirmation_prompt: + return result + while True: + value2 = prompt_func(confirmation_prompt) + is_empty = not value and not value2 + if value2 or is_empty: + break + if value == value2: + return result + echo(_("Error: The two entered values do not match."), err=err) + + +def confirm( + text: str, + default: bool | None = False, + abort: bool = False, + prompt_suffix: str = ": ", + show_default: bool = True, + err: bool = False, +) -> bool: + """Prompts for confirmation (yes/no question). + + If the user aborts the input by sending a interrupt signal this + function will catch it and raise a :exc:`Abort` exception. + + :param text: the question to ask. + :param default: The default value to use when no input is given. If + ``None``, repeat until input is given. + :param abort: if this is set to `True` a negative answer aborts the + exception by raising :exc:`Abort`. + :param prompt_suffix: a suffix that should be added to the prompt. + :param show_default: shows or hides the default value in the prompt. + :param err: if set to true the file defaults to ``stderr`` instead of + ``stdout``, the same as with echo. + + .. versionchanged:: 8.3.1 + A space is no longer appended to the prompt. + + .. versionchanged:: 8.0 + Repeat until input is given if ``default`` is ``None``. + + .. versionadded:: 4.0 + Added the ``err`` parameter. + """ + prompt = _build_prompt( + text, + prompt_suffix, + show_default, + "y/n" if default is None else ("Y/n" if default else "y/N"), + ) + + while True: + try: + # Write the prompt separately so that we get nice + # coloring through colorama on Windows + echo(prompt[:-1], nl=False, err=err) + # Echo the last character to stdout to work around an issue where + # readline causes backspace to clear the whole line. + value = visible_prompt_func(prompt[-1:]).lower().strip() + except (KeyboardInterrupt, EOFError): + raise Abort() from None + if value in ("y", "yes"): + rv = True + elif value in ("n", "no"): + rv = False + elif default is not None and value == "": + rv = default + else: + echo(_("Error: invalid input"), err=err) + continue + break + if abort and not rv: + raise Abort() + return rv + + +def echo_via_pager( + text_or_generator: cabc.Iterable[str] | t.Callable[[], cabc.Iterable[str]] | str, + color: bool | None = None, +) -> None: + """This function takes a text and shows it via an environment specific + pager on stdout. + + .. versionchanged:: 3.0 + Added the `color` flag. + + :param text_or_generator: the text to page, or alternatively, a + generator emitting the text to page. + :param color: controls if the pager supports ANSI colors or not. The + default is autodetection. + """ + color = resolve_color_default(color) + + if inspect.isgeneratorfunction(text_or_generator): + i = t.cast("t.Callable[[], cabc.Iterable[str]]", text_or_generator)() + elif isinstance(text_or_generator, str): + i = [text_or_generator] + else: + i = iter(t.cast("cabc.Iterable[str]", text_or_generator)) + + # convert every element of i to a text type if necessary + text_generator = (el if isinstance(el, str) else str(el) for el in i) + + from ._termui_impl import pager + + return pager(itertools.chain(text_generator, "\n"), color) + + +@t.overload +def progressbar( + *, + length: int, + label: str | None = None, + hidden: bool = False, + show_eta: bool = True, + show_percent: bool | None = None, + show_pos: bool = False, + fill_char: str = "#", + empty_char: str = "-", + bar_template: str = "%(label)s [%(bar)s] %(info)s", + info_sep: str = " ", + width: int = 36, + file: t.TextIO | None = None, + color: bool | None = None, + update_min_steps: int = 1, +) -> ProgressBar[int]: ... + + +@t.overload +def progressbar( + iterable: cabc.Iterable[V] | None = None, + length: int | None = None, + label: str | None = None, + hidden: bool = False, + show_eta: bool = True, + show_percent: bool | None = None, + show_pos: bool = False, + item_show_func: t.Callable[[V | None], str | None] | None = None, + fill_char: str = "#", + empty_char: str = "-", + bar_template: str = "%(label)s [%(bar)s] %(info)s", + info_sep: str = " ", + width: int = 36, + file: t.TextIO | None = None, + color: bool | None = None, + update_min_steps: int = 1, +) -> ProgressBar[V]: ... + + +def progressbar( + iterable: cabc.Iterable[V] | None = None, + length: int | None = None, + label: str | None = None, + hidden: bool = False, + show_eta: bool = True, + show_percent: bool | None = None, + show_pos: bool = False, + item_show_func: t.Callable[[V | None], str | None] | None = None, + fill_char: str = "#", + empty_char: str = "-", + bar_template: str = "%(label)s [%(bar)s] %(info)s", + info_sep: str = " ", + width: int = 36, + file: t.TextIO | None = None, + color: bool | None = None, + update_min_steps: int = 1, +) -> ProgressBar[V]: + """This function creates an iterable context manager that can be used + to iterate over something while showing a progress bar. It will + either iterate over the `iterable` or `length` items (that are counted + up). While iteration happens, this function will print a rendered + progress bar to the given `file` (defaults to stdout) and will attempt + to calculate remaining time and more. By default, this progress bar + will not be rendered if the file is not a terminal. + + The context manager creates the progress bar. When the context + manager is entered the progress bar is already created. With every + iteration over the progress bar, the iterable passed to the bar is + advanced and the bar is updated. When the context manager exits, + a newline is printed and the progress bar is finalized on screen. + + Note: The progress bar is currently designed for use cases where the + total progress can be expected to take at least several seconds. + Because of this, the ProgressBar class object won't display + progress that is considered too fast, and progress where the time + between steps is less than a second. + + No printing must happen or the progress bar will be unintentionally + destroyed. + + Example usage:: + + with progressbar(items) as bar: + for item in bar: + do_something_with(item) + + Alternatively, if no iterable is specified, one can manually update the + progress bar through the `update()` method instead of directly + iterating over the progress bar. The update method accepts the number + of steps to increment the bar with:: + + with progressbar(length=chunks.total_bytes) as bar: + for chunk in chunks: + process_chunk(chunk) + bar.update(chunks.bytes) + + The ``update()`` method also takes an optional value specifying the + ``current_item`` at the new position. This is useful when used + together with ``item_show_func`` to customize the output for each + manual step:: + + with click.progressbar( + length=total_size, + label='Unzipping archive', + item_show_func=lambda a: a.filename + ) as bar: + for archive in zip_file: + archive.extract() + bar.update(archive.size, archive) + + :param iterable: an iterable to iterate over. If not provided the length + is required. + :param length: the number of items to iterate over. By default the + progressbar will attempt to ask the iterator about its + length, which might or might not work. If an iterable is + also provided this parameter can be used to override the + length. If an iterable is not provided the progress bar + will iterate over a range of that length. + :param label: the label to show next to the progress bar. + :param hidden: hide the progressbar. Defaults to ``False``. When no tty is + detected, it will only print the progressbar label. Setting this to + ``False`` also disables that. + :param show_eta: enables or disables the estimated time display. This is + automatically disabled if the length cannot be + determined. + :param show_percent: enables or disables the percentage display. The + default is `True` if the iterable has a length or + `False` if not. + :param show_pos: enables or disables the absolute position display. The + default is `False`. + :param item_show_func: A function called with the current item which + can return a string to show next to the progress bar. If the + function returns ``None`` nothing is shown. The current item can + be ``None``, such as when entering and exiting the bar. + :param fill_char: the character to use to show the filled part of the + progress bar. + :param empty_char: the character to use to show the non-filled part of + the progress bar. + :param bar_template: the format string to use as template for the bar. + The parameters in it are ``label`` for the label, + ``bar`` for the progress bar and ``info`` for the + info section. + :param info_sep: the separator between multiple info items (eta etc.) + :param width: the width of the progress bar in characters, 0 means full + terminal width + :param file: The file to write to. If this is not a terminal then + only the label is printed. + :param color: controls if the terminal supports ANSI colors or not. The + default is autodetection. This is only needed if ANSI + codes are included anywhere in the progress bar output + which is not the case by default. + :param update_min_steps: Render only when this many updates have + completed. This allows tuning for very fast iterators. + + .. versionadded:: 8.2 + The ``hidden`` argument. + + .. versionchanged:: 8.0 + Output is shown even if execution time is less than 0.5 seconds. + + .. versionchanged:: 8.0 + ``item_show_func`` shows the current item, not the previous one. + + .. versionchanged:: 8.0 + Labels are echoed if the output is not a TTY. Reverts a change + in 7.0 that removed all output. + + .. versionadded:: 8.0 + The ``update_min_steps`` parameter. + + .. versionadded:: 4.0 + The ``color`` parameter and ``update`` method. + + .. versionadded:: 2.0 + """ + from ._termui_impl import ProgressBar + + color = resolve_color_default(color) + return ProgressBar( + iterable=iterable, + length=length, + hidden=hidden, + show_eta=show_eta, + show_percent=show_percent, + show_pos=show_pos, + item_show_func=item_show_func, + fill_char=fill_char, + empty_char=empty_char, + bar_template=bar_template, + info_sep=info_sep, + file=file, + label=label, + width=width, + color=color, + update_min_steps=update_min_steps, + ) + + +def clear() -> None: + """Clears the terminal screen. This will have the effect of clearing + the whole visible space of the terminal and moving the cursor to the + top left. This does not do anything if not connected to a terminal. + + .. versionadded:: 2.0 + """ + if not isatty(sys.stdout): + return + + # ANSI escape \033[2J clears the screen, \033[1;1H moves the cursor + echo("\033[2J\033[1;1H", nl=False) + + +def _interpret_color(color: int | tuple[int, int, int] | str, offset: int = 0) -> str: + if isinstance(color, int): + return f"{38 + offset};5;{color:d}" + + if isinstance(color, (tuple, list)): + r, g, b = color + return f"{38 + offset};2;{r:d};{g:d};{b:d}" + + return str(_ansi_colors[color] + offset) + + +def style( + text: t.Any, + fg: int | tuple[int, int, int] | str | None = None, + bg: int | tuple[int, int, int] | str | None = None, + bold: bool | None = None, + dim: bool | None = None, + underline: bool | None = None, + overline: bool | None = None, + italic: bool | None = None, + blink: bool | None = None, + reverse: bool | None = None, + strikethrough: bool | None = None, + reset: bool = True, +) -> str: + """Styles a text with ANSI styles and returns the new string. By + default the styling is self contained which means that at the end + of the string a reset code is issued. This can be prevented by + passing ``reset=False``. + + Examples:: + + click.echo(click.style('Hello World!', fg='green')) + click.echo(click.style('ATTENTION!', blink=True)) + click.echo(click.style('Some things', reverse=True, fg='cyan')) + click.echo(click.style('More colors', fg=(255, 12, 128), bg=117)) + + Supported color names: + + * ``black`` (might be a gray) + * ``red`` + * ``green`` + * ``yellow`` (might be an orange) + * ``blue`` + * ``magenta`` + * ``cyan`` + * ``white`` (might be light gray) + * ``bright_black`` + * ``bright_red`` + * ``bright_green`` + * ``bright_yellow`` + * ``bright_blue`` + * ``bright_magenta`` + * ``bright_cyan`` + * ``bright_white`` + * ``reset`` (reset the color code only) + + If the terminal supports it, color may also be specified as: + + - An integer in the interval [0, 255]. The terminal must support + 8-bit/256-color mode. + - An RGB tuple of three integers in [0, 255]. The terminal must + support 24-bit/true-color mode. + + See https://en.wikipedia.org/wiki/ANSI_color and + https://gist.github.com/XVilka/8346728 for more information. + + :param text: the string to style with ansi codes. + :param fg: if provided this will become the foreground color. + :param bg: if provided this will become the background color. + :param bold: if provided this will enable or disable bold mode. + :param dim: if provided this will enable or disable dim mode. This is + badly supported. + :param underline: if provided this will enable or disable underline. + :param overline: if provided this will enable or disable overline. + :param italic: if provided this will enable or disable italic. + :param blink: if provided this will enable or disable blinking. + :param reverse: if provided this will enable or disable inverse + rendering (foreground becomes background and the + other way round). + :param strikethrough: if provided this will enable or disable + striking through text. + :param reset: by default a reset-all code is added at the end of the + string which means that styles do not carry over. This + can be disabled to compose styles. + + .. versionchanged:: 8.0 + A non-string ``message`` is converted to a string. + + .. versionchanged:: 8.0 + Added support for 256 and RGB color codes. + + .. versionchanged:: 8.0 + Added the ``strikethrough``, ``italic``, and ``overline`` + parameters. + + .. versionchanged:: 7.0 + Added support for bright colors. + + .. versionadded:: 2.0 + """ + if not isinstance(text, str): + text = str(text) + + bits = [] + + if fg: + try: + bits.append(f"\033[{_interpret_color(fg)}m") + except KeyError: + raise TypeError(f"Unknown color {fg!r}") from None + + if bg: + try: + bits.append(f"\033[{_interpret_color(bg, 10)}m") + except KeyError: + raise TypeError(f"Unknown color {bg!r}") from None + + if bold is not None: + bits.append(f"\033[{1 if bold else 22}m") + if dim is not None: + bits.append(f"\033[{2 if dim else 22}m") + if underline is not None: + bits.append(f"\033[{4 if underline else 24}m") + if overline is not None: + bits.append(f"\033[{53 if overline else 55}m") + if italic is not None: + bits.append(f"\033[{3 if italic else 23}m") + if blink is not None: + bits.append(f"\033[{5 if blink else 25}m") + if reverse is not None: + bits.append(f"\033[{7 if reverse else 27}m") + if strikethrough is not None: + bits.append(f"\033[{9 if strikethrough else 29}m") + bits.append(text) + if reset: + bits.append(_ansi_reset_all) + return "".join(bits) + + +def unstyle(text: str) -> str: + """Removes ANSI styling information from a string. Usually it's not + necessary to use this function as Click's echo function will + automatically remove styling if necessary. + + .. versionadded:: 2.0 + + :param text: the text to remove style information from. + """ + return strip_ansi(text) + + +def secho( + message: t.Any | None = None, + file: t.IO[t.AnyStr] | None = None, + nl: bool = True, + err: bool = False, + color: bool | None = None, + **styles: t.Any, +) -> None: + """This function combines :func:`echo` and :func:`style` into one + call. As such the following two calls are the same:: + + click.secho('Hello World!', fg='green') + click.echo(click.style('Hello World!', fg='green')) + + All keyword arguments are forwarded to the underlying functions + depending on which one they go with. + + Non-string types will be converted to :class:`str`. However, + :class:`bytes` are passed directly to :meth:`echo` without applying + style. If you want to style bytes that represent text, call + :meth:`bytes.decode` first. + + .. versionchanged:: 8.0 + A non-string ``message`` is converted to a string. Bytes are + passed through without style applied. + + .. versionadded:: 2.0 + """ + if message is not None and not isinstance(message, (bytes, bytearray)): + message = style(message, **styles) + + return echo(message, file=file, nl=nl, err=err, color=color) + + +@t.overload +def edit( + text: bytes | bytearray, + editor: str | None = None, + env: cabc.Mapping[str, str] | None = None, + require_save: bool = False, + extension: str = ".txt", +) -> bytes | None: ... + + +@t.overload +def edit( + text: str, + editor: str | None = None, + env: cabc.Mapping[str, str] | None = None, + require_save: bool = True, + extension: str = ".txt", +) -> str | None: ... + + +@t.overload +def edit( + text: None = None, + editor: str | None = None, + env: cabc.Mapping[str, str] | None = None, + require_save: bool = True, + extension: str = ".txt", + filename: str | cabc.Iterable[str] | None = None, +) -> None: ... + + +def edit( + text: str | bytes | bytearray | None = None, + editor: str | None = None, + env: cabc.Mapping[str, str] | None = None, + require_save: bool = True, + extension: str = ".txt", + filename: str | cabc.Iterable[str] | None = None, +) -> str | bytes | bytearray | None: + r"""Edits the given text in the defined editor. If an editor is given + (should be the full path to the executable but the regular operating + system search path is used for finding the executable) it overrides + the detected editor. Optionally, some environment variables can be + used. If the editor is closed without changes, `None` is returned. In + case a file is edited directly the return value is always `None` and + `require_save` and `extension` are ignored. + + If the editor cannot be opened a :exc:`UsageError` is raised. + + Note for Windows: to simplify cross-platform usage, the newlines are + automatically converted from POSIX to Windows and vice versa. As such, + the message here will have ``\n`` as newline markers. + + :param text: the text to edit. + :param editor: optionally the editor to use. Defaults to automatic + detection. + :param env: environment variables to forward to the editor. + :param require_save: if this is true, then not saving in the editor + will make the return value become `None`. + :param extension: the extension to tell the editor about. This defaults + to `.txt` but changing this might change syntax + highlighting. + :param filename: if provided it will edit this file instead of the + provided text contents. It will not use a temporary + file as an indirection in that case. If the editor supports + editing multiple files at once, a sequence of files may be + passed as well. Invoke `click.file` once per file instead + if multiple files cannot be managed at once or editing the + files serially is desired. + + .. versionchanged:: 8.2.0 + ``filename`` now accepts any ``Iterable[str]`` in addition to a ``str`` + if the ``editor`` supports editing multiple files at once. + + """ + from ._termui_impl import Editor + + ed = Editor(editor=editor, env=env, require_save=require_save, extension=extension) + + if filename is None: + return ed.edit(text) + + if isinstance(filename, str): + filename = (filename,) + + ed.edit_files(filenames=filename) + return None + + +def launch(url: str, wait: bool = False, locate: bool = False) -> int: + """This function launches the given URL (or filename) in the default + viewer application for this file type. If this is an executable, it + might launch the executable in a new session. The return value is + the exit code of the launched application. Usually, ``0`` indicates + success. + + Examples:: + + click.launch('https://click.palletsprojects.com/') + click.launch('/my/downloaded/file', locate=True) + + .. versionadded:: 2.0 + + :param url: URL or filename of the thing to launch. + :param wait: Wait for the program to exit before returning. This + only works if the launched program blocks. In particular, + ``xdg-open`` on Linux does not block. + :param locate: if this is set to `True` then instead of launching the + application associated with the URL it will attempt to + launch a file manager with the file located. This + might have weird effects if the URL does not point to + the filesystem. + """ + from ._termui_impl import open_url + + return open_url(url, wait=wait, locate=locate) + + +# If this is provided, getchar() calls into this instead. This is used +# for unittesting purposes. +_getchar: t.Callable[[bool], str] | None = None + + +def getchar(echo: bool = False) -> str: + """Fetches a single character from the terminal and returns it. This + will always return a unicode character and under certain rare + circumstances this might return more than one character. The + situations which more than one character is returned is when for + whatever reason multiple characters end up in the terminal buffer or + standard input was not actually a terminal. + + Note that this will always read from the terminal, even if something + is piped into the standard input. + + Note for Windows: in rare cases when typing non-ASCII characters, this + function might wait for a second character and then return both at once. + This is because certain Unicode characters look like special-key markers. + + .. versionadded:: 2.0 + + :param echo: if set to `True`, the character read will also show up on + the terminal. The default is to not show it. + """ + global _getchar + + if _getchar is None: + from ._termui_impl import getchar as f + + _getchar = f + + return _getchar(echo) + + +def raw_terminal() -> AbstractContextManager[int]: + from ._termui_impl import raw_terminal as f + + return f() + + +def pause(info: str | None = None, err: bool = False) -> None: + """This command stops execution and waits for the user to press any + key to continue. This is similar to the Windows batch "pause" + command. If the program is not run through a terminal, this command + will instead do nothing. + + .. versionadded:: 2.0 + + .. versionadded:: 4.0 + Added the `err` parameter. + + :param info: The message to print before pausing. Defaults to + ``"Press any key to continue..."``. + :param err: if set to message goes to ``stderr`` instead of + ``stdout``, the same as with echo. + """ + if not isatty(sys.stdin) or not isatty(sys.stdout): + return + + if info is None: + info = _("Press any key to continue...") + + try: + if info: + echo(info, nl=False, err=err) + try: + getchar() + except (KeyboardInterrupt, EOFError): + pass + finally: + if info: + echo(err=err) diff --git a/venv/lib/python3.12/site-packages/click/testing.py b/venv/lib/python3.12/site-packages/click/testing.py new file mode 100644 index 0000000..f6f60b8 --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/testing.py @@ -0,0 +1,577 @@ +from __future__ import annotations + +import collections.abc as cabc +import contextlib +import io +import os +import shlex +import sys +import tempfile +import typing as t +from types import TracebackType + +from . import _compat +from . import formatting +from . import termui +from . import utils +from ._compat import _find_binary_reader + +if t.TYPE_CHECKING: + from _typeshed import ReadableBuffer + + from .core import Command + + +class EchoingStdin: + def __init__(self, input: t.BinaryIO, output: t.BinaryIO) -> None: + self._input = input + self._output = output + self._paused = False + + def __getattr__(self, x: str) -> t.Any: + return getattr(self._input, x) + + def _echo(self, rv: bytes) -> bytes: + if not self._paused: + self._output.write(rv) + + return rv + + def read(self, n: int = -1) -> bytes: + return self._echo(self._input.read(n)) + + def read1(self, n: int = -1) -> bytes: + return self._echo(self._input.read1(n)) # type: ignore + + def readline(self, n: int = -1) -> bytes: + return self._echo(self._input.readline(n)) + + def readlines(self) -> list[bytes]: + return [self._echo(x) for x in self._input.readlines()] + + def __iter__(self) -> cabc.Iterator[bytes]: + return iter(self._echo(x) for x in self._input) + + def __repr__(self) -> str: + return repr(self._input) + + +@contextlib.contextmanager +def _pause_echo(stream: EchoingStdin | None) -> cabc.Iterator[None]: + if stream is None: + yield + else: + stream._paused = True + yield + stream._paused = False + + +class BytesIOCopy(io.BytesIO): + """Patch ``io.BytesIO`` to let the written stream be copied to another. + + .. versionadded:: 8.2 + """ + + def __init__(self, copy_to: io.BytesIO) -> None: + super().__init__() + self.copy_to = copy_to + + def flush(self) -> None: + super().flush() + self.copy_to.flush() + + def write(self, b: ReadableBuffer) -> int: + self.copy_to.write(b) + return super().write(b) + + +class StreamMixer: + """Mixes `` and `` streams. + + The result is available in the ``output`` attribute. + + .. versionadded:: 8.2 + """ + + def __init__(self) -> None: + self.output: io.BytesIO = io.BytesIO() + self.stdout: io.BytesIO = BytesIOCopy(copy_to=self.output) + self.stderr: io.BytesIO = BytesIOCopy(copy_to=self.output) + + def __del__(self) -> None: + """ + Guarantee that embedded file-like objects are closed in a + predictable order, protecting against races between + self.output being closed and other streams being flushed on close + + .. versionadded:: 8.2.2 + """ + self.stderr.close() + self.stdout.close() + self.output.close() + + +class _NamedTextIOWrapper(io.TextIOWrapper): + def __init__( + self, buffer: t.BinaryIO, name: str, mode: str, **kwargs: t.Any + ) -> None: + super().__init__(buffer, **kwargs) + self._name = name + self._mode = mode + + @property + def name(self) -> str: + return self._name + + @property + def mode(self) -> str: + return self._mode + + +def make_input_stream( + input: str | bytes | t.IO[t.Any] | None, charset: str +) -> t.BinaryIO: + # Is already an input stream. + if hasattr(input, "read"): + rv = _find_binary_reader(t.cast("t.IO[t.Any]", input)) + + if rv is not None: + return rv + + raise TypeError("Could not find binary reader for input stream.") + + if input is None: + input = b"" + elif isinstance(input, str): + input = input.encode(charset) + + return io.BytesIO(input) + + +class Result: + """Holds the captured result of an invoked CLI script. + + :param runner: The runner that created the result + :param stdout_bytes: The standard output as bytes. + :param stderr_bytes: The standard error as bytes. + :param output_bytes: A mix of ``stdout_bytes`` and ``stderr_bytes``, as the + user would see it in its terminal. + :param return_value: The value returned from the invoked command. + :param exit_code: The exit code as integer. + :param exception: The exception that happened if one did. + :param exc_info: Exception information (exception type, exception instance, + traceback type). + + .. versionchanged:: 8.2 + ``stderr_bytes`` no longer optional, ``output_bytes`` introduced and + ``mix_stderr`` has been removed. + + .. versionadded:: 8.0 + Added ``return_value``. + """ + + def __init__( + self, + runner: CliRunner, + stdout_bytes: bytes, + stderr_bytes: bytes, + output_bytes: bytes, + return_value: t.Any, + exit_code: int, + exception: BaseException | None, + exc_info: tuple[type[BaseException], BaseException, TracebackType] + | None = None, + ): + self.runner = runner + self.stdout_bytes = stdout_bytes + self.stderr_bytes = stderr_bytes + self.output_bytes = output_bytes + self.return_value = return_value + self.exit_code = exit_code + self.exception = exception + self.exc_info = exc_info + + @property + def output(self) -> str: + """The terminal output as unicode string, as the user would see it. + + .. versionchanged:: 8.2 + No longer a proxy for ``self.stdout``. Now has its own independent stream + that is mixing `` and ``, in the order they were written. + """ + return self.output_bytes.decode(self.runner.charset, "replace").replace( + "\r\n", "\n" + ) + + @property + def stdout(self) -> str: + """The standard output as unicode string.""" + return self.stdout_bytes.decode(self.runner.charset, "replace").replace( + "\r\n", "\n" + ) + + @property + def stderr(self) -> str: + """The standard error as unicode string. + + .. versionchanged:: 8.2 + No longer raise an exception, always returns the `` string. + """ + return self.stderr_bytes.decode(self.runner.charset, "replace").replace( + "\r\n", "\n" + ) + + def __repr__(self) -> str: + exc_str = repr(self.exception) if self.exception else "okay" + return f"<{type(self).__name__} {exc_str}>" + + +class CliRunner: + """The CLI runner provides functionality to invoke a Click command line + script for unittesting purposes in a isolated environment. This only + works in single-threaded systems without any concurrency as it changes the + global interpreter state. + + :param charset: the character set for the input and output data. + :param env: a dictionary with environment variables for overriding. + :param echo_stdin: if this is set to `True`, then reading from `` writes + to ``. This is useful for showing examples in + some circumstances. Note that regular prompts + will automatically echo the input. + :param catch_exceptions: Whether to catch any exceptions other than + ``SystemExit`` when running :meth:`~CliRunner.invoke`. + + .. versionchanged:: 8.2 + Added the ``catch_exceptions`` parameter. + + .. versionchanged:: 8.2 + ``mix_stderr`` parameter has been removed. + """ + + def __init__( + self, + charset: str = "utf-8", + env: cabc.Mapping[str, str | None] | None = None, + echo_stdin: bool = False, + catch_exceptions: bool = True, + ) -> None: + self.charset = charset + self.env: cabc.Mapping[str, str | None] = env or {} + self.echo_stdin = echo_stdin + self.catch_exceptions = catch_exceptions + + def get_default_prog_name(self, cli: Command) -> str: + """Given a command object it will return the default program name + for it. The default is the `name` attribute or ``"root"`` if not + set. + """ + return cli.name or "root" + + def make_env( + self, overrides: cabc.Mapping[str, str | None] | None = None + ) -> cabc.Mapping[str, str | None]: + """Returns the environment overrides for invoking a script.""" + rv = dict(self.env) + if overrides: + rv.update(overrides) + return rv + + @contextlib.contextmanager + def isolation( + self, + input: str | bytes | t.IO[t.Any] | None = None, + env: cabc.Mapping[str, str | None] | None = None, + color: bool = False, + ) -> cabc.Iterator[tuple[io.BytesIO, io.BytesIO, io.BytesIO]]: + """A context manager that sets up the isolation for invoking of a + command line tool. This sets up `` with the given input data + and `os.environ` with the overrides from the given dictionary. + This also rebinds some internals in Click to be mocked (like the + prompt functionality). + + This is automatically done in the :meth:`invoke` method. + + :param input: the input stream to put into `sys.stdin`. + :param env: the environment overrides as dictionary. + :param color: whether the output should contain color codes. The + application can still override this explicitly. + + .. versionadded:: 8.2 + An additional output stream is returned, which is a mix of + `` and `` streams. + + .. versionchanged:: 8.2 + Always returns the `` stream. + + .. versionchanged:: 8.0 + `` is opened with ``errors="backslashreplace"`` + instead of the default ``"strict"``. + + .. versionchanged:: 4.0 + Added the ``color`` parameter. + """ + bytes_input = make_input_stream(input, self.charset) + echo_input = None + + old_stdin = sys.stdin + old_stdout = sys.stdout + old_stderr = sys.stderr + old_forced_width = formatting.FORCED_WIDTH + formatting.FORCED_WIDTH = 80 + + env = self.make_env(env) + + stream_mixer = StreamMixer() + + if self.echo_stdin: + bytes_input = echo_input = t.cast( + t.BinaryIO, EchoingStdin(bytes_input, stream_mixer.stdout) + ) + + sys.stdin = text_input = _NamedTextIOWrapper( + bytes_input, encoding=self.charset, name="", mode="r" + ) + + if self.echo_stdin: + # Force unbuffered reads, otherwise TextIOWrapper reads a + # large chunk which is echoed early. + text_input._CHUNK_SIZE = 1 # type: ignore + + sys.stdout = _NamedTextIOWrapper( + stream_mixer.stdout, encoding=self.charset, name="", mode="w" + ) + + sys.stderr = _NamedTextIOWrapper( + stream_mixer.stderr, + encoding=self.charset, + name="", + mode="w", + errors="backslashreplace", + ) + + @_pause_echo(echo_input) # type: ignore + def visible_input(prompt: str | None = None) -> str: + sys.stdout.write(prompt or "") + try: + val = next(text_input).rstrip("\r\n") + except StopIteration as e: + raise EOFError() from e + sys.stdout.write(f"{val}\n") + sys.stdout.flush() + return val + + @_pause_echo(echo_input) # type: ignore + def hidden_input(prompt: str | None = None) -> str: + sys.stdout.write(f"{prompt or ''}\n") + sys.stdout.flush() + try: + return next(text_input).rstrip("\r\n") + except StopIteration as e: + raise EOFError() from e + + @_pause_echo(echo_input) # type: ignore + def _getchar(echo: bool) -> str: + char = sys.stdin.read(1) + + if echo: + sys.stdout.write(char) + + sys.stdout.flush() + return char + + default_color = color + + def should_strip_ansi( + stream: t.IO[t.Any] | None = None, color: bool | None = None + ) -> bool: + if color is None: + return not default_color + return not color + + old_visible_prompt_func = termui.visible_prompt_func + old_hidden_prompt_func = termui.hidden_prompt_func + old__getchar_func = termui._getchar + old_should_strip_ansi = utils.should_strip_ansi # type: ignore + old__compat_should_strip_ansi = _compat.should_strip_ansi + termui.visible_prompt_func = visible_input + termui.hidden_prompt_func = hidden_input + termui._getchar = _getchar + utils.should_strip_ansi = should_strip_ansi # type: ignore + _compat.should_strip_ansi = should_strip_ansi + + old_env = {} + try: + for key, value in env.items(): + old_env[key] = os.environ.get(key) + if value is None: + try: + del os.environ[key] + except Exception: + pass + else: + os.environ[key] = value + yield (stream_mixer.stdout, stream_mixer.stderr, stream_mixer.output) + finally: + for key, value in old_env.items(): + if value is None: + try: + del os.environ[key] + except Exception: + pass + else: + os.environ[key] = value + sys.stdout = old_stdout + sys.stderr = old_stderr + sys.stdin = old_stdin + termui.visible_prompt_func = old_visible_prompt_func + termui.hidden_prompt_func = old_hidden_prompt_func + termui._getchar = old__getchar_func + utils.should_strip_ansi = old_should_strip_ansi # type: ignore + _compat.should_strip_ansi = old__compat_should_strip_ansi + formatting.FORCED_WIDTH = old_forced_width + + def invoke( + self, + cli: Command, + args: str | cabc.Sequence[str] | None = None, + input: str | bytes | t.IO[t.Any] | None = None, + env: cabc.Mapping[str, str | None] | None = None, + catch_exceptions: bool | None = None, + color: bool = False, + **extra: t.Any, + ) -> Result: + """Invokes a command in an isolated environment. The arguments are + forwarded directly to the command line script, the `extra` keyword + arguments are passed to the :meth:`~clickpkg.Command.main` function of + the command. + + This returns a :class:`Result` object. + + :param cli: the command to invoke + :param args: the arguments to invoke. It may be given as an iterable + or a string. When given as string it will be interpreted + as a Unix shell command. More details at + :func:`shlex.split`. + :param input: the input data for `sys.stdin`. + :param env: the environment overrides. + :param catch_exceptions: Whether to catch any other exceptions than + ``SystemExit``. If :data:`None`, the value + from :class:`CliRunner` is used. + :param extra: the keyword arguments to pass to :meth:`main`. + :param color: whether the output should contain color codes. The + application can still override this explicitly. + + .. versionadded:: 8.2 + The result object has the ``output_bytes`` attribute with + the mix of ``stdout_bytes`` and ``stderr_bytes``, as the user would + see it in its terminal. + + .. versionchanged:: 8.2 + The result object always returns the ``stderr_bytes`` stream. + + .. versionchanged:: 8.0 + The result object has the ``return_value`` attribute with + the value returned from the invoked command. + + .. versionchanged:: 4.0 + Added the ``color`` parameter. + + .. versionchanged:: 3.0 + Added the ``catch_exceptions`` parameter. + + .. versionchanged:: 3.0 + The result object has the ``exc_info`` attribute with the + traceback if available. + """ + exc_info = None + if catch_exceptions is None: + catch_exceptions = self.catch_exceptions + + with self.isolation(input=input, env=env, color=color) as outstreams: + return_value = None + exception: BaseException | None = None + exit_code = 0 + + if isinstance(args, str): + args = shlex.split(args) + + try: + prog_name = extra.pop("prog_name") + except KeyError: + prog_name = self.get_default_prog_name(cli) + + try: + return_value = cli.main(args=args or (), prog_name=prog_name, **extra) + except SystemExit as e: + exc_info = sys.exc_info() + e_code = t.cast("int | t.Any | None", e.code) + + if e_code is None: + e_code = 0 + + if e_code != 0: + exception = e + + if not isinstance(e_code, int): + sys.stdout.write(str(e_code)) + sys.stdout.write("\n") + e_code = 1 + + exit_code = e_code + + except Exception as e: + if not catch_exceptions: + raise + exception = e + exit_code = 1 + exc_info = sys.exc_info() + finally: + sys.stdout.flush() + sys.stderr.flush() + stdout = outstreams[0].getvalue() + stderr = outstreams[1].getvalue() + output = outstreams[2].getvalue() + + return Result( + runner=self, + stdout_bytes=stdout, + stderr_bytes=stderr, + output_bytes=output, + return_value=return_value, + exit_code=exit_code, + exception=exception, + exc_info=exc_info, # type: ignore + ) + + @contextlib.contextmanager + def isolated_filesystem( + self, temp_dir: str | os.PathLike[str] | None = None + ) -> cabc.Iterator[str]: + """A context manager that creates a temporary directory and + changes the current working directory to it. This isolates tests + that affect the contents of the CWD to prevent them from + interfering with each other. + + :param temp_dir: Create the temporary directory under this + directory. If given, the created directory is not removed + when exiting. + + .. versionchanged:: 8.0 + Added the ``temp_dir`` parameter. + """ + cwd = os.getcwd() + dt = tempfile.mkdtemp(dir=temp_dir) + os.chdir(dt) + + try: + yield dt + finally: + os.chdir(cwd) + + if temp_dir is None: + import shutil + + try: + shutil.rmtree(dt) + except OSError: + pass diff --git a/venv/lib/python3.12/site-packages/click/types.py b/venv/lib/python3.12/site-packages/click/types.py new file mode 100644 index 0000000..e71c1c2 --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/types.py @@ -0,0 +1,1209 @@ +from __future__ import annotations + +import collections.abc as cabc +import enum +import os +import stat +import sys +import typing as t +from datetime import datetime +from gettext import gettext as _ +from gettext import ngettext + +from ._compat import _get_argv_encoding +from ._compat import open_stream +from .exceptions import BadParameter +from .utils import format_filename +from .utils import LazyFile +from .utils import safecall + +if t.TYPE_CHECKING: + import typing_extensions as te + + from .core import Context + from .core import Parameter + from .shell_completion import CompletionItem + +ParamTypeValue = t.TypeVar("ParamTypeValue") + + +class ParamType: + """Represents the type of a parameter. Validates and converts values + from the command line or Python into the correct type. + + To implement a custom type, subclass and implement at least the + following: + + - The :attr:`name` class attribute must be set. + - Calling an instance of the type with ``None`` must return + ``None``. This is already implemented by default. + - :meth:`convert` must convert string values to the correct type. + - :meth:`convert` must accept values that are already the correct + type. + - It must be able to convert a value if the ``ctx`` and ``param`` + arguments are ``None``. This can occur when converting prompt + input. + """ + + is_composite: t.ClassVar[bool] = False + arity: t.ClassVar[int] = 1 + + #: the descriptive name of this type + name: str + + #: if a list of this type is expected and the value is pulled from a + #: string environment variable, this is what splits it up. `None` + #: means any whitespace. For all parameters the general rule is that + #: whitespace splits them up. The exception are paths and files which + #: are split by ``os.path.pathsep`` by default (":" on Unix and ";" on + #: Windows). + envvar_list_splitter: t.ClassVar[str | None] = None + + def to_info_dict(self) -> dict[str, t.Any]: + """Gather information that could be useful for a tool generating + user-facing documentation. + + Use :meth:`click.Context.to_info_dict` to traverse the entire + CLI structure. + + .. versionadded:: 8.0 + """ + # The class name without the "ParamType" suffix. + param_type = type(self).__name__.partition("ParamType")[0] + param_type = param_type.partition("ParameterType")[0] + + # Custom subclasses might not remember to set a name. + if hasattr(self, "name"): + name = self.name + else: + name = param_type + + return {"param_type": param_type, "name": name} + + def __call__( + self, + value: t.Any, + param: Parameter | None = None, + ctx: Context | None = None, + ) -> t.Any: + if value is not None: + return self.convert(value, param, ctx) + + def get_metavar(self, param: Parameter, ctx: Context) -> str | None: + """Returns the metavar default for this param if it provides one.""" + + def get_missing_message(self, param: Parameter, ctx: Context | None) -> str | None: + """Optionally might return extra information about a missing + parameter. + + .. versionadded:: 2.0 + """ + + def convert( + self, value: t.Any, param: Parameter | None, ctx: Context | None + ) -> t.Any: + """Convert the value to the correct type. This is not called if + the value is ``None`` (the missing value). + + This must accept string values from the command line, as well as + values that are already the correct type. It may also convert + other compatible types. + + The ``param`` and ``ctx`` arguments may be ``None`` in certain + situations, such as when converting prompt input. + + If the value cannot be converted, call :meth:`fail` with a + descriptive message. + + :param value: The value to convert. + :param param: The parameter that is using this type to convert + its value. May be ``None``. + :param ctx: The current context that arrived at this value. May + be ``None``. + """ + return value + + def split_envvar_value(self, rv: str) -> cabc.Sequence[str]: + """Given a value from an environment variable this splits it up + into small chunks depending on the defined envvar list splitter. + + If the splitter is set to `None`, which means that whitespace splits, + then leading and trailing whitespace is ignored. Otherwise, leading + and trailing splitters usually lead to empty items being included. + """ + return (rv or "").split(self.envvar_list_splitter) + + def fail( + self, + message: str, + param: Parameter | None = None, + ctx: Context | None = None, + ) -> t.NoReturn: + """Helper method to fail with an invalid value message.""" + raise BadParameter(message, ctx=ctx, param=param) + + def shell_complete( + self, ctx: Context, param: Parameter, incomplete: str + ) -> list[CompletionItem]: + """Return a list of + :class:`~click.shell_completion.CompletionItem` objects for the + incomplete value. Most types do not provide completions, but + some do, and this allows custom types to provide custom + completions as well. + + :param ctx: Invocation context for this command. + :param param: The parameter that is requesting completion. + :param incomplete: Value being completed. May be empty. + + .. versionadded:: 8.0 + """ + return [] + + +class CompositeParamType(ParamType): + is_composite = True + + @property + def arity(self) -> int: # type: ignore + raise NotImplementedError() + + +class FuncParamType(ParamType): + def __init__(self, func: t.Callable[[t.Any], t.Any]) -> None: + self.name: str = func.__name__ + self.func = func + + def to_info_dict(self) -> dict[str, t.Any]: + info_dict = super().to_info_dict() + info_dict["func"] = self.func + return info_dict + + def convert( + self, value: t.Any, param: Parameter | None, ctx: Context | None + ) -> t.Any: + try: + return self.func(value) + except ValueError: + try: + value = str(value) + except UnicodeError: + value = value.decode("utf-8", "replace") + + self.fail(value, param, ctx) + + +class UnprocessedParamType(ParamType): + name = "text" + + def convert( + self, value: t.Any, param: Parameter | None, ctx: Context | None + ) -> t.Any: + return value + + def __repr__(self) -> str: + return "UNPROCESSED" + + +class StringParamType(ParamType): + name = "text" + + def convert( + self, value: t.Any, param: Parameter | None, ctx: Context | None + ) -> t.Any: + if isinstance(value, bytes): + enc = _get_argv_encoding() + try: + value = value.decode(enc) + except UnicodeError: + fs_enc = sys.getfilesystemencoding() + if fs_enc != enc: + try: + value = value.decode(fs_enc) + except UnicodeError: + value = value.decode("utf-8", "replace") + else: + value = value.decode("utf-8", "replace") + return value + return str(value) + + def __repr__(self) -> str: + return "STRING" + + +class Choice(ParamType, t.Generic[ParamTypeValue]): + """The choice type allows a value to be checked against a fixed set + of supported values. + + You may pass any iterable value which will be converted to a tuple + and thus will only be iterated once. + + The resulting value will always be one of the originally passed choices. + See :meth:`normalize_choice` for more info on the mapping of strings + to choices. See :ref:`choice-opts` for an example. + + :param case_sensitive: Set to false to make choices case + insensitive. Defaults to true. + + .. versionchanged:: 8.2.0 + Non-``str`` ``choices`` are now supported. It can additionally be any + iterable. Before you were not recommended to pass anything but a list or + tuple. + + .. versionadded:: 8.2.0 + Choice normalization can be overridden via :meth:`normalize_choice`. + """ + + name = "choice" + + def __init__( + self, choices: cabc.Iterable[ParamTypeValue], case_sensitive: bool = True + ) -> None: + self.choices: cabc.Sequence[ParamTypeValue] = tuple(choices) + self.case_sensitive = case_sensitive + + def to_info_dict(self) -> dict[str, t.Any]: + info_dict = super().to_info_dict() + info_dict["choices"] = self.choices + info_dict["case_sensitive"] = self.case_sensitive + return info_dict + + def _normalized_mapping( + self, ctx: Context | None = None + ) -> cabc.Mapping[ParamTypeValue, str]: + """ + Returns mapping where keys are the original choices and the values are + the normalized values that are accepted via the command line. + + This is a simple wrapper around :meth:`normalize_choice`, use that + instead which is supported. + """ + return { + choice: self.normalize_choice( + choice=choice, + ctx=ctx, + ) + for choice in self.choices + } + + def normalize_choice(self, choice: ParamTypeValue, ctx: Context | None) -> str: + """ + Normalize a choice value, used to map a passed string to a choice. + Each choice must have a unique normalized value. + + By default uses :meth:`Context.token_normalize_func` and if not case + sensitive, convert it to a casefolded value. + + .. versionadded:: 8.2.0 + """ + normed_value = choice.name if isinstance(choice, enum.Enum) else str(choice) + + if ctx is not None and ctx.token_normalize_func is not None: + normed_value = ctx.token_normalize_func(normed_value) + + if not self.case_sensitive: + normed_value = normed_value.casefold() + + return normed_value + + def get_metavar(self, param: Parameter, ctx: Context) -> str | None: + if param.param_type_name == "option" and not param.show_choices: # type: ignore + choice_metavars = [ + convert_type(type(choice)).name.upper() for choice in self.choices + ] + choices_str = "|".join([*dict.fromkeys(choice_metavars)]) + else: + choices_str = "|".join( + [str(i) for i in self._normalized_mapping(ctx=ctx).values()] + ) + + # Use curly braces to indicate a required argument. + if param.required and param.param_type_name == "argument": + return f"{{{choices_str}}}" + + # Use square braces to indicate an option or optional argument. + return f"[{choices_str}]" + + def get_missing_message(self, param: Parameter, ctx: Context | None) -> str: + """ + Message shown when no choice is passed. + + .. versionchanged:: 8.2.0 Added ``ctx`` argument. + """ + return _("Choose from:\n\t{choices}").format( + choices=",\n\t".join(self._normalized_mapping(ctx=ctx).values()) + ) + + def convert( + self, value: t.Any, param: Parameter | None, ctx: Context | None + ) -> ParamTypeValue: + """ + For a given value from the parser, normalize it and find its + matching normalized value in the list of choices. Then return the + matched "original" choice. + """ + normed_value = self.normalize_choice(choice=value, ctx=ctx) + normalized_mapping = self._normalized_mapping(ctx=ctx) + + try: + return next( + original + for original, normalized in normalized_mapping.items() + if normalized == normed_value + ) + except StopIteration: + self.fail( + self.get_invalid_choice_message(value=value, ctx=ctx), + param=param, + ctx=ctx, + ) + + def get_invalid_choice_message(self, value: t.Any, ctx: Context | None) -> str: + """Get the error message when the given choice is invalid. + + :param value: The invalid value. + + .. versionadded:: 8.2 + """ + choices_str = ", ".join(map(repr, self._normalized_mapping(ctx=ctx).values())) + return ngettext( + "{value!r} is not {choice}.", + "{value!r} is not one of {choices}.", + len(self.choices), + ).format(value=value, choice=choices_str, choices=choices_str) + + def __repr__(self) -> str: + return f"Choice({list(self.choices)})" + + def shell_complete( + self, ctx: Context, param: Parameter, incomplete: str + ) -> list[CompletionItem]: + """Complete choices that start with the incomplete value. + + :param ctx: Invocation context for this command. + :param param: The parameter that is requesting completion. + :param incomplete: Value being completed. May be empty. + + .. versionadded:: 8.0 + """ + from click.shell_completion import CompletionItem + + str_choices = map(str, self.choices) + + if self.case_sensitive: + matched = (c for c in str_choices if c.startswith(incomplete)) + else: + incomplete = incomplete.lower() + matched = (c for c in str_choices if c.lower().startswith(incomplete)) + + return [CompletionItem(c) for c in matched] + + +class DateTime(ParamType): + """The DateTime type converts date strings into `datetime` objects. + + The format strings which are checked are configurable, but default to some + common (non-timezone aware) ISO 8601 formats. + + When specifying *DateTime* formats, you should only pass a list or a tuple. + Other iterables, like generators, may lead to surprising results. + + The format strings are processed using ``datetime.strptime``, and this + consequently defines the format strings which are allowed. + + Parsing is tried using each format, in order, and the first format which + parses successfully is used. + + :param formats: A list or tuple of date format strings, in the order in + which they should be tried. Defaults to + ``'%Y-%m-%d'``, ``'%Y-%m-%dT%H:%M:%S'``, + ``'%Y-%m-%d %H:%M:%S'``. + """ + + name = "datetime" + + def __init__(self, formats: cabc.Sequence[str] | None = None): + self.formats: cabc.Sequence[str] = formats or [ + "%Y-%m-%d", + "%Y-%m-%dT%H:%M:%S", + "%Y-%m-%d %H:%M:%S", + ] + + def to_info_dict(self) -> dict[str, t.Any]: + info_dict = super().to_info_dict() + info_dict["formats"] = self.formats + return info_dict + + def get_metavar(self, param: Parameter, ctx: Context) -> str | None: + return f"[{'|'.join(self.formats)}]" + + def _try_to_convert_date(self, value: t.Any, format: str) -> datetime | None: + try: + return datetime.strptime(value, format) + except ValueError: + return None + + def convert( + self, value: t.Any, param: Parameter | None, ctx: Context | None + ) -> t.Any: + if isinstance(value, datetime): + return value + + for format in self.formats: + converted = self._try_to_convert_date(value, format) + + if converted is not None: + return converted + + formats_str = ", ".join(map(repr, self.formats)) + self.fail( + ngettext( + "{value!r} does not match the format {format}.", + "{value!r} does not match the formats {formats}.", + len(self.formats), + ).format(value=value, format=formats_str, formats=formats_str), + param, + ctx, + ) + + def __repr__(self) -> str: + return "DateTime" + + +class _NumberParamTypeBase(ParamType): + _number_class: t.ClassVar[type[t.Any]] + + def convert( + self, value: t.Any, param: Parameter | None, ctx: Context | None + ) -> t.Any: + try: + return self._number_class(value) + except ValueError: + self.fail( + _("{value!r} is not a valid {number_type}.").format( + value=value, number_type=self.name + ), + param, + ctx, + ) + + +class _NumberRangeBase(_NumberParamTypeBase): + def __init__( + self, + min: float | None = None, + max: float | None = None, + min_open: bool = False, + max_open: bool = False, + clamp: bool = False, + ) -> None: + self.min = min + self.max = max + self.min_open = min_open + self.max_open = max_open + self.clamp = clamp + + def to_info_dict(self) -> dict[str, t.Any]: + info_dict = super().to_info_dict() + info_dict.update( + min=self.min, + max=self.max, + min_open=self.min_open, + max_open=self.max_open, + clamp=self.clamp, + ) + return info_dict + + def convert( + self, value: t.Any, param: Parameter | None, ctx: Context | None + ) -> t.Any: + import operator + + rv = super().convert(value, param, ctx) + lt_min: bool = self.min is not None and ( + operator.le if self.min_open else operator.lt + )(rv, self.min) + gt_max: bool = self.max is not None and ( + operator.ge if self.max_open else operator.gt + )(rv, self.max) + + if self.clamp: + if lt_min: + return self._clamp(self.min, 1, self.min_open) # type: ignore + + if gt_max: + return self._clamp(self.max, -1, self.max_open) # type: ignore + + if lt_min or gt_max: + self.fail( + _("{value} is not in the range {range}.").format( + value=rv, range=self._describe_range() + ), + param, + ctx, + ) + + return rv + + def _clamp(self, bound: float, dir: t.Literal[1, -1], open: bool) -> float: + """Find the valid value to clamp to bound in the given + direction. + + :param bound: The boundary value. + :param dir: 1 or -1 indicating the direction to move. + :param open: If true, the range does not include the bound. + """ + raise NotImplementedError + + def _describe_range(self) -> str: + """Describe the range for use in help text.""" + if self.min is None: + op = "<" if self.max_open else "<=" + return f"x{op}{self.max}" + + if self.max is None: + op = ">" if self.min_open else ">=" + return f"x{op}{self.min}" + + lop = "<" if self.min_open else "<=" + rop = "<" if self.max_open else "<=" + return f"{self.min}{lop}x{rop}{self.max}" + + def __repr__(self) -> str: + clamp = " clamped" if self.clamp else "" + return f"<{type(self).__name__} {self._describe_range()}{clamp}>" + + +class IntParamType(_NumberParamTypeBase): + name = "integer" + _number_class = int + + def __repr__(self) -> str: + return "INT" + + +class IntRange(_NumberRangeBase, IntParamType): + """Restrict an :data:`click.INT` value to a range of accepted + values. See :ref:`ranges`. + + If ``min`` or ``max`` are not passed, any value is accepted in that + direction. If ``min_open`` or ``max_open`` are enabled, the + corresponding boundary is not included in the range. + + If ``clamp`` is enabled, a value outside the range is clamped to the + boundary instead of failing. + + .. versionchanged:: 8.0 + Added the ``min_open`` and ``max_open`` parameters. + """ + + name = "integer range" + + def _clamp( # type: ignore + self, bound: int, dir: t.Literal[1, -1], open: bool + ) -> int: + if not open: + return bound + + return bound + dir + + +class FloatParamType(_NumberParamTypeBase): + name = "float" + _number_class = float + + def __repr__(self) -> str: + return "FLOAT" + + +class FloatRange(_NumberRangeBase, FloatParamType): + """Restrict a :data:`click.FLOAT` value to a range of accepted + values. See :ref:`ranges`. + + If ``min`` or ``max`` are not passed, any value is accepted in that + direction. If ``min_open`` or ``max_open`` are enabled, the + corresponding boundary is not included in the range. + + If ``clamp`` is enabled, a value outside the range is clamped to the + boundary instead of failing. This is not supported if either + boundary is marked ``open``. + + .. versionchanged:: 8.0 + Added the ``min_open`` and ``max_open`` parameters. + """ + + name = "float range" + + def __init__( + self, + min: float | None = None, + max: float | None = None, + min_open: bool = False, + max_open: bool = False, + clamp: bool = False, + ) -> None: + super().__init__( + min=min, max=max, min_open=min_open, max_open=max_open, clamp=clamp + ) + + if (min_open or max_open) and clamp: + raise TypeError("Clamping is not supported for open bounds.") + + def _clamp(self, bound: float, dir: t.Literal[1, -1], open: bool) -> float: + if not open: + return bound + + # Could use math.nextafter here, but clamping an + # open float range doesn't seem to be particularly useful. It's + # left up to the user to write a callback to do it if needed. + raise RuntimeError("Clamping is not supported for open bounds.") + + +class BoolParamType(ParamType): + name = "boolean" + + bool_states: dict[str, bool] = { + "1": True, + "0": False, + "yes": True, + "no": False, + "true": True, + "false": False, + "on": True, + "off": False, + "t": True, + "f": False, + "y": True, + "n": False, + # Absence of value is considered False. + "": False, + } + """A mapping of string values to boolean states. + + Mapping is inspired by :py:attr:`configparser.ConfigParser.BOOLEAN_STATES` + and extends it. + + .. caution:: + String values are lower-cased, as the ``str_to_bool`` comparison function + below is case-insensitive. + + .. warning:: + The mapping is not exhaustive, and does not cover all possible boolean strings + representations. It will remains as it is to avoid endless bikeshedding. + + Future work my be considered to make this mapping user-configurable from public + API. + """ + + @staticmethod + def str_to_bool(value: str | bool) -> bool | None: + """Convert a string to a boolean value. + + If the value is already a boolean, it is returned as-is. If the value is a + string, it is stripped of whitespaces and lower-cased, then checked against + the known boolean states pre-defined in the `BoolParamType.bool_states` mapping + above. + + Returns `None` if the value does not match any known boolean state. + """ + if isinstance(value, bool): + return value + return BoolParamType.bool_states.get(value.strip().lower()) + + def convert( + self, value: t.Any, param: Parameter | None, ctx: Context | None + ) -> bool: + normalized = self.str_to_bool(value) + if normalized is None: + self.fail( + _( + "{value!r} is not a valid boolean. Recognized values: {states}" + ).format(value=value, states=", ".join(sorted(self.bool_states))), + param, + ctx, + ) + return normalized + + def __repr__(self) -> str: + return "BOOL" + + +class UUIDParameterType(ParamType): + name = "uuid" + + def convert( + self, value: t.Any, param: Parameter | None, ctx: Context | None + ) -> t.Any: + import uuid + + if isinstance(value, uuid.UUID): + return value + + value = value.strip() + + try: + return uuid.UUID(value) + except ValueError: + self.fail( + _("{value!r} is not a valid UUID.").format(value=value), param, ctx + ) + + def __repr__(self) -> str: + return "UUID" + + +class File(ParamType): + """Declares a parameter to be a file for reading or writing. The file + is automatically closed once the context tears down (after the command + finished working). + + Files can be opened for reading or writing. The special value ``-`` + indicates stdin or stdout depending on the mode. + + By default, the file is opened for reading text data, but it can also be + opened in binary mode or for writing. The encoding parameter can be used + to force a specific encoding. + + The `lazy` flag controls if the file should be opened immediately or upon + first IO. The default is to be non-lazy for standard input and output + streams as well as files opened for reading, `lazy` otherwise. When opening a + file lazily for reading, it is still opened temporarily for validation, but + will not be held open until first IO. lazy is mainly useful when opening + for writing to avoid creating the file until it is needed. + + Files can also be opened atomically in which case all writes go into a + separate file in the same folder and upon completion the file will + be moved over to the original location. This is useful if a file + regularly read by other users is modified. + + See :ref:`file-args` for more information. + + .. versionchanged:: 2.0 + Added the ``atomic`` parameter. + """ + + name = "filename" + envvar_list_splitter: t.ClassVar[str] = os.path.pathsep + + def __init__( + self, + mode: str = "r", + encoding: str | None = None, + errors: str | None = "strict", + lazy: bool | None = None, + atomic: bool = False, + ) -> None: + self.mode = mode + self.encoding = encoding + self.errors = errors + self.lazy = lazy + self.atomic = atomic + + def to_info_dict(self) -> dict[str, t.Any]: + info_dict = super().to_info_dict() + info_dict.update(mode=self.mode, encoding=self.encoding) + return info_dict + + def resolve_lazy_flag(self, value: str | os.PathLike[str]) -> bool: + if self.lazy is not None: + return self.lazy + if os.fspath(value) == "-": + return False + elif "w" in self.mode: + return True + return False + + def convert( + self, + value: str | os.PathLike[str] | t.IO[t.Any], + param: Parameter | None, + ctx: Context | None, + ) -> t.IO[t.Any]: + if _is_file_like(value): + return value + + value = t.cast("str | os.PathLike[str]", value) + + try: + lazy = self.resolve_lazy_flag(value) + + if lazy: + lf = LazyFile( + value, self.mode, self.encoding, self.errors, atomic=self.atomic + ) + + if ctx is not None: + ctx.call_on_close(lf.close_intelligently) + + return t.cast("t.IO[t.Any]", lf) + + f, should_close = open_stream( + value, self.mode, self.encoding, self.errors, atomic=self.atomic + ) + + # If a context is provided, we automatically close the file + # at the end of the context execution (or flush out). If a + # context does not exist, it's the caller's responsibility to + # properly close the file. This for instance happens when the + # type is used with prompts. + if ctx is not None: + if should_close: + ctx.call_on_close(safecall(f.close)) + else: + ctx.call_on_close(safecall(f.flush)) + + return f + except OSError as e: + self.fail(f"'{format_filename(value)}': {e.strerror}", param, ctx) + + def shell_complete( + self, ctx: Context, param: Parameter, incomplete: str + ) -> list[CompletionItem]: + """Return a special completion marker that tells the completion + system to use the shell to provide file path completions. + + :param ctx: Invocation context for this command. + :param param: The parameter that is requesting completion. + :param incomplete: Value being completed. May be empty. + + .. versionadded:: 8.0 + """ + from click.shell_completion import CompletionItem + + return [CompletionItem(incomplete, type="file")] + + +def _is_file_like(value: t.Any) -> te.TypeGuard[t.IO[t.Any]]: + return hasattr(value, "read") or hasattr(value, "write") + + +class Path(ParamType): + """The ``Path`` type is similar to the :class:`File` type, but + returns the filename instead of an open file. Various checks can be + enabled to validate the type of file and permissions. + + :param exists: The file or directory needs to exist for the value to + be valid. If this is not set to ``True``, and the file does not + exist, then all further checks are silently skipped. + :param file_okay: Allow a file as a value. + :param dir_okay: Allow a directory as a value. + :param readable: if true, a readable check is performed. + :param writable: if true, a writable check is performed. + :param executable: if true, an executable check is performed. + :param resolve_path: Make the value absolute and resolve any + symlinks. A ``~`` is not expanded, as this is supposed to be + done by the shell only. + :param allow_dash: Allow a single dash as a value, which indicates + a standard stream (but does not open it). Use + :func:`~click.open_file` to handle opening this value. + :param path_type: Convert the incoming path value to this type. If + ``None``, keep Python's default, which is ``str``. Useful to + convert to :class:`pathlib.Path`. + + .. versionchanged:: 8.1 + Added the ``executable`` parameter. + + .. versionchanged:: 8.0 + Allow passing ``path_type=pathlib.Path``. + + .. versionchanged:: 6.0 + Added the ``allow_dash`` parameter. + """ + + envvar_list_splitter: t.ClassVar[str] = os.path.pathsep + + def __init__( + self, + exists: bool = False, + file_okay: bool = True, + dir_okay: bool = True, + writable: bool = False, + readable: bool = True, + resolve_path: bool = False, + allow_dash: bool = False, + path_type: type[t.Any] | None = None, + executable: bool = False, + ): + self.exists = exists + self.file_okay = file_okay + self.dir_okay = dir_okay + self.readable = readable + self.writable = writable + self.executable = executable + self.resolve_path = resolve_path + self.allow_dash = allow_dash + self.type = path_type + + if self.file_okay and not self.dir_okay: + self.name: str = _("file") + elif self.dir_okay and not self.file_okay: + self.name = _("directory") + else: + self.name = _("path") + + def to_info_dict(self) -> dict[str, t.Any]: + info_dict = super().to_info_dict() + info_dict.update( + exists=self.exists, + file_okay=self.file_okay, + dir_okay=self.dir_okay, + writable=self.writable, + readable=self.readable, + allow_dash=self.allow_dash, + ) + return info_dict + + def coerce_path_result( + self, value: str | os.PathLike[str] + ) -> str | bytes | os.PathLike[str]: + if self.type is not None and not isinstance(value, self.type): + if self.type is str: + return os.fsdecode(value) + elif self.type is bytes: + return os.fsencode(value) + else: + return t.cast("os.PathLike[str]", self.type(value)) + + return value + + def convert( + self, + value: str | os.PathLike[str], + param: Parameter | None, + ctx: Context | None, + ) -> str | bytes | os.PathLike[str]: + rv = value + + is_dash = self.file_okay and self.allow_dash and rv in (b"-", "-") + + if not is_dash: + if self.resolve_path: + rv = os.path.realpath(rv) + + try: + st = os.stat(rv) + except OSError: + if not self.exists: + return self.coerce_path_result(rv) + self.fail( + _("{name} {filename!r} does not exist.").format( + name=self.name.title(), filename=format_filename(value) + ), + param, + ctx, + ) + + if not self.file_okay and stat.S_ISREG(st.st_mode): + self.fail( + _("{name} {filename!r} is a file.").format( + name=self.name.title(), filename=format_filename(value) + ), + param, + ctx, + ) + if not self.dir_okay and stat.S_ISDIR(st.st_mode): + self.fail( + _("{name} {filename!r} is a directory.").format( + name=self.name.title(), filename=format_filename(value) + ), + param, + ctx, + ) + + if self.readable and not os.access(rv, os.R_OK): + self.fail( + _("{name} {filename!r} is not readable.").format( + name=self.name.title(), filename=format_filename(value) + ), + param, + ctx, + ) + + if self.writable and not os.access(rv, os.W_OK): + self.fail( + _("{name} {filename!r} is not writable.").format( + name=self.name.title(), filename=format_filename(value) + ), + param, + ctx, + ) + + if self.executable and not os.access(value, os.X_OK): + self.fail( + _("{name} {filename!r} is not executable.").format( + name=self.name.title(), filename=format_filename(value) + ), + param, + ctx, + ) + + return self.coerce_path_result(rv) + + def shell_complete( + self, ctx: Context, param: Parameter, incomplete: str + ) -> list[CompletionItem]: + """Return a special completion marker that tells the completion + system to use the shell to provide path completions for only + directories or any paths. + + :param ctx: Invocation context for this command. + :param param: The parameter that is requesting completion. + :param incomplete: Value being completed. May be empty. + + .. versionadded:: 8.0 + """ + from click.shell_completion import CompletionItem + + type = "dir" if self.dir_okay and not self.file_okay else "file" + return [CompletionItem(incomplete, type=type)] + + +class Tuple(CompositeParamType): + """The default behavior of Click is to apply a type on a value directly. + This works well in most cases, except for when `nargs` is set to a fixed + count and different types should be used for different items. In this + case the :class:`Tuple` type can be used. This type can only be used + if `nargs` is set to a fixed number. + + For more information see :ref:`tuple-type`. + + This can be selected by using a Python tuple literal as a type. + + :param types: a list of types that should be used for the tuple items. + """ + + def __init__(self, types: cabc.Sequence[type[t.Any] | ParamType]) -> None: + self.types: cabc.Sequence[ParamType] = [convert_type(ty) for ty in types] + + def to_info_dict(self) -> dict[str, t.Any]: + info_dict = super().to_info_dict() + info_dict["types"] = [t.to_info_dict() for t in self.types] + return info_dict + + @property + def name(self) -> str: # type: ignore + return f"<{' '.join(ty.name for ty in self.types)}>" + + @property + def arity(self) -> int: # type: ignore + return len(self.types) + + def convert( + self, value: t.Any, param: Parameter | None, ctx: Context | None + ) -> t.Any: + len_type = len(self.types) + len_value = len(value) + + if len_value != len_type: + self.fail( + ngettext( + "{len_type} values are required, but {len_value} was given.", + "{len_type} values are required, but {len_value} were given.", + len_value, + ).format(len_type=len_type, len_value=len_value), + param=param, + ctx=ctx, + ) + + return tuple( + ty(x, param, ctx) for ty, x in zip(self.types, value, strict=False) + ) + + +def convert_type(ty: t.Any | None, default: t.Any | None = None) -> ParamType: + """Find the most appropriate :class:`ParamType` for the given Python + type. If the type isn't provided, it can be inferred from a default + value. + """ + guessed_type = False + + if ty is None and default is not None: + if isinstance(default, (tuple, list)): + # If the default is empty, ty will remain None and will + # return STRING. + if default: + item = default[0] + + # A tuple of tuples needs to detect the inner types. + # Can't call convert recursively because that would + # incorrectly unwind the tuple to a single type. + if isinstance(item, (tuple, list)): + ty = tuple(map(type, item)) + else: + ty = type(item) + else: + ty = type(default) + + guessed_type = True + + if isinstance(ty, tuple): + return Tuple(ty) + + if isinstance(ty, ParamType): + return ty + + if ty is str or ty is None: + return STRING + + if ty is int: + return INT + + if ty is float: + return FLOAT + + if ty is bool: + return BOOL + + if guessed_type: + return STRING + + if __debug__: + try: + if issubclass(ty, ParamType): + raise AssertionError( + f"Attempted to use an uninstantiated parameter type ({ty})." + ) + except TypeError: + # ty is an instance (correct), so issubclass fails. + pass + + return FuncParamType(ty) + + +#: A dummy parameter type that just does nothing. From a user's +#: perspective this appears to just be the same as `STRING` but +#: internally no string conversion takes place if the input was bytes. +#: This is usually useful when working with file paths as they can +#: appear in bytes and unicode. +#: +#: For path related uses the :class:`Path` type is a better choice but +#: there are situations where an unprocessed type is useful which is why +#: it is is provided. +#: +#: .. versionadded:: 4.0 +UNPROCESSED = UnprocessedParamType() + +#: A unicode string parameter type which is the implicit default. This +#: can also be selected by using ``str`` as type. +STRING = StringParamType() + +#: An integer parameter. This can also be selected by using ``int`` as +#: type. +INT = IntParamType() + +#: A floating point value parameter. This can also be selected by using +#: ``float`` as type. +FLOAT = FloatParamType() + +#: A boolean parameter. This is the default for boolean flags. This can +#: also be selected by using ``bool`` as a type. +BOOL = BoolParamType() + +#: A UUID parameter. +UUID = UUIDParameterType() + + +class OptionHelpExtra(t.TypedDict, total=False): + envvars: tuple[str, ...] + default: str + range: str + required: str diff --git a/venv/lib/python3.12/site-packages/click/utils.py b/venv/lib/python3.12/site-packages/click/utils.py new file mode 100644 index 0000000..beae26f --- /dev/null +++ b/venv/lib/python3.12/site-packages/click/utils.py @@ -0,0 +1,627 @@ +from __future__ import annotations + +import collections.abc as cabc +import os +import re +import sys +import typing as t +from functools import update_wrapper +from types import ModuleType +from types import TracebackType + +from ._compat import _default_text_stderr +from ._compat import _default_text_stdout +from ._compat import _find_binary_writer +from ._compat import auto_wrap_for_ansi +from ._compat import binary_streams +from ._compat import open_stream +from ._compat import should_strip_ansi +from ._compat import strip_ansi +from ._compat import text_streams +from ._compat import WIN +from .globals import resolve_color_default + +if t.TYPE_CHECKING: + import typing_extensions as te + + P = te.ParamSpec("P") + +R = t.TypeVar("R") + + +def _posixify(name: str) -> str: + return "-".join(name.split()).lower() + + +def safecall(func: t.Callable[P, R]) -> t.Callable[P, R | None]: + """Wraps a function so that it swallows exceptions.""" + + def wrapper(*args: P.args, **kwargs: P.kwargs) -> R | None: + try: + return func(*args, **kwargs) + except Exception: + pass + return None + + return update_wrapper(wrapper, func) + + +def make_str(value: t.Any) -> str: + """Converts a value into a valid string.""" + if isinstance(value, bytes): + try: + return value.decode(sys.getfilesystemencoding()) + except UnicodeError: + return value.decode("utf-8", "replace") + return str(value) + + +def make_default_short_help(help: str, max_length: int = 45) -> str: + """Returns a condensed version of help string.""" + # Consider only the first paragraph. + paragraph_end = help.find("\n\n") + + if paragraph_end != -1: + help = help[:paragraph_end] + + # Collapse newlines, tabs, and spaces. + words = help.split() + + if not words: + return "" + + # The first paragraph started with a "no rewrap" marker, ignore it. + if words[0] == "\b": + words = words[1:] + + total_length = 0 + last_index = len(words) - 1 + + for i, word in enumerate(words): + total_length += len(word) + (i > 0) + + if total_length > max_length: # too long, truncate + break + + if word[-1] == ".": # sentence end, truncate without "..." + return " ".join(words[: i + 1]) + + if total_length == max_length and i != last_index: + break # not at sentence end, truncate with "..." + else: + return " ".join(words) # no truncation needed + + # Account for the length of the suffix. + total_length += len("...") + + # remove words until the length is short enough + while i > 0: + total_length -= len(words[i]) + (i > 0) + + if total_length <= max_length: + break + + i -= 1 + + return " ".join(words[:i]) + "..." + + +class LazyFile: + """A lazy file works like a regular file but it does not fully open + the file but it does perform some basic checks early to see if the + filename parameter does make sense. This is useful for safely opening + files for writing. + """ + + def __init__( + self, + filename: str | os.PathLike[str], + mode: str = "r", + encoding: str | None = None, + errors: str | None = "strict", + atomic: bool = False, + ): + self.name: str = os.fspath(filename) + self.mode = mode + self.encoding = encoding + self.errors = errors + self.atomic = atomic + self._f: t.IO[t.Any] | None + self.should_close: bool + + if self.name == "-": + self._f, self.should_close = open_stream(filename, mode, encoding, errors) + else: + if "r" in mode: + # Open and close the file in case we're opening it for + # reading so that we can catch at least some errors in + # some cases early. + open(filename, mode).close() + self._f = None + self.should_close = True + + def __getattr__(self, name: str) -> t.Any: + return getattr(self.open(), name) + + def __repr__(self) -> str: + if self._f is not None: + return repr(self._f) + return f"" + + def open(self) -> t.IO[t.Any]: + """Opens the file if it's not yet open. This call might fail with + a :exc:`FileError`. Not handling this error will produce an error + that Click shows. + """ + if self._f is not None: + return self._f + try: + rv, self.should_close = open_stream( + self.name, self.mode, self.encoding, self.errors, atomic=self.atomic + ) + except OSError as e: + from .exceptions import FileError + + raise FileError(self.name, hint=e.strerror) from e + self._f = rv + return rv + + def close(self) -> None: + """Closes the underlying file, no matter what.""" + if self._f is not None: + self._f.close() + + def close_intelligently(self) -> None: + """This function only closes the file if it was opened by the lazy + file wrapper. For instance this will never close stdin. + """ + if self.should_close: + self.close() + + def __enter__(self) -> LazyFile: + return self + + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_value: BaseException | None, + tb: TracebackType | None, + ) -> None: + self.close_intelligently() + + def __iter__(self) -> cabc.Iterator[t.AnyStr]: + self.open() + return iter(self._f) # type: ignore + + +class KeepOpenFile: + def __init__(self, file: t.IO[t.Any]) -> None: + self._file: t.IO[t.Any] = file + + def __getattr__(self, name: str) -> t.Any: + return getattr(self._file, name) + + def __enter__(self) -> KeepOpenFile: + return self + + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_value: BaseException | None, + tb: TracebackType | None, + ) -> None: + pass + + def __repr__(self) -> str: + return repr(self._file) + + def __iter__(self) -> cabc.Iterator[t.AnyStr]: + return iter(self._file) + + +def echo( + message: t.Any | None = None, + file: t.IO[t.Any] | None = None, + nl: bool = True, + err: bool = False, + color: bool | None = None, +) -> None: + """Print a message and newline to stdout or a file. This should be + used instead of :func:`print` because it provides better support + for different data, files, and environments. + + Compared to :func:`print`, this does the following: + + - Ensures that the output encoding is not misconfigured on Linux. + - Supports Unicode in the Windows console. + - Supports writing to binary outputs, and supports writing bytes + to text outputs. + - Supports colors and styles on Windows. + - Removes ANSI color and style codes if the output does not look + like an interactive terminal. + - Always flushes the output. + + :param message: The string or bytes to output. Other objects are + converted to strings. + :param file: The file to write to. Defaults to ``stdout``. + :param err: Write to ``stderr`` instead of ``stdout``. + :param nl: Print a newline after the message. Enabled by default. + :param color: Force showing or hiding colors and other styles. By + default Click will remove color if the output does not look like + an interactive terminal. + + .. versionchanged:: 6.0 + Support Unicode output on the Windows console. Click does not + modify ``sys.stdout``, so ``sys.stdout.write()`` and ``print()`` + will still not support Unicode. + + .. versionchanged:: 4.0 + Added the ``color`` parameter. + + .. versionadded:: 3.0 + Added the ``err`` parameter. + + .. versionchanged:: 2.0 + Support colors on Windows if colorama is installed. + """ + if file is None: + if err: + file = _default_text_stderr() + else: + file = _default_text_stdout() + + # There are no standard streams attached to write to. For example, + # pythonw on Windows. + if file is None: + return + + # Convert non bytes/text into the native string type. + if message is not None and not isinstance(message, (str, bytes, bytearray)): + out: str | bytes | bytearray | None = str(message) + else: + out = message + + if nl: + out = out or "" + if isinstance(out, str): + out += "\n" + else: + out += b"\n" + + if not out: + file.flush() + return + + # If there is a message and the value looks like bytes, we manually + # need to find the binary stream and write the message in there. + # This is done separately so that most stream types will work as you + # would expect. Eg: you can write to StringIO for other cases. + if isinstance(out, (bytes, bytearray)): + binary_file = _find_binary_writer(file) + + if binary_file is not None: + file.flush() + binary_file.write(out) + binary_file.flush() + return + + # ANSI style code support. For no message or bytes, nothing happens. + # When outputting to a file instead of a terminal, strip codes. + else: + color = resolve_color_default(color) + + if should_strip_ansi(file, color): + out = strip_ansi(out) + elif WIN: + if auto_wrap_for_ansi is not None: + file = auto_wrap_for_ansi(file, color) # type: ignore + elif not color: + out = strip_ansi(out) + + file.write(out) # type: ignore + file.flush() + + +def get_binary_stream(name: t.Literal["stdin", "stdout", "stderr"]) -> t.BinaryIO: + """Returns a system stream for byte processing. + + :param name: the name of the stream to open. Valid names are ``'stdin'``, + ``'stdout'`` and ``'stderr'`` + """ + opener = binary_streams.get(name) + if opener is None: + raise TypeError(f"Unknown standard stream '{name}'") + return opener() + + +def get_text_stream( + name: t.Literal["stdin", "stdout", "stderr"], + encoding: str | None = None, + errors: str | None = "strict", +) -> t.TextIO: + """Returns a system stream for text processing. This usually returns + a wrapped stream around a binary stream returned from + :func:`get_binary_stream` but it also can take shortcuts for already + correctly configured streams. + + :param name: the name of the stream to open. Valid names are ``'stdin'``, + ``'stdout'`` and ``'stderr'`` + :param encoding: overrides the detected default encoding. + :param errors: overrides the default error mode. + """ + opener = text_streams.get(name) + if opener is None: + raise TypeError(f"Unknown standard stream '{name}'") + return opener(encoding, errors) + + +def open_file( + filename: str | os.PathLike[str], + mode: str = "r", + encoding: str | None = None, + errors: str | None = "strict", + lazy: bool = False, + atomic: bool = False, +) -> t.IO[t.Any]: + """Open a file, with extra behavior to handle ``'-'`` to indicate + a standard stream, lazy open on write, and atomic write. Similar to + the behavior of the :class:`~click.File` param type. + + If ``'-'`` is given to open ``stdout`` or ``stdin``, the stream is + wrapped so that using it in a context manager will not close it. + This makes it possible to use the function without accidentally + closing a standard stream: + + .. code-block:: python + + with open_file(filename) as f: + ... + + :param filename: The name or Path of the file to open, or ``'-'`` for + ``stdin``/``stdout``. + :param mode: The mode in which to open the file. + :param encoding: The encoding to decode or encode a file opened in + text mode. + :param errors: The error handling mode. + :param lazy: Wait to open the file until it is accessed. For read + mode, the file is temporarily opened to raise access errors + early, then closed until it is read again. + :param atomic: Write to a temporary file and replace the given file + on close. + + .. versionadded:: 3.0 + """ + if lazy: + return t.cast( + "t.IO[t.Any]", LazyFile(filename, mode, encoding, errors, atomic=atomic) + ) + + f, should_close = open_stream(filename, mode, encoding, errors, atomic=atomic) + + if not should_close: + f = t.cast("t.IO[t.Any]", KeepOpenFile(f)) + + return f + + +def format_filename( + filename: str | bytes | os.PathLike[str] | os.PathLike[bytes], + shorten: bool = False, +) -> str: + """Format a filename as a string for display. Ensures the filename can be + displayed by replacing any invalid bytes or surrogate escapes in the name + with the replacement character ``�``. + + Invalid bytes or surrogate escapes will raise an error when written to a + stream with ``errors="strict"``. This will typically happen with ``stdout`` + when the locale is something like ``en_GB.UTF-8``. + + Many scenarios *are* safe to write surrogates though, due to PEP 538 and + PEP 540, including: + + - Writing to ``stderr``, which uses ``errors="backslashreplace"``. + - The system has ``LANG=C.UTF-8``, ``C``, or ``POSIX``. Python opens + stdout and stderr with ``errors="surrogateescape"``. + - None of ``LANG/LC_*`` are set. Python assumes ``LANG=C.UTF-8``. + - Python is started in UTF-8 mode with ``PYTHONUTF8=1`` or ``-X utf8``. + Python opens stdout and stderr with ``errors="surrogateescape"``. + + :param filename: formats a filename for UI display. This will also convert + the filename into unicode without failing. + :param shorten: this optionally shortens the filename to strip of the + path that leads up to it. + """ + if shorten: + filename = os.path.basename(filename) + else: + filename = os.fspath(filename) + + if isinstance(filename, bytes): + filename = filename.decode(sys.getfilesystemencoding(), "replace") + else: + filename = filename.encode("utf-8", "surrogateescape").decode( + "utf-8", "replace" + ) + + return filename + + +def get_app_dir(app_name: str, roaming: bool = True, force_posix: bool = False) -> str: + r"""Returns the config folder for the application. The default behavior + is to return whatever is most appropriate for the operating system. + + To give you an idea, for an app called ``"Foo Bar"``, something like + the following folders could be returned: + + Mac OS X: + ``~/Library/Application Support/Foo Bar`` + Mac OS X (POSIX): + ``~/.foo-bar`` + Unix: + ``~/.config/foo-bar`` + Unix (POSIX): + ``~/.foo-bar`` + Windows (roaming): + ``C:\Users\\AppData\Roaming\Foo Bar`` + Windows (not roaming): + ``C:\Users\\AppData\Local\Foo Bar`` + + .. versionadded:: 2.0 + + :param app_name: the application name. This should be properly capitalized + and can contain whitespace. + :param roaming: controls if the folder should be roaming or not on Windows. + Has no effect otherwise. + :param force_posix: if this is set to `True` then on any POSIX system the + folder will be stored in the home folder with a leading + dot instead of the XDG config home or darwin's + application support folder. + """ + if WIN: + key = "APPDATA" if roaming else "LOCALAPPDATA" + folder = os.environ.get(key) + if folder is None: + folder = os.path.expanduser("~") + return os.path.join(folder, app_name) + if force_posix: + return os.path.join(os.path.expanduser(f"~/.{_posixify(app_name)}")) + if sys.platform == "darwin": + return os.path.join( + os.path.expanduser("~/Library/Application Support"), app_name + ) + return os.path.join( + os.environ.get("XDG_CONFIG_HOME", os.path.expanduser("~/.config")), + _posixify(app_name), + ) + + +class PacifyFlushWrapper: + """This wrapper is used to catch and suppress BrokenPipeErrors resulting + from ``.flush()`` being called on broken pipe during the shutdown/final-GC + of the Python interpreter. Notably ``.flush()`` is always called on + ``sys.stdout`` and ``sys.stderr``. So as to have minimal impact on any + other cleanup code, and the case where the underlying file is not a broken + pipe, all calls and attributes are proxied. + """ + + def __init__(self, wrapped: t.IO[t.Any]) -> None: + self.wrapped = wrapped + + def flush(self) -> None: + try: + self.wrapped.flush() + except OSError as e: + import errno + + if e.errno != errno.EPIPE: + raise + + def __getattr__(self, attr: str) -> t.Any: + return getattr(self.wrapped, attr) + + +def _detect_program_name( + path: str | None = None, _main: ModuleType | None = None +) -> str: + """Determine the command used to run the program, for use in help + text. If a file or entry point was executed, the file name is + returned. If ``python -m`` was used to execute a module or package, + ``python -m name`` is returned. + + This doesn't try to be too precise, the goal is to give a concise + name for help text. Files are only shown as their name without the + path. ``python`` is only shown for modules, and the full path to + ``sys.executable`` is not shown. + + :param path: The Python file being executed. Python puts this in + ``sys.argv[0]``, which is used by default. + :param _main: The ``__main__`` module. This should only be passed + during internal testing. + + .. versionadded:: 8.0 + Based on command args detection in the Werkzeug reloader. + + :meta private: + """ + if _main is None: + _main = sys.modules["__main__"] + + if not path: + path = sys.argv[0] + + # The value of __package__ indicates how Python was called. It may + # not exist if a setuptools script is installed as an egg. It may be + # set incorrectly for entry points created with pip on Windows. + # It is set to "" inside a Shiv or PEX zipapp. + if getattr(_main, "__package__", None) in {None, ""} or ( + os.name == "nt" + and _main.__package__ == "" + and not os.path.exists(path) + and os.path.exists(f"{path}.exe") + ): + # Executed a file, like "python app.py". + return os.path.basename(path) + + # Executed a module, like "python -m example". + # Rewritten by Python from "-m script" to "/path/to/script.py". + # Need to look at main module to determine how it was executed. + py_module = t.cast(str, _main.__package__) + name = os.path.splitext(os.path.basename(path))[0] + + # A submodule like "example.cli". + if name != "__main__": + py_module = f"{py_module}.{name}" + + return f"python -m {py_module.lstrip('.')}" + + +def _expand_args( + args: cabc.Iterable[str], + *, + user: bool = True, + env: bool = True, + glob_recursive: bool = True, +) -> list[str]: + """Simulate Unix shell expansion with Python functions. + + See :func:`glob.glob`, :func:`os.path.expanduser`, and + :func:`os.path.expandvars`. + + This is intended for use on Windows, where the shell does not do any + expansion. It may not exactly match what a Unix shell would do. + + :param args: List of command line arguments to expand. + :param user: Expand user home directory. + :param env: Expand environment variables. + :param glob_recursive: ``**`` matches directories recursively. + + .. versionchanged:: 8.1 + Invalid glob patterns are treated as empty expansions rather + than raising an error. + + .. versionadded:: 8.0 + + :meta private: + """ + from glob import glob + + out = [] + + for arg in args: + if user: + arg = os.path.expanduser(arg) + + if env: + arg = os.path.expandvars(arg) + + try: + matches = glob(arg, recursive=glob_recursive) + except re.error: + matches = [] + + if not matches: + out.append(arg) + else: + out.extend(matches) + + return out diff --git a/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/INSTALLER b/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/INSTALLER new file mode 100644 index 0000000..a1b589e --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/LICENSE.rst b/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/LICENSE.rst new file mode 100644 index 0000000..9d227a0 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/LICENSE.rst @@ -0,0 +1,28 @@ +Copyright 2010 Pallets + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/METADATA b/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/METADATA new file mode 100644 index 0000000..b802e93 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/METADATA @@ -0,0 +1,116 @@ +Metadata-Version: 2.1 +Name: Flask +Version: 3.0.0 +Summary: A simple framework for building complex web applications. +Maintainer-email: Pallets +Requires-Python: >=3.8 +Description-Content-Type: text/x-rst +Classifier: Development Status :: 5 - Production/Stable +Classifier: Environment :: Web Environment +Classifier: Framework :: Flask +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: BSD License +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content +Classifier: Topic :: Internet :: WWW/HTTP :: WSGI +Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application +Classifier: Topic :: Software Development :: Libraries :: Application Frameworks +Requires-Dist: Werkzeug>=3.0.0 +Requires-Dist: Jinja2>=3.1.2 +Requires-Dist: itsdangerous>=2.1.2 +Requires-Dist: click>=8.1.3 +Requires-Dist: blinker>=1.6.2 +Requires-Dist: importlib-metadata>=3.6.0; python_version < '3.10' +Requires-Dist: asgiref>=3.2 ; extra == "async" +Requires-Dist: python-dotenv ; extra == "dotenv" +Project-URL: Changes, https://flask.palletsprojects.com/changes/ +Project-URL: Chat, https://discord.gg/pallets +Project-URL: Documentation, https://flask.palletsprojects.com/ +Project-URL: Donate, https://palletsprojects.com/donate +Project-URL: Issue Tracker, https://github.com/pallets/flask/issues/ +Project-URL: Source Code, https://github.com/pallets/flask/ +Provides-Extra: async +Provides-Extra: dotenv + +Flask +===== + +Flask is a lightweight `WSGI`_ web application framework. It is designed +to make getting started quick and easy, with the ability to scale up to +complex applications. It began as a simple wrapper around `Werkzeug`_ +and `Jinja`_ and has become one of the most popular Python web +application frameworks. + +Flask offers suggestions, but doesn't enforce any dependencies or +project layout. It is up to the developer to choose the tools and +libraries they want to use. There are many extensions provided by the +community that make adding new functionality easy. + +.. _WSGI: https://wsgi.readthedocs.io/ +.. _Werkzeug: https://werkzeug.palletsprojects.com/ +.. _Jinja: https://jinja.palletsprojects.com/ + + +Installing +---------- + +Install and update using `pip`_: + +.. code-block:: text + + $ pip install -U Flask + +.. _pip: https://pip.pypa.io/en/stable/getting-started/ + + +A Simple Example +---------------- + +.. code-block:: python + + # save this as app.py + from flask import Flask + + app = Flask(__name__) + + @app.route("/") + def hello(): + return "Hello, World!" + +.. code-block:: text + + $ flask run + * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) + + +Contributing +------------ + +For guidance on setting up a development environment and how to make a +contribution to Flask, see the `contributing guidelines`_. + +.. _contributing guidelines: https://github.com/pallets/flask/blob/main/CONTRIBUTING.rst + + +Donate +------ + +The Pallets organization develops and supports Flask and the libraries +it uses. In order to grow the community of contributors and users, and +allow the maintainers to devote more time to the projects, `please +donate today`_. + +.. _please donate today: https://palletsprojects.com/donate + + +Links +----- + +- Documentation: https://flask.palletsprojects.com/ +- Changes: https://flask.palletsprojects.com/changes/ +- PyPI Releases: https://pypi.org/project/Flask/ +- Source Code: https://github.com/pallets/flask/ +- Issue Tracker: https://github.com/pallets/flask/issues/ +- Chat: https://discord.gg/pallets + diff --git a/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/RECORD b/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/RECORD new file mode 100644 index 0000000..21de4cd --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/RECORD @@ -0,0 +1,58 @@ +../../../bin/flask,sha256=UNDp-uMQ8Lle1vio4N3pAga7K4s_4Ov-EldXEpnKa7c,237 +flask-3.0.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +flask-3.0.0.dist-info/LICENSE.rst,sha256=SJqOEQhQntmKN7uYPhHg9-HTHwvY-Zp5yESOf_N9B-o,1475 +flask-3.0.0.dist-info/METADATA,sha256=02XP69VTiwn5blcRgHcyuSQ2cLTuJFV8FXw2x4QnxKo,3588 +flask-3.0.0.dist-info/RECORD,, +flask-3.0.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +flask-3.0.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81 +flask-3.0.0.dist-info/entry_points.txt,sha256=bBP7hTOS5fz9zLtC7sPofBZAlMkEvBxu7KqS6l5lvc4,40 +flask/__init__.py,sha256=6xMqdVA0FIQ2U1KVaGX3lzNCdXPzoHPaa0hvQCNcfSk,2625 +flask/__main__.py,sha256=bYt9eEaoRQWdejEHFD8REx9jxVEdZptECFsV7F49Ink,30 +flask/__pycache__/__init__.cpython-312.pyc,, +flask/__pycache__/__main__.cpython-312.pyc,, +flask/__pycache__/app.cpython-312.pyc,, +flask/__pycache__/blueprints.cpython-312.pyc,, +flask/__pycache__/cli.cpython-312.pyc,, +flask/__pycache__/config.cpython-312.pyc,, +flask/__pycache__/ctx.cpython-312.pyc,, +flask/__pycache__/debughelpers.cpython-312.pyc,, +flask/__pycache__/globals.cpython-312.pyc,, +flask/__pycache__/helpers.cpython-312.pyc,, +flask/__pycache__/logging.cpython-312.pyc,, +flask/__pycache__/sessions.cpython-312.pyc,, +flask/__pycache__/signals.cpython-312.pyc,, +flask/__pycache__/templating.cpython-312.pyc,, +flask/__pycache__/testing.cpython-312.pyc,, +flask/__pycache__/typing.cpython-312.pyc,, +flask/__pycache__/views.cpython-312.pyc,, +flask/__pycache__/wrappers.cpython-312.pyc,, +flask/app.py,sha256=voUkc9xk9B039AhVrU21GDpsQ6wqrr-NobqLx8fURfQ,59201 +flask/blueprints.py,sha256=zO8bLO9Xy1aVD92bDmzihutjVEXf8xdDaVfiy7c--Ck,3129 +flask/cli.py,sha256=PDwZCfPagi5GUzb-D6dEN7y20gWiVAg3ejRnxBKNHPA,33821 +flask/config.py,sha256=YZSZ-xpFj1iW1B1Kj1iDhpc5s7pHncloiRLqXhsU7Hs,12856 +flask/ctx.py,sha256=x2kGzUXtPzVyi2YSKrU_PV1AvtxTmh2iRdriJRTSPGM,14841 +flask/debughelpers.py,sha256=WKzD2FNTSimNSwCJVLr9_fFo1f2VlTWB5EZ6lmR5bwE,5548 +flask/globals.py,sha256=XdQZmStBmPIs8t93tjx6pO7Bm3gobAaONWkFcUHaGas,1713 +flask/helpers.py,sha256=ynEoMB7fdF5Y1P-ngxMjZDZWfrJ4St-9OGZZsTcUwx8,22992 +flask/json/__init__.py,sha256=pdtpoK2b0b1u7Sxbx3feM7VWhsI20l1yGAvbYWxaxvc,5572 +flask/json/__pycache__/__init__.cpython-312.pyc,, +flask/json/__pycache__/provider.cpython-312.pyc,, +flask/json/__pycache__/tag.cpython-312.pyc,, +flask/json/provider.py,sha256=VBKSK75t3OsTvZ3N10B3Fsu7-NdpfrGYcl41goQJ3q8,7640 +flask/json/tag.py,sha256=ihb7QWrNEr0YC3KD4TolZbftgSPCuLk7FAvK49huYC0,8871 +flask/logging.py,sha256=VcdJgW4Axm5l_-7vXLQjRTL0eckaMks7Ya_HaoDm0wg,2330 +flask/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +flask/sansio/README.md,sha256=-0X1tECnilmz1cogx-YhNw5d7guK7GKrq_DEV2OzlU0,228 +flask/sansio/__pycache__/app.cpython-312.pyc,, +flask/sansio/__pycache__/blueprints.cpython-312.pyc,, +flask/sansio/__pycache__/scaffold.cpython-312.pyc,, +flask/sansio/app.py,sha256=nZWCFMOW8qK95Ck9UvDzxvswQr-coLJhIFaa_OVobCc,37977 +flask/sansio/blueprints.py,sha256=caskVI1Zf3mM5msevK5-tWy3VqX_A8mlB0KGNyRx5_0,24319 +flask/sansio/scaffold.py,sha256=-Cus0cVS4PmLof4qLvfjSQzk4AKsLqPR6LBpv6ALw3Y,30580 +flask/sessions.py,sha256=rFH2QKXG24dEazkKGxAHqUpAUh_30hDHrddhVYgAcY0,14169 +flask/signals.py,sha256=V7lMUww7CqgJ2ThUBn1PiatZtQanOyt7OZpu2GZI-34,750 +flask/templating.py,sha256=EtL8CE5z2aefdR1I-TWYVNg0cSuXBqz_lvOGKeggktk,7538 +flask/testing.py,sha256=h7AinggrMgGzKlDN66VfB0JjWW4Z1U_OD6FyjqBNiYM,10017 +flask/typing.py,sha256=2pGlhSaZqJVJOoh-QdH-20QVzl2r-zLXyP8otXfCCs4,3156 +flask/views.py,sha256=V5hOGZLx0Bn99QGcM6mh5x_uM-MypVT0-RysEFU84jc,6789 +flask/wrappers.py,sha256=PhMp3teK3SnEmIdog59cO_DHiZ9Btn0qI1EifrTdwP8,5709 diff --git a/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/REQUESTED b/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/REQUESTED new file mode 100644 index 0000000..e69de29 diff --git a/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/WHEEL b/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/WHEEL new file mode 100644 index 0000000..3b5e64b --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/WHEEL @@ -0,0 +1,4 @@ +Wheel-Version: 1.0 +Generator: flit 3.9.0 +Root-Is-Purelib: true +Tag: py3-none-any diff --git a/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/entry_points.txt b/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/entry_points.txt new file mode 100644 index 0000000..eec6733 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask-3.0.0.dist-info/entry_points.txt @@ -0,0 +1,3 @@ +[console_scripts] +flask=flask.cli:main + diff --git a/venv/lib/python3.12/site-packages/flask/__init__.py b/venv/lib/python3.12/site-packages/flask/__init__.py new file mode 100644 index 0000000..e86eb43 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/__init__.py @@ -0,0 +1,60 @@ +from __future__ import annotations + +import typing as t + +from . import json as json +from .app import Flask as Flask +from .blueprints import Blueprint as Blueprint +from .config import Config as Config +from .ctx import after_this_request as after_this_request +from .ctx import copy_current_request_context as copy_current_request_context +from .ctx import has_app_context as has_app_context +from .ctx import has_request_context as has_request_context +from .globals import current_app as current_app +from .globals import g as g +from .globals import request as request +from .globals import session as session +from .helpers import abort as abort +from .helpers import flash as flash +from .helpers import get_flashed_messages as get_flashed_messages +from .helpers import get_template_attribute as get_template_attribute +from .helpers import make_response as make_response +from .helpers import redirect as redirect +from .helpers import send_file as send_file +from .helpers import send_from_directory as send_from_directory +from .helpers import stream_with_context as stream_with_context +from .helpers import url_for as url_for +from .json import jsonify as jsonify +from .signals import appcontext_popped as appcontext_popped +from .signals import appcontext_pushed as appcontext_pushed +from .signals import appcontext_tearing_down as appcontext_tearing_down +from .signals import before_render_template as before_render_template +from .signals import got_request_exception as got_request_exception +from .signals import message_flashed as message_flashed +from .signals import request_finished as request_finished +from .signals import request_started as request_started +from .signals import request_tearing_down as request_tearing_down +from .signals import template_rendered as template_rendered +from .templating import render_template as render_template +from .templating import render_template_string as render_template_string +from .templating import stream_template as stream_template +from .templating import stream_template_string as stream_template_string +from .wrappers import Request as Request +from .wrappers import Response as Response + + +def __getattr__(name: str) -> t.Any: + if name == "__version__": + import importlib.metadata + import warnings + + warnings.warn( + "The '__version__' attribute is deprecated and will be removed in" + " Flask 3.1. Use feature detection or" + " 'importlib.metadata.version(\"flask\")' instead.", + DeprecationWarning, + stacklevel=2, + ) + return importlib.metadata.version("flask") + + raise AttributeError(name) diff --git a/venv/lib/python3.12/site-packages/flask/__main__.py b/venv/lib/python3.12/site-packages/flask/__main__.py new file mode 100644 index 0000000..4e28416 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/__main__.py @@ -0,0 +1,3 @@ +from .cli import main + +main() diff --git a/venv/lib/python3.12/site-packages/flask/__pycache__/__init__.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..207c5128f0b1edbbd812e2232667e28e6417bc23 GIT binary patch literal 2470 zcmZXWNpBlB6vsK*MoVPbvMulSc$H%|Lw0sqaym#Bc|Lzkd9aLq3v^g#IcP^8}u2 z^Brpw=p`27C(#Av^@&2rePR+*v5BKlML|y337RyMX39=EX_^KvX{POrqf%9J#?Cr9 znv<;Bd8a@NlC$zrzDR6Pt$41 zqrfwCM)DZ2Mm5RfcG{Vxvyvz5IcJ{EOP&N?pbL_xfEVeaa;F-3AjNUlB>WM=mp8kz!&L7$u)c3 z*`OPeSAZ|kOTg#N)gM#zy~9Lp?G>g#O$iHz>w3ZvmgfeyUO_sbnc4|F7k<;9+eWYp zko(l`FrQnlfI{ZF=eDeEpt8{tjO(Ip1v+Qnby$G)lTFV*)SDg7nJZ#nZ+fm^2UuTf z8-Z^4{wZq^tzHkO>_XfLw1y8A98-NakQ%TcfWW~`8(SX7&eJUjxeYM1&4exs%+wud zXl%0p{0jPlIlgTOrW--z2$Leq2j_?Eo?jhbLy>$?t8w^%(G@EXiIbCR7=4O z*oAG~^!9Pul`RGxW6-XN8_}B<)C_NX@7A6jG?|ZE3>Br`TEuGuR)4(mEz7lfgO*}1 z5C#`Aj-l8(6U0C~Y%dJi7`{InQss=L2e9@o?r8}K7cTAytjZbdU1Rn3+f2*e?rl~R z6E}X+07*iW*AD>hlOwp@c9#j^SImS-Y;sSLzskMDQDO(%o_Wlq$i$YJ`ZN6y`oc#c zN6JpN%cpgxaJtlGGxM+)(H$a+as3gA-5->idMhmG`X1w$!Me`zPQLrw*KMX%PuW%N zZH8)ApqX$8SrZc1)C||u_AT4iwwT75*HTXnQU!$a*8N1Y7fA z5_lCfi{a$@qT7Q&X|0h5C zVCZRn`cZ27HFQgADgGh+gh|NuFvA(_m3ucW>YMIi?fo#X>#YuMAB2Om4m0A=hlLFl z5fYB68z$jy;Fzvqek;DB1Fp)(aJ#@Y%`s)eWK$gQ91zEU1sqeBpTi1u+xE5$JK&h5 zybq;>(l0C9%=RHe`2bpFltGjslwp(#$_UCR${5Nx$^=NL2G+KVoll}Qg))sYgQB6# zqRgSpqb#5-f`s|rT>#VNOXyZn;20BL!}{z#hpA(1E9kAF;FkSC_*LY~AaAl)9nb98 z>|=ftig+S}pFob2ilRhh?j$d|D$M`YzB)2GbHF#iLvjly&Q literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask/__pycache__/__main__.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/__pycache__/__main__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b132b6c26b0279990392f06942c392e51a5134e0 GIT binary patch literal 231 zcmX@j%ge<81P;ojnQ}n-F^B^LOi;#Wkj!+36owSW9EM!RC`LvGCWchT)lg|hhDs() z=9i2>t|sFxmfXb5JU>mQTg=HhnMKS%!Icc3K`MU*=ojag7A2?Zr{q-V78fP!r(_nT zCYR(?=%u8V>6fMEmFeeXCg~ScmSp7T8S5Du=@(~~r0NzVCTAz6rxxp{&M4~ wEQpWSE2#X%VUwGmQks)$SHuCd0OWvTULf&-nURt4E`#Vp29{Q~A~v8104)1BY5)KL literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask/__pycache__/app.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/__pycache__/app.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..84559b03d0e579e4572e9eb63c267244db0a1ca4 GIT binary patch literal 60708 zcmdqKdvqMvc_-M7ZU7B*1C2L85F{G_NjwNN_@)FtM34j@A_>wYBw6sI(LgoHCL3tD zy1@qmY9y_)0W(fS#_|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xYi6UWcj+AQ8wmnh;fzNxd#p z5v;)`9*3L)HG~aP1Y|)E{n3ZlP&?(b;fQ9n>&K9+EZ?S6E3R+dhC~&ib9Wzro!}7^ zpd%|IQOiWRd-rmMm;e{mR0sGx~Tr7NV`HksK<6<#Gb z00mIdsD(rx3{ndmlk*?e(9`XhaSL8pCDN>kUZYeF8pA!ET=$?nhz)lXWbh38tMn0L{x%%{bzqmUt~DWB9X( z>DVC#R8)2jKY8{lF3C-Vye`?+3861s|GCg-yv~wfzW|LD33^Brz zVcdb5GTModnjohs=>Dw8yGs0(zfNQ~2s<2+`kr#Aoz9&+d~-Bc{C4tmZdQ%R@pnvR z7^O4#RmsbQ150u}wH8C<4EvWqxG`tE^X}X`?=37|4GS9#q8@pn_SgmN5Xj}rzAL;H zY2y-m3)T>~`H!G`no(8tKq-Hv^!`&BK2Xm7OCbl!#DVhT17+b!Ci|<)A6-7kmY?O{ QQ`K4Z!N9kQ97x9h2GhD6EdT%j literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask/__pycache__/cli.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/__pycache__/cli.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..05793b00e76665eda2f6fe3e6c61c5a4c98a900a GIT binary patch literal 39877 zcmch=33OZ6nI`xi@UU;h!hM5CN)#m$)N0AJ7E9D>Nwh4{8y$y&_&^C12`~?!C?cdo zIZm0hm55557FBV|bXRIZw^beGbb3lPlhbjWq~fmWIRl7v2*Y%bQl&bl)91_#Eix5H z=`%Iof8PR-f-Fy;IrAi5-1pwy-@X6+_xry%999n3Xr`ChJ%@8Efg>w0w^I`*sY5ZJGw!@z!x9Y*$R>M*fibBCGzS~@K3*V+37*C}eR{Z&6=yM=^_=drSIC zJ4z9^h}Pb+zVeQ87Ps|Q^i_6LvbY`bs*Wn23)y>isa?$eN=D>$^!oc&b*$n!9e0ou zov(1BE9CCkmrbR{-qp*oj#{zc6|SRBbR%3XdJwJ=y$I{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ask_sqlalchemy/__pycache__/model.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/model.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..32f0eeddf822fcd01672240d2ab52d1564626947 GIT binary patch literal 13371 zcmeHNYiu0Xb)MN5_eJjVO_7!~ie-yyFPGG#elWBoinJqJ5-nS@ols$x!=0hD)N+@) zGo(a%1qrE(P)<^bs9VytQ`3L}OI3@yK!Bz|i@HFH{%BEfO#x)43P3b2(EOuB22S;- z{mz}4eQ9MGMcZG#67S63=ecL@{qA?pz5i5Q?H3RZK02BFho~U@ihkIk%6t(wUJ?ai zUQh%@ObO%SpeWM2Bjp%$@TYUo#h>m$4}VsTdk1|e<5XNJ|9D_9APTB$ti^7&@MIp8 zai^-sYX)mX!6AH0P&{u5O4Ut=S!OWA)4WLY<%smHUKmuWzmMzv0DP<>-v1*z?~n{KP`ExdFS zN;ji)<+3iTZ0ocm()w%q5fP1moK9zSSx;ut+Q6@&WJ+|uGO4m@y!cPNaBbt%DASywelmd;VfQf6dKP3Y2Sh9PM@qo}Ev-!CC_kE^8|@8(GfOZ{9h zQU`vE8{g(~WgTNQqOy>6Al({4an_in%;L10){j3E?GJTAh&TqInkr4zG-xg2Gy+`e zI3Jl&6_1Z!1WBul8BO6o#~#uA-Ml3~!P z3o%8V>YP&3Q=O^gNaw_~ekPON8{567Q%mY<$Ap|XE1y=i&Qa*`Y+O5+lFjeaY3gZW znj|=_>hbtYQ>pf2R(c~O(4IhaSy&C#UA=VW(rPfYQ2#;OyKO65qPZ>6}YJZFN(=#xlUX&{qUS%{JX`t*c)il+}59;WJ(EX_!tm;~N< zJS~r_@wnlS$06lpir$0q__;|rW#vF-C6j>GYEkEg!0PZ|VT!zVMEz(%L~jXq98R}) z)9-Zq&4N@WfxmpP=7hL$97%=w`5NE@Gt{BF6lV`|e1b}V;lgjX`P(6=RrWU@^eP_Y zRGB%7U-4pI`=))7fZ^sNl`ms8=>nYQw@sH9Dfm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DI6sxssEn7=;_^h&*jl85UI0jPWKvgOOk>3*)CnE;s<>Hl8kI^k z!p$0r0yNroMDXym3cldg;FaKtw}mb@Y`flg%iH-m_sBG@?07o2v8I$Hy?H}L#`!|D&HFvn;;EEZV8`^Y3Gn;}l z=*Kmya3g%t^MSd*U7^nHpLMMUS{HYI-0@*YF3`CeZ1_CTcukofpBrC%IoGuBr=u%R zy_9?ErCWg`zo>74r>MI2THoxEyMnK}W;IlQ_2QL_Dw@yp3m?Dy;ma#KU&-x!Wx4*FRiP zC~~T|V{j*q0y61j2^{KubIC{B%H4wVmeWm+{Ju882 zxd1NXEC(K4ay@D)m&RrXYpCJ|5wXHOXS(H#Oa8c--f!N#Ah5i5y4X)$xFN!CWtiI^ z_dQ$pGVZ?uNB&^G$>jGcQX;?RhWkwu8D@Ed2X443Qgxy?rdy4qWwUnFi&1RQr+iDe zOIHicGL)UbUp_o+thGgB9motoG^{_6BYp8 zrV#>HaVC>Oa^db$J>|6{inP(K_R&dPc!w$&&0O}ohzt*|G+}EtMBVTgZt0uO?wUeE zjP^ArA`|l3s6I`3qx$4`jz1soJN$g#krxNPW%$$!x{6!0nY4L@!%GE;95OCu7rh;( zh+LN3&S4zIXtFVlB2p+HUzslMd3$iWi%a?Y**uDnnzcVcwC)r|@t49kekJ(+RjB)w z(ELkb`@ah4t)Q>FI|s);qi(7I|8CFTH3|VI|8E3*Tp7r@3sC-0go^CY!#z- z1Voz$#Y3XlK7XXW* Xm!~dNFHWuOdM>x?x!+J4|6KnK(7QM= literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/pagination.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/pagination.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d9c4bfa22c81909a29f0ce4c4432b7f5d7a47bee GIT binary patch literal 14273 zcmd^GZERcDdA^tA<+n(EP@lG>YbmxvTc#x2O=87M;#zTRw@{PW=^C{jN%3A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n7cu=hErlGknr(uUbP0y0QEG_Hle`YkGS3#2u2GJkezzzUZ$sis%N}wjh5(x``vc843Xjg`$vZffu?hE(YF% ztOT*xl@w%GlNLv^6dTkZ)wc&FlR^E~bqMbVv4r17qRqEncjp7CUjT;X$gdl zm8jA;9pSG-W=|GZ=^rH@lqYH{FIhaU<@u$hVGWU(dVqRJ zI9PE1V2MPN(x^>g^Vk7Q@C13>8WR#xKEMG~q)^z?^UCXXdpMwi-iXa%q60M$APvq- zfBM+I9ExSYJbo9qw7ozcP)MEKI{p0^a09qmI3oa3MwhhJg?d?r3Y=b2fUEUmUsXr6 z3ZsQ_+sloup-S(mmrh{Q}dNqAsjx&#+5LUj-Jq9!QS;$s_Iwqz{_ z+=%wV=-@Ih1YCerU}bJ%K?qldxVp!)HH_Pbm*_ZW*>T`dKv~KIsOFWepcviog>}yN zoS(YeRXFvAp=>fZ6{xKbF5vC9ZQ2m2exihiF?uRs+vKvM!pRs$E7?d_))yxs>zcqDP-OBpy-@-(RA^tYmyQq=!$(`9_ zJ2OXjj-J?g_QjoJ(45~ZO_U3}WFlWsg-%6VfzQvtl6^g>E_+>7W9=7YAZQP+7??cc zJA^n3lPa0G2Ky!OqJl*A7L|hg1weGNDpvL-oS`&U9I72T6ZyrhdWKt3T#DOD8;{0D*}SWn6| zAa}^OsR=!|H(S(a_nw;sa(q%>+NI<f zM^5bKkt>k-7j`F+E0Vcqc1y@jk@DQGT2Us2xxE?ai-o}NSIVeKJA_LZXd)m5lPDW> zJ8)zpEr_OuH;^jUCutz!7dUBj1a99@#sI-G2H(26zNkVaDkQ##%a}kb3QYB}?n}sF zHLL8gpZj%e(bvUm(1#U(Tm%9|ho(Iwr@kh$-;k3J@pt|ka_S*DyO(`W(+YPlest;H LrT-A*)o%X<@xjnC literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/record_queries.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/record_queries.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b230e50b968502ae53f1543445a45566c7cbb22e GIT binary patch literal 4837 zcmb_gTZ|Le89p-}U)J`n*X#|pTn?88%*E!CG|_5Bx`7P|g+<(|)>RnKdXBv|;~8^i z4C|FwY?V|6DH5c8fGUdGhdzLals@EvzO;Fa)R%Q3-PHsnB6#T=$x>C~ssDe*V{hD4 z;h{(JIsdu;=f8aaKmJ>9ZllX6J0V$MaoJN(y}3E zWzhz*0nsYiAhZD^R0(Iptu>KskC=;AV%fMDQ;gn9U$#%sL7)@agrGw}_h`8O_E%EQ3|EPQG=cXcVXe zgh(rCAZ`#x@+ZqJ{`@|+x>O`S-=|4R)_w!qk1&TiGmIJ~+o4v0a+bHa&UAXA#(15U z%!0)$f@2DlSlVKe+RV1$C24vRmX?@JHO`_GO8bmb!P{V&g;J4@>6)XB<aKrp(l)4W_4~;;2b2KeLJzYE73}-k~59adN>j z4C_+KEK<#Jcxk%kFni3~nakNAX;uMo=5pdJWbF(*)rOU@10D;U&>}M#hlM(wuH(Rj zk)L6eI=xhKW@uI8T7`jfXw}g2Y{oKl#_hB?E|+W1+FdtvCO}B0gVzJ7FO=Xt3r-U7N3oZ}I7tHvofgi-SL(!8aw zzUmU#h9?EIB77#6Gc#aY6|GLe0qHcORSS$442?P#&1*)!W`GUs7SG4mdRCA2i0eVP zu(V~8=`_6vMgULF&uC_m>0@K`KzeWcrc+?S70^V1TNO}dkvXc)rfWqN6$NgR%e~-1 zXsbfuEu#l!G>SfyH#FOZDNuu^qaAD1sa0Q?!R~Y0t^?e*Kn4sEZUZP1F98wdavfE@ zAp27wxRx_ht>##WA|Po4K?RHpBtj8Tm@SN|0!s9>U3b z-X<#uXV0~a4W^K18QqxOWAl7QF9Gs6#%x+=7c&=`c`;*@rZd&LGh>+t();#j?2^Ow zRJHtht;p<50mOKI)m<46xBM&9)w(-~+VkPepWuCPdjfv;FjNcV*+CNTz4pr0R~C~m z-IDLcb}cHqcpRp_1=R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o@>MKx{mjkm--ou}dij&rZ@+$b?EbDdmj~9~82@1W%HieF zjZ33Do1;4y*X_Es@7CE*&fPw@xO@EW8+V<*HvZhWYkoelI5KtRt>t*~QUB15_y_ST z!Ecfz*8g;n3~ss-d7=cDlyyyI-I79^3Vje+vpl?EX?S~cc>D6m#-))|b0j5*baN#A zU}*Di&n*vacoqxwME@0t1VaMOAPv|6LYeDFVE;uY(!Y~Z_--*_YiTbKq$fo@5bIq9 z)0mEa6?YL z3g3*bF6=Fp5 z0)eoW7zwY zct|#{gf>aLpB|Qo+`A+VH>Kf!%R^G;DS--d4teA$c31Yw(s5}esz`gD^=*5 literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/session.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/session.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9c87f385543ba0260b84286e6e8d6ab834fd9889 GIT binary patch literal 4541 zcma)9U2NOd6}}|(XUUQrD~=NJtjJz=&ZTHM znfr5XT^`Eus*G(MgfXG7QSB z&Sp9K3}l1!87hXekw#xjF`A80nbTW~@obzSDp%O%Pu+Z4Atj&$^<=Rv+r|) z22sLltgy4G-; z*??z;5^S2|OG=1paW~@G;0&2yvY`w~huv^SwQVp*dLK+U$v4;M56ik_+lO;++gEhS zvq>=pLHl^~p zoH8tcMYy$GZZB__hkbK3o0q_X5-iVa4lG0$&gE#on9EVyG-@lIHIt ztL_n+F3UA65d?lrwQy;9R5C_XT^9O6m&YY*#CBUm z(Q}w+V{n4CSD$42Y_n|1YM-J{?6WPoPthz@cJv8BQOEkmRAa19*M|E_lg_AV91!-u z)Msmsy00Y3m!%Qa?#n~KT^5_+*4J>nP@1$_VUek}hJys(-Y#gh@n(K`l`KW#v*B7~ zb1kxS{@~vuI~P+OGl6#_i^osS1pX1(x&m56Zd@dkNf>_AqjTU%^k{{<##Xot_^Ln^ zo~{b3-fXr{2P@3A7h8zaKqo>9p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iaj)_@CmHSLe3+E>uvY j&hwnG=l61Na(m%UZf0*(=BD?K2e=de9N@SSdsY7iYrXdA literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/cli.py b/venv/lib/python3.12/site-packages/flask_sqlalchemy/cli.py new file mode 100644 index 0000000..d7d7e4b --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask_sqlalchemy/cli.py @@ -0,0 +1,16 @@ +from __future__ import annotations + +import typing as t + +from flask import current_app + + +def add_models_to_shell() -> dict[str, t.Any]: + """Registered with :meth:`~flask.Flask.shell_context_processor` if + ``add_models_to_shell`` is enabled. Adds the ``db`` instance and all model classes + to ``flask shell``. + """ + db = current_app.extensions["sqlalchemy"] + out = {m.class_.__name__: m.class_ for m in db.Model._sa_registry.mappers} + out["db"] = db + return out diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/extension.py b/venv/lib/python3.12/site-packages/flask_sqlalchemy/extension.py new file mode 100644 index 0000000..43e1b9a --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask_sqlalchemy/extension.py @@ -0,0 +1,1008 @@ +from __future__ import annotations + +import os +import types +import typing as t +import warnings +from weakref import WeakKeyDictionary + +import sqlalchemy as sa +import sqlalchemy.event as sa_event +import sqlalchemy.exc as sa_exc +import sqlalchemy.orm as sa_orm +from flask import abort +from flask import current_app +from flask import Flask +from flask import has_app_context + +from .model import _QueryProperty +from .model import BindMixin +from .model import DefaultMeta +from .model import DefaultMetaNoName +from .model import Model +from .model import NameMixin +from .pagination import Pagination +from .pagination import SelectPagination +from .query import Query +from .session import _app_ctx_id +from .session import Session +from .table import _Table + +_O = t.TypeVar("_O", bound=object) # Based on sqlalchemy.orm._typing.py + + +# Type accepted for model_class argument +_FSA_MCT = t.TypeVar( + "_FSA_MCT", + bound=t.Union[ + t.Type[Model], + sa_orm.DeclarativeMeta, + t.Type[sa_orm.DeclarativeBase], + t.Type[sa_orm.DeclarativeBaseNoMeta], + ], +) + + +# Type returned by make_declarative_base +class _FSAModel(Model): + metadata: sa.MetaData + + +def _get_2x_declarative_bases( + model_class: _FSA_MCT, +) -> list[t.Type[t.Union[sa_orm.DeclarativeBase, sa_orm.DeclarativeBaseNoMeta]]]: + return [ + b + for b in model_class.__bases__ + if issubclass(b, (sa_orm.DeclarativeBase, sa_orm.DeclarativeBaseNoMeta)) + ] + + +class SQLAlchemy: + """Integrates SQLAlchemy with Flask. This handles setting up one or more engines, + associating tables and models with specific engines, and cleaning up connections and + sessions after each request. + + Only the engine configuration is specific to each application, other things like + the model, table, metadata, and session are shared for all applications using that + extension instance. Call :meth:`init_app` to configure the extension on an + application. + + After creating the extension, create model classes by subclassing :attr:`Model`, and + table classes with :attr:`Table`. These can be accessed before :meth:`init_app` is + called, making it possible to define the models separately from the application. + + Accessing :attr:`session` and :attr:`engine` requires an active Flask application + context. This includes methods like :meth:`create_all` which use the engine. + + This class also provides access to names in SQLAlchemy's ``sqlalchemy`` and + ``sqlalchemy.orm`` modules. For example, you can use ``db.Column`` and + ``db.relationship`` instead of importing ``sqlalchemy.Column`` and + ``sqlalchemy.orm.relationship``. This can be convenient when defining models. + + :param app: Call :meth:`init_app` on this Flask application now. + :param metadata: Use this as the default :class:`sqlalchemy.schema.MetaData`. Useful + for setting a naming convention. + :param session_options: Arguments used by :attr:`session` to create each session + instance. A ``scopefunc`` key will be passed to the scoped session, not the + session instance. See :class:`sqlalchemy.orm.sessionmaker` for a list of + arguments. + :param query_class: Use this as the default query class for models and dynamic + relationships. The query interface is considered legacy in SQLAlchemy. + :param model_class: Use this as the model base class when creating the declarative + model class :attr:`Model`. Can also be a fully created declarative model class + for further customization. + :param engine_options: Default arguments used when creating every engine. These are + lower precedence than application config. See :func:`sqlalchemy.create_engine` + for a list of arguments. + :param add_models_to_shell: Add the ``db`` instance and all model classes to + ``flask shell``. + + .. versionchanged:: 3.1.0 + The ``metadata`` parameter can still be used with SQLAlchemy 1.x classes, + but is ignored when using SQLAlchemy 2.x style of declarative classes. + Instead, specify metadata on your Base class. + + .. versionchanged:: 3.1.0 + Added the ``disable_autonaming`` parameter. + + .. versionchanged:: 3.1.0 + Changed ``model_class`` parameter to accepta SQLAlchemy 2.x + declarative base subclass. + + .. versionchanged:: 3.0 + An active Flask application context is always required to access ``session`` and + ``engine``. + + .. versionchanged:: 3.0 + Separate ``metadata`` are used for each bind key. + + .. versionchanged:: 3.0 + The ``engine_options`` parameter is applied as defaults before per-engine + configuration. + + .. versionchanged:: 3.0 + The session class can be customized in ``session_options``. + + .. versionchanged:: 3.0 + Added the ``add_models_to_shell`` parameter. + + .. versionchanged:: 3.0 + Engines are created when calling ``init_app`` rather than the first time they + are accessed. + + .. versionchanged:: 3.0 + All parameters except ``app`` are keyword-only. + + .. versionchanged:: 3.0 + The extension instance is stored directly as ``app.extensions["sqlalchemy"]``. + + .. versionchanged:: 3.0 + Setup methods are renamed with a leading underscore. They are considered + internal interfaces which may change at any time. + + .. versionchanged:: 3.0 + Removed the ``use_native_unicode`` parameter and config. + + .. versionchanged:: 2.4 + Added the ``engine_options`` parameter. + + .. versionchanged:: 2.1 + Added the ``metadata``, ``query_class``, and ``model_class`` parameters. + + .. versionchanged:: 2.1 + Use the same query class across ``session``, ``Model.query`` and + ``Query``. + + .. versionchanged:: 0.16 + ``scopefunc`` is accepted in ``session_options``. + + .. versionchanged:: 0.10 + Added the ``session_options`` parameter. + """ + + def __init__( + self, + app: Flask | None = None, + *, + metadata: sa.MetaData | None = None, + session_options: dict[str, t.Any] | None = None, + query_class: type[Query] = Query, + model_class: _FSA_MCT = Model, # type: ignore[assignment] + engine_options: dict[str, t.Any] | None = None, + add_models_to_shell: bool = True, + disable_autonaming: bool = False, + ): + if session_options is None: + session_options = {} + + self.Query = query_class + """The default query class used by ``Model.query`` and ``lazy="dynamic"`` + relationships. + + .. warning:: + The query interface is considered legacy in SQLAlchemy. + + Customize this by passing the ``query_class`` parameter to the extension. + """ + + self.session = self._make_scoped_session(session_options) + """A :class:`sqlalchemy.orm.scoping.scoped_session` that creates instances of + :class:`.Session` scoped to the current Flask application context. The session + will be removed, returning the engine connection to the pool, when the + application context exits. + + Customize this by passing ``session_options`` to the extension. + + This requires that a Flask application context is active. + + .. versionchanged:: 3.0 + The session is scoped to the current app context. + """ + + self.metadatas: dict[str | None, sa.MetaData] = {} + """Map of bind keys to :class:`sqlalchemy.schema.MetaData` instances. The + ``None`` key refers to the default metadata, and is available as + :attr:`metadata`. + + Customize the default metadata by passing the ``metadata`` parameter to the + extension. This can be used to set a naming convention. When metadata for + another bind key is created, it copies the default's naming convention. + + .. versionadded:: 3.0 + """ + + if metadata is not None: + if len(_get_2x_declarative_bases(model_class)) > 0: + warnings.warn( + "When using SQLAlchemy 2.x style of declarative classes," + " the `metadata` should be an attribute of the base class." + "The metadata passed into SQLAlchemy() is ignored.", + DeprecationWarning, + stacklevel=2, + ) + else: + metadata.info["bind_key"] = None + self.metadatas[None] = metadata + + self.Table = self._make_table_class() + """A :class:`sqlalchemy.schema.Table` class that chooses a metadata + automatically. + + Unlike the base ``Table``, the ``metadata`` argument is not required. If it is + not given, it is selected based on the ``bind_key`` argument. + + :param bind_key: Used to select a different metadata. + :param args: Arguments passed to the base class. These are typically the table's + name, columns, and constraints. + :param kwargs: Arguments passed to the base class. + + .. versionchanged:: 3.0 + This is a subclass of SQLAlchemy's ``Table`` rather than a function. + """ + + self.Model = self._make_declarative_base( + model_class, disable_autonaming=disable_autonaming + ) + """A SQLAlchemy declarative model class. Subclass this to define database + models. + + If a model does not set ``__tablename__``, it will be generated by converting + the class name from ``CamelCase`` to ``snake_case``. It will not be generated + if the model looks like it uses single-table inheritance. + + If a model or parent class sets ``__bind_key__``, it will use that metadata and + database engine. Otherwise, it will use the default :attr:`metadata` and + :attr:`engine`. This is ignored if the model sets ``metadata`` or ``__table__``. + + For code using the SQLAlchemy 1.x API, customize this model by subclassing + :class:`.Model` and passing the ``model_class`` parameter to the extension. + A fully created declarative model class can be + passed as well, to use a custom metaclass. + + For code using the SQLAlchemy 2.x API, customize this model by subclassing + :class:`sqlalchemy.orm.DeclarativeBase` or + :class:`sqlalchemy.orm.DeclarativeBaseNoMeta` + and passing the ``model_class`` parameter to the extension. + """ + + if engine_options is None: + engine_options = {} + + self._engine_options = engine_options + self._app_engines: WeakKeyDictionary[Flask, dict[str | None, sa.engine.Engine]] + self._app_engines = WeakKeyDictionary() + self._add_models_to_shell = add_models_to_shell + + if app is not None: + self.init_app(app) + + def __repr__(self) -> str: + if not has_app_context(): + return f"<{type(self).__name__}>" + + message = f"{type(self).__name__} {self.engine.url}" + + if len(self.engines) > 1: + message = f"{message} +{len(self.engines) - 1}" + + return f"<{message}>" + + def init_app(self, app: Flask) -> None: + """Initialize a Flask application for use with this extension instance. This + must be called before accessing the database engine or session with the app. + + This sets default configuration values, then configures the extension on the + application and creates the engines for each bind key. Therefore, this must be + called after the application has been configured. Changes to application config + after this call will not be reflected. + + The following keys from ``app.config`` are used: + + - :data:`.SQLALCHEMY_DATABASE_URI` + - :data:`.SQLALCHEMY_ENGINE_OPTIONS` + - :data:`.SQLALCHEMY_ECHO` + - :data:`.SQLALCHEMY_BINDS` + - :data:`.SQLALCHEMY_RECORD_QUERIES` + - :data:`.SQLALCHEMY_TRACK_MODIFICATIONS` + + :param app: The Flask application to initialize. + """ + if "sqlalchemy" in app.extensions: + raise RuntimeError( + "A 'SQLAlchemy' instance has already been registered on this Flask app." + " Import and use that instance instead." + ) + + app.extensions["sqlalchemy"] = self + app.teardown_appcontext(self._teardown_session) + + if self._add_models_to_shell: + from .cli import add_models_to_shell + + app.shell_context_processor(add_models_to_shell) + + basic_uri: str | sa.engine.URL | None = app.config.setdefault( + "SQLALCHEMY_DATABASE_URI", None + ) + basic_engine_options = self._engine_options.copy() + basic_engine_options.update( + app.config.setdefault("SQLALCHEMY_ENGINE_OPTIONS", {}) + ) + echo: bool = app.config.setdefault("SQLALCHEMY_ECHO", False) + config_binds: dict[ + str | None, str | sa.engine.URL | dict[str, t.Any] + ] = app.config.setdefault("SQLALCHEMY_BINDS", {}) + engine_options: dict[str | None, dict[str, t.Any]] = {} + + # Build the engine config for each bind key. + for key, value in config_binds.items(): + engine_options[key] = self._engine_options.copy() + + if isinstance(value, (str, sa.engine.URL)): + engine_options[key]["url"] = value + else: + engine_options[key].update(value) + + # Build the engine config for the default bind key. + if basic_uri is not None: + basic_engine_options["url"] = basic_uri + + if "url" in basic_engine_options: + engine_options.setdefault(None, {}).update(basic_engine_options) + + if not engine_options: + raise RuntimeError( + "Either 'SQLALCHEMY_DATABASE_URI' or 'SQLALCHEMY_BINDS' must be set." + ) + + engines = self._app_engines.setdefault(app, {}) + + # Dispose existing engines in case init_app is called again. + if engines: + for engine in engines.values(): + engine.dispose() + + engines.clear() + + # Create the metadata and engine for each bind key. + for key, options in engine_options.items(): + self._make_metadata(key) + options.setdefault("echo", echo) + options.setdefault("echo_pool", echo) + self._apply_driver_defaults(options, app) + engines[key] = self._make_engine(key, options, app) + + if app.config.setdefault("SQLALCHEMY_RECORD_QUERIES", False): + from . import record_queries + + for engine in engines.values(): + record_queries._listen(engine) + + if app.config.setdefault("SQLALCHEMY_TRACK_MODIFICATIONS", False): + from . import track_modifications + + track_modifications._listen(self.session) + + def _make_scoped_session( + self, options: dict[str, t.Any] + ) -> sa_orm.scoped_session[Session]: + """Create a :class:`sqlalchemy.orm.scoping.scoped_session` around the factory + from :meth:`_make_session_factory`. The result is available as :attr:`session`. + + The scope function can be customized using the ``scopefunc`` key in the + ``session_options`` parameter to the extension. By default it uses the current + thread or greenlet id. + + This method is used for internal setup. Its signature may change at any time. + + :meta private: + + :param options: The ``session_options`` parameter from ``__init__``. Keyword + arguments passed to the session factory. A ``scopefunc`` key is popped. + + .. versionchanged:: 3.0 + The session is scoped to the current app context. + + .. versionchanged:: 3.0 + Renamed from ``create_scoped_session``, this method is internal. + """ + scope = options.pop("scopefunc", _app_ctx_id) + factory = self._make_session_factory(options) + return sa_orm.scoped_session(factory, scope) + + def _make_session_factory( + self, options: dict[str, t.Any] + ) -> sa_orm.sessionmaker[Session]: + """Create the SQLAlchemy :class:`sqlalchemy.orm.sessionmaker` used by + :meth:`_make_scoped_session`. + + To customize, pass the ``session_options`` parameter to :class:`SQLAlchemy`. To + customize the session class, subclass :class:`.Session` and pass it as the + ``class_`` key. + + This method is used for internal setup. Its signature may change at any time. + + :meta private: + + :param options: The ``session_options`` parameter from ``__init__``. Keyword + arguments passed to the session factory. + + .. versionchanged:: 3.0 + The session class can be customized. + + .. versionchanged:: 3.0 + Renamed from ``create_session``, this method is internal. + """ + options.setdefault("class_", Session) + options.setdefault("query_cls", self.Query) + return sa_orm.sessionmaker(db=self, **options) + + def _teardown_session(self, exc: BaseException | None) -> None: + """Remove the current session at the end of the request. + + :meta private: + + .. versionadded:: 3.0 + """ + self.session.remove() + + def _make_metadata(self, bind_key: str | None) -> sa.MetaData: + """Get or create a :class:`sqlalchemy.schema.MetaData` for the given bind key. + + This method is used for internal setup. Its signature may change at any time. + + :meta private: + + :param bind_key: The name of the metadata being created. + + .. versionadded:: 3.0 + """ + if bind_key in self.metadatas: + return self.metadatas[bind_key] + + if bind_key is not None: + # Copy the naming convention from the default metadata. + naming_convention = self._make_metadata(None).naming_convention + else: + naming_convention = None + + # Set the bind key in info to be used by session.get_bind. + metadata = sa.MetaData( + naming_convention=naming_convention, info={"bind_key": bind_key} + ) + self.metadatas[bind_key] = metadata + return metadata + + def _make_table_class(self) -> type[_Table]: + """Create a SQLAlchemy :class:`sqlalchemy.schema.Table` class that chooses a + metadata automatically based on the ``bind_key``. The result is available as + :attr:`Table`. + + This method is used for internal setup. Its signature may change at any time. + + :meta private: + + .. versionadded:: 3.0 + """ + + class Table(_Table): + def __new__( + cls, *args: t.Any, bind_key: str | None = None, **kwargs: t.Any + ) -> Table: + # If a metadata arg is passed, go directly to the base Table. Also do + # this for no args so the correct error is shown. + if not args or (len(args) >= 2 and isinstance(args[1], sa.MetaData)): + return super().__new__(cls, *args, **kwargs) + + metadata = self._make_metadata(bind_key) + return super().__new__(cls, *[args[0], metadata, *args[1:]], **kwargs) + + return Table + + def _make_declarative_base( + self, + model_class: _FSA_MCT, + disable_autonaming: bool = False, + ) -> t.Type[_FSAModel]: + """Create a SQLAlchemy declarative model class. The result is available as + :attr:`Model`. + + To customize, subclass :class:`.Model` and pass it as ``model_class`` to + :class:`SQLAlchemy`. To customize at the metaclass level, pass an already + created declarative model class as ``model_class``. + + This method is used for internal setup. Its signature may change at any time. + + :meta private: + + :param model_class: A model base class, or an already created declarative model + class. + + :param disable_autonaming: Turns off automatic tablename generation in models. + + .. versionchanged:: 3.1.0 + Added support for passing SQLAlchemy 2.x base class as model class. + Added optional ``disable_autonaming`` parameter. + + .. versionchanged:: 3.0 + Renamed with a leading underscore, this method is internal. + + .. versionchanged:: 2.3 + ``model`` can be an already created declarative model class. + """ + model: t.Type[_FSAModel] + declarative_bases = _get_2x_declarative_bases(model_class) + if len(declarative_bases) > 1: + # raise error if more than one declarative base is found + raise ValueError( + "Only one declarative base can be passed to SQLAlchemy." + " Got: {}".format(model_class.__bases__) + ) + elif len(declarative_bases) == 1: + body = dict(model_class.__dict__) + body["__fsa__"] = self + mixin_classes = [BindMixin, NameMixin, Model] + if disable_autonaming: + mixin_classes.remove(NameMixin) + model = types.new_class( + "FlaskSQLAlchemyBase", + (*mixin_classes, *model_class.__bases__), + {"metaclass": type(declarative_bases[0])}, + lambda ns: ns.update(body), + ) + elif not isinstance(model_class, sa_orm.DeclarativeMeta): + metadata = self._make_metadata(None) + metaclass = DefaultMetaNoName if disable_autonaming else DefaultMeta + model = sa_orm.declarative_base( + metadata=metadata, cls=model_class, name="Model", metaclass=metaclass + ) + else: + model = model_class # type: ignore[assignment] + + if None not in self.metadatas: + # Use the model's metadata as the default metadata. + model.metadata.info["bind_key"] = None + self.metadatas[None] = model.metadata + else: + # Use the passed in default metadata as the model's metadata. + model.metadata = self.metadatas[None] + + model.query_class = self.Query + model.query = _QueryProperty() # type: ignore[assignment] + model.__fsa__ = self + return model + + def _apply_driver_defaults(self, options: dict[str, t.Any], app: Flask) -> None: + """Apply driver-specific configuration to an engine. + + SQLite in-memory databases use ``StaticPool`` and disable ``check_same_thread``. + File paths are relative to the app's :attr:`~flask.Flask.instance_path`, + which is created if it doesn't exist. + + MySQL sets ``charset="utf8mb4"``, and ``pool_timeout`` defaults to 2 hours. + + This method is used for internal setup. Its signature may change at any time. + + :meta private: + + :param options: Arguments passed to the engine. + :param app: The application that the engine configuration belongs to. + + .. versionchanged:: 3.0 + SQLite paths are relative to ``app.instance_path``. It does not use + ``NullPool`` if ``pool_size`` is 0. Driver-level URIs are supported. + + .. versionchanged:: 3.0 + MySQL sets ``charset="utf8mb4". It does not set ``pool_size`` to 10. It + does not set ``pool_recycle`` if not using a queue pool. + + .. versionchanged:: 3.0 + Renamed from ``apply_driver_hacks``, this method is internal. It does not + return anything. + + .. versionchanged:: 2.5 + Returns ``(sa_url, options)``. + """ + url = sa.engine.make_url(options["url"]) + + if url.drivername in {"sqlite", "sqlite+pysqlite"}: + if url.database is None or url.database in {"", ":memory:"}: + options["poolclass"] = sa.pool.StaticPool + + if "connect_args" not in options: + options["connect_args"] = {} + + options["connect_args"]["check_same_thread"] = False + else: + # the url might look like sqlite:///file:path?uri=true + is_uri = url.query.get("uri", False) + + if is_uri: + db_str = url.database[5:] + else: + db_str = url.database + + if not os.path.isabs(db_str): + os.makedirs(app.instance_path, exist_ok=True) + db_str = os.path.join(app.instance_path, db_str) + + if is_uri: + db_str = f"file:{db_str}" + + options["url"] = url.set(database=db_str) + elif url.drivername.startswith("mysql"): + # set queue defaults only when using queue pool + if ( + "pool_class" not in options + or options["pool_class"] is sa.pool.QueuePool + ): + options.setdefault("pool_recycle", 7200) + + if "charset" not in url.query: + options["url"] = url.update_query_dict({"charset": "utf8mb4"}) + + def _make_engine( + self, bind_key: str | None, options: dict[str, t.Any], app: Flask + ) -> sa.engine.Engine: + """Create the :class:`sqlalchemy.engine.Engine` for the given bind key and app. + + To customize, use :data:`.SQLALCHEMY_ENGINE_OPTIONS` or + :data:`.SQLALCHEMY_BINDS` config. Pass ``engine_options`` to :class:`SQLAlchemy` + to set defaults for all engines. + + This method is used for internal setup. Its signature may change at any time. + + :meta private: + + :param bind_key: The name of the engine being created. + :param options: Arguments passed to the engine. + :param app: The application that the engine configuration belongs to. + + .. versionchanged:: 3.0 + Renamed from ``create_engine``, this method is internal. + """ + return sa.engine_from_config(options, prefix="") + + @property + def metadata(self) -> sa.MetaData: + """The default metadata used by :attr:`Model` and :attr:`Table` if no bind key + is set. + """ + return self.metadatas[None] + + @property + def engines(self) -> t.Mapping[str | None, sa.engine.Engine]: + """Map of bind keys to :class:`sqlalchemy.engine.Engine` instances for current + application. The ``None`` key refers to the default engine, and is available as + :attr:`engine`. + + To customize, set the :data:`.SQLALCHEMY_BINDS` config, and set defaults by + passing the ``engine_options`` parameter to the extension. + + This requires that a Flask application context is active. + + .. versionadded:: 3.0 + """ + app = current_app._get_current_object() # type: ignore[attr-defined] + + if app not in self._app_engines: + raise RuntimeError( + "The current Flask app is not registered with this 'SQLAlchemy'" + " instance. Did you forget to call 'init_app', or did you create" + " multiple 'SQLAlchemy' instances?" + ) + + return self._app_engines[app] + + @property + def engine(self) -> sa.engine.Engine: + """The default :class:`~sqlalchemy.engine.Engine` for the current application, + used by :attr:`session` if the :attr:`Model` or :attr:`Table` being queried does + not set a bind key. + + To customize, set the :data:`.SQLALCHEMY_ENGINE_OPTIONS` config, and set + defaults by passing the ``engine_options`` parameter to the extension. + + This requires that a Flask application context is active. + """ + return self.engines[None] + + def get_engine( + self, bind_key: str | None = None, **kwargs: t.Any + ) -> sa.engine.Engine: + """Get the engine for the given bind key for the current application. + This requires that a Flask application context is active. + + :param bind_key: The name of the engine. + + .. deprecated:: 3.0 + Will be removed in Flask-SQLAlchemy 3.2. Use ``engines[key]`` instead. + + .. versionchanged:: 3.0 + Renamed the ``bind`` parameter to ``bind_key``. Removed the ``app`` + parameter. + """ + warnings.warn( + "'get_engine' is deprecated and will be removed in Flask-SQLAlchemy" + " 3.2. Use 'engine' or 'engines[key]' instead. If you're using" + " Flask-Migrate or Alembic, you'll need to update your 'env.py' file.", + DeprecationWarning, + stacklevel=2, + ) + + if "bind" in kwargs: + bind_key = kwargs.pop("bind") + + return self.engines[bind_key] + + def get_or_404( + self, + entity: type[_O], + ident: t.Any, + *, + description: str | None = None, + **kwargs: t.Any, + ) -> _O: + """Like :meth:`session.get() ` but aborts with a + ``404 Not Found`` error instead of returning ``None``. + + :param entity: The model class to query. + :param ident: The primary key to query. + :param description: A custom message to show on the error page. + :param kwargs: Extra arguments passed to ``session.get()``. + + .. versionchanged:: 3.1 + Pass extra keyword arguments to ``session.get()``. + + .. versionadded:: 3.0 + """ + value = self.session.get(entity, ident, **kwargs) + + if value is None: + abort(404, description=description) + + return value + + def first_or_404( + self, statement: sa.sql.Select[t.Any], *, description: str | None = None + ) -> t.Any: + """Like :meth:`Result.scalar() `, but aborts + with a ``404 Not Found`` error instead of returning ``None``. + + :param statement: The ``select`` statement to execute. + :param description: A custom message to show on the error page. + + .. versionadded:: 3.0 + """ + value = self.session.execute(statement).scalar() + + if value is None: + abort(404, description=description) + + return value + + def one_or_404( + self, statement: sa.sql.Select[t.Any], *, description: str | None = None + ) -> t.Any: + """Like :meth:`Result.scalar_one() `, + but aborts with a ``404 Not Found`` error instead of raising ``NoResultFound`` + or ``MultipleResultsFound``. + + :param statement: The ``select`` statement to execute. + :param description: A custom message to show on the error page. + + .. versionadded:: 3.0 + """ + try: + return self.session.execute(statement).scalar_one() + except (sa_exc.NoResultFound, sa_exc.MultipleResultsFound): + abort(404, description=description) + + def paginate( + self, + select: sa.sql.Select[t.Any], + *, + page: int | None = None, + per_page: int | None = None, + max_per_page: int | None = None, + error_out: bool = True, + count: bool = True, + ) -> Pagination: + """Apply an offset and limit to a select statment based on the current page and + number of items per page, returning a :class:`.Pagination` object. + + The statement should select a model class, like ``select(User)``. This applies + ``unique()`` and ``scalars()`` modifiers to the result, so compound selects will + not return the expected results. + + :param select: The ``select`` statement to paginate. + :param page: The current page, used to calculate the offset. Defaults to the + ``page`` query arg during a request, or 1 otherwise. + :param per_page: The maximum number of items on a page, used to calculate the + offset and limit. Defaults to the ``per_page`` query arg during a request, + or 20 otherwise. + :param max_per_page: The maximum allowed value for ``per_page``, to limit a + user-provided value. Use ``None`` for no limit. Defaults to 100. + :param error_out: Abort with a ``404 Not Found`` error if no items are returned + and ``page`` is not 1, or if ``page`` or ``per_page`` is less than 1, or if + either are not ints. + :param count: Calculate the total number of values by issuing an extra count + query. For very complex queries this may be inaccurate or slow, so it can be + disabled and set manually if necessary. + + .. versionchanged:: 3.0 + The ``count`` query is more efficient. + + .. versionadded:: 3.0 + """ + return SelectPagination( + select=select, + session=self.session(), + page=page, + per_page=per_page, + max_per_page=max_per_page, + error_out=error_out, + count=count, + ) + + def _call_for_binds( + self, bind_key: str | None | list[str | None], op_name: str + ) -> None: + """Call a method on each metadata. + + :meta private: + + :param bind_key: A bind key or list of keys. Defaults to all binds. + :param op_name: The name of the method to call. + + .. versionchanged:: 3.0 + Renamed from ``_execute_for_all_tables``. + """ + if bind_key == "__all__": + keys: list[str | None] = list(self.metadatas) + elif bind_key is None or isinstance(bind_key, str): + keys = [bind_key] + else: + keys = bind_key + + for key in keys: + try: + engine = self.engines[key] + except KeyError: + message = f"Bind key '{key}' is not in 'SQLALCHEMY_BINDS' config." + + if key is None: + message = f"'SQLALCHEMY_DATABASE_URI' config is not set. {message}" + + raise sa_exc.UnboundExecutionError(message) from None + + metadata = self.metadatas[key] + getattr(metadata, op_name)(bind=engine) + + def create_all(self, bind_key: str | None | list[str | None] = "__all__") -> None: + """Create tables that do not exist in the database by calling + ``metadata.create_all()`` for all or some bind keys. This does not + update existing tables, use a migration library for that. + + This requires that a Flask application context is active. + + :param bind_key: A bind key or list of keys to create the tables for. Defaults + to all binds. + + .. versionchanged:: 3.0 + Renamed the ``bind`` parameter to ``bind_key``. Removed the ``app`` + parameter. + + .. versionchanged:: 0.12 + Added the ``bind`` and ``app`` parameters. + """ + self._call_for_binds(bind_key, "create_all") + + def drop_all(self, bind_key: str | None | list[str | None] = "__all__") -> None: + """Drop tables by calling ``metadata.drop_all()`` for all or some bind keys. + + This requires that a Flask application context is active. + + :param bind_key: A bind key or list of keys to drop the tables from. Defaults to + all binds. + + .. versionchanged:: 3.0 + Renamed the ``bind`` parameter to ``bind_key``. Removed the ``app`` + parameter. + + .. versionchanged:: 0.12 + Added the ``bind`` and ``app`` parameters. + """ + self._call_for_binds(bind_key, "drop_all") + + def reflect(self, bind_key: str | None | list[str | None] = "__all__") -> None: + """Load table definitions from the database by calling ``metadata.reflect()`` + for all or some bind keys. + + This requires that a Flask application context is active. + + :param bind_key: A bind key or list of keys to reflect the tables from. Defaults + to all binds. + + .. versionchanged:: 3.0 + Renamed the ``bind`` parameter to ``bind_key``. Removed the ``app`` + parameter. + + .. versionchanged:: 0.12 + Added the ``bind`` and ``app`` parameters. + """ + self._call_for_binds(bind_key, "reflect") + + def _set_rel_query(self, kwargs: dict[str, t.Any]) -> None: + """Apply the extension's :attr:`Query` class as the default for relationships + and backrefs. + + :meta private: + """ + kwargs.setdefault("query_class", self.Query) + + if "backref" in kwargs: + backref = kwargs["backref"] + + if isinstance(backref, str): + backref = (backref, {}) + + backref[1].setdefault("query_class", self.Query) + + def relationship( + self, *args: t.Any, **kwargs: t.Any + ) -> sa_orm.RelationshipProperty[t.Any]: + """A :func:`sqlalchemy.orm.relationship` that applies this extension's + :attr:`Query` class for dynamic relationships and backrefs. + + .. versionchanged:: 3.0 + The :attr:`Query` class is set on ``backref``. + """ + self._set_rel_query(kwargs) + return sa_orm.relationship(*args, **kwargs) + + def dynamic_loader( + self, argument: t.Any, **kwargs: t.Any + ) -> sa_orm.RelationshipProperty[t.Any]: + """A :func:`sqlalchemy.orm.dynamic_loader` that applies this extension's + :attr:`Query` class for relationships and backrefs. + + .. versionchanged:: 3.0 + The :attr:`Query` class is set on ``backref``. + """ + self._set_rel_query(kwargs) + return sa_orm.dynamic_loader(argument, **kwargs) + + def _relation( + self, *args: t.Any, **kwargs: t.Any + ) -> sa_orm.RelationshipProperty[t.Any]: + """A :func:`sqlalchemy.orm.relationship` that applies this extension's + :attr:`Query` class for dynamic relationships and backrefs. + + SQLAlchemy 2.0 removes this name, use ``relationship`` instead. + + :meta private: + + .. versionchanged:: 3.0 + The :attr:`Query` class is set on ``backref``. + """ + self._set_rel_query(kwargs) + f = sa_orm.relationship + return f(*args, **kwargs) + + def __getattr__(self, name: str) -> t.Any: + if name == "relation": + return self._relation + + if name == "event": + return sa_event + + if name.startswith("_"): + raise AttributeError(name) + + for mod in (sa, sa_orm): + if hasattr(mod, name): + return getattr(mod, name) + + raise AttributeError(name) diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/model.py b/venv/lib/python3.12/site-packages/flask_sqlalchemy/model.py new file mode 100644 index 0000000..c6f9e5a --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask_sqlalchemy/model.py @@ -0,0 +1,330 @@ +from __future__ import annotations + +import re +import typing as t + +import sqlalchemy as sa +import sqlalchemy.orm as sa_orm + +from .query import Query + +if t.TYPE_CHECKING: + from .extension import SQLAlchemy + + +class _QueryProperty: + """A class property that creates a query object for a model. + + :meta private: + """ + + def __get__(self, obj: Model | None, cls: type[Model]) -> Query: + return cls.query_class( + cls, session=cls.__fsa__.session() # type: ignore[arg-type] + ) + + +class Model: + """The base class of the :attr:`.SQLAlchemy.Model` declarative model class. + + To define models, subclass :attr:`db.Model <.SQLAlchemy.Model>`, not this. To + customize ``db.Model``, subclass this and pass it as ``model_class`` to + :class:`.SQLAlchemy`. To customize ``db.Model`` at the metaclass level, pass an + already created declarative model class as ``model_class``. + """ + + __fsa__: t.ClassVar[SQLAlchemy] + """Internal reference to the extension object. + + :meta private: + """ + + query_class: t.ClassVar[type[Query]] = Query + """Query class used by :attr:`query`. Defaults to :attr:`.SQLAlchemy.Query`, which + defaults to :class:`.Query`. + """ + + query: t.ClassVar[Query] = _QueryProperty() # type: ignore[assignment] + """A SQLAlchemy query for a model. Equivalent to ``db.session.query(Model)``. Can be + customized per-model by overriding :attr:`query_class`. + + .. warning:: + The query interface is considered legacy in SQLAlchemy. Prefer using + ``session.execute(select())`` instead. + """ + + def __repr__(self) -> str: + state = sa.inspect(self) + assert state is not None + + if state.transient: + pk = f"(transient {id(self)})" + elif state.pending: + pk = f"(pending {id(self)})" + else: + pk = ", ".join(map(str, state.identity)) + + return f"<{type(self).__name__} {pk}>" + + +class BindMetaMixin(type): + """Metaclass mixin that sets a model's ``metadata`` based on its ``__bind_key__``. + + If the model sets ``metadata`` or ``__table__`` directly, ``__bind_key__`` is + ignored. If the ``metadata`` is the same as the parent model, it will not be set + directly on the child model. + """ + + __fsa__: SQLAlchemy + metadata: sa.MetaData + + def __init__( + cls, name: str, bases: tuple[type, ...], d: dict[str, t.Any], **kwargs: t.Any + ) -> None: + if not ("metadata" in cls.__dict__ or "__table__" in cls.__dict__): + bind_key = getattr(cls, "__bind_key__", None) + parent_metadata = getattr(cls, "metadata", None) + metadata = cls.__fsa__._make_metadata(bind_key) + + if metadata is not parent_metadata: + cls.metadata = metadata + + super().__init__(name, bases, d, **kwargs) + + +class BindMixin: + """DeclarativeBase mixin to set a model's ``metadata`` based on ``__bind_key__``. + + If no ``__bind_key__`` is specified, the model will use the default metadata + provided by ``DeclarativeBase`` or ``DeclarativeBaseNoMeta``. + If the model doesn't set ``metadata`` or ``__table__`` directly + and does set ``__bind_key__``, the model will use the metadata + for the specified bind key. + If the ``metadata`` is the same as the parent model, it will not be set + directly on the child model. + + .. versionchanged:: 3.1.0 + """ + + __fsa__: SQLAlchemy + metadata: sa.MetaData + + @classmethod + def __init_subclass__(cls: t.Type[BindMixin], **kwargs: t.Dict[str, t.Any]) -> None: + if not ("metadata" in cls.__dict__ or "__table__" in cls.__dict__) and hasattr( + cls, "__bind_key__" + ): + bind_key = getattr(cls, "__bind_key__", None) + parent_metadata = getattr(cls, "metadata", None) + metadata = cls.__fsa__._make_metadata(bind_key) + + if metadata is not parent_metadata: + cls.metadata = metadata + + super().__init_subclass__(**kwargs) + + +class NameMetaMixin(type): + """Metaclass mixin that sets a model's ``__tablename__`` by converting the + ``CamelCase`` class name to ``snake_case``. A name is set for non-abstract models + that do not otherwise define ``__tablename__``. If a model does not define a primary + key, it will not generate a name or ``__table__``, for single-table inheritance. + """ + + metadata: sa.MetaData + __tablename__: str + __table__: sa.Table + + def __init__( + cls, name: str, bases: tuple[type, ...], d: dict[str, t.Any], **kwargs: t.Any + ) -> None: + if should_set_tablename(cls): + cls.__tablename__ = camel_to_snake_case(cls.__name__) + + super().__init__(name, bases, d, **kwargs) + + # __table_cls__ has run. If no table was created, use the parent table. + if ( + "__tablename__" not in cls.__dict__ + and "__table__" in cls.__dict__ + and cls.__dict__["__table__"] is None + ): + del cls.__table__ + + def __table_cls__(cls, *args: t.Any, **kwargs: t.Any) -> sa.Table | None: + """This is called by SQLAlchemy during mapper setup. It determines the final + table object that the model will use. + + If no primary key is found, that indicates single-table inheritance, so no table + will be created and ``__tablename__`` will be unset. + """ + schema = kwargs.get("schema") + + if schema is None: + key = args[0] + else: + key = f"{schema}.{args[0]}" + + # Check if a table with this name already exists. Allows reflected tables to be + # applied to models by name. + if key in cls.metadata.tables: + return sa.Table(*args, **kwargs) + + # If a primary key is found, create a table for joined-table inheritance. + for arg in args: + if (isinstance(arg, sa.Column) and arg.primary_key) or isinstance( + arg, sa.PrimaryKeyConstraint + ): + return sa.Table(*args, **kwargs) + + # If no base classes define a table, return one that's missing a primary key + # so SQLAlchemy shows the correct error. + for base in cls.__mro__[1:-1]: + if "__table__" in base.__dict__: + break + else: + return sa.Table(*args, **kwargs) + + # Single-table inheritance, use the parent table name. __init__ will unset + # __table__ based on this. + if "__tablename__" in cls.__dict__: + del cls.__tablename__ + + return None + + +class NameMixin: + """DeclarativeBase mixin that sets a model's ``__tablename__`` by converting the + ``CamelCase`` class name to ``snake_case``. A name is set for non-abstract models + that do not otherwise define ``__tablename__``. If a model does not define a primary + key, it will not generate a name or ``__table__``, for single-table inheritance. + + .. versionchanged:: 3.1.0 + """ + + metadata: sa.MetaData + __tablename__: str + __table__: sa.Table + + @classmethod + def __init_subclass__(cls: t.Type[NameMixin], **kwargs: t.Dict[str, t.Any]) -> None: + if should_set_tablename(cls): + cls.__tablename__ = camel_to_snake_case(cls.__name__) + + super().__init_subclass__(**kwargs) + + # __table_cls__ has run. If no table was created, use the parent table. + if ( + "__tablename__" not in cls.__dict__ + and "__table__" in cls.__dict__ + and cls.__dict__["__table__"] is None + ): + del cls.__table__ + + @classmethod + def __table_cls__(cls, *args: t.Any, **kwargs: t.Any) -> sa.Table | None: + """This is called by SQLAlchemy during mapper setup. It determines the final + table object that the model will use. + + If no primary key is found, that indicates single-table inheritance, so no table + will be created and ``__tablename__`` will be unset. + """ + schema = kwargs.get("schema") + + if schema is None: + key = args[0] + else: + key = f"{schema}.{args[0]}" + + # Check if a table with this name already exists. Allows reflected tables to be + # applied to models by name. + if key in cls.metadata.tables: + return sa.Table(*args, **kwargs) + + # If a primary key is found, create a table for joined-table inheritance. + for arg in args: + if (isinstance(arg, sa.Column) and arg.primary_key) or isinstance( + arg, sa.PrimaryKeyConstraint + ): + return sa.Table(*args, **kwargs) + + # If no base classes define a table, return one that's missing a primary key + # so SQLAlchemy shows the correct error. + for base in cls.__mro__[1:-1]: + if "__table__" in base.__dict__: + break + else: + return sa.Table(*args, **kwargs) + + # Single-table inheritance, use the parent table name. __init__ will unset + # __table__ based on this. + if "__tablename__" in cls.__dict__: + del cls.__tablename__ + + return None + + +def should_set_tablename(cls: type) -> bool: + """Determine whether ``__tablename__`` should be generated for a model. + + - If no class in the MRO sets a name, one should be generated. + - If a declared attr is found, it should be used instead. + - If a name is found, it should be used if the class is a mixin, otherwise one + should be generated. + - Abstract models should not have one generated. + + Later, ``__table_cls__`` will determine if the model looks like single or + joined-table inheritance. If no primary key is found, the name will be unset. + """ + if ( + cls.__dict__.get("__abstract__", False) + or ( + not issubclass(cls, (sa_orm.DeclarativeBase, sa_orm.DeclarativeBaseNoMeta)) + and not any(isinstance(b, sa_orm.DeclarativeMeta) for b in cls.__mro__[1:]) + ) + or any( + (b is sa_orm.DeclarativeBase or b is sa_orm.DeclarativeBaseNoMeta) + for b in cls.__bases__ + ) + ): + return False + + for base in cls.__mro__: + if "__tablename__" not in base.__dict__: + continue + + if isinstance(base.__dict__["__tablename__"], sa_orm.declared_attr): + return False + + return not ( + base is cls + or base.__dict__.get("__abstract__", False) + or not ( + # SQLAlchemy 1.x + isinstance(base, sa_orm.DeclarativeMeta) + # 2.x: DeclarativeBas uses this as metaclass + or isinstance(base, sa_orm.decl_api.DeclarativeAttributeIntercept) + # 2.x: DeclarativeBaseNoMeta doesn't use a metaclass + or issubclass(base, sa_orm.DeclarativeBaseNoMeta) + ) + ) + + return True + + +def camel_to_snake_case(name: str) -> str: + """Convert a ``CamelCase`` name to ``snake_case``.""" + name = re.sub(r"((?<=[a-z0-9])[A-Z]|(?!^)[A-Z](?=[a-z]))", r"_\1", name) + return name.lower().lstrip("_") + + +class DefaultMeta(BindMetaMixin, NameMetaMixin, sa_orm.DeclarativeMeta): + """SQLAlchemy declarative metaclass that provides ``__bind_key__`` and + ``__tablename__`` support. + """ + + +class DefaultMetaNoName(BindMetaMixin, sa_orm.DeclarativeMeta): + """SQLAlchemy declarative metaclass that provides ``__bind_key__`` and + ``__tablename__`` support. + """ diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/pagination.py b/venv/lib/python3.12/site-packages/flask_sqlalchemy/pagination.py new file mode 100644 index 0000000..3d49d6e --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask_sqlalchemy/pagination.py @@ -0,0 +1,364 @@ +from __future__ import annotations + +import typing as t +from math import ceil + +import sqlalchemy as sa +import sqlalchemy.orm as sa_orm +from flask import abort +from flask import request + + +class Pagination: + """Apply an offset and limit to the query based on the current page and number of + items per page. + + Don't create pagination objects manually. They are created by + :meth:`.SQLAlchemy.paginate` and :meth:`.Query.paginate`. + + This is a base class, a subclass must implement :meth:`_query_items` and + :meth:`_query_count`. Those methods will use arguments passed as ``kwargs`` to + perform the queries. + + :param page: The current page, used to calculate the offset. Defaults to the + ``page`` query arg during a request, or 1 otherwise. + :param per_page: The maximum number of items on a page, used to calculate the + offset and limit. Defaults to the ``per_page`` query arg during a request, + or 20 otherwise. + :param max_per_page: The maximum allowed value for ``per_page``, to limit a + user-provided value. Use ``None`` for no limit. Defaults to 100. + :param error_out: Abort with a ``404 Not Found`` error if no items are returned + and ``page`` is not 1, or if ``page`` or ``per_page`` is less than 1, or if + either are not ints. + :param count: Calculate the total number of values by issuing an extra count + query. For very complex queries this may be inaccurate or slow, so it can be + disabled and set manually if necessary. + :param kwargs: Information about the query to paginate. Different subclasses will + require different arguments. + + .. versionchanged:: 3.0 + Iterating over a pagination object iterates over its items. + + .. versionchanged:: 3.0 + Creating instances manually is not a public API. + """ + + def __init__( + self, + page: int | None = None, + per_page: int | None = None, + max_per_page: int | None = 100, + error_out: bool = True, + count: bool = True, + **kwargs: t.Any, + ) -> None: + self._query_args = kwargs + page, per_page = self._prepare_page_args( + page=page, + per_page=per_page, + max_per_page=max_per_page, + error_out=error_out, + ) + + self.page: int = page + """The current page.""" + + self.per_page: int = per_page + """The maximum number of items on a page.""" + + self.max_per_page: int | None = max_per_page + """The maximum allowed value for ``per_page``.""" + + items = self._query_items() + + if not items and page != 1 and error_out: + abort(404) + + self.items: list[t.Any] = items + """The items on the current page. Iterating over the pagination object is + equivalent to iterating over the items. + """ + + if count: + total = self._query_count() + else: + total = None + + self.total: int | None = total + """The total number of items across all pages.""" + + @staticmethod + def _prepare_page_args( + *, + page: int | None = None, + per_page: int | None = None, + max_per_page: int | None = None, + error_out: bool = True, + ) -> tuple[int, int]: + if request: + if page is None: + try: + page = int(request.args.get("page", 1)) + except (TypeError, ValueError): + if error_out: + abort(404) + + page = 1 + + if per_page is None: + try: + per_page = int(request.args.get("per_page", 20)) + except (TypeError, ValueError): + if error_out: + abort(404) + + per_page = 20 + else: + if page is None: + page = 1 + + if per_page is None: + per_page = 20 + + if max_per_page is not None: + per_page = min(per_page, max_per_page) + + if page < 1: + if error_out: + abort(404) + else: + page = 1 + + if per_page < 1: + if error_out: + abort(404) + else: + per_page = 20 + + return page, per_page + + @property + def _query_offset(self) -> int: + """The index of the first item to query, passed to ``offset()``. + + :meta private: + + .. versionadded:: 3.0 + """ + return (self.page - 1) * self.per_page + + def _query_items(self) -> list[t.Any]: + """Execute the query to get the items on the current page. + + Uses init arguments stored in :attr:`_query_args`. + + :meta private: + + .. versionadded:: 3.0 + """ + raise NotImplementedError + + def _query_count(self) -> int: + """Execute the query to get the total number of items. + + Uses init arguments stored in :attr:`_query_args`. + + :meta private: + + .. versionadded:: 3.0 + """ + raise NotImplementedError + + @property + def first(self) -> int: + """The number of the first item on the page, starting from 1, or 0 if there are + no items. + + .. versionadded:: 3.0 + """ + if len(self.items) == 0: + return 0 + + return (self.page - 1) * self.per_page + 1 + + @property + def last(self) -> int: + """The number of the last item on the page, starting from 1, inclusive, or 0 if + there are no items. + + .. versionadded:: 3.0 + """ + first = self.first + return max(first, first + len(self.items) - 1) + + @property + def pages(self) -> int: + """The total number of pages.""" + if self.total == 0 or self.total is None: + return 0 + + return ceil(self.total / self.per_page) + + @property + def has_prev(self) -> bool: + """``True`` if this is not the first page.""" + return self.page > 1 + + @property + def prev_num(self) -> int | None: + """The previous page number, or ``None`` if this is the first page.""" + if not self.has_prev: + return None + + return self.page - 1 + + def prev(self, *, error_out: bool = False) -> Pagination: + """Query the :class:`Pagination` object for the previous page. + + :param error_out: Abort with a ``404 Not Found`` error if no items are returned + and ``page`` is not 1, or if ``page`` or ``per_page`` is less than 1, or if + either are not ints. + """ + p = type(self)( + page=self.page - 1, + per_page=self.per_page, + error_out=error_out, + count=False, + **self._query_args, + ) + p.total = self.total + return p + + @property + def has_next(self) -> bool: + """``True`` if this is not the last page.""" + return self.page < self.pages + + @property + def next_num(self) -> int | None: + """The next page number, or ``None`` if this is the last page.""" + if not self.has_next: + return None + + return self.page + 1 + + def next(self, *, error_out: bool = False) -> Pagination: + """Query the :class:`Pagination` object for the next page. + + :param error_out: Abort with a ``404 Not Found`` error if no items are returned + and ``page`` is not 1, or if ``page`` or ``per_page`` is less than 1, or if + either are not ints. + """ + p = type(self)( + page=self.page + 1, + per_page=self.per_page, + max_per_page=self.max_per_page, + error_out=error_out, + count=False, + **self._query_args, + ) + p.total = self.total + return p + + def iter_pages( + self, + *, + left_edge: int = 2, + left_current: int = 2, + right_current: int = 4, + right_edge: int = 2, + ) -> t.Iterator[int | None]: + """Yield page numbers for a pagination widget. Skipped pages between the edges + and middle are represented by a ``None``. + + For example, if there are 20 pages and the current page is 7, the following + values are yielded. + + .. code-block:: python + + 1, 2, None, 5, 6, 7, 8, 9, 10, 11, None, 19, 20 + + :param left_edge: How many pages to show from the first page. + :param left_current: How many pages to show left of the current page. + :param right_current: How many pages to show right of the current page. + :param right_edge: How many pages to show from the last page. + + .. versionchanged:: 3.0 + Improved efficiency of calculating what to yield. + + .. versionchanged:: 3.0 + ``right_current`` boundary is inclusive. + + .. versionchanged:: 3.0 + All parameters are keyword-only. + """ + pages_end = self.pages + 1 + + if pages_end == 1: + return + + left_end = min(1 + left_edge, pages_end) + yield from range(1, left_end) + + if left_end == pages_end: + return + + mid_start = max(left_end, self.page - left_current) + mid_end = min(self.page + right_current + 1, pages_end) + + if mid_start - left_end > 0: + yield None + + yield from range(mid_start, mid_end) + + if mid_end == pages_end: + return + + right_start = max(mid_end, pages_end - right_edge) + + if right_start - mid_end > 0: + yield None + + yield from range(right_start, pages_end) + + def __iter__(self) -> t.Iterator[t.Any]: + yield from self.items + + +class SelectPagination(Pagination): + """Returned by :meth:`.SQLAlchemy.paginate`. Takes ``select`` and ``session`` + arguments in addition to the :class:`Pagination` arguments. + + .. versionadded:: 3.0 + """ + + def _query_items(self) -> list[t.Any]: + select = self._query_args["select"] + select = select.limit(self.per_page).offset(self._query_offset) + session = self._query_args["session"] + return list(session.execute(select).unique().scalars()) + + def _query_count(self) -> int: + select = self._query_args["select"] + sub = select.options(sa_orm.lazyload("*")).order_by(None).subquery() + session = self._query_args["session"] + out = session.execute(sa.select(sa.func.count()).select_from(sub)).scalar() + return out # type: ignore[no-any-return] + + +class QueryPagination(Pagination): + """Returned by :meth:`.Query.paginate`. Takes a ``query`` argument in addition to + the :class:`Pagination` arguments. + + .. versionadded:: 3.0 + """ + + def _query_items(self) -> list[t.Any]: + query = self._query_args["query"] + out = query.limit(self.per_page).offset(self._query_offset).all() + return out # type: ignore[no-any-return] + + def _query_count(self) -> int: + # Query.count automatically disables eager loads + out = self._query_args["query"].order_by(None).count() + return out # type: ignore[no-any-return] diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/py.typed b/venv/lib/python3.12/site-packages/flask_sqlalchemy/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/query.py b/venv/lib/python3.12/site-packages/flask_sqlalchemy/query.py new file mode 100644 index 0000000..35f927d --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask_sqlalchemy/query.py @@ -0,0 +1,105 @@ +from __future__ import annotations + +import typing as t + +import sqlalchemy.exc as sa_exc +import sqlalchemy.orm as sa_orm +from flask import abort + +from .pagination import Pagination +from .pagination import QueryPagination + + +class Query(sa_orm.Query): # type: ignore[type-arg] + """SQLAlchemy :class:`~sqlalchemy.orm.query.Query` subclass with some extra methods + useful for querying in a web application. + + This is the default query class for :attr:`.Model.query`. + + .. versionchanged:: 3.0 + Renamed to ``Query`` from ``BaseQuery``. + """ + + def get_or_404(self, ident: t.Any, description: str | None = None) -> t.Any: + """Like :meth:`~sqlalchemy.orm.Query.get` but aborts with a ``404 Not Found`` + error instead of returning ``None``. + + :param ident: The primary key to query. + :param description: A custom message to show on the error page. + """ + rv = self.get(ident) + + if rv is None: + abort(404, description=description) + + return rv + + def first_or_404(self, description: str | None = None) -> t.Any: + """Like :meth:`~sqlalchemy.orm.Query.first` but aborts with a ``404 Not Found`` + error instead of returning ``None``. + + :param description: A custom message to show on the error page. + """ + rv = self.first() + + if rv is None: + abort(404, description=description) + + return rv + + def one_or_404(self, description: str | None = None) -> t.Any: + """Like :meth:`~sqlalchemy.orm.Query.one` but aborts with a ``404 Not Found`` + error instead of raising ``NoResultFound`` or ``MultipleResultsFound``. + + :param description: A custom message to show on the error page. + + .. versionadded:: 3.0 + """ + try: + return self.one() + except (sa_exc.NoResultFound, sa_exc.MultipleResultsFound): + abort(404, description=description) + + def paginate( + self, + *, + page: int | None = None, + per_page: int | None = None, + max_per_page: int | None = None, + error_out: bool = True, + count: bool = True, + ) -> Pagination: + """Apply an offset and limit to the query based on the current page and number + of items per page, returning a :class:`.Pagination` object. + + :param page: The current page, used to calculate the offset. Defaults to the + ``page`` query arg during a request, or 1 otherwise. + :param per_page: The maximum number of items on a page, used to calculate the + offset and limit. Defaults to the ``per_page`` query arg during a request, + or 20 otherwise. + :param max_per_page: The maximum allowed value for ``per_page``, to limit a + user-provided value. Use ``None`` for no limit. Defaults to 100. + :param error_out: Abort with a ``404 Not Found`` error if no items are returned + and ``page`` is not 1, or if ``page`` or ``per_page`` is less than 1, or if + either are not ints. + :param count: Calculate the total number of values by issuing an extra count + query. For very complex queries this may be inaccurate or slow, so it can be + disabled and set manually if necessary. + + .. versionchanged:: 3.0 + All parameters are keyword-only. + + .. versionchanged:: 3.0 + The ``count`` query is more efficient. + + .. versionchanged:: 3.0 + ``max_per_page`` defaults to 100. + """ + return QueryPagination( + query=self, + page=page, + per_page=per_page, + max_per_page=max_per_page, + error_out=error_out, + count=count, + ) diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/record_queries.py b/venv/lib/python3.12/site-packages/flask_sqlalchemy/record_queries.py new file mode 100644 index 0000000..e8273be --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask_sqlalchemy/record_queries.py @@ -0,0 +1,117 @@ +from __future__ import annotations + +import dataclasses +import inspect +import typing as t +from time import perf_counter + +import sqlalchemy as sa +import sqlalchemy.event as sa_event +from flask import current_app +from flask import g +from flask import has_app_context + + +def get_recorded_queries() -> list[_QueryInfo]: + """Get the list of recorded query information for the current session. Queries are + recorded if the config :data:`.SQLALCHEMY_RECORD_QUERIES` is enabled. + + Each query info object has the following attributes: + + ``statement`` + The string of SQL generated by SQLAlchemy with parameter placeholders. + ``parameters`` + The parameters sent with the SQL statement. + ``start_time`` / ``end_time`` + Timing info about when the query started execution and when the results where + returned. Accuracy and value depends on the operating system. + ``duration`` + The time the query took in seconds. + ``location`` + A string description of where in your application code the query was executed. + This may not be possible to calculate, and the format is not stable. + + .. versionchanged:: 3.0 + Renamed from ``get_debug_queries``. + + .. versionchanged:: 3.0 + The info object is a dataclass instead of a tuple. + + .. versionchanged:: 3.0 + The info object attribute ``context`` is renamed to ``location``. + + .. versionchanged:: 3.0 + Not enabled automatically in debug or testing mode. + """ + return g.get("_sqlalchemy_queries", []) # type: ignore[no-any-return] + + +@dataclasses.dataclass +class _QueryInfo: + """Information about an executed query. Returned by :func:`get_recorded_queries`. + + .. versionchanged:: 3.0 + Renamed from ``_DebugQueryTuple``. + + .. versionchanged:: 3.0 + Changed to a dataclass instead of a tuple. + + .. versionchanged:: 3.0 + ``context`` is renamed to ``location``. + """ + + statement: str | None + parameters: t.Any + start_time: float + end_time: float + location: str + + @property + def duration(self) -> float: + return self.end_time - self.start_time + + +def _listen(engine: sa.engine.Engine) -> None: + sa_event.listen(engine, "before_cursor_execute", _record_start, named=True) + sa_event.listen(engine, "after_cursor_execute", _record_end, named=True) + + +def _record_start(context: sa.engine.ExecutionContext, **kwargs: t.Any) -> None: + if not has_app_context(): + return + + context._fsa_start_time = perf_counter() # type: ignore[attr-defined] + + +def _record_end(context: sa.engine.ExecutionContext, **kwargs: t.Any) -> None: + if not has_app_context(): + return + + if "_sqlalchemy_queries" not in g: + g._sqlalchemy_queries = [] + + import_top = current_app.import_name.partition(".")[0] + import_dot = f"{import_top}." + frame = inspect.currentframe() + + while frame: + name = frame.f_globals.get("__name__") + + if name and (name == import_top or name.startswith(import_dot)): + code = frame.f_code + location = f"{code.co_filename}:{frame.f_lineno} ({code.co_name})" + break + + frame = frame.f_back + else: + location = "" + + g._sqlalchemy_queries.append( + _QueryInfo( + statement=context.statement, + parameters=context.parameters, + start_time=context._fsa_start_time, # type: ignore[attr-defined] + end_time=perf_counter(), + location=location, + ) + ) diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/session.py b/venv/lib/python3.12/site-packages/flask_sqlalchemy/session.py new file mode 100644 index 0000000..631fffa --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask_sqlalchemy/session.py @@ -0,0 +1,111 @@ +from __future__ import annotations + +import typing as t + +import sqlalchemy as sa +import sqlalchemy.exc as sa_exc +import sqlalchemy.orm as sa_orm +from flask.globals import app_ctx + +if t.TYPE_CHECKING: + from .extension import SQLAlchemy + + +class Session(sa_orm.Session): + """A SQLAlchemy :class:`~sqlalchemy.orm.Session` class that chooses what engine to + use based on the bind key associated with the metadata associated with the thing + being queried. + + To customize ``db.session``, subclass this and pass it as the ``class_`` key in the + ``session_options`` to :class:`.SQLAlchemy`. + + .. versionchanged:: 3.0 + Renamed from ``SignallingSession``. + """ + + def __init__(self, db: SQLAlchemy, **kwargs: t.Any) -> None: + super().__init__(**kwargs) + self._db = db + self._model_changes: dict[object, tuple[t.Any, str]] = {} + + def get_bind( + self, + mapper: t.Any | None = None, + clause: t.Any | None = None, + bind: sa.engine.Engine | sa.engine.Connection | None = None, + **kwargs: t.Any, + ) -> sa.engine.Engine | sa.engine.Connection: + """Select an engine based on the ``bind_key`` of the metadata associated with + the model or table being queried. If no bind key is set, uses the default bind. + + .. versionchanged:: 3.0.3 + Fix finding the bind for a joined inheritance model. + + .. versionchanged:: 3.0 + The implementation more closely matches the base SQLAlchemy implementation. + + .. versionchanged:: 2.1 + Support joining an external transaction. + """ + if bind is not None: + return bind + + engines = self._db.engines + + if mapper is not None: + try: + mapper = sa.inspect(mapper) + except sa_exc.NoInspectionAvailable as e: + if isinstance(mapper, type): + raise sa_orm.exc.UnmappedClassError(mapper) from e + + raise + + engine = _clause_to_engine(mapper.local_table, engines) + + if engine is not None: + return engine + + if clause is not None: + engine = _clause_to_engine(clause, engines) + + if engine is not None: + return engine + + if None in engines: + return engines[None] + + return super().get_bind(mapper=mapper, clause=clause, bind=bind, **kwargs) + + +def _clause_to_engine( + clause: sa.ClauseElement | None, + engines: t.Mapping[str | None, sa.engine.Engine], +) -> sa.engine.Engine | None: + """If the clause is a table, return the engine associated with the table's + metadata's bind key. + """ + table = None + + if clause is not None: + if isinstance(clause, sa.Table): + table = clause + elif isinstance(clause, sa.UpdateBase) and isinstance(clause.table, sa.Table): + table = clause.table + + if table is not None and "bind_key" in table.metadata.info: + key = table.metadata.info["bind_key"] + + if key not in engines: + raise sa_exc.UnboundExecutionError( + f"Bind key '{key}' is not in 'SQLALCHEMY_BINDS' config." + ) + + return engines[key] + + return None + + +def _app_ctx_id() -> int: + """Get the id of the current Flask application context for the session scope.""" + return id(app_ctx._get_current_object()) # type: ignore[attr-defined] diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/table.py b/venv/lib/python3.12/site-packages/flask_sqlalchemy/table.py new file mode 100644 index 0000000..ab08a69 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask_sqlalchemy/table.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +import typing as t + +import sqlalchemy as sa +import sqlalchemy.sql.schema as sa_sql_schema + + +class _Table(sa.Table): + @t.overload + def __init__( + self, + name: str, + *args: sa_sql_schema.SchemaItem, + bind_key: str | None = None, + **kwargs: t.Any, + ) -> None: + ... + + @t.overload + def __init__( + self, + name: str, + metadata: sa.MetaData, + *args: sa_sql_schema.SchemaItem, + **kwargs: t.Any, + ) -> None: + ... + + @t.overload + def __init__( + self, name: str, *args: sa_sql_schema.SchemaItem, **kwargs: t.Any + ) -> None: + ... + + def __init__( + self, name: str, *args: sa_sql_schema.SchemaItem, **kwargs: t.Any + ) -> None: + super().__init__(name, *args, **kwargs) # type: ignore[arg-type] diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/track_modifications.py b/venv/lib/python3.12/site-packages/flask_sqlalchemy/track_modifications.py new file mode 100644 index 0000000..7028b65 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask_sqlalchemy/track_modifications.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +import typing as t + +import sqlalchemy as sa +import sqlalchemy.event as sa_event +import sqlalchemy.orm as sa_orm +from flask import current_app +from flask import has_app_context +from flask.signals import Namespace # type: ignore[attr-defined] + +if t.TYPE_CHECKING: + from .session import Session + +_signals = Namespace() + +models_committed = _signals.signal("models-committed") +"""This Blinker signal is sent after the session is committed if there were changed +models in the session. + +The sender is the application that emitted the changes. The receiver is passed the +``changes`` argument with a list of tuples in the form ``(instance, operation)``. +The operations are ``"insert"``, ``"update"``, and ``"delete"``. +""" + +before_models_committed = _signals.signal("before-models-committed") +"""This signal works exactly like :data:`models_committed` but is emitted before the +commit takes place. +""" + + +def _listen(session: sa_orm.scoped_session[Session]) -> None: + sa_event.listen(session, "before_flush", _record_ops, named=True) + sa_event.listen(session, "before_commit", _record_ops, named=True) + sa_event.listen(session, "before_commit", _before_commit) + sa_event.listen(session, "after_commit", _after_commit) + sa_event.listen(session, "after_rollback", _after_rollback) + + +def _record_ops(session: Session, **kwargs: t.Any) -> None: + if not has_app_context(): + return + + if not current_app.config["SQLALCHEMY_TRACK_MODIFICATIONS"]: + return + + for targets, operation in ( + (session.new, "insert"), + (session.dirty, "update"), + (session.deleted, "delete"), + ): + for target in targets: + state = sa.inspect(target) + key = state.identity_key if state.has_identity else id(target) + session._model_changes[key] = (target, operation) + + +def _before_commit(session: Session) -> None: + if not has_app_context(): + return + + app = current_app._get_current_object() # type: ignore[attr-defined] + + if not app.config["SQLALCHEMY_TRACK_MODIFICATIONS"]: + return + + if session._model_changes: + changes = list(session._model_changes.values()) + before_models_committed.send(app, changes=changes) + + +def _after_commit(session: Session) -> None: + if not has_app_context(): + return + + app = current_app._get_current_object() # type: ignore[attr-defined] + + if not app.config["SQLALCHEMY_TRACK_MODIFICATIONS"]: + return + + if session._model_changes: + changes = list(session._model_changes.values()) + models_committed.send(app, changes=changes) + session._model_changes.clear() + + +def _after_rollback(session: Session) -> None: + session._model_changes.clear() diff --git a/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/INSTALLER b/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/INSTALLER new file mode 100644 index 0000000..a1b589e --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/METADATA b/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/METADATA new file mode 100644 index 0000000..78655dd --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/METADATA @@ -0,0 +1,98 @@ +Metadata-Version: 2.4 +Name: greenlet +Version: 3.3.1 +Summary: Lightweight in-process concurrent programming +Author-email: Alexey Borzenkov +Maintainer-email: Jason Madden +License-Expression: MIT AND Python-2.0 +Project-URL: Homepage, https://greenlet.readthedocs.io +Project-URL: Documentation, https://greenlet.readthedocs.io +Project-URL: Repository, https://github.com/python-greenlet/greenlet +Project-URL: Issues, https://github.com/python-greenlet/greenlet/issues +Project-URL: Changelog, https://greenlet.readthedocs.io/en/latest/changes.html +Keywords: greenlet,coroutine,concurrency,threads,cooperative +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: Natural Language :: English +Classifier: Programming Language :: C +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: 3.14 +Classifier: Operating System :: OS Independent +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Requires-Python: >=3.10 +Description-Content-Type: text/x-rst +License-File: LICENSE +License-File: LICENSE.PSF +Provides-Extra: docs +Requires-Dist: Sphinx; extra == "docs" +Requires-Dist: furo; extra == "docs" +Provides-Extra: test +Requires-Dist: objgraph; extra == "test" +Requires-Dist: psutil; extra == "test" +Requires-Dist: setuptools; extra == "test" +Dynamic: license-file + +.. This file is included into docs/history.rst + + +Greenlets are lightweight coroutines for in-process concurrent +programming. + +The "greenlet" package is a spin-off of `Stackless`_, a version of +CPython that supports micro-threads called "tasklets". Tasklets run +pseudo-concurrently (typically in a single or a few OS-level threads) +and are synchronized with data exchanges on "channels". + +A "greenlet", on the other hand, is a still more primitive notion of +micro-thread with no implicit scheduling; coroutines, in other words. +This is useful when you want to control exactly when your code runs. +You can build custom scheduled micro-threads on top of greenlet; +however, it seems that greenlets are useful on their own as a way to +make advanced control flow structures. For example, we can recreate +generators; the difference with Python's own generators is that our +generators can call nested functions and the nested functions can +yield values too. (Additionally, you don't need a "yield" keyword. See +the example in `test_generator.py +`_). + +Greenlets are provided as a C extension module for the regular unmodified +interpreter. + +.. _`Stackless`: http://www.stackless.com + + +Who is using Greenlet? +====================== + +There are several libraries that use Greenlet as a more flexible +alternative to Python's built in coroutine support: + + - `Concurrence`_ + - `Eventlet`_ + - `Gevent`_ + +.. _Concurrence: http://opensource.hyves.org/concurrence/ +.. _Eventlet: http://eventlet.net/ +.. _Gevent: http://www.gevent.org/ + +Getting Greenlet +================ + +The easiest way to get Greenlet is to install it with pip:: + + pip install greenlet + + +Source code archives and binary distributions are available on the +python package index at https://pypi.org/project/greenlet + +The source code repository is hosted on github: +https://github.com/python-greenlet/greenlet + +Documentation is available on readthedocs.org: +https://greenlet.readthedocs.io diff --git a/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/RECORD b/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/RECORD new file mode 100644 index 0000000..46d3e01 --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/RECORD @@ -0,0 +1,121 @@ +../../../include/site/python3.12/greenlet/greenlet.h,sha256=sz5pYRSQqedgOt2AMgxLZdTjO-qcr_JMvgiEJR9IAJ8,4755 +greenlet-3.3.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +greenlet-3.3.1.dist-info/METADATA,sha256=qJStBrPq7k5iOECnHy0bMzwrFVWLIwkwXOqNChxFiMw,3734 +greenlet-3.3.1.dist-info/RECORD,, +greenlet-3.3.1.dist-info/WHEEL,sha256=zinfjLaotCiumpaahaCCWHqF-zUftPolHJRlUFddj9Y,153 +greenlet-3.3.1.dist-info/licenses/LICENSE,sha256=dpgx1uXfrywggC-sz_H6-0wgJd2PYlPfpH_K1Z1NCXk,1434 +greenlet-3.3.1.dist-info/licenses/LICENSE.PSF,sha256=5f88I8EQ5JTNfXNsEP2W1GJFe6_soxCEDbZScpjH1Gs,2424 +greenlet-3.3.1.dist-info/top_level.txt,sha256=YSnRsCRoO61JGlP57o8iKL6rdLWDWuiyKD8ekpWUsDc,9 +greenlet/CObjects.cpp,sha256=OPej1bWBgc4sRrTRQ2aFFML9pzDYKlKhlJSjsI0X_eU,3508 +greenlet/PyGreenlet.cpp,sha256=rEKSIiAJ_IT2k0uZbUbtOpRNUmUcpKFMLLR99dPkFRU,25314 +greenlet/PyGreenlet.hpp,sha256=2ZQlOxYNoy7QwD7mppFoOXe_At56NIsJ0eNsE_hoSsw,1463 +greenlet/PyGreenletUnswitchable.cpp,sha256=PQE0fSZa_IOyUM44IESHkJoD2KtGW3dkhkmZSYY3WHs,4375 +greenlet/PyModule.cpp,sha256=uBC2FOruNKOlcD8FmSI0CkTJkrmRU71aKYwnvY14LvU,8649 +greenlet/TBrokenGreenlet.cpp,sha256=smN26uC7ahAbNYiS10rtWPjCeTG4jevM8siA2sjJiXg,1021 +greenlet/TExceptionState.cpp,sha256=U7Ctw9fBdNraS0d174MoQW7bN-ae209Ta0JuiKpcpVI,1359 +greenlet/TGreenlet.cpp,sha256=8KT_BfvrGW7MZqvWG1sa-QNBygm2aV9ilV2csqqjm6Q,25909 +greenlet/TGreenlet.hpp,sha256=5HkQ_yzOPIySl7AL_1aO-z1WGeXxms8-OLygyWTap_Q,28700 +greenlet/TGreenletGlobals.cpp,sha256=YyEmDjKf1g32bsL-unIUScFLnnA1fzLWf2gOMd-D0Zw,3264 +greenlet/TMainGreenlet.cpp,sha256=pBqCkp_ck3Sv7TJ66g9QV1j7jZt378WpoBozVZ9Wh4M,3420 +greenlet/TPythonState.cpp,sha256=8CSu7xoB6Uliw7l-vRmgKbhPWxT2ByVmm9kfWu7QP3o,17155 +greenlet/TStackState.cpp,sha256=V444I8Jj9DhQz-9leVW_9dtiSRjaE1NMlgDG02Xxq-Y,7381 +greenlet/TThreadState.hpp,sha256=_ntdN33J1IBNucVsCctLtkspkvp3ud0PanVnSxLfj8k,19636 +greenlet/TThreadStateCreator.hpp,sha256=s-PCahFbp8mpTIJTOEDZWMKWWLPA2rC5clZX6tvxA4s,2620 +greenlet/TThreadStateDestroy.cpp,sha256=MShqLtCuUGaQIinFWe2b7Fz-GPmVVKAfV7FbGhb4GEc,8395 +greenlet/TUserGreenlet.cpp,sha256=uemg0lwKXtYB0yzmvyYdIIAsKnNkifXM1OJ2OlrFP1A,23553 +greenlet/__init__.py,sha256=cGKqcKUyFUCstuIEf0siuqEJaJjjl6htIOctdqySU-w,1723 +greenlet/__pycache__/__init__.cpython-312.pyc,, +greenlet/_greenlet.cpython-312-x86_64-linux-gnu.so,sha256=crrCCJMjcq67_IDN3CCFMhyBEFlLM78ZcCCfxWLXETI,1448736 +greenlet/greenlet.cpp,sha256=menzWlidfN2DfBJYBAcB8BpUOGK1XgMLukeCsERSp_c,11093 +greenlet/greenlet.h,sha256=sz5pYRSQqedgOt2AMgxLZdTjO-qcr_JMvgiEJR9IAJ8,4755 +greenlet/greenlet_allocator.hpp,sha256=n28rwj76RVSn7B5QDA00nL8OBjfFeiOM1QGrVrHhfsk,1835 +greenlet/greenlet_compiler_compat.hpp,sha256=nRxpLN9iNbnLVyFDeVmOwyeeNm6scQrOed1l7JQYMCM,4346 +greenlet/greenlet_cpython_compat.hpp,sha256=OKLqWp3tmsmighFw9FA5xa4-17GO8P-tXTorErR77ys,4253 +greenlet/greenlet_exceptions.hpp,sha256=06Bx81DtVaJTa6RtiMcV141b-XHv4ppEgVItkblcLWY,4503 +greenlet/greenlet_internal.hpp,sha256=Ajc-_09W4xWzm9XfyXHAeQAFUgKGKsnJwYsTCoNy3ns,2709 +greenlet/greenlet_msvc_compat.hpp,sha256=Lg5xtV5zrRMIGcoieMKmXPhEzXu55aqfM1L8OygnmAY,3195 +greenlet/greenlet_refs.hpp,sha256=OnbA91yZf3QHH6-eJccvoNDAaN-pQBMMrclFU1Ot3J4,34436 +greenlet/greenlet_slp_switch.hpp,sha256=T1Y-w01yBBljePiHgUaWCs3XZSdtHSrtLvvkMXFDUN4,3298 +greenlet/greenlet_thread_support.hpp,sha256=XUJ6ljWjf9OYyuOILiz8e_yHvT3fbaUiHdhiPNQUV4s,867 +greenlet/platform/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +greenlet/platform/__pycache__/__init__.cpython-312.pyc,, +greenlet/platform/setup_switch_x64_masm.cmd,sha256=ZpClUJeU0ujEPSTWNSepP0W2f9XiYQKA8QKSoVou8EU,143 +greenlet/platform/switch_aarch64_gcc.h,sha256=GKC0yWNXnbK2X--X6aguRCMj2Tg7hDU1Zkl3RljDvC8,4307 +greenlet/platform/switch_alpha_unix.h,sha256=Z-SvF8JQV3oxWT8JRbL9RFu4gRFxPdJ7cviM8YayMmw,671 +greenlet/platform/switch_amd64_unix.h,sha256=EcSFCBlodEBhqhKjcJqY_5Dn_jn7pKpkJlOvp7gFXLI,2748 +greenlet/platform/switch_arm32_gcc.h,sha256=Z3KkHszdgq6uU4YN3BxvKMG2AdDnovwCCNrqGWZ1Lyo,2479 +greenlet/platform/switch_arm32_ios.h,sha256=mm5_R9aXB92hyxzFRwB71M60H6AlvHjrpTrc72Pz3l8,1892 +greenlet/platform/switch_arm64_masm.asm,sha256=4kpTtfy7rfcr8j1CpJLAK21EtZpGDAJXWRU68HEy5A8,1245 +greenlet/platform/switch_arm64_masm.obj,sha256=DmLnIB_icoEHAz1naue_pJPTZgR9ElM7-Nmztr-o9_U,746 +greenlet/platform/switch_arm64_msvc.h,sha256=RqK5MHLmXI3Q-FQ7tm32KWnbDNZKnkJdq8CR89cz640,398 +greenlet/platform/switch_csky_gcc.h,sha256=kDikyiPpewP71KoBZQO_MukDTXTXBiC7x-hF0_2DL0w,1331 +greenlet/platform/switch_loongarch64_linux.h,sha256=7M-Dhc4Q8tRbJCJhalDLwU6S9Mx8MjmN1RbTDgIvQTM,779 +greenlet/platform/switch_m68k_gcc.h,sha256=VSa6NpZhvyyvF-Q58CTIWSpEDo4FKygOyTz00whctlw,928 +greenlet/platform/switch_mips_unix.h,sha256=DsbNLh3Nde3WhnK5dwNaVu9r60iAWoCyEemxwBBOHBI,1462 +greenlet/platform/switch_ppc64_aix.h,sha256=_BL0iyRr3ZA5iPlr3uk9SJ5sNRWGYLrXcZ5z-CE9anE,3860 +greenlet/platform/switch_ppc64_linux.h,sha256=0rriT5XyxPb0GqsSSn_bP9iQsnjsPbBmu0yqo5goSyQ,3815 +greenlet/platform/switch_ppc_aix.h,sha256=pHA4slEjUFP3J3SYm1TAlNPhgb2G_PAtax5cO8BEe1A,2941 +greenlet/platform/switch_ppc_linux.h,sha256=YwrlKUzxlXuiKMQqr6MFAV1bPzWnmvk6X1AqJZEpOWU,2759 +greenlet/platform/switch_ppc_macosx.h,sha256=Z6KN_ud0n6nC3ltJrNz2qtvER6vnRAVRNH9mdIDpMxY,2624 +greenlet/platform/switch_ppc_unix.h,sha256=-ZG7MSSPEA5N4qO9PQChtyEJ-Fm6qInhyZm_ZBHTtMg,2652 +greenlet/platform/switch_riscv_unix.h,sha256=606V6ACDf79Fz_WGItnkgbjIJ0pGg_sHmPyDxQYKK58,949 +greenlet/platform/switch_s390_unix.h,sha256=RRlGu957ybmq95qNNY4Qw1mcaoT3eBnW5KbVwu48KX8,2763 +greenlet/platform/switch_sh_gcc.h,sha256=mcRJBTu-2UBf4kZtX601qofwuDuy-Y-hnxJtrcaB7do,901 +greenlet/platform/switch_sparc_sun_gcc.h,sha256=xZish9GsMHBienUbUMsX1-ZZ-as7hs36sVhYIE3ew8Y,2797 +greenlet/platform/switch_x32_unix.h,sha256=nM98PKtzTWc1lcM7TRMUZJzskVdR1C69U1UqZRWX0GE,1509 +greenlet/platform/switch_x64_masm.asm,sha256=nu6n2sWyXuXfpPx40d9YmLfHXUc1sHgeTvX1kUzuvEM,1841 +greenlet/platform/switch_x64_masm.obj,sha256=GNtTNxYdo7idFUYsQv-mrXWgyT5EJ93-9q90lN6svtQ,1078 +greenlet/platform/switch_x64_msvc.h,sha256=LIeasyKo_vHzspdMzMHbosRhrBfKI4BkQOh4qcTHyJw,1805 +greenlet/platform/switch_x86_msvc.h,sha256=TtGOwinbFfnn6clxMNkCz8i6OmgB6kVRrShoF5iT9to,12838 +greenlet/platform/switch_x86_unix.h,sha256=VplW9H0FF0cZHw1DhJdIUs5q6YLS4cwb2nYwjF83R1s,3059 +greenlet/slp_platformselect.h,sha256=hTb3GFdcPUYJTuu1MY93js7MZEax1_e5E-gflpi0RzI,3959 +greenlet/tests/__init__.py,sha256=EtTtQfpRDde0MhsdAM5Cm7LYIfS_HKUIFwquiH4Q7ac,9736 +greenlet/tests/__pycache__/__init__.cpython-312.pyc,, +greenlet/tests/__pycache__/fail_clearing_run_switches.cpython-312.pyc,, +greenlet/tests/__pycache__/fail_cpp_exception.cpython-312.pyc,, +greenlet/tests/__pycache__/fail_initialstub_already_started.cpython-312.pyc,, +greenlet/tests/__pycache__/fail_slp_switch.cpython-312.pyc,, +greenlet/tests/__pycache__/fail_switch_three_greenlets.cpython-312.pyc,, +greenlet/tests/__pycache__/fail_switch_three_greenlets2.cpython-312.pyc,, +greenlet/tests/__pycache__/fail_switch_two_greenlets.cpython-312.pyc,, +greenlet/tests/__pycache__/leakcheck.cpython-312.pyc,, +greenlet/tests/__pycache__/test_contextvars.cpython-312.pyc,, +greenlet/tests/__pycache__/test_cpp.cpython-312.pyc,, +greenlet/tests/__pycache__/test_extension_interface.cpython-312.pyc,, +greenlet/tests/__pycache__/test_gc.cpython-312.pyc,, +greenlet/tests/__pycache__/test_generator.cpython-312.pyc,, +greenlet/tests/__pycache__/test_generator_nested.cpython-312.pyc,, +greenlet/tests/__pycache__/test_greenlet.cpython-312.pyc,, +greenlet/tests/__pycache__/test_greenlet_trash.cpython-312.pyc,, +greenlet/tests/__pycache__/test_leaks.cpython-312.pyc,, +greenlet/tests/__pycache__/test_stack_saved.cpython-312.pyc,, +greenlet/tests/__pycache__/test_throw.cpython-312.pyc,, +greenlet/tests/__pycache__/test_tracing.cpython-312.pyc,, +greenlet/tests/__pycache__/test_version.cpython-312.pyc,, +greenlet/tests/__pycache__/test_weakref.cpython-312.pyc,, +greenlet/tests/_test_extension.c,sha256=DETtCa8cvPgQ2KrSQm9jlqZSlb_1x0o3axydmzgPohQ,6921 +greenlet/tests/_test_extension.cpython-312-x86_64-linux-gnu.so,sha256=cHhnCREBuPv6JwdbVNDHxaYxSOFjzJtzwlO8ihqP1Uo,17256 +greenlet/tests/_test_extension_cpp.cpp,sha256=VbkGmOw9b6pnj5OsqQa7OC5aPfIBynx-aVQXXF9uWcE,6686 +greenlet/tests/_test_extension_cpp.cpython-312-x86_64-linux-gnu.so,sha256=kpF8yFVUZn8HGv8t3b3iw9PrPAocM49Mm8ZlFPr-Vrw,58384 +greenlet/tests/fail_clearing_run_switches.py,sha256=o433oA_nUCtOPaMEGc8VEhZIKa71imVHXFw7TsXaP8M,1263 +greenlet/tests/fail_cpp_exception.py,sha256=o_ZbipWikok8Bjc-vjiQvcb5FHh2nVW-McGKMLcMzh0,985 +greenlet/tests/fail_initialstub_already_started.py,sha256=txENn5IyzGx2p-XR1XB7qXmC8JX_4mKDEA8kYBXUQKc,1961 +greenlet/tests/fail_slp_switch.py,sha256=rJBZcZfTWR3e2ERQtPAud6YKShiDsP84PmwOJbp4ey0,524 +greenlet/tests/fail_switch_three_greenlets.py,sha256=zSitV7rkNnaoHYVzAGGLnxz-yPtohXJJzaE8ehFDQ0M,956 +greenlet/tests/fail_switch_three_greenlets2.py,sha256=FPJensn2EJxoropl03JSTVP3kgP33k04h6aDWWozrOk,1285 +greenlet/tests/fail_switch_two_greenlets.py,sha256=1CaI8s3504VbbF1vj1uBYuy-zxBHVzHPIAd1LIc8ONg,817 +greenlet/tests/leakcheck.py,sha256=f28zZf0MlMgcybbm_5YyIOR6HcDqP2f2k6LX-FxFGqA,12652 +greenlet/tests/test_contextvars.py,sha256=xutO-qZgKTwKsA9lAqTjIcTBEiQV4RpNKM-vO2_YCVU,10541 +greenlet/tests/test_cpp.py,sha256=hpxhFAdKJTpAVZP8CBGs1ZcrKdscI9BaDZk4btkI5d4,2736 +greenlet/tests/test_extension_interface.py,sha256=eJ3cwLacdK2WbsrC-4DgeyHdwLRcG4zx7rrkRtqSzC4,3829 +greenlet/tests/test_gc.py,sha256=xrIreQr85eO8WlpHs6IWCa5C4ecIA6t2_IrkS76Fdjg,2922 +greenlet/tests/test_generator.py,sha256=tONXiTf98VGm347o1b-810daPiwdla5cbpFg6QI1R1g,1240 +greenlet/tests/test_generator_nested.py,sha256=7v4HOYrf1XZP39dk5IUMubdZ8yc3ynwZcqj9GUJyMSA,3718 +greenlet/tests/test_greenlet.py,sha256=oRrUAGEFb-GF8GNVEFsXYvzrayleF5qQDdA2QWeYEis,48439 +greenlet/tests/test_greenlet_trash.py,sha256=n2dBlQfOoEO1ODatFi8QdhboH3fB86YtqzcYMYOXxbw,7947 +greenlet/tests/test_leaks.py,sha256=OFSE870Zyql85HukfC_XYa2c4gDQBU889RV1AlLum74,18076 +greenlet/tests/test_stack_saved.py,sha256=eyzqNY2VCGuGlxhT_In6TvZ6Okb0AXFZVyBEnK1jDwA,446 +greenlet/tests/test_throw.py,sha256=u2TQ_WvvCd6N6JdXWIxVEcXkKu5fepDlz9dktYdmtng,3712 +greenlet/tests/test_tracing.py,sha256=NFD6Vcww8grBnFQFhCNdswwGetjLeLQ7vL2Qqw3LWBM,8591 +greenlet/tests/test_version.py,sha256=O9DpAITsOFgiRcjd4odQ7ejmwx_N9Q1zQENVcbtFHIc,1339 +greenlet/tests/test_weakref.py,sha256=F8M23btEF87bIbpptLNBORosbQqNZGiYeKMqYjWrsak,883 diff --git a/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/WHEEL b/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/WHEEL new file mode 100644 index 0000000..a737a79 --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/WHEEL @@ -0,0 +1,6 @@ +Wheel-Version: 1.0 +Generator: setuptools (80.10.1) +Root-Is-Purelib: false +Tag: cp312-cp312-manylinux_2_24_x86_64 +Tag: cp312-cp312-manylinux_2_28_x86_64 + diff --git a/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/licenses/LICENSE b/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/licenses/LICENSE new file mode 100644 index 0000000..b73a4a1 --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/licenses/LICENSE @@ -0,0 +1,30 @@ +The following files are derived from Stackless Python and are subject to the +same license as Stackless Python: + + src/greenlet/slp_platformselect.h + files in src/greenlet/platform/ directory + +See LICENSE.PSF and http://www.stackless.com/ for details. + +Unless otherwise noted, the files in greenlet have been released under the +following MIT license: + +Copyright (c) Armin Rigo, Christian Tismer and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/licenses/LICENSE.PSF b/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/licenses/LICENSE.PSF new file mode 100644 index 0000000..d3b509a --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/licenses/LICENSE.PSF @@ -0,0 +1,47 @@ +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +-------------------------------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Python") in source or binary form and +its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF hereby +grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, +analyze, test, perform and/or display publicly, prepare derivative works, +distribute, and otherwise use Python alone or in any derivative version, +provided, however, that PSF's License Agreement and PSF's notice of copyright, +i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +2011 Python Software Foundation; All Rights Reserved" are retained in Python +alone or in any derivative version prepared by Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python. + +4. PSF is making Python available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Python, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. diff --git a/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/top_level.txt b/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/top_level.txt new file mode 100644 index 0000000..46725be --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet-3.3.1.dist-info/top_level.txt @@ -0,0 +1 @@ +greenlet diff --git a/venv/lib/python3.12/site-packages/greenlet/CObjects.cpp b/venv/lib/python3.12/site-packages/greenlet/CObjects.cpp new file mode 100644 index 0000000..c135995 --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/CObjects.cpp @@ -0,0 +1,157 @@ +#ifndef COBJECTS_CPP +#define COBJECTS_CPP +/***************************************************************************** + * C interface + * + * These are exported using the CObject API + */ +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wunused-function" +#endif + +#include "greenlet_exceptions.hpp" + +#include "greenlet_internal.hpp" +#include "greenlet_refs.hpp" + + +#include "TThreadStateDestroy.cpp" + +#include "PyGreenlet.hpp" + +using greenlet::PyErrOccurred; +using greenlet::Require; + + + +extern "C" { +static PyGreenlet* +PyGreenlet_GetCurrent(void) +{ + return GET_THREAD_STATE().state().get_current().relinquish_ownership(); +} + +static int +PyGreenlet_SetParent(PyGreenlet* g, PyGreenlet* nparent) +{ + return green_setparent((PyGreenlet*)g, (PyObject*)nparent, NULL); +} + +static PyGreenlet* +PyGreenlet_New(PyObject* run, PyGreenlet* parent) +{ + using greenlet::refs::NewDictReference; + // In the past, we didn't use green_new and green_init, but that + // was a maintenance issue because we duplicated code. This way is + // much safer, but slightly slower. If that's a problem, we could + // refactor green_init to separate argument parsing from initialization. + OwnedGreenlet g = OwnedGreenlet::consuming(green_new(&PyGreenlet_Type, nullptr, nullptr)); + if (!g) { + return NULL; + } + + try { + NewDictReference kwargs; + if (run) { + kwargs.SetItem(mod_globs->str_run, run); + } + if (parent) { + kwargs.SetItem("parent", (PyObject*)parent); + } + + Require(green_init(g.borrow(), mod_globs->empty_tuple, kwargs.borrow())); + } + catch (const PyErrOccurred&) { + return nullptr; + } + + return g.relinquish_ownership(); +} + +static PyObject* +PyGreenlet_Switch(PyGreenlet* self, PyObject* args, PyObject* kwargs) +{ + if (!PyGreenlet_Check(self)) { + PyErr_BadArgument(); + return NULL; + } + + if (args == NULL) { + args = mod_globs->empty_tuple; + } + + if (kwargs == NULL || !PyDict_Check(kwargs)) { + kwargs = NULL; + } + + return green_switch(self, args, kwargs); +} + +static PyObject* +PyGreenlet_Throw(PyGreenlet* self, PyObject* typ, PyObject* val, PyObject* tb) +{ + if (!PyGreenlet_Check(self)) { + PyErr_BadArgument(); + return nullptr; + } + try { + PyErrPieces err_pieces(typ, val, tb); + return internal_green_throw(self, err_pieces).relinquish_ownership(); + } + catch (const PyErrOccurred&) { + return nullptr; + } +} + + + +static int +Extern_PyGreenlet_MAIN(PyGreenlet* self) +{ + if (!PyGreenlet_Check(self)) { + PyErr_BadArgument(); + return -1; + } + return self->pimpl->main(); +} + +static int +Extern_PyGreenlet_ACTIVE(PyGreenlet* self) +{ + if (!PyGreenlet_Check(self)) { + PyErr_BadArgument(); + return -1; + } + return self->pimpl->active(); +} + +static int +Extern_PyGreenlet_STARTED(PyGreenlet* self) +{ + if (!PyGreenlet_Check(self)) { + PyErr_BadArgument(); + return -1; + } + return self->pimpl->started(); +} + +static PyGreenlet* +Extern_PyGreenlet_GET_PARENT(PyGreenlet* self) +{ + if (!PyGreenlet_Check(self)) { + PyErr_BadArgument(); + return NULL; + } + // This can return NULL even if there is no exception + return self->pimpl->parent().acquire(); +} +} // extern C. + +/** End C API ****************************************************************/ +#ifdef __clang__ +# pragma clang diagnostic pop +#endif + + +#endif diff --git a/venv/lib/python3.12/site-packages/greenlet/PyGreenlet.cpp b/venv/lib/python3.12/site-packages/greenlet/PyGreenlet.cpp new file mode 100644 index 0000000..fd62241 --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/PyGreenlet.cpp @@ -0,0 +1,774 @@ +/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */ +#ifndef PYGREENLET_CPP +#define PYGREENLET_CPP +/***************** +The Python slot functions for TGreenlet. + */ + + +#define PY_SSIZE_T_CLEAN +#include +#include "structmember.h" // PyMemberDef + +#include "greenlet_internal.hpp" +#include "TThreadStateDestroy.cpp" +#include "TGreenlet.hpp" +// #include "TUserGreenlet.cpp" +// #include "TMainGreenlet.cpp" +// #include "TBrokenGreenlet.cpp" + + +#include "greenlet_refs.hpp" +#include "greenlet_slp_switch.hpp" + +#include "greenlet_thread_support.hpp" +#include "TGreenlet.hpp" + +#include "TGreenletGlobals.cpp" +#include "TThreadStateDestroy.cpp" +#include "PyGreenlet.hpp" +// #include "TGreenlet.cpp" + +// #include "TExceptionState.cpp" +// #include "TPythonState.cpp" +// #include "TStackState.cpp" + +using greenlet::LockGuard; +using greenlet::LockInitError; +using greenlet::PyErrOccurred; +using greenlet::Require; + +using greenlet::g_handle_exit; +using greenlet::single_result; + +using greenlet::Greenlet; +using greenlet::UserGreenlet; +using greenlet::MainGreenlet; +using greenlet::BrokenGreenlet; +using greenlet::ThreadState; +using greenlet::PythonState; + + + +static PyGreenlet* +green_new(PyTypeObject* type, PyObject* UNUSED(args), PyObject* UNUSED(kwds)) +{ + PyGreenlet* o = + (PyGreenlet*)PyBaseObject_Type.tp_new(type, mod_globs->empty_tuple, mod_globs->empty_dict); + if (o) { + // Recall: borrowing or getting the current greenlet + // causes the "deleteme list" to get cleared. So constructing a greenlet + // can do things like cause other greenlets to get finalized. + UserGreenlet* c = new UserGreenlet(o, GET_THREAD_STATE().state().borrow_current()); + assert(Py_REFCNT(o) == 1); + // Also: This looks like a memory leak, but isn't. Constructing the + // C++ object assigns it to the pimpl pointer of the Python object (o); + // we'll need that later. + assert(c == o->pimpl); + } + return o; +} + + +// green_init is used in the tp_init slot. So it's important that +// it can be called directly from CPython. Thus, we don't use +// BorrowedGreenlet and BorrowedObject --- although in theory +// these should be binary layout compatible, that may not be +// guaranteed to be the case (32-bit linux ppc possibly). +static int +green_init(PyGreenlet* self, PyObject* args, PyObject* kwargs) +{ + PyArgParseParam run; + PyArgParseParam nparent; + static const char* kwlist[] = { + "run", + "parent", + NULL + }; + + // recall: The O specifier does NOT increase the reference count. + if (!PyArg_ParseTupleAndKeywords( + args, kwargs, "|OO:green", (char**)kwlist, &run, &nparent)) { + return -1; + } + + if (run) { + if (green_setrun(self, run, NULL)) { + return -1; + } + } + if (nparent && !nparent.is_None()) { + return green_setparent(self, nparent, NULL); + } + return 0; +} + + + +static int +green_traverse(PyGreenlet* self, visitproc visit, void* arg) +{ + // We must only visit referenced objects, i.e. only objects + // Py_INCREF'ed by this greenlet (directly or indirectly): + // + // - stack_prev is not visited: holds previous stack pointer, but it's not + // referenced + // - frames are not visited as we don't strongly reference them; + // alive greenlets are not garbage collected + // anyway. This can be a problem, however, if this greenlet is + // never allowed to finish, and is referenced from the frame: we + // have an uncollectible cycle in that case. Note that the + // frame object itself is also frequently not even tracked by the GC + // starting with Python 3.7 (frames are allocated by the + // interpreter untracked, and only become tracked when their + // evaluation is finished if they have a refcount > 1). All of + // this is to say that we should probably strongly reference + // the frame object. Doing so, while always allowing GC on a + // greenlet, solves several leaks for us. + + Py_VISIT(self->dict); + if (!self->pimpl) { + // Hmm. I have seen this at interpreter shutdown time, + // I think. That's very odd because this doesn't go away until + // we're ``green_dealloc()``, at which point we shouldn't be + // traversed anymore. + return 0; + } + + return self->pimpl->tp_traverse(visit, arg); +} + +static int +green_is_gc(PyObject* _self) +{ + BorrowedGreenlet self(_self); + int result = 0; + /* Main greenlet can be garbage collected since it can only + become unreachable if the underlying thread exited. + Active greenlets --- including those that are suspended --- + cannot be garbage collected, however. + */ + if (self->main() || !self->active()) { + result = 1; + } + // The main greenlet pointer will eventually go away after the thread dies. + if (self->was_running_in_dead_thread()) { + // Our thread is dead! We can never run again. Might as well + // GC us. Note that if a tuple containing only us and other + // immutable objects had been scanned before this, when we + // would have returned 0, the tuple will take itself out of GC + // tracking and never be investigated again. So that could + // result in both us and the tuple leaking due to an + // unreachable/uncollectible reference. The same goes for + // dictionaries. + // + // It's not a great idea to be changing our GC state on the + // fly. + result = 1; + } + return result; +} + + +static int +green_clear(PyGreenlet* self) +{ + /* Greenlet is only cleared if it is about to be collected. + Since active greenlets are not garbage collectable, we can + be sure that, even if they are deallocated during clear, + nothing they reference is in unreachable or finalizers, + so even if it switches we are relatively safe. */ + // XXX: Are we responsible for clearing weakrefs here? + Py_CLEAR(self->dict); + return self->pimpl->tp_clear(); +} + +/** + * Returns 0 on failure (the object was resurrected) or 1 on success. + **/ +static int +_green_dealloc_kill_started_non_main_greenlet(BorrowedGreenlet self) +{ + /* Hacks hacks hacks copied from instance_dealloc() */ + /* Temporarily resurrect the greenlet. */ + assert(self.REFCNT() == 0); + Py_SET_REFCNT(self.borrow(), 1); + /* Save the current exception, if any. */ + PyErrPieces saved_err; + try { + // BY THE TIME WE GET HERE, the state may actually be going + // away + // if we're shutting down the interpreter and freeing thread + // entries, + // this could result in freeing greenlets that were leaked. So + // we can't try to read the state. + self->deallocing_greenlet_in_thread( + self->thread_state() + ? static_cast(GET_THREAD_STATE()) + : nullptr); + } + catch (const PyErrOccurred&) { + PyErr_WriteUnraisable(self.borrow_o()); + /* XXX what else should we do? */ + } + /* Check for no resurrection must be done while we keep + * our internal reference, otherwise PyFile_WriteObject + * causes recursion if using Py_INCREF/Py_DECREF + */ + if (self.REFCNT() == 1 && self->active()) { + /* Not resurrected, but still not dead! + XXX what else should we do? we complain. */ + PyObject* f = PySys_GetObject("stderr"); + Py_INCREF(self.borrow_o()); /* leak! */ + if (f != NULL) { + PyFile_WriteString("GreenletExit did not kill ", f); + PyFile_WriteObject(self.borrow_o(), f, 0); + PyFile_WriteString("\n", f); + } + } + /* Restore the saved exception. */ + saved_err.PyErrRestore(); + /* Undo the temporary resurrection; can't use DECREF here, + * it would cause a recursive call. + */ + assert(self.REFCNT() > 0); + + Py_ssize_t refcnt = self.REFCNT() - 1; + Py_SET_REFCNT(self.borrow_o(), refcnt); + if (refcnt != 0) { + /* Resurrected! */ + _Py_NewReference(self.borrow_o()); + Py_SET_REFCNT(self.borrow_o(), refcnt); + /* Better to use tp_finalizer slot (PEP 442) + * and call ``PyObject_CallFinalizerFromDealloc``, + * but that's only supported in Python 3.4+; see + * Modules/_io/iobase.c for an example. + * TODO: We no longer run on anything that old, switch to finalizers. + * + * The following approach is copied from iobase.c in CPython 2.7. + * (along with much of this function in general). Here's their + * comment: + * + * When called from a heap type's dealloc, the type will be + * decref'ed on return (see e.g. subtype_dealloc in typeobject.c). + * + * On free-threaded builds of CPython, the type is meant to be immortal + * so we probably shouldn't mess with this? See + * test_issue_245_reference_counting_subclass_no_threads + */ + if (PyType_HasFeature(self.TYPE(), Py_TPFLAGS_HEAPTYPE)) { + Py_INCREF(self.TYPE()); + } + + PyObject_GC_Track((PyObject*)self); + + GREENLET_Py_DEC_REFTOTAL; +#ifdef COUNT_ALLOCS + --Py_TYPE(self)->tp_frees; + --Py_TYPE(self)->tp_allocs; +#endif /* COUNT_ALLOCS */ + return 0; + } + return 1; +} + + +static void +green_dealloc(PyGreenlet* self) +{ + PyObject_GC_UnTrack(self); + BorrowedGreenlet me(self); + if (me->active() + && me->started() + && !me->main()) { + if (!_green_dealloc_kill_started_non_main_greenlet(me)) { + return; + } + } + + if (self->weakreflist != NULL) { + PyObject_ClearWeakRefs((PyObject*)self); + } + Py_CLEAR(self->dict); + + if (self->pimpl) { + // In case deleting this, which frees some memory, + // somehow winds up calling back into us. That's usually a + //bug in our code. + Greenlet* p = self->pimpl; + self->pimpl = nullptr; + delete p; + } + // and finally we're done. self is now invalid. + Py_TYPE(self)->tp_free((PyObject*)self); +} + + + +static OwnedObject +internal_green_throw(BorrowedGreenlet self, PyErrPieces& err_pieces) +{ + PyObject* result = nullptr; + err_pieces.PyErrRestore(); + assert(PyErr_Occurred()); + if (self->started() && !self->active()) { + /* dead greenlet: turn GreenletExit into a regular return */ + result = g_handle_exit(OwnedObject()).relinquish_ownership(); + } + self->args() <<= result; + + return single_result(self->g_switch()); +} + + + +PyDoc_STRVAR( + green_switch_doc, + "switch(*args, **kwargs)\n" + "\n" + "Switch execution to this greenlet.\n" + "\n" + "If this greenlet has never been run, then this greenlet\n" + "will be switched to using the body of ``self.run(*args, **kwargs)``.\n" + "\n" + "If the greenlet is active (has been run, but was switch()'ed\n" + "out before leaving its run function), then this greenlet will\n" + "be resumed and the return value to its switch call will be\n" + "None if no arguments are given, the given argument if one\n" + "argument is given, or the args tuple and keyword args dict if\n" + "multiple arguments are given.\n" + "\n" + "If the greenlet is dead, or is the current greenlet then this\n" + "function will simply return the arguments using the same rules as\n" + "above.\n"); + +static PyObject* +green_switch(PyGreenlet* self, PyObject* args, PyObject* kwargs) +{ + using greenlet::SwitchingArgs; + SwitchingArgs switch_args(OwnedObject::owning(args), OwnedObject::owning(kwargs)); + self->pimpl->may_switch_away(); + self->pimpl->args() <<= switch_args; + + // If we're switching out of a greenlet, and that switch is the + // last thing the greenlet does, the greenlet ought to be able to + // go ahead and die at that point. Currently, someone else must + // manually switch back to the greenlet so that we "fall off the + // end" and can perform cleanup. You'd think we'd be able to + // figure out that this is happening using the frame's ``f_lasti`` + // member, which is supposed to be an index into + // ``frame->f_code->co_code``, the bytecode string. However, in + // recent interpreters, ``f_lasti`` tends not to be updated thanks + // to things like the PREDICT() macros in ceval.c. So it doesn't + // really work to do that in many cases. For example, the Python + // code: + // def run(): + // greenlet.getcurrent().parent.switch() + // produces bytecode of len 16, with the actual call to switch() + // being at index 10 (in Python 3.10). However, the reported + // ``f_lasti`` we actually see is...5! (Which happens to be the + // second byte of the CALL_METHOD op for ``getcurrent()``). + + try { + //OwnedObject result = single_result(self->pimpl->g_switch()); + OwnedObject result(single_result(self->pimpl->g_switch())); +#ifndef NDEBUG + // Note that the current greenlet isn't necessarily self. If self + // finished, we went to one of its parents. + assert(!self->pimpl->args()); + + const BorrowedGreenlet& current = GET_THREAD_STATE().state().borrow_current(); + // It's possible it's never been switched to. + assert(!current->args()); +#endif + PyObject* p = result.relinquish_ownership(); + + if (!p && !PyErr_Occurred()) { + // This shouldn't be happening anymore, so the asserts + // are there for debug builds. Non-debug builds + // crash "gracefully" in this case, although there is an + // argument to be made for killing the process in all + // cases --- for this to be the case, our switches + // probably nested in an incorrect way, so the state is + // suspicious. Nothing should be corrupt though, just + // confused at the Python level. Letting this propagate is + // probably good enough. + assert(p || PyErr_Occurred()); + throw PyErrOccurred( + mod_globs->PyExc_GreenletError, + "Greenlet.switch() returned NULL without an exception set." + ); + } + return p; + } + catch(const PyErrOccurred&) { + return nullptr; + } +} + +PyDoc_STRVAR( + green_throw_doc, + "Switches execution to this greenlet, but immediately raises the\n" + "given exception in this greenlet. If no argument is provided, the " + "exception\n" + "defaults to `greenlet.GreenletExit`. The normal exception\n" + "propagation rules apply, as described for `switch`. Note that calling " + "this\n" + "method is almost equivalent to the following::\n" + "\n" + " def raiser():\n" + " raise typ, val, tb\n" + " g_raiser = greenlet(raiser, parent=g)\n" + " g_raiser.switch()\n" + "\n" + "except that this trick does not work for the\n" + "`greenlet.GreenletExit` exception, which would not propagate\n" + "from ``g_raiser`` to ``g``.\n"); + +static PyObject* +green_throw(PyGreenlet* self, PyObject* args) +{ + PyArgParseParam typ(mod_globs->PyExc_GreenletExit); + PyArgParseParam val; + PyArgParseParam tb; + + if (!PyArg_ParseTuple(args, "|OOO:throw", &typ, &val, &tb)) { + return nullptr; + } + + assert(typ.borrow() || val.borrow()); + + self->pimpl->may_switch_away(); + try { + // Both normalizing the error and the actual throw_greenlet + // could throw PyErrOccurred. + PyErrPieces err_pieces(typ.borrow(), val.borrow(), tb.borrow()); + + return internal_green_throw(self, err_pieces).relinquish_ownership(); + } + catch (const PyErrOccurred&) { + return nullptr; + } +} + +static int +green_bool(PyGreenlet* self) +{ + return self->pimpl->active(); +} + +/** + * CAUTION: Allocates memory, may run GC and arbitrary Python code. + */ +static PyObject* +green_getdict(PyGreenlet* self, void* UNUSED(context)) +{ + if (self->dict == NULL) { + self->dict = PyDict_New(); + if (self->dict == NULL) { + return NULL; + } + } + Py_INCREF(self->dict); + return self->dict; +} + +static int +green_setdict(PyGreenlet* self, PyObject* val, void* UNUSED(context)) +{ + PyObject* tmp; + + if (val == NULL) { + PyErr_SetString(PyExc_TypeError, "__dict__ may not be deleted"); + return -1; + } + if (!PyDict_Check(val)) { + PyErr_SetString(PyExc_TypeError, "__dict__ must be a dictionary"); + return -1; + } + tmp = self->dict; + Py_INCREF(val); + self->dict = val; + Py_XDECREF(tmp); + return 0; +} + +static bool +_green_not_dead(BorrowedGreenlet self) +{ + // XXX: Where else should we do this? + // Probably on entry to most Python-facing functions? + if (self->was_running_in_dead_thread()) { + self->deactivate_and_free(); + return false; + } + return self->active() || !self->started(); +} + + +static PyObject* +green_getdead(PyGreenlet* self, void* UNUSED(context)) +{ + if (_green_not_dead(self)) { + Py_RETURN_FALSE; + } + else { + Py_RETURN_TRUE; + } +} + +static PyObject* +green_get_stack_saved(PyGreenlet* self, void* UNUSED(context)) +{ + return PyLong_FromSsize_t(self->pimpl->stack_saved()); +} + + +static PyObject* +green_getrun(PyGreenlet* self, void* UNUSED(context)) +{ + try { + OwnedObject result(BorrowedGreenlet(self)->run()); + return result.relinquish_ownership(); + } + catch(const PyErrOccurred&) { + return nullptr; + } +} + + +static int +green_setrun(PyGreenlet* self, PyObject* nrun, void* UNUSED(context)) +{ + try { + BorrowedGreenlet(self)->run(nrun); + return 0; + } + catch(const PyErrOccurred&) { + return -1; + } +} + +static PyObject* +green_getparent(PyGreenlet* self, void* UNUSED(context)) +{ + return BorrowedGreenlet(self)->parent().acquire_or_None(); +} + + +static int +green_setparent(PyGreenlet* self, PyObject* nparent, void* UNUSED(context)) +{ + try { + BorrowedGreenlet(self)->parent(nparent); + } + catch(const PyErrOccurred&) { + return -1; + } + return 0; +} + + +static PyObject* +green_getcontext(const PyGreenlet* self, void* UNUSED(context)) +{ + const Greenlet *const g = self->pimpl; + try { + OwnedObject result(g->context()); + return result.relinquish_ownership(); + } + catch(const PyErrOccurred&) { + return nullptr; + } +} + +static int +green_setcontext(PyGreenlet* self, PyObject* nctx, void* UNUSED(context)) +{ + try { + BorrowedGreenlet(self)->context(nctx); + return 0; + } + catch(const PyErrOccurred&) { + return -1; + } +} + + +static PyObject* +green_getframe(PyGreenlet* self, void* UNUSED(context)) +{ + const PythonState::OwnedFrame& top_frame = BorrowedGreenlet(self)->top_frame(); + return top_frame.acquire_or_None(); +} + + +static PyObject* +green_getstate(PyGreenlet* self) +{ + PyErr_Format(PyExc_TypeError, + "cannot serialize '%s' object", + Py_TYPE(self)->tp_name); + return nullptr; +} + +static PyObject* +green_repr(PyGreenlet* _self) +{ + BorrowedGreenlet self(_self); + /* + Return a string like + + + The handling of greenlets across threads is not super good. + We mostly use the internal definitions of these terms, but they + generally should make sense to users as well. + */ + PyObject* result; + int never_started = !self->started() && !self->active(); + + const char* const tp_name = Py_TYPE(self)->tp_name; + + if (_green_not_dead(self)) { + /* XXX: The otid= is almost useless because you can't correlate it to + any thread identifier exposed to Python. We could use + PyThreadState_GET()->thread_id, but we'd need to save that in the + greenlet, or save the whole PyThreadState object itself. + + As it stands, its only useful for identifying greenlets from the same thread. + */ + const char* state_in_thread; + if (self->was_running_in_dead_thread()) { + // The thread it was running in is dead! + // This can happen, especially at interpreter shut down. + // It complicates debugging output because it may be + // impossible to access the current thread state at that + // time. Thus, don't access the current thread state. + state_in_thread = " (thread exited)"; + } + else { + state_in_thread = GET_THREAD_STATE().state().is_current(self) + ? " current" + : (self->started() ? " suspended" : ""); + } + result = PyUnicode_FromFormat( + "<%s object at %p (otid=%p)%s%s%s%s>", + tp_name, + self.borrow_o(), + self->thread_state(), + state_in_thread, + self->active() ? " active" : "", + never_started ? " pending" : " started", + self->main() ? " main" : "" + ); + } + else { + result = PyUnicode_FromFormat( + "<%s object at %p (otid=%p) %sdead>", + tp_name, + self.borrow_o(), + self->thread_state(), + self->was_running_in_dead_thread() + ? "(thread exited) " + : "" + ); + } + + return result; +} + + +static PyMethodDef green_methods[] = { + { + .ml_name="switch", + .ml_meth=reinterpret_cast(green_switch), + .ml_flags=METH_VARARGS | METH_KEYWORDS, + .ml_doc=green_switch_doc + }, + {.ml_name="throw", .ml_meth=(PyCFunction)green_throw, .ml_flags=METH_VARARGS, .ml_doc=green_throw_doc}, + {.ml_name="__getstate__", .ml_meth=(PyCFunction)green_getstate, .ml_flags=METH_NOARGS, .ml_doc=NULL}, + {.ml_name=NULL, .ml_meth=NULL} /* sentinel */ +}; + +static PyGetSetDef green_getsets[] = { + /* name, getter, setter, doc, context pointer */ + {.name="__dict__", .get=(getter)green_getdict, .set=(setter)green_setdict}, + {.name="run", .get=(getter)green_getrun, .set=(setter)green_setrun}, + {.name="parent", .get=(getter)green_getparent, .set=(setter)green_setparent}, + {.name="gr_frame", .get=(getter)green_getframe }, + { + .name="gr_context", + .get=(getter)green_getcontext, + .set=(setter)green_setcontext + }, + {.name="dead", .get=(getter)green_getdead}, + {.name="_stack_saved", .get=(getter)green_get_stack_saved}, + {.name=NULL} +}; + +static PyMemberDef green_members[] = { + {.name=NULL} +}; + +static PyNumberMethods green_as_number = { + .nb_bool=(inquiry)green_bool, +}; + + +PyTypeObject PyGreenlet_Type = { + .ob_base=PyVarObject_HEAD_INIT(NULL, 0) + .tp_name="greenlet.greenlet", /* tp_name */ + .tp_basicsize=sizeof(PyGreenlet), /* tp_basicsize */ + /* methods */ + .tp_dealloc=(destructor)green_dealloc, /* tp_dealloc */ + .tp_repr=(reprfunc)green_repr, /* tp_repr */ + .tp_as_number=&green_as_number, /* tp_as _number*/ + .tp_flags=G_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + .tp_doc="greenlet(run=None, parent=None) -> greenlet\n\n" + "Creates a new greenlet object (without running it).\n\n" + " - *run* -- The callable to invoke.\n" + " - *parent* -- The parent greenlet. The default is the current " + "greenlet.", /* tp_doc */ + .tp_traverse=(traverseproc)green_traverse, /* tp_traverse */ + .tp_clear=(inquiry)green_clear, /* tp_clear */ + .tp_weaklistoffset=offsetof(PyGreenlet, weakreflist), /* tp_weaklistoffset */ + + .tp_methods=green_methods, /* tp_methods */ + .tp_members=green_members, /* tp_members */ + .tp_getset=green_getsets, /* tp_getset */ + .tp_dictoffset=offsetof(PyGreenlet, dict), /* tp_dictoffset */ + .tp_init=(initproc)green_init, /* tp_init */ + .tp_alloc=PyType_GenericAlloc, /* tp_alloc */ + .tp_new=(newfunc)green_new, /* tp_new */ + .tp_free=PyObject_GC_Del, /* tp_free */ +#ifndef Py_GIL_DISABLED +/* + We may have been handling this wrong all along. + + It shows as a problem with the GIL disabled. In builds of 3.14 with + assertions enabled, we break the garbage collector if we *ever* + return false from this function. The docs say this is to distinguish + some objects that are collectable vs some that are not, specifically + giving the example of PyTypeObject as the only place this is done, + where it distinguishes between static types like this one (allocated + by the C runtime at load time) and dynamic heap types (created at + runtime as objects). With the GIL disabled, all allocations that are + potentially collectable go in the mimalloc heap, and the collector + asserts that tp_is_gc() is true for them as it walks through the + heap object by object. Since we set the Py_TPFLAGS_HAS_GC bit, we + are always allocated in that mimalloc heap, so we must always be + collectable. + + XXX: TODO: Could this be responsible for some apparent leaks, even + on GIL builds, at least in 3.14? See if we can catch an assertion + failure in the GC on regular 3.14 as well. + */ + .tp_is_gc=(inquiry)green_is_gc, /* tp_is_gc */ +#endif +}; + +#endif + +// Local Variables: +// flycheck-clang-include-path: ("/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8") +// End: diff --git a/venv/lib/python3.12/site-packages/greenlet/PyGreenlet.hpp b/venv/lib/python3.12/site-packages/greenlet/PyGreenlet.hpp new file mode 100644 index 0000000..df6cd80 --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/PyGreenlet.hpp @@ -0,0 +1,35 @@ +#ifndef PYGREENLET_HPP +#define PYGREENLET_HPP + + +#include "greenlet.h" +#include "greenlet_compiler_compat.hpp" +#include "greenlet_refs.hpp" + + +using greenlet::refs::OwnedGreenlet; +using greenlet::refs::BorrowedGreenlet; +using greenlet::refs::BorrowedObject;; +using greenlet::refs::OwnedObject; +using greenlet::refs::PyErrPieces; + + +// XXX: These doesn't really belong here, it's not a Python slot. +static OwnedObject internal_green_throw(BorrowedGreenlet self, PyErrPieces& err_pieces); + +static PyGreenlet* green_new(PyTypeObject* type, PyObject* UNUSED(args), PyObject* UNUSED(kwds)); +static int green_clear(PyGreenlet* self); +static int green_init(PyGreenlet* self, PyObject* args, PyObject* kwargs); +static int green_setparent(PyGreenlet* self, PyObject* nparent, void* UNUSED(context)); +static int green_setrun(PyGreenlet* self, PyObject* nrun, void* UNUSED(context)); +static int green_traverse(PyGreenlet* self, visitproc visit, void* arg); +static void green_dealloc(PyGreenlet* self); +static PyObject* green_getparent(PyGreenlet* self, void* UNUSED(context)); + +static int green_is_gc(PyObject* self); +static PyObject* green_getdead(PyGreenlet* self, void* UNUSED(context)); +static PyObject* green_getrun(PyGreenlet* self, void* UNUSED(context)); +static int green_setcontext(PyGreenlet* self, PyObject* nctx, void* UNUSED(context)); +static PyObject* green_getframe(PyGreenlet* self, void* UNUSED(context)); +static PyObject* green_repr(PyGreenlet* self); +#endif diff --git a/venv/lib/python3.12/site-packages/greenlet/PyGreenletUnswitchable.cpp b/venv/lib/python3.12/site-packages/greenlet/PyGreenletUnswitchable.cpp new file mode 100644 index 0000000..1b768ee --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/PyGreenletUnswitchable.cpp @@ -0,0 +1,147 @@ +/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */ +/** + Implementation of the Python slots for PyGreenletUnswitchable_Type +*/ +#ifndef PY_GREENLET_UNSWITCHABLE_CPP +#define PY_GREENLET_UNSWITCHABLE_CPP + + + +#define PY_SSIZE_T_CLEAN +#include +#include "structmember.h" // PyMemberDef + +#include "greenlet_internal.hpp" +// Code after this point can assume access to things declared in stdint.h, +// including the fixed-width types. This goes for the platform-specific switch functions +// as well. +#include "greenlet_refs.hpp" +#include "greenlet_slp_switch.hpp" + +#include "greenlet_thread_support.hpp" +#include "TGreenlet.hpp" + +#include "TGreenlet.cpp" +#include "TGreenletGlobals.cpp" +#include "TThreadStateDestroy.cpp" + + +using greenlet::LockGuard; +using greenlet::LockInitError; +using greenlet::PyErrOccurred; +using greenlet::Require; + +using greenlet::g_handle_exit; +using greenlet::single_result; + +using greenlet::Greenlet; +using greenlet::UserGreenlet; +using greenlet::MainGreenlet; +using greenlet::BrokenGreenlet; +using greenlet::ThreadState; +using greenlet::PythonState; + + +#include "PyGreenlet.hpp" + +static PyGreenlet* +green_unswitchable_new(PyTypeObject* type, PyObject* UNUSED(args), PyObject* UNUSED(kwds)) +{ + PyGreenlet* o = + (PyGreenlet*)PyBaseObject_Type.tp_new(type, mod_globs->empty_tuple, mod_globs->empty_dict); + if (o) { + new BrokenGreenlet(o, GET_THREAD_STATE().state().borrow_current()); + assert(Py_REFCNT(o) == 1); + } + return o; +} + +static PyObject* +green_unswitchable_getforce(PyGreenlet* self, void* UNUSED(context)) +{ + BrokenGreenlet* broken = dynamic_cast(self->pimpl); + return PyBool_FromLong(broken->_force_switch_error); +} + +static int +green_unswitchable_setforce(PyGreenlet* self, PyObject* nforce, void* UNUSED(context)) +{ + if (!nforce) { + PyErr_SetString( + PyExc_AttributeError, + "Cannot delete force_switch_error" + ); + return -1; + } + BrokenGreenlet* broken = dynamic_cast(self->pimpl); + int is_true = PyObject_IsTrue(nforce); + if (is_true == -1) { + return -1; + } + broken->_force_switch_error = is_true; + return 0; +} + +static PyObject* +green_unswitchable_getforceslp(PyGreenlet* self, void* UNUSED(context)) +{ + BrokenGreenlet* broken = dynamic_cast(self->pimpl); + return PyBool_FromLong(broken->_force_slp_switch_error); +} + +static int +green_unswitchable_setforceslp(PyGreenlet* self, PyObject* nforce, void* UNUSED(context)) +{ + if (!nforce) { + PyErr_SetString( + PyExc_AttributeError, + "Cannot delete force_slp_switch_error" + ); + return -1; + } + BrokenGreenlet* broken = dynamic_cast(self->pimpl); + int is_true = PyObject_IsTrue(nforce); + if (is_true == -1) { + return -1; + } + broken->_force_slp_switch_error = is_true; + return 0; +} + +static PyGetSetDef green_unswitchable_getsets[] = { + /* name, getter, setter, doc, closure (context pointer) */ + { + .name="force_switch_error", + .get=(getter)green_unswitchable_getforce, + .set=(setter)green_unswitchable_setforce, + .doc=NULL + }, + { + .name="force_slp_switch_error", + .get=(getter)green_unswitchable_getforceslp, + .set=(setter)green_unswitchable_setforceslp, + .doc=nullptr + }, + {.name=nullptr} +}; + +PyTypeObject PyGreenletUnswitchable_Type = { + .ob_base=PyVarObject_HEAD_INIT(NULL, 0) + .tp_name="greenlet._greenlet.UnswitchableGreenlet", + .tp_dealloc= (destructor)green_dealloc, /* tp_dealloc */ + .tp_flags=G_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + .tp_doc="Undocumented internal class", /* tp_doc */ + .tp_traverse=(traverseproc)green_traverse, /* tp_traverse */ + .tp_clear=(inquiry)green_clear, /* tp_clear */ + + .tp_getset=green_unswitchable_getsets, /* tp_getset */ + .tp_base=&PyGreenlet_Type, /* tp_base */ + .tp_init=(initproc)green_init, /* tp_init */ + .tp_alloc=PyType_GenericAlloc, /* tp_alloc */ + .tp_new=(newfunc)green_unswitchable_new, /* tp_new */ + .tp_free=PyObject_GC_Del, /* tp_free */ + .tp_is_gc=(inquiry)green_is_gc, /* tp_is_gc */ +}; + + +#endif diff --git a/venv/lib/python3.12/site-packages/greenlet/PyModule.cpp b/venv/lib/python3.12/site-packages/greenlet/PyModule.cpp new file mode 100644 index 0000000..a999dc9 --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/PyModule.cpp @@ -0,0 +1,292 @@ +#ifndef PY_MODULE_CPP +#define PY_MODULE_CPP + +#include "greenlet_internal.hpp" + + +#include "TGreenletGlobals.cpp" +#include "TMainGreenlet.cpp" +#include "TThreadStateDestroy.cpp" + +using greenlet::LockGuard; +using greenlet::ThreadState; + +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wunused-function" +# pragma clang diagnostic ignored "-Wunused-variable" +#endif + +PyDoc_STRVAR(mod_getcurrent_doc, + "getcurrent() -> greenlet\n" + "\n" + "Returns the current greenlet (i.e. the one which called this " + "function).\n"); + +static PyObject* +mod_getcurrent(PyObject* UNUSED(module)) +{ + return GET_THREAD_STATE().state().get_current().relinquish_ownership_o(); +} + +PyDoc_STRVAR(mod_settrace_doc, + "settrace(callback) -> object\n" + "\n" + "Sets a new tracing function and returns the previous one.\n"); +static PyObject* +mod_settrace(PyObject* UNUSED(module), PyObject* args) +{ + PyArgParseParam tracefunc; + if (!PyArg_ParseTuple(args, "O", &tracefunc)) { + return NULL; + } + ThreadState& state = GET_THREAD_STATE(); + OwnedObject previous = state.get_tracefunc(); + if (!previous) { + previous = Py_None; + } + + state.set_tracefunc(tracefunc); + + return previous.relinquish_ownership(); +} + +PyDoc_STRVAR(mod_gettrace_doc, + "gettrace() -> object\n" + "\n" + "Returns the currently set tracing function, or None.\n"); + +static PyObject* +mod_gettrace(PyObject* UNUSED(module)) +{ + OwnedObject tracefunc = GET_THREAD_STATE().state().get_tracefunc(); + if (!tracefunc) { + tracefunc = Py_None; + } + return tracefunc.relinquish_ownership(); +} + + + +PyDoc_STRVAR(mod_set_thread_local_doc, + "set_thread_local(key, value) -> None\n" + "\n" + "Set a value in the current thread-local dictionary. Debugging only.\n"); + +static PyObject* +mod_set_thread_local(PyObject* UNUSED(module), PyObject* args) +{ + PyArgParseParam key; + PyArgParseParam value; + PyObject* result = NULL; + + if (PyArg_UnpackTuple(args, "set_thread_local", 2, 2, &key, &value)) { + if(PyDict_SetItem( + PyThreadState_GetDict(), // borrow + key, + value) == 0 ) { + // success + Py_INCREF(Py_None); + result = Py_None; + } + } + return result; +} + +PyDoc_STRVAR(mod_get_pending_cleanup_count_doc, + "get_pending_cleanup_count() -> Integer\n" + "\n" + "Get the number of greenlet cleanup operations pending. Testing only.\n"); + + +static PyObject* +mod_get_pending_cleanup_count(PyObject* UNUSED(module)) +{ + LockGuard cleanup_lock(*mod_globs->thread_states_to_destroy_lock); + return PyLong_FromSize_t(mod_globs->thread_states_to_destroy.size()); +} + +PyDoc_STRVAR(mod_get_total_main_greenlets_doc, + "get_total_main_greenlets() -> Integer\n" + "\n" + "Quickly return the number of main greenlets that exist. Testing only.\n"); + +static PyObject* +mod_get_total_main_greenlets(PyObject* UNUSED(module)) +{ + return PyLong_FromSize_t(G_TOTAL_MAIN_GREENLETS); +} + + + +PyDoc_STRVAR(mod_get_clocks_used_doing_optional_cleanup_doc, + "get_clocks_used_doing_optional_cleanup() -> Integer\n" + "\n" + "Get the number of clock ticks the program has used doing optional " + "greenlet cleanup.\n" + "Beginning in greenlet 2.0, greenlet tries to find and dispose of greenlets\n" + "that leaked after a thread exited. This requires invoking Python's garbage collector,\n" + "which may have a performance cost proportional to the number of live objects.\n" + "This function returns the amount of processor time\n" + "greenlet has used to do this. In programs that run with very large amounts of live\n" + "objects, this metric can be used to decide whether the cost of doing this cleanup\n" + "is worth the memory leak being corrected. If not, you can disable the cleanup\n" + "using ``enable_optional_cleanup(False)``.\n" + "The units are arbitrary and can only be compared to themselves (similarly to ``time.clock()``);\n" + "for example, to see how it scales with your heap. You can attempt to convert them into seconds\n" + "by dividing by the value of CLOCKS_PER_SEC." + "If cleanup has been disabled, returns None." + "\n" + "This is an implementation specific, provisional API. It may be changed or removed\n" + "in the future.\n" + ".. versionadded:: 2.0" + ); +static PyObject* +mod_get_clocks_used_doing_optional_cleanup(PyObject* UNUSED(module)) +{ + std::clock_t clocks = ThreadState::clocks_used_doing_gc(); + + if (clocks == std::clock_t(-1)) { + Py_RETURN_NONE; + } + // This might not actually work on some implementations; clock_t + // is an opaque type. + return PyLong_FromSsize_t(clocks); +} + +PyDoc_STRVAR(mod_enable_optional_cleanup_doc, + "mod_enable_optional_cleanup(bool) -> None\n" + "\n" + "Enable or disable optional cleanup operations.\n" + "See ``get_clocks_used_doing_optional_cleanup()`` for details.\n" + ); +static PyObject* +mod_enable_optional_cleanup(PyObject* UNUSED(module), PyObject* flag) +{ + int is_true = PyObject_IsTrue(flag); + if (is_true == -1) { + return nullptr; + } + + if (is_true) { + std::clock_t clocks = ThreadState::clocks_used_doing_gc(); + // If we already have a value, we don't want to lose it. + if (clocks == std::clock_t(-1)) { + ThreadState::set_clocks_used_doing_gc(0); + } + } + else { + ThreadState::set_clocks_used_doing_gc(std::clock_t(-1)); + } + Py_RETURN_NONE; +} + + + + +#if !GREENLET_PY313 +PyDoc_STRVAR(mod_get_tstate_trash_delete_nesting_doc, + "get_tstate_trash_delete_nesting() -> Integer\n" + "\n" + "Return the 'trash can' nesting level. Testing only.\n"); +static PyObject* +mod_get_tstate_trash_delete_nesting(PyObject* UNUSED(module)) +{ + PyThreadState* tstate = PyThreadState_GET(); + +#if GREENLET_PY312 + return PyLong_FromLong(tstate->trash.delete_nesting); +#else + return PyLong_FromLong(tstate->trash_delete_nesting); +#endif +} +#endif + + + + +static PyMethodDef GreenMethods[] = { + { + .ml_name="getcurrent", + .ml_meth=(PyCFunction)mod_getcurrent, + .ml_flags=METH_NOARGS, + .ml_doc=mod_getcurrent_doc + }, + { + .ml_name="settrace", + .ml_meth=(PyCFunction)mod_settrace, + .ml_flags=METH_VARARGS, + .ml_doc=mod_settrace_doc + }, + { + .ml_name="gettrace", + .ml_meth=(PyCFunction)mod_gettrace, + .ml_flags=METH_NOARGS, + .ml_doc=mod_gettrace_doc + }, + { + .ml_name="set_thread_local", + .ml_meth=(PyCFunction)mod_set_thread_local, + .ml_flags=METH_VARARGS, + .ml_doc=mod_set_thread_local_doc + }, + { + .ml_name="get_pending_cleanup_count", + .ml_meth=(PyCFunction)mod_get_pending_cleanup_count, + .ml_flags=METH_NOARGS, + .ml_doc=mod_get_pending_cleanup_count_doc + }, + { + .ml_name="get_total_main_greenlets", + .ml_meth=(PyCFunction)mod_get_total_main_greenlets, + .ml_flags=METH_NOARGS, + .ml_doc=mod_get_total_main_greenlets_doc + }, + { + .ml_name="get_clocks_used_doing_optional_cleanup", + .ml_meth=(PyCFunction)mod_get_clocks_used_doing_optional_cleanup, + .ml_flags=METH_NOARGS, + .ml_doc=mod_get_clocks_used_doing_optional_cleanup_doc + }, + { + .ml_name="enable_optional_cleanup", + .ml_meth=(PyCFunction)mod_enable_optional_cleanup, + .ml_flags=METH_O, + .ml_doc=mod_enable_optional_cleanup_doc + }, +#if !GREENLET_PY313 + { + .ml_name="get_tstate_trash_delete_nesting", + .ml_meth=(PyCFunction)mod_get_tstate_trash_delete_nesting, + .ml_flags=METH_NOARGS, + .ml_doc=mod_get_tstate_trash_delete_nesting_doc + }, +#endif + {.ml_name=NULL, .ml_meth=NULL} /* Sentinel */ +}; + +static const char* const copy_on_greentype[] = { + "getcurrent", + "error", + "GreenletExit", + "settrace", + "gettrace", + NULL +}; + +static struct PyModuleDef greenlet_module_def = { + .m_base=PyModuleDef_HEAD_INIT, + .m_name="greenlet._greenlet", + .m_doc=NULL, + .m_size=-1, + .m_methods=GreenMethods, +}; + + +#endif + +#ifdef __clang__ +# pragma clang diagnostic pop +#elif defined(__GNUC__) +# pragma GCC diagnostic pop +#endif diff --git a/venv/lib/python3.12/site-packages/greenlet/TBrokenGreenlet.cpp b/venv/lib/python3.12/site-packages/greenlet/TBrokenGreenlet.cpp new file mode 100644 index 0000000..7e9ab5b --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/TBrokenGreenlet.cpp @@ -0,0 +1,45 @@ +/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */ +/** + * Implementation of greenlet::UserGreenlet. + * + * Format with: + * clang-format -i --style=file src/greenlet/greenlet.c + * + * + * Fix missing braces with: + * clang-tidy src/greenlet/greenlet.c -fix -checks="readability-braces-around-statements" +*/ + +#include "TGreenlet.hpp" + +namespace greenlet { + +void* BrokenGreenlet::operator new(size_t UNUSED(count)) +{ + return allocator.allocate(1); +} + + +void BrokenGreenlet::operator delete(void* ptr) +{ + return allocator.deallocate(static_cast(ptr), + 1); +} + +greenlet::PythonAllocator greenlet::BrokenGreenlet::allocator; + +bool +BrokenGreenlet::force_slp_switch_error() const noexcept +{ + return this->_force_slp_switch_error; +} + +UserGreenlet::switchstack_result_t BrokenGreenlet::g_switchstack(void) +{ + if (this->_force_switch_error) { + return switchstack_result_t(-1); + } + return UserGreenlet::g_switchstack(); +} + +}; //namespace greenlet diff --git a/venv/lib/python3.12/site-packages/greenlet/TExceptionState.cpp b/venv/lib/python3.12/site-packages/greenlet/TExceptionState.cpp new file mode 100644 index 0000000..08a94ae --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/TExceptionState.cpp @@ -0,0 +1,62 @@ +#ifndef GREENLET_EXCEPTION_STATE_CPP +#define GREENLET_EXCEPTION_STATE_CPP + +#include +#include "TGreenlet.hpp" + +namespace greenlet { + + +ExceptionState::ExceptionState() +{ + this->clear(); +} + +void ExceptionState::operator<<(const PyThreadState *const tstate) noexcept +{ + this->exc_info = tstate->exc_info; + this->exc_state = tstate->exc_state; +} + +void ExceptionState::operator>>(PyThreadState *const tstate) noexcept +{ + tstate->exc_state = this->exc_state; + tstate->exc_info = + this->exc_info ? this->exc_info : &tstate->exc_state; + this->clear(); +} + +void ExceptionState::clear() noexcept +{ + this->exc_info = nullptr; + this->exc_state.exc_value = nullptr; +#if !GREENLET_PY311 + this->exc_state.exc_type = nullptr; + this->exc_state.exc_traceback = nullptr; +#endif + this->exc_state.previous_item = nullptr; +} + +int ExceptionState::tp_traverse(visitproc visit, void* arg) noexcept +{ + Py_VISIT(this->exc_state.exc_value); +#if !GREENLET_PY311 + Py_VISIT(this->exc_state.exc_type); + Py_VISIT(this->exc_state.exc_traceback); +#endif + return 0; +} + +void ExceptionState::tp_clear() noexcept +{ + Py_CLEAR(this->exc_state.exc_value); +#if !GREENLET_PY311 + Py_CLEAR(this->exc_state.exc_type); + Py_CLEAR(this->exc_state.exc_traceback); +#endif +} + + +}; // namespace greenlet + +#endif // GREENLET_EXCEPTION_STATE_CPP diff --git a/venv/lib/python3.12/site-packages/greenlet/TGreenlet.cpp b/venv/lib/python3.12/site-packages/greenlet/TGreenlet.cpp new file mode 100644 index 0000000..1fb056e --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/TGreenlet.cpp @@ -0,0 +1,725 @@ +/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */ +/** + * Implementation of greenlet::Greenlet. + * + * Format with: + * clang-format -i --style=file src/greenlet/greenlet.c + * + * + * Fix missing braces with: + * clang-tidy src/greenlet/greenlet.c -fix -checks="readability-braces-around-statements" +*/ +#ifndef TGREENLET_CPP +#define TGREENLET_CPP +#include "greenlet_internal.hpp" +#include "TGreenlet.hpp" + + +#include "TGreenletGlobals.cpp" +#include "TThreadStateDestroy.cpp" + +namespace greenlet { + +Greenlet::Greenlet(PyGreenlet* p) + : Greenlet(p, StackState()) +{ +} + +Greenlet::Greenlet(PyGreenlet* p, const StackState& initial_stack) + : _self(p), stack_state(initial_stack) +{ + assert(p->pimpl == nullptr); + p->pimpl = this; +} + +Greenlet::~Greenlet() +{ + // XXX: Can't do this. tp_clear is a virtual function, and by the + // time we're here, we've sliced off our child classes. + //this->tp_clear(); + this->_self->pimpl = nullptr; +} + +bool +Greenlet::force_slp_switch_error() const noexcept +{ + return false; +} + +void +Greenlet::release_args() +{ + this->switch_args.CLEAR(); +} + +/** + * CAUTION: This will allocate memory and may trigger garbage + * collection and arbitrary Python code. + */ +OwnedObject +Greenlet::throw_GreenletExit_during_dealloc(const ThreadState& UNUSED(current_thread_state)) +{ + // If we're killed because we lost all references in the + // middle of a switch, that's ok. Don't reset the args/kwargs, + // we still want to pass them to the parent. + PyErr_SetString(mod_globs->PyExc_GreenletExit, + "Killing the greenlet because all references have vanished."); + // To get here it had to have run before + return this->g_switch(); +} + +inline void +Greenlet::slp_restore_state() noexcept +{ +#ifdef SLP_BEFORE_RESTORE_STATE + SLP_BEFORE_RESTORE_STATE(); +#endif + this->stack_state.copy_heap_to_stack( + this->thread_state()->borrow_current()->stack_state); +} + + +inline int +Greenlet::slp_save_state(char *const stackref) noexcept +{ + // XXX: This used to happen in the middle, before saving, but + // after finding the next owner. Does that matter? This is + // only defined for Sparc/GCC where it flushes register + // windows to the stack (I think) +#ifdef SLP_BEFORE_SAVE_STATE + SLP_BEFORE_SAVE_STATE(); +#endif + return this->stack_state.copy_stack_to_heap(stackref, + this->thread_state()->borrow_current()->stack_state); +} + +/** + * CAUTION: This will allocate memory and may trigger garbage + * collection and arbitrary Python code. + */ +OwnedObject +Greenlet::on_switchstack_or_initialstub_failure( + Greenlet* target, + const Greenlet::switchstack_result_t& err, + const bool target_was_me, + const bool was_initial_stub) +{ + // If we get here, either g_initialstub() + // failed, or g_switchstack() failed. Either one of those + // cases SHOULD leave us in the original greenlet with a valid stack. + if (!PyErr_Occurred()) { + PyErr_SetString( + PyExc_SystemError, + was_initial_stub + ? "Failed to switch stacks into a greenlet for the first time." + : "Failed to switch stacks into a running greenlet."); + } + this->release_args(); + + if (target && !target_was_me) { + target->murder_in_place(); + } + + assert(!err.the_new_current_greenlet); + assert(!err.origin_greenlet); + return OwnedObject(); + +} + +OwnedGreenlet +Greenlet::g_switchstack_success() noexcept +{ + PyThreadState* tstate = PyThreadState_GET(); + // restore the saved state + this->python_state >> tstate; + this->exception_state >> tstate; + + // The thread state hasn't been changed yet. + ThreadState* thread_state = this->thread_state(); + OwnedGreenlet result(thread_state->get_current()); + thread_state->set_current(this->self()); + //assert(thread_state->borrow_current().borrow() == this->_self); + return result; +} + +Greenlet::switchstack_result_t +Greenlet::g_switchstack(void) +{ + // if any of these assertions fail, it's likely because we + // switched away and tried to switch back to us. Early stages of + // switching are not reentrant because we re-use ``this->args()``. + // Switching away would happen if we trigger a garbage collection + // (by just using some Python APIs that happen to allocate Python + // objects) and some garbage had weakref callbacks or __del__ that + // switches (people don't write code like that by hand, but with + // gevent it's possible without realizing it) + assert(this->args() || PyErr_Occurred()); + { /* save state */ + if (this->thread_state()->is_current(this->self())) { + // Hmm, nothing to do. + // TODO: Does this bypass trace events that are + // important? + return switchstack_result_t(0, + this, this->thread_state()->borrow_current()); + } + BorrowedGreenlet current = this->thread_state()->borrow_current(); + PyThreadState* tstate = PyThreadState_GET(); + + current->python_state << tstate; + current->exception_state << tstate; + this->python_state.will_switch_from(tstate); + switching_thread_state = this; + current->expose_frames(); + } + assert(this->args() || PyErr_Occurred()); + // If this is the first switch into a greenlet, this will + // return twice, once with 1 in the new greenlet, once with 0 + // in the origin. + int err; + if (this->force_slp_switch_error()) { + err = -1; + } + else { + err = slp_switch(); + } + + if (err < 0) { /* error */ + // Tested by + // test_greenlet.TestBrokenGreenlets.test_failed_to_slp_switch_into_running + // + // It's not clear if it's worth trying to clean up and + // continue here. Failing to switch stacks is a big deal which + // may not be recoverable (who knows what state the stack is in). + // Also, we've stolen references in preparation for calling + // ``g_switchstack_success()`` and we don't have a clean + // mechanism for backing that all out. + Py_FatalError("greenlet: Failed low-level slp_switch(). The stack is probably corrupt."); + } + + // No stack-based variables are valid anymore. + + // But the global is volatile so we can reload it without the + // compiler caching it from earlier. + Greenlet* greenlet_that_switched_in = switching_thread_state; // aka this + switching_thread_state = nullptr; + // except that no stack variables are valid, we would: + // assert(this == greenlet_that_switched_in); + + // switchstack success is where we restore the exception state, + // etc. It returns the origin greenlet because its convenient. + + OwnedGreenlet origin = greenlet_that_switched_in->g_switchstack_success(); + assert(greenlet_that_switched_in->args() || PyErr_Occurred()); + return switchstack_result_t(err, greenlet_that_switched_in, origin); +} + + +inline void +Greenlet::check_switch_allowed() const +{ + // TODO: Make this take a parameter of the current greenlet, + // or current main greenlet, to make the check for + // cross-thread switching cheaper. Surely somewhere up the + // call stack we've already accessed the thread local variable. + + // We expect to always have a main greenlet now; accessing the thread state + // created it. However, if we get here and cleanup has already + // begun because we're a greenlet that was running in a + // (now dead) thread, these invariants will not hold true. In + // fact, accessing `this->thread_state` may not even be possible. + + // If the thread this greenlet was running in is dead, + // we'll still have a reference to a main greenlet, but the + // thread state pointer we have is bogus. + // TODO: Give the objects an API to determine if they belong + // to a dead thread. + + const BorrowedMainGreenlet main_greenlet = this->find_main_greenlet_in_lineage(); + + if (!main_greenlet) { + throw PyErrOccurred(mod_globs->PyExc_GreenletError, + "cannot switch to a garbage collected greenlet"); + } + + if (!main_greenlet->thread_state()) { + throw PyErrOccurred(mod_globs->PyExc_GreenletError, + "cannot switch to a different thread (which happens to have exited)"); + } + + // The main greenlet we found was from the .parent lineage. + // That may or may not have any relationship to the main + // greenlet of the running thread. We can't actually access + // our this->thread_state members to try to check that, + // because it could be in the process of getting destroyed, + // but setting the main_greenlet->thread_state member to NULL + // may not be visible yet. So we need to check against the + // current thread state (once the cheaper checks are out of + // the way) + const BorrowedMainGreenlet current_main_greenlet = GET_THREAD_STATE().state().borrow_main_greenlet(); + if ( + // lineage main greenlet is not this thread's greenlet + current_main_greenlet != main_greenlet + || ( + // atteched to some thread + this->main_greenlet() + // XXX: Same condition as above. Was this supposed to be + // this->main_greenlet()? + && current_main_greenlet != main_greenlet) + // switching into a known dead thread (XXX: which, if we get here, + // is bad, because we just accessed the thread state, which is + // gone!) + || (!current_main_greenlet->thread_state())) { + // CAUTION: This may trigger memory allocations, gc, and + // arbitrary Python code. + throw PyErrOccurred( + mod_globs->PyExc_GreenletError, + "Cannot switch to a different thread\n\tCurrent: %R\n\tExpected: %R", + current_main_greenlet, main_greenlet); + } +} + +const OwnedObject +Greenlet::context() const +{ + using greenlet::PythonStateContext; + OwnedObject result; + + if (this->is_currently_running_in_some_thread()) { + /* Currently running greenlet: context is stored in the thread state, + not the greenlet object. */ + if (GET_THREAD_STATE().state().is_current(this->self())) { + result = PythonStateContext::context(PyThreadState_GET()); + } + else { + throw ValueError( + "cannot get context of a " + "greenlet that is running in a different thread"); + } + } + else { + /* Greenlet is not running: just return context. */ + result = this->python_state.context(); + } + if (!result) { + result = OwnedObject::None(); + } + return result; +} + + +void +Greenlet::context(BorrowedObject given) +{ + using greenlet::PythonStateContext; + if (!given) { + throw AttributeError("can't delete context attribute"); + } + if (given.is_None()) { + /* "Empty context" is stored as NULL, not None. */ + given = nullptr; + } + + //checks type, incrs refcnt + greenlet::refs::OwnedContext context(given); + PyThreadState* tstate = PyThreadState_GET(); + + if (this->is_currently_running_in_some_thread()) { + if (!GET_THREAD_STATE().state().is_current(this->self())) { + throw ValueError("cannot set context of a greenlet" + " that is running in a different thread"); + } + + /* Currently running greenlet: context is stored in the thread state, + not the greenlet object. */ + OwnedObject octx = OwnedObject::consuming(PythonStateContext::context(tstate)); + PythonStateContext::context(tstate, context.relinquish_ownership()); + } + else { + /* Greenlet is not running: just set context. Note that the + greenlet may be dead.*/ + this->python_state.context() = context; + } +} + +/** + * CAUTION: May invoke arbitrary Python code. + * + * Figure out what the result of ``greenlet.switch(arg, kwargs)`` + * should be and transfers ownership of it to the left-hand-side. + * + * If switch() was just passed an arg tuple, then we'll just return that. + * If only keyword arguments were passed, then we'll pass the keyword + * argument dict. Otherwise, we'll create a tuple of (args, kwargs) and + * return both. + * + * CAUTION: This may allocate a new tuple object, which may + * cause the Python garbage collector to run, which in turn may + * run arbitrary Python code that switches. + */ +OwnedObject& operator<<=(OwnedObject& lhs, greenlet::SwitchingArgs& rhs) noexcept +{ + // Because this may invoke arbitrary Python code, which could + // result in switching back to us, we need to get the + // arguments locally on the stack. + assert(rhs); + OwnedObject args = rhs.args(); + OwnedObject kwargs = rhs.kwargs(); + rhs.CLEAR(); + // We shouldn't be called twice for the same switch. + assert(args || kwargs); + assert(!rhs); + + if (!kwargs) { + lhs = args; + } + else if (!PyDict_Size(kwargs.borrow())) { + lhs = args; + } + else if (!PySequence_Length(args.borrow())) { + lhs = kwargs; + } + else { + // PyTuple_Pack allocates memory, may GC, may run arbitrary + // Python code. + lhs = OwnedObject::consuming(PyTuple_Pack(2, args.borrow(), kwargs.borrow())); + } + return lhs; +} + +static OwnedObject +g_handle_exit(const OwnedObject& greenlet_result) +{ + if (!greenlet_result && mod_globs->PyExc_GreenletExit.PyExceptionMatches()) { + /* catch and ignore GreenletExit */ + PyErrFetchParam val; + PyErr_Fetch(PyErrFetchParam(), val, PyErrFetchParam()); + if (!val) { + return OwnedObject::None(); + } + return OwnedObject(val); + } + + if (greenlet_result) { + // package the result into a 1-tuple + // PyTuple_Pack increments the reference of its arguments, + // so we always need to decref the greenlet result; + // the owner will do that. + return OwnedObject::consuming(PyTuple_Pack(1, greenlet_result.borrow())); + } + + return OwnedObject(); +} + + + +/** + * May run arbitrary Python code. + */ +OwnedObject +Greenlet::g_switch_finish(const switchstack_result_t& err) +{ + assert(err.the_new_current_greenlet == this); + + ThreadState& state = *this->thread_state(); + // Because calling the trace function could do arbitrary things, + // including switching away from this greenlet and then maybe + // switching back, we need to capture the arguments now so that + // they don't change. + OwnedObject result; + if (this->args()) { + result <<= this->args(); + } + else { + assert(PyErr_Occurred()); + } + assert(!this->args()); + try { + // Our only caller handles the bad error case + assert(err.status >= 0); + assert(state.borrow_current() == this->self()); + if (OwnedObject tracefunc = state.get_tracefunc()) { + assert(result || PyErr_Occurred()); + g_calltrace(tracefunc, + result ? mod_globs->event_switch : mod_globs->event_throw, + err.origin_greenlet, + this->self()); + } + // The above could have invoked arbitrary Python code, but + // it couldn't switch back to this object and *also* + // throw an exception, so the args won't have changed. + + if (PyErr_Occurred()) { + // We get here if we fell of the end of the run() function + // raising an exception. The switch itself was + // successful, but the function raised. + // valgrind reports that memory allocated here can still + // be reached after a test run. + throw PyErrOccurred::from_current(); + } + return result; + } + catch (const PyErrOccurred&) { + /* Turn switch errors into switch throws */ + /* Turn trace errors into switch throws */ + this->release_args(); + throw; + } +} + +void +Greenlet::g_calltrace(const OwnedObject& tracefunc, + const greenlet::refs::ImmortalEventName& event, + const BorrowedGreenlet& origin, + const BorrowedGreenlet& target) +{ + PyErrPieces saved_exc; + try { + TracingGuard tracing_guard; + // TODO: We have saved the active exception (if any) that's + // about to be raised. In the 'throw' case, we could provide + // the exception to the tracefunction, which seems very helpful. + tracing_guard.CallTraceFunction(tracefunc, event, origin, target); + } + catch (const PyErrOccurred&) { + // In case of exceptions trace function is removed, + // and any existing exception is replaced with the tracing + // exception. + GET_THREAD_STATE().state().set_tracefunc(Py_None); + throw; + } + + saved_exc.PyErrRestore(); + assert( + (event == mod_globs->event_throw && PyErr_Occurred()) + || (event == mod_globs->event_switch && !PyErr_Occurred()) + ); +} + +void +Greenlet::murder_in_place() +{ + if (this->active()) { + assert(!this->is_currently_running_in_some_thread()); + this->deactivate_and_free(); + } +} + +inline void +Greenlet::deactivate_and_free() +{ + if (!this->active()) { + return; + } + // Throw away any saved stack. + this->stack_state = StackState(); + assert(!this->stack_state.active()); + // Throw away any Python references. + // We're holding a borrowed reference to the last + // frame we executed. Since we borrowed it, the + // normal traversal, clear, and dealloc functions + // ignore it, meaning it leaks. (The thread state + // object can't find it to clear it when that's + // deallocated either, because by definition if we + // got an object on this list, it wasn't + // running and the thread state doesn't have + // this frame.) + // So here, we *do* clear it. + this->python_state.tp_clear(true); +} + +bool +Greenlet::belongs_to_thread(const ThreadState* thread_state) const +{ + if (!this->thread_state() // not running anywhere, or thread + // exited + || !thread_state) { // same, or there is no thread state. + return false; + } + return true; +} + + +void +Greenlet::deallocing_greenlet_in_thread(const ThreadState* current_thread_state) +{ + /* Cannot raise an exception to kill the greenlet if + it is not running in the same thread! */ + if (this->belongs_to_thread(current_thread_state)) { + assert(current_thread_state); + // To get here it had to have run before + /* Send the greenlet a GreenletExit exception. */ + + // We don't care about the return value, only whether an + // exception happened. + this->throw_GreenletExit_during_dealloc(*current_thread_state); + return; + } + + // Not the same thread! Temporarily save the greenlet + // into its thread's deleteme list, *if* it exists. + // If that thread has already exited, and processed its pending + // cleanup, we'll never be able to clean everything up: we won't + // be able to raise an exception. + // That's mostly OK! Since we can't add it to a list, our refcount + // won't increase, and we'll go ahead with the DECREFs later. + + ThreadState *const thread_state = this->thread_state(); + if (thread_state) { + thread_state->delete_when_thread_running(this->self()); + } + else { + // The thread is dead, we can't raise an exception. + // We need to make it look non-active, though, so that dealloc + // finishes killing it. + this->deactivate_and_free(); + } + return; +} + + +int +Greenlet::tp_traverse(visitproc visit, void* arg) +{ + + int result; + if ((result = this->exception_state.tp_traverse(visit, arg)) != 0) { + return result; + } + //XXX: This is ugly. But so is handling everything having to do + //with the top frame. + bool visit_top_frame = this->was_running_in_dead_thread(); + // When true, the thread is dead. Our implicit weak reference to the + // frame is now all that's left; we consider ourselves to + // strongly own it now. + if ((result = this->python_state.tp_traverse(visit, arg, visit_top_frame)) != 0) { + return result; + } + return 0; +} + +int +Greenlet::tp_clear() +{ + bool own_top_frame = this->was_running_in_dead_thread(); + this->exception_state.tp_clear(); + this->python_state.tp_clear(own_top_frame); + return 0; +} + +bool Greenlet::is_currently_running_in_some_thread() const +{ + return this->stack_state.active() && !this->python_state.top_frame(); +} + +#if GREENLET_PY312 +void GREENLET_NOINLINE(Greenlet::expose_frames)() +{ + if (!this->python_state.top_frame()) { + return; + } + + _PyInterpreterFrame* last_complete_iframe = nullptr; + _PyInterpreterFrame* iframe = this->python_state.top_frame()->f_frame; + while (iframe) { + // We must make a copy before looking at the iframe contents, + // since iframe might point to a portion of the greenlet's C stack + // that was spilled when switching greenlets. + _PyInterpreterFrame iframe_copy; + this->stack_state.copy_from_stack(&iframe_copy, iframe, sizeof(*iframe)); + if (!_PyFrame_IsIncomplete(&iframe_copy)) { + // If the iframe were OWNED_BY_CSTACK then it would always be + // incomplete. Since it's not incomplete, it's not on the C stack + // and we can access it through the original `iframe` pointer + // directly. This is important since GetFrameObject might + // lazily _create_ the frame object and we don't want the + // interpreter to lose track of it. + // + #if !GREENLET_PY315 + // This enum value was removed in + // https://github.com/python/cpython/pull/141108 + + assert(iframe_copy.owner != FRAME_OWNED_BY_CSTACK); + #endif + + // We really want to just write: + // PyFrameObject* frame = _PyFrame_GetFrameObject(iframe); + // but _PyFrame_GetFrameObject calls _PyFrame_MakeAndSetFrameObject + // which is not a visible symbol in libpython. The easiest + // way to get a public function to call it is using + // PyFrame_GetBack, which is defined as follows: + // assert(frame != NULL); + // assert(!_PyFrame_IsIncomplete(frame->f_frame)); + // PyFrameObject *back = frame->f_back; + // if (back == NULL) { + // _PyInterpreterFrame *prev = frame->f_frame->previous; + // prev = _PyFrame_GetFirstComplete(prev); + // if (prev) { + // back = _PyFrame_GetFrameObject(prev); + // } + // } + // return (PyFrameObject*)Py_XNewRef(back); + if (!iframe->frame_obj) { + PyFrameObject dummy_frame; + _PyInterpreterFrame dummy_iframe; + dummy_frame.f_back = nullptr; + dummy_frame.f_frame = &dummy_iframe; + // force the iframe to be considered complete without + // needing to check its code object: + dummy_iframe.owner = FRAME_OWNED_BY_GENERATOR; + dummy_iframe.previous = iframe; + assert(!_PyFrame_IsIncomplete(&dummy_iframe)); + // Drop the returned reference immediately; the iframe + // continues to hold a strong reference + Py_XDECREF(PyFrame_GetBack(&dummy_frame)); + assert(iframe->frame_obj); + } + + // This is a complete frame, so make the last one of those we saw + // point at it, bypassing any incomplete frames (which may have + // been on the C stack) in between the two. We're overwriting + // last_complete_iframe->previous and need that to be reversible, + // so we store the original previous ptr in the frame object + // (which we must have created on a previous iteration through + // this loop). The frame object has a bunch of storage that is + // only used when its iframe is OWNED_BY_FRAME_OBJECT, which only + // occurs when the frame object outlives the frame's execution, + // which can't have happened yet because the frame is currently + // executing as far as the interpreter is concerned. So, we can + // reuse it for our own purposes. + assert(iframe->owner == FRAME_OWNED_BY_THREAD + || iframe->owner == FRAME_OWNED_BY_GENERATOR); + if (last_complete_iframe) { + assert(last_complete_iframe->frame_obj); + memcpy(&last_complete_iframe->frame_obj->_f_frame_data[0], + &last_complete_iframe->previous, sizeof(void *)); + last_complete_iframe->previous = iframe; + } + last_complete_iframe = iframe; + } + // Frames that are OWNED_BY_FRAME_OBJECT are linked via the + // frame's f_back while all others are linked via the iframe's + // previous ptr. Since all the frames we traverse are running + // as far as the interpreter is concerned, we don't have to + // worry about the OWNED_BY_FRAME_OBJECT case. + iframe = iframe_copy.previous; + } + + // Give the outermost complete iframe a null previous pointer to + // account for any potential incomplete/C-stack iframes between it + // and the actual top-of-stack + if (last_complete_iframe) { + assert(last_complete_iframe->frame_obj); + memcpy(&last_complete_iframe->frame_obj->_f_frame_data[0], + &last_complete_iframe->previous, sizeof(void *)); + last_complete_iframe->previous = nullptr; + } +} +#else +void Greenlet::expose_frames() +{ + +} +#endif + +}; // namespace greenlet +#endif diff --git a/venv/lib/python3.12/site-packages/greenlet/TGreenlet.hpp b/venv/lib/python3.12/site-packages/greenlet/TGreenlet.hpp new file mode 100644 index 0000000..32330e9 --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/TGreenlet.hpp @@ -0,0 +1,837 @@ +#ifndef GREENLET_GREENLET_HPP +#define GREENLET_GREENLET_HPP +/* + * Declarations of the core data structures. +*/ + +#define PY_SSIZE_T_CLEAN +#include + +#include "greenlet_compiler_compat.hpp" +#include "greenlet_refs.hpp" +#include "greenlet_cpython_compat.hpp" +#include "greenlet_allocator.hpp" + +using greenlet::refs::OwnedObject; +using greenlet::refs::OwnedGreenlet; +using greenlet::refs::OwnedMainGreenlet; +using greenlet::refs::BorrowedGreenlet; + +#if PY_VERSION_HEX < 0x30B00A6 +# define _PyCFrame CFrame +# define _PyInterpreterFrame _interpreter_frame +#endif + +#if GREENLET_PY312 +# define Py_BUILD_CORE +# include "internal/pycore_frame.h" +#endif + +#if GREENLET_PY314 +# include "internal/pycore_interpframe_structs.h" +#if defined(_MSC_VER) || defined(__MINGW64__) +# include "greenlet_msvc_compat.hpp" +#else +# include "internal/pycore_interpframe.h" +#endif +#ifdef Py_GIL_DISABLED +# include "internal/pycore_tstate.h" +#endif +#endif + +// XXX: TODO: Work to remove all virtual functions +// for speed of calling and size of objects (no vtable). +// One pattern is the Curiously Recurring Template +namespace greenlet +{ + class ExceptionState + { + private: + G_NO_COPIES_OF_CLS(ExceptionState); + + // Even though these are borrowed objects, we actually own + // them, when they're not null. + // XXX: Express that in the API. + private: + _PyErr_StackItem* exc_info; + _PyErr_StackItem exc_state; + public: + ExceptionState(); + void operator<<(const PyThreadState *const tstate) noexcept; + void operator>>(PyThreadState* tstate) noexcept; + void clear() noexcept; + + int tp_traverse(visitproc visit, void* arg) noexcept; + void tp_clear() noexcept; + }; + + template + void operator<<(const PyThreadState *const tstate, T& exc); + + class PythonStateContext + { + protected: + greenlet::refs::OwnedContext _context; + public: + inline const greenlet::refs::OwnedContext& context() const + { + return this->_context; + } + inline greenlet::refs::OwnedContext& context() + { + return this->_context; + } + + inline void tp_clear() + { + this->_context.CLEAR(); + } + + template + inline static PyObject* context(T* tstate) + { + return tstate->context; + } + + template + inline static void context(T* tstate, PyObject* new_context) + { + tstate->context = new_context; + tstate->context_ver++; + } + }; + class SwitchingArgs; + class PythonState : public PythonStateContext + { + public: + typedef greenlet::refs::OwnedReference OwnedFrame; + private: + G_NO_COPIES_OF_CLS(PythonState); + // We own this if we're suspended (although currently we don't + // tp_traverse into it; that's a TODO). If we're running, it's + // empty. If we get deallocated and *still* have a frame, it + // won't be reachable from the place that normally decref's + // it, so we need to do it (hence owning it). + OwnedFrame _top_frame; +#if GREENLET_USE_CFRAME + _PyCFrame* cframe; + int use_tracing; +#endif +#if GREENLET_PY314 + int py_recursion_depth; + // I think this is only used by the JIT. At least, + // we only got errors not switching it when the JIT was enabled. + // Python/generated_cases.c.h:12469: _PyEval_EvalFrameDefault: + // Assertion `tstate->current_executor == NULL' failed. + // see https://github.com/python-greenlet/greenlet/issues/460 + PyObject* current_executor; + _PyStackRef* stackpointer; + #ifdef Py_GIL_DISABLED + _PyCStackRef* c_stack_refs; + #endif +#elif GREENLET_PY312 + int py_recursion_depth; + int c_recursion_depth; +#else + int recursion_depth; +#endif +#if GREENLET_PY313 + PyObject *delete_later; +#else + int trash_delete_nesting; +#endif +#if GREENLET_PY311 + _PyInterpreterFrame* current_frame; + _PyStackChunk* datastack_chunk; + PyObject** datastack_top; + PyObject** datastack_limit; +#endif + // The PyInterpreterFrame list on 3.12+ contains some entries that are + // on the C stack, which can't be directly accessed while a greenlet is + // suspended. In order to keep greenlet gr_frame introspection working, + // we adjust stack switching to rewrite the interpreter frame list + // to skip these C-stack frames; we call this "exposing" the greenlet's + // frames because it makes them valid to work with in Python. Then when + // the greenlet is resumed we need to remember to reverse the operation + // we did. The C-stack frames are "entry frames" which are a low-level + // interpreter detail; they're not needed for introspection, but do + // need to be present for the eval loop to work. + void unexpose_frames(); + + public: + + PythonState(); + // You can use this for testing whether we have a frame + // or not. It returns const so they can't modify it. + const OwnedFrame& top_frame() const noexcept; + + inline void operator<<(const PyThreadState *const tstate) noexcept; + inline void operator>>(PyThreadState* tstate) noexcept; + void clear() noexcept; + + int tp_traverse(visitproc visit, void* arg, bool visit_top_frame) noexcept; + void tp_clear(bool own_top_frame) noexcept; + void set_initial_state(const PyThreadState* const tstate) noexcept; +#if GREENLET_USE_CFRAME + void set_new_cframe(_PyCFrame& frame) noexcept; +#endif + + void may_switch_away() noexcept; + inline void will_switch_from(PyThreadState *const origin_tstate) noexcept; + void did_finish(PyThreadState* tstate) noexcept; + }; + + class StackState + { + // By having only plain C (POD) members, no virtual functions + // or bases, we get a trivial assignment operator generated + // for us. However, that's not safe since we do manage memory. + // So we declare an assignment operator that only works if we + // don't have any memory allocated. (We don't use + // std::shared_ptr for reference counting just to keep this + // object small) + private: + char* _stack_start; + char* stack_stop; + char* stack_copy; + intptr_t _stack_saved; + StackState* stack_prev; + inline int copy_stack_to_heap_up_to(const char* const stop) noexcept; + inline void free_stack_copy() noexcept; + + public: + /** + * Creates a started, but inactive, state, using *current* + * as the previous. + */ + StackState(void* mark, StackState& current); + /** + * Creates an inactive, unstarted, state. + */ + StackState(); + ~StackState(); + StackState(const StackState& other); + StackState& operator=(const StackState& other); + inline void copy_heap_to_stack(const StackState& current) noexcept; + inline int copy_stack_to_heap(char* const stackref, const StackState& current) noexcept; + inline bool started() const noexcept; + inline bool main() const noexcept; + inline bool active() const noexcept; + inline void set_active() noexcept; + inline void set_inactive() noexcept; + inline intptr_t stack_saved() const noexcept; + inline char* stack_start() const noexcept; + static inline StackState make_main() noexcept; +#ifdef GREENLET_USE_STDIO + friend std::ostream& operator<<(std::ostream& os, const StackState& s); +#endif + + // Fill in [dest, dest + n) with the values that would be at + // [src, src + n) while this greenlet is running. This is like memcpy + // except that if the greenlet is suspended it accounts for the portion + // of the greenlet's stack that was spilled to the heap. `src` may + // be on this greenlet's stack, or on the heap, but not on a different + // greenlet's stack. + void copy_from_stack(void* dest, const void* src, size_t n) const; + }; +#ifdef GREENLET_USE_STDIO + std::ostream& operator<<(std::ostream& os, const StackState& s); +#endif + + class SwitchingArgs + { + private: + G_NO_ASSIGNMENT_OF_CLS(SwitchingArgs); + // If args and kwargs are both false (NULL), this is a *throw*, not a + // switch. PyErr_... must have been called already. + OwnedObject _args; + OwnedObject _kwargs; + public: + + SwitchingArgs() + {} + + SwitchingArgs(const OwnedObject& args, const OwnedObject& kwargs) + : _args(args), + _kwargs(kwargs) + {} + + SwitchingArgs(const SwitchingArgs& other) + : _args(other._args), + _kwargs(other._kwargs) + {} + + const OwnedObject& args() + { + return this->_args; + } + + const OwnedObject& kwargs() + { + return this->_kwargs; + } + + /** + * Moves ownership from the argument to this object. + */ + SwitchingArgs& operator<<=(SwitchingArgs& other) + { + if (this != &other) { + this->_args = other._args; + this->_kwargs = other._kwargs; + other.CLEAR(); + } + return *this; + } + + /** + * Acquires ownership of the argument (consumes the reference). + */ + SwitchingArgs& operator<<=(PyObject* args) + { + this->_args = OwnedObject::consuming(args); + this->_kwargs.CLEAR(); + return *this; + } + + /** + * Acquires ownership of the argument. + * + * Sets the args to be the given value; clears the kwargs. + */ + SwitchingArgs& operator<<=(OwnedObject& args) + { + assert(&args != &this->_args); + this->_args = args; + this->_kwargs.CLEAR(); + args.CLEAR(); + + return *this; + } + + explicit operator bool() const noexcept + { + return this->_args || this->_kwargs; + } + + inline void CLEAR() + { + this->_args.CLEAR(); + this->_kwargs.CLEAR(); + } + + const std::string as_str() const noexcept + { + return PyUnicode_AsUTF8( + OwnedObject::consuming( + PyUnicode_FromFormat( + "SwitchingArgs(args=%R, kwargs=%R)", + this->_args.borrow(), + this->_kwargs.borrow() + ) + ).borrow() + ); + } + }; + + class ThreadState; + + class UserGreenlet; + class MainGreenlet; + + class Greenlet + { + private: + G_NO_COPIES_OF_CLS(Greenlet); + PyGreenlet* const _self; + private: + // XXX: Work to remove these. + friend class ThreadState; + friend class UserGreenlet; + friend class MainGreenlet; + protected: + ExceptionState exception_state; + SwitchingArgs switch_args; + StackState stack_state; + PythonState python_state; + Greenlet(PyGreenlet* p, const StackState& initial_state); + public: + // This constructor takes ownership of the PyGreenlet, by + // setting ``p->pimpl = this;``. + Greenlet(PyGreenlet* p); + virtual ~Greenlet(); + + const OwnedObject context() const; + + // You MUST call this _very_ early in the switching process to + // prepare anything that may need prepared. This might perform + // garbage collections or otherwise run arbitrary Python code. + // + // One specific use of it is for Python 3.11+, preventing + // running arbitrary code at unsafe times. See + // PythonState::may_switch_away(). + inline void may_switch_away() + { + this->python_state.may_switch_away(); + } + + inline void context(refs::BorrowedObject new_context); + + inline SwitchingArgs& args() + { + return this->switch_args; + } + + virtual const refs::BorrowedMainGreenlet main_greenlet() const = 0; + + inline intptr_t stack_saved() const noexcept + { + return this->stack_state.stack_saved(); + } + + // This is used by the macro SLP_SAVE_STATE to compute the + // difference in stack sizes. It might be nice to handle the + // computation ourself, but the type of the result + // varies by platform, so doing it in the macro is the + // simplest way. + inline const char* stack_start() const noexcept + { + return this->stack_state.stack_start(); + } + + virtual OwnedObject throw_GreenletExit_during_dealloc(const ThreadState& current_thread_state); + virtual OwnedObject g_switch() = 0; + /** + * Force the greenlet to appear dead. Used when it's not + * possible to throw an exception into a greenlet anymore. + * + * This losses access to the thread state and the main greenlet. + */ + virtual void murder_in_place(); + + /** + * Called when somebody notices we were running in a dead + * thread to allow cleaning up resources (because we can't + * raise GreenletExit into it anymore). + * This is very similar to ``murder_in_place()``, except that + * it DOES NOT lose the main greenlet or thread state. + */ + inline void deactivate_and_free(); + + + // Called when some thread wants to deallocate a greenlet + // object. + // The thread may or may not be the same thread the greenlet + // was running in. + // The thread state will be null if the thread the greenlet + // was running in was known to have exited. + void deallocing_greenlet_in_thread(const ThreadState* current_state); + + // Must be called on 3.12+ before exposing a suspended greenlet's + // frames to user code. This rewrites the linked list of interpreter + // frames to skip the ones that are being stored on the C stack (which + // can't be safely accessed while the greenlet is suspended because + // that stack space might be hosting a different greenlet), and + // sets PythonState::frames_were_exposed so we remember to restore + // the original list before resuming the greenlet. The C-stack frames + // are a low-level interpreter implementation detail; while they're + // important to the bytecode eval loop, they're superfluous for + // introspection purposes. + void expose_frames(); + + + // TODO: Figure out how to make these non-public. + inline void slp_restore_state() noexcept; + inline int slp_save_state(char *const stackref) noexcept; + + inline bool is_currently_running_in_some_thread() const; + virtual bool belongs_to_thread(const ThreadState* state) const; + + inline bool started() const + { + return this->stack_state.started(); + } + inline bool active() const + { + return this->stack_state.active(); + } + inline bool main() const + { + return this->stack_state.main(); + } + virtual refs::BorrowedMainGreenlet find_main_greenlet_in_lineage() const = 0; + + virtual const OwnedGreenlet parent() const = 0; + virtual void parent(const refs::BorrowedObject new_parent) = 0; + + inline const PythonState::OwnedFrame& top_frame() + { + return this->python_state.top_frame(); + } + + virtual const OwnedObject& run() const = 0; + virtual void run(const refs::BorrowedObject nrun) = 0; + + + virtual int tp_traverse(visitproc visit, void* arg); + virtual int tp_clear(); + + + // Return the thread state that the greenlet is running in, or + // null if the greenlet is not running or the thread is known + // to have exited. + virtual ThreadState* thread_state() const noexcept = 0; + + // Return true if the greenlet is known to have been running + // (active) in a thread that has now exited. + virtual bool was_running_in_dead_thread() const noexcept = 0; + + // Return a borrowed greenlet that is the Python object + // this object represents. + inline BorrowedGreenlet self() const noexcept + { + return BorrowedGreenlet(this->_self); + } + + // For testing. If this returns true, we should pretend that + // slp_switch() failed. + virtual bool force_slp_switch_error() const noexcept; + + protected: + inline void release_args(); + + // The functions that must not be inlined are declared virtual. + // We also mark them as protected, not private, so that the + // compiler is forced to call them through a function pointer. + // (A sufficiently smart compiler could directly call a private + // virtual function since it can never be overridden in a + // subclass). + + // Also TODO: Switch away from integer error codes and to enums, + // or throw exceptions when possible. + struct switchstack_result_t + { + int status; + Greenlet* the_new_current_greenlet; + OwnedGreenlet origin_greenlet; + + switchstack_result_t() + : status(0), + the_new_current_greenlet(nullptr) + {} + + switchstack_result_t(int err) + : status(err), + the_new_current_greenlet(nullptr) + {} + + switchstack_result_t(int err, Greenlet* state, OwnedGreenlet& origin) + : status(err), + the_new_current_greenlet(state), + origin_greenlet(origin) + { + } + + switchstack_result_t(int err, Greenlet* state, const BorrowedGreenlet& origin) + : status(err), + the_new_current_greenlet(state), + origin_greenlet(origin) + { + } + + switchstack_result_t(const switchstack_result_t& other) + : status(other.status), + the_new_current_greenlet(other.the_new_current_greenlet), + origin_greenlet(other.origin_greenlet) + {} + + switchstack_result_t& operator=(const switchstack_result_t& other) + { + this->status = other.status; + this->the_new_current_greenlet = other.the_new_current_greenlet; + this->origin_greenlet = other.origin_greenlet; + return *this; + } + }; + + OwnedObject on_switchstack_or_initialstub_failure( + Greenlet* target, + const switchstack_result_t& err, + const bool target_was_me=false, + const bool was_initial_stub=false); + + // Returns the previous greenlet we just switched away from. + virtual OwnedGreenlet g_switchstack_success() noexcept; + + + // Check the preconditions for switching to this greenlet; if they + // aren't met, throws PyErrOccurred. Most callers will want to + // catch this and clear the arguments + inline void check_switch_allowed() const; + class GreenletStartedWhileInPython : public std::runtime_error + { + public: + GreenletStartedWhileInPython() : std::runtime_error("") + {} + }; + + protected: + + + /** + Perform a stack switch into this greenlet. + + This temporarily sets the global variable + ``switching_thread_state`` to this greenlet; as soon as the + call to ``slp_switch`` completes, this is reset to NULL. + Consequently, this depends on the GIL. + + TODO: Adopt the stackman model and pass ``slp_switch`` a + callback function and context pointer; this eliminates the + need for global variables altogether. + + Because the stack switch happens in this function, this + function can't use its own stack (local) variables, set + before the switch, and then accessed after the switch. + + Further, you con't even access ``g_thread_state_global`` + before and after the switch from the global variable. + Because it is thread local some compilers cache it in a + register/on the stack, notably new versions of MSVC; this + breaks with strange crashes sometime later, because writing + to anything in ``g_thread_state_global`` after the switch + is actually writing to random memory. For this reason, we + call a non-inlined function to finish the operation. (XXX: + The ``/GT`` MSVC compiler argument probably fixes that.) + + It is very important that stack switch is 'atomic', i.e. no + calls into other Python code allowed (except very few that + are safe), because global variables are very fragile. (This + should no longer be the case with thread-local variables.) + + */ + // Made virtual to facilitate subclassing UserGreenlet for testing. + virtual switchstack_result_t g_switchstack(void); + +class TracingGuard +{ +private: + PyThreadState* tstate; +public: + TracingGuard() + : tstate(PyThreadState_GET()) + { + PyThreadState_EnterTracing(this->tstate); + } + + ~TracingGuard() + { + PyThreadState_LeaveTracing(this->tstate); + this->tstate = nullptr; + } + + inline void CallTraceFunction(const OwnedObject& tracefunc, + const greenlet::refs::ImmortalEventName& event, + const BorrowedGreenlet& origin, + const BorrowedGreenlet& target) + { + // TODO: This calls tracefunc(event, (origin, target)). Add a shortcut + // function for that that's specialized to avoid the Py_BuildValue + // string parsing, or start with just using "ON" format with PyTuple_Pack(2, + // origin, target). That seems like what the N format is meant + // for. + // XXX: Why does event not automatically cast back to a PyObject? + // It tries to call the "deleted constructor ImmortalEventName + // const" instead. + assert(tracefunc); + assert(event); + assert(origin); + assert(target); + greenlet::refs::NewReference retval( + PyObject_CallFunction( + tracefunc.borrow(), + "O(OO)", + event.borrow(), + origin.borrow(), + target.borrow() + )); + if (!retval) { + throw PyErrOccurred::from_current(); + } + } +}; + + static void + g_calltrace(const OwnedObject& tracefunc, + const greenlet::refs::ImmortalEventName& event, + const greenlet::refs::BorrowedGreenlet& origin, + const BorrowedGreenlet& target); + private: + OwnedObject g_switch_finish(const switchstack_result_t& err); + + }; + + class UserGreenlet : public Greenlet + { + private: + static greenlet::PythonAllocator allocator; + OwnedMainGreenlet _main_greenlet; + OwnedObject _run_callable; + OwnedGreenlet _parent; + public: + static void* operator new(size_t UNUSED(count)); + static void operator delete(void* ptr); + + UserGreenlet(PyGreenlet* p, BorrowedGreenlet the_parent); + virtual ~UserGreenlet(); + + virtual refs::BorrowedMainGreenlet find_main_greenlet_in_lineage() const; + virtual bool was_running_in_dead_thread() const noexcept; + virtual ThreadState* thread_state() const noexcept; + virtual OwnedObject g_switch(); + virtual const OwnedObject& run() const + { + if (this->started() || !this->_run_callable) { + throw AttributeError("run"); + } + return this->_run_callable; + } + virtual void run(const refs::BorrowedObject nrun); + + virtual const OwnedGreenlet parent() const; + virtual void parent(const refs::BorrowedObject new_parent); + + virtual const refs::BorrowedMainGreenlet main_greenlet() const; + + virtual void murder_in_place(); + virtual bool belongs_to_thread(const ThreadState* state) const; + virtual int tp_traverse(visitproc visit, void* arg); + virtual int tp_clear(); + class ParentIsCurrentGuard + { + private: + OwnedGreenlet oldparent; + UserGreenlet* greenlet; + G_NO_COPIES_OF_CLS(ParentIsCurrentGuard); + public: + ParentIsCurrentGuard(UserGreenlet* p, const ThreadState& thread_state); + ~ParentIsCurrentGuard(); + }; + virtual OwnedObject throw_GreenletExit_during_dealloc(const ThreadState& current_thread_state); + protected: + virtual switchstack_result_t g_initialstub(void* mark); + private: + // This function isn't meant to return. + // This accepts raw pointers and the ownership of them at the + // same time. The caller should use ``inner_bootstrap(origin.relinquish_ownership())``. + void inner_bootstrap(PyGreenlet* origin_greenlet, PyObject* run); + }; + + class BrokenGreenlet : public UserGreenlet + { + private: + static greenlet::PythonAllocator allocator; + public: + bool _force_switch_error = false; + bool _force_slp_switch_error = false; + + static void* operator new(size_t UNUSED(count)); + static void operator delete(void* ptr); + BrokenGreenlet(PyGreenlet* p, BorrowedGreenlet the_parent) + : UserGreenlet(p, the_parent) + {} + virtual ~BrokenGreenlet() + {} + + virtual switchstack_result_t g_switchstack(void); + virtual bool force_slp_switch_error() const noexcept; + + }; + + class MainGreenlet : public Greenlet + { + private: + static greenlet::PythonAllocator allocator; + refs::BorrowedMainGreenlet _self; + ThreadState* _thread_state; + G_NO_COPIES_OF_CLS(MainGreenlet); + public: + static void* operator new(size_t UNUSED(count)); + static void operator delete(void* ptr); + + MainGreenlet(refs::BorrowedMainGreenlet::PyType*, ThreadState*); + virtual ~MainGreenlet(); + + + virtual const OwnedObject& run() const; + virtual void run(const refs::BorrowedObject nrun); + + virtual const OwnedGreenlet parent() const; + virtual void parent(const refs::BorrowedObject new_parent); + + virtual const refs::BorrowedMainGreenlet main_greenlet() const; + + virtual refs::BorrowedMainGreenlet find_main_greenlet_in_lineage() const; + virtual bool was_running_in_dead_thread() const noexcept; + virtual ThreadState* thread_state() const noexcept; + void thread_state(ThreadState*) noexcept; + virtual OwnedObject g_switch(); + virtual int tp_traverse(visitproc visit, void* arg); + }; + + // Instantiate one on the stack to save the GC state, + // and then disable GC. When it goes out of scope, GC will be + // restored to its original state. Sadly, these APIs are only + // available on 3.10+; luckily, we only need them on 3.11+. +#if GREENLET_PY310 + class GCDisabledGuard + { + private: + int was_enabled = 0; + public: + GCDisabledGuard() + : was_enabled(PyGC_IsEnabled()) + { + PyGC_Disable(); + } + + ~GCDisabledGuard() + { + if (this->was_enabled) { + PyGC_Enable(); + } + } + }; +#endif + + OwnedObject& operator<<=(OwnedObject& lhs, greenlet::SwitchingArgs& rhs) noexcept; + + //TODO: Greenlet::g_switch() should call this automatically on its + //return value. As it is, the module code is calling it. + static inline OwnedObject + single_result(const OwnedObject& results) + { + if (results + && PyTuple_Check(results.borrow()) + && PyTuple_GET_SIZE(results.borrow()) == 1) { + PyObject* result = PyTuple_GET_ITEM(results.borrow(), 0); + assert(result); + return OwnedObject::owning(result); + } + return results; + } + + + static OwnedObject + g_handle_exit(const OwnedObject& greenlet_result); + + + template + void operator<<(const PyThreadState *const lhs, T& rhs) + { + rhs.operator<<(lhs); + } + +} // namespace greenlet ; + +#endif diff --git a/venv/lib/python3.12/site-packages/greenlet/TGreenletGlobals.cpp b/venv/lib/python3.12/site-packages/greenlet/TGreenletGlobals.cpp new file mode 100644 index 0000000..0087d2f --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/TGreenletGlobals.cpp @@ -0,0 +1,94 @@ +/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */ +/** + * Implementation of GreenletGlobals. + * + * Format with: + * clang-format -i --style=file src/greenlet/greenlet.c + * + * + * Fix missing braces with: + * clang-tidy src/greenlet/greenlet.c -fix -checks="readability-braces-around-statements" +*/ +#ifndef T_GREENLET_GLOBALS +#define T_GREENLET_GLOBALS + +#include "greenlet_refs.hpp" +#include "greenlet_exceptions.hpp" +#include "greenlet_thread_support.hpp" +#include "greenlet_internal.hpp" + +namespace greenlet { + +// This encapsulates what were previously module global "constants" +// established at init time. +// This is a step towards Python3 style module state that allows +// reloading. +// +// In an earlier iteration of this code, we used placement new to be +// able to allocate this object statically still, so that references +// to its members don't incur an extra pointer indirection. +// But under some scenarios, that could result in crashes at +// shutdown because apparently the destructor was getting run twice? +class GreenletGlobals +{ + +public: + const greenlet::refs::ImmortalEventName event_switch; + const greenlet::refs::ImmortalEventName event_throw; + const greenlet::refs::ImmortalException PyExc_GreenletError; + const greenlet::refs::ImmortalException PyExc_GreenletExit; + const greenlet::refs::ImmortalObject empty_tuple; + const greenlet::refs::ImmortalObject empty_dict; + const greenlet::refs::ImmortalString str_run; + Mutex* const thread_states_to_destroy_lock; + greenlet::cleanup_queue_t thread_states_to_destroy; + + GreenletGlobals() : + event_switch("switch"), + event_throw("throw"), + PyExc_GreenletError("greenlet.error"), + PyExc_GreenletExit("greenlet.GreenletExit", PyExc_BaseException), + empty_tuple(Require(PyTuple_New(0))), + empty_dict(Require(PyDict_New())), + str_run("run"), + thread_states_to_destroy_lock(new Mutex()) + {} + + ~GreenletGlobals() + { + // This object is (currently) effectively immortal, and not + // just because of those placement new tricks; if we try to + // deallocate the static object we allocated, and overwrote, + // we would be doing so at C++ teardown time, which is after + // the final Python GIL is released, and we can't use the API + // then. + // (The members will still be destructed, but they also don't + // do any deallocation.) + } + + void queue_to_destroy(ThreadState* ts) const + { + // we're currently accessed through a static const object, + // implicitly marking our members as const, so code can't just + // call push_back (or pop_back) without casting away the + // const. + // + // Do that for callers. + greenlet::cleanup_queue_t& q = const_cast(this->thread_states_to_destroy); + q.push_back(ts); + } + + ThreadState* take_next_to_destroy() const + { + greenlet::cleanup_queue_t& q = const_cast(this->thread_states_to_destroy); + ThreadState* result = q.back(); + q.pop_back(); + return result; + } +}; + +}; // namespace greenlet + +static const greenlet::GreenletGlobals* mod_globs; + +#endif // T_GREENLET_GLOBALS diff --git a/venv/lib/python3.12/site-packages/greenlet/TMainGreenlet.cpp b/venv/lib/python3.12/site-packages/greenlet/TMainGreenlet.cpp new file mode 100644 index 0000000..ee01481 --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/TMainGreenlet.cpp @@ -0,0 +1,160 @@ +/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */ +/** + * Implementation of greenlet::MainGreenlet. + * + * Format with: + * clang-format -i --style=file src/greenlet/greenlet.c + * + * + * Fix missing braces with: + * clang-tidy src/greenlet/greenlet.c -fix -checks="readability-braces-around-statements" +*/ +#ifndef T_MAIN_GREENLET_CPP +#define T_MAIN_GREENLET_CPP + +#include "TGreenlet.hpp" + +#ifdef Py_GIL_DISABLED +#include +#endif + +// Incremented when we create a main greenlet, in a new thread, decremented +// when it is destroyed. +#ifdef Py_GIL_DISABLED +static std::atomic G_TOTAL_MAIN_GREENLETS(0); +#else +// Protected by the GIL. +static Py_ssize_t G_TOTAL_MAIN_GREENLETS; +#endif + +namespace greenlet { +greenlet::PythonAllocator MainGreenlet::allocator; + +void* MainGreenlet::operator new(size_t UNUSED(count)) +{ + return allocator.allocate(1); +} + + +void MainGreenlet::operator delete(void* ptr) +{ + return allocator.deallocate(static_cast(ptr), + 1); +} + + +MainGreenlet::MainGreenlet(PyGreenlet* p, ThreadState* state) + : Greenlet(p, StackState::make_main()), + _self(p), + _thread_state(state) +{ + G_TOTAL_MAIN_GREENLETS++; +} + +MainGreenlet::~MainGreenlet() +{ + G_TOTAL_MAIN_GREENLETS--; + this->tp_clear(); +} + +ThreadState* +MainGreenlet::thread_state() const noexcept +{ + return this->_thread_state; +} + +void +MainGreenlet::thread_state(ThreadState* t) noexcept +{ + assert(!t); + this->_thread_state = t; +} + + +const BorrowedMainGreenlet +MainGreenlet::main_greenlet() const +{ + return this->_self; +} + +BorrowedMainGreenlet +MainGreenlet::find_main_greenlet_in_lineage() const +{ + return BorrowedMainGreenlet(this->_self); +} + +bool +MainGreenlet::was_running_in_dead_thread() const noexcept +{ + return !this->_thread_state; +} + +OwnedObject +MainGreenlet::g_switch() +{ + try { + this->check_switch_allowed(); + } + catch (const PyErrOccurred&) { + this->release_args(); + throw; + } + + switchstack_result_t err = this->g_switchstack(); + if (err.status < 0) { + // XXX: This code path is untested, but it is shared + // with the UserGreenlet path that is tested. + return this->on_switchstack_or_initialstub_failure( + this, + err, + true, // target was me + false // was initial stub + ); + } + + return err.the_new_current_greenlet->g_switch_finish(err); +} + +int +MainGreenlet::tp_traverse(visitproc visit, void* arg) +{ + if (this->_thread_state) { + // we've already traversed main, (self), don't do it again. + int result = this->_thread_state->tp_traverse(visit, arg, false); + if (result) { + return result; + } + } + return Greenlet::tp_traverse(visit, arg); +} + +const OwnedObject& +MainGreenlet::run() const +{ + throw AttributeError("Main greenlets do not have a run attribute."); +} + +void +MainGreenlet::run(const BorrowedObject UNUSED(nrun)) +{ + throw AttributeError("Main greenlets do not have a run attribute."); +} + +void +MainGreenlet::parent(const BorrowedObject raw_new_parent) +{ + if (!raw_new_parent) { + throw AttributeError("can't delete attribute"); + } + throw AttributeError("cannot set the parent of a main greenlet"); +} + +const OwnedGreenlet +MainGreenlet::parent() const +{ + return OwnedGreenlet(); // null becomes None +} + +}; // namespace greenlet + +#endif diff --git a/venv/lib/python3.12/site-packages/greenlet/TPythonState.cpp b/venv/lib/python3.12/site-packages/greenlet/TPythonState.cpp new file mode 100644 index 0000000..6375922 --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/TPythonState.cpp @@ -0,0 +1,439 @@ +#ifndef GREENLET_PYTHON_STATE_CPP +#define GREENLET_PYTHON_STATE_CPP + +#include +#include "TGreenlet.hpp" + +namespace greenlet { + +PythonState::PythonState() + : _top_frame() +#if GREENLET_USE_CFRAME + ,cframe(nullptr) + ,use_tracing(0) +#endif +#if GREENLET_PY314 + ,py_recursion_depth(0) + ,current_executor(nullptr) + ,stackpointer(nullptr) + #ifdef Py_GIL_DISABLED + ,c_stack_refs(nullptr) + #endif +#elif GREENLET_PY312 + ,py_recursion_depth(0) + ,c_recursion_depth(0) +#else + ,recursion_depth(0) +#endif +#if GREENLET_PY313 + ,delete_later(nullptr) +#else + ,trash_delete_nesting(0) +#endif +#if GREENLET_PY311 + ,current_frame(nullptr) + ,datastack_chunk(nullptr) + ,datastack_top(nullptr) + ,datastack_limit(nullptr) +#endif +{ +#if GREENLET_USE_CFRAME + /* + The PyThreadState->cframe pointer usually points to memory on + the stack, alloceted in a call into PyEval_EvalFrameDefault. + + Initially, before any evaluation begins, it points to the + initial PyThreadState object's ``root_cframe`` object, which is + statically allocated for the lifetime of the thread. + + A greenlet can last for longer than a call to + PyEval_EvalFrameDefault, so we can't set its ``cframe`` pointer + to be the current ``PyThreadState->cframe``; nor could we use + one from the greenlet parent for the same reason. Yet a further + no: we can't allocate one scoped to the greenlet and then + destroy it when the greenlet is deallocated, because inside the + interpreter the _PyCFrame objects form a linked list, and that too + can result in accessing memory beyond its dynamic lifetime (if + the greenlet doesn't actually finish before it dies, its entry + could still be in the list). + + Using the ``root_cframe`` is problematic, though, because its + members are never modified by the interpreter and are set to 0, + meaning that its ``use_tracing`` flag is never updated. We don't + want to modify that value in the ``root_cframe`` ourself: it + *shouldn't* matter much because we should probably never get + back to the point where that's the only cframe on the stack; + even if it did matter, the major consequence of an incorrect + value for ``use_tracing`` is that if its true the interpreter + does some extra work --- however, it's just good code hygiene. + + Our solution: before a greenlet runs, after its initial + creation, it uses the ``root_cframe`` just to have something to + put there. However, once the greenlet is actually switched to + for the first time, ``g_initialstub`` (which doesn't actually + "return" while the greenlet is running) stores a new _PyCFrame on + its local stack, and copies the appropriate values from the + currently running _PyCFrame; this is then made the _PyCFrame for the + newly-minted greenlet. ``g_initialstub`` then proceeds to call + ``glet.run()``, which results in ``PyEval_...`` adding the + _PyCFrame to the list. Switches continue as normal. Finally, when + the greenlet finishes, the call to ``glet.run()`` returns and + the _PyCFrame is taken out of the linked list and the stack value + is now unused and free to expire. + + XXX: I think we can do better. If we're deallocing in the same + thread, can't we traverse the list and unlink our frame? + Can we just keep a reference to the thread state in case we + dealloc in another thread? (Is that even possible if we're still + running and haven't returned from g_initialstub?) + */ + this->cframe = &PyThreadState_GET()->root_cframe; +#endif +} + + +inline void PythonState::may_switch_away() noexcept +{ +#if GREENLET_PY311 + // PyThreadState_GetFrame is probably going to have to allocate a + // new frame object. That may trigger garbage collection. Because + // we call this during the early phases of a switch (it doesn't + // matter to which greenlet, as this has a global effect), if a GC + // triggers a switch away, two things can happen, both bad: + // - We might not get switched back to, halting forward progress. + // this is pathological, but possible. + // - We might get switched back to with a different set of + // arguments or a throw instead of a switch. That would corrupt + // our state (specifically, PyErr_Occurred() and this->args() + // would no longer agree). + // + // Thus, when we call this API, we need to have GC disabled. + // This method serves as a bottleneck we call when maybe beginning + // a switch. In this way, it is always safe -- no risk of GC -- to + // use ``_GetFrame()`` whenever we need to, just as it was in + // <=3.10 (because subsequent calls will be cached and not + // allocate memory). + + GCDisabledGuard no_gc; + Py_XDECREF(PyThreadState_GetFrame(PyThreadState_GET())); +#endif +} + +void PythonState::operator<<(const PyThreadState *const tstate) noexcept +{ + this->_context.steal(tstate->context); +#if GREENLET_USE_CFRAME + /* + IMPORTANT: ``cframe`` is a pointer into the STACK. Thus, because + the call to ``slp_switch()`` changes the contents of the stack, + you cannot read from ``ts_current->cframe`` after that call and + necessarily get the same values you get from reading it here. + Anything you need to restore from now to then must be saved in a + global/threadlocal variable (because we can't use stack + variables here either). For things that need to persist across + the switch, use `will_switch_from`. + */ + this->cframe = tstate->cframe; + #if !GREENLET_PY312 + this->use_tracing = tstate->cframe->use_tracing; + #endif +#endif // GREENLET_USE_CFRAME +#if GREENLET_PY311 + #if GREENLET_PY314 + this->py_recursion_depth = tstate->py_recursion_limit - tstate->py_recursion_remaining; + this->current_executor = tstate->current_executor; + #ifdef Py_GIL_DISABLED + this->c_stack_refs = ((_PyThreadStateImpl*)tstate)->c_stack_refs; + #endif + #elif GREENLET_PY312 + this->py_recursion_depth = tstate->py_recursion_limit - tstate->py_recursion_remaining; + this->c_recursion_depth = Py_C_RECURSION_LIMIT - tstate->c_recursion_remaining; + #else // not 312 + this->recursion_depth = tstate->recursion_limit - tstate->recursion_remaining; + #endif // GREENLET_PY312 + #if GREENLET_PY313 + this->current_frame = tstate->current_frame; + #elif GREENLET_USE_CFRAME + this->current_frame = tstate->cframe->current_frame; + #endif + this->datastack_chunk = tstate->datastack_chunk; + this->datastack_top = tstate->datastack_top; + this->datastack_limit = tstate->datastack_limit; + + PyFrameObject *frame = PyThreadState_GetFrame((PyThreadState *)tstate); + Py_XDECREF(frame); // PyThreadState_GetFrame gives us a new + // reference. + this->_top_frame.steal(frame); + #if GREENLET_PY314 + if (this->top_frame()) { + this->stackpointer = this->_top_frame->f_frame->stackpointer; + } + else { + this->stackpointer = nullptr; + } + #endif + #if GREENLET_PY313 + this->delete_later = Py_XNewRef(tstate->delete_later); + #elif GREENLET_PY312 + this->trash_delete_nesting = tstate->trash.delete_nesting; + #else // not 312 + this->trash_delete_nesting = tstate->trash_delete_nesting; + #endif // GREENLET_PY312 +#else // Not 311 + this->recursion_depth = tstate->recursion_depth; + this->_top_frame.steal(tstate->frame); + this->trash_delete_nesting = tstate->trash_delete_nesting; +#endif // GREENLET_PY311 +} + +#if GREENLET_PY312 +void GREENLET_NOINLINE(PythonState::unexpose_frames)() +{ + if (!this->top_frame()) { + return; + } + + // See GreenletState::expose_frames() and the comment on frames_were_exposed + // for more information about this logic. + _PyInterpreterFrame *iframe = this->_top_frame->f_frame; + while (iframe != nullptr) { + _PyInterpreterFrame *prev_exposed = iframe->previous; + assert(iframe->frame_obj); + memcpy(&iframe->previous, &iframe->frame_obj->_f_frame_data[0], + sizeof(void *)); + iframe = prev_exposed; + } +} +#else +void PythonState::unexpose_frames() +{} +#endif + +void PythonState::operator>>(PyThreadState *const tstate) noexcept +{ + tstate->context = this->_context.relinquish_ownership(); + /* Incrementing this value invalidates the contextvars cache, + which would otherwise remain valid across switches */ + tstate->context_ver++; +#if GREENLET_USE_CFRAME + tstate->cframe = this->cframe; + /* + If we were tracing, we need to keep tracing. + There should never be the possibility of hitting the + root_cframe here. See note above about why we can't + just copy this from ``origin->cframe->use_tracing``. + */ + #if !GREENLET_PY312 + tstate->cframe->use_tracing = this->use_tracing; + #endif +#endif // GREENLET_USE_CFRAME +#if GREENLET_PY311 + #if GREENLET_PY314 + tstate->py_recursion_remaining = tstate->py_recursion_limit - this->py_recursion_depth; + tstate->current_executor = this->current_executor; + #ifdef Py_GIL_DISABLED + ((_PyThreadStateImpl*)tstate)->c_stack_refs = this->c_stack_refs; + #endif + this->unexpose_frames(); + #elif GREENLET_PY312 + tstate->py_recursion_remaining = tstate->py_recursion_limit - this->py_recursion_depth; + tstate->c_recursion_remaining = Py_C_RECURSION_LIMIT - this->c_recursion_depth; + this->unexpose_frames(); + #else // \/ 3.11 + tstate->recursion_remaining = tstate->recursion_limit - this->recursion_depth; + #endif // GREENLET_PY312 + #if GREENLET_PY313 + tstate->current_frame = this->current_frame; + #elif GREENLET_USE_CFRAME + tstate->cframe->current_frame = this->current_frame; + #endif + tstate->datastack_chunk = this->datastack_chunk; + tstate->datastack_top = this->datastack_top; + tstate->datastack_limit = this->datastack_limit; +#if GREENLET_PY314 && defined(Py_GIL_DISABLED) + if (this->top_frame()) { + this->_top_frame->f_frame->stackpointer = this->stackpointer; + } +#endif + this->_top_frame.relinquish_ownership(); + #if GREENLET_PY313 + Py_XDECREF(tstate->delete_later); + tstate->delete_later = this->delete_later; + Py_CLEAR(this->delete_later); + #elif GREENLET_PY312 + tstate->trash.delete_nesting = this->trash_delete_nesting; + #else // not 3.12 + tstate->trash_delete_nesting = this->trash_delete_nesting; + #endif // GREENLET_PY312 +#else // not 3.11 + tstate->frame = this->_top_frame.relinquish_ownership(); + tstate->recursion_depth = this->recursion_depth; + tstate->trash_delete_nesting = this->trash_delete_nesting; +#endif // GREENLET_PY311 +} + +inline void PythonState::will_switch_from(PyThreadState *const origin_tstate) noexcept +{ +#if GREENLET_USE_CFRAME && !GREENLET_PY312 + // The weird thing is, we don't actually save this for an + // effect on the current greenlet, it's saved for an + // effect on the target greenlet. That is, we want + // continuity of this setting across the greenlet switch. + this->use_tracing = origin_tstate->cframe->use_tracing; +#endif +} + +void PythonState::set_initial_state(const PyThreadState* const tstate) noexcept +{ + this->_top_frame = nullptr; +#if GREENLET_PY314 + this->py_recursion_depth = tstate->py_recursion_limit - tstate->py_recursion_remaining; + this->current_executor = tstate->current_executor; +#elif GREENLET_PY312 + this->py_recursion_depth = tstate->py_recursion_limit - tstate->py_recursion_remaining; + // XXX: TODO: Comment from a reviewer: + // Should this be ``Py_C_RECURSION_LIMIT - tstate->c_recursion_remaining``? + // But to me it looks more like that might not be the right + // initialization either? + this->c_recursion_depth = tstate->py_recursion_limit - tstate->py_recursion_remaining; +#elif GREENLET_PY311 + this->recursion_depth = tstate->recursion_limit - tstate->recursion_remaining; +#else + this->recursion_depth = tstate->recursion_depth; +#endif +} +// TODO: Better state management about when we own the top frame. +int PythonState::tp_traverse(visitproc visit, void* arg, bool own_top_frame) noexcept +{ + Py_VISIT(this->_context.borrow()); + if (own_top_frame) { + Py_VISIT(this->_top_frame.borrow()); + } +#if GREENLET_PY314 + // TODO: Should we be visiting the c_stack_refs objects? + // CPython uses a specific macro to do that which takes into + // account boxing and null values and then calls + // ``_PyGC_VisitStackRef``, but we don't have access to that, and + // we can't duplicate it ourself (because it compares + // ``visitproc`` to another function we can't access). + // The naive way of looping over c_stack_refs->ref and visiting + // those crashes the process (at least with GIL disabled). +#endif + return 0; +} + +void PythonState::tp_clear(bool own_top_frame) noexcept +{ + PythonStateContext::tp_clear(); + // If we get here owning a frame, + // we got dealloc'd without being finished. We may or may not be + // in the same thread. + if (own_top_frame) { + this->_top_frame.CLEAR(); + } +} + +#if GREENLET_USE_CFRAME +void PythonState::set_new_cframe(_PyCFrame& frame) noexcept +{ + frame = *PyThreadState_GET()->cframe; + /* Make the target greenlet refer to the stack value. */ + this->cframe = &frame; + /* + And restore the link to the previous frame so this one gets + unliked appropriately. + */ + this->cframe->previous = &PyThreadState_GET()->root_cframe; +} +#endif + +const PythonState::OwnedFrame& PythonState::top_frame() const noexcept +{ + return this->_top_frame; +} + +void PythonState::did_finish(PyThreadState* tstate) noexcept +{ +#if GREENLET_PY311 + // See https://github.com/gevent/gevent/issues/1924 and + // https://github.com/python-greenlet/greenlet/issues/328. In + // short, Python 3.11 allocates memory for frames as a sort of + // linked list that's kept as part of PyThreadState in the + // ``datastack_chunk`` member and friends. These are saved and + // restored as part of switching greenlets. + // + // When we initially switch to a greenlet, we set those to NULL. + // That causes the frame management code to treat this like a + // brand new thread and start a fresh list of chunks, beginning + // with a new "root" chunk. As we make calls in this greenlet, + // those chunks get added, and as calls return, they get popped. + // But the frame code (pystate.c) is careful to make sure that the + // root chunk never gets popped. + // + // Thus, when a greenlet exits for the last time, there will be at + // least a single root chunk that we must be responsible for + // deallocating. + // + // The complex part is that these chunks are allocated and freed + // using ``_PyObject_VirtualAlloc``/``Free``. Those aren't public + // functions, and they aren't exported for linking. It so happens + // that we know they are just thin wrappers around the Arena + // allocator, so we can use that directly to deallocate in a + // compatible way. + // + // CAUTION: Check this implementation detail on every major version. + // + // It might be nice to be able to do this in our destructor, but + // can we be sure that no one else is using that memory? Plus, as + // described below, our pointers may not even be valid anymore. As + // a special case, there is one time that we know we can do this, + // and that's from the destructor of the associated UserGreenlet + // (NOT main greenlet) + PyObjectArenaAllocator alloc; + _PyStackChunk* chunk = nullptr; + if (tstate) { + // We really did finish, we can never be switched to again. + chunk = tstate->datastack_chunk; + // Unfortunately, we can't do much sanity checking. Our + // this->datastack_chunk pointer is out of date (evaluation may + // have popped down through it already) so we can't verify that + // we deallocate it. I don't think we can even check datastack_top + // for the same reason. + + PyObject_GetArenaAllocator(&alloc); + tstate->datastack_chunk = nullptr; + tstate->datastack_limit = nullptr; + tstate->datastack_top = nullptr; + + } + else if (this->datastack_chunk) { + // The UserGreenlet (NOT the main greenlet!) is being deallocated. If we're + // still holding a stack chunk, it's garbage because we know + // we can never switch back to let cPython clean it up. + // Because the last time we got switched away from, and we + // haven't run since then, we know our chain is valid and can + // be dealloced. + chunk = this->datastack_chunk; + PyObject_GetArenaAllocator(&alloc); + } + + if (alloc.free && chunk) { + // In case the arena mechanism has been torn down already. + while (chunk) { + _PyStackChunk *prev = chunk->previous; + chunk->previous = nullptr; + alloc.free(alloc.ctx, chunk, chunk->size); + chunk = prev; + } + } + + this->datastack_chunk = nullptr; + this->datastack_limit = nullptr; + this->datastack_top = nullptr; +#endif +} + + +}; // namespace greenlet + +#endif // GREENLET_PYTHON_STATE_CPP diff --git a/venv/lib/python3.12/site-packages/greenlet/TStackState.cpp b/venv/lib/python3.12/site-packages/greenlet/TStackState.cpp new file mode 100644 index 0000000..9743ab5 --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/TStackState.cpp @@ -0,0 +1,265 @@ +#ifndef GREENLET_STACK_STATE_CPP +#define GREENLET_STACK_STATE_CPP + +#include "TGreenlet.hpp" + +namespace greenlet { + +#ifdef GREENLET_USE_STDIO +#include +using std::cerr; +using std::endl; + +std::ostream& operator<<(std::ostream& os, const StackState& s) +{ + os << "StackState(stack_start=" << (void*)s._stack_start + << ", stack_stop=" << (void*)s.stack_stop + << ", stack_copy=" << (void*)s.stack_copy + << ", stack_saved=" << s._stack_saved + << ", stack_prev=" << s.stack_prev + << ", addr=" << &s + << ")"; + return os; +} +#endif + +StackState::StackState(void* mark, StackState& current) + : _stack_start(nullptr), + stack_stop((char*)mark), + stack_copy(nullptr), + _stack_saved(0), + /* Skip a dying greenlet */ + stack_prev(current._stack_start + ? ¤t + : current.stack_prev) +{ +} + +StackState::StackState() + : _stack_start(nullptr), + stack_stop(nullptr), + stack_copy(nullptr), + _stack_saved(0), + stack_prev(nullptr) +{ +} + +StackState::StackState(const StackState& other) +// can't use a delegating constructor because of +// MSVC for Python 2.7 + : _stack_start(nullptr), + stack_stop(nullptr), + stack_copy(nullptr), + _stack_saved(0), + stack_prev(nullptr) +{ + this->operator=(other); +} + +StackState& StackState::operator=(const StackState& other) +{ + if (&other == this) { + return *this; + } + if (other._stack_saved) { + throw std::runtime_error("Refusing to steal memory."); + } + + //If we have memory allocated, dispose of it + this->free_stack_copy(); + + this->_stack_start = other._stack_start; + this->stack_stop = other.stack_stop; + this->stack_copy = other.stack_copy; + this->_stack_saved = other._stack_saved; + this->stack_prev = other.stack_prev; + return *this; +} + +inline void StackState::free_stack_copy() noexcept +{ + PyMem_Free(this->stack_copy); + this->stack_copy = nullptr; + this->_stack_saved = 0; +} + +inline void StackState::copy_heap_to_stack(const StackState& current) noexcept +{ + + /* Restore the heap copy back into the C stack */ + if (this->_stack_saved != 0) { + memcpy(this->_stack_start, this->stack_copy, this->_stack_saved); + this->free_stack_copy(); + } + StackState* owner = const_cast(¤t); + if (!owner->_stack_start) { + owner = owner->stack_prev; /* greenlet is dying, skip it */ + } + while (owner && owner->stack_stop <= this->stack_stop) { + // cerr << "\tOwner: " << owner << endl; + owner = owner->stack_prev; /* find greenlet with more stack */ + } + this->stack_prev = owner; + // cerr << "\tFinished with: " << *this << endl; +} + +inline int StackState::copy_stack_to_heap_up_to(const char* const stop) noexcept +{ + /* Save more of g's stack into the heap -- at least up to 'stop' + g->stack_stop |________| + | | + | __ stop . . . . . + | | ==> . . + |________| _______ + | | | | + | | | | + g->stack_start | | |_______| g->stack_copy + */ + intptr_t sz1 = this->_stack_saved; + intptr_t sz2 = stop - this->_stack_start; + assert(this->_stack_start); + if (sz2 > sz1) { + char* c = (char*)PyMem_Realloc(this->stack_copy, sz2); + if (!c) { + PyErr_NoMemory(); + return -1; + } + memcpy(c + sz1, this->_stack_start + sz1, sz2 - sz1); + this->stack_copy = c; + this->_stack_saved = sz2; + } + return 0; +} + +inline int StackState::copy_stack_to_heap(char* const stackref, + const StackState& current) noexcept +{ + /* must free all the C stack up to target_stop */ + const char* const target_stop = this->stack_stop; + + StackState* owner = const_cast(¤t); + assert(owner->_stack_saved == 0); // everything is present on the stack + if (!owner->_stack_start) { + owner = owner->stack_prev; /* not saved if dying */ + } + else { + owner->_stack_start = stackref; + } + + while (owner->stack_stop < target_stop) { + /* ts_current is entierely within the area to free */ + if (owner->copy_stack_to_heap_up_to(owner->stack_stop)) { + return -1; /* XXX */ + } + owner = owner->stack_prev; + } + if (owner != this) { + if (owner->copy_stack_to_heap_up_to(target_stop)) { + return -1; /* XXX */ + } + } + return 0; +} + +inline bool StackState::started() const noexcept +{ + return this->stack_stop != nullptr; +} + +inline bool StackState::main() const noexcept +{ + return this->stack_stop == (char*)-1; +} + +inline bool StackState::active() const noexcept +{ + return this->_stack_start != nullptr; +} + +inline void StackState::set_active() noexcept +{ + assert(this->_stack_start == nullptr); + this->_stack_start = (char*)1; +} + +inline void StackState::set_inactive() noexcept +{ + this->_stack_start = nullptr; + // XXX: What if we still have memory out there? + // That case is actually triggered by + // test_issue251_issue252_explicit_reference_not_collectable (greenlet.tests.test_leaks.TestLeaks) + // and + // test_issue251_issue252_need_to_collect_in_background + // (greenlet.tests.test_leaks.TestLeaks) + // + // Those objects never get deallocated, so the destructor never + // runs. + // It *seems* safe to clean up the memory here? + if (this->_stack_saved) { + this->free_stack_copy(); + } +} + +inline intptr_t StackState::stack_saved() const noexcept +{ + return this->_stack_saved; +} + +inline char* StackState::stack_start() const noexcept +{ + return this->_stack_start; +} + + +inline StackState StackState::make_main() noexcept +{ + StackState s; + s._stack_start = (char*)1; + s.stack_stop = (char*)-1; + return s; +} + +StackState::~StackState() +{ + if (this->_stack_saved != 0) { + this->free_stack_copy(); + } +} + +void StackState::copy_from_stack(void* vdest, const void* vsrc, size_t n) const +{ + char* dest = static_cast(vdest); + const char* src = static_cast(vsrc); + if (src + n <= this->_stack_start + || src >= this->_stack_start + this->_stack_saved + || this->_stack_saved == 0) { + // Nothing we're copying was spilled from the stack + memcpy(dest, src, n); + return; + } + + if (src < this->_stack_start) { + // Copy the part before the saved stack. + // We know src + n > _stack_start due to the test above. + const size_t nbefore = this->_stack_start - src; + memcpy(dest, src, nbefore); + dest += nbefore; + src += nbefore; + n -= nbefore; + } + // We know src >= _stack_start after the before-copy, and + // src < _stack_start + _stack_saved due to the first if condition + size_t nspilled = std::min(n, this->_stack_start + this->_stack_saved - src); + memcpy(dest, this->stack_copy + (src - this->_stack_start), nspilled); + dest += nspilled; + src += nspilled; + n -= nspilled; + if (n > 0) { + // Copy the part after the saved stack + memcpy(dest, src, n); + } +} + +}; // namespace greenlet + +#endif // GREENLET_STACK_STATE_CPP diff --git a/venv/lib/python3.12/site-packages/greenlet/TThreadState.hpp b/venv/lib/python3.12/site-packages/greenlet/TThreadState.hpp new file mode 100644 index 0000000..b3451a0 --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/TThreadState.hpp @@ -0,0 +1,523 @@ +#ifndef GREENLET_THREAD_STATE_HPP +#define GREENLET_THREAD_STATE_HPP + +#include +#include +#include + +#include "greenlet_internal.hpp" +#include "greenlet_refs.hpp" +#include "greenlet_thread_support.hpp" + +using greenlet::refs::BorrowedObject; +using greenlet::refs::BorrowedGreenlet; +using greenlet::refs::BorrowedMainGreenlet; +using greenlet::refs::OwnedMainGreenlet; +using greenlet::refs::OwnedObject; +using greenlet::refs::OwnedGreenlet; +using greenlet::refs::OwnedList; +using greenlet::refs::PyErrFetchParam; +using greenlet::refs::PyArgParseParam; +using greenlet::refs::ImmortalString; +using greenlet::refs::CreatedModule; +using greenlet::refs::PyErrPieces; +using greenlet::refs::NewReference; + +namespace greenlet { +/** + * Thread-local state of greenlets. + * + * Each native thread will get exactly one of these objects, + * automatically accessed through the best available thread-local + * mechanism the compiler supports (``thread_local`` for C++11 + * compilers or ``__thread``/``declspec(thread)`` for older GCC/clang + * or MSVC, respectively.) + * + * Previously, we kept thread-local state mostly in a bunch of + * ``static volatile`` variables in the main greenlet file.. This had + * the problem of requiring extra checks, loops, and great care + * accessing these variables if we potentially invoked any Python code + * that could release the GIL, because the state could change out from + * under us. Making the variables thread-local solves this problem. + * + * When we detected that a greenlet API accessing the current greenlet + * was invoked from a different thread than the greenlet belonged to, + * we stored a reference to the greenlet in the Python thread + * dictionary for the thread the greenlet belonged to. This could lead + * to memory leaks if the thread then exited (because of a reference + * cycle, as greenlets referred to the thread dictionary, and deleting + * non-current greenlets leaked their frame plus perhaps arguments on + * the C stack). If a thread exited while still having running + * greenlet objects (perhaps that had just switched back to the main + * greenlet), and did not invoke one of the greenlet APIs *in that + * thread, immediately before it exited, without some other thread + * then being invoked*, such a leak was guaranteed. + * + * This can be partly solved by using compiler thread-local variables + * instead of the Python thread dictionary, thus avoiding a cycle. + * + * To fully solve this problem, we need a reliable way to know that a + * thread is done and we should clean up the main greenlet. On POSIX, + * we can use the destructor function of ``pthread_key_create``, but + * there's nothing similar on Windows; a C++11 thread local object + * reliably invokes its destructor when the thread it belongs to exits + * (non-C++11 compilers offer ``__thread`` or ``declspec(thread)`` to + * create thread-local variables, but they can't hold C++ objects that + * invoke destructors; the C++11 version is the most portable solution + * I found). When the thread exits, we can drop references and + * otherwise manipulate greenlets and frames that we know can no + * longer be switched to. + * + * There are two small wrinkles. The first is that when the thread + * exits, it is too late to actually invoke Python APIs: the Python + * thread state is gone, and the GIL is released. To solve *this* + * problem, our destructor uses ``Py_AddPendingCall`` to transfer the + * destruction work to the main thread. + * + * The second is that once the thread exits, the thread local object + * is invalid and we can't even access a pointer to it, so we can't + * pass it to ``Py_AddPendingCall``. This is handled by actually using + * a second object that's thread local (ThreadStateCreator) and having + * it dynamically allocate this object so it can live until the + * pending call runs. + */ + + + +class ThreadState { +private: + // As of commit 08ad1dd7012b101db953f492e0021fb08634afad + // this class needed 56 bytes in o Py_DEBUG build + // on 64-bit macOS 11. + // Adding the vector takes us up to 80 bytes () + + /* Strong reference to the main greenlet */ + OwnedMainGreenlet main_greenlet; + + /* Strong reference to the current greenlet. */ + OwnedGreenlet current_greenlet; + + /* Strong reference to the trace function, if any. */ + OwnedObject tracefunc; + + typedef std::vector > deleteme_t; + /* A vector of raw PyGreenlet pointers representing things that need + deleted when this thread is running. The vector owns the + references, but you need to manually INCREF/DECREF as you use + them. We don't use a vector because we + make copy of this vector, and that would become O(n) as all the + refcounts are incremented in the copy. + */ + deleteme_t deleteme; + +#ifdef GREENLET_NEEDS_EXCEPTION_STATE_SAVED + void* exception_state; +#endif + +#ifdef Py_GIL_DISABLED + static std::atomic _clocks_used_doing_gc; +#else + static std::clock_t _clocks_used_doing_gc; +#endif + static ImmortalString get_referrers_name; + static PythonAllocator allocator; + + G_NO_COPIES_OF_CLS(ThreadState); + + + // Allocates a main greenlet for the thread state. If this fails, + // exits the process. Called only during constructing a ThreadState. + MainGreenlet* alloc_main() + { + PyGreenlet* gmain; + + /* create the main greenlet for this thread */ + gmain = reinterpret_cast(PyType_GenericAlloc(&PyGreenlet_Type, 0)); + if (gmain == NULL) { + throw PyFatalError("alloc_main failed to alloc"); //exits the process + } + + MainGreenlet* const main = new MainGreenlet(gmain, this); + + assert(Py_REFCNT(gmain) == 1); + assert(gmain->pimpl == main); + return main; + } + + +public: + static void* operator new(size_t UNUSED(count)) + { + return ThreadState::allocator.allocate(1); + } + + static void operator delete(void* ptr) + { + return ThreadState::allocator.deallocate(static_cast(ptr), + 1); + } + + static void init() + { + ThreadState::get_referrers_name = "get_referrers"; + ThreadState::set_clocks_used_doing_gc(0); + } + + ThreadState() + { + +#ifdef GREENLET_NEEDS_EXCEPTION_STATE_SAVED + this->exception_state = slp_get_exception_state(); +#endif + + // XXX: Potentially dangerous, exposing a not fully + // constructed object. + MainGreenlet* const main = this->alloc_main(); + this->main_greenlet = OwnedMainGreenlet::consuming( + main->self() + ); + assert(this->main_greenlet); + this->current_greenlet = main->self(); + // The main greenlet starts with 1 refs: The returned one. We + // then copied it to the current greenlet. + assert(this->main_greenlet.REFCNT() == 2); + } + + inline void restore_exception_state() + { +#ifdef GREENLET_NEEDS_EXCEPTION_STATE_SAVED + // It's probably important this be inlined and only call C + // functions to avoid adding an SEH frame. + slp_set_exception_state(this->exception_state); +#endif + } + + inline bool has_main_greenlet() const noexcept + { + return bool(this->main_greenlet); + } + + // Called from the ThreadStateCreator when we're in non-standard + // threading mode. In that case, there is an object in the Python + // thread state dictionary that points to us. The main greenlet + // also traverses into us, in which case it's crucial not to + // traverse back into the main greenlet. + int tp_traverse(visitproc visit, void* arg, bool traverse_main=true) + { + if (traverse_main) { + Py_VISIT(main_greenlet.borrow_o()); + } + if (traverse_main || current_greenlet != main_greenlet) { + Py_VISIT(current_greenlet.borrow_o()); + } + Py_VISIT(tracefunc.borrow()); + return 0; + } + + inline BorrowedMainGreenlet borrow_main_greenlet() const noexcept + { + assert(this->main_greenlet); + assert(this->main_greenlet.REFCNT() >= 2); + return this->main_greenlet; + }; + + inline OwnedMainGreenlet get_main_greenlet() const noexcept + { + return this->main_greenlet; + } + + /** + * In addition to returning a new reference to the currunt + * greenlet, this performs any maintenance needed. + */ + inline OwnedGreenlet get_current() + { + /* green_dealloc() cannot delete greenlets from other threads, so + it stores them in the thread dict; delete them now. */ + this->clear_deleteme_list(); + //assert(this->current_greenlet->main_greenlet == this->main_greenlet); + //assert(this->main_greenlet->main_greenlet == this->main_greenlet); + return this->current_greenlet; + } + + /** + * As for non-const get_current(); + */ + inline BorrowedGreenlet borrow_current() + { + this->clear_deleteme_list(); + return this->current_greenlet; + } + + /** + * Does no maintenance. + */ + inline OwnedGreenlet get_current() const + { + return this->current_greenlet; + } + + template + inline bool is_current(const refs::PyObjectPointer& obj) const + { + return this->current_greenlet.borrow_o() == obj.borrow_o(); + } + + inline void set_current(const OwnedGreenlet& target) + { + this->current_greenlet = target; + } + +private: + /** + * Deref and remove the greenlets from the deleteme list. Must be + * holding the GIL. + * + * If *murder* is true, then we must be called from a different + * thread than the one that these greenlets were running in. + * In that case, if the greenlet was actually running, we destroy + * the frame reference and otherwise make it appear dead before + * proceeding; otherwise, we would try (and fail) to raise an + * exception in it and wind up right back in this list. + */ + inline void clear_deleteme_list(const bool murder=false) + { + if (!this->deleteme.empty()) { + // It's possible we could add items to this list while + // running Python code if there's a thread switch, so we + // need to defensively copy it before that can happen. + deleteme_t copy = this->deleteme; + this->deleteme.clear(); // in case things come back on the list + for(deleteme_t::iterator it = copy.begin(), end = copy.end(); + it != end; + ++it ) { + PyGreenlet* to_del = *it; + if (murder) { + // Force each greenlet to appear dead; we can't raise an + // exception into it anymore anyway. + to_del->pimpl->murder_in_place(); + } + + // The only reference to these greenlets should be in + // this list, decreffing them should let them be + // deleted again, triggering calls to green_dealloc() + // in the correct thread (if we're not murdering). + // This may run arbitrary Python code and switch + // threads or greenlets! + Py_DECREF(to_del); + if (PyErr_Occurred()) { + PyErr_WriteUnraisable(nullptr); + PyErr_Clear(); + } + } + } + } + +public: + + /** + * Returns a new reference, or a false object. + */ + inline OwnedObject get_tracefunc() const + { + return tracefunc; + }; + + + inline void set_tracefunc(BorrowedObject tracefunc) + { + assert(tracefunc); + if (tracefunc == BorrowedObject(Py_None)) { + this->tracefunc.CLEAR(); + } + else { + this->tracefunc = tracefunc; + } + } + + /** + * Given a reference to a greenlet that some other thread + * attempted to delete (has a refcount of 0) store it for later + * deletion when the thread this state belongs to is current. + */ + inline void delete_when_thread_running(PyGreenlet* to_del) + { + Py_INCREF(to_del); + this->deleteme.push_back(to_del); + } + + /** + * Set to std::clock_t(-1) to disable. + */ + inline static std::clock_t clocks_used_doing_gc() + { +#ifdef Py_GIL_DISABLED + return ThreadState::_clocks_used_doing_gc.load(std::memory_order_relaxed); +#else + return ThreadState::_clocks_used_doing_gc; +#endif + } + + inline static void set_clocks_used_doing_gc(std::clock_t value) + { +#ifdef Py_GIL_DISABLED + ThreadState::_clocks_used_doing_gc.store(value, std::memory_order_relaxed); +#else + ThreadState::_clocks_used_doing_gc = value; +#endif + } + + inline static void add_clocks_used_doing_gc(std::clock_t value) + { +#ifdef Py_GIL_DISABLED + ThreadState::_clocks_used_doing_gc.fetch_add(value, std::memory_order_relaxed); +#else + ThreadState::_clocks_used_doing_gc += value; +#endif + } + + ~ThreadState() + { + if (!PyInterpreterState_Head()) { + // We shouldn't get here (our callers protect us) + // but if we do, all we can do is bail early. + return; + } + + // We should not have an "origin" greenlet; that only exists + // for the temporary time during a switch, which should not + // be in progress as the thread dies. + //assert(!this->switching_state.origin); + + this->tracefunc.CLEAR(); + + // Forcibly GC as much as we can. + this->clear_deleteme_list(true); + + // The pending call did this. + assert(this->main_greenlet->thread_state() == nullptr); + + // If the main greenlet is the current greenlet, + // then we "fell off the end" and the thread died. + // It's possible that there is some other greenlet that + // switched to us, leaving a reference to the main greenlet + // on the stack, somewhere uncollectible. Try to detect that. + if (this->current_greenlet == this->main_greenlet && this->current_greenlet) { + assert(this->current_greenlet->is_currently_running_in_some_thread()); + // Drop one reference we hold. + this->current_greenlet.CLEAR(); + assert(!this->current_greenlet); + // Only our reference to the main greenlet should be left, + // But hold onto the pointer in case we need to do extra cleanup. + PyGreenlet* old_main_greenlet = this->main_greenlet.borrow(); + Py_ssize_t cnt = this->main_greenlet.REFCNT(); + this->main_greenlet.CLEAR(); + if (ThreadState::clocks_used_doing_gc() != std::clock_t(-1) + && cnt == 2 && Py_REFCNT(old_main_greenlet) == 1) { + // Highly likely that the reference is somewhere on + // the stack, not reachable by GC. Verify. + // XXX: This is O(n) in the total number of objects. + // TODO: Add a way to disable this at runtime, and + // another way to report on it. + std::clock_t begin = std::clock(); + NewReference gc(PyImport_ImportModule("gc")); + if (gc) { + OwnedObject get_referrers = gc.PyRequireAttr(ThreadState::get_referrers_name); + OwnedList refs(get_referrers.PyCall(old_main_greenlet)); + if (refs && refs.empty()) { + assert(refs.REFCNT() == 1); + // We found nothing! So we left a dangling + // reference: Probably the last thing some + // other greenlet did was call + // 'getcurrent().parent.switch()' to switch + // back to us. Clean it up. This will be the + // case on CPython 3.7 and newer, as they use + // an internal calling conversion that avoids + // creating method objects and storing them on + // the stack. + Py_DECREF(old_main_greenlet); + } + else if (refs + && refs.size() == 1 + && PyCFunction_Check(refs.at(0)) + && Py_REFCNT(refs.at(0)) == 2) { + assert(refs.REFCNT() == 1); + // Ok, we found a C method that refers to the + // main greenlet, and its only referenced + // twice, once in the list we just created, + // once from...somewhere else. If we can't + // find where else, then this is a leak. + // This happens in older versions of CPython + // that create a bound method object somewhere + // on the stack that we'll never get back to. + if (PyCFunction_GetFunction(refs.at(0).borrow()) == (PyCFunction)green_switch) { + BorrowedObject function_w = refs.at(0); + refs.clear(); // destroy the reference + // from the list. + // back to one reference. Can *it* be + // found? + assert(function_w.REFCNT() == 1); + refs = get_referrers.PyCall(function_w); + if (refs && refs.empty()) { + // Nope, it can't be found so it won't + // ever be GC'd. Drop it. + Py_CLEAR(function_w); + } + } + } + std::clock_t end = std::clock(); + ThreadState::add_clocks_used_doing_gc(end - begin); + } + } + } + + // We need to make sure this greenlet appears to be dead, + // because otherwise deallocing it would fail to raise an + // exception in it (the thread is dead) and put it back in our + // deleteme list. + if (this->current_greenlet) { + this->current_greenlet->murder_in_place(); + this->current_greenlet.CLEAR(); + } + + if (this->main_greenlet) { + // Couldn't have been the main greenlet that was running + // when the thread exited (because we already cleared this + // pointer if it was). This shouldn't be possible? + + // If the main greenlet was current when the thread died (it + // should be, right?) then we cleared its self pointer above + // when we cleared the current greenlet's main greenlet pointer. + // assert(this->main_greenlet->main_greenlet == this->main_greenlet + // || !this->main_greenlet->main_greenlet); + // // self reference, probably gone + // this->main_greenlet->main_greenlet.CLEAR(); + + // This will actually go away when the ivar is destructed. + this->main_greenlet.CLEAR(); + } + + if (PyErr_Occurred()) { + PyErr_WriteUnraisable(NULL); + PyErr_Clear(); + } + + } + +}; + +ImmortalString ThreadState::get_referrers_name(nullptr); +PythonAllocator ThreadState::allocator; +#ifdef Py_GIL_DISABLED +std::atomic ThreadState::_clocks_used_doing_gc(0); +#else +std::clock_t ThreadState::_clocks_used_doing_gc(0); +#endif + + + + + +}; // namespace greenlet + +#endif diff --git a/venv/lib/python3.12/site-packages/greenlet/TThreadStateCreator.hpp b/venv/lib/python3.12/site-packages/greenlet/TThreadStateCreator.hpp new file mode 100644 index 0000000..ebd33a3 --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/TThreadStateCreator.hpp @@ -0,0 +1,102 @@ +#ifndef GREENLET_THREAD_STATE_CREATOR_HPP +#define GREENLET_THREAD_STATE_CREATOR_HPP + +#include +#include + +#include "greenlet_internal.hpp" +#include "greenlet_refs.hpp" +#include "greenlet_thread_support.hpp" + +#include "TThreadState.hpp" + +namespace greenlet { + + +typedef void (*ThreadStateDestructor)(ThreadState* const); + +// Only one of these, auto created per thread as a thread_local. +// Constructing the state constructs the MainGreenlet. +template +class ThreadStateCreator +{ +private: + // Initialized to 1, and, if still 1, created on access. + // Set to 0 on destruction. + ThreadState* _state; + G_NO_COPIES_OF_CLS(ThreadStateCreator); + + inline bool has_initialized_state() const noexcept + { + return this->_state != (ThreadState*)1; + } + + inline bool has_state() const noexcept + { + return this->has_initialized_state() && this->_state != nullptr; + } + +public: + + ThreadStateCreator() : + _state((ThreadState*)1) + { + } + + ~ThreadStateCreator() + { + if (this->has_state()) { + Destructor(this->_state); + } + + this->_state = nullptr; + } + + inline ThreadState& state() + { + // The main greenlet will own this pointer when it is created, + // which will be right after this. The plan is to give every + // greenlet a pointer to the main greenlet for the thread it + // runs in; if we are doing something cross-thread, we need to + // access the pointer from the main greenlet. Deleting the + // thread, and hence the thread-local storage, will delete the + // state pointer in the main greenlet. + if (!this->has_initialized_state()) { + // XXX: Assuming allocation never fails + this->_state = new ThreadState; + // For non-standard threading, we need to store an object + // in the Python thread state dictionary so that it can be + // DECREF'd when the thread ends (ideally; the dict could + // last longer) and clean this object up. + } + if (!this->_state) { + throw std::runtime_error("Accessing state after destruction."); + } + return *this->_state; + } + + operator ThreadState&() + { + return this->state(); + } + + operator ThreadState*() + { + return &this->state(); + } + + inline int tp_traverse(visitproc visit, void* arg) + { + if (this->has_state()) { + return this->_state->tp_traverse(visit, arg); + } + return 0; + } + +}; + + + +}; // namespace greenlet + +#endif diff --git a/venv/lib/python3.12/site-packages/greenlet/TThreadStateDestroy.cpp b/venv/lib/python3.12/site-packages/greenlet/TThreadStateDestroy.cpp new file mode 100644 index 0000000..ae0b9ae --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/TThreadStateDestroy.cpp @@ -0,0 +1,223 @@ +/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */ +/** + * Implementation of the ThreadState destructors. + * + * Format with: + * clang-format -i --style=file src/greenlet/greenlet.c + * + * + * Fix missing braces with: + * clang-tidy src/greenlet/greenlet.c -fix -checks="readability-braces-around-statements" +*/ +#ifndef T_THREADSTATE_DESTROY +#define T_THREADSTATE_DESTROY + +#include "TGreenlet.hpp" + +#include "greenlet_thread_support.hpp" +#include "greenlet_compiler_compat.hpp" +#include "TGreenletGlobals.cpp" +#include "TThreadState.hpp" +#include "TThreadStateCreator.hpp" + +namespace greenlet { + +extern "C" { + +struct ThreadState_DestroyNoGIL +{ + /** + This function uses the same lock that the PendingCallback does + */ + static void + MarkGreenletDeadAndQueueCleanup(ThreadState* const state) + { +#if GREENLET_BROKEN_THREAD_LOCAL_CLEANUP_JUST_LEAK + // One rare platform. + return; +#endif + // We are *NOT* holding the GIL. Our thread is in the middle + // of its death throes and the Python thread state is already + // gone so we can't use most Python APIs. One that is safe is + // ``Py_AddPendingCall``, unless the interpreter itself has + // been torn down. There is a limited number of calls that can + // be queued: 32 (NPENDINGCALLS) in CPython 3.10, so we + // coalesce these calls using our own queue. + + if (!MarkGreenletDeadIfNeeded(state)) { + // No state, or no greenlet + return; + } + + // XXX: Because we don't have the GIL, this is a race condition. + if (!PyInterpreterState_Head()) { + // We have to leak the thread state, if the + // interpreter has shut down when we're getting + // deallocated, we can't run the cleanup code that + // deleting it would imply. + return; + } + + AddToCleanupQueue(state); + + } + +private: + + // If the state has an allocated main greenlet: + // - mark the greenlet as dead by disassociating it from the state; + // - return 1 + // Otherwise, return 0. + static bool + MarkGreenletDeadIfNeeded(ThreadState* const state) + { + if (!state) { + return false; + } + LockGuard cleanup_lock(*mod_globs->thread_states_to_destroy_lock); + if (state->has_main_greenlet()) { + // mark the thread as dead ASAP. + // this is racy! If we try to throw or switch to a + // greenlet from this thread from some other thread before + // we clear the state pointer, it won't realize the state + // is dead which can crash the process. + PyGreenlet* p(state->borrow_main_greenlet().borrow()); + assert(p->pimpl->thread_state() == state || p->pimpl->thread_state() == nullptr); + dynamic_cast(p->pimpl)->thread_state(nullptr); + return true; + } + return false; + } + + static void + AddToCleanupQueue(ThreadState* const state) + { + assert(state && state->has_main_greenlet()); + + // NOTE: Because we're not holding the GIL here, some other + // Python thread could run and call ``os.fork()``, which would + // be bad if that happened while we are holding the cleanup + // lock (it wouldn't function in the child process). + // Make a best effort to try to keep the duration we hold the + // lock short. + // TODO: On platforms that support it, use ``pthread_atfork`` to + // drop this lock. + LockGuard cleanup_lock(*mod_globs->thread_states_to_destroy_lock); + + mod_globs->queue_to_destroy(state); + if (mod_globs->thread_states_to_destroy.size() == 1) { + // We added the first item to the queue. We need to schedule + // the cleanup. + + // A size greater than 1 means that we have already added the pending call, + // and in fact, it may be executing now. + // If it is executing, our lock makes sure that it will see the item we just added + // to the queue on its next iteration (after we release the lock) + // + // A size of 1 means there is no pending call, OR the pending call is + // currently executing, has dropped the lock, and is deleting the last item + // from the queue; its next iteration will go ahead and delete the item we just added. + // And the pending call we schedule here will have no work to do. + int result = AddPendingCall( + PendingCallback_DestroyQueue, + nullptr); + if (result < 0) { + // Hmm, what can we do here? + fprintf(stderr, + "greenlet: WARNING: failed in call to Py_AddPendingCall; " + "expect a memory leak.\n"); + } + } + } + + static int + PendingCallback_DestroyQueue(void* UNUSED(arg)) + { + // We're may or may not be holding the GIL here (depending on + // Py_GIL_DISABLED), so calls to ``os.fork()`` may or may not + // be possible. + while (1) { + ThreadState* to_destroy; + { + LockGuard cleanup_lock(*mod_globs->thread_states_to_destroy_lock); + if (mod_globs->thread_states_to_destroy.empty()) { + break; + } + to_destroy = mod_globs->take_next_to_destroy(); + } + assert(to_destroy); + assert(to_destroy->has_main_greenlet()); + // Drop the lock while we do the actual deletion. + // This allows other calls to MarkGreenletDeadAndQueueCleanup + // to enter and add to our queue. + DestroyOne(to_destroy); + } + return 0; + } + + static void + DestroyOne(const ThreadState* const state) + { + // May or may not be holding the GIL (depending on Py_GIL_DISABLED). + // Passed a non-shared pointer to the actual thread state. + // state -> main greenlet + assert(state->has_main_greenlet()); + PyGreenlet* main(state->borrow_main_greenlet()); + // When we need to do cross-thread operations, we check this. + // A NULL value means the thread died some time ago. + // We do this here, rather than in a Python dealloc function + // for the greenlet, in case there's still a reference out + // there. + dynamic_cast(main->pimpl)->thread_state(nullptr); + + delete state; // Deleting this runs the destructor, DECREFs the main greenlet. + } + + + static int AddPendingCall(int (*func)(void*), void* arg) + { + // If the interpreter is in the middle of finalizing, we can't add a + // pending call. Trying to do so will end up in a SIGSEGV, as + // Py_AddPendingCall will not be able to get the interpreter and will + // try to dereference a NULL pointer. It's possible this can still + // segfault if we happen to get context switched, and maybe we should + // just always implement our own AddPendingCall, but I'd like to see if + // this works first +#if GREENLET_PY313 + if (Py_IsFinalizing()) { +#else + if (_Py_IsFinalizing()) { +#endif +#ifdef GREENLET_DEBUG + // No need to log in the general case. Yes, we'll leak, + // but we're shutting down so it should be ok. + fprintf(stderr, + "greenlet: WARNING: Interpreter is finalizing. Ignoring " + "call to Py_AddPendingCall; \n"); +#endif + return 0; + } + return Py_AddPendingCall(func, arg); + } + + + + + +}; +}; + +}; // namespace greenlet + +// The intent when GET_THREAD_STATE() is needed multiple times in a +// function is to take a reference to its return value in a local +// variable, to avoid the thread-local indirection. On some platforms +// (macOS), accessing a thread-local involves a function call (plus an +// initial function call in each function that uses a thread local); +// in contrast, static volatile variables are at some pre-computed +// offset. +typedef greenlet::ThreadStateCreator ThreadStateCreator; +static thread_local ThreadStateCreator g_thread_state_global; +#define GET_THREAD_STATE() g_thread_state_global + +#endif //T_THREADSTATE_DESTROY diff --git a/venv/lib/python3.12/site-packages/greenlet/TUserGreenlet.cpp b/venv/lib/python3.12/site-packages/greenlet/TUserGreenlet.cpp new file mode 100644 index 0000000..73a8133 --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/TUserGreenlet.cpp @@ -0,0 +1,662 @@ +/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */ +/** + * Implementation of greenlet::UserGreenlet. + * + * Format with: + * clang-format -i --style=file src/greenlet/greenlet.c + * + * + * Fix missing braces with: + * clang-tidy src/greenlet/greenlet.c -fix -checks="readability-braces-around-statements" +*/ +#ifndef T_USER_GREENLET_CPP +#define T_USER_GREENLET_CPP + +#include "greenlet_internal.hpp" +#include "TGreenlet.hpp" + +#include "TThreadStateDestroy.cpp" + + +namespace greenlet { +using greenlet::refs::BorrowedMainGreenlet; +greenlet::PythonAllocator UserGreenlet::allocator; + +void* UserGreenlet::operator new(size_t UNUSED(count)) +{ + return allocator.allocate(1); +} + + +void UserGreenlet::operator delete(void* ptr) +{ + return allocator.deallocate(static_cast(ptr), + 1); +} + + +UserGreenlet::UserGreenlet(PyGreenlet* p, BorrowedGreenlet the_parent) + : Greenlet(p), _parent(the_parent) +{ +} + +UserGreenlet::~UserGreenlet() +{ + // Python 3.11: If we don't clear out the raw frame datastack + // when deleting an unfinished greenlet, + // TestLeaks.test_untracked_memory_doesnt_increase_unfinished_thread_dealloc_in_main fails. + this->python_state.did_finish(nullptr); + this->tp_clear(); +} + + +const BorrowedMainGreenlet +UserGreenlet::main_greenlet() const +{ + return this->_main_greenlet; +} + + +BorrowedMainGreenlet +UserGreenlet::find_main_greenlet_in_lineage() const +{ + if (this->started()) { + assert(this->_main_greenlet); + return BorrowedMainGreenlet(this->_main_greenlet); + } + + if (!this->_parent) { + /* garbage collected greenlet in chain */ + // XXX: WHAT? + return BorrowedMainGreenlet(nullptr); + } + + return this->_parent->find_main_greenlet_in_lineage(); +} + + +/** + * CAUTION: This will allocate memory and may trigger garbage + * collection and arbitrary Python code. + */ +OwnedObject +UserGreenlet::throw_GreenletExit_during_dealloc(const ThreadState& current_thread_state) +{ + /* The dying greenlet cannot be a parent of ts_current + because the 'parent' field chain would hold a + reference */ + UserGreenlet::ParentIsCurrentGuard with_current_parent(this, current_thread_state); + + // We don't care about the return value, only whether an + // exception happened. Whether or not an exception happens, + // we need to restore the parent in case the greenlet gets + // resurrected. + return Greenlet::throw_GreenletExit_during_dealloc(current_thread_state); +} + +ThreadState* +UserGreenlet::thread_state() const noexcept +{ + // TODO: maybe make this throw, if the thread state isn't there? + // if (!this->main_greenlet) { + // throw std::runtime_error("No thread state"); // TODO: Better exception + // } + if (!this->_main_greenlet) { + return nullptr; + } + return this->_main_greenlet->thread_state(); +} + + +bool +UserGreenlet::was_running_in_dead_thread() const noexcept +{ + return this->_main_greenlet && !this->thread_state(); +} + +OwnedObject +UserGreenlet::g_switch() +{ + assert(this->args() || PyErr_Occurred()); + + try { + this->check_switch_allowed(); + } + catch (const PyErrOccurred&) { + this->release_args(); + throw; + } + + // Switching greenlets used to attempt to clean out ones that need + // deleted *if* we detected a thread switch. Should it still do + // that? + // An issue is that if we delete a greenlet from another thread, + // it gets queued to this thread, and ``kill_greenlet()`` switches + // back into the greenlet + + /* find the real target by ignoring dead greenlets, + and if necessary starting a greenlet. */ + switchstack_result_t err; + Greenlet* target = this; + // TODO: probably cleaner to handle the case where we do + // switch to ourself separately from the other cases. + // This can probably even further be simplified if we keep + // track of the switching_state we're going for and just call + // into g_switch() if it's not ourself. The main problem with that + // is that we would be using more stack space. + bool target_was_me = true; + bool was_initial_stub = false; + while (target) { + if (target->active()) { + if (!target_was_me) { + target->args() <<= this->args(); + assert(!this->args()); + } + err = target->g_switchstack(); + break; + } + if (!target->started()) { + // We never encounter a main greenlet that's not started. + assert(!target->main()); + UserGreenlet* real_target = static_cast(target); + assert(real_target); + void* dummymarker; + was_initial_stub = true; + if (!target_was_me) { + target->args() <<= this->args(); + assert(!this->args()); + } + try { + // This can only throw back to us while we're + // still in this greenlet. Once the new greenlet + // is bootstrapped, it has its own exception state. + err = real_target->g_initialstub(&dummymarker); + } + catch (const PyErrOccurred&) { + this->release_args(); + throw; + } + catch (const GreenletStartedWhileInPython&) { + // The greenlet was started sometime before this + // greenlet actually switched to it, i.e., + // "concurrent" calls to switch() or throw(). + // We need to retry the switch. + // Note that the current greenlet has been reset + // to this one (or we wouldn't be running!) + continue; + } + break; + } + + target = target->parent(); + target_was_me = false; + } + // The ``this`` pointer and all other stack or register based + // variables are invalid now, at least where things succeed + // above. + // But this one, probably not so much? It's not clear if it's + // safe to throw an exception at this point. + + if (err.status < 0) { + // If we get here, either g_initialstub() + // failed, or g_switchstack() failed. Either one of those + // cases SHOULD leave us in the original greenlet with a valid + // stack. + return this->on_switchstack_or_initialstub_failure(target, err, target_was_me, was_initial_stub); + } + + // err.the_new_current_greenlet would be the same as ``target``, + // if target wasn't probably corrupt. + return err.the_new_current_greenlet->g_switch_finish(err); +} + + + +Greenlet::switchstack_result_t +UserGreenlet::g_initialstub(void* mark) +{ + OwnedObject run; + + // We need to grab a reference to the current switch arguments + // in case we're entered concurrently during the call to + // GetAttr() and have to try again. + // We'll restore them when we return in that case. + // Scope them tightly to avoid ref leaks. + { + SwitchingArgs args(this->args()); + + /* save exception in case getattr clears it */ + PyErrPieces saved; + + /* + self.run is the object to call in the new greenlet. + This could run arbitrary python code and switch greenlets! + */ + run = this->self().PyRequireAttr(mod_globs->str_run); + /* restore saved exception */ + saved.PyErrRestore(); + + + /* recheck that it's safe to switch in case greenlet reparented anywhere above */ + this->check_switch_allowed(); + + /* by the time we got here another start could happen elsewhere, + * that means it should now be a regular switch. + * This can happen if the Python code is a subclass that implements + * __getattribute__ or __getattr__, or makes ``run`` a descriptor; + * all of those can run arbitrary code that switches back into + * this greenlet. + */ + if (this->stack_state.started()) { + // the successful switch cleared these out, we need to + // restore our version. They will be copied on up to the + // next target. + assert(!this->args()); + this->args() <<= args; + throw GreenletStartedWhileInPython(); + } + } + + // Sweet, if we got here, we have the go-ahead and will switch + // greenlets. + // Nothing we do from here on out should allow for a thread or + // greenlet switch: No arbitrary calls to Python, including + // decref'ing + +#if GREENLET_USE_CFRAME + /* OK, we need it, we're about to switch greenlets, save the state. */ + /* + See green_new(). This is a stack-allocated variable used + while *self* is in PyObject_Call(). + We want to defer copying the state info until we're sure + we need it and are in a stable place to do so. + */ + _PyCFrame trace_info; + + this->python_state.set_new_cframe(trace_info); +#endif + /* start the greenlet */ + ThreadState& thread_state = GET_THREAD_STATE().state(); + this->stack_state = StackState(mark, + thread_state.borrow_current()->stack_state); + this->python_state.set_initial_state(PyThreadState_GET()); + this->exception_state.clear(); + this->_main_greenlet = thread_state.get_main_greenlet(); + + /* perform the initial switch */ + switchstack_result_t err = this->g_switchstack(); + /* returns twice! + The 1st time with ``err == 1``: we are in the new greenlet. + This one owns a greenlet that used to be current. + The 2nd time with ``err <= 0``: back in the caller's + greenlet; this happens if the child finishes or switches + explicitly to us. Either way, the ``err`` variable is + created twice at the same memory location, but possibly + having different ``origin`` values. Note that it's not + constructed for the second time until the switch actually happens. + */ + if (err.status == 1) { + // In the new greenlet. + + // This never returns! Calling inner_bootstrap steals + // the contents of our run object within this stack frame, so + // it is not valid to do anything with it. + try { + this->inner_bootstrap(err.origin_greenlet.relinquish_ownership(), + run.relinquish_ownership()); + } + // Getting a C++ exception here isn't good. It's probably a + // bug in the underlying greenlet, meaning it's probably a + // C++ extension. We're going to abort anyway, but try to + // display some nice information *if* possible. Some obscure + // platforms don't properly support this (old 32-bit Arm, see see + // https://github.com/python-greenlet/greenlet/issues/385); that's not + // great, but should usually be OK because, as mentioned above, we're + // terminating anyway. + // + // The catching is tested by + // ``test_cpp.CPPTests.test_unhandled_exception_in_greenlet_aborts``. + // + // PyErrOccurred can theoretically be thrown by + // inner_bootstrap() -> g_switch_finish(), but that should + // never make it back to here. It is a std::exception and + // would be caught if it is. + catch (const std::exception& e) { + std::string base = "greenlet: Unhandled C++ exception: "; + base += e.what(); + Py_FatalError(base.c_str()); + } + catch (...) { + // Some compilers/runtimes use exceptions internally. + // It appears that GCC on Linux with libstdc++ throws an + // exception internally at process shutdown time to unwind + // stacks and clean up resources. Depending on exactly + // where we are when the process exits, that could result + // in an unknown exception getting here. If we + // Py_FatalError() or abort() here, we interfere with + // orderly process shutdown. Throwing the exception on up + // is the right thing to do. + // + // gevent's ``examples/dns_mass_resolve.py`` demonstrates this. +#ifndef NDEBUG + fprintf(stderr, + "greenlet: inner_bootstrap threw unknown exception; " + "is the process terminating?\n"); +#endif + throw; + } + Py_FatalError("greenlet: inner_bootstrap returned with no exception.\n"); + } + + + // In contrast, notice that we're keeping the origin greenlet + // around as an owned reference; we need it to call the trace + // function for the switch back into the parent. It was only + // captured at the time the switch actually happened, though, + // so we haven't been keeping an extra reference around this + // whole time. + + /* back in the parent */ + if (err.status < 0) { + /* start failed badly, restore greenlet state */ + this->stack_state = StackState(); + this->_main_greenlet.CLEAR(); + // CAUTION: This may run arbitrary Python code. + run.CLEAR(); // inner_bootstrap didn't run, we own the reference. + } + + // In the success case, the spawned code (inner_bootstrap) will + // take care of decrefing this, so we relinquish ownership so as + // to not double-decref. + + run.relinquish_ownership(); + + return err; +} + + +void +UserGreenlet::inner_bootstrap(PyGreenlet* origin_greenlet, PyObject* run) +{ + // The arguments here would be another great place for move. + // As it is, we take them as a reference so that when we clear + // them we clear what's on the stack above us. Do that NOW, and + // without using a C++ RAII object, + // so there's no way that exiting the parent frame can clear it, + // or we clear it unexpectedly. This arises in the context of the + // interpreter shutting down. See https://github.com/python-greenlet/greenlet/issues/325 + //PyObject* run = _run.relinquish_ownership(); + + /* in the new greenlet */ + assert(this->thread_state()->borrow_current() == BorrowedGreenlet(this->_self)); + // C++ exceptions cannot propagate to the parent greenlet from + // here. (TODO: Do we need a catch(...) clause, perhaps on the + // function itself? ALl we could do is terminate the program.) + // NOTE: On 32-bit Windows, the call chain is extremely + // important here in ways that are subtle, having to do with + // the depth of the SEH list. The call to restore it MUST NOT + // add a new SEH handler to the list, or we'll restore it to + // the wrong thing. + this->thread_state()->restore_exception_state(); + /* stack variables from above are no good and also will not unwind! */ + // EXCEPT: That can't be true, we access run, among others, here. + + this->stack_state.set_active(); /* running */ + + // We're about to possibly run Python code again, which + // could switch back/away to/from us, so we need to grab the + // arguments locally. + SwitchingArgs args; + args <<= this->args(); + assert(!this->args()); + + // XXX: We could clear this much earlier, right? + // Or would that introduce the possibility of running Python + // code when we don't want to? + // CAUTION: This may run arbitrary Python code. + this->_run_callable.CLEAR(); + + + // The first switch we need to manually call the trace + // function here instead of in g_switch_finish, because we + // never return there. + if (OwnedObject tracefunc = this->thread_state()->get_tracefunc()) { + OwnedGreenlet trace_origin; + trace_origin = origin_greenlet; + try { + g_calltrace(tracefunc, + args ? mod_globs->event_switch : mod_globs->event_throw, + trace_origin, + this->_self); + } + catch (const PyErrOccurred&) { + /* Turn trace errors into switch throws */ + args.CLEAR(); + } + } + + // We no longer need the origin, it was only here for + // tracing. + // We may never actually exit this stack frame so we need + // to explicitly clear it. + // This could run Python code and switch. + Py_CLEAR(origin_greenlet); + + OwnedObject result; + if (!args) { + /* pending exception */ + result = NULL; + } + else { + /* call g.run(*args, **kwargs) */ + // This could result in further switches + try { + //result = run.PyCall(args.args(), args.kwargs()); + // CAUTION: Just invoking this, before the function even + // runs, may cause memory allocations, which may trigger + // GC, which may run arbitrary Python code. + result = OwnedObject::consuming(PyObject_Call(run, args.args().borrow(), args.kwargs().borrow())); + } + catch (...) { + // Unhandled C++ exception! + + // If we declare ourselves as noexcept, if we don't catch + // this here, most platforms will just abort() the + // process. But on 64-bit Windows with older versions of + // the C runtime, this can actually corrupt memory and + // just return. We see this when compiling with the + // Windows 7.0 SDK targeting Windows Server 2008, but not + // when using the Appveyor Visual Studio 2019 image. So + // this currently only affects Python 2.7 on Windows 64. + // That is, the tests pass and the runtime aborts + // everywhere else. + // + // However, if we catch it and try to continue with a + // Python error, then all Windows 64 bit platforms corrupt + // memory. So all we can do is manually abort, hopefully + // with a good error message. (Note that the above was + // tested WITHOUT the `/EHr` switch being used at compile + // time, so MSVC may have "optimized" out important + // checking. Using that switch, we may be in a better + // place in terms of memory corruption.) But sometimes it + // can't be caught here at all, which is confusing but not + // terribly surprising; so again, the G_NOEXCEPT_WIN32 + // plus "/EHr". + // + // Hopefully the basic C stdlib is still functional enough + // for us to at least print an error. + // + // It gets more complicated than that, though, on some + // platforms, specifically at least Linux/gcc/libstdc++. They use + // an exception to unwind the stack when a background + // thread exits. (See comments about noexcept.) So this + // may not actually represent anything untoward. On those + // platforms we allow throws of this to propagate, or + // attempt to anyway. +# if defined(WIN32) || defined(_WIN32) + Py_FatalError( + "greenlet: Unhandled C++ exception from a greenlet run function. " + "Because memory is likely corrupted, terminating process."); + std::abort(); +#else + throw; +#endif + } + } + // These lines may run arbitrary code + args.CLEAR(); + Py_CLEAR(run); + + if (!result + && mod_globs->PyExc_GreenletExit.PyExceptionMatches() + && (this->args())) { + // This can happen, for example, if our only reference + // goes away after we switch back to the parent. + // See test_dealloc_switch_args_not_lost + PyErrPieces clear_error; + result <<= this->args(); + result = single_result(result); + } + this->release_args(); + this->python_state.did_finish(PyThreadState_GET()); + + result = g_handle_exit(result); + assert(this->thread_state()->borrow_current() == this->_self); + + /* jump back to parent */ + this->stack_state.set_inactive(); /* dead */ + + + // TODO: Can we decref some things here? Release our main greenlet + // and maybe parent? + for (Greenlet* parent = this->_parent; + parent; + parent = parent->parent()) { + // We need to somewhere consume a reference to + // the result; in most cases we'll never have control + // back in this stack frame again. Calling + // green_switch actually adds another reference! + // This would probably be clearer with a specific API + // to hand results to the parent. + parent->args() <<= result; + assert(!result); + // The parent greenlet now owns the result; in the + // typical case we'll never get back here to assign to + // result and thus release the reference. + try { + result = parent->g_switch(); + } + catch (const PyErrOccurred&) { + // Ignore, keep passing the error on up. + } + + /* Return here means switch to parent failed, + * in which case we throw *current* exception + * to the next parent in chain. + */ + assert(!result); + } + /* We ran out of parents, cannot continue */ + PyErr_WriteUnraisable(this->self().borrow_o()); + Py_FatalError("greenlet: ran out of parent greenlets while propagating exception; " + "cannot continue"); + std::abort(); +} + +void +UserGreenlet::run(const BorrowedObject nrun) +{ + if (this->started()) { + throw AttributeError( + "run cannot be set " + "after the start of the greenlet"); + } + this->_run_callable = nrun; +} + +const OwnedGreenlet +UserGreenlet::parent() const +{ + return this->_parent; +} + +void +UserGreenlet::parent(const BorrowedObject raw_new_parent) +{ + if (!raw_new_parent) { + throw AttributeError("can't delete attribute"); + } + + BorrowedMainGreenlet main_greenlet_of_new_parent; + BorrowedGreenlet new_parent(raw_new_parent.borrow()); // could + // throw + // TypeError! + for (BorrowedGreenlet p = new_parent; p; p = p->parent()) { + if (p == this->self()) { + throw ValueError("cyclic parent chain"); + } + main_greenlet_of_new_parent = p->main_greenlet(); + } + + if (!main_greenlet_of_new_parent) { + throw ValueError("parent must not be garbage collected"); + } + + if (this->started() + && this->_main_greenlet != main_greenlet_of_new_parent) { + throw ValueError("parent cannot be on a different thread"); + } + + this->_parent = new_parent; +} + +void +UserGreenlet::murder_in_place() +{ + this->_main_greenlet.CLEAR(); + Greenlet::murder_in_place(); +} + +bool +UserGreenlet::belongs_to_thread(const ThreadState* thread_state) const +{ + return Greenlet::belongs_to_thread(thread_state) && this->_main_greenlet == thread_state->borrow_main_greenlet(); +} + + +int +UserGreenlet::tp_traverse(visitproc visit, void* arg) +{ + Py_VISIT(this->_parent.borrow_o()); + Py_VISIT(this->_main_greenlet.borrow_o()); + Py_VISIT(this->_run_callable.borrow_o()); + + return Greenlet::tp_traverse(visit, arg); +} + +int +UserGreenlet::tp_clear() +{ + Greenlet::tp_clear(); + this->_parent.CLEAR(); + this->_main_greenlet.CLEAR(); + this->_run_callable.CLEAR(); + return 0; +} + +UserGreenlet::ParentIsCurrentGuard::ParentIsCurrentGuard(UserGreenlet* p, + const ThreadState& thread_state) + : oldparent(p->_parent), + greenlet(p) +{ + p->_parent = thread_state.get_current(); +} + +UserGreenlet::ParentIsCurrentGuard::~ParentIsCurrentGuard() +{ + this->greenlet->_parent = oldparent; + oldparent.CLEAR(); +} + +}; //namespace greenlet +#endif diff --git a/venv/lib/python3.12/site-packages/greenlet/__init__.py b/venv/lib/python3.12/site-packages/greenlet/__init__.py new file mode 100644 index 0000000..ed1cc17 --- /dev/null +++ b/venv/lib/python3.12/site-packages/greenlet/__init__.py @@ -0,0 +1,71 @@ +# -*- coding: utf-8 -*- +""" +The root of the greenlet package. +""" +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function + +__all__ = [ + '__version__', + '_C_API', + + 'GreenletExit', + 'error', + + 'getcurrent', + 'greenlet', + + 'gettrace', + 'settrace', +] + +# pylint:disable=no-name-in-module + +### +# Metadata +### +__version__ = '3.3.1' +from ._greenlet import _C_API # pylint:disable=no-name-in-module + +### +# Exceptions +### +from ._greenlet import GreenletExit +from ._greenlet import error + +### +# greenlets +### +from ._greenlet import getcurrent +from ._greenlet import greenlet + +### +# tracing +### +try: + from ._greenlet import gettrace + from ._greenlet import settrace +except ImportError: + # Tracing wasn't supported. + # XXX: The option to disable it was removed in 1.0, + # so this branch should be dead code. + pass + +### +# Constants +# These constants aren't documented and aren't recommended. +# In 1.0, USE_GC and USE_TRACING are always true, and USE_CONTEXT_VARS +# is the same as ``sys.version_info[:2] >= 3.7`` +### +from ._greenlet import GREENLET_USE_CONTEXT_VARS # pylint:disable=unused-import +from ._greenlet import GREENLET_USE_GC # pylint:disable=unused-import +from ._greenlet import GREENLET_USE_TRACING # pylint:disable=unused-import + +# Controlling the use of the gc module. Provisional API for this greenlet +# implementation in 2.0. +from ._greenlet import CLOCKS_PER_SEC # pylint:disable=unused-import +from ._greenlet import enable_optional_cleanup # pylint:disable=unused-import +from ._greenlet import get_clocks_used_doing_optional_cleanup # pylint:disable=unused-import + +# Other APIS in the _greenlet module are for test support. diff --git a/venv/lib/python3.12/site-packages/greenlet/__pycache__/__init__.cpython-312.pyc b/venv/lib/python3.12/site-packages/greenlet/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..43888d12a034309e23a4d77fb9bcdcb8f344baf3 GIT binary patch literal 1066 zcmZXSO>fgc5Qb+HC$XKRX`8eNL`6kQQB;UUd*wq>WK|WYMNL3-FRRqv1`EfI*6Z}+ z)E~f|J2(CUoOB598JZ!Av&dPRO<6fwT%sichWet6t1>O8l_}&YI+bz-d74hAJdHdhs4-X6HR$6k#YA!~I2x z+!LG!K9`GwuJfVW;|=pn`BNuJrMnk}ek?ij`h!qNOzEyS^dc_|kf#R13nbf*14pWi zo)j4ya-qtMC3)6j&DWbrY2*3__Ms<}92X)KiP_`QiG|>SO!S)_AaN;0*WrmCUDI)H zy|LbSaz@fEiNYl4lVD7OI_WwQ#YrelLOBh|?TsDV-g;$s*qgS^TH9M4`(1~p?pYP5Xu9g97u|r>CxHBbx~32X(cmCW|dTx)KI>_Z&bKyTTvJbhg+_H z_&5@d<$8iU(m!mtd}s}MFtmJc&l()b_hEoXvt~t}Z6RagphMBL$u30kcT6hDU4U3GJjGW!NR2pWO)R4 zRlJWqW3xbvk+y{INkL_GerNy?Ox}G0t_!8Dj(KDpEs#Ej3r+ NbT!vp&z`Ok)W3$Y8W;co literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/greenlet/_greenlet.cpython-312-x86_64-linux-gnu.so b/venv/lib/python3.12/site-packages/greenlet/_greenlet.cpython-312-x86_64-linux-gnu.so new file mode 100755 index 0000000000000000000000000000000000000000..c495d26670ae38040b0ebcc8928d1e9b625368c5 GIT binary patch literal 1448736 zcmeEvd0bWH*8c`YQ7eunH=2*8g_Q;>iJAo}dPp>K%CZ6kR8oQ9pqLFfm8TOo8gAK4 zqh8D6+GN8mk{r6-3N6cQkVc;)DKwi6{Jv{F&pv0J4X4|^@B4Xw|J?28u=o1z^{i*D z^{i(-!`|n3O-9zZ=%^^mJ~~-vTOrD_(#(z8o`14gfTdd9@%Ln_Kl64D-f4faYL&+9 zv*pq>)e%FNHJWywFX^VWu+Op_*H>$_bet0}*7EGLEY}6MRF`OGaGrCI(&Z`>^w};) z+*Gc$hc4$lyEJUs=U7vmbfizIx$ivpGko@$c&yPaTR`P% zp4WbHo`;fP9QN6+?|hUa`~K)**E`wNXY1uWCv?*i?XzhuwyigAb;4)-q-j<`pW&yf z2~W;l($#grEuWs#{8sv__fg5s_$hsGSWd}&mbb;6XBLG_A4^es)lpOuas9qmf1v8r6|&Q=$fHFb3- zS5(*RE>`EL+%zjX(cP^v4Q&OA&b%Sv$PR>c6a(k$1cTce{ARxN$ivZCBp z@7Nk^XswGR9W|ip<}qo@qUx7MC%LV3tBUQ6x2&@0?AWTB=$Ot{t=0JfcV8LdbhpD+baUTeb*^){tf-}Ztk{BHuGqsnM_cZ6%jFtfg<7LKPpdub@{2pA z^*+C98F!UsKv&?i5+6FQ#m9$_AD!{>H{S|oVVfgPlLZ{&Trw|h|hL>b{LFKZ{zb0 zK0EPw51(E5(DA-L@!#F}`=Ove!u1|OH{tqILw||0GS>lfrc*OM`|&w|Pb)s(;`1Fo zKj1^hL4C4*HfK8hYOdSpj35#z+3EzkGY1xOCeB^VHL-RT*F<**-9uo9;ra-C;_z|d z(-WUw`1Hnyj(D7p!slpwj=|?xd``f}d7KEWk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rs|K9K^V7Pxtl!z*u5NAE9p~aOiic z5)y-s?@f^X6Fxc6En}CUPXRn?bXCmGJ%32^AytF~E>4=!3Q%A}tV`NUI(r!%D>JaHmaHGDT}iW5no=kuSuk_d{MVt+xw75K>@b*O z#;6TT06sTP^N@v-U!BXyEb@X+aLBz$AzFjb4w4S$Sb-f!rLdUmxdXfiJrPtydkYz? zjXw!5j1q5A;AE~qz^n3x6n(rSxzq;-3=sm!W370SUL;4{SQ2drZ$&*oY&9xwzP0wB z#ujIPy^gLaWoD)V&w)?Uh9%)UN3A4HqdzLNFrL(9#81Z~vN%^9yH*Qoj9JH(1>B=c$=5;PN&e=u_m?5KVe7(aa z84>0=x)FGjVEXDq%+8*x;ejAv2sl0j0|$q3e4-3OL+`n*{&DTZ;la~QOu)e}`}YJ1S!KQ4OWSSp3W!qo)kr3UniGa%#m{ zr8>xc%Z)>C-@5i7w+DVZVG>UJizoElX>=`R@~b z?Dux8_U8)9@7A;_yOtl5I<_tcpHf=#|`C}?wcZ(zOB za;JBzl2{&=rS^`c*0syk31$23rY*|~eqjaH?^=$~Q&ehfU5?RHl~mu%TH!oNRo$Ih zDjSidCx2%-*obl0?Bc%%pJBgjER-*INdxi;Od+l`Ev?BD ze_fW9y)xfAM3HzceYrMTz$bA?h?+qZaqsaJdg`Xz5!{?G_BhN3N4A|hNZH9by)c$2 z*x8)LBBJ~QwwI_mBeqIUbdG~9z`f{ho~?Mw{C$*>G+=($a!{7#f0s7@RI2&0RQ+Qq k_G5Zz`VXn=^KgUQ{i%f8-R;GYyjLy_{~UHE9vIaB1^$K)ssI20 literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask/__pycache__/ctx.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/__pycache__/ctx.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c2d7eda03cc509f30f9b150c6dff5ed18d8054c4 GIT binary patch literal 19547 zcmeHveQX>@c4zl|kVDQ4hn%4(iKN7)M2Q@k8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aP6X0-hY*g1FJ%BN=kgI@^|HNP z7A{r=uu1UJc`mui<%poS^G8*14^{L(lutaAm5fdKM#lL~5qEwzSebKBz)S?b$i~mv zVfW=K=&uSSjUh>w)$OyHtWmigbvF`snf3IEd3 zj3v%f!?&oQSQ>kSif2&-y^jtKlJkR+mi_23AuU&FtZ<&%sKB2%l5}FG6e|okUF%$IvE}RoZHYFE=QOyq#YfFoSe#4 zanX;QNS$ZILl%L4bw-wZE?@~+%iFCBH@K9u4W}RyMar2l#pnpZ2Ob-NcTE?G5#-Is zpK^Nb<>$k_=brEV+Kc^X^JJED8RnMG$j_g18TtP@qns3Wgo+>)byU1a1)Tw&oXT@2 zd0?2YVhJfcbe#|%v_8xJ7$b-W>2oMR_p*FX+VwY*|7TM5&m{jnsqLQB^0(6dzm*#A zNzL~p<({+`|KGPezI*D;Q}-N=_Z)lgIa(piyn)|3H(&L6#VfMB=QD}QjY->1*}HLC o-Yf6jxFGM4_isEWSIWW9>qBz$XA+9fhvY$Xy{mHepvGXoeP3IG5A literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask/__pycache__/debughelpers.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/__pycache__/debughelpers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d42ffe459ebc0d805774e2e6709037899f6d75b8 GIT binary patch literal 8552 zcmb7JYit`=cD}liY;^#_fOBc z!=WCb7uXBw&gIN~-*dk2oO6E{2zUvkm$v3oU$+tRd;DRi2CKk5E<)iZk%`QyB+U(Q z9F`rbV}O@=Sx|+vbHEAjc-g5oq+J6pR&G$;Y0rR%BMx$s$gXQdb}L@RcSo>#9q_aF z9(eCn0*bfxKFHqt;JqK-^3~dna^M;nXp)=c;5A{OS#Fja;n_0oh_?Izt3)}|CuK64 zAsHzxqo4T$XT9{itmc#~O=S$ML6s{xMK|IJV+?-sN3+?4)xVWv8%W&aCdh9Rg$!^q z8F0wl01pH4X8W5NWh|>C3`Kr3lS*i^a)MHg=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ih`e-wex z^rg~x^~Y}TC|U@nfFWv%#t9WMLjpqr92!z6kRH%CWpRq2$%88mi`WEXBuKcvY5wih~9XZ$yznNu#Y@AWd1{s{ilxq5P1*kio zOzFepIznhwJgN_ibT`A5f-0plaeF4r)BtIS*CuoYnj%@~{{iOhBzYJVXCt%zxuYe2 ztmNyNJYH#OojhG>3QfNHovY=ezg!6K0LNq@yuTdYUkbnUAhc;A)LjmBFNF4#Lwlw? z-$(b}eg1y5?-6Nn?ku~zrucH8YbrUDEGChJlb?R3 z@Kk@rA1>}G`#YyjSE@sf%(l4pwj%VS5!Q+Js z22TLjS_++=cfV2V<@~(+!b8FJ{;79Qy?^%Ivopu>)}knXc=lUin-wl{m<^Va=Y2-( zB;JlnhDM_TO~Q#YDW?=lrf>!Vi_uoRrB3Dm6yTPc0@;Ibg9!=ZVseJLjB2{24XzJvPw!%Y(+BEu@vzw#p9x{p4Bvq1lXg{7E3$8?IKP_DU; zc;fD}F3^wA0(`~jj*dntY!kE3{|DjbIMe_D literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask/__pycache__/globals.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/__pycache__/globals.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..97de641656a42f2b8a6be25303917da92630daba GIT binary patch literal 1855 zcmb_c&2Jk;6yNoCym6cl$Elq(nI@$)l-L5)TR%WiX`(`jNCIN3vfAuS>?N~1W_H%G zeX_U^apDHY9E-|@zk^GpT-vRIkSY$nB}z}_!kb;YcBLL!X=mTO-}{>1dpm#Ta#;nQ zkC%M=kCdW3mz(~Rj0E-kCsk2?QMMJVV3jJ4s;jD$V>G76;Txw3C#fexU4o{Zw4PQK z68~wqsIHT1!RbF7YqP_dfB&Kr^~YJP#6mZnta~EYdxT&c9zXzGu5N z#C+k|m>{-`%tnLSR#+IaqM(&*cB^iCNVFS(P})WgFdYWhCD`_1gvfEedG~={01`JVXJ;Y*?n8o zB~XFa=v8@jxq>!{^d|^2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Cn)|28vGoMeU3(+1cJ9OynEr(;HjN3Qj$-V7@o$v0RVSA@T*7gz|JHZ zns{$~YjC_fIR1E|urc`EPG%crw$Mlyjcf;pJ2P9s;cjsF@v*BL!E4U~3Ra%Qhw-3P F>;K0FN7DcR literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask/__pycache__/sessions.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/__pycache__/sessions.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6bca238a1393d71c18ecd37e5f7e0039c9264e2b GIT binary patch literal 15901 zcmcIrTX5Xgc?R~r%jGWb6fcUPo2j*=rEDp-!#H*%nvP{ll)|Nxnr^xT7a$30Zw9cU zxTO*%;Z?CnKAN9~wh}8qxa4s?xVf7&DEmJM59?C{@ zty8V2hm}Y+mWxltMM3o~NX}BKcRhwSE!p;5$5aPvAI)~=x~95v-BaD7;1ND0D6Ovw zN=yyh_3~a*J?w29Z`;&XwdbzSe&5U9x8r?>+UvI7$KH10ZP#6o-LlUksPVh@BBuIT zi*B^&QTyC}152Jn?@y^sLbO`se7<1HrdG%s<9Lo;ESd65R=p?}i&}mTZ$gS}s-~7x zsZRHDAy4(_Iax_*b9vb;>Ga(5;>3lNJgZKkiIP%vP0ng%Ri~DtayC07XRbV>Wz3%f zMKp2Oq&zpLD$l1bjn_5yKbw_}D+!MkoKRmWsfKBVCRC${<*6BaU+iYXOx&5o<4r*o zrbI;mp2aDz>QjP>=T)Bz2fylHh}L%IbtR;DYg;M4si5MY3gIuj6i9@vXi7B0k6kOudBu=qX+}1*jHF;Y_$up5(xPV0O9pQ($)>4mGbK|sk{Q~qa}heRY;ory zRBj5(!b0s=yOkm;9tWK%A>l2bo}AYVNmpmHYQ{7qb6%CEr-#x-RnN(JHE#}0PfJ(S zB}vP(Z?veS6{&uI7Qpt-spcKg@)>G&)}TqH4=)cJg_538hn4KLlZKudRx}+GWUnO^ z_3H3dHGg$DtIZ4-m(2M>{&ez@M~4l~R8JO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*qm}s4wao3ue-J;tg;yOtn;j2V zIv&1#`mNwb#}li;tysrqEK!LiZXe!=B{ySdDzP*FIQjO_KYVT@HoEHF3bk#91}Y&e zv<-&FR@cB*_x`QUK7fSE?)}^CLU?dj2!|s`NeQ>V-g={TGt^fJ_1!x5L))3&>*AI7 zH~)QRGk1%WSdBZ?-$YB<-SjV@DG2u?)T7}C1Fzwo6-5S!sb#pCXax~OoX5`!VJ*(f zk8sP6Y(T5mQM(HUe*IH5>6kUhlK%BKXbK|g`}Jg+MW{K$y1^` zc}lo5PYHMKDba+9LHd#3Y>9pgn@;PbqV&H-VFk=3`W>w$npQkhK=h3LWYkE?GZ~!} zAq$xESb4P8*IVT^>u1J~uY{ z!ujz}Rb5^yw5TI;k2DL8SW-dU`%X}eIkzuR?KTw*kV90X;}^!=ABLXf-p^C|ckm7X z77Ri@biF9PCmi~*5c^M|<2~Ww_k{iU{}bWpd&2O0!l|DK55MpAz4r8%o_^2Q|0Cb= z-9Vq%^~O`X0&crc42h?1owyy{6;Roo6k}p+z2oSvfcq~GWjx}MpWz3gC@=Vhf#Hq* XQ|m(SZs286JhFcH^v?yVum%1v-c%a> literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask/__pycache__/signals.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/__pycache__/signals.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..91f19989c564b7ae6eeb3446fbf24a6def2ac4fe GIT binary patch literal 1212 zcmZ{jO>fgM7=WF&bX~iWeRS(KK!Xhliqu6gz9e89ALs4fi2?+^t;DSKA?S$Rdp_>#R68p{L_w{2tUyH>&5N&fMuz#lj_#p?X zr3W4D?1KhC4_Ls`9MIBgnkM@xC)G;V(i%tsls+BKsbx^+Z9ygY|F+VnB8P0XYyy#q ziLnIYN=)Puh-^%ZClF&Xkxw9UF;Pe$#$#e4fyl>1F@Y$=#MK01A|~{MV&&>Dxp@_h z7fjdns7Y~maO^=H7gUP5}N4{K0r)>Iu-E%2wQ&D7upBnk# z2mQnsLZ0u7TDnjmW)oE#jwzX~$|TQ2*a&EV5rkM?L_W6T*zO*}I3q_nNbII-I)rBj z9UkjLrO$`@!vIwJT2swoCiQio)aO!PWb5n0Sf7vRU*tzz;Xt2X2=(>3 z(uYI+&)`fR_W8C!ya3mcVL9z8!F9v3F{)Fiy=tL-V;{NuhGXv-{sG+jR5e{i0A-tw%#LF;%<F(we4y1Is_bjlWqiG5hJ+ zQSN)`dT+bC&2B#lOHUb?iWY92EFCYg%FA%!6$5k8^kUEG8fE%Y8{G}I z@+h2n%)n$+Ug{lo580g;VR@Z_QZ#?_L_gNq-HmX5lY!Z2arwkJHrTz_;o=(x%F*R= Om&c>!KI*t6mi-TVT1*`P literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask/__pycache__/templating.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/__pycache__/templating.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..54bb2b6c11419ca942276bfed4749514b39a4e39 GIT binary patch literal 9951 zcmdT~Yit`wexH4iT)srTsHZKhWyKa_Te9T%lGsTc`EAFM)7VWebX;o1T}hNFQkh*z zmO=qaE@-5lTPt_ClZ>K>ixxN=ZgKw559ybp0s7&97KIq*Dt2K3E)ECuzA2H?rvB9b ze|DFo6e@NO1$wtOXJ+T|pV^t;|2g{SV9-b4d3pDEg6<^bSNP&QE~~(;s~jPVL?tSh zB%@rES0?L68=?)YT$OAbZHhKQd8bRUB?}K;WaYffIq!m@8*m^28k)Y|+sFpI|Rl2N=jwKaCgL0))?n@h| z)8i@iH*j`H(G!bL#FViy9F9e*y)&-qINTo}rxYmJt)5~_jc!m)8I4UQjNw>3oieoR zIG}Do8%$FTNTgsrF{3zpl~cCcG!?qLPA3)p8WeXDBfL{8<|=p3Zl58B4O2oM)00b(89qba3uVZNyGY9^Wq6f;0bVlPdo3Am zL~`njIrI>$9wUrtiY-`zR*|*xmq^4led(k&sEj8K+1V1=-avVbrsJBfr)j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hL^roGz9z|s8S{6`uO zOh~o~Oy5)J?<@3npl<~F8$BOJ-&c^q5pQNBJ(BGP?a5p++lO0vBwG)rZ=RiPBe#(c zA9#;^hraw8?yA|KaQJ}Y22i+w!g*!inRDi+!QR%x*8Cjq@JK{k0qoQY!=882JNfRs znD52y1F*M3Yg;Ci4&__&Y`*>=D7n12bx0zb3tcY7V36QH^dE;0CqD*$p8IL;7ZHy? zk@^;X6{Wr<+!d6FtHnmb(Q)$lkQseipW2ih{gSO8(*rg0)OeQMug}#>H%77J8_D(! zrtc~ F{{mfYVpISC literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask/__pycache__/views.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/__pycache__/views.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..30a8195c704dc1c40ef2185f00a74b2411a98eaf GIT binary patch literal 6834 zcmb_gU2GKB6~6Pc>-8UNu)*g4+7RLm_8J5EsRamvfe^rnfKbU1nH}%kwFkyKn>({M zHb$``T5LpHqcj54RFF1Oi0DIKs;W|@zE8~^UQG*F;5v}uBYZ~2g)I)8(x*26I{Hg!7S!7Ps!z7FXD1N&AdoXchf^@ ze+PaUY)4vjp?!le(k~gLUw#8b0z#1cRYPGBL)`{;R0o`E+9f4(% z^q_88As^k*uoI^jrwTsUOEdXw8ifhF(cNI&p?a2@S;y70X-4e~jIm&&qoz9~nuF#D z%L+C+AIuNK#o;W2reS4=n$Su;d4d$hquB-(Z1n6HedFYDe=j;W^#O}H$r{l<#Xt^* zo$g8DE}az3*c?u5FjqG%IObp;Bo)vmlQeA`taHG!)8~77Xl@MF$ohPQyo9u0VU}gL zp8;-(99fT-2ZvZK%blQ$m43mwmM@>SB`i7Fko|WC8_jwWNliUm$p~ zy-^cX9UKcC0Fzis`xN%APYCBp6%f{vN(nVc`P#=a88dCNYmnw);GS@O&&zeJfrhBp=w(e6PEa<2cGjy3?qs~VjC{bhts=$R9Jfcn8ZuR5CVj2L)Q_8 zXMh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=`{Gk@4poY?wYEqGtAoQIWKaIr6b#y4x1tYgqN7ekJ z28t5|U(_C=eAa8#LCg6VOq^^7>w~Xb?NhBw)e!QXf(G#gzhU^%(z-IaqRlYXlX$|( z^exbkbR+tT3=(w$JTtB9hSbpwYk1l}5{9)J6qA7iJFNak1>cVCg_2gC z64Cu&?toxTNyf=@XU0&f*XuPTuTYT407&(##ogyy(7S=iIoXM0{9?oK`OTGJ1C;Yr zEfbq5G9-3RB&A@KDckY2K*5aeLr4f$c@LA*ZN@Bi z-Wn=d6@woDfbFyk71e{#OB)v;Coy?#cJcof@a;U~60(8!6I9e^1I^!WT+$EI#)sXy z{>-V-5%t_?eq>Ee?_3{|h0ZbNZTI3v*DVeV+!DL33fy4%I`ghp22BMH*1a|%-ge5l zIq+qGH>c!+_fjLmU22_<-2~8apcJ{i1cFMyX8&0i;p^r3Bi@=67!l6yb*(M<5!H^g z5=ZVvq;%h0H2{B_nnTolkD6zxq059-L1T;7uxf=G?l}v% zil`Mt^{kd~yMh!8iJinrR!$WF|2`T~-nwys9G>uclz)h-L&Sj;;=oR67hHVrhtuTY zdp0eey1jF-71|DGe;09LP&jPSb38P0%Jx#YD>e{j5&AeKTy_M>8V-joTXx2`r+=?x ziaf&Z_TPASEW+d4oo>?bqGmE7rk(IKP9)n=gWWM@)Fw5G;NThh)iq@J&& zJ-4Jox1_^gNj timedelta | None: + if value is None or isinstance(value, timedelta): + return value + + return timedelta(seconds=value) + + +class Flask(App): + """The flask object implements a WSGI application and acts as the central + object. It is passed the name of the module or package of the + application. Once it is created it will act as a central registry for + the view functions, the URL rules, template configuration and much more. + + The name of the package is used to resolve resources from inside the + package or the folder the module is contained in depending on if the + package parameter resolves to an actual python package (a folder with + an :file:`__init__.py` file inside) or a standard module (just a ``.py`` file). + + For more information about resource loading, see :func:`open_resource`. + + Usually you create a :class:`Flask` instance in your main module or + in the :file:`__init__.py` file of your package like this:: + + from flask import Flask + app = Flask(__name__) + + .. admonition:: About the First Parameter + + The idea of the first parameter is to give Flask an idea of what + belongs to your application. This name is used to find resources + on the filesystem, can be used by extensions to improve debugging + information and a lot more. + + So it's important what you provide there. If you are using a single + module, `__name__` is always the correct value. If you however are + using a package, it's usually recommended to hardcode the name of + your package there. + + For example if your application is defined in :file:`yourapplication/app.py` + you should create it with one of the two versions below:: + + app = Flask('yourapplication') + app = Flask(__name__.split('.')[0]) + + Why is that? The application will work even with `__name__`, thanks + to how resources are looked up. However it will make debugging more + painful. Certain extensions can make assumptions based on the + import name of your application. For example the Flask-SQLAlchemy + extension will look for the code in your application that triggered + an SQL query in debug mode. If the import name is not properly set + up, that debugging information is lost. (For example it would only + pick up SQL queries in `yourapplication.app` and not + `yourapplication.views.frontend`) + + .. versionadded:: 0.7 + The `static_url_path`, `static_folder`, and `template_folder` + parameters were added. + + .. versionadded:: 0.8 + The `instance_path` and `instance_relative_config` parameters were + added. + + .. versionadded:: 0.11 + The `root_path` parameter was added. + + .. versionadded:: 1.0 + The ``host_matching`` and ``static_host`` parameters were added. + + .. versionadded:: 1.0 + The ``subdomain_matching`` parameter was added. Subdomain + matching needs to be enabled manually now. Setting + :data:`SERVER_NAME` does not implicitly enable it. + + :param import_name: the name of the application package + :param static_url_path: can be used to specify a different path for the + static files on the web. Defaults to the name + of the `static_folder` folder. + :param static_folder: The folder with static files that is served at + ``static_url_path``. Relative to the application ``root_path`` + or an absolute path. Defaults to ``'static'``. + :param static_host: the host to use when adding the static route. + Defaults to None. Required when using ``host_matching=True`` + with a ``static_folder`` configured. + :param host_matching: set ``url_map.host_matching`` attribute. + Defaults to False. + :param subdomain_matching: consider the subdomain relative to + :data:`SERVER_NAME` when matching routes. Defaults to False. + :param template_folder: the folder that contains the templates that should + be used by the application. Defaults to + ``'templates'`` folder in the root path of the + application. + :param instance_path: An alternative instance path for the application. + By default the folder ``'instance'`` next to the + package or module is assumed to be the instance + path. + :param instance_relative_config: if set to ``True`` relative filenames + for loading the config are assumed to + be relative to the instance path instead + of the application root. + :param root_path: The path to the root of the application files. + This should only be set manually when it can't be detected + automatically, such as for namespace packages. + """ + + default_config = ImmutableDict( + { + "DEBUG": None, + "TESTING": False, + "PROPAGATE_EXCEPTIONS": None, + "SECRET_KEY": None, + "PERMANENT_SESSION_LIFETIME": timedelta(days=31), + "USE_X_SENDFILE": False, + "SERVER_NAME": None, + "APPLICATION_ROOT": "/", + "SESSION_COOKIE_NAME": "session", + "SESSION_COOKIE_DOMAIN": None, + "SESSION_COOKIE_PATH": None, + "SESSION_COOKIE_HTTPONLY": True, + "SESSION_COOKIE_SECURE": False, + "SESSION_COOKIE_SAMESITE": None, + "SESSION_REFRESH_EACH_REQUEST": True, + "MAX_CONTENT_LENGTH": None, + "SEND_FILE_MAX_AGE_DEFAULT": None, + "TRAP_BAD_REQUEST_ERRORS": None, + "TRAP_HTTP_EXCEPTIONS": False, + "EXPLAIN_TEMPLATE_LOADING": False, + "PREFERRED_URL_SCHEME": "http", + "TEMPLATES_AUTO_RELOAD": None, + "MAX_COOKIE_SIZE": 4093, + } + ) + + #: The class that is used for request objects. See :class:`~flask.Request` + #: for more information. + request_class = Request + + #: The class that is used for response objects. See + #: :class:`~flask.Response` for more information. + response_class = Response + + #: the session interface to use. By default an instance of + #: :class:`~flask.sessions.SecureCookieSessionInterface` is used here. + #: + #: .. versionadded:: 0.8 + session_interface: SessionInterface = SecureCookieSessionInterface() + + def __init__( + self, + import_name: str, + static_url_path: str | None = None, + static_folder: str | os.PathLike | None = "static", + static_host: str | None = None, + host_matching: bool = False, + subdomain_matching: bool = False, + template_folder: str | os.PathLike | None = "templates", + instance_path: str | None = None, + instance_relative_config: bool = False, + root_path: str | None = None, + ): + super().__init__( + import_name=import_name, + static_url_path=static_url_path, + static_folder=static_folder, + static_host=static_host, + host_matching=host_matching, + subdomain_matching=subdomain_matching, + template_folder=template_folder, + instance_path=instance_path, + instance_relative_config=instance_relative_config, + root_path=root_path, + ) + + # Add a static route using the provided static_url_path, static_host, + # and static_folder if there is a configured static_folder. + # Note we do this without checking if static_folder exists. + # For one, it might be created while the server is running (e.g. during + # development). Also, Google App Engine stores static files somewhere + if self.has_static_folder: + assert ( + bool(static_host) == host_matching + ), "Invalid static_host/host_matching combination" + # Use a weakref to avoid creating a reference cycle between the app + # and the view function (see #3761). + self_ref = weakref.ref(self) + self.add_url_rule( + f"{self.static_url_path}/", + endpoint="static", + host=static_host, + view_func=lambda **kw: self_ref().send_static_file(**kw), # type: ignore # noqa: B950 + ) + + def get_send_file_max_age(self, filename: str | None) -> int | None: + """Used by :func:`send_file` to determine the ``max_age`` cache + value for a given file path if it wasn't passed. + + By default, this returns :data:`SEND_FILE_MAX_AGE_DEFAULT` from + the configuration of :data:`~flask.current_app`. This defaults + to ``None``, which tells the browser to use conditional requests + instead of a timed cache, which is usually preferable. + + Note this is a duplicate of the same method in the Flask + class. + + .. versionchanged:: 2.0 + The default configuration is ``None`` instead of 12 hours. + + .. versionadded:: 0.9 + """ + value = current_app.config["SEND_FILE_MAX_AGE_DEFAULT"] + + if value is None: + return None + + if isinstance(value, timedelta): + return int(value.total_seconds()) + + return value + + def send_static_file(self, filename: str) -> Response: + """The view function used to serve files from + :attr:`static_folder`. A route is automatically registered for + this view at :attr:`static_url_path` if :attr:`static_folder` is + set. + + Note this is a duplicate of the same method in the Flask + class. + + .. versionadded:: 0.5 + + """ + if not self.has_static_folder: + raise RuntimeError("'static_folder' must be set to serve static_files.") + + # send_file only knows to call get_send_file_max_age on the app, + # call it here so it works for blueprints too. + max_age = self.get_send_file_max_age(filename) + return send_from_directory( + t.cast(str, self.static_folder), filename, max_age=max_age + ) + + def open_resource(self, resource: str, mode: str = "rb") -> t.IO[t.AnyStr]: + """Open a resource file relative to :attr:`root_path` for + reading. + + For example, if the file ``schema.sql`` is next to the file + ``app.py`` where the ``Flask`` app is defined, it can be opened + with: + + .. code-block:: python + + with app.open_resource("schema.sql") as f: + conn.executescript(f.read()) + + :param resource: Path to the resource relative to + :attr:`root_path`. + :param mode: Open the file in this mode. Only reading is + supported, valid values are "r" (or "rt") and "rb". + + Note this is a duplicate of the same method in the Flask + class. + + """ + if mode not in {"r", "rt", "rb"}: + raise ValueError("Resources can only be opened for reading.") + + return open(os.path.join(self.root_path, resource), mode) + + def open_instance_resource(self, resource: str, mode: str = "rb") -> t.IO[t.AnyStr]: + """Opens a resource from the application's instance folder + (:attr:`instance_path`). Otherwise works like + :meth:`open_resource`. Instance resources can also be opened for + writing. + + :param resource: the name of the resource. To access resources within + subfolders use forward slashes as separator. + :param mode: resource file opening mode, default is 'rb'. + """ + return open(os.path.join(self.instance_path, resource), mode) + + def create_jinja_environment(self) -> Environment: + """Create the Jinja environment based on :attr:`jinja_options` + and the various Jinja-related methods of the app. Changing + :attr:`jinja_options` after this will have no effect. Also adds + Flask-related globals and filters to the environment. + + .. versionchanged:: 0.11 + ``Environment.auto_reload`` set in accordance with + ``TEMPLATES_AUTO_RELOAD`` configuration option. + + .. versionadded:: 0.5 + """ + options = dict(self.jinja_options) + + if "autoescape" not in options: + options["autoescape"] = self.select_jinja_autoescape + + if "auto_reload" not in options: + auto_reload = self.config["TEMPLATES_AUTO_RELOAD"] + + if auto_reload is None: + auto_reload = self.debug + + options["auto_reload"] = auto_reload + + rv = self.jinja_environment(self, **options) + rv.globals.update( + url_for=self.url_for, + get_flashed_messages=get_flashed_messages, + config=self.config, + # request, session and g are normally added with the + # context processor for efficiency reasons but for imported + # templates we also want the proxies in there. + request=request, + session=session, + g=g, + ) + rv.policies["json.dumps_function"] = self.json.dumps + return rv + + def create_url_adapter(self, request: Request | None) -> MapAdapter | None: + """Creates a URL adapter for the given request. The URL adapter + is created at a point where the request context is not yet set + up so the request is passed explicitly. + + .. versionadded:: 0.6 + + .. versionchanged:: 0.9 + This can now also be called without a request object when the + URL adapter is created for the application context. + + .. versionchanged:: 1.0 + :data:`SERVER_NAME` no longer implicitly enables subdomain + matching. Use :attr:`subdomain_matching` instead. + """ + if request is not None: + # If subdomain matching is disabled (the default), use the + # default subdomain in all cases. This should be the default + # in Werkzeug but it currently does not have that feature. + if not self.subdomain_matching: + subdomain = self.url_map.default_subdomain or None + else: + subdomain = None + + return self.url_map.bind_to_environ( + request.environ, + server_name=self.config["SERVER_NAME"], + subdomain=subdomain, + ) + # We need at the very least the server name to be set for this + # to work. + if self.config["SERVER_NAME"] is not None: + return self.url_map.bind( + self.config["SERVER_NAME"], + script_name=self.config["APPLICATION_ROOT"], + url_scheme=self.config["PREFERRED_URL_SCHEME"], + ) + + return None + + def raise_routing_exception(self, request: Request) -> t.NoReturn: + """Intercept routing exceptions and possibly do something else. + + In debug mode, intercept a routing redirect and replace it with + an error if the body will be discarded. + + With modern Werkzeug this shouldn't occur, since it now uses a + 308 status which tells the browser to resend the method and + body. + + .. versionchanged:: 2.1 + Don't intercept 307 and 308 redirects. + + :meta private: + :internal: + """ + if ( + not self.debug + or not isinstance(request.routing_exception, RequestRedirect) + or request.routing_exception.code in {307, 308} + or request.method in {"GET", "HEAD", "OPTIONS"} + ): + raise request.routing_exception # type: ignore + + from .debughelpers import FormDataRoutingRedirect + + raise FormDataRoutingRedirect(request) + + def update_template_context(self, context: dict) -> None: + """Update the template context with some commonly used variables. + This injects request, session, config and g into the template + context as well as everything template context processors want + to inject. Note that the as of Flask 0.6, the original values + in the context will not be overridden if a context processor + decides to return a value with the same key. + + :param context: the context as a dictionary that is updated in place + to add extra variables. + """ + names: t.Iterable[str | None] = (None,) + + # A template may be rendered outside a request context. + if request: + names = chain(names, reversed(request.blueprints)) + + # The values passed to render_template take precedence. Keep a + # copy to re-apply after all context functions. + orig_ctx = context.copy() + + for name in names: + if name in self.template_context_processors: + for func in self.template_context_processors[name]: + context.update(self.ensure_sync(func)()) + + context.update(orig_ctx) + + def make_shell_context(self) -> dict: + """Returns the shell context for an interactive shell for this + application. This runs all the registered shell context + processors. + + .. versionadded:: 0.11 + """ + rv = {"app": self, "g": g} + for processor in self.shell_context_processors: + rv.update(processor()) + return rv + + def run( + self, + host: str | None = None, + port: int | None = None, + debug: bool | None = None, + load_dotenv: bool = True, + **options: t.Any, + ) -> None: + """Runs the application on a local development server. + + Do not use ``run()`` in a production setting. It is not intended to + meet security and performance requirements for a production server. + Instead, see :doc:`/deploying/index` for WSGI server recommendations. + + If the :attr:`debug` flag is set the server will automatically reload + for code changes and show a debugger in case an exception happened. + + If you want to run the application in debug mode, but disable the + code execution on the interactive debugger, you can pass + ``use_evalex=False`` as parameter. This will keep the debugger's + traceback screen active, but disable code execution. + + It is not recommended to use this function for development with + automatic reloading as this is badly supported. Instead you should + be using the :command:`flask` command line script's ``run`` support. + + .. admonition:: Keep in Mind + + Flask will suppress any server error with a generic error page + unless it is in debug mode. As such to enable just the + interactive debugger without the code reloading, you have to + invoke :meth:`run` with ``debug=True`` and ``use_reloader=False``. + Setting ``use_debugger`` to ``True`` without being in debug mode + won't catch any exceptions because there won't be any to + catch. + + :param host: the hostname to listen on. Set this to ``'0.0.0.0'`` to + have the server available externally as well. Defaults to + ``'127.0.0.1'`` or the host in the ``SERVER_NAME`` config variable + if present. + :param port: the port of the webserver. Defaults to ``5000`` or the + port defined in the ``SERVER_NAME`` config variable if present. + :param debug: if given, enable or disable debug mode. See + :attr:`debug`. + :param load_dotenv: Load the nearest :file:`.env` and :file:`.flaskenv` + files to set environment variables. Will also change the working + directory to the directory containing the first file found. + :param options: the options to be forwarded to the underlying Werkzeug + server. See :func:`werkzeug.serving.run_simple` for more + information. + + .. versionchanged:: 1.0 + If installed, python-dotenv will be used to load environment + variables from :file:`.env` and :file:`.flaskenv` files. + + The :envvar:`FLASK_DEBUG` environment variable will override :attr:`debug`. + + Threaded mode is enabled by default. + + .. versionchanged:: 0.10 + The default port is now picked from the ``SERVER_NAME`` + variable. + """ + # Ignore this call so that it doesn't start another server if + # the 'flask run' command is used. + if os.environ.get("FLASK_RUN_FROM_CLI") == "true": + if not is_running_from_reloader(): + click.secho( + " * Ignoring a call to 'app.run()' that would block" + " the current 'flask' CLI command.\n" + " Only call 'app.run()' in an 'if __name__ ==" + ' "__main__"\' guard.', + fg="red", + ) + + return + + if get_load_dotenv(load_dotenv): + cli.load_dotenv() + + # if set, env var overrides existing value + if "FLASK_DEBUG" in os.environ: + self.debug = get_debug_flag() + + # debug passed to method overrides all other sources + if debug is not None: + self.debug = bool(debug) + + server_name = self.config.get("SERVER_NAME") + sn_host = sn_port = None + + if server_name: + sn_host, _, sn_port = server_name.partition(":") + + if not host: + if sn_host: + host = sn_host + else: + host = "127.0.0.1" + + if port or port == 0: + port = int(port) + elif sn_port: + port = int(sn_port) + else: + port = 5000 + + options.setdefault("use_reloader", self.debug) + options.setdefault("use_debugger", self.debug) + options.setdefault("threaded", True) + + cli.show_server_banner(self.debug, self.name) + + from werkzeug.serving import run_simple + + try: + run_simple(t.cast(str, host), port, self, **options) + finally: + # reset the first request information if the development server + # reset normally. This makes it possible to restart the server + # without reloader and that stuff from an interactive shell. + self._got_first_request = False + + def test_client(self, use_cookies: bool = True, **kwargs: t.Any) -> FlaskClient: + """Creates a test client for this application. For information + about unit testing head over to :doc:`/testing`. + + Note that if you are testing for assertions or exceptions in your + application code, you must set ``app.testing = True`` in order for the + exceptions to propagate to the test client. Otherwise, the exception + will be handled by the application (not visible to the test client) and + the only indication of an AssertionError or other exception will be a + 500 status code response to the test client. See the :attr:`testing` + attribute. For example:: + + app.testing = True + client = app.test_client() + + The test client can be used in a ``with`` block to defer the closing down + of the context until the end of the ``with`` block. This is useful if + you want to access the context locals for testing:: + + with app.test_client() as c: + rv = c.get('/?vodka=42') + assert request.args['vodka'] == '42' + + Additionally, you may pass optional keyword arguments that will then + be passed to the application's :attr:`test_client_class` constructor. + For example:: + + from flask.testing import FlaskClient + + class CustomClient(FlaskClient): + def __init__(self, *args, **kwargs): + self._authentication = kwargs.pop("authentication") + super(CustomClient,self).__init__( *args, **kwargs) + + app.test_client_class = CustomClient + client = app.test_client(authentication='Basic ....') + + See :class:`~flask.testing.FlaskClient` for more information. + + .. versionchanged:: 0.4 + added support for ``with`` block usage for the client. + + .. versionadded:: 0.7 + The `use_cookies` parameter was added as well as the ability + to override the client to be used by setting the + :attr:`test_client_class` attribute. + + .. versionchanged:: 0.11 + Added `**kwargs` to support passing additional keyword arguments to + the constructor of :attr:`test_client_class`. + """ + cls = self.test_client_class + if cls is None: + from .testing import FlaskClient as cls + return cls( # type: ignore + self, self.response_class, use_cookies=use_cookies, **kwargs + ) + + def test_cli_runner(self, **kwargs: t.Any) -> FlaskCliRunner: + """Create a CLI runner for testing CLI commands. + See :ref:`testing-cli`. + + Returns an instance of :attr:`test_cli_runner_class`, by default + :class:`~flask.testing.FlaskCliRunner`. The Flask app object is + passed as the first argument. + + .. versionadded:: 1.0 + """ + cls = self.test_cli_runner_class + + if cls is None: + from .testing import FlaskCliRunner as cls + + return cls(self, **kwargs) # type: ignore + + def handle_http_exception( + self, e: HTTPException + ) -> HTTPException | ft.ResponseReturnValue: + """Handles an HTTP exception. By default this will invoke the + registered error handlers and fall back to returning the + exception as response. + + .. versionchanged:: 1.0.3 + ``RoutingException``, used internally for actions such as + slash redirects during routing, is not passed to error + handlers. + + .. versionchanged:: 1.0 + Exceptions are looked up by code *and* by MRO, so + ``HTTPException`` subclasses can be handled with a catch-all + handler for the base ``HTTPException``. + + .. versionadded:: 0.3 + """ + # Proxy exceptions don't have error codes. We want to always return + # those unchanged as errors + if e.code is None: + return e + + # RoutingExceptions are used internally to trigger routing + # actions, such as slash redirects raising RequestRedirect. They + # are not raised or handled in user code. + if isinstance(e, RoutingException): + return e + + handler = self._find_error_handler(e, request.blueprints) + if handler is None: + return e + return self.ensure_sync(handler)(e) + + def handle_user_exception( + self, e: Exception + ) -> HTTPException | ft.ResponseReturnValue: + """This method is called whenever an exception occurs that + should be handled. A special case is :class:`~werkzeug + .exceptions.HTTPException` which is forwarded to the + :meth:`handle_http_exception` method. This function will either + return a response value or reraise the exception with the same + traceback. + + .. versionchanged:: 1.0 + Key errors raised from request data like ``form`` show the + bad key in debug mode rather than a generic bad request + message. + + .. versionadded:: 0.7 + """ + if isinstance(e, BadRequestKeyError) and ( + self.debug or self.config["TRAP_BAD_REQUEST_ERRORS"] + ): + e.show_exception = True + + if isinstance(e, HTTPException) and not self.trap_http_exception(e): + return self.handle_http_exception(e) + + handler = self._find_error_handler(e, request.blueprints) + + if handler is None: + raise + + return self.ensure_sync(handler)(e) + + def handle_exception(self, e: Exception) -> Response: + """Handle an exception that did not have an error handler + associated with it, or that was raised from an error handler. + This always causes a 500 ``InternalServerError``. + + Always sends the :data:`got_request_exception` signal. + + If :data:`PROPAGATE_EXCEPTIONS` is ``True``, such as in debug + mode, the error will be re-raised so that the debugger can + display it. Otherwise, the original exception is logged, and + an :exc:`~werkzeug.exceptions.InternalServerError` is returned. + + If an error handler is registered for ``InternalServerError`` or + ``500``, it will be used. For consistency, the handler will + always receive the ``InternalServerError``. The original + unhandled exception is available as ``e.original_exception``. + + .. versionchanged:: 1.1.0 + Always passes the ``InternalServerError`` instance to the + handler, setting ``original_exception`` to the unhandled + error. + + .. versionchanged:: 1.1.0 + ``after_request`` functions and other finalization is done + even for the default 500 response when there is no handler. + + .. versionadded:: 0.3 + """ + exc_info = sys.exc_info() + got_request_exception.send(self, _async_wrapper=self.ensure_sync, exception=e) + propagate = self.config["PROPAGATE_EXCEPTIONS"] + + if propagate is None: + propagate = self.testing or self.debug + + if propagate: + # Re-raise if called with an active exception, otherwise + # raise the passed in exception. + if exc_info[1] is e: + raise + + raise e + + self.log_exception(exc_info) + server_error: InternalServerError | ft.ResponseReturnValue + server_error = InternalServerError(original_exception=e) + handler = self._find_error_handler(server_error, request.blueprints) + + if handler is not None: + server_error = self.ensure_sync(handler)(server_error) + + return self.finalize_request(server_error, from_error_handler=True) + + def log_exception( + self, + exc_info: (tuple[type, BaseException, TracebackType] | tuple[None, None, None]), + ) -> None: + """Logs an exception. This is called by :meth:`handle_exception` + if debugging is disabled and right before the handler is called. + The default implementation logs the exception as error on the + :attr:`logger`. + + .. versionadded:: 0.8 + """ + self.logger.error( + f"Exception on {request.path} [{request.method}]", exc_info=exc_info + ) + + def dispatch_request(self) -> ft.ResponseReturnValue: + """Does the request dispatching. Matches the URL and returns the + return value of the view or error handler. This does not have to + be a response object. In order to convert the return value to a + proper response object, call :func:`make_response`. + + .. versionchanged:: 0.7 + This no longer does the exception handling, this code was + moved to the new :meth:`full_dispatch_request`. + """ + req = request_ctx.request + if req.routing_exception is not None: + self.raise_routing_exception(req) + rule: Rule = req.url_rule # type: ignore[assignment] + # if we provide automatic options for this URL and the + # request came with the OPTIONS method, reply automatically + if ( + getattr(rule, "provide_automatic_options", False) + and req.method == "OPTIONS" + ): + return self.make_default_options_response() + # otherwise dispatch to the handler for that endpoint + view_args: dict[str, t.Any] = req.view_args # type: ignore[assignment] + return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) + + def full_dispatch_request(self) -> Response: + """Dispatches the request and on top of that performs request + pre and postprocessing as well as HTTP exception catching and + error handling. + + .. versionadded:: 0.7 + """ + self._got_first_request = True + + try: + request_started.send(self, _async_wrapper=self.ensure_sync) + rv = self.preprocess_request() + if rv is None: + rv = self.dispatch_request() + except Exception as e: + rv = self.handle_user_exception(e) + return self.finalize_request(rv) + + def finalize_request( + self, + rv: ft.ResponseReturnValue | HTTPException, + from_error_handler: bool = False, + ) -> Response: + """Given the return value from a view function this finalizes + the request by converting it into a response and invoking the + postprocessing functions. This is invoked for both normal + request dispatching as well as error handlers. + + Because this means that it might be called as a result of a + failure a special safe mode is available which can be enabled + with the `from_error_handler` flag. If enabled, failures in + response processing will be logged and otherwise ignored. + + :internal: + """ + response = self.make_response(rv) + try: + response = self.process_response(response) + request_finished.send( + self, _async_wrapper=self.ensure_sync, response=response + ) + except Exception: + if not from_error_handler: + raise + self.logger.exception( + "Request finalizing failed with an error while handling an error" + ) + return response + + def make_default_options_response(self) -> Response: + """This method is called to create the default ``OPTIONS`` response. + This can be changed through subclassing to change the default + behavior of ``OPTIONS`` responses. + + .. versionadded:: 0.7 + """ + adapter = request_ctx.url_adapter + methods = adapter.allowed_methods() # type: ignore[union-attr] + rv = self.response_class() + rv.allow.update(methods) + return rv + + def ensure_sync(self, func: t.Callable) -> t.Callable: + """Ensure that the function is synchronous for WSGI workers. + Plain ``def`` functions are returned as-is. ``async def`` + functions are wrapped to run and wait for the response. + + Override this method to change how the app runs async views. + + .. versionadded:: 2.0 + """ + if iscoroutinefunction(func): + return self.async_to_sync(func) + + return func + + def async_to_sync( + self, func: t.Callable[..., t.Coroutine] + ) -> t.Callable[..., t.Any]: + """Return a sync function that will run the coroutine function. + + .. code-block:: python + + result = app.async_to_sync(func)(*args, **kwargs) + + Override this method to change how the app converts async code + to be synchronously callable. + + .. versionadded:: 2.0 + """ + try: + from asgiref.sync import async_to_sync as asgiref_async_to_sync + except ImportError: + raise RuntimeError( + "Install Flask with the 'async' extra in order to use async views." + ) from None + + return asgiref_async_to_sync(func) + + def url_for( + self, + /, + endpoint: str, + *, + _anchor: str | None = None, + _method: str | None = None, + _scheme: str | None = None, + _external: bool | None = None, + **values: t.Any, + ) -> str: + """Generate a URL to the given endpoint with the given values. + + This is called by :func:`flask.url_for`, and can be called + directly as well. + + An *endpoint* is the name of a URL rule, usually added with + :meth:`@app.route() `, and usually the same name as the + view function. A route defined in a :class:`~flask.Blueprint` + will prepend the blueprint's name separated by a ``.`` to the + endpoint. + + In some cases, such as email messages, you want URLs to include + the scheme and domain, like ``https://example.com/hello``. When + not in an active request, URLs will be external by default, but + this requires setting :data:`SERVER_NAME` so Flask knows what + domain to use. :data:`APPLICATION_ROOT` and + :data:`PREFERRED_URL_SCHEME` should also be configured as + needed. This config is only used when not in an active request. + + Functions can be decorated with :meth:`url_defaults` to modify + keyword arguments before the URL is built. + + If building fails for some reason, such as an unknown endpoint + or incorrect values, the app's :meth:`handle_url_build_error` + method is called. If that returns a string, that is returned, + otherwise a :exc:`~werkzeug.routing.BuildError` is raised. + + :param endpoint: The endpoint name associated with the URL to + generate. If this starts with a ``.``, the current blueprint + name (if any) will be used. + :param _anchor: If given, append this as ``#anchor`` to the URL. + :param _method: If given, generate the URL associated with this + method for the endpoint. + :param _scheme: If given, the URL will have this scheme if it + is external. + :param _external: If given, prefer the URL to be internal + (False) or require it to be external (True). External URLs + include the scheme and domain. When not in an active + request, URLs are external by default. + :param values: Values to use for the variable parts of the URL + rule. Unknown keys are appended as query string arguments, + like ``?a=b&c=d``. + + .. versionadded:: 2.2 + Moved from ``flask.url_for``, which calls this method. + """ + req_ctx = _cv_request.get(None) + + if req_ctx is not None: + url_adapter = req_ctx.url_adapter + blueprint_name = req_ctx.request.blueprint + + # If the endpoint starts with "." and the request matches a + # blueprint, the endpoint is relative to the blueprint. + if endpoint[:1] == ".": + if blueprint_name is not None: + endpoint = f"{blueprint_name}{endpoint}" + else: + endpoint = endpoint[1:] + + # When in a request, generate a URL without scheme and + # domain by default, unless a scheme is given. + if _external is None: + _external = _scheme is not None + else: + app_ctx = _cv_app.get(None) + + # If called by helpers.url_for, an app context is active, + # use its url_adapter. Otherwise, app.url_for was called + # directly, build an adapter. + if app_ctx is not None: + url_adapter = app_ctx.url_adapter + else: + url_adapter = self.create_url_adapter(None) + + if url_adapter is None: + raise RuntimeError( + "Unable to build URLs outside an active request" + " without 'SERVER_NAME' configured. Also configure" + " 'APPLICATION_ROOT' and 'PREFERRED_URL_SCHEME' as" + " needed." + ) + + # When outside a request, generate a URL with scheme and + # domain by default. + if _external is None: + _external = True + + # It is an error to set _scheme when _external=False, in order + # to avoid accidental insecure URLs. + if _scheme is not None and not _external: + raise ValueError("When specifying '_scheme', '_external' must be True.") + + self.inject_url_defaults(endpoint, values) + + try: + rv = url_adapter.build( # type: ignore[union-attr] + endpoint, + values, + method=_method, + url_scheme=_scheme, + force_external=_external, + ) + except BuildError as error: + values.update( + _anchor=_anchor, _method=_method, _scheme=_scheme, _external=_external + ) + return self.handle_url_build_error(error, endpoint, values) + + if _anchor is not None: + _anchor = _url_quote(_anchor, safe="%!#$&'()*+,/:;=?@") + rv = f"{rv}#{_anchor}" + + return rv + + def make_response(self, rv: ft.ResponseReturnValue) -> Response: + """Convert the return value from a view function to an instance of + :attr:`response_class`. + + :param rv: the return value from the view function. The view function + must return a response. Returning ``None``, or the view ending + without returning, is not allowed. The following types are allowed + for ``view_rv``: + + ``str`` + A response object is created with the string encoded to UTF-8 + as the body. + + ``bytes`` + A response object is created with the bytes as the body. + + ``dict`` + A dictionary that will be jsonify'd before being returned. + + ``list`` + A list that will be jsonify'd before being returned. + + ``generator`` or ``iterator`` + A generator that returns ``str`` or ``bytes`` to be + streamed as the response. + + ``tuple`` + Either ``(body, status, headers)``, ``(body, status)``, or + ``(body, headers)``, where ``body`` is any of the other types + allowed here, ``status`` is a string or an integer, and + ``headers`` is a dictionary or a list of ``(key, value)`` + tuples. If ``body`` is a :attr:`response_class` instance, + ``status`` overwrites the exiting value and ``headers`` are + extended. + + :attr:`response_class` + The object is returned unchanged. + + other :class:`~werkzeug.wrappers.Response` class + The object is coerced to :attr:`response_class`. + + :func:`callable` + The function is called as a WSGI application. The result is + used to create a response object. + + .. versionchanged:: 2.2 + A generator will be converted to a streaming response. + A list will be converted to a JSON response. + + .. versionchanged:: 1.1 + A dict will be converted to a JSON response. + + .. versionchanged:: 0.9 + Previously a tuple was interpreted as the arguments for the + response object. + """ + + status = headers = None + + # unpack tuple returns + if isinstance(rv, tuple): + len_rv = len(rv) + + # a 3-tuple is unpacked directly + if len_rv == 3: + rv, status, headers = rv # type: ignore[misc] + # decide if a 2-tuple has status or headers + elif len_rv == 2: + if isinstance(rv[1], (Headers, dict, tuple, list)): + rv, headers = rv + else: + rv, status = rv # type: ignore[assignment,misc] + # other sized tuples are not allowed + else: + raise TypeError( + "The view function did not return a valid response tuple." + " The tuple must have the form (body, status, headers)," + " (body, status), or (body, headers)." + ) + + # the body must not be None + if rv is None: + raise TypeError( + f"The view function for {request.endpoint!r} did not" + " return a valid response. The function either returned" + " None or ended without a return statement." + ) + + # make sure the body is an instance of the response class + if not isinstance(rv, self.response_class): + if isinstance(rv, (str, bytes, bytearray)) or isinstance(rv, _abc_Iterator): + # let the response class set the status and headers instead of + # waiting to do it manually, so that the class can handle any + # special logic + rv = self.response_class( + rv, + status=status, + headers=headers, # type: ignore[arg-type] + ) + status = headers = None + elif isinstance(rv, (dict, list)): + rv = self.json.response(rv) + elif isinstance(rv, BaseResponse) or callable(rv): + # evaluate a WSGI callable, or coerce a different response + # class to the correct type + try: + rv = self.response_class.force_type( + rv, request.environ # type: ignore[arg-type] + ) + except TypeError as e: + raise TypeError( + f"{e}\nThe view function did not return a valid" + " response. The return type must be a string," + " dict, list, tuple with headers or status," + " Response instance, or WSGI callable, but it" + f" was a {type(rv).__name__}." + ).with_traceback(sys.exc_info()[2]) from None + else: + raise TypeError( + "The view function did not return a valid" + " response. The return type must be a string," + " dict, list, tuple with headers or status," + " Response instance, or WSGI callable, but it was a" + f" {type(rv).__name__}." + ) + + rv = t.cast(Response, rv) + # prefer the status if it was provided + if status is not None: + if isinstance(status, (str, bytes, bytearray)): + rv.status = status + else: + rv.status_code = status + + # extend existing headers with provided headers + if headers: + rv.headers.update(headers) # type: ignore[arg-type] + + return rv + + def preprocess_request(self) -> ft.ResponseReturnValue | None: + """Called before the request is dispatched. Calls + :attr:`url_value_preprocessors` registered with the app and the + current blueprint (if any). Then calls :attr:`before_request_funcs` + registered with the app and the blueprint. + + If any :meth:`before_request` handler returns a non-None value, the + value is handled as if it was the return value from the view, and + further request handling is stopped. + """ + names = (None, *reversed(request.blueprints)) + + for name in names: + if name in self.url_value_preprocessors: + for url_func in self.url_value_preprocessors[name]: + url_func(request.endpoint, request.view_args) + + for name in names: + if name in self.before_request_funcs: + for before_func in self.before_request_funcs[name]: + rv = self.ensure_sync(before_func)() + + if rv is not None: + return rv + + return None + + def process_response(self, response: Response) -> Response: + """Can be overridden in order to modify the response object + before it's sent to the WSGI server. By default this will + call all the :meth:`after_request` decorated functions. + + .. versionchanged:: 0.5 + As of Flask 0.5 the functions registered for after request + execution are called in reverse order of registration. + + :param response: a :attr:`response_class` object. + :return: a new response object or the same, has to be an + instance of :attr:`response_class`. + """ + ctx = request_ctx._get_current_object() # type: ignore[attr-defined] + + for func in ctx._after_request_functions: + response = self.ensure_sync(func)(response) + + for name in chain(request.blueprints, (None,)): + if name in self.after_request_funcs: + for func in reversed(self.after_request_funcs[name]): + response = self.ensure_sync(func)(response) + + if not self.session_interface.is_null_session(ctx.session): + self.session_interface.save_session(self, ctx.session, response) + + return response + + def do_teardown_request( + self, exc: BaseException | None = _sentinel # type: ignore + ) -> None: + """Called after the request is dispatched and the response is + returned, right before the request context is popped. + + This calls all functions decorated with + :meth:`teardown_request`, and :meth:`Blueprint.teardown_request` + if a blueprint handled the request. Finally, the + :data:`request_tearing_down` signal is sent. + + This is called by + :meth:`RequestContext.pop() `, + which may be delayed during testing to maintain access to + resources. + + :param exc: An unhandled exception raised while dispatching the + request. Detected from the current exception information if + not passed. Passed to each teardown function. + + .. versionchanged:: 0.9 + Added the ``exc`` argument. + """ + if exc is _sentinel: + exc = sys.exc_info()[1] + + for name in chain(request.blueprints, (None,)): + if name in self.teardown_request_funcs: + for func in reversed(self.teardown_request_funcs[name]): + self.ensure_sync(func)(exc) + + request_tearing_down.send(self, _async_wrapper=self.ensure_sync, exc=exc) + + def do_teardown_appcontext( + self, exc: BaseException | None = _sentinel # type: ignore + ) -> None: + """Called right before the application context is popped. + + When handling a request, the application context is popped + after the request context. See :meth:`do_teardown_request`. + + This calls all functions decorated with + :meth:`teardown_appcontext`. Then the + :data:`appcontext_tearing_down` signal is sent. + + This is called by + :meth:`AppContext.pop() `. + + .. versionadded:: 0.9 + """ + if exc is _sentinel: + exc = sys.exc_info()[1] + + for func in reversed(self.teardown_appcontext_funcs): + self.ensure_sync(func)(exc) + + appcontext_tearing_down.send(self, _async_wrapper=self.ensure_sync, exc=exc) + + def app_context(self) -> AppContext: + """Create an :class:`~flask.ctx.AppContext`. Use as a ``with`` + block to push the context, which will make :data:`current_app` + point at this application. + + An application context is automatically pushed by + :meth:`RequestContext.push() ` + when handling a request, and when running a CLI command. Use + this to manually create a context outside of these situations. + + :: + + with app.app_context(): + init_db() + + See :doc:`/appcontext`. + + .. versionadded:: 0.9 + """ + return AppContext(self) + + def request_context(self, environ: dict) -> RequestContext: + """Create a :class:`~flask.ctx.RequestContext` representing a + WSGI environment. Use a ``with`` block to push the context, + which will make :data:`request` point at this request. + + See :doc:`/reqcontext`. + + Typically you should not call this from your own code. A request + context is automatically pushed by the :meth:`wsgi_app` when + handling a request. Use :meth:`test_request_context` to create + an environment and context instead of this method. + + :param environ: a WSGI environment + """ + return RequestContext(self, environ) + + def test_request_context(self, *args: t.Any, **kwargs: t.Any) -> RequestContext: + """Create a :class:`~flask.ctx.RequestContext` for a WSGI + environment created from the given values. This is mostly useful + during testing, where you may want to run a function that uses + request data without dispatching a full request. + + See :doc:`/reqcontext`. + + Use a ``with`` block to push the context, which will make + :data:`request` point at the request for the created + environment. :: + + with app.test_request_context(...): + generate_report() + + When using the shell, it may be easier to push and pop the + context manually to avoid indentation. :: + + ctx = app.test_request_context(...) + ctx.push() + ... + ctx.pop() + + Takes the same arguments as Werkzeug's + :class:`~werkzeug.test.EnvironBuilder`, with some defaults from + the application. See the linked Werkzeug docs for most of the + available arguments. Flask-specific behavior is listed here. + + :param path: URL path being requested. + :param base_url: Base URL where the app is being served, which + ``path`` is relative to. If not given, built from + :data:`PREFERRED_URL_SCHEME`, ``subdomain``, + :data:`SERVER_NAME`, and :data:`APPLICATION_ROOT`. + :param subdomain: Subdomain name to append to + :data:`SERVER_NAME`. + :param url_scheme: Scheme to use instead of + :data:`PREFERRED_URL_SCHEME`. + :param data: The request body, either as a string or a dict of + form keys and values. + :param json: If given, this is serialized as JSON and passed as + ``data``. Also defaults ``content_type`` to + ``application/json``. + :param args: other positional arguments passed to + :class:`~werkzeug.test.EnvironBuilder`. + :param kwargs: other keyword arguments passed to + :class:`~werkzeug.test.EnvironBuilder`. + """ + from .testing import EnvironBuilder + + builder = EnvironBuilder(self, *args, **kwargs) + + try: + return self.request_context(builder.get_environ()) + finally: + builder.close() + + def wsgi_app(self, environ: dict, start_response: t.Callable) -> t.Any: + """The actual WSGI application. This is not implemented in + :meth:`__call__` so that middlewares can be applied without + losing a reference to the app object. Instead of doing this:: + + app = MyMiddleware(app) + + It's a better idea to do this instead:: + + app.wsgi_app = MyMiddleware(app.wsgi_app) + + Then you still have the original application object around and + can continue to call methods on it. + + .. versionchanged:: 0.7 + Teardown events for the request and app contexts are called + even if an unhandled error occurs. Other events may not be + called depending on when an error occurs during dispatch. + See :ref:`callbacks-and-errors`. + + :param environ: A WSGI environment. + :param start_response: A callable accepting a status code, + a list of headers, and an optional exception context to + start the response. + """ + ctx = self.request_context(environ) + error: BaseException | None = None + try: + try: + ctx.push() + response = self.full_dispatch_request() + except Exception as e: + error = e + response = self.handle_exception(e) + except: # noqa: B001 + error = sys.exc_info()[1] + raise + return response(environ, start_response) + finally: + if "werkzeug.debug.preserve_context" in environ: + environ["werkzeug.debug.preserve_context"](_cv_app.get()) + environ["werkzeug.debug.preserve_context"](_cv_request.get()) + + if error is not None and self.should_ignore_error(error): + error = None + + ctx.pop(error) + + def __call__(self, environ: dict, start_response: t.Callable) -> t.Any: + """The WSGI server calls the Flask application object as the + WSGI application. This calls :meth:`wsgi_app`, which can be + wrapped to apply middleware. + """ + return self.wsgi_app(environ, start_response) diff --git a/venv/lib/python3.12/site-packages/flask/blueprints.py b/venv/lib/python3.12/site-packages/flask/blueprints.py new file mode 100644 index 0000000..3a37a2c --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/blueprints.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +import os +import typing as t +from datetime import timedelta + +from .globals import current_app +from .helpers import send_from_directory +from .sansio.blueprints import Blueprint as SansioBlueprint +from .sansio.blueprints import BlueprintSetupState as BlueprintSetupState # noqa + +if t.TYPE_CHECKING: # pragma: no cover + from .wrappers import Response + + +class Blueprint(SansioBlueprint): + def get_send_file_max_age(self, filename: str | None) -> int | None: + """Used by :func:`send_file` to determine the ``max_age`` cache + value for a given file path if it wasn't passed. + + By default, this returns :data:`SEND_FILE_MAX_AGE_DEFAULT` from + the configuration of :data:`~flask.current_app`. This defaults + to ``None``, which tells the browser to use conditional requests + instead of a timed cache, which is usually preferable. + + Note this is a duplicate of the same method in the Flask + class. + + .. versionchanged:: 2.0 + The default configuration is ``None`` instead of 12 hours. + + .. versionadded:: 0.9 + """ + value = current_app.config["SEND_FILE_MAX_AGE_DEFAULT"] + + if value is None: + return None + + if isinstance(value, timedelta): + return int(value.total_seconds()) + + return value + + def send_static_file(self, filename: str) -> Response: + """The view function used to serve files from + :attr:`static_folder`. A route is automatically registered for + this view at :attr:`static_url_path` if :attr:`static_folder` is + set. + + Note this is a duplicate of the same method in the Flask + class. + + .. versionadded:: 0.5 + + """ + if not self.has_static_folder: + raise RuntimeError("'static_folder' must be set to serve static_files.") + + # send_file only knows to call get_send_file_max_age on the app, + # call it here so it works for blueprints too. + max_age = self.get_send_file_max_age(filename) + return send_from_directory( + t.cast(str, self.static_folder), filename, max_age=max_age + ) + + def open_resource(self, resource: str, mode: str = "rb") -> t.IO[t.AnyStr]: + """Open a resource file relative to :attr:`root_path` for + reading. + + For example, if the file ``schema.sql`` is next to the file + ``app.py`` where the ``Flask`` app is defined, it can be opened + with: + + .. code-block:: python + + with app.open_resource("schema.sql") as f: + conn.executescript(f.read()) + + :param resource: Path to the resource relative to + :attr:`root_path`. + :param mode: Open the file in this mode. Only reading is + supported, valid values are "r" (or "rt") and "rb". + + Note this is a duplicate of the same method in the Flask + class. + + """ + if mode not in {"r", "rt", "rb"}: + raise ValueError("Resources can only be opened for reading.") + + return open(os.path.join(self.root_path, resource), mode) diff --git a/venv/lib/python3.12/site-packages/flask/cli.py b/venv/lib/python3.12/site-packages/flask/cli.py new file mode 100644 index 0000000..dda266b --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/cli.py @@ -0,0 +1,1068 @@ +from __future__ import annotations + +import ast +import importlib.metadata +import inspect +import os +import platform +import re +import sys +import traceback +import typing as t +from functools import update_wrapper +from operator import itemgetter + +import click +from click.core import ParameterSource +from werkzeug import run_simple +from werkzeug.serving import is_running_from_reloader +from werkzeug.utils import import_string + +from .globals import current_app +from .helpers import get_debug_flag +from .helpers import get_load_dotenv + +if t.TYPE_CHECKING: + from .app import Flask + + +class NoAppException(click.UsageError): + """Raised if an application cannot be found or loaded.""" + + +def find_best_app(module): + """Given a module instance this tries to find the best possible + application in the module or raises an exception. + """ + from . import Flask + + # Search for the most common names first. + for attr_name in ("app", "application"): + app = getattr(module, attr_name, None) + + if isinstance(app, Flask): + return app + + # Otherwise find the only object that is a Flask instance. + matches = [v for v in module.__dict__.values() if isinstance(v, Flask)] + + if len(matches) == 1: + return matches[0] + elif len(matches) > 1: + raise NoAppException( + "Detected multiple Flask applications in module" + f" '{module.__name__}'. Use '{module.__name__}:name'" + " to specify the correct one." + ) + + # Search for app factory functions. + for attr_name in ("create_app", "make_app"): + app_factory = getattr(module, attr_name, None) + + if inspect.isfunction(app_factory): + try: + app = app_factory() + + if isinstance(app, Flask): + return app + except TypeError as e: + if not _called_with_wrong_args(app_factory): + raise + + raise NoAppException( + f"Detected factory '{attr_name}' in module '{module.__name__}'," + " but could not call it without arguments. Use" + f" '{module.__name__}:{attr_name}(args)'" + " to specify arguments." + ) from e + + raise NoAppException( + "Failed to find Flask application or factory in module" + f" '{module.__name__}'. Use '{module.__name__}:name'" + " to specify one." + ) + + +def _called_with_wrong_args(f): + """Check whether calling a function raised a ``TypeError`` because + the call failed or because something in the factory raised the + error. + + :param f: The function that was called. + :return: ``True`` if the call failed. + """ + tb = sys.exc_info()[2] + + try: + while tb is not None: + if tb.tb_frame.f_code is f.__code__: + # In the function, it was called successfully. + return False + + tb = tb.tb_next + + # Didn't reach the function. + return True + finally: + # Delete tb to break a circular reference. + # https://docs.python.org/2/library/sys.html#sys.exc_info + del tb + + +def find_app_by_string(module, app_name): + """Check if the given string is a variable name or a function. Call + a function to get the app instance, or return the variable directly. + """ + from . import Flask + + # Parse app_name as a single expression to determine if it's a valid + # attribute name or function call. + try: + expr = ast.parse(app_name.strip(), mode="eval").body + except SyntaxError: + raise NoAppException( + f"Failed to parse {app_name!r} as an attribute name or function call." + ) from None + + if isinstance(expr, ast.Name): + name = expr.id + args = [] + kwargs = {} + elif isinstance(expr, ast.Call): + # Ensure the function name is an attribute name only. + if not isinstance(expr.func, ast.Name): + raise NoAppException( + f"Function reference must be a simple name: {app_name!r}." + ) + + name = expr.func.id + + # Parse the positional and keyword arguments as literals. + try: + args = [ast.literal_eval(arg) for arg in expr.args] + kwargs = {kw.arg: ast.literal_eval(kw.value) for kw in expr.keywords} + except ValueError: + # literal_eval gives cryptic error messages, show a generic + # message with the full expression instead. + raise NoAppException( + f"Failed to parse arguments as literal values: {app_name!r}." + ) from None + else: + raise NoAppException( + f"Failed to parse {app_name!r} as an attribute name or function call." + ) + + try: + attr = getattr(module, name) + except AttributeError as e: + raise NoAppException( + f"Failed to find attribute {name!r} in {module.__name__!r}." + ) from e + + # If the attribute is a function, call it with any args and kwargs + # to get the real application. + if inspect.isfunction(attr): + try: + app = attr(*args, **kwargs) + except TypeError as e: + if not _called_with_wrong_args(attr): + raise + + raise NoAppException( + f"The factory {app_name!r} in module" + f" {module.__name__!r} could not be called with the" + " specified arguments." + ) from e + else: + app = attr + + if isinstance(app, Flask): + return app + + raise NoAppException( + "A valid Flask application was not obtained from" + f" '{module.__name__}:{app_name}'." + ) + + +def prepare_import(path): + """Given a filename this will try to calculate the python path, add it + to the search path and return the actual module name that is expected. + """ + path = os.path.realpath(path) + + fname, ext = os.path.splitext(path) + if ext == ".py": + path = fname + + if os.path.basename(path) == "__init__": + path = os.path.dirname(path) + + module_name = [] + + # move up until outside package structure (no __init__.py) + while True: + path, name = os.path.split(path) + module_name.append(name) + + if not os.path.exists(os.path.join(path, "__init__.py")): + break + + if sys.path[0] != path: + sys.path.insert(0, path) + + return ".".join(module_name[::-1]) + + +def locate_app(module_name, app_name, raise_if_not_found=True): + try: + __import__(module_name) + except ImportError: + # Reraise the ImportError if it occurred within the imported module. + # Determine this by checking whether the trace has a depth > 1. + if sys.exc_info()[2].tb_next: + raise NoAppException( + f"While importing {module_name!r}, an ImportError was" + f" raised:\n\n{traceback.format_exc()}" + ) from None + elif raise_if_not_found: + raise NoAppException(f"Could not import {module_name!r}.") from None + else: + return + + module = sys.modules[module_name] + + if app_name is None: + return find_best_app(module) + else: + return find_app_by_string(module, app_name) + + +def get_version(ctx, param, value): + if not value or ctx.resilient_parsing: + return + + flask_version = importlib.metadata.version("flask") + werkzeug_version = importlib.metadata.version("werkzeug") + + click.echo( + f"Python {platform.python_version()}\n" + f"Flask {flask_version}\n" + f"Werkzeug {werkzeug_version}", + color=ctx.color, + ) + ctx.exit() + + +version_option = click.Option( + ["--version"], + help="Show the Flask version.", + expose_value=False, + callback=get_version, + is_flag=True, + is_eager=True, +) + + +class ScriptInfo: + """Helper object to deal with Flask applications. This is usually not + necessary to interface with as it's used internally in the dispatching + to click. In future versions of Flask this object will most likely play + a bigger role. Typically it's created automatically by the + :class:`FlaskGroup` but you can also manually create it and pass it + onwards as click object. + """ + + def __init__( + self, + app_import_path: str | None = None, + create_app: t.Callable[..., Flask] | None = None, + set_debug_flag: bool = True, + ) -> None: + #: Optionally the import path for the Flask application. + self.app_import_path = app_import_path + #: Optionally a function that is passed the script info to create + #: the instance of the application. + self.create_app = create_app + #: A dictionary with arbitrary data that can be associated with + #: this script info. + self.data: dict[t.Any, t.Any] = {} + self.set_debug_flag = set_debug_flag + self._loaded_app: Flask | None = None + + def load_app(self) -> Flask: + """Loads the Flask app (if not yet loaded) and returns it. Calling + this multiple times will just result in the already loaded app to + be returned. + """ + if self._loaded_app is not None: + return self._loaded_app + + if self.create_app is not None: + app = self.create_app() + else: + if self.app_import_path: + path, name = ( + re.split(r":(?![\\/])", self.app_import_path, maxsplit=1) + [None] + )[:2] + import_name = prepare_import(path) + app = locate_app(import_name, name) + else: + for path in ("wsgi.py", "app.py"): + import_name = prepare_import(path) + app = locate_app(import_name, None, raise_if_not_found=False) + + if app: + break + + if not app: + raise NoAppException( + "Could not locate a Flask application. Use the" + " 'flask --app' option, 'FLASK_APP' environment" + " variable, or a 'wsgi.py' or 'app.py' file in the" + " current directory." + ) + + if self.set_debug_flag: + # Update the app's debug flag through the descriptor so that + # other values repopulate as well. + app.debug = get_debug_flag() + + self._loaded_app = app + return app + + +pass_script_info = click.make_pass_decorator(ScriptInfo, ensure=True) + + +def with_appcontext(f): + """Wraps a callback so that it's guaranteed to be executed with the + script's application context. + + Custom commands (and their options) registered under ``app.cli`` or + ``blueprint.cli`` will always have an app context available, this + decorator is not required in that case. + + .. versionchanged:: 2.2 + The app context is active for subcommands as well as the + decorated callback. The app context is always available to + ``app.cli`` command and parameter callbacks. + """ + + @click.pass_context + def decorator(__ctx, *args, **kwargs): + if not current_app: + app = __ctx.ensure_object(ScriptInfo).load_app() + __ctx.with_resource(app.app_context()) + + return __ctx.invoke(f, *args, **kwargs) + + return update_wrapper(decorator, f) + + +class AppGroup(click.Group): + """This works similar to a regular click :class:`~click.Group` but it + changes the behavior of the :meth:`command` decorator so that it + automatically wraps the functions in :func:`with_appcontext`. + + Not to be confused with :class:`FlaskGroup`. + """ + + def command(self, *args, **kwargs): + """This works exactly like the method of the same name on a regular + :class:`click.Group` but it wraps callbacks in :func:`with_appcontext` + unless it's disabled by passing ``with_appcontext=False``. + """ + wrap_for_ctx = kwargs.pop("with_appcontext", True) + + def decorator(f): + if wrap_for_ctx: + f = with_appcontext(f) + return click.Group.command(self, *args, **kwargs)(f) + + return decorator + + def group(self, *args, **kwargs): + """This works exactly like the method of the same name on a regular + :class:`click.Group` but it defaults the group class to + :class:`AppGroup`. + """ + kwargs.setdefault("cls", AppGroup) + return click.Group.group(self, *args, **kwargs) + + +def _set_app(ctx: click.Context, param: click.Option, value: str | None) -> str | None: + if value is None: + return None + + info = ctx.ensure_object(ScriptInfo) + info.app_import_path = value + return value + + +# This option is eager so the app will be available if --help is given. +# --help is also eager, so --app must be before it in the param list. +# no_args_is_help bypasses eager processing, so this option must be +# processed manually in that case to ensure FLASK_APP gets picked up. +_app_option = click.Option( + ["-A", "--app"], + metavar="IMPORT", + help=( + "The Flask application or factory function to load, in the form 'module:name'." + " Module can be a dotted import or file path. Name is not required if it is" + " 'app', 'application', 'create_app', or 'make_app', and can be 'name(args)' to" + " pass arguments." + ), + is_eager=True, + expose_value=False, + callback=_set_app, +) + + +def _set_debug(ctx: click.Context, param: click.Option, value: bool) -> bool | None: + # If the flag isn't provided, it will default to False. Don't use + # that, let debug be set by env in that case. + source = ctx.get_parameter_source(param.name) # type: ignore[arg-type] + + if source is not None and source in ( + ParameterSource.DEFAULT, + ParameterSource.DEFAULT_MAP, + ): + return None + + # Set with env var instead of ScriptInfo.load so that it can be + # accessed early during a factory function. + os.environ["FLASK_DEBUG"] = "1" if value else "0" + return value + + +_debug_option = click.Option( + ["--debug/--no-debug"], + help="Set debug mode.", + expose_value=False, + callback=_set_debug, +) + + +def _env_file_callback( + ctx: click.Context, param: click.Option, value: str | None +) -> str | None: + if value is None: + return None + + import importlib + + try: + importlib.import_module("dotenv") + except ImportError: + raise click.BadParameter( + "python-dotenv must be installed to load an env file.", + ctx=ctx, + param=param, + ) from None + + # Don't check FLASK_SKIP_DOTENV, that only disables automatically + # loading .env and .flaskenv files. + load_dotenv(value) + return value + + +# This option is eager so env vars are loaded as early as possible to be +# used by other options. +_env_file_option = click.Option( + ["-e", "--env-file"], + type=click.Path(exists=True, dir_okay=False), + help="Load environment variables from this file. python-dotenv must be installed.", + is_eager=True, + expose_value=False, + callback=_env_file_callback, +) + + +class FlaskGroup(AppGroup): + """Special subclass of the :class:`AppGroup` group that supports + loading more commands from the configured Flask app. Normally a + developer does not have to interface with this class but there are + some very advanced use cases for which it makes sense to create an + instance of this. see :ref:`custom-scripts`. + + :param add_default_commands: if this is True then the default run and + shell commands will be added. + :param add_version_option: adds the ``--version`` option. + :param create_app: an optional callback that is passed the script info and + returns the loaded app. + :param load_dotenv: Load the nearest :file:`.env` and :file:`.flaskenv` + files to set environment variables. Will also change the working + directory to the directory containing the first file found. + :param set_debug_flag: Set the app's debug flag. + + .. versionchanged:: 2.2 + Added the ``-A/--app``, ``--debug/--no-debug``, ``-e/--env-file`` options. + + .. versionchanged:: 2.2 + An app context is pushed when running ``app.cli`` commands, so + ``@with_appcontext`` is no longer required for those commands. + + .. versionchanged:: 1.0 + If installed, python-dotenv will be used to load environment variables + from :file:`.env` and :file:`.flaskenv` files. + """ + + def __init__( + self, + add_default_commands: bool = True, + create_app: t.Callable[..., Flask] | None = None, + add_version_option: bool = True, + load_dotenv: bool = True, + set_debug_flag: bool = True, + **extra: t.Any, + ) -> None: + params = list(extra.pop("params", None) or ()) + # Processing is done with option callbacks instead of a group + # callback. This allows users to make a custom group callback + # without losing the behavior. --env-file must come first so + # that it is eagerly evaluated before --app. + params.extend((_env_file_option, _app_option, _debug_option)) + + if add_version_option: + params.append(version_option) + + if "context_settings" not in extra: + extra["context_settings"] = {} + + extra["context_settings"].setdefault("auto_envvar_prefix", "FLASK") + + super().__init__(params=params, **extra) + + self.create_app = create_app + self.load_dotenv = load_dotenv + self.set_debug_flag = set_debug_flag + + if add_default_commands: + self.add_command(run_command) + self.add_command(shell_command) + self.add_command(routes_command) + + self._loaded_plugin_commands = False + + def _load_plugin_commands(self): + if self._loaded_plugin_commands: + return + + if sys.version_info >= (3, 10): + from importlib import metadata + else: + # Use a backport on Python < 3.10. We technically have + # importlib.metadata on 3.8+, but the API changed in 3.10, + # so use the backport for consistency. + import importlib_metadata as metadata + + for ep in metadata.entry_points(group="flask.commands"): + self.add_command(ep.load(), ep.name) + + self._loaded_plugin_commands = True + + def get_command(self, ctx, name): + self._load_plugin_commands() + # Look up built-in and plugin commands, which should be + # available even if the app fails to load. + rv = super().get_command(ctx, name) + + if rv is not None: + return rv + + info = ctx.ensure_object(ScriptInfo) + + # Look up commands provided by the app, showing an error and + # continuing if the app couldn't be loaded. + try: + app = info.load_app() + except NoAppException as e: + click.secho(f"Error: {e.format_message()}\n", err=True, fg="red") + return None + + # Push an app context for the loaded app unless it is already + # active somehow. This makes the context available to parameter + # and command callbacks without needing @with_appcontext. + if not current_app or current_app._get_current_object() is not app: + ctx.with_resource(app.app_context()) + + return app.cli.get_command(ctx, name) + + def list_commands(self, ctx): + self._load_plugin_commands() + # Start with the built-in and plugin commands. + rv = set(super().list_commands(ctx)) + info = ctx.ensure_object(ScriptInfo) + + # Add commands provided by the app, showing an error and + # continuing if the app couldn't be loaded. + try: + rv.update(info.load_app().cli.list_commands(ctx)) + except NoAppException as e: + # When an app couldn't be loaded, show the error message + # without the traceback. + click.secho(f"Error: {e.format_message()}\n", err=True, fg="red") + except Exception: + # When any other errors occurred during loading, show the + # full traceback. + click.secho(f"{traceback.format_exc()}\n", err=True, fg="red") + + return sorted(rv) + + def make_context( + self, + info_name: str | None, + args: list[str], + parent: click.Context | None = None, + **extra: t.Any, + ) -> click.Context: + # Set a flag to tell app.run to become a no-op. If app.run was + # not in a __name__ == __main__ guard, it would start the server + # when importing, blocking whatever command is being called. + os.environ["FLASK_RUN_FROM_CLI"] = "true" + + # Attempt to load .env and .flask env files. The --env-file + # option can cause another file to be loaded. + if get_load_dotenv(self.load_dotenv): + load_dotenv() + + if "obj" not in extra and "obj" not in self.context_settings: + extra["obj"] = ScriptInfo( + create_app=self.create_app, set_debug_flag=self.set_debug_flag + ) + + return super().make_context(info_name, args, parent=parent, **extra) + + def parse_args(self, ctx: click.Context, args: list[str]) -> list[str]: + if not args and self.no_args_is_help: + # Attempt to load --env-file and --app early in case they + # were given as env vars. Otherwise no_args_is_help will not + # see commands from app.cli. + _env_file_option.handle_parse_result(ctx, {}, []) + _app_option.handle_parse_result(ctx, {}, []) + + return super().parse_args(ctx, args) + + +def _path_is_ancestor(path, other): + """Take ``other`` and remove the length of ``path`` from it. Then join it + to ``path``. If it is the original value, ``path`` is an ancestor of + ``other``.""" + return os.path.join(path, other[len(path) :].lstrip(os.sep)) == other + + +def load_dotenv(path: str | os.PathLike | None = None) -> bool: + """Load "dotenv" files in order of precedence to set environment variables. + + If an env var is already set it is not overwritten, so earlier files in the + list are preferred over later files. + + This is a no-op if `python-dotenv`_ is not installed. + + .. _python-dotenv: https://github.com/theskumar/python-dotenv#readme + + :param path: Load the file at this location instead of searching. + :return: ``True`` if a file was loaded. + + .. versionchanged:: 2.0 + The current directory is not changed to the location of the + loaded file. + + .. versionchanged:: 2.0 + When loading the env files, set the default encoding to UTF-8. + + .. versionchanged:: 1.1.0 + Returns ``False`` when python-dotenv is not installed, or when + the given path isn't a file. + + .. versionadded:: 1.0 + """ + try: + import dotenv + except ImportError: + if path or os.path.isfile(".env") or os.path.isfile(".flaskenv"): + click.secho( + " * Tip: There are .env or .flaskenv files present." + ' Do "pip install python-dotenv" to use them.', + fg="yellow", + err=True, + ) + + return False + + # Always return after attempting to load a given path, don't load + # the default files. + if path is not None: + if os.path.isfile(path): + return dotenv.load_dotenv(path, encoding="utf-8") + + return False + + loaded = False + + for name in (".env", ".flaskenv"): + path = dotenv.find_dotenv(name, usecwd=True) + + if not path: + continue + + dotenv.load_dotenv(path, encoding="utf-8") + loaded = True + + return loaded # True if at least one file was located and loaded. + + +def show_server_banner(debug, app_import_path): + """Show extra startup messages the first time the server is run, + ignoring the reloader. + """ + if is_running_from_reloader(): + return + + if app_import_path is not None: + click.echo(f" * Serving Flask app '{app_import_path}'") + + if debug is not None: + click.echo(f" * Debug mode: {'on' if debug else 'off'}") + + +class CertParamType(click.ParamType): + """Click option type for the ``--cert`` option. Allows either an + existing file, the string ``'adhoc'``, or an import for a + :class:`~ssl.SSLContext` object. + """ + + name = "path" + + def __init__(self): + self.path_type = click.Path(exists=True, dir_okay=False, resolve_path=True) + + def convert(self, value, param, ctx): + try: + import ssl + except ImportError: + raise click.BadParameter( + 'Using "--cert" requires Python to be compiled with SSL support.', + ctx, + param, + ) from None + + try: + return self.path_type(value, param, ctx) + except click.BadParameter: + value = click.STRING(value, param, ctx).lower() + + if value == "adhoc": + try: + import cryptography # noqa: F401 + except ImportError: + raise click.BadParameter( + "Using ad-hoc certificates requires the cryptography library.", + ctx, + param, + ) from None + + return value + + obj = import_string(value, silent=True) + + if isinstance(obj, ssl.SSLContext): + return obj + + raise + + +def _validate_key(ctx, param, value): + """The ``--key`` option must be specified when ``--cert`` is a file. + Modifies the ``cert`` param to be a ``(cert, key)`` pair if needed. + """ + cert = ctx.params.get("cert") + is_adhoc = cert == "adhoc" + + try: + import ssl + except ImportError: + is_context = False + else: + is_context = isinstance(cert, ssl.SSLContext) + + if value is not None: + if is_adhoc: + raise click.BadParameter( + 'When "--cert" is "adhoc", "--key" is not used.', ctx, param + ) + + if is_context: + raise click.BadParameter( + 'When "--cert" is an SSLContext object, "--key is not used.', ctx, param + ) + + if not cert: + raise click.BadParameter('"--cert" must also be specified.', ctx, param) + + ctx.params["cert"] = cert, value + + else: + if cert and not (is_adhoc or is_context): + raise click.BadParameter('Required when using "--cert".', ctx, param) + + return value + + +class SeparatedPathType(click.Path): + """Click option type that accepts a list of values separated by the + OS's path separator (``:``, ``;`` on Windows). Each value is + validated as a :class:`click.Path` type. + """ + + def convert(self, value, param, ctx): + items = self.split_envvar_value(value) + super_convert = super().convert + return [super_convert(item, param, ctx) for item in items] + + +@click.command("run", short_help="Run a development server.") +@click.option("--host", "-h", default="127.0.0.1", help="The interface to bind to.") +@click.option("--port", "-p", default=5000, help="The port to bind to.") +@click.option( + "--cert", + type=CertParamType(), + help="Specify a certificate file to use HTTPS.", + is_eager=True, +) +@click.option( + "--key", + type=click.Path(exists=True, dir_okay=False, resolve_path=True), + callback=_validate_key, + expose_value=False, + help="The key file to use when specifying a certificate.", +) +@click.option( + "--reload/--no-reload", + default=None, + help="Enable or disable the reloader. By default the reloader " + "is active if debug is enabled.", +) +@click.option( + "--debugger/--no-debugger", + default=None, + help="Enable or disable the debugger. By default the debugger " + "is active if debug is enabled.", +) +@click.option( + "--with-threads/--without-threads", + default=True, + help="Enable or disable multithreading.", +) +@click.option( + "--extra-files", + default=None, + type=SeparatedPathType(), + help=( + "Extra files that trigger a reload on change. Multiple paths" + f" are separated by {os.path.pathsep!r}." + ), +) +@click.option( + "--exclude-patterns", + default=None, + type=SeparatedPathType(), + help=( + "Files matching these fnmatch patterns will not trigger a reload" + " on change. Multiple patterns are separated by" + f" {os.path.pathsep!r}." + ), +) +@pass_script_info +def run_command( + info, + host, + port, + reload, + debugger, + with_threads, + cert, + extra_files, + exclude_patterns, +): + """Run a local development server. + + This server is for development purposes only. It does not provide + the stability, security, or performance of production WSGI servers. + + The reloader and debugger are enabled by default with the '--debug' + option. + """ + try: + app = info.load_app() + except Exception as e: + if is_running_from_reloader(): + # When reloading, print out the error immediately, but raise + # it later so the debugger or server can handle it. + traceback.print_exc() + err = e + + def app(environ, start_response): + raise err from None + + else: + # When not reloading, raise the error immediately so the + # command fails. + raise e from None + + debug = get_debug_flag() + + if reload is None: + reload = debug + + if debugger is None: + debugger = debug + + show_server_banner(debug, info.app_import_path) + + run_simple( + host, + port, + app, + use_reloader=reload, + use_debugger=debugger, + threaded=with_threads, + ssl_context=cert, + extra_files=extra_files, + exclude_patterns=exclude_patterns, + ) + + +run_command.params.insert(0, _debug_option) + + +@click.command("shell", short_help="Run a shell in the app context.") +@with_appcontext +def shell_command() -> None: + """Run an interactive Python shell in the context of a given + Flask application. The application will populate the default + namespace of this shell according to its configuration. + + This is useful for executing small snippets of management code + without having to manually configure the application. + """ + import code + + banner = ( + f"Python {sys.version} on {sys.platform}\n" + f"App: {current_app.import_name}\n" + f"Instance: {current_app.instance_path}" + ) + ctx: dict = {} + + # Support the regular Python interpreter startup script if someone + # is using it. + startup = os.environ.get("PYTHONSTARTUP") + if startup and os.path.isfile(startup): + with open(startup) as f: + eval(compile(f.read(), startup, "exec"), ctx) + + ctx.update(current_app.make_shell_context()) + + # Site, customize, or startup script can set a hook to call when + # entering interactive mode. The default one sets up readline with + # tab and history completion. + interactive_hook = getattr(sys, "__interactivehook__", None) + + if interactive_hook is not None: + try: + import readline + from rlcompleter import Completer + except ImportError: + pass + else: + # rlcompleter uses __main__.__dict__ by default, which is + # flask.__main__. Use the shell context instead. + readline.set_completer(Completer(ctx).complete) + + interactive_hook() + + code.interact(banner=banner, local=ctx) + + +@click.command("routes", short_help="Show the routes for the app.") +@click.option( + "--sort", + "-s", + type=click.Choice(("endpoint", "methods", "domain", "rule", "match")), + default="endpoint", + help=( + "Method to sort routes by. 'match' is the order that Flask will match routes" + " when dispatching a request." + ), +) +@click.option("--all-methods", is_flag=True, help="Show HEAD and OPTIONS methods.") +@with_appcontext +def routes_command(sort: str, all_methods: bool) -> None: + """Show all registered routes with endpoints and methods.""" + rules = list(current_app.url_map.iter_rules()) + + if not rules: + click.echo("No routes were registered.") + return + + ignored_methods = set() if all_methods else {"HEAD", "OPTIONS"} + host_matching = current_app.url_map.host_matching + has_domain = any(rule.host if host_matching else rule.subdomain for rule in rules) + rows = [] + + for rule in rules: + row = [ + rule.endpoint, + ", ".join(sorted((rule.methods or set()) - ignored_methods)), + ] + + if has_domain: + row.append((rule.host if host_matching else rule.subdomain) or "") + + row.append(rule.rule) + rows.append(row) + + headers = ["Endpoint", "Methods"] + sorts = ["endpoint", "methods"] + + if has_domain: + headers.append("Host" if host_matching else "Subdomain") + sorts.append("domain") + + headers.append("Rule") + sorts.append("rule") + + try: + rows.sort(key=itemgetter(sorts.index(sort))) + except ValueError: + pass + + rows.insert(0, headers) + widths = [max(len(row[i]) for row in rows) for i in range(len(headers))] + rows.insert(1, ["-" * w for w in widths]) + template = " ".join(f"{{{i}:<{w}}}" for i, w in enumerate(widths)) + + for row in rows: + click.echo(template.format(*row)) + + +cli = FlaskGroup( + name="flask", + help="""\ +A general utility script for Flask applications. + +An application to load must be given with the '--app' option, +'FLASK_APP' environment variable, or with a 'wsgi.py' or 'app.py' file +in the current directory. +""", +) + + +def main() -> None: + cli.main() + + +if __name__ == "__main__": + main() diff --git a/venv/lib/python3.12/site-packages/flask/config.py b/venv/lib/python3.12/site-packages/flask/config.py new file mode 100644 index 0000000..5f921b4 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/config.py @@ -0,0 +1,347 @@ +from __future__ import annotations + +import errno +import json +import os +import types +import typing as t + +from werkzeug.utils import import_string + + +class ConfigAttribute: + """Makes an attribute forward to the config""" + + def __init__(self, name: str, get_converter: t.Callable | None = None) -> None: + self.__name__ = name + self.get_converter = get_converter + + def __get__(self, obj: t.Any, owner: t.Any = None) -> t.Any: + if obj is None: + return self + rv = obj.config[self.__name__] + if self.get_converter is not None: + rv = self.get_converter(rv) + return rv + + def __set__(self, obj: t.Any, value: t.Any) -> None: + obj.config[self.__name__] = value + + +class Config(dict): + """Works exactly like a dict but provides ways to fill it from files + or special dictionaries. There are two common patterns to populate the + config. + + Either you can fill the config from a config file:: + + app.config.from_pyfile('yourconfig.cfg') + + Or alternatively you can define the configuration options in the + module that calls :meth:`from_object` or provide an import path to + a module that should be loaded. It is also possible to tell it to + use the same module and with that provide the configuration values + just before the call:: + + DEBUG = True + SECRET_KEY = 'development key' + app.config.from_object(__name__) + + In both cases (loading from any Python file or loading from modules), + only uppercase keys are added to the config. This makes it possible to use + lowercase values in the config file for temporary values that are not added + to the config or to define the config keys in the same file that implements + the application. + + Probably the most interesting way to load configurations is from an + environment variable pointing to a file:: + + app.config.from_envvar('YOURAPPLICATION_SETTINGS') + + In this case before launching the application you have to set this + environment variable to the file you want to use. On Linux and OS X + use the export statement:: + + export YOURAPPLICATION_SETTINGS='/path/to/config/file' + + On windows use `set` instead. + + :param root_path: path to which files are read relative from. When the + config object is created by the application, this is + the application's :attr:`~flask.Flask.root_path`. + :param defaults: an optional dictionary of default values + """ + + def __init__( + self, root_path: str | os.PathLike, defaults: dict | None = None + ) -> None: + super().__init__(defaults or {}) + self.root_path = root_path + + def from_envvar(self, variable_name: str, silent: bool = False) -> bool: + """Loads a configuration from an environment variable pointing to + a configuration file. This is basically just a shortcut with nicer + error messages for this line of code:: + + app.config.from_pyfile(os.environ['YOURAPPLICATION_SETTINGS']) + + :param variable_name: name of the environment variable + :param silent: set to ``True`` if you want silent failure for missing + files. + :return: ``True`` if the file was loaded successfully. + """ + rv = os.environ.get(variable_name) + if not rv: + if silent: + return False + raise RuntimeError( + f"The environment variable {variable_name!r} is not set" + " and as such configuration could not be loaded. Set" + " this variable and make it point to a configuration" + " file" + ) + return self.from_pyfile(rv, silent=silent) + + def from_prefixed_env( + self, prefix: str = "FLASK", *, loads: t.Callable[[str], t.Any] = json.loads + ) -> bool: + """Load any environment variables that start with ``FLASK_``, + dropping the prefix from the env key for the config key. Values + are passed through a loading function to attempt to convert them + to more specific types than strings. + + Keys are loaded in :func:`sorted` order. + + The default loading function attempts to parse values as any + valid JSON type, including dicts and lists. + + Specific items in nested dicts can be set by separating the + keys with double underscores (``__``). If an intermediate key + doesn't exist, it will be initialized to an empty dict. + + :param prefix: Load env vars that start with this prefix, + separated with an underscore (``_``). + :param loads: Pass each string value to this function and use + the returned value as the config value. If any error is + raised it is ignored and the value remains a string. The + default is :func:`json.loads`. + + .. versionadded:: 2.1 + """ + prefix = f"{prefix}_" + len_prefix = len(prefix) + + for key in sorted(os.environ): + if not key.startswith(prefix): + continue + + value = os.environ[key] + + try: + value = loads(value) + except Exception: + # Keep the value as a string if loading failed. + pass + + # Change to key.removeprefix(prefix) on Python >= 3.9. + key = key[len_prefix:] + + if "__" not in key: + # A non-nested key, set directly. + self[key] = value + continue + + # Traverse nested dictionaries with keys separated by "__". + current = self + *parts, tail = key.split("__") + + for part in parts: + # If an intermediate dict does not exist, create it. + if part not in current: + current[part] = {} + + current = current[part] + + current[tail] = value + + return True + + def from_pyfile(self, filename: str | os.PathLike, silent: bool = False) -> bool: + """Updates the values in the config from a Python file. This function + behaves as if the file was imported as module with the + :meth:`from_object` function. + + :param filename: the filename of the config. This can either be an + absolute filename or a filename relative to the + root path. + :param silent: set to ``True`` if you want silent failure for missing + files. + :return: ``True`` if the file was loaded successfully. + + .. versionadded:: 0.7 + `silent` parameter. + """ + filename = os.path.join(self.root_path, filename) + d = types.ModuleType("config") + d.__file__ = filename + try: + with open(filename, mode="rb") as config_file: + exec(compile(config_file.read(), filename, "exec"), d.__dict__) + except OSError as e: + if silent and e.errno in (errno.ENOENT, errno.EISDIR, errno.ENOTDIR): + return False + e.strerror = f"Unable to load configuration file ({e.strerror})" + raise + self.from_object(d) + return True + + def from_object(self, obj: object | str) -> None: + """Updates the values from the given object. An object can be of one + of the following two types: + + - a string: in this case the object with that name will be imported + - an actual object reference: that object is used directly + + Objects are usually either modules or classes. :meth:`from_object` + loads only the uppercase attributes of the module/class. A ``dict`` + object will not work with :meth:`from_object` because the keys of a + ``dict`` are not attributes of the ``dict`` class. + + Example of module-based configuration:: + + app.config.from_object('yourapplication.default_config') + from yourapplication import default_config + app.config.from_object(default_config) + + Nothing is done to the object before loading. If the object is a + class and has ``@property`` attributes, it needs to be + instantiated before being passed to this method. + + You should not use this function to load the actual configuration but + rather configuration defaults. The actual config should be loaded + with :meth:`from_pyfile` and ideally from a location not within the + package because the package might be installed system wide. + + See :ref:`config-dev-prod` for an example of class-based configuration + using :meth:`from_object`. + + :param obj: an import name or object + """ + if isinstance(obj, str): + obj = import_string(obj) + for key in dir(obj): + if key.isupper(): + self[key] = getattr(obj, key) + + def from_file( + self, + filename: str | os.PathLike, + load: t.Callable[[t.IO[t.Any]], t.Mapping], + silent: bool = False, + text: bool = True, + ) -> bool: + """Update the values in the config from a file that is loaded + using the ``load`` parameter. The loaded data is passed to the + :meth:`from_mapping` method. + + .. code-block:: python + + import json + app.config.from_file("config.json", load=json.load) + + import tomllib + app.config.from_file("config.toml", load=tomllib.load, text=False) + + :param filename: The path to the data file. This can be an + absolute path or relative to the config root path. + :param load: A callable that takes a file handle and returns a + mapping of loaded data from the file. + :type load: ``Callable[[Reader], Mapping]`` where ``Reader`` + implements a ``read`` method. + :param silent: Ignore the file if it doesn't exist. + :param text: Open the file in text or binary mode. + :return: ``True`` if the file was loaded successfully. + + .. versionchanged:: 2.3 + The ``text`` parameter was added. + + .. versionadded:: 2.0 + """ + filename = os.path.join(self.root_path, filename) + + try: + with open(filename, "r" if text else "rb") as f: + obj = load(f) + except OSError as e: + if silent and e.errno in (errno.ENOENT, errno.EISDIR): + return False + + e.strerror = f"Unable to load configuration file ({e.strerror})" + raise + + return self.from_mapping(obj) + + def from_mapping( + self, mapping: t.Mapping[str, t.Any] | None = None, **kwargs: t.Any + ) -> bool: + """Updates the config like :meth:`update` ignoring items with + non-upper keys. + + :return: Always returns ``True``. + + .. versionadded:: 0.11 + """ + mappings: dict[str, t.Any] = {} + if mapping is not None: + mappings.update(mapping) + mappings.update(kwargs) + for key, value in mappings.items(): + if key.isupper(): + self[key] = value + return True + + def get_namespace( + self, namespace: str, lowercase: bool = True, trim_namespace: bool = True + ) -> dict[str, t.Any]: + """Returns a dictionary containing a subset of configuration options + that match the specified namespace/prefix. Example usage:: + + app.config['IMAGE_STORE_TYPE'] = 'fs' + app.config['IMAGE_STORE_PATH'] = '/var/app/images' + app.config['IMAGE_STORE_BASE_URL'] = 'http://img.website.com' + image_store_config = app.config.get_namespace('IMAGE_STORE_') + + The resulting dictionary `image_store_config` would look like:: + + { + 'type': 'fs', + 'path': '/var/app/images', + 'base_url': 'http://img.website.com' + } + + This is often useful when configuration options map directly to + keyword arguments in functions or class constructors. + + :param namespace: a configuration namespace + :param lowercase: a flag indicating if the keys of the resulting + dictionary should be lowercase + :param trim_namespace: a flag indicating if the keys of the resulting + dictionary should not include the namespace + + .. versionadded:: 0.11 + """ + rv = {} + for k, v in self.items(): + if not k.startswith(namespace): + continue + if trim_namespace: + key = k[len(namespace) :] + else: + key = k + if lowercase: + key = key.lower() + rv[key] = v + return rv + + def __repr__(self) -> str: + return f"<{type(self).__name__} {dict.__repr__(self)}>" diff --git a/venv/lib/python3.12/site-packages/flask/ctx.py b/venv/lib/python3.12/site-packages/flask/ctx.py new file mode 100644 index 0000000..b37e4e0 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/ctx.py @@ -0,0 +1,440 @@ +from __future__ import annotations + +import contextvars +import sys +import typing as t +from functools import update_wrapper +from types import TracebackType + +from werkzeug.exceptions import HTTPException + +from . import typing as ft +from .globals import _cv_app +from .globals import _cv_request +from .signals import appcontext_popped +from .signals import appcontext_pushed + +if t.TYPE_CHECKING: # pragma: no cover + from .app import Flask + from .sessions import SessionMixin + from .wrappers import Request + + +# a singleton sentinel value for parameter defaults +_sentinel = object() + + +class _AppCtxGlobals: + """A plain object. Used as a namespace for storing data during an + application context. + + Creating an app context automatically creates this object, which is + made available as the :data:`g` proxy. + + .. describe:: 'key' in g + + Check whether an attribute is present. + + .. versionadded:: 0.10 + + .. describe:: iter(g) + + Return an iterator over the attribute names. + + .. versionadded:: 0.10 + """ + + # Define attr methods to let mypy know this is a namespace object + # that has arbitrary attributes. + + def __getattr__(self, name: str) -> t.Any: + try: + return self.__dict__[name] + except KeyError: + raise AttributeError(name) from None + + def __setattr__(self, name: str, value: t.Any) -> None: + self.__dict__[name] = value + + def __delattr__(self, name: str) -> None: + try: + del self.__dict__[name] + except KeyError: + raise AttributeError(name) from None + + def get(self, name: str, default: t.Any | None = None) -> t.Any: + """Get an attribute by name, or a default value. Like + :meth:`dict.get`. + + :param name: Name of attribute to get. + :param default: Value to return if the attribute is not present. + + .. versionadded:: 0.10 + """ + return self.__dict__.get(name, default) + + def pop(self, name: str, default: t.Any = _sentinel) -> t.Any: + """Get and remove an attribute by name. Like :meth:`dict.pop`. + + :param name: Name of attribute to pop. + :param default: Value to return if the attribute is not present, + instead of raising a ``KeyError``. + + .. versionadded:: 0.11 + """ + if default is _sentinel: + return self.__dict__.pop(name) + else: + return self.__dict__.pop(name, default) + + def setdefault(self, name: str, default: t.Any = None) -> t.Any: + """Get the value of an attribute if it is present, otherwise + set and return a default value. Like :meth:`dict.setdefault`. + + :param name: Name of attribute to get. + :param default: Value to set and return if the attribute is not + present. + + .. versionadded:: 0.11 + """ + return self.__dict__.setdefault(name, default) + + def __contains__(self, item: str) -> bool: + return item in self.__dict__ + + def __iter__(self) -> t.Iterator[str]: + return iter(self.__dict__) + + def __repr__(self) -> str: + ctx = _cv_app.get(None) + if ctx is not None: + return f"" + return object.__repr__(self) + + +def after_this_request(f: ft.AfterRequestCallable) -> ft.AfterRequestCallable: + """Executes a function after this request. This is useful to modify + response objects. The function is passed the response object and has + to return the same or a new one. + + Example:: + + @app.route('/') + def index(): + @after_this_request + def add_header(response): + response.headers['X-Foo'] = 'Parachute' + return response + return 'Hello World!' + + This is more useful if a function other than the view function wants to + modify a response. For instance think of a decorator that wants to add + some headers without converting the return value into a response object. + + .. versionadded:: 0.9 + """ + ctx = _cv_request.get(None) + + if ctx is None: + raise RuntimeError( + "'after_this_request' can only be used when a request" + " context is active, such as in a view function." + ) + + ctx._after_request_functions.append(f) + return f + + +def copy_current_request_context(f: t.Callable) -> t.Callable: + """A helper function that decorates a function to retain the current + request context. This is useful when working with greenlets. The moment + the function is decorated a copy of the request context is created and + then pushed when the function is called. The current session is also + included in the copied request context. + + Example:: + + import gevent + from flask import copy_current_request_context + + @app.route('/') + def index(): + @copy_current_request_context + def do_some_work(): + # do some work here, it can access flask.request or + # flask.session like you would otherwise in the view function. + ... + gevent.spawn(do_some_work) + return 'Regular response' + + .. versionadded:: 0.10 + """ + ctx = _cv_request.get(None) + + if ctx is None: + raise RuntimeError( + "'copy_current_request_context' can only be used when a" + " request context is active, such as in a view function." + ) + + ctx = ctx.copy() + + def wrapper(*args, **kwargs): + with ctx: + return ctx.app.ensure_sync(f)(*args, **kwargs) + + return update_wrapper(wrapper, f) + + +def has_request_context() -> bool: + """If you have code that wants to test if a request context is there or + not this function can be used. For instance, you may want to take advantage + of request information if the request object is available, but fail + silently if it is unavailable. + + :: + + class User(db.Model): + + def __init__(self, username, remote_addr=None): + self.username = username + if remote_addr is None and has_request_context(): + remote_addr = request.remote_addr + self.remote_addr = remote_addr + + Alternatively you can also just test any of the context bound objects + (such as :class:`request` or :class:`g`) for truthness:: + + class User(db.Model): + + def __init__(self, username, remote_addr=None): + self.username = username + if remote_addr is None and request: + remote_addr = request.remote_addr + self.remote_addr = remote_addr + + .. versionadded:: 0.7 + """ + return _cv_request.get(None) is not None + + +def has_app_context() -> bool: + """Works like :func:`has_request_context` but for the application + context. You can also just do a boolean check on the + :data:`current_app` object instead. + + .. versionadded:: 0.9 + """ + return _cv_app.get(None) is not None + + +class AppContext: + """The app context contains application-specific information. An app + context is created and pushed at the beginning of each request if + one is not already active. An app context is also pushed when + running CLI commands. + """ + + def __init__(self, app: Flask) -> None: + self.app = app + self.url_adapter = app.create_url_adapter(None) + self.g: _AppCtxGlobals = app.app_ctx_globals_class() + self._cv_tokens: list[contextvars.Token] = [] + + def push(self) -> None: + """Binds the app context to the current context.""" + self._cv_tokens.append(_cv_app.set(self)) + appcontext_pushed.send(self.app, _async_wrapper=self.app.ensure_sync) + + def pop(self, exc: BaseException | None = _sentinel) -> None: # type: ignore + """Pops the app context.""" + try: + if len(self._cv_tokens) == 1: + if exc is _sentinel: + exc = sys.exc_info()[1] + self.app.do_teardown_appcontext(exc) + finally: + ctx = _cv_app.get() + _cv_app.reset(self._cv_tokens.pop()) + + if ctx is not self: + raise AssertionError( + f"Popped wrong app context. ({ctx!r} instead of {self!r})" + ) + + appcontext_popped.send(self.app, _async_wrapper=self.app.ensure_sync) + + def __enter__(self) -> AppContext: + self.push() + return self + + def __exit__( + self, + exc_type: type | None, + exc_value: BaseException | None, + tb: TracebackType | None, + ) -> None: + self.pop(exc_value) + + +class RequestContext: + """The request context contains per-request information. The Flask + app creates and pushes it at the beginning of the request, then pops + it at the end of the request. It will create the URL adapter and + request object for the WSGI environment provided. + + Do not attempt to use this class directly, instead use + :meth:`~flask.Flask.test_request_context` and + :meth:`~flask.Flask.request_context` to create this object. + + When the request context is popped, it will evaluate all the + functions registered on the application for teardown execution + (:meth:`~flask.Flask.teardown_request`). + + The request context is automatically popped at the end of the + request. When using the interactive debugger, the context will be + restored so ``request`` is still accessible. Similarly, the test + client can preserve the context after the request ends. However, + teardown functions may already have closed some resources such as + database connections. + """ + + def __init__( + self, + app: Flask, + environ: dict, + request: Request | None = None, + session: SessionMixin | None = None, + ) -> None: + self.app = app + if request is None: + request = app.request_class(environ) + request.json_module = app.json + self.request: Request = request + self.url_adapter = None + try: + self.url_adapter = app.create_url_adapter(self.request) + except HTTPException as e: + self.request.routing_exception = e + self.flashes: list[tuple[str, str]] | None = None + self.session: SessionMixin | None = session + # Functions that should be executed after the request on the response + # object. These will be called before the regular "after_request" + # functions. + self._after_request_functions: list[ft.AfterRequestCallable] = [] + + self._cv_tokens: list[tuple[contextvars.Token, AppContext | None]] = [] + + def copy(self) -> RequestContext: + """Creates a copy of this request context with the same request object. + This can be used to move a request context to a different greenlet. + Because the actual request object is the same this cannot be used to + move a request context to a different thread unless access to the + request object is locked. + + .. versionadded:: 0.10 + + .. versionchanged:: 1.1 + The current session object is used instead of reloading the original + data. This prevents `flask.session` pointing to an out-of-date object. + """ + return self.__class__( + self.app, + environ=self.request.environ, + request=self.request, + session=self.session, + ) + + def match_request(self) -> None: + """Can be overridden by a subclass to hook into the matching + of the request. + """ + try: + result = self.url_adapter.match(return_rule=True) # type: ignore + self.request.url_rule, self.request.view_args = result # type: ignore + except HTTPException as e: + self.request.routing_exception = e + + def push(self) -> None: + # Before we push the request context we have to ensure that there + # is an application context. + app_ctx = _cv_app.get(None) + + if app_ctx is None or app_ctx.app is not self.app: + app_ctx = self.app.app_context() + app_ctx.push() + else: + app_ctx = None + + self._cv_tokens.append((_cv_request.set(self), app_ctx)) + + # Open the session at the moment that the request context is available. + # This allows a custom open_session method to use the request context. + # Only open a new session if this is the first time the request was + # pushed, otherwise stream_with_context loses the session. + if self.session is None: + session_interface = self.app.session_interface + self.session = session_interface.open_session(self.app, self.request) + + if self.session is None: + self.session = session_interface.make_null_session(self.app) + + # Match the request URL after loading the session, so that the + # session is available in custom URL converters. + if self.url_adapter is not None: + self.match_request() + + def pop(self, exc: BaseException | None = _sentinel) -> None: # type: ignore + """Pops the request context and unbinds it by doing that. This will + also trigger the execution of functions registered by the + :meth:`~flask.Flask.teardown_request` decorator. + + .. versionchanged:: 0.9 + Added the `exc` argument. + """ + clear_request = len(self._cv_tokens) == 1 + + try: + if clear_request: + if exc is _sentinel: + exc = sys.exc_info()[1] + self.app.do_teardown_request(exc) + + request_close = getattr(self.request, "close", None) + if request_close is not None: + request_close() + finally: + ctx = _cv_request.get() + token, app_ctx = self._cv_tokens.pop() + _cv_request.reset(token) + + # get rid of circular dependencies at the end of the request + # so that we don't require the GC to be active. + if clear_request: + ctx.request.environ["werkzeug.request"] = None + + if app_ctx is not None: + app_ctx.pop(exc) + + if ctx is not self: + raise AssertionError( + f"Popped wrong request context. ({ctx!r} instead of {self!r})" + ) + + def __enter__(self) -> RequestContext: + self.push() + return self + + def __exit__( + self, + exc_type: type | None, + exc_value: BaseException | None, + tb: TracebackType | None, + ) -> None: + self.pop(exc_value) + + def __repr__(self) -> str: + return ( + f"<{type(self).__name__} {self.request.url!r}" + f" [{self.request.method}] of {self.app.name}>" + ) diff --git a/venv/lib/python3.12/site-packages/flask/debughelpers.py b/venv/lib/python3.12/site-packages/flask/debughelpers.py new file mode 100644 index 0000000..e836004 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/debughelpers.py @@ -0,0 +1,160 @@ +from __future__ import annotations + +import typing as t + +from .blueprints import Blueprint +from .globals import request_ctx +from .sansio.app import App + + +class UnexpectedUnicodeError(AssertionError, UnicodeError): + """Raised in places where we want some better error reporting for + unexpected unicode or binary data. + """ + + +class DebugFilesKeyError(KeyError, AssertionError): + """Raised from request.files during debugging. The idea is that it can + provide a better error message than just a generic KeyError/BadRequest. + """ + + def __init__(self, request, key): + form_matches = request.form.getlist(key) + buf = [ + f"You tried to access the file {key!r} in the request.files" + " dictionary but it does not exist. The mimetype for the" + f" request is {request.mimetype!r} instead of" + " 'multipart/form-data' which means that no file contents" + " were transmitted. To fix this error you should provide" + ' enctype="multipart/form-data" in your form.' + ] + if form_matches: + names = ", ".join(repr(x) for x in form_matches) + buf.append( + "\n\nThe browser instead transmitted some file names. " + f"This was submitted: {names}" + ) + self.msg = "".join(buf) + + def __str__(self): + return self.msg + + +class FormDataRoutingRedirect(AssertionError): + """This exception is raised in debug mode if a routing redirect + would cause the browser to drop the method or body. This happens + when method is not GET, HEAD or OPTIONS and the status code is not + 307 or 308. + """ + + def __init__(self, request): + exc = request.routing_exception + buf = [ + f"A request was sent to '{request.url}', but routing issued" + f" a redirect to the canonical URL '{exc.new_url}'." + ] + + if f"{request.base_url}/" == exc.new_url.partition("?")[0]: + buf.append( + " The URL was defined with a trailing slash. Flask" + " will redirect to the URL with a trailing slash if it" + " was accessed without one." + ) + + buf.append( + " Send requests to the canonical URL, or use 307 or 308 for" + " routing redirects. Otherwise, browsers will drop form" + " data.\n\n" + "This exception is only raised in debug mode." + ) + super().__init__("".join(buf)) + + +def attach_enctype_error_multidict(request): + """Patch ``request.files.__getitem__`` to raise a descriptive error + about ``enctype=multipart/form-data``. + + :param request: The request to patch. + :meta private: + """ + oldcls = request.files.__class__ + + class newcls(oldcls): + def __getitem__(self, key): + try: + return super().__getitem__(key) + except KeyError as e: + if key not in request.form: + raise + + raise DebugFilesKeyError(request, key).with_traceback( + e.__traceback__ + ) from None + + newcls.__name__ = oldcls.__name__ + newcls.__module__ = oldcls.__module__ + request.files.__class__ = newcls + + +def _dump_loader_info(loader) -> t.Generator: + yield f"class: {type(loader).__module__}.{type(loader).__name__}" + for key, value in sorted(loader.__dict__.items()): + if key.startswith("_"): + continue + if isinstance(value, (tuple, list)): + if not all(isinstance(x, str) for x in value): + continue + yield f"{key}:" + for item in value: + yield f" - {item}" + continue + elif not isinstance(value, (str, int, float, bool)): + continue + yield f"{key}: {value!r}" + + +def explain_template_loading_attempts(app: App, template, attempts) -> None: + """This should help developers understand what failed""" + info = [f"Locating template {template!r}:"] + total_found = 0 + blueprint = None + if request_ctx and request_ctx.request.blueprint is not None: + blueprint = request_ctx.request.blueprint + + for idx, (loader, srcobj, triple) in enumerate(attempts): + if isinstance(srcobj, App): + src_info = f"application {srcobj.import_name!r}" + elif isinstance(srcobj, Blueprint): + src_info = f"blueprint {srcobj.name!r} ({srcobj.import_name})" + else: + src_info = repr(srcobj) + + info.append(f"{idx + 1:5}: trying loader of {src_info}") + + for line in _dump_loader_info(loader): + info.append(f" {line}") + + if triple is None: + detail = "no match" + else: + detail = f"found ({triple[1] or ''!r})" + total_found += 1 + info.append(f" -> {detail}") + + seems_fishy = False + if total_found == 0: + info.append("Error: the template could not be found.") + seems_fishy = True + elif total_found > 1: + info.append("Warning: multiple loaders returned a match for the template.") + seems_fishy = True + + if blueprint is not None and seems_fishy: + info.append( + " The template was looked up from an endpoint that belongs" + f" to the blueprint {blueprint!r}." + ) + info.append(" Maybe you did not place a template in the right folder?") + info.append(" See https://flask.palletsprojects.com/blueprints/#templates") + + app.logger.info("\n".join(info)) diff --git a/venv/lib/python3.12/site-packages/flask/globals.py b/venv/lib/python3.12/site-packages/flask/globals.py new file mode 100644 index 0000000..e2c410c --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/globals.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +import typing as t +from contextvars import ContextVar + +from werkzeug.local import LocalProxy + +if t.TYPE_CHECKING: # pragma: no cover + from .app import Flask + from .ctx import _AppCtxGlobals + from .ctx import AppContext + from .ctx import RequestContext + from .sessions import SessionMixin + from .wrappers import Request + + +_no_app_msg = """\ +Working outside of application context. + +This typically means that you attempted to use functionality that needed +the current application. To solve this, set up an application context +with app.app_context(). See the documentation for more information.\ +""" +_cv_app: ContextVar[AppContext] = ContextVar("flask.app_ctx") +app_ctx: AppContext = LocalProxy( # type: ignore[assignment] + _cv_app, unbound_message=_no_app_msg +) +current_app: Flask = LocalProxy( # type: ignore[assignment] + _cv_app, "app", unbound_message=_no_app_msg +) +g: _AppCtxGlobals = LocalProxy( # type: ignore[assignment] + _cv_app, "g", unbound_message=_no_app_msg +) + +_no_req_msg = """\ +Working outside of request context. + +This typically means that you attempted to use functionality that needed +an active HTTP request. Consult the documentation on testing for +information about how to avoid this problem.\ +""" +_cv_request: ContextVar[RequestContext] = ContextVar("flask.request_ctx") +request_ctx: RequestContext = LocalProxy( # type: ignore[assignment] + _cv_request, unbound_message=_no_req_msg +) +request: Request = LocalProxy( # type: ignore[assignment] + _cv_request, "request", unbound_message=_no_req_msg +) +session: SessionMixin = LocalProxy( # type: ignore[assignment] + _cv_request, "session", unbound_message=_no_req_msg +) diff --git a/venv/lib/python3.12/site-packages/flask/helpers.py b/venv/lib/python3.12/site-packages/flask/helpers.py new file mode 100644 index 0000000..13a5aa2 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/helpers.py @@ -0,0 +1,623 @@ +from __future__ import annotations + +import importlib.util +import os +import sys +import typing as t +from datetime import datetime +from functools import lru_cache +from functools import update_wrapper + +import werkzeug.utils +from werkzeug.exceptions import abort as _wz_abort +from werkzeug.utils import redirect as _wz_redirect + +from .globals import _cv_request +from .globals import current_app +from .globals import request +from .globals import request_ctx +from .globals import session +from .signals import message_flashed + +if t.TYPE_CHECKING: # pragma: no cover + from werkzeug.wrappers import Response as BaseResponse + from .wrappers import Response + + +def get_debug_flag() -> bool: + """Get whether debug mode should be enabled for the app, indicated by the + :envvar:`FLASK_DEBUG` environment variable. The default is ``False``. + """ + val = os.environ.get("FLASK_DEBUG") + return bool(val and val.lower() not in {"0", "false", "no"}) + + +def get_load_dotenv(default: bool = True) -> bool: + """Get whether the user has disabled loading default dotenv files by + setting :envvar:`FLASK_SKIP_DOTENV`. The default is ``True``, load + the files. + + :param default: What to return if the env var isn't set. + """ + val = os.environ.get("FLASK_SKIP_DOTENV") + + if not val: + return default + + return val.lower() in ("0", "false", "no") + + +def stream_with_context( + generator_or_function: ( + t.Iterator[t.AnyStr] | t.Callable[..., t.Iterator[t.AnyStr]] + ) +) -> t.Iterator[t.AnyStr]: + """Request contexts disappear when the response is started on the server. + This is done for efficiency reasons and to make it less likely to encounter + memory leaks with badly written WSGI middlewares. The downside is that if + you are using streamed responses, the generator cannot access request bound + information any more. + + This function however can help you keep the context around for longer:: + + from flask import stream_with_context, request, Response + + @app.route('/stream') + def streamed_response(): + @stream_with_context + def generate(): + yield 'Hello ' + yield request.args['name'] + yield '!' + return Response(generate()) + + Alternatively it can also be used around a specific generator:: + + from flask import stream_with_context, request, Response + + @app.route('/stream') + def streamed_response(): + def generate(): + yield 'Hello ' + yield request.args['name'] + yield '!' + return Response(stream_with_context(generate())) + + .. versionadded:: 0.9 + """ + try: + gen = iter(generator_or_function) # type: ignore + except TypeError: + + def decorator(*args: t.Any, **kwargs: t.Any) -> t.Any: + gen = generator_or_function(*args, **kwargs) # type: ignore + return stream_with_context(gen) + + return update_wrapper(decorator, generator_or_function) # type: ignore + + def generator() -> t.Generator: + ctx = _cv_request.get(None) + if ctx is None: + raise RuntimeError( + "'stream_with_context' can only be used when a request" + " context is active, such as in a view function." + ) + with ctx: + # Dummy sentinel. Has to be inside the context block or we're + # not actually keeping the context around. + yield None + + # The try/finally is here so that if someone passes a WSGI level + # iterator in we're still running the cleanup logic. Generators + # don't need that because they are closed on their destruction + # automatically. + try: + yield from gen + finally: + if hasattr(gen, "close"): + gen.close() + + # The trick is to start the generator. Then the code execution runs until + # the first dummy None is yielded at which point the context was already + # pushed. This item is discarded. Then when the iteration continues the + # real generator is executed. + wrapped_g = generator() + next(wrapped_g) + return wrapped_g + + +def make_response(*args: t.Any) -> Response: + """Sometimes it is necessary to set additional headers in a view. Because + views do not have to return response objects but can return a value that + is converted into a response object by Flask itself, it becomes tricky to + add headers to it. This function can be called instead of using a return + and you will get a response object which you can use to attach headers. + + If view looked like this and you want to add a new header:: + + def index(): + return render_template('index.html', foo=42) + + You can now do something like this:: + + def index(): + response = make_response(render_template('index.html', foo=42)) + response.headers['X-Parachutes'] = 'parachutes are cool' + return response + + This function accepts the very same arguments you can return from a + view function. This for example creates a response with a 404 error + code:: + + response = make_response(render_template('not_found.html'), 404) + + The other use case of this function is to force the return value of a + view function into a response which is helpful with view + decorators:: + + response = make_response(view_function()) + response.headers['X-Parachutes'] = 'parachutes are cool' + + Internally this function does the following things: + + - if no arguments are passed, it creates a new response argument + - if one argument is passed, :meth:`flask.Flask.make_response` + is invoked with it. + - if more than one argument is passed, the arguments are passed + to the :meth:`flask.Flask.make_response` function as tuple. + + .. versionadded:: 0.6 + """ + if not args: + return current_app.response_class() + if len(args) == 1: + args = args[0] + return current_app.make_response(args) # type: ignore + + +def url_for( + endpoint: str, + *, + _anchor: str | None = None, + _method: str | None = None, + _scheme: str | None = None, + _external: bool | None = None, + **values: t.Any, +) -> str: + """Generate a URL to the given endpoint with the given values. + + This requires an active request or application context, and calls + :meth:`current_app.url_for() `. See that method + for full documentation. + + :param endpoint: The endpoint name associated with the URL to + generate. If this starts with a ``.``, the current blueprint + name (if any) will be used. + :param _anchor: If given, append this as ``#anchor`` to the URL. + :param _method: If given, generate the URL associated with this + method for the endpoint. + :param _scheme: If given, the URL will have this scheme if it is + external. + :param _external: If given, prefer the URL to be internal (False) or + require it to be external (True). External URLs include the + scheme and domain. When not in an active request, URLs are + external by default. + :param values: Values to use for the variable parts of the URL rule. + Unknown keys are appended as query string arguments, like + ``?a=b&c=d``. + + .. versionchanged:: 2.2 + Calls ``current_app.url_for``, allowing an app to override the + behavior. + + .. versionchanged:: 0.10 + The ``_scheme`` parameter was added. + + .. versionchanged:: 0.9 + The ``_anchor`` and ``_method`` parameters were added. + + .. versionchanged:: 0.9 + Calls ``app.handle_url_build_error`` on build errors. + """ + return current_app.url_for( + endpoint, + _anchor=_anchor, + _method=_method, + _scheme=_scheme, + _external=_external, + **values, + ) + + +def redirect( + location: str, code: int = 302, Response: type[BaseResponse] | None = None +) -> BaseResponse: + """Create a redirect response object. + + If :data:`~flask.current_app` is available, it will use its + :meth:`~flask.Flask.redirect` method, otherwise it will use + :func:`werkzeug.utils.redirect`. + + :param location: The URL to redirect to. + :param code: The status code for the redirect. + :param Response: The response class to use. Not used when + ``current_app`` is active, which uses ``app.response_class``. + + .. versionadded:: 2.2 + Calls ``current_app.redirect`` if available instead of always + using Werkzeug's default ``redirect``. + """ + if current_app: + return current_app.redirect(location, code=code) + + return _wz_redirect(location, code=code, Response=Response) + + +def abort(code: int | BaseResponse, *args: t.Any, **kwargs: t.Any) -> t.NoReturn: + """Raise an :exc:`~werkzeug.exceptions.HTTPException` for the given + status code. + + If :data:`~flask.current_app` is available, it will call its + :attr:`~flask.Flask.aborter` object, otherwise it will use + :func:`werkzeug.exceptions.abort`. + + :param code: The status code for the exception, which must be + registered in ``app.aborter``. + :param args: Passed to the exception. + :param kwargs: Passed to the exception. + + .. versionadded:: 2.2 + Calls ``current_app.aborter`` if available instead of always + using Werkzeug's default ``abort``. + """ + if current_app: + current_app.aborter(code, *args, **kwargs) + + _wz_abort(code, *args, **kwargs) + + +def get_template_attribute(template_name: str, attribute: str) -> t.Any: + """Loads a macro (or variable) a template exports. This can be used to + invoke a macro from within Python code. If you for example have a + template named :file:`_cider.html` with the following contents: + + .. sourcecode:: html+jinja + + {% macro hello(name) %}Hello {{ name }}!{% endmacro %} + + You can access this from Python code like this:: + + hello = get_template_attribute('_cider.html', 'hello') + return hello('World') + + .. versionadded:: 0.2 + + :param template_name: the name of the template + :param attribute: the name of the variable of macro to access + """ + return getattr(current_app.jinja_env.get_template(template_name).module, attribute) + + +def flash(message: str, category: str = "message") -> None: + """Flashes a message to the next request. In order to remove the + flashed message from the session and to display it to the user, + the template has to call :func:`get_flashed_messages`. + + .. versionchanged:: 0.3 + `category` parameter added. + + :param message: the message to be flashed. + :param category: the category for the message. The following values + are recommended: ``'message'`` for any kind of message, + ``'error'`` for errors, ``'info'`` for information + messages and ``'warning'`` for warnings. However any + kind of string can be used as category. + """ + # Original implementation: + # + # session.setdefault('_flashes', []).append((category, message)) + # + # This assumed that changes made to mutable structures in the session are + # always in sync with the session object, which is not true for session + # implementations that use external storage for keeping their keys/values. + flashes = session.get("_flashes", []) + flashes.append((category, message)) + session["_flashes"] = flashes + app = current_app._get_current_object() # type: ignore + message_flashed.send( + app, + _async_wrapper=app.ensure_sync, + message=message, + category=category, + ) + + +def get_flashed_messages( + with_categories: bool = False, category_filter: t.Iterable[str] = () +) -> list[str] | list[tuple[str, str]]: + """Pulls all flashed messages from the session and returns them. + Further calls in the same request to the function will return + the same messages. By default just the messages are returned, + but when `with_categories` is set to ``True``, the return value will + be a list of tuples in the form ``(category, message)`` instead. + + Filter the flashed messages to one or more categories by providing those + categories in `category_filter`. This allows rendering categories in + separate html blocks. The `with_categories` and `category_filter` + arguments are distinct: + + * `with_categories` controls whether categories are returned with message + text (``True`` gives a tuple, where ``False`` gives just the message text). + * `category_filter` filters the messages down to only those matching the + provided categories. + + See :doc:`/patterns/flashing` for examples. + + .. versionchanged:: 0.3 + `with_categories` parameter added. + + .. versionchanged:: 0.9 + `category_filter` parameter added. + + :param with_categories: set to ``True`` to also receive categories. + :param category_filter: filter of categories to limit return values. Only + categories in the list will be returned. + """ + flashes = request_ctx.flashes + if flashes is None: + flashes = session.pop("_flashes") if "_flashes" in session else [] + request_ctx.flashes = flashes + if category_filter: + flashes = list(filter(lambda f: f[0] in category_filter, flashes)) + if not with_categories: + return [x[1] for x in flashes] + return flashes + + +def _prepare_send_file_kwargs(**kwargs: t.Any) -> dict[str, t.Any]: + if kwargs.get("max_age") is None: + kwargs["max_age"] = current_app.get_send_file_max_age + + kwargs.update( + environ=request.environ, + use_x_sendfile=current_app.config["USE_X_SENDFILE"], + response_class=current_app.response_class, + _root_path=current_app.root_path, # type: ignore + ) + return kwargs + + +def send_file( + path_or_file: os.PathLike | str | t.BinaryIO, + mimetype: str | None = None, + as_attachment: bool = False, + download_name: str | None = None, + conditional: bool = True, + etag: bool | str = True, + last_modified: datetime | int | float | None = None, + max_age: None | (int | t.Callable[[str | None], int | None]) = None, +) -> Response: + """Send the contents of a file to the client. + + The first argument can be a file path or a file-like object. Paths + are preferred in most cases because Werkzeug can manage the file and + get extra information from the path. Passing a file-like object + requires that the file is opened in binary mode, and is mostly + useful when building a file in memory with :class:`io.BytesIO`. + + Never pass file paths provided by a user. The path is assumed to be + trusted, so a user could craft a path to access a file you didn't + intend. Use :func:`send_from_directory` to safely serve + user-requested paths from within a directory. + + If the WSGI server sets a ``file_wrapper`` in ``environ``, it is + used, otherwise Werkzeug's built-in wrapper is used. Alternatively, + if the HTTP server supports ``X-Sendfile``, configuring Flask with + ``USE_X_SENDFILE = True`` will tell the server to send the given + path, which is much more efficient than reading it in Python. + + :param path_or_file: The path to the file to send, relative to the + current working directory if a relative path is given. + Alternatively, a file-like object opened in binary mode. Make + sure the file pointer is seeked to the start of the data. + :param mimetype: The MIME type to send for the file. If not + provided, it will try to detect it from the file name. + :param as_attachment: Indicate to a browser that it should offer to + save the file instead of displaying it. + :param download_name: The default name browsers will use when saving + the file. Defaults to the passed file name. + :param conditional: Enable conditional and range responses based on + request headers. Requires passing a file path and ``environ``. + :param etag: Calculate an ETag for the file, which requires passing + a file path. Can also be a string to use instead. + :param last_modified: The last modified time to send for the file, + in seconds. If not provided, it will try to detect it from the + file path. + :param max_age: How long the client should cache the file, in + seconds. If set, ``Cache-Control`` will be ``public``, otherwise + it will be ``no-cache`` to prefer conditional caching. + + .. versionchanged:: 2.0 + ``download_name`` replaces the ``attachment_filename`` + parameter. If ``as_attachment=False``, it is passed with + ``Content-Disposition: inline`` instead. + + .. versionchanged:: 2.0 + ``max_age`` replaces the ``cache_timeout`` parameter. + ``conditional`` is enabled and ``max_age`` is not set by + default. + + .. versionchanged:: 2.0 + ``etag`` replaces the ``add_etags`` parameter. It can be a + string to use instead of generating one. + + .. versionchanged:: 2.0 + Passing a file-like object that inherits from + :class:`~io.TextIOBase` will raise a :exc:`ValueError` rather + than sending an empty file. + + .. versionadded:: 2.0 + Moved the implementation to Werkzeug. This is now a wrapper to + pass some Flask-specific arguments. + + .. versionchanged:: 1.1 + ``filename`` may be a :class:`~os.PathLike` object. + + .. versionchanged:: 1.1 + Passing a :class:`~io.BytesIO` object supports range requests. + + .. versionchanged:: 1.0.3 + Filenames are encoded with ASCII instead of Latin-1 for broader + compatibility with WSGI servers. + + .. versionchanged:: 1.0 + UTF-8 filenames as specified in :rfc:`2231` are supported. + + .. versionchanged:: 0.12 + The filename is no longer automatically inferred from file + objects. If you want to use automatic MIME and etag support, + pass a filename via ``filename_or_fp`` or + ``attachment_filename``. + + .. versionchanged:: 0.12 + ``attachment_filename`` is preferred over ``filename`` for MIME + detection. + + .. versionchanged:: 0.9 + ``cache_timeout`` defaults to + :meth:`Flask.get_send_file_max_age`. + + .. versionchanged:: 0.7 + MIME guessing and etag support for file-like objects was + removed because it was unreliable. Pass a filename if you are + able to, otherwise attach an etag yourself. + + .. versionchanged:: 0.5 + The ``add_etags``, ``cache_timeout`` and ``conditional`` + parameters were added. The default behavior is to add etags. + + .. versionadded:: 0.2 + """ + return werkzeug.utils.send_file( # type: ignore[return-value] + **_prepare_send_file_kwargs( + path_or_file=path_or_file, + environ=request.environ, + mimetype=mimetype, + as_attachment=as_attachment, + download_name=download_name, + conditional=conditional, + etag=etag, + last_modified=last_modified, + max_age=max_age, + ) + ) + + +def send_from_directory( + directory: os.PathLike | str, + path: os.PathLike | str, + **kwargs: t.Any, +) -> Response: + """Send a file from within a directory using :func:`send_file`. + + .. code-block:: python + + @app.route("/uploads/") + def download_file(name): + return send_from_directory( + app.config['UPLOAD_FOLDER'], name, as_attachment=True + ) + + This is a secure way to serve files from a folder, such as static + files or uploads. Uses :func:`~werkzeug.security.safe_join` to + ensure the path coming from the client is not maliciously crafted to + point outside the specified directory. + + If the final path does not point to an existing regular file, + raises a 404 :exc:`~werkzeug.exceptions.NotFound` error. + + :param directory: The directory that ``path`` must be located under, + relative to the current application's root path. + :param path: The path to the file to send, relative to + ``directory``. + :param kwargs: Arguments to pass to :func:`send_file`. + + .. versionchanged:: 2.0 + ``path`` replaces the ``filename`` parameter. + + .. versionadded:: 2.0 + Moved the implementation to Werkzeug. This is now a wrapper to + pass some Flask-specific arguments. + + .. versionadded:: 0.5 + """ + return werkzeug.utils.send_from_directory( # type: ignore[return-value] + directory, path, **_prepare_send_file_kwargs(**kwargs) + ) + + +def get_root_path(import_name: str) -> str: + """Find the root path of a package, or the path that contains a + module. If it cannot be found, returns the current working + directory. + + Not to be confused with the value returned by :func:`find_package`. + + :meta private: + """ + # Module already imported and has a file attribute. Use that first. + mod = sys.modules.get(import_name) + + if mod is not None and hasattr(mod, "__file__") and mod.__file__ is not None: + return os.path.dirname(os.path.abspath(mod.__file__)) + + # Next attempt: check the loader. + try: + spec = importlib.util.find_spec(import_name) + + if spec is None: + raise ValueError + except (ImportError, ValueError): + loader = None + else: + loader = spec.loader + + # Loader does not exist or we're referring to an unloaded main + # module or a main module without path (interactive sessions), go + # with the current working directory. + if loader is None: + return os.getcwd() + + if hasattr(loader, "get_filename"): + filepath = loader.get_filename(import_name) + else: + # Fall back to imports. + __import__(import_name) + mod = sys.modules[import_name] + filepath = getattr(mod, "__file__", None) + + # If we don't have a file path it might be because it is a + # namespace package. In this case pick the root path from the + # first module that is contained in the package. + if filepath is None: + raise RuntimeError( + "No root path can be found for the provided module" + f" {import_name!r}. This can happen because the module" + " came from an import hook that does not provide file" + " name information or because it's a namespace package." + " In this case the root path needs to be explicitly" + " provided." + ) + + # filepath is import_name.py for a module, or __init__.py for a package. + return os.path.dirname(os.path.abspath(filepath)) + + +@lru_cache(maxsize=None) +def _split_blueprint_path(name: str) -> list[str]: + out: list[str] = [name] + + if "." in name: + out.extend(_split_blueprint_path(name.rpartition(".")[0])) + + return out diff --git a/venv/lib/python3.12/site-packages/flask/json/__init__.py b/venv/lib/python3.12/site-packages/flask/json/__init__.py new file mode 100644 index 0000000..f15296f --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/json/__init__.py @@ -0,0 +1,170 @@ +from __future__ import annotations + +import json as _json +import typing as t + +from ..globals import current_app +from .provider import _default + +if t.TYPE_CHECKING: # pragma: no cover + from ..wrappers import Response + + +def dumps(obj: t.Any, **kwargs: t.Any) -> str: + """Serialize data as JSON. + + If :data:`~flask.current_app` is available, it will use its + :meth:`app.json.dumps() ` + method, otherwise it will use :func:`json.dumps`. + + :param obj: The data to serialize. + :param kwargs: Arguments passed to the ``dumps`` implementation. + + .. versionchanged:: 2.3 + The ``app`` parameter was removed. + + .. versionchanged:: 2.2 + Calls ``current_app.json.dumps``, allowing an app to override + the behavior. + + .. versionchanged:: 2.0.2 + :class:`decimal.Decimal` is supported by converting to a string. + + .. versionchanged:: 2.0 + ``encoding`` will be removed in Flask 2.1. + + .. versionchanged:: 1.0.3 + ``app`` can be passed directly, rather than requiring an app + context for configuration. + """ + if current_app: + return current_app.json.dumps(obj, **kwargs) + + kwargs.setdefault("default", _default) + return _json.dumps(obj, **kwargs) + + +def dump(obj: t.Any, fp: t.IO[str], **kwargs: t.Any) -> None: + """Serialize data as JSON and write to a file. + + If :data:`~flask.current_app` is available, it will use its + :meth:`app.json.dump() ` + method, otherwise it will use :func:`json.dump`. + + :param obj: The data to serialize. + :param fp: A file opened for writing text. Should use the UTF-8 + encoding to be valid JSON. + :param kwargs: Arguments passed to the ``dump`` implementation. + + .. versionchanged:: 2.3 + The ``app`` parameter was removed. + + .. versionchanged:: 2.2 + Calls ``current_app.json.dump``, allowing an app to override + the behavior. + + .. versionchanged:: 2.0 + Writing to a binary file, and the ``encoding`` argument, will be + removed in Flask 2.1. + """ + if current_app: + current_app.json.dump(obj, fp, **kwargs) + else: + kwargs.setdefault("default", _default) + _json.dump(obj, fp, **kwargs) + + +def loads(s: str | bytes, **kwargs: t.Any) -> t.Any: + """Deserialize data as JSON. + + If :data:`~flask.current_app` is available, it will use its + :meth:`app.json.loads() ` + method, otherwise it will use :func:`json.loads`. + + :param s: Text or UTF-8 bytes. + :param kwargs: Arguments passed to the ``loads`` implementation. + + .. versionchanged:: 2.3 + The ``app`` parameter was removed. + + .. versionchanged:: 2.2 + Calls ``current_app.json.loads``, allowing an app to override + the behavior. + + .. versionchanged:: 2.0 + ``encoding`` will be removed in Flask 2.1. The data must be a + string or UTF-8 bytes. + + .. versionchanged:: 1.0.3 + ``app`` can be passed directly, rather than requiring an app + context for configuration. + """ + if current_app: + return current_app.json.loads(s, **kwargs) + + return _json.loads(s, **kwargs) + + +def load(fp: t.IO[t.AnyStr], **kwargs: t.Any) -> t.Any: + """Deserialize data as JSON read from a file. + + If :data:`~flask.current_app` is available, it will use its + :meth:`app.json.load() ` + method, otherwise it will use :func:`json.load`. + + :param fp: A file opened for reading text or UTF-8 bytes. + :param kwargs: Arguments passed to the ``load`` implementation. + + .. versionchanged:: 2.3 + The ``app`` parameter was removed. + + .. versionchanged:: 2.2 + Calls ``current_app.json.load``, allowing an app to override + the behavior. + + .. versionchanged:: 2.2 + The ``app`` parameter will be removed in Flask 2.3. + + .. versionchanged:: 2.0 + ``encoding`` will be removed in Flask 2.1. The file must be text + mode, or binary mode with UTF-8 bytes. + """ + if current_app: + return current_app.json.load(fp, **kwargs) + + return _json.load(fp, **kwargs) + + +def jsonify(*args: t.Any, **kwargs: t.Any) -> Response: + """Serialize the given arguments as JSON, and return a + :class:`~flask.Response` object with the ``application/json`` + mimetype. A dict or list returned from a view will be converted to a + JSON response automatically without needing to call this. + + This requires an active request or application context, and calls + :meth:`app.json.response() `. + + In debug mode, the output is formatted with indentation to make it + easier to read. This may also be controlled by the provider. + + Either positional or keyword arguments can be given, not both. + If no arguments are given, ``None`` is serialized. + + :param args: A single value to serialize, or multiple values to + treat as a list to serialize. + :param kwargs: Treat as a dict to serialize. + + .. versionchanged:: 2.2 + Calls ``current_app.json.response``, allowing an app to override + the behavior. + + .. versionchanged:: 2.0.2 + :class:`decimal.Decimal` is supported by converting to a string. + + .. versionchanged:: 0.11 + Added support for serializing top-level arrays. This was a + security risk in ancient browsers. See :ref:`security-json`. + + .. versionadded:: 0.2 + """ + return current_app.json.response(*args, **kwargs) diff --git a/venv/lib/python3.12/site-packages/flask/json/__pycache__/__init__.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/json/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000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4J6U^$H#WYvLFUp*87Egv`uV0mcHEVHC-+JHMjcD7;Ld_ROd4E$0Q<%?w@-5kQ}S2pd$JtA MJpP{&Jvqbv8%<*>>i_@% literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask/json/__pycache__/tag.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/json/__pycache__/tag.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..52dad8a3f74b7a6c0c4a6008059a8293ec757613 GIT binary patch literal 13332 zcmc&)Z)_aLb>F?aJ?zS?0A2ECXW!1wy!Yn)nVI+gbI+czgzIyM^XVTRlB8eKgLf&SBA1i0 zByC8BG$k3b;mgQb-;__LxXgdsZJAIuJQe13 zHPfE$nCjs5P-aiIbE=cq!>C85BB-|;9hqphYpRRa_n_WA)h$at>GP7&c}+4RulfXb zQ#~9O1+2^LdDZVidpWcl(4HD-ABXk=+E)YJ%b|M#-B$zM$D#dz-d6+d=g56YoJYbVom-P3Ijg?PytjS(`TLvzdHGOXoBTO_{ckL2p1}+zF@j9JMg7IA+cO z<Uv(qNCN1HyO#`vtU)j87{ zCeE1}P%*FQ*@X;Iq&u2!7^5&&vGQ6Ot8F)CEpXNNN%&1Fd666@#Y#JzFB4~zk=8}dk(9^JH8No_Vkfij?GH*e=j%(*@X44ZWnlxr%(ntUdPU8%QcQ`fa9GX?faP(OX+@m39n3dz$ z(}Q4xozA69;84r9q?XOwP8f3F4Prnjz;S9wqa~AZKAkDcFi%crtknGIsJ5`|%vrfG zpHB>w)r2Ttwyj*8a7bsl7{8Q!g1sL;WDVAC zU!p60VZk#iiL_@zYSCimEM(hc$Lgo!1kf|gE02957Ji$|c}y;~>$#jI?43PvQ!a(3 zA3kN6Bn)^-4`$ANP+@*dC!ICXDsbV#_!#cNXLL57U!d>i9A_axP4EB(Vz$Yj-X?Dn zlS>LIpiPyGr5koicoR{&u0<}N!}Eq@N>egiqVED6;gsL-!4dkW6eC~;4dqd^fC~#= z3rw{c9Y!1OsD;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RT}cidSUbDZ5q;^I>(6W+exu`ocl-betDYjZc$b0-tb<&Z zK*|P^(I{B%k##k&5@>a-a#dMTz8YWg+51LA|Jwx{8`OwPRFS_ya<%Lwn^V~Cel)Obvd9>bMFjL6$(^8Zzg1t*CQj$rEtRhd$L!Rz6lzC%QhYJgpR^-+y_&}YP$=3FYLpN~y}2QEZzjncqr+s9&j2=V$R4Dwyo*dY;?p%V zHc?Q{qrc%o|8VOLiWc;_UPJU zWRRY|{`BpR{kJ;yZ>HYpICQ5DVs1^o(GhE2zL3GsGPn~0Af-Kz!>rrh0l5^3Op+z5Ba791@NBIS}V?6>*4A|@C^t^Q<=AccO&Nwf9GXc|nk8@qt1-x$3yiWq9>C=7k1o3;&` zeQ!h#?CcxZSh}&anSc5DpGJ?|RnP$2xM<&6M>Ah5#{V_W*J|vv$}Pm5v0Y?7;zacb zplaHyEnjtgA;nf(o8U!R^wavS2sO4e?+uYxI%+74R_CPkMARnDSS&r8Mh1Y$nqiNC z+?c{1$E_xqNqWa%UiVW8#I@OQ^(awhO0V%$)W{0pO-UEg?Or>B4I z+^^~)xlo^VVv(SBDPr9|Gy>}oi#WgWX8p8v|S{b*>TX{ zF6xOn2)$?RVYuVDCC6mn;%=~PeGJqLv!5JMvlme7eDio5l ziH;|E{=@IWcFx3l#=fUMDzecYXItnB!YbK6KylYE%kn$Em>l@;^Rgr#{-xCYmNdx! z_rE3e{aQkK_$_JZ*HZsmQvYv)56C0$NGNunl=sO;*JgJm+;&g3%iU{ByAp1@gYEL5 zs1NQAh6Eh9-Tro26L4*JFe2|?Z`+k{+Z}3`@27rnqi+wc4^#c%Zw8aHeCl0^N` to an instance of the class. + + :param app: An application instance. This will be stored as a + :class:`weakref.proxy` on the :attr:`_app` attribute. + + .. versionadded:: 2.2 + """ + + def __init__(self, app: App) -> None: + self._app = weakref.proxy(app) + + def dumps(self, obj: t.Any, **kwargs: t.Any) -> str: + """Serialize data as JSON. + + :param obj: The data to serialize. + :param kwargs: May be passed to the underlying JSON library. + """ + raise NotImplementedError + + def dump(self, obj: t.Any, fp: t.IO[str], **kwargs: t.Any) -> None: + """Serialize data as JSON and write to a file. + + :param obj: The data to serialize. + :param fp: A file opened for writing text. Should use the UTF-8 + encoding to be valid JSON. + :param kwargs: May be passed to the underlying JSON library. + """ + fp.write(self.dumps(obj, **kwargs)) + + def loads(self, s: str | bytes, **kwargs: t.Any) -> t.Any: + """Deserialize data as JSON. + + :param s: Text or UTF-8 bytes. + :param kwargs: May be passed to the underlying JSON library. + """ + raise NotImplementedError + + def load(self, fp: t.IO[t.AnyStr], **kwargs: t.Any) -> t.Any: + """Deserialize data as JSON read from a file. + + :param fp: A file opened for reading text or UTF-8 bytes. + :param kwargs: May be passed to the underlying JSON library. + """ + return self.loads(fp.read(), **kwargs) + + def _prepare_response_obj( + self, args: tuple[t.Any, ...], kwargs: dict[str, t.Any] + ) -> t.Any: + if args and kwargs: + raise TypeError("app.json.response() takes either args or kwargs, not both") + + if not args and not kwargs: + return None + + if len(args) == 1: + return args[0] + + return args or kwargs + + def response(self, *args: t.Any, **kwargs: t.Any) -> Response: + """Serialize the given arguments as JSON, and return a + :class:`~flask.Response` object with the ``application/json`` + mimetype. + + The :func:`~flask.json.jsonify` function calls this method for + the current application. + + Either positional or keyword arguments can be given, not both. + If no arguments are given, ``None`` is serialized. + + :param args: A single value to serialize, or multiple values to + treat as a list to serialize. + :param kwargs: Treat as a dict to serialize. + """ + obj = self._prepare_response_obj(args, kwargs) + return self._app.response_class(self.dumps(obj), mimetype="application/json") + + +def _default(o: t.Any) -> t.Any: + if isinstance(o, date): + return http_date(o) + + if isinstance(o, (decimal.Decimal, uuid.UUID)): + return str(o) + + if dataclasses and dataclasses.is_dataclass(o): + return dataclasses.asdict(o) + + if hasattr(o, "__html__"): + return str(o.__html__()) + + raise TypeError(f"Object of type {type(o).__name__} is not JSON serializable") + + +class DefaultJSONProvider(JSONProvider): + """Provide JSON operations using Python's built-in :mod:`json` + library. Serializes the following additional data types: + + - :class:`datetime.datetime` and :class:`datetime.date` are + serialized to :rfc:`822` strings. This is the same as the HTTP + date format. + - :class:`uuid.UUID` is serialized to a string. + - :class:`dataclasses.dataclass` is passed to + :func:`dataclasses.asdict`. + - :class:`~markupsafe.Markup` (or any object with a ``__html__`` + method) will call the ``__html__`` method to get a string. + """ + + default: t.Callable[[t.Any], t.Any] = staticmethod( + _default + ) # type: ignore[assignment] + """Apply this function to any object that :meth:`json.dumps` does + not know how to serialize. It should return a valid JSON type or + raise a ``TypeError``. + """ + + ensure_ascii = True + """Replace non-ASCII characters with escape sequences. This may be + more compatible with some clients, but can be disabled for better + performance and size. + """ + + sort_keys = True + """Sort the keys in any serialized dicts. This may be useful for + some caching situations, but can be disabled for better performance. + When enabled, keys must all be strings, they are not converted + before sorting. + """ + + compact: bool | None = None + """If ``True``, or ``None`` out of debug mode, the :meth:`response` + output will not add indentation, newlines, or spaces. If ``False``, + or ``None`` in debug mode, it will use a non-compact representation. + """ + + mimetype = "application/json" + """The mimetype set in :meth:`response`.""" + + def dumps(self, obj: t.Any, **kwargs: t.Any) -> str: + """Serialize data as JSON to a string. + + Keyword arguments are passed to :func:`json.dumps`. Sets some + parameter defaults from the :attr:`default`, + :attr:`ensure_ascii`, and :attr:`sort_keys` attributes. + + :param obj: The data to serialize. + :param kwargs: Passed to :func:`json.dumps`. + """ + kwargs.setdefault("default", self.default) + kwargs.setdefault("ensure_ascii", self.ensure_ascii) + kwargs.setdefault("sort_keys", self.sort_keys) + return json.dumps(obj, **kwargs) + + def loads(self, s: str | bytes, **kwargs: t.Any) -> t.Any: + """Deserialize data as JSON from a string or bytes. + + :param s: Text or UTF-8 bytes. + :param kwargs: Passed to :func:`json.loads`. + """ + return json.loads(s, **kwargs) + + def response(self, *args: t.Any, **kwargs: t.Any) -> Response: + """Serialize the given arguments as JSON, and return a + :class:`~flask.Response` object with it. The response mimetype + will be "application/json" and can be changed with + :attr:`mimetype`. + + If :attr:`compact` is ``False`` or debug mode is enabled, the + output will be formatted to be easier to read. + + Either positional or keyword arguments can be given, not both. + If no arguments are given, ``None`` is serialized. + + :param args: A single value to serialize, or multiple values to + treat as a list to serialize. + :param kwargs: Treat as a dict to serialize. + """ + obj = self._prepare_response_obj(args, kwargs) + dump_args: dict[str, t.Any] = {} + + if (self.compact is None and self._app.debug) or self.compact is False: + dump_args.setdefault("indent", 2) + else: + dump_args.setdefault("separators", (",", ":")) + + return self._app.response_class( + f"{self.dumps(obj, **dump_args)}\n", mimetype=self.mimetype + ) diff --git a/venv/lib/python3.12/site-packages/flask/json/tag.py b/venv/lib/python3.12/site-packages/flask/json/tag.py new file mode 100644 index 0000000..91cc441 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/json/tag.py @@ -0,0 +1,314 @@ +""" +Tagged JSON +~~~~~~~~~~~ + +A compact representation for lossless serialization of non-standard JSON +types. :class:`~flask.sessions.SecureCookieSessionInterface` uses this +to serialize the session data, but it may be useful in other places. It +can be extended to support other types. + +.. autoclass:: TaggedJSONSerializer + :members: + +.. autoclass:: JSONTag + :members: + +Let's see an example that adds support for +:class:`~collections.OrderedDict`. Dicts don't have an order in JSON, so +to handle this we will dump the items as a list of ``[key, value]`` +pairs. Subclass :class:`JSONTag` and give it the new key ``' od'`` to +identify the type. The session serializer processes dicts first, so +insert the new tag at the front of the order since ``OrderedDict`` must +be processed before ``dict``. + +.. code-block:: python + + from flask.json.tag import JSONTag + + class TagOrderedDict(JSONTag): + __slots__ = ('serializer',) + key = ' od' + + def check(self, value): + return isinstance(value, OrderedDict) + + def to_json(self, value): + return [[k, self.serializer.tag(v)] for k, v in iteritems(value)] + + def to_python(self, value): + return OrderedDict(value) + + app.session_interface.serializer.register(TagOrderedDict, index=0) +""" +from __future__ import annotations + +import typing as t +from base64 import b64decode +from base64 import b64encode +from datetime import datetime +from uuid import UUID + +from markupsafe import Markup +from werkzeug.http import http_date +from werkzeug.http import parse_date + +from ..json import dumps +from ..json import loads + + +class JSONTag: + """Base class for defining type tags for :class:`TaggedJSONSerializer`.""" + + __slots__ = ("serializer",) + + #: The tag to mark the serialized object with. If ``None``, this tag is + #: only used as an intermediate step during tagging. + key: str | None = None + + def __init__(self, serializer: TaggedJSONSerializer) -> None: + """Create a tagger for the given serializer.""" + self.serializer = serializer + + def check(self, value: t.Any) -> bool: + """Check if the given value should be tagged by this tag.""" + raise NotImplementedError + + def to_json(self, value: t.Any) -> t.Any: + """Convert the Python object to an object that is a valid JSON type. + The tag will be added later.""" + raise NotImplementedError + + def to_python(self, value: t.Any) -> t.Any: + """Convert the JSON representation back to the correct type. The tag + will already be removed.""" + raise NotImplementedError + + def tag(self, value: t.Any) -> t.Any: + """Convert the value to a valid JSON type and add the tag structure + around it.""" + return {self.key: self.to_json(value)} + + +class TagDict(JSONTag): + """Tag for 1-item dicts whose only key matches a registered tag. + + Internally, the dict key is suffixed with `__`, and the suffix is removed + when deserializing. + """ + + __slots__ = () + key = " di" + + def check(self, value: t.Any) -> bool: + return ( + isinstance(value, dict) + and len(value) == 1 + and next(iter(value)) in self.serializer.tags + ) + + def to_json(self, value: t.Any) -> t.Any: + key = next(iter(value)) + return {f"{key}__": self.serializer.tag(value[key])} + + def to_python(self, value: t.Any) -> t.Any: + key = next(iter(value)) + return {key[:-2]: value[key]} + + +class PassDict(JSONTag): + __slots__ = () + + def check(self, value: t.Any) -> bool: + return isinstance(value, dict) + + def to_json(self, value: t.Any) -> t.Any: + # JSON objects may only have string keys, so don't bother tagging the + # key here. + return {k: self.serializer.tag(v) for k, v in value.items()} + + tag = to_json + + +class TagTuple(JSONTag): + __slots__ = () + key = " t" + + def check(self, value: t.Any) -> bool: + return isinstance(value, tuple) + + def to_json(self, value: t.Any) -> t.Any: + return [self.serializer.tag(item) for item in value] + + def to_python(self, value: t.Any) -> t.Any: + return tuple(value) + + +class PassList(JSONTag): + __slots__ = () + + def check(self, value: t.Any) -> bool: + return isinstance(value, list) + + def to_json(self, value: t.Any) -> t.Any: + return [self.serializer.tag(item) for item in value] + + tag = to_json + + +class TagBytes(JSONTag): + __slots__ = () + key = " b" + + def check(self, value: t.Any) -> bool: + return isinstance(value, bytes) + + def to_json(self, value: t.Any) -> t.Any: + return b64encode(value).decode("ascii") + + def to_python(self, value: t.Any) -> t.Any: + return b64decode(value) + + +class TagMarkup(JSONTag): + """Serialize anything matching the :class:`~markupsafe.Markup` API by + having a ``__html__`` method to the result of that method. Always + deserializes to an instance of :class:`~markupsafe.Markup`.""" + + __slots__ = () + key = " m" + + def check(self, value: t.Any) -> bool: + return callable(getattr(value, "__html__", None)) + + def to_json(self, value: t.Any) -> t.Any: + return str(value.__html__()) + + def to_python(self, value: t.Any) -> t.Any: + return Markup(value) + + +class TagUUID(JSONTag): + __slots__ = () + key = " u" + + def check(self, value: t.Any) -> bool: + return isinstance(value, UUID) + + def to_json(self, value: t.Any) -> t.Any: + return value.hex + + def to_python(self, value: t.Any) -> t.Any: + return UUID(value) + + +class TagDateTime(JSONTag): + __slots__ = () + key = " d" + + def check(self, value: t.Any) -> bool: + return isinstance(value, datetime) + + def to_json(self, value: t.Any) -> t.Any: + return http_date(value) + + def to_python(self, value: t.Any) -> t.Any: + return parse_date(value) + + +class TaggedJSONSerializer: + """Serializer that uses a tag system to compactly represent objects that + are not JSON types. Passed as the intermediate serializer to + :class:`itsdangerous.Serializer`. + + The following extra types are supported: + + * :class:`dict` + * :class:`tuple` + * :class:`bytes` + * :class:`~markupsafe.Markup` + * :class:`~uuid.UUID` + * :class:`~datetime.datetime` + """ + + __slots__ = ("tags", "order") + + #: Tag classes to bind when creating the serializer. Other tags can be + #: added later using :meth:`~register`. + default_tags = [ + TagDict, + PassDict, + TagTuple, + PassList, + TagBytes, + TagMarkup, + TagUUID, + TagDateTime, + ] + + def __init__(self) -> None: + self.tags: dict[str, JSONTag] = {} + self.order: list[JSONTag] = [] + + for cls in self.default_tags: + self.register(cls) + + def register( + self, + tag_class: type[JSONTag], + force: bool = False, + index: int | None = None, + ) -> None: + """Register a new tag with this serializer. + + :param tag_class: tag class to register. Will be instantiated with this + serializer instance. + :param force: overwrite an existing tag. If false (default), a + :exc:`KeyError` is raised. + :param index: index to insert the new tag in the tag order. Useful when + the new tag is a special case of an existing tag. If ``None`` + (default), the tag is appended to the end of the order. + + :raise KeyError: if the tag key is already registered and ``force`` is + not true. + """ + tag = tag_class(self) + key = tag.key + + if key is not None: + if not force and key in self.tags: + raise KeyError(f"Tag '{key}' is already registered.") + + self.tags[key] = tag + + if index is None: + self.order.append(tag) + else: + self.order.insert(index, tag) + + def tag(self, value: t.Any) -> dict[str, t.Any]: + """Convert a value to a tagged representation if necessary.""" + for tag in self.order: + if tag.check(value): + return tag.tag(value) + + return value + + def untag(self, value: dict[str, t.Any]) -> t.Any: + """Convert a tagged representation back to the original type.""" + if len(value) != 1: + return value + + key = next(iter(value)) + + if key not in self.tags: + return value + + return self.tags[key].to_python(value[key]) + + def dumps(self, value: t.Any) -> str: + """Tag the value and dump it to a compact JSON string.""" + return dumps(self.tag(value), separators=(",", ":")) + + def loads(self, value: str) -> t.Any: + """Load data from a JSON string and deserialized any tagged objects.""" + return loads(value, object_hook=self.untag) diff --git a/venv/lib/python3.12/site-packages/flask/logging.py b/venv/lib/python3.12/site-packages/flask/logging.py new file mode 100644 index 0000000..b452f71 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/logging.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +import logging +import sys +import typing as t + +from werkzeug.local import LocalProxy + +from .globals import request + +if t.TYPE_CHECKING: # pragma: no cover + from .sansio.app import App + + +@LocalProxy +def wsgi_errors_stream() -> t.TextIO: + """Find the most appropriate error stream for the application. If a request + is active, log to ``wsgi.errors``, otherwise use ``sys.stderr``. + + If you configure your own :class:`logging.StreamHandler`, you may want to + use this for the stream. If you are using file or dict configuration and + can't import this directly, you can refer to it as + ``ext://flask.logging.wsgi_errors_stream``. + """ + return request.environ["wsgi.errors"] if request else sys.stderr + + +def has_level_handler(logger: logging.Logger) -> bool: + """Check if there is a handler in the logging chain that will handle the + given logger's :meth:`effective level <~logging.Logger.getEffectiveLevel>`. + """ + level = logger.getEffectiveLevel() + current = logger + + while current: + if any(handler.level <= level for handler in current.handlers): + return True + + if not current.propagate: + break + + current = current.parent # type: ignore + + return False + + +#: Log messages to :func:`~flask.logging.wsgi_errors_stream` with the format +#: ``[%(asctime)s] %(levelname)s in %(module)s: %(message)s``. +default_handler = logging.StreamHandler(wsgi_errors_stream) # type: ignore +default_handler.setFormatter( + logging.Formatter("[%(asctime)s] %(levelname)s in %(module)s: %(message)s") +) + + +def create_logger(app: App) -> logging.Logger: + """Get the Flask app's logger and configure it if needed. + + The logger name will be the same as + :attr:`app.import_name `. + + When :attr:`~flask.Flask.debug` is enabled, set the logger level to + :data:`logging.DEBUG` if it is not set. + + If there is no handler for the logger's effective level, add a + :class:`~logging.StreamHandler` for + :func:`~flask.logging.wsgi_errors_stream` with a basic format. + """ + logger = logging.getLogger(app.name) + + if app.debug and not logger.level: + logger.setLevel(logging.DEBUG) + + if not has_level_handler(logger): + logger.addHandler(default_handler) + + return logger diff --git a/venv/lib/python3.12/site-packages/flask/py.typed b/venv/lib/python3.12/site-packages/flask/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/venv/lib/python3.12/site-packages/flask/sansio/README.md b/venv/lib/python3.12/site-packages/flask/sansio/README.md new file mode 100644 index 0000000..623ac19 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/sansio/README.md @@ -0,0 +1,6 @@ +# Sansio + +This folder contains code that can be used by alternative Flask +implementations, for example Quart. The code therefore cannot do any +IO, nor be part of a likely IO path. Finally this code cannot use the +Flask globals. diff --git a/venv/lib/python3.12/site-packages/flask/sansio/__pycache__/app.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/sansio/__pycache__/app.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c19c78e21fc382819319e788a4f6617d897d484c GIT binary patch literal 33543 zcmd6QdvF}bdFSj4*aa3?Jc%d4AqWx=g3E_UN`gd5APG{GNr)mLIa*oXU1A30l8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e7_$G|9t@O zSzqPFEv28iO+^3rkA;JifJ3ZiJ(tR!##>E0TyTjD6W*+#2LIKlUo!R zT=d`sUi`@_L16v#CPdp^^AK-x!m7}ybVtbW@{}>b4af+@X6<5~$|LnlA^I~JCaPR) zRT;$Jd&bUVVNzs!Sg}@phIWdInL;y3{2M9_)nFno?CJGXC-V>=xQyUAmE>>0ZX-5( zhy(I!=nVd-+;V6M&e1|e+X!Bjl)k}%ED}QnOAF#$9R5q-yn9fbPNmaVBJ;(Xu~$!z z#E(2ba^zF=mqhASi)Yx!fZG2z<$Z-NESAD;ty$aXv4_f6(#FGAl2&o^Sqca^A_AUH z+d&DoaAA>zQmh-3aUSY5i8IAbwj{Pj0PHLIxJFv)r;kl`$r2fE0H2ucGP1F;THxMp zeE2x{w2%p&v9_Ws_#Y=);))$|9?u6__g`tXKhQ!y(5il*HGH6TeV}#xwbuKAHt>PA z?*mHcA81=Y(01{g$NpODK!y*r9)7=*6T3gq`aaOMeV`$M_ff!PI9u=g{9k$YOV57b zANs(*o&WE<-?{zP@V8EUQ~#c@Y0*FUVrt*{GENv zJD(}+eCBS=v)8Itnl|4UzIo!U6N_DY-)mTY@=W2$Gk2TLE^76U_|njEW9!ZSxB3@5 ncfEUN`M}A-fs=O|PF;&Utnhn!KB|48*3-1m_hXIjJXrq+m*NJM literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask/sansio/__pycache__/blueprints.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/sansio/__pycache__/blueprints.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..83e105bf5c02a28403bf109cb8f68ff86cc2d551 GIT binary patch literal 31016 zcmd^o3ve9gec$dqfO`RVcpaVu76d@x2oL~4N)$ne6kifwf+#-Zh_VbEZx7^w;2pGg zAc-?j(XM6$Oq~#Hq7aPZ5!5&}7&#F$X(#lwGiI80s%nSn$( ziPcB?`+xhq!-1mXD0Zg{a`)Ts{rG?X_qX?-%E~+(uIJjOVt@M;j{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;mH3@cYn4!F<9XiM|LByx$$5fb z9isMJ^y?H`w&u1zwd!rsexL$R44ZzSf)K^w3 z`btmgE1v7r`iZU7S)sLrkhUIA7Po41J1cS(TUPCOK6H0{;>1&{3n2gzfr^(VBD8A9 zlT8GkS{{T}8(1Dz5Av{jT8q_V_VZKfG1JsDniuM!UsD;I!pGY1Ybp{p5vSM^Nr@cz z6&|O5%%6owvSTxfn>oyaEG5}j^dx~58A~ayr1qnbk{eO%V6x<;5TOjE?9{8r5030V zba4OC!^1B~ZInRdS#jz3R;f9leF*m?ePH!@?WX~i(o?{RuY@I~dN1jRPpAeby_7_# zR;k&?zD-(~M#x#IK1d%@IK=Exl2MFgO#JYq_M4JMG@)ok&?(V=^+3*X{kI>DY=pCw zpq{OOPS)fl77!IOo-5UQ$vjd=g0fPH^9Yy+`f|R}8lh;V2??*zM}&`CevHz{!mvCs zG%6>vkwU$6>%k3f^Xl*A?3PyXN;otL6v^S_3(tSVZTu1E{u8e9Bd+ZuuKmApjUREn zA8{=oam^obtq<*vxA%N~&qt2BhjsPudTx3$?K?AVgLn3R|H$`_WZIsW>t4ukHMz>h zh1MIP>!D23mfI(?PaTt=I(EPE#jE~YRnx-O8#}M>%xvhpEoFDSB=30Xe%0{|7g)bY zS#a*3~x-hdmknP?rckjMmw&$t`M{O71cz62dbk4DHd1H3-i}L0d!LbUq3`ggS zYnm7K-Z*^yaHe_doysiEz3x15zxrf`tH@PvSTAMWURN|MRNSb)UY}{~zCDoLc1YfK z=zhiFtL3@I_QkF5?!37(=V)F!o85F!-gFRsXhI+A{@Qbb=RF^DbpLeR_SI6pV!`!e Jj-G5K{x4fW8$|#B literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask/sansio/__pycache__/scaffold.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask/sansio/__pycache__/scaffold.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f3e2ecbbbb72b1216843eed508144df4139f891e GIT binary patch literal 30278 zcmdU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Z1FKCtR?g&_4&_3JP-uPUjWfBrp8j0^XW2f@_1{STGMmdPf{7mDSNyCkHKH`qahu9{%MbrKzVYEj`E_`6tsTWR9}6 z3TJnZ>VJzQB#s)d;tqX*EdNaE`*W$~r&85VrP`lL)jyRQeYPh5cvp`_J5N{M=F<8MO9XKYZRe_{J|G) zH@%pX>Nn3)vt{}7@4R~D)vJpudkZ^{=64>wUGwx(^;*x+jW4}7|L**nuWzNVu;X+2 z9iMyP^(da4)P+@t7BpOMzt*1X+<9wn;fYiECr;gNIK5Q6);Vxv&wGd8J-p`YzImar z{X~BI31sU+wl-u7HZS+S6TT9@div%|g>C!u+xFkCKCo1IzoJq;@Hfq$t(N&n8}fF!o2l^rFRdD(w*UYD literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask/sansio/app.py b/venv/lib/python3.12/site-packages/flask/sansio/app.py new file mode 100644 index 0000000..0f7d2cb --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/sansio/app.py @@ -0,0 +1,964 @@ +from __future__ import annotations + +import logging +import os +import sys +import typing as t +from datetime import timedelta +from itertools import chain + +from werkzeug.exceptions import Aborter +from werkzeug.exceptions import BadRequest +from werkzeug.exceptions import BadRequestKeyError +from werkzeug.routing import BuildError +from werkzeug.routing import Map +from werkzeug.routing import Rule +from werkzeug.sansio.response import Response +from werkzeug.utils import cached_property +from werkzeug.utils import redirect as _wz_redirect + +from .. import typing as ft +from ..config import Config +from ..config import ConfigAttribute +from ..ctx import _AppCtxGlobals +from ..helpers import _split_blueprint_path +from ..helpers import get_debug_flag +from ..json.provider import DefaultJSONProvider +from ..json.provider import JSONProvider +from ..logging import create_logger +from ..templating import DispatchingJinjaLoader +from ..templating import Environment +from .scaffold import _endpoint_from_view_func +from .scaffold import find_package +from .scaffold import Scaffold +from .scaffold import setupmethod + +if t.TYPE_CHECKING: # pragma: no cover + from werkzeug.wrappers import Response as BaseResponse + from .blueprints import Blueprint + from ..testing import FlaskClient + from ..testing import FlaskCliRunner + +T_shell_context_processor = t.TypeVar( + "T_shell_context_processor", bound=ft.ShellContextProcessorCallable +) +T_teardown = t.TypeVar("T_teardown", bound=ft.TeardownCallable) +T_template_filter = t.TypeVar("T_template_filter", bound=ft.TemplateFilterCallable) +T_template_global = t.TypeVar("T_template_global", bound=ft.TemplateGlobalCallable) +T_template_test = t.TypeVar("T_template_test", bound=ft.TemplateTestCallable) + + +def _make_timedelta(value: timedelta | int | None) -> timedelta | None: + if value is None or isinstance(value, timedelta): + return value + + return timedelta(seconds=value) + + +class App(Scaffold): + """The flask object implements a WSGI application and acts as the central + object. It is passed the name of the module or package of the + application. Once it is created it will act as a central registry for + the view functions, the URL rules, template configuration and much more. + + The name of the package is used to resolve resources from inside the + package or the folder the module is contained in depending on if the + package parameter resolves to an actual python package (a folder with + an :file:`__init__.py` file inside) or a standard module (just a ``.py`` file). + + For more information about resource loading, see :func:`open_resource`. + + Usually you create a :class:`Flask` instance in your main module or + in the :file:`__init__.py` file of your package like this:: + + from flask import Flask + app = Flask(__name__) + + .. admonition:: About the First Parameter + + The idea of the first parameter is to give Flask an idea of what + belongs to your application. This name is used to find resources + on the filesystem, can be used by extensions to improve debugging + information and a lot more. + + So it's important what you provide there. If you are using a single + module, `__name__` is always the correct value. If you however are + using a package, it's usually recommended to hardcode the name of + your package there. + + For example if your application is defined in :file:`yourapplication/app.py` + you should create it with one of the two versions below:: + + app = Flask('yourapplication') + app = Flask(__name__.split('.')[0]) + + Why is that? The application will work even with `__name__`, thanks + to how resources are looked up. However it will make debugging more + painful. Certain extensions can make assumptions based on the + import name of your application. For example the Flask-SQLAlchemy + extension will look for the code in your application that triggered + an SQL query in debug mode. If the import name is not properly set + up, that debugging information is lost. (For example it would only + pick up SQL queries in `yourapplication.app` and not + `yourapplication.views.frontend`) + + .. versionadded:: 0.7 + The `static_url_path`, `static_folder`, and `template_folder` + parameters were added. + + .. versionadded:: 0.8 + The `instance_path` and `instance_relative_config` parameters were + added. + + .. versionadded:: 0.11 + The `root_path` parameter was added. + + .. versionadded:: 1.0 + The ``host_matching`` and ``static_host`` parameters were added. + + .. versionadded:: 1.0 + The ``subdomain_matching`` parameter was added. Subdomain + matching needs to be enabled manually now. Setting + :data:`SERVER_NAME` does not implicitly enable it. + + :param import_name: the name of the application package + :param static_url_path: can be used to specify a different path for the + static files on the web. Defaults to the name + of the `static_folder` folder. + :param static_folder: The folder with static files that is served at + ``static_url_path``. Relative to the application ``root_path`` + or an absolute path. Defaults to ``'static'``. + :param static_host: the host to use when adding the static route. + Defaults to None. Required when using ``host_matching=True`` + with a ``static_folder`` configured. + :param host_matching: set ``url_map.host_matching`` attribute. + Defaults to False. + :param subdomain_matching: consider the subdomain relative to + :data:`SERVER_NAME` when matching routes. Defaults to False. + :param template_folder: the folder that contains the templates that should + be used by the application. Defaults to + ``'templates'`` folder in the root path of the + application. + :param instance_path: An alternative instance path for the application. + By default the folder ``'instance'`` next to the + package or module is assumed to be the instance + path. + :param instance_relative_config: if set to ``True`` relative filenames + for loading the config are assumed to + be relative to the instance path instead + of the application root. + :param root_path: The path to the root of the application files. + This should only be set manually when it can't be detected + automatically, such as for namespace packages. + """ + + #: The class of the object assigned to :attr:`aborter`, created by + #: :meth:`create_aborter`. That object is called by + #: :func:`flask.abort` to raise HTTP errors, and can be + #: called directly as well. + #: + #: Defaults to :class:`werkzeug.exceptions.Aborter`. + #: + #: .. versionadded:: 2.2 + aborter_class = Aborter + + #: The class that is used for the Jinja environment. + #: + #: .. versionadded:: 0.11 + jinja_environment = Environment + + #: The class that is used for the :data:`~flask.g` instance. + #: + #: Example use cases for a custom class: + #: + #: 1. Store arbitrary attributes on flask.g. + #: 2. Add a property for lazy per-request database connectors. + #: 3. Return None instead of AttributeError on unexpected attributes. + #: 4. Raise exception if an unexpected attr is set, a "controlled" flask.g. + #: + #: In Flask 0.9 this property was called `request_globals_class` but it + #: was changed in 0.10 to :attr:`app_ctx_globals_class` because the + #: flask.g object is now application context scoped. + #: + #: .. versionadded:: 0.10 + app_ctx_globals_class = _AppCtxGlobals + + #: The class that is used for the ``config`` attribute of this app. + #: Defaults to :class:`~flask.Config`. + #: + #: Example use cases for a custom class: + #: + #: 1. Default values for certain config options. + #: 2. Access to config values through attributes in addition to keys. + #: + #: .. versionadded:: 0.11 + config_class = Config + + #: The testing flag. Set this to ``True`` to enable the test mode of + #: Flask extensions (and in the future probably also Flask itself). + #: For example this might activate test helpers that have an + #: additional runtime cost which should not be enabled by default. + #: + #: If this is enabled and PROPAGATE_EXCEPTIONS is not changed from the + #: default it's implicitly enabled. + #: + #: This attribute can also be configured from the config with the + #: ``TESTING`` configuration key. Defaults to ``False``. + testing = ConfigAttribute("TESTING") + + #: If a secret key is set, cryptographic components can use this to + #: sign cookies and other things. Set this to a complex random value + #: when you want to use the secure cookie for instance. + #: + #: This attribute can also be configured from the config with the + #: :data:`SECRET_KEY` configuration key. Defaults to ``None``. + secret_key = ConfigAttribute("SECRET_KEY") + + #: A :class:`~datetime.timedelta` which is used to set the expiration + #: date of a permanent session. The default is 31 days which makes a + #: permanent session survive for roughly one month. + #: + #: This attribute can also be configured from the config with the + #: ``PERMANENT_SESSION_LIFETIME`` configuration key. Defaults to + #: ``timedelta(days=31)`` + permanent_session_lifetime = ConfigAttribute( + "PERMANENT_SESSION_LIFETIME", get_converter=_make_timedelta + ) + + json_provider_class: type[JSONProvider] = DefaultJSONProvider + """A subclass of :class:`~flask.json.provider.JSONProvider`. An + instance is created and assigned to :attr:`app.json` when creating + the app. + + The default, :class:`~flask.json.provider.DefaultJSONProvider`, uses + Python's built-in :mod:`json` library. A different provider can use + a different JSON library. + + .. versionadded:: 2.2 + """ + + #: Options that are passed to the Jinja environment in + #: :meth:`create_jinja_environment`. Changing these options after + #: the environment is created (accessing :attr:`jinja_env`) will + #: have no effect. + #: + #: .. versionchanged:: 1.1.0 + #: This is a ``dict`` instead of an ``ImmutableDict`` to allow + #: easier configuration. + #: + jinja_options: dict = {} + + #: The rule object to use for URL rules created. This is used by + #: :meth:`add_url_rule`. Defaults to :class:`werkzeug.routing.Rule`. + #: + #: .. versionadded:: 0.7 + url_rule_class = Rule + + #: The map object to use for storing the URL rules and routing + #: configuration parameters. Defaults to :class:`werkzeug.routing.Map`. + #: + #: .. versionadded:: 1.1.0 + url_map_class = Map + + #: The :meth:`test_client` method creates an instance of this test + #: client class. Defaults to :class:`~flask.testing.FlaskClient`. + #: + #: .. versionadded:: 0.7 + test_client_class: type[FlaskClient] | None = None + + #: The :class:`~click.testing.CliRunner` subclass, by default + #: :class:`~flask.testing.FlaskCliRunner` that is used by + #: :meth:`test_cli_runner`. Its ``__init__`` method should take a + #: Flask app object as the first argument. + #: + #: .. versionadded:: 1.0 + test_cli_runner_class: type[FlaskCliRunner] | None = None + + default_config: dict + response_class: type[Response] + + def __init__( + self, + import_name: str, + static_url_path: str | None = None, + static_folder: str | os.PathLike | None = "static", + static_host: str | None = None, + host_matching: bool = False, + subdomain_matching: bool = False, + template_folder: str | os.PathLike | None = "templates", + instance_path: str | None = None, + instance_relative_config: bool = False, + root_path: str | None = None, + ): + super().__init__( + import_name=import_name, + static_folder=static_folder, + static_url_path=static_url_path, + template_folder=template_folder, + root_path=root_path, + ) + + if instance_path is None: + instance_path = self.auto_find_instance_path() + elif not os.path.isabs(instance_path): + raise ValueError( + "If an instance path is provided it must be absolute." + " A relative path was given instead." + ) + + #: Holds the path to the instance folder. + #: + #: .. versionadded:: 0.8 + self.instance_path = instance_path + + #: The configuration dictionary as :class:`Config`. This behaves + #: exactly like a regular dictionary but supports additional methods + #: to load a config from files. + self.config = self.make_config(instance_relative_config) + + #: An instance of :attr:`aborter_class` created by + #: :meth:`make_aborter`. This is called by :func:`flask.abort` + #: to raise HTTP errors, and can be called directly as well. + #: + #: .. versionadded:: 2.2 + #: Moved from ``flask.abort``, which calls this object. + self.aborter = self.make_aborter() + + self.json: JSONProvider = self.json_provider_class(self) + """Provides access to JSON methods. Functions in ``flask.json`` + will call methods on this provider when the application context + is active. Used for handling JSON requests and responses. + + An instance of :attr:`json_provider_class`. Can be customized by + changing that attribute on a subclass, or by assigning to this + attribute afterwards. + + The default, :class:`~flask.json.provider.DefaultJSONProvider`, + uses Python's built-in :mod:`json` library. A different provider + can use a different JSON library. + + .. versionadded:: 2.2 + """ + + #: A list of functions that are called by + #: :meth:`handle_url_build_error` when :meth:`.url_for` raises a + #: :exc:`~werkzeug.routing.BuildError`. Each function is called + #: with ``error``, ``endpoint`` and ``values``. If a function + #: returns ``None`` or raises a ``BuildError``, it is skipped. + #: Otherwise, its return value is returned by ``url_for``. + #: + #: .. versionadded:: 0.9 + self.url_build_error_handlers: list[ + t.Callable[[Exception, str, dict[str, t.Any]], str] + ] = [] + + #: A list of functions that are called when the application context + #: is destroyed. Since the application context is also torn down + #: if the request ends this is the place to store code that disconnects + #: from databases. + #: + #: .. versionadded:: 0.9 + self.teardown_appcontext_funcs: list[ft.TeardownCallable] = [] + + #: A list of shell context processor functions that should be run + #: when a shell context is created. + #: + #: .. versionadded:: 0.11 + self.shell_context_processors: list[ft.ShellContextProcessorCallable] = [] + + #: Maps registered blueprint names to blueprint objects. The + #: dict retains the order the blueprints were registered in. + #: Blueprints can be registered multiple times, this dict does + #: not track how often they were attached. + #: + #: .. versionadded:: 0.7 + self.blueprints: dict[str, Blueprint] = {} + + #: a place where extensions can store application specific state. For + #: example this is where an extension could store database engines and + #: similar things. + #: + #: The key must match the name of the extension module. For example in + #: case of a "Flask-Foo" extension in `flask_foo`, the key would be + #: ``'foo'``. + #: + #: .. versionadded:: 0.7 + self.extensions: dict = {} + + #: The :class:`~werkzeug.routing.Map` for this instance. You can use + #: this to change the routing converters after the class was created + #: but before any routes are connected. Example:: + #: + #: from werkzeug.routing import BaseConverter + #: + #: class ListConverter(BaseConverter): + #: def to_python(self, value): + #: return value.split(',') + #: def to_url(self, values): + #: return ','.join(super(ListConverter, self).to_url(value) + #: for value in values) + #: + #: app = Flask(__name__) + #: app.url_map.converters['list'] = ListConverter + self.url_map = self.url_map_class(host_matching=host_matching) + + self.subdomain_matching = subdomain_matching + + # tracks internally if the application already handled at least one + # request. + self._got_first_request = False + + # Set the name of the Click group in case someone wants to add + # the app's commands to another CLI tool. + self.cli.name = self.name + + def _check_setup_finished(self, f_name: str) -> None: + if self._got_first_request: + raise AssertionError( + f"The setup method '{f_name}' can no longer be called" + " on the application. It has already handled its first" + " request, any changes will not be applied" + " consistently.\n" + "Make sure all imports, decorators, functions, etc." + " needed to set up the application are done before" + " running it." + ) + + @cached_property + def name(self) -> str: # type: ignore + """The name of the application. This is usually the import name + with the difference that it's guessed from the run file if the + import name is main. This name is used as a display name when + Flask needs the name of the application. It can be set and overridden + to change the value. + + .. versionadded:: 0.8 + """ + if self.import_name == "__main__": + fn = getattr(sys.modules["__main__"], "__file__", None) + if fn is None: + return "__main__" + return os.path.splitext(os.path.basename(fn))[0] + return self.import_name + + @cached_property + def logger(self) -> logging.Logger: + """A standard Python :class:`~logging.Logger` for the app, with + the same name as :attr:`name`. + + In debug mode, the logger's :attr:`~logging.Logger.level` will + be set to :data:`~logging.DEBUG`. + + If there are no handlers configured, a default handler will be + added. See :doc:`/logging` for more information. + + .. versionchanged:: 1.1.0 + The logger takes the same name as :attr:`name` rather than + hard-coding ``"flask.app"``. + + .. versionchanged:: 1.0.0 + Behavior was simplified. The logger is always named + ``"flask.app"``. The level is only set during configuration, + it doesn't check ``app.debug`` each time. Only one format is + used, not different ones depending on ``app.debug``. No + handlers are removed, and a handler is only added if no + handlers are already configured. + + .. versionadded:: 0.3 + """ + return create_logger(self) + + @cached_property + def jinja_env(self) -> Environment: + """The Jinja environment used to load templates. + + The environment is created the first time this property is + accessed. Changing :attr:`jinja_options` after that will have no + effect. + """ + return self.create_jinja_environment() + + def create_jinja_environment(self) -> Environment: + raise NotImplementedError() + + def make_config(self, instance_relative: bool = False) -> Config: + """Used to create the config attribute by the Flask constructor. + The `instance_relative` parameter is passed in from the constructor + of Flask (there named `instance_relative_config`) and indicates if + the config should be relative to the instance path or the root path + of the application. + + .. versionadded:: 0.8 + """ + root_path = self.root_path + if instance_relative: + root_path = self.instance_path + defaults = dict(self.default_config) + defaults["DEBUG"] = get_debug_flag() + return self.config_class(root_path, defaults) + + def make_aborter(self) -> Aborter: + """Create the object to assign to :attr:`aborter`. That object + is called by :func:`flask.abort` to raise HTTP errors, and can + be called directly as well. + + By default, this creates an instance of :attr:`aborter_class`, + which defaults to :class:`werkzeug.exceptions.Aborter`. + + .. versionadded:: 2.2 + """ + return self.aborter_class() + + def auto_find_instance_path(self) -> str: + """Tries to locate the instance path if it was not provided to the + constructor of the application class. It will basically calculate + the path to a folder named ``instance`` next to your main file or + the package. + + .. versionadded:: 0.8 + """ + prefix, package_path = find_package(self.import_name) + if prefix is None: + return os.path.join(package_path, "instance") + return os.path.join(prefix, "var", f"{self.name}-instance") + + def create_global_jinja_loader(self) -> DispatchingJinjaLoader: + """Creates the loader for the Jinja2 environment. Can be used to + override just the loader and keeping the rest unchanged. It's + discouraged to override this function. Instead one should override + the :meth:`jinja_loader` function instead. + + The global loader dispatches between the loaders of the application + and the individual blueprints. + + .. versionadded:: 0.7 + """ + return DispatchingJinjaLoader(self) + + def select_jinja_autoescape(self, filename: str) -> bool: + """Returns ``True`` if autoescaping should be active for the given + template name. If no template name is given, returns `True`. + + .. versionchanged:: 2.2 + Autoescaping is now enabled by default for ``.svg`` files. + + .. versionadded:: 0.5 + """ + if filename is None: + return True + return filename.endswith((".html", ".htm", ".xml", ".xhtml", ".svg")) + + @property + def debug(self) -> bool: + """Whether debug mode is enabled. When using ``flask run`` to start the + development server, an interactive debugger will be shown for unhandled + exceptions, and the server will be reloaded when code changes. This maps to the + :data:`DEBUG` config key. It may not behave as expected if set late. + + **Do not enable debug mode when deploying in production.** + + Default: ``False`` + """ + return self.config["DEBUG"] + + @debug.setter + def debug(self, value: bool) -> None: + self.config["DEBUG"] = value + + if self.config["TEMPLATES_AUTO_RELOAD"] is None: + self.jinja_env.auto_reload = value + + @setupmethod + def register_blueprint(self, blueprint: Blueprint, **options: t.Any) -> None: + """Register a :class:`~flask.Blueprint` on the application. Keyword + arguments passed to this method will override the defaults set on the + blueprint. + + Calls the blueprint's :meth:`~flask.Blueprint.register` method after + recording the blueprint in the application's :attr:`blueprints`. + + :param blueprint: The blueprint to register. + :param url_prefix: Blueprint routes will be prefixed with this. + :param subdomain: Blueprint routes will match on this subdomain. + :param url_defaults: Blueprint routes will use these default values for + view arguments. + :param options: Additional keyword arguments are passed to + :class:`~flask.blueprints.BlueprintSetupState`. They can be + accessed in :meth:`~flask.Blueprint.record` callbacks. + + .. versionchanged:: 2.0.1 + The ``name`` option can be used to change the (pre-dotted) + name the blueprint is registered with. This allows the same + blueprint to be registered multiple times with unique names + for ``url_for``. + + .. versionadded:: 0.7 + """ + blueprint.register(self, options) + + def iter_blueprints(self) -> t.ValuesView[Blueprint]: + """Iterates over all blueprints by the order they were registered. + + .. versionadded:: 0.11 + """ + return self.blueprints.values() + + @setupmethod + def add_url_rule( + self, + rule: str, + endpoint: str | None = None, + view_func: ft.RouteCallable | None = None, + provide_automatic_options: bool | None = None, + **options: t.Any, + ) -> None: + if endpoint is None: + endpoint = _endpoint_from_view_func(view_func) # type: ignore + options["endpoint"] = endpoint + methods = options.pop("methods", None) + + # if the methods are not given and the view_func object knows its + # methods we can use that instead. If neither exists, we go with + # a tuple of only ``GET`` as default. + if methods is None: + methods = getattr(view_func, "methods", None) or ("GET",) + if isinstance(methods, str): + raise TypeError( + "Allowed methods must be a list of strings, for" + ' example: @app.route(..., methods=["POST"])' + ) + methods = {item.upper() for item in methods} + + # Methods that should always be added + required_methods = set(getattr(view_func, "required_methods", ())) + + # starting with Flask 0.8 the view_func object can disable and + # force-enable the automatic options handling. + if provide_automatic_options is None: + provide_automatic_options = getattr( + view_func, "provide_automatic_options", None + ) + + if provide_automatic_options is None: + if "OPTIONS" not in methods: + provide_automatic_options = True + required_methods.add("OPTIONS") + else: + provide_automatic_options = False + + # Add the required methods now. + methods |= required_methods + + rule = self.url_rule_class(rule, methods=methods, **options) + rule.provide_automatic_options = provide_automatic_options # type: ignore + + self.url_map.add(rule) + if view_func is not None: + old_func = self.view_functions.get(endpoint) + if old_func is not None and old_func != view_func: + raise AssertionError( + "View function mapping is overwriting an existing" + f" endpoint function: {endpoint}" + ) + self.view_functions[endpoint] = view_func + + @setupmethod + def template_filter( + self, name: str | None = None + ) -> t.Callable[[T_template_filter], T_template_filter]: + """A decorator that is used to register custom template filter. + You can specify a name for the filter, otherwise the function + name will be used. Example:: + + @app.template_filter() + def reverse(s): + return s[::-1] + + :param name: the optional name of the filter, otherwise the + function name will be used. + """ + + def decorator(f: T_template_filter) -> T_template_filter: + self.add_template_filter(f, name=name) + return f + + return decorator + + @setupmethod + def add_template_filter( + self, f: ft.TemplateFilterCallable, name: str | None = None + ) -> None: + """Register a custom template filter. Works exactly like the + :meth:`template_filter` decorator. + + :param name: the optional name of the filter, otherwise the + function name will be used. + """ + self.jinja_env.filters[name or f.__name__] = f + + @setupmethod + def template_test( + self, name: str | None = None + ) -> t.Callable[[T_template_test], T_template_test]: + """A decorator that is used to register custom template test. + You can specify a name for the test, otherwise the function + name will be used. Example:: + + @app.template_test() + def is_prime(n): + if n == 2: + return True + for i in range(2, int(math.ceil(math.sqrt(n))) + 1): + if n % i == 0: + return False + return True + + .. versionadded:: 0.10 + + :param name: the optional name of the test, otherwise the + function name will be used. + """ + + def decorator(f: T_template_test) -> T_template_test: + self.add_template_test(f, name=name) + return f + + return decorator + + @setupmethod + def add_template_test( + self, f: ft.TemplateTestCallable, name: str | None = None + ) -> None: + """Register a custom template test. Works exactly like the + :meth:`template_test` decorator. + + .. versionadded:: 0.10 + + :param name: the optional name of the test, otherwise the + function name will be used. + """ + self.jinja_env.tests[name or f.__name__] = f + + @setupmethod + def template_global( + self, name: str | None = None + ) -> t.Callable[[T_template_global], T_template_global]: + """A decorator that is used to register a custom template global function. + You can specify a name for the global function, otherwise the function + name will be used. Example:: + + @app.template_global() + def double(n): + return 2 * n + + .. versionadded:: 0.10 + + :param name: the optional name of the global function, otherwise the + function name will be used. + """ + + def decorator(f: T_template_global) -> T_template_global: + self.add_template_global(f, name=name) + return f + + return decorator + + @setupmethod + def add_template_global( + self, f: ft.TemplateGlobalCallable, name: str | None = None + ) -> None: + """Register a custom template global function. Works exactly like the + :meth:`template_global` decorator. + + .. versionadded:: 0.10 + + :param name: the optional name of the global function, otherwise the + function name will be used. + """ + self.jinja_env.globals[name or f.__name__] = f + + @setupmethod + def teardown_appcontext(self, f: T_teardown) -> T_teardown: + """Registers a function to be called when the application + context is popped. The application context is typically popped + after the request context for each request, at the end of CLI + commands, or after a manually pushed context ends. + + .. code-block:: python + + with app.app_context(): + ... + + When the ``with`` block exits (or ``ctx.pop()`` is called), the + teardown functions are called just before the app context is + made inactive. Since a request context typically also manages an + application context it would also be called when you pop a + request context. + + When a teardown function was called because of an unhandled + exception it will be passed an error object. If an + :meth:`errorhandler` is registered, it will handle the exception + and the teardown will not receive it. + + Teardown functions must avoid raising exceptions. If they + execute code that might fail they must surround that code with a + ``try``/``except`` block and log any errors. + + The return values of teardown functions are ignored. + + .. versionadded:: 0.9 + """ + self.teardown_appcontext_funcs.append(f) + return f + + @setupmethod + def shell_context_processor( + self, f: T_shell_context_processor + ) -> T_shell_context_processor: + """Registers a shell context processor function. + + .. versionadded:: 0.11 + """ + self.shell_context_processors.append(f) + return f + + def _find_error_handler( + self, e: Exception, blueprints: list[str] + ) -> ft.ErrorHandlerCallable | None: + """Return a registered error handler for an exception in this order: + blueprint handler for a specific code, app handler for a specific code, + blueprint handler for an exception class, app handler for an exception + class, or ``None`` if a suitable handler is not found. + """ + exc_class, code = self._get_exc_class_and_code(type(e)) + names = (*blueprints, None) + + for c in (code, None) if code is not None else (None,): + for name in names: + handler_map = self.error_handler_spec[name][c] + + if not handler_map: + continue + + for cls in exc_class.__mro__: + handler = handler_map.get(cls) + + if handler is not None: + return handler + return None + + def trap_http_exception(self, e: Exception) -> bool: + """Checks if an HTTP exception should be trapped or not. By default + this will return ``False`` for all exceptions except for a bad request + key error if ``TRAP_BAD_REQUEST_ERRORS`` is set to ``True``. It + also returns ``True`` if ``TRAP_HTTP_EXCEPTIONS`` is set to ``True``. + + This is called for all HTTP exceptions raised by a view function. + If it returns ``True`` for any exception the error handler for this + exception is not called and it shows up as regular exception in the + traceback. This is helpful for debugging implicitly raised HTTP + exceptions. + + .. versionchanged:: 1.0 + Bad request errors are not trapped by default in debug mode. + + .. versionadded:: 0.8 + """ + if self.config["TRAP_HTTP_EXCEPTIONS"]: + return True + + trap_bad_request = self.config["TRAP_BAD_REQUEST_ERRORS"] + + # if unset, trap key errors in debug mode + if ( + trap_bad_request is None + and self.debug + and isinstance(e, BadRequestKeyError) + ): + return True + + if trap_bad_request: + return isinstance(e, BadRequest) + + return False + + def should_ignore_error(self, error: BaseException | None) -> bool: + """This is called to figure out if an error should be ignored + or not as far as the teardown system is concerned. If this + function returns ``True`` then the teardown handlers will not be + passed the error. + + .. versionadded:: 0.10 + """ + return False + + def redirect(self, location: str, code: int = 302) -> BaseResponse: + """Create a redirect response object. + + This is called by :func:`flask.redirect`, and can be called + directly as well. + + :param location: The URL to redirect to. + :param code: The status code for the redirect. + + .. versionadded:: 2.2 + Moved from ``flask.redirect``, which calls this method. + """ + return _wz_redirect( + location, code=code, Response=self.response_class # type: ignore[arg-type] + ) + + def inject_url_defaults(self, endpoint: str, values: dict) -> None: + """Injects the URL defaults for the given endpoint directly into + the values dictionary passed. This is used internally and + automatically called on URL building. + + .. versionadded:: 0.7 + """ + names: t.Iterable[str | None] = (None,) + + # url_for may be called outside a request context, parse the + # passed endpoint instead of using request.blueprints. + if "." in endpoint: + names = chain( + names, reversed(_split_blueprint_path(endpoint.rpartition(".")[0])) + ) + + for name in names: + if name in self.url_default_functions: + for func in self.url_default_functions[name]: + func(endpoint, values) + + def handle_url_build_error( + self, error: BuildError, endpoint: str, values: dict[str, t.Any] + ) -> str: + """Called by :meth:`.url_for` if a + :exc:`~werkzeug.routing.BuildError` was raised. If this returns + a value, it will be returned by ``url_for``, otherwise the error + will be re-raised. + + Each function in :attr:`url_build_error_handlers` is called with + ``error``, ``endpoint`` and ``values``. If a function returns + ``None`` or raises a ``BuildError``, it is skipped. Otherwise, + its return value is returned by ``url_for``. + + :param error: The active ``BuildError`` being handled. + :param endpoint: The endpoint being built. + :param values: The keyword arguments passed to ``url_for``. + """ + for handler in self.url_build_error_handlers: + try: + rv = handler(error, endpoint, values) + except BuildError as e: + # make error available outside except block + error = e + else: + if rv is not None: + return rv + + # Re-raise if called with an active exception, otherwise raise + # the passed in exception. + if error is sys.exc_info()[1]: + raise + + raise error diff --git a/venv/lib/python3.12/site-packages/flask/sansio/blueprints.py b/venv/lib/python3.12/site-packages/flask/sansio/blueprints.py new file mode 100644 index 0000000..38c92f4 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/sansio/blueprints.py @@ -0,0 +1,626 @@ +from __future__ import annotations + +import os +import typing as t +from collections import defaultdict +from functools import update_wrapper + +from .. import typing as ft +from .scaffold import _endpoint_from_view_func +from .scaffold import _sentinel +from .scaffold import Scaffold +from .scaffold import setupmethod + +if t.TYPE_CHECKING: # pragma: no cover + from .app import App + +DeferredSetupFunction = t.Callable[["BlueprintSetupState"], t.Callable] +T_after_request = t.TypeVar("T_after_request", bound=ft.AfterRequestCallable) +T_before_request = t.TypeVar("T_before_request", bound=ft.BeforeRequestCallable) +T_error_handler = t.TypeVar("T_error_handler", bound=ft.ErrorHandlerCallable) +T_teardown = t.TypeVar("T_teardown", bound=ft.TeardownCallable) +T_template_context_processor = t.TypeVar( + "T_template_context_processor", bound=ft.TemplateContextProcessorCallable +) +T_template_filter = t.TypeVar("T_template_filter", bound=ft.TemplateFilterCallable) +T_template_global = t.TypeVar("T_template_global", bound=ft.TemplateGlobalCallable) +T_template_test = t.TypeVar("T_template_test", bound=ft.TemplateTestCallable) +T_url_defaults = t.TypeVar("T_url_defaults", bound=ft.URLDefaultCallable) +T_url_value_preprocessor = t.TypeVar( + "T_url_value_preprocessor", bound=ft.URLValuePreprocessorCallable +) + + +class BlueprintSetupState: + """Temporary holder object for registering a blueprint with the + application. An instance of this class is created by the + :meth:`~flask.Blueprint.make_setup_state` method and later passed + to all register callback functions. + """ + + def __init__( + self, + blueprint: Blueprint, + app: App, + options: t.Any, + first_registration: bool, + ) -> None: + #: a reference to the current application + self.app = app + + #: a reference to the blueprint that created this setup state. + self.blueprint = blueprint + + #: a dictionary with all options that were passed to the + #: :meth:`~flask.Flask.register_blueprint` method. + self.options = options + + #: as blueprints can be registered multiple times with the + #: application and not everything wants to be registered + #: multiple times on it, this attribute can be used to figure + #: out if the blueprint was registered in the past already. + self.first_registration = first_registration + + subdomain = self.options.get("subdomain") + if subdomain is None: + subdomain = self.blueprint.subdomain + + #: The subdomain that the blueprint should be active for, ``None`` + #: otherwise. + self.subdomain = subdomain + + url_prefix = self.options.get("url_prefix") + if url_prefix is None: + url_prefix = self.blueprint.url_prefix + #: The prefix that should be used for all URLs defined on the + #: blueprint. + self.url_prefix = url_prefix + + self.name = self.options.get("name", blueprint.name) + self.name_prefix = self.options.get("name_prefix", "") + + #: A dictionary with URL defaults that is added to each and every + #: URL that was defined with the blueprint. + self.url_defaults = dict(self.blueprint.url_values_defaults) + self.url_defaults.update(self.options.get("url_defaults", ())) + + def add_url_rule( + self, + rule: str, + endpoint: str | None = None, + view_func: t.Callable | None = None, + **options: t.Any, + ) -> None: + """A helper method to register a rule (and optionally a view function) + to the application. The endpoint is automatically prefixed with the + blueprint's name. + """ + if self.url_prefix is not None: + if rule: + rule = "/".join((self.url_prefix.rstrip("/"), rule.lstrip("/"))) + else: + rule = self.url_prefix + options.setdefault("subdomain", self.subdomain) + if endpoint is None: + endpoint = _endpoint_from_view_func(view_func) # type: ignore + defaults = self.url_defaults + if "defaults" in options: + defaults = dict(defaults, **options.pop("defaults")) + + self.app.add_url_rule( + rule, + f"{self.name_prefix}.{self.name}.{endpoint}".lstrip("."), + view_func, + defaults=defaults, + **options, + ) + + +class Blueprint(Scaffold): + """Represents a blueprint, a collection of routes and other + app-related functions that can be registered on a real application + later. + + A blueprint is an object that allows defining application functions + without requiring an application object ahead of time. It uses the + same decorators as :class:`~flask.Flask`, but defers the need for an + application by recording them for later registration. + + Decorating a function with a blueprint creates a deferred function + that is called with :class:`~flask.blueprints.BlueprintSetupState` + when the blueprint is registered on an application. + + See :doc:`/blueprints` for more information. + + :param name: The name of the blueprint. Will be prepended to each + endpoint name. + :param import_name: The name of the blueprint package, usually + ``__name__``. This helps locate the ``root_path`` for the + blueprint. + :param static_folder: A folder with static files that should be + served by the blueprint's static route. The path is relative to + the blueprint's root path. Blueprint static files are disabled + by default. + :param static_url_path: The url to serve static files from. + Defaults to ``static_folder``. If the blueprint does not have + a ``url_prefix``, the app's static route will take precedence, + and the blueprint's static files won't be accessible. + :param template_folder: A folder with templates that should be added + to the app's template search path. The path is relative to the + blueprint's root path. Blueprint templates are disabled by + default. Blueprint templates have a lower precedence than those + in the app's templates folder. + :param url_prefix: A path to prepend to all of the blueprint's URLs, + to make them distinct from the rest of the app's routes. + :param subdomain: A subdomain that blueprint routes will match on by + default. + :param url_defaults: A dict of default values that blueprint routes + will receive by default. + :param root_path: By default, the blueprint will automatically set + this based on ``import_name``. In certain situations this + automatic detection can fail, so the path can be specified + manually instead. + + .. versionchanged:: 1.1.0 + Blueprints have a ``cli`` group to register nested CLI commands. + The ``cli_group`` parameter controls the name of the group under + the ``flask`` command. + + .. versionadded:: 0.7 + """ + + _got_registered_once = False + + def __init__( + self, + name: str, + import_name: str, + static_folder: str | os.PathLike | None = None, + static_url_path: str | None = None, + template_folder: str | os.PathLike | None = None, + url_prefix: str | None = None, + subdomain: str | None = None, + url_defaults: dict | None = None, + root_path: str | None = None, + cli_group: str | None = _sentinel, # type: ignore + ): + super().__init__( + import_name=import_name, + static_folder=static_folder, + static_url_path=static_url_path, + template_folder=template_folder, + root_path=root_path, + ) + + if not name: + raise ValueError("'name' may not be empty.") + + if "." in name: + raise ValueError("'name' may not contain a dot '.' character.") + + self.name = name + self.url_prefix = url_prefix + self.subdomain = subdomain + self.deferred_functions: list[DeferredSetupFunction] = [] + + if url_defaults is None: + url_defaults = {} + + self.url_values_defaults = url_defaults + self.cli_group = cli_group + self._blueprints: list[tuple[Blueprint, dict]] = [] + + def _check_setup_finished(self, f_name: str) -> None: + if self._got_registered_once: + raise AssertionError( + f"The setup method '{f_name}' can no longer be called on the blueprint" + f" '{self.name}'. It has already been registered at least once, any" + " changes will not be applied consistently.\n" + "Make sure all imports, decorators, functions, etc. needed to set up" + " the blueprint are done before registering it." + ) + + @setupmethod + def record(self, func: t.Callable) -> None: + """Registers a function that is called when the blueprint is + registered on the application. This function is called with the + state as argument as returned by the :meth:`make_setup_state` + method. + """ + self.deferred_functions.append(func) + + @setupmethod + def record_once(self, func: t.Callable) -> None: + """Works like :meth:`record` but wraps the function in another + function that will ensure the function is only called once. If the + blueprint is registered a second time on the application, the + function passed is not called. + """ + + def wrapper(state: BlueprintSetupState) -> None: + if state.first_registration: + func(state) + + self.record(update_wrapper(wrapper, func)) + + def make_setup_state( + self, app: App, options: dict, first_registration: bool = False + ) -> BlueprintSetupState: + """Creates an instance of :meth:`~flask.blueprints.BlueprintSetupState` + object that is later passed to the register callback functions. + Subclasses can override this to return a subclass of the setup state. + """ + return BlueprintSetupState(self, app, options, first_registration) + + @setupmethod + def register_blueprint(self, blueprint: Blueprint, **options: t.Any) -> None: + """Register a :class:`~flask.Blueprint` on this blueprint. Keyword + arguments passed to this method will override the defaults set + on the blueprint. + + .. versionchanged:: 2.0.1 + The ``name`` option can be used to change the (pre-dotted) + name the blueprint is registered with. This allows the same + blueprint to be registered multiple times with unique names + for ``url_for``. + + .. versionadded:: 2.0 + """ + if blueprint is self: + raise ValueError("Cannot register a blueprint on itself") + self._blueprints.append((blueprint, options)) + + def register(self, app: App, options: dict) -> None: + """Called by :meth:`Flask.register_blueprint` to register all + views and callbacks registered on the blueprint with the + application. Creates a :class:`.BlueprintSetupState` and calls + each :meth:`record` callback with it. + + :param app: The application this blueprint is being registered + with. + :param options: Keyword arguments forwarded from + :meth:`~Flask.register_blueprint`. + + .. versionchanged:: 2.3 + Nested blueprints now correctly apply subdomains. + + .. versionchanged:: 2.1 + Registering the same blueprint with the same name multiple + times is an error. + + .. versionchanged:: 2.0.1 + Nested blueprints are registered with their dotted name. + This allows different blueprints with the same name to be + nested at different locations. + + .. versionchanged:: 2.0.1 + The ``name`` option can be used to change the (pre-dotted) + name the blueprint is registered with. This allows the same + blueprint to be registered multiple times with unique names + for ``url_for``. + """ + name_prefix = options.get("name_prefix", "") + self_name = options.get("name", self.name) + name = f"{name_prefix}.{self_name}".lstrip(".") + + if name in app.blueprints: + bp_desc = "this" if app.blueprints[name] is self else "a different" + existing_at = f" '{name}'" if self_name != name else "" + + raise ValueError( + f"The name '{self_name}' is already registered for" + f" {bp_desc} blueprint{existing_at}. Use 'name=' to" + f" provide a unique name." + ) + + first_bp_registration = not any(bp is self for bp in app.blueprints.values()) + first_name_registration = name not in app.blueprints + + app.blueprints[name] = self + self._got_registered_once = True + state = self.make_setup_state(app, options, first_bp_registration) + + if self.has_static_folder: + state.add_url_rule( + f"{self.static_url_path}/", + view_func=self.send_static_file, # type: ignore[attr-defined] + endpoint="static", + ) + + # Merge blueprint data into parent. + if first_bp_registration or first_name_registration: + self._merge_blueprint_funcs(app, name) + + for deferred in self.deferred_functions: + deferred(state) + + cli_resolved_group = options.get("cli_group", self.cli_group) + + if self.cli.commands: + if cli_resolved_group is None: + app.cli.commands.update(self.cli.commands) + elif cli_resolved_group is _sentinel: + self.cli.name = name + app.cli.add_command(self.cli) + else: + self.cli.name = cli_resolved_group + app.cli.add_command(self.cli) + + for blueprint, bp_options in self._blueprints: + bp_options = bp_options.copy() + bp_url_prefix = bp_options.get("url_prefix") + bp_subdomain = bp_options.get("subdomain") + + if bp_subdomain is None: + bp_subdomain = blueprint.subdomain + + if state.subdomain is not None and bp_subdomain is not None: + bp_options["subdomain"] = bp_subdomain + "." + state.subdomain + elif bp_subdomain is not None: + bp_options["subdomain"] = bp_subdomain + elif state.subdomain is not None: + bp_options["subdomain"] = state.subdomain + + if bp_url_prefix is None: + bp_url_prefix = blueprint.url_prefix + + if state.url_prefix is not None and bp_url_prefix is not None: + bp_options["url_prefix"] = ( + state.url_prefix.rstrip("/") + "/" + bp_url_prefix.lstrip("/") + ) + elif bp_url_prefix is not None: + bp_options["url_prefix"] = bp_url_prefix + elif state.url_prefix is not None: + bp_options["url_prefix"] = state.url_prefix + + bp_options["name_prefix"] = name + blueprint.register(app, bp_options) + + def _merge_blueprint_funcs(self, app: App, name: str) -> None: + def extend(bp_dict, parent_dict): + for key, values in bp_dict.items(): + key = name if key is None else f"{name}.{key}" + parent_dict[key].extend(values) + + for key, value in self.error_handler_spec.items(): + key = name if key is None else f"{name}.{key}" + value = defaultdict( + dict, + { + code: {exc_class: func for exc_class, func in code_values.items()} + for code, code_values in value.items() + }, + ) + app.error_handler_spec[key] = value + + for endpoint, func in self.view_functions.items(): + app.view_functions[endpoint] = func + + extend(self.before_request_funcs, app.before_request_funcs) + extend(self.after_request_funcs, app.after_request_funcs) + extend( + self.teardown_request_funcs, + app.teardown_request_funcs, + ) + extend(self.url_default_functions, app.url_default_functions) + extend(self.url_value_preprocessors, app.url_value_preprocessors) + extend(self.template_context_processors, app.template_context_processors) + + @setupmethod + def add_url_rule( + self, + rule: str, + endpoint: str | None = None, + view_func: ft.RouteCallable | None = None, + provide_automatic_options: bool | None = None, + **options: t.Any, + ) -> None: + """Register a URL rule with the blueprint. See :meth:`.Flask.add_url_rule` for + full documentation. + + The URL rule is prefixed with the blueprint's URL prefix. The endpoint name, + used with :func:`url_for`, is prefixed with the blueprint's name. + """ + if endpoint and "." in endpoint: + raise ValueError("'endpoint' may not contain a dot '.' character.") + + if view_func and hasattr(view_func, "__name__") and "." in view_func.__name__: + raise ValueError("'view_func' name may not contain a dot '.' character.") + + self.record( + lambda s: s.add_url_rule( + rule, + endpoint, + view_func, + provide_automatic_options=provide_automatic_options, + **options, + ) + ) + + @setupmethod + def app_template_filter( + self, name: str | None = None + ) -> t.Callable[[T_template_filter], T_template_filter]: + """Register a template filter, available in any template rendered by the + application. Equivalent to :meth:`.Flask.template_filter`. + + :param name: the optional name of the filter, otherwise the + function name will be used. + """ + + def decorator(f: T_template_filter) -> T_template_filter: + self.add_app_template_filter(f, name=name) + return f + + return decorator + + @setupmethod + def add_app_template_filter( + self, f: ft.TemplateFilterCallable, name: str | None = None + ) -> None: + """Register a template filter, available in any template rendered by the + application. Works like the :meth:`app_template_filter` decorator. Equivalent to + :meth:`.Flask.add_template_filter`. + + :param name: the optional name of the filter, otherwise the + function name will be used. + """ + + def register_template(state: BlueprintSetupState) -> None: + state.app.jinja_env.filters[name or f.__name__] = f + + self.record_once(register_template) + + @setupmethod + def app_template_test( + self, name: str | None = None + ) -> t.Callable[[T_template_test], T_template_test]: + """Register a template test, available in any template rendered by the + application. Equivalent to :meth:`.Flask.template_test`. + + .. versionadded:: 0.10 + + :param name: the optional name of the test, otherwise the + function name will be used. + """ + + def decorator(f: T_template_test) -> T_template_test: + self.add_app_template_test(f, name=name) + return f + + return decorator + + @setupmethod + def add_app_template_test( + self, f: ft.TemplateTestCallable, name: str | None = None + ) -> None: + """Register a template test, available in any template rendered by the + application. Works like the :meth:`app_template_test` decorator. Equivalent to + :meth:`.Flask.add_template_test`. + + .. versionadded:: 0.10 + + :param name: the optional name of the test, otherwise the + function name will be used. + """ + + def register_template(state: BlueprintSetupState) -> None: + state.app.jinja_env.tests[name or f.__name__] = f + + self.record_once(register_template) + + @setupmethod + def app_template_global( + self, name: str | None = None + ) -> t.Callable[[T_template_global], T_template_global]: + """Register a template global, available in any template rendered by the + application. Equivalent to :meth:`.Flask.template_global`. + + .. versionadded:: 0.10 + + :param name: the optional name of the global, otherwise the + function name will be used. + """ + + def decorator(f: T_template_global) -> T_template_global: + self.add_app_template_global(f, name=name) + return f + + return decorator + + @setupmethod + def add_app_template_global( + self, f: ft.TemplateGlobalCallable, name: str | None = None + ) -> None: + """Register a template global, available in any template rendered by the + application. Works like the :meth:`app_template_global` decorator. Equivalent to + :meth:`.Flask.add_template_global`. + + .. versionadded:: 0.10 + + :param name: the optional name of the global, otherwise the + function name will be used. + """ + + def register_template(state: BlueprintSetupState) -> None: + state.app.jinja_env.globals[name or f.__name__] = f + + self.record_once(register_template) + + @setupmethod + def before_app_request(self, f: T_before_request) -> T_before_request: + """Like :meth:`before_request`, but before every request, not only those handled + by the blueprint. Equivalent to :meth:`.Flask.before_request`. + """ + self.record_once( + lambda s: s.app.before_request_funcs.setdefault(None, []).append(f) + ) + return f + + @setupmethod + def after_app_request(self, f: T_after_request) -> T_after_request: + """Like :meth:`after_request`, but after every request, not only those handled + by the blueprint. Equivalent to :meth:`.Flask.after_request`. + """ + self.record_once( + lambda s: s.app.after_request_funcs.setdefault(None, []).append(f) + ) + return f + + @setupmethod + def teardown_app_request(self, f: T_teardown) -> T_teardown: + """Like :meth:`teardown_request`, but after every request, not only those + handled by the blueprint. Equivalent to :meth:`.Flask.teardown_request`. + """ + self.record_once( + lambda s: s.app.teardown_request_funcs.setdefault(None, []).append(f) + ) + return f + + @setupmethod + def app_context_processor( + self, f: T_template_context_processor + ) -> T_template_context_processor: + """Like :meth:`context_processor`, but for templates rendered by every view, not + only by the blueprint. Equivalent to :meth:`.Flask.context_processor`. + """ + self.record_once( + lambda s: s.app.template_context_processors.setdefault(None, []).append(f) + ) + return f + + @setupmethod + def app_errorhandler( + self, code: type[Exception] | int + ) -> t.Callable[[T_error_handler], T_error_handler]: + """Like :meth:`errorhandler`, but for every request, not only those handled by + the blueprint. Equivalent to :meth:`.Flask.errorhandler`. + """ + + def decorator(f: T_error_handler) -> T_error_handler: + self.record_once(lambda s: s.app.errorhandler(code)(f)) + return f + + return decorator + + @setupmethod + def app_url_value_preprocessor( + self, f: T_url_value_preprocessor + ) -> T_url_value_preprocessor: + """Like :meth:`url_value_preprocessor`, but for every request, not only those + handled by the blueprint. Equivalent to :meth:`.Flask.url_value_preprocessor`. + """ + self.record_once( + lambda s: s.app.url_value_preprocessors.setdefault(None, []).append(f) + ) + return f + + @setupmethod + def app_url_defaults(self, f: T_url_defaults) -> T_url_defaults: + """Like :meth:`url_defaults`, but for every request, not only those handled by + the blueprint. Equivalent to :meth:`.Flask.url_defaults`. + """ + self.record_once( + lambda s: s.app.url_default_functions.setdefault(None, []).append(f) + ) + return f diff --git a/venv/lib/python3.12/site-packages/flask/sansio/scaffold.py b/venv/lib/python3.12/site-packages/flask/sansio/scaffold.py new file mode 100644 index 0000000..a43f6fd --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/sansio/scaffold.py @@ -0,0 +1,802 @@ +from __future__ import annotations + +import importlib.util +import os +import pathlib +import sys +import typing as t +from collections import defaultdict +from functools import update_wrapper + +from jinja2 import FileSystemLoader +from werkzeug.exceptions import default_exceptions +from werkzeug.exceptions import HTTPException +from werkzeug.utils import cached_property + +from .. import typing as ft +from ..cli import AppGroup +from ..helpers import get_root_path +from ..templating import _default_template_ctx_processor + +# a singleton sentinel value for parameter defaults +_sentinel = object() + +F = t.TypeVar("F", bound=t.Callable[..., t.Any]) +T_after_request = t.TypeVar("T_after_request", bound=ft.AfterRequestCallable) +T_before_request = t.TypeVar("T_before_request", bound=ft.BeforeRequestCallable) +T_error_handler = t.TypeVar("T_error_handler", bound=ft.ErrorHandlerCallable) +T_teardown = t.TypeVar("T_teardown", bound=ft.TeardownCallable) +T_template_context_processor = t.TypeVar( + "T_template_context_processor", bound=ft.TemplateContextProcessorCallable +) +T_url_defaults = t.TypeVar("T_url_defaults", bound=ft.URLDefaultCallable) +T_url_value_preprocessor = t.TypeVar( + "T_url_value_preprocessor", bound=ft.URLValuePreprocessorCallable +) +T_route = t.TypeVar("T_route", bound=ft.RouteCallable) + + +def setupmethod(f: F) -> F: + f_name = f.__name__ + + def wrapper_func(self, *args: t.Any, **kwargs: t.Any) -> t.Any: + self._check_setup_finished(f_name) + return f(self, *args, **kwargs) + + return t.cast(F, update_wrapper(wrapper_func, f)) + + +class Scaffold: + """Common behavior shared between :class:`~flask.Flask` and + :class:`~flask.blueprints.Blueprint`. + + :param import_name: The import name of the module where this object + is defined. Usually :attr:`__name__` should be used. + :param static_folder: Path to a folder of static files to serve. + If this is set, a static route will be added. + :param static_url_path: URL prefix for the static route. + :param template_folder: Path to a folder containing template files. + for rendering. If this is set, a Jinja loader will be added. + :param root_path: The path that static, template, and resource files + are relative to. Typically not set, it is discovered based on + the ``import_name``. + + .. versionadded:: 2.0 + """ + + name: str + _static_folder: str | None = None + _static_url_path: str | None = None + + def __init__( + self, + import_name: str, + static_folder: str | os.PathLike | None = None, + static_url_path: str | None = None, + template_folder: str | os.PathLike | None = None, + root_path: str | None = None, + ): + #: The name of the package or module that this object belongs + #: to. Do not change this once it is set by the constructor. + self.import_name = import_name + + self.static_folder = static_folder # type: ignore + self.static_url_path = static_url_path + + #: The path to the templates folder, relative to + #: :attr:`root_path`, to add to the template loader. ``None`` if + #: templates should not be added. + self.template_folder = template_folder + + if root_path is None: + root_path = get_root_path(self.import_name) + + #: Absolute path to the package on the filesystem. Used to look + #: up resources contained in the package. + self.root_path = root_path + + #: The Click command group for registering CLI commands for this + #: object. The commands are available from the ``flask`` command + #: once the application has been discovered and blueprints have + #: been registered. + self.cli = AppGroup() + + #: A dictionary mapping endpoint names to view functions. + #: + #: To register a view function, use the :meth:`route` decorator. + #: + #: This data structure is internal. It should not be modified + #: directly and its format may change at any time. + self.view_functions: dict[str, t.Callable] = {} + + #: A data structure of registered error handlers, in the format + #: ``{scope: {code: {class: handler}}}``. The ``scope`` key is + #: the name of a blueprint the handlers are active for, or + #: ``None`` for all requests. The ``code`` key is the HTTP + #: status code for ``HTTPException``, or ``None`` for + #: other exceptions. The innermost dictionary maps exception + #: classes to handler functions. + #: + #: To register an error handler, use the :meth:`errorhandler` + #: decorator. + #: + #: This data structure is internal. It should not be modified + #: directly and its format may change at any time. + self.error_handler_spec: dict[ + ft.AppOrBlueprintKey, + dict[int | None, dict[type[Exception], ft.ErrorHandlerCallable]], + ] = defaultdict(lambda: defaultdict(dict)) + + #: A data structure of functions to call at the beginning of + #: each request, in the format ``{scope: [functions]}``. The + #: ``scope`` key is the name of a blueprint the functions are + #: active for, or ``None`` for all requests. + #: + #: To register a function, use the :meth:`before_request` + #: decorator. + #: + #: This data structure is internal. It should not be modified + #: directly and its format may change at any time. + self.before_request_funcs: dict[ + ft.AppOrBlueprintKey, list[ft.BeforeRequestCallable] + ] = defaultdict(list) + + #: A data structure of functions to call at the end of each + #: request, in the format ``{scope: [functions]}``. The + #: ``scope`` key is the name of a blueprint the functions are + #: active for, or ``None`` for all requests. + #: + #: To register a function, use the :meth:`after_request` + #: decorator. + #: + #: This data structure is internal. It should not be modified + #: directly and its format may change at any time. + self.after_request_funcs: dict[ + ft.AppOrBlueprintKey, list[ft.AfterRequestCallable] + ] = defaultdict(list) + + #: A data structure of functions to call at the end of each + #: request even if an exception is raised, in the format + #: ``{scope: [functions]}``. The ``scope`` key is the name of a + #: blueprint the functions are active for, or ``None`` for all + #: requests. + #: + #: To register a function, use the :meth:`teardown_request` + #: decorator. + #: + #: This data structure is internal. It should not be modified + #: directly and its format may change at any time. + self.teardown_request_funcs: dict[ + ft.AppOrBlueprintKey, list[ft.TeardownCallable] + ] = defaultdict(list) + + #: A data structure of functions to call to pass extra context + #: values when rendering templates, in the format + #: ``{scope: [functions]}``. The ``scope`` key is the name of a + #: blueprint the functions are active for, or ``None`` for all + #: requests. + #: + #: To register a function, use the :meth:`context_processor` + #: decorator. + #: + #: This data structure is internal. It should not be modified + #: directly and its format may change at any time. + self.template_context_processors: dict[ + ft.AppOrBlueprintKey, list[ft.TemplateContextProcessorCallable] + ] = defaultdict(list, {None: [_default_template_ctx_processor]}) + + #: A data structure of functions to call to modify the keyword + #: arguments passed to the view function, in the format + #: ``{scope: [functions]}``. The ``scope`` key is the name of a + #: blueprint the functions are active for, or ``None`` for all + #: requests. + #: + #: To register a function, use the + #: :meth:`url_value_preprocessor` decorator. + #: + #: This data structure is internal. It should not be modified + #: directly and its format may change at any time. + self.url_value_preprocessors: dict[ + ft.AppOrBlueprintKey, + list[ft.URLValuePreprocessorCallable], + ] = defaultdict(list) + + #: A data structure of functions to call to modify the keyword + #: arguments when generating URLs, in the format + #: ``{scope: [functions]}``. The ``scope`` key is the name of a + #: blueprint the functions are active for, or ``None`` for all + #: requests. + #: + #: To register a function, use the :meth:`url_defaults` + #: decorator. + #: + #: This data structure is internal. It should not be modified + #: directly and its format may change at any time. + self.url_default_functions: dict[ + ft.AppOrBlueprintKey, list[ft.URLDefaultCallable] + ] = defaultdict(list) + + def __repr__(self) -> str: + return f"<{type(self).__name__} {self.name!r}>" + + def _check_setup_finished(self, f_name: str) -> None: + raise NotImplementedError + + @property + def static_folder(self) -> str | None: + """The absolute path to the configured static folder. ``None`` + if no static folder is set. + """ + if self._static_folder is not None: + return os.path.join(self.root_path, self._static_folder) + else: + return None + + @static_folder.setter + def static_folder(self, value: str | os.PathLike | None) -> None: + if value is not None: + value = os.fspath(value).rstrip(r"\/") + + self._static_folder = value + + @property + def has_static_folder(self) -> bool: + """``True`` if :attr:`static_folder` is set. + + .. versionadded:: 0.5 + """ + return self.static_folder is not None + + @property + def static_url_path(self) -> str | None: + """The URL prefix that the static route will be accessible from. + + If it was not configured during init, it is derived from + :attr:`static_folder`. + """ + if self._static_url_path is not None: + return self._static_url_path + + if self.static_folder is not None: + basename = os.path.basename(self.static_folder) + return f"/{basename}".rstrip("/") + + return None + + @static_url_path.setter + def static_url_path(self, value: str | None) -> None: + if value is not None: + value = value.rstrip("/") + + self._static_url_path = value + + @cached_property + def jinja_loader(self) -> FileSystemLoader | None: + """The Jinja loader for this object's templates. By default this + is a class :class:`jinja2.loaders.FileSystemLoader` to + :attr:`template_folder` if it is set. + + .. versionadded:: 0.5 + """ + if self.template_folder is not None: + return FileSystemLoader(os.path.join(self.root_path, self.template_folder)) + else: + return None + + def _method_route( + self, + method: str, + rule: str, + options: dict, + ) -> t.Callable[[T_route], T_route]: + if "methods" in options: + raise TypeError("Use the 'route' decorator to use the 'methods' argument.") + + return self.route(rule, methods=[method], **options) + + @setupmethod + def get(self, rule: str, **options: t.Any) -> t.Callable[[T_route], T_route]: + """Shortcut for :meth:`route` with ``methods=["GET"]``. + + .. versionadded:: 2.0 + """ + return self._method_route("GET", rule, options) + + @setupmethod + def post(self, rule: str, **options: t.Any) -> t.Callable[[T_route], T_route]: + """Shortcut for :meth:`route` with ``methods=["POST"]``. + + .. versionadded:: 2.0 + """ + return self._method_route("POST", rule, options) + + @setupmethod + def put(self, rule: str, **options: t.Any) -> t.Callable[[T_route], T_route]: + """Shortcut for :meth:`route` with ``methods=["PUT"]``. + + .. versionadded:: 2.0 + """ + return self._method_route("PUT", rule, options) + + @setupmethod + def delete(self, rule: str, **options: t.Any) -> t.Callable[[T_route], T_route]: + """Shortcut for :meth:`route` with ``methods=["DELETE"]``. + + .. versionadded:: 2.0 + """ + return self._method_route("DELETE", rule, options) + + @setupmethod + def patch(self, rule: str, **options: t.Any) -> t.Callable[[T_route], T_route]: + """Shortcut for :meth:`route` with ``methods=["PATCH"]``. + + .. versionadded:: 2.0 + """ + return self._method_route("PATCH", rule, options) + + @setupmethod + def route(self, rule: str, **options: t.Any) -> t.Callable[[T_route], T_route]: + """Decorate a view function to register it with the given URL + rule and options. Calls :meth:`add_url_rule`, which has more + details about the implementation. + + .. code-block:: python + + @app.route("/") + def index(): + return "Hello, World!" + + See :ref:`url-route-registrations`. + + The endpoint name for the route defaults to the name of the view + function if the ``endpoint`` parameter isn't passed. + + The ``methods`` parameter defaults to ``["GET"]``. ``HEAD`` and + ``OPTIONS`` are added automatically. + + :param rule: The URL rule string. + :param options: Extra options passed to the + :class:`~werkzeug.routing.Rule` object. + """ + + def decorator(f: T_route) -> T_route: + endpoint = options.pop("endpoint", None) + self.add_url_rule(rule, endpoint, f, **options) + return f + + return decorator + + @setupmethod + def add_url_rule( + self, + rule: str, + endpoint: str | None = None, + view_func: ft.RouteCallable | None = None, + provide_automatic_options: bool | None = None, + **options: t.Any, + ) -> None: + """Register a rule for routing incoming requests and building + URLs. The :meth:`route` decorator is a shortcut to call this + with the ``view_func`` argument. These are equivalent: + + .. code-block:: python + + @app.route("/") + def index(): + ... + + .. code-block:: python + + def index(): + ... + + app.add_url_rule("/", view_func=index) + + See :ref:`url-route-registrations`. + + The endpoint name for the route defaults to the name of the view + function if the ``endpoint`` parameter isn't passed. An error + will be raised if a function has already been registered for the + endpoint. + + The ``methods`` parameter defaults to ``["GET"]``. ``HEAD`` is + always added automatically, and ``OPTIONS`` is added + automatically by default. + + ``view_func`` does not necessarily need to be passed, but if the + rule should participate in routing an endpoint name must be + associated with a view function at some point with the + :meth:`endpoint` decorator. + + .. code-block:: python + + app.add_url_rule("/", endpoint="index") + + @app.endpoint("index") + def index(): + ... + + If ``view_func`` has a ``required_methods`` attribute, those + methods are added to the passed and automatic methods. If it + has a ``provide_automatic_methods`` attribute, it is used as the + default if the parameter is not passed. + + :param rule: The URL rule string. + :param endpoint: The endpoint name to associate with the rule + and view function. Used when routing and building URLs. + Defaults to ``view_func.__name__``. + :param view_func: The view function to associate with the + endpoint name. + :param provide_automatic_options: Add the ``OPTIONS`` method and + respond to ``OPTIONS`` requests automatically. + :param options: Extra options passed to the + :class:`~werkzeug.routing.Rule` object. + """ + raise NotImplementedError + + @setupmethod + def endpoint(self, endpoint: str) -> t.Callable[[F], F]: + """Decorate a view function to register it for the given + endpoint. Used if a rule is added without a ``view_func`` with + :meth:`add_url_rule`. + + .. code-block:: python + + app.add_url_rule("/ex", endpoint="example") + + @app.endpoint("example") + def example(): + ... + + :param endpoint: The endpoint name to associate with the view + function. + """ + + def decorator(f: F) -> F: + self.view_functions[endpoint] = f + return f + + return decorator + + @setupmethod + def before_request(self, f: T_before_request) -> T_before_request: + """Register a function to run before each request. + + For example, this can be used to open a database connection, or + to load the logged in user from the session. + + .. code-block:: python + + @app.before_request + def load_user(): + if "user_id" in session: + g.user = db.session.get(session["user_id"]) + + The function will be called without any arguments. If it returns + a non-``None`` value, the value is handled as if it was the + return value from the view, and further request handling is + stopped. + + This is available on both app and blueprint objects. When used on an app, this + executes before every request. When used on a blueprint, this executes before + every request that the blueprint handles. To register with a blueprint and + execute before every request, use :meth:`.Blueprint.before_app_request`. + """ + self.before_request_funcs.setdefault(None, []).append(f) + return f + + @setupmethod + def after_request(self, f: T_after_request) -> T_after_request: + """Register a function to run after each request to this object. + + The function is called with the response object, and must return + a response object. This allows the functions to modify or + replace the response before it is sent. + + If a function raises an exception, any remaining + ``after_request`` functions will not be called. Therefore, this + should not be used for actions that must execute, such as to + close resources. Use :meth:`teardown_request` for that. + + This is available on both app and blueprint objects. When used on an app, this + executes after every request. When used on a blueprint, this executes after + every request that the blueprint handles. To register with a blueprint and + execute after every request, use :meth:`.Blueprint.after_app_request`. + """ + self.after_request_funcs.setdefault(None, []).append(f) + return f + + @setupmethod + def teardown_request(self, f: T_teardown) -> T_teardown: + """Register a function to be called when the request context is + popped. Typically this happens at the end of each request, but + contexts may be pushed manually as well during testing. + + .. code-block:: python + + with app.test_request_context(): + ... + + When the ``with`` block exits (or ``ctx.pop()`` is called), the + teardown functions are called just before the request context is + made inactive. + + When a teardown function was called because of an unhandled + exception it will be passed an error object. If an + :meth:`errorhandler` is registered, it will handle the exception + and the teardown will not receive it. + + Teardown functions must avoid raising exceptions. If they + execute code that might fail they must surround that code with a + ``try``/``except`` block and log any errors. + + The return values of teardown functions are ignored. + + This is available on both app and blueprint objects. When used on an app, this + executes after every request. When used on a blueprint, this executes after + every request that the blueprint handles. To register with a blueprint and + execute after every request, use :meth:`.Blueprint.teardown_app_request`. + """ + self.teardown_request_funcs.setdefault(None, []).append(f) + return f + + @setupmethod + def context_processor( + self, + f: T_template_context_processor, + ) -> T_template_context_processor: + """Registers a template context processor function. These functions run before + rendering a template. The keys of the returned dict are added as variables + available in the template. + + This is available on both app and blueprint objects. When used on an app, this + is called for every rendered template. When used on a blueprint, this is called + for templates rendered from the blueprint's views. To register with a blueprint + and affect every template, use :meth:`.Blueprint.app_context_processor`. + """ + self.template_context_processors[None].append(f) + return f + + @setupmethod + def url_value_preprocessor( + self, + f: T_url_value_preprocessor, + ) -> T_url_value_preprocessor: + """Register a URL value preprocessor function for all view + functions in the application. These functions will be called before the + :meth:`before_request` functions. + + The function can modify the values captured from the matched url before + they are passed to the view. For example, this can be used to pop a + common language code value and place it in ``g`` rather than pass it to + every view. + + The function is passed the endpoint name and values dict. The return + value is ignored. + + This is available on both app and blueprint objects. When used on an app, this + is called for every request. When used on a blueprint, this is called for + requests that the blueprint handles. To register with a blueprint and affect + every request, use :meth:`.Blueprint.app_url_value_preprocessor`. + """ + self.url_value_preprocessors[None].append(f) + return f + + @setupmethod + def url_defaults(self, f: T_url_defaults) -> T_url_defaults: + """Callback function for URL defaults for all view functions of the + application. It's called with the endpoint and values and should + update the values passed in place. + + This is available on both app and blueprint objects. When used on an app, this + is called for every request. When used on a blueprint, this is called for + requests that the blueprint handles. To register with a blueprint and affect + every request, use :meth:`.Blueprint.app_url_defaults`. + """ + self.url_default_functions[None].append(f) + return f + + @setupmethod + def errorhandler( + self, code_or_exception: type[Exception] | int + ) -> t.Callable[[T_error_handler], T_error_handler]: + """Register a function to handle errors by code or exception class. + + A decorator that is used to register a function given an + error code. Example:: + + @app.errorhandler(404) + def page_not_found(error): + return 'This page does not exist', 404 + + You can also register handlers for arbitrary exceptions:: + + @app.errorhandler(DatabaseError) + def special_exception_handler(error): + return 'Database connection failed', 500 + + This is available on both app and blueprint objects. When used on an app, this + can handle errors from every request. When used on a blueprint, this can handle + errors from requests that the blueprint handles. To register with a blueprint + and affect every request, use :meth:`.Blueprint.app_errorhandler`. + + .. versionadded:: 0.7 + Use :meth:`register_error_handler` instead of modifying + :attr:`error_handler_spec` directly, for application wide error + handlers. + + .. versionadded:: 0.7 + One can now additionally also register custom exception types + that do not necessarily have to be a subclass of the + :class:`~werkzeug.exceptions.HTTPException` class. + + :param code_or_exception: the code as integer for the handler, or + an arbitrary exception + """ + + def decorator(f: T_error_handler) -> T_error_handler: + self.register_error_handler(code_or_exception, f) + return f + + return decorator + + @setupmethod + def register_error_handler( + self, + code_or_exception: type[Exception] | int, + f: ft.ErrorHandlerCallable, + ) -> None: + """Alternative error attach function to the :meth:`errorhandler` + decorator that is more straightforward to use for non decorator + usage. + + .. versionadded:: 0.7 + """ + exc_class, code = self._get_exc_class_and_code(code_or_exception) + self.error_handler_spec[None][code][exc_class] = f + + @staticmethod + def _get_exc_class_and_code( + exc_class_or_code: type[Exception] | int, + ) -> tuple[type[Exception], int | None]: + """Get the exception class being handled. For HTTP status codes + or ``HTTPException`` subclasses, return both the exception and + status code. + + :param exc_class_or_code: Any exception class, or an HTTP status + code as an integer. + """ + exc_class: type[Exception] + + if isinstance(exc_class_or_code, int): + try: + exc_class = default_exceptions[exc_class_or_code] + except KeyError: + raise ValueError( + f"'{exc_class_or_code}' is not a recognized HTTP" + " error code. Use a subclass of HTTPException with" + " that code instead." + ) from None + else: + exc_class = exc_class_or_code + + if isinstance(exc_class, Exception): + raise TypeError( + f"{exc_class!r} is an instance, not a class. Handlers" + " can only be registered for Exception classes or HTTP" + " error codes." + ) + + if not issubclass(exc_class, Exception): + raise ValueError( + f"'{exc_class.__name__}' is not a subclass of Exception." + " Handlers can only be registered for Exception classes" + " or HTTP error codes." + ) + + if issubclass(exc_class, HTTPException): + return exc_class, exc_class.code + else: + return exc_class, None + + +def _endpoint_from_view_func(view_func: t.Callable) -> str: + """Internal helper that returns the default endpoint for a given + function. This always is the function name. + """ + assert view_func is not None, "expected view func if endpoint is not provided." + return view_func.__name__ + + +def _path_is_relative_to(path: pathlib.PurePath, base: str) -> bool: + # Path.is_relative_to doesn't exist until Python 3.9 + try: + path.relative_to(base) + return True + except ValueError: + return False + + +def _find_package_path(import_name): + """Find the path that contains the package or module.""" + root_mod_name, _, _ = import_name.partition(".") + + try: + root_spec = importlib.util.find_spec(root_mod_name) + + if root_spec is None: + raise ValueError("not found") + except (ImportError, ValueError): + # ImportError: the machinery told us it does not exist + # ValueError: + # - the module name was invalid + # - the module name is __main__ + # - we raised `ValueError` due to `root_spec` being `None` + return os.getcwd() + + if root_spec.origin in {"namespace", None}: + # namespace package + package_spec = importlib.util.find_spec(import_name) + + if package_spec is not None and package_spec.submodule_search_locations: + # Pick the path in the namespace that contains the submodule. + package_path = pathlib.Path( + os.path.commonpath(package_spec.submodule_search_locations) + ) + search_location = next( + location + for location in root_spec.submodule_search_locations + if _path_is_relative_to(package_path, location) + ) + else: + # Pick the first path. + search_location = root_spec.submodule_search_locations[0] + + return os.path.dirname(search_location) + elif root_spec.submodule_search_locations: + # package with __init__.py + return os.path.dirname(os.path.dirname(root_spec.origin)) + else: + # module + return os.path.dirname(root_spec.origin) + + +def find_package(import_name: str): + """Find the prefix that a package is installed under, and the path + that it would be imported from. + + The prefix is the directory containing the standard directory + hierarchy (lib, bin, etc.). If the package is not installed to the + system (:attr:`sys.prefix`) or a virtualenv (``site-packages``), + ``None`` is returned. + + The path is the entry in :attr:`sys.path` that contains the package + for import. If the package is not installed, it's assumed that the + package was imported from the current working directory. + """ + package_path = _find_package_path(import_name) + py_prefix = os.path.abspath(sys.prefix) + + # installed to the system + if _path_is_relative_to(pathlib.PurePath(package_path), py_prefix): + return py_prefix, package_path + + site_parent, site_folder = os.path.split(package_path) + + # installed to a virtualenv + if site_folder.lower() == "site-packages": + parent, folder = os.path.split(site_parent) + + # Windows (prefix/lib/site-packages) + if folder.lower() == "lib": + return parent, package_path + + # Unix (prefix/lib/pythonX.Y/site-packages) + if os.path.basename(parent).lower() == "lib": + return os.path.dirname(parent), package_path + + # something else (prefix/site-packages) + return site_parent, package_path + + # not installed + return None, package_path diff --git a/venv/lib/python3.12/site-packages/flask/sessions.py b/venv/lib/python3.12/site-packages/flask/sessions.py new file mode 100644 index 0000000..e5650d6 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/sessions.py @@ -0,0 +1,367 @@ +from __future__ import annotations + +import hashlib +import typing as t +from collections.abc import MutableMapping +from datetime import datetime +from datetime import timezone + +from itsdangerous import BadSignature +from itsdangerous import URLSafeTimedSerializer +from werkzeug.datastructures import CallbackDict + +from .json.tag import TaggedJSONSerializer + +if t.TYPE_CHECKING: # pragma: no cover + from .app import Flask + from .wrappers import Request, Response + + +class SessionMixin(MutableMapping): + """Expands a basic dictionary with session attributes.""" + + @property + def permanent(self) -> bool: + """This reflects the ``'_permanent'`` key in the dict.""" + return self.get("_permanent", False) + + @permanent.setter + def permanent(self, value: bool) -> None: + self["_permanent"] = bool(value) + + #: Some implementations can detect whether a session is newly + #: created, but that is not guaranteed. Use with caution. The mixin + # default is hard-coded ``False``. + new = False + + #: Some implementations can detect changes to the session and set + #: this when that happens. The mixin default is hard coded to + #: ``True``. + modified = True + + #: Some implementations can detect when session data is read or + #: written and set this when that happens. The mixin default is hard + #: coded to ``True``. + accessed = True + + +class SecureCookieSession(CallbackDict, SessionMixin): + """Base class for sessions based on signed cookies. + + This session backend will set the :attr:`modified` and + :attr:`accessed` attributes. It cannot reliably track whether a + session is new (vs. empty), so :attr:`new` remains hard coded to + ``False``. + """ + + #: When data is changed, this is set to ``True``. Only the session + #: dictionary itself is tracked; if the session contains mutable + #: data (for example a nested dict) then this must be set to + #: ``True`` manually when modifying that data. The session cookie + #: will only be written to the response if this is ``True``. + modified = False + + #: When data is read or written, this is set to ``True``. Used by + # :class:`.SecureCookieSessionInterface` to add a ``Vary: Cookie`` + #: header, which allows caching proxies to cache different pages for + #: different users. + accessed = False + + def __init__(self, initial: t.Any = None) -> None: + def on_update(self) -> None: + self.modified = True + self.accessed = True + + super().__init__(initial, on_update) + + def __getitem__(self, key: str) -> t.Any: + self.accessed = True + return super().__getitem__(key) + + def get(self, key: str, default: t.Any = None) -> t.Any: + self.accessed = True + return super().get(key, default) + + def setdefault(self, key: str, default: t.Any = None) -> t.Any: + self.accessed = True + return super().setdefault(key, default) + + +class NullSession(SecureCookieSession): + """Class used to generate nicer error messages if sessions are not + available. Will still allow read-only access to the empty session + but fail on setting. + """ + + def _fail(self, *args: t.Any, **kwargs: t.Any) -> t.NoReturn: + raise RuntimeError( + "The session is unavailable because no secret " + "key was set. Set the secret_key on the " + "application to something unique and secret." + ) + + __setitem__ = __delitem__ = clear = pop = popitem = update = setdefault = _fail # type: ignore # noqa: B950 + del _fail + + +class SessionInterface: + """The basic interface you have to implement in order to replace the + default session interface which uses werkzeug's securecookie + implementation. The only methods you have to implement are + :meth:`open_session` and :meth:`save_session`, the others have + useful defaults which you don't need to change. + + The session object returned by the :meth:`open_session` method has to + provide a dictionary like interface plus the properties and methods + from the :class:`SessionMixin`. We recommend just subclassing a dict + and adding that mixin:: + + class Session(dict, SessionMixin): + pass + + If :meth:`open_session` returns ``None`` Flask will call into + :meth:`make_null_session` to create a session that acts as replacement + if the session support cannot work because some requirement is not + fulfilled. The default :class:`NullSession` class that is created + will complain that the secret key was not set. + + To replace the session interface on an application all you have to do + is to assign :attr:`flask.Flask.session_interface`:: + + app = Flask(__name__) + app.session_interface = MySessionInterface() + + Multiple requests with the same session may be sent and handled + concurrently. When implementing a new session interface, consider + whether reads or writes to the backing store must be synchronized. + There is no guarantee on the order in which the session for each + request is opened or saved, it will occur in the order that requests + begin and end processing. + + .. versionadded:: 0.8 + """ + + #: :meth:`make_null_session` will look here for the class that should + #: be created when a null session is requested. Likewise the + #: :meth:`is_null_session` method will perform a typecheck against + #: this type. + null_session_class = NullSession + + #: A flag that indicates if the session interface is pickle based. + #: This can be used by Flask extensions to make a decision in regards + #: to how to deal with the session object. + #: + #: .. versionadded:: 0.10 + pickle_based = False + + def make_null_session(self, app: Flask) -> NullSession: + """Creates a null session which acts as a replacement object if the + real session support could not be loaded due to a configuration + error. This mainly aids the user experience because the job of the + null session is to still support lookup without complaining but + modifications are answered with a helpful error message of what + failed. + + This creates an instance of :attr:`null_session_class` by default. + """ + return self.null_session_class() + + def is_null_session(self, obj: object) -> bool: + """Checks if a given object is a null session. Null sessions are + not asked to be saved. + + This checks if the object is an instance of :attr:`null_session_class` + by default. + """ + return isinstance(obj, self.null_session_class) + + def get_cookie_name(self, app: Flask) -> str: + """The name of the session cookie. Uses``app.config["SESSION_COOKIE_NAME"]``.""" + return app.config["SESSION_COOKIE_NAME"] + + def get_cookie_domain(self, app: Flask) -> str | None: + """The value of the ``Domain`` parameter on the session cookie. If not set, + browsers will only send the cookie to the exact domain it was set from. + Otherwise, they will send it to any subdomain of the given value as well. + + Uses the :data:`SESSION_COOKIE_DOMAIN` config. + + .. versionchanged:: 2.3 + Not set by default, does not fall back to ``SERVER_NAME``. + """ + rv = app.config["SESSION_COOKIE_DOMAIN"] + return rv if rv else None + + def get_cookie_path(self, app: Flask) -> str: + """Returns the path for which the cookie should be valid. The + default implementation uses the value from the ``SESSION_COOKIE_PATH`` + config var if it's set, and falls back to ``APPLICATION_ROOT`` or + uses ``/`` if it's ``None``. + """ + return app.config["SESSION_COOKIE_PATH"] or app.config["APPLICATION_ROOT"] + + def get_cookie_httponly(self, app: Flask) -> bool: + """Returns True if the session cookie should be httponly. This + currently just returns the value of the ``SESSION_COOKIE_HTTPONLY`` + config var. + """ + return app.config["SESSION_COOKIE_HTTPONLY"] + + def get_cookie_secure(self, app: Flask) -> bool: + """Returns True if the cookie should be secure. This currently + just returns the value of the ``SESSION_COOKIE_SECURE`` setting. + """ + return app.config["SESSION_COOKIE_SECURE"] + + def get_cookie_samesite(self, app: Flask) -> str: + """Return ``'Strict'`` or ``'Lax'`` if the cookie should use the + ``SameSite`` attribute. This currently just returns the value of + the :data:`SESSION_COOKIE_SAMESITE` setting. + """ + return app.config["SESSION_COOKIE_SAMESITE"] + + def get_expiration_time(self, app: Flask, session: SessionMixin) -> datetime | None: + """A helper method that returns an expiration date for the session + or ``None`` if the session is linked to the browser session. The + default implementation returns now + the permanent session + lifetime configured on the application. + """ + if session.permanent: + return datetime.now(timezone.utc) + app.permanent_session_lifetime + return None + + def should_set_cookie(self, app: Flask, session: SessionMixin) -> bool: + """Used by session backends to determine if a ``Set-Cookie`` header + should be set for this session cookie for this response. If the session + has been modified, the cookie is set. If the session is permanent and + the ``SESSION_REFRESH_EACH_REQUEST`` config is true, the cookie is + always set. + + This check is usually skipped if the session was deleted. + + .. versionadded:: 0.11 + """ + + return session.modified or ( + session.permanent and app.config["SESSION_REFRESH_EACH_REQUEST"] + ) + + def open_session(self, app: Flask, request: Request) -> SessionMixin | None: + """This is called at the beginning of each request, after + pushing the request context, before matching the URL. + + This must return an object which implements a dictionary-like + interface as well as the :class:`SessionMixin` interface. + + This will return ``None`` to indicate that loading failed in + some way that is not immediately an error. The request + context will fall back to using :meth:`make_null_session` + in this case. + """ + raise NotImplementedError() + + def save_session( + self, app: Flask, session: SessionMixin, response: Response + ) -> None: + """This is called at the end of each request, after generating + a response, before removing the request context. It is skipped + if :meth:`is_null_session` returns ``True``. + """ + raise NotImplementedError() + + +session_json_serializer = TaggedJSONSerializer() + + +class SecureCookieSessionInterface(SessionInterface): + """The default session interface that stores sessions in signed cookies + through the :mod:`itsdangerous` module. + """ + + #: the salt that should be applied on top of the secret key for the + #: signing of cookie based sessions. + salt = "cookie-session" + #: the hash function to use for the signature. The default is sha1 + digest_method = staticmethod(hashlib.sha1) + #: the name of the itsdangerous supported key derivation. The default + #: is hmac. + key_derivation = "hmac" + #: A python serializer for the payload. The default is a compact + #: JSON derived serializer with support for some extra Python types + #: such as datetime objects or tuples. + serializer = session_json_serializer + session_class = SecureCookieSession + + def get_signing_serializer(self, app: Flask) -> URLSafeTimedSerializer | None: + if not app.secret_key: + return None + signer_kwargs = dict( + key_derivation=self.key_derivation, digest_method=self.digest_method + ) + return URLSafeTimedSerializer( + app.secret_key, + salt=self.salt, + serializer=self.serializer, + signer_kwargs=signer_kwargs, + ) + + def open_session(self, app: Flask, request: Request) -> SecureCookieSession | None: + s = self.get_signing_serializer(app) + if s is None: + return None + val = request.cookies.get(self.get_cookie_name(app)) + if not val: + return self.session_class() + max_age = int(app.permanent_session_lifetime.total_seconds()) + try: + data = s.loads(val, max_age=max_age) + return self.session_class(data) + except BadSignature: + return self.session_class() + + def save_session( + self, app: Flask, session: SessionMixin, response: Response + ) -> None: + name = self.get_cookie_name(app) + domain = self.get_cookie_domain(app) + path = self.get_cookie_path(app) + secure = self.get_cookie_secure(app) + samesite = self.get_cookie_samesite(app) + httponly = self.get_cookie_httponly(app) + + # Add a "Vary: Cookie" header if the session was accessed at all. + if session.accessed: + response.vary.add("Cookie") + + # If the session is modified to be empty, remove the cookie. + # If the session is empty, return without setting the cookie. + if not session: + if session.modified: + response.delete_cookie( + name, + domain=domain, + path=path, + secure=secure, + samesite=samesite, + httponly=httponly, + ) + response.vary.add("Cookie") + + return + + if not self.should_set_cookie(app, session): + return + + expires = self.get_expiration_time(app, session) + val = self.get_signing_serializer(app).dumps(dict(session)) # type: ignore + response.set_cookie( + name, + val, # type: ignore + expires=expires, + httponly=httponly, + domain=domain, + path=path, + secure=secure, + samesite=samesite, + ) + response.vary.add("Cookie") diff --git a/venv/lib/python3.12/site-packages/flask/signals.py b/venv/lib/python3.12/site-packages/flask/signals.py new file mode 100644 index 0000000..444fda9 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/signals.py @@ -0,0 +1,17 @@ +from __future__ import annotations + +from blinker import Namespace + +# This namespace is only for signals provided by Flask itself. +_signals = Namespace() + +template_rendered = _signals.signal("template-rendered") +before_render_template = _signals.signal("before-render-template") +request_started = _signals.signal("request-started") +request_finished = _signals.signal("request-finished") +request_tearing_down = _signals.signal("request-tearing-down") +got_request_exception = _signals.signal("got-request-exception") +appcontext_tearing_down = _signals.signal("appcontext-tearing-down") +appcontext_pushed = _signals.signal("appcontext-pushed") +appcontext_popped = _signals.signal("appcontext-popped") +message_flashed = _signals.signal("message-flashed") diff --git a/venv/lib/python3.12/site-packages/flask/templating.py b/venv/lib/python3.12/site-packages/flask/templating.py new file mode 100644 index 0000000..8dff8ba --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/templating.py @@ -0,0 +1,221 @@ +from __future__ import annotations + +import typing as t + +from jinja2 import BaseLoader +from jinja2 import Environment as BaseEnvironment +from jinja2 import Template +from jinja2 import TemplateNotFound + +from .globals import _cv_app +from .globals import _cv_request +from .globals import current_app +from .globals import request +from .helpers import stream_with_context +from .signals import before_render_template +from .signals import template_rendered + +if t.TYPE_CHECKING: # pragma: no cover + from .app import Flask + from .sansio.app import App + from .sansio.scaffold import Scaffold + + +def _default_template_ctx_processor() -> dict[str, t.Any]: + """Default template context processor. Injects `request`, + `session` and `g`. + """ + appctx = _cv_app.get(None) + reqctx = _cv_request.get(None) + rv: dict[str, t.Any] = {} + if appctx is not None: + rv["g"] = appctx.g + if reqctx is not None: + rv["request"] = reqctx.request + rv["session"] = reqctx.session + return rv + + +class Environment(BaseEnvironment): + """Works like a regular Jinja2 environment but has some additional + knowledge of how Flask's blueprint works so that it can prepend the + name of the blueprint to referenced templates if necessary. + """ + + def __init__(self, app: App, **options: t.Any) -> None: + if "loader" not in options: + options["loader"] = app.create_global_jinja_loader() + BaseEnvironment.__init__(self, **options) + self.app = app + + +class DispatchingJinjaLoader(BaseLoader): + """A loader that looks for templates in the application and all + the blueprint folders. + """ + + def __init__(self, app: App) -> None: + self.app = app + + def get_source( # type: ignore + self, environment: Environment, template: str + ) -> tuple[str, str | None, t.Callable | None]: + if self.app.config["EXPLAIN_TEMPLATE_LOADING"]: + return self._get_source_explained(environment, template) + return self._get_source_fast(environment, template) + + def _get_source_explained( + self, environment: Environment, template: str + ) -> tuple[str, str | None, t.Callable | None]: + attempts = [] + rv: tuple[str, str | None, t.Callable[[], bool] | None] | None + trv: None | (tuple[str, str | None, t.Callable[[], bool] | None]) = None + + for srcobj, loader in self._iter_loaders(template): + try: + rv = loader.get_source(environment, template) + if trv is None: + trv = rv + except TemplateNotFound: + rv = None + attempts.append((loader, srcobj, rv)) + + from .debughelpers import explain_template_loading_attempts + + explain_template_loading_attempts(self.app, template, attempts) + + if trv is not None: + return trv + raise TemplateNotFound(template) + + def _get_source_fast( + self, environment: Environment, template: str + ) -> tuple[str, str | None, t.Callable | None]: + for _srcobj, loader in self._iter_loaders(template): + try: + return loader.get_source(environment, template) + except TemplateNotFound: + continue + raise TemplateNotFound(template) + + def _iter_loaders( + self, template: str + ) -> t.Generator[tuple[Scaffold, BaseLoader], None, None]: + loader = self.app.jinja_loader + if loader is not None: + yield self.app, loader + + for blueprint in self.app.iter_blueprints(): + loader = blueprint.jinja_loader + if loader is not None: + yield blueprint, loader + + def list_templates(self) -> list[str]: + result = set() + loader = self.app.jinja_loader + if loader is not None: + result.update(loader.list_templates()) + + for blueprint in self.app.iter_blueprints(): + loader = blueprint.jinja_loader + if loader is not None: + for template in loader.list_templates(): + result.add(template) + + return list(result) + + +def _render(app: Flask, template: Template, context: dict[str, t.Any]) -> str: + app.update_template_context(context) + before_render_template.send( + app, _async_wrapper=app.ensure_sync, template=template, context=context + ) + rv = template.render(context) + template_rendered.send( + app, _async_wrapper=app.ensure_sync, template=template, context=context + ) + return rv + + +def render_template( + template_name_or_list: str | Template | list[str | Template], + **context: t.Any, +) -> str: + """Render a template by name with the given context. + + :param template_name_or_list: The name of the template to render. If + a list is given, the first name to exist will be rendered. + :param context: The variables to make available in the template. + """ + app = current_app._get_current_object() # type: ignore[attr-defined] + template = app.jinja_env.get_or_select_template(template_name_or_list) + return _render(app, template, context) + + +def render_template_string(source: str, **context: t.Any) -> str: + """Render a template from the given source string with the given + context. + + :param source: The source code of the template to render. + :param context: The variables to make available in the template. + """ + app = current_app._get_current_object() # type: ignore[attr-defined] + template = app.jinja_env.from_string(source) + return _render(app, template, context) + + +def _stream( + app: Flask, template: Template, context: dict[str, t.Any] +) -> t.Iterator[str]: + app.update_template_context(context) + before_render_template.send( + app, _async_wrapper=app.ensure_sync, template=template, context=context + ) + + def generate() -> t.Iterator[str]: + yield from template.generate(context) + template_rendered.send( + app, _async_wrapper=app.ensure_sync, template=template, context=context + ) + + rv = generate() + + # If a request context is active, keep it while generating. + if request: + rv = stream_with_context(rv) + + return rv + + +def stream_template( + template_name_or_list: str | Template | list[str | Template], + **context: t.Any, +) -> t.Iterator[str]: + """Render a template by name with the given context as a stream. + This returns an iterator of strings, which can be used as a + streaming response from a view. + + :param template_name_or_list: The name of the template to render. If + a list is given, the first name to exist will be rendered. + :param context: The variables to make available in the template. + + .. versionadded:: 2.2 + """ + app = current_app._get_current_object() # type: ignore[attr-defined] + template = app.jinja_env.get_or_select_template(template_name_or_list) + return _stream(app, template, context) + + +def stream_template_string(source: str, **context: t.Any) -> t.Iterator[str]: + """Render a template from the given source string with the given + context as a stream. This returns an iterator of strings, which can + be used as a streaming response from a view. + + :param source: The source code of the template to render. + :param context: The variables to make available in the template. + + .. versionadded:: 2.2 + """ + app = current_app._get_current_object() # type: ignore[attr-defined] + template = app.jinja_env.from_string(source) + return _stream(app, template, context) diff --git a/venv/lib/python3.12/site-packages/flask/testing.py b/venv/lib/python3.12/site-packages/flask/testing.py new file mode 100644 index 0000000..69aa785 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/testing.py @@ -0,0 +1,295 @@ +from __future__ import annotations + +import importlib.metadata +import typing as t +from contextlib import contextmanager +from contextlib import ExitStack +from copy import copy +from types import TracebackType +from urllib.parse import urlsplit + +import werkzeug.test +from click.testing import CliRunner +from werkzeug.test import Client +from werkzeug.wrappers import Request as BaseRequest + +from .cli import ScriptInfo +from .sessions import SessionMixin + +if t.TYPE_CHECKING: # pragma: no cover + from werkzeug.test import TestResponse + + from .app import Flask + + +class EnvironBuilder(werkzeug.test.EnvironBuilder): + """An :class:`~werkzeug.test.EnvironBuilder`, that takes defaults from the + application. + + :param app: The Flask application to configure the environment from. + :param path: URL path being requested. + :param base_url: Base URL where the app is being served, which + ``path`` is relative to. If not given, built from + :data:`PREFERRED_URL_SCHEME`, ``subdomain``, + :data:`SERVER_NAME`, and :data:`APPLICATION_ROOT`. + :param subdomain: Subdomain name to append to :data:`SERVER_NAME`. + :param url_scheme: Scheme to use instead of + :data:`PREFERRED_URL_SCHEME`. + :param json: If given, this is serialized as JSON and passed as + ``data``. Also defaults ``content_type`` to + ``application/json``. + :param args: other positional arguments passed to + :class:`~werkzeug.test.EnvironBuilder`. + :param kwargs: other keyword arguments passed to + :class:`~werkzeug.test.EnvironBuilder`. + """ + + def __init__( + self, + app: Flask, + path: str = "/", + base_url: str | None = None, + subdomain: str | None = None, + url_scheme: str | None = None, + *args: t.Any, + **kwargs: t.Any, + ) -> None: + assert not (base_url or subdomain or url_scheme) or ( + base_url is not None + ) != bool( + subdomain or url_scheme + ), 'Cannot pass "subdomain" or "url_scheme" with "base_url".' + + if base_url is None: + http_host = app.config.get("SERVER_NAME") or "localhost" + app_root = app.config["APPLICATION_ROOT"] + + if subdomain: + http_host = f"{subdomain}.{http_host}" + + if url_scheme is None: + url_scheme = app.config["PREFERRED_URL_SCHEME"] + + url = urlsplit(path) + base_url = ( + f"{url.scheme or url_scheme}://{url.netloc or http_host}" + f"/{app_root.lstrip('/')}" + ) + path = url.path + + if url.query: + sep = b"?" if isinstance(url.query, bytes) else "?" + path += sep + url.query + + self.app = app + super().__init__(path, base_url, *args, **kwargs) + + def json_dumps(self, obj: t.Any, **kwargs: t.Any) -> str: # type: ignore + """Serialize ``obj`` to a JSON-formatted string. + + The serialization will be configured according to the config associated + with this EnvironBuilder's ``app``. + """ + return self.app.json.dumps(obj, **kwargs) + + +_werkzeug_version = "" + + +def _get_werkzeug_version() -> str: + global _werkzeug_version + + if not _werkzeug_version: + _werkzeug_version = importlib.metadata.version("werkzeug") + + return _werkzeug_version + + +class FlaskClient(Client): + """Works like a regular Werkzeug test client but has knowledge about + Flask's contexts to defer the cleanup of the request context until + the end of a ``with`` block. For general information about how to + use this class refer to :class:`werkzeug.test.Client`. + + .. versionchanged:: 0.12 + `app.test_client()` includes preset default environment, which can be + set after instantiation of the `app.test_client()` object in + `client.environ_base`. + + Basic usage is outlined in the :doc:`/testing` chapter. + """ + + application: Flask + + def __init__(self, *args: t.Any, **kwargs: t.Any) -> None: + super().__init__(*args, **kwargs) + self.preserve_context = False + self._new_contexts: list[t.ContextManager[t.Any]] = [] + self._context_stack = ExitStack() + self.environ_base = { + "REMOTE_ADDR": "127.0.0.1", + "HTTP_USER_AGENT": f"Werkzeug/{_get_werkzeug_version()}", + } + + @contextmanager + def session_transaction( + self, *args: t.Any, **kwargs: t.Any + ) -> t.Generator[SessionMixin, None, None]: + """When used in combination with a ``with`` statement this opens a + session transaction. This can be used to modify the session that + the test client uses. Once the ``with`` block is left the session is + stored back. + + :: + + with client.session_transaction() as session: + session['value'] = 42 + + Internally this is implemented by going through a temporary test + request context and since session handling could depend on + request variables this function accepts the same arguments as + :meth:`~flask.Flask.test_request_context` which are directly + passed through. + """ + if self._cookies is None: + raise TypeError( + "Cookies are disabled. Create a client with 'use_cookies=True'." + ) + + app = self.application + ctx = app.test_request_context(*args, **kwargs) + self._add_cookies_to_wsgi(ctx.request.environ) + + with ctx: + sess = app.session_interface.open_session(app, ctx.request) + + if sess is None: + raise RuntimeError("Session backend did not open a session.") + + yield sess + resp = app.response_class() + + if app.session_interface.is_null_session(sess): + return + + with ctx: + app.session_interface.save_session(app, sess, resp) + + self._update_cookies_from_response( + ctx.request.host.partition(":")[0], + ctx.request.path, + resp.headers.getlist("Set-Cookie"), + ) + + def _copy_environ(self, other): + out = {**self.environ_base, **other} + + if self.preserve_context: + out["werkzeug.debug.preserve_context"] = self._new_contexts.append + + return out + + def _request_from_builder_args(self, args, kwargs): + kwargs["environ_base"] = self._copy_environ(kwargs.get("environ_base", {})) + builder = EnvironBuilder(self.application, *args, **kwargs) + + try: + return builder.get_request() + finally: + builder.close() + + def open( + self, + *args: t.Any, + buffered: bool = False, + follow_redirects: bool = False, + **kwargs: t.Any, + ) -> TestResponse: + if args and isinstance( + args[0], (werkzeug.test.EnvironBuilder, dict, BaseRequest) + ): + if isinstance(args[0], werkzeug.test.EnvironBuilder): + builder = copy(args[0]) + builder.environ_base = self._copy_environ(builder.environ_base or {}) + request = builder.get_request() + elif isinstance(args[0], dict): + request = EnvironBuilder.from_environ( + args[0], app=self.application, environ_base=self._copy_environ({}) + ).get_request() + else: + # isinstance(args[0], BaseRequest) + request = copy(args[0]) + request.environ = self._copy_environ(request.environ) + else: + # request is None + request = self._request_from_builder_args(args, kwargs) + + # Pop any previously preserved contexts. This prevents contexts + # from being preserved across redirects or multiple requests + # within a single block. + self._context_stack.close() + + response = super().open( + request, + buffered=buffered, + follow_redirects=follow_redirects, + ) + response.json_module = self.application.json # type: ignore[assignment] + + # Re-push contexts that were preserved during the request. + while self._new_contexts: + cm = self._new_contexts.pop() + self._context_stack.enter_context(cm) + + return response + + def __enter__(self) -> FlaskClient: + if self.preserve_context: + raise RuntimeError("Cannot nest client invocations") + self.preserve_context = True + return self + + def __exit__( + self, + exc_type: type | None, + exc_value: BaseException | None, + tb: TracebackType | None, + ) -> None: + self.preserve_context = False + self._context_stack.close() + + +class FlaskCliRunner(CliRunner): + """A :class:`~click.testing.CliRunner` for testing a Flask app's + CLI commands. Typically created using + :meth:`~flask.Flask.test_cli_runner`. See :ref:`testing-cli`. + """ + + def __init__(self, app: Flask, **kwargs: t.Any) -> None: + self.app = app + super().__init__(**kwargs) + + def invoke( # type: ignore + self, cli: t.Any = None, args: t.Any = None, **kwargs: t.Any + ) -> t.Any: + """Invokes a CLI command in an isolated environment. See + :meth:`CliRunner.invoke ` for + full method documentation. See :ref:`testing-cli` for examples. + + If the ``obj`` argument is not given, passes an instance of + :class:`~flask.cli.ScriptInfo` that knows how to load the Flask + app being tested. + + :param cli: Command object to invoke. Default is the app's + :attr:`~flask.app.Flask.cli` group. + :param args: List of strings to invoke the command with. + + :return: a :class:`~click.testing.Result` object. + """ + if cli is None: + cli = self.app.cli # type: ignore + + if "obj" not in kwargs: + kwargs["obj"] = ScriptInfo(create_app=lambda: self.app) + + return super().invoke(cli, args, **kwargs) diff --git a/venv/lib/python3.12/site-packages/flask/typing.py b/venv/lib/python3.12/site-packages/flask/typing.py new file mode 100644 index 0000000..a8c9ba0 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/typing.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +import typing as t + +if t.TYPE_CHECKING: # pragma: no cover + from _typeshed.wsgi import WSGIApplication # noqa: F401 + from werkzeug.datastructures import Headers # noqa: F401 + from werkzeug.sansio.response import Response # noqa: F401 + +# The possible types that are directly convertible or are a Response object. +ResponseValue = t.Union[ + "Response", + str, + bytes, + t.List[t.Any], + # Only dict is actually accepted, but Mapping allows for TypedDict. + t.Mapping[str, t.Any], + t.Iterator[str], + t.Iterator[bytes], +] + +# the possible types for an individual HTTP header +# This should be a Union, but mypy doesn't pass unless it's a TypeVar. +HeaderValue = t.Union[str, t.List[str], t.Tuple[str, ...]] + +# the possible types for HTTP headers +HeadersValue = t.Union[ + "Headers", + t.Mapping[str, HeaderValue], + t.Sequence[t.Tuple[str, HeaderValue]], +] + +# The possible types returned by a route function. +ResponseReturnValue = t.Union[ + ResponseValue, + t.Tuple[ResponseValue, HeadersValue], + t.Tuple[ResponseValue, int], + t.Tuple[ResponseValue, int, HeadersValue], + "WSGIApplication", +] + +# Allow any subclass of werkzeug.Response, such as the one from Flask, +# as a callback argument. Using werkzeug.Response directly makes a +# callback annotated with flask.Response fail type checking. +ResponseClass = t.TypeVar("ResponseClass", bound="Response") + +AppOrBlueprintKey = t.Optional[str] # The App key is None, whereas blueprints are named +AfterRequestCallable = t.Union[ + t.Callable[[ResponseClass], ResponseClass], + t.Callable[[ResponseClass], t.Awaitable[ResponseClass]], +] +BeforeFirstRequestCallable = t.Union[ + t.Callable[[], None], t.Callable[[], t.Awaitable[None]] +] +BeforeRequestCallable = t.Union[ + t.Callable[[], t.Optional[ResponseReturnValue]], + t.Callable[[], t.Awaitable[t.Optional[ResponseReturnValue]]], +] +ShellContextProcessorCallable = t.Callable[[], t.Dict[str, t.Any]] +TeardownCallable = t.Union[ + t.Callable[[t.Optional[BaseException]], None], + t.Callable[[t.Optional[BaseException]], t.Awaitable[None]], +] +TemplateContextProcessorCallable = t.Union[ + t.Callable[[], t.Dict[str, t.Any]], + t.Callable[[], t.Awaitable[t.Dict[str, t.Any]]], +] +TemplateFilterCallable = t.Callable[..., t.Any] +TemplateGlobalCallable = t.Callable[..., t.Any] +TemplateTestCallable = t.Callable[..., bool] +URLDefaultCallable = t.Callable[[str, dict], None] +URLValuePreprocessorCallable = t.Callable[[t.Optional[str], t.Optional[dict]], None] + +# This should take Exception, but that either breaks typing the argument +# with a specific exception, or decorating multiple times with different +# exceptions (and using a union type on the argument). +# https://github.com/pallets/flask/issues/4095 +# https://github.com/pallets/flask/issues/4295 +# https://github.com/pallets/flask/issues/4297 +ErrorHandlerCallable = t.Union[ + t.Callable[[t.Any], ResponseReturnValue], + t.Callable[[t.Any], t.Awaitable[ResponseReturnValue]], +] + +RouteCallable = t.Union[ + t.Callable[..., ResponseReturnValue], + t.Callable[..., t.Awaitable[ResponseReturnValue]], +] diff --git a/venv/lib/python3.12/site-packages/flask/views.py b/venv/lib/python3.12/site-packages/flask/views.py new file mode 100644 index 0000000..c7a2b62 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/views.py @@ -0,0 +1,190 @@ +from __future__ import annotations + +import typing as t + +from . import typing as ft +from .globals import current_app +from .globals import request + + +http_method_funcs = frozenset( + ["get", "post", "head", "options", "delete", "put", "trace", "patch"] +) + + +class View: + """Subclass this class and override :meth:`dispatch_request` to + create a generic class-based view. Call :meth:`as_view` to create a + view function that creates an instance of the class with the given + arguments and calls its ``dispatch_request`` method with any URL + variables. + + See :doc:`views` for a detailed guide. + + .. code-block:: python + + class Hello(View): + init_every_request = False + + def dispatch_request(self, name): + return f"Hello, {name}!" + + app.add_url_rule( + "/hello/", view_func=Hello.as_view("hello") + ) + + Set :attr:`methods` on the class to change what methods the view + accepts. + + Set :attr:`decorators` on the class to apply a list of decorators to + the generated view function. Decorators applied to the class itself + will not be applied to the generated view function! + + Set :attr:`init_every_request` to ``False`` for efficiency, unless + you need to store request-global data on ``self``. + """ + + #: The methods this view is registered for. Uses the same default + #: (``["GET", "HEAD", "OPTIONS"]``) as ``route`` and + #: ``add_url_rule`` by default. + methods: t.ClassVar[t.Collection[str] | None] = None + + #: Control whether the ``OPTIONS`` method is handled automatically. + #: Uses the same default (``True``) as ``route`` and + #: ``add_url_rule`` by default. + provide_automatic_options: t.ClassVar[bool | None] = None + + #: A list of decorators to apply, in order, to the generated view + #: function. Remember that ``@decorator`` syntax is applied bottom + #: to top, so the first decorator in the list would be the bottom + #: decorator. + #: + #: .. versionadded:: 0.8 + decorators: t.ClassVar[list[t.Callable]] = [] + + #: Create a new instance of this view class for every request by + #: default. If a view subclass sets this to ``False``, the same + #: instance is used for every request. + #: + #: A single instance is more efficient, especially if complex setup + #: is done during init. However, storing data on ``self`` is no + #: longer safe across requests, and :data:`~flask.g` should be used + #: instead. + #: + #: .. versionadded:: 2.2 + init_every_request: t.ClassVar[bool] = True + + def dispatch_request(self) -> ft.ResponseReturnValue: + """The actual view function behavior. Subclasses must override + this and return a valid response. Any variables from the URL + rule are passed as keyword arguments. + """ + raise NotImplementedError() + + @classmethod + def as_view( + cls, name: str, *class_args: t.Any, **class_kwargs: t.Any + ) -> ft.RouteCallable: + """Convert the class into a view function that can be registered + for a route. + + By default, the generated view will create a new instance of the + view class for every request and call its + :meth:`dispatch_request` method. If the view class sets + :attr:`init_every_request` to ``False``, the same instance will + be used for every request. + + Except for ``name``, all other arguments passed to this method + are forwarded to the view class ``__init__`` method. + + .. versionchanged:: 2.2 + Added the ``init_every_request`` class attribute. + """ + if cls.init_every_request: + + def view(**kwargs: t.Any) -> ft.ResponseReturnValue: + self = view.view_class( # type: ignore[attr-defined] + *class_args, **class_kwargs + ) + return current_app.ensure_sync(self.dispatch_request)(**kwargs) + + else: + self = cls(*class_args, **class_kwargs) + + def view(**kwargs: t.Any) -> ft.ResponseReturnValue: + return current_app.ensure_sync(self.dispatch_request)(**kwargs) + + if cls.decorators: + view.__name__ = name + view.__module__ = cls.__module__ + for decorator in cls.decorators: + view = decorator(view) + + # We attach the view class to the view function for two reasons: + # first of all it allows us to easily figure out what class-based + # view this thing came from, secondly it's also used for instantiating + # the view class so you can actually replace it with something else + # for testing purposes and debugging. + view.view_class = cls # type: ignore + view.__name__ = name + view.__doc__ = cls.__doc__ + view.__module__ = cls.__module__ + view.methods = cls.methods # type: ignore + view.provide_automatic_options = cls.provide_automatic_options # type: ignore + return view + + +class MethodView(View): + """Dispatches request methods to the corresponding instance methods. + For example, if you implement a ``get`` method, it will be used to + handle ``GET`` requests. + + This can be useful for defining a REST API. + + :attr:`methods` is automatically set based on the methods defined on + the class. + + See :doc:`views` for a detailed guide. + + .. code-block:: python + + class CounterAPI(MethodView): + def get(self): + return str(session.get("counter", 0)) + + def post(self): + session["counter"] = session.get("counter", 0) + 1 + return redirect(url_for("counter")) + + app.add_url_rule( + "/counter", view_func=CounterAPI.as_view("counter") + ) + """ + + def __init_subclass__(cls, **kwargs: t.Any) -> None: + super().__init_subclass__(**kwargs) + + if "methods" not in cls.__dict__: + methods = set() + + for base in cls.__bases__: + if getattr(base, "methods", None): + methods.update(base.methods) # type: ignore[attr-defined] + + for key in http_method_funcs: + if hasattr(cls, key): + methods.add(key.upper()) + + if methods: + cls.methods = methods + + def dispatch_request(self, **kwargs: t.Any) -> ft.ResponseReturnValue: + meth = getattr(self, request.method.lower(), None) + + # If the request method is HEAD and we don't have a handler for it + # retry with GET. + if meth is None and request.method == "HEAD": + meth = getattr(self, "get", None) + + assert meth is not None, f"Unimplemented method {request.method!r}" + return current_app.ensure_sync(meth)(**kwargs) diff --git a/venv/lib/python3.12/site-packages/flask/wrappers.py b/venv/lib/python3.12/site-packages/flask/wrappers.py new file mode 100644 index 0000000..ef7aa38 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask/wrappers.py @@ -0,0 +1,173 @@ +from __future__ import annotations + +import typing as t + +from werkzeug.exceptions import BadRequest +from werkzeug.wrappers import Request as RequestBase +from werkzeug.wrappers import Response as ResponseBase + +from . import json +from .globals import current_app +from .helpers import _split_blueprint_path + +if t.TYPE_CHECKING: # pragma: no cover + from werkzeug.routing import Rule + + +class Request(RequestBase): + """The request object used by default in Flask. Remembers the + matched endpoint and view arguments. + + It is what ends up as :class:`~flask.request`. If you want to replace + the request object used you can subclass this and set + :attr:`~flask.Flask.request_class` to your subclass. + + The request object is a :class:`~werkzeug.wrappers.Request` subclass and + provides all of the attributes Werkzeug defines plus a few Flask + specific ones. + """ + + json_module: t.Any = json + + #: The internal URL rule that matched the request. This can be + #: useful to inspect which methods are allowed for the URL from + #: a before/after handler (``request.url_rule.methods``) etc. + #: Though if the request's method was invalid for the URL rule, + #: the valid list is available in ``routing_exception.valid_methods`` + #: instead (an attribute of the Werkzeug exception + #: :exc:`~werkzeug.exceptions.MethodNotAllowed`) + #: because the request was never internally bound. + #: + #: .. versionadded:: 0.6 + url_rule: Rule | None = None + + #: A dict of view arguments that matched the request. If an exception + #: happened when matching, this will be ``None``. + view_args: dict[str, t.Any] | None = None + + #: If matching the URL failed, this is the exception that will be + #: raised / was raised as part of the request handling. This is + #: usually a :exc:`~werkzeug.exceptions.NotFound` exception or + #: something similar. + routing_exception: Exception | None = None + + @property + def max_content_length(self) -> int | None: # type: ignore + """Read-only view of the ``MAX_CONTENT_LENGTH`` config key.""" + if current_app: + return current_app.config["MAX_CONTENT_LENGTH"] + else: + return None + + @property + def endpoint(self) -> str | None: + """The endpoint that matched the request URL. + + This will be ``None`` if matching failed or has not been + performed yet. + + This in combination with :attr:`view_args` can be used to + reconstruct the same URL or a modified URL. + """ + if self.url_rule is not None: + return self.url_rule.endpoint + + return None + + @property + def blueprint(self) -> str | None: + """The registered name of the current blueprint. + + This will be ``None`` if the endpoint is not part of a + blueprint, or if URL matching failed or has not been performed + yet. + + This does not necessarily match the name the blueprint was + created with. It may have been nested, or registered with a + different name. + """ + endpoint = self.endpoint + + if endpoint is not None and "." in endpoint: + return endpoint.rpartition(".")[0] + + return None + + @property + def blueprints(self) -> list[str]: + """The registered names of the current blueprint upwards through + parent blueprints. + + This will be an empty list if there is no current blueprint, or + if URL matching failed. + + .. versionadded:: 2.0.1 + """ + name = self.blueprint + + if name is None: + return [] + + return _split_blueprint_path(name) + + def _load_form_data(self) -> None: + super()._load_form_data() + + # In debug mode we're replacing the files multidict with an ad-hoc + # subclass that raises a different error for key errors. + if ( + current_app + and current_app.debug + and self.mimetype != "multipart/form-data" + and not self.files + ): + from .debughelpers import attach_enctype_error_multidict + + attach_enctype_error_multidict(self) + + def on_json_loading_failed(self, e: ValueError | None) -> t.Any: + try: + return super().on_json_loading_failed(e) + except BadRequest as e: + if current_app and current_app.debug: + raise + + raise BadRequest() from e + + +class Response(ResponseBase): + """The response object that is used by default in Flask. Works like the + response object from Werkzeug but is set to have an HTML mimetype by + default. Quite often you don't have to create this object yourself because + :meth:`~flask.Flask.make_response` will take care of that for you. + + If you want to replace the response object used you can subclass this and + set :attr:`~flask.Flask.response_class` to your subclass. + + .. versionchanged:: 1.0 + JSON support is added to the response, like the request. This is useful + when testing to get the test client response data as JSON. + + .. versionchanged:: 1.0 + + Added :attr:`max_cookie_size`. + """ + + default_mimetype: str | None = "text/html" + + json_module = json + + autocorrect_location_header = False + + @property + def max_cookie_size(self) -> int: # type: ignore + """Read-only view of the :data:`MAX_COOKIE_SIZE` config key. + + See :attr:`~werkzeug.wrappers.Response.max_cookie_size` in + Werkzeug's docs. + """ + if current_app: + return current_app.config["MAX_COOKIE_SIZE"] + + # return Werkzeug's default when not in an app context + return super().max_cookie_size diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/INSTALLER b/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/INSTALLER new file mode 100644 index 0000000..a1b589e --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/LICENSE.rst b/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/LICENSE.rst new file mode 100644 index 0000000..9d227a0 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/LICENSE.rst @@ -0,0 +1,28 @@ +Copyright 2010 Pallets + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/METADATA b/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/METADATA new file mode 100644 index 0000000..92f239c --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/METADATA @@ -0,0 +1,109 @@ +Metadata-Version: 2.1 +Name: Flask-SQLAlchemy +Version: 3.1.1 +Summary: Add SQLAlchemy support to your Flask application. +Maintainer-email: Pallets +Requires-Python: >=3.8 +Description-Content-Type: text/x-rst +Classifier: Development Status :: 5 - Production/Stable +Classifier: Environment :: Web Environment +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: BSD License +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content +Requires-Dist: flask>=2.2.5 +Requires-Dist: sqlalchemy>=2.0.16 +Project-URL: Changes, https://flask-sqlalchemy.palletsprojects.com/changes/ +Project-URL: Chat, https://discord.gg/pallets +Project-URL: Documentation, https://flask-sqlalchemy.palletsprojects.com +Project-URL: Donate, https://palletsprojects.com/donate +Project-URL: Issue Tracker, https://github.com/pallets-eco/flask-sqlalchemy/issues/ +Project-URL: Source Code, https://github.com/pallets-eco/flask-sqlalchemy/ + +Flask-SQLAlchemy +================ + +Flask-SQLAlchemy is an extension for `Flask`_ that adds support for +`SQLAlchemy`_ to your application. It aims to simplify using SQLAlchemy +with Flask by providing useful defaults and extra helpers that make it +easier to accomplish common tasks. + +.. _Flask: https://palletsprojects.com/p/flask/ +.. _SQLAlchemy: https://www.sqlalchemy.org + + +Installing +---------- + +Install and update using `pip`_: + +.. code-block:: text + + $ pip install -U Flask-SQLAlchemy + +.. _pip: https://pip.pypa.io/en/stable/getting-started/ + + +A Simple Example +---------------- + +.. code-block:: python + + from flask import Flask + from flask_sqlalchemy import SQLAlchemy + from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column + + app = Flask(__name__) + app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///example.sqlite" + + class Base(DeclarativeBase): + pass + + db = SQLAlchemy(app, model_class=Base) + + class User(db.Model): + id: Mapped[int] = mapped_column(db.Integer, primary_key=True) + username: Mapped[str] = mapped_column(db.String, unique=True, nullable=False) + + with app.app_context(): + db.create_all() + + db.session.add(User(username="example")) + db.session.commit() + + users = db.session.execute(db.select(User)).scalars() + + +Contributing +------------ + +For guidance on setting up a development environment and how to make a +contribution to Flask-SQLAlchemy, see the `contributing guidelines`_. + +.. _contributing guidelines: https://github.com/pallets-eco/flask-sqlalchemy/blob/main/CONTRIBUTING.rst + + +Donate +------ + +The Pallets organization develops and supports Flask-SQLAlchemy and +other popular packages. In order to grow the community of contributors +and users, and allow the maintainers to devote more time to the +projects, `please donate today`_. + +.. _please donate today: https://palletsprojects.com/donate + + +Links +----- + +- Documentation: https://flask-sqlalchemy.palletsprojects.com/ +- Changes: https://flask-sqlalchemy.palletsprojects.com/changes/ +- PyPI Releases: https://pypi.org/project/Flask-SQLAlchemy/ +- Source Code: https://github.com/pallets-eco/flask-sqlalchemy/ +- Issue Tracker: https://github.com/pallets-eco/flask-sqlalchemy/issues/ +- Website: https://palletsprojects.com/ +- Twitter: https://twitter.com/PalletsTeam +- Chat: https://discord.gg/pallets + diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/RECORD b/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/RECORD new file mode 100644 index 0000000..46e3d05 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/RECORD @@ -0,0 +1,27 @@ +flask_sqlalchemy-3.1.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +flask_sqlalchemy-3.1.1.dist-info/LICENSE.rst,sha256=SJqOEQhQntmKN7uYPhHg9-HTHwvY-Zp5yESOf_N9B-o,1475 +flask_sqlalchemy-3.1.1.dist-info/METADATA,sha256=lBxR1akBt7n9XBjIVTL2OV52OhCfFrb-Mqtoe0DCbR8,3432 +flask_sqlalchemy-3.1.1.dist-info/RECORD,, +flask_sqlalchemy-3.1.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +flask_sqlalchemy-3.1.1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81 +flask_sqlalchemy/__init__.py,sha256=he_w4qQQVS2Z1ms5GCTptDTXNOXBXw0n8zSuWCp8n6Y,653 +flask_sqlalchemy/__pycache__/__init__.cpython-312.pyc,, +flask_sqlalchemy/__pycache__/cli.cpython-312.pyc,, +flask_sqlalchemy/__pycache__/extension.cpython-312.pyc,, +flask_sqlalchemy/__pycache__/model.cpython-312.pyc,, +flask_sqlalchemy/__pycache__/pagination.cpython-312.pyc,, +flask_sqlalchemy/__pycache__/query.cpython-312.pyc,, +flask_sqlalchemy/__pycache__/record_queries.cpython-312.pyc,, +flask_sqlalchemy/__pycache__/session.cpython-312.pyc,, +flask_sqlalchemy/__pycache__/table.cpython-312.pyc,, +flask_sqlalchemy/__pycache__/track_modifications.cpython-312.pyc,, +flask_sqlalchemy/cli.py,sha256=pg3QDxP36GW2qnwe_CpPtkRhPchyVSGM6zlBNWuNCFE,484 +flask_sqlalchemy/extension.py,sha256=71tP_kNtb5VgZdafy_OH1sWdZOA6PaT7cJqX7tKgZ-k,38261 +flask_sqlalchemy/model.py,sha256=_mSisC2Eni0TgTyFWeN_O4LIexTeP_sVTdxh03yMK50,11461 +flask_sqlalchemy/pagination.py,sha256=JFpllrqkRkwacb8DAmQWaz9wsvQa0dypfSkhUDSC2ws,11119 +flask_sqlalchemy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +flask_sqlalchemy/query.py,sha256=Uls9qbmnpb9Vba43EDfsRP17eHJ0X4VG7SE22tH5R3g,3748 +flask_sqlalchemy/record_queries.py,sha256=ouS1ayj16h76LJprx13iYdoFZbm6m8OncrOgAVbG1Sk,3520 +flask_sqlalchemy/session.py,sha256=pBbtN8iDc8yuGVt0k18BvZHh2uEI7QPzZXO7eXrRi1g,3426 +flask_sqlalchemy/table.py,sha256=wAPOy8qwyAxpMwOIUJY4iMOultzz2W0D6xvBkQ7U2CE,859 +flask_sqlalchemy/track_modifications.py,sha256=yieyozj7IiVzwnAGZ-ZrgqrzjrUfG0kPrXBfW_hStSU,2755 diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/REQUESTED b/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/REQUESTED new file mode 100644 index 0000000..e69de29 diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/WHEEL b/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/WHEEL new file mode 100644 index 0000000..3b5e64b --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask_sqlalchemy-3.1.1.dist-info/WHEEL @@ -0,0 +1,4 @@ +Wheel-Version: 1.0 +Generator: flit 3.9.0 +Root-Is-Purelib: true +Tag: py3-none-any diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/__init__.py b/venv/lib/python3.12/site-packages/flask_sqlalchemy/__init__.py new file mode 100644 index 0000000..c2fa059 --- /dev/null +++ b/venv/lib/python3.12/site-packages/flask_sqlalchemy/__init__.py @@ -0,0 +1,26 @@ +from __future__ import annotations + +import typing as t + +from .extension import SQLAlchemy + +__all__ = [ + "SQLAlchemy", +] + + +def __getattr__(name: str) -> t.Any: + if name == "__version__": + import importlib.metadata + import warnings + + warnings.warn( + "The '__version__' attribute is deprecated and will be removed in" + " Flask-SQLAlchemy 3.2. Use feature detection or" + " 'importlib.metadata.version(\"flask-sqlalchemy\")' instead.", + DeprecationWarning, + stacklevel=2, + ) + return importlib.metadata.version("flask-sqlalchemy") + + raise AttributeError(name) diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/__init__.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7524c1d8300b003f3427d2c20d05c362a4e87f02 GIT binary patch literal 1039 zcmZWo&rcIU6rS0(yGv^+APOc120WBCVK>52Fp{Vj4T%9`QV*MBrAn}15{sB0lLf18IQE&o?m(Hr zVHgQ4f+&n<&tMBo&%J&%!-`9^T<0kT6*b;54J35w9TjYY4OMz&3;_O^7z8k|37cQI zX>1tF`s@uO31N01lKht1Q@ON3umP9tR(#zrXRfbWF){brjOKvIcJ?pU!o{~4bCGh1P>Off}$WsgjP5$VnGSQAwjDFV`zaQPRmhEVL^yq zFdVOpU&(_e-3b@Hi78s7SX4PxIRq_gIZ?z>J}6frE?BVOmZ`u53+%Qzjg2lgbH(o& zZb?1rl9SdAsVYEisde6-ZjwSp4FCgtz%)=lo#WJZQ+4rp7mLm1G zwI%Hi9ci`s$nKer6wf)2xRa2{5SOX!`d5PMQN(&)2%*b&UK~|dF8giv6cC>`NO(@Vvn5I1HbH^ui4MphGAr1!V42*hmQva8yV1b_X3z* z=|(r`xp$NsImnG1<(z|@v;T1FFgLw#PybF2?(`p~hxU_0=PEC7lDt=aWFi(^nw+X> zhU+Qe&V+TxmTBK#tm*+PK3V~3ih4zfETNEHbWPAuKeXoGA}!y?jJ1jH0)9uG=eL!+ xw5Q4usWSS652>Yo!|||kjRb`7Cm1~ieSg46!vv|`M#9J#Th>Lo8xA)U`~^we9CrW! literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/cli.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/cli.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..02173a212e7778c1c2f7a183f67c4f2bdda355b6 GIT binary patch literal 1017 zcmZuw%}*3D6mMrgnFU3Ni6$5(5NI#>hc_`mkH zTuvTgOaE`X1~#E+9IfOm)MxD3<>Vq*yF^N zbR~z$lD$OOl1;s$U8%`Zz%J#6M{MCqGE{NgMQ4EsJIWsYP1km*m#frN?-2##C-kA= zyAby^)WNO^%#+QI{zgattIkHpQ2lBvKk^~{Hr>omHS$x<{B$Ef{n?y(J-jizIr?O@ zndxg}`kp&4OD{@|%=u5|Onp*AtGlN@xek?4gHmY=+*Ee1|j?c&TfOAZ{W;sG7XROQ`-I;Row?< literal 0 HcmV?d00001 diff --git a/venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/extension.cpython-312.pyc b/venv/lib/python3.12/site-packages/flask_sqlalchemy/__pycache__/extension.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..73db69a9db059eaf6a593c68c2bc8f6e1db34726 GIT binary patch literal 39946 zcmd^oeQ;aXb?3t;0Rkkz?{D()L!>B?5cMrlvLs5BWZ4#FOR^Qyu|bFrlt6<3^8iXB z1EzNBZmEu2QEfV+8@HxY&xRVi6J<8Db^FJz+wD%XyE8k0DK8O3-ZG8bZnm8%Y`RIS z+1cISx%Yhm1Z6o*o89RX_1?vO_xql6?z!ijd)|L3DJd3k9ciBmP5q`I{E&XAmy-uf zYcH4u;g%o?k|``qn1)Rz3Y){`VKaMLhAr%A9k#Kjeb|ntC0sP&7Mavs^KaYwjo?ST+PCEglmRtShxt`+TmJ+9g;I#H&H)a z&%(tBHw-thunXbF;YJpABiuCH#KI*AHxDugrMYwIajfKm? z?Gqit9V}cP-ZarU+{wZf2zL#4v2bO0^F;S>w@EMyLEHFwbpZ9JR2AI%PW9UuN4kc4 zHcVH8{KGtz@s8Lp8h`U}u(=L_V8!?g1>P0TQ87NUJ}oO{qx2UGrysLYE<>Mon1z#q zRQrk`)did1w(wlTJDmdmCpAg+uULn7u~ZF6)u@fe?rC#(^N%P)w<+TaL?Y36ARdZF zVng^{b|Dye@$umFU}%)$0`fE>ZGnqXIZmlZr(`)8iTeYSlN5g<9EiP$fah``Msfbp zXe1uI7XOinmtN|BYAPsCKPg8igL0gTavlvuq|>2mp$HW>7#s^sh2y7#@c@378Ga5$ zhXNBpMA}YArC^wHQiPhb_{qSfP=qxbue|4i;oxXIC(g!d#!DA(Sp1qlB;jY#xnL}Y zp4~QO?EdqCi{W6#>_3ASwu{lJh?H^oPn;X@pFVbeln*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